var __defProp2=Object.defineProperty,__defNormalProp=(t,e,i)=>e in t?__defProp2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,__publicField=(t,e,i)=>(__defNormalProp(t,"symbol"!=typeof e?e+"":e,i),i),_a,_b,_c;import{l as lodash,t as appStateV2,o as rulersGridVisible,i as isBuiltInEdge,g as globalMsg,w as localSettings,x as linkT3EntryDialogV2,N as NewTool,A as AdjustVlScrollHeight,y as globalNav,u as user,n as library,q as T3_Types,e as deviceModel,z as savedNotify,B as deviceAppState,a as locked,f as undoHistory,r as redoHistory,m as moveable,b as grpNav,h as T3000_Data,v as viewport,j as viewportMargins,k as linkT3EntryDialog,s as selectPanelOptions,T as T3Data,c as appState,C as emptyProject,p as documentAreaPosition}from"./T3Data.cbe80363.js";import{d as defineComponent,h as ref$1,o as onMounted,aA as useCssVars,Y as openBlock,Z as createElementBlock,$ as createBaseVNode,aE as normalizeClass,bB as createStaticVNode,a0 as toDisplayString,aH as normalizeStyle,a1 as createCommentVNode,a as computed,a4 as createBlock,ap as QBtn,s as shallowRef,z as toRefs,g as getCurrentInstance$1,w as watch,j as watchEffect,f as onBeforeUnmount,Q as h,i as inject,n as nextTick,S as isRef,u as unref,e as onUnmounted,a6 as resolveComponent,a5 as withCtx,c as createVNode,C as createTextVNode,ax as QIcon,aC as mergeProps,F as Fragment,as as renderList,W as withModifiers,bC as HvConstant,aF as LogUtil,t as toRaw,X as __vitePreload,N as triggerRef}from"./index.3938ccd1.js";import{T as T3Gv,U as Utils1,S as StateConstant,D as DataObj,a as SegmentData,M as MessageType}from"./MessageType.dfdf3aa9.js";import{$ as $$1,T as Type,p as plainToInstance,b as base64Js,a as panzoom}from"./index.cec6b9d9.js";import{I as IdxUtils}from"./IdxUtils.90eb8a31.js";import{n as ctxMenuConfig,o as objectConfigShow,p as globalMsgShow,q as commonMsg,u as selectedTool,v as isDrawing,w as lastAction,x as selecto,y as clipboardFull,z as topContextToggleVisible,A as toggleValueShow,B as toggleNumberShow,C as toggleModeValue,D as toggleValueDisable,E as toggleNumberDisable,F as toggleValueValue,G as toggleNumberValue,H as showSettingMenu,I as importJsonDialog,J as gaugeSettingsDialog,K as insertCount,L as keepRatio,M as cursorIconPos,N as continuesObjectTypes,O as startTransform,P as objectsRef,Q as showRulers,R as showGrid,S as zoomScale,b as topNavVisible,l as leftNavVisible,r as rightNavVisible}from"./RefConstant.736ae2ef.js";import{am as notification,al as message}from"./index.33b844cc.js";import{tools,demoDeviceData}from"./common.0a9f0488.js";import{l as liveApi}from"./api.bf47c78e.js";import{_ as _export_sfc}from"./plugin-vue_export-helper.21dcd24c.js";import{A as AntdIcon}from"./AntdIcon.ce0fcb4c.js";import{A as ATooltip}from"./index.42b23a4d.js";import{Q as QTooltip}from"./QTooltip.9bdee1bb.js";import{i as init,t as throttle$1,u as use,a as install,b as install$1,c as install$2,d as install$3,e as install$4}from"./install.00f124f0.js";import{c as commonjsGlobal}from"./_commonjsHelpers.a5007c1f.js";function prefixNames(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.map((function(e){return e.split(" ").map((function(e){return e?""+t+e:""})).join(" ")})).join(" ")}function prefixCSS(t,e){return e.replace(/([^}{]*){/gm,(function(e,i){return i.replace(/\.([^{,\s\d.]+)/g,"."+t+"$1")+"{"}))}function ref(t,e){return function(i){i&&(t[e]=i)}}function refs(t,e,i){return function(n){n&&(t[e][i]=n)}}function Properties(t,e){return function(i){var n=i.prototype;t.forEach((function(t){e(n,t)}))}}function withMethods(t,e){return void 0===e&&(e={}),function(i,n){t.forEach((function(t){var s=e[t]||t;s in i||(i[s]=function(){for(var e,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var a=(e=this[n])[t].apply(e,i);return a===this[n]?this:a})}))}}var FUNCTION="function",OBJECT="object",STRING="string",NUMBER="number",UNDEFINED="undefined",IS_WINDOW=typeof window!==UNDEFINED,doc=typeof document!==UNDEFINED&&document,OPEN_CLOSED_CHARACTERS=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],TINY_NUM$1=1e-7,DEFAULT_UNIT_PRESETS={cm:function(t){return 96*t/2.54},mm:function(t){return 96*t/254},in:function(t){return 96*t},pt:function(t){return 96*t/72},pc:function(t){return 96*t/6},"%":function(t,e){return t*e/100},vw:function(t,e){return void 0===e&&(e=window.innerWidth),t/100*e},vh:function(t,e){return void 0===e&&(e=window.innerHeight),t/100*e},vmax:function(t,e){return void 0===e&&(e=Math.max(window.innerWidth,window.innerHeight)),t/100*e},vmin:function(t,e){return void 0===e&&(e=Math.min(window.innerWidth,window.innerHeight)),t/100*e}};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __spreadArrays$2(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,r=a.length;o<r;o++,s++)n[s]=a[o];return n}function dot(t,e,i,n){return(t*n+e*i)/(i+n)}function isUndefined(t){return typeof t===UNDEFINED}function isObject(t){return t&&typeof t===OBJECT}function isArray(t){return Array.isArray(t)}function isString(t){return typeof t===STRING}function isNumber(t){return typeof t===NUMBER}function isFunction(t){return typeof t===FUNCTION}function isEqualSeparator(t,e){return(""===e||" "==e)&&(""===t||" "==t)||t===e}function findOpen(t,e,i,n,s){return findIgnore(t,e,i)?i:findClose(t,e,i+1,n,s)}function findIgnore(t,e,i){if(!t.ignore)return null;var n=e.slice(Math.max(i-3,0),i+3).join("");return new RegExp(t.ignore).exec(n)}function findClose(t,e,i,n,s){for(var a,o=function(i){var o=e[i].trim();if(o===t.close&&!findIgnore(t,e,i))return{value:i};var r=i,l=find$1(s,(function(t){return t.open===o}));if(l&&(r=findOpen(l,e,i,n,s)),-1===r)return a=i,"break";a=i=r},r=i;r<n;++r){var l=o(r);if(r=a,"object"==typeof l)return l.value;if("break"===l)break}return-1}function splitText(t,e){var i=isString(e)?{separator:e}:e,n=i.separator,s=void 0===n?",":n,a=i.isSeparateFirst,o=i.isSeparateOnlyOpenClose,r=i.isSeparateOpenClose,l=void 0===r?o:r,h=i.openCloseCharacters,c=void 0===h?OPEN_CLOSED_CHARACTERS:h,u=c.map((function(t){var e=t.open,i=t.close;return e===i?e:e+"|"+i})).join("|"),d=new RegExp("(\\s*"+s+"\\s*|"+u+"|\\s+)","g"),p=t.split(d).filter((function(t){return t&&"undefined"!==t})),g=p.length,f=[],b=[];function v(){return!!b.length&&(f.push(b.join("")),b=[],!0)}for(var m,y=function(e){var i=p[e].trim(),n=e,r=find$1(c,(function(t){return t.open===i})),h=find$1(c,(function(t){return t.close===i}));if(r){if(-1!==(n=findOpen(r,p,e,g,c))&&l)return v()&&a?(m=e,"break"):(f.push(p.slice(e,n+1).join("")),e=n,a?(m=e,"break"):(m=e,"continue"))}else{if(h&&!findIgnore(h,p,e)){var u=__spreadArrays$2(c);return u.splice(c.indexOf(h),1),{value:splitText(t,{separator:s,isSeparateFirst:a,isSeparateOnlyOpenClose:o,isSeparateOpenClose:l,openCloseCharacters:u})}}if(isEqualSeparator(i,s)&&!o)return v(),a?(m=e,"break"):(m=e,"continue")}-1===n&&(n=g-1),b.push(p.slice(e,n+1).join("")),m=e=n},S=0;S<g;++S){var w=y(S);if(S=m,"object"==typeof w)return w.value;if("break"===w)break}return b.length&&f.push(b.join("")),f}function splitSpace(t){return splitText(t,"")}function splitComma(t){return splitText(t,",")}function splitBracket(t){var e=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(t);return!e||e.length<4?{}:{prefix:e[1],value:e[2],suffix:e[3]}}function splitUnit(t){var e=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(t);if(!e)return{prefix:"",unit:"",value:NaN};var i=e[1],n=e[2];return{prefix:i,unit:e[3],value:parseFloat(n)}}function camelize(t){return t.replace(/[\s-_]+([^\s-_])/g,(function(t,e){return e.toUpperCase()}))}function decamelize(t,e){return void 0===e&&(e="-"),t.replace(/([a-z])([A-Z])/g,(function(t,i,n){return""+i+e+n.toLowerCase()}))}function now(){return Date.now?Date.now():(new Date).getTime()}function findIndex(t,e,i){void 0===i&&(i=-1);for(var n=t.length,s=0;s<n;++s)if(e(t[s],s,t))return s;return i}function find$1(t,e,i){var n=findIndex(t,e);return n>-1?t[n]:i}var requestAnimationFrame$2=function(){var t=now(),e=IS_WINDOW&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return e?e.bind(window):function(e){var i=now();return setTimeout((function(){e(i-t)}),1e3/60)}}(),cancelAnimationFrame$1=function(){var t=IS_WINDOW&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return t?t.bind(window):function(t){clearTimeout(t)}}();function getKeys(t){return Object.keys(t)}function getValues(t){return getKeys(t).map((function(e){return t[e]}))}function convertUnitSize(t,e){var i=splitUnit(t),n=i.value,s=i.unit;if(isObject(e)){var a=e[s];if(a){if(isFunction(a))return a(n);if(DEFAULT_UNIT_PRESETS[s])return DEFAULT_UNIT_PRESETS[s](n,a)}}else if("%"===s)return n*e/100;return DEFAULT_UNIT_PRESETS[s]?DEFAULT_UNIT_PRESETS[s](n):n}function between(t,e,i){return Math.max(e,Math.min(t,i))}function checkBoundSize(t,e,i,n){return void 0===n&&(n=t[0]/t[1]),[[throttle(e[0],TINY_NUM$1),throttle(e[0]/n,TINY_NUM$1)],[throttle(e[1]*n,TINY_NUM$1),throttle(e[1],TINY_NUM$1)]].filter((function(t){return t.every((function(t,n){var s=e[n],a=throttle(s,TINY_NUM$1);return i?t<=s||t<=a:t>=s||t>=a}))}))[0]||t}function calculateBoundSize(t,e,i,n){if(!n)return t.map((function(t,n){return between(t,e[n],i[n])}));var s=t[0],a=t[1],o=!0===n?s/a:n,r=checkBoundSize(t,e,!1,o),l=r[0],h=r[1],c=checkBoundSize(t,i,!0,o),u=c[0],d=c[1];return s<l||a<h?(s=l,a=h):(s>u||a>d)&&(s=u,a=d),[s,a]}function sum(t){for(var e=0,i=t.length-1;i>=0;--i)e+=t[i];return e}function average(t){for(var e=t.length,i=0,n=e-1;n>=0;--n)i+=t[n];return e?i/e:0}function getRad$1(t,e){var i=e[0]-t[0],n=e[1]-t[1],s=Math.atan2(n,i);return s>=0?s:s+2*Math.PI}function getCenterPoint(t){return[0,1].map((function(e){return average(t.map((function(t){return t[e]})))}))}function getShapeDirection(t){var e=getCenterPoint(t),i=getRad$1(e,t[0]),n=getRad$1(e,t[1]);return i<n&&n-i<Math.PI||i>n&&n-i<-Math.PI?1:-1}function getDist$2(t,e){return Math.sqrt(Math.pow((e?e[0]:0)-t[0],2)+Math.pow((e?e[1]:0)-t[1],2))}function throttle(t,e){if(!e)return t;var i=1/e;return Math.round(t/e)/i}function throttleArray(t,e){return t.forEach((function(i,n){t[n]=throttle(t[n],e)})),t}function counter(t){for(var e=[],i=0;i<t;++i)e.push(i);return e}function flat$2(t){return t.reduce((function(t,e){return t.concat(e)}),[])}function pushSet(t,e){-1===t.indexOf(e)&&t.push(e)}function hasClass(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function addClass(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function removeClass(t,e){if(t.classList)t.classList.remove(e);else{var i=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(i," ")}}function addEvent(t,e,i,n){t.addEventListener(e,i,n)}function removeEvent(t,e,i,n){t.removeEventListener(e,i,n)}function getDocument(t){return(null==t?void 0:t.ownerDocument)||doc}function getDocumentElement(t){return getDocument(t).documentElement}function getDocumentBody(t){return getDocument(t).body}function getWindow(t){var e;return(null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView)||window}function isWindow(t){return t&&"postMessage"in t&&"blur"in t&&"self"in t}function isNode(t){return isObject(t)&&t.nodeName&&t.nodeType&&"ownerDocument"in t}var PolyMap=function(){function t(){this.keys=[],this.values=[]}var e=t.prototype;return e.get=function(t){return this.values[this.keys.indexOf(t)]},e.set=function(t,e){var i=this.keys,n=this.values,s=i.indexOf(t),a=-1===s?i.length:s;i[a]=t,n[a]=e},t}(),HashMap=function(){function t(){this.object={}}var e=t.prototype;return e.get=function(t){return this.object[t]},e.set=function(t,e){this.object[t]=e},t}(),SUPPORT_MAP="function"==typeof Map,Link$1=function(){function t(){}var e=t.prototype;return e.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},e.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},e.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},t}();function orderChanged(t,e){var i=[],n=[];return t.forEach((function(t){var e=t[0],s=t[1],a=new Link$1;i[e]=a,n[s]=a})),i.forEach((function(t,e){t.connect(i[e-1])})),t.filter((function(t,i){return!e[i]})).map((function(t,e){var s=t[0],a=t[1];if(s===a)return[0,0];var o=i[s],r=n[a-1],l=o.getIndex();return o.disconnect(),r?o.connect(r,r.next):o.connect(void 0,i[0]),[l,o.getIndex()]}))}var Result=function(){function t(t,e,i,n,s,a,o,r){this.prevList=t,this.list=e,this.added=i,this.removed=n,this.changed=s,this.maintained=a,this.changedBeforeAdded=o,this.fixed=r}var e=t.prototype;return Object.defineProperty(e,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(e,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),e.caculateOrdered=function(){var t=orderChanged(this.changedBeforeAdded,this.fixed),e=this.changed,i=[];this.cacheOrdered=t.filter((function(t,n){var s=t[0],a=t[1],o=e[n],r=o[0],l=o[1];if(s!==a)return i.push([r,l]),!0})),this.cachePureChanged=i},t}();function diff$1(t,e,i){var n=SUPPORT_MAP?Map:i?HashMap:PolyMap,s=i||function(t){return t},a=[],o=[],r=[],l=t.map(s),h=e.map(s),c=new n,u=new n,d=[],p=[],g={},f=[],b=0,v=0;return l.forEach((function(t,e){c.set(t,e)})),h.forEach((function(t,e){u.set(t,e)})),l.forEach((function(t,e){var i=u.get(t);void 0===i?(++v,o.push(e)):g[i]=v})),h.forEach((function(t,e){var i=c.get(t);void 0===i?(a.push(e),++b):(r.push([i,e]),v=g[e]||0,d.push([i-v,e-b]),p.push(e===i),i!==e&&f.push([i,e]))})),o.reverse(),new Result(t,e,a,o,f,r,d,p)}var ListDiffer=function(){function t(t,e){void 0===t&&(t=[]),this.findKeyCallback=e,this.list=[].slice.call(t)}return t.prototype.update=function(t){var e=[].slice.call(t),i=diff$1(this.list,e,this.findKeyCallback);return this.list=e,i},t}(),extendStatics$5=function(t,e){return(extendStatics$5=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function __extends$5(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics$5(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$7=function(){return __assign$7=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$7.apply(this,arguments)};function __rest$2(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}function __spreadArray$1(t,e,i){if(i||2===arguments.length)for(var n,s=0,a=e.length;s<a;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}function fillKeys(t){var e=0;return t.map((function(t){return null==t?"$compat".concat(++e):"".concat(t)}))}function flat$1(t){var e=[];return t.forEach((function(t){e=e.concat(isArray(t)?flat$1(t):t)})),e}function fillProps(t,e){if(!e)return t;for(var i in e)isUndefined(t[i])&&(t[i]=e[i]);return t}function isDiff(t,e){if(t===e)return!1;for(var i in t)if(!(i in e))return!0;for(var i in e)if(t[i]!==e[i])return!0;return!1}function getAttributes(t){var e=t.className,i=__rest$2(t,["className"]);return null!=e&&(i.class=e),delete i.style,delete i.children,i}function splitProps(t){var e={},i={};for(var n in t)0===n.indexOf("on")?i[n]=t[n]:e[n]=t[n];return[e,i]}function findContainerNode(t){if(!t)return null;var e=t.b;return isNode(e)?e:findContainerNode(t.c)}function removeNode(t){var e=t.parentNode;e&&e.removeChild(t)}function executeHooks(t){t.forEach((function(t){t()}))}function renderFunctionComponent(){return this.constructor(this.props,this.context)}var hooksIndex=0,Provider=function(){function t(t,e,i,n,s,a,o){void 0===o&&(o={}),this.t=t,this.d=e,this.k=i,this.i=n,this.c=s,this.ref=a,this.ps=o,this.typ="prov",this._ps=[],this._cs={},this._hyd=null,this._sel=!1}var e=t.prototype;return e.s=function(){return!0},e.u=function(t,e,i,n,s){var a=this,o=a.d,r=flat$1(getValues(e).filter((function(t){return t.$_req})).map((function(t){return t.$_subs}))),l=find$1(r,(function(t){return t.d===o}));if(a.b&&!isString(i)&&!s&&!a.s(i.props,n)&&!l)return r.reduce((function(t,e){var i=e.d;return t[0]?t[0].d===i&&t.push(e):i>o&&t.push(e),t}),[]).forEach((function(i){renderProviders(i,i._ps,[i.o],t,e,!0)})),!1;a.o=i,a.ss(n);var h=a.ps;return isString(i)||(a.ps=i.props,a.ref=i.ref),setCurrentInstance(this),a.r(t,e,a.b?h:{},n),!0},e.md=function(){this.rr()},e.ss=function(){},e.ud=function(){this.rr()},e.rr=function(){var t=this,e=t.ref,i=t.fr;e&&e(i?i.current:t.b)},t}();function getCurrentInstance(){return Object.__CROACT_CURRENT_INSTNACE__}function getHooksIndex(){return hooksIndex}function setHooksInex(t){hooksIndex=t}function setCurrentInstance(t){return Object.__CROACT_CURRENT_INSTNACE__=t,hooksIndex=0,t}var Component=function(){function t(t,e){void 0===t&&(t={}),this.props=t,this.context=e,this.state={},this.$_timer=0,this.$_state={},this.$_subs=[],this.$_cs={}}var e=t.prototype;return e.render=function(){return null},e.shouldComponentUpdate=function(t,e){return this.props!==t||this.state!==e},e.setState=function(t,e,i){var n=this;n.$_timer||(n.$_state={}),clearTimeout(n.$_timer),n.$_timer=0,n.$_state=__assign$7(__assign$7({},n.$_state),t),i?n.$_setState(e,i):n.$_timer=window.setTimeout((function(){n.$_timer=0,n.$_setState(e,i)}))},e.forceUpdate=function(t){this.setState({},t,!0)},e.componentDidMount=function(){},e.componentDidUpdate=function(t,e){},e.componentWillUnmount=function(){},e.$_setState=function(t,e){var i=[],n=this.$_p;renderProviders(n.c,[n],[n.o],i,n._cs,__assign$7(__assign$7({},this.state),this.$_state),e)&&(t&&i.push(t),executeHooks(i),setCurrentInstance(null))},t}(),PureComponent=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$5(e,t),e.prototype.shouldComponentUpdate=function(t,e){return isDiff(this.props,t)||isDiff(this.state,e)},e}(Component);function createRef(t){var e=function(t){e.current=t};return e.current=t,e}function forwardRef(t){return t._fr=!0,t}function createComponent(t,e,i,n){var s,a;return(null===(s=null==t?void 0:t.prototype)||void 0===s?void 0:s.render)?a=new t(e,i):((a=new Component(e,i)).constructor=t,t._fr?(n.fr=createRef(),a.render=function(){return this.constructor(this.props,n.fr)}):a.render=renderFunctionComponent),a.$_p=n,a}var ComponentProvider=function(t){function e(e,i,n,s,a,o,r){void 0===r&&(r={});var l=t.call(this,e,i,n,s,a,o,fillProps(r,e.defaultProps))||this;return l.typ="comp",l._usefs=[],l._uefs=[],l._defs=[],l}__extends$5(e,t);var i=e.prototype;return i.s=function(t,e){var i=this.b;return!1!==i.shouldComponentUpdate(fillProps(t,this.t.defaultProps),e||i.state)},i.r=function(t,e,i){var n,s,a=this,o=a.t;a.ps=fillProps(a.ps,a.t.defaultProps);var r=a.ps,l=!a.b,h=o.contextType,c=a.b,u=null==h?void 0:h.get(a);a._cs=e,l?(c=createComponent(o,r,u,a),a.b=c):(c.props=r,c.context=u);var d=c.state;a._usefs=[],a._uefs=[];var p=c.render();0===(null===(s=null===(n=null==p?void 0:p.props)||void 0===n?void 0:n.children)||void 0===s?void 0:s.length)&&(p.props.children=a.ps.children);var g=__assign$7(__assign$7({},e),c.$_cs);renderProviders(a,a._ps,p?[p]:[],t,g),l?a._uefs.push((function(){null==h||h.register(a),c.componentDidMount()})):a._uefs.push((function(){c.componentDidUpdate(i,d)})),t.push((function(){a._usefs.forEach((function(t){t()})),l?a.md():a.ud(),a._defs=a._uefs.map((function(t){return t()}))}))},i.ss=function(t){var e=this.b;e&&t&&(e.state=t)},i.un=function(){var t,e=this;e._ps.forEach((function(t){t.un()})),null===(t=e.t.contextType)||void 0===t||t.unregister(e),clearTimeout(e.b.$_timer),e._defs.forEach((function(t){t&&t()})),e.b.componentWillUnmount()},e}(Provider);function diffAttributes(t,e,i){var n=diffObject(getAttributes(t),getAttributes(e)),s=n.added,a=n.removed,o=n.changed;for(var r in s)i.setAttribute(r,s[r]);for(var l in o)i.setAttribute(l,o[l][1]);for(var h in a)i.removeAttribute(h)}function diffEvents(t,e,i){var n=diffObject(t,e),s=n.added,a=n.removed;for(var o in a)i.e(o,!0);for(var r in s)i.e(r)}function diffObject(t,e){var i=getKeys(t),n=getKeys(e),s=diff$1(i,n,(function(t){return t})),a={},o={},r={};return s.added.forEach((function(t){var i=n[t];a[i]=e[i]})),s.removed.forEach((function(e){var n=i[e];o[n]=t[n]})),s.maintained.forEach((function(n){var s=n[0],a=i[s],o=[t[a],e[a]];t[a]!==e[a]&&(r[a]=o)})),{added:a,removed:o,changed:r}}function diffStyle(t,e,i){var n=i.style,s=diffObject(t,e),a=s.added,o=s.removed,r=s.changed;for(var l in a){var h=decamelize(l,"-");n.setProperty(h,a[l])}for(var l in r){var c=decamelize(l,"-");n.setProperty(c,r[l][1])}for(var l in o){var u=decamelize(l,"-");n.removeProperty(u)}}function getNativeEventName(t){return t.replace(/^on/g,"").toLowerCase()}var ElementProvider=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.typ="elem",e._es={},e._svg=!1,e}__extends$5(e,t);var i=e.prototype;return i.e=function(t,e){var i=this,n=i._es,s=i.b,a=getNativeEventName(t);e?(removeEvent(s,a,n[t]),delete n[t]):(n[t]=function(e){var n,s;null===(s=(n=i.ps)[t])||void 0===s||s.call(n,e)},addEvent(s,a,n[t]))},i.s=function(t){return isDiff(this.ps,t)},i.r=function(t,e,i){var n,s=this,a=!s.b,o=s.ps;if(a){var r=findContainerNode(s.c),l=!1;l=!(!s._svg&&"svg"!==s.t)||r&&r.ownerSVGElement,s._svg=l;var h=null===(n=s._hyd)||void 0===n?void 0:n.splice(0,1)[0],c=s.t;if(h)s._hyd=[].slice.call(h.children||[]);else{var u=getDocument(r);h=l?u.createElementNS("http://www.w3.org/2000/svg",c):u.createElement(c)}s.b=h}renderProviders(s,s._ps,o.children,t,e);var d=s.b,p=splitProps(i),g=p[0],f=p[1],b=splitProps(o),v=b[0],m=b[1];return diffAttributes(g,v,d),diffEvents(f,m,s),diffStyle(i.style||{},o.style||{},d),t.push((function(){a?s.md():s.ud()})),!0},i.un=function(){var t=this,e=t._es,i=t.b;for(var n in e)removeEvent(i,n,e[n]);t._ps.forEach((function(t){t.un()})),t._es={},t._sel||removeNode(i)},e}(Provider);function findDOMNode(t){if(!t||isNode(t))return t;var e=t.$_p._ps;return e.length?findDOMNode(e[0].b):null}function findNodeProvider(t){if(t){if(t.b&&isNode(t.b))return t;var e=t._ps;return e.length?findNodeProvider(e[0]):null}}function createElement$1(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=e||{},a=s.key,o=s.ref,r=__rest$2(s,["key","ref"]);return{type:t,key:a,ref:o,props:__assign$7(__assign$7({},r),{children:flat$2(i).filter((function(t){return null!=t&&!1!==t}))})}}var ContainerProvider=function(t){function e(e,i){void 0===i&&(i=0);var n=t.call(this,"container",i,"container",0,null)||this;return n.typ="container",n.b=e,n}__extends$5(e,t);var i=e.prototype;return i.r=function(){return!0},i.un=function(){},e}(Provider),TextProvider=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.typ="text",e}__extends$5(e,t);var i=e.prototype;return i.r=function(t){var e,i=this,n=!i.b;if(n){var s=findContainerNode(i.c),a=null===(e=i._hyd)||void 0===e?void 0:e.splice(0,1)[0];i.b=a||getDocument(s).createTextNode(i.t.replace("text_",""))}return t.push((function(){n?i.md():i.ud()})),!0},i.un=function(){removeNode(this.b)},e}(Provider);function diffProviders(t,e,i){var n=i.map((function(t){return isString(t)?null:t.key})),s=diff$1(fillKeys(e.map((function(t){return t.k}))),fillKeys(n),(function(t){return t}));s.removed.forEach((function(t){e.splice(t,1)[0].un()})),s.ordered.forEach((function(t){var i=t[0],n=t[1],s=e.splice(i,1)[0];e.splice(n,0,s);var a=findDOMNode(s.b),o=findDOMNode(e[n+1]&&e[n+1].b);a&&a.parentNode.insertBefore(a,o)})),s.added.forEach((function(s){e.splice(s,0,createProvider(i[s],n[s],s,t))}));var a=s.maintained.filter((function(s){s[0];var a=s[1],o=i[a],r=e[a];return(isString(o)?"text_".concat(o):o.type)!==r.t?(r.un(),e.splice(a,1,createProvider(o,n[a],a,t)),!0):(r.i=a,!1)}));return __spreadArray$1(__spreadArray$1([],s.added,!0),a.map((function(t){return t[0],t[1]})),!0)}function getNextSibiling(t,e){for(var i=t._ps,n=i.length,s=e.i+1;s<n;++s){var a=findDOMNode(i[s].b);if(a)return a}return null}function createProvider(t,e,i,n){var s=n.d+1;if(isString(t)||isNumber(t))return new TextProvider("text_".concat(t),s,e,i,n,null,{});var a=t.type;return new("string"==typeof a?ElementProvider:ComponentProvider)(a,s,e,i,n,t.ref,t.props)}function renderProviders(t,e,i,n,s,a,o){var r=diffProviders(t,e,i),l=t._hyd,h=e.filter((function(t,e){return t._hyd=l,t.u(n,s,i[e],a,o)}));"container"===t.typ&&t._sel&&e.forEach((function(t){var e=findNodeProvider(t);e&&(e._sel=!0)})),t._hyd=null;var c=findContainerNode(t);return c&&r.reverse().forEach((function(i){var n=e[i],s=findDOMNode(n.b);if(s&&c!==s&&!s.parentNode){var a=getNextSibiling(t,n);c.insertBefore(s,a)}})),h.length>0}function renderProvider(t,e,i,n){void 0===i&&(i=e.__CROACT__),void 0===n&&(n={});var s=!!i;i||(i=new ContainerProvider(e));var a=[];return renderProviders(i,i._ps,t?[t]:[],a,n,void 0,void 0),executeHooks(a),setCurrentInstance(null),s||(e.__CROACT__=i),i}function renderSelf(t,e,i){return!i&&t&&((i=new ContainerProvider(e.parentElement))._hyd=[e],i._sel=!0),renderProvider(t,e,i),i}function checkHookInfo(t){var e=getCurrentInstance(),i=e._hs||(e._hs=[]),n=getHooksIndex(),s=i[n];if(setHooksInex(n+1),s){if(!isDiff(s.deps,t.deps))return s.updated=!1,s;i[n]=t}else i.push(t);return t.value=t.func(),t.updated=!0,t}function useMemo(t,e){return checkHookInfo({func:t,deps:e}).value}function useRef(t){return useMemo((function(){return createRef(t)}),[])}function useEffect(t,e,i){var n=getCurrentInstance(),s=checkHookInfo({func:function(){return t},deps:e}),a=i?n._usefs:n._uefs;s.updated?a.push((function(){return s.effect&&s.effect(),s.effect=t(),s.effect})):a.push((function(){return s.effect}))}function useImperativeHandle(t,e,i){useEffect((function(){null==t||t(e())}),i,!0)}function some(t,e){for(var i=t.length,n=0;n<i;++n)if(e(t[n],n))return!0;return!1}function find(t,e){for(var i=t.length,n=0;n<i;++n)if(e(t[n],n))return t[n];return null}function getUserAgentString(t){var e=t;if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}function execRegExp(t,e){try{return new RegExp(t,"g").exec(e)}catch(i){return null}}function hasUserAgentData(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var t=navigator.userAgentData,e=t.brands||t.uaList;return!(!e||!e.length)}function findVersion(t,e){var i=execRegExp("("+t+")((?:\\/|\\s|:)([0-9|\\.|_]+))",e);return i?i[3]:""}function convertVersion(t){return t.replace(/_/g,".")}function findPreset(t,e){var i=null,n="-1";return some(t,(function(t){var s=execRegExp("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",e);return!(!s||t.brand)&&(i=t,n=s[3]||"-1",t.versionAlias?n=t.versionAlias:t.versionTest&&(n=findVersion(t.versionTest.toLowerCase(),e)||n),n=convertVersion(n),!0)})),{preset:i,version:n}}function findPresetBrand(t,e){var i={brand:"",version:"-1"};return some(t,(function(t){var n=findBrand(e,t);return!!n&&(i.brand=t.id,i.version=t.versionAlias||n.version,"-1"!==i.version)})),i}function findBrand(t,e){return find(t,(function(t){var i=t.brand;return execRegExp(""+e.test,i.toLowerCase())}))}var BROWSER_PRESETS=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],CHROMIUM_PRESETS=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],WEBKIT_PRESETS=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],WEBVIEW_PRESETS=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],OS_PRESETS=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function isWebView(t){return!!findPreset(WEBVIEW_PRESETS,t).preset}function getLegacyAgent(t){var e=getUserAgentString(t),i=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:isWebView(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},s={name:"unknown",version:"-1",majorVersion:-1},a=findPreset(BROWSER_PRESETS,e),o=a.preset,r=a.version,l=findPreset(OS_PRESETS,e),h=l.preset,c=l.version,u=findPreset(CHROMIUM_PRESETS,e);if(n.chromium=!!u.preset,n.chromiumVersion=u.version,!n.chromium){var d=findPreset(WEBKIT_PRESETS,e);n.webkit=!!d.preset,n.webkitVersion=d.version}return h&&(s.name=h.id,s.version=c,s.majorVersion=parseInt(c,10)),o&&(n.name=o.id,n.version=r,n.webview&&"ios"===s.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:s,isMobile:i,isHints:!1}}function getClientHintsAgent(t){var e=navigator.userAgentData,i=(e.uaList||e.brands).slice(),n=t&&t.fullVersionList,s=e.mobile||!1,a=i[0],o=(t&&t.platform||e.platform||navigator.platform).toLowerCase(),r={name:a.brand,version:a.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!findPresetBrand(WEBVIEW_PRESETS,i).brand||isWebView(getUserAgentString())},l={name:"unknown",version:"-1",majorVersion:-1};r.webkit=!r.chromium&&some(WEBKIT_PRESETS,(function(t){return findBrand(i,t)}));var h=findPresetBrand(CHROMIUM_PRESETS,i);if(r.chromium=!!h.brand,r.chromiumVersion=h.version||"-1",!r.chromium){var c=findPresetBrand(WEBKIT_PRESETS,i);r.webkit=!!c.brand,r.webkitVersion=c.version||"-1"}var u=find(OS_PRESETS,(function(t){return new RegExp(""+t.test,"g").exec(o)}));if(l.name=u?u.id:"",t&&(l.version=t.platformVersion||"-1"),n&&n.length){var d=findPresetBrand(BROWSER_PRESETS,n);r.name=d.brand||r.name,r.version=d.version||r.version}else{var p=findPresetBrand(BROWSER_PRESETS,i);r.name=p.brand||r.name,r.version=p.brand&&t?t.uaFullVersion:p.version}return r.webkit&&(l.name=s?"ios":"mac"),"ios"===l.name&&r.webview&&(r.version="-1"),l.version=convertVersion(l.version),r.version=convertVersion(r.version),l.majorVersion=parseInt(l.version,10),r.majorVersion=parseInt(r.version,10),{browser:r,os:l,isMobile:s,isHints:!0}}function agent$1(t){return void 0===t&&hasUserAgentData()?getClientHintsAgent():getLegacyAgent(t)}function add(t,e,i,n,s,a){for(var o=0;o<s;++o){var r=i+o*s,l=n+o*s;t[r]+=t[l]*a,e[r]+=e[l]*a}}function swap(t,e,i,n,s){for(var a=0;a<s;++a){var o=i+a*s,r=n+a*s,l=t[o],h=e[o];t[o]=t[r],t[r]=l,e[o]=e[r],e[r]=h}}function divide(t,e,i,n,s){for(var a=0;a<n;++a){var o=i+a*n;t[o]/=s,e[o]/=s}}function ignoreDimension(t,e,i){void 0===i&&(i=Math.sqrt(t.length));for(var n=t.slice(),s=0;s<i;++s)n[s*i+e-1]=0,n[(e-1)*i+s]=0;return n[(e-1)*(i+1)]=1,n}function invert(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var i=t.slice(),n=createIdentityMatrix(e),s=0;s<e;++s){var a=e*s+s;if(!throttle(i[a],TINY_NUM$1))for(var o=s+1;o<e;++o)if(i[e*s+o]){swap(i,n,s,o,e);break}if(!throttle(i[a],TINY_NUM$1))return[];divide(i,n,s,e,i[a]);for(o=0;o<e;++o){var r=o,l=i[o+s*e];throttle(l,TINY_NUM$1)&&s!==o&&add(i,n,r,s,e,-l)}}return n}function transpose(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var i=[],n=0;n<e;++n)for(var s=0;s<e;++s)i[s*e+n]=t[e*n+s];return i}function getOrigin(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var i=[],n=t[e*e-1],s=0;s<e-1;++s)i[s]=t[e*(e-1)+s]/n;return i[e-1]=0,i}function fromTranslation(t,e){for(var i=createIdentityMatrix(e),n=0;n<e-1;++n)i[e*(e-1)+n]=t[n]||0;return i}function convertPositionMatrix(t,e){for(var i=t.slice(),n=t.length;n<e-1;++n)i[n]=0;return i[e-1]=1,i}function convertDimension(t,e,i){if(void 0===e&&(e=Math.sqrt(t.length)),e===i)return t;for(var n=createIdentityMatrix(i),s=Math.min(e,i),a=0;a<s-1;++a){for(var o=0;o<s-1;++o)n[a*i+o]=t[a*e+o];n[(a+1)*i-1]=t[(a+1)*e-1],n[(i-1)*i+a]=t[(e-1)*e+a]}return n[i*i-1]=t[e*e-1],n}function multiplies(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=createIdentityMatrix(t);return e.forEach((function(e){n=multiply(n,e,t)})),n}function multiply(t,e,i){void 0===i&&(i=Math.sqrt(t.length));var n=[],s=t.length/i,a=e.length/s;if(!s)return e;if(!a)return t;for(var o=0;o<i;++o)for(var r=0;r<a;++r){n[r*i+o]=0;for(var l=0;l<s;++l)n[r*i+o]+=t[l*i+o]*e[r*s+l]}return n}function plus(t,e){for(var i=Math.min(t.length,e.length),n=t.slice(),s=0;s<i;++s)n[s]=n[s]+e[s];return n}function minus(t,e){for(var i=Math.min(t.length,e.length),n=t.slice(),s=0;s<i;++s)n[s]=n[s]-e[s];return n}function convertCSStoMatrix(t,e){return void 0===e&&(e=6===t.length),e?[t[0],t[1],0,t[2],t[3],0,t[4],t[5],1]:t}function convertMatrixtoCSS(t,e){return void 0===e&&(e=9===t.length),e?[t[0],t[1],t[3],t[4],t[6],t[7]]:t}function calculate(t,e,i){void 0===i&&(i=e.length);var n=multiply(t,e,i),s=n[i-1];return n.map((function(t){return t/s}))}function rotateX3d(t,e){return multiply(t,[1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1],4)}function rotateY3d(t,e){return multiply(t,[Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1],4)}function rotateZ3d(t,e){return multiply(t,createRotateMatrix(e,4))}function scale3d(t,e){var i=e[0],n=void 0===i?1:i,s=e[1],a=void 0===s?1:s,o=e[2];return multiply(t,[n,0,0,0,0,a,0,0,0,0,void 0===o?1:o,0,0,0,0,1],4)}function rotate(t,e){return calculate(createRotateMatrix(e,3),convertPositionMatrix(t,3))}function translate3d(t,e){var i=e[0],n=void 0===i?0:i,s=e[1],a=void 0===s?0:s,o=e[2];return multiply(t,[1,0,0,0,0,1,0,0,0,0,1,0,n,a,void 0===o?0:o,1],4)}function matrix3d(t,e){return multiply(t,e,4)}function createRotateMatrix(t,e){var i=Math.cos(t),n=Math.sin(t),s=createIdentityMatrix(e);return s[0]=i,s[1]=n,s[e]=-n,s[e+1]=i,s}function createIdentityMatrix(t){for(var e=t*t,i=[],n=0;n<e;++n)i[n]=n%(t+1)?0:1;return i}function createScaleMatrix(t,e){for(var i=createIdentityMatrix(e),n=Math.min(t.length,e-1),s=0;s<n;++s)i[(e+1)*s]=t[s];return i}function createOriginMatrix(t,e){for(var i=createIdentityMatrix(e),n=Math.min(t.length,e-1),s=0;s<n;++s)i[e*(e-1)+s]=t[s];return i}function createWarpMatrix(t,e,i,n,s,a,o,r){var l=t[0],h=t[1],c=e[0],u=e[1],d=i[0],p=i[1],g=n[0],f=n[1],b=s[0],v=s[1],m=a[0],y=a[1],S=o[0],w=o[1],x=r[0],C=r[1],D=invert([l,0,c,0,d,0,g,0,h,0,u,0,p,0,f,0,1,0,1,0,1,0,1,0,0,l,0,c,0,d,0,g,0,h,0,u,0,p,0,f,0,1,0,1,0,1,0,1,-b*l,-v*l,-m*c,-y*c,-S*d,-w*d,-x*g,-C*g,-b*h,-v*h,-m*u,-y*u,-S*p,-w*p,-x*f,-C*f],8);if(!D.length)return[];var T=multiply(D,[b,v,m,y,S,w,x,C],8);return T[8]=1,convertDimension(transpose(T),3,4)}var __assign$6=function(){return __assign$6=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$6.apply(this,arguments)};function createMatrix(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function parseMat(t,e){return void 0===e&&(e=0),toMat(parse(t,e))}function calculateMatrixDist(t,e){var i=calculate(t,[e[0],e[1]||0,e[2]||0,1],4),n=i[3]||1;return[i[0]/n,i[1]/n,i[2]/n]}function getDistElementMatrix(t,e){void 0===e&&(e=document.body);for(var i=t,n=createMatrix();i;){if(n=matrix3d(parseMat(getComputedStyle(i).transform),n),i===e)break;i=i.parentElement}return(n=invert(n,4))[12]=0,n[13]=0,n[14]=0,n}function toMat(t){var e=createMatrix();return t.forEach((function(t){var i=t.matrixFunction,n=t.functionValue;i&&(e=i(e,n))})),e}function parse(t,e){return void 0===e&&(e=0),(isArray(t)?t:splitSpace(t)).map((function(t){var i=splitBracket(t),n=i.prefix,s=i.value,a=null,o=n,r="";if("translate"===n||"translateX"===n||"translate3d"===n){var l=isObject(e)?__assign$6(__assign$6({},e),{"o%":e["%"]}):{"%":e,"o%":e},h=splitComma(s).map((function(t,i){return l["%"]=0===i&&"x%"in l?e["x%"]:1===i&&"y%"in l?e["y%"]:e["o%"],convertUnitSize(t,l)})),c=h[0],u=h[1],d=void 0===u?0:u,p=h[2];a=translate3d,r=[c,d,void 0===p?0:p]}else if("translateY"===n){a=translate3d,r=[0,d=convertUnitSize(s,isObject(e)?__assign$6({"%":e["y%"]},e):{"%":e}),0]}else if("translateZ"===n){a=translate3d,r=[0,0,parseFloat(s)]}else if("scale"===n||"scale3d"===n){var g=splitComma(s).map((function(t){return parseFloat(t)})),f=g[0],b=g[1],v=void 0===b?f:b,m=g[2];a=scale3d,r=[f,v,void 0===m?1:m]}else if("scaleX"===n){a=scale3d,r=[f=parseFloat(s),1,1]}else if("scaleY"===n){a=scale3d,r=[1,v=parseFloat(s),1]}else if("scaleZ"===n){a=scale3d,r=[1,1,parseFloat(s)]}else if("rotate"===n||"rotateZ"===n||"rotateX"===n||"rotateY"===n){var y=splitUnit(s),S=y.unit,w=y.value;"rotate"===n||"rotateZ"===n?(o="rotateZ",a=rotateZ3d):"rotateX"===n?a=rotateX3d:"rotateY"===n&&(a=rotateY3d),r="rad"===S?w:w*Math.PI/180}else if("matrix3d"===n)a=matrix3d,r=splitComma(s).map((function(t){return parseFloat(t)}));else if("matrix"===n){var x=splitComma(s).map((function(t){return parseFloat(t)}));a=matrix3d,r=[x[0],x[1],0,0,x[2],x[3],0,0,0,0,1,0,x[4],x[5],0,1]}else o="";return{name:n,functionName:o,value:s,matrixFunction:a,functionValue:r}}))}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var extendStatics$4=function(t,e){return(extendStatics$4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function __extends$4(t,e){function i(){this.constructor=t}extendStatics$4(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var findKeyCallback="function"==typeof Map?void 0:(childrenCount=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++childrenCount)}),childrenCount,ChildrenDiffer=function(t){function e(e){return void 0===e&&(e=[]),t.call(this,e,findKeyCallback)||this}return __extends$4(e,t),e}(ListDiffer);function diff(t,e){return diff$1(t,e,findKeyCallback)}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var __assign$5=function(){return __assign$5=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$5.apply(this,arguments)};function __spreadArrays$1(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,r=a.length;o<r;o++,s++)n[s]=a[o];return n}var EventEmitter=function(){function t(){this._events={}}var e=t.prototype;return e.on=function(t,e){if(isObject(t))for(var i in t)this.on(i,t[i]);else this._addEvent(t,e,{});return this},e.off=function(t,e){if(t)if(isObject(t))for(var i in t)this.off(i);else if(e){var n=this._events[t];if(n){var s=findIndex(n,(function(t){return t.listener===e}));s>-1&&n.splice(s,1)}}else this._events[t]=[];else this._events={};return this},e.once=function(t,e){var i=this;return e&&this._addEvent(t,e,{once:!0}),new Promise((function(e){i._addEvent(t,e,{once:!0})}))},e.emit=function(t,e){var i=this;void 0===e&&(e={});var n=this._events[t];if(!t||!n)return!0;var s=!1;return e.eventType=t,e.stop=function(){s=!0},e.currentTarget=this,__spreadArrays$1(n).forEach((function(n){n.listener(e),n.once&&i.off(t,n.listener)})),!s},e.trigger=function(t,e){return void 0===e&&(e={}),this.emit(t,e)},e._addEvent=function(t,e,i){var n=this._events;n[t]=n[t]||[],n[t].push(__assign$5({listener:e},i))},t}(),EventEmitter$1=EventEmitter,extendStatics$3=function(t,e){return(extendStatics$3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function __extends$3(t,e){function i(){this.constructor=t}extendStatics$3(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$4=function(){return __assign$4=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$4.apply(this,arguments)};function getDefaultScrollPosition$1(t){var e=t.container;return e===document.body?[e.scrollLeft||document.documentElement.scrollLeft,e.scrollTop||document.documentElement.scrollTop]:[e.scrollLeft,e.scrollTop]}function checkDefaultScrollEvent(t,e){return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}function getContainerElement(t){return t?isString(t)?document.querySelector(t):isFunction(t)?t():t instanceof Element?t:"current"in t?t.current:"value"in t?t.value:void 0:null}var DragScroll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._startRect=null,e._startPos=[],e._prevTime=0,e._timer=0,e._prevScrollPos=[0,0],e._isWait=!1,e._flag=!1,e._currentOptions=null,e._lock=!1,e._unregister=null,e._onScroll=function(){var t=e._currentOptions;!e._lock&&t&&e.emit("scrollDrag",{next:function(i){e.checkScroll({container:t.container,inputEvent:i})}})},e}__extends$3(e,t);var i=e.prototype;return i.dragStart=function(t,e){var i=getContainerElement(e.container);if(i){var n=0,s=0,a=0,o=0;if(i===document.body)a=window.innerWidth,o=window.innerHeight;else{var r=i.getBoundingClientRect();n=r.top,s=r.left,a=r.width,o=r.height}this._flag=!0,this._startPos=[t.clientX,t.clientY],this._startRect={top:n,left:s,width:a,height:o},this._prevScrollPos=this._getScrollPosition([0,0],e),this._currentOptions=e,this._registerScrollEvent(e)}else this._flag=!1},i.drag=function(t,e){if(clearTimeout(this._timer),this._flag){var i=t.clientX,n=t.clientY,s=e.threshold,a=void 0===s?0:s,o=this._startRect,r=this._startPos;this._currentOptions=e;var l=[0,0];return o.top>n-a?(r[1]>o.top||n<r[1])&&(l[1]=-1):o.top+o.height<n+a&&(r[1]<o.top+o.height||n>r[1])&&(l[1]=1),o.left>i-a?(r[0]>o.left||i<r[0])&&(l[0]=-1):o.left+o.width<i+a&&(r[0]<o.left+o.width||i>r[0])&&(l[0]=1),!(!l[0]&&!l[1])&&this._continueDrag(__assign$4(__assign$4({},e),{direction:l,inputEvent:t,isDrag:!0}))}},i.checkScroll=function(t){var e=this;if(this._isWait)return!1;var i=t.prevScrollPos,n=void 0===i?this._prevScrollPos:i,s=t.direction,a=t.throttleTime,o=void 0===a?0:a,r=t.inputEvent,l=t.isDrag,h=this._getScrollPosition(s||[0,0],t),c=h[0]-n[0],u=h[1]-n[1],d=s||[c?Math.abs(c)/c:0,u?Math.abs(u)/u:0];return this._prevScrollPos=h,this._lock=!1,!(!c&&!u)&&(this.emit("move",{offsetX:d[0]?c:0,offsetY:d[1]?u:0,inputEvent:r}),o&&l&&(clearTimeout(this._timer),this._timer=window.setTimeout((function(){e._continueDrag(t)}),o)),!0)},i.dragEnd=function(){this._flag=!1,this._lock=!1,clearTimeout(this._timer),this._unregisterScrollEvent()},i._getScrollPosition=function(t,e){var i=e.container,n=e.getScrollPosition;return(void 0===n?getDefaultScrollPosition$1:n)({container:getContainerElement(i),direction:t})},i._continueDrag=function(t){var e,i=this,n=t.container,s=t.direction,a=t.throttleTime,o=t.useScroll,r=t.isDrag,l=t.inputEvent;if(!(!this._flag||r&&this._isWait)){var h=now(),c=Math.max(a+this._prevTime-h,0);if(c>0)return clearTimeout(this._timer),this._timer=window.setTimeout((function(){i._continueDrag(t)}),c),!1;this._prevTime=h;var u=this._getScrollPosition(s,t);this._prevScrollPos=u,r&&(this._isWait=!0),o||(this._lock=!0);var d={container:getContainerElement(n),direction:s,inputEvent:l};return null===(e=t.requestScroll)||void 0===e||e.call(t,d),this.emit("scroll",d),this._isWait=!1,o||this.checkScroll(__assign$4(__assign$4({},t),{prevScrollPos:u,direction:s,inputEvent:l}))}},i._registerScrollEvent=function(t){this._unregisterScrollEvent();var e=t.checkScrollEvent;if(e){var i=!0===e?checkDefaultScrollEvent:e,n=getContainerElement(t.container);!0!==e||n!==document.body&&n!==document.documentElement?this._unregister=i(n,this._onScroll):this._unregister=checkDefaultScrollEvent(window,this._onScroll)}},i._unregisterScrollEvent=function(){var t;null===(t=this._unregister)||void 0===t||t.call(this),this._unregister=null},e}(EventEmitter$1),DragScroll$1=DragScroll;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __spreadArrays(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,r=a.length;o<r;o++,s++)n[s]=a[o];return n}function tinyThrottle(t){return throttle(t,TINY_NUM$1)}function isSameConstants(t,e){return t.every((function(t,i){return 0===tinyThrottle(t-e[i])}))}function isSamePoint(t,e){return!tinyThrottle(t[0]-e[0])&&!tinyThrottle(t[1]-e[1])}function getAreaSize(t){return t.length<3?0:Math.abs(sum(t.map((function(e,i){var n=t[i+1]||t[0];return e[0]*n[1]-n[0]*e[1]}))))/2}function fitPoints(t,e){var i=e.width,n=e.height,s=e.left,a=e.top,o=getMinMaxs(t),r=o.minX,l=o.minY,h=o.maxX,c=o.maxY,u=i/(h-r),d=n/(c-l);return t.map((function(t){return[s+(t[0]-r)*u,a+(t[1]-l)*d]}))}function getMinMaxs(t){var e=t.map((function(t){return t[0]})),i=t.map((function(t){return t[1]}));return{minX:Math.min.apply(Math,e),minY:Math.min.apply(Math,i),maxX:Math.max.apply(Math,e),maxY:Math.max.apply(Math,i)}}function isInside(t,e,i){var n=t[0],s=t[1],a=getMinMaxs(e),o=a.minX,r=a.maxX,l=[[o,s],[r,s]],h=getLinearConstants(l[0],l[1]),c=convertLines(e),u=[];if(c.forEach((function(e){var i=getLinearConstants(e[0],e[1]),n=e[0];isSameConstants(h,i)?u.push({pos:t,line:e,type:"line"}):getPointsOnLines(getIntersectionPointsByConstants(h,i),[l,e]).forEach((function(t){e.some((function(e){return isSamePoint(e,t)}))?u.push({pos:t,line:e,type:"point"}):0!==tinyThrottle(n[1]-s)&&u.push({pos:t,line:e,type:"intersection"})}))})),!i&&find$1(u,(function(t){return t[0]===n})))return!0;var d=0,p={};return u.forEach((function(t){var e=t.pos,i=t.type,a=t.line;if(!(e[0]>n))if("intersection"===i)++d;else{if("line"===i)return;if("point"===i){var o=find$1(a,(function(t){return t[1]!==s})),r=p[e[0]],l=o[1]>s?1:-1;r?r!==l&&++d:p[e[0]]=l}}})),d%2==1}function getLinearConstants(t,e){var i=t[0],n=t[1],s=e[0]-i,a=e[1]-n;Math.abs(s)<TINY_NUM$1&&(s=0),Math.abs(a)<TINY_NUM$1&&(a=0);var o=0,r=0,l=0;return s?a?(r=1,l=-(o=-a/s)*i-n):(r=1,l=-n):a&&(o=-1,l=i),[o,r,l]}function getIntersectionPointsByConstants(t,e){var i=t[0],n=t[1],s=t[2],a=e[0],o=e[1],r=e[2],l=0===i&&0===a,h=0===n&&0===o,c=[];if(l&&h)return[];if(l){var u=-s/n;return u!==-r/o?[]:[[-1/0,u],[1/0,u]]}if(h){var d=-s/i;return d!==-r/a?[]:[[d,-1/0],[d,1/0]]}if(0===i)c=[[p=-(o*(g=-s/n)+r)/a,g]];else if(0===a){c=[[p=-(n*(g=-r/o)+s)/i,g]]}else if(0===n){c=[[p=-s/i,g=-(a*p+r)/o]]}else if(0===o){c=[[p=-r/a,g=-(i*p+s)/n]]}else{var p,g;c=[[p=(n*r-o*s)/(o*i-n*a),g=-(i*p+s)/n]]}return c.map((function(t){return[t[0],t[1]]}))}function getPointsOnLines(t,e){var i=e.map((function(t){return[0,1].map((function(e){return[Math.min(t[0][e],t[1][e]),Math.max(t[0][e],t[1][e])]}))})),n=[];if(2===t.length){var s=t[0],a=s[0],o=s[1];if(tinyThrottle(a-t[1][0])){if(!tinyThrottle(o-t[1][1])){var r=Math.max.apply(Math,i.map((function(t){return t[0][0]}))),l=Math.min.apply(Math,i.map((function(t){return t[0][1]})));if(tinyThrottle(r-l)>0)return[];n=[[r,o],[l,o]]}}else{var h=Math.max.apply(Math,i.map((function(t){return t[1][0]}))),c=Math.min.apply(Math,i.map((function(t){return t[1][1]})));if(tinyThrottle(h-c)>0)return[];n=[[a,h],[a,c]]}}return n.length||(n=t.filter((function(t){var e=t[0],n=t[1];return i.every((function(t){return 0<=tinyThrottle(e-t[0][0])&&0<=tinyThrottle(t[0][1]-e)&&0<=tinyThrottle(n-t[1][0])&&0<=tinyThrottle(t[1][1]-n)}))}))),n.map((function(t){return[tinyThrottle(t[0]),tinyThrottle(t[1])]}))}function convertLines(t){return __spreadArrays(t.slice(1),[t[0]]).map((function(e,i){return[t[i],e]}))}function getOverlapPointInfos(t,e){var i=t.slice(),n=e.slice();-1===getShapeDirection(i)&&i.reverse(),-1===getShapeDirection(n)&&n.reverse();var s=convertLines(i),a=convertLines(n),o=s.map((function(t){return getLinearConstants(t[0],t[1])})),r=a.map((function(t){return getLinearConstants(t[0],t[1])})),l=[];o.forEach((function(t,e){var i=s[e],o=[];r.forEach((function(n,s){var r=getPointsOnLines(getIntersectionPointsByConstants(t,n),[i,a[s]]);o.push.apply(o,r.map((function(t){return{index1:e,index2:s,pos:t,type:"intersection"}})))})),o.sort((function(t,e){return getDist$2(i[0],t.pos)-getDist$2(i[0],e.pos)})),l.push.apply(l,o),isInside(i[1],n)&&l.push({index1:e,index2:-1,pos:i[1],type:"inside"})})),a.forEach((function(t,e){if(isInside(t[1],i)){var n=!1,s=findIndex(l,(function(t){return t.index2===e?(n=!0,!1):!!n}));-1===s&&(n=!1,s=findIndex(l,(function(t){var i=t.index1,s=t.index2;return-1===i&&s+1===e?(n=!0,!1):!!n}))),-1===s?l.push({index1:-1,index2:e,pos:t[1],type:"inside"}):l.splice(s,0,{index1:-1,index2:e,pos:t[1],type:"inside"})}}));var h={};return l.filter((function(t){var e=t.pos,i=e[0]+"x"+e[1];return!h[i]&&(h[i]=!0,!0)}))}function getOverlapPoints(t,e){return getOverlapPointInfos(t,e).map((function(t){return t.pos}))}function getOverlapSize$1(t,e){return getAreaSize(getOverlapPoints(t,e))}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var extendStatics$2=function(t,e){return(extendStatics$2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function __extends$2(t,e){function i(){this.constructor=t}extendStatics$2(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$3=function(){return __assign$3=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$3.apply(this,arguments)};function getRad(t,e){var i=e[0]-t[0],n=e[1]-t[1],s=Math.atan2(n,i);return s>=0?s:s+2*Math.PI}function getRotatiion(t){return getRad([t[0].clientX,t[0].clientY],[t[1].clientX,t[1].clientY])/Math.PI*180}function isMultiTouch(t){return t.touches&&t.touches.length>=2}function getEventClients(t){return t?t.touches?getClients(t.touches):[getClient(t)]:[]}function isMouseEvent(t){return t&&(t.type.indexOf("mouse")>-1||"button"in t)}function getPosition(t,e,i){var n=i.length,s=getAverageClient(t,n),a=s.clientX,o=s.clientY,r=s.originalClientX,l=s.originalClientY,h=getAverageClient(e,n),c=h.clientX,u=h.clientY,d=getAverageClient(i,n);return{clientX:r,clientY:l,deltaX:a-c,deltaY:o-u,distX:a-d.clientX,distY:o-d.clientY}}function getDist$1(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}function getClients(t){for(var e=Math.min(t.length,2),i=[],n=0;n<e;++n)i.push(getClient(t[n]));return i}function getClient(t){return{clientX:t.clientX,clientY:t.clientY}}function getAverageClient(t,e){void 0===e&&(e=t.length);for(var i={clientX:0,clientY:0,originalClientX:0,originalClientY:0},n=Math.min(t.length,e),s=0;s<n;++s){var a=t[s];i.originalClientX+="originalClientX"in a?a.originalClientX:a.clientX,i.originalClientY+="originalClientY"in a?a.originalClientY:a.clientY,i.clientX+=a.clientX,i.clientY+=a.clientY}return e?{clientX:i.clientX/e,clientY:i.clientY/e,originalClientX:i.originalClientX/e,originalClientY:i.originalClientY/e}:i}var ClientStore=function(){function t(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return t.prototype.getAngle=function(t){return void 0===t&&(t=this.prevClients),getRotatiion(t)},t.prototype.getRotation=function(t){return void 0===t&&(t=this.prevClients),getRotatiion(t)-getRotatiion(this.startClients)},t.prototype.getPosition=function(t,e){void 0===t&&(t=this.prevClients);var i=getPosition(t||this.prevClients,this.prevClients,this.startClients),n=i.deltaX,s=i.deltaY;return this.movement+=Math.sqrt(n*n+s*s),this.prevClients=t,i},t.prototype.getPositions=function(t){void 0===t&&(t=this.prevClients);for(var e=this.prevClients,i=this.startClients,n=Math.min(this.length,e.length),s=[],a=0;a<n;++a)s[a]=getPosition([t[a]],[e[a]],[i[a]]);return s},t.prototype.getMovement=function(t){var e=this.movement;if(!t)return e;var i=getAverageClient(t,this.length),n=getAverageClient(this.prevClients,this.length),s=i.clientX-n.clientX,a=i.clientY-n.clientY;return Math.sqrt(s*s+a*a)+e},t.prototype.getDistance=function(t){return void 0===t&&(t=this.prevClients),getDist$1(t)},t.prototype.getScale=function(t){return void 0===t&&(t=this.prevClients),getDist$1(t)/getDist$1(this.startClients)},t.prototype.move=function(t,e){this.startClients.forEach((function(i){i.clientX-=t,i.clientY-=e})),this.prevClients.forEach((function(i){i.clientX-=t,i.clientY-=e}))},t}(),INPUT_TAGNAMES=["textarea","input"],Gesto=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this)||this;n.options={},n.flag=!1,n.pinchFlag=!1,n.data={},n.isDrag=!1,n.isPinch=!1,n.clientStores=[],n.targets=[],n.prevTime=0,n.doubleFlag=!1,n._useMouse=!1,n._useTouch=!1,n._useDrag=!1,n._dragFlag=!1,n._isTrusted=!1,n._isMouseEvent=!1,n._isSecondaryButton=!1,n._preventMouseEvent=!1,n._prevInputEvent=null,n._isDragAPI=!1,n._isIdle=!0,n._preventMouseEventId=0,n._window=window,n.onDragStart=function(t,e){if(void 0===e&&(e=!0),n.flag||!1!==t.cancelable){var i=t.type.indexOf("drag")>=-1;if(!n.flag||!i){n._isDragAPI=!0;var s=n.options,a=s.container,o=s.pinchOutside,r=s.preventWheelClick,l=s.preventRightClick,h=s.preventDefault,c=s.checkInput,u=s.dragFocusedInput,d=s.preventClickEventOnDragStart,p=s.preventClickEventOnDrag,g=s.preventClickEventByCondition,f=n._useTouch,b=!n.flag;if(n._isSecondaryButton=3===t.which||2===t.button,r&&(2===t.which||1===t.button)||l&&(3===t.which||2===t.button))return n.stop(),!1;if(b){var v=n._window.document.activeElement,m=t.target;if(m){var y=m.tagName.toLowerCase(),S=INPUT_TAGNAMES.indexOf(y)>-1,w=m.isContentEditable;if(S||w){if(c||!u&&v===m)return!1;if(v&&(v===m||w&&v.isContentEditable&&v.contains(m))){if(!u)return!1;m.blur()}}else if((h||"touchstart"===t.type)&&v){var x=v.tagName.toLowerCase();(v.isContentEditable||INPUT_TAGNAMES.indexOf(x)>-1)&&v.blur()}(d||p||g)&&addEvent(n._window,"click",n._onClick,!0)}n.clientStores=[new ClientStore(getEventClients(t))],n._isIdle=!1,n.flag=!0,n.isDrag=!1,n._isTrusted=e,n._dragFlag=!0,n._prevInputEvent=t,n.data={},n.doubleFlag=now()-n.prevTime<200,n._isMouseEvent=isMouseEvent(t),!n._isMouseEvent&&n._preventMouseEvent&&n._allowMouseEvent(),!1===(n._preventMouseEvent||n.emit("dragStart",__assign$3(__assign$3({data:n.data,datas:n.data,inputEvent:t,isMouseEvent:n._isMouseEvent,isSecondaryButton:n._isSecondaryButton,isTrusted:e,isDouble:n.doubleFlag},n.getCurrentStore().getPosition()),{preventDefault:function(){t.preventDefault()},preventDrag:function(){n._dragFlag=!1}})))&&n.stop(),n._isMouseEvent&&n.flag&&h&&t.preventDefault()}if(!n.flag)return!1;var C=0;if(b?(n._attchDragEvent(),f&&o&&(C=setTimeout((function(){addEvent(a,"touchstart",n.onDragStart,{passive:!1})})))):f&&o&&removeEvent(a,"touchstart",n.onDragStart),n.flag&&isMultiTouch(t)){if(clearTimeout(C),b&&t.touches.length!==t.changedTouches.length)return;n.pinchFlag||n.onPinchStart(t)}}}},n.onDrag=function(t,e){if(n.flag){var i=n.options.preventDefault;!n._isMouseEvent&&i&&t.preventDefault(),n._prevInputEvent=t;var s=getEventClients(t),a=n.moveClients(s,t,!1);if(n._dragFlag){if(n.pinchFlag||a.deltaX||a.deltaY)if(!1===(n._preventMouseEvent||n.emit("drag",__assign$3(__assign$3({},a),{isScroll:!!e,inputEvent:t}))))return void n.stop();n.pinchFlag&&n.onPinch(t,s)}n.getCurrentStore().getPosition(s,!0)}},n.onDragEnd=function(t){if(n.flag){var e=n.options,i=e.pinchOutside,s=e.container,a=e.preventClickEventOnDrag,o=e.preventClickEventOnDragStart,r=e.preventClickEventByCondition,l=n.isDrag;(a||o||r)&&requestAnimationFrame((function(){n._allowClickEvent()})),r||o||!a||l||n._allowClickEvent(),n._useTouch&&i&&removeEvent(s,"touchstart",n.onDragStart),n.pinchFlag&&n.onPinchEnd(t);var h=(null==t?void 0:t.touches)?getEventClients(t):[];0!==h.length&&n.options.keepDragging?n._addStore(new ClientStore(h)):n.flag=!1;var c=n._getPosition(),u=now(),d=!l&&n.doubleFlag;n._prevInputEvent=null,n.prevTime=l||d?0:u,n.flag||(n._dettachDragEvent(),n._preventMouseEvent||n.emit("dragEnd",__assign$3({data:n.data,datas:n.data,isDouble:d,isDrag:l,isClick:!l,isMouseEvent:n._isMouseEvent,isSecondaryButton:n._isSecondaryButton,inputEvent:t,isTrusted:n._isTrusted},c)),n.clientStores=[],n._isMouseEvent||(n._preventMouseEvent=!0,clearTimeout(n._preventMouseEventId),n._preventMouseEventId=setTimeout((function(){n._preventMouseEvent=!1}),200)),n._isIdle=!0)}},n.onBlur=function(){n.onDragEnd()},n._allowClickEvent=function(){removeEvent(n._window,"click",n._onClick,!0)},n._onClick=function(t){n._allowClickEvent(),n._allowMouseEvent();var e=n.options.preventClickEventByCondition;(null==e?void 0:e(t))||(t.stopPropagation(),t.preventDefault())},n._onContextMenu=function(t){n.options.preventRightClick?n.onDragEnd(t):t.preventDefault()},n._passCallback=function(){};var s=[].concat(e),a=s[0];n._window=isWindow(a)?a:getWindow(a),n.options=__assign$3({checkInput:!1,container:a&&!("document"in a)?getWindow(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},i);var o=n.options,r=o.container,l=o.events,h=o.checkWindowBlur;if(n._useDrag=l.indexOf("drag")>-1,n._useTouch=l.indexOf("touch")>-1,n._useMouse=l.indexOf("mouse")>-1,n.targets=s,n._useDrag&&s.forEach((function(t){addEvent(t,"dragstart",n.onDragStart)})),n._useMouse&&(s.forEach((function(t){addEvent(t,"mousedown",n.onDragStart),addEvent(t,"mousemove",n._passCallback)})),addEvent(r,"contextmenu",n._onContextMenu)),h&&addEvent(getWindow(),"blur",n.onBlur),n._useTouch){var c={passive:!1};s.forEach((function(t){addEvent(t,"touchstart",n.onDragStart,c),addEvent(t,"touchmove",n._passCallback,c)}))}return n}return __extends$2(e,t),e.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},e.prototype.getMovement=function(t){return this.getCurrentStore().getMovement(t)+this.clientStores.slice(1).reduce((function(t,e){return t+e.movement}),0)},e.prototype.isDragging=function(){return this.isDrag},e.prototype.isIdle=function(){return this._isIdle},e.prototype.isFlag=function(){return this.flag},e.prototype.isPinchFlag=function(){return this.pinchFlag},e.prototype.isDoubleFlag=function(){return this.doubleFlag},e.prototype.isPinching=function(){return this.isPinch},e.prototype.scrollBy=function(t,e,i,n){void 0===n&&(n=!0),this.flag&&(this.clientStores[0].move(t,e),n&&this.onDrag(i,!0))},e.prototype.move=function(t,e){var i=t[0],n=t[1],s=this.getCurrentStore().prevClients;return this.moveClients(s.map((function(t){var e=t.clientX,s=t.clientY;return{clientX:e+i,clientY:s+n,originalClientX:e,originalClientY:s}})),e,!0)},e.prototype.triggerDragStart=function(t){this.onDragStart(t,!1)},e.prototype.setEventData=function(t){var e=this.data;for(var i in t)e[i]=t[i];return this},e.prototype.setEventDatas=function(t){return this.setEventData(t)},e.prototype.getCurrentEvent=function(t){return void 0===t&&(t=this._prevInputEvent),__assign$3(__assign$3({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:t})},e.prototype.getEventData=function(){return this.data},e.prototype.getEventDatas=function(){return this.data},e.prototype.unset=function(){var t=this,e=this.targets,i=this.options.container;this.off(),removeEvent(this._window,"blur",this.onBlur),this._useDrag&&e.forEach((function(e){removeEvent(e,"dragstart",t.onDragStart)})),this._useMouse&&(e.forEach((function(e){removeEvent(e,"mousedown",t.onDragStart)})),removeEvent(i,"contextmenu",this._onContextMenu)),this._useTouch&&(e.forEach((function(e){removeEvent(e,"touchstart",t.onDragStart)})),removeEvent(i,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},e.prototype.onPinchStart=function(t){var e=this,i=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>i)){var n=new ClientStore(getEventClients(t));this.pinchFlag=!0,this._addStore(n),!1===this.emit("pinchStart",__assign$3(__assign$3({data:this.data,datas:this.data,angle:n.getAngle(),touches:this.getCurrentStore().getPositions()},n.getPosition()),{inputEvent:t,isTrusted:this._isTrusted,preventDefault:function(){t.preventDefault()},preventDrag:function(){e._dragFlag=!1}}))&&(this.pinchFlag=!1)}},e.prototype.onPinch=function(t,e){if(this.flag&&this.pinchFlag&&!(e.length<2)){var i=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",__assign$3(__assign$3({data:this.data,datas:this.data,movement:this.getMovement(e),angle:i.getAngle(e),rotation:i.getRotation(e),touches:i.getPositions(e),scale:i.getScale(e),distance:i.getDistance(e)},i.getPosition(e)),{inputEvent:t,isTrusted:this._isTrusted}))}},e.prototype.onPinchEnd=function(t){if(this.pinchFlag){var e=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var i=this.getCurrentStore();this.emit("pinchEnd",__assign$3(__assign$3({data:this.data,datas:this.data,isPinch:e,touches:i.getPositions()},i.getPosition()),{inputEvent:t}))}},e.prototype.getCurrentStore=function(){return this.clientStores[0]},e.prototype.moveClients=function(t,e,i){var n=this._getPosition(t,i),s=this.isDrag;(n.deltaX||n.deltaY)&&(this.isDrag=!0);var a=!1;return!s&&this.isDrag&&(a=!0),__assign$3(__assign$3({data:this.data,datas:this.data},n),{movement:this.getMovement(t),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:e,isTrusted:this._isTrusted,isFirstDrag:a})},e.prototype._addStore=function(t){this.clientStores.splice(0,0,t)},e.prototype._getPosition=function(t,e){var i=this.getCurrentStore().getPosition(t,e),n=this.clientStores.slice(1).reduce((function(t,e){var i=e.getPosition();return t.distX+=i.distX,t.distY+=i.distY,t}),i),s=n.distX,a=n.distY;return __assign$3(__assign$3({},i),{distX:s,distY:a})},e.prototype._attchDragEvent=function(){var t=this._window,e=this.options.container,i={passive:!1};this._isDragAPI&&(addEvent(e,"dragover",this.onDrag,i),addEvent(t,"dragend",this.onDragEnd)),this._useMouse&&(addEvent(e,"mousemove",this.onDrag),addEvent(t,"mouseup",this.onDragEnd)),this._useTouch&&(addEvent(e,"touchmove",this.onDrag,i),addEvent(t,"touchend",this.onDragEnd,i),addEvent(t,"touchcancel",this.onDragEnd,i))},e.prototype._dettachDragEvent=function(){var t=this._window,e=this.options.container;this._isDragAPI&&(removeEvent(e,"dragover",this.onDrag),removeEvent(t,"dragend",this.onDragEnd)),this._useMouse&&(removeEvent(e,"mousemove",this.onDrag),removeEvent(t,"mouseup",this.onDragEnd)),this._useTouch&&(removeEvent(e,"touchstart",this.onDragStart),removeEvent(e,"touchmove",this.onDrag),removeEvent(t,"touchend",this.onDragEnd),removeEvent(t,"touchcancel",this.onDragEnd))},e.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},e}(EventEmitter$1);function hash(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return e>>>0}var stringHash=hash;function getHash(t){return stringHash(t).toString(36)}function getShadowRoot$1(t){if(t&&t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e}}function replaceStyle(t,e,i){return i.original?e:e.replace(/([^};{\s}][^};{]*|^\s*){/gm,(function(e,i){var n=i.trim();return(n?splitComma(n):[""]).map((function(e){var i=e.trim();return 0===i.indexOf("@")?i:i.indexOf(":global")>-1?i.replace(/\:global/g,""):i.indexOf(":host")>-1?"".concat(i.replace(/\:host/g,".".concat(t))):i?".".concat(t," ").concat(i):".".concat(t)})).join(", ")+" {"}))}function injectStyle(t,e,i,n,s){var a=getDocument(n),o=a.createElement("style");return o.setAttribute("type","text/css"),o.setAttribute("data-styled-id",t),o.setAttribute("data-styled-count","1"),i.nonce&&o.setAttribute("nonce",i.nonce),o.innerHTML=replaceStyle(t,e,i),(s||a.head||a.body).appendChild(o),o}function styled$1(t){var e="rCS"+getHash(t);return{className:e,inject:function(i,n){void 0===n&&(n={});var s=getShadowRoot$1(i),a=(s||i.ownerDocument||document).querySelector('style[data-styled-id="'.concat(e,'"]'));if(a){var o=parseFloat(a.getAttribute("data-styled-count"))||0;a.setAttribute("data-styled-count","".concat(o+1))}else a=injectStyle(e,t,n,i,s);return{destroy:function(){var t,e=parseFloat(a.getAttribute("data-styled-count"))||0;e<=1?(a.remove?a.remove():null===(t=a.parentNode)||void 0===t||t.removeChild(a),a=null):a.setAttribute("data-styled-count","".concat(e-1))}}}}}var __assign$2=function(){return __assign$2=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$2.apply(this,arguments)};function __rest$1(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}function styled(t,e){var i=styled$1(e),n=i.className;return forwardRef((function(e,s){var a=e.className,o=void 0===a?"":a;e.cspNonce;var r=__rest$1(e,["className","cspNonce"]),l=useRef();return useImperativeHandle(s,(function(){return l.current}),[]),useEffect((function(){var t=i.inject(l.current,{nonce:e.cspNonce});return function(){t.destroy()}}),[]),createElement$1(t,__assign$2({ref:l,"data-styled-id":n,className:"".concat(o," ").concat(n)},r))}))}var extendStatics$1=function(t,e){return(extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function __extends$1(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics$1(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$1=function(){return __assign$1=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$1.apply(this,arguments)};function __rest(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}function __decorate$1(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}function __values(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,s,a=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(r){s={error:r}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(s)throw s.error}}return o}function __spreadArray(t,e,i){if(i||2===arguments.length)for(var n,s=0,a=e.length;s<a;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}function makeAble(t,e){return __assign$1({events:[],props:[],name:t},e)}var DIRECTIONS4=["n","w","s","e"],DIRECTIONS=["n","w","s","e","nw","ne","sw","se"];function getSVGCursor(t,e){return'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(32*t,'px" height="').concat(32*t,'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(').concat(e,'deg);transform-origin: 16px 16px"></path></svg>')}function getCursorCSS(t){var e=getSVGCursor(1,t),i=45*Math.round(t/45)%180,n="ns-resize";return 135===i?n="nwse-resize":45===i?n="nesw-resize":90===i&&(n="ew-resize"),"cursor:".concat(n,";cursor: url('").concat(e,"') 16 16, ").concat(n,";")}var agent=agent$1(),IS_WEBKIT=agent.browser.webkit,IS_WEBKIT605=IS_WEBKIT&&(navi="undefined"==typeof window?{userAgent:""}:window.navigator,res=/applewebkit\/([^\s]+)/g.exec(navi.userAgent.toLowerCase()),!!res&&parseFloat(res[1])<605),navi,res,browserName=agent.browser.name,browserVersion=parseInt(agent.browser.version,10),IS_CHROME="chrome"===browserName,IS_CHROMIUM=agent.browser.chromium,chromiumVersion=parseInt(agent.browser.chromiumVersion,10)||0,IS_CHROMIUM109=IS_CHROME&&browserVersion>=109||IS_CHROMIUM&&chromiumVersion>=109,IS_FIREFOX="firefox"===browserName,IS_SAFARI_ABOVE15=parseInt(agent.browser.webkitVersion,10)>=612||browserVersion>=15,PREFIX="moveable-",directionCSS=DIRECTIONS.map((function(t){var e="",i="",n="center",s="center",a="calc(var(--moveable-control-padding, 20) * -1px)";return t.indexOf("n")>-1&&(e="top: ".concat(a,";"),s="bottom"),t.indexOf("s")>-1&&(e="top: 0px;",s="top"),t.indexOf("w")>-1&&(i="left: ".concat(a,";"),n="right"),t.indexOf("e")>-1&&(i="left: 0px;",n="left"),'.around-control[data-direction*="'.concat(t,'"] {\n        ').concat(i).concat(e,"\n        transform-origin: ").concat(n," ").concat(s,";\n    }")})).join("\n"),MOVEABLE_CSS="\n{\nposition: absolute;\nwidth: 1px;\nheight: 1px;\nleft: 0;\ntop: 0;\nz-index: 3000;\n--moveable-color: #4af;\n--zoom: 1;\n--zoompx: 1px;\n--moveable-line-padding: 0;\n--moveable-control-padding: 0;\nwill-change: transform;\noutline: 1px solid transparent;\n}\n.control-box {\nz-index: 0;\n}\n.line, .control {\nposition: absolute;\nleft: 0;\ntop: 0;\nwill-change: transform;\n}\n.control {\nwidth: 14px;\nheight: 14px;\nborder-radius: 50%;\nborder: 2px solid #fff;\nbox-sizing: border-box;\nbackground: #4af;\nbackground: var(--moveable-color);\nmargin-top: -7px;\nmargin-left: -7px;\nborder: 2px solid #fff;\nz-index: 10;\n}\n.around-control {\nposition: absolute;\nwill-change: transform;\nwidth: calc(var(--moveable-control-padding, 20) * 1px);\nheight: calc(var(--moveable-control-padding, 20) * 1px);\nleft: calc(var(--moveable-control-padding, 20) * -0.5px);\ntop: calc(var(--moveable-control-padding, 20) * -0.5px);\nbox-sizing: border-box;\nbackground: transparent;\nz-index: 8;\ncursor: alias;\ntransform-origin: center center;\n}\n".concat(directionCSS,"\n.padding {\nposition: absolute;\ntop: 0px;\nleft: 0px;\nwidth: 100px;\nheight: 100px;\ntransform-origin: 0 0;\n}\n.line {\nwidth: 1px;\nheight: 1px;\nbackground: #4af;\nbackground: var(--moveable-color);\ntransform-origin: 0px 50%;\n}\n.line.edge {\nz-index: 1;\nbackground: transparent;\n}\n.line.dashed {\nbox-sizing: border-box;\nbackground: transparent;\n}\n.line.dashed.horizontal {\nborder-top: 1px dashed #4af;\nborder-top-color: #4af;\nborder-top-color: var(--moveable-color);\n}\n.line.dashed.vertical {\nborder-left: 1px dashed #4af;\nborder-left-color: #4af;\nborder-left-color: var(--moveable-color);\n}\n.line.vertical {\ntransform: translateX(-50%);\n}\n.line.horizontal {\ntransform: translateY(-50%);\n}\n.line.vertical.bold {\nwidth: 2px;\n}\n.line.horizontal.bold {\nheight: 2px;\n}\n\n.control.origin {\nborder-color: #f55;\nbackground: #fff;\nwidth: 12px;\nheight: 12px;\nmargin-top: -6px;\nmargin-left: -6px;\npointer-events: none;\n}\n").concat([0,15,30,45,60,75,90,105,120,135,150,165].map((function(t){return'\n.direction[data-rotation="'.concat(t,'"], :global .view-control-rotation').concat(t," {\n").concat(getCursorCSS(t),"\n}\n")})).join("\n"),'\n\n.line.direction:before {\ncontent: "";\nposition: absolute;\nwidth: 100%;\nheight: calc(var(--moveable-line-padding, 0) * 1px);\nbottom: 0;\nleft: 0;\n}\n.group {\nz-index: -1;\n}\n.area {\nposition: absolute;\n}\n.area-pieces {\nposition: absolute;\ntop: 0;\nleft: 0;\ndisplay: none;\n}\n.area.avoid, .area.pass {\npointer-events: none;\n}\n.area.avoid+.area-pieces {\ndisplay: block;\n}\n.area-piece {\nposition: absolute;\n}\n\n').concat(IS_WEBKIT605?':global svg *:before {\ncontent:"";\ntransform-origin: inherit;\n}':"","\n"),NEARBY_POS=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],FLOAT_POINT_NUM=1e-4,TINY_NUM=1e-7,MIN_SCALE=1e-9,MAX_NUM=Math.pow(10,10),MIN_NUM=-MAX_NUM,DIRECTION_REGION_TO_DIRECTION={n:[0,-1],e:[1,0],s:[0,1],w:[-1,0],nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]},DIRECTION_INDEXES={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},DIRECTION_ROTATIONS={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},MOVEABLE_METHODS=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors","getTargets","stopDrag","getControlBoxElement","getMoveables","getDragElement"];function setCustomDrag(t,e,i,n,s,a){var o,r;void 0===a&&(a="draggable");var l=null!==(r=null===(o=e.gestos[a])||void 0===o?void 0:o.move(i,t.inputEvent))&&void 0!==r?r:{},h=l.originalDatas||l.datas,c=h[a]||(h[a]={});return __assign$1(__assign$1({},s?convertDragDist(e,l):l),{isPinch:!!n,parentEvent:!0,datas:c,originalDatas:t.originalDatas})}var CustomGesto=function(){function t(t){var e;void 0===t&&(t="draggable"),this.ableName=t,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=((e={})[t]={},e)}return t.prototype.dragStart=function(t,e){this.isDrag=!1,this.isFlag=!1;var i=e.originalDatas;return this.datas=i,i[this.ableName]||(i[this.ableName]={}),__assign$1(__assign$1({},this.move(t,e.inputEvent)),{type:"dragstart"})},t.prototype.drag=function(t,e){return this.move([t[0]-this.prevX,t[1]-this.prevY],e)},t.prototype.move=function(t,e){var i,n,s=!1;if(this.isFlag){var a=this.isDrag;i=this.prevX+t[0],n=this.prevY+t[1],(t[0]||t[1])&&(this.isDrag=!0),!a&&this.isDrag&&(s=!0)}else this.prevX=t[0],this.prevY=t[1],this.startX=t[0],this.startY=t[1],i=t[0],n=t[1],this.isFlag=!0;return this.prevX=i,this.prevY=n,{type:"drag",clientX:i,clientY:n,inputEvent:e,isFirstDrag:s,isDrag:this.isDrag,distX:i-this.startX,distY:n-this.startY,deltaX:t[0],deltaY:t[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},t}();function calculateElementPosition(t,e,i,n){var s=16===t.length?4:3,a=__read(calculatePoses(t,i,n,s),4),o=__read(a[0],2),r=o[0],l=o[1],h=__read(a[1],2),c=h[0],u=h[1],d=__read(a[2],2),p=d[0],g=d[1],f=__read(a[3],2),b=f[0],v=f[1],m=__read(calculatePosition(t,e,s),2),y=m[0],S=m[1],w=Math.min(r,c,p,b),x=Math.min(l,u,g,v),C=Math.max(r,c,p,b);return r=r-w||0,{left:w,top:x,right:C,bottom:Math.max(l,u,g,v),origin:[y=y-w||0,S=S-x||0],pos1:[r,l=l-x||0],pos2:[c=c-w||0,u=u-x||0],pos3:[p=p-w||0,g=g-x||0],pos4:[b=b-w||0,v=v-x||0],direction:sign(t[0]*t[s+1])}}function calculatePointerDist(t,e){var i=e.clientX,n=e.clientY,s=e.datas,a=t.state,o=a.moveableClientRect,r=a.rootMatrix,l=a.is3d,h=a.pos1,c=__read(minus(calculateInversePosition(r,[i-o.left,n-o.top],l?4:3),h),2),u=__read(getDragDist({datas:s,distX:c[0],distY:c[1]}),2);return[u[0],u[1]]}function setDragStart(t,e){var i=e.datas,n=t.state,s=n.allMatrix,a=n.beforeMatrix,o=n.is3d,r=n.left,l=n.top,h=n.origin,c=n.offsetMatrix,u=n.targetMatrix,d=n.transformOrigin,p=o?4:3;i.is3d=o,i.matrix=s,i.targetMatrix=u,i.beforeMatrix=a,i.offsetMatrix=c,i.transformOrigin=d,i.inverseMatrix=invert(s,p),i.inverseBeforeMatrix=invert(a,p),i.absoluteOrigin=convertPositionMatrix(plus([r,l],h),p),i.startDragBeforeDist=calculate(i.inverseBeforeMatrix,i.absoluteOrigin,p),i.startDragDist=calculate(i.inverseMatrix,i.absoluteOrigin,p)}function getTransformDirection(t){return calculateElementPosition(t.datas.beforeTransform,[50,50],100,100).direction}function resolveTransformEvent(t,e,i){var n=e.datas,s=e.originalDatas.beforeRenderable,a=n.transformIndex,o=s.nextTransforms,r=o.length,l=s.nextTransformAppendedIndexes,h=-1;-1===a?("translate"===i?h=0:"rotate"===i&&(h=findIndex(o,(function(t){return t.match(/scale\(/g)}))),-1===h&&(h=o.length),n.transformIndex=h):h=find$1(l,(function(t){return t.index===a&&t.functionName===i}))?a:a+l.filter((function(t){return t.index<a})).length;var c=convertTransformInfo(o,t.state,h),u=c.targetFunction,d="rotate"===i?"rotateZ":i;n.beforeFunctionTexts=c.beforeFunctionTexts,n.afterFunctionTexts=c.afterFunctionTexts,n.beforeTransform=c.beforeFunctionMatrix,n.beforeTransform2=c.beforeFunctionMatrix2,n.targetTansform=c.targetFunctionMatrix,n.afterTransform=c.afterFunctionMatrix,n.afterTransform2=c.afterFunctionMatrix2,n.targetAllTransform=c.allFunctionMatrix,u.functionName===d?(n.afterFunctionTexts.splice(0,1),n.isAppendTransform=!1):r>h&&(n.isAppendTransform=!0,s.nextTransformAppendedIndexes=__spreadArray(__spreadArray([],__read(l),!1),[{functionName:i,index:h,isAppend:!0}],!1))}function convertTransformFormat(t,e,i){return"".concat(t.beforeFunctionTexts.join(" ")," ").concat(t.isAppendTransform?i:e," ").concat(t.afterFunctionTexts.join(" "))}function getTransformDist(t){var e=t.datas,i=__read(getBeforeDragDist({datas:e,distX:t.distX,distY:t.distY}),2);return calculate(getTransfromMatrix(e,fromTranslation([i[0],i[1]],4)),convertPositionMatrix([0,0,0],4),4)}function getTransfromMatrix(t,e,i){var n=t.beforeTransform,s=t.afterTransform,a=t.beforeTransform2,o=t.afterTransform2,r=t.targetAllTransform,l=i?multiply(r,e,4):multiply(e,r,4),h=multiply(invert(i?a:n,4),l,4);return multiply(h,invert(i?o:s,4),4)}function getBeforeDragDist(t){var e=t.datas,i=t.distX,n=t.distY,s=e.inverseBeforeMatrix,a=e.is3d,o=e.startDragBeforeDist,r=a?4:3;return minus(calculate(s,plus(e.absoluteOrigin,[i,n]),r),o)}function getDragDist(t,e){var i=t.datas,n=t.distX,s=t.distY,a=i.inverseBeforeMatrix,o=i.inverseMatrix,r=i.is3d,l=i.startDragBeforeDist,h=i.startDragDist,c=r?4:3;return minus(calculate(e?a:o,plus(i.absoluteOrigin,[n,s]),c),e?l:h)}function getInverseDragDist(t,e){var i=t.datas,n=t.distX,s=t.distY,a=i.beforeMatrix,o=i.matrix,r=i.is3d,l=i.startDragBeforeDist,h=i.startDragDist,c=i.absoluteOrigin,u=r?4:3;return minus(calculate(e?a:o,plus(e?l:h,[n,s]),u),c)}function calculateTransformOrigin(t,e,i,n,s,a){return void 0===n&&(n=e),void 0===s&&(s=i),void 0===a&&(a=[0,0]),t?t.map((function(t,o){var r=splitUnit(t),l=r.value,h=r.unit,c=o?s:n,u=o?i:e;return"%"===t||isNaN(l)?u*(c?a[o]/c:0):"%"!==h?l:u*l/100})):a}function getPosIndexesByDirection(t){var e=[];return t[1]>=0&&(t[0]>=0&&e.push(3),t[0]<=0&&e.push(2)),t[1]<=0&&(t[0]>=0&&e.push(1),t[0]<=0&&e.push(0)),e}function getPosesByDirection(t,e){return getPosIndexesByDirection(e).map((function(e){return t[e]}))}function getPosBySingleDirection(t,e){var i=(e+1)/2;return[dot(t[0][0],t[1][0],i,1-i),dot(t[0][1],t[1][1],i,1-i)]}function getPosByDirection(t,e){var i=getPosBySingleDirection([t[0],t[1]],e[0]),n=getPosBySingleDirection([t[2],t[3]],e[0]);return getPosBySingleDirection([i,n],e[1])}function getDist(t,e,i,n,s,a){var o=getPosByDirection(calculatePoses(e,i,n,s),a);return[t[0]-o[0],t[1]-o[1]]}function getNextMatrix(t,e,i,n){return multiply(t,getAbsoluteMatrix(e,n,i),n)}function getNextTransformMatrix(t,e,i,n){var s,a=t.transformOrigin,o=t.offsetMatrix,r=t.is3d?4:3;if(isString(i)){var l=e.beforeTransform,h=e.afterTransform;s=convertDimension(n?parseMat(i):multiply(multiply(l,parseMat([i]),4),h,4),4,r)}else s=i;return getNextMatrix(o,s,a,r)}function scaleMatrix(t,e){var i=t.transformOrigin,n=t.offsetMatrix,s=t.is3d,a=t.targetMatrix,o=s?4:3;return getNextMatrix(n,multiply(t.targetAllTransform||a,createScaleMatrix(e,o),o),i,o)}function fillTransformStartEvent(t,e){var i=getBeforeRenderableDatas(e);return{setTransform:function(n,s){void 0===s&&(s=-1),i.startTransforms=isArray(n)?n:splitSpace(n),setTransformIndex(t,e,s)},setTransformIndex:function(i){setTransformIndex(t,e,i)}}}function setDefaultTransformIndex(t,e,i){setTransformIndex(t,e,findIndex(getBeforeRenderableDatas(e).startTransforms,(function(t){return 0===t.indexOf("".concat(i,"("))})))}function setTransformIndex(t,e,i){var n=getBeforeRenderableDatas(e),s=e.datas;if(s.transformIndex=i,-1!==i){var a=n.startTransforms[i];if(a){var o=t.state,r=parse([a],{"x%":function(t){return t/100*o.offsetWidth},"y%":function(t){return t/100*o.offsetHeight}});s.startValue=r[0].functionValue}}}function fillOriginalTransform(t,e){getBeforeRenderableDatas(t).nextTransforms=splitSpace(e)}function getBeforeRenderableDatas(t){return t.originalDatas.beforeRenderable}function getNextTransforms(t){return t.originalDatas.beforeRenderable.nextTransforms}function getNextTransformText(t){return(getNextTransforms(t)||[]).join(" ")}function getNextStyle(t){return getBeforeRenderableDatas(t).nextStyle}function fillTransformEvent(t,e,i,n,s){fillOriginalTransform(s,e);var a=Draggable.drag(t,setCustomDrag(s,t.state,i,n,!1)),o=a?a.transform:e;return __assign$1(__assign$1({transform:e,drag:a},fillCSSObject({transform:o},s)),{afterTransform:o})}function getTranslateFixedPosition(t,e,i,n,s,a){return getDirectionOffset(t,i,n,getNextTransformMatrix(t.state,s,e,a))}function getTranslateDist(t,e,i,n,s,a,o){var r=getTranslateFixedPosition(t,e,i,s,a,o),l=t.state,h=l.left,c=l.top,u=t.props.groupable,d=u?h:0,p=u?c:0,g=minus(n,r);return minus(g,[d,p])}function getScaleDist(t,e,i,n,s,a,o){return getTranslateDist(t,e,i,n,s,a,o)}function getDirectionByPos(t,e,i){return[e?t[0]/(e/2)-1:0,i?t[1]/(i/2)-1:0]}function getDirectionOffset(t,e,i,n){void 0===n&&(n=t.state.allMatrix);var s=t.state,a=s.width,o=s.height,r=s.is3d?4:3;return calculatePosition(n,[a/2*(1+e[0])+i[0],o/2*(1+e[1])+i[1]],r)}function getRotateDist(t,e,i){var n=i.fixedDirection,s=i.fixedPosition,a=i.fixedOffset;return getTranslateDist(t,"rotate(".concat(e,"deg)"),n,s,a,i)}function getResizeDist(t,e,i,n,s,a){var o=t.props.groupable,r=t.state,l=r.transformOrigin,h=r.offsetMatrix,c=r.is3d,u=r.width,d=r.height,p=r.left,g=r.top,f=a.fixedDirection,b=c?4:3,v=o?p:0,m=o?g:0;return minus(getDist(n,getNextMatrix(h,a.nextTargetMatrix||r.targetMatrix,calculateTransformOrigin(s,e,i,u,d,l),b),e,i,b,f),[v,m])}function getAbsolutePosition(t,e){return getPosByDirection(getAbsolutePosesByState(t.state),e)}function getGestoData(t,e){var i,n=t.targetGesto,s=t.controlGesto;return(null==n?void 0:n.isFlag())&&(i=n.getEventData()[e]),!i&&(null==s?void 0:s.isFlag())&&(i=s.getEventData()[e]),i||{}}function getShadowRoot(t){if(t&&t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e}}function getIndividualTransforms(t){var e=t("scale"),i=t("rotate"),n=t("translate"),s=[];return n&&"0px"!==n&&"none"!==n&&s.push("translate(".concat(n.split(/\s+/).join(","),")")),i&&"1"!==i&&"none"!==i&&s.push("rotate(".concat(i,")")),e&&"1"!==e&&"none"!==e&&s.push("scale(".concat(e.split(/\s+/).join(","),")")),s}function getMatrixStackInfo(t,e,i){for(var n,s,a,o=t,r=[],l=getDocumentElement(t)||getDocumentBody(t),h=!i&&t===e||t===l,c=h,u=!1,d=3,p=!1,g=getOffsetInfo(e,e,!0).offsetParent,f=1;o&&!c;){c=h;var b=getCachedStyle(o),v=b("position"),m=getElementTransform(o),y="fixed"===v,S=getIndividualTransforms(b),w=convertCSStoMatrix(getTransformMatrix(m)),x=void 0,C=!1,D=!1,T=0,k=0,$=0,O=0,P={hasTransform:!1,fixedContainer:null};y&&(p=!0,g=(P=getPositionFixedInfo(o)).fixedContainer);var L=w.length;u||16!==L&&!S.length||(u=!0,d=4,convert3DMatrixes(r),a&&(a=convertDimension(a,3,4))),u&&9===L&&(w=convertDimension(w,3,4));var G=getOffsetPosInfo(o,t),F=G.tagName,I=G.hasOffset,E=G.isSVG,A=G.origin,U=G.targetOrigin,_=__read(G.offset,2),j=_[0],M=_[1];"svg"===F&&!o.ownerSVGElement&&a&&(r.push({type:"target",target:o,matrix:getSVGMatrix(o,d)}),r.push({type:"offset",target:o,matrix:createIdentityMatrix(d)}));var N=parseFloat(b("zoom"))||1;if(y)x=P.fixedContainer,C=!0;else{var B=getOffsetInfo(o,e,!1,!0,b),R=B.offsetZoom;if(x=B.offsetParent,C=B.isEnd,D=B.isStatic,f*=R,(B.isCustomElement||1!==R)&&D)j-=x.offsetLeft,M-=x.offsetTop;else if(IS_FIREFOX||IS_CHROMIUM109){if(B.parentSlotElement){for(var H=x,z=0,V=0;H&&getShadowRoot(H);)z+=H.offsetLeft,V+=H.offsetTop,H=H.offsetParent;j-=z,M-=V}}}if(!IS_WEBKIT||IS_SAFARI_ABOVE15||!I||E||!D||"relative"!==v&&"static"!==v||(j-=x.offsetLeft,M-=x.offsetTop,h=h||C),y)I&&P.hasTransform&&($=x.clientLeft,O=x.clientTop);else if(I&&g!==x&&(T=x.clientLeft,k=x.clientTop),I&&x===l){var q=getBodyOffset(o,!1);j+=q[0],M+=q[1]}if(r.push({type:"target",target:o,matrix:getAbsoluteMatrix(w,d,A)}),S.length&&(r.push({type:"offset",target:o,matrix:createIdentityMatrix(d)}),r.push({type:"target",target:o,matrix:getAbsoluteMatrix(parseMat(S),d,A)})),I){var W=o===t,K=W?0:o.scrollLeft,Y=W?0:o.scrollTop;r.push({type:"offset",target:o,matrix:createOriginMatrix([j-K+T-$,M-Y+k-O],d)})}else r.push({type:"offset",target:o,origin:A});if(1!==N&&r.push({type:"zoom",target:o,matrix:getAbsoluteMatrix(createScaleMatrix([N,N],d),d,[0,0])}),a||(a=w),n||(n=A),s||(s=U),c||y)break;o=x,h=C,i&&o!==l||(c=h)}return a||(a=createIdentityMatrix(d)),n||(n=[0,0]),s||(s=[0,0]),{zoom:f,offsetContainer:g,matrixes:r,targetMatrix:a,transformOrigin:n,targetOrigin:s,is3d:u,hasFixed:p}}var cacheStyleMap=null,clientRectStyleMap=null,matrixContainerInfos=null;function setStoreCache(t){t?(window.Map&&(cacheStyleMap=new Map,clientRectStyleMap=new Map),matrixContainerInfos=[]):(cacheStyleMap=null,matrixContainerInfos=null,clientRectStyleMap=null)}function getCachedClientRect(t){var e=null==clientRectStyleMap?void 0:clientRectStyleMap.get(t);if(e)return e;var i=getClientRect(t,!0);return clientRectStyleMap&&clientRectStyleMap.set(t,i),i}function getCachedMatrixContainerInfo(t,e){if(matrixContainerInfos){var i=find$1(matrixContainerInfos,(function(i){return i[0][0]==t&&i[0][1]==e}));if(i)return i[1]}var n=getMatrixStackInfo(t,e,!0);return matrixContainerInfos&&matrixContainerInfos.push([[t,e],n]),n}function getCachedStyle(t){var e=null==cacheStyleMap?void 0:cacheStyleMap.get(t);if(!e){var i=getWindow(t).getComputedStyle(t);if(!cacheStyleMap)return function(t){return i[t]};e={style:i,cached:{}},cacheStyleMap.set(t,e)}var n=e.cached,s=e.style;return function(t){return t in n||(n[t]=s[t]),n[t]}}function fillChildEvents(t,e,i){var n=i.originalDatas;n.groupable=n.groupable||{};var s=n.groupable;s.childDatas=s.childDatas||[];var a=s.childDatas;return t.moveables.map((function(t,n){return a[n]=a[n]||{},a[n][e]=a[n][e]||{},__assign$1(__assign$1({},i),{isRequestChild:!0,datas:a[n][e],originalDatas:a[n]})}))}function triggerChildGesto(t,e,i,n,s,a,o){var r=!!i.match(/Start$/g),l=!!i.match(/End$/g),h=s.isPinch,c=s.datas,u=fillChildEvents(t,e.name,s),d=t.moveables,p=[],g=u.map((function(t,s){var u=d[s],g=u.state,f=g.gestos,b=t;if(r)b=new CustomGesto(o).dragStart(n,t),p.push(b);else{if(f[o]||(f[o]=c.childGestos[s]),!f[o])return;b=setCustomDrag(t,g,n,h,a,o),p.push(b)}var v=e[i](u,__assign$1(__assign$1({},b),{parentFlag:!0}));return l&&(f[o]=null),v}));return r&&(c.childGestos=d.map((function(t){return t.state.gestos[o]}))),{eventParams:g,childEvents:p}}function triggerChildAbles(t,e,i,n,s,a){void 0===s&&(s=function(t,e){return e});var o=!!i.match(/End$/g),r=fillChildEvents(t,e.name,n),l=t.moveables;return r.map((function(t,n){var r,h=l[n];r=s(h,t);var c=e[i](h,__assign$1(__assign$1({},r),{parentFlag:!0}));return c&&a&&a(h,t,c,n),o&&(h.state.gestos={}),c}))}function startChildDist(t,e,i,n){var s=i.fixedDirection,a=i.fixedPosition,o=getPosByDirection(n.datas.startPositions||getAbsolutePosesByState(e.state),s),r=__read(calculate(createRotateMatrix(-t.rotation/180*Math.PI,3),[o[0]-a[0],o[1]-a[1],1],3),2),l=r[0],h=r[1];return n.datas.originalX=l,n.datas.originalY=h,n}function renderDirectionControlsByInfos(t,e,i,n){var s=t.getState(),a=s.renderPoses,o=s.rotation,r=s.direction,l=getProps(t.props,e).zoom,h=absDegree(o/Math.PI*180),c={},u=t.renderState;u.renderDirectionMap||(u.renderDirectionMap={});var d=u.renderDirectionMap;i.forEach((function(t){var e=t.dir;c[e]=!0}));var p=sign(r);return i.map((function(t){var i=t.data,s=t.classNames,r=t.dir,u=DIRECTION_INDEXES[r];if(!u||!c[r])return null;d[r]=!0;var g=(throttle(h,15)+p*DIRECTION_ROTATIONS[r]+720)%180,f={};return getKeys(i).forEach((function(t){f["data-".concat(t)]=i[t]})),n.createElement("div",__assign$1({className:prefix.apply(void 0,__spreadArray(["control","direction",r,e],__read(s),!1)),"data-rotation":g,"data-direction":r},f,{key:"direction-".concat(r),style:getControlTransform.apply(void 0,__spreadArray([o,l],__read(u.map((function(t){return a[t]}))),!1))}))}))}function renderDirectionControls(t,e,i,n){var s=getProps(t.props,i),a=s.renderDirections,o=void 0===a?e:a,r=s.displayAroundControls;if(!o)return[];var l=!0===o?DIRECTIONS:o;return __spreadArray(__spreadArray([],__read(r?renderAroundControls(t,n,i,l):[]),!1),__read(renderDirectionControlsByInfos(t,i,l.map((function(t){return{data:{},classNames:[],dir:t}})),n)),!1)}function renderLine(t,e,i,n,s,a){for(var o=[],r=6;r<arguments.length;r++)o[r-6]=arguments[r];var l=getRad$1(i,n),h=e?throttle(l/Math.PI*180,15)%180:-1;return t.createElement("div",{key:"line-".concat(a),className:prefix.apply(void 0,__spreadArray(["line","direction",e?"edge":"",e],__read(o),!1)),"data-rotation":h,"data-line-key":a,"data-direction":e,style:getLineStyle(i,n,s,l)})}function renderEdgeLines(t,e,i,n,s){return(!0===i?DIRECTIONS4:i).map((function(i,a){var o=__read(DIRECTION_INDEXES[i],2),r=o[0],l=o[1];if(null!=l)return renderLine(t,i,n[r],n[l],s,"".concat(e,"Edge").concat(a),e)})).filter(Boolean)}function getRenderDirections(t){return function(e,i){var n=getProps(e.props,t).edge;return n&&(!0===n||n.length)?__spreadArray(__spreadArray([],__read(renderEdgeLines(i,t,n,e.getState().renderPoses,e.props.zoom)),!1),__read(renderDiagonalDirections(e,t,i)),!1):renderAllDirections(e,t,i)}}function renderAllDirections(t,e,i){return renderDirectionControls(t,DIRECTIONS,e,i)}function renderDiagonalDirections(t,e,i){return renderDirectionControls(t,["nw","ne","sw","se"],e,i)}function renderAroundControls(t,e,i,n){var s=t.renderState;s.renderDirectionMap||(s.renderDirectionMap={});var a=t.getState(),o=a.renderPoses,r=a.rotation,l=a.direction,h=s.renderDirectionMap,c=t.props.zoom,u=sign(l),d=r/Math.PI*180;return(n||getKeys(h)).map((function(t){var n=DIRECTION_INDEXES[t];if(!n)return null;var s=(throttle(d,15)+u*DIRECTION_ROTATIONS[t]+720)%180,a=["around-control"];return i&&a.push("direction",i),e.createElement("div",{className:prefix.apply(void 0,__spreadArray([],__read(a),!1)),"data-rotation":s,"data-direction":t,key:"direction-around-".concat(t),style:getControlTransform.apply(void 0,__spreadArray([r,c],__read(n.map((function(t){return o[t]}))),!1))})}))}function checkBoundPoses(t,e,i){var n=t||{},s=n.position,a=void 0===s?"client":s,o=n.left,r=void 0===o?-1/0:o,l=n.top,h=void 0===l?-1/0:l,c=n.right,u=void 0===c?1/0:c,d=n.bottom,p={position:a,left:r,top:h,right:u,bottom:void 0===d?1/0:d};return{vertical:checkBounds(p,e,!0),horizontal:checkBounds(p,i,!1)}}function getBounds(t,e){var i=t.state,n=i.containerClientRect,s=n.clientHeight,a=n.clientWidth,o=n.clientLeft,r=n.clientTop,l=i.snapOffset,h=l.left,c=l.top,u=l.right,d=l.bottom,p=e||t.props.bounds||{},g="css"===(p.position||"client"),f=p.left,b=void 0===f?-1/0:f,v=p.top,m=void 0===v?-1/0:v,y=p.right,S=void 0===y?g?-1/0:1/0:y,w=p.bottom,x=void 0===w?g?-1/0:1/0:w;return g&&(S=a+u-h-S,x=s+d-c-x),{left:b+h-o,right:S+h-o,top:m+c-r,bottom:x+c-r}}function checkBoundKeepRatio(t,e,i){var n=getBounds(t),s=n.left,a=n.top,o=n.right,r=n.bottom,l=__read(i,2),h=l[0],c=l[1],u=__read(minus(i,e),2),d=u[0],p=u[1];abs(d)<TINY_NUM&&(d=0),abs(p)<TINY_NUM&&(p=0);var g=p>0,f=d>0,b={isBound:!1,offset:0,pos:0},v={isBound:!1,offset:0,pos:0};if(0===d&&0===p)return{vertical:b,horizontal:v};if(0===d)g?r<c&&(v.pos=r,v.offset=c-r):a>c&&(v.pos=a,v.offset=c-a);else if(0===p)f?o<h&&(b.pos=o,b.offset=h-o):s>h&&(b.pos=s,b.offset=h-s);else{var m=p/d,y=i[1]-m*h,S=0,w=0,x=!1;f&&o<=h?(S=m*o+y,w=o,x=!0):!f&&h<=s&&(S=m*s+y,w=s,x=!0),x&&(S<a||S>r)&&(x=!1),x||(g&&r<=c?(w=((S=r)-y)/m,x=!0):!g&&c<=a&&(w=((S=a)-y)/m,x=!0)),x&&(b.isBound=!0,b.pos=w,b.offset=h-w,v.isBound=!0,v.pos=S,v.offset=c-S)}return{vertical:b,horizontal:v}}function checkBounds(t,e,i){var n=t[i?"left":"top"],s=t[i?"right":"bottom"],a=Math.min.apply(Math,__spreadArray([],__read(e),!1)),o=Math.max.apply(Math,__spreadArray([],__read(e),!1)),r=[];return n+1>a&&r.push({direction:"start",isBound:!0,offset:a-n,pos:n}),s-1<o&&r.push({direction:"end",isBound:!0,offset:o-s,pos:s}),r.length||r.push({isBound:!1,offset:0,pos:0}),r.sort((function(t,e){return abs(e.offset)-abs(t.offset)}))}function isBoundRotate$1(t,e,i){return(i?t.map((function(t){return rotate(t,i)})):t).some((function(t){return t[0]<e.left&&abs(t[0]-e.left)>.1||t[0]>e.right&&abs(t[0]-e.right)>.1||t[1]<e.top&&abs(t[1]-e.top)>.1||t[1]>e.bottom&&abs(t[1]-e.bottom)>.1}))}function boundRotate(t,e,i){var n=getDistSize(t),s=Math.sqrt(n*n-e*e)||0;return[s,-s].sort((function(e,n){return abs(e-t[i?0:1])-abs(n-t[i?0:1])})).map((function(t){return getRad$1([0,0],i?[t,e]:[e,t])}))}function checkRotateBounds(t,e,i,n,s){if(!t.props.bounds)return[];var a=s*Math.PI/180,o=getBounds(t),r=o.left,l=o.top,h=o.right,c=o.bottom,u=r-n[0],d=h-n[0],p=l-n[1],g=c-n[1],f={left:u,top:p,right:d,bottom:g};if(!isBoundRotate$1(i,f,0))return[];var b=[];return[[u,0],[d,0],[p,1],[g,1]].forEach((function(t){var n=__read(t,2),s=n[0],o=n[1];i.forEach((function(t){var i=getRad$1([0,0],t);b.push.apply(b,__spreadArray([],__read(boundRotate(t,s,o).map((function(t){return a+t-i})).filter((function(t){return!isBoundRotate$1(e,f,t)})).map((function(t){return throttle(180*t/Math.PI,TINY_NUM)}))),!1))}))})),b}var VERTICAL_NAMES=["left","right","center"],HORIZONTAL_NAMES=["top","bottom","middle"],SNAP_SKIP_NAMES_MAP={left:"start",right:"end",center:"center",top:"start",bottom:"end",middle:"center"},VERTICAL_NAMES_MAP={start:"left",end:"right",center:"center"},HORIZONTAL_NAMES_MAP={start:"top",end:"bottom",center:"middle"};function getInitialBounds(){return{left:!1,top:!1,right:!1,bottom:!1}}function hasGuidelines(t,e){var i=t.props,n=i.snappable,s=i.bounds,a=i.innerBounds,o=i.verticalGuidelines,r=i.horizontalGuidelines,l=i.snapGridWidth,h=i.snapGridHeight,c=t.state,u=c.guidelines,d=c.enableSnap;return!(!n||!d||e&&!0!==n&&n.indexOf(e)<0)&&!!(l||h||s||a||u&&u.length||o&&o.length||r&&r.length)}function getSnapDirections(t){return!1===t?{}:!0!==t&&t?t:{left:!0,right:!0,top:!0,bottom:!0}}function mapSnapDirectionPoses(t,e){var i=getSnapDirections(t),n={};for(var s in i)s in e&&i[s]&&(n[s]=e[s]);return n}function splitSnapDirectionPoses(t,e){var i=mapSnapDirectionPoses(t,e),n=HORIZONTAL_NAMES.filter((function(t){return t in i})),s=VERTICAL_NAMES.filter((function(t){return t in i}));return{horizontalNames:n,verticalNames:s,horizontal:n.map((function(t){return i[t]})),vertical:s.map((function(t){return i[t]}))}}function calculateContainerPos(t,e,i){var n=calculatePosition(t,[e.clientLeft,e.clientTop],i);return[e.left+n[0],e.top+n[1]]}function solveLineConstants(t){var e=__read(t,2),i=e[0],n=e[1],s=n[0]-i[0],a=n[1]-i[1];Math.abs(s)<TINY_NUM$1&&(s=0),Math.abs(a)<TINY_NUM$1&&(a=0);var o=0,r=0,l=0;return s?a?(r=1,l=(o=-a/s)*i[0]-i[1]):(r=1,l=-i[1]):(o=-1,l=i[0]),[o,r,l].map((function(t){return throttle(t,TINY_NUM$1)}))}var NAME_snapRotationThreshold="snapRotationThreshold",NAME_snapRotationDegrees="snapRotationDegrees",NAME_snapHorizontalThreshold="snapHorizontalThreshold",NAME_snapVerticalThreshold="snapVerticalThreshold";function checkMoveableSnapPoses(t,e,i,n,s,a,o){var r;void 0===n&&(n=[]),void 0===s&&(s=[]);var l=t.props,h=(null===(r=t.state.snapThresholdInfo)||void 0===r?void 0:r.multiples)||[1,1],c=selectValue(o,l[NAME_snapHorizontalThreshold],5),u=selectValue(a,l[NAME_snapVerticalThreshold],5);return checkSnapPoses(t.state.guidelines,e,i,n,s,c,u,h)}function checkSnapPoses(t,e,i,n,s,a,o,r){return{vertical:checkSnap(t,"vertical",e,o*r[0],n),horizontal:checkSnap(t,"horizontal",i,a*r[1],s)}}function checkSnapKeepRatio(t,e,i){var n=__read(i,2),s=n[0],a=n[1],o=__read(e,2),r=o[0],l=o[1],h=__read(minus(i,e),2),c=h[0],u=h[1],d=u>0,p=c>0;c=getTinyDist(c),u=getTinyDist(u);var g={isSnap:!1,offset:0,pos:0},f={isSnap:!1,offset:0,pos:0};if(0===c&&0===u)return{vertical:g,horizontal:f};var b=checkMoveableSnapPoses(t,c?[s]:[],u?[a]:[],[],[],void 0,void 0),v=b.vertical,m=b.horizontal;v.posInfos.filter((function(t){var e=t.pos;return p?e>=r:e<=r})),m.posInfos.filter((function(t){var e=t.pos;return d?e>=l:e<=l})),v.isSnap=v.posInfos.length>0,m.isSnap=m.posInfos.length>0;var y=getNearestSnapGuidelineInfo(v),S=y.isSnap,w=y.guideline,x=getNearestSnapGuidelineInfo(m),C=x.isSnap,D=x.guideline,T=C?D.pos[1]:0,k=S?w.pos[0]:0;if(0===c)C&&(f.isSnap=!0,f.pos=D.pos[1],f.offset=a-f.pos);else if(0===u)S&&(g.isSnap=!0,g.pos=k,g.offset=s-k);else{var $=u/c,O=i[1]-$*s,P=0,L=0,G=!1;S?(P=$*(L=k)+O,G=!0):C&&(L=((P=T)-O)/$,G=!0),G&&(g.isSnap=!0,g.pos=L,g.offset=s-L,f.isSnap=!0,f.pos=P,f.offset=a-P)}return{vertical:g,horizontal:f}}function getStringDirection(t){var e="";return-1===t||"top"===t||"left"===t?e="start":0===t||"center"===t||"middle"===t?e="center":1!==t&&"right"!==t&&"bottom"!==t||(e="end"),e}function checkSnaps(t,e,i,n){var s=splitSnapDirectionPoses(t.props.snapDirections,e),a=checkMoveableSnapPoses(t,s.vertical,s.horizontal,s.verticalNames.map((function(t){return getStringDirection(t)})),s.horizontalNames.map((function(t){return getStringDirection(t)})),i,n),o=getStringDirection(s.horizontalNames[a.horizontal.index]),r=getStringDirection(s.verticalNames[a.vertical.index]);return{vertical:__assign$1(__assign$1({},a.vertical),{direction:r}),horizontal:__assign$1(__assign$1({},a.horizontal),{direction:o})}}function getNearestSnapGuidelineInfo(t){var e=t.isSnap;if(!e)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var i=t.posInfos[0],n=i.guidelineInfos[0],s=n.offset,a=n.dist,o=n.guideline;return{isSnap:e,offset:s,dist:a,pos:i.pos,guideline:o}}function checkSnap(t,e,i,n,s){var a,o;if(void 0===s&&(s=[]),!t||!t.length)return{isSnap:!1,index:-1,direction:"",posInfos:[]};var r="vertical"===e?0:1,l=i.map((function(i,a){var o=s[a]||"",l=t.map((function(t){var e=t.pos,n=i-e[r];return{offset:n,dist:abs(n),guideline:t,direction:o}})).filter((function(t){var i=t.guideline,s=t.dist;return!(i.type!==e||s>n)})).sort((function(t,e){return t.dist-e.dist}));return{pos:i,index:a,guidelineInfos:l,direction:o}})).filter((function(t){return t.guidelineInfos.length>0})).sort((function(t,e){return t.guidelineInfos[0].dist-e.guidelineInfos[0].dist})),h=l.length>0;return{isSnap:h,index:h?l[0].index:-1,direction:null!==(o=null===(a=l[0])||void 0===a?void 0:a.direction)&&void 0!==o?o:"",posInfos:l}}function getSnapInfosByDirection(t,e,i,n,s){var a=[];i[0]&&i[1]?a=[i,[-i[0],i[1]],[i[0],-i[1]]]:i[0]||i[1]?t.props.keepRatio?a.push([-1,-1],[-1,1],[1,-1],[1,1],i):(a.push.apply(a,__spreadArray([],__read(getPosesByDirection([[-1,-1],[1,-1],[-1,-1],[1,1]],i)),!1)),a.length>1&&a.push([(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2])):[[-1,-1],[1,-1],[1,1],[-1,1]].forEach((function(t,e,i){var n=i[e+1]||i[0];a.push(t),a.push([(t[0]+n[0])/2,(t[1]+n[1])/2])}));var o=a.map((function(t){return getPosByDirection(e,t)})),r=checkMoveableSnapPoses(t,o.map((function(t){return t[0]})),o.map((function(t){return t[1]})),a.map((function(t){return getStringDirection(t[0])})),a.map((function(t){return getStringDirection(t[1])})),n,s),l=getStringDirection(a.map((function(t){return t[0]}))[r.vertical.index]),h=getStringDirection(a.map((function(t){return t[1]}))[r.horizontal.index]);return{vertical:__assign$1(__assign$1({},r.vertical),{direction:l}),horizontal:__assign$1(__assign$1({},r.horizontal),{direction:h})}}function checkSnapBoundPriority(t,e){var i=abs(t.offset),n=abs(e.offset);return t.isBound&&e.isBound?n-i:t.isBound?-1:e.isBound?1:t.isSnap&&e.isSnap?n-i:t.isSnap?-1:e.isSnap||i<TINY_NUM?1:n<TINY_NUM?-1:i-n}function getNearOffsetInfo(t,e){return t.slice().sort((function(t,i){var n=t.sign[e],s=i.sign[e],a=t.offset[e],o=i.offset[e];return n?s?checkSnapBoundPriority({isBound:t.isBound,isSnap:t.isSnap,offset:a},{isBound:i.isBound,isSnap:i.isSnap,offset:o}):-1:1}))[0]}function getCheckSnapDirections(t,e,i){var n=[];if(i)1!==abs(e[0])||1!==abs(e[1])?n.push([e,[-1,-1]],[e,[-1,1]],[e,[1,-1]],[e,[1,1]]):n.push([e,[t[0],-t[1]]],[e,[-t[0],t[1]]]),n.push([e,t]);else if(t[0]&&t[1]||!t[0]&&!t[1]){var s=t[0]?t:[1,1];[1,-1].forEach((function(t){[1,-1].forEach((function(i){var a=[t*s[0],i*s[1]];e[0]===a[0]&&e[1]===a[1]||n.push([e,a])}))}))}else if(t[0]){(1===abs(e[0])?[1]:[1,-1]).forEach((function(i){n.push([[e[0],-1],[i*t[0],-1]],[[e[0],0],[i*t[0],0]],[[e[0],1],[i*t[0],1]])}))}else if(t[1]){(1===abs(e[1])?[1]:[1,-1]).forEach((function(i){n.push([[-1,e[1]],[-1,i*t[1]]],[[0,e[1]],[0,i*t[1]]],[[1,e[1]],[1,i*t[1]]])}))}return n}function isStartLine(t,e){var i=average([e[0][0],e[1][0]]),n=average([e[0][1],e[1][1]]);return{vertical:i<=t[0],horizontal:n<=t[1]}}function hitTestLine(t,e){var i,n,s=__read(e,2),a=s[0],o=s[1],r=o[0]-a[0],l=o[1]-a[1];if(abs(r)<TINY_NUM&&(r=0),abs(l)<TINY_NUM&&(l=0),r)if(l){i=l/r*(t[0]-a[0])+a[1],n=t[1]}else i=a[1],n=t[1];else i=a[0],n=t[0];return i-n}function isSameStartLine(t,e,i,n){return void 0===n&&(n=TINY_NUM),t.every((function(t){var s=hitTestLine(t,e);return s<=0===i||abs(s)<=n}))}function checkInnerBoundDot(t,e,i,n,s){return void 0===s&&(s=0),n&&e-s<=t||!n&&t<=i+s?{isBound:!0,offset:n?e-t:i-t}:{isBound:!1,offset:0}}function checkInnerBound(t,e){var i=e.line,n=e.centerSign,s=e.verticalSign,a=e.horizontalSign,o=e.lineConstants,r=t.props.innerBounds;if(!r)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var l=r.left,h=r.top,c=r.width,u=r.height,d=[[l,h],[l,h+u]],p=[[l,h],[l+c,h]],g=[[l+c,h],[l+c,h+u]],f=[[l,h+u],[l+c,h+u]];if(isSameStartLine([[l,h],[l+c,h],[l,h+u],[l+c,h+u]],i,n))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var b=checkLineBoundCollision(i,o,p,s),v=checkLineBoundCollision(i,o,f,s),m=checkLineBoundCollision(i,o,d,a),y=checkLineBoundCollision(i,o,g,a),S=b.isBound&&v.isBound,w=b.isBound||v.isBound,x=m.isBound&&y.isBound,C=m.isBound||y.isBound,D=maxOffset(b.offset,v.offset),T=maxOffset(m.offset,y.offset),k=[0,0],$=!1,O=!1;return abs(T)<abs(D)?(k=[D,0],$=w,O=S):(k=[0,T],$=C,O=x),{isAllBound:O,isVerticalBound:w,isHorizontalBound:C,isBound:$,offset:k}}function checkLineBoundCollision(t,e,i,n,s,a){var o,r,l=__read(e,2),h=l[0],c=l[1],u=t[0],d=i[0],p=i[1],g=getTinyDist(p[1]-d[1]),f=c,b=h,v=-h/c;return getTinyDist(p[0]-d[0])?g||a&&!f?{isBound:!1,offset:0}:b?checkInnerBoundDot((d[1]-u[1])/v+u[0],d[0],p[0],n,s):{isBound:r=abs(o=d[1]-u[1])<=(s||0),offset:r?o:0}:a&&!b?{isBound:!1,offset:0}:f?checkInnerBoundDot(v*(d[0]-u[0])+u[1],d[1],p[1],n,s):{isBound:r=abs(o=d[0]-u[0])<=(s||0),offset:r?o:0}}function getInnerBoundInfo(t,e,i){return e.map((function(e){var n=checkInnerBound(t,e),s=n.isBound,a=n.offset,o=n.isVerticalBound,r=n.isHorizontalBound,l=e.multiple,h=getDragDist({datas:i,distX:a[0],distY:a[1]}).map((function(t,e){return t*(l[e]?2/l[e]:0)}));return{sign:l,isBound:s,isVerticalBound:o,isHorizontalBound:r,isSnap:!1,offset:h}}))}function getInnerBoundDragInfo(t,e,i){var n,s=getInnerBoundInfo(t,getCheckInnerBoundLineInfos(t,e,[0,0],!1).map((function(t){return __assign$1(__assign$1({},t),{multiple:t.multiple.map((function(t){return 2*abs(t)}))})})),i),a=getNearOffsetInfo(s,0),o=getNearOffsetInfo(s,1),r=0,l=0,h=a.isVerticalBound||o.isVerticalBound,c=a.isHorizontalBound||o.isHorizontalBound;return(h||c)&&(r=(n=__read(getInverseDragDist({datas:i,distX:-a.offset[0],distY:-o.offset[1]}),2))[0],l=n[1]),{vertical:{isBound:h,offset:r},horizontal:{isBound:c,offset:l}}}function getCheckSnapLineDirections(t,e){var i=[],n=t[0],s=t[1];return n&&s?i.push([[0,2*s],t,[-n,s]],[[2*n,0],t,[n,-s]]):n?(i.push([[2*n,0],[n,1],[n,-1]]),e&&i.push([[0,-1],[n,-1],[-n,-1]],[[0,1],[n,1],[-n,1]])):s?(i.push([[0,2*s],[1,s],[-1,s]]),e&&i.push([[-1,0],[-1,s],[-1,-s]],[[1,0],[1,s],[1,-s]])):i.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),i}function getCheckInnerBoundLineInfos(t,e,i,n){var s=t.state,a=calculatePoses(s.allMatrix,100,100,s.is3d?4:3),o=getPosByDirection(a,[0,0]);return getCheckSnapLineDirections(i,n).map((function(t){var i=__read(t,3),n=i[0],s=i[1],r=i[2],l=[getPosByDirection(a,s),getPosByDirection(a,r)],h=solveLineConstants(l),c=isStartLine(o,l),u=c.vertical,d=c.horizontal;return{multiple:n,centerSign:hitTestLine(o,l)<=0,verticalSign:u,horizontalSign:d,lineConstants:h,line:[getPosByDirection(e,s),getPosByDirection(e,r)]}}))}function isBoundRotate(t,e,i,n){var s=n?t.map((function(t){return rotate(t,n)})):t;return[[s[0],s[1]],[s[1],s[3]],[s[3],s[2]],[s[2],s[0]]].some((function(t){var n=hitTestLine(i,t)<=0;return!isSameStartLine(e,t,n)}))}function getDistPointLine(t){var e=__read(t,2),i=e[0],n=e[1],s=n[0]-i[0],a=n[1]-i[1];if(!s)return abs(i[0]);if(!a)return abs(i[1]);var o=a/s;return abs((-o*i[0]+i[1])/Math.sqrt(Math.pow(o,2)+1))}function solveReverseLine(t){var e=__read(t,2),i=e[0],n=e[1],s=n[0]-i[0],a=n[1]-i[1];if(!s)return[i[0],0];if(!a)return[0,i[1]];var o=a/s,r=-o*i[0]+i[1];return[-r/(o+1/o),r/(o*o+1)]}function checkRotateInnerBounds(t,e,i,n,s){var a=t.props.innerBounds,o=s*Math.PI/180;if(!a)return[];var r=a.left,l=a.top,h=a.width,c=a.height,u=r-n[0],d=r+h-n[0],p=l-n[1],g=l+c-n[1],f=[[u,p],[d,p],[u,g],[d,g]],b=getPosByDirection(i,[0,0]);if(!isBoundRotate(i,f,b,0))return[];var v=[],m=f.map((function(t){return[getDistSize(t),getRad$1([0,0],t)]}));return[[i[0],i[1]],[i[1],i[3]],[i[3],i[2]],[i[2],i[0]]].forEach((function(t){var i=getRad$1([0,0],solveReverseLine(t)),n=getDistPointLine(t);v.push.apply(v,__spreadArray([],__read(m.filter((function(t){var e=__read(t,1)[0];return e&&n<=e})).map((function(t){var e=__read(t,2),s=e[0],a=e[1],r=Math.acos(s?n/s:0);return[o+(a+r)-i,o+(a-r)-i]})).reduce((function(t,e){return t.push.apply(t,__spreadArray([],__read(e),!1)),t}),[]).filter((function(t){return!isBoundRotate(e,f,b,t)})).map((function(t){return throttle(180*t/Math.PI,TINY_NUM)}))),!1))})),v}function checkInnerBoundPoses(t){var e=t.props.innerBounds,i=getInitialBounds();if(!e)return{boundMap:i,vertical:[],horizontal:[]};var n=t.getRect(),s=[n.pos1,n.pos2,n.pos3,n.pos4],a=getPosByDirection(s,[0,0]),o=e.left,r=e.top,l=e.width,h=e.height,c=[[o,r],[o,r+h]],u=[[o,r],[o+l,r]],d=[[o+l,r],[o+l,r+h]],p=[[o,r+h],[o+l,r+h]],g=getCheckInnerBoundLineInfos(t,s,[0,0],!1),f=[],b=[];return g.forEach((function(t){var e=t.line,n=t.lineConstants,s=isStartLine(a,e),g=s.horizontal,v=s.vertical,m=checkLineBoundCollision(e,n,u,v,1,!0),y=checkLineBoundCollision(e,n,p,v,1,!0),S=checkLineBoundCollision(e,n,c,g,1,!0),w=checkLineBoundCollision(e,n,d,g,1,!0);m.isBound&&!i.top&&(f.push(r),i.top=!0),y.isBound&&!i.bottom&&(f.push(r+h),i.bottom=!0),S.isBound&&!i.left&&(b.push(o),i.left=!0),w.isBound&&!i.right&&(b.push(o+l),i.right=!0)})),{boundMap:i,horizontal:f,vertical:b}}function solveEquation(t,e,i,n){var s=e[0]-t[0],a=e[1]-t[1];if(abs(s)<TINY_NUM$1&&(s=0),abs(a)<TINY_NUM$1&&(a=0),!s)return n?[0,0]:[0,i];if(!a)return n?[i,0]:[0,0];var o=a/s,r=t[1]-o*t[0];return n?[i,o*(e[0]+i)+r-e[1]]:[(e[1]+i-r)/o-e[0],i]}function solveNextOffset(t,e,i,n,s){var a=solveEquation(t,e,i,n);if(!a)return{isOutside:!1,offset:[0,0]};var o=getDist$2(t,e),r=getDist$2(a,t),l=getDist$2(a,e),h=r>o||l>o,c=__read(getDragDist({datas:s,distX:a[0],distY:a[1]}),2);return{offset:[c[0],c[1]],isOutside:h}}function getSnapBound(t,e){return t.isBound?t.offset:e.isSnap?getNearestSnapGuidelineInfo(e).offset:0}function checkThrottleDragRotate(t,e,i,n,s){var a=__read(e,2),o=a[0],r=a[1],l=__read(i,2),h=l[0],c=l[1],u=__read(n,2),d=u[0],p=u[1],g=__read(s,2),f=g[0],b=g[1],v=-f,m=-b;if(t&&o&&r){v=0,m=0;var y=[];if(h&&c?y.push([0,b],[f,0]):h?y.push([f,0]):c?y.push([0,b]):d&&p?y.push([0,b],[f,0]):d?y.push([f,0]):p&&y.push([0,b]),y.length){y.sort((function(t,e){return getDistSize(minus([o,r],t))-getDistSize(minus([o,r],e))}));var S=y[0];if(S[0]&&abs(o)>TINY_NUM$1)v=-S[0],m=r*abs(o+v)/abs(o)-r;else if(S[1]&&abs(r)>TINY_NUM$1){var w=r;m=-S[1],v=o*abs(r+m)/abs(w)-o}if(t&&c&&h)if(abs(v)>TINY_NUM$1&&abs(v)<abs(f))v*=x=abs(f)/abs(v),m*=x;else if(abs(m)>TINY_NUM$1&&abs(m)<abs(b)){var x;v*=x=abs(b)/abs(m),m*=x}else v=maxOffset(-f,v),m=maxOffset(-b,m)}}else v=o||h?-f:0,m=r||c?-b:0;return[v,m]}function checkSnapBoundsDrag(t,e,i,n,s,a){if(!hasGuidelines(t,"draggable"))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var o=getAbsolutePoses(a.absolutePoses,[e,i]),r=getRect(o),l=r.left,h=r.right,c=r.top,u=r.bottom,d={horizontal:o.map((function(t){return t[1]})),vertical:o.map((function(t){return t[0]}))},p=checkMoveableSnapBounds(t,s,splitSnapDirectionPoses(getSnapDirections(t.props.snapDirections),{left:l,right:h,top:c,bottom:u,center:(l+h)/2,middle:(c+u)/2}),d),g=p.vertical,f=p.horizontal,b=getInnerBoundDragInfo(t,o,a),v=b.vertical,m=b.horizontal,y=g.isSnap,S=f.isSnap,w=g.isBound||v.isBound,x=f.isBound||m.isBound,C=__read(checkThrottleDragRotate(n,[e,i],[w,x],[y,S],[maxOffset(g.offset,v.offset),maxOffset(f.offset,m.offset)]),2);return[{isBound:w,isSnap:y,offset:C[0]},{isBound:x,isSnap:S,offset:C[1]}]}function checkMoveableSnapBounds(t,e,i,n){void 0===n&&(n=i);var s=checkBoundPoses(getBounds(t),n.vertical,n.horizontal),a=s.horizontal,o=s.vertical,r=e?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:checkMoveableSnapPoses(t,i.vertical,i.horizontal,void 0,void 0,void 0,void 0),l=r.horizontal,h=r.vertical,c=getSnapBound(a[0],l),u=getSnapBound(o[0],h),d=abs(c),p=abs(u);return{horizontal:{isBound:a[0].isBound,isSnap:l.isSnap,snapIndex:l.index,offset:c,dist:d,bounds:a,snap:l},vertical:{isBound:o[0].isBound,isSnap:h.isSnap,snapIndex:h.index,offset:u,dist:p,bounds:o,snap:h}}}function checkSnapBounds(t,e,i,n,s,a,o){void 0===o&&(o=[1,1]);var r=checkBoundPoses(e,i,n),l=r.horizontal,h=r.vertical,c=checkSnapPoses(t,i,n,[],[],s,a,o),u=c.horizontal,d=c.vertical,p=getSnapBound(l[0],u),g=getSnapBound(h[0],d),f=abs(p),b=abs(g);return{horizontal:{isBound:l[0].isBound,isSnap:u.isSnap,snapIndex:u.index,offset:p,dist:f,bounds:l,snap:u},vertical:{isBound:h[0].isBound,isSnap:d.isSnap,snapIndex:d.index,offset:g,dist:b,bounds:h,snap:d}}}function checkSnapRightLine(t,e,i,n){var s=getRad$1(t,e)/Math.PI*180,a=i.vertical,o=a.isBound,r=a.isSnap,l=a.dist,h=i.horizontal,c=h.isBound,u=h.isSnap,d=s%180,p=d<3||d>177,g=d>87&&d<93;return h.dist<l&&(o||r&&!g&&(!n||!p))?"vertical":!c&&(!u||p||n&&g)?"":"horizontal"}function getSnapBoundInfo(t,e,i,n,s,a){return i.map((function(i){var o=__read(i,2),r=o[0],l=o[1],h=getPosByDirection(e,r),c=getPosByDirection(e,l),u=n?checkSnapBoundsKeepRatio(t,h,c,s):checkMoveableSnapBounds(t,s,{vertical:[c[0]],horizontal:[c[1]]}),d=u.horizontal,p=d.offset,g=d.isBound,f=d.isSnap,b=u.vertical,v=b.offset,m=b.isBound,y=b.isSnap,S=minus(l,r);if(!v&&!p)return{isBound:m||g,isSnap:y||f,sign:S,offset:[0,0]};var w=checkSnapRightLine(h,c,u,n);if(!w)return{sign:S,isBound:!1,isSnap:!1,offset:[0,0]};var x="vertical"===w,C=[0,0];return C=(C=n||1!==abs(l[0])||1!==abs(l[1])||r[0]===l[0]||r[1]===l[1]?solveNextOffset(h,c,-(x?v:p),x,a).offset:getDragDist({datas:a,distX:-v,distY:-p})).map((function(t,e){return t*(S[e]?2/S[e]:0)})),{sign:S,isBound:x?m:g,isSnap:x?y:f,offset:C}}))}function getSnapBoundOffset(t,e){return t.isBound?t.offset:e.isSnap?e.offset:0}function checkSnapBoundsKeepRatio(t,e,i,n){var s=checkBoundKeepRatio(t,e,i),a=s.horizontal,o=s.vertical,r=n?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:checkSnapKeepRatio(t,e,i),l=r.horizontal,h=r.vertical,c=getSnapBoundOffset(a,l),u=getSnapBoundOffset(o,h),d=abs(c),p=abs(u);return{horizontal:{isBound:a.isBound,isSnap:l.isSnap,offset:c,dist:d},vertical:{isBound:o.isBound,isSnap:h.isSnap,offset:u,dist:p}}}function checkMaxBounds(t,e,i,n,s){var a=[-i[0],-i[1]],o=t.state,r=o.width,l=o.height,h=t.props.bounds,c=1/0,u=1/0;if(h){var d=[[i[0],-i[1]],[-i[0],i[1]]],p=h.left,g=void 0===p?-1/0:p,f=h.top,b=void 0===f?-1/0:f,v=h.right,m=void 0===v?1/0:v,y=h.bottom,S=void 0===y?1/0:y;d.forEach((function(t){var i=t[0]!==a[0],o=t[1]!==a[1],h=getPosByDirection(e,t),d=360*getRad$1(n,h)/Math.PI;if(o){var p=h.slice();(abs(d-360)<2||abs(d-180)<2)&&(p[1]=n[1]);var f=solveNextOffset(n,p,(n[1]<h[1]?S:b)-h[1],!1,s),v=__read(f.offset,2)[1],y=f.isOutside;isNaN(v)||(u=l+(y?1:-1)*abs(v))}if(i){p=h.slice();(abs(d-90)<2||abs(d-270)<2)&&(p[0]=n[0]);var w=solveNextOffset(n,p,(n[0]<h[0]?m:g)-h[0],!0,s),x=__read(w.offset,1)[0],C=w.isOutside;isNaN(x)||(c=r+(C?1:-1)*abs(x))}}))}return{maxWidth:c,maxHeight:u}}var Draggable={name:"draggable",props:["draggable","throttleDrag","throttleDragRotate","hideThrottleDragRotateLine","startDragRotate","edgeDraggable"],events:["dragStart","drag","dragEnd","dragGroupStart","dragGroup","dragGroupEnd"],requestStyle:function(){return["left","top","right","bottom"]},requestChildStyle:function(){return["left","top","right","bottom"]},render:function(t,e){var i=t.props,n=i.hideThrottleDragRotateLine,s=i.throttleDragRotate,a=i.zoom,o=t.getState(),r=o.dragInfo,l=o.beforeOrigin;if(n||!s||!r)return[];var h=r.dist;if(!h[0]&&!h[1])return[];var c=getDistSize(h),u=getRad$1(h,[0,0]);return[e.createElement("div",{className:prefix("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:"".concat(c,"px"),transform:"translate(".concat(l[0],"px, ").concat(l[1],"px) rotate(").concat(u,"rad) scaleY(").concat(a,")")}})]},dragStart:function(t,e){var i=e.datas,n=e.parentEvent,s=e.parentGesto,a=t.state,o=a.gestos,r=a.style;if(o.draggable)return!1;o.draggable=s||t.targetGesto,i.datas={},i.left=parseFloat(r.left||"")||0,i.top=parseFloat(r.top||"")||0,i.bottom=parseFloat(r.bottom||"")||0,i.right=parseFloat(r.right||"")||0,i.startValue=[0,0],setDragStart(t,e),setDefaultTransformIndex(t,e,"translate"),startCheckSnapDrag(t,i),i.prevDist=[0,0],i.prevBeforeDist=[0,0],i.isDrag=!1,i.deltaOffset=[0,0];var l=fillParams(t,e,__assign$1({set:function(t){i.startValue=t}},fillTransformStartEvent(t,e)));return!1!==(n||triggerEvent(t,"onDragStart",l))?(i.isDrag=!0,t.state.dragInfo={startRect:t.getRect(),dist:[0,0]}):(o.draggable=null,i.isPinch=!1),!!i.isDrag&&l},drag:function(t,e){if(e){resolveTransformEvent(t,e,"translate");var i=e.datas,n=e.parentEvent,s=e.parentFlag,a=e.isPinch,o=e.deltaOffset,r=e.useSnap,l=e.isRequest,h=e.isGroup,c=e.parentThrottleDrag,u=e.distX,d=e.distY,p=i.isDrag,g=i.prevDist,f=i.prevBeforeDist,b=i.startValue;if(p){o&&(u+=o[0],d+=o[1]);var v=t.props,m=v.parentMoveable,y=h?0:v.throttleDrag||c||0,S=n?0:v.throttleDragRotate||0,w=0,x=!1,C=!1,D=!1,T=!1;if(!n&&S>0&&(u||d)){var k=v.startDragRotate||0,$=throttle(k+180*getRad$1([0,0],[u,d])/Math.PI,S)-k,O=d*Math.abs(Math.cos(($-90)/180*Math.PI)),P=getDistSize([u*Math.abs(Math.cos($/180*Math.PI)),O]);w=$*Math.PI/180,u=P*Math.cos(w),d=P*Math.sin(w)}if(!a&&!n&&!s){var L=__read(checkSnapBoundsDrag(t,u,d,S,!r&&l||o,i),2),G=L[0],F=L[1];x=G.isSnap,C=G.isBound,D=F.isSnap,T=F.isBound,u+=G.offset,d+=F.offset}var I=plus(getBeforeDragDist({datas:i,distX:u,distY:d}),b),E=plus(getTransformDist({datas:i,distX:u,distY:d}),b);throttleArray(E,TINY_NUM),throttleArray(I,TINY_NUM),S||(x||C||(E[0]=throttle(E[0],y),I[0]=throttle(I[0],y)),D||T||(E[1]=throttle(E[1],y),I[1]=throttle(I[1],y)));var A=minus(I,b),U=minus(E,b),_=minus(U,g),j=minus(A,f);i.prevDist=U,i.prevBeforeDist=A,i.passDelta=_,i.passDist=U;var M=i.left+A[0],N=i.top+A[1],B=i.right-A[0],R=i.bottom-A[1],H=convertTransformFormat(i,"translate(".concat(E[0],"px, ").concat(E[1],"px)"),"translate(".concat(U[0],"px, ").concat(U[1],"px)"));if(fillOriginalTransform(e,H),t.state.dragInfo.dist=n?[0,0]:U,n||m||!_.every((function(t){return!t}))||!j.some((function(t){return!t}))){var z=t.state,V=z.width,q=z.height,W=fillParams(t,e,__assign$1({transform:H,dist:U,delta:_,translate:E,beforeDist:A,beforeDelta:j,beforeTranslate:I,left:M,top:N,right:B,bottom:R,width:V,height:q,isPinch:a},fillCSSObject({transform:H},e)));return!n&&triggerEvent(t,"onDrag",W),W}}}},dragAfter:function(t,e){var i=e.datas,n=i.deltaOffset;return!(!n[0]&&!n[1])&&(i.deltaOffset=[0,0],this.drag(t,__assign$1(__assign$1({},e),{deltaOffset:n})))},dragEnd:function(t,e){var i=e.parentEvent,n=e.datas;if(t.state.dragInfo=null,n.isDrag){n.isDrag=!1;var s=fillEndParams(t,e,{});return!i&&triggerEvent(t,"onDragEnd",s),s}},dragGroupStart:function(t,e){var i,n,s=e.datas,a=e.clientX,o=e.clientY,r=this.dragStart(t,e);if(!r)return!1;var l=triggerChildGesto(t,this,"dragStart",[a||0,o||0],e,!1,"draggable"),h=l.childEvents,c=l.eventParams,u=triggerEvent(t,"onDragGroupStart",__assign$1(__assign$1({},r),{targets:t.props.targets,events:c}));s.isDrag=!1!==u;var d=null!==(n=null===(i=h[0])||void 0===i?void 0:i.datas.startValue)&&void 0!==n?n:[0,0];return s.throttleOffset=[d[0]%1,d[1]%1],!!s.isDrag&&r},dragGroup:function(t,e){if(e.datas.isDrag){var i=this.drag(t,__assign$1(__assign$1({},e),{parentThrottleDrag:t.props.throttleDrag})),n=triggerChildGesto(t,this,"drag",e.datas.passDelta,e,!1,"draggable").eventParams;if(i){var s=__assign$1({targets:t.props.targets,events:n},i);return triggerEvent(t,"onDragGroup",s),s}}},dragGroupEnd:function(t,e){var i=e.isDrag;if(e.datas.isDrag){this.dragEnd(t,e);var n=triggerChildGesto(t,this,"dragEnd",[0,0],e,!1,"draggable").eventParams;return triggerEvent(t,"onDragGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(t){var e={},i=t.getRect(),n=0,s=0,a=!1;return{isControl:!1,requestStart:function(t){return a=t.useSnap,{datas:e,useSnap:a}},request:function(t){return"x"in t?n=t.x-i.left:"deltaX"in t&&(n+=t.deltaX),"y"in t?s=t.y-i.top:"deltaY"in t&&(s+=t.deltaY),{datas:e,distX:n,distY:s,useSnap:a}},requestEnd:function(){return{datas:e,isDrag:!0,useSnap:a}}}},unset:function(t){t.state.gestos.draggable=null,t.state.dragInfo=null}};function getFixedDirectionInfo(t,e){return{fixedPosition:getPosByDirection(t,e),fixedDirection:e,fixedOffset:[0,0]}}function getOffsetFixedDirectionInfo(t,e){var i=t.allMatrix,n=t.is3d,s=t.width,a=t.height,o=n?4:3;return{fixedPosition:calculatePosition(i,[s/2*(1+e[0]),a/2*(1+e[1])],o),fixedDirection:e,fixedOffset:[0,0]}}function getOffsetFixedPositionInfo(t,e){var i=t.allMatrix,n=t.is3d,s=t.width,a=t.height,o=n?4:3,r=getDirectionByPos(e,s,a);return{fixedPosition:calculatePosition(i,e,o),fixedDirection:r,fixedOffset:[s?0:e[0],a?0:e[1]]}}var directionCondition$2=getDirectionCondition("resizable"),Resizable={name:"resizable",ableGroup:"size",canPinch:!0,props:["resizable","throttleResize","renderDirections","displayAroundControls","keepRatio","resizeFormat","keepRatioFinally","edge","checkResizableError"],events:["resizeStart","beforeResize","resize","resizeEnd","resizeGroupStart","beforeResizeGroup","resizeGroup","resizeGroupEnd"],render:getRenderDirections("resizable"),dragControlCondition:directionCondition$2,viewClassName:getDirectionViewClassName("resizable"),dragControlStart:function(t,e){var i,n=e.inputEvent,s=e.isPinch,a=e.isGroup,o=e.parentDirection,r=e.parentGesto,l=e.datas,h=e.parentFixedDirection,c=e.parentEvent,u=getTotalDirection(o,s,n,l),d=t.state,p=d.target,g=d.width,f=d.height,b=d.gestos;if(!u||!p)return!1;if(b.resizable)return!1;b.resizable=r||t.controlGesto,!s&&setDragStart(t,e),l.datas={},l.direction=u,l.startOffsetWidth=g,l.startOffsetHeight=f,l.prevWidth=0,l.prevHeight=0,l.minSize=[0,0],l.startWidth=d.inlineCSSWidth||d.cssWidth,l.startHeight=d.inlineCSSHeight||d.cssHeight,l.maxSize=[1/0,1/0],a||(l.minSize=[d.minOffsetWidth,d.minOffsetHeight],l.maxSize=[d.maxOffsetWidth,d.maxOffsetHeight]);var v=t.props.transformOrigin||"% %";function m(t){l.ratio=t&&isFinite(t)?t:0}function y(t){var e=getFixedDirectionInfo(l.startPositions,t);l.fixedDirection=e.fixedDirection,l.fixedPosition=e.fixedPosition,l.fixedOffset=e.fixedOffset}function S(e){var i=getOffsetFixedPositionInfo(t.state,e);l.fixedDirection=i.fixedDirection,l.fixedPosition=i.fixedPosition,l.fixedOffset=i.fixedOffset}function w(t){l.minSize=[convertUnitSize("".concat(t[0]),0)||0,convertUnitSize("".concat(t[1]),0)||0]}function x(t){var e=[t[0]||1/0,t[1]||1/0];isNumber(e[0])&&!isFinite(e[0])||(e[0]=convertUnitSize("".concat(e[0]),0)||1/0),isNumber(e[1])&&!isFinite(e[1])||(e[1]=convertUnitSize("".concat(e[1]),0)||1/0),l.maxSize=e}l.transformOrigin=v&&isString(v)?v.split(" "):v,l.startOffsetMatrix=d.offsetMatrix,l.startTransformOrigin=d.transformOrigin,l.isWidth=null!==(i=null==e?void 0:e.parentIsWidth)&&void 0!==i?i:!u[0]&&!u[1]||u[0]||!u[1],l.startPositions=getAbsolutePosesByState(t.state),m(g/f),y(h||[-u[0],-u[1]]),l.setFixedDirection=y,l.setFixedPosition=S,l.setMin=w,l.setMax=x;var C=fillParams(t,e,{direction:u,startRatio:l.ratio,set:function(t){var e=__read(t,2),i=e[0],n=e[1];l.startWidth=i,l.startHeight=n},setMin:w,setMax:x,setRatio:m,setFixedDirection:y,setFixedPosition:S,setOrigin:function(t){l.transformOrigin=t},dragStart:Draggable.dragStart(t,(new CustomGesto).dragStart([0,0],e))}),D=c||triggerEvent(t,"onResizeStart",C);return l.startFixedDirection=l.fixedDirection,l.startFixedPosition=l.fixedPosition,!1!==D&&(l.isResize=!0,t.state.snapRenderInfo={request:e.isRequest,direction:u}),!!l.isResize&&C},dragControl:function(t,e){var i,n=e.datas,s=e.parentFlag,a=e.isPinch,o=e.parentKeepRatio,r=e.dragClient,l=e.parentDist,h=e.useSnap,c=e.isRequest,u=e.isGroup,d=e.parentEvent,p=e.resolveMatrix,g=n.isResize,f=n.transformOrigin,b=n.startWidth,v=n.startHeight,m=n.prevWidth,y=n.prevHeight,S=n.minSize,w=n.maxSize,x=n.ratio,C=n.startOffsetWidth,D=n.startOffsetHeight,T=n.isWidth;if(g){if(p){var k=t.state.is3d,$=n.startOffsetMatrix,O=n.startTransformOrigin,P=k?4:3,L=parseMat(getNextTransforms(e)),G=Math.sqrt(L.length);P!==G&&(L=convertDimension(L,G,P));var F=getNextMatrix($,L,O,P),I=calculatePoses(F,C,D,P);n.startPositions=I,n.nextTargetMatrix=L,n.nextAllMatrix=F}var E=getProps(t.props,"resizable"),A=E.resizeFormat,U=E.throttleResize,_=void 0===U?s?0:1:U,j=E.parentMoveable,M=E.keepRatioFinally,N=n.direction,B=N,R=0,H=0;N[0]||N[1]||(B=[1,1]);var z=x&&(null!=o?o:E.keepRatio)||!1,V=__read(st(),2),q=V[0],W=V[1];d||(n.setFixedDirection(n.fixedDirection),triggerEvent(t,"onBeforeResize",fillParams(t,e,{startFixedDirection:n.startFixedDirection,startFixedPosition:n.startFixedPosition,setFixedDirection:function(t){var e;return n.setFixedDirection(t),e=__read(st(),2),q=e[0],W=e[1],[q,W]},setFixedPosition:function(t){var e;return n.setFixedPosition(t),e=__read(st(),2),q=e[0],W=e[1],[q,W]},boundingWidth:q,boundingHeight:W,setSize:function(t){var e;e=__read(t,2),q=e[0],W=e[1]}},!0)));var K=r;r||(K=!s&&a?getAbsolutePosition(t,[0,0]):n.fixedPosition);var Y=[0,0];if(a||(Y=checkSnapResize(t,q,W,N,K,!h&&c,n)),l&&(!l[0]&&(Y[0]=0),!l[1]&&(Y[1]=0)),z){B[0]&&B[1]&&Y[0]&&Y[1]&&(abs(Y[0])>abs(Y[1])?Y[1]=0:Y[0]=0);var X=!Y[0]&&!Y[1];X&&at(),B[0]&&!B[1]||Y[0]&&!Y[1]||X&&T?(q+=Y[0],W=q/x):(!B[0]&&B[1]||!Y[0]&&Y[1]||X&&!T)&&(W+=Y[1],q=W*x)}else q+=Y[0],W+=Y[1],q=Math.max(0,q),W=Math.max(0,W);i=__read(calculateBoundSize([q,W],S,w,!!z&&x),2),q=i[0],W=i[1],at(),z&&(u||M)&&(T?W=q/x:q=W*x);var J=[(R=q-C)-m,(H=W-D)-y];n.prevWidth=R,n.prevHeight=H;var Z=getResizeDist(t,q,W,K,f,n);if(j||!J.every((function(t){return!t}))||!Z.every((function(t){return!t}))){var Q=Draggable.drag(t,setCustomDrag(e,t.state,Z,!!a,!1,"draggable")),tt=Q.transform,et=b+R,it=v+H,nt=fillParams(t,e,__assign$1({width:et,height:it,offsetWidth:Math.round(q),offsetHeight:Math.round(W),startRatio:x,boundingWidth:q,boundingHeight:W,direction:N,dist:[R,H],delta:J,isPinch:!!a,drag:Q},fillAfterTransform({style:{width:"".concat(et,"px"),height:"".concat(it,"px")},transform:tt},Q,e)));return!d&&triggerEvent(t,"onResize",nt),nt}}function st(){var t=n.fixedDirection,i=getOffsetSizeDist(B,z,n,e);R=i.distWidth,H=i.distHeight;var s=B[0]-t[0]||z?Math.max(C+R,TINY_NUM):C,a=B[1]-t[1]||z?Math.max(D+H,TINY_NUM):D;return z&&C&&D&&(T?a=s/x:s=a*x),[s,a]}function at(){var t;A&&(t=__read(A([q,W]),2),q=t[0],W=t[1]),q=throttle(q,_),W=throttle(W,_)}},dragControlAfter:function(t,e){var i=e.datas,n=i.isResize,s=i.startOffsetWidth,a=i.startOffsetHeight,o=i.prevWidth,r=i.prevHeight;if(n&&!1!==t.props.checkResizableError){var l=t.state,h=l.width-(s+o),c=l.height-(a+r),u=abs(h)>3,d=abs(c)>3;return u&&(i.startWidth+=h,i.startOffsetWidth+=h,i.prevWidth+=h),d&&(i.startHeight+=c,i.startOffsetHeight+=c,i.prevHeight+=c),u||d?this.dragControl(t,e):void 0}},dragControlEnd:function(t,e){var i=e.datas,n=e.parentEvent;if(i.isResize){i.isResize=!1;var s=fillEndParams(t,e,{});return!n&&triggerEvent(t,"onResizeEnd",s),s}},dragGroupControlCondition:directionCondition$2,dragGroupControlStart:function(t,e){var i=e.datas,n=this.dragControlStart(t,__assign$1(__assign$1({},e),{isGroup:!0}));if(!n)return!1;var s=fillChildEvents(t,"resizable",e),a=i.startOffsetWidth,o=i.startOffsetHeight;function r(){var t=i.minSize;s.forEach((function(e){var i=e.datas,n=i.minSize,s=i.startOffsetWidth,r=i.startOffsetHeight,l=a*(s?n[0]/s:0),h=o*(r?n[1]/r:0);t[0]=Math.max(t[0],l),t[1]=Math.max(t[1],h)}))}function l(){var t=i.maxSize;s.forEach((function(e){var i=e.datas,n=i.maxSize,s=i.startOffsetWidth,r=i.startOffsetHeight,l=a*(s?n[0]/s:0),h=o*(r?n[1]/r:0);t[0]=Math.min(t[0],l),t[1]=Math.min(t[1],h)}))}var h=triggerChildAbles(t,this,"dragControlStart",e,(function(e,n){return startChildDist(t,e,i,n)}));r(),l();var c=function(e){n.setFixedDirection(e),h.forEach((function(n,a){n.setFixedDirection(e),startChildDist(t,n.moveable,i,s[a])}))};i.setFixedDirection=c;var u=__assign$1(__assign$1({},n),{targets:t.props.targets,events:h.map((function(t){return __assign$1(__assign$1({},t),{setMin:function(e){t.setMin(e),r()},setMax:function(e){t.setMax(e),l()}})})),setFixedDirection:c,setMin:function(t){n.setMin(t),r()},setMax:function(t){n.setMax(t),l()}}),d=triggerEvent(t,"onResizeGroupStart",u);return i.isResize=!1!==d,!!i.isResize&&n},dragGroupControl:function(t,e){var i=e.datas;if(i.isResize){var n=getProps(t.props,"resizable");catchEvent(t,"onBeforeResize",(function(i){triggerEvent(t,"onBeforeResizeGroup",fillParams(t,e,__assign$1(__assign$1({},i),{targets:n.targets}),!0))}));var s=this.dragControl(t,__assign$1(__assign$1({},e),{isGroup:!0}));if(s){var a=s.boundingWidth,o=s.boundingHeight,r=s.dist,l=n.keepRatio,h=[a/(a-r[0]),o/(o-r[1])],c=i.fixedPosition,u=triggerChildAbles(t,this,"dragControl",e,(function(e,i){var n=__read(calculate(createRotateMatrix(t.rotation/180*Math.PI,3),[i.datas.originalX*h[0],i.datas.originalY*h[1],1],3),2),s=n[0],a=n[1];return __assign$1(__assign$1({},i),{parentDist:null,parentScale:h,dragClient:plus(c,[s,a]),parentKeepRatio:l})})),d=__assign$1({targets:n.targets,events:u},s);return triggerEvent(t,"onResizeGroup",d),d}}},dragGroupControlEnd:function(t,e){var i=e.isDrag;if(e.datas.isResize){this.dragControlEnd(t,e);var n=triggerChildAbles(t,this,"dragControlEnd",e);return triggerEvent(t,"onResizeGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(t){var e={},i=0,n=0,s=!1,a=t.getRect();return{isControl:!0,requestStart:function(t){var i;return s=t.useSnap,{datas:e,parentDirection:t.direction||[1,1],parentIsWidth:null===(i=null==t?void 0:t.horizontal)||void 0===i||i,useSnap:s}},request:function(t){return"offsetWidth"in t?i=t.offsetWidth-a.offsetWidth:"deltaWidth"in t&&(i+=t.deltaWidth),"offsetHeight"in t?n=t.offsetHeight-a.offsetHeight:"deltaHeight"in t&&(n+=t.deltaHeight),{datas:e,parentDist:[i,n],parentKeepRatio:t.keepRatio,useSnap:s}},requestEnd:function(){return{datas:e,isDrag:!0,useSnap:s}}}},unset:function(t){t.state.gestos.resizable=null}};function setRotateStartInfo(t,e,i,n,s){var a=t.props.groupable,o=t.state,r=o.is3d?4:3,l=e.origin,h=calculatePosition(t.state.rootMatrix,minus([l[0],l[1]],a?[0,0]:[o.left,o.top]),r),c=plus([s.left,s.top],h);e.startAbsoluteOrigin=c,e.prevDeg=getRad$1(c,[i,n])/Math.PI*180,e.defaultDeg=e.prevDeg,e.prevSnapDeg=0,e.loop=0,e.startDist=getDist$2(c,[i,n])}function getAbsoluteDist(t,e,i){var n=i.defaultDeg,s=i.prevDeg,a=s%360,o=Math.floor(s/360);a<0&&(a+=360),a>t&&a>270&&t<90?++o:a<t&&a<90&&t>270&&--o;var r=e*(360*o+t-n);return i.prevDeg=n+r,r}function getAbsoluteDistByClient(t,e,i,n){return getAbsoluteDist(getRad$1(n.startAbsoluteOrigin,[t,e])/Math.PI*180,i,n)}function getRotateInfo(t,e,i,n,s,a){var o=t.props.throttleRotate,r=void 0===o?0:o,l=i.prevSnapDeg,h=0,c=!1;if(a){var u=checkSnapRotate(t,e,n,s+n);c=u.isSnap,h=s+u.dist}c||(h=throttle(s+n,r));var d=h-s;return i.prevSnapDeg=d,[d-l,d,h]}function getRotationPositions(t,e,i){var n=__read(e,4),s=n[0],a=n[1],o=n[2],r=n[3];if("none"===t)return[];if(isArray(t))return t.map((function(t){return getRotationPositions(t,[s,a,o,r],i)[0]}));var l=__read((t||"top").split("-"),2),h=l[0],c=l[1],u=[s,a];"left"===h?u=[o,s]:"right"===h?u=[a,r]:"bottom"===h&&(u=[r,o]);var d=[(u[0][0]+u[1][0])/2,(u[0][1]+u[1][1])/2],p=getRotationRad(u,i);if(c){var g="top"===c||"left"===c,f="bottom"===h||"left"===h;d=u[g&&!f||!g&&f?0:1]}return[[d,p]]}function dragControlCondition(t,e){if(e.isRequest)return"rotatable"===e.requestAble;var i=e.inputEvent.target;if(hasClass(i,prefix("rotation-control"))||t.props.rotateAroundControls&&hasClass(i,prefix("around-control"))||hasClass(i,prefix("control"))&&hasClass(i,prefix("rotatable")))return!0;var n=t.props.rotationTarget;return!!n&&getRefTargets(n,!0).some((function(t){return!!t&&(i===t||i.contains(t))}))}var css=".rotation {\nposition: absolute;\nheight: 40px;\nwidth: 1px;\ntransform-origin: 50% 100%;\nheight: calc(40px * var(--zoom));\ntop: auto;\nleft: 0;\nbottom: 100%;\nwill-change: transform;\n}\n.rotation .rotation-line {\ndisplay: block;\nwidth: 100%;\nheight: 100%;\ntransform-origin: 50% 50%;\n}\n.rotation .rotation-control {\nborder-color: #4af;\nborder-color: var(--moveable-color);\nbackground:#fff;\ncursor: alias;\n}\n:global .view-rotation-dragging, .rotatable.direction.control {\ncursor: alias;\n}\n.rotatable.direction.control.move {\ncursor: move;\n}\n",Rotatable={name:"rotatable",canPinch:!0,props:["rotatable","rotationPosition","throttleRotate","renderDirections","rotationTarget","rotateAroundControls","edge","resolveAblesWithRotatable","displayAroundControls"],events:["rotateStart","beforeRotate","rotate","rotateEnd","rotateGroupStart","beforeRotateGroup","rotateGroup","rotateGroupEnd"],css:[css],viewClassName:function(t){return t.isDragging("rotatable")?prefix("view-rotation-dragging"):""},render:function(t,e){var i=getProps(t.props,"rotatable"),n=i.rotatable,s=i.rotationPosition,a=i.zoom,o=i.renderDirections,r=i.rotateAroundControls,l=i.resolveAblesWithRotatable,h=t.getState(),c=h.renderPoses,u=h.direction;if(!n)return null;var d=getRotationPositions(s,c,u),p=[];if(d.forEach((function(t,i){var n=__read(t,2),s=n[0],o=n[1];p.push(e.createElement("div",{key:"rotation".concat(i),className:prefix("rotation"),style:{transform:"translate(-50%) translate(".concat(s[0],"px, ").concat(s[1],"px) rotate(").concat(o,"rad)")}},e.createElement("div",{className:prefix("line rotation-line"),style:{transform:"scaleX(".concat(a,")")}}),e.createElement("div",{className:prefix("control rotation-control"),style:{transform:"translate(0.5px) scale(".concat(a,")")}})))})),o){var g=getKeys(l||{}),f={};g.forEach((function(t){l[t].forEach((function(e){f[e]=t}))}));var b=[];isArray(o)&&(b=o.map((function(t){var e=f[t];return{data:e?{resolve:e}:{},classNames:e?["move"]:[],dir:t}}))),p.push.apply(p,__spreadArray([],__read(renderDirectionControlsByInfos(t,"rotatable",b,e)),!1))}return r&&p.push.apply(p,__spreadArray([],__read(renderAroundControls(t,e)),!1)),p},dragControlCondition:dragControlCondition,dragControlStart:function(t,e){var i,n,s=e.datas,a=e.clientX,o=e.clientY,r=e.parentRotate,l=e.parentFlag,h=e.isPinch,c=e.isRequest,u=t.state,d=u.target,p=u.left,g=u.top,f=u.direction,b=u.beforeDirection,v=u.targetTransform,m=u.moveableClientRect,y=u.offsetMatrix,S=u.targetMatrix,w=u.allMatrix,x=u.width,C=u.height;if(!c&&!d)return!1;var D=t.getRect();s.rect=D,s.transform=v,s.left=p,s.top=g;var T=function(e){var i=getOffsetFixedPositionInfo(t.state,e);s.fixedDirection=i.fixedDirection,s.fixedOffset=i.fixedOffset,s.fixedPosition=i.fixedPosition,U&&U.setFixedPosition(e)},k=function(e){var i=getOffsetFixedDirectionInfo(t.state,e);s.fixedDirection=i.fixedDirection,s.fixedOffset=i.fixedOffset,s.fixedPosition=i.fixedPosition,U&&U.setFixedDirection(e)},$=a,O=o;if(c||h||l){var P=r||0;s.beforeInfo={origin:D.beforeOrigin,prevDeg:P,defaultDeg:P,prevSnapDeg:0,startDist:0},s.afterInfo=__assign$1(__assign$1({},s.beforeInfo),{origin:D.origin}),s.absoluteInfo=__assign$1(__assign$1({},s.beforeInfo),{origin:D.origin,startValue:P})}else{var L=null===(n=e.inputEvent)||void 0===n?void 0:n.target;if(L){var G=L.getAttribute("data-direction")||"",F=DIRECTION_REGION_TO_DIRECTION[G];if(F){s.isControl=!0,s.isAroundControl=hasClass(L,prefix("around-control")),s.controlDirection=F;var I=L.getAttribute("data-resolve");I&&(s.resolveAble=I),i=__read(getPosByDirection(calculateMoveableClientPositions(u.rootMatrix,u.renderPoses,m),F),2),$=i[0],O=i[1]}}s.beforeInfo={origin:D.beforeOrigin},s.afterInfo={origin:D.origin},s.absoluteInfo={origin:D.origin,startValue:D.rotation};var E=T;T=function(e){var i=u.is3d?4:3,n=__read(plus(getOrigin(S,i),e),2),a=n[0],o=n[1],r=calculate(y,convertPositionMatrix([a,o],i)),l=calculate(w,convertPositionMatrix([e[0],e[1]],i));E(e);var h=u.posDelta;s.beforeInfo.origin=minus(r,h),s.afterInfo.origin=minus(l,h),s.absoluteInfo.origin=minus(l,h),setRotateStartInfo(t,s.beforeInfo,$,O,m),setRotateStartInfo(t,s.afterInfo,$,O,m),setRotateStartInfo(t,s.absoluteInfo,$,O,m)},k=function(t){var e=getPosByDirection([[0,0],[x,0],[0,C],[x,C]],t);T(e)}}s.startClientX=$,s.startClientY=O,s.direction=f,s.beforeDirection=b,s.startValue=0,s.datas={},setDefaultTransformIndex(t,e,"rotate");var A=!1,U=!1;s.isControl&&s.resolveAble&&("resizable"===s.resolveAble&&(U=Resizable.dragControlStart(t,__assign$1(__assign$1({},new CustomGesto("resizable").dragStart([0,0],e)),{parentPosition:s.controlPosition,parentFixedPosition:s.fixedPosition}))));U||(A=Draggable.dragStart(t,(new CustomGesto).dragStart([0,0],e))),T(getTotalOrigin(t));var _=fillParams(t,e,__assign$1(__assign$1({set:function(t){s.startValue=t*Math.PI/180},setFixedDirection:k,setFixedPosition:T},fillTransformStartEvent(t,e)),{dragStart:A,resizeStart:U})),j=triggerEvent(t,"onRotateStart",_);return s.isRotate=!1!==j,u.snapRenderInfo={request:e.isRequest},!!s.isRotate&&_},dragControl:function(t,e){var i,n,s,a=e.datas,o=e.clientDistX,r=e.clientDistY,l=e.parentRotate,h=e.parentFlag,c=e.isPinch,u=e.groupDelta,d=e.resolveMatrix,p=a.beforeDirection,g=a.beforeInfo,f=a.afterInfo,b=a.absoluteInfo,v=a.isRotate,m=a.startValue,y=a.rect,S=a.startClientX,w=a.startClientY;if(v){resolveTransformEvent(t,e,"rotate");var x,C,D,T,k,$,O,P,L,G=p*getTransformDirection(e),F=t.props.parentMoveable,I=180/Math.PI*m,E=b.startValue,A=!1,U=S+o,_=w+r;if(!h&&"parentDist"in e){var j=e.parentDist;C=j,k=j,P=j}else c||h?(C=getAbsoluteDist(l,p,g),k=getAbsoluteDist(l,G,f),P=getAbsoluteDist(l,G,b)):(C=getAbsoluteDistByClient(U,_,p,g),k=getAbsoluteDistByClient(U,_,G,f),P=getAbsoluteDistByClient(U,_,G,b),A=!0);if(triggerEvent(t,"onBeforeRotate",fillParams(t,e,{beforeRotation:D=I+C,rotation:$=I+k,absoluteRotation:L=E+P,setRotation:function(t){C=k=t-I,P=k}},!0)),x=(i=__read(getRotateInfo(t,y,g,C,I,A),3))[0],C=i[1],D=i[2],T=(n=__read(getRotateInfo(t,y,f,k,I,A),3))[0],k=n[1],$=n[2],O=(s=__read(getRotateInfo(t,y,b,P,E,A),3))[0],P=s[1],L=s[2],O||T||x||F||d){var M=convertTransformFormat(a,"rotate(".concat($,"deg)"),"rotate(".concat(k,"deg)"));d&&(a.fixedPosition=getTranslateFixedPosition(t,a.targetAllTransform,a.fixedDirection,a.fixedOffset,a));var N=getRotateDist(t,k,a),B=minus(plus(u||[0,0],N),a.prevInverseDist||[0,0]);a.prevInverseDist=N,a.requestValue=null;var R=fillTransformEvent(t,M,B,c,e),H=R,z=getDist$2([U,_],b.startAbsoluteOrigin)-b.startDist,V=void 0;if("resizable"===a.resolveAble){var q=Resizable.dragControl(t,__assign$1(__assign$1({},setCustomDrag(e,t.state,[e.deltaX,e.deltaY],!!c,!1,"resizable")),{resolveMatrix:!0,parentDistance:z}));q&&(V=q,H=fillAfterTransform(H,q,e))}var W=fillParams(t,e,__assign$1(__assign$1({delta:T,dist:k,rotate:$,rotation:$,beforeDist:C,beforeDelta:x,beforeRotate:D,beforeRotation:D,absoluteDist:P,absoluteDelta:O,absoluteRotate:L,absoluteRotation:L,isPinch:!!c,resize:V},R),H));return triggerEvent(t,"onRotate",W),W}}},dragControlEnd:function(t,e){var i=e.datas;if(i.isRotate){i.isRotate=!1;var n=fillEndParams(t,e,{});return triggerEvent(t,"onRotateEnd",n),n}},dragGroupControlCondition:dragControlCondition,dragGroupControlStart:function(t,e){var i=e.datas,n=t.state,s=n.left,a=n.top,o=n.beforeOrigin,r=this.dragControlStart(t,e);if(!r)return!1;r.set(i.beforeDirection*t.rotation);var l=triggerChildAbles(t,this,"dragControlStart",e,(function(t,e){var i=t.state,n=i.left,r=i.top,l=i.beforeOrigin,h=plus(minus([n,r],[s,a]),minus(l,o));return e.datas.startGroupClient=h,e.datas.groupClient=h,__assign$1(__assign$1({},e),{parentRotate:0})})),h=triggerEvent(t,"onRotateGroupStart",__assign$1(__assign$1({},r),{targets:t.props.targets,events:l}));return i.isRotate=!1!==h,!!i.isRotate&&r},dragGroupControl:function(t,e){var i=e.datas;if(i.isRotate){catchEvent(t,"onBeforeRotate",(function(i){triggerEvent(t,"onBeforeRotateGroup",fillParams(t,e,__assign$1(__assign$1({},i),{targets:t.props.targets}),!0))}));var n=this.dragControl(t,e);if(n){var s=i.beforeDirection,a=n.beforeDist,o=a/180*Math.PI,r=triggerChildAbles(t,this,"dragControl",e,(function(t,e){var i=e.datas.startGroupClient,n=__read(e.datas.groupClient,2),r=n[0],l=n[1],h=__read(rotate(i,o*s),2),c=h[0],u=h[1],d=[c-r,u-l];return e.datas.groupClient=[c,u],__assign$1(__assign$1({},e),{parentRotate:a,groupDelta:d})}));t.rotation=s*n.beforeRotation;var l=__assign$1({targets:t.props.targets,events:r,set:function(e){t.rotation=e},setGroupRotation:function(e){t.rotation=e}},n);return triggerEvent(t,"onRotateGroup",l),l}}},dragGroupControlEnd:function(t,e){var i=e.isDrag;if(e.datas.isRotate){this.dragControlEnd(t,e);var n=triggerChildAbles(t,this,"dragControlEnd",e);return triggerEvent(t,"onRotateGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(t){var e={},i=0,n=t.getRotation();return{isControl:!0,requestStart:function(){return{datas:e}},request:function(t){return"deltaRotate"in t?i+=t.deltaRotate:"rotate"in t&&(i=t.rotate-n),{datas:e,parentDist:i}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function renderGuideline(t,e){var i,n=t.direction,s=t.classNames,a=t.size,o=t.pos,r=t.zoom,l=t.key,h="horizontal"===n,c=h?"Y":"X";return e.createElement("div",{key:l,className:s.join(" "),style:(i={},i[h?"width":"height"]="".concat(a),i.transform="translate(".concat(o[0],", ").concat(o[1],") translate").concat(c,"(-50%) scale").concat(c,"(").concat(r,")"),i)})}function renderInnerGuideline(t,e){return renderGuideline(__assign$1(__assign$1({},t),{classNames:__spreadArray([prefix("line","guideline",t.direction)],__read(t.classNames),!1).filter((function(t){return t})),size:t.size||"".concat(t.sizeValue,"px"),pos:t.pos||t.posValue.map((function(t){return"".concat(throttle(t,.1),"px")}))}),e)}function renderSnapPoses(t,e,i,n,s,a,o,r){var l=t.props.zoom;return i.map((function(t,i){var h=t.type,c=t.pos,u=[0,0];return u[o]=n,u[o?0:1]=-s+c,renderInnerGuideline({key:"".concat(e,"TargetGuideline").concat(i),classNames:[prefix("target","bold",h)],posValue:u,sizeValue:a,zoom:l,direction:e},r)}))}function renderGuidelines(t,e,i,n,s,a){var o=t.props,r=o.zoom,l=o.isDisplayInnerSnapDigit,h="horizontal"===e?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,c=s[h.start],u=s[h.end];return i.filter((function(t){var e=t.hide,i=t.elementRect;if(e)return!1;if(l&&i){var n=i.rect;if(n[h.start]<=c&&u<=n[h.end])return!1}return!0})).map((function(t,i){var s=t.pos,o=t.size,l=t.element,h=t.className,c=[-n[0]+s[0],-n[1]+s[1]];return renderInnerGuideline({key:"".concat(e,"-default-guideline-").concat(i),classNames:l?[prefix("bold"),h]:[prefix("normal"),h],direction:e,posValue:c,sizeValue:o,zoom:r},a)}))}function renderDigitLine(t,e,i,n,s,a,o,r){var l,h=t.props,c=h.snapDigit,u=void 0===c?0:c,d=h.isDisplaySnapDigit,p=void 0===d||d,g=h.snapDistFormat,f=void 0===g?function(t,e){return t}:g,b=h.zoom,v="horizontal"===e?"X":"Y",m="vertical"===e?"height":"width",y=Math.abs(s),S=p?parseFloat(y.toFixed(u)):0;return r.createElement("div",{key:"".concat(e,"-").concat(i,"-guideline-").concat(n),className:prefix("guideline-group",e),style:(l={left:"".concat(a[0],"px"),top:"".concat(a[1],"px")},l[m]="".concat(y,"px"),l)},renderInnerGuideline({direction:e,classNames:[prefix(i),o],size:"100%",posValue:[0,0],sizeValue:y,zoom:b},r),r.createElement("div",{className:prefix("size-value","gap"),style:{transform:"translate".concat(v,"(-50%) scale(").concat(b,")")}},S>0?f(S,e):""))}function groupByElementGuidelines(t,e,i,n){var s="vertical"===t?0:1,a="vertical"===t?1:0,o=s?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,r=i[o.start],l=i[o.end];return groupBy(e,(function(t){return t.pos[s]})).map((function(e){var i=[],h=[];return e.forEach((function(e){var c,u,d=e.element,p=e.elementRect.rect;if(p[o.end]<r)i.push(e);else if(l<p[o.start])h.push(e);else if(p[o.start]<=r&&l<=p[o.end]&&n){var g=e.pos,f={element:d,rect:__assign$1(__assign$1({},p),(c={},c[o.end]=p[o.start],c))},b={element:d,rect:__assign$1(__assign$1({},p),(u={},u[o.start]=p[o.end],u))},v=[0,0],m=[0,0];v[s]=g[s],v[a]=g[a],m[s]=g[s],m[a]=g[a]+e.size,i.push({type:t,pos:v,size:0,elementRect:f,direction:"",elementDirection:"end"}),h.push({type:t,pos:m,size:0,elementRect:b,direction:"",elementDirection:"start"})}})),i.sort((function(t,e){return e.pos[a]-t.pos[a]})),h.sort((function(t,e){return t.pos[a]-e.pos[a]})),{total:e,start:i,end:h,inner:[]}}))}function renderDashedGuidelines(t,e,i,n,s){var a=t.props.isDisplayInnerSnapDigit,o=[];return["vertical","horizontal"].forEach((function(r){var l=e.filter((function(t){return t.type===r})),h="vertical"===r?1:0,c=h?0:1,u=groupByElementGuidelines(r,l,n,a),d=h?HORIZONTAL_NAMES_MAP:VERTICAL_NAMES_MAP,p=h?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,g=n[d.start],f=n[d.end];u.forEach((function(e){var a=e.total,l=e.start,u=e.end,b=e.inner,v=i[c]+a[0].pos[c]-n[p.start],m=n;l.forEach((function(e){var n=e.elementRect.rect,a=m[d.start]-n[d.end];if(a>0){var l=[0,0];l[h]=i[h]+m[d.start]-g-a,l[c]=v,o.push(renderDigitLine(t,r,"dashed",o.length,a,l,e.className,s))}m=n})),m=n,u.forEach((function(e){var n=e.elementRect.rect,a=n[d.start]-m[d.end];if(a>0){var l=[0,0];l[h]=i[h]+m[d.end]-g,l[c]=v,o.push(renderDigitLine(t,r,"dashed",o.length,a,l,e.className,s))}m=n})),b.forEach((function(e){var n=e.elementRect.rect,a=g-n[d.start],l=n[d.end]-f,u=[0,0],p=[0,0];u[h]=i[h]-a,u[c]=v,p[h]=i[h]+f-g,p[c]=v,o.push(renderDigitLine(t,r,"dashed",o.length,a,u,e.className,s)),o.push(renderDigitLine(t,r,"dashed",o.length,l,p,e.className,s))}))}))})),o}function renderGapGuidelines(t,e,i,n,s){var a=[];return["horizontal","vertical"].forEach((function(o){var r=e.filter((function(t){return t.type===o})).slice(0,1),l="vertical"===o?0:1,h=l?0:1,c=l?HORIZONTAL_NAMES_MAP:VERTICAL_NAMES_MAP,u=l?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,d=n[c.start],p=n[c.end],g=n[u.start],f=n[u.end];r.forEach((function(e){var n=e.gap,o=e.gapRects,r=Math.max.apply(Math,__spreadArray([g],__read(o.map((function(t){return t.rect[u.start]}))),!1)),b=Math.min.apply(Math,__spreadArray([f],__read(o.map((function(t){return t.rect[u.end]}))),!1)),v=(r+b)/2;r!==b&&v!==(g+f)/2&&o.forEach((function(e){var o=e.rect,r=e.className,u=[i[0],i[1]];if(o[c.end]<d)u[l]+=o[c.end]-d;else{if(!(p<o[c.start]))return;u[l]+=o[c.start]-d-n}u[h]+=v-g,a.push(renderDigitLine(t,l?"vertical":"horizontal","gap",a.length,n,u,r,s))}))}))})),a}function getTotalGuidelines(t){var e,i,n=t.state,s=n.containerClientRect,a=n.hasFixed,o=s.overflow,r=s.scrollHeight,l=s.scrollWidth,h=s.clientHeight,c=s.clientWidth,u=s.clientLeft,d=s.clientTop,p=t.props,g=p.snapGap,f=void 0===g||g,b=p.verticalGuidelines,v=p.horizontalGuidelines,m=p.snapThreshold,y=void 0===m?5:m,S=p.maxSnapElementGuidelineDistance,w=void 0===S?1/0:S,x=p.isDisplayGridGuidelines,C=getRect(getAbsolutePosesByState(t.state)),D=C.top,T=C.left,k=C.bottom,$=C.right,O={top:D,left:T,bottom:k,right:$,center:(T+$)/2,middle:(D+k)/2},P=__spreadArray([],__read(getElementGuidelines(t)),!1),L=(null!==(i=null===(e=n.snapThresholdInfo)||void 0===e?void 0:e.multiples)&&void 0!==i?i:[1,1]).map((function(t){return t*y}));f&&P.push.apply(P,__spreadArray([],__read(getGapGuidelines(t,O,L)),!1));var G=__assign$1({},n.snapOffset||{left:0,top:0,bottom:0,right:0});if(P.push.apply(P,__spreadArray([],__read(getGridGuidelines(t,o?l:c,o?r:h,u,d,G,x)),!1)),a){var F=s.left,I=s.top;G.left+=F,G.top+=I,G.right+=F,G.bottom+=I}return P.push.apply(P,__spreadArray([],__read(getDefaultGuidelines(v||!1,b||!1,o?l:c,o?r:h,u,d,G)),!1)),P=P.filter((function(t){var e=t.element,i=t.elementRect,n=t.type;if(!e||!i)return!0;var s=i.rect;return checkBetweenRects(O,s,n,w)}))}function getGapGuidelines(t,e,i){var n=t.props,s=n.maxSnapElementGuidelineDistance,a=void 0===s?1/0:s,o=n.maxSnapElementGapDistance,r=void 0===o?1/0:o,l=t.state.elementRects,h=[];return[["vertical",VERTICAL_NAMES_MAP,HORIZONTAL_NAMES_MAP],["horizontal",HORIZONTAL_NAMES_MAP,VERTICAL_NAMES_MAP]].forEach((function(t){var n=__read(t,3),s=n[0],o=n[1],c=n[2],u=e[o.start],d=e[o.end],p=e[o.center],g=e[c.start],f=e[c.end],b={left:i[0],top:i[1]};function v(t){var e=t.rect,i=b[o.start];return e[o.end]<u+i?u-e[o.end]:d-i<e[o.start]?e[o.start]-d:-1}var m=l.filter((function(t){var e=t.rect;return!(e[c.start]>f||e[c.end]<g)&&v(t)>0})).sort((function(t,e){return v(t)-v(e)})),y=[];m.forEach((function(t){m.forEach((function(e){if(t!==e){var i=t.rect,n=e.rect,s=i[c.start],a=i[c.end],o=n[c.start];s>n[c.end]||o>a||y.push([t,e])}}))})),y.forEach((function(t){var i=__read(t,2),n=i[0],l=i[1],c=n.rect,g=l.rect,f=c[o.start],v=c[o.end],m=g[o.start],y=g[o.end],S=b[o.start],w=0,x=0,C=!1,D=!1,T=!1;if(v<=u&&d<=m){if(D=!0,abs((x=v+(w=(m-v-(d-u))/2)+(d-u)/2)-p)>S)return}else if(v<m&&y<u+S){if(C=!0,abs((x=y+(w=m-v))-u)>S)return}else{if(!(v<m&&d-S<f))return;if(T=!0,abs((x=f-(w=m-v))-d)>S)return}w&&checkBetweenRects(e,g,s,a)&&(w>r||h.push({type:s,pos:"vertical"===s?[x,0]:[0,x],element:l.element,size:0,className:l.className,isStart:C,isCenter:D,isEnd:T,gap:w,hide:!0,gapRects:[n,l],direction:"",elementDirection:""}))}))})),h}function startGridGroupGuidelines(t,e,i,n){var s,a,o=t.props,r=t.state,l=o.snapGridAll,h=o.snapGridWidth,c=void 0===h?0:h,u=o.snapGridHeight,d=void 0===u?0:u,p=r.snapRenderInfo,g=p&&((null===(s=p.direction)||void 0===s?void 0:s[0])||(null===(a=p.direction)||void 0===a?void 0:a[1])),f=t.moveables;if(l&&f&&g&&(c||d)){if(r.snapThresholdInfo)return;r.snapThresholdInfo={multiples:[1,1],offset:[0,0]};var b=t.getRect(),v=b.children,m=p.direction;if(v){var y=m.map((function(t,s){var a=0===s?{snapSize:c,posName:"left",sizeName:"width",clientOffset:n.left-e}:{snapSize:d,posName:"top",sizeName:"height",clientOffset:n.top-i},o=a.snapSize,r=a.posName,l=a.sizeName,h=a.clientOffset;if(!o)return{dir:t,multiple:1,snapSize:o,snapOffset:0};var u=b[l],p=b[r],g=flat$2(v.map((function(t){return[t[r]-p,t[l],u-t[l]-t[r]+p]}))).filter((function(t){return t})).sort((function(t,e){return t-e})),f=g[0],m=g.map((function(t){return throttle(t/f,.1)*o})),y=1,S=throttle(u/f,.1);for(y=1;y<=10&&!m.every((function(t){return t*y%1==0}));++y);var w=(1-t)/2,x=dot(p-h,p-h+u,w,1-w);return{multiple:S*y,dir:t,snapSize:o,snapOffset:Math.round(x/o)}})),S=y.map((function(t){return t.multiple||1}));r.snapThresholdInfo.multiples=S,r.snapThresholdInfo.offset=y.map((function(t){return t.snapOffset})),y.forEach((function(t,e){t.snapSize}))}}else r.snapThresholdInfo=null}function getGridGuidelines(t,e,i,n,s,a,o){void 0===n&&(n=0),void 0===s&&(s=0);var r=t.props,l=t.state,h=r.snapGridWidth,c=void 0===h?0:h,u=r.snapGridHeight,d=void 0===u?0:u,p=[],g=a.left,f=a.top,b=[0,0];startGridGroupGuidelines(t,n,s,a);var v=l.snapThresholdInfo,m=c,y=d;if(v&&(c*=v.multiples[0]||1,d*=v.multiples[1]||1,b=v.offset),d){for(var S=function(t){p.push({type:"horizontal",pos:[g,throttle(b[1]*y+t-s+f,.1)],className:prefix("grid-guideline"),size:e,hide:!o,direction:"",grid:!0})},w=0;w<=2*i;w+=d)S(w);for(w=-d;w>=-i;w-=d)S(w)}if(c){for(S=function(t){p.push({type:"vertical",pos:[throttle(b[0]*m+t-n+g,.1),f],className:prefix("grid-guideline"),size:i,hide:!o,direction:"",grid:!0})},w=0;w<=2*e;w+=c)S(w);for(w=-c;w>=-e;w-=c)S(w)}return p}function checkBetweenRects(t,e,i,n){return"horizontal"===i?abs(t.right-e.left)<=n||abs(t.left-e.right)<=n||t.left<=e.right&&e.left<=t.right:"vertical"!==i||(abs(t.bottom-e.top)<=n||abs(t.top-e.bottom)<=n||t.top<=e.bottom&&e.top<=t.bottom)}function getElementGuidelines(t){var e=t.state,i=t.props.elementGuidelines,n=void 0===i?[]:i;if(!n.length)return e.elementRects=[],[];var s=(e.elementRects||[]).filter((function(t){return!t.refresh})),a=n.map((function(t){return isObject(t)&&"element"in t?__assign$1(__assign$1({},t),{element:getRefTarget(t.element,!0)}):{element:getRefTarget(t,!0)}})).filter((function(t){return t.element})),o=diff(s.map((function(t){return t.element})),a.map((function(t){return t.element}))),r=o.maintained,l=o.added,h=[];r.forEach((function(t){var e=__read(t,2),i=e[0],n=e[1];h[n]=s[i]})),getSnapElementRects(t,l.map((function(t){return a[t]}))).map((function(t,e){h[l[e]]=t})),e.elementRects=h;var c=getSnapDirections(t.props.elementSnapDirections),u=[];return h.forEach((function(t){var e=t.element,i=t.top,n=void 0===i?c.top:i,s=t.left,a=void 0===s?c.left:s,o=t.right,r=void 0===o?c.right:o,l=t.bottom,h=void 0===l?c.bottom:l,d=t.center,p=void 0===d?c.center:d,g=t.middle,f=void 0===g?c.middle:g,b=t.className,v=t.rect,m=splitSnapDirectionPoses({top:n,right:r,left:a,bottom:h,center:p,middle:f},v),y=m.horizontal,S=m.vertical,w=m.horizontalNames,x=m.verticalNames,C=v.top,D=v.left,T=v.right-D,k=v.bottom-C,$=[T,k];S.forEach((function(i,n){u.push({type:"vertical",element:e,pos:[throttle(i,.1),C],size:k,sizes:$,className:b,elementRect:t,elementDirection:SNAP_SKIP_NAMES_MAP[x[n]]||x[n],direction:""})})),y.forEach((function(i,n){u.push({type:"horizontal",element:e,pos:[D,throttle(i,.1)],size:T,sizes:$,className:b,elementRect:t,elementDirection:SNAP_SKIP_NAMES_MAP[w[n]]||w[n],direction:""})}))})),u}function getObjectGuidelines(t,e){return t?t.map((function(t){var i=isObject(t)?t:{pos:t},n=i.pos;return isNumber(n)?i:__assign$1(__assign$1({},i),{pos:convertUnitSize(n,e)})})):[]}function getDefaultGuidelines(t,e,i,n,s,a,o){void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o={left:0,top:0,right:0,bottom:0});var r=[],l=o.left,h=o.top,c=o.bottom,u=i+o.right-l,d=n+c-h;return getObjectGuidelines(t,d).forEach((function(t){r.push({type:"horizontal",pos:[l,throttle(t.pos-a+h,.1)],size:u,className:t.className,direction:""})})),getObjectGuidelines(e,u).forEach((function(t){r.push({type:"vertical",pos:[throttle(t.pos-s+l,.1),h],size:d,className:t.className,direction:""})})),r}function getSnapElementRects(t,e){if(!e.length)return[];var i=t.props.groupable,n=t.state,s=n.containerClientRect,a=n.rootMatrix,o=n.is3d,r=n.offsetDelta,l=o?4:3,h=__read(calculateContainerPos(a,s,l),2),c=h[0],u=h[1],d=i?0:r[0],p=i?0:r[1];return e.map((function(t){var e=t.element.getBoundingClientRect(),i=e.left-c-d,n=e.top-u-p,s=n+e.height,o=i+e.width,r=__read(calculateInversePosition(a,[i,n],l),2),h=r[0],g=r[1],f=__read(calculateInversePosition(a,[o,s],l),2),b=f[0],v=f[1];return __assign$1(__assign$1({},t),{rect:{left:h,right:b,top:g,bottom:v,center:(h+b)/2,middle:(g+v)/2}})}))}function checkSnapInfo(t){var e=t.state,i=e.container,n=t.props.snapContainer||i;if(e.snapContainer===n&&e.guidelines&&e.guidelines.length)return!1;var s=e.containerClientRect,a={left:0,top:0,bottom:0,right:0};if(i!==n){var o=getRefTarget(n,!0);if(o){var r=getClientRect(o),l=getDragDistByState(e,[r.left-s.left,r.top-s.top]),h=getDragDistByState(e,[r.right-s.right,r.bottom-s.bottom]);a.left=throttle(l[0],1e-5),a.top=throttle(l[1],1e-5),a.right=throttle(h[0],1e-5),a.bottom=throttle(h[1],1e-5)}}return e.snapContainer=n,e.snapOffset=a,e.guidelines=getTotalGuidelines(t),e.enableSnap=!0,!0}function getNextFixedPoses(t,e,i,n,s,a){var o=calculatePoses(t,e,i,a?4:3);return getAbsolutePoses(o,minus(s,getPosByDirection(o,n)))}function normalized(t){return t?t/abs(t):0}function getSizeOffsetInfo(t,e,i,n,s,a){var o=getCheckSnapDirections(i,a.fixedDirection,n),r=getCheckInnerBoundLineInfos(t,e,i,n),l=__spreadArray(__spreadArray([],__read(getSnapBoundInfo(t,e,o,n,s,a)),!1),__read(getInnerBoundInfo(t,r,a)),!1),h=getNearOffsetInfo(l,0),c=getNearOffsetInfo(l,1);return{width:{isBound:h.isBound,offset:h.offset[0]},height:{isBound:c.isBound,offset:c.offset[1]}}}function recheckSizeByTwoDirection(t,e,i,n,s,a,o,r,l){var h=getPosByDirection(e,o),c=checkMoveableSnapBounds(t,r,{vertical:[h[0]],horizontal:[h[1]]}),u=c.horizontal.offset,d=c.vertical.offset;if(throttle(d,FLOAT_POINT_NUM)||throttle(u,FLOAT_POINT_NUM)){var p=__read(getDragDist({datas:l,distX:-d,distY:-u}),2),g=p[0],f=p[1];return[Math.min(s||1/0,i+o[0]*g)-i,Math.min(a||1/0,n+o[1]*f)-n]}return[0,0]}function checkSizeDist(t,e,i,n,s,a,o,r){for(var l=getAbsolutePosesByState(t.state),h=t.props.keepRatio,c=0,u=0,d=0;d<2;++d){var p=getSizeOffsetInfo(t,e(c,u),s,h,o,r),g=p.width,f=p.height,b=g.isBound,v=f.isBound,m=g.offset,y=f.offset;if(1===d&&(b||(m=0),v||(y=0)),0===d&&o&&!b&&!v)return[0,0];if(h){var S=abs(m)*(i?1/i:1),w=abs(y)*(n?1/n:1);(b&&v?S<w:v||!b&&S<w)?m=i*y/n:y=n*m/i}c+=m,u+=y}if(!h&&s[0]&&s[1]){var x=checkMaxBounds(t,l,s,a,r),C=x.maxWidth,D=x.maxHeight,T=__read(recheckSizeByTwoDirection(t,e(c,u).map((function(t){return t.map((function(t){return throttle(t,FLOAT_POINT_NUM)}))})),i+c,n+u,C,D,s,o,r),2);c+=m=T[0],u+=y=T[1]}return[c,u]}function absDegree(t){return t<0&&(t=t%360+360),t%=360}function bumpDegree(t,e){e=absDegree(e);var i=Math.floor(t/360),n=360*i+360-e,s=360*i+e;return abs(t-n)<abs(t-s)?n:s}function getMinDegreeDistance(t,e){t=absDegree(t),e=absDegree(e);var i=absDegree(t-e);return Math.min(i,360-i)}function checkSnapRotate(t,e,i,n){var s,a=t.props,o=null!==(s=a[NAME_snapRotationThreshold])&&void 0!==s?s:5,r=a[NAME_snapRotationDegrees];if(hasGuidelines(t,"rotatable")){var l=e.pos1,h=e.pos2,c=e.pos3,u=e.pos4,d=e.origin,p=i*Math.PI/180,g=[l,h,c,u].map((function(t){return minus(t,d)})),f=g.map((function(t){return rotate(t,p)})),b=__spreadArray(__spreadArray([],__read(checkRotateBounds(t,g,f,d,i)),!1),__read(checkRotateInnerBounds(t,g,f,d,i)),!1);b.sort((function(t,e){return abs(t-i)-abs(e-i)}));var v=b.length>0;if(v)return{isSnap:v,dist:v?b[0]:i}}if((null==r?void 0:r.length)&&o){var m=r.slice().sort((function(t,e){return getMinDegreeDistance(t,n)-getMinDegreeDistance(e,n)}))[0];if(getMinDegreeDistance(m,n)<=o)return{isSnap:!0,dist:i+bumpDegree(n,m)-n}}return{isSnap:!1,dist:i}}function checkSnapResize(t,e,i,n,s,a,o){if(!hasGuidelines(t,"resizable"))return[0,0];var r=o.fixedDirection,l=o.nextAllMatrix,h=t.state,c=h.allMatrix,u=h.is3d;return checkSizeDist(t,(function(t,n){return getNextFixedPoses(l||c,e+t,i+n,r,s,u)}),e,i,n,s,a,o)}function checkSnapScale(t,e,i,n,s){if(!hasGuidelines(t,"scalable"))return[0,0];var a=s.startOffsetWidth,o=s.startOffsetHeight,r=s.fixedPosition,l=s.fixedDirection,h=s.is3d,c=checkSizeDist(t,(function(t,i){return getNextFixedPoses(scaleMatrix(s,plus(e,[t/a,i/o])),a,o,l,r,h)}),a,o,i,r,n,s);return[c[0]/a,c[1]/o]}function startCheckSnapDrag(t,e){e.absolutePoses=getAbsolutePosesByState(t.state)}function getSnapGuidelines(t){var e=[];return t.forEach((function(t){t.guidelineInfos.forEach((function(i){var n=i.guideline;find$1(e,(function(t){return t.guideline===n}))||(n.direction="",e.push({guideline:n,posInfo:t}))}))})),e.map((function(t){var e=t.guideline,i=t.posInfo;return __assign$1(__assign$1({},e),{direction:i.direction})}))}function addBoundGuidelines(t,e,i,n,s,a){var o=checkBoundPoses(getBounds(t,a),e,i),r=o.vertical,l=o.horizontal,h=getInitialBounds();r.forEach((function(t){t.isBound&&("start"===t.direction&&(h.left=!0),"end"===t.direction&&(h.right=!0),n.push({type:"bounds",pos:t.pos}))})),l.forEach((function(t){t.isBound&&("start"===t.direction&&(h.top=!0),"end"===t.direction&&(h.bottom=!0),s.push({type:"bounds",pos:t.pos}))}));var c=checkInnerBoundPoses(t),u=c.boundMap,d=c.vertical,p=c.horizontal;return d.forEach((function(t){findIndex(n,(function(e){var i=e.type,n=e.pos;return"bounds"===i&&n===t}))>=0||n.push({type:"bounds",pos:t})})),p.forEach((function(t){findIndex(s,(function(e){var i=e.type,n=e.pos;return"bounds"===i&&n===t}))>=0||s.push({type:"bounds",pos:t})})),{boundMap:h,innerBoundMap:u}}var directionCondition$1=getDirectionCondition("",["resizable","scalable"]),Snappable={name:"snappable",dragRelation:"strong",props:["snappable","snapContainer","snapDirections","elementSnapDirections","snapGap","snapGridWidth","snapGridHeight","isDisplaySnapDigit","isDisplayInnerSnapDigit","isDisplayGridGuidelines","snapDigit","snapThreshold","snapRenderThreshold","snapGridAll",NAME_snapRotationThreshold,NAME_snapRotationDegrees,NAME_snapHorizontalThreshold,NAME_snapVerticalThreshold,"horizontalGuidelines","verticalGuidelines","elementGuidelines","bounds","innerBounds","snapDistFormat","maxSnapElementGuidelineDistance","maxSnapElementGapDistance"],events:["snap","bound"],css:[":host {\n--bounds-color: #d66;\n}\n.guideline {\npointer-events: none;\nz-index: 2;\n}\n.guideline.bounds {\nbackground: #d66;\nbackground: var(--bounds-color);\n}\n.guideline-group {\nposition: absolute;\ntop: 0;\nleft: 0;\n}\n.guideline-group .size-value {\nposition: absolute;\ncolor: #f55;\nfont-size: 12px;\nfont-size: calc(12px * var(--zoom));\nfont-weight: bold;\n}\n.guideline-group.horizontal .size-value {\ntransform-origin: 50% 100%;\ntransform: translateX(-50%);\nleft: 50%;\nbottom: 5px;\nbottom: calc(2px + 3px * var(--zoom));\n}\n.guideline-group.vertical .size-value {\ntransform-origin: 0% 50%;\ntop: 50%;\ntransform: translateY(-50%);\nleft: 5px;\nleft: calc(2px + 3px * var(--zoom));\n}\n.guideline.gap {\nbackground: #f55;\n}\n.size-value.gap {\ncolor: #f55;\n}\n"],render:function(t,e){var i=t.state,n=i.top,s=i.left,a=i.pos1,o=i.pos2,r=i.pos3,l=i.pos4,h=i.snapRenderInfo,c=t.props.snapRenderThreshold,u=void 0===c?1:c;if(!h||!h.render||!hasGuidelines(t,""))return watchValue(t,"boundMap",getInitialBounds(),(function(t){return JSON.stringify(t)})),watchValue(t,"innerBoundMap",getInitialBounds(),(function(t){return JSON.stringify(t)})),[];i.guidelines=getTotalGuidelines(t);var d=Math.min(a[0],o[0],r[0],l[0]),p=Math.min(a[1],o[1],r[1],l[1]),g=h.externalPoses||[],f=getAbsolutePosesByState(t.state),b=[],v=[],m=[],y=[],S=[],w=getRect(f),x=w.width,C=w.height,D=w.top,T=w.left,k=w.bottom,$=w.right,O={left:T,right:$,top:D,bottom:k,center:(T+$)/2,middle:(D+k)/2},P=g.length>0,L=P?getRect(g):{};if(!h.request){if(h.direction&&S.push(getSnapInfosByDirection(t,f,h.direction,u,u)),h.snap){var G=getRect(f);h.center&&(G.middle=(G.top+G.bottom)/2,G.center=(G.left+G.right)/2),S.push(checkSnaps(t,G,u,u))}P&&(h.center&&(L.middle=(L.top+L.bottom)/2,L.center=(L.left+L.right)/2),S.push(checkSnaps(t,L,u,u))),S.forEach((function(t){var e=t.vertical.posInfos,i=t.horizontal.posInfos;b.push.apply(b,__spreadArray([],__read(e.filter((function(t){return t.guidelineInfos.some((function(t){return!t.guideline.hide}))})).map((function(t){return{type:"snap",pos:t.pos}}))),!1)),v.push.apply(v,__spreadArray([],__read(i.filter((function(t){return t.guidelineInfos.some((function(t){return!t.guideline.hide}))})).map((function(t){return{type:"snap",pos:t.pos}}))),!1)),m.push.apply(m,__spreadArray([],__read(getSnapGuidelines(e)),!1)),y.push.apply(y,__spreadArray([],__read(getSnapGuidelines(i)),!1))}))}var F=addBoundGuidelines(t,[T,$],[D,k],b,v),I=F.boundMap,E=F.innerBoundMap;P&&addBoundGuidelines(t,[L.left,L.right],[L.top,L.bottom],b,v,h.externalBounds);var A=__spreadArray(__spreadArray([],__read(m),!1),__read(y),!1),U=A.filter((function(t){return t.element&&!t.gapRects})),_=A.filter((function(t){return t.gapRects})).sort((function(t,e){return t.gap-e.gap}));triggerEvent(t,"onSnap",{guidelines:A.filter((function(t){return!t.element})),elements:U,gaps:_},!0);var j=watchValue(t,"boundMap",I,(function(t){return JSON.stringify(t)}),getInitialBounds()),M=watchValue(t,"innerBoundMap",E,(function(t){return JSON.stringify(t)}),getInitialBounds());return I!==j&&E!==M||triggerEvent(t,"onBound",{bounds:I,innerBounds:E},!0),__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],__read(renderDashedGuidelines(t,U,[d,p],O,e)),!1),__read(renderGapGuidelines(t,_,[d,p],O,e)),!1),__read(renderGuidelines(t,"horizontal",y,[s,n],O,e)),!1),__read(renderGuidelines(t,"vertical",m,[s,n],O,e)),!1),__read(renderSnapPoses(t,"horizontal",v,d,n,x,0,e)),!1),__read(renderSnapPoses(t,"vertical",b,p,s,C,1,e)),!1)},dragStart:function(t,e){t.state.snapRenderInfo={request:e.isRequest,snap:!0,center:!0},checkSnapInfo(t)},drag:function(t){var e=t.state;checkSnapInfo(t)||(e.guidelines=getTotalGuidelines(t)),e.snapRenderInfo&&(e.snapRenderInfo.render=!0)},pinchStart:function(t){this.unset(t)},dragEnd:function(t){this.unset(t)},dragControlCondition:function(t,e){return!(!directionCondition$1(t,e)&&!dragControlCondition(t,e))||(!e.isRequest&&e.inputEvent?hasClass(e.inputEvent.target,prefix("snap-control")):void 0)},dragControlStart:function(t){t.state.snapRenderInfo=null,checkSnapInfo(t)},dragControl:function(t){this.drag(t)},dragControlEnd:function(t){this.unset(t)},dragGroupStart:function(t,e){this.dragStart(t,e)},dragGroup:function(t){this.drag(t)},dragGroupEnd:function(t){this.unset(t)},dragGroupControlStart:function(t){t.state.snapRenderInfo=null,checkSnapInfo(t)},dragGroupControl:function(t){this.drag(t)},dragGroupControlEnd:function(t){this.unset(t)},unset:function(t){var e=t.state;e.enableSnap=!1,e.guidelines=[],e.snapRenderInfo=null,e.elementRects=[]}};function multiply2(t,e){return[t[0]*e[0],t[1]*e[1]]}function prefix(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return prefixNames.apply(void 0,__spreadArray([PREFIX],__read(t),!1))}function defaultSync(t){t()}function getTransformMatrix(t){return t&&"none"!==t?isObject(t)?t:parseMat(t):[1,0,0,1,0,0]}function getAbsoluteMatrix(t,e,i){return multiplies(e,createOriginMatrix(i,e),t,createOriginMatrix(i.map((function(t){return-t})),e))}function measureSVGSize(t,e,i){return"%"===e?getSVGViewBox(t.ownerSVGElement)[i?"width":"height"]/100:1}function getBeforeTransformOrigin(t){return getTransformOrigin(getComputedStyle$2(t,":before")).map((function(e,i){var n=splitUnit(e),s=n.value,a=n.unit;return s*measureSVGSize(t,a,0===i)}))}function getTransformOriginArray(t){return t?t.split(" "):["0","0"]}function getTransformOrigin(t){return getTransformOriginArray(t.transformOrigin)}function getElementTransform(t){var e=getCachedStyle(t)("transform");if(e&&"none"!==e)return e;if("transform"in t){var i=t.transform.baseVal;if(!i)return"";var n=i.length;if(!n)return"";for(var s=[],a=function(t){var e=i[t].matrix;s.push("matrix(".concat(["a","b","c","d","e","f"].map((function(t){return e[t]})).join(", "),")"))},o=0;o<n;++o)a(o);return s.join(" ")}return""}function getOffsetInfo(t,e,i,n,s){var a,o,r,l,h=getDocumentElement(t)||getDocumentBody(t),c=!1;if(!t||i)r=t;else{var u=null===(a=null==t?void 0:t.assignedSlot)||void 0===a?void 0:a.parentElement,d=t.parentElement;u?(c=!0,l=d,r=u):r=d}for(var p=!1,g=t===e||r===e,f="relative",b=1,v=parseFloat(null==s?void 0:s("zoom"))||1,m=null==s?void 0:s("position");r&&r!==h;){e===r&&(g=!0);var y=getCachedStyle(r),S=r.tagName.toLowerCase(),w=getElementTransform(r),x=y("willChange"),C=parseFloat(y("zoom"))||1;if(f=y("position"),n&&1!==C){b=C;break}if(!i&&n&&1!==v&&m&&"absolute"!==m||"svg"===S||"foreignobject"===S||"static"!==f||w&&"none"!==w||"transform"===x)break;var D=null===(o=null==t?void 0:t.assignedSlot)||void 0===o?void 0:o.parentNode,T=r.parentNode;D&&(c=!0,l=T);var k=T;if(k&&11===k.nodeType){p=!0,f=getCachedStyle(r=k.host)("position");break}r=k,f="relative"}return{offsetZoom:b,hasSlot:c,parentSlotElement:l,isCustomElement:p,isStatic:"static"===f,isEnd:g||!r||r===h,offsetParent:r||h}}function getOffsetPosInfo(t,e){var i,n,s,a=t.tagName.toLowerCase(),o=t.offsetLeft,r=t.offsetTop,l=getCachedStyle(t),h=isUndefined(o),c=!h;return c||"svg"===a&&!t.ownerSVGElement?s=(n=getTransformOriginArray(l("transformOrigin")).map((function(t){return parseFloat(t)}))).slice():(s=(n=IS_WEBKIT605?getBeforeTransformOrigin(t):getTransformOriginArray(l("transformOrigin")).map((function(t){return parseFloat(t)}))).slice(),c=!0,"svg"===a?(o=0,r=0):(o=(i=__read(getSVGGraphicsOffset(t,n,t===e&&"g"===e.tagName.toLowerCase()),4))[0],r=i[1],n[0]=i[2],n[1]=i[3])),{tagName:a,isSVG:h,hasOffset:c,offset:[o||0,r||0],origin:n,targetOrigin:s}}function getBodyOffset(t,e){var i=getCachedStyle(t),n=getCachedStyle(getDocumentBody(t)),s=n("position");if(!(e||s&&"static"!==s))return[0,0];var a=parseInt(n("marginLeft"),10),o=parseInt(n("marginTop"),10);return"absolute"===i("position")&&("auto"===i("top")&&"auto"===i("bottom")||(o=0),"auto"===i("left")&&"auto"===i("right")||(a=0)),[a,o]}function convert3DMatrixes(t){t.forEach((function(t){var e=t.matrix;e&&(t.matrix=convertDimension(e,3,4))}))}function getPositionFixedInfo(t){for(var e=t.parentElement,i=!1,n=getDocumentBody(t);e;){var s=getComputedStyle$2(e).transform;if(s&&"none"!==s){i=!0;break}if(e===n)break;e=e.parentElement}return{fixedContainer:e||n,hasTransform:i}}function makeMatrixCSS(t,e){return void 0===e&&(e=t.length>9),"".concat(e?"matrix3d":"matrix","(").concat(convertMatrixtoCSS(t,!e).join(","),")")}function getSVGViewBox(t){var e=t.clientWidth,i=t.clientHeight;if(!t)return{x:0,y:0,width:0,height:0,clientWidth:e,clientHeight:i};var n=t.viewBox,s=n&&n.baseVal||{x:0,y:0,width:0,height:0};return{x:s.x,y:s.y,width:s.width||e,height:s.height||i,clientWidth:e,clientHeight:i}}function getSVGMatrix(t,e){var i,n=getSVGViewBox(t),s=n.width,a=n.height,o=n.clientWidth,r=n.clientHeight,l=o/s,h=r/a,c=t.preserveAspectRatio.baseVal,u=c.align,d=c.meetOrSlice,p=[0,0],g=[l,h],f=[0,0];if(1!==u){var b=(u-2)%3,v=Math.floor((u-2)/3);p[0]=s*b/2,p[1]=a*v/2;var m=2===d?Math.max(h,l):Math.min(l,h);g[0]=m,g[1]=m,f[0]=(o-s)/2*b,f[1]=(r-a)/2*v}var y=createScaleMatrix(g,e);return i=__read(f,2),y[e*(e-1)]=i[0],y[e*(e-1)+1]=i[1],getAbsoluteMatrix(y,e,p)}function getSVGGraphicsOffset(t,e,i){var n=t.tagName.toLowerCase();if(!t.getBBox||!i&&"g"===n)return[0,0,0,0];var s="fill-box"===getCachedStyle(t)("transform-box"),a=t.getBBox(),o=getSVGViewBox(t.ownerSVGElement),r=a.x,l=a.y;"foreignobject"!==n||r||l||(r=parseFloat(t.getAttribute("x"))||0,l=parseFloat(t.getAttribute("y"))||0);var h=r-o.x,c=l-o.y;return[h,c,s?e[0]:e[0]-h,s?e[1]:e[1]-c]}function calculatePosition(t,e,i){return calculate(t,convertPositionMatrix(e,i),i)}function calculatePoses(t,e,i,n){return[[0,0],[e,0],[0,i],[e,i]].map((function(e){return calculatePosition(t,e,n)}))}function getRect(t){var e=t.map((function(t){return t[0]})),i=t.map((function(t){return t[1]})),n=Math.min.apply(Math,__spreadArray([],__read(e),!1)),s=Math.min.apply(Math,__spreadArray([],__read(i),!1)),a=Math.max.apply(Math,__spreadArray([],__read(e),!1)),o=Math.max.apply(Math,__spreadArray([],__read(i),!1));return{left:n,top:s,right:a,bottom:o,width:a-n,height:o-s}}function calculateRect(t,e,i,n){return getRect(calculatePoses(t,e,i,n))}function getSVGOffset(t,e,i,n,s){var a,o=t.target,r=t.origin,l=e.matrix,h=getSize(o),c=h.offsetWidth,u=h.offsetHeight,d=i.getBoundingClientRect(),p=[0,0];i===getDocumentBody(i)&&(p=getBodyOffset(o,!0));for(var g=o.getBoundingClientRect(),f=g.left-d.left+i.scrollLeft-(i.clientLeft||0)+p[0],b=g.top-d.top+i.scrollTop-(i.clientTop||0)+p[1],v=g.width,m=g.height,y=multiplies(n,s,l),S=calculateRect(y,c,u,n),w=S.left,x=S.top,C=S.width,D=S.height,T=calculatePosition(y,r,n),k=minus(T,[w,x]),$=[f+k[0]*v/C,b+k[1]*m/D],O=[0,0],P=0;++P<10;){var L=invert(s,n);a=__read(minus(calculatePosition(L,$,n),calculatePosition(L,T,n)),2),O[0]=a[0],O[1]=a[1];var G=calculateRect(multiplies(n,s,createOriginMatrix(O,n),l),c,u,n),F=G.left-f,I=G.top-b;if(abs(F)<2&&abs(I)<2)break;$[0]-=F,$[1]-=I}return O.map((function(t){return Math.round(t)}))}function calculateMoveableClientPositions(t,e,i){var n=16===t.length?4:3,s=e.map((function(e){return calculatePosition(t,e,n)})),a=i.left,o=i.top;return s.map((function(t){return[t[0]+a,t[1]+o]}))}function getDistSize(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function getDiagonalSize(t,e){return getDistSize([e[0]-t[0],e[1]-t[1]])}function getLineStyle(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n=getRad$1(t,e));var s=getDiagonalSize(t,e);return{transform:"translateY(-50%) translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(n,"rad) scaleY(").concat(i,")"),width:"".concat(s,"px")}}function getControlTransform(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=i.length,a=i.reduce((function(t,e){return t+e[0]}),0)/s,o=i.reduce((function(t,e){return t+e[1]}),0)/s;return{transform:"translateZ(0px) translate(".concat(a,"px, ").concat(o,"px) rotate(").concat(t,"rad) scale(").concat(e,")")}}function getProps(t,e){var i=t[e];return isObject(i)?__assign$1(__assign$1({},t),i):t}function getSize(t){var e=t&&!isUndefined(t.offsetWidth),i=0,n=0,s=0,a=0,o=0,r=0,l=0,h=0,c=0,u=0,d=0,p=0,g=1/0,f=1/0,b=1/0,v=1/0,m=0,y=0,S=!1;if(t)if(!e&&t.ownerSVGElement){var w=t.getBBox();S=!0,o=i=w.width,r=n=w.height,l=i,h=n,s=i,a=n}else{var x=getCachedStyle(t),C=t.style,D="border-box"===x("boxSizing"),T=parseFloat(x("borderLeftWidth"))||0,k=parseFloat(x("borderRightWidth"))||0,$=parseFloat(x("borderTopWidth"))||0,O=parseFloat(x("borderBottomWidth"))||0,P=(parseFloat(x("paddingLeft"))||0)+(parseFloat(x("paddingRight"))||0),L=(parseFloat(x("paddingTop"))||0)+(parseFloat(x("paddingBottom"))||0),G=P+(T+k),F=L+($+O),I=x("position"),E=0,A=0;if("clientLeft"in t){var U=null;if("absolute"===I)U=getOffsetInfo(t,getDocumentBody(t)).offsetParent;else U=t.parentElement;if(U){var _=getCachedStyle(U);E=parseFloat(_("width")),A=parseFloat(_("height"))}}c=Math.max(P,convertUnitSize(x("minWidth"),E)||0),u=Math.max(L,convertUnitSize(x("minHeight"),A)||0),g=convertUnitSize(x("maxWidth"),E),f=convertUnitSize(x("maxHeight"),A),isNaN(g)&&(g=1/0),isNaN(f)&&(f=1/0),m=convertUnitSize(C.width,0)||0,y=convertUnitSize(C.height,0)||0,o=parseFloat(x("width"))||0,r=parseFloat(x("height"))||0,i=l=abs(o-m)<1?between(c,m||o,g):o,n=h=abs(r-y)<1?between(u,y||r,f):r,s=l,a=h,D?(b=g,v=f,d=c,p=u,l=i-G,h=n-F):(b=g+G,v=f+F,d=c+G,p=u+F,i=l+G,n=h+F),s=l+P,a=h+L}return{svg:S,offsetWidth:i,offsetHeight:n,clientWidth:s,clientHeight:a,contentWidth:l,contentHeight:h,inlineCSSWidth:m,inlineCSSHeight:y,cssWidth:o,cssHeight:r,minWidth:c,minHeight:u,maxWidth:g,maxHeight:f,minOffsetWidth:d,minOffsetHeight:p,maxOffsetWidth:b,maxOffsetHeight:v}}function getRotationRad(t,e){return getRad$1(e>0?t[0]:t[1],e>0?t[1]:t[0])}function resetClientRect(){return{left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0}}function getExtendsRect(t,e){var i=t===getDocumentBody(t)||t===getDocumentElement(t),n={clientLeft:t.clientLeft,clientTop:t.clientTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,overflow:!1};return i&&(n.clientHeight=Math.max(e.height,n.clientHeight),n.scrollHeight=Math.max(e.height,n.scrollHeight)),n.overflow="visible"!==getCachedStyle(t)("overflow"),__assign$1(__assign$1({},e),n)}function getClientRectByPosition(t,e,i,n){var s=t.left,a=t.right,o=t.top,r=t.bottom,l=e.top,h=e.left,c={left:h+s,top:l+o,right:h+a,bottom:l+r,width:a-s,height:r-o};return i&&n?getExtendsRect(i,c):c}function getClientRect(t,e){var i=0,n=0,s=0,a=0;if(t){var o=t.getBoundingClientRect();i=o.left,n=o.top,s=o.width,a=o.height}var r={left:i,top:n,width:s,height:a,right:i+s,bottom:n+a};return t&&e?getExtendsRect(t,r):r}function getTotalOrigin(t){var e=t.props,i=e.groupable,n=e.svgOrigin,s=t.getState(),a=s.offsetWidth,o=s.offsetHeight,r=s.svg,l=s.transformOrigin;return!i&&r&&n?convertTransformOriginArray(n,a,o):l}function getTotalDirection(t,e,i,n){var s;if(t)s=t;else if(e)s=[0,0];else{s=getDirection(i.target,n)}return s}function getDirection(t,e){if(t){var i=t.getAttribute("data-rotation")||"",n=t.getAttribute("data-direction");if(e.deg=i,n){var s=[0,0];return n.indexOf("w")>-1&&(s[0]=-1),n.indexOf("e")>-1&&(s[0]=1),n.indexOf("n")>-1&&(s[1]=-1),n.indexOf("s")>-1&&(s[1]=1),s}}}function getAbsolutePoses(t,e){return[plus(e,t[0]),plus(e,t[1]),plus(e,t[2]),plus(e,t[3])]}function getAbsolutePosesByState(t){var e=t.left,i=t.top;return getAbsolutePoses([t.pos1,t.pos2,t.pos3,t.pos4],[e,i])}function unsetAbles(t,e){t[e?"controlAbles":"targetAbles"].forEach((function(e){e.unset&&e.unset(t)}))}function unsetGesto(t,e){var i=e?"controlGesto":"targetGesto",n=t[i];!1===(null==n?void 0:n.isIdle())&&unsetAbles(t,e),null==n||n.unset(),t[i]=null}function fillCSSObject(t,e){if(e){var i=getBeforeRenderableDatas(e);i.nextStyle=__assign$1(__assign$1({},i.nextStyle),t)}return{style:t,cssText:getKeys(t).map((function(e){return"".concat(decamelize(e,"-"),": ").concat(t[e],";")})).join("")}}function fillAfterTransform(t,e,i){var n=e.afterTransform||e.transform;return __assign$1(__assign$1({},fillCSSObject(__assign$1(__assign$1(__assign$1({},t.style),e.style),{transform:n}),i)),{afterTransform:n,transform:t.transform})}function fillParams(t,e,i,n){var s=e.datas;s.datas||(s.datas={});var a=__assign$1(__assign$1({},i),{target:t.state.target,clientX:e.clientX,clientY:e.clientY,inputEvent:e.inputEvent,currentTarget:t,moveable:t,datas:s.datas,isRequest:e.isRequest,isRequestChild:e.isRequestChild,isFirstDrag:!!e.isFirstDrag,isTrusted:!1!==e.isTrusted,stopAble:function(){s.isEventStart=!1},stopDrag:function(){var t;null===(t=e.stop)||void 0===t||t.call(e)}});return s.isStartEvent?n||(s.lastEvent=a):s.isStartEvent=!0,a}function fillEndParams(t,e,i){var n=e.datas,s="isDrag"in i?i.isDrag:e.isDrag;return n.datas||(n.datas={}),__assign$1(__assign$1({isDrag:s},i),{moveable:t,target:t.state.target,clientX:e.clientX,clientY:e.clientY,inputEvent:e.inputEvent,currentTarget:t,lastEvent:n.lastEvent,isDouble:e.isDouble,datas:n.datas,isFirstDrag:!!e.isFirstDrag})}function catchEvent(t,e,i){t._emitter.on(e,i)}function triggerEvent(t,e,i,n,s){return t.triggerEvent(e,i,n,s)}function getComputedStyle$2(t,e){return getWindow(t).getComputedStyle(t,e)}function filterAbles(t,e,i){var n={},s={};return t.filter((function(t){var a=t.name;if(n[a]||!e.some((function(e){return t[e]})))return!1;if(!i&&t.ableGroup){if(s[t.ableGroup])return!1;s[t.ableGroup]=!0}return n[a]=!0,!0}))}function equals(t,e){return t===e||null==t&&null==e}function selectValue(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=t.length-1,n=0;n<i;++n){var s=t[n];if(!isUndefined(s))return s}return t[i]}function groupBy(t,e){var i=[],n=[];return t.forEach((function(s,a){var o=e(s,a,t),r=n.indexOf(o),l=i[r]||[];-1===r&&(n.push(o),i.push(l)),l.push(s)})),i}function groupByMap(t,e){var i=[],n={};return t.forEach((function(s,a){var o=e(s,a,t),r=n[o];r||(r=[],n[o]=r,i.push(r)),r.push(s)})),i}function flat(t){return t.reduce((function(t,e){return t.concat(e)}),[])}function maxOffset(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.sort((function(t,e){return abs(e)-abs(t)})),t[0]}function calculateInversePosition(t,e,i){return calculate(invert(t,i),convertPositionMatrix(e,i),i)}function convertDragDist(t,e){var i,n=t.is3d?4:3;return i=__read(calculateInversePosition(t.rootMatrix,[e.distX,e.distY],n),2),e.distX=i[0],e.distY=i[1],e}function calculatePadding(t,e,i,n){if(!i[0]&&!i[1])return e;var s=calculatePosition(t,[normalized(i[0]||1),0],n),a=calculatePosition(t,[0,normalized(i[1]||1)],n);return plus(e,calculatePosition(t,[i[0]/getDistSize(s),i[1]/getDistSize(a)],n))}function convertCSSSize(t,e,i){return i?"".concat(t/e*100,"%"):"".concat(t,"px")}function getTinyDist(t){return abs(t)<=TINY_NUM?0:t}function getDirectionViewClassName(t){return function(e){if(!e.isDragging(t))return"";var i=getGestoData(e,t).deg;return i?prefix("view-control-rotation".concat(i)):""}}function getDirectionCondition(t,e){return void 0===e&&(e=[t]),function(i,n){if(n.isRequest)return!!e.some((function(t){return n.requestAble===t}))&&n.parentDirection;var s=n.inputEvent.target;return hasClass(s,prefix("direction"))&&(!t||hasClass(s,prefix(t)))}}function convertTransformInfo(t,e,i){var n,s=parse(t,{"x%":function(t){return t/100*e.offsetWidth},"y%":function(t){return t/100*e.offsetHeight}}),a=t.slice(0,i<0?void 0:i),o=t.slice(0,i<0?void 0:i+1),r=t[i]||"",l=i<0?[]:t.slice(i),h=i<0?[]:t.slice(i+1),c=s.slice(0,i<0?void 0:i),u=s.slice(0,i<0?void 0:i+1),d=null!==(n=s[i])&&void 0!==n?n:parse([""])[0],p=i<0?[]:s.slice(i),g=i<0?[]:s.slice(i+1),f=d?[d]:[],b=toMat(c),v=toMat(u),m=toMat(p),y=toMat(g),S=multiply(b,m,4);return{transforms:t,beforeFunctionMatrix:b,beforeFunctionMatrix2:v,targetFunctionMatrix:toMat(f),afterFunctionMatrix:m,afterFunctionMatrix2:y,allFunctionMatrix:S,beforeFunctions:c,beforeFunctions2:u,targetFunction:f[0],afterFunctions:p,afterFunctions2:g,beforeFunctionTexts:a,beforeFunctionTexts2:o,targetFunctionText:r,afterFunctionTexts:l,afterFunctionTexts2:h}}function isArrayFormat(t){return!(!t||!isObject(t))&&(!isNode(t)&&(isArray(t)||"length"in t))}function getRefTarget(t,e){return t?isNode(t)?t:isString(t)?e?document.querySelector(t):t:isFunction(t)?t():isWindow(t)?t:"current"in t?t.current:t:null}function getRefTargets(t,e){return t?(isArrayFormat(t)?[].slice.call(t):[t]).reduce((function(t,i){return isString(i)&&e?__spreadArray(__spreadArray([],__read(t),!1),__read([].slice.call(document.querySelectorAll(i))),!1):(isArray(i)?t.push(getRefTargets(i,e)):t.push(getRefTarget(i,e)),t)}),[]):[]}function getAbsoluteRotation(t,e,i){var n=getRad$1(t,e)/Math.PI*180;return n=(n=i>=0?n:180-n)>=0?n:360+n}function getDragDistByState(t,e){var i=t.rootMatrix,n=t.is3d,s=invert(i,n?4:3);return n||(s=convertDimension(s,3,4)),s[12]=0,s[13]=0,s[14]=0,calculateMatrixDist(s,e)}function getSizeDistByDist(t,e,i,n,s){var a=__read(t,2),o=a[0],r=a[1],l=0,h=0;if(s&&o&&r){var c=getRad$1([0,0],e),u=getRad$1([0,0],n),d=getDistSize(e),p=Math.cos(c-u)*d;if(n[0])if(n[1]){var g=n[0]*o,f=n[1]*r,b=Math.atan2(g+e[0],f+e[1]),v=Math.atan2(g,f);b<0&&(b+=2*Math.PI),v<0&&(v+=2*Math.PI);var m=0;(m=abs(b-v)<Math.PI/2||abs(b-v)>Math.PI/2*3?b-v:b-(v+=Math.PI))>2*Math.PI?m-=2*Math.PI:m>Math.PI?m=2*Math.PI-m:m<-Math.PI&&(m=-2*Math.PI-m);var y=getDistSize([g+e[0],f+e[1]])*Math.cos(m);l=y*Math.sin(v)-g,h=y*Math.cos(v)-f,n[0]<0&&(l*=-1),n[1]<0&&(h*=-1)}else h=(l=p)/i;else l=(h=p)*i}else l=n[0]*e[0],h=n[1]*e[1];return[l,h]}function getOffsetSizeDist(t,e,i,n){var s,a=i.ratio,o=i.startOffsetWidth,r=i.startOffsetHeight,l=0,h=0,c=n.distX,u=n.distY,d=n.pinchScale,p=n.parentDistance,g=n.parentDist,f=n.parentScale,b=i.fixedDirection,v=[0,1].map((function(e){return abs(t[e]-b[e])})),m=[0,1].map((function(t){var e=v[t];return 0!==e&&(e=2/e),e}));if(g)l=g[0],h=g[1],e&&(l?h||(h=l/a):l=h*a);else if(isNumber(d))l=(d-1)*o,h=(d-1)*r;else if(f)l=(f[0]-1)*o,h=(f[1]-1)*r;else if(p){var y=o*v[0],S=r*v[1],w=getDistSize([y,S]);l=p/w*y*m[0],h=p/w*S*m[1]}else{var x=getDragDist({datas:i,distX:c,distY:u});l=(s=__read(getSizeDistByDist([o,r],x=m.map((function(t,e){return x[e]*t})),a,t,e),2))[0],h=s[1]}return{distWidth:l,distHeight:h}}function convertTransformUnit(t,e){if(e){if("left"===t)return{x:"0%",y:"50%"};if("top"===t)return{x:"50%",y:"50%"};if("center"===t)return{x:"50%",y:"50%"};if("right"===t)return{x:"100%",y:"50%"};if("bottom"===t)return{x:"50%",y:"100%"};var i=__read(t.split(" "),2),n=i[0],s=i[1],a=convertTransformUnit(n||""),o=convertTransformUnit(s||""),r=__assign$1(__assign$1({},a),o),l={x:"50%",y:"50%"};return r.x&&(l.x=r.x),r.y&&(l.y=r.y),r.value&&(r.x&&!r.y&&(l.y=r.value),!r.x&&r.y&&(l.x=r.value)),l}return"left"===t?{x:"0%"}:"right"===t?{x:"100%"}:"top"===t?{y:"0%"}:"bottom"===t?{y:"100%"}:t?"center"===t?{value:"50%"}:{value:t}:{}}function convertTransformOriginArray(t,e,i){var n=convertTransformUnit(t,!0),s=n.x,a=n.y;return[convertUnitSize(s,e)||0,convertUnitSize(a,i)||0]}function rotatePosesInfo(t,e,i){var n=t.map((function(t){return minus(t,e)})),s=n.map((function(t){return rotate(t,i)}));return{prev:n,next:s,result:s.map((function(t){return plus(t,e)}))}}function isDeepArrayEquals(t,e){return t.length===e.length&&t.every((function(t,i){var n=e[i],s=isArray(t),a=isArray(n);return s&&a?isDeepArrayEquals(t,n):!s&&!a&&t===n}))}function watchValue(t,e,i,n,s){var a=t._store,o=a[e];if(!(e in a)){if(null==s)return a[e]=i,i;a[e]=s,o=s}return o===i||n(o)===n(i)?o:(a[e]=i,i)}function sign(t){return t>=0?1:-1}function abs(t){return Math.abs(t)}function countEach(t,e){return counter(t).map((function(t){return e(t)}))}function getPaddingBox(t){return isNumber(t)?{top:t,left:t,right:t,bottom:t}:{left:t.left||0,top:t.top||0,right:t.right||0,bottom:t.bottom||0}}var Pinchable=makeAble("pinchable",{props:["pinchable"],events:["pinchStart","pinch","pinchEnd","pinchGroupStart","pinchGroup","pinchGroupEnd"],dragStart:function(){return!0},pinchStart:function(t,e){var i=e.datas,n=e.targets,s=e.angle,a=e.originalDatas,o=t.props,r=o.pinchable,l=o.ables;if(!r)return!1;var h="onPinch".concat(n?"Group":"","Start"),c="drag".concat(n?"Group":"","ControlStart"),u=(!0===r?t.controlAbles:l.filter((function(t){return r.indexOf(t.name)>-1}))).filter((function(t){return t.canPinch&&t[c]})),d=fillParams(t,e,{});n&&(d.targets=n);var p=triggerEvent(t,h,d);i.isPinch=!1!==p,i.ables=u;var g=i.isPinch;return!!g&&(u.forEach((function(i){if(a[i.name]=a[i.name]||{},i[c]){var n=__assign$1(__assign$1({},e),{datas:a[i.name],parentRotate:s,isPinch:!0});i[c](t,n)}})),t.state.snapRenderInfo={request:e.isRequest,direction:[0,0]},g)},pinch:function(t,e){var i=e.datas,n=e.scale,s=e.distance,a=e.originalDatas,o=e.inputEvent,r=e.targets,l=e.angle;if(i.isPinch){var h=s*(1-1/n),c=fillParams(t,e,{});r&&(c.targets=r);var u="onPinch".concat(r?"Group":"");triggerEvent(t,u,c);var d=i.ables,p="drag".concat(r?"Group":"","Control");return d.forEach((function(i){i[p]&&i[p](t,__assign$1(__assign$1({},e),{datas:a[i.name],inputEvent:o,resolveMatrix:!0,pinchScale:n,parentDistance:h,parentRotate:l,isPinch:!0}))})),c}},pinchEnd:function(t,e){var i=e.datas,n=e.isPinch,s=e.inputEvent,a=e.targets,o=e.originalDatas;if(i.isPinch){var r="onPinch".concat(a?"Group":"","End"),l=fillEndParams(t,e,{isDrag:n});a&&(l.targets=a),triggerEvent(t,r,l);var h=i.ables,c="drag".concat(a?"Group":"","ControlEnd");return h.forEach((function(i){i[c]&&i[c](t,__assign$1(__assign$1({},e),{isDrag:n,datas:o[i.name],inputEvent:s,isPinch:!0}))})),n}},pinchGroupStart:function(t,e){return this.pinchStart(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},pinchGroup:function(t,e){return this.pinch(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},pinchGroupEnd:function(t,e){return this.pinchEnd(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))}}),directionCondition=getDirectionCondition("scalable"),Scalable={name:"scalable",ableGroup:"size",canPinch:!0,props:["scalable","throttleScale","renderDirections","keepRatio","edge","displayAroundControls"],events:["scaleStart","beforeScale","scale","scaleEnd","scaleGroupStart","beforeScaleGroup","scaleGroup","scaleGroupEnd"],render:getRenderDirections("scalable"),dragControlCondition:directionCondition,viewClassName:getDirectionViewClassName("scalable"),dragControlStart:function(t,e){var i=e.datas,n=e.isPinch,s=e.inputEvent,a=getTotalDirection(e.parentDirection,n,s,i),o=t.state,r=o.width,l=o.height,h=o.targetTransform,c=o.target,u=o.pos1,d=o.pos2,p=o.pos4;if(!a||!c)return!1;n||setDragStart(t,e),i.datas={},i.transform=h,i.prevDist=[1,1],i.direction=a,i.startOffsetWidth=r,i.startOffsetHeight=l,i.startValue=[1,1];var g=!a[0]&&!a[1]||a[0]||!a[1];function f(t){i.ratio=t&&isFinite(t)?t:0}function b(t){var e=getFixedDirectionInfo(i.startPositions,t);i.fixedDirection=e.fixedDirection,i.fixedPosition=e.fixedPosition,i.fixedOffset=e.fixedOffset}setDefaultTransformIndex(t,e,"scale"),i.isWidth=g,i.startPositions=getAbsolutePosesByState(t.state),i.setFixedDirection=b,f(getDist$2(u,d)/getDist$2(d,p)),b([-a[0],-a[1]]);var v=function(t){i.minScaleSize=t},m=function(t){i.maxScaleSize=t};v([-1/0,-1/0]),m([1/0,1/0]);var y=fillParams(t,e,__assign$1(__assign$1({direction:a,set:function(t){i.startValue=t},setRatio:f,setFixedDirection:b,setMinScaleSize:v,setMaxScaleSize:m},fillTransformStartEvent(t,e)),{dragStart:Draggable.dragStart(t,(new CustomGesto).dragStart([0,0],e))})),S=triggerEvent(t,"onScaleStart",y);return i.startFixedDirection=i.fixedDirection,!1!==S&&(i.isScale=!0,t.state.snapRenderInfo={request:e.isRequest,direction:a}),!!i.isScale&&y},dragControl:function(t,e){resolveTransformEvent(t,e,"scale");var i=e.datas,n=e.parentKeepRatio,s=e.parentFlag,a=e.isPinch,o=e.dragClient,r=e.isRequest,l=e.useSnap,h=e.resolveMatrix,c=i.prevDist,u=i.direction,d=i.startOffsetWidth,p=i.startOffsetHeight,g=i.isScale,f=i.startValue,b=i.isWidth,v=i.ratio;if(!g)return!1;var m=t.props,y=m.throttleScale,S=m.parentMoveable,w=u;u[0]||u[1]||(w=[1,1]);var x=v&&(null!=n?n:m.keepRatio)||!1,C=t.state,D=[f[0],f[1]];function T(){var t=getOffsetSizeDist(w,x,i,e),n=t.distWidth,s=t.distHeight,a=d?(d+n)/d:1,o=p?(p+s)/p:1;f[0]||(D[0]=n/d),f[1]||(D[1]=s/p);var r=(w[0]||x?a:1)*D[0],l=(w[1]||x?o:1)*D[1];return 0===r&&(r=sign(c[0])*MIN_SCALE),0===l&&(l=sign(c[1])*MIN_SCALE),[r,l]}var k=T();if(!a&&t.props.groupable){var $=(C.snapRenderInfo||{}).direction;isArray($)&&($[0]||$[1])&&(C.snapRenderInfo={direction:u,request:e.isRequest})}triggerEvent(t,"onBeforeScale",fillParams(t,e,{scale:k,setFixedDirection:function(t){return i.setFixedDirection(t),k=T()},startFixedDirection:i.startFixedDirection,setScale:function(t){k=t}},!0));var O=[k[0]/D[0],k[1]/D[1]],P=o,L=[0,0],G=sign(O[0]*O[1]),F=!o&&!s&&a;if(F||h?P=getTranslateFixedPosition(t,i.targetAllTransform,[0,0],[0,0],i):o||(P=i.fixedPosition),a||(L=checkSnapScale(t,O,u,!l&&r,i)),x){w[0]&&w[1]&&L[0]&&L[1]&&(Math.abs(L[0]*d)>Math.abs(L[1]*p)?L[1]=0:L[0]=0);var I=!L[0]&&!L[1];if(I&&(b?O[0]=throttle(O[0]*D[0],y)/D[0]:O[1]=throttle(O[1]*D[1],y)/D[1]),w[0]&&!w[1]||L[0]&&!L[1]||I&&b){O[0]+=L[0];var E=d*O[0]*D[0]/v;O[1]=sign(G*O[0])*abs(E/p/D[1])}else if(!w[0]&&w[1]||!L[0]&&L[1]||I&&!b){O[1]+=L[1];var A=p*O[1]*D[1]*v;O[0]=sign(G*O[1])*abs(A/d/D[0])}}else O[0]+=L[0],O[1]+=L[1],L[0]||(O[0]=throttle(O[0]*D[0],y)/D[0]),L[1]||(O[1]=throttle(O[1]*D[1],y)/D[1]);0===O[0]&&(O[0]=sign(c[0])*MIN_SCALE),0===O[1]&&(O[1]=sign(c[1])*MIN_SCALE),k=multiply2(O,[D[0],D[1]]);var U=[d,p],_=[d*k[0],p*k[1]];_=calculateBoundSize(_,i.minScaleSize,i.maxScaleSize,!!x&&v),k=countEach(2,(function(t){return U[t]?_[t]/U[t]:_[t]})),O=countEach(2,(function(t){return k[t]/D[t]}));var j=countEach(2,(function(t){return c[t]?O[t]/c[t]:O[t]})),M="scale(".concat(O.join(", "),")"),N="scale(".concat(k.join(", "),")"),B=convertTransformFormat(i,N,M),R=!f[0]||!f[1],H=getScaleDist(t,R?N:M,i.fixedDirection,P,i.fixedOffset,i,R),z=F?H:minus(H,i.prevInverseDist||[0,0]);if(i.prevDist=O,i.prevInverseDist=H,k[0]===c[0]&&k[1]===c[1]&&z.every((function(t){return!t}))&&!S&&!F)return!1;var V=fillParams(t,e,__assign$1({offsetWidth:d,offsetHeight:p,direction:u,scale:k,dist:O,delta:j,isPinch:!!a},fillTransformEvent(t,B,z,a,e)));return triggerEvent(t,"onScale",V),V},dragControlEnd:function(t,e){var i=e.datas;if(!i.isScale)return!1;i.isScale=!1;var n=fillEndParams(t,e,{});return triggerEvent(t,"onScaleEnd",n),n},dragGroupControlCondition:directionCondition,dragGroupControlStart:function(t,e){var i=e.datas,n=this.dragControlStart(t,e);if(!n)return!1;var s=fillChildEvents(t,"resizable",e);i.moveableScale=t.scale;var a=triggerChildAbles(t,this,"dragControlStart",e,(function(e,n){return startChildDist(t,e,i,n)})),o=function(e){n.setFixedDirection(e),a.forEach((function(n,a){n.setFixedDirection(e),startChildDist(t,n.moveable,i,s[a])}))};i.setFixedDirection=o;var r=__assign$1(__assign$1({},n),{targets:t.props.targets,events:a,setFixedDirection:o}),l=triggerEvent(t,"onScaleGroupStart",r);return i.isScale=!1!==l,!!i.isScale&&r},dragGroupControl:function(t,e){var i=e.datas;if(i.isScale){catchEvent(t,"onBeforeScale",(function(i){triggerEvent(t,"onBeforeScaleGroup",fillParams(t,e,__assign$1(__assign$1({},i),{targets:t.props.targets}),!0))}));var n=this.dragControl(t,e);if(n){var s=n.dist,a=i.moveableScale;t.scale=[s[0]*a[0],s[1]*a[1]];var o=t.props.keepRatio,r=i.fixedPosition,l=triggerChildAbles(t,this,"dragControl",e,(function(e,i){var n=__read(calculate(createRotateMatrix(t.rotation/180*Math.PI,3),[i.datas.originalX*s[0],i.datas.originalY*s[1],1],3),2),a=n[0],l=n[1];return __assign$1(__assign$1({},i),{parentDist:null,parentScale:s,parentKeepRatio:o,dragClient:plus(r,[a,l])})})),h=__assign$1({targets:t.props.targets,events:l},n);return triggerEvent(t,"onScaleGroup",h),h}}},dragGroupControlEnd:function(t,e){var i=e.isDrag;if(e.datas.isScale){this.dragControlEnd(t,e);var n=triggerChildAbles(t,this,"dragControlEnd",e);return triggerEvent(t,"onScaleGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(){var t={},e=0,i=0,n=!1;return{isControl:!0,requestStart:function(e){return n=e.useSnap,{datas:t,parentDirection:e.direction||[1,1],useSnap:n}},request:function(s){return e+=s.deltaWidth,i+=s.deltaHeight,{datas:t,parentDist:[e,i],parentKeepRatio:s.keepRatio,useSnap:n}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:n}}}}};function getMiddleLinePos(t,e){return t.map((function(t,i){return dot(t,e[i],1,2)}))}function getTriangleRad(t,e,i){var n=getRad$1(t,e),s=getRad$1(t,i)-n;return s>=0?s:s+2*Math.PI}function isValidPos(t,e){var i=getTriangleRad(t[0],t[1],t[2]),n=getTriangleRad(e[0],e[1],e[2]),s=Math.PI;return!(i>=s&&n<=s||i<=s&&n>=s)}var Warpable={name:"warpable",ableGroup:"size",props:["warpable","renderDirections","edge","displayAroundControls"],events:["warpStart","warp","warpEnd"],viewClassName:getDirectionViewClassName("warpable"),render:function(t,e){var i=t.props,n=i.resizable,s=i.scalable,a=i.warpable,o=i.zoom;if(n||s||!a)return[];var r=t.state,l=r.pos1,h=r.pos2,c=r.pos3,u=r.pos4,d=getMiddleLinePos(l,h),p=getMiddleLinePos(h,l),g=getMiddleLinePos(l,c),f=getMiddleLinePos(c,l),b=getMiddleLinePos(c,u),v=getMiddleLinePos(u,c),m=getMiddleLinePos(h,u),y=getMiddleLinePos(u,h);return __spreadArray([e.createElement("div",{className:prefix("line"),key:"middeLine1",style:getLineStyle(d,b,o)}),e.createElement("div",{className:prefix("line"),key:"middeLine2",style:getLineStyle(p,v,o)}),e.createElement("div",{className:prefix("line"),key:"middeLine3",style:getLineStyle(g,m,o)}),e.createElement("div",{className:prefix("line"),key:"middeLine4",style:getLineStyle(f,y,o)})],__read(renderAllDirections(t,"warpable",e)),!1)},dragControlCondition:function(t,e){if(e.isRequest)return!1;var i=e.inputEvent.target;return hasClass(i,prefix("direction"))&&hasClass(i,prefix("warpable"))},dragControlStart:function(t,e){var i=e.datas,n=e.inputEvent,s=t.props.target,a=getDirection(n.target,i);if(!a||!s)return!1;var o=t.state,r=o.transformOrigin,l=o.is3d,h=o.targetTransform,c=o.targetMatrix,u=o.width,d=o.height,p=o.left,g=o.top;return i.datas={},i.targetTransform=h,i.warpTargetMatrix=l?c:convertDimension(c,3,4),i.targetInverseMatrix=ignoreDimension(invert(i.warpTargetMatrix,4),3,4),i.direction=a,i.left=p,i.top=g,i.poses=[[0,0],[u,0],[0,d],[u,d]].map((function(t){return minus(t,r)})),i.nextPoses=i.poses.map((function(t){var e=__read(t,2),n=e[0],s=e[1];return calculate(i.warpTargetMatrix,[n,s,0,1],4)})),i.startValue=createIdentityMatrix(4),i.prevMatrix=createIdentityMatrix(4),i.absolutePoses=getAbsolutePosesByState(o),i.posIndexes=getPosIndexesByDirection(a),setDragStart(t,e),setDefaultTransformIndex(t,e,"matrix3d"),o.snapRenderInfo={request:e.isRequest,direction:a},!1!==triggerEvent(t,"onWarpStart",fillParams(t,e,__assign$1({set:function(t){i.startValue=t}},fillTransformStartEvent(t,e))))&&(i.isWarp=!0),i.isWarp},dragControl:function(t,e){var i=e.datas,n=e.isRequest,s=e.distX,a=e.distY,o=i.targetInverseMatrix,r=i.prevMatrix,l=i.isWarp,h=i.startValue,c=i.poses,u=i.posIndexes,d=i.absolutePoses;if(!l)return!1;if(resolveTransformEvent(t,e,"matrix3d"),hasGuidelines(t,"warpable")){var p=u.map((function(t){return d[t]}));p.length>1&&p.push([(p[0][0]+p[1][0])/2,(p[0][1]+p[1][1])/2]);var g=checkMoveableSnapBounds(t,n,{horizontal:p.map((function(t){return t[1]+a})),vertical:p.map((function(t){return t[0]+s}))}),f=g.horizontal,b=g.vertical;a-=f.offset,s-=b.offset}var v=getDragDist({datas:i,distX:s,distY:a},!0),m=i.nextPoses.slice();if(u.forEach((function(t){m[t]=plus(m[t],v)})),!NEARBY_POS.every((function(t){return isValidPos(t.map((function(t){return c[t]})),t.map((function(t){return m[t]})))})))return!1;var y=createWarpMatrix(c[0],c[2],c[1],c[3],m[0],m[2],m[1],m[3]);if(!y.length)return!1;var S=getTransfromMatrix(i,multiply(o,y,4),!0),w=multiply(invert(r,4),S,4);i.prevMatrix=S;var x=multiply(h,S,4),C=convertTransformFormat(i,"matrix3d(".concat(x.join(", "),")"),"matrix3d(".concat(S.join(", "),")"));return fillOriginalTransform(e,C),triggerEvent(t,"onWarp",fillParams(t,e,__assign$1({delta:w,matrix:x,dist:S,multiply:multiply,transform:C},fillCSSObject({transform:C},e)))),!0},dragControlEnd:function(t,e){var i=e.datas,n=e.isDrag;return!!i.isWarp&&(i.isWarp=!1,triggerEvent(t,"onWarpEnd",fillEndParams(t,e,{})),n)}},AREA_PIECES=prefix("area-pieces"),AREA_PIECE=prefix("area-piece"),AVOID=prefix("avoid"),VIEW_DRAGGING=prefix("view-dragging");function restoreStyle(t){var e=t.areaElement;if(e){var i=t.state,n=i.width,s=i.height;removeClass(e,AVOID),e.style.cssText+="left: 0px; top: 0px; width: ".concat(n,"px; height: ").concat(s,"px")}}function renderPieces(t){return t.createElement("div",{key:"area_pieces",className:AREA_PIECES},t.createElement("div",{className:AREA_PIECE}),t.createElement("div",{className:AREA_PIECE}),t.createElement("div",{className:AREA_PIECE}),t.createElement("div",{className:AREA_PIECE}))}var DragArea={name:"dragArea",props:["dragArea","passDragArea"],events:["click","clickGroup"],render:function(t,e){var i=t.props,n=i.target,s=i.dragArea,a=i.groupable,o=i.passDragArea,r=t.getState(),l=r.width,h=r.height,c=r.renderPoses,u=o?prefix("area","pass"):prefix("area");if(a)return[e.createElement("div",{key:"area",ref:ref(t,"areaElement"),className:u}),renderPieces(e)];if(!n||!s)return[];var d=createWarpMatrix([0,0],[l,0],[0,h],[l,h],c[0],c[1],c[2],c[3]),p=d.length?makeMatrixCSS(d,!0):"none";return[e.createElement("div",{key:"area",ref:ref(t,"areaElement"),className:u,style:{top:"0px",left:"0px",width:"".concat(l,"px"),height:"".concat(h,"px"),transformOrigin:"0 0",transform:p}}),renderPieces(e)]},dragStart:function(t,e){var i=e.datas,n=e.clientX,s=e.clientY;if(!e.inputEvent)return!1;i.isDragArea=!1;var a=t.areaElement,o=t.state,r=o.moveableClientRect,l=o.renderPoses,h=o.rootMatrix,c=o.is3d,u=r.left,d=r.top,p=getRect(l),g=p.left,f=p.top,b=p.width,v=p.height,m=__read(calculateInversePosition(h,[n-u,s-d],c?4:3),2),y=m[0],S=m[1],w=[{left:g,top:f,width:b,height:(S-=f)-10},{left:g,top:f,width:(y-=g)-10,height:v},{left:g,top:f+S+10,width:b,height:v-S-10},{left:g+y+10,top:f,width:b-y-10,height:v}],x=[].slice.call(a.nextElementSibling.children);w.forEach((function(t,e){x[e].style.cssText="left: ".concat(t.left,"px;top: ").concat(t.top,"px; width: ").concat(t.width,"px; height: ").concat(t.height,"px;")})),addClass(a,AVOID),o.disableNativeEvent=!0},drag:function(t,e){var i=e.datas,n=e.inputEvent;if(this.enableNativeEvent(t),!n)return!1;i.isDragArea||(i.isDragArea=!0,restoreStyle(t))},dragEnd:function(t,e){this.enableNativeEvent(t);var i=e.inputEvent,n=e.datas;if(!i)return!1;n.isDragArea||restoreStyle(t)},dragGroupStart:function(t,e){return this.dragStart(t,e)},dragGroup:function(t,e){return this.drag(t,e)},dragGroupEnd:function(t,e){return this.dragEnd(t,e)},unset:function(t){restoreStyle(t),t.state.disableNativeEvent=!1},enableNativeEvent:function(t){var e=t.state;e.disableNativeEvent&&requestAnimationFrame$2((function(){e.disableNativeEvent=!1}))}},Origin=makeAble("origin",{props:["origin","svgOrigin"],render:function(t,e){var i,n=t.props,s=n.zoom,a=n.svgOrigin,o=n.groupable,r=t.getState(),l=r.beforeOrigin,h=r.rotation,c=r.svg,u=r.allMatrix,d=r.is3d,p=r.left,g=r.top,f=r.offsetWidth,b=r.offsetHeight;if(!o&&c&&a){var v=__read(convertTransformOriginArray(a,f,b),2);i=getControlTransform(h,s,minus(calculatePosition(u,[v[0],v[1]],d?4:3),[p,g]))}else i=getControlTransform(h,s,l);return[e.createElement("div",{className:prefix("control","origin"),style:i,key:"beforeOrigin"})]}});function getDefaultScrollPosition(t){var e=t.scrollContainer;return[e.scrollLeft,e.scrollTop]}var Scrollable={name:"scrollable",canPinch:!0,props:["scrollable","scrollContainer","scrollThreshold","scrollThrottleTime","getScrollPosition","scrollOptions"],events:["scroll","scrollGroup"],dragRelation:"strong",dragStart:function(t,e){var i=t.props,n=i.scrollContainer,s=void 0===n?t.getContainer():n,a=i.scrollOptions,o=new DragScroll$1,r=getRefTarget(s,!0);e.datas.dragScroll=o,t.state.dragScroll=o;var l=e.isControl?"controlGesto":"targetGesto",h=e.targets;o.on("scroll",(function(i){var n=i.container,s=i.direction,a=fillParams(t,e,{scrollContainer:n,direction:s}),o=h?"onScrollGroup":"onScroll";h&&(a.targets=h),triggerEvent(t,o,a)})).on("move",(function(e){var i=e.offsetX,n=e.offsetY,s=e.inputEvent;t[l].scrollBy(i,n,s.inputEvent,!1)})).on("scrollDrag",(function(e){(0,e.next)(t[l].getCurrentEvent())})),o.dragStart(e,__assign$1({container:r},a))},checkScroll:function(t,e){var i=e.datas.dragScroll;if(i){var n=t.props,s=n.scrollContainer,a=void 0===s?t.getContainer():s,o=n.scrollThreshold,r=void 0===o?0:o,l=n.scrollThrottleTime,h=void 0===l?0:l,c=n.getScrollPosition,u=void 0===c?getDefaultScrollPosition:c,d=n.scrollOptions;return i.drag(e,__assign$1({container:a,threshold:r,throttleTime:h,getScrollPosition:function(t){return u({scrollContainer:t.container,direction:t.direction})}},d)),!0}},drag:function(t,e){return this.checkScroll(t,e)},dragEnd:function(t,e){e.datas.dragScroll.dragEnd(),e.datas.dragScroll=null},dragControlStart:function(t,e){return this.dragStart(t,__assign$1(__assign$1({},e),{isControl:!0}))},dragControl:function(t,e){return this.drag(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupStart:function(t,e){return this.dragStart(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},dragGroup:function(t,e){return this.drag(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},dragGroupEnd:function(t,e){return this.dragEnd(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},dragGroupControlStart:function(t,e){return this.dragStart(t,__assign$1(__assign$1({},e),{targets:t.props.targets,isControl:!0}))},dragGroupControl:function(t,e){return this.drag(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},dragGroupControEnd:function(t,e){return this.dragEnd(t,__assign$1(__assign$1({},e),{targets:t.props.targets}))},unset:function(t){var e,i=t.state;null===(e=i.dragScroll)||void 0===e||e.dragEnd(),i.dragScroll=null}},Default={name:"",props:["target","dragTargetSelf","dragTarget","dragContainer","container","warpSelf","rootContainer","useResizeObserver","useMutationObserver","zoom","dragFocusedInput","transformOrigin","ables","className","pinchThreshold","pinchOutside","triggerAblesSimultaneously","checkInput","cspNonce","translateZ","hideDefaultLines","props","flushSync","stopPropagation","preventClickEventOnDrag","preventClickDefault","viewContainer","persistData","useAccuratePosition","firstRenderState","linePadding","controlPadding","preventDefault","preventRightClick","preventWheelClick","requestStyles"],events:["changeTargets"]},Padding=makeAble("padding",{props:["padding"],render:function(t,e){var i=t.props;if(i.dragArea)return[];var n=getPaddingBox(i.padding||{}),s=n.left,a=n.top,o=n.right,r=n.bottom,l=t.getState(),h=l.renderPoses,c=[l.pos1,l.pos2,l.pos3,l.pos4],u=[];return s>0&&u.push([0,2]),a>0&&u.push([0,1]),o>0&&u.push([1,3]),r>0&&u.push([2,3]),u.map((function(t,i){var n=__read(t,2),s=n[0],a=n[1],o=createWarpMatrix([0,0],[100,0],[0,100],[100,100],c[s],c[a],h[s],h[a]);if(o.length)return e.createElement("div",{key:"padding".concat(i),className:prefix("padding"),style:{transform:makeMatrixCSS(o,!0)}})}))}}),RADIUS_DIRECTIONS=["nw","ne","se","sw"];function calculateRatio(t,e){var i=t[0]+t[1],n=i>e?e/i:1;return t[0]*=n,t[1]=e-t[1]*n,t}var HORIZONTAL_RADIUS_ORDER=[1,2,5,6],VERTICAL_RADIUS_ORDER=[0,3,4,7],HORIZONTAL_RADIUS_DIRECTIONS=[1,-1,-1,1],VERTICAL_RADIUS_DIRECTIONS=[1,1,-1,-1];function getRadiusStyles(t,e,i,n,s,a,o,r){void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o=i),void 0===r&&(r=n);var l=[],h=!1,c=t.filter((function(t){return!t.virtual})),u=c.map((function(t){var c=t.horizontal,u=t.vertical,d=t.pos;if(u&&!h&&(h=!0,l.push("/")),h){var p=Math.max(0,1===u?d[1]-a:r-d[1]);return l.push(convertCSSSize(p,n,e)),p}p=Math.max(0,1===c?d[0]-s:o-d[0]);return l.push(convertCSSSize(p,i,e)),p}));return{radiusPoses:c,styles:l,raws:u}}function getRadiusRange(t){for(var e=[0,0],i=[0,0],n=t.length,s=0;s<n;++s){var a=t[s];a.sub&&(a.horizontal&&(0===e[1]&&(e[0]=s),e[1]=s-e[0]+1,i[0]=s+1),a.vertical&&(0===i[1]&&(i[0]=s),i[1]=s-i[0]+1))}return{horizontalRange:e,verticalRange:i}}function getRadiusValues(t,e,i,n,s,a,o){var r,l,h,c;void 0===a&&(a=[0,0]),void 0===o&&(o=!1);var u=t.indexOf("/"),d=(u>-1?t.slice(0,u):t).length,p=t.slice(0,d),g=t.slice(d+1),f=p.length,b=g.length,v=b>0,m=__read(p,4),y=m[0],S=void 0===y?"0px":y,w=m[1],x=void 0===w?S:w,C=m[2],D=void 0===C?S:C,T=m[3],k=void 0===T?x:T,$=__read(g,4),O=$[0],P=void 0===O?S:O,L=$[1],G=void 0===L?v?P:x:L,F=$[2],I=void 0===F?v?P:D:F,E=$[3],A=void 0===E?v?G:k:E,U=[S,x,D,k].map((function(t){return convertUnitSize(t,e)})),_=[P,G,I,A].map((function(t){return convertUnitSize(t,i)})),j=U.slice(),M=_.slice();r=__read(calculateRatio([j[0],j[1]],e),2),j[0]=r[0],j[1]=r[1],l=__read(calculateRatio([j[3],j[2]],e),2),j[3]=l[0],j[2]=l[1],h=__read(calculateRatio([M[0],M[3]],i),2),M[0]=h[0],M[3]=h[1],c=__read(calculateRatio([M[1],M[2]],i),2),M[1]=c[0],M[2]=c[1];var N=o?j:j.slice(0,Math.max(a[0],f)),B=o?M:M.slice(0,Math.max(a[1],b));return __spreadArray(__spreadArray([],__read(N.map((function(t,e){var a=RADIUS_DIRECTIONS[e];return{virtual:e>=f,horizontal:HORIZONTAL_RADIUS_DIRECTIONS[e],vertical:0,pos:[n+t,s+(-1===VERTICAL_RADIUS_DIRECTIONS[e]?i:0)],sub:!0,raw:U[e],direction:a}}))),!1),__read(B.map((function(t,i){var a=RADIUS_DIRECTIONS[i];return{virtual:i>=b,horizontal:0,vertical:VERTICAL_RADIUS_DIRECTIONS[i],pos:[n+(-1===HORIZONTAL_RADIUS_DIRECTIONS[i]?e:0),s+t],sub:!0,raw:_[i],direction:a}}))),!1)}function removeRadiusPos(t,e,i,n,s){void 0===s&&(s=e.length);var a=getRadiusRange(t.slice(n)),o=a.horizontalRange,r=a.verticalRange,l=i-n,h=0;if(0===l)h=s;else if(l>0&&l<o[1])h=o[1]-l;else{if(!(l>=r[0]))return;h=r[0]+r[1]-l}t.splice(i,h),e.splice(i,h)}function addRadiusPos(t,e,i,n,s,a,o,r,l,h,c){void 0===h&&(h=0),void 0===c&&(c=0);var u=getRadiusRange(t.slice(i)),d=u.horizontalRange,p=u.verticalRange;if(n>-1)for(var g=1===HORIZONTAL_RADIUS_DIRECTIONS[n]?a-h:r-a,f=d[1];f<=n;++f){var b=1===VERTICAL_RADIUS_DIRECTIONS[f]?c:l,v=0;if(n===f?v=a:0===f?v=h+g:-1===HORIZONTAL_RADIUS_DIRECTIONS[f]&&(v=r-(e[i][0]-h)),t.splice(i+f,0,{horizontal:HORIZONTAL_RADIUS_DIRECTIONS[f],vertical:0,pos:[v,b]}),e.splice(i+f,0,[v,b]),0===f)break}else if(s>-1){var m=1===VERTICAL_RADIUS_DIRECTIONS[s]?o-c:l-o;if(0===d[1]&&0===p[1]){var y=[h+m,c];t.push({horizontal:HORIZONTAL_RADIUS_DIRECTIONS[0],vertical:0,pos:y}),e.push(y)}var S=p[0];for(f=p[1];f<=s;++f){v=1===HORIZONTAL_RADIUS_DIRECTIONS[f]?h:r,b=0;if(s===f?b=o:0===f?b=c+m:1===VERTICAL_RADIUS_DIRECTIONS[f]?b=e[i+S][1]:-1===VERTICAL_RADIUS_DIRECTIONS[f]&&(b=l-(e[i+S][1]-c)),t.push({horizontal:0,vertical:VERTICAL_RADIUS_DIRECTIONS[f],pos:[v,b]}),e.push([v,b]),0===f)break}}}function splitRadiusPoses(t,e){return void 0===e&&(e=t.map((function(t){return t.raw}))),{horizontals:t.map((function(t,i){return t.horizontal?e[i]:null})).filter((function(t){return null!=t})),verticals:t.map((function(t,i){return t.vertical?e[i]:null})).filter((function(t){return null!=t}))}}var CLIP_DIRECTIONS=[[0,-1,"n"],[1,0,"e"]],CLIP_RECT_DIRECTIONS=[[-1,-1,"nw"],[0,-1,"n"],[1,-1,"ne"],[1,0,"e"],[1,1,"se"],[0,1,"s"],[-1,1,"sw"],[-1,0,"w"]];function getClipStyles(t,e,i){var n=t.props.clipRelative,s=t.state,a=s.width,o=s.height,r=e,l=r.type,h=r.poses,c="rect"===l,u="circle"===l;if("polygon"===l)return i.map((function(t){return"".concat(convertCSSSize(t[0],a,n)," ").concat(convertCSSSize(t[1],o,n))}));if(c||"inset"===l){var d=i[1][1],p=i[3][0],g=i[7][0],f=i[5][1];if(c)return[d,p,f,g].map((function(t){return"".concat(t,"px")}));var b=[d,a-p,o-f,g].map((function(t,e){return convertCSSSize(t,e%2?a:o,n)}));if(i.length>8){var v=__read(minus(i[4],i[0]),2),m=v[0],y=v[1];b.push.apply(b,__spreadArray(["round"],__read(getRadiusStyles(h.slice(8).map((function(t,e){return __assign$1(__assign$1({},t),{pos:i[e]})})),n,m,y,g,d,p,f).styles),!1))}return b}if(u||"ellipse"===l){var S=i[0],w=convertCSSSize(abs(i[1][1]-S[1]),u?Math.sqrt((a*a+o*o)/2):o,n);return(b=u?[w]:[convertCSSSize(abs(i[2][0]-S[0]),a,n),w]).push("at",convertCSSSize(S[0],a,n),convertCSSSize(S[1],o,n)),b}}function getRectPoses(t,e,i,n){var s=[n,(n+e)/2,e],a=[t,(t+i)/2,i];return CLIP_RECT_DIRECTIONS.map((function(t){var e=__read(t,3),i=e[0],n=e[1],o=e[2],r=s[i+1],l=a[n+1];return{vertical:abs(n),horizontal:abs(i),direction:o,pos:[r,l]}}))}function getControlSize(t){var e=[1/0,-1/0],i=[1/0,-1/0];return t.forEach((function(t){var n=t.pos;e[0]=Math.min(e[0],n[0]),e[1]=Math.max(e[1],n[0]),i[0]=Math.min(i[0],n[1]),i[1]=Math.max(i[1],n[1])})),[abs(e[1]-e[0]),abs(i[1]-i[0])]}function getClipPath(t,e,i,n,s){var a,o,r,l,h,c,u,d,p;if(t){var g=s;if(!g){var f=getCachedStyle(t),b=f("clipPath");g="none"!==b?b:f("clip")}if(g&&"none"!==g&&"auto"!==g||(g=n)){var v=splitBracket(g),m=v.prefix,y=void 0===m?g:m,S=v.value,w=void 0===S?"":S,x="circle"===y,C=" ";if("polygon"===y){C=",";var D=getMinMaxs((E=(P=splitComma(w||"0% 0%, 100% 0%, 100% 100%, 0% 100%")).map((function(t){var n=__read(t.split(" "),2),s=n[0],a=n[1];return{vertical:1,horizontal:1,pos:[convertUnitSize(s,e),convertUnitSize(a,i)]}}))).map((function(t){return t.pos})));return{type:y,clipText:g,poses:E,splitter:C,left:D.minX,right:D.maxX,top:D.minY,bottom:D.maxY}}if(x||"ellipse"===y){var T="",k="",$=0,O=0,P=splitSpace(w);if(x){var L;L=void 0===(o=(a=__read(P,4))[0])?"50%":o,T=void 0===(r=a[2])?"50%":r,k=void 0===(l=a[3])?"50%":l,$=convertUnitSize(L,Math.sqrt((e*e+i*i)/2)),O=$}else{var G,F;G=void 0===(c=(h=__read(P,5))[0])?"50%":c,F=void 0===(u=h[1])?"50%":u,T=void 0===(d=h[3])?"50%":d,k=void 0===(p=h[4])?"50%":p,$=convertUnitSize(G,e),O=convertUnitSize(F,i)}var I=[convertUnitSize(T,e),convertUnitSize(k,i)],E=__spreadArray([{vertical:1,horizontal:1,pos:I,direction:"nesw"}],__read(CLIP_DIRECTIONS.slice(0,x?1:2).map((function(t){return{vertical:abs(t[1]),horizontal:t[0],direction:t[2],sub:!0,pos:[I[0]+t[0]*$,I[1]+t[1]*O]}}))),!1);return{type:y,clipText:g,radiusX:$,radiusY:O,left:I[0]-$,top:I[1]-O,right:I[0]+$,bottom:I[1]+O,poses:E,splitter:C}}if("inset"===y){var A=(P=splitSpace(w||"0 0 0 0")).indexOf("round"),U=(A>-1?P.slice(0,A):P).length,_=P.slice(U+1),j=__read(P.slice(0,U),4),M=j[0],N=j[1],B=void 0===N?M:N,R=j[2],H=void 0===R?M:R,z=j[3],V=void 0===z?B:z,q=__read([M,H].map((function(t){return convertUnitSize(t,i)})),2),W=q[0],K=q[1],Y=__read([V,B].map((function(t){return convertUnitSize(t,e)})),2),X=Y[0],J=Y[1],Z=e-J,Q=i-K,tt=getRadiusValues(_,Z-X,Q-W,X,W);return{type:"inset",clipText:g,poses:E=__spreadArray(__spreadArray([],__read(getRectPoses(W,Z,Q,X)),!1),__read(tt),!1),top:W,left:X,right:Z,bottom:Q,radius:_,splitter:C}}if("rect"===y){C=",";var et=__read((P=splitComma(w||"0px, ".concat(e,"px, ").concat(i,"px, 0px"))).map((function(t){return splitUnit(t).value})),4),it=et[0];return{type:"rect",clipText:g,poses:E=getRectPoses(it,J=et[1],K=et[2],X=et[3]),top:it,right:J,bottom:K,left:X,values:P,splitter:C}}}}}function moveControlPos(t,e,i,n,s){var a=t[e],o=a.direction,r=a.sub,l=t.map((function(){return[0,0]})),h=o?o.split(""):[];if(n&&e<8){var c=h.filter((function(t){return"w"===t||"e"===t})),u=h.filter((function(t){return"n"===t||"s"===t})),d=c[0],p=u[0];l[e]=i;var g=__read(getControlSize(t),2),f=g[0],b=g[1],v=f&&b?f/b:0;if(v&&s){var m=t[(e+4)%8].pos,y=[0,0];o.indexOf("w")>-1?y[0]=-1:o.indexOf("e")>-1&&(y[0]=1),o.indexOf("n")>-1?y[1]=-1:o.indexOf("s")>-1&&(y[1]=1);var S=getSizeDistByDist([f,b],i,v,y,!0),w=f+S[0],x=b+S[1],C=m[1],D=m[1],T=m[0],k=m[0];-1===y[0]?T=k-w:1===y[0]?k=T+w:(T-=w/2,k+=w/2),-1===y[1]?C=D-x:D=1===y[1]?C+x:(C=D-x/2)+x;var $=getRectPoses(C,k,D,T);t.forEach((function(t,e){l[e][0]=$[e].pos[0]-t.pos[0],l[e][1]=$[e].pos[1]-t.pos[1]}))}else t.forEach((function(t,e){var n=t.direction;n&&(n.indexOf(d)>-1&&(l[e][0]=i[0]),n.indexOf(p)>-1&&(l[e][1]=i[1]))})),d&&(l[1][0]=i[0]/2,l[5][0]=i[0]/2),p&&(l[3][1]=i[1]/2,l[7][1]=i[1]/2)}else o&&!r?h.forEach((function(e){var n="n"===e||"s"===e;t.forEach((function(t,s){var a=t.direction,o=t.horizontal,r=t.vertical;a&&-1!==a.indexOf(e)&&(l[s]=[n||!o?0:i[0],n&&r?i[1]:0])}))})):l[e]=i;return l}function addClipPath(t,e){var i=__read(calculatePointerDist(t,e),2),n=i[0],s=i[1],a=e.datas,o=a.clipPath,r=a.clipIndex,l=o,h=l.type,c=l.poses,u=l.splitter,d=c.map((function(t){return t.pos}));if("polygon"===h)d.splice(r,0,[n,s]);else{if("inset"!==h)return;var p=HORIZONTAL_RADIUS_ORDER.indexOf(r),g=VERTICAL_RADIUS_ORDER.indexOf(r),f=c.length;if(addRadiusPos(c,d,8,p,g,n,s,d[4][0],d[4][1],d[0][0],d[0][1]),f===c.length)return}var b=getClipStyles(t,o,d),v="".concat(h,"(").concat(b.join(u),")");triggerEvent(t,"onClip",fillParams(t,e,__assign$1({clipEventType:"added",clipType:h,poses:d,clipStyles:b,clipStyle:v,distX:0,distY:0},fillCSSObject({clipPath:v},e))))}function removeClipPath(t,e){var i=e.datas,n=i.clipPath,s=i.clipIndex,a=n,o=a.type,r=a.poses,l=a.splitter,h=r.map((function(t){return t.pos})),c=h.length;if("polygon"===o)r.splice(s,1),h.splice(s,1);else{if("inset"!==o)return;if(s<8)return;if(removeRadiusPos(r,h,s,8,c),c===r.length)return}var u=getClipStyles(t,n,h),d="".concat(o,"(").concat(u.join(l),")");triggerEvent(t,"onClip",fillParams(t,e,__assign$1({clipEventType:"removed",clipType:o,poses:h,clipStyles:u,clipStyle:d,distX:0,distY:0},fillCSSObject({clipPath:d},e))))}var Clippable={name:"clippable",props:["clippable","defaultClipPath","customClipPath","keepRatio","clipRelative","clipArea","dragWithClip","clipTargetBounds","clipVerticalGuidelines","clipHorizontalGuidelines","clipSnapThreshold"],events:["clipStart","clip","clipEnd"],css:[".control.clip-control {\nbackground: #6d6;\ncursor: pointer;\n}\n.control.clip-control.clip-radius {\nbackground: #d66;\n}\n.line.clip-line {\nbackground: #6e6;\ncursor: move;\nz-index: 1;\n}\n.clip-area {\nposition: absolute;\ntop: 0;\nleft: 0;\n}\n.clip-ellipse {\nposition: absolute;\ncursor: move;\nborder: 1px solid #6d6;\nborder: var(--zoompx) solid #6d6;\nborder-radius: 50%;\ntransform-origin: 0px 0px;\n}",":host {\n--bounds-color: #d66;\n}",".guideline {\npointer-events: none;\nz-index: 2;\n}",".line.guideline.bounds {\nbackground: #d66;\nbackground: var(--bounds-color);\n}"],render:function(t,e){var i=t.props,n=i.customClipPath,s=i.defaultClipPath,a=i.clipArea,o=i.zoom,r=i.groupable,l=t.getState(),h=l.target,c=l.width,u=l.height,d=l.allMatrix,p=l.is3d,g=l.left,f=l.top,b=l.pos1,v=l.pos2,m=l.pos3,y=l.pos4,S=l.clipPathState,w=l.snapBoundInfos,x=l.rotation;if(!h||r)return[];var C=getClipPath(h,c,u,s||"inset",S||n);if(!C)return[];var D=p?4:3,T=C.type,k=C.poses.map((function(t){var e=calculatePosition(d,t.pos,D);return[e[0]-g,e[1]-f]})),$=[],O=[],P="rect"===T,L="inset"===T,G="polygon"===T;if(P||L||G){var F=L?k.slice(0,8):k;O=F.map((function(t,i){var n=0===i?F[F.length-1]:F[i-1],s=getRad$1(n,t),a=getDiagonalSize(n,t);return e.createElement("div",{key:"clipLine".concat(i),className:prefix("line","clip-line","snap-control"),"data-clip-index":i,style:{width:"".concat(a,"px"),transform:"translate(".concat(n[0],"px, ").concat(n[1],"px) rotate(").concat(s,"rad) scaleY(").concat(o,")")}})}))}if($=k.map((function(t,i){return e.createElement("div",{key:"clipControl".concat(i),className:prefix("control","clip-control","snap-control"),"data-clip-index":i,style:{transform:"translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(x,"rad) scale(").concat(o,")")}})})),L&&$.push.apply($,__spreadArray([],__read(k.slice(8).map((function(t,i){return e.createElement("div",{key:"clipRadiusControl".concat(i),className:prefix("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+i,style:{transform:"translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(x,"rad) scale(").concat(o,")")}})}))),!1)),"circle"===T||"ellipse"===T){var I=C.left,E=C.top,A=C.radiusX,U=C.radiusY,_=__read(minus(calculatePosition(d,[I,E],D),calculatePosition(d,[0,0],D)),2),j=_[0],M=_[1],N="none";if(!a){for(var B=Math.max(10,A/5,U/5),R=[],H=0;H<=B;++H){var z=2*Math.PI/B*H;R.push([A+(A-o)*Math.cos(z),U+(U-o)*Math.sin(z)])}R.push([A,-2]),R.push([-2,-2]),R.push([-2,2*U+2]),R.push([2*A+2,2*U+2]),R.push([2*A+2,-2]),R.push([A,-2]),N="polygon(".concat(R.map((function(t){return"".concat(t[0],"px ").concat(t[1],"px")})).join(", "),")")}$.push(e.createElement("div",{key:"clipEllipse",className:prefix("clip-ellipse","snap-control"),style:{width:"".concat(2*A,"px"),height:"".concat(2*U,"px"),clipPath:N,transform:"translate(".concat(-g+j,"px, ").concat(-f+M,"px) ").concat(makeMatrixCSS(d))}}))}if(a){var V=getRect(__spreadArray([b,v,m,y],__read(k),!1)),q=V.width,W=V.height,K=V.left,Y=V.top;if(G||P||L){R=L?k.slice(0,8):k;$.push(e.createElement("div",{key:"clipArea",className:prefix("clip-area","snap-control"),style:{width:"".concat(q,"px"),height:"".concat(W,"px"),transform:"translate(".concat(K,"px, ").concat(Y,"px)"),clipPath:"polygon(".concat(R.map((function(t){return"".concat(t[0]-K,"px ").concat(t[1]-Y,"px")})).join(", "),")")}}))}}return w&&["vertical","horizontal"].forEach((function(t){var i=w[t],n="horizontal"===t;i.isSnap&&O.push.apply(O,__spreadArray([],__read(i.snap.posInfos.map((function(i,s){var a=i.pos,r=minus(calculatePosition(d,n?[0,a]:[a,0],D),[g,f]),l=minus(calculatePosition(d,n?[c,a]:[a,u],D),[g,f]);return renderLine(e,"",r,l,o,"clip".concat(t,"snap").concat(s),"guideline")}))),!1)),i.isBound&&O.push.apply(O,__spreadArray([],__read(i.bounds.map((function(i,s){var a=i.pos,r=minus(calculatePosition(d,n?[0,a]:[a,0],D),[g,f]),l=minus(calculatePosition(d,n?[c,a]:[a,u],D),[g,f]);return renderLine(e,"",r,l,o,"clip".concat(t,"bounds").concat(s),"guideline","bounds","bold")}))),!1))})),__spreadArray(__spreadArray([],__read($),!1),__read(O),!1)},dragControlCondition:function(t,e){return e.inputEvent&&(e.inputEvent.target.getAttribute("class")||"").indexOf("clip")>-1},dragStart:function(t,e){var i=t.props.dragWithClip;return!(void 0===i||i)&&this.dragControlStart(t,e)},drag:function(t,e){return this.dragControl(t,__assign$1(__assign$1({},e),{isDragTarget:!0}))},dragEnd:function(t,e){return this.dragControlEnd(t,e)},dragControlStart:function(t,e){var i=t.state,n=t.props,s=n.defaultClipPath,a=n.customClipPath,o=i.target,r=i.width,l=i.height,h=e.inputEvent?e.inputEvent.target:null,c=h&&h.getAttribute("class")||"",u=e.datas,d=getClipPath(o,r,l,s||"inset",a);if(!d)return!1;var p=d.clipText;return!1===triggerEvent(t,"onClipStart",fillParams(t,e,{clipType:d.type,clipStyle:p,poses:d.poses.map((function(t){return t.pos}))}))?(u.isClipStart=!1,!1):(u.isControl=c&&c.indexOf("clip-control")>-1,u.isLine=c.indexOf("clip-line")>-1,u.isArea=c.indexOf("clip-area")>-1||c.indexOf("clip-ellipse")>-1,u.clipIndex=h?parseInt(h.getAttribute("data-clip-index"),10):-1,u.clipPath=d,u.isClipStart=!0,i.clipPathState=p,setDragStart(t,e),!0)},dragControl:function(t,e){var i,n,s,a=e.datas,o=e.originalDatas,r=e.isDragTarget;if(!a.isClipStart)return!1;var l=a,h=l.isControl,c=l.isLine,u=l.isArea,d=l.clipIndex,p=l.clipPath;if(!p)return!1;var g=getProps(t.props,"clippable"),f=g.keepRatio,b=0,v=0,m=o.draggable,y=getDragDist(e);r&&m?(i=__read(m.prevBeforeDist,2),b=i[0],v=i[1]):(n=__read(y,2),b=n[0],v=n[1]);var S=[b,v],w=t.state,x=w.width,C=w.height,D=!u&&!h&&!c,T=p.type,k=p.poses,$=p.splitter,O=k.map((function(t){return t.pos}));D&&(b=-b,v=-v);var P=!h||"nesw"===k[d].direction,L="inset"===T||"rect"===T,G=k.map((function(){return[0,0]}));if(h&&!P){var F=k[d],I=F.horizontal,E=F.vertical,A=[b*abs(I),v*abs(E)];G=moveControlPos(k,d,A,L,f)}else P&&(G=O.map((function(){return[b,v]})));var U=O.map((function(t,e){return plus(t,G[e])})),_=__spreadArray([],__read(U),!1);w.snapBoundInfos=null;var j="circle"===p.type,M="ellipse"===p.type;if(j||M){var N=abs((it=getRect(U)).bottom-it.top),B=abs(M?it.right-it.left:N),R=U[0][1]+N,H=U[0][0]-B,z=U[0][0]+B;j&&(_.push([z,it.bottom]),G.push([1,0])),_.push([it.left,R]),G.push([0,1]),_.push([H,it.bottom]),G.push([1,0])}var V=getDefaultGuidelines((g.clipHorizontalGuidelines||[]).map((function(t){return convertUnitSize("".concat(t),C)})),(g.clipVerticalGuidelines||[]).map((function(t){return convertUnitSize("".concat(t),x)})),x,C),q=[],W=[];if(j||M)q=[_[4][0],_[2][0]],W=[_[1][1],_[3][1]];else if(L){var K=[_[0],_[2],_[4],_[6]],Y=[G[0],G[2],G[4],G[6]];q=K.filter((function(t,e){return Y[e][0]})).map((function(t){return t[0]})),W=K.filter((function(t,e){return Y[e][1]})).map((function(t){return t[1]}))}else q=_.filter((function(t,e){return G[e][0]})).map((function(t){return t[0]})),W=_.filter((function(t,e){return G[e][1]})).map((function(t){return t[1]}));var X=[0,0],J=checkSnapBounds(V,g.clipTargetBounds&&{left:0,top:0,right:x,bottom:C},q,W,5,5),Z=J.horizontal,Q=J.vertical,tt=Z.offset,et=Q.offset;if(Z.isBound&&(X[1]+=tt),Q.isBound&&(X[0]+=et),(M||j)&&0===G[0][0]&&0===G[0][1]){var it,nt=(it=getRect(U)).bottom-it.top,st=M?it.right-it.left:nt;st-=Q.isBound?abs(et):0===Q.snapIndex?-et:et,nt-=Z.isBound?abs(tt):0===Z.snapIndex?-tt:tt,j&&(st=nt=checkSnapBoundPriority(Q,Z)>0?nt:st);var at=_[0];_[1][1]=at[1]-nt,_[2][0]=at[0]+st,_[3][1]=at[1]+nt,_[4][0]=at[0]-st}else if(L&&f&&h){var ot=__read(getControlSize(k),2),rt=ot[0],lt=ot[1],ht=rt&&lt?rt/lt:0,ct=k[d].direction||"",ut=_[1][1];R=_[5][1],H=_[7][0],z=_[3][0];abs(tt)<=abs(et)?tt=sign(tt)*abs(et)/ht:et=sign(et)*abs(tt)*ht,ct.indexOf("w")>-1?H-=et:ct.indexOf("e")>-1?z-=et:(H+=et/2,z-=et/2),ct.indexOf("n")>-1?ut-=tt:ct.indexOf("s")>-1?R-=tt:(ut+=tt/2,R-=tt/2);var dt=getRectPoses(ut,z,R,H);_.forEach((function(t,e){var i;i=__read(dt[e].pos,2),t[0]=i[0],t[1]=i[1]}))}else _.forEach((function(t,e){var i=G[e];i[0]&&(t[0]-=et),i[1]&&(t[1]-=tt)}));var pt=getClipStyles(t,p,U),gt="".concat(T,"(").concat(pt.join($),")");if(w.clipPathState=gt,j||M)q=[_[4][0],_[2][0]],W=[_[1][1],_[3][1]];else if(L){q=(K=[_[0],_[2],_[4],_[6]]).map((function(t){return t[0]})),W=K.map((function(t){return t[1]}))}else q=_.map((function(t){return t[0]})),W=_.map((function(t){return t[1]}));if(w.snapBoundInfos=checkSnapBounds(V,g.clipTargetBounds&&{left:0,top:0,right:x,bottom:C},q,W,1,1),m){var ft=w.is3d,bt=w.allMatrix,vt=ft?4:3,mt=X;r&&(mt=[S[0]+X[0]-y[0],S[1]+X[1]-y[1]]),m.deltaOffset=multiply(bt,[mt[0],mt[1],0,0],vt)}return triggerEvent(t,"onClip",fillParams(t,e,__assign$1({clipEventType:"changed",clipType:T,poses:U,clipStyle:gt,clipStyles:pt,distX:b,distY:v},fillCSSObject(((s={})["rect"===T?"clip":"clipPath"]=gt,s),e)))),!0},dragControlEnd:function(t,e){this.unset(t);var i=e.isDrag,n=e.datas,s=e.isDouble,a=n.isLine,o=n.isClipStart,r=n.isControl;return!!o&&(triggerEvent(t,"onClipEnd",fillEndParams(t,e,{})),s&&(r?removeClipPath(t,e):a&&addClipPath(t,e)),s||i)},unset:function(t){t.state.clipPathState="",t.state.snapBoundInfos=null}},OriginDraggable={name:"originDraggable",props:["originDraggable","originRelative"],events:["dragOriginStart","dragOrigin","dragOriginEnd"],css:[":host[data-able-origindraggable] .control.origin {\npointer-events: auto;\n}"],dragControlCondition:function(t,e){return e.isRequest?"originDraggable"===e.requestAble:hasClass(e.inputEvent.target,prefix("origin"))},dragControlStart:function(t,e){var i=e.datas;setDragStart(t,e);var n=fillParams(t,e,{dragStart:Draggable.dragStart(t,(new CustomGesto).dragStart([0,0],e))}),s=triggerEvent(t,"onDragOriginStart",n);return i.startOrigin=t.state.transformOrigin,i.startTargetOrigin=t.state.targetOrigin,i.prevOrigin=[0,0],i.isDragOrigin=!0,!1===s?(i.isDragOrigin=!1,!1):n},dragControl:function(t,e){var i=e.datas,n=e.isPinch,s=e.isRequest;if(!i.isDragOrigin)return!1;var a=__read(getDragDist(e),2),o=a[0],r=a[1],l=t.state,h=l.width,c=l.height,u=l.offsetMatrix,d=l.targetMatrix,p=l.is3d,g=t.props.originRelative,f=void 0===g||g,b=p?4:3,v=[o,r];if(s){var m=e.distOrigin;(m[0]||m[1])&&(v=m)}var y=plus(i.startOrigin,v),S=plus(i.startTargetOrigin,v),w=minus(v,i.prevOrigin),x=getNextMatrix(u,d,y,b),C=t.getRect(),D=getRect(calculatePoses(x,h,c,b)),T=[C.left-D.left,C.top-D.top];i.prevOrigin=v;var k=[convertCSSSize(S[0],h,f),convertCSSSize(S[1],c,f)].join(" "),$=Draggable.drag(t,setCustomDrag(e,t.state,T,!!n,!1)),O=fillParams(t,e,__assign$1(__assign$1({width:h,height:c,origin:y,dist:v,delta:w,transformOrigin:k,drag:$},fillCSSObject({transformOrigin:k,transform:$.transform},e)),{afterTransform:$.transform}));return triggerEvent(t,"onDragOrigin",O),O},dragControlEnd:function(t,e){return!!e.datas.isDragOrigin&&(triggerEvent(t,"onDragOriginEnd",fillEndParams(t,e,{})),!0)},dragGroupControlCondition:function(t,e){return this.dragControlCondition(t,e)},dragGroupControlStart:function(t,e){return!!this.dragControlStart(t,e)},dragGroupControl:function(t,e){var i=this.dragControl(t,e);return!!i&&(t.transformOrigin=i.transformOrigin,!0)},request:function(t){var e={},i=t.getRect(),n=0,s=0,a=i.transformOrigin,o=[0,0];return{isControl:!0,requestStart:function(){return{datas:e}},request:function(t){return"deltaOrigin"in t?(o[0]+=t.deltaOrigin[0],o[1]+=t.deltaOrigin[1]):"origin"in t?(o[0]=t.origin[0]-a[0],o[1]=t.origin[1]-a[1]):("x"in t?n=t.x-i.left:"deltaX"in t&&(n+=t.deltaX),"y"in t?s=t.y-i.top:"deltaY"in t&&(s+=t.deltaY)),{datas:e,distX:n,distY:s,distOrigin:o}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function addBorderRadiusByLine(t,e,i,n){var s=t.filter((function(t){var e=t.virtual;return t.horizontal&&!e})).length,a=t.filter((function(t){var e=t.virtual;return t.vertical&&!e})).length,o=-1;if(0===e&&(0===s?o=0:1===s&&(o=1)),2===e&&(s<=2?o=2:s<=3&&(o=3)),3===e&&(0===a?o=4:a<4&&(o=7)),1===e&&(a<=1?o=5:a<=2&&(o=6)),-1!==o&&t[o].virtual){var r=t[o];addBorderRadius(t,o),o<4?r.pos[0]=i:r.pos[1]=n}}function addBorderRadius(t,e){e<4?t.slice(0,e+1).forEach((function(t){t.virtual=!1})):(t[0].virtual&&(t[0].virtual=!1),t.slice(4,e+1).forEach((function(t){t.virtual=!1})))}function removeBorderRadius(t,e){e<4?t.slice(e,4).forEach((function(t){t.virtual=!0})):t.slice(e).forEach((function(t){t.virtual=!0}))}function getBorderRadius(t,e,i,n,s){void 0===n&&(n=[0,0]);return getRadiusValues(t&&"0px"!==t?splitSpace(t):[],e,i,0,0,n,s)}function triggerRoundEvent(t,e,i,n,s){var a=t.state,o=a.width,r=a.height,l=getRadiusStyles(s,t.props.roundRelative,o,r),h=l.raws,c=l.styles,u=splitRadiusPoses(l.radiusPoses,h),d=u.horizontals,p=u.verticals,g=c.join(" ");a.borderRadiusState=g;var f=fillParams(t,e,__assign$1({horizontals:d,verticals:p,borderRadius:g,width:o,height:r,delta:n,dist:i},fillCSSObject({borderRadius:g},e)));return triggerEvent(t,"onRound",f),f}function getStyleBorderRadius(t){var e,i,n=t.getState().style,s=n.borderRadius||"";if(!s&&t.props.groupable){var a=t.moveables[0],o=t.getTargets()[0];o&&((null==a?void 0:a.props.target)===o?(s=null!==(i=null===(e=t.moveables[0])||void 0===e?void 0:e.state.style.borderRadius)&&void 0!==i?i:"",n.borderRadius=s):(s=getComputedStyle$2(o).borderRadius,n.borderRadius=s))}return s}var Roundable={name:"roundable",props:["roundable","roundRelative","minRoundControls","maxRoundControls","roundClickable","roundPadding","isDisplayShadowRoundControls"],events:["roundStart","round","roundEnd","roundGroupStart","roundGroup","roundGroupEnd"],css:[".control.border-radius {\nbackground: #d66;\ncursor: pointer;\nz-index: 3;\n}",".control.border-radius.vertical {\nbackground: #d6d;\nz-index: 2;\n}",".control.border-radius.virtual {\nopacity: 0.5;\nz-index: 1;\n}",":host.round-line-clickable .line.direction {\ncursor: pointer;\n}"],className:function(t){var e=t.props.roundClickable;return!0===e||"line"===e?prefix("round-line-clickable"):""},requestStyle:function(){return["borderRadius"]},requestChildStyle:function(){return["borderRadius"]},render:function(t,e){var i=t.getState(),n=i.target,s=i.width,a=i.height,o=i.allMatrix,r=i.is3d,l=i.left,h=i.top,c=i.borderRadiusState,u=t.props,d=u.minRoundControls,p=void 0===d?[0,0]:d,g=u.maxRoundControls,f=void 0===g?[4,4]:g,b=u.zoom,v=u.roundPadding,m=void 0===v?0:v,y=u.isDisplayShadowRoundControls,S=u.groupable;if(!n)return null;var w=c||getStyleBorderRadius(t),x=r?4:3,C=getBorderRadius(w,s,a,p,!0);if(!C)return null;var D=0,T=0,k=S?[0,0]:[l,h];return C.map((function(t,i){var n=t.horizontal,s=t.vertical,a=t.direction||"",r=__spreadArray([],__read(t.pos),!1);T+=Math.abs(n),D+=Math.abs(s),n&&a.indexOf("n")>-1&&(r[1]-=m),s&&a.indexOf("w")>-1&&(r[0]-=m),n&&a.indexOf("s")>-1&&(r[1]+=m),s&&a.indexOf("e")>-1&&(r[0]+=m);var l=minus(calculatePosition(o,r,x),k),h=y&&"horizontal"!==y,c=t.vertical?D<=f[1]&&(h||!t.virtual):T<=f[0]&&(y||!t.virtual);return e.createElement("div",{key:"borderRadiusControl".concat(i),className:prefix("control","border-radius",t.vertical?"vertical":"",t.virtual?"virtual":""),"data-radius-index":i,style:{display:c?"block":"none",transform:"translate(".concat(l[0],"px, ").concat(l[1],"px) scale(").concat(b,")")}})}))},dragControlCondition:function(t,e){if(!e.inputEvent||e.isRequest)return!1;var i=e.inputEvent.target.getAttribute("class")||"";return i.indexOf("border-radius")>-1||i.indexOf("moveable-line")>-1&&i.indexOf("moveable-direction")>-1},dragGroupControlCondition:function(t,e){return this.dragControlCondition(t,e)},dragControlStart:function(t,e){var i=e.inputEvent,n=e.datas,s=i.target,a=s.getAttribute("class")||"",o=a.indexOf("border-radius")>-1,r=a.indexOf("moveable-line")>-1&&a.indexOf("moveable-direction")>-1,l=o?parseInt(s.getAttribute("data-radius-index"),10):-1,h=-1;if(r){var c=s.getAttribute("data-line-key")||"";c&&(h=parseInt(c.replace(/render-line-/g,""),10),isNaN(h)&&(h=-1))}if(!o&&!r)return!1;var u=fillParams(t,e,{});if(!1===triggerEvent(t,"onRoundStart",u))return!1;n.lineIndex=h,n.controlIndex=l,n.isControl=o,n.isLine=r,setDragStart(t,e);var d=t.props,p=d.roundRelative,g=d.minRoundControls,f=void 0===g?[0,0]:g,b=t.state,v=b.width,m=b.height;n.isRound=!0,n.prevDist=[0,0];var y=getBorderRadius(getStyleBorderRadius(t)||"",v,m,f,!0)||[];return n.controlPoses=y,b.borderRadiusState=getRadiusStyles(y,p,v,m).styles.join(" "),u},dragControl:function(t,e){var i=e.datas,n=i.controlPoses;if(!i.isRound||!i.isControl||!n.length)return!1;var s=i.controlIndex,a=__read(getDragDist(e),2),o=a[0],r=a[1],l=[o,r],h=minus(l,i.prevDist),c=t.props.maxRoundControls,u=void 0===c?[4,4]:c,d=t.state,p=d.width,g=d.height,f=n[s],b=f.vertical,v=f.horizontal,m=n.map((function(t){var e=t.horizontal,i=t.vertical,n=[e*v*l[0],i*b*l[1]];if(e){if(1===u[0])return n;if(u[0]<4&&e!==v)return n}else{if(0===u[1])return n[1]=i*v*l[0]/p*g,n;if(b){if(1===u[1])return n;if(u[1]<4&&i!==b)return n}}return[0,0]}));m[s]=l;var y=n.map((function(t,e){return __assign$1(__assign$1({},t),{pos:plus(t.pos,m[e])})}));return s<4?y.slice(0,s+1).forEach((function(t){t.virtual=!1})):y.slice(4,s+1).forEach((function(t){t.virtual=!1})),i.prevDist=[o,r],triggerRoundEvent(t,e,l,h,y)},dragControlEnd:function(t,e){var i=t.state;i.borderRadiusState="";var n=e.datas,s=e.isDouble;if(!n.isRound)return!1;var a=n.isControl,o=n.controlIndex,r=n.isLine,l=n.lineIndex,h=n.controlPoses,c=h.filter((function(t){return t.virtual})).length,u=t.props.roundClickable,d=void 0===u||u;if(s&&d){if(!a||!0!==d&&"control"!==d){if(r&&(!0===d||"line"===d)){var p=__read(calculatePointerDist(t,e),2);addBorderRadiusByLine(h,l,p[0],p[1])}}else removeBorderRadius(h,o);c!==h.filter((function(t){return t.virtual})).length&&triggerRoundEvent(t,e,[0,0],[0,0],h)}var g=fillEndParams(t,e,{});return triggerEvent(t,"onRoundEnd",g),i.borderRadiusState="",g},dragGroupControlStart:function(t,e){var i=this.dragControlStart(t,e);if(!i)return!1;var n=t.moveables,s=t.props.targets,a=fillChildEvents(t,"roundable",e);return triggerEvent(t,"onRoundGroupStart",__assign$1({targets:t.props.targets,events:a.map((function(t,e){return __assign$1(__assign$1({},t),{target:s[e],moveable:n[e],currentTarget:n[e]})}))},i)),i},dragGroupControl:function(t,e){var i=this.dragControl(t,e);if(!i)return!1;var n=t.moveables,s=t.props.targets,a=fillChildEvents(t,"roundable",e),o=__assign$1({targets:t.props.targets,events:a.map((function(t,e){return __assign$1(__assign$1(__assign$1({},t),{target:s[e],moveable:n[e],currentTarget:n[e]}),fillCSSObject({borderRadius:i.borderRadius},t))}))},i);return triggerEvent(t,"onRoundGroup",o),o},dragGroupControlEnd:function(t,e){var i=t.moveables,n=t.props.targets,s=fillChildEvents(t,"roundable",e);catchEvent(t,"onRound",(function(e){var a=__assign$1({targets:t.props.targets,events:s.map((function(t,s){return __assign$1(__assign$1(__assign$1({},t),{target:n[s],moveable:i[s],currentTarget:i[s]}),fillCSSObject({borderRadius:e.borderRadius},t))}))},e);triggerEvent(t,"onRoundGroup",a)}));var a=this.dragControlEnd(t,e);if(!a)return!1;var o=__assign$1({targets:t.props.targets,events:s.map((function(t,e){var s;return __assign$1(__assign$1({},t),{target:n[e],moveable:i[e],currentTarget:i[e],lastEvent:null===(s=t.datas)||void 0===s?void 0:s.lastEvent})}))},a);return triggerEvent(t,"onRoundGroupEnd",o),o},unset:function(t){t.state.borderRadiusState=""}};function isIdentityMatrix(t,e){var i=createIdentityMatrix(e?4:3);return t==="matrix".concat(e?"3d":"","(").concat(i.join(","),")")||"matrix(1,0,0,1,0,0)"===t}var BeforeRenderable={isPinch:!0,name:"beforeRenderable",props:[],events:["beforeRenderStart","beforeRender","beforeRenderEnd","beforeRenderGroupStart","beforeRenderGroup","beforeRenderGroupEnd"],dragRelation:"weak",setTransform:function(t,e){var i=t.state,n=i.is3d,s=i.targetMatrix,a=i.inlineTransform,o=n?"matrix3d(".concat(s.join(","),")"):"matrix(".concat(convertMatrixtoCSS(s,!0),")"),r=a&&"none"!==a?a:o;e.datas.startTransforms=isIdentityMatrix(r,n)?[]:splitSpace(r)},resetStyle:function(t){var e=t.datas;e.nextStyle={},e.nextTransforms=t.datas.startTransforms,e.nextTransformAppendedIndexes=[]},fillDragStartParams:function(t,e){return fillParams(t,e,{setTransform:function(t){e.datas.startTransforms=isArray(t)?t:splitSpace(t)},isPinch:!!e.isPinch})},fillDragParams:function(t,e){return fillParams(t,e,{isPinch:!!e.isPinch})},dragStart:function(t,e){this.setTransform(t,e),this.resetStyle(e),triggerEvent(t,"onBeforeRenderStart",this.fillDragStartParams(t,e))},drag:function(t,e){e.datas.startTransforms||this.setTransform(t,e),this.resetStyle(e),triggerEvent(t,"onBeforeRender",fillParams(t,e,{isPinch:!!e.isPinch}))},dragEnd:function(t,e){e.datas.startTransforms||(this.setTransform(t,e),this.resetStyle(e)),triggerEvent(t,"onBeforeRenderEnd",fillParams(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag}))},dragGroupStart:function(t,e){var i=this;this.dragStart(t,e);var n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.setTransform(n,t),i.resetStyle(t),i.fillDragStartParams(n,t)}));triggerEvent(t,"onBeforeRenderGroupStart",fillParams(t,e,{isPinch:!!e.isPinch,targets:t.props.targets,setTransform:function(){},events:a}))},dragGroup:function(t,e){var i=this;this.drag(t,e);var n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.resetStyle(t),i.fillDragParams(n,t)}));triggerEvent(t,"onBeforeRenderGroup",fillParams(t,e,{isPinch:!!e.isPinch,targets:t.props.targets,events:a}))},dragGroupEnd:function(t,e){this.dragEnd(t,e),triggerEvent(t,"onBeforeRenderGroupEnd",fillParams(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag,targets:t.props.targets}))},dragControlStart:function(t,e){return this.dragStart(t,e)},dragControl:function(t,e){return this.drag(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupControlStart:function(t,e){return this.dragGroupStart(t,e)},dragGroupControl:function(t,e){return this.dragGroup(t,e)},dragGroupControlEnd:function(t,e){return this.dragGroupEnd(t,e)}},Renderable={name:"renderable",props:[],events:["renderStart","render","renderEnd","renderGroupStart","renderGroup","renderGroupEnd"],dragRelation:"weak",dragStart:function(t,e){triggerEvent(t,"onRenderStart",fillParams(t,e,{isPinch:!!e.isPinch}))},drag:function(t,e){triggerEvent(t,"onRender",this.fillDragParams(t,e))},dragAfter:function(t,e){return this.drag(t,e)},dragEnd:function(t,e){triggerEvent(t,"onRenderEnd",this.fillDragEndParams(t,e))},dragGroupStart:function(t,e){triggerEvent(t,"onRenderGroupStart",fillParams(t,e,{isPinch:!!e.isPinch,targets:t.props.targets}))},dragGroup:function(t,e){var i=this,n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.fillDragParams(n,t)}));triggerEvent(t,"onRenderGroup",fillParams(t,e,__assign$1(__assign$1({isPinch:!!e.isPinch,targets:t.props.targets,transform:getNextTransformText(e),transformObject:{}},fillCSSObject(getNextStyle(e))),{events:a})))},dragGroupEnd:function(t,e){var i=this,n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.fillDragEndParams(n,t)}));triggerEvent(t,"onRenderGroupEnd",fillParams(t,e,__assign$1({isPinch:!!e.isPinch,isDrag:e.isDrag,targets:t.props.targets,events:a,transformObject:{},transform:getNextTransformText(e)},fillCSSObject(getNextStyle(e)))))},dragControlStart:function(t,e){return this.dragStart(t,e)},dragControl:function(t,e){return this.drag(t,e)},dragControlAfter:function(t,e){return this.dragAfter(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupControlStart:function(t,e){return this.dragGroupStart(t,e)},dragGroupControl:function(t,e){return this.dragGroup(t,e)},dragGroupControlEnd:function(t,e){return this.dragGroupEnd(t,e)},fillDragParams:function(t,e){var i={};return parse(getNextTransforms(e)||[]).forEach((function(t){i[t.name]=t.functionValue})),fillParams(t,e,__assign$1({isPinch:!!e.isPinch,transformObject:i,transform:getNextTransformText(e)},fillCSSObject(getNextStyle(e))))},fillDragEndParams:function(t,e){var i={};return parse(getNextTransforms(e)||[]).forEach((function(t){i[t.name]=t.functionValue})),fillParams(t,e,__assign$1({isPinch:!!e.isPinch,isDrag:e.isDrag,transformObject:i,transform:getNextTransformText(e)},fillCSSObject(getNextStyle(e))))}};function triggerAble(t,e,i,n,s,a,o){a.clientDistX=a.distX,a.clientDistY=a.distY;var r="Start"===s,l="End"===s,h="After"===s,c=t.state.target,u=a.isRequest,d=n.indexOf("Control")>-1;if(!c||r&&d&&!u&&t.areaElement===a.inputEvent.target)return!1;var p=__spreadArray([],__read(e),!1);if(u){var g=a.requestAble;p.some((function(t){return t.name===g}))||p.push.apply(p,__spreadArray([],__read(t.props.ables.filter((function(t){return t.name===g}))),!1))}if(!p.length||p.every((function(t){return t.dragRelation})))return!1;var f,b=a.inputEvent;l&&b&&(f=document.elementFromPoint(a.clientX,a.clientY)||b.target);var v=!1,m=function(){var t;v=!0,null===(t=a.stop)||void 0===t||t.call(a)},y=r&&(!t.targetGesto||!t.controlGesto||!t.targetGesto.isFlag()||!t.controlGesto.isFlag());y&&t.updateRect(s,!0,!1);var S=a.datas,w=d?"controlGesto":"targetGesto",x=t[w],C=function(e,i,n){if(!(i in e)||x!==t[w])return!1;var s=e.name,o=S[s]||(S[s]={});if(r&&(o.isEventStart=!n||!e[n]||e[n](t,a)),!o.isEventStart)return!1;var l=e[i](t,__assign$1(__assign$1({},a),{stop:m,datas:o,originalDatas:S,inputTarget:f}));return t._emitter.off(),r&&!1===l&&(o.isEventStart=!1),l};y&&p.forEach((function(e){e.unset&&e.unset(t)})),C(BeforeRenderable,"drag".concat(n).concat(s));var D=0,T=0;i.forEach((function(e){if(v)return!1;var i="".concat(e).concat(n).concat(s),o="".concat(e).concat(n,"Condition");""!==s||u||convertDragDist(t.state,a);var l=p.filter((function(t){return t[i]})),h=(l=l.filter((function(t,e){return t.name&&l.indexOf(t)===e}))).filter((function(t){return C(t,i,o)})).length;v&&++D,h&&++T,!v&&r&&l.length&&!h&&(D+=l.filter((function(t){var e=t.name;return!!S[e].isEventStart&&"strong"!==t.dragRelation})).length?1:0)})),h&&!T||C(Renderable,"drag".concat(n).concat(s));var k=x!==t[w]||D===i.length;if((l||v||k)&&(t.state.gestos={},t.moveables&&t.moveables.forEach((function(t){t.state.gestos={}})),p.forEach((function(e){e.unset&&e.unset(t)}))),r&&!k&&!u&&T&&t.props.preventDefault&&(null==a||a.preventDefault()),t.isUnmounted||k)return!1;(!r&&T&&!o||l)&&(t.props.flushSync||defaultSync)((function(){t.updateRect(l?s:"",!0,!1),t.forceUpdate()}));return r||l||h||!T||o||triggerAble(t,e,i,n,s+"After",a),!0}function checkMoveableTarget(t,e){return function(i,n){var s;void 0===n&&(n=i.inputEvent.target);var a=n,o=t.areaElement,r=t._dragTarget;return!(!r||!e&&(null===(s=t.controlGesto)||void 0===s?void 0:s.isFlag()))&&(a===r||r.contains(a)||a===o||!t.isMoveableElement(a)&&!t.controlBox.contains(a)||hasClass(a,"moveable-area")||hasClass(a,"moveable-padding")||hasClass(a,"moveable-edgeDraggable"))}}function getTargetAbleGesto(t,e,i){var n=t.controlBox,s=[],a=t.props,o=a.dragArea,r=t.state.target,l=a.dragTarget;s.push(n),o&&!l||s.push(e),!o&&l&&r&&e!==r&&a.dragTargetSelf&&s.push(r);var h=checkMoveableTarget(t);return getAbleGesto(t,s,"targetAbles",i,{dragStart:h,pinchStart:h})}function getControlAbleGesto(t,e){var i=t.controlBox,n=[];n.push(i);var s=checkMoveableTarget(t,!0),a=function(t,e){return void 0===e&&(e=t.inputEvent.target),e===i||!s(t,e)};return getAbleGesto(t,n,"controlAbles",e,{dragStart:a,pinchStart:a})}function getAbleGesto(t,e,i,n,s){void 0===s&&(s={});var a="targetAbles"===i,o=t.props,r=o.pinchOutside,l=o.pinchThreshold,h=o.preventClickEventOnDrag,c=o.preventClickDefault,u=o.checkInput,d=o.dragFocusedInput,p=o.preventDefault,g=void 0===p||p,f=o.preventRightClick,b=void 0===f||f,v=o.preventWheelClick,m={preventDefault:g,preventRightClick:b,preventWheelClick:void 0===v||v,container:getRefTarget(o.dragContainer,!0)||getWindow(t.getControlBoxElement()),pinchThreshold:l,pinchOutside:r,preventClickEventOnDrag:!!a&&h,preventClickEventOnDragStart:!!a&&c,preventClickEventByCondition:a?null:function(e){return t.controlBox.contains(e.target)},checkInput:!!a&&u,dragFocusedInput:d},y=new Gesto(e,m),S="Control"===n;return["drag","pinch"].forEach((function(e){["Start","","End"].forEach((function(a){y.on("".concat(e).concat(a),(function(o){var r,l=o.eventType,h="drag"===e&&o.isPinch;if(!s[l]||s[l](o)){if(!h){var c="drag"===e?[e]:["drag",e],u=__spreadArray([],__read(t[i]),!1);triggerAble(t,u,c,n,a,o)?(t.props.stopPropagation||"Start"===a&&S)&&(null===(r=null==o?void 0:o.inputEvent)||void 0===r||r.stopPropagation()):o.stop()}}else o.stop()}))}))})),y}var EventManager=function(){function t(t,e,i){var n=this;this.target=t,this.moveable=e,this.eventName=i,this.ables=[],this._onEvent=function(t){var e=n.eventName,i=n.moveable;i.state.disableNativeEvent||n.ables.forEach((function(n){n[e](i,{inputEvent:t})}))},t.addEventListener(i.toLowerCase(),this._onEvent)}return t.prototype.setAbles=function(t){this.ables=t},t.prototype.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},t}();function calculateMatrixStack(t,e,i,n){var s;void 0===i&&(i=e);var a=getMatrixStackInfo(t,e),o=a.matrixes,r=a.is3d,l=a.targetMatrix,h=a.transformOrigin,c=a.targetOrigin,u=a.offsetContainer,d=a.hasFixed,p=a.zoom,g=getCachedMatrixContainerInfo(u,i),f=g.matrixes,b=g.is3d,v=g.offsetContainer,m=g.zoom,y=n||b||r,S=y?4:3,w="svg"!==t.tagName.toLowerCase()&&"ownerSVGElement"in t,x=l,C=createIdentityMatrix(S),D=createIdentityMatrix(S),T=createIdentityMatrix(S),k=createIdentityMatrix(S),$=o.length,O=f.map((function(t){return __assign$1(__assign$1({},t),{matrix:t.matrix?__spreadArray([],__read(t.matrix),!1):void 0})})).reverse();o.reverse(),!r&&y&&(x=convertDimension(x,3,4),convert3DMatrixes(o)),!b&&y&&convert3DMatrixes(O),O.forEach((function(t){D=multiply(D,t.matrix,S)}));var P=i||getDocumentBody(t),L=(null===(s=O[0])||void 0===s?void 0:s.target)||getOffsetInfo(P,P,!0).offsetParent,G=O.slice(1).reduce((function(t,e){return multiply(t,e.matrix,S)}),createIdentityMatrix(S));o.forEach((function(t,e){if($-2===e&&(T=C.slice()),$-1===e&&(k=C.slice()),!t.matrix){var i=getSVGOffset(t,o[e+1],L,S,multiply(G,C,S));t.matrix=createOriginMatrix(i,S)}C=multiply(C,t.matrix,S)}));var F=!w&&r;x||(x=createIdentityMatrix(F?4:3));var I=makeMatrixCSS(w&&16===x.length?convertDimension(x,4,3):x,F),E=D;return D=ignoreDimension(D,S,S),{hasZoom:1!==p||1!==m,hasFixed:d,matrixes:o,rootMatrix:D,originalRootMatrix:E,beforeMatrix:T,offsetMatrix:k,allMatrix:C,targetMatrix:x,targetTransform:I,inlineTransform:t.style.transform,transformOrigin:h,targetOrigin:c,is3d:y,offsetContainer:u,offsetRootContainer:v}}function calculateElementInfo(t,e,i,n){void 0===i&&(i=e);var s=0,a=0,o=0,r={},l=getSize(t);if(t&&(s=l.offsetWidth,a=l.offsetHeight),t){var h=calculateMatrixStack(t,e,i,n),c=calculateElementPosition(h.allMatrix,h.transformOrigin,s,a);r=__assign$1(__assign$1({},h),c);var u=calculateElementPosition(h.allMatrix,[50,50],100,100);o=getRotationRad([u.pos1,u.pos2],u.direction)}var d=n?4:3;return __assign$1(__assign$1(__assign$1({hasZoom:!1,width:s,height:a,rotation:o},l),{originalRootMatrix:createIdentityMatrix(d),rootMatrix:createIdentityMatrix(d),beforeMatrix:createIdentityMatrix(d),offsetMatrix:createIdentityMatrix(d),allMatrix:createIdentityMatrix(d),targetMatrix:createIdentityMatrix(d),targetTransform:"",inlineTransform:"",transformOrigin:[0,0],targetOrigin:[0,0],is3d:!!n,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1,hasFixed:!1,offsetContainer:null,offsetRootContainer:null,matrixes:[]}),r)}function getElementInfo$2(t,e,i){return void 0===i&&(i=e),calculateElementInfo(t,e,i,!0)}function getMoveableTargetInfo(t,e,i,n,s,a){void 0===a&&(a=[]);var o=1,r=[0,0],l=resetClientRect(),h=resetClientRect(),c=resetClientRect(),u=resetClientRect(),d=[0,0],p={},g=calculateElementInfo(e,i,s,!0);if(e){var f=getCachedStyle(e);a.forEach((function(t){p[t]=f(t)}));var b=g.is3d?4:3,v=calculateElementPosition(g.offsetMatrix,plus(g.transformOrigin,getOrigin(g.targetMatrix,b)),g.width,g.height);o=v.direction,r=plus(v.origin,[v.left-g.left,v.top-g.top]),u=getClientRect(g.offsetRootContainer);var m=getOffsetInfo(n,n,!0).offsetParent||g.offsetRootContainer;if(g.hasZoom){var y=calculateElementPosition(multiply(g.originalRootMatrix,g.allMatrix),g.transformOrigin,g.width,g.height),S=calculateElementPosition(g.originalRootMatrix,getTransformOriginArray(getCachedStyle(m)("transformOrigin")).map((function(t){return parseFloat(t)})),m.offsetWidth,m.offsetHeight);if(l=getClientRectByPosition(y,u),c=getClientRectByPosition(S,u,m,!0),t){var w=y.left,x=y.top;h=getClientRectByPosition({left:w,top:x,bottom:x,right:x},u)}}else{l=getClientRect(e),c=getCachedClientRect(m),t&&(h=getClientRect(t));var C=c.left,D=c.top,T=c.clientLeft,k=c.clientTop,$=[l.left-C,l.top-D];d=minus(calculateInversePosition(g.rootMatrix,$,4),[T+g.left,k+g.top])}}return __assign$1({targetClientRect:l,containerClientRect:c,moveableClientRect:h,rootContainerClientRect:u,beforeDirection:o,beforeOrigin:r,originalBeforeOrigin:r,target:e,style:p,offsetDelta:d},g)}function getPersistState(t){var e=t.pos1,i=t.pos2,n=t.pos3,s=t.pos4;if(!(e&&i&&n&&s))return null;var a=getMinMaxs([e,i,n,s]),o=[a.minX,a.minY],r=minus(t.origin,o);return e=minus(e,o),i=minus(i,o),n=minus(n,o),s=minus(s,o),__assign$1(__assign$1({},t),{left:t.left,top:t.top,posDelta:o,pos1:e,pos2:i,pos3:n,pos4:s,origin:r,beforeOrigin:r,isPersisted:!0})}var MoveableManager$1=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state=__assign$1({container:null,gestos:{},renderLines:[[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]]],renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1,posDelta:[0,0]},getMoveableTargetInfo(null)),e.renderState={},e.enabledAbles=[],e.targetAbles=[],e.controlAbles=[],e.rotation=0,e.scale=[1,1],e.isMoveableMounted=!1,e.isUnmounted=!1,e.events={mouseEnter:null,mouseLeave:null},e._emitter=new EventEmitter$1,e._prevOriginalDragTarget=null,e._originalDragTarget=null,e._prevDragTarget=null,e._dragTarget=null,e._prevPropTarget=null,e._propTarget=null,e._prevDragArea=!1,e._isPropTargetChanged=!1,e._hasFirstTarget=!1,e._reiszeObserver=null,e._observerId=0,e._mutationObserver=null,e._rootContainer=null,e._viewContainer=null,e._viewClassNames=[],e._store={},e.checkUpdateRect=function(){if(!e.isDragging()){var t=e.props.parentMoveable;t?t.checkUpdateRect():(cancelAnimationFrame$1(e._observerId),e._observerId=requestAnimationFrame$2((function(){e.isDragging()||e.updateRect()})))}},e._onPreventClick=function(t){t.stopPropagation(),t.preventDefault()},e}return __extends$1(e,t),e.prototype.render=function(){var t=this.props,e=this.getState(),i=t.parentPosition,n=t.className,s=t.target,a=t.zoom,o=t.cspNonce,r=t.translateZ,l=t.cssStyled,h=t.groupable,c=t.linePadding,u=t.controlPadding;this._checkUpdateRootContainer(),this.checkUpdate(),this.updateRenderPoses();var d=__read(i||[0,0],2),p=d[0],g=d[1],f=e.left,b=e.top,v=e.target,m=e.direction,y=e.hasFixed,S=e.offsetDelta,w=t.targets,x=this.isDragging(),C={};this.getEnabledAbles().forEach((function(t){C["data-able-".concat(t.name.toLowerCase())]=!0}));var D=this._getAbleClassName(),T=w&&w.length&&(v||h)||s||!this._hasFirstTarget&&this.state.isPersisted,k=this.controlBox||this.props.firstRenderState||this.props.persistData,$=[f-p,b-g];!h&&t.useAccuratePosition&&($[0]+=S[0],$[1]+=S[1]);var O={position:y?"fixed":"absolute",display:T?"block":"none",visibility:k?"visible":"hidden",transform:"translate3d(".concat($[0],"px, ").concat($[1],"px, ").concat(r,")"),"--zoom":a,"--zoompx":"".concat(a,"px")};return c&&(O["--moveable-line-padding"]=c),u&&(O["--moveable-control-padding"]=u),createElement$1(l,__assign$1({cspNonce:o,ref:ref(this,"controlBox"),className:"".concat(prefix("control-box",-1===m?"reverse":"",x?"dragging":"")," ").concat(D," ").concat(n)},C,{onClick:this._onPreventClick,style:O}),this.renderAbles(),this._renderLines())},e.prototype.componentDidMount=function(){this.isMoveableMounted=!0,this.isUnmounted=!1;var t=this.props,e=t.parentMoveable,i=t.container;this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(this.props),i||e||this.state.isPersisted||(this.updateRect("",!1,!1),this.forceUpdate())},e.prototype.componentDidUpdate=function(t){this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateNativeEvents(),this._updateTargets(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(t)},e.prototype.componentWillUnmount=function(){var t,e;this.isMoveableMounted=!1,this.isUnmounted=!0,this._emitter.off(),null===(t=this._reiszeObserver)||void 0===t||t.disconnect(),null===(e=this._mutationObserver)||void 0===e||e.disconnect(),this._viewContainer&&this._changeAbleViewClassNames([]),unsetGesto(this,!1),unsetGesto(this,!0);var i=this.events;for(var n in i){var s=i[n];s&&s.destroy()}},e.prototype.getTargets=function(){var t=this.props.target;return t?[t]:[]},e.prototype.getAble=function(t){return find$1(this.props.ables||[],(function(e){return e.name===t}))},e.prototype.getContainer=function(){var t=this.props,e=t.parentMoveable,i=t.wrapperMoveable;return t.container||i&&i.getContainer()||e&&e.getContainer()||this.controlBox.parentElement},e.prototype.getControlBoxElement=function(){return this.controlBox},e.prototype.getDragElement=function(){return this._dragTarget},e.prototype.isMoveableElement=function(t){var e;return t&&((null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"class"))||"").indexOf(PREFIX)>-1},e.prototype.dragStart=function(t,e){void 0===e&&(e=t.target);var i=this.targetGesto,n=this.controlGesto;return i&&checkMoveableTarget(this)({inputEvent:t},e)?i.isFlag()||i.triggerDragStart(t):n&&this.isMoveableElement(e)&&(n.isFlag()||n.triggerDragStart(t)),this},e.prototype.hitTest=function(t){var e,i=this.state,n=i.target,s=i.pos1,a=i.pos2,o=i.pos3,r=i.pos4,l=i.targetClientRect;if(!n)return 0;if(isNode(t)){var h=t.getBoundingClientRect();e={left:h.left,top:h.top,width:h.width,height:h.height}}else e=__assign$1({width:0,height:0},t);var c=e.left,u=e.top,d=e.width,p=e.height,g=fitPoints([s,a,r,o],l),f=getOverlapSize$1(g,[[c,u],[c+d,u],[c+d,u+p],[c,u+p]]),b=getAreaSize(g);return f&&b?Math.min(100,f/b*100):0},e.prototype.isInside=function(t,e){var i=this.state,n=i.target,s=i.pos1,a=i.pos2,o=i.pos3,r=i.pos4,l=i.targetClientRect;return!!n&&isInside([t,e],fitPoints([s,a,r,o],l))},e.prototype.updateRect=function(t,e,i){void 0===i&&(i=!0);var n=this.props,s=!n.parentPosition&&!n.wrapperMoveable;s&&setStoreCache(!0);var a=n.parentMoveable,o=this.state.target||n.target,r=this.getContainer(),l=a?a._rootContainer:this._rootContainer,h=getMoveableTargetInfo(this.controlBox,o,r,r,l||r,this._getRequestStyles());if(!o&&this._hasFirstTarget&&n.persistData){var c=getPersistState(n.persistData);for(var u in c)h[u]=c[u]}s&&setStoreCache(),this.updateState(h,!a&&i)},e.prototype.isDragging=function(t){var e,i,n=this.targetGesto,s=this.controlGesto;return(null==n?void 0:n.isFlag())?!t||!!(null===(e=n.getEventData()[t])||void 0===e?void 0:e.isEventStart):!!(null==s?void 0:s.isFlag())&&(!t||!!(null===(i=s.getEventData()[t])||void 0===i?void 0:i.isEventStart))},e.prototype.updateTarget=function(t){this.updateRect(t,!0)},e.prototype.getRect=function(){var t=this.state,e=getAbsolutePosesByState(this.state),i=__read(e,4),n=i[0],s=i[1],a=i[2],o=i[3],r=getRect(e),l=t.width,h=t.height,c=r.width,u=r.height,d=r.left,p=r.top,g=[t.left,t.top],f=plus(g,t.origin);return{width:c,height:u,left:d,top:p,pos1:n,pos2:s,pos3:a,pos4:o,offsetWidth:l,offsetHeight:h,beforeOrigin:plus(g,t.beforeOrigin),origin:f,transformOrigin:t.transformOrigin,rotation:this.getRotation()}},e.prototype.getManager=function(){return this},e.prototype.stopDrag=function(t){var e;t&&"target"!==t||(!1===(null==(e=this.targetGesto)?void 0:e.isIdle())&&unsetAbles(this,!1),null==e||e.stop());t&&"control"!==t||(!1===(null==(e=this.controlGesto)?void 0:e.isIdle())&&unsetAbles(this,!0),null==e||e.stop())},e.prototype.getRotation=function(){var t=this.state;return getAbsoluteRotation(t.pos1,t.pos2,t.direction)},e.prototype.request=function(t,e,i){void 0===e&&(e={});var n=this,s=n.props,a=s.parentMoveable||s.wrapperMoveable||n,o=a.props.ables,r=s.groupable,l=find$1(o,(function(e){return e.name===t}));if(this.isDragging()||!l||!l.request)return{request:function(){return this},requestEnd:function(){return this}};var h=l.request(n),c=i||e.isInstant,u=h.isControl?"controlAbles":"targetAbles",d="".concat(r?"Group":"").concat(h.isControl?"Control":""),p=__spreadArray([],__read(a[u]),!1),g={request:function(e){return triggerAble(n,p,["drag"],d,"",__assign$1(__assign$1({},h.request(e)),{requestAble:t,isRequest:!0}),c),g},requestEnd:function(){return triggerAble(n,p,["drag"],d,"End",__assign$1(__assign$1({},h.requestEnd()),{requestAble:t,isRequest:!0}),c),g}};return triggerAble(n,p,["drag"],d,"Start",__assign$1(__assign$1({},h.requestStart(e)),{requestAble:t,isRequest:!0}),c),c?g.request(e).requestEnd():g},e.prototype.getMoveables=function(){return[this]},e.prototype.destroy=function(){this.componentWillUnmount()},e.prototype.updateRenderPoses=function(){var t=this.getState(),e=this.props,i=e.padding,n=t.originalBeforeOrigin,s=t.transformOrigin,a=t.allMatrix,o=t.is3d,r=t.pos1,l=t.pos2,h=t.pos3,c=t.pos4,u=t.left,d=t.top,p=t.isPersisted,g=e.zoom||1;if(!i&&g<=1)return t.renderPoses=[r,l,h,c],void(t.renderLines=[[r,l],[l,c],[c,h],[h,r]]);var f=getPaddingBox(i||{}),b=f.left,v=f.top,m=f.bottom,y=f.right,S=o?4:3,w=multiplies(S,createOriginMatrix((p?s:this.controlBox&&e.groupable?n:plus(n,[u,d])).map((function(t){return-t})),S),a,createOriginMatrix(s,S)),x=calculatePadding(w,r,[-b,-v],S),C=calculatePadding(w,l,[y,-v],S),D=calculatePadding(w,h,[-b,m],S),T=calculatePadding(w,c,[y,m],S);if(t.renderPoses=[x,C,D,T],t.renderLines=[[x,C],[C,T],[T,D],[D,x]],g){var k=g/2;t.renderLines=[[calculatePadding(w,r,[-b-k,-v],S),calculatePadding(w,l,[y+k,-v],S)],[calculatePadding(w,l,[y,-v-k],S),calculatePadding(w,c,[y,m+k],S)],[calculatePadding(w,c,[y+k,m],S),calculatePadding(w,h,[-b-k,m],S)],[calculatePadding(w,h,[-b,m+k],S),calculatePadding(w,r,[-b,-v-k],S)]]}},e.prototype.checkUpdate=function(){this._isPropTargetChanged=!1;var t=this.props,e=t.target,i=t.container,n=t.parentMoveable,s=this.state,a=s.target,o=s.container;if(a||e){this.updateAbles();var r=!equals(a,e);if(r||!equals(o,i)){var l=i||this.controlBox;l&&this.unsetAbles(),this.updateState({target:e,container:i}),!n&&l&&this.updateRect("End",!1,!1),this._isPropTargetChanged=r}}},e.prototype.waitToChangeTarget=function(){return new Promise((function(){}))},e.prototype.triggerEvent=function(t,e){var i=this.props;if(this._emitter.trigger(t,e),i.parentMoveable&&e.isRequest&&!e.isRequestChild)return i.parentMoveable.triggerEvent(t,e,!0);var n=i[t];return n&&n(e)},e.prototype.useCSS=function(t,e){var i=this.props.customStyledMap,n=t+e;return i[n]||(i[n]=styled(t,e)),i[n]},e.prototype.getState=function(){var t,e=this.props;(e.target||(null===(t=e.targets)||void 0===t?void 0:t.length))&&(this._hasFirstTarget=!0);var i=this.controlBox,n=e.persistData,s=e.firstRenderState;if(s&&!i)return s;if(!this._hasFirstTarget&&n){var a=getPersistState(n);if(a)return this.updateState(a,!1),this.state}return this.state.isPersisted=!1,this.state},e.prototype.updateSelectors=function(){},e.prototype.unsetAbles=function(){var t=this;this.targetAbles.forEach((function(e){e.unset&&e.unset(t)}))},e.prototype.updateAbles=function(t,e){void 0===t&&(t=this.props.ables),void 0===e&&(e="");var i=this.props.triggerAblesSimultaneously,n=this.getEnabledAbles(t),s="drag".concat(e,"Start"),a="pinch".concat(e,"Start"),o="drag".concat(e,"ControlStart"),r=filterAbles(n,[s,a],i),l=filterAbles(n,[o],i);this.enabledAbles=n,this.targetAbles=r,this.controlAbles=l},e.prototype.updateState=function(t,e){if(e){if(this.isUnmounted)return;this.setState(t)}else{var i=this.state;for(var n in t)i[n]=t[n]}},e.prototype.getEnabledAbles=function(t){void 0===t&&(t=this.props.ables);var e=this.props;return t.filter((function(t){return t&&(t.always&&!1!==e[t.name]||e[t.name])}))},e.prototype.renderAbles=function(){var t=this,e=this.props.triggerAblesSimultaneously,i={createElement:createElement$1};return this.renderState={},groupByMap(flat(filterAbles(this.getEnabledAbles(),["render"],e).map((function(e){return(0,e.render)(t,i)||[]}))).filter((function(t){return t})),(function(t){return t.key})).map((function(t){return t[0]}))},e.prototype.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},e.prototype._getRequestStyles=function(){return this.getEnabledAbles().reduce((function(t,e){var i,n,s=null!==(n=null===(i=e.requestStyle)||void 0===i?void 0:i.call(e))&&void 0!==n?n:[];return __spreadArray(__spreadArray([],__read(t),!1),__read(s),!1)}),__spreadArray([],__read(this.props.requestStyles||[]),!1))},e.prototype._updateObserver=function(t){this._updateResizeObserver(t),this._updateMutationObserver(t)},e.prototype._updateEvents=function(){var t=this.targetAbles.length,e=this.controlAbles.length,i=this._dragTarget;(!t&&this.targetGesto||this._isTargetChanged(!0))&&(unsetGesto(this,!1),this.updateState({gestos:{}})),e||unsetGesto(this,!0),i&&t&&!this.targetGesto&&(this.targetGesto=getTargetAbleGesto(this,i,"")),!this.controlGesto&&e&&(this.controlGesto=getControlAbleGesto(this,"Control"))},e.prototype._updateTargets=function(){var t=this.props;this._prevPropTarget=this._propTarget,this._prevDragTarget=this._dragTarget,this._prevOriginalDragTarget=this._originalDragTarget,this._prevDragArea=t.dragArea,this._propTarget=t.target,this._originalDragTarget=t.dragTarget||t.target,this._dragTarget=getRefTarget(this._originalDragTarget,!0)},e.prototype._renderLines=function(){var t=this.props,e=t.zoom,i=t.hideDefaultLines,n=t.hideChildMoveableDefaultLines,s=t.parentMoveable;if(i||s&&n)return[];var a=this.getState(),o={createElement:createElement$1};return a.renderLines.map((function(t,i){return renderLine(o,"",t[0],t[1],e,"render-line-".concat(i))}))},e.prototype._isTargetChanged=function(t){var e=this.props,i=e.dragTarget||e.target,n=this._prevOriginalDragTarget,s=this._prevDragArea,a=e.dragArea;return!a&&n!==i||(t||a)&&s!==a||this._prevPropTarget!=this._propTarget},e.prototype._updateNativeEvents=function(){var t=this,e=this.props.dragArea?this.areaElement:this.state.target,i=this.events,n=getKeys(i);if(this._isTargetChanged())for(var s in i){var a=i[s];a&&a.destroy(),i[s]=null}if(e){var o=this.enabledAbles;n.forEach((function(n){var s=filterAbles(o,[n]),a=s.length>0,r=i[n];a?(r||(r=new EventManager(e,t,n),i[n]=r),r.setAbles(s)):r&&(r.destroy(),i[n]=null)}))}},e.prototype._checkUpdateRootContainer=function(){var t=this.props.rootContainer;!this._rootContainer&&t&&(this._rootContainer=getRefTarget(t,!0))},e.prototype._checkUpdateViewContainer=function(){var t=this.props.viewContainer;!this._viewContainer&&t&&(this._viewContainer=getRefTarget(t,!0)),this._viewContainer&&this._changeAbleViewClassNames(__spreadArray(__spreadArray([],__read(this._getAbleViewClassNames()),!1),[this.isDragging()?VIEW_DRAGGING:""],!1))},e.prototype._changeAbleViewClassNames=function(t){var e=this._viewContainer,i=groupBy(t.filter(Boolean),(function(t){return t})).map((function(t){return __read(t,1)[0]})),n=this._viewClassNames,s=diff$1(n,i),a=s.removed,o=s.added;a.forEach((function(t){removeClass(e,n[t])})),o.forEach((function(t){addClass(e,i[t])})),this._viewClassNames=i},e.prototype._getAbleViewClassNames=function(){var t=this;return(this.getEnabledAbles().map((function(e){var i;return(null===(i=e.viewClassName)||void 0===i?void 0:i.call(e,t))||""})).join(" ")+" ".concat(this._getAbleClassName("-view"))).split(/\s+/g)},e.prototype._getAbleClassName=function(t){var e=this;void 0===t&&(t="");var i=this.getEnabledAbles(),n=this.targetGesto,s=this.controlGesto,a=(null==n?void 0:n.isFlag())?n.getEventData():{},o=(null==s?void 0:s.isFlag())?s.getEventData():{};return i.map((function(i){var n,s,r,l=i.name,h=(null===(n=i.className)||void 0===n?void 0:n.call(i,e))||"";return((null===(s=a[l])||void 0===s?void 0:s.isEventStart)||(null===(r=o[l])||void 0===r?void 0:r.isEventStart))&&(h+=" ".concat(prefix("".concat(l).concat(t,"-dragging")))),h.trim()})).filter(Boolean).join(" ")},e.prototype._updateResizeObserver=function(t){var e,i=this.props,n=i.target,s=getWindow(this.getControlBoxElement());if(s.ResizeObserver&&n&&i.useResizeObserver){if(t.target!==n||!this._reiszeObserver){var a=new s.ResizeObserver(this.checkUpdateRect);a.observe(n,{box:"border-box"}),this._reiszeObserver=a}}else null===(e=this._reiszeObserver)||void 0===e||e.disconnect()},e.prototype._updateMutationObserver=function(t){var e,i=this,n=this.props,s=n.target,a=getWindow(this.getControlBoxElement());if(a.MutationObserver&&s&&n.useMutationObserver){if(t.target!==s||!this._mutationObserver){var o=new a.MutationObserver((function(t){var e,n;try{for(var s=__values(t),a=s.next();!a.done;a=s.next()){var o=a.value;"attributes"===o.type&&"style"===o.attributeName&&i.checkUpdateRect()}}catch(r){e={error:r}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}}));o.observe(s,{attributes:!0}),this._mutationObserver=o}}else null===(e=this._mutationObserver)||void 0===e||e.disconnect()},e.defaultProps={dragTargetSelf:!1,target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,parentMoveable:null,wrapperMoveable:null,isWrapperMounted:!1,parentPosition:null,warpSelf:!1,svgOrigin:"",dragContainer:null,useResizeObserver:!1,useMutationObserver:!1,preventDefault:!0,preventRightClick:!0,preventWheelClick:!0,linePadding:0,controlPadding:0,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,dragFocusedInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{},stopPropagation:!1,preventClickDefault:!1,preventClickEventOnDrag:!0,flushSync:defaultSync,firstRenderState:null,persistData:null,viewContainer:null,requestStyles:[],useAccuratePosition:!1},e}(PureComponent),Groupable={name:"groupable",props:["defaultGroupRotate","useDefaultGroupRotate","defaultGroupOrigin","groupable","groupableProps","targetGroups","hideChildMoveableDefaultLines"],events:[],render:function(t,e){var i,n=t.props,s=n.targets||[],a=t.getState(),o=a.left,r=a.top,l=a.isPersisted,h=n.zoom||1,c=t.renderGroupRects,u=(null===(i=n.persistData)||void 0===i?void 0:i.children)||[];l?s=u.map((function(){return null})):u=[];var d=watchValue(t,"parentPosition",[o,r],(function(t){return t.join(",")})),p=watchValue(t,"requestStyles",t.getRequestChildStyles(),(function(t){return t.join(",")}));return t.moveables=t.moveables.slice(0,s.length),__spreadArray(__spreadArray([],__read(s.map((function(i,s){return e.createElement(MoveableManager$1,{key:"moveable"+s,ref:refs(t,"moveables",s),target:i,origin:!1,requestStyles:p,cssStyled:n.cssStyled,customStyledMap:n.customStyledMap,useResizeObserver:n.useResizeObserver,useMutationObserver:n.useMutationObserver,hideChildMoveableDefaultLines:n.hideChildMoveableDefaultLines,parentMoveable:t,parentPosition:[o,r],persistData:u[s],zoom:h})}))),!1),__read(flat(c.map((function(t,i){var n=[t.pos1,t.pos2,t.pos3,t.pos4];return[[0,1],[1,3],[3,2],[2,0]].map((function(t,s){var a=__read(t,2),o=a[0],r=a[1];return renderLine(e,"",minus(n[o],d),minus(n[r],d),h,"group-rect-".concat(i,"-").concat(s))}))})))),!1)}},Clickable=makeAble("clickable",{props:["clickable"],events:["click","clickGroup"],always:!0,dragRelation:"weak",dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(t,e){e.datas.inputTarget=e.inputEvent&&e.inputEvent.target},dragEnd:function(t,e){var i=t.props.target,n=e.inputEvent,s=e.inputTarget,a=!t.isMoveableElement(s)&&t.controlBox.contains(s);if(n&&s&&!e.isDrag&&!t.isMoveableElement(s)&&!a){var o=i.contains(s);triggerEvent(t,"onClick",fillParams(t,e,{isDouble:e.isDouble,inputTarget:s,isTarget:i===s,moveableTarget:t.props.target,containsTarget:o}))}},dragGroupEnd:function(t,e){var i=e.inputEvent,n=e.inputTarget;if(i&&n&&!e.isDrag&&!t.isMoveableElement(n)&&e.datas.inputTarget!==n){var s=t.props.targets,a=s.indexOf(n),o=a>-1,r=!1;-1===a&&(r=(a=findIndex(s,(function(t){return t.contains(n)})))>-1),triggerEvent(t,"onClickGroup",fillParams(t,e,{isDouble:e.isDouble,targets:s,inputTarget:n,targetIndex:a,isTarget:o,containsTarget:r,moveableTarget:s[a]}))}},dragControlEnd:function(t,e){this.dragEnd(t,e)},dragGroupControlEnd:function(t,e){this.dragEnd(t,e)}});function getDraggableEvent(t){var e=t.originalDatas.draggable;return e||(t.originalDatas.draggable={},e=t.originalDatas.draggable),__assign$1(__assign$1({},t),{datas:e})}var edgeDraggable=makeAble("edgeDraggable",{css:[".edge.edgeDraggable.line {\ncursor: move;\n}"],render:function(t,e){var i=t.props,n=i.edgeDraggable;return n?renderEdgeLines(e,"edgeDraggable",n,t.getState().renderPoses,i.zoom):[]},dragCondition:function(t,e){var i,n=t.props,s=null===(i=e.inputEvent)||void 0===i?void 0:i.target;return!(!n.edgeDraggable||!s)&&(!n.draggable&&hasClass(s,prefix("direction"))&&hasClass(s,prefix("edge"))&&hasClass(s,prefix("edgeDraggable")))},dragStart:function(t,e){return Draggable.dragStart(t,getDraggableEvent(e))},drag:function(t,e){return Draggable.drag(t,getDraggableEvent(e))},dragEnd:function(t,e){return Draggable.dragEnd(t,getDraggableEvent(e))},dragGroupCondition:function(t,e){var i,n=t.props,s=null===(i=e.inputEvent)||void 0===i?void 0:i.target;return!(!n.edgeDraggable||!s)&&(!n.draggable&&hasClass(s,prefix("direction"))&&hasClass(s,prefix("line")))},dragGroupStart:function(t,e){return Draggable.dragGroupStart(t,getDraggableEvent(e))},dragGroup:function(t,e){return Draggable.dragGroup(t,getDraggableEvent(e))},dragGroupEnd:function(t,e){return Draggable.dragGroupEnd(t,getDraggableEvent(e))},unset:function(t){return Draggable.unset(t)}}),IndividualGroupable={name:"individualGroupable",props:["individualGroupable","individualGroupableProps"],events:[]},MOVEABLE_ABLES=[BeforeRenderable,Default,Snappable,Pinchable,Draggable,edgeDraggable,Resizable,Scalable,Warpable,Rotatable,Scrollable,Padding,Origin,OriginDraggable,Clippable,Roundable,Groupable,IndividualGroupable,Clickable,DragArea,Renderable],MOVEABLE_EVENTS=MOVEABLE_ABLES.reduce((function(t,e){return(e.events||[]).forEach((function(e){pushSet(t,e)})),t}),[]),MOVEABLE_PROPS=MOVEABLE_ABLES.reduce((function(t,e){return(e.props||[]).forEach((function(e){pushSet(t,e)})),t}),[]);function solveConstantsDistance(t,e){var i=__read(t,3),n=i[0],s=i[1],a=i[2];return(n*e[0]+s*e[1]+a)/Math.sqrt(n*n+s*s)}function solveC(t,e){var i=__read(t,2),n=i[0],s=i[1];return-n*e[0]-s*e[1]}function getMaxPos(t,e){return Math.max.apply(Math,__spreadArray([],__read(t.map((function(t){var i=__read(t,4),n=i[0],s=i[1],a=i[2],o=i[3];return Math.max(n[e],s[e],a[e],o[e])}))),!1))}function getMinPos(t,e){return Math.min.apply(Math,__spreadArray([],__read(t.map((function(t){var i=__read(t,4),n=i[0],s=i[1],a=i[2],o=i[3];return Math.min(n[e],s[e],a[e],o[e])}))),!1))}function getGroupRect(t,e){var i,n,s,a=[0,0],o=[0,0],r=[0,0],l=[0,0],h=0,c=0;if(!t.length)return{pos1:a,pos2:o,pos3:r,pos4:l,minX:0,minY:0,maxX:0,maxY:0,width:h,height:c,rotation:e};var u=throttle(e,TINY_NUM);if(u%90){var d=u/180*Math.PI,p=Math.tan(d),g=-1/p,f=[MAX_NUM,MIN_NUM],b=[[0,0],[0,0]],v=[MAX_NUM,MIN_NUM],m=[[0,0],[0,0]];t.forEach((function(t){t.forEach((function(t){var e=solveConstantsDistance([-p,1,0],t),i=solveConstantsDistance([-g,1,0],t);f[0]>e&&(b[0]=t,f[0]=e),f[1]<e&&(b[1]=t,f[1]=e),v[0]>i&&(m[0]=t,v[0]=i),v[1]<i&&(m[1]=t,v[1]=i)}))}));var y=__read(b,2),S=y[0],w=y[1],x=__read(m,2),C=x[0],D=x[1],T=[-p,1,solveC([-p,1],S)],k=[-p,1,solveC([-p,1],w)],$=[-g,1,solveC([-g,1],C)],O=[-g,1,solveC([-g,1],D)];a=(i=__read([[T,$],[T,O],[k,$],[k,O]].map((function(t){var e=__read(t,2);return getIntersectionPointsByConstants(e[0],e[1])[0]})),4))[0],o=i[1],r=i[2],l=i[3],h=v[1]-v[0],c=f[1]-f[0]}else{var P=getMinPos(t,0),L=getMinPos(t,1),G=getMaxPos(t,0),F=getMaxPos(t,1);if(a=[P,L],o=[G,L],r=[P,F],l=[G,F],h=G-P,c=F-L,u%180)a=(n=__read([r,a,l,o],4))[0],o=n[1],r=n[2],l=n[3],h=F-L,c=G-P}u%360>180&&(a=(s=__read([l,r,o,a],4))[0],o=s[1],r=s[2],l=s[3]);var I=getMinMaxs([a,o,r,l]);return{pos1:a,pos2:o,pos3:r,pos4:l,width:h,height:c,minX:I.minX,minY:I.minY,maxX:I.maxX,maxY:I.maxY,rotation:e}}function findMoveableGroups(t,e){var i=e.map((function(e){if(isArray(e)){var i=findMoveableGroups(t,e),n=i.length;return n>1?i:1===n?i[0]:null}var s=find$1(t,(function(t){return t.manager.props.target===e}));return s?(s.finded=!0,s.manager):null})).filter(Boolean);return 1===i.length&&isArray(i[0])?i[0]:i}var MoveableGroup=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.differ=new ChildrenDiffer,e.moveables=[],e.transformOrigin="50% 50%",e.renderGroupRects=[],e._targetGroups=[],e._hasFirstTargets=!1,e}return __extends$1(e,t),e.prototype.componentDidMount=function(){t.prototype.componentDidMount.call(this)},e.prototype.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},e.prototype.getTargets=function(){return this.props.targets},e.prototype.updateRect=function(t,e,i){var n;void 0===i&&(i=!0);var s=this.state;if(this.controlBox&&!s.isPersisted){setStoreCache(!0),this.moveables.forEach((function(e){e.updateRect(t,!1,!1)}));var a=this.props,o=this.moveables,r=s.target||a.target,l=o.map((function(t){return{finded:!1,manager:t}})),h=this.props.targetGroups||[],c=findMoveableGroups(l,h),u=a.useDefaultGroupRotate;c.push.apply(c,__spreadArray([],__read(l.filter((function(t){return!t.finded})).map((function(t){return t.manager}))),!1));var d=[],p=!e||""!==t&&a.updateGroup,g=a.defaultGroupRotate||0;if(!this._hasFirstTargets){var f=null===(n=a.persistData)||void 0===n?void 0:n.rotation;null!=f&&(g=f)}var b=function t(e,i,n){var s=e.map((function(e){if(isArray(e)){var n=t(e,i),s=[n.pos1,n.pos2,n.pos3,n.pos4];return d.push(n),{poses:s,rotation:n.rotation}}return{poses:getAbsolutePosesByState(e.state),rotation:e.getRotation()}})),a=s.map((function(t){return t.rotation})),o=0,r=a[0],l=a.every((function(t){return Math.abs(r-t)<.1}));return o=p?!u&&l?r:g:u||n||!l?i:r,getGroupRect(s.map((function(t){return t.poses})),o)}(c,this.rotation,!0);p&&(this.rotation=b.rotation,this.transformOrigin=a.defaultGroupOrigin||"50% 50%",this.scale=[1,1]),this._targetGroups=h,this.renderGroupRects=d;var v=this.transformOrigin,m=this.rotation,y=this.scale,S=b.width,w=b.height,x=b.minX,C=b.minY,D=getMinMaxs(rotatePosesInfo([[0,0],[S,0],[0,w],[S,w]],convertTransformOriginArray(v,S,w),this.rotation/180*Math.PI).result),T=D.minX,k=D.minY,$=" rotate(".concat(m,"deg)")+" scale(".concat(sign(y[0]),", ").concat(sign(y[1]),")"),O="translate(".concat(-T,"px, ").concat(-k,"px)").concat($);this.controlBox.style.transform="translate3d(".concat(x,"px, ").concat(C,"px, ").concat(this.props.translateZ||0,")"),r.style.cssText+="left:0px;top:0px;"+"transform-origin:".concat(v,";")+"width:".concat(S,"px;height:").concat(w,"px;")+"transform: ".concat(O),s.width=S,s.height=w;var P=this.getContainer(),L=getMoveableTargetInfo(this.controlBox,r,this.controlBox,this.getContainer(),this._rootContainer||P,[]),G=[L.left,L.top],F=__read(getAbsolutePosesByState(L),4),I=F[0],E=F[1],A=F[2],U=F[3],_=getMinMaxs([I,E,A,U]),j=[_.minX,_.minY],M=sign(y[0]*y[1]);L.pos1=minus(I,j),L.pos2=minus(E,j),L.pos3=minus(A,j),L.pos4=minus(U,j),L.left=x-L.left+j[0],L.top=C-L.top+j[1],L.origin=minus(plus(G,L.origin),j),L.beforeOrigin=minus(plus(G,L.beforeOrigin),j),L.originalBeforeOrigin=plus(G,L.originalBeforeOrigin),L.transformOrigin=minus(plus(G,L.transformOrigin),j),r.style.transform="translate(".concat(-T-j[0],"px, ").concat(-k-j[1],"px)")+$,setStoreCache(),this.updateState(__assign$1(__assign$1({},L),{posDelta:j,direction:M,beforeDirection:M}),i)}},e.prototype.getRect=function(){return __assign$1(__assign$1({},t.prototype.getRect.call(this)),{children:this.moveables.map((function(t){return t.getRect()}))})},e.prototype.triggerEvent=function(e,i,n){if(n||e.indexOf("Group")>-1)return t.prototype.triggerEvent.call(this,e,i);this._emitter.trigger(e,i)},e.prototype.getRequestChildStyles=function(){return this.getEnabledAbles().reduce((function(t,e){var i,n,s=null!==(n=null===(i=e.requestChildStyle)||void 0===i?void 0:i.call(e))&&void 0!==n?n:[];return __spreadArray(__spreadArray([],__read(t),!1),__read(s),!1)}),[])},e.prototype.getMoveables=function(){return __spreadArray([],__read(this.moveables),!1)},e.prototype.updateAbles=function(){t.prototype.updateAbles.call(this,__spreadArray(__spreadArray([],__read(this.props.ables),!1),[Groupable],!1),"Group")},e.prototype._updateTargets=function(){t.prototype._updateTargets.call(this),this._originalDragTarget=this.props.dragTarget||this.areaElement,this._dragTarget=getRefTarget(this._originalDragTarget,!0)},e.prototype._updateEvents=function(){var t=this.state,e=this.props,i=this._prevDragTarget,n=e.dragTarget||this.areaElement,s=e.targets,a=this.differ.update(s),o=a.added,r=a.changed,l=a.removed,h=o.length||l.length;(h||this._prevOriginalDragTarget!==this._originalDragTarget)&&(unsetGesto(this,!1),unsetGesto(this,!0),this.updateState({gestos:{}})),i!==n&&(t.target=null),t.target||(t.target=this.areaElement,this.controlBox.style.display="block"),t.target&&(this.targetGesto||(this.targetGesto=getTargetAbleGesto(this,this._dragTarget,"Group")),this.controlGesto||(this.controlGesto=getControlAbleGesto(this,"GroupControl")));var c=!equals(t.container,e.container);c&&(t.container=e.container),(c||h||this.transformOrigin!==(e.defaultGroupOrigin||"50% 50%")||r.length||s.length&&!isDeepArrayEquals(this._targetGroups,e.targetGroups||[]))&&(this.updateRect(),this._hasFirstTargets=!0),this._isPropTargetChanged=!!h},e.prototype._updateObserver=function(){},e.defaultProps=__assign$1(__assign$1({},MoveableManager$1.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),e}(MoveableManager$1),MoveableIndividualGroup=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.moveables=[],e}return __extends$1(e,t),e.prototype.render=function(){var t,e=this,i=this.props,n=i.cspNonce,s=i.cssStyled,a=i.persistData,o=i.targets||[],r=o.length,l=this.isUnmounted||!r,h=null!==(t=null==a?void 0:a.children)&&void 0!==t?t:[];return l&&!r&&h.length?o=h.map((function(){return null})):l||(h=[]),createElement$1(s,{cspNonce:n,ref:ref(this,"controlBox"),className:prefix("control-box")},o.map((function(t,n){var s,a,o=null!==(a=null===(s=i.individualGroupableProps)||void 0===s?void 0:s.call(i,t,n))&&void 0!==a?a:{};return createElement$1(MoveableManager$1,__assign$1({key:"moveable"+n,ref:refs(e,"moveables",n)},i,o,{target:t,wrapperMoveable:e,isWrapperMounted:e.isMoveableMounted,persistData:h[n]}))})))},e.prototype.componentDidMount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.getTargets=function(){return this.props.targets},e.prototype.updateRect=function(t,e,i){void 0===i&&(i=!0),setStoreCache(!0),this.moveables.forEach((function(n){n.updateRect(t,e,i)})),setStoreCache()},e.prototype.getRect=function(){return __assign$1(__assign$1({},t.prototype.getRect.call(this)),{children:this.moveables.map((function(t){return t.getRect()}))})},e.prototype.request=function(t,e,i){void 0===e&&(e={});var n=this.moveables.map((function(i){return i.request(t,__assign$1(__assign$1({},e),{isInstant:!1}),!1)})),s={request:function(t){return n.forEach((function(e){return e.request(t)})),this},requestEnd:function(){return n.forEach((function(t){return t.requestEnd()})),this}};return i||e.isInstant?s.request(e).requestEnd():s},e.prototype.dragStart=function(t,e){void 0===e&&(e=t.target);var i=e,n=find$1(this.moveables,(function(t){var e=t.getTargets()[0],n=t.getControlBoxElement(),s=t.getDragElement();return!(!e||!s)&&(s===i||s.contains(i)||s!==e&&e===i||e.contains(i)||n===i||n.contains(i))}));return n&&n.dragStart(t,e),this},e.prototype.hitTest=function(){return 0},e.prototype.isInside=function(){return!1},e.prototype.isDragging=function(){return!1},e.prototype.getDragElement=function(){return null},e.prototype.getMoveables=function(){return __spreadArray([],__read(this.moveables),!1)},e.prototype.updateRenderPoses=function(){},e.prototype.checkUpdate=function(){},e.prototype.triggerEvent=function(){},e.prototype.updateAbles=function(){},e.prototype._updateEvents=function(){},e.prototype._updateObserver=function(){},e}(MoveableManager$1);function getElementTargets(t,e){var i=[];return t.forEach((function(t){t&&(isString(t)?e[t]&&i.push.apply(i,__spreadArray([],__read(e[t]),!1)):isArray(t)?i.push.apply(i,__spreadArray([],__read(getElementTargets(t,e)),!1)):i.push(t))})),i}function getTargetGroups(t,e){var i=[];return t.forEach((function(t){t&&(isString(t)?e[t]&&i.push.apply(i,__spreadArray([],__read(e[t]),!1)):isArray(t)?i.push(getTargetGroups(t,e)):i.push(t))})),i}function compareRefTargets(t,e){return t.length!==e.length||t.some((function(t,i){var n=e[i];return!(!t&&!n)&&(t!=n&&(!isArray(t)||!isArray(n)||compareRefTargets(t,n)))}))}var InitialMoveable=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.refTargets=[],e.selectorMap={},e._differ=new ChildrenDiffer,e._elementTargets=[],e._tmpRefTargets=[],e._tmpSelectorMap={},e._onChangeTargets=null,e}return __extends$1(e,t),e.makeStyled=function(){var t={};this.getTotalAbles().forEach((function(e){var i=e.css;i&&i.forEach((function(e){t[e]=!0}))}));var e=getKeys(t).join("\n");this.defaultStyled=styled("div",prefixCSS(PREFIX,MOVEABLE_CSS+e))},e.getTotalAbles=function(){return __spreadArray([Default,Groupable,IndividualGroupable,DragArea],__read(this.defaultAbles),!1)},e.prototype.render=function(){var t,e=this.constructor;e.defaultStyled||e.makeStyled();var i=this.props,n=i.ables,s=i.props,a=__rest(i,["ables","props"]),o=__read(this._updateRefs(!0),2),r=o[0],l=o[1],h=getElementTargets(r,l),c=h.length>1,u=__spreadArray(__spreadArray([],__read(e.getTotalAbles()),!1),__read(n||[]),!1),d=__assign$1(__assign$1(__assign$1({},a),s||{}),{ables:u,cssStyled:e.defaultStyled,customStyledMap:e.customStyledMap});this._elementTargets=h;var p=null,g=this.moveable,f=a.persistData;if((null==f?void 0:f.children)&&(c=!0),a.individualGroupable)return createElement$1(MoveableIndividualGroup,__assign$1({key:"individual-group",ref:ref(this,"moveable")},d,{target:null,targets:h}));if(c){var b=getTargetGroups(r,l);if(g&&!g.props.groupable&&!g.props.individualGroupable){var v=g.props.target;v&&h.indexOf(v)>-1&&(p=__assign$1({},g.state))}return createElement$1(MoveableGroup,__assign$1({key:"group",ref:ref(this,"moveable")},d,null!==(t=a.groupableProps)&&void 0!==t?t:{},{target:null,targets:h,targetGroups:b,firstRenderState:p}))}var m=h[0];if(g&&(g.props.groupable||g.props.individualGroupable)){var y=find$1(g.moveables||[],(function(t){return t.props.target===m}));y&&(p=__assign$1({},y.state))}return createElement$1(MoveableManager$1,__assign$1({key:"single",ref:ref(this,"moveable")},d,{target:m,firstRenderState:p}))},e.prototype.componentDidMount=function(){this._checkChangeTargets()},e.prototype.componentDidUpdate=function(){this._checkChangeTargets()},e.prototype.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},e.prototype.getTargets=function(){var t,e;return null!==(e=null===(t=this.moveable)||void 0===t?void 0:t.getTargets())&&void 0!==e?e:[]},e.prototype.updateSelectors=function(){this.selectorMap={},this._updateRefs(),this.forceUpdate()},e.prototype.waitToChangeTarget=function(){var t,e=this;return this._onChangeTargets=function(){e._onChangeTargets=null,t()},new Promise((function(e){t=e}))},e.prototype.waitToChangeTargets=function(){return this.waitToChangeTarget()},e.prototype.getManager=function(){return this.moveable},e.prototype.getMoveables=function(){return this.moveable.getMoveables()},e.prototype.getDragElement=function(){return this.moveable.getDragElement()},e.prototype._updateRefs=function(t){var e=this.refTargets,i=getRefTargets(this.props.target||this.props.targets),n="undefined"!=typeof document,s=compareRefTargets(e,i),a=this.selectorMap,o={};return this.refTargets.forEach((function t(e){isString(e)?a[e]?o[e]=a[e]:n&&(s=!0,o[e]=[].slice.call(document.querySelectorAll(e))):isArray(e)&&e.forEach(t)})),this._tmpRefTargets=i,this._tmpSelectorMap=o,[i,o,!t&&s]},e.prototype._checkChangeTargets=function(){var t,e,i;this.refTargets=this._tmpRefTargets,this.selectorMap=this._tmpSelectorMap;var n=this._differ.update(this._elementTargets),s=n.added,a=n.removed;(s.length||a.length)&&(null===(e=(t=this.props).onChangeTargets)||void 0===e||e.call(t,{moveable:this.moveable,targets:this._elementTargets}),null===(i=this._onChangeTargets)||void 0===i||i.call(this));var o=__read(this._updateRefs(),3),r=o[0],l=o[1],h=o[2];this.refTargets=r,this.selectorMap=l,h&&this.forceUpdate()},e.defaultAbles=[],e.customStyledMap={},e.defaultStyled=null,__decorate$1([withMethods(MOVEABLE_METHODS)],e.prototype,"moveable",void 0),e}(PureComponent),Moveable$1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1(e,t),e.defaultAbles=MOVEABLE_ABLES,e}(InitialMoveable),extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function __extends(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign=function(){return __assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign.apply(this,arguments)};function __decorate(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}var InnerMoveable=function(t){function e(e){var i=t.call(this,e)||this;return i.state={},i.state=i.props,i}return __extends(e,t),e.prototype.render=function(){return createElement$1(Moveable$1,__assign({ref:ref(this,"moveable")},this.state))},e}(Component),PROPERTIES=MOVEABLE_PROPS,METHODS=MOVEABLE_METHODS,EVENTS=MOVEABLE_EVENTS,MoveableManager=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this)||this;n.containerProvider=null,n.selfElement=null,n._warp=!1;var s,a=__assign({},i),o={};EVENTS.forEach((function(t){o[camelize("on ".concat(t))]=function(e){return n.trigger(t,e)}})),i.warpSelf?(delete i.warpSelf,n._warp=!0,s=e):(s=getDocument(e).createElement("div"),e.appendChild(s)),n.containerProvider=renderSelf(createElement$1(InnerMoveable,__assign({ref:ref(n,"innerMoveable")},a,o)),s),n.selfElement=s;var r=a.target;return isArray(r)&&r.length>1&&n.updateRect(),n}__extends(e,t);var i=e.prototype;return i.setState=function(t,e){this.innerMoveable.setState(t,e)},i.forceUpdate=function(t){this.innerMoveable.forceUpdate(t)},i.dragStart=function(t,e){void 0===e&&(e=t.target),this.innerMoveable.$_timer&&this.forceUpdate(),this.getMoveable().dragStart(t,e)},i.destroy=function(){var t,e=this.selfElement;renderSelf(null,e,this.containerProvider),this._warp||null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(e),this.containerProvider=null,this.off(),this.selfElement=null,this.innerMoveable=null},i.getMoveable=function(){return this.innerMoveable.moveable},e=__decorate([Properties(METHODS,(function(t,e){t[e]||(t[e]=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=this.getMoveable();if(n&&n[e])return n[e].apply(n,t)})})),Properties(PROPERTIES,(function(t,e){Object.defineProperty(t,e,{get:function(){return this.getMoveable().props[e]},set:function(t){var i;this.setState(((i={})[e]=t,i))},enumerable:!0,configurable:!0})}))],e),e}(EventEmitter$1),Moveable=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(MoveableManager);function getElementInfo$1(t,e,i){return getElementInfo$2(t,e,i)}var Duct_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$v=defineComponent({name:"DuctEl",props:{bgColor:{type:String,default:"#808080"}},setup(){const t=ref$1(null),e=ref$1(null),i=ref$1(!0),n=ref$1(!0);function s(t){const{left:e,top:i,pos1:n,pos2:s,pos3:a,pos4:o}=t;return[n,s,o,a].map((t=>[e+t[0],i+t[1]]))}function a(t){const e=t.closest(".moveable-item.Duct"),i=getElementInfo$1(t),n=document.querySelectorAll(".moveable-item.Duct");for(const a of Array.from(n)){if(e.isSameNode(a))continue;const t=getElementInfo$1(a);if(getOverlapSize$1(s(i),s(t))>0)return!0}return!1}function o(){t.value&&e.value&&(i.value=!a(t.value),n.value=!a(e.value))}return onMounted((()=>{o()})),{startElRef:t,endElRef:e,isOverlap:a,showStart:i,showEnd:n,refresh:o}}}),__injectCSSVars__$v=()=>{useCssVars((t=>({"72ed2eb6":t.bgColor})))},__setup__$v=__default__$v.setup;__default__$v.setup=__setup__$v?(t,e)=>(__injectCSSVars__$v(),__setup__$v(t,e)):__injectCSSVars__$v;const _sfc_main$A=__default__$v,_hoisted_1$m={class:"duct flex flex-nowrap w-full h-full"},_hoisted_2$7={key:0,viewBox:"0 0 50 100",preserveAspectRatio:"none",width:"100%",height:"100%"},_hoisted_3$4={key:1,class:"w-full h-full"},_hoisted_4$3={key:0,viewBox:"0 0 50 100",preserveAspectRatio:"none",width:"100%",height:"100%"},_hoisted_5$2={key:1,class:"w-full h-full"};function _sfc_render$y(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$m,[createBaseVNode("div",{class:normalizeClass(["duct-start",{shown:t.showStart}]),ref:"startElRef"},[t.showStart?(openBlock(),createElementBlock("svg",_hoisted_2$7,[...e[0]||(e[0]=[createBaseVNode("path",{d:"M 0 0 L 0 100 L 50 100 L 1 50 L 50 0 L 0 0 Z",transform:"matrix(-1,0,0,1,50,0)"},null,-1)])])):(openBlock(),createElementBlock("div",_hoisted_3$4))],2),e[2]||(e[2]=createBaseVNode("div",{class:"duct-body grow"},null,-1)),createBaseVNode("div",{class:normalizeClass(["duct-end",{shown:t.showEnd}]),ref:"endElRef"},[t.showEnd?(openBlock(),createElementBlock("svg",_hoisted_4$3,[...e[1]||(e[1]=[createBaseVNode("polygon",{points:"50 0, 50 100, 0 50",transform:"matrix(-1,0,0,1,50,0)"},null,-1)])])):(openBlock(),createElementBlock("div",_hoisted_5$2))],2)])}var DuctEl=_export_sfc(_sfc_main$A,[["render",_sfc_render$y],["__scopeId","data-v-58c71838"]]),Fan_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$u=defineComponent({name:"FanEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$u=()=>{useCssVars((t=>({"35909b5e":t.fillColor})))},__setup__$u=__default__$u.setup;__default__$u.setup=__setup__$u?(t,e)=>(__injectCSSVars__$u(),__setup__$u(t,e)):__injectCSSVars__$u;const _sfc_main$z=__default__$u;function _sfc_render$x(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{height:"100%",width:"100%",viewBox:"0 0 32 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g fill="currentColor" transform="matrix(1, 0, 0, 1, -0.231, -4.151388)" data-v-6c25635a><g class="fan" data-v-6c25635a><g id="g8" data-v-6c25635a><path class="fan-background" d="m12.297 5.154c-6.117 0-11.066 4.9492-11.066 11.066 0 6.117 4.9492 11.066 11.066 11.066 5.7137 0 10.408-4.3091 11.003-9.8647h7.525v-12.268h-18.148c-0.12601-0.0043-0.25236 0-0.37941 0z" fill-rule="evenodd" stroke="#000" stroke-width="1px" fill="inherit" data-v-6c25635a></path></g><g id="g4148" transform="translate(12.464 16.395)" data-v-6c25635a><g id="g4162" stroke="#000" stroke-width="1.5" fill="none" class="rotating-middle" data-v-6c25635a><path id="use3009" d="m-1.8112-3.9787 3.6227-4.4971" data-v-6c25635a></path><path id="use3011" d="m0.87376-4.2835 5.5741-1.5089" data-v-6c25635a></path><path id="use3013" d="m3.2243-2.9521 5.3965 2.0557" data-v-6c25635a></path><path id="use3015" d="m4.3433-0.4935 3.1575 4.835" data-v-6c25635a></path><path id="use3017" d="m3.8043 2.1547-0.28747 5.7676" data-v-6c25635a></path><path id="use3019" d="m1.8113 3.9787-3.6227 4.4971" data-v-6c25635a></path><path id="use3021" d="m-0.87324 4.2837-5.5741 1.5089" data-v-6c25635a></path><path id="use3023" d="m-3.2242 2.9527-5.3965-2.0559" data-v-6c25635a></path><path id="use3025" d="m-4.3432 0.4935-3.158-4.8353" data-v-6c25635a></path><path id="use3027" d="m-3.8032-2.1541 0.2875-5.7676" data-v-6c25635a></path></g></g></g></g>',1)])],2)}var FanEl=_export_sfc(_sfc_main$z,[["render",_sfc_render$x],["__scopeId","data-v-6c25635a"]]),CoolingCoil_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$t=defineComponent({name:"CoolingCoil",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$t=()=>{useCssVars((t=>({"4d3305de":t.fillColor})))},__setup__$t=__default__$t.setup;__default__$t.setup=__setup__$t?(t,e)=>(__injectCSSVars__$t(),__setup__$t(t,e)):__injectCSSVars__$t;const _sfc_main$y=__default__$t;function _sfc_render$w(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 20 29",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g stroke="#000" transform="matrix(1, 0, 0, 1, -6.058399, -1.3729)" data-v-90de8fa4><rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="currentColor" data-v-90de8fa4></rect><g transform="translate(24.9334,29.6232) rotate(180)" data-v-90de8fa4><rect id="rect4367" class="cooling-coil" height="27.246" width="17.875" x="0" y="0" fill="currentColor" stroke="none" data-v-90de8fa4></rect></g><rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="none" data-v-90de8fa4></rect><path id="path3001" d="m7.322 2.3729 17.424 27.254" stroke-width="1px" fill="none" data-v-90de8fa4></path><path id="path3003" d="m24.929 2.3734-17.642 27.182" stroke-width="1px" fill="none" data-v-90de8fa4></path></g>',1)])],2)}var CoolingCoil=_export_sfc(_sfc_main$y,[["render",_sfc_render$w],["__scopeId","data-v-90de8fa4"]]),HeatingCoil_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$s=defineComponent({name:"HeatingCoil",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$s=()=>{useCssVars((t=>({"533886ee":t.fillColor})))},__setup__$s=__default__$s.setup;__default__$s.setup=__setup__$s?(t,e)=>(__injectCSSVars__$s(),__setup__$s(t,e)):__injectCSSVars__$s;const _sfc_main$x=__default__$s;function _sfc_render$v(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 19.526541 28.758413",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<defs id="defs3" data-v-f0cd36e8><rect id="heating-coil-rect" height="27.246" width="17.868" x="0" y="0" data-v-f0cd36e8></rect></defs><g stroke="#000000" id="g15" transform="translate(-6.129206,-1.5327875)" data-v-f0cd36e8><use xlink:href="#heating-coil-rect" fill="currentColor" stroke="none" x="7.066" y="2.3771999" id="use6" data-v-f0cd36e8></use><g transform="rotate(180,12.4667,14.8116)" id="g10" data-v-f0cd36e8><use xlink:href="#heating-coil-rect" class="heating-coil" x="0" y="0" fill="currentColor" stroke="none" id="use8" data-v-f0cd36e8></use></g><use xlink:href="#heating-coil-rect" stroke-width="1" fill="none" x="7.066" y="2.3771999" id="use12" data-v-f0cd36e8></use><path id="path3003" stroke-linejoin="miter" d="M 24.929,2.3734 7.2868,29.555" stroke="#000000" stroke-linecap="butt" stroke-width="1px" fill="none" data-v-f0cd36e8></path></g>',2)])],2)}var HeatingCoil=_export_sfc(_sfc_main$x,[["render",_sfc_render$v],["__scopeId","data-v-f0cd36e8"]]),Filter_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$r=defineComponent({name:"FilterEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$r=()=>{useCssVars((t=>({"4c436813":t.fillColor})))},__setup__$r=__default__$r.setup;__default__$r.setup=__setup__$r?(t,e)=>(__injectCSSVars__$r(),__setup__$r(t,e)):__injectCSSVars__$r;const _sfc_main$w=__default__$r,_hoisted_1$l={viewBox:"0 0 13 29",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:"object-svg"};function _sfc_render$u(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$l,[...e[0]||(e[0]=[createBaseVNode("g",{stroke:"#000","stroke-width":"1",transform:"matrix(1, 0, 0, 1, -9.37, -1.3252)"},[createBaseVNode("rect",{id:"rect4367",height:"27.35",width:"11.26",y:"2.3252",x:"10.37",fill:"currentColor"}),createBaseVNode("path",{id:"path3756","stroke-linejoin":"miter",d:"m11.892,2.6997,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334","stroke-linecap":"round","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-width":"1.2694304",fill:"none"})],-1)])])}var FilterEl=_export_sfc(_sfc_main$w,[["render",_sfc_render$u],["__scopeId","data-v-5570c37e"]]),Humidifier_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$q=defineComponent({name:"HumidifierEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$q=()=>{useCssVars((t=>({"8abc4044":t.fillColor})))},__setup__$q=__default__$q.setup;__default__$q.setup=__setup__$q?(t,e)=>(__injectCSSVars__$q(),__setup__$q(t,e)):__injectCSSVars__$q;const _sfc_main$v=__default__$q;function _sfc_render$t(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 18 25",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com",class:normalizeClass(["object-svg",{inactive:!t.active,active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g class="duct-humidifier" transform="matrix(1, 0, 0, 1, -3.324199, -7.877)" data-v-74fe25c0><g id="g11" transform="translate(0 5.1505)" data-v-74fe25c0><g id="g13" stroke="#000" stroke-width=".5" class="water-drops" fill="#00f0ff" data-v-74fe25c0><path id="path4150" d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-74fe25c0></path><g id="g4236" transform="translate(0 .17167)" data-v-74fe25c0><path id="path4150-7" d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-74fe25c0></path><path id="path4150-7-1" d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-74fe25c0></path></g></g><g id="g19" transform="translate(0,8)" data-v-74fe25c0><g id="g21" stroke="#000" stroke-width=".5" class="water-drops water-drops-2" fill="#00f0ff" data-v-74fe25c0><path id="path23" d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-74fe25c0></path><g id="g25" transform="translate(0 .17167)" data-v-74fe25c0><path id="path27" d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-74fe25c0></path><path id="path29" d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-74fe25c0></path></g></g></g></g><path id="rect4136-6" class="humidifier-body" d="m4.3242 8.877v22.586h4.0059v-9.883h4.3789v-2.617h-4.3789v-5.721h4.3789v-2.617h-4.3789v-1.748h-4.0059z" stroke="#000" fill="currentColor" data-v-74fe25c0></path></g>',1)])],2)}var HumidifierEl=_export_sfc(_sfc_main$v,[["render",_sfc_render$t],["__scopeId","data-v-74fe25c0"]]),Damper_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$p=defineComponent({name:"DamperEl",props:{item:{type:Object,required:!1},active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$p=()=>{useCssVars((t=>({f07eec98:t.fillColor})))},__setup__$p=__default__$p.setup;__default__$p.setup=__setup__$p?(t,e)=>(__injectCSSVars__$p(),__setup__$p(t,e)):__injectCSSVars__$p;const _sfc_main$u=__default__$p;function _sfc_render$s(t,e,i,n,s,a){var o,r,l,h,c;return openBlock(),createElementBlock("svg",{viewBox:"0 0 13.431694 28.950886",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm,"range-analog":null==(r=null==(o=t.item)?void 0:o.t3Entry)?void 0:r.digital_analog,"range-digital":(null==(l=t.item)?void 0:l.t3Entry)&&!(null==(c=null==(h=t.item)?void 0:h.t3Entry)?void 0:c.digital_analog)}])},[...e[0]||(e[0]=[createStaticVNode('<rect class="damper" height="27.5" width="12" stroke="#000000" stroke-miterlimit="4" x="0.69481522" y="0.67645228" stroke-dasharray="none" stroke-width="1" fill="currentColor" data-v-ef1c1c2c></rect><g stroke="#000000" stroke-width="1.5px" transform="translate(-9.3051848,-1.5735477)" data-v-ef1c1c2c><g transform="translate(16,7)" data-v-ef1c1c2c><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-ef1c1c2c></line></g><g transform="translate(16,13)" data-v-ef1c1c2c><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-ef1c1c2c></line></g><g transform="translate(16,19)" data-v-ef1c1c2c><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-ef1c1c2c></line></g><g transform="translate(16,25)" data-v-ef1c1c2c><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-ef1c1c2c></line></g></g><g stroke-linejoin="miter" transform="matrix(1.2268237,0,0,0.94845469,-13.299764,-1.1862851)" stroke="#000000" stroke-linecap="butt" fill="none" data-v-ef1c1c2c><path stroke-width="1.06273px" d="m 16.298,2.2402 v 28.442" data-v-ef1c1c2c></path></g>',3)])],2)}var Damper=_export_sfc(_sfc_main$u,[["render",_sfc_render$s],["__scopeId","data-v-ef1c1c2c"]]),Text_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$t=defineComponent({name:"TextEl",props:{text:{type:String,default:"Text element"},fontSize:{type:Number,default:16},textColor:{type:String,default:"black"},textAlign:{type:String,default:"left"}},setup:()=>({})});function _sfc_render$r(t,e,i,n,s,a){return openBlock(),createElementBlock("div",{class:"text-el",style:normalizeStyle(`font-size: ${t.fontSize}px; color: ${t.textColor}; text-align: ${t.textAlign} ; white-space: pre-wrap;`)},toDisplayString(t.text),5)}var TextEl=_export_sfc(_sfc_main$t,[["render",_sfc_render$r],["__scopeId","data-v-08bf2b4b"]]),Box_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$o=defineComponent({name:"BoxEl",props:{bgColor:{type:String,default:"black"}},setup:()=>({})}),__injectCSSVars__$o=()=>{useCssVars((t=>({"74135b69":t.bgColor})))},__setup__$o=__default__$o.setup;__default__$o.setup=__setup__$o?(t,e)=>(__injectCSSVars__$o(),__setup__$o(t,e)):__injectCSSVars__$o;const _sfc_main$s=__default__$o,_hoisted_1$k={class:"box-element"};function _sfc_render$q(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$k)}var BoxEl=_export_sfc(_sfc_main$s,[["render",_sfc_render$q],["__scopeId","data-v-c9425808"]]),IconBasic_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$n=defineComponent({name:"IconValue",props:{item:{type:Object},active:{type:Boolean,default:!1},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"image"},textAlign:{type:String,default:"left"}},setup:()=>({})}),__injectCSSVars__$n=()=>{useCssVars((t=>({13493548:t.offColor,f1464cc8:t.onColor})))},__setup__$n=__default__$n.setup;__default__$n.setup=__setup__$n?(t,e)=>(__injectCSSVars__$n(),__setup__$n(t,e)):__injectCSSVars__$n;const _sfc_main$r=__default__$n,_hoisted_1$j=["xlink:href"];function _sfc_render$p(t,e,i,n,s,a){return t.icon?(openBlock(),createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",height:"100%",viewBox:"0 0 24 24",width:"100%",class:normalizeClass([{active:t.active},"icon-svg"])},[createBaseVNode("use",{class:"icon","xlink:href":`icons.svg#${t.icon}`},null,8,_hoisted_1$j)],2)):createCommentVNode("",!0)}var IconBasic=_export_sfc(_sfc_main$r,[["render",_sfc_render$p],["__scopeId","data-v-3930cf5a"]]),IconValue_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$m=defineComponent({name:"IconValue",props:{item:{type:Object},active:{type:Boolean,default:!1},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"image"},textAlign:{type:String,default:"left"}},setup:()=>({})}),__injectCSSVars__$m=()=>{useCssVars((t=>({af128c6c:t.offColor,51238124:t.onColor})))},__setup__$m=__default__$m.setup;__default__$m.setup=__setup__$m?(t,e)=>(__injectCSSVars__$m(),__setup__$m(t,e)):__injectCSSVars__$m;const _sfc_main$q=__default__$m,_hoisted_1$i=["xlink:href"];function _sfc_render$o(t,e,i,n,s,a){return t.icon?(openBlock(),createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",height:"100%",viewBox:"0 0 24 24",width:"100%",class:normalizeClass([{active:t.active},"icon-svg"])},[createBaseVNode("use",{class:"icon","xlink:href":`icons.svg#${t.icon}`},null,8,_hoisted_1$i)],2)):createCommentVNode("",!0)}var IconValue=_export_sfc(_sfc_main$q,[["render",_sfc_render$o],["__scopeId","data-v-fa0ba620"]]);const switchIcons=[{icon:{},value:"none",label:"None"},{icon:{off:"toggle_off",on:"toggle_on"},value:"toggle",label:"Toggle"},{icon:{off:"radio_button_unchecked",on:"radio_button_checked"},value:"radio",label:"Radio"},{icon:{off:"check_box_outline_blank",on:"check_box"},value:"checkbox",label:"Check box"}];ref$1([]),ref$1(null),ref$1({title:"Modbus Register",home:"/modbus-register",back:null});var IconSwitch_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$l=defineComponent({name:"IconSwitch",props:{item:{type:Object},active:{type:Boolean,default:!1},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"toggle_off"},textAlign:{type:String,default:"left"}},setup:t=>({switchIcon:computed((()=>{const e=switchIcons.find((e=>e.value===t.icon));return e?t.active?e.icon.on:e.icon.off:{}}))})}),__injectCSSVars__$l=()=>{useCssVars((t=>({"963f75ea":t.offColor,"5bf5c80d":t.onColor})))},__setup__$l=__default__$l.setup;__default__$l.setup=__setup__$l?(t,e)=>(__injectCSSVars__$l(),__setup__$l(t,e)):__injectCSSVars__$l;const _sfc_main$p=__default__$l,_hoisted_1$h=["xlink:href"];function _sfc_render$n(t,e,i,n,s,a){return t.switchIcon?(openBlock(),createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",height:"100%",viewBox:"0 0 24 24",width:"100%",class:normalizeClass([{active:t.active},"icon-svg"])},[createBaseVNode("use",{class:"icon","xlink:href":`icons.svg#${t.switchIcon}`},null,8,_hoisted_1$h)],2)):createCommentVNode("",!0)}var IconSwitch=_export_sfc(_sfc_main$p,[["render",_sfc_render$n],["__scopeId","data-v-73e3aee8"]]),Value_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$k=defineComponent({name:"ValueEl",props:{item:{type:Object,required:!0},textAlign:{type:String,default:"left"},showArrows:{type:Boolean,default:!1}},setup:t=>({dispalyText:computed((()=>{var e,i,n;if(!t.item.t3Entry||void 0===(null==(e=t.item.t3Entry)?void 0:e.value))return"";const s=IdxUtils.getEntryRange(null==(i=t.item)?void 0:i.t3Entry);if(t.item.t3Entry.range>100){const e=null==(n=s.options)?void 0:n.find((e=>e.value===t.item.t3Entry.value));return null==e?void 0:e.name}return 1===t.item.t3Entry.digital_analog?t.item.t3Entry.value+" "+s.unit:0===t.item.t3Entry.digital_analog?t.item.t3Entry.control?s.on:s.off:t.item.t3Entry.value||""}))})}),__injectCSSVars__$k=()=>{useCssVars((t=>({"3de83293":t.textAlign})))},__setup__$k=__default__$k.setup;__default__$k.setup=__setup__$k?(t,e)=>(__injectCSSVars__$k(),__setup__$k(t,e)):__injectCSSVars__$k;const _sfc_main$o=__default__$k,_hoisted_1$g={class:"value-element relative flex flex-col flex-nowrap items-center"},_hoisted_2$6={class:"w-full"};function _sfc_render$m(t,e,i,n,s,a){var o,r;return openBlock(),createElementBlock("div",_hoisted_1$g,[t.showArrows?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(o=t.item.t3Entry)?void 0:o.auto_manual),onClick:e[0]||(e[0]=e=>t.$emit("changeValue","increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_2$6,toDisplayString(t.dispalyText),1),t.showArrows?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(r=t.item.t3Entry)?void 0:r.auto_manual),onClick:e[1]||(e[1]=e=>t.$emit("changeValue","decrease"))},null,8,["disable"])):createCommentVNode("",!0)])}var ValueEl=_export_sfc(_sfc_main$o,[["render",_sfc_render$m],["__scopeId","data-v-5feb22de"]]),Temperature_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$j=defineComponent({name:"TemperatureEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$j=()=>{useCssVars((t=>({"8f1279ce":t.fillColor})))},__setup__$j=__default__$j.setup;__default__$j.setup=__setup__$j?(t,e)=>(__injectCSSVars__$j(),__setup__$j(t,e)):__injectCSSVars__$j;const _sfc_main$n=__default__$j,_hoisted_1$f={height:"100%",width:"100%",version:"1.1",viewBox:"0 0 10.423067 22.852614",xmlns:"http://www.w3.org/2000/svg",class:"object-svg"};function _sfc_render$l(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$f,[...e[0]||(e[0]=[createStaticVNode('<g id="layer1" stroke="#000000" stroke-width="1px" transform="translate(-10.804626,-9.2243756)" data-v-0a401258><rect id="rect3012" height="14.505" width="2.901" y="9.9127998" x="14.557" fill="#ffff00" data-v-0a401258></rect><path id="path3010" stroke-width="1.2px" transform="matrix(0.74098,0,0,0.74098,7.3047,15.679)" fill="currentColor" d="m 17.949,15.898 -3.1021,5.373 H 8.6427 L 5.5406,15.898 8.6427,10.525 h 6.2042 z" data-v-0a401258></path></g><g id="g4141" transform="translate(-1.2033861,-8.1217684)" data-v-0a401258><circle r="0.77312505" cy="28.129852" cx="6.4061227" id="path4137" style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-0a401258></circle><path id="path4139" d="M 6.4061205,27.157211 V 23.65349" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-0a401258></path></g>',2)])])}var Temperature=_export_sfc(_sfc_main$n,[["render",_sfc_render$l],["__scopeId","data-v-0a401258"]]),raf=null;function requestAnimationFrame$1(t){return raf||(raf=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),raf(t)}var caf=null;function cancelAnimationFrame(t){caf||(caf=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),caf(t)}function createStyles(t){var e=document.createElement("style");return e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),(document.querySelector("head")||document.body).appendChild(e),e}function createElement(t,e){void 0===e&&(e={});var i=document.createElement(t);return Object.keys(e).forEach((function(t){i[t]=e[t]})),i}function getComputedStyle$1(t,e,i){return(window.getComputedStyle(t,i||null)||{display:"none"})[e]}function getRenderInfo(t){if(!document.documentElement.contains(t))return{detached:!0,rendered:!1};for(var e=t;e!==document;){if("none"===getComputedStyle$1(e,"display"))return{detached:!1,rendered:!1};e=e.parentNode}return{detached:!1,rendered:!0}}var css_248z='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',total=0,style=null;function addListener(t,e){if(t.__resize_mutation_handler__||(t.__resize_mutation_handler__=handleMutation.bind(t)),!t.__resize_listeners__)if(t.__resize_listeners__=[],window.ResizeObserver){var i=t.offsetWidth,n=t.offsetHeight,s=new ResizeObserver((function(){(t.__resize_observer_triggered__||(t.__resize_observer_triggered__=!0,t.offsetWidth!==i||t.offsetHeight!==n))&&runCallbacks(t)})),a=getRenderInfo(t),o=a.detached,r=a.rendered;t.__resize_observer_triggered__=!1===o&&!1===r,t.__resize_observer__=s,s.observe(t)}else if(t.attachEvent&&t.addEventListener)t.__resize_legacy_resize_handler__=function(){runCallbacks(t)},t.attachEvent("onresize",t.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",t.__resize_mutation_handler__);else if(total||(style=createStyles(css_248z)),initTriggers(t),t.__resize_rendered__=getRenderInfo(t).rendered,window.MutationObserver){var l=new MutationObserver(t.__resize_mutation_handler__);l.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),t.__resize_mutation_observer__=l}t.__resize_listeners__.push(e),total++}function removeListener(t,e){var i=t.__resize_listeners__;if(i){if(e&&i.splice(i.indexOf(e),1),!i.length||!e){if(t.detachEvent&&t.removeEventListener)return t.detachEvent("onresize",t.__resize_legacy_resize_handler__),void document.removeEventListener("DOMSubtreeModified",t.__resize_mutation_handler__);t.__resize_observer__?(t.__resize_observer__.unobserve(t),t.__resize_observer__.disconnect(),t.__resize_observer__=null):(t.__resize_mutation_observer__&&(t.__resize_mutation_observer__.disconnect(),t.__resize_mutation_observer__=null),t.removeEventListener("scroll",handleScroll),t.removeChild(t.__resize_triggers__.triggers),t.__resize_triggers__=null),t.__resize_listeners__=null}!--total&&style&&style.parentNode.removeChild(style)}}function getUpdatedSize(t){var e=t.__resize_last__,i=e.width,n=e.height,s=t.offsetWidth,a=t.offsetHeight;return s!==i||a!==n?{width:s,height:a}:null}function handleMutation(){var t=getRenderInfo(this),e=t.rendered,i=t.detached;e!==this.__resize_rendered__&&(!i&&this.__resize_triggers__&&(resetTriggers(this),this.addEventListener("scroll",handleScroll,!0)),this.__resize_rendered__=e,runCallbacks(this))}function handleScroll(){var t=this;resetTriggers(this),this.__resize_raf__&&cancelAnimationFrame(this.__resize_raf__),this.__resize_raf__=requestAnimationFrame$1((function(){var e=getUpdatedSize(t);e&&(t.__resize_last__=e,runCallbacks(t))}))}function runCallbacks(t){t&&t.__resize_listeners__&&t.__resize_listeners__.forEach((function(e){e.call(t,t)}))}function initTriggers(t){var e=getComputedStyle$1(t,"position");e&&"static"!==e||(t.style.position="relative"),t.__resize_old_position__=e,t.__resize_last__={};var i=createElement("div",{className:"resize-triggers"}),n=createElement("div",{className:"resize-expand-trigger"}),s=createElement("div"),a=createElement("div",{className:"resize-contract-trigger"});n.appendChild(s),i.appendChild(n),i.appendChild(a),t.appendChild(i),t.__resize_triggers__={triggers:i,expand:n,expandChild:s,contract:a},resetTriggers(t),t.addEventListener("scroll",handleScroll,!0),t.__resize_last__={width:t.offsetWidth,height:t.offsetHeight}}function resetTriggers(t){var e=t.__resize_triggers__,i=e.expand,n=e.expandChild,s=e.contract,a=s.scrollWidth,o=s.scrollHeight,r=i.offsetWidth,l=i.offsetHeight,h=i.scrollWidth,c=i.scrollHeight;s.scrollLeft=a,s.scrollTop=o,n.style.width=r+1+"px",n.style.height=l+1+"px",i.scrollLeft=h,i.scrollTop=c}var b=function(){return b=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},b.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var y=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function E(t){return e=Object.create(null),y.forEach((function(i){var n;e[i]=(n=i,function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if(!t.value)throw new Error("ECharts is not initialized yet.");return t.value[n].apply(t.value,e)})})),e;var e}var _={autoresize:[Boolean,Object]},x=/^on[^a-z]/,j=function(t){return x.test(t)};function w(t,e){var i=isRef(t)?unref(t):t;return i&&"object"==typeof i&&"value"in i?i.value||e:i||e}var A="ecLoadingOptions",L={loading:Boolean,loadingOptions:Object},z=null,C="x-vue-echarts",T$1=[],S=[];!function(t,e){if(t&&"undefined"!=typeof document){var i,n=!0===e.prepend?"prepend":"append",s=!0===e.singleTag,a="string"==typeof e.container?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(s){var o=T$1.indexOf(a);-1===o&&(o=T$1.push(a)-1,S[o]={}),i=S[o]&&S[o][n]?S[o][n]:S[o][n]=r()}else i=r();65279===t.charCodeAt(0)&&(t=t.substring(1)),i.styleSheet?i.styleSheet.cssText+=t:i.appendChild(document.createTextNode(t))}function r(){var t=document.createElement("style");if(t.setAttribute("type","text/css"),e.attributes)for(var i=Object.keys(e.attributes),s=0;s<i.length;s++)t.setAttribute(i[s],e.attributes[i[s]]);var o="prepend"===n?"afterbegin":"beforeend";return a.insertAdjacentElement(o,t),t}}("x-vue-echarts{display:flex;flex-direction:column;width:100%;height:100%;min-width:0}\n.vue-echarts-inner{flex-grow:1;min-width:0;width:auto!important;height:auto!important}\n",{});var U=function(){if(null!=z)return z;if("undefined"==typeof HTMLElement||"undefined"==typeof customElements)return z=!1;try{new Function("tag","class EChartsElement extends HTMLElement {\n  __dispose = null;\n\n  disconnectedCallback() {\n    if (this.__dispose) {\n      this.__dispose();\n      this.__dispose = null;\n    }\n  }\n}\n\nif (customElements.get(tag) == null) {\n  customElements.define(tag, EChartsElement);\n}\n")(C)}catch(t){return z=!1}return z=!0}(),D$1="ecTheme",k="ecInitOptions",B="ecUpdateOptions",P=/(^&?~?!?)native:/,H=defineComponent({name:"echarts",props:b(b({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},_),L),emits:{},inheritAttrs:!1,setup:function(t,e){var i=e.attrs,n=shallowRef(),s=shallowRef(),a=shallowRef(),o=shallowRef(),r=inject(D$1,null),l=inject(k,null),h=inject(B,null),c=toRefs(t),u=c.autoresize,d=c.manualUpdate,p=c.loading,g=c.loadingOptions,f=computed((function(){return o.value||t.option||null})),v=computed((function(){return t.theme||w(r,{})})),m=computed((function(){return t.initOptions||w(l,{})})),y=computed((function(){return t.updateOptions||w(h,{})})),S=computed((function(){return function(t){var e={};for(var i in t)j(i)||(e[i]=t[i]);return e}(i)})),x={},C=getCurrentInstance$1().proxy.$listeners,D={};function T(e){if(s.value){var i=a.value=init(s.value,v.value,m.value);t.group&&(i.group=t.group),Object.keys(D).forEach((function(t){var e=D[t];if(e){var n=t.toLowerCase();"~"===n.charAt(0)&&(n=n.substring(1),e.__once__=!0);var s=i;if(0===n.indexOf("zr:")&&(s=i.getZr(),n=n.substring(3)),e.__once__){delete e.__once__;var a=e;e=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];a.apply(void 0,t),s.off(n,e)}}s.on(n,e)}})),u.value?nextTick((function(){i&&!i.isDisposed()&&i.resize(),n()})):n()}function n(){var t=e||f.value;t&&i.setOption(t,y.value)}}function $(){a.value&&(a.value.dispose(),a.value=void 0)}C?Object.keys(C).forEach((function(t){P.test(t)?x[t.replace(P,"$1")]=C[t]:D[t]=C[t]})):Object.keys(i).filter((function(t){return j(t)})).forEach((function(t){var e=t.charAt(2).toLowerCase()+t.slice(3);if(0!==e.indexOf("native:"))"Once"===e.substring(e.length-4)&&(e="~".concat(e.substring(0,e.length-4))),D[e]=i[t];else{var n="on".concat(e.charAt(7).toUpperCase()).concat(e.slice(8));x[n]=i[t]}}));var O=null;watch(d,(function(e){"function"==typeof O&&(O(),O=null),e||(O=watch((function(){return t.option}),(function(t,e){t&&(a.value?a.value.setOption(t,b({notMerge:t!==e},y.value)):T())}),{deep:!0}))}),{immediate:!0}),watch([v,m],(function(){$(),T()}),{deep:!0}),watchEffect((function(){t.group&&a.value&&(a.value.group=t.group)}));var L,G,F,I,_,M=E(a);return L=a,G=p,F=g,I=inject(A,{}),_=computed((function(){return b(b({},w(I,{})),null==F?void 0:F.value)})),watchEffect((function(){var t=L.value;t&&(G.value?t.showLoading(_.value):t.hideLoading())})),function(t,e,i){var n=null;watch([i,t,e],(function(t,e,i){var s=t[0],a=t[1],o=t[2];if(s&&a&&o){var r=!0===o?{}:o,l=r.throttle,h=void 0===l?100:l,c=r.onResize,u=function(){a.resize(),null==c||c()};n=h?throttle$1(u,h):u,addListener(s,n)}i((function(){s&&n&&removeListener(s,n)}))}))}(a,u,s),onMounted((function(){T()})),onBeforeUnmount((function(){U&&n.value?n.value.__dispose=$:$()})),b({chart:a,root:n,inner:s,setOption:function(e,i){t.manualUpdate&&(o.value=e),a.value?a.value.setOption(e,i||{}):T(e)},nonEventAttrs:S,nativeListeners:x},M)},render:function(){var t=b(b({},this.nonEventAttrs),this.nativeListeners);return t.ref="root",t.class=t.class?["echarts"].concat(t.class):"echarts",h(C,t,[h("div",{ref:"inner",class:"vue-echarts-inner"})])}}),EchartsGauge_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$m={__name:"EchartsGauge",props:{title:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:100},value:{type:Number,default:0},splitNumber:{type:Number,default:10},ticks:{type:Number,default:10},minorTicks:{type:Number,default:5},thickness:{type:Number,default:30},unit:{type:String,default:""},colors:{type:Array,default:()=>[[.3,"#14BE64"],[.7,"#FFB100"],[1,"#fd666d"]]}},setup(t){use([install,install$1,install$2,install$3,install$4]);const e=t,i=computed((()=>({series:[{type:"gauge",radius:"85%",center:["50%","55%"],min:e.min,max:e.max,splitNumber:e.ticks,axisLine:{lineStyle:{width:e.thickness,color:e.colors}},pointer:{itemStyle:{color:"inherit"}},axisTick:{splitNumber:e.minorTicks,distance:-e.thickness/3.5,length:e.thickness/3.5,lineStyle:{color:"#fff",width:1}},splitLine:{distance:-e.thickness,length:e.thickness,lineStyle:{color:"#fff",width:2}},axisLabel:{lineHeight:25,color:"inherit",distance:-25,fontSize:13},detail:{valueAnimation:!0,formatter:`{value} ${e.unit}`,color:"inherit",fontSize:18},data:[{value:e.value}]}]})));return(t,e)=>(openBlock(),createBlock(unref(H),{class:"chart",option:i.value,autoresize:""},null,8,["option"]))}};var GaugeChart=_export_sfc(_sfc_main$m,[["__scopeId","data-v-0a3d5597"]]),anychartBundle_min={exports:{}};(function(module){var global,factory,wrapper;global="undefined"!=typeof window?window:commonjsGlobal,factory=function(window,document,opt_noGlobal){var $,_,$_=this.anychart;$_&&(_=$_._)?$=$_.$:($={},_={}),_.core||(_.core=1,function($){var ba,baa,caa,ta,Ea,daa,La,eaa,Sa,faa,Ya,gaa,ub,yb,Gb,Lb,Pb,Nb,Ob,bc,ic,sc,tc,wc,yc,Vb,paa,Tc,Vc,Wc,Xc,Yc,raa,$c,wd,zd,Cd,xaa,Gd,Hd,Id,Jd,Nd,yaa,Kd,Zd,Vd,de,Aaa,Od,Md,Le,Ne,Ue,ef,kf,se,nf,of,pf,tf,Ef,Bf,Tf,Xf,Zf,$f,cg,eg,dg,fg,lg,ng,og,qg,tg,vg,xg,wg,ug,Cg,Bg,Eg,Hg,Haa,Ig,Mg,Og,Vg,Xg,Yg,Zg,Ug,Wg,Ng,bh,ch,dh,fh,nh,ih,hh,th,vh,yh,Bh,Dh,Eh,Fh,Gh,Hh,Ih,Kh,Lh,Mh,Rh,Sh,Th,Uh,Vh,Wh,Xh,gi,hi,ii,ji,ki,li,mi,ni,oi,pi,qi,ri,si,ti,ui,vi,Zh,ai,xi,yi,zi,Ai,Gi,Hi,Kaa,Laa,Maa,Ii,Ki,Ni,Oi,Pi,Ti,Ui,Vi,Wi,Xi,Saa,Taa,bj,pj,rj,sj,wj,Vaa,vj,tj,uj,Aj,Uaa,xj,Mi,Oaa,Naa,Waa,Vj,Wj,Xj,ak,bk,ck,dk,fk,ek,Uj,ik,rk,Xb,Li,xk,Ck,Fk,eba,hba,Qk,pba,tba,gl,Cba,Dba,ql,rl,tl,ul,xl,zl,Gl,Dl,Jl,Ml,Ol,Jba,jm,mm,om,km,rm,lm,tm,vm,Xa,Km,Mm,Nm,Om,Qm,Ym,Zm,$m,an,dn,fn,pn,qn,rn,tn,sn,un,vn,wn,xn,Fn,Gn,Hn,Kn,Lba,Pn,Qn,Sn,Rn,Tn,Yn,Wn,Vn,$n,ao,Nba,Oba,Pba,co,bo,eo,fo,oo,ro,Tba,Co,To,Uba,Wo,ap,Vba,bp,Pm,fp,hp,pp,op,Xba,Wba,Zba,wp,Ap,Bp,Cp,Ip,Fp,Gp,aca,Kp,Rp,Yp,Zp,sl,gq,hq,kq,lq,nq,pq,qq,Xq,Yq,$q,dr,yq,Wq,Vq,Uq,lr,vr,Ar,Fr,Gr,Hr,bca,Nr,Pr,Qr,dca,Tr,Ur,Vr,Yr,Wr,Xr,fca,$r,as,bs,ds,es,gs,js,ls,ns,ws,os,Fs,Ps,Qs,Rs,Us,Vs,Ws,Xs,Ys,Zs,$s,mt,pt,ot,qt,tt,wt,xt,rt,Bt,Ct,nca,Jt,Kt,Lt,Nt,Ut,Vt,Wt,Xt,gu,hu,iu,ju,ku,bu,lu,fu,mu,nu,pu,uu,vu,zu,Au,Bu,Cu,Du,Eu,Gu,Iu,Ju,oca,Qu,Ru,qca,av,cv,dv,ev,Vu,rca,fv,sca,Su,jv,kv,lv,mv,qv,rv,sv,tv,uv,vv,wv,yv,zv,Bv,tca,Cv,Dv,Ev,Av,uca,vca,xca,wca,Fv,Iv,Kv,Lv,Sv,Tv,Nv,Uv,Vv,Wv,Xv,Yv,Pv,Ov,Qv,Rv,yca,zca,Zv,$v,bw,cw,fw,gw,hw,iw,jw,kw,lw,mw,nw,pw,qw,ow,rw,yw,Bw,Aca,Dw,Jw,Gw,Ew,Lw,Hw,xw,Rw,Sw,Mw,Tw,zw,Iw,Pw,Uw,Xw,Yw,Cca,Dca,Eca,Fca,Gca,$w,Hca,ax,bx,dx,ex,fx,gx,ox,Ica,wx,yx,zx,Cx,Fx,Gx,Jx,Nx,Lx,Ox,Sx,Tx,Ux,Xx,Vx,hy,iy,jy,ky,ly,Kca,Lca,Mca,Nca,vy,wy,Ky,Vy,Xy,Pca,Uy,Yy,az,cz,hz,Rca,lz,nz,pz,qz,sz,wz,Sca,yz,zz,Az,Bz,Cz,Dz,Fz,Gz,Hz,Iz,Sz,Uca,Vca,Vz,Xz,bA,eA,gA,hA,lA,mA,rA,sA,tA,uA,vA,xA,yA,zA,AA,Wca,CA,DA,GA,KA,Uz,LA,OA,NA,MA,TA,VA,SA,YA,ZA,$A,aB,bB,gB,hB,Xca,oB,pB,rB,Yca,Zca,qB,$ca,sB,uB,wB,zB,ada,DB,HB,JB,KB,LB,MB,OB,NB,PB,QB,RB,SB,UB,VB,XB,YB,fC,gC,hC,jC,kC,mC,nC,rC,sC,uC,vC,zC,AC,BC,CC,wC,xC,yC,DC,EC,FC,GC,HC,IC,JC,KC,LC,MC,NC,OC,PC,QC,TC,eda,dda,XC,YC,UC,ZC,$C,aD,fD,wD,tD,AD,DD,zD,ED,yD,GD,MD,aa,na,aaa;ba=function(t){return function(){return aa[t].apply(this,arguments)}},$.ca=function(t,e){return aa[t]=e},$.p=function(t){return void 0!==t},$.z=function(t){return"string"==typeof t},$.da=function(t){return"boolean"==typeof t},$.ea=function(t){return"number"==typeof t},$.ha=function(t){t=t.split(".");for(var e=$.fa,i=0;i<t.length;i++)if(null==(e=e[t[i]]))return null;return e},$.ia=function(){},$.ja=function(t){t.pV=void 0,t.Id=function(){return t.pV?t.pV:t.pV=new t}},$.ka=function(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var i=Object.prototype.toString.call(t);if("[object Window]"==i)return"object";if("[object Array]"==i||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==i||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e},$.A=function(t){return"array"==$.ka(t)},$.la=function(t){var e=$.ka(t);return"array"==e||"object"==e&&"number"==typeof t.length},$.ma=function(t){return $.C(t)&&"function"==typeof t.getFullYear},$.D=function(t){return"function"==$.ka(t)},$.C=function(t){var e=typeof t;return"object"==e&&null!=t||"function"==e},$.oa=function(t){return t[na]||(t[na]=++aaa)},baa=function(t,e,i){return t.call.apply(t.bind,arguments)},caa=function(t,e,i){if(!t)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,n),t.apply(e,i)}}return function(){return t.apply(e,arguments)}},$.pa=function(t,e,i){return Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?$.pa=baa:$.pa=caa,$.pa.apply(null,arguments)},$.qa=function(t,e){var i=Array.prototype.slice.call(arguments,1);return function(){var e=i.slice();return e.push.apply(e,arguments),t.apply(this,e)}},$.ra=function(t,e){for(var i in e)t[i]=e[i]},$.E=function(t,e){var i,n=t.split("."),s=$.fa;n[0]in s||void 0===s.execScript||s.execScript("var "+n[0]);for(;n.length&&(i=n.shift());)!n.length&&$.p(e)?s[i]=e:s=s[i]&&s[i]!==Object.prototype[i]?s[i]:s[i]={}},$.H=function(t,e){function i(){}i.prototype=e.prototype,t.u=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.XF=function(t,i,n){for(var s=Array(arguments.length-2),a=2;a<arguments.length;a++)s[a-2]=arguments[a];return e.prototype[i].apply(t,s)}},ta=function(t){if(Error.captureStackTrace)Error.captureStackTrace(this,ta);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))},$.ua=function(t){return t[t.length-1]},$.va=function(t,e,i){var n=t.length,s=$.z(t)?t.split(""):t;for(--n;0<=n;--n)n in s&&e.call(i,s[n],n,t)},$.ya=function(t,e,i){return 0>(e=$.xa(t,e,i))?null:$.z(t)?t.charAt(e):t[e]},$.xa=function(t,e,i){for(var n=t.length,s=$.z(t)?t.split(""):t,a=0;a<n;a++)if(a in s&&e.call(i,s[a],a,t))return a;return-1},$.Aa=function(t,e){return 0<=(0,$.za)(t,e)},$.Ba=function(t,e){$.Aa(t,e)||t.push(e)},$.Da=function(t,e,i){$.Ca(t,i,0,e)},$.Fa=function(t,e){var i,n=(0,$.za)(t,e);return(i=0<=n)&&Ea(t,n),i},Ea=function(t,e){return 1==Array.prototype.splice.call(t,e,1).length},$.Ga=function(t){return Array.prototype.concat.apply([],arguments)},daa=function(t){return Array.prototype.concat.apply([],arguments)},$.Ha=function(t){var e=t.length;if(0<e){for(var i=Array(e),n=0;n<e;n++)i[n]=t[n];return i}return[]},$.Ia=function(t,e){for(var i=1;i<arguments.length;i++){var n=arguments[i];if($.la(n)){var s=t.length||0,a=n.length||0;t.length=s+a;for(var o=0;o<a;o++)t[s+o]=n[o]}else t.push(n)}},$.Ca=function(t,e,i,n){return Array.prototype.splice.apply(t,$.Ja(arguments,1))},$.Ja=function(t,e,i){return 2>=arguments.length?Array.prototype.slice.call(t,e):Array.prototype.slice.call(t,e,i)},$.Ka=function(t,e,i){e=e||t,i=i||function(t){return $.C(t)?"o"+$.oa(t):(typeof t).charAt(0)+t};for(var n={},s=0,a=0;a<t.length;){var o=t[a++],r=i(o);Object.prototype.hasOwnProperty.call(n,r)||(n[r]=!0,e[s++]=o)}e.length=s},$.Na=function(t,e,i){return La(t,i||$.Ma,!1,e)},$.Oa=function(t,e,i){return La(t,e,!0,void 0,i)},La=function(t,e,i,n,s){for(var a,o=0,r=t.length;o<r;){var l,h=o+r>>1;0<(l=i?e.call(s,t[h],h,t):e(n,t[h]))?o=h+1:(r=h,a=!l)}return a?o:~o},$.Pa=function(t,e){t.sort(e||$.Ma)},$.Ra=function(t,e){for(var i=Array(t.length),n=0;n<t.length;n++)i[n]={index:n,value:t[n]};var s=e||$.Ma;for($.Pa(i,(function(t,e){return s(t.value,e.value)||t.index-e.index})),n=0;n<t.length;n++)t[n]=i[n].value},eaa=function(t,e){var i=$.Ma;$.Pa(t,(function(t,n){return i(e(t),e(n))}))},Sa=function(t){eaa(t,(function(t){return t.offset}))},$.Ta=function(t,e){if(!$.la(t)||!$.la(e)||t.length!=e.length)return!1;for(var i=t.length,n=faa,s=0;s<i;s++)if(!n(t[s],e[s]))return!1;return!0},$.Ma=function(t,e){return t>e?1:t<e?-1:0},faa=function(t,e){return t===e},$.Ua=function(t,e,i){return 0>(i=$.Na(t,e,i))&&($.Da(t,e,-(i+1)),!0)},$.Va=function(t,e){var i=[],n=0,s=t;if(void 0!==e&&(n=t,s=e),0>s-n)return[];for(;n<s;n+=1)i.push(n);return i},Ya=function(t){return $.Ga.apply([],(0,$.Wa)(t,Xa,void 0))},$.Za=function(t,e,i){return Math.min(Math.max(t,e),i)},$.$a=function(t,e){var i=t%e;return 0>i*e?i+e:i},$.ab=function(t){return $.$a(t,360)},$.bb=function(t){return t*Math.PI/180},$.cb=function(t){return 180*t/Math.PI},$.db=function(t,e){return e*Math.cos($.bb(t))},$.eb=function(t,e){return e*Math.sin($.bb(t))},$.fb=function(t){return 0<t?1:0>t?-1:t},$.gb=function(t,e){this.x=$.p(t)?t:0,this.y=$.p(e)?e:0},$.ib=function(t,e){return t==e||!(!t||!e)&&t.x==e.x&&t.y==e.y},$.jb=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},$.kb=function(t,e,i,n){this.top=t,this.right=e,this.bottom=i,this.left=n},$.lb=function(t,e){this.width=t,this.height=e},$.mb=function(t,e){return t==e||!(!t||!e)&&t.width==e.width&&t.height==e.height},$.I=function(t,e,i,n){this.left=t,this.top=e,this.width=i,this.height=n},$.nb=function(t,e){return t==e||!(!t||!e)&&t.left==e.left&&t.width==e.width&&t.top==e.top&&t.height==e.height},$.ob=function(t,e){var i=Math.max(t.left,e.left),n=Math.min(t.left+t.width,e.left+e.width);if(i<=n){var s=Math.max(t.top,e.top),a=Math.min(t.top+t.height,e.top+e.height);if(s<=a)return new $.I(i,s,n-i,a-s)}return null},gaa=function(t,e){var i;if((i=$.ob(t,e))&&i.height&&i.width){i=[];var n=t.top,s=t.height,a=t.left+t.width,o=t.top+t.height,r=e.left+e.width,l=e.top+e.height;e.top>t.top&&(i.push(new $.I(t.left,t.top,t.width,e.top-t.top)),n=e.top,s-=e.top-t.top),l<o&&(i.push(new $.I(t.left,l,t.width,o-l)),s=l-n),e.left>t.left&&i.push(new $.I(t.left,n,e.left-t.left,s)),r<a&&i.push(new $.I(r,n,a-r,s))}else i=[t.clone()];return i},$.pb=function(t,e){var i=Math.max(t.left+t.width,e.left+e.width),n=Math.max(t.top+t.height,e.top+e.height);t.left=Math.min(t.left,e.left),t.top=Math.min(t.top,e.top),t.width=i-t.left,t.height=n-t.top},$.qb=function(t,e){return e instanceof $.gb?e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height:t.left<=e.left&&t.left+t.width>=e.left+e.width&&t.top<=e.top&&t.top+t.height>=e.top+e.height},$.rb=function(t,e){var i=e.x<t.left?t.left-e.x:Math.max(e.x-(t.left+t.width),0),n=e.y<t.top?t.top-e.y:Math.max(e.y-(t.top+t.height),0);return i*i+n*n},$.sb=function(t){return new $.gb(t.left+t.width/2,t.top+t.height/2)},$.tb=function(t,e,i,n,s,a,o){var r=$.bb(a);r/=a=Math.ceil(Math.abs(r)/Math.PI*2);var l=$.bb(s);for(s=o?[t+$.db(s,i),e+$.eb(s,n)]:[],o=0;o<a;o++){var h=Math.cos(l),c=Math.sin(l),u=4/3*Math.sin(r/2)/(1+Math.cos(r/2)),d=t+(h-u*c)*i,p=e+(c+u*h)*n;l+=r,h=Math.cos(l),c=Math.sin(l),s.push(d,p,t+(h+u*c)*i,e+(c-u*h)*n,t+h*i,e+c*n)}return s},ub=function(t){function e(t,e,i,n,s){var a=1-s;return a*a*a*t+3*a*a*s*e+3*a*s*s*i+s*s*s*n}for(var i=[[arguments[0]],[arguments[1]]],n=2,s=arguments.length;n<s;n+=6){var a=[arguments[n-2],arguments[n-1]],o=[arguments[n],arguments[n+1]],r=[arguments[n+2],arguments[n+3]],l=[arguments[n+4],arguments[n+5]];i[0].push(l[0]),i[1].push(l[1]);for(var h,c=0;2>c;c++){var u=-3*a[c]+9*o[c]-9*r[c]+3*l[c],d=6*a[c]-12*o[c]+6*r[c];if(h=3*o[c]-3*a[c],0==u)0!=d&&0<(h=-h/d)&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h));else{var p=d*d-4*h*u;0<p?(0<(h=(-d+Math.sqrt(p))/(2*u))&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h)),0<(h=(-d-Math.sqrt(p))/(2*u))&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h))):0==p&&0<(h=-d/(2*u))&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h))}}}return(n=new $.I(Math.min.apply(null,i[0]),Math.min.apply(null,i[1]),0,0)).width=Math.max.apply(null,i[0])-n.left,n.height=Math.max.apply(null,i[1])-n.top,n},yb=function(t){if(0==arguments.length)return null;for(var e=null,i=!1,n=0,s=arguments.length;n<s;n++)arguments[n]&&(e?(i||(i=!!(e=e.clone())),$.wb(e,arguments[n])):e=arguments[n]);return e},$.Ab=function(t,e){if(!e||$.zb(e))return t;var i=t.left,n=t.top,s=i+t.width,a=n+t.height;return a=[i,n,i,a,s,n,s,a],e.transform(a,0,a,0,4),i=Math.min(a[0],a[2],a[4],a[6]),n=Math.min(a[1],a[3],a[5],a[7]),s=Math.max(a[0],a[2],a[4],a[6]),a=Math.max(a[1],a[3],a[5],a[7]),new $.I(i,n,s-i,a-n)},$.Bb=function(t,e,i,n){var s=(t*i+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(i*i+n*n));return s=$.Za(s,-1,1),s=$.cb(Math.acos(s)),0<t*n-e*i?s:-s},$.Cb=function(t){return t?$.cb(Math.atan2(t.We,t.Le)):0},$.Db=function(t,e,i,n,s,a){if(6==arguments.length)this.setTransform(t,e,i,n,s,a);else{if(0!=arguments.length)throw Error("Insufficient matrix parameters");this.od=this.Le=1,this.We=this.gf=this.Jd=this.Fd=0}},$.zb=function(t){return 1==t.od&&0==t.We&&0==t.gf&&1==t.Le&&0==t.Jd&&0==t.Fd},$.Eb=function(t,e,i){t.od*=e,t.gf*=e,t.Jd*=e,t.We*=i,t.Le*=i,t.Fd*=i},$.Fb=function(t,e,i){t.Jd+=e,t.Fd+=i},Gb=function(t,e,i){var n=t.od,s=t.We;t.od+=i*t.gf,t.We+=i*t.Le,t.gf+=e*n,t.Le+=e*s},$.wb=function(t,e){var i=t.od,n=t.gf;return t.od=e.od*i+e.We*n,t.gf=e.gf*i+e.Le*n,t.Jd+=e.Jd*i+e.Fd*n,i=t.We,n=t.Le,t.We=e.od*i+e.We*n,t.Le=e.gf*i+e.Le*n,t.Fd+=e.Jd*i+e.Fd*n,t},$.Hb=function(t,e){var i=t.od,n=t.We;t.od=e.od*i+e.gf*n,t.We=e.We*i+e.Le*n,i=t.gf,n=t.Le,t.gf=e.od*i+e.gf*n,t.Le=e.We*i+e.Le*n,i=t.Jd,n=t.Fd,t.Jd=e.od*i+e.gf*n+e.Jd,t.Fd=e.We*i+e.Le*n+e.Fd},$.Jb=function(t){var e=t.od*t.Le-t.gf*t.We;return new $.Db(t.Le/e,-t.We/e,-t.gf/e,t.od/e,(t.gf*t.Fd-t.Le*t.Jd)/e,(t.We*t.Jd-t.od*t.Fd)/e)},$.Kb=function(t,e,i){var n=new $.Db,s=Math.cos(t);return t=Math.sin(t),n.setTransform(s,t,-t,s,e-e*s+i*t,i-e*t-i*s)},Lb=function(t,e){var i=t.left,n=t.top;switch(e=e.toLowerCase()){case"left-center":n+=t.height/2;break;case"left-bottom":n+=t.height;break;case"center-top":i+=t.width/2;break;case"center":i+=t.width/2,n+=t.height/2;break;case"center-bottom":i+=t.width/2,n+=t.height;break;case"right-top":i+=t.width;break;case"right-center":i+=t.width,n+=t.height/2;break;case"right-bottom":i+=t.width,n+=t.height}return[i,n]},$.Mb=function(t){var e,i,n=t.trim().replace(/\(\s+/gi,"(").replace(/\s+\)/gi,")").replace(/(\s+,\s+)|(\s+)/gi,",").replace(/(\)),*(\w)/gi,"$1 $2").split(" "),s=new $.Db;for(t=0,i=n.length;t<i;t++){var a=/^(matrix|translate|rotate|scale|skewX|skewY)\(([e\d.,-]+)\)/i.exec(n[t]),o=a[1],r=a[2].split(",");for(a=0,e=r.length;a<e;a++)r[a]=(0,window.parseFloat)(r[a]);switch(o){case"matrix":o=new $.Db(r[0],r[1],r[2],r[3],r[4],r[5]),$.wb(s,o);break;case"translate":s.translate(r[0],r[1]||0);break;case"rotate":s.rotate($.bb(r[0]),r[1]||0,r[2]||0);break;case"scale":s.scale(r[0],r[1]||0);break;case"skewX":Gb(s,Math.tan($.bb(r[0])),0);break;case"skewY":Gb(s,0,Math.tan($.bb(r[0])))}}return s},$.Ub=function(t,e,i,n,s,a,o){var r,l;if($.z(t)){var h=Nb(t,!1);$.z(h)&&$.p(e)&&(n=(0,window.parseFloat)(e),h={color:t,opacity:(0,window.isNaN)(n)?1:$.Za(n,0,1)})}else if($.A(t)){var c=$.Ja(t,0);for(r=c.length;r--;){var u=c[r];$.z(u)&&(u=Ob(u)),(0,window.isNaN)(u.offset)&&(u.offset=r/(c.length-1||1)),c[r]=u}if((u=$.Ja(c,0)).sort((function(t,e){return t.offset-e.offset})),0!=u[0].offset){var d={offset:0,color:c[0].color};$.p(c[0].opacity)&&!(0,window.isNaN)(c[0].opacity)&&(d.opacity=$.Za(c[0].opacity,0,1)),c.unshift(d)}1!=u[u.length-1].offset&&(d={offset:1,color:c[c.length-1].color},$.p(c[c.length-1].opacity)&&!(0,window.isNaN)(c[c.length-1].opacity)&&(d.opacity=$.Za(c[c.length-1].opacity,0,1)),c.push(d)),h=$.ea(e)&&!(0,window.isNaN)(e)&&$.ea(i)&&!(0,window.isNaN)(i)?{keys:c,cx:e=e||0,cy:i=i||0,mode:Pb(n),fx:(0,window.isNaN)(a)?e:+a,fy:(0,window.isNaN)(o)?i:+o,opacity:$.Za($.p(s)?s:1,0,1)}:{keys:c,angle:+e||0,mode:Pb(i)||!!i,opacity:$.Za((0,window.isNaN)(+n)?1:+n,0,1)}}else if($.C(t))if($.J(t,$.Qb))h=t;else if("pattern"==t.type)delete t.id,h=t.bounds,h=new $.I(h.left,h.top,h.width,h.height),(h=$.Sb(h)).pe(t);else if("keys"in t){for(r=(c=$.Ja(t.keys,0)).length;r--;)u=c[r],$.z(u)?d=Ob(u):(l=$.z(u.color)?u.color:$.A(u.color)?$.Tb(u.color):"black",d={offset:u.offset,color:l},(0,window.isNaN)(u.opacity)||(d.opacity=$.Za(u.opacity,0,1))),(0,window.isNaN)(d.offset)&&(d.offset=r/(c.length-1||1)),c[r]=d;(u=$.Ja(c,0)).sort((function(t,e){return t.offset-e.offset})),0!=u[0].offset&&(d={offset:0,color:c[0].color},$.p(c[0].opacity)&&!(0,window.isNaN)(c[0].opacity)&&(d.opacity=$.Za(c[0].opacity,0,1)),c.unshift(d)),1!=u[u.length-1].offset&&(d={offset:1,color:c[c.length-1].color},$.p(c[c.length-1].opacity)&&!(0,window.isNaN)(c[c.length-1].opacity)&&(d.opacity=$.Za(c[c.length-1].opacity,0,1)),c.push(d)),n=$.Za($.p(t.opacity)?t.opacity:1,0,1),s=Pb(t.mode),e=t.cx,i=t.cy,h=$.ea(e)&&!(0,window.isNaN)(e)&&$.ea(i)&&!(0,window.isNaN)(i)?{keys:c,cx:+e,cy:+i,mode:s,fx:(0,window.isNaN)(t.fx)?+t.cx:+t.fx,fy:(0,window.isNaN)(t.fy)?+t.cy:+t.fy,opacity:n}:{keys:c,angle:+t.angle||0,mode:s||!!t.mode,opacity:n},null!=(t=t.transform)&&($.J(t,$.Db)?h.transform=t:$.C(t)?(h.transform=new $.Db,h.transform.setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12)):$.z(t)&&(h.transform=$.Mb(t)))}else"src"in t?h={src:t.src,mode:$.p(t.mode)?t.mode:"stretch",opacity:$.Za($.p(t.opacity)?t.opacity:1,0,1)}:(l=$.z(t.color)?t.color:"black",h=(0,window.isNaN)(t.opacity)?l:{color:l,opacity:$.Za(t.opacity,0,1)});else h="none";return h},$.Wb=function(t,e,i,n,s){if(null===t)var a="none";else{if($.z(t)){a=Vb(t,1);var o=(0,window.parseFloat)(a[0]);(0,window.isNaN)(o)||(t=a[1],e=o)}if(a=$.C(t),e=(0,window.parseFloat)(a&&"thickness"in t?t.thickness:e),!(0,window.isNaN)(e)&&!e)return"none";o=a&&"dash"in t;var r=a&&"lineJoin"in t,l=a&&"lineCap"in t;if("none"==(a=$.Ub(t)))return a;a=$.J(a,$.Qb)?"black":a,(!(0,window.isNaN)(e)||o||r||l||$.p(i)||$.p(n)||$.p(s))&&($.z(a)&&(a={color:a}),(0,window.isNaN)(e)||(a.thickness=e),o?a.dash=t.dash||"none":null!=i&&(a.dash=i||"none"),r?a.lineJoin=t.lineJoin||"none":null!=n&&(a.lineJoin=n||"none"),l?a.lineCap=t.lineCap||"none":null!=s&&(a.lineCap=s||"none"))}return a},$.Yb=function(t,e,i,n){return $.z(t)&&"none"==t.toLowerCase()?null:($.z(t)||$.ea(t)?e=Xb(t,e,$.p(i)?(0,window.parseFloat)(i):void 0,$.p(n)?(0,window.parseFloat)(n):void 0):$.J(t,$.Qb)?e=t:$.C(t)?"pattern"==t.type?(delete t.id,e=t.bounds,e=new $.I(e.left,e.top,e.width,e.height),(e=$.Sb(e)).pe(t)):e=Xb(t.type,t.color,t.thickness,t.size):e=null,e)},Pb=function(t){if(null!=t){if($.J(t,$.I))return t;if($.C(t)&&!(0,window.isNaN)(t.left)&&!(0,window.isNaN)(t.top)&&!(0,window.isNaN)(t.width)&&!(0,window.isNaN)(t.height))return new $.I(t.left,t.top,t.width,t.height)}return null},$.Zb=function(t){return"object"===$.ka(t)&&"offsetX"in t&&"offsetY"in t?t.offsetX+" "+t.offsetY+" "+(t.blurRadius||"0")+" "+(t.color||""):$.z(t)?t:"none"},Nb=function(t,e){var i=t.split(" "),n=1<i.length?$.Za(+i[i.length-1],0,1):window.NaN;if((0,window.isNaN)(n)){if(e)return{color:t};n=1}else i.pop(),t=i.join(" ");return e||1!=n?{color:t,opacity:n}:t},Ob=function(t){var e=Vb(t,1),i=window.NaN;return 1<e.length&&(i=(0,window.parseFloat)(e[0]),t=(0,window.isNaN)(i)?t:e[1]),t=Nb(t,!0),(0,window.isNaN)(i)||(t.offset=$.Za(i,0,1)),t},$.$b=function(t){var e;return t&&"none"!=t?(0,window.isNaN)(e=t.thickness)||null===e?1:e:0},$.ac=function(){},$.cc=function(t,e,i){return e[t.b]||(e[t.b]=bc(t,e,i))},bc=function(t,e,i){return["ac",$.p(i)?i:e.Sm?e.Sm():"",t.i,(t.f++).toString(36)].join("_")},$.ec=function(t,e){return 0==t.lastIndexOf(e,0)},$.fc=function(t,e){var i=t.length-e.length;return 0<=i&&t.indexOf(e,i)==i},$.gc=function(t,e){for(var i=t.split("%s"),n="",s=Array.prototype.slice.call(arguments,1);s.length&&1<i.length;)n+=i.shift()+s.shift();return n+i.join("%s")},$.hc=function(t){return t.replace(/(\r\n|\r|\n)/g,"\n")},ic=function(t){return t.replace(/\xa0|[ \t]+/g," ")},$.lc=function(t){return t.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},$.nc=function(t){return t.replace(/^[\s\xa0]+/,"")},$.oc=function(t,e){return t.replace(/(\r\n|\r|\n)/g,e?"<br />":"<br>")},$.pc=function(t){return haa.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(iaa,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(jaa,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(kaa,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(laa,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(maa,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(naa,"&#0;")),t):t},sc=function(t){for(var e=[],i=0;i<t.length;i++){var n=i,s=t.charAt(i);if(s in qc)s=qc[s];else if(s in rc)s=qc[s]=rc[s];else{var a=s.charCodeAt(0);if(31<a&&127>a)var o=s;else 256>a?(o="\\x",(16>a||256<a)&&(o+="0")):(o="\\u",4096>a&&(o+="0")),o+=a.toString(16).toUpperCase();s=qc[s]=o}e[n]=s}return e.join("")},tc=function(t){return String(t).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},$.uc=function(t,e){var i=$.p(void 0)?t.toFixed(void 0):String(t),n=i.indexOf(".");return-1==n&&(n=i.length),oaa("0",Math.max(0,e-n))+i},$.xc=function(t,e){for(var i=0,n=(0,$.vc)(String(t)).split("."),s=(0,$.vc)(String(e)).split("."),a=Math.max(n.length,s.length),o=0;0==i&&o<a;o++){var r=n[o]||"",l=s[o]||"";do{if(r=/(\d*)(\D*)(.*)/.exec(r)||["","","",""],l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],0==r[0].length&&0==l[0].length)break;i=wc(0==r[1].length?0:(0,window.parseInt)(r[1],10),0==l[1].length?0:(0,window.parseInt)(l[1],10))||wc(0==r[2].length,0==l[2].length)||wc(r[2],l[2]),r=r[3],l=l[3]}while(0==i)}return i},wc=function(t,e){return t<e?-1:t>e?1:0},yc=function(t){return String(t).replace(/\-([a-z])/g,(function(t,e){return e.toUpperCase()}))},$.zc=function(t){var e=$.z(void 0)?tc(void 0):"\\s";return t.replace(new RegExp("(^"+(e?"|["+e+"]+":"")+")([a-z])","g"),(function(t,e,i){return e+i.toUpperCase()}))},Vb=function(t,e){for(var i=t.split(" "),n=[];0<e&&i.length;)n.push(i.shift()),e--;return i.length&&n.push(i.join(" ")),n},$.Cc=function(t){return-1!=Bc.indexOf(t)},$.Dc=function(t,e,i){for(var n in t)e.call(i,t[n],n,t)},paa=function(t,e){var i,n={};for(i in t)e.call(void 0,t[i],i,t)&&(n[i]=t[i]);return n},$.Ec=function(t){var e,i=[],n=0;for(e in t)i[n++]=t[e];return i},$.Fc=function(t){var e,i=[],n=0;for(e in t)i[n++]=e;return i},$.Gc=function(t,e){return null!==t&&e in t},$.Hc=function(t,e,i){for(var n in t)if(e.call(i,t[n],n,t))return n},$.Ic=function(t,e){var i=$.Hc(t,e,void 0);return i&&t[i]},$.Jc=function(t){for(var e in t)return!1;return!0},$.Kc=function(t){for(var e in t)delete t[e]},$.Lc=function(t,e){e in t&&delete t[e]},$.Mc=function(t,e,i){if(null!==t&&e in t)throw Error('The object already contains the key "'+e+'"');t[e]=i},$.Pc=function(t,e){for(var i in t)if(!(i in e)||t[i]!==e[i])return!1;for(i in e)if(!(i in t))return!1;return!0},$.Qc=function(t){var e,i={};for(e in t)i[e]=t[e];return i},$.Sc=function(t,e){for(var i,n,s=1;s<arguments.length;s++){for(i in n=arguments[s])t[i]=n[i];for(var a=0;a<Rc.length;a++)i=Rc[a],Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}},Tc=function(t){var e=arguments.length;if(1==e&&$.A(arguments[0]))return Tc.apply(null,arguments[0]);for(var i={},n=0;n<e;n++)i[arguments[n]]=!0;return i},$.Uc=function(){return $.Cc("Trident")||$.Cc("MSIE")},Vc=function(){return($.Cc("Chrome")||$.Cc("CriOS"))&&!$.Cc("Edge")},Wc=function(){return $.Cc("iPhone")&&!$.Cc("iPod")&&!$.Cc("iPad")},Xc=function(){return Wc()||$.Cc("iPad")||$.Cc("iPod")},Yc=function(t){return Yc[" "](t),t},$.Zc=function(t,e){try{return Yc(t[e]),!0}catch(i){}return!1},raa=function(t,e){var i=qaa;return Object.prototype.hasOwnProperty.call(i,t)?i[t]:i[t]=e(t)},$c=function(){var t=$.fa.document;return t?t.documentMode:void 0},$.bd=function(t){return raa(t,(function(){return 0<=$.xc($.ad,t)}))},$.dd=function(t){return Number(cd)>=t},$.fd=function(t){var e=$.ka(t);if("array"==e){e=[];for(var i=0;i<t.length;i++)i in t&&(e[i]=$.fd(t[i]))}else{if("object"!=e)return t;for(i in e={},t)t.hasOwnProperty(i)&&(e[i]=$.fd(t[i]))}return e},$.kd=function(t,e,i){if($.gd||$.hd)t.apply(i,e);else for(var n=0,s=5e4,a=Math.ceil(e.length/5e4),o=0;o<a;o++)t.apply(i,e.slice(n,s)),n+=5e4,s+=5e4},$.J=function(t,e){return!!t&&t instanceof e},$.ld=function(t){return saa[t]||"Unknown error happened"},$.od=function(){0!=md&&(nd[$.oa(this)]=this),this.md=this.md,this.bv=this.bv},$.rd=function(t,e){$.pd(t,$.qa($.qd,e))},$.pd=function(t,e,i){t.md?$.p(i)?e.call(i):e():(t.bv||(t.bv=[]),t.bv.push($.p(i)?(0,$.pa)(e,i):e))},$.qd=function(t){t&&"function"==typeof t.ld&&t.ld()},$.sd=function(t){for(var e=0,i=arguments.length;e<i;++e){var n=arguments[e];$.la(n)?$.sd.apply(null,n):$.qd(n)}},wd=function(t,e){this.type=t,this.currentTarget=this.target=e,this.defaultPrevented=this.b=!1,this.q5=!0},zd=function(t){return $.xd?"webkit"+t:$.yd?"o"+t.toLowerCase():t.toLowerCase()},$.Bd=function(t,e){if(wd.call(this,t?t.type:""),this.relatedTarget=this.currentTarget=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0,this.key="",this.f=this.keyCode=0,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.i=!1,this.pointerId=0,this.pointerType="",this.kf=null,t){var i=this.type=t.type,n=t.changedTouches?t.changedTouches[0]:null;this.target=t.target||t.srcElement,this.currentTarget=e;var s=t.relatedTarget;s?$.gd&&($.Zc(s,"nodeName")||(s=null)):"mouseover"==i?s=t.fromElement:"mouseout"==i&&(s=t.toElement),this.relatedTarget=s,null===n?(this.offsetX=$.xd||void 0!==t.offsetX?t.offsetX:t.layerX,this.offsetY=$.xd||void 0!==t.offsetY?t.offsetY:t.layerY,this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0),this.button=t.button,this.keyCode=t.keyCode||0,this.key=t.key||"",this.f=t.charCode||("keypress"==i?t.keyCode:0),this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.i=$.Ad?t.metaKey:t.ctrlKey,this.pointerId=t.pointerId||0,this.pointerType=$.z(t.pointerType)?t.pointerType:taa[t.pointerType]||"",this.state=t.state,this.kf=t,t.defaultPrevented&&this.preventDefault()}},Cd=function(t,e){return uaa?t.kf.button==e:"click"==t.type?0==e:!!(t.kf.button&vaa[e])},$.Ed=function(t){return!(!t||!t[Dd])},xaa=function(t,e,i,n,s){this.listener=t,this.proxy=null,this.src=e,this.type=i,this.capture=!!n,this.zy=s,this.key=++waa,this.uE=this.gL=!1},Gd=function(t){t.uE=!0,t.listener=null,t.proxy=null,t.src=null,t.zy=null},Hd=function(t){this.src=t,this.b={},this.f=0},Id=function(t,e){var i=e.type;if(!(i in t.b))return!1;var n=$.Fa(t.b[i],e);return n&&(Gd(e),0==t.b[i].length&&(delete t.b[i],t.f--)),n},Jd=function(t,e,i,n){for(var s=0;s<t.length;++s){var a=t[s];if(!a.uE&&a.listener==e&&a.capture==!!i&&a.zy==n)return s}return-1},$.Ld=function(t,e,i,n,s){if(n&&n.once)return Kd(t,e,i,n,s);if($.A(e)){for(var a=0;a<e.length;a++)$.Ld(t,e[a],i,n,s);return null}return i=Md(i),$.Ed(t)?t.wa(e,i,$.C(n)?!!n.capture:!!n,s):Nd(t,e,i,!1,n,s)},Nd=function(t,e,i,n,s,a){if(!e)throw Error("Invalid event type");var o=$.C(s)?!!s.capture:!!s,r=Od(t);if(r||(t[Ud]=r=new Hd(t)),(i=r.add(e,i,n,o,a)).proxy)return i;if(n=yaa(),i.proxy=n,n.src=t,n.listener=i,t.addEventListener)zaa||(s=o),void 0===s&&(s=!1),t.addEventListener(e.toString(),n,s);else if(t.attachEvent)t.attachEvent(Vd(e.toString()),n);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(n)}return i},yaa=function(){var t=Aaa,e=Xd?function(i){return t.call(e.src,e.listener,i)}:function(i){if(!(i=t.call(e.src,e.listener,i)))return i};return e},Kd=function(t,e,i,n,s){if($.A(e)){for(var a=0;a<e.length;a++)Kd(t,e[a],i,n,s);return null}return i=Md(i),$.Ed(t)?t.Ce(e,i,$.C(n)?!!n.capture:!!n,s):Nd(t,e,i,!0,n,s)},$.Yd=function(t,e,i,n,s){if($.A(e)){for(var a=0;a<e.length;a++)$.Yd(t,e[a],i,n,s);return null}return n=$.C(n)?!!n.capture:!!n,i=Md(i),$.Ed(t)?t.gc(e,i,n,s):!!t&&!(!(t=Od(t))||!(e=t.fH(e,i,n,s)))&&Zd(e)},Zd=function(t){if($.ea(t)||!t||t.uE)return!1;var e=t.src;if($.Ed(e))return e.TB(t);var i=t.type,n=t.proxy;return e.removeEventListener?e.removeEventListener(i,n,t.capture):e.detachEvent?e.detachEvent(Vd(i),n):e.addListener&&e.removeListener&&e.removeListener(n),(i=Od(e))?(Id(i,t),0==i.f&&(i.src=null,e[Ud]=null)):Gd(t),!0},$.$d=function(t,e){if(!t)return 0;if($.Ed(t))return t.Bl(e);var i=Od(t);if(!i)return 0;var n,s=0,a=e&&e.toString();for(n in i.b)if(!a||n==a)for(var o=i.b[n].concat(),r=0;r<o.length;++r)Zd(o[r])&&++s;return s},$.be=function(t,e,i,n,s){return i=Md(i),n=!!n,$.Ed(t)||t&&(t=Od(t))?t.fH(e,i,n,s):null},Vd=function(t){return t in ce?ce[t]:ce[t]="on"+t},$.ee=function(t,e,i,n){var s=!0;if((t=Od(t))&&(e=t.b[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var a=e[t];a&&a.capture==i&&!a.uE&&(a=de(a,n),s=s&&!1!==a)}return s},de=function(t,e){var i=t.listener,n=t.zy||t.src;return t.gL&&Zd(t),i.call(n,e)},Aaa=function(t,e){if(t.uE)return!0;if(!Xd){var i=e||$.ha("window.event"),n=new $.Bd(i,this),s=!0;if(!(0>i.keyCode||null!=i.returnValue)){t:{var a=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(l){a=!0}(a||null==i.returnValue)&&(i.returnValue=!0)}for(i=[],a=n.currentTarget;a;a=a.parentNode)i.push(a);a=t.type;for(var o=i.length-1;!n.b&&0<=o;o--){n.currentTarget=i[o];var r=$.ee(i[o],a,!0,n);s=s&&r}for(o=0;!n.b&&o<i.length;o++)n.currentTarget=i[o],r=$.ee(i[o],a,!1,n),s=s&&r}return s}return de(t,new $.Bd(e,this))},Od=function(t){return(t=t[Ud])instanceof Hd?t:null},Md=function(t){return $.D(t)?t:(t[fe]||(t[fe]=function(e){return t.handleEvent(e)}),t[fe])},$.he=function(){this.b="",this.f=$.ge},$.ie=function(t){var e=new $.he;return e.b=t,e},$.ke=function(){this.f="",this.i=$.je},$.le=function(t){var e=new $.ke;return e.f=t,e},$.ne=function(){this.b="",this.f=$.me},$.oe=function(t){var e=new $.ne;return e.b=t,e},$.qe=function(){this.f="",this.o=$.pe,this.i=null},$.re=function(t,e){var i=new $.qe;return i.f=t,i.i=e,i},$.ye=function(t){return t?new se($.te(t)):ue||(ue=new se)},$.ze=function(t,e){return $.z(e)?t.getElementById(e):e},$.Ae=function(t,e,i,n){if(t=n||t,e=e&&"*"!=e?String(e).toUpperCase():"",t.querySelectorAll&&t.querySelector&&(e||i))return t.querySelectorAll(e+(i?"."+i:""));if(i&&t.getElementsByClassName){if(t=t.getElementsByClassName(i),e){n={};for(var s,a=0,o=0;s=t[o];o++)e==s.nodeName&&(n[a++]=s);return n.length=a,n}return t}if(t=t.getElementsByTagName(e||"*"),i){for(n={},o=a=0;s=t[o];o++)"function"==typeof(e=s.className).split&&$.Aa(e.split(/\s+/),i)&&(n[a++]=s);return n.length=a,n}return t},$.Ce=function(t,e){$.Dc(e,(function(e,i){e&&e.By&&(e=e.cu()),"style"==i?t.style.cssText=e:"class"==i?t.className=e:"for"==i?t.htmlFor=e:Be.hasOwnProperty(i)?t.setAttribute(Be[i],e):$.ec(i,"aria-")||$.ec(i,"data-")?t.setAttribute(i,e):t[i]=e}))},$.Ee=function(t){return t=t.document,t=$.De(t)?t.documentElement:t.body,new $.lb(t.clientWidth,t.clientHeight)},$.He=function(t){var e=$.Fe(t);return t=$.Ge(t),$.hd&&$.bd("10")&&t.pageYOffset!=e.scrollTop?new $.gb(e.scrollLeft,e.scrollTop):new $.gb(t.pageXOffset||e.scrollLeft,t.pageYOffset||e.scrollTop)},$.Fe=function(t){return t.scrollingElement?t.scrollingElement:!$.xd&&$.De(t)?t.documentElement:t.body||t.documentElement},$.Ge=function(t){return t.parentWindow||t.defaultView},$.Me=function(t,e,i){return Le(window.document,arguments)},Le=function(t,e){var i=String(e[0]),n=e[1];if(!Baa&&n&&(n.name||n.type)){if(i=["<",i],n.name&&i.push(' name="',$.pc(n.name),'"'),n.type){i.push(' type="',$.pc(n.type),'"');var s={};$.Sc(s,n),delete s.type,n=s}i.push(">"),i=i.join("")}return i=t.createElement(i),n&&($.z(n)?i.className=n:$.A(n)?i.className=n.join(" "):$.Ce(i,n)),2<e.length&&Ne(t,i,e,2),i},Ne=function(t,e,i,n){function s(i){i&&e.appendChild($.z(i)?t.createTextNode(i):i)}for(;n<i.length;n++){var a=i[n];$.la(a)&&!$.Oe(a)?(0,$.Pe)($.Qe(a)?$.Ha(a):a,s):s(a)}},$.Re=function(t,e){return t.createElement(String(e))},$.De=function(t){return"CSS1Compat"==t.compatMode},$.Se=function(t,e){t.appendChild(e)},Ue=function(t,e){Ne($.te(t),t,arguments,1)},$.Ve=function(t){for(var e;e=t.firstChild;)t.removeChild(e)},$.We=function(t,e,i){t.insertBefore(e,t.childNodes[i]||null)},$.Xe=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},$.Ze=function(t){return Caa&&null!=t.children?t.children:(0,$.Ye)(t.childNodes,(function(t){return 1==t.nodeType}))},$.$e=function(t){if($.p(t.firstElementChild))t=t.firstElementChild;else for(t=t.firstChild;t&&1!=t.nodeType;)t=t.nextSibling;return t},$.Oe=function(t){return $.C(t)&&0<t.nodeType},$.af=function(t){return $.C(t)&&1==t.nodeType},$.bf=function(t){var e;return!Daa||$.hd&&$.bd("9")&&!$.bd("10")&&$.fa.SVGElement&&t instanceof $.fa.SVGElement||!(e=t.parentElement)?(e=t.parentNode,$.af(e)?e:null):e},$.cf=function(t,e){if(!t||!e)return!1;if(t.contains&&1==e.nodeType)return t==e||t.contains(e);if(void 0!==t.compareDocumentPosition)return t==e||!!(16&t.compareDocumentPosition(e));for(;e&&t!=e;)e=e.parentNode;return e==t},$.te=function(t){return 9==t.nodeType?t:t.ownerDocument||t.document},$.df=function(t,e){if("textContent"in t)t.textContent=e;else if(3==t.nodeType)t.data=String(e);else if(t.firstChild&&3==t.firstChild.nodeType){for(;t.lastChild!=t.firstChild;)t.removeChild(t.lastChild);t.firstChild.data=String(e)}else $.Ve(t),t.appendChild($.te(t).createTextNode(String(e)))},ef=function(t){if("outerHTML"in t)return t.outerHTML;var e=$.Re($.te(t),"DIV");return e.appendChild(t.cloneNode(!0)),e.innerHTML},$.ff=function(t,e){e?t.tabIndex=0:(t.tabIndex=-1,t.removeAttribute("tabIndex"))},$.gf=function(t){return $.hd&&!$.bd("9")?null!=(t=t.getAttributeNode("tabindex"))&&t.specified:t.hasAttribute("tabindex")},$.jf=function(t){return t=t.tabIndex,$.ea(t)&&0<=t&&32768>t},$.lf=function(t){var e=[];return kf(t,e,!1),e.join("")},kf=function(t,e,i){if(!(t.nodeName in Eaa))if(3==t.nodeType)i?e.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(t.nodeValue);else if(t.nodeName in mf)e.push(mf[t.nodeName]);else for(t=t.firstChild;t;)kf(t,e,i),t=t.nextSibling},$.Qe=function(t){if(t&&"number"==typeof t.length){if($.C(t))return"function"==typeof t.item||"string"==typeof t.item;if($.D(t))return"function"==typeof t.item}return!1},se=function(t){this.b=t||$.fa.document||window.document},nf=function(t){$.od.call(this),this.qo=t,this.b={}},of=function(t,e,i,n,s,a){if($.A(i))for(var o=0;o<i.length;o++)of(t,e,i[o],n,s,a);else{if(!(e=Kd(e,i,n||t.handleEvent,s,a||t.qo||t)))return t;t.b[e.key]=e}return t},pf=function(t){$.Dc(t.b,(function(t,e){this.b.hasOwnProperty(e)&&Zd(t)}),t),t.b={}},$.qf=function(){$.od.call(this),this.gy=new Hd(this),this.N$=this,this.TW=null},$.sf=function(t,e,i,n){if(!(e=t.gy.b[String(e)]))return!0;e=e.concat();for(var s=!0,a=0;a<e.length;++a){var o=e[a];if(o&&!o.uE&&o.capture==i){var r=o.listener,l=o.zy||o.src;o.gL&&t.TB(o),s=!1!==r.call(l,n)&&s}}return s&&0!=n.q5},$.uf=function(t,e,i){if($.z(e))(e=tf(t,e))&&(t.style[e]=i);else for(var n in e){i=t;var s=e[n],a=tf(i,n);a&&(i.style[a]=s)}},tf=function(t,e){var i=vf[e];if(!i){var n=yc(e);i=n,void 0===t.style[n]&&(n=($.xd?"Webkit":$.gd?"Moz":$.hd?"ms":$.yd?"O":null)+$.zc(n),void 0!==t.style[n]&&(i=n)),vf[e]=i}return i},$.yf=function(t,e){var i=t.style[yc(e)];return void 0!==i?i:t.style[tf(t,e)]||""},$.zf=function(t,e){var i=$.te(t);return i.defaultView&&i.defaultView.getComputedStyle&&(i=i.defaultView.getComputedStyle(t,null))&&(i[e]||i.getPropertyValue(e))||""},$.Af=function(t,e){return $.zf(t,e)||(t.currentStyle?t.currentStyle[e]:null)||t.style&&t.style[e]},$.Cf=function(t,e,i){if(e instanceof $.gb){var n=e.x;e=e.y}else n=e,e=i;t.style.left=Bf(n,!1),t.style.top=Bf(e,!1)},$.Df=function(t){return t=t?$.te(t):window.document,!$.hd||$.dd(9)||$.De($.ye(t).b)?t.documentElement:t.body},Ef=function(t){try{var e=t.getBoundingClientRect()}catch(i){return{left:0,top:0,right:0,bottom:0}}return $.hd&&t.ownerDocument.body&&(t=t.ownerDocument,e.left-=t.documentElement.clientLeft+t.body.clientLeft,e.top-=t.documentElement.clientTop+t.body.clientTop),e},$.Ff=function(t){var e=$.te(t),i=new $.gb(0,0);return t==$.Df(e)||(t=Ef(t),e=$.He($.ye(e).b),i.x=t.left+e.x,i.y=t.top+e.y),i},$.Gf=function(t){return t=Ef(t),new $.gb(t.left,t.top)},$.Hf=function(t){return 1==t.nodeType?$.Gf(t):(t=t.changedTouches?t.changedTouches[0]:t,new $.gb(t.clientX,t.clientY))},$.If=function(t,e,i){if(e instanceof $.lb)i=e.height,e=e.width;else if(null==i)throw Error("missing height argument");t.style.width=Bf(e,!0),t.style.height=Bf(i,!0)},Bf=function(t,e){return"number"==typeof t&&(t=(e?Math.round(t):t)+"px"),t},$.Lf=function(t){var e=$.Jf;if("none"!=$.Af(t,"display"))return e(t);var i=t.style,n=i.display,s=i.visibility,a=i.position;return i.visibility="hidden",i.position="absolute",i.display="inline",t=e(t),i.display=n,i.position=a,i.visibility=s,t},$.Jf=function(t){var e=t.offsetWidth,i=t.offsetHeight,n=$.xd&&!e&&!i;return $.p(e)&&!n||!t.getBoundingClientRect?new $.lb(e,i):(t=Ef(t),new $.lb(t.right-t.left,t.bottom-t.top))},$.Of=function(t){var e=$.Ff(t);return t=$.Lf(t),new $.I(e.x,e.y,t.width,t.height)},$.Pf=function(t,e){t.style.display=e?"":"none"},$.Qf=function(t){return"rtl"==$.Af(t,"direction")},$.Sf=function(t,e,i){if(i=i?null:t.getElementsByTagName("*"),Rf){if(e=e?"none":"",t.style&&(t.style[Rf]=e),i){t=0;for(var n;n=i[t];t++)n.style&&(n.style[Rf]=e)}}else if(($.hd||$.yd)&&(e=e?"on":"",t.setAttribute("unselectable",e),i))for(t=0;n=i[t];t++)n.setAttribute("unselectable",e)},$.Wf=function(t){var e=$.te(t),i=$.hd&&t.currentStyle;return i&&$.De($.ye(e).b)&&"auto"!=i.width&&"auto"!=i.height&&!i.boxSizing?(e=Tf(t,i.width,"width","pixelWidth"),t=Tf(t,i.height,"height","pixelHeight"),new $.lb(e,t)):(i=new $.lb(t.offsetWidth,t.offsetHeight),e=$.Uf(t,"padding"),t=$.Vf(t),new $.lb(i.width-t.left-e.left-e.right-t.right,i.height-t.top-e.top-e.bottom-t.bottom))},Tf=function(t,e,i,n){if(/^\d+px?$/.test(e))return(0,window.parseInt)(e,10);var s=t.style[i],a=t.runtimeStyle[i];return t.runtimeStyle[i]=t.currentStyle[i],t.style[i]=e,e=t.style[n],t.style[i]=s,t.runtimeStyle[i]=a,+e},Xf=function(t,e){var i=t.currentStyle?t.currentStyle[e]:null;return i?Tf(t,i,"left","pixelLeft"):0},$.Uf=function(t,e){if($.hd){var i=Xf(t,e+"Left"),n=Xf(t,e+"Right"),s=Xf(t,e+"Top"),a=Xf(t,e+"Bottom");return new $.kb(s,n,a,i)}return i=$.zf(t,e+"Left"),n=$.zf(t,e+"Right"),s=$.zf(t,e+"Top"),a=$.zf(t,e+"Bottom"),new $.kb((0,window.parseFloat)(s),(0,window.parseFloat)(n),(0,window.parseFloat)(a),(0,window.parseFloat)(i))},Zf=function(t,e){if("none"==(t.currentStyle?t.currentStyle[e+"Style"]:null))return 0;var i=t.currentStyle?t.currentStyle[e+"Width"]:null;return i in Yf?Yf[i]:Tf(t,i,"left","pixelLeft")},$.Vf=function(t){if($.hd&&!$.dd(9)){var e=Zf(t,"borderLeft"),i=Zf(t,"borderRight"),n=Zf(t,"borderTop");return t=Zf(t,"borderBottom"),new $.kb(n,i,t,e)}return e=$.zf(t,"borderLeftWidth"),i=$.zf(t,"borderRightWidth"),n=$.zf(t,"borderTopWidth"),t=$.zf(t,"borderBottomWidth"),new $.kb((0,window.parseFloat)(n),(0,window.parseFloat)(i),(0,window.parseFloat)(t),(0,window.parseFloat)(e))},$f=function(t){return(t=t.exec(Bc))?t[1]:""},$.ag=function(t,e,i){$.qf.call(this),this.target=t,this.D=e||t,this.f=i||new $.I(window.NaN,window.NaN,window.NaN,window.NaN),this.o=$.te(t),this.Qg=new nf(this),$.rd(this,this.Qg),this.deltaY=this.deltaX=this.Ba=this.na=this.screenY=this.screenX=this.clientY=this.clientX=0,this.K=!0,this.lp=!1,this.P=0,$.Ld(this.D,["touchstart","mousedown"],this.lk,!1,this),this.G=Faa},$.bg=function(t){t.P=Math.pow(3,2)},cg=function(t,e,i){var n=$.He($.ye(t.o).b);return e+=n.x-t.aa.x,i+=n.y-t.aa.y,t.aa=n,t.deltaX+=e,t.deltaY+=i,e=t.VA(t.deltaX),t=t.xw(t.deltaY),new $.gb(e,t)},eg=function(t,e,i,n){t.ls(i,n),t.dispatchEvent(new dg("drag",t,e.clientX,e.clientY,e,i,n))},dg=function(t,e,i,n,s,a,o,r){wd.call(this,t),this.clientX=i,this.clientY=n,this.EC=s,this.left=$.p(a)?a:e.deltaX,this.top=$.p(o)?o:e.deltaY,this.f=e,this.o=!!r},fg=function(t){$.ag.call(this,t.ia()),this.i=t,this.b=[window.NaN,window.NaN],this.wa("earlycancel",this.Vja,!1,this),this.wa("start",this.LO,!1,this),this.wa("beforedrag",this.LO,!1,this),this.wa("drag",this.LO,!1,this),this.wa("end",this.LO,!1,this)},$.ig=function(){$.qf.call(this),this.BC={},this.IV=!1,this.FP=0,this.Pb(gg)},$.jg=function(t,e){t.XC&=~e},lg=function(t,e){t.lB&&(e&&t.lB.UI(t),t.lB=null),t.md&&t.gD()},ng=function(t){$.mg().zW()&&(t.ti?(t.Y&&t.Y.cG(),t.Pb(512)):t.Y&&t.Y.cG())},og=function(t){if(!t.vV){var e=t.Ig();t.vV=e?$.Jb(e):null}return t.vV},$.pg=function(){this.G="none",this.i="black",this.ec=0,$.ig.call(this)},qg=function(t,e,i,n){this.f=new $.gb(t||0,e||0),this.b=i||0,this.o=n||0,$.pg.call(this)},$.rg=function(t,e,i){qg.call(this,t,e,i,i)},$.sg=function(){this.o=[],this.f=[],this.D=[],$.pg.call(this)},tg=function(t,e,i,n,s,a){var o=0;s=s||null;for(var r=0,l=e.length;r<l;r++){var h=e[r],c=Gaa[h]*i[r];a&&1!=h?t.call(s,h,n.slice(o-2,o+c)):t.call(s,h,n.slice(o,o+c)),o+=c}},vg=function(t){return t.Uj()||(ug(t),t.Pb(32)),t},xg=function(t,e,i,n,s,a,o){if(0==n||0==s)return t.Ns(e,i);if(0==t.o.length)throw $.ld(9);var r=t.ag[0],l=t.ag[1];if(r==e&&l==i)return t;i=(l-i)/2;var h=(n=Math.abs(n))*n,c=(s=Math.abs(s))*s,u=(l=(e=(r-e)/2)*e)/h+(r=i*i)/c;return 1<u&&(h=(n*=u=Math.sqrt(u))*n,c=(s*=u)*s),0>(l=(h*c-h*r-c*l)/(h*r+c*l))&&(l=0),l=Math.sqrt(l),a==o&&(l=-l),a=l*n*i/s,r=-l*s*e/n,l=$.Bb(1,0,(e-a)/n,(i-r)/s),e=$.Bb((e-a)/n,(i-r)/s,(-e-a)/n,(-i-r)/s)%360,!o&&0<e?e-=360:o&&0>e&&(e+=360),wg(t,n,s,l,e)},wg=function(t,e,i,n,s){if(0==t.o.length)throw $.ld(9);if(0==s)return t;for(var a=t.ag[0]-$.db(n,e),o=t.ag[1]-$.eb(n,i),r=Math.ceil(Math.abs(s)/359.999-2e-15),l=s/r,h=0;h<r;h++){s=n+l;var c=a+$.db(s,e),u=o+$.eb(s,i);t.D.push(e,i,n,l,c,u),t.o.push(4),t.f.push(1),n=s}return t.$X=!1,t.ag=[c,u],t.ae(),t.pt=null,t.Pb(32),t},$.yg=function(t,e){var i=e||{};return i.closePoint=t.vv?t.vv.slice():[],i.currentPoint=t.ag?t.ag.slice():[],i.segments=t.o.slice(),i.count=t.f.slice(),i.arguments=t.D.slice(),i},ug=function(t){t.o.length=0,t.f.length=0,t.D.length=0,t.ae(),t.pt=null,delete t.vv,delete t.ag,delete t.$X},$.Ag=function(){$.sg.call(this)},Cg=function(t,e,i,n){this.b=new $.I(t||0,e||0,i||0,n||0),this.K=[],this.P=[0,0,0,0],$.sg.call(this),Bg(this)},Bg=function(t){var e=!t.Ja()||t.Ja().yf();e||t.Ja().suspend(),vg(t);var i=t.P[0];if(t.YN(t.b.left+i,t.b.top),i=t.P[1],t.Ns(t.b.left+t.b.width-t.P[1],t.b.top),t.K[1])switch(t.K[1]){case"round":xg(t,t.b.left+t.b.width,t.b.top+i,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left+t.b.width,t.b.top+i,i,i,!1,!1);break;case"cut":t.Ns(t.b.left+t.b.width,t.b.top+i)}if(i=t.P[2],t.Ns(t.b.left+t.b.width,t.b.top+t.b.height-i),t.K[2])switch(t.K[2]){case"round":xg(t,t.b.left+t.b.width-i,t.b.top+t.b.height,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left+t.b.width-i,t.b.top+t.b.height,i,i,!1,!1);break;case"cut":t.Ns(t.b.left+t.b.width-i,t.b.top+t.b.height)}if(i=t.P[3],t.Ns(t.b.left+i,t.b.top+t.b.height),t.K[3])switch(t.K[3]){case"round":xg(t,t.b.left,t.b.top+t.b.height-i,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left,t.b.top+t.b.height-i,i,i,!1,!1);break;case"cut":t.Ns(t.b.left,t.b.top+t.b.height-i)}if(i=t.P[0],t.Ns(t.b.left,t.b.top+i),t.K[0])switch(t.K[0]){case"round":xg(t,t.b.left+i,t.b.top,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left+i,t.b.top,i,i,!1,!1)}t.mS(),e||t.Ja().resume()},$.Dg=function(t,e,i,n,s){$.od.call(this),this.f=t,this.i=!1,this.elements=[],this.b=this.he=null,this.shape.apply(this,$.Ja(arguments,1))},Eg=function(t){if(!t.i&&(t.i=!0,t.f)){var e=t.f;e.yf()?e.Qx.push(t):t.Sd()}},$.Fg=function(){this.children=[],this.ir=[],$.ig.call(this)},Hg=function(t){(0,$.Gg)(t.children,(function(t,e){return e.yr()&&e.Sd(),t||e.yr()}),!1)||$.jg(t,64)},Haa=function(t,e){function i(t){var e=t.ia();e&&($.Xe(e),r++),lg(t,!1),d.push(f)}function n(t){var e=t.ia();return e?(o.appendChild(e),r++,u.push(l),lg(t,!0)):c=!1,!!o}var s,a,o=t.ia(),r=0;if(!t.nM){t.nM={};var l=0;for(s=t.children.length;l<s;l++)t.nM[$.oa(t.children[l])]=!0}var h=!1,c=!0,u=[],d=[],p=!0;for(l=0,s=t.children.length-1;l<s;l++)if(t.children[l+1].zIndex()<t.children[l].zIndex()){p=!1;break}if(p)var g=t.children;else g=$.Ha(t.children),$.Ra(g,(function(t,e){return t.zIndex()-e.zIndex()}));l=0,s=g.length;var f=0;for(a=t.ir.length;l<s&&f<a&&r<e;f++){p=g[l];var b=t.ir[f];if($.oa(b)in t.nM){if(b!=p||h){if(!n(p))break;h=!0}l++}else i(b)}if(r>=e&&(c=!1),c){for(;l<s&&r<e&&n(g[l]);l++);for(;f<a&&r<e;f++)i(t.ir[f]);(l<s||f<a)&&(c=!1)}if(c)t.ir=$.Ja(g,0),t.nM=null,$.jg(t,128);else{for(l=d.length;l--;)$.Ca(t.ir,d[l],1);for(l=0;l<u.length;l++)t.ir.push(g[u[l]])}return r},Ig=function(t){for(var e=t.children.length;e--;)t.children[e].Uy()},$.Qb=function(t){this.Ta=t,this.Bo=!1,$.Fg.call(this)},Mg=function(t,e,i,n){t:{for(s in t=(t||"").toLowerCase(),Jg)if(Jg[s].toLowerCase()==t||Jg[s].toLowerCase().replace(/-/g,"")==t){var s=Jg[s];break t}s="backward-diagonal"}this.type=s,this.color=String(null!=e?e:"black 0.5"),this.Ef=null!=i?i:1,this.size=null!=n?n:10,$.Qb.call(this,new $.I(0,0,this.size,this.size)),(e=Iaa[this.type])&&e.call(this)},Og=function(t,e,i){this.Ta=new $.I(0,0,t,e),Ng(this,i)},Vg=function(t,e,i){this.Ta=new $.I(0,0,t,e),Ug(this,t,e),Ng(this,i,"white")},Xg=function(t,e,i,n){for(t=Wg(t,n),n=0;n<e.length;n++){var s=e[n];t.moveTo(s[0],s[1]);for(var a=2;a<s.length;a+=2)t.lineTo(s[a],s[a+1])}i&&t.close()},Yg=function(t,e,i){for(var n=Wg(t),s=0;s<e.length;s+=5){var a=n,o=e[s],r=e[s+1],l=e[s+2],h=e[s+3],c=e[s+4];o===l&&(o=l=Math.round(o)+c%2/2),r===h&&(r=h=Math.round(r)+c%2/2),a.moveTo(o,r).lineTo(l,h)}i&&t.rotate(i)},Zg=function(t,e){for(var i=0;i<e.length;i+=3){var n=e[i+2];Ug(t,n,n,e[i],e[i+1])}},Ug=function(t,e,i,n,s){t.rect(n||0,s||0,e,i).fill(t.color).stroke("none")},Wg=function(t,e){return e?t.path().fill(t.color).stroke("none"):t.path().fill("none").stroke(t.color,t.Ef)},Ng=function(t,e,i){for(t=t.path().fill(i||t.color).stroke("none"),i=0;i<e.length;i+=2){var n=e[i],s=e[i+1];t.moveTo(n,s).lineTo(n,s+1,n+1,s+1,n+1,s).close()}},bh=function(t,e,i,n,s,a,o){this.o=t||null,this.b=a||$.$g,this.f=o||$.ah,this.Bb=new $.I(e||0,i||0,n||0,s||0),this.i=1,$.ig.call(this)},ch=function(t){$.qf.call(this),this.f={},this.b={},this.qo=new nf(this),this.Y=t},dh=function(t,e,i){(i=$.z(i)?i:i.src)&&(t.f[e]={src:i,C0:$.p(void 0)?void 0:null})},fh=function(t,e){delete t.f[e];var i=t.b[e];i&&(delete t.b[e],t.qo.gc(i,eh,t.i),$.Jc(t.b)&&$.Jc(t.f)&&t.dispatchEvent("complete"))},$.gh=function(){this.G={},this.o="fontStyle fontVariant fontFamily fontSize fontWeight letterSpacing decoration".split(" ")},$.jh=function(t,e){if(hh(t," ",e))var i=ih(t," ",e);else{i=t.measure("a a",e);var n=t.measure("aa",e);i=new $.I(0,i.top,i.width-n.width,i.height),ih(t," ",e,i)}return i},nh=function(t,e){for(var i="",n=0,s=t.o.length;n<s;n++){var a=e[t.o[n]];$.p(a)&&(i+=a+"|")}return i},ih=function(t,e,i,n){var s=t.G,a=nh(t,i),o=s[a];return o||(o=s[a]={}),(s=o[e])?s:o[e]=n||t.measure(e,i)},hh=function(t,e,i){return!(!(t=t.G[nh(t,i)])||!t[e])},$.oh=function(t,e){if(t=$.ab(t),e.height==e.width)return t;if(e.height<e.width){var i=e.width,n=e.height;n/=i}else n=(i=e.height)/(n=e.width);return i/=2,i=$.cb(Math.atan(Math.tan($.bb(t))*i/i*n)),90<t&&270>=t?i=180+i:270<t&&360>=t&&(i=360+i),i%360},$.ph=function(t,e,i){for(var n in i)t.lc(e,n,i[n])},$.qh=function(t,e,i){e&&(i?t.lc(e,"id",i):e.removeAttribute("id"))},$.rh=function(t,e,i){if(e.Uj())return null;var n=[],s=t.D4;return(i?e.mfa:e.OT).call(e,(function(t,e){var i=s[t];i&&(n.push(i),4==t?this.W4(n,e):5!=t&&this.c5(n,e))}),t),n.join(" ")},th=function(t){return t.iu&&!t.iu.md||(t.iu=new ch($.sh.document.body)),t.iu},$.uh=function(){this.Ta=new $.I(0,0,0,0),$.ig.call(this)},vh=function(){},yh=function(t){t.style||(t.style=t.D.length?$.Qc(t.D[t.D.length-1]):{})},Bh=function(t,e){switch(e){case"b":case"strong":yh(t),t.style.fontWeight="bold";break;case"i":case"em":yh(t),t.style.fontStyle="italic"}},Dh=function(t,e,i){switch(e){case"font-style":yh(t),t.style.fontStyle=i||"normal";break;case"font-variant":yh(t),t.style.fontVariant=i||"normal";break;case"font-family":yh(t),t.style.fontFamily=i||$.Ch.fontFamily;break;case"font-size":yh(t),t.style.fontSize=i||$.Ch.fontSize;break;case"font-weight":yh(t),t.style.fontWeight=i||"normal";break;case"color":yh(t),t.style.color=i||$.Ch.color;break;case"letter-spacing":yh(t),t.style.letterSpacing=i||"normal";break;case"text-decoration":yh(t),t.style.er=i||"none";break;case"opacity":yh(t),t.style.opacity=null!=i?(0,window.parseFloat)(i):1}},Eh=function(t){""!=t.b&&(t.xb.nK(t.b,t.D.length?t.D[t.D.length-1]:null),t.b="",t.ea=!1)},Fh=function(t){t.K==(t.P.length?t.P[t.P.length-1]:null)&&(Eh(t),t.D.pop(),t.P.pop(),t.tagName=""),t.K="",t.state=1},Gh=function(t,e){Bh(t,t.tagName),t.P.push(t.tagName),t.D.push(t.style),e&&(t.f=""),t.tagName="",t.style=null,t.state=1},Hh=function(t,e,i){Dh(t,t.o,t.G||""),t.o="",t.G="",i&&(t.f=""),t.state=e},Ih=function(t){Bh(t,t.tagName),Dh(t,t.o,t.G||""),t.P.push(t.tagName),t.D.push(t.style),t.tagName="",t.style=null,t.f="",t.o="",t.G="",t.state=1},Kh=function(t,e,i){var n;if(t.aa){var s=Jh[t.i];$.p(s)?n=s:t.b+="&"+t.i+i}else t.i?n=(0,window.parseInt)(t.i,10):t.b+="&#"+i;n&&(t.b+=String.fromCharCode(n)+(";"==i?"":i)),t.state=e,t.i="",t.aa=!0},Lh=function(t){var e=vh.Id();e.D=[],e.P=[],e.tagName="",e.K="",e.f="",e.ba="'",e.o="",e.G="",e.b="",e.style=null,e.xb=null,e.state=1,e.ea=!1,e.i="",e.aa=!0,e.na=!1,e.xb=t;for(var i,n,s,a=(t=t.text()).length,o=-1,r=!1;++o<a;)switch(i=t.charAt(o),n=/\xa0|\s/.test(i),s=/[^a-zA-Z]/.test(i),e.state){case 1:if("<"==i){e.state=2;break}if(e.ea&&n)break;if("&"==i){e.state=14;break}if(e.na&&(e.na=!1,";"==i))break;e.b+=i,e.ea=n;break;case 14:if(e.aa&&!e.i&&"#"==i){e.aa=!1;break}if("&"==i){Kh(e,14,"");break}if(/(_|\W)/.test(i)){Kh(e,(n="<"==i)?2:1,n?"":i);break}if(n=/\d/.test(i),!e.aa&&!n){Kh(e,1,i);break}e.i+=i,Jh[e.i]&&(e.na=!0,Kh(e,1,""));break;case 2:if(r){if(">"!=i)break;"br"==e.tagName&&e.xb.mK(),e.tagName="",r=!1,e.state=1;break}if(!e.tagName&&"<"==i){e.b+="<";break}if(!e.tagName&&s&&"/"!=i){e.b+="<"+i,e.state=1;break}if(!e.tagName&&"/"==i){e.state=3;break}if("br"==e.tagName&&">"==i){e.xb.mK(),e.tagName="",e.state=1;break}if("br"==e.tagName&&("/"==i||n)){r=!0;break}if(e.tagName&&Eh(e),e.tagName&&n){e.state=4;break}if(">"==i){Gh(e);break}e.tagName+=i.toLowerCase();break;case 3:if(r){if(">"!=i)break;Fh(e),r=!1;break}if(!e.K&&s){e.b+="</"+i,e.state=1;break}if(e.K&&n){r=!0;break}if(">"==i){Fh(e),r=!1;break}e.K+=i.toLowerCase();break;case 4:if(r){if(">"!=i)break;Gh(e,!0),r=!1;break}if(">"==i){Gh(e,!0);break}if(n){e.state=5;break}if("="==i){e.f&&(e.state="style"==e.f?6:8);break}e.f+=i.toLowerCase();break;case 5:if(">"==i){Gh(e,!0);break}if(n)break;if(e.f&&!s){e.f=i,e.state=4;break}if("="==i){e.f&&(e.state="style"==e.f?6:8);break}e.f+=i,e.state=4;break;case 6:if(n)break;if(">"==i){Gh(e,!0);break}if("'"==i||'"'==i){e.ba=i,e.state=9;break}e.o=i,e.state=10;break;case 8:if(n)break;if(">"==i){e.f="",e.tagName="",e.state=1;break}if("'"==i||'"'==i){e.ba=i,e.state=7;break}e.state=11;break;case 9:if(n)break;if(i==e.ba){r=!0,Hh(e,4,!0);break}if(":"==i){e.state=12;break}e.o+=i.toLowerCase();break;case 12:if(n)break;if(i==e.ba){r=!0,Hh(e,4,!0);break}if(";"==i){Hh(e,9);break}e.G+=i.toLowerCase();break;case 7:i==e.ba&&(e.f="",e.state=4);break;case 10:if(n){r=!0,Hh(e,4,!0);break}if(">"==i){Ih(e);break}if(":"==i){e.state=13;break}e.o+=i;break;case 11:if(n){Hh(e,4,!0);break}">"==i&&Gh(e);break;case 13:if(n){r=!0,Hh(e,4,!0);break}if(">"==i){Ih(e);break}if(";"==i){Hh(e,10);break}e.G+=i.toLowerCase();break;default:throw"Error while parsing HTML: Symbol '"+i+"', position: "+(o-1)}Eh(e),e.xb.pM()},Mh=function(t,e){$.od.call(this),this.b=e||{},this.text=t,this.i=!1,this.y=this.x=this.um=this.mo=this.height=this.width=this.f=0},$.Qh=function(t,e){this.ba=!1,this.No=t||0,this.Oo=e||0,this.Ta=new $.I(this.No,this.Oo,0,0),this.$a=this.aa=this.Od=this.D=0,this.Hd=!1,this.b=[],this.f=[],this.Ba=this.bg=this.P=0,this.ud=!0,this.fh=this.na=this.Sb=this.me=0,this.ea=[],this.sb=1,this.fb=Nh,this.o=0,this.qc=this.K=!1,this.yc=this.Dk={fontSize:$.Ch.fontSize,color:$.Ch.fontColor,fontFamily:$.Ch.fontFamily,direction:$.Ch.textDirection,textOverflow:Nh,wordBreak:Jaa,wordWrap:Oh,selectable:!0,hAlign:$.Ph},this.Ka=null,$.pg.call(this),this.i=this.G=null},Rh=function(t,e,i){if($.p(i)){if(i!==t.yc[e]){var n=!t.Ja()||t.Ja().yf();n||t.Ja().suspend(),t.yc[e]=i,t.ba=!1,t.Pb(1024),t.Pb(32),t.Pb(16384),t.sx(),n||t.Ja().resume()}return t}return t.yc[e]},Sh=function(t){var e=(0,window.parseFloat)(t);return(0,window.isNaN)(e)||0>e?1:$.z(t)&&$.fc(t,"%")?1+(0,window.parseFloat)(t)/100:t},Th=function(t,e,i,n,s,a,o){var r,l=Math.floor((s-n)/(a.width/e.length)),h=e.substring(0,l);for(r=t.Vm(h,i);n+r.width<s&&1<l;)l++,h=e.substring(0,l),r=t.Vm(h,i);for(;n+r.width>s&&1<l;)l--,h=e.substring(0,l),r=t.Vm(h,i);return n=t.X3(t.yc,i),i=e.substring(l,e.length),r=a.width-r.width,(a=a.clone()).width=r,ih($.mg(),i,n,a),a=t.yc.wordWrap!=Oh,r="keep-all"==t.yc.wordBreak,"break-all"==t.yc.wordBreak||o||(t=/\s+/g,o=/\S+/g,s=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uffef\u4e00-\u9faf\uAC00-\uD7A3\u1100–\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]+/g,n=h[h.length-1],i=i[0],r=!r&&(s.test(n)||s.test(i)),t.test(n)||t.test(i)||r||(t.test(h)?(l=h.match(o),l=h.lastIndexOf(l[l.length-1])):(h=o.exec(e)[0],a||(l=h.length)))),l},Uh=function(t,e,i,n,s){return(i=new Mh(e,i)).f=-n.top,i.height=n.height,i.width=n.width,t.o&&0==t.b.length&&(s=s||0,t.o=t.Yf&&t.o+n.width+s>t.Yf?t.Yf-n.width-s:t.o,0>t.o&&(t.o=0)),t.Ba=Math.max(t.Ba,n.height),t.P+=n.width,0==t.b.length&&(t.P+=t.o),t.na=Math.max(t.na,i.f),t.ud=t.f.length?t.ud&&0==e.length:0==e.length,t.f.push(i),t.b.push(i),i.parent(t),i},Vh=function(t,e){var i,n=e||$.ua(t.ea),s=$.ua(n),a=t.Vm(t.fb,s.b),o=t.fb,r=1<n.length&&n[n.length-2];if(r&&r.Vea){var l=(0,$.za)(t.b,s)+1;$.Ca(t.b,l,t.b.length-l)}else{if(a.width>t.Za){var h=Th(t,t.fb,s.b,0,t.Za,a,!0);o=t.fb.substring(0,h)}h=t.bg;var c=t.Za;if(""==o)l=(0,$.za)(t.b,s)+1,$.Ca(t.b,l,t.b.length-l);else if(c-h>=a.width){t.f=n,l=(0,$.za)(t.b,s)+1,$.Ca(t.b,l,t.b.length-l);var u=Uh(t,o,s.b,a);2==t.f.length&&""==t.f[0].text&&(u.um=t.Sb-t.f[0].height,u.i=!0)}else{for(r=n.length-1;!i&&0<=r;)s=n[r],a=t.Vm(o,s.b),h-(l=t.Vm(s.text,s.b)).width+a.width<=t.Za&&(i=s),h-=l.width,r--;i||1!=t.ea.length||(i=n[0],h-=l.width),i&&(t.f=n,r=t.f[0].um,c-=a.width,l=(0,$.za)(n,i),$.Ca(n,l,n.length-l),l=(0,$.za)(t.b,i),$.Ca(t.b,l,t.b.length-l),t.Ba=0,t.P=0,t.na=0,l=t.Vm(i.text,i.b),1>(h=Th(t,i.text,i.b,h,c,l,!0))&&(h=1),l=i.text.substring(0,h),n=t.Vm(l,i.b),(l=Uh(t,l,i.b,n,a.width)).x=i.x,l.y=i.y,l.Vea=!0,n.width+a.width>t.Za&&(h=Th(t,t.fb,s.b,n.width,t.Za,a,!0),o=t.fb.substring(0,h)),0<h&&((u=Uh(t,o,i.b,a)).x=l.x+n.width,u.y=l.y),t.f[0].i=!0,t.f[0].um=r)}t.K&&u&&(i=t.f[0],u.i=i.i,u.x=i.x,u.um=i.um,i.um=0,i.x=0,i.i=!1,$.Fa(t.b,u),l=(0,$.za)(t.b,i),$.Da(t.b,u,l))}},Wh=function(t){t.aa=t.No,t.yc.hAlign==$.Ph?t.aa+=t.K?t.Yf:0:"center"==t.yc.hAlign?t.aa+=t.Yf/2:"end"==t.yc.hAlign?t.aa+=t.K?0:t.Yf:"right"==t.yc.hAlign&&(t.aa+=t.Yf)},Xh=function(t){if(t.path()){if(t.yc.vAlign){var e=t.b[0];"middle"==t.yc.vAlign?e.um+=e.f-t.D/2:"bottom"==t.yc.vAlign?e.um+=e.f-t.D:"top"==t.yc.vAlign&&(e.um+=e.f)}}else t.$a=t.Oo+(0==t.b.length?0:t.b[0].f),t.yc.vAlign&&t.D<t.yc.height&&("middle"==t.yc.vAlign?t.$a+=t.Jf/2-t.D/2:"bottom"==t.yc.vAlign&&(t.$a+=t.Jf-t.D))},$.Yh=function(t){$.ig.call(this),this.Qd=$.p(t)?t:""},gi=function(t,e,i,n,s,a,o,r){if(t=t.path?t.path():t,2>a)return t;o=o||0;var l,h=$.db(o,n),c=$.eb(o,n),u=360/(2*a);if(t.moveTo(h+e,c+i),r)for(l=0;l<a;l++){var d=o;o+=u;var p=h,g=c,f=$.db(d,s),b=$.eb(d,s),v=$.db(o,n),m=$.eb(o,n);h=$.db(o,s),c=$.eb(o,s);var y=(v-f)*(g-b)-(m-b)*(p-f);p=Zh(s,n,d,o,r,1-(y/=(m-b)*(h-p)-(v-f)*(c-g))),d=ai(s,n,d,o,r,1-y),t.lK(e+p,i+d,e+h,i+c),d=o,o+=u,p=h,g=c,f=$.db(o,s),b=$.eb(o,s),v=$.db(d,n),m=$.eb(d,n),h=$.db(o,n),c=$.eb(o,n),y=(v-f)*(g-b)-(m-b)*(p-f),p=Zh(s,n,o,d,r,y/=(m-b)*(h-p)-(v-f)*(c-g)),d=ai(s,n,o,d,r,y),t.lK(e+p,i+d,e+h,i+c)}else for(l=0;l<a;l++)o+=u,h=$.db(o,s),c=$.eb(o,s),t.lineTo(e+h,i+c),o+=u,h=$.db(o,n),c=$.eb(o,n),t.lineTo(e+h,i+c);return t.close(),t},hi=function(t,e,i,n){return gi(t,e,i,n,n/2,4)},ii=function(t,e,i,n){return gi(t,e,i,n,n/2,5,-90)},ji=function(t,e,i,n){return gi(t,e,i,n,.5773502691896258*n,6,-90)},ki=function(t,e,i,n){return gi(t,e,i,n,n/2,7,-90)},li=function(t,e,i,n){return gi(t,e,i,n,.8506508083520399*n,10)},mi=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,-90)},ni=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,90)},oi=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,0)},pi=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,180)},qi=function(t,e,i,n){return gi(t,e,i,n,n*Math.SQRT1_2,4)},ri=function(t,e,i,n){var s=n/4,a=e-n,o=e+n,r=i-n;return n=i+n,(t=t.path?t.path():t).moveTo(e-s,r).lineTo(e-s,i-s).lineTo(a,i-s).lineTo(a,i+s).lineTo(e-s,i+s).lineTo(e-s,n).lineTo(e+s,n).lineTo(e+s,i+s).lineTo(o,i+s).lineTo(o,i-s).lineTo(e+s,i-s).lineTo(e+s,r).close(),t},si=function(t,e,i,n){t=t.path?t.path():t;var s=n*Math.SQRT1_2/2,a=e-n,o=e+n,r=i-n;return n=i+n,t.moveTo(a+s,r).lineTo(e,i-s).lineTo(o-s,r).lineTo(o,r+s).lineTo(e+s,i).lineTo(o,n-s).lineTo(o-s,n).lineTo(e,i+s).lineTo(a+s,n).lineTo(a,n-s).lineTo(e-s,i).lineTo(a,r+s).close(),t},ti=function(t,e,i,n){var s=n/4,a=e-n;return e+=n,(t=t.path?t.path():t).moveTo(e,i-s).lineTo(e,i+s).lineTo(a,i+s).lineTo(a,i-s).close(),t},ui=function(t,e,i,n){var s=n/4,a=i-n;return i+=n,(t=t.path?t.path():t).moveTo(e-s,a).lineTo(e+s,a).lineTo(e+s,i).lineTo(e-s,i).close(),t},vi=function(t,e,i,n,s,a){return t=t.path?t.path():t,a=$.Za(a,-360,360),360==Math.abs(a)?t.Fe(e,i,n,n,s,a,!1):t.moveTo(e,i).Fe(e,i,n,n,s,a,!0).close(),t},$.wi=function(t,e,i,n,s,a,o){if(0>n&&(n=0),0>s&&(s=0),n<s){var r=n;n=s,s=r}return 0>=s?vi(t,e,i,n,a,o):(t=t.path?t.path():t,o=$.Za(o,-360,360),r=360>Math.abs(o),t.Fe(e,i,n,n,a,o).Fe(e,i,s,s,a+o,-o,r),r&&t.close(),t)},Zh=function(t,e,i,n,s,a){return t=$.db(i,t),e=$.db(n,e)-t,0<=s?t+e*(a+s-a*s):t+e*a*(s+1)},ai=function(t,e,i,n,s,a){return t=$.eb(i,t),e=$.eb(n,e)-t,0<=s?t+e*(a+s-a*s):t+e*a*(s+1)},xi=function(t){var e,i;switch(t.length){case 1:var n=e=i=t[0];t.push(n,e,i);break;case 2:e=t[0],i=t[1],t.push(e,i);break;case 3:i=t[1],t.push(i);break;case 4:break;default:t.push(5,5,5,5)}},yi=function(t,e,i){var n=t.path?t.path():t;if(6==arguments.length){var s=arguments[2],a=arguments[3],o=arguments[4],r=arguments[5];n.moveTo(e.left+s,e.top).lineTo(e.left+e.width-a,e.top).lineTo(e.left+e.width,e.top+a).lineTo(e.left+e.width,e.top+e.height-o).lineTo(e.left+e.width-o,e.top+e.height).lineTo(e.left+r,e.top+e.height).lineTo(e.left,e.top+e.height-r).lineTo(e.left,e.top+s).close()}else r=$.Ja(arguments,2,6),xi(r),s=r[0],a=r[1],o=r[2],r=r[3],yi(n,e,s,a,o,r);return n},zi=function(t,e,i){var n=t.path?t.path():t;if(6==arguments.length){var s=arguments[2],a=arguments[3],o=arguments[4],r=arguments[5];n.moveTo(e.left+s,e.top).lineTo(e.left+e.width-a,e.top).Ff(e.left+e.width,e.top+a,a,a,!1,!0).lineTo(e.left+e.width,e.top+e.height-o).Ff(e.left+e.width-o,e.top+e.height,o,o,!1,!0).lineTo(e.left+r,e.top+e.height).Ff(e.left,e.top+e.height-r,r,r,!1,!0),0!=s&&(n.lineTo(e.left,e.top+s),n.Ff(e.left+s,e.top,s,s,!1,!0)),n.close()}else r=$.Ja(arguments,2,6),xi(r),s=r[0],a=r[1],o=r[2],r=r[3],zi(n,e,s,a,o,r);return n},Ai=function(t,e,i){var n=t.path?t.path():t;if(6==arguments.length){var s=arguments[2],a=arguments[3],o=arguments[4],r=arguments[5];n.moveTo(e.left+s,e.top).lineTo(e.left+e.width-a,e.top).Ff(e.left+e.width,e.top+a,a,a,!1,!1).lineTo(e.left+e.width,e.top+e.height-o).Ff(e.left+e.width-o,e.top+e.height,o,o,!1,!1).lineTo(e.left+r,e.top+e.height).Ff(e.left,e.top+e.height-r,r,r,!1,!1),0!=s&&n.lineTo(e.left,e.top+s).Ff(e.left+s,e.top,s,s,!1,!1),n.close()}else r=$.Ja(arguments,2,6),xi(r),s=r[0],a=r[1],o=r[2],r=r[3],Ai(n,e,s,a,o,r);return n},$.Fi=function(t,e,i,n){this.Hj=t,this.ze=e,this.mi=i,this.Pe=n},Gi=function(){$.gh.call(this)},Hi=function(t){return $.sh.document.createElementNS("http://www.w3.org/2000/svg",t)},Kaa=function(){var t=$.mg();$.Xe(t.Mk),$.Xe(t.$D),$.Xe(t.f),$.Xe(t.i),$.Xe(t.yp),$.Xe(t.Op),t.Mk=null,t.$D=null,t.f=null,t.i=null,t.yp=null,t.Op=null},Laa=function(t){var e=$.bb(t),i=Math.tan(e);return t=1/(2*i),i/=2,.5>=Math.abs(i)?(t=-.5,e=0>Math.cos(e)):(i=-.5,e=0<Math.sin(e)),e&&(t=-t,i=-i),new $.Fi(.5+t,.5+i,.5-t,.5-i)},Maa=function(t,e){var i=t%90,n=$.bb(t),s=1,a=e.left+e.width/2,o=e.top+e.height/2,r=0>Math.sin(n)||180==t||360==t;return 90!=t&&270!=t||(i+=1e-6),180!=t&&(0>Math.tan(n)||90==t||270==t)&&(s=-1,i=90-i),i=$.bb(i),n=Math.sin(i)*(e.height/2-Math.tan(i)*e.width/2)+e.width/2/Math.cos(i),s*=Math.cos(i)*n,i=Math.sin(i)*n,r&&(s=-s,i=-i),new $.Fi(Math.round(a-s),Math.round(o+i),Math.round(a+s),Math.round(o-i))},Ii=function(t,e,i){var n=Naa(i,e.keys,e.cx,e.cy,e.fx,e.fy,e.opacity,e.mode,e.transform);if(!n.Bo){var s=Hi("radialGradient");$.qh(t,s,n.id()),$.Se(i.ia(),s),n.vF=i,n.Bo=!0,(0,$.Pe)(n.keys,(function(t){var e=Hi("stop");$.ph(this,e,{offset:t.offset,style:"stop-color:"+t.color+";stop-opacity:"+((0,window.isNaN)(t.opacity)?n.opacity:t.opacity)}),s.appendChild(e)}),t),n.Ta?$.ph(t,s,{cx:n.Dc*n.Ta.width+n.Ta.left,cy:n.uc*n.Ta.height+n.Ta.top,fx:n.Se*n.Ta.width+n.Ta.left,fy:n.i*n.Ta.height+n.Ta.top,r:Math.min(n.Ta.width,n.Ta.height)/2,spreadMethod:"pad",gradientUnits:"userSpaceOnUse"}):$.ph(t,s,{cx:n.Dc,cy:n.uc,fx:n.Se,fy:n.i,gradientUnits:"objectBoundingBox"}),n.transform&&t.lc(s,"gradientTransform",n.transform.toString())}return n.id()},Ki=function(t,e,i,n){var s=$.Ji(i,e.keys,e.opacity,!0===e.mode?$.oh(e.angle,n):e.angle,e.mode,e.transform);if(!s.Bo){var a=t.K0();$.qh(t,a,s.id()),$.Se(i.ia(),a),s.uF=i,s.Bo=!0,(0,$.Pe)(s.keys,(function(t){var e=Hi("stop");$.ph(this,e,{offset:t.offset,style:"stop-color:"+t.color+";stop-opacity:"+((0,window.isNaN)(t.opacity)?s.opacity:t.opacity)}),a.appendChild(e)}),t),s.Ta?(e=Maa(s.angle,s.Ta),$.ph(t,a,{x1:e.Hj,y1:e.ze,x2:e.mi,y2:e.Pe,spreadMethod:"pad",gradientUnits:"userSpaceOnUse"})):(e=Laa(s.angle),$.ph(t,a,{x1:e.Hj,y1:e.ze,x2:e.mi,y2:e.Pe,gradientUnits:"objectBoundingBox"})),s.transform&&t.lc(a,"gradientTransform",s.transform.toString())}return s.id()},Ni=function(t,e){var i=e.fill();if(i){var n=e.Ja().vn,s='url("'+Li()+"#";if(i&&i.opacity&&1e-4>=i.opacity&&$.hd&&$.bd("9")&&(i.opacity=1e-4),$.z(i))t.lc(e.ia(),"fill",i),e.ia().removeAttribute("fill-opacity");else if($.A(i.keys)&&i.cx&&i.cy)t.lc(e.ia(),"fill",s+Ii(t,i,n)+'")'),t.lc(e.ia(),"fill-opacity",$.p(i.opacity)?i.opacity:1);else if($.A(i.keys))e.rb()&&(t.lc(e.ia(),"fill",s+Ki(t,i,n,e.rb())+'")'),t.lc(e.ia(),"fill-opacity",$.p(i.opacity)?i.opacity:1));else if(i.src){var a=e.ck();a?(a.width=a.width||0,a.height=a.height||0,a.left=a.left||0,a.top=a.top||0):a=new $.I(0,0,0,0),"tile"==i.mode?Mi(n,i.src,a,i.mode,i.opacity,(function(t){t.id(),t.parent(e.Ja()).Sd(),$.mg().lc(e.ia(),"fill",s+t.id()+'")')})):((n=Mi(n,i.src,a,i.mode,i.opacity)).id(),n.parent(e.Ja()).Sd(),t.lc(e.ia(),"fill",s+n.id()+'")'),t.lc(e.ia(),"fill-opacity",$.p(i.opacity)?i.opacity:1))}else $.J(i,Mg)?((i=Oaa(n,i.type,i.color,i.Ef,i.size)).id(),i.parent(e.Ja()).Sd(),t.lc(e.ia(),"fill",s+i.id()+'")')):$.J(i,$.Qb)?(i.id(),i.parent(e.Ja()).Sd(),t.lc(e.ia(),"fill",s+i.id()+'")')):$.ph(t,e.ia(),{fill:i.color,"fill-opacity":i.opacity})}},Oi=function(t,e){var i=e.stroke();if(i){var n=e.Ja().vn,s=e.ia(),a='url("'+Li()+"#";if($.z(i))t.lc(s,"stroke",i);else if($.A(i.keys)&&i.cx&&i.cy)t.lc(s,"stroke",a+Ii(t,i,n)+'")');else if($.A(i.keys)){if(!e.rb())return;t.lc(s,"stroke",a+Ki(t,i,n,e.rb())+'")')}else t.lc(s,"stroke",i.color);i.lineJoin?t.lc(s,"stroke-linejoin",i.lineJoin):s.removeAttribute("stroke-linejoin"),i.lineCap?t.lc(s,"stroke-linecap",i.lineCap):s.removeAttribute("stroke-linecap"),i.opacity?t.lc(s,"stroke-opacity",i.opacity):s.removeAttribute("stroke-opacity"),i.thickness?t.lc(s,"stroke-width",i.thickness):s.removeAttribute("stroke-width"),i.dash?t.lc(s,"stroke-dasharray",i.dash):s.removeAttribute("stroke-dasharray")}},Pi=function(t){t.ia().removeAttribute("clip-path"),t.ia().removeAttribute("clipPathUnits")},$.Si=function(t,e){wd.call(this,t.type),this.target=$.Qi(t.target,e)||t.target,this.relatedTarget=$.Qi(t.relatedTarget||null,e)||t.relatedTarget,this.offsetX=t.offsetX,this.offsetY=t.offsetY,this.clientX=t.clientX,this.clientY=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,this.button=Cd(t,0)?$.Ri:Cd(t,1)?Paa:Cd(t,2)?Qaa:Raa,this.actionButton=t.OA(),this.keyCode=t.keyCode,this.charCode=t.f,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.platformModifierKey=t.i,this.kf=t},Ti=function(t,e){this.i=t,this.o=e,this.f=0,this.b=null},Ui=function(t,e){t.o(e),100>t.f&&(t.f++,e.next=t.b,t.b=e)},Vi=function(){this.f=this.b=null},Wi=function(){this.next=this.f=this.b=null},Xi=function(t){$.fa.setTimeout((function(){throw t}),0)},Saa=function(){var t=$.fa.MessageChannel;if(void 0===t&&void 0!==window&&window.postMessage&&window.addEventListener&&!$.Cc("Presto")&&(t=function(){var t=window.document.createElement("IFRAME");t.style.display="none",t.src="",window.document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var i="callImmediate"+Math.random(),n="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=(0,$.pa)((function(t){"*"!=n&&t.origin!=n||t.data!=i||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(i,n)}}}),void 0!==t&&!$.Uc()){var e=new t,i={},n=i;return e.port1.onmessage=function(){if($.p(i.next)){var t=(i=i.next).r0;i.r0=null,t()}},function(t){n.next={r0:t},n=n.next,e.port2.postMessage(0)}}return void 0!==window.document&&"onreadystatechange"in window.document.createElement("SCRIPT")?function(t){var e=window.document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},window.document.documentElement.appendChild(e)}:function(t){$.fa.setTimeout(t,0)}},$.aj=function(t,e){Yi||Taa(),Zi||(Yi(),Zi=!0),$i.add(t,e)},Taa=function(){if($.fa.Promise&&$.fa.Promise.resolve){var t=$.fa.Promise.resolve(void 0);Yi=function(){t.then(bj)}}else Yi=function(){var t=bj;!$.D($.fa.setImmediate)||$.fa.Window&&$.fa.Window.prototype&&!$.Cc("Edge")&&$.fa.Window.prototype.setImmediate==$.fa.setImmediate?(ij||(ij=Saa()),ij(t)):$.fa.setImmediate(t)}},bj=function(){for(var t;t=$i.remove();){try{t.b.call(t.f)}catch(e){Xi(e)}Ui(jj,t)}Zi=!1},$.oj=function(t){if(this.dc=kj,this.D=void 0,this.f=this.b=this.Y=null,this.i=this.o=!1,t!=$.ia)try{var e=this;t.call(void 0,(function(t){$.lj(e,$.mj,t)}),(function(t){$.lj(e,nj,t)}))}catch(i){$.lj(this,nj,i)}},pj=function(){this.next=this.context=this.f=this.i=this.b=null,this.o=!1},rj=function(t,e,i){var n=qj.get();return n.i=t,n.f=e,n.context=i,n},sj=function(t,e){if(t.dc==kj)if(t.Y){var i=t.Y;if(i.b){for(var n=0,s=null,a=null,o=i.b;o&&(o.o||(n++,o.b==t&&(s=o),!(s&&1<n)));o=o.next)s||(a=o);s&&(i.dc==kj&&1==n?sj(i,e):(a?((n=a).next==i.f&&(i.f=n),n.next=n.next.next):tj(i),uj(i,s,nj,e)))}t.Y=null}else $.lj(t,nj,e)},wj=function(t,e){t.b||t.dc!=$.mj&&t.dc!=nj||vj(t),t.f?t.f.next=e:t.b=e,t.f=e},$.yj=function(t,e,i,n){var s=rj(null,null,null);return s.b=new $.oj((function(t,a){s.i=e?function(i){try{var s=e.call(n,i);t(s)}catch(o){a(o)}}:t,s.f=i?function(e){try{var s=i.call(n,e);!$.p(s)&&e instanceof xj?a(e):t(s)}catch(o){a(o)}}:a})),s.b.Y=t,wj(t,s),s.b},$.lj=function(t,e,i){t.dc==kj&&(t===i&&(e=nj,i=new TypeError("Promise cannot resolve to itself")),t.dc=1,$.zj(i,t.K,t.P,t)||(t.D=i,t.dc=e,t.Y=null,vj(t),e!=nj||i instanceof xj||Uaa(t,i)))},$.zj=function(t,e,i,n){if(t instanceof $.oj)return wj(t,rj(e||$.ia,i||null,n)),!0;if(t)try{var s=!!t.$goog_Thenable}catch(o){s=!1}else s=!1;if(s)return t.then(e,i,n),!0;if($.C(t))try{var a=t.then;if($.D(a))return Vaa(t,a,e,i,n),!0}catch(o){return i.call(n,o),!0}return!1},Vaa=function(t,e,i,n,s){function a(t){o||(o=!0,n.call(s,t))}var o=!1;try{e.call(t,(function(t){o||(o=!0,i.call(s,t))}),a)}catch(r){a(r)}},vj=function(t){t.o||(t.o=!0,$.aj(t.G,t))},tj=function(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e},uj=function(t,e,i,n){if(i==nj&&e.f&&!e.o)for(;t&&t.i;t=t.Y)t.i=!1;if(e.b)e.b.Y=null,Aj(e,i,n);else try{e.o?e.i.call(e.context):Aj(e,i,n)}catch(s){Bj.call(null,s)}Ui(qj,e)},Aj=function(t,e,i){e==$.mj?t.i.call(t.context,i):t.f&&t.f.call(t.context,i)},Uaa=function(t,e){t.i=!0,$.aj((function(){t.i&&Bj.call(null,e)}))},xj=function(t){ta.call(this,t)},$.Dj=function(t,e,i){if($.D(t))i&&(t=(0,$.pa)(t,i));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=(0,$.pa)(t.handleEvent,t)}return 2147483647<Number(e)?-1:$.Cj.setTimeout(t,e||0)},$.Ej=function(t){$.Cj.clearTimeout(t)},$.Fj=function(t,e,i,n,s){$.od.call(this),this.keys=t,this.opacity=null!=e?$.Za(e,0,1):1,this.angle=null!=i?$.ab(i):0,this.mode=null!=n&&n,this.Ta=n&&$.J(n,$.I)?n:null,this.transform=null!=s?s:null},$.Gj=function(t,e,i,n,s){i=null!=i?$.ab(i):0,e=null!=e?$.Za(e,0,1):1;var a=!!n;n=null!=n&&$.J(n,$.I)?n:null;var o=[];return(0,$.Pe)(t,(function(t){o.push(String(t.offset)+t.color+(t.opacity?t.opacity:null))})),o.join("")+e+i+a+(n?String(n.left)+n.top+n.width+n.height:"")+(s?s.toString():"")},$.Hj=function(t,e,i,n,s,a,o,r){$.od.call(this),this.Dc=e,this.uc=i,this.Se=n,this.i=s,this.keys=t,this.opacity=null!=a?$.Za(a,0,1):1,this.Ta=null!=o?o:null,this.transform=null!=r?r:null},$.Ij=function(t,e,i,n,s,a,o,r){a=null!=a?$.Za(a,0,1):1;var l=[];return(0,$.Pe)(t,(function(t){l.push(String(t.offset)+t.color+(t.opacity?t.opacity:1))})),l.join("")+a+e+i+n+s+(o?String(o.left)+o.top+o.width+o.height:"")+(r?r.toString():"")},$.Jj=function(t){$.od.call(this),this.ru={},this.D={},this.i={},this.b={},this.o=t},Mi=function(t,e,i,n,s,a){s=$.p(s)?s:1,n=null!=n?n:"stretch";var o=[e,i.left,i.top,i.width,i.height,n,s].join(),r=null,l=$.ia;if("tile"==n)l=function(n,r){if($.Gc(t.b,o))var l=t.b[o];else(l=new $.Qb(new $.I(i.left,i.top,n,r))).wk().src(e).opacity(s).width(n).height(r),t.b[o]=l;a&&a.call(this,l)};else{if($.Gc(t.b,o))return t.b[o];switch(r=new $.Qb(i),n){case"stretch":r.wk().src(e).opacity(s).width(i.width).height(i.height);break;case"fit-max":r.wk().src(e).opacity(s).width(i.width).height(i.height).align("x-mid-y-mid").jD("slice");break;case"fit":r.wk().src(e).opacity(s).width(i.width).height(i.height).align("x-mid-y-mid")}t.b[o]=r}return $.mg().TN(e,l),l=null,t.b[o]},Oaa=function(t,e,i,n,s){var a=[e=null!=e?e:"backward-diagonal",i=null!=i?i:"black",n=null!=n?n:1,s=null!=s?s:10].join();return $.Gc(t.i,a)?t.i[a]:t.i[a]=new Mg(e,i,n,s)},$.Ji=function(t,e,i,n,s,a){var o=$.Gj(e,i,n,s,a);return $.Gc(t.ru,o)?t.ru[o]:t.ru[o]=new $.Fj(e,i,n,s,a)},Naa=function(t,e,i,n,s,a,o,r,l){var h=$.Ij(e,i,n,s,a,o,r,l);return $.Gc(t.D,h)?t.D[h]:t.D[h]=new $.Hj(e,i,n,s,a,o,r,l)},$.Kj=function(t){return t.classList?t.classList:(t=t.className,$.z(t)&&t.match(/\S+/g)||[])},$.Lj=function(t,e){return t.classList?t.classList.contains(e):$.Aa($.Kj(t),e)},$.Qj=function(t,e){t.classList?t.classList.add(e):$.Lj(t,e)||(t.className+=0<t.className.length?" "+e:e)},$.Rj=function(t,e){if(t.classList)(0,$.Pe)(e,(function(e){$.Qj(t,e)}));else{var i={};for(var n in(0,$.Pe)($.Kj(t),(function(t){i[t]=!0})),(0,$.Pe)(e,(function(t){i[t]=!0})),t.className="",i)t.className+=0<t.className.length?" "+n:n}},$.Sj=function(t,e){t.classList?t.classList.remove(e):$.Lj(t,e)&&(t.className=(0,$.Ye)($.Kj(t),(function(t){return t!=e})).join(" "))},Waa=function(t,e){t.classList?(0,$.Pe)(e,(function(e){$.Sj(t,e)})):t.className=(0,$.Ye)($.Kj(t),(function(t){return!$.Aa(e,t)})).join(" ")},$.Tj=function(){var t=$.ye().b,e=t.body;return!!(e.webkitRequestFullscreen||e.mozRequestFullScreen&&t.mozFullScreenEnabled||e.msRequestFullscreen&&t.msFullscreenEnabled||e.requestFullscreen&&t.fullscreenEnabled)},$.Yj=function(t,e,i){$.qf.call(this),this.NO=(0,$.pa)(this.NO,this),this.Dt=(0,$.pa)(this.Dt,this);var n=$.sh.document;$.Ch.sP||($.Ch.sP={});var s=$.cc($.ac.Id(),this,"stage");$.Ch.sP[s]=this,this.s0={},this.Qg=new nf(this),this.qp=n.createElement("DIV"),$.uf(this.qp,{position:"relative",left:0,top:0,overflow:"hidden"}),this.Ud=$.mg().P0(),Uj(this),$.mg().hP(this.Ud,"100%","100%"),$.uf(this.Ud,"display","block"),$.Qj(this.Ud,"anychart-ui-support"),this.qp.appendChild(this.Ud),this.Ud.setAttribute("ac-id",s),this.Qx=[],this.vn=this.F0(),this.vn.Sd(),this.Oa=new $.Fg,this.Oa.fl(this).Sd(),s=this.Oa.ia(),this.Ud.appendChild(s),$.mg().Xp(),this.Qg.wa(this.ia(),"mousedown mouseover mouseout click dblclick touchstart touchend touchcancel MSPointerDown MSPointerUp pointerdown pointerup contextmenu".split(" "),this.sq,!1),Vj(this,e||"100%"),Wj(this,i||"100%"),(this.Jc=$.z(t)?n.getElementById(t):t)&&Xj(this),this.Dt(!0,!0),this.resume()},Vj=function(t,e){if(t.BL!=e){var i=(0,window.parseFloat)(e);if(!(0,window.isNaN)(i))return t.BL=$.ea(e)?e:String(e),t.uM=$.z(e)&&$.fc(e,"%")?window.NaN:i,t.qp.style.width=Bf(t.BL,!0),!0}return!1},Wj=function(t,e){if(t.AL!=e){var i=(0,window.parseFloat)(e);if(!(0,window.isNaN)(i))return t.AL=$.ea(e)?e:String(e),t.tM=$.z(e)&&$.fc(e,"%")?window.NaN:i,t.qp.style.height=Bf(t.AL,!0),!0}return!1},$.Zj=function(t){return t.qp?$.Hf(t.qp):new $.gb(0,0)},Xj=function(t){t.Jc?t.qp.parentNode!=t.Jc&&t.Jc.appendChild(t.qp):$.Xe(t.qp)},ak=function(t){t.rw=!1,t.dispatchEvent("renderfinish");var e=th($.mg()),i=$.mg().n3();e&&i?t.X2||(t.X2=!0,Kd(e,"complete",(function(){this.X2=!1,this.rw||this.dispatchEvent("stagerendered")}),!1,t)):t.dispatchEvent("stagerendered")},bk=function(t){$.Jj.call(this,t),this.f={}},ck=function(t,e){var i=$.cc($.ac.Id(),e),n=t.f[i];if(!n){n=t.f,$.mg();var s=Hi("clipPath");n[i]=n=s}return n},dk=function(t,e,i){$.Yj.call(this,t,e,i)},$.gk=function(){for(var t=window.document.styleSheets,e=[],i=ek(t),n=0;t=i[n];n++){var s=fk(t);if(s&&s.length)for(var a,o=0,r=0,l=s.length;r<l;r++)(a=s[r]).href||(a.style&&(a.parentStyleSheet||(a.style["-closure-parent-stylesheet"]=t),a.style["-closure-rule-index"]=o),e.push(a)),o++}return e},fk=function(t){var e=null;try{e=t.cssRules||t.rules}catch(i){if(15==i.code)throw i.styleSheet=t,i}return e},ek=function(t){var e=[];t=t||window.document.styleSheets;var i=!!$.p(void 0)&&void 0;if(t.imports&&t.imports.length)for(var n=0,s=t.imports.length;n<s;n++)$.Ia(e,ek(t.imports[n]));else if(t.length)for(n=0,s=t.length;n<s;n++)$.Ia(e,ek(t[n]));else{var a=fk(t);if(a&&a.length){n=0,s=a.length;for(var o;n<s;n++)(o=a[n]).styleSheet&&$.Ia(e,ek(o.styleSheet))}}return!(t.type||t.rules||t.cssRules)||t.disabled&&!i||e.push(t),e},Uj=function(t){var e=t.ia();if(e){var i=String($.oa(t));hk[i]=t,e.setAttribute("data-ac-wrapper-id",i)}},ik=function(t){delete hk[String($.oa(t))],(t=t.ia())&&t.removeAttribute("data-ac-wrapper-id")},$.Qi=function(t,e){for(var i,n=e.ia().parentNode;t&&t!=n&&null==(i=t.getAttribute&&t.getAttribute("data-ac-wrapper-id")||null);)t=t.parentNode;return(i=hk[i||""]||null)&&i.ia()==t?i:null},$.mg=function(){if(!jk)if("vml"==$.kk){var t=$.Ch.vml;if(!t)throw Error("VML module should be included to render AnyChart in IE8-");jk=t.getRenderer()}else jk=Gi.Id();return jk},$.lk=function(t,e,i){if("vml"==$.kk){var n=$.Ch.vml;if(!n)throw Error("VML module should be included to render AnyChart in IE8-");t=new n.Stage(t,e,i)}else t=new dk(t,e,i);return t},$.mk=function(t,e,i,n){return new Cg(t,e,i,n)},$.nk=function(t,e,i){return new $.rg(t,e,i)},$.ok=function(){return new $.Fg},$.pk=function(t,e,i,n){return new qg(t,e,i,n)},$.qk=function(){return new $.Ag},rk=function(t,e,i,n,s){return new bh(t,e,i,n,s)},$.sk=function(t,e,i,n){if("vml"==$.kk){var s=$.Ch.vml;if(!s)throw Error("VML module should be included to render AnyChart in IE8-");t=new s.Text(t,e)}else t=new $.Qh(t,e);return n&&t.style(n),i&&t.text(i),t},Xb=function(t,e,i,n){return new Mg(t,e,i,n)},$.Sb=function(t){return new $.Qb(t)},$.tk=function(t,e,i,n){if("vml"==$.kk){var s=$.Ch.vml;if(s)return new s.Clip(null,t,e,i,n);throw Error("VML module should be included to render AnyChart in IE8-")}return new $.Dg(null,t,e,i,n)},$.uk=function(t){return new $.Yh(t)},Li=function(){return $.p(vk)?vk:vk=$.hd&&$.bd("9")&&!$.bd("10")?"":wk||null===wk&&$.Ae(window.document,"base",void 0,void 0).length?$.sh.location.origin+$.sh.location.pathname+$.sh.location.search:""},xk=function(){return $.Cc("iPad")||$.Cc("Android")&&!$.Cc("Mobile")||$.Cc("Silk")},$.yk=function(){return!(!xk()&&($.Cc("iPod")||$.Cc("iPhone")||$.Cc("Android")||$.Cc("IEMobile"))||xk())},$.zk=function(t,e,i){if(!t.GZ){var n,s={};for(n in t){var a=t[n],o=a.toLowerCase();s[o]=a,s[o.replace(/-/g,"")]=a}t.GZ=s}return t.GZ[String(e).toLowerCase()]||i},$.Ak=function(t,e){return $.zk(Xaa,t,e||"by-x")},$.Bk=function(t,e){return $.zk(Yaa,t,e||"none")},Ck=function(t,e){return $.zk(Zaa,t,e||"default")},$.Dk=function(t,e){return $.zk($aa,t,$.p(e)?e:"left-top")},$.Ek=function(t,e){return $.zk(aba,t,e)},Fk=function(t,e){return $.zk(bba,t,e||"center")},$.Gk=function(t,e){return $.zk(cba,t,e||"vertical")},eba=function(t,e){return $.zk(dba,t,e||"vertical")},$.Lk=function(t,e){return $.zk(fba,t,e||"top")},hba=function(t,e){return $.zk(gba,t,e||"outside")},$.Mk=function(t,e){return $.zk(iba,t,e||"none")},$.Ok=function(t,e){return $.zk(Nk,t,e||"star5")},Qk=function(t){return $.zk(Nk,t,null)||$.zk($.Pk,t,null)},$.Rk=function(t,e){return $.zk(jba,t,e||"circle")},$.Sk=function(t,e){return $.zk(kba,t,e||"auto")},$.Tk=function(t,e){return $.zk(lba,t,e||"axis")},$.Uk=function(t,e,i){return e="auto-width"!=String(t).toLowerCase()||i?e:void 0,t="auto-width"!=String(t).toLowerCase()||i?t:e,$.zk(mba,t,e||"allow-overlap")},$.Vk=function(t){return $.zk(nba,t,"square")},pba=function(t,e){return $.zk(oba,t,e||"default")},$.Wk=function(t,e){return $.zk(qba,t,e||"inside")},$.Yk=function(t){return $.zk(rba,t,null)||$.Xk(t)},$.Zk=function(t,e,i){switch(t=String(t).toLowerCase()){case"years":case"year":case"yyyy":case"yy":case"y":return"year";case"semesters":case"semester":case"sem":return"semester";case"quarters":case"quarter":case"q":return"quarter";case"months":case"month":case"mm":case"m":return"month";case"thirdofmonths":case"third-of-month":case"thirdofmonth":case"decades":case"decade":case"tom":case"dec":return"third-of-month";case"weeks":case"week":case"w":return"week";case"days":case"day":case"dd":case"d":return"day";case"hours":case"hour":case"hh":case"h":return i?"day":"hour";case"minutes":case"minute":case"min":case"n":return i?"day":"minute";case"seconds":case"second":case"secs":case"sec":case"s":return i?"day":"second";case"milliseconds":case"millisecond":case"millis":case"milli":case"ms":return i?"day":"millisecond"}return $.p(e)?e:"year"},tba=function(t){return $.C(t)&&(t=t.mode),$.zk(sba,t,"csv")},$.$k=function(t){return $.zk(uba,t,"start")},$.al=function(t){return $.zk(vba,t,"top")},$.bl=function(t){return $.zk(wba,t,"none")},$.cl=function(t){return $.zk(xba,t,"normal")},$.dl=function(t){return $.zk(yba,t,"normal")},$.el=function(t){return $.zk(zba,t,"ltr")},$.fl=function(t){return $.zk(Aba,t,$.p(void 0)?void 0:"last-date")},gl=function(t){return $.zk(Bba,t,"none")},$.il=function(t,e,i){$.hl("error","Error: "+t+"\nDescription: "+Cba(t,i),e||"")},Cba=function(t,e){switch(t){case 1:return"Container is not set or can not be properly recognized. Use container() method to set it.";case 2:return"Scale is not set. Use scale() method to set it.";case 3:return"Table.contents() accepts only an Array of Arrays as it's first argument.";case 4:return'Feature "'+e[0]+'" is not supported in this module. See modules list at https://docs.anychart.com/Quick_Start/Modules for details.';case 5:return e[0]+" should be only "+e[1]+" type"+(e[2]?" ("+e[2]+").":".");case 7:return"Empty config passed to anychart.fromJson() or anychart.fromXml() method.";case 8:return"Bullet, Sparkline, Sankey and Circular Gauge charts do not support Legend. Please use anychart.standalones.Legend component for a group of charts instead.";case 51:return"Stock chart itself doesn't support legend - stock plots do. So use stock.plot().legend() instead.";case 9:return"Bullet and Sparkline charts do not support Credits.";case 10:return"Invalid GeoJSON object:";case 100:return"Double quotes in separator are not allowed.";case 101:return"CSV parsing failed.";case 200:return"Cannot create a computer on the table with the mapping of another table.";case 201:return'Cannot create computed field "'+e[0]+'" - field name should be unique for the table';case 202:return'Cannot create output field "'+e[0]+'" on the computer - field with this name already exists';case 300:var i,n=e[2],s=[];for(i in n)s.push(i+" ("+n[i]+")");return['Series "',e[0],'" of type "',e[1],'" cannot be drawn, because it requires ',n.length," shapes with the following names: ",s.join(", ")].join("");case 400:return"Surface chart data is malformed.";default:return"Unknown error occurred. Please, contact support team at http://support.anychart.com/.\nWe will be very grateful for your report."}},$.kl=function(t,e,i,n){var s;n&&!jl[s=Dba(t,i)]&&(jl[s]=!0,$.hl("warn","Warning: "+t+"\nDescription: "+s,e||""))},Dba=function(t,e){switch(t){case 1:return"Data item with ID='"+e[0]+"' already exists in the tree and will be used as the parent for all related data items.";case 2:return"Data item with ID='"+e[0]+"' is not unique. First met object will be used.";case 3:return"One of the data items was looking for the parent with ID='"+e[0]+"', but did not find it. Please check the data.\nPLEASE NOTE: this data item will be added as the root to avoid loss of information.";case 4:return"Data item {ID='"+e[0]+"', PARENT='"+e[1]+"'} belongs to a cycle and will not be added to the tree.";case 5:return"Can not set value for the '"+e[0]+"' field to an array row if it is not mapped.";case 6:return"Setting complex value to the default '"+e[0]+"' field changes row behaviour.";case 7:return"Can not set value for the '"+e[0]+"' field to a row that is not an object or an array.";case 8:return"We can not serialize '"+e[0]+"' function, please reset it manually.";case 9:return"Data grid incorrect method '"+e[0]+"()' usage: You use not standalone data grid. Perform all operations on data grid using the controller, but not directly. In current case, use '"+e[1]+"()' instead. "+e[2];case 404:return e[0]+" with id='"+e[1]+"' is not found in data tree. Please check what you are looking for.";case 11:return"Can not fit gantt chart timeline to task with id '"+e[0]+"' because both fields 'actualStart' and 'actualEnd' must be correctly specified in data item.";case 12:return'Series type "'+e[0]+'" does not support error settings - only Area, Bar, Column, Line, Marker, Spline, SplineArea, StepLine and StepLineArea do.';case 13:return"Toolbar container is not specified. Please set a container using toolbar.container() method.";case 14:return"Target chart has not method "+e[0]+"(). PLease make sure that you use correct instance of chart.";case 15:return"No chart is assigned for toolbar. Please set a target chart using toolbar.target() method.";case 405:return(e[3]||"Method")+" "+e[0]+" is deprecated. Use "+e[1]+" instead"+(e[2]?e[2]+".":".");case 407:return(e[3]||"Method")+" "+e[0]+" is deprecated.";case 19:return"The projection that used cannot work correctly without Proj4. Please include Proj4 binary (https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15/proj4.js) into your page, or use another projection";case 17:return"Incorrect arguments passed to treeDataItem.set() method. You try to set a value by path in complex structure, but path contains errors (It can be not string and not numeric values, or invalid path in existing structure, or incorrect number of path's elements etc). Please, see the documentation for treeDataItem.set() method and carefully check your data.";case 101:return"Table is already in transaction mode. Calling startTransaction() multiple times does nothing.";case 201:return"Wrong mapping passed to "+e[0]+' series - required "'+e[1]+"' field is missing.";case 406:return'Could not parse date time value "'+e[0]+'".'+(e[1]?"Symbols parsed: "+e[1]:"");case 500:return"Scale is immutable for this type of axis marker and scale will not be set.";case 501:return"Layout is immutable for this type of axis marker and layout will not be set.";case 18:return"There should be only one root in tree map data. First node has been taken as root.";case 301:return'Feature with id "'+e[0]+'" not found';case 20:var i=e[1];return"Current scale ticks settings resulted in too many ticks: trying to generate about "+e[0]/i+" ticks with interval "+i;case 21:return"Data item with ID='"+e[0]+"' already exists. You should use another key.";case 22:return"Area "+e[0]+" not represented on screen.";case 700:return"Can't add state. All states for store '"+e[0]+"' has been used.";case 701:return"Last state for store '"+e[0]+"' has been used.";case 702:return"State '"+e[1]+"' already exists in '"+e[0]+"' store.";case 800:return"Surface chart has "+e[0]+" points now. If more than 3000 points are drawn on surface chart you may experience instability and poor performance.";case 900:return'Nodes with id "'+e[0]+'" and "'+e[1]+'" already connected. Supports only one connection between nodes now.';case 901:return'Node with id "'+e[0]+'" has\'t "'+e[1]+'" coordinate. Set '+e[1]+" = 0.";case 902:return'Node with id "'+e[0]+'" already exist.';case 903:return"Can't connect edge with id: \""+e[0]+'" to node with id "'+e[1]+'", node not exists.';case 904:return'You try make edge with id "'+e[0]+'" on one node with id "'+e[1]+'".';case 905:return'No group with id "'+e[0]+'". At first set groups for nodes then use groups method.';case 906:return'Data must contain "nodes" and "edges" fields';case 907:return'Nodes data must has "id" field';case 1e3:return"Offline export failed. Using server export fallback.";case 1001:return"Both client side export and export server fallback are disabled. Nothing will be exported.";case 1002:return"Offline export failed. Fallback to server disabled.";default:return"Unknown error. Please, contact support team at http://support.anychart.com/.\nWe will be very grateful for your report!"}},$.hl=function(t,e,i){var n=$.ll.console;n&&"object"!=typeof(t=n[t]||n.log)&&t.call(n,e,i||"")},ql=function(t,e){$.od.call(this),this.f=t,this.K=e,this.na=Eba.test($.ll.location.hostname),this.G=!(this.K||this.na),this.dc=ml|nl|ol|pl},rl=function(){return("https:"==$.ll.location.protocol?"https://":"http://")+"static.anychart.com/logo.png"},tl=function(t){return sl()||t.na},ul=function(){this.b={},this.i=$.mg(),this.f=null},$.wl=function(t){var e=$.vl,i="m"+$.oa(t);i in e.b||($.K(t,e.o,e),e.b[i]={FO:t,oS:[],FV:!0})},xl=function(t){return t.f||(t.f=t.i.Wo(),t.i.Xp().appendChild(t.f)),t.f},$.Bl=function(t){var e={},i="#"==(t=String(t)).charAt(0)?t:"#"+t;if(yl.test(i))return e.vk=zl(i),e.type="hex",e;t:{var n=t.match(Fba);if(n){i=Number(n[1]);var s=Number(n[2]);if(n=Number(n[3]),0<=i&&255>=i&&0<=s&&255>=s&&0<=n&&255>=n){i=[i,s,n];break t}}i=[]}if(i.length)return e.vk=$.Tb(i),e.type="rgb",e;if(Al&&(i=Al[t.toLowerCase()]))return e.vk=i,e.type="named",e;throw Error(t+" is not a valid color string")},zl=function(t){if(!yl.test(t))throw Error("'"+t+"' is not a valid hex color");return 4==t.length&&(t=t.replace(Gba,"#$1$1$2$2$3$3")),t.toLowerCase()},$.Cl=function(t){return t=zl(t),[(0,window.parseInt)(t.substr(1,2),16),(0,window.parseInt)(t.substr(3,2),16),(0,window.parseInt)(t.substr(5,2),16)]},$.Tb=function(t){var e=t[0],i=t[1];if(t=t[2],e=Number(e),i=Number(i),t=Number(t),e!=(255&e)||i!=(255&i)||t!=(255&t))throw Error('"('+e+","+i+","+t+'") is not a valid RGB color');return"#"+(e=Dl(e.toString(16)))+(i=Dl(i.toString(16)))+(t=Dl(t.toString(16)))},Gl=function(t,e,i){return 0>i?i+=1:1<i&&--i,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t},Dl=function(t){return 1==t.length?"0"+t:t},$.Hl=function(t,e,i){return i=$.Za(i,0,1),[Math.round(i*t[0]+(1-i)*e[0]),Math.round(i*t[1]+(1-i)*e[1]),Math.round(i*t[2]+(1-i)*e[2])]},$.Il=function(t,e){return $.Hl([0,0,0],t,e)},$.Kl=function(t,e,i){t=Jl(t),e=Jl(e);var n=(t.opacity+e.opacity)/2;return{color:$.Tb($.Hl(t.r5,e.r5,$.p(i)?i:.5)),opacity:n}},Jl=function(t){var e=t,i=1;return $.A(t)||($.z(t)?e=t:(e=t.color||"#000",i=$.p(t.opacity)?t.opacity:1),t=$.Ll(e).vk,e=$.Cl(t)),{r5:e,opacity:i}},Ml=function(t,e,i,n){e=null==e||(0,window.isNaN)(+e)?7:+e,n=null!=n?$.Za(n,0,1):window.NaN,t=$.Ll(t||"#000").vk;var s=$.Cl(t);t=s[0]/255;var a=s[1]/255;s=s[2]/255;var o=Math.max(t,a,s),r=Math.min(t,a,s),l=0,h=0,c=.5*(o+r);for(o!=r&&(o==t?l=60*(a-s)/(o-r):o==a?l=60*(s-t)/(o-r)+120:o==s&&(l=60*(t-a)/(o-r)+240),h=0<c&&.5>=c?(o-r)/(2*c):(o-r)/(2-2*c)),t=(s=[Math.round(l+360)%360,h,c])[0],a=s[1],s=s[2],(0,window.isNaN)(n)?(n=s,i=null!=i?$.Za(i,0,1):.95):i=null!=i?$.Za(i,0,1):s,s=1<e?Math.abs(n-i)/(e-1):0,o=[],n=i<n?1:-1,r=0;r<e;r++){h=i+n*s*r;var u=t/360;if(0==a)c=h=l=255*h;else{var d=2*h-(l=.5>h?h*(1+a):h+a-a*h);c=255*Gl(d,l,u+1/3),h=255*Gl(d,l,u),l=255*Gl(d,l,u-1/3)}o.push($.Tb([Math.round(c),Math.round(h),Math.round(l)]))}return o},$.Nl=function(t,e,i){i=$.p(i)?i:7,t=$.Ll(t||"yellow").vk,e=$.Ll(e||"brown").vk;for(var n=[t],s=1/i,a=1;a<i-1;a++){var o=$.Kl(e,t,s*a);n.push(o.color)}return n.push(e),n},Ol=function(t){if($.C(t)){if(!t.color)return null;t=t.color}if($.z(t))try{return $.Bl(t).vk}catch(e){}return null},$.Pl=function(t,e){if($.C(t)){if($.p(t.color)||$.p(t.keys)){var i=$.Qc(t);if($.p(t.keys)){for(var n=i.keys,s=[],a=0,o=n.length;a<o;a++){var r=$.Qc(n[a]);r.color=$.Pl(r.color,e),s.push(r)}i.keys=s}return $.p(i.color)&&(i.color=$.Pl(i.color,e)),i}return t}return null===(i=Ol(t))?t:(i=$.Cl(i),null!=e||(e=.3),$.Tb($.Hl([255,255,255],i,+e)))},$.Ql=function(t,e){if($.C(t)){if($.p(t.color)||$.p(t.keys)){var i=$.Qc(t);if($.p(t.keys)){for(var n=i.keys,s=[],a=0,o=n.length;a<o;a++){var r=$.Qc(n[a]);r.color=$.Ql(r.color,e),s.push(r)}i.keys=s}return $.p(i.color)&&(i.color=$.Ql(i.color,e)),i}return t}return null===(i=Ol(t))?t:(i=$.Cl(i),null!=e||(e=.3),$.Tb($.Il(i,+e)))},$.Rl=function(t){return $.J(t,Mg)?{type:t.type,color:$.Rl(t.color),thickness:t.Ef,size:t.size}:$.J(t,$.Qb)?t.F():$.C(t)?$.Sl(t):$.da(t)?t:String(t||"none")},$.Tl=function(t){return $.C(t)?t.F?JSON.stringify(t.F()):JSON.stringify(t):(typeof t).charAt(0)+t},$.Ll=function(t){var e={},i="#"==(t=String(t)).charAt(0)?t:"#"+t;if(Hba.test(i))return e.vk=zl(i),e.type="hex",e;t:{var n=t.match(Iba);if(n){i=Number(n[1]);var s=Number(n[2]);if(n=Number(n[3]),0<=i&&255>=i&&0<=s&&255>=s&&0<=n&&255>=n){i=[i,s,n];break t}}i=[]}return i.length?(e.vk=$.Tb(i),e.type="rgb",e):Al&&(t=Al[t.toLowerCase()])?(e.vk=t,e.type="named",e):null},$.Ul=function(t,e,i){var n;return n=i?$.Ub(t):$.Wb(t),$.z(n)?n={color:n,opacity:e}:$.C(n)&&(n.opacity=e),n},$.Vl=function(t){var e=1;return $.z(t)?e="none"==t?0:1:$.C(t)&&(e=$.ea(t.opacity)?t.opacity:1),e},$.Wl=function(t,e,i){return t=$.Wb(t),$.z(t)?t={color:t,thickness:e}:$.C(t)&&(t.thickness=e),i&&(t.opacity=i),t},$.cm=function(t,e,i,n){if(!t)return $.Xl;if($.z(t)){var s=e+"|"+t+"|"+i+(n?"|"+n:""),a=Yl[s];if(!a){switch(e){case 2:a=$.Zl;break;case 3:a=$.$l;break;default:a=$.am}Yl[s]=a=$.qa(Jba,t,a,3==e,i,!!n)}}else(a=Yl.transparent)||(a=Yl.transparent=function(){return $.bm});return a},$.Xl=function(){return"none"},$.dm=function(t){return!!t&&($.C(t)?!t.color||"none"!=t.color:"none"!=t)},Jba=function(t,e,i,n,s,a,o,r,l,h){o=$.em(o),l=l||a.check($.fm);var c=a.$();if(n&&o!=$.gm){var u=a.sc(t,o,c,e,s,void 0,r);if(i&&!0===u&&(u=e(a.Eh())),$.p(u)){if(!$.D(u))return u;if(i)return t=a.Yi(r),e(u.call(t,t))}}if(n=a.sc(t,0,c,e,s,void 0,r),i&&!0===n&&(n=e(a.Eh())),h&&!i&&t!=h){var d=a.sc(h,0,c,e,s,void 0,r);$.D(d)&&(t=a.Ge(void 0,r,l),d=e(d.call(t,t)))}return $.D(n)&&(t=i?a.Yi(r):a.Ge(d,r,l),n=e(n.call(t,t))),u&&(t=a.Ge(n,r,l),n=e(u.call(t,t))),n},$.hm=function(t,e){return t&&(e=e.charAt(0).toUpperCase()+e.substr(1)),t?(t?1==t?"hover":"select":"")+e:e},jm=function(t,e,i){var n=e.split(".");if(!(e=im[n[0]]))return im[n[0]]={wE:[],LC:i,DI:0},!0;if(n=e.LC<=i){e.LC=i+1;for(var s=e.wE,a=0;a<s.length;a++){var o=s[a];jm(t,o.Tb,i);var r=o.Rb;o=o.Tb.split(".");for(var l=0;l<r.length;l++){var h=r[l].split(".");km(t,h,lm(mm(t,h),mm(t,o)))}}}return n||e.DI<i},mm=function(t,e){for(var i=t,n=0;n<e.length;n++){if(!$.C(i))return;i=i[e[n]]}return i},$.qm=function(t,e,i){if(i=$.nm(i),e=mm(i,["scales",e]),t=om(t),e){i=t.type;var n=e.type;$.p(i)&&$.p(n)&&"ordinal"==n^"ordinal"==i||(t=lm(t,e))}var s;return"ordinal-color"==(i=t.type||"linear")?$.nm("defaultOrdinalColorScale"):"linear-color"==i?$.nm("defaultLinearColorScale"):s=mm($.nm("defaultScaleSettings"),[$.pm(i)]),lm(t,s)},om=function(t){if("object"==$.ka(t)){var e,i={};for(e in t)t.hasOwnProperty(e)&&(i[e]=om(t[e]));return i}return t},km=function(t,e,i){if($.p(i)){t=$.C(t)?t:{};for(var n=0;n<e.length-1;n++){var s=e[n];$.C(t[s])||(t[s]={}),t=t[s]}t[e[e.length-1]]=i}},rm=function(t,e){for(var i=t=$.C(t)?t:{},n=[i],s=e.length-1,a=0;a<s;a++){var o=e[a];if(!$.C(i[o]))return t;i=i[o],n.push(i)}for(a=s+1;a--;){for(var r in delete(i=n.pop())[e[a]],s=!1,i){s=!0;break}if(s)break}return t},lm=function(t,e){if($.p(t)){if("object"==$.ka(t)){if("object"==$.ka(e))for(var i in e)i in t&&i in sm||(t[i]=lm(t[i],e[i]))}else if(($.da(t)||null===t)&&"object"==$.ka(e))return lm({enabled:!!t},e);return t}return $.Sl(e)},$.Bm=function(t,e){var i,n,s=t=tm(t,e);for(n in um){var a=n.split("."),o=mm(s,a);if($.A(o)){var r=o.length,l=mm(e,a),h=mm(e,um[n].split(".")),c=!0,u=$.A(l)?l.length:0;if(u==r)for(i=0;i<r;i++){var d=$.Sl(l[i]);if(d=lm(d,h),!vm(o[i],d)){c=!1;break}}else c=!1;if(c)s=rm(s,a);else for(i=0;i<r;i++)i<u?(d=$.Sl(l[i]),d=lm(d,h)):d=h,o[i]=tm(o[i],d)||{}}}for(n=0;n<wm.length;n++)if(a=wm[n].split("."),o=mm(s,a),$.A(o)){for(r=(l=mm(e,a)).length,i=0;i<r;i++)h=l[i].type,h=mm($.nm("defaultScaleSettings"),[h]),l[i]=lm(l[i],h);if(r=o.length,h=!0,$.A(l)&&l.length==r){for(i=0;i<r;i++)if(!vm(o[i],l[i])){h=!1;break}}else h=!1;if(h)s=rm(s,a);else for(i=0;i<r;i++)o[i]=tm(o[i],l[i])||{}}t:{if(s){if(!(i=s.chart||s.gauge||s.gantt||s.map)){t=s;break t}r=$.ka(i.credits),n=$.ka($.zm("stageCredits")),"object"==r&&"object"==n&&(r=$.zm("stageCredits"),r=tm(i.credits,r),$.p(r)&&(i.credits=r))}t=s}for(var p in s=t,Am)if(i=Am[p],r=p.split("."),a=mm(s,r),o=mm(e,i.OL.split(".")),$.A(a)&&$.p(o))for(n=a.length,r=0;r<n;r++)l=mm(a,[r,i.TP]),$.p(l)&&(a[r]=tm(a[r],mm(o,[l]))||{});return s},tm=function(t,e,i){var n,s=$.ka(t),a=$.ka(e);if("object"==s&&"object"==a){for(var o in s=!0,t)if(o in e){if(a=e[o],o in sm){var r=sm[o];switch(r){case Cm:a=$.D(a)?void 0:$.Ub(a);break;case Dm:a=$.D(a)?void 0:$.Rl($.Yb(a));break;case Em:a=$.D(a)?void 0:$.Wb(a);break;case Fm:a=$.Gm(a)}}else r=Hm;n=r!=Hm?vm(t[o],a,r)?void 0:t[o]:tm(t[o],a,r||i),$.p(n)?(t[o]=n,s=!1):"xScale"==o||"yScale"==o||"colorScale"==o?s=!1:"enabled"!=o&&delete t[o]}else $.p(t[o])&&(s=!1);if(s)return}else{if($.p(i)&&"array"==s&&"array"==a)return vm(t,e,i)?void 0:t;if(t==e)return}return t},vm=function(t,e,i){var n=$.ka(t),s=$.ka(e);if(n==s){if("object"==n)for(var a in t){if(n=e[a],a in sm)switch(sm[a]){case Cm:n=$.D(n)?void 0:$.Ub(n);break;case Dm:n=$.D(n)?void 0:$.Rl($.Yb(n));break;case Em:n=$.D(n)?void 0:$.Wb(n)}if(!vm(t[a],n,i))return!1}else{if("array"!=n)return t===e;if((a=t.length)!=e.length)return!1;for(s=0;s<a;s++){switch(n=e[s],i){case Im:n=$.Ub(n);break;case Jm:n=$.Rl($.Yb(n))}if(!vm(t[s],n))return!1}}return!0}return!1},Xa=function(t){if($.z(t))var e=[t];else{e=[];var i=t[0];t=t[1],i=$.z(i)?[i]:Ya(i),t=$.z(t)?[t]:Ya(t);for(var n=0;n<i.length;n++)for(var s=0;s<t.length;s++)e.push(i[n]+t[s])}return e},Km=function(){},$.Lm=function(){$.od.call(this),this.kJ=this.uB.length-1,this.gG=this.Uz.length-1,this.DO=(0,$.pa)(this.DO,this)},Mm=function(t){for(var e=t.length,i=Array(e),n=i[0]=-1,s=1;s<e;s++){var a=t.charAt(s);if('"'==a)throw $.il(100),Error("Double quotes in separator are not allowed");for(;0<n&&t.charAt(n+1)!=a;)n=i[n];t.charAt(n+1)==a&&n++,i[s]=n}return i},Nm=function(t,e){for(;-1<t.Zo&&t.Uz.charAt(t.Zo+1)!=e;)t.Zo=t.f[t.Zo];return t.Uz.charAt(t.Zo+1)==e&&t.Zo++,t.Zo==t.gG},Om=function(t,e){for(;-1<t.$o&&t.uB.charAt(t.$o+1)!=e;)t.$o=t.i[t.$o];return t.uB.charAt(t.$o+1)==e&&t.$o++,t.$o==t.kJ},Qm=function(t){if(t.rM)return!1;var e=0,i=t.ah-1;t.$o=-1,t.Zo=-1;for(var n=0,s="",a=0;++i<t.Yz;){var o=t.Qd.charAt(i);switch(n){case 0:if('"'==o){++i<t.Yz?o=t.Qd.charAt(i):i--,t.ah=i,'"'==o?n=1:(n=2,i--);break}if(Nm(t,o)){t.b(e++,null),s="",t.Zo=-1,t.$o=-1,t.ah=i+1;break}if(Om(t,o)){if(t.Zo=-1,t.$o=-1,t.ah=i+1,0<e)return t.b(e,null),!0;s="";break}(!t.mw||" "!=o&&"\t"!=o)&&(t.ah=i,n=1);break;case 1:if(Nm(t,o)){o=i-t.ah-t.gG,0<t.gG&&t.mw?(s=Pm(t.Qd.substr(t.ah,o)))||(s=null):(t.mw&&(o-=a),s=0<o?t.Qd.substr(t.ah,o):null),t.b(e++,s),s="",t.Zo=-1,t.$o=-1,t.ah=i+1,n=a=0;break}if(Om(t,o)){if(o=i-t.ah-t.kJ,!e&&0>=o){s="",n=0,t.Zo=-1,t.$o=-1,t.ah=i+1,a=0;break}return 0<t.kJ&&t.mw?(s=Pm(t.Qd.substr(t.ah,o)))||(s=null):(t.mw&&(o-=a),s=0<o?t.Qd.substr(t.ah,o):null),t.b(e,s),t.ah=i+1,!0}!t.mw||" "!=o&&"\t"!=o?a=0:a++;break;case 2:if('"'==o){if(!(++i<t.Yz))return s+=t.Qd.substr(t.ah,i-t.ah-1),t.b(e,s.length?s:null),t.ah=i,t.rM=!0;'"'==(o=t.Qd.charAt(i))?(s+=t.Qd.substr(t.ah,i-t.ah),t.ah=i+1):(t.Zo=-1,t.$o=-1,n=3,s+=t.Qd.substr(t.ah,i-t.ah-1),t.b(e++,s||null),s="",i--)}break;case 3:if(Nm(t,o))s="",t.Zo=-1,t.$o=-1,t.ah=i+1,n=a=0;else if(Om(t,o))return t.ah=i+1,!0}}return o=t.Yz-t.ah,2!=n&&1!=n||!o||(s+=t.Qd.substr(t.ah,o),t.mw&&(s=Pm(t.Qd.substr(t.ah,o))),t.b(e++,s||null),t.ah=t.Yz),t.rM=!0,0<e},$.Rm=function(){return new $.Lm},$.Sm=function(t){return $.J(t,$.gb)?t:$.A(t)?new $.gb(t[0],t[1]):$.C(t)?new $.gb(t.x,t.y):new $.gb(0,0)},$.Tm=function(t,e){var i=Math.pow(10,Math.min(e||0,14-Math.floor(Math.log(Math.abs(t))*Math.LOG10E)));return Math.round(t*i)/i||0},$.Vm=function(t,e){var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E);return i=0>i?Math.min($.Um(t),14):13-Math.max(i,7),$.Tm(t,e||i)},$.Um=function(t){if(!(0,window.isFinite)(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},$.Wm=function(t,e,i){return Math.abs(t-e)<(i||.01)},$.Xm=function(t,e){var i=Math.log(Math.max(1e-7,t));return e?$.Vm(i/Math.log(e),14):i},Ym=function(t,e){return $.Tm(Math.pow(t,e),7)},Zm=function(t){t=$.Ha(t),$.Pa(t);var e=Math.floor(t.length/2);return t.length%2?t[e]:(t[e-1]+t[e])/2},$m=function(t){for(var e={},i=t[0],n=1,s=0;s<t.length;s++){var a=t[s];$.p(e[a])?e[a]++:e[a]=1,e[a]>n&&(i=a,n=e[a])}return i},$.bn=function(t,e){var i,n=!1;if(!t||!e)return!1;var s=0;for(i=t.length;s<i-1;s+=2){var a=s==i-2?0:s+2,o=s==i-2?1:s+3;n=n||an(t[s],t[s+1],t[a],t[o],e)}for(s=0,i=e.length;s<i-1;s+=2)a=s==i-2?0:s+2,o=s==i-2?1:s+3,n=n||an(e[s],e[s+1],e[a],e[o],t);return!n},an=function(t,e,i,n,s){for(var a=!0,o=0,r=s.length;o<r-1;o+=2)a=a&&0>=$.cn(t,e,i,n,s[o],s[o+1]);return a},$.cn=function(t,e,i,n,s,a){return(t=(e-n)*s+(i-t)*a+(t*n-i*e))?0<t?1:-1:0},dn=function(t,e,i,n){if(t>e){var s=t;t=e,e=s}return i>n&&(s=i,i=n,n=s),Math.max(t,i)<=Math.min(e,n)},$.en=function(t,e,i,n,s,a,o,r){return dn(t,i,s,o)&&dn(e,n,a,r)&&0>=((i-t)*(a-e)-(n-e)*(s-t))*((i-t)*(r-e)-(n-e)*(o-t))&&0>=((o-s)*(e-a)-(r-a)*(t-s))*((o-s)*(n-a)-(r-a)*(i-s))},fn=function(t,e,i,n,s,a,o,r){var l=window.NaN;return 0!=t-2*i+s?(l=(t-i+Math.sqrt((t-2*i+s)*o+i*i-t*s))/(t-2*i+s),t=(t-i-Math.sqrt((t-2*i+s)*o+i*i-t*s))/(t-2*i+s),i=(e-n+Math.sqrt((e-2*n+a)*r+n*n-e*a))/(e-2*n+a),e=(e-n-Math.sqrt((e-2*n+a)*r+n*n-e*a))/(e-2*n+a),l=0<l&&1>l?l:0<t&&1>t?t:0<i&&1>i?i:0<e&&1>e?e:window.NaN):t!=i?l=(o-t)/(2*(i-t)):t==i&&i!=s&&(l=Math.sqrt((o-t)/(s-i))),l},$.gn=function(t,e,i,n){return t=i-t,e=n-e,Math.sqrt(t*t+e*e)},$.hn=function(t,e,i){return(i||0)+e*$.Tm(Math.cos(t),8)},$.jn=function(t,e,i){return(i||0)+e*$.Tm(Math.sin(t),8)},$.kn=function(t,e,i,n){return new $.I(t,e,i,n)},$.ln=function(t){return[t.left,t.top,t.left+t.width,t.top,t.left+t.width,t.top+t.height,t.left,t.top+t.height]},$.mn=function(t){for(var e=new $.I(0,0,0,0),i=new $.I(t[0],t[1],0,0),n=2,s=t.length;n<s;n+=2)e.left=t[n],e.top=t[n+1],$.pb(i,e);return i},$.nn=function(t){return new $.I(+t.left||0,+t.top||0,+t.width||0,+t.height||0)},$.on=function(t,e){0<arguments.length&&(this.x=t,this.y=e)},pn=function(t,e){return new $.on(t.x*e,t.y*e)},qn=function(t,e,i){return new $.on(t.x+(e.x-t.x)*i,t.y+(e.y-t.y)*i)},rn=function(t){var e=arguments;this.b=[];for(var i=e.length-1;0<=i;i--)this.b.push(e[i])},tn=function(t){switch(t.tJ(),t.b.length-1){case 0:var e=[];break;case 1:e=[];var i=t.b[1];0!=i&&e.push(-t.b[0]/i);break;case 2:if(e=[],2==t.b.length-1){var n=t.b[2];0<(n=(i=t.b[1]/n)*i-t.b[0]/n*4)?(n=Math.sqrt(n),e.push(.5*(-i+n)),e.push(.5*(-i-n))):0==n&&e.push(.5*-i)}break;case 3:e=sn(t);break;case 4:if(e=[],4==t.b.length-1){var s=t.b[4];i=t.b[3]/s,n=t.b[2]/s;var a=t.b[1]/s;t=t.b[0]/s;var o=i*i/4-n+(s=sn(new rn(1,-n,i*a-4*t,-i*i*t+4*n*t-a*a))[0]);1e-6>=Math.abs(o)&&(o=0),0<o?(n=(s=3*i*i/4-(t=Math.sqrt(o))*t-2*n)+(a=(4*i*n-8*a-i*i*i)/(4*t)),a=s-a,1e-6>=Math.abs(n)&&(n=0),1e-6>=Math.abs(a)&&(a=0),0<=n&&(n=Math.sqrt(n),e.push(-i/4+(t+n)/2),e.push(-i/4+(t-n)/2)),0<=a&&(n=Math.sqrt(a),e.push(-i/4+(n-t)/2),e.push(-i/4-(n+t)/2))):0>o||-1e-6<=(a=s*s-4*t)&&(0>a&&(a=0),1e-6<=(s=3*i*i/4-2*n)+(a=2*Math.sqrt(a))&&(n=Math.sqrt(s+a),e.push(-i/4+n/2),e.push(-i/4-n/2)),1e-6<=s-a&&(n=Math.sqrt(s-a),e.push(-i/4+n/2),e.push(-i/4-n/2)))}break;default:e=[]}return e},sn=function(t){var e=[];if(3==t.b.length-1){var i=t.b[3],n=t.b[2]/i,s=t.b[1]/i,a=(3*s-n*n)/3;t=(2*n*n*n-9*s*n+t.b[0]/i*27)/27,n/=3,i=t*t/4+a*a*a/27,t/=2,0<i?(s=0<=(i=-t+(a=Math.sqrt(i)))?Math.pow(i,1/3):-Math.pow(-i,1/3),s=0<=(i=-t-a)?s+Math.pow(i,1/3):s-Math.pow(-i,1/3),e.push(s-n)):0>i?(a=Math.sqrt(-a/3),i=Math.atan2(Math.sqrt(-i),-t)/3,t=Math.cos(i),i=Math.sin(i),s=Math.sqrt(3),e.push(2*a*t-n),e.push(-a*(t+s*i)-n),e.push(-a*(t-s*i)-n)):(i=0<=t?-Math.pow(t,1/3):Math.pow(-t,1/3),e.push(2*i-n),e.push(-i-n))}return e},un=function(t,e,i,n,s,a,o,r,l,h,c,u){if(t=new $.on(t,e),i=new $.on(i,n),s=new $.on(s,a),o=new $.on(o,r),h=new $.on(l,h),l=new $.on(c,u),c=[],r=pn(i,-2),u=t.add(r.add(s)),r=pn(t,-2),s=pn(i,2),i=r.add(s),t=new $.on(t.x,t.y),r=pn(h,-2),l=o.add(r.add(l)),r=pn(o,-2),s=pn(h,2),h=r.add(s),o=new $.on(o.x,o.y),0==u.y)s=(r=u.x*(t.y-o.y))-i.x*i.y,a=i.y*i.y,r=new rn(u.x*l.y*l.y,2*u.x*h.y*l.y,u.x*h.y*h.y-l.x*a-l.y*r-l.y*s,-h.x*a-h.y*r-h.y*s,(t.x-o.x)*a+(t.y-o.y)*s);else{r=u.x*l.y-u.y*l.x,s=u.x*h.y-h.x*u.y;var d=i.x*u.y-i.y*u.x;a=t.y-o.y,n=u.y*(t.x-o.x)-u.x*a,e=-i.y*d+u.y*n,d*=d,r=new rn(r*r,2*r*s,(-l.y*d+u.y*s*s+u.y*r*n+r*e)/u.y,(-h.y*d+u.y*s*n+s*e)/u.y,(a*d+n*e)/u.y)}for(r=tn(r),s=0;s<r.length;s++)if(0<=(a=r[s])&&1>=a&&(n=tn(new rn(u.x,i.x,t.x-o.x-a*h.x-a*a*l.x)),e=tn(new rn(u.y,i.y,t.y-o.y-a*h.y-a*a*l.y)),0<n.length&&0<e.length))t:for(d=0;d<n.length;d++){var p=n[d];if(0<=p&&1>=p)for(var g=0;g<e.length;g++)if(1e-4>Math.abs(p-e[g])){c.push(pn(l,a*a).add(pn(h,a).add(o)));break t}}return c},vn=function(t,e,i,n,s,a,o,r){var l,h=(r-a)*(i-t)-(o-s)*(n-e);return 0!=h?(o=((o-s)*(e-a)-(r-a)*(t-s))/h,s=((i-t)*(e-a)-(n-e)*(t-s))/h,l=0<=o&&1>=o&&0<=s&&1>=s?new $.on(t+o*(i-t),e+o*(n-e)):null):l=null,l},wn=function(t,e){switch(e){case 1:return 0!=t%4||0==t%100&&0!=t%400?28:29;case 5:case 8:case 10:case 3:return 30}return 31},xn=function(t,e,i,n,s){return t=new Date(t,e,i),n=$.p(n)?n:3,s=s||0,e=((t.getDay()+6)%7-s+7)%7,t.valueOf()+864e5*((n-s+7)%7-e)},$.En=function(t,e,i,n,s,a){$.z(t)?(this.ai=t==yn?e:0,this.pg=t==zn?e:0,this.xg=t==An?e:0,this.Th=t==Bn?e:0,this.Bj=t==Cn?e:0,this.wh=t==Dn?e:0):(this.ai=t||0,this.pg=e||0,this.xg=i||0,this.Th=n||0,this.Bj=s||0,this.wh=a||0)},Fn=function(t){if(!(t=t.match(Kba)))return null;var e=!(t[6]||t[7]||t[8]);if(e&&!(t[2]||t[3]||t[4])||e&&t[5])return null;e=(0,window.parseInt)(t[2],10)||0;var i=(0,window.parseInt)(t[3],10)||0,n=(0,window.parseInt)(t[4],10)||0,s=(0,window.parseInt)(t[6],10)||0,a=(0,window.parseInt)(t[7],10)||0,o=(0,window.parseFloat)(t[8])||0;return t[1]?new $.En(-e,-i,-n,-s,-a,-o):new $.En(e,i,n,s,a,o)},Gn=function(t,e){var i=Math.min(t.ai,t.pg,t.xg,t.Th,t.Bj,t.wh),n=Math.max(t.ai,t.pg,t.xg,t.Th,t.Bj,t.wh);return 0>i&&0<n?null:e||0!=i||0!=n?(n=[],0>i&&n.push("-"),n.push("P"),(t.ai||e)&&n.push(Math.abs(t.ai)+"Y"),(t.pg||e)&&n.push(Math.abs(t.pg)+"M"),(t.xg||e)&&n.push(Math.abs(t.xg)+"D"),(t.Th||t.Bj||t.wh||e)&&(n.push("T"),(t.Th||e)&&n.push(Math.abs(t.Th)+"H"),(t.Bj||e)&&n.push(Math.abs(t.Bj)+"M"),(t.wh||e)&&n.push(Math.abs(t.wh)+"S")),n.join("")):"PT0S"},$.Mn=function(t,e,i){$.ea(t)?(this.b=Hn(t,e||0,i||1),Kn(this,i||1)):$.C(t)?(this.b=Hn(t.getFullYear(),t.getMonth(),t.getDate()),Kn(this,t.getDate())):(this.b=new Date((0,$.Ln)()),t=this.b.getDate(),this.b.setHours(0),this.b.setMinutes(0),this.b.setSeconds(0),this.b.setMilliseconds(0),Kn(this,t))},Hn=function(t,e,i){return e=new Date(t,e,i),0<=t&&100>t&&e.setFullYear(e.getFullYear()-1900),e},Kn=function(t,e){if(t.getDate()!=e){var i=t.getDate()<e?1:-1;t.b.setUTCHours(t.b.getUTCHours()+i)}},$.Nn=function(t,e,i,n,s,a,o){this.b=$.ea(t)?new Date(t,e||0,i||1,n||0,s||0,a||0,o||0):new Date(t&&t.getTime?t.getTime():(0,$.Ln)())},$.On=function(t,e,i,n,s,a,o){t=$.ea(t)?Date.UTC(t,e||0,i||1,n||0,s||0,a||0,o||0):t?t.getTime():(0,$.Ln)(),this.b=new Date(t)},Lba=function(){if(!$.hd)return!1;try{return new window.ActiveXObject("MSXML2.DOMDocument"),!0}catch(a2){return!1}},Pn=function(){var t=new window.ActiveXObject("MSXML2.DOMDocument");t.resolveExternals=!1,t.validateOnParse=!1;try{t.setProperty("ProhibitDTD",!0),t.setProperty("MaxXMLSize",2048),t.setProperty("MaxElementDepth",256)}catch(e){}return t},Qn=function(){},Sn=function(t){if("number"==typeof t){var e=new Qn;e.D=t;var i=t;if(0==i)i="Etc/GMT";else{var n=["Etc/GMT",0>i?"-":"+"];i=Math.abs(i),n.push(Math.floor(i/60)%100),0!=(i%=60)&&n.push(":",$.uc(i,2)),i=n.join("")}return e.i=i,0==(i=t)?i="UTC":(n=["UTC",0>i?"+":"-"],i=Math.abs(i),n.push(Math.floor(i/60)%100),0!=(i%=60)&&n.push(":",i),i=n.join("")),t=Rn(t),e.o=[i,i],e.b={ksa:t,BZ:t},e.f=[],e}return(e=new Qn).i=t.id,e.D=-t.std_offset,e.o=t.names,e.b=t.names_ext,e.f=t.transitions,e},Rn=function(t){var e=["GMT"];return e.push(0>=t?"+":"-"),t=Math.abs(t),e.push($.uc(Math.floor(t/60)%100,2),":",$.uc(t%60,2)),e.join("")},Tn=function(t,e){for(var i=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes())/36e5,n=0;n<t.f.length&&i>=t.f[n];)n+=2;return 0==n?0:t.f[n-1]},$.Xn=function(t,e){this.f=[],this.b=e||Un,"number"==typeof t?Vn(this,t):Wn(this,t)},Yn=function(t){return t.getHours?t.getHours():0},Wn=function(t,e){for(Mba&&(e=e.replace(/\u200f/g,""));e;){for(var i=e,n=0;n<Zn.length;++n){var s=e.match(Zn[n]);if(s){var a=s[0];e=e.substring(a.length),0==n&&(a="''"==a?"'":(a=a.substring(1,"'"==s[1]?a.length-1:a.length)).replace(/''/g,"'")),t.f.push({text:a,type:n});break}}if(i===e)throw Error("Malformed pattern part: "+e)}},Vn=function(t,e){if(4>e)var i=t.b.mF[e];else if(8>e)i=t.b.rF[e-4];else{if(!(12>e))return void Vn(t,10);i=(i=(i=t.b.sQ[e-8]).replace("{1}",t.b.mF[e-8])).replace("{0}",t.b.rF[e-8])}Wn(t,i)},$n=function(t,e){var i=String(e),n=t.b||Un;if(void 0!==n.SQ){for(var s=[],a=0;a<i.length;a++){var o=i.charCodeAt(a);s.push(48<=o&&57>=o?String.fromCharCode(n.SQ+o-48):i.charAt(a))}i=s.join("")}return i},ao=function(t){if(!(t.getHours&&t.getSeconds&&t.getMinutes))throw Error("The date to format has no time (probably a goog.date.Date). Use Date or goog.date.DateTime, or use a pattern without time fields.")},Nba=function(t,e,i,n,s,a){var o=e.length;switch(e.charAt(0)){case"G":return i=0<n.getFullYear()?1:0,4<=o?t.b.eZ[i]:t.b.wQ[i];case"y":return 0>(i=n.getFullYear())&&(i=-i),2==o&&(i%=100),$n(t,$.uc(i,o));case"Y":return i=n.getFullYear(),s=n.getMonth(),n=n.getDate(),i=xn(i,s,n,t.b.gK,t.b.fK),0>(i=new Date(i).getFullYear())&&(i=-i),2==o&&(i%=100),$n(t,$.uc(i,o));case"M":t:switch(i=n.getMonth(),o){case 5:o=t.b.iZ[i];break t;case 4:o=t.b.BQ[i];break t;case 3:o=t.b.IQ[i];break t;default:o=$n(t,$.uc(i+1,o))}return o;case"k":return ao(s),i=Yn(s)||24,$n(t,$.uc(i,o));case"S":return i=s.getMilliseconds()/1e3,$n(t,i.toFixed(Math.min(3,o)).substr(2)+(3<o?$.uc(0,o-3):""));case"E":return i=n.getDay(),4<=o?t.b.RQ[i]:t.b.KQ[i];case"a":return ao(s),o=Yn(s),t.b.oQ[12<=o&&24>o?1:0];case"h":return ao(s),i=Yn(s)%12||12,$n(t,$.uc(i,o));case"K":return ao(s),i=Yn(s)%12,$n(t,$.uc(i,o));case"H":return ao(s),i=Yn(s),$n(t,$.uc(i,o));case"c":t:switch(i=n.getDay(),o){case 5:o=t.b.yZ[i];break t;case 4:o=t.b.AZ[i];break t;case 3:o=t.b.zZ[i];break t;default:o=$n(t,$.uc(i,1))}return o;case"L":t:switch(i=n.getMonth(),o){case 5:o=t.b.xZ[i];break t;case 4:o=t.b.MQ[i];break t;case 3:o=t.b.NQ[i];break t;default:o=$n(t,$.uc(i+1,o))}return o;case"Q":return i=Math.floor(n.getMonth()/3),4>o?t.b.JQ[i]:t.b.EQ[i];case"d":return $n(t,$.uc(n.getDate(),o));case"m":return ao(s),$n(t,$.uc(s.getMinutes(),o));case"s":return ao(s),$n(t,$.uc(s.getSeconds(),o));case"v":return(o=a||Sn(i.getTimezoneOffset())).i;case"V":return t=a||Sn(i.getTimezoneOffset()),2>=o?t.i:0<Tn(t,i)?$.p(t.b.g8)?t.b.g8:t.b.DST_GENERIC_LOCATION:$.p(t.b.BZ)?t.b.BZ:t.b.STD_GENERIC_LOCATION;case"w":return i=s.getFullYear(),n=s.getMonth(),s=s.getDate(),i=xn(i,n,s,t.b.gK,t.b.fK),n=new Date(new Date(i).getFullYear(),0,1).valueOf(),$n(t,$.uc(Math.floor(Math.round((i-n)/864e5)/7)+1,o));case"z":return t=a||Sn(i.getTimezoneOffset()),4>o?t.o[0<Tn(t,i)?2:0]:t.o[0<Tn(t,i)?3:1];case"Z":return n=a||Sn(i.getTimezoneOffset()),4>o?(t=[0>(o=-n.rD(i))?"-":"+"],o=Math.abs(o),t.push($.uc(Math.floor(o/60)%100,2),$.uc(o%60,2)),o=t.join("")):o=$n(t,Rn(n.rD(i))),o;default:return""}},Oba=function(t){return!/^\s*$/.test(t)&&/^[\],:{}\s\u2028\u2029]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},Pba=function(a){if(a=String(a),Oba(a))try{return eval("("+a+")")}catch(b2){}throw Error("Invalid JSON string: "+a)},co=function(t){return(new bo).F(t)},bo=function(){},eo=function(t,e,i){if(null==e)i.push("null");else{if("object"==typeof e){if($.A(e)){var n=e;e=n.length,i.push("[");for(var s="",a=0;a<e;a++)i.push(s),eo(t,n[a],i),s=",";return void i.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(n in i.push("{"),s="",e)Object.prototype.hasOwnProperty.call(e,n)&&"function"!=typeof(a=e[n])&&(i.push(s),fo(n,i),i.push(":"),eo(t,a,i),s=",");return void i.push("}")}e=e.valueOf()}switch(typeof e){case"string":fo(e,i);break;case"number":i.push((0,window.isFinite)(e)&&!(0,window.isNaN)(e)?String(e):"null");break;case"boolean":i.push(String(e));break;case"function":i.push("null");break;default:throw Error("Unknown type: "+typeof e)}}},fo=function(t,e){e.push('"',t.replace(Qba,(function(t){var e=go[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),go[t]=e),e})),'"')},$.ho=function(t){if($.fa.JSON)try{return $.fa.JSON.stringify(t)}catch(e){}return co(t)},$.io=function(t){if($.fa.JSON)try{return $.fa.JSON.parse(t)}catch(e){}return Pba(t)},$.no=function(t,e){for(var i=[],n=0;n<t.length;n+=2){var s=t[n],a=void 0,o=t[n+1];if(o==Rba)a=s;else if(s){switch(o){case $.jo:s=s.Pa;break;case $.ko:s=s.oa;break;case $.lo:s=s.Nd}e?o==Sba?a=s.get(e):(a=s[e],o==mo&&(a=a?a.call(s):void 0)):a=s}i.push(a)}return i},oo=function(t,e,i,n){if(i)for(var s=0;s<i.length;s++){var a=i[s];if(a in t){e=a;break}}return 3<arguments.length?(s=t[e],t[e]=n,s):t[e]},ro=function(t,e){return"number"==typeof t&&"number"==typeof e?$.po(t,e):(t=$.qo(t))>(e=$.qo(e))?1:t==e?0:-1},Tba=function(t,e){return-ro(t,e)},$.po=function(t,e){return(0,window.isNaN)(t)?(0,window.isNaN)(e)?0:1:(0,window.isNaN)(e)?-1:t-e},$.so=function(t){for(var e;$.J(t,$.ig);){if(e=t.tag,$.p(e))return e;t=t.parent()}},$.to=function(t,e){if(!t)return!1;for(;$.J(e,$.qf)&&e!=t;)e=e.Zi();return e==t},$.qo=function(t){return $.C(t)?"o"+$.oa(t):(typeof t).charAt(0)+t},$.L=function(t,e,i){return t=$.ea(t)?t:!(0,window.isNaN)(e)&&$.uo(t)?e*(0,window.parseFloat)(t)/100:(0,window.parseFloat)(t),i&&!(0,window.isNaN)(e)?e-t:t},$.xo=function(t){switch(t){case $.vo:return"hovered";case $.wo:return"selected";default:return"normal"}},$.uo=function(t){return $.z(t)&&$.fc(t,"%")&&!(0,window.isNaN)((0,window.parseFloat)(t))},$.yo=function(t,e){if(null===t)return null;t=$.p(t)?t:0,e=$.p(e)?e:0;var i=$.uo(t),n=(0,window.parseFloat)(t);return(0,window.isNaN)(n)?e:i?t:n},$.zo=function(t,e){return $.uo(t)?t:($.ea(t)||(t=(0,window.parseFloat)(t)),(0,window.isNaN)(t)?e?window.NaN:"0%":t+"%")},$.Ao=function(t){return $.uo(t)?(0,window.parseFloat)(t)/100:+t},$.N=function(t){return null==t||$.da(t)?window.NaN:+t},$.Bo=function(t){return $.z(t)?t:$.N(t)},Co=function(t){return $.ea(t)&&!(0,window.isNaN)(t)||$.z(t)&&""!=(0,$.vc)(t)?t:null},$.Do=function(t){return(0,window.isNaN)($.N(t))},$.P=function(t,e,i){return $.ea(t)||(t=(0,window.parseFloat)(t)),t=Math.round(t),!(0,window.isNaN)(t)&&(0<t||i&&!t)?t:$.p(e)?e:i?0:1},$.Xk=function(t){if($.ea(t))var e=t;else $.z(t)?(e=+new Date(t),(0,window.isNaN)(e)&&(e=+t)):e=null!=t?Number(t):window.NaN;return e},$.Eo=function(t,e){var i=t.left,n=t.top;switch($.Dk(e)){case"left-center":n+=t.height/2;break;case"left-bottom":n+=t.height;break;case"center-top":i+=t.width/2;break;case"center":i+=t.width/2,n+=t.height/2;break;case"center-bottom":i+=t.width/2,n+=t.height;break;case"right-top":i+=t.width;break;case"right-center":i+=t.width,n+=t.height/2;break;case"right-bottom":i+=t.width,n+=t.height}return{x:i,y:n}},$.Go=function(t){return t=$.ab(t),(t/=90)!=~~t&&(t=Math.round(t-.5)+.5),$.Fo[(t+t+6)%8]},$.Ho=function(t){return"outside"==t||"byPath"==t?1:"inside"==t?-1:0},$.Io=function(t,e){var i=0,n=$.p(e)?e:window.NaN;if(t.enabled()){var s=t.g("position"),a=t.g("length");"outside"==s?i=0>=n?0:a:"center"==s?i=n*a/2:"inside"==s&&(i=0<=n?0:-a)}return i},$.Jo=function(t,e){var i=$.ab(-e)/90;if(i){var n=(0,$.za)($.Fo,t);0<=n&&(i!=~~i&&(i=Math.round(i-.5)+.5),t=$.Fo[(n+(i+i))%$.Fo.length])}return t},$.Ko=function(t){return"left-top"==t||"center-top"==t||"right-top"==t},$.Lo=function(t){return"left-bottom"==t||"center-bottom"==t||"right-bottom"==t},$.Mo=function(t){return"left-top"==t||"left-center"==t||"left-bottom"==t},$.No=function(t){return"right-top"==t||"right-center"==t||"right-bottom"==t},$.Oo=function(t,e,i,n){return i=i||0,n=7<=n?n:7,$.Tm(e*Math.floor($.Tm((t-i)/e,n))+i,n)},$.Po=function(t,e,i,n){return i=i||0,n=7<=n?n:7,$.Tm(e*Math.ceil($.Tm((t-i)/e,n))+i,n)},$.So=function(t,e,i){var n=new Date(t),s=n.getUTCFullYear(),a=n.getUTCMonth(),o=n.getUTCDate(),r=n.getUTCHours(),l=n.getUTCMinutes(),h=n.getUTCSeconds(),c=n.getUTCMilliseconds();return e.ai?(s=$.Oo(s,e.ai,new Date(i).getUTCFullYear()),Date.UTC(s,0)):e.pg?(a=$.Oo(a,e.pg),Date.UTC(s,a)):e.xg&&0==e.xg%7?(t=$.Qo($.Ro()),$.Oo(n.getTime(),864e5*e.xg,Date.UTC(2e3,0,2+(t?t.firstDayOfWeek:0)))):e.xg?(o=$.Oo(o,e.xg),Date.UTC(s,a,o)):e.Th?(r=$.Oo(r,e.Th),Date.UTC(s,a,o,r)):e.Bj?(l=$.Oo(l,e.Bj),Date.UTC(s,a,o,r,l)):1<=e.wh?(h=$.Oo(h,e.wh),Date.UTC(s,a,o,r,l,h)):e.wh?(c=$.Oo(c,1e3*e.wh),Date.UTC(s,a,o,r,l,h,c)):t},To=function(t){return $.p(t)?$.uc(t,2):t},Uba=function(t,e,i,n,s,a,o){var r=$.p(e)?e+1:e,l=$.uc(t,4)||"2000";r=To(r)||"01";var h=To(i)||"01",c=To(n)||"00",u=To(s)||"00",d=To(a)||"00",p=To(o)||"0";switch(arguments.length){case 2:l=l+"-"+r;break;case 3:l=l+"-"+r+"-"+h;break;case 4:case 5:l=l+"-"+r+"-"+h+"T"+c+":"+u;break;case 6:l=l+"-"+r+"-"+h+"T"+c+":"+u+":"+d;break;case 7:l=l+"-"+r+"-"+h+"T"+c+":"+u+":"+d+"."+p}return new Date(l).getTime()},$.Uo=function(t,e,i,n){var s=new Date(t),a=s.getUTCFullYear(),o=s.getUTCMonth(),r=s.getUTCDate(),l=s.getUTCHours(),h=s.getUTCMinutes(),c=s.getUTCSeconds(),u=s.getUTCMilliseconds(),d=100>a&&-1<a?Uba:Date.UTC;switch(e){case"year":return d(a=$.Oo(a,i,new Date(String(n)).getUTCFullYear()),0);case"semester":return d(a,o=$.Oo(o,6*i));case"quarter":return d(a,o=$.Oo(o,3*i));case"month":return d(a,o=$.Oo(o,i));case"third-of-month":return $.Oo(s.getTime(),864e6*i,Date.UTC(2e3,0,2));case"week":return t=$.Qo($.Ro()),$.Oo(s.getTime(),6048e5*i,Date.UTC(2e3,0,2+(t?t.firstDayOfWeek:0)));case"day":return $.Oo(s.getTime(),864e5*i,Date.UTC(2e3,0,2));case"hour":return d(a,o,r,l=$.Oo(l,i));case"minute":return d(a,o,r,l,h=$.Oo(h,i));case"second":return d(a,o,r,l,h,c=$.Oo(c,i));case"millisecond":return d(a,o,r,l,h,c,u=$.Oo(u,i))}return t},$.Vo=function(t,e){switch(t){case"year":var i=yn,n=e;break;case"semester":i=zn,n=6*e;break;case"quarter":i=zn,n=3*e;break;case"month":i=zn,n=e;break;case"third-of-month":i=An,n=10*e;break;case"week":i=An,n=7*e;break;case"day":i=An,n=e;break;case"hour":i=Bn,n=e;break;case"minute":i=Cn,n=e;break;case"second":i=Dn,n=e;break;case"millisecond":i=Dn,n=e/1e3;break;default:i=yn,n=e}return new $.En(i,n)},$.R=function(t,e,i){return e=(1&e)/2,.5<=t%1?Math.ceil(t)-(i?-e:e):Math.floor(t)+(i?-e:e)},Wo=function(t){return t=$.R(t,1),$.p(void 0)&&void 0>t?Math.floor(t):Math.ceil(t)},$.Xo=function(t,e){var i=t.left+t.width,n=t.top+t.height;return t.left=$.R(t.left,e),t.top=$.R(t.top,e),t.width=$.R(i,e)-t.left,t.height=$.R(n,e)-t.top,t},$.Yo=function(t,e,i,n){switch(e){case"left-top":case"left-center":case"center-top":case"center":t.x+=i,t.y+=n;break;case"left-bottom":case"center-bottom":t.x+=i,t.y-=n;break;case"right-center":case"right-top":t.x-=i,t.y+=n;break;case"right-bottom":t.x-=i,t.y-=n}},$.Zo=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if($.p(n))return n}},$.$o=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if(null!=n)return n}},ap=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if($.A(n)&&(n=ap.apply(null,n)),null!=n)return n}},Vba=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if($.A(n)&&(n=ap.apply(null,n)),null!=n)return n}},$.Sl=function(t){var e=$.ka(t);if("array"==e){e=[];for(var i=0;i<t.length;i++)i in t&&(e[i]=$.Sl(t[i]))}else{if("object"!=e)return t;for(i in e={},t)t.hasOwnProperty(i)&&(e[i]=$.Sl(t[i]))}return e},bp=function(t,e){var i=$.ka(t);if("array"==i){var n="array"==$.ka(e)?e:[];i=[];for(var s=Math.max(t.length,n.length),a=0;a<s;a++)i[a]=bp(t[a],n[a])}else{if("object"!=i)return $.p(e)?e:t;for(s in n="object"==$.ka(e)?e:{},i={},t)t.hasOwnProperty(s)&&!$.ec(s,"closure_uid")&&(i[s]=bp(t[s],n[s]));for(s in n)!n.hasOwnProperty(s)||s in i||$.ec(s,"closure_uid")||(i[s]=$.Sl(n[s]))}return i},$.cp=function(t){return null===t||$.z(t)&&"none"==t.toLowerCase()},$.dp=function(t){return t=$.Wb(t),$.cp(t)?0:$.C(t)?$.$b(t):1},$.ep=function(){return this.value},Pm=function(t){return t.replace(/[\s\xa0]+$/,"")},fp=function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},$.gp=function(t){var e=!0;return-1!=t.indexOf('"')&&($.il(100),e=!1),e},hp=function(t,e,i,n,s,a){for(var o=0;o<n;o++){var r=t[o],l=s?s[o]:void 0;a&&l&&($.D(a)?r=a(l,r):"object"==$.ka(a)&&(l=a[l])&&(r=l(r))),null!=r?($.z(r)||(r=String(r)),(-1!=r.indexOf(e)||-1!=r.indexOf(i))&&(r='"'+(r=r.split('"').join('""'))+'"')):r="",t[o]=r}return t.join(e)},$.kp=function(t,e,i){var n=i&&i.rowsSeparator||"\n",s=i&&i.columnsSeparator||",",a=i&&i.ignoreFirstRow||!1,o=i&&i.formats||void 0,r=i&&i.headers||void 0;if(!e.length||!$.gp(n)||!$.gp(s))return"";for(i=[],a||i.push(hp(t,s,n,t.length,t,r)),a=0;a<e.length;a++)i.push(hp(e[a],s,n,t.length,t,o));return i.join(n)},$.np=function(t){if($.z(t))if(void 0!==window.DOMParser)t=(new window.DOMParser).parseFromString(t,"application/xml");else{if(!lp)throw Error("Your browser does not support loading xml documents");var e=Pn();e.loadXML(t),t=e}if(!t)return null;switch(t.nodeType){case 1:e={};var i=!!t.getAttribute(mp);i&&(e=[]);var n,s={},a=!0,o=t.childNodes.length,r="";for(n=0;n<o;n++){var l=t.childNodes[n],h=$.np(l);if("#"==(l=l.nodeName).charAt(0))r+=h;else if(i&&"item"==l)a=!1,""==h?e.push(h):$.A(h)||(0,window.isNaN)(+h)?"true"==h?e.push(!0):"false"==h?e.push(!1):"null"==h?e.push(null):e.push(h):e.push(+h);else if((null!==h||"point"==l)&&!i){var c;a=!1,l=$.pm(l,!0),(c=Wba(l))?(l=h[c[1]],$.A(l)||(l=$.p(l)?[l]:[]),e[c[0]]=l):l in e?s[l]?e[l].push(h):(e[l]=[e[l],h],s[l]=!0):"data"===t.nodeName&&1===o&&$.A(h)?e[l]=[h]:e[l]=h}}for(o=null==t.attributes?0:t.attributes.length,n=0;n<o;n++)i=t.attributes[n],"xmlns"!=(l=String(i.nodeName).toLowerCase())&&l!=mp&&((l=$.pm(i.nodeName,!0))in e||(h=op(i.value),e[l]=""==h?h:(0,window.isNaN)(+h)?"true"==h||"false"!=h&&("null"==h?null:h):1<h.length&&"0"==h.charAt(0)&&(0>=+h||1<=+h)?h:+h,a=!1));return a?0<r.length?op(r):{}:e;case 3:return""==(t=fp(t.nodeValue))?null:t;case 4:return t.nodeValue;case 9:return $.np(t.documentElement);default:return null}},$.qp=function(t,e,i){$.z(t)&&(t=$.io(t));t:{if(!window.document.implementation||!window.document.implementation.createDocument){if(lp&&(n=Pn()))break t;throw Error("Your browser does not support creating new documents")}var n=window.document.implementation.createDocument("","",null)}if((t=pp(t,e||"anychart",n))&&(e||t.setAttribute("xmlns","http://anychart.com/schemas/8.13.1/xml-schema.xsd"),n.appendChild(t)),i)e=n;else if(i=(e=n).xml)e=i;else{if(void 0===window.XMLSerializer)throw Error("Your browser does not support serializing XML documents");e=(new window.XMLSerializer).serializeToString(e)}return e},pp=function(t,e,i){var n,s;if(e=String(e).replace(/([A-Z])/g,"_$1").toLowerCase(),e=i.createElement(e),$.z(t)||$.ea(t))e.appendChild(i.createCDATASection(sc(String(t))));else if($.A(t))for(e.setAttribute(mp,"true"),n=0;n<t.length;n++)$.p(t[n])&&e.appendChild(pp(t[n],"item",i));else if(null!=t)for(n in t)if(t.hasOwnProperty(n)){var a,o=t[n];if($.A(o)&&(a=Xba(n))){var r=i.createElement(a[0]);e.appendChild(r);var l=a[1];for(s=0;s<o.length;s++)r.appendChild(pp(o[s],l,i))}else $.p(o)&&($.C(o)||!Yba.test(o)?e.appendChild(pp(o,n,i)):($.z(o)&&(o=sc(String(o))),e.setAttribute(String(n).replace(/([A-Z])/g,"_$1").toLowerCase(),o)))}return e},op=function(t){return t.replace(/\\([0bfnrt"'\\]|x([0-9a-fA-F]{2})|u([0-9a-fA-F]{4}))/g,(function(t,e,i,n){switch(e.charAt(0)){case"0":return"\0";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case'"':return'"';case"'":return"'";case"\\":return"\\";case"x":return String.fromCharCode((0,window.parseInt)(i,16));case"u":return String.fromCharCode((0,window.parseInt)(n,16))}}))},Xba=function(t){switch(t){case"series":return["series_list","series"];case"annotationsList":return["annotations_list","annotation"];case"keys":return["keys","key"];case"data":return["data","point"];case"lineAxesMarkers":return["line_axes_markers","line_axes_marker"];case"rangeAxesMarkers":return["range_axes_markers","range_axes_marker"];case"textAxesMarkers":return["text_axes_markers","text_axes_marker"];case"xGrids":return["x_grids","grid"];case"yGrids":return["y_grids","grid"];case"xMinorGrids":return["x_minor_grids","grid"];case"yMinorGrids":return["y_minor_grids","grid"];case"xAxes":return["x_axes","axis"];case"yAxes":return["y_axes","axis"];case"axes":return["axes","axis"];case"bars":return["bar_pointers","pointer"];case"markers":return["marker_pointers","pointer"];case"needles":return["needle_pointers","pointer"];case"knobs":return["knob_pointers","pointer"];case"pointers":return["pointers","pointer"];case"scaleBars":return["scale_bars","scale_bar"];case"points":return["points","point"];case"scales":return["scales","scale"];case"colorScales":return["color_scales","scale"];case"explicit":return["explicit","tick"];case"values":return["values","value"];case"names":return["names","name"];case"ranges":return["ranges","range"];case"chartLabels":return["chart_labels","label"];case"items":return["items","item"];case"columns":return["columns","column"];case"colors":return["colors","color"];case"children":return["children","data_item"];case"index":return["index","key"];case"outliers":return["outliers","outlier"];case"inverted":return["inverted_list","inverted"];case"drillTo":return["drill_to","item"];case"extraClassNames":return["extra_class_names","class_name"];case"dependsOn":return["depends_on","item"];case"precision":return["precision_list","precision"];case"labels":return["quarter_labels","label"];case"weights":return["weights","weight"];case"angles":return["angles","angle"];case"levels":return["levels","level"];case"xLabels":return["x_labels","item"];case"yLabels":return["y_labels","item"]}return null},Wba=function(t){switch(t){case"seriesList":return["series","series"];case"annotationsList":return["annotationsList","annotation"];case"keys":return["keys","key"];case"data":return["data","point"];case"lineAxesMarkers":return["lineAxesMarkers","lineAxesMarker"];case"rangeAxesMarkers":return["rangeAxesMarkers","rangeAxesMarker"];case"textAxesMarkers":return["textAxesMarkers","textAxesMarker"];case"xGrids":return["xGrids","grid"];case"yGrids":return["yGrids","grid"];case"xMinorGrids":return["xMinorGrids","grid"];case"yMinorGrids":return["yMinorGrids","grid"];case"xAxes":return["xAxes","axis"];case"yAxes":return["yAxes","axis"];case"axes":return["axes","axis"];case"barPointers":return["bars","pointer"];case"markerPointers":return["markers","pointer"];case"needlePointers":return["needles","pointer"];case"knobPointers":return["knobs","pointer"];case"pointers":return["pointers","pointer"];case"scaleBars":return["scaleBars","scaleBar"];case"points":return["points","point"];case"scales":return["scales","scale"];case"explicit":return["explicit","tick"];case"values":return["values","value"];case"names":return["names","name"];case"ranges":return["ranges","range"];case"chartLabels":return["chartLabels","label"];case"items":return["items","item"];case"columns":return["columns","column"];case"colors":return["colors","color"];case"children":return["children","dataItem"];case"index":return["index","key"];case"outliers":return["outliers","outlier"];case"invertedList":return["inverted","inverted"];case"colorScales":return["colorScales","scale"];case"drillTo":return["drillTo","item"];case"extraClassNames":return["extraClassNames","className"];case"dependsOn":return["dependsOn","item"];case"precisionList":return["precision","precision"];case"quarterLabels":return["labels","label"];case"weights":return["weights","weight"];case"angles":return["angles","angle"];case"levels":return["levels","level"];case"xLabels":return["xLabels","item"];case"yLabels":return["yLabels","item"]}return null},$.pm=function(t,e){return String(t).replace(e?/[_]([a-z])/g:/[-_]([a-z|\d])/g,(function(t,e){return e.toUpperCase()}))},Zba=function(){if(rp)return rp;var t=sp.length,e=0==t%2?t/2:t+.5;return rp=(0,$.Wa)((0,$.Wa)(sp,(function(t,i){return t+i%e*(i%2?-1:1)})),(function(t){return String.fromCharCode(t)})).join("")},$.tp=function(t,e){switch(t){case"year":return 315576e5*e;case"semester":return 315576e5*e/2;case"quarter":return 315576e5*e/4;case"month":return 315576e5*e/12;case"third-of-month":return 315576e5*e/36;case"week":return 6048e5*e;case"day":return 864e5*e;case"hour":return 36e5*e;case"minute":return 6e4*e;case"second":return 1e3*e;default:return e}},$.vp=function(t,e){for(var i=0;i<$.up.length&&$.up[i].Dg!=t;i++);return $.up[$.Za(i-(e||1),0,$.up.length)].Dg},wp=function(t){var e=t.ai;return 1e3*(e=60*(e=60*(e=24*(e=365.25*(e=365.25*e+t.pg)/12+t.xg)+t.Th)+t.Bj)+t.wh)},$.zp=function(t){switch(t=String(t).toLowerCase()){case"arrowhead":return function(t,e,i,n){var s=e-n/2,a=i-n/3,o=e-n/2,r=i+n/3;return t.moveTo(e+n/2,i).lineTo(s,a).lineTo(o,r).close(),t};case"star4":return hi;case"star6":return ji;case"star7":return ki;case"star10":return li;case"diamond":return qi;case"triangle-up":return mi;case"triangle-down":return ni;case"triangle-right":return oi;case"triangle-left":return pi;case"cross":return ri;case"diagonal-cross":return si;case"circle":return function(t,e,i,n){return vi(t,e,i,n,0,360)};case"trapezium":return function(t,e,i,n){var s=n/3;return e-=n/2,i-=n/2,t.moveTo(e+s,i+n),t.lineTo(e+n-s,i+n),t.lineTo(e+n,i),t.lineTo(e,i),t.close(),t};case"pentagon":return function(t,e,i,n){e-=n,i-=n,t.moveTo(e+n*xp[0],i+n*yp[0]);for(var s=1;5>s;s++)t.lineTo(e+n*xp[s],i+n*yp[s]);return t.lineTo(e+n*xp[0],i+n*yp[0]),t.close(),t};case"square":return function(t,e,i,n,s){var a=e-n,o=i-n;return e+=n,i+=n,$.p(s)&&(s=s||0,a=$.R(a,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(a,o).lineTo(e,o).lineTo(e,i).lineTo(a,i).lineTo(a,o).close(),t};case"v-line":case"line":return function(t,e,i,n,s){var a=(n*=2)/2;return a=(e-=a/2)+a,n=(i-=n/2)+n,$.p(s)&&(s=s||0,e=$.R(e,s),i=$.R(i,s),a=$.R(a,s),n=$.R(n,s)),t.moveTo(e,i).lineTo(a,i).lineTo(a,n).lineTo(e,n).lineTo(e,i).close(),t};case"arrow-up":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=e+o;return o=e-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(e,a),t.lineTo(n,i,h,i,h,l,o,l,o,i,r,i),t.close(),t};case"arrow-down":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=e+o;return o=e-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(e,l),t.lineTo(n,i,h,i,h,a,o,a,o,i,r,i),t.close(),t};case"arrow-left":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=i+o;return o=i-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(r,i),t.lineTo(e,l,e,h,n,h,n,o,e,o,e,a),t.close(),t};case"arrow-right":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=i+o;return o=i-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(n,i),t.lineTo(e,l,e,h,r,h,r,o,e,o,e,a),t.close(),t};default:return ii}},Ap=function(t,e,i,n){var s=new $.Lm;if(i=!0,$.C(n)&&(s.lJ(n.rowsSeparator),s.hG(n.columnsSeparator),s.OH(n.ignoreTrailingSpaces),i=!n.ignoreFirstRow,s.MH(i)),t=s.pC(t)){if(n=$.Me("table"),e&&(s=$.Me("caption"),Ue(s,e),n.appendChild(s)),i){var a=$.Me("thead"),o=$.Me("tr");a.appendChild(o)}for(e=$.Me("tbody"),s=0;s<t.length;s++){var r,l=t[s];if(s||!i){var h=$.Me("tr");for(r=0;r<l.length;r++){var c=l[r],u=$.Me(r?"td":"th");Ue(u,c),h.appendChild(u)}e.appendChild(h)}else if(i)for(r=0;r<l.length;r++)c=l[r],h=$.Me("th"),Ue(h,c),o.appendChild(h)}return i&&n.appendChild(a),n.appendChild(e),n}return null},Bp=function(t){var e="";"..."==t.textOverflow&&(t.textOverflow="ellipsis");var i=t.fontSize;for(var n in $.ea(i)&&(t.fontSize=i.toString()+"px"),t)e+=($ba[n]||String(n).replace(/([A-Z])/g,"-$1").toLowerCase())+": "+t[n]+";";return e},Cp=function(t,e,i){return[{offset:0,color:i,opacity:e},{offset:Math.max(t-.05,0),color:i,opacity:e},{offset:t,color:i,opacity:0},{offset:1,color:i,opacity:0}]},$.Dp=function(t,e){var i=(0,window.setTimeout)((function(){t.md||t.dispatchEvent(e),(0,window.clearTimeout)(i)}),0)},$.Ep=function(t,e,i){var n=(0,window.setTimeout)((function(){t.call(i),e&&e.call(i),(0,window.clearTimeout)(n),i=e=t=null}),1);return n},Ip=function(t,e,i,n,s,a){if($.xd&&!$.bd("525"))return!0;if($.Ad&&s)return Fp(t);if(s&&!n)return!1;if(!$.gd){$.ea(e)&&(e=Gp(e));var o=17==e||18==e||$.Ad&&91==e;if((!i||$.Ad)&&o||$.Ad&&16==e&&(n||a))return!1}if(($.xd||$.Hp)&&n&&i)switch(t){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if($.hd&&n&&e==t)return!1;switch(t){case 13:return!($.gd&&(a||s||i&&n));case 27:return!($.xd||$.Hp||$.gd)}return(!$.gd||!(n||s||a))&&Fp(t)},Fp=function(t){if(48<=t&&57>=t||96<=t&&106>=t||65<=t&&90>=t||($.xd||$.Hp)&&0==t)return!0;switch(t){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}},Gp=function(t){return $.gd?t=aca(t):$.Ad&&$.xd&&93===t&&(t=91),t},aca=function(t){switch(t){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return t}},$.Jp=function(t,e){$.qf.call(this),t&&this.WM(t,e)},Kp=function(t,e,i,n){$.Bd.call(this,n),this.type="key",this.keyCode=t,this.f=e,this.repeat=i},$.Mp=function(t){return $.p(t)&&($.ll=$.fa=t,$.Lp=t.document),$.fa},$.Op=function(t){return $.p(t)&&(Np=t),Np},Rp=function(t,e){$.Pp?Qp.push((0,$.pa)(t,e)):t.apply(e)},$.Sp=function(){if($.Pp--,!$.Pp)for(var t=Qp.slice(0),e=Qp.length=0;e<t.length;e++)t[e]()},$.Xp=function(t){var e;if($.z(t)?e=$.io(t):$.C(t)&&!$.D(t)&&(e=t),t=null,e){var i=e.chart,n=e.gauge,s=e.gantt,a=e.map;if(i){if(e=i.type,!(t=$.Tp[e]))throw"Unknown chart type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}else if(n){if(e=n.type,!(t=$.Up[e]))throw"Unknown gauge type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}else if(s){if("project"==s.type?s.type="gantt-project":"resource"==s.type&&(s.type="gantt-resource"),e=s.type,!(t=$.Vp[e]))throw"Unknown gantt type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}else if(a){if(e=a.type,!(t=$.Wp[e]))throw"Unknown map type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}}return t?t.ga(!1,i||n||s||a):$.il(7),t},Yp=function(t){var e=$.Lp;(e.addEventListener||"load"===$.ll.event.type||"complete"===e.readyState)&&(e=$.ll,$.Yd($.Lp,["DOMContentLoaded","readystatechange"],Yp,!1),$.Yd(e,"load",Yp,!1),Zp(t))},Zp=function(t){if(!$p){if(!$.Lp.body)return(0,window.setTimeout)((function(){Zp(t)}),1);$p=!0;for(var e=0,i=aq.length;e<i;e++){var n=aq[e];n[0].apply(n[1],[t])}}},sl=function(){if(null==bq||!$.z(bq))return!1;var t=bq.lastIndexOf("-"),e=bq.substr(t+1);if(t=bq.substr(0,t)+Zba(),!cq){for(var i,n=[],s=0;256>s;s++){i=s;for(var a=0;8>a;a++)i=1&i?3988292384^i>>>1:i>>>1;n[s]=i}cq=n}for(i=-1,n=0;n<t.length;)i=i>>>8^cq[255&(i^t.charCodeAt(n++))];return e==(t=((-1^i)>>>0).toString(16))},gq=function(){return dq.length||(dq=[$.eq.themes.defaultTheme||{}],fq.length&&(dq=$.Ga(dq,fq))),dq},hq=function(t){t=$.z(t)?$.Sl($.eq.themes[t]):t,fq.push(t),dq.length=0},$.zm=function(t,e,i){e=$.p(e)?e:{},t=t.split(".");for(var n,s=gq(),a=0;a<s.length;a++){for(var o=s[a],r=0;r<t.length;r++)o&&(o=o[n=t[r]]);$.p(o)&&("object"==$.ka(o)?(n=o,$.p(n.padding)&&(n.padding=$.Gm(n.padding)),$.p(n.margin)&&(n.margin=$.Gm(n.margin))):o=$.D(i)?i(o):$.da(o)?{enabled:o}:null,o&&$.ra(e,o))}return e},$.nm=function(t){var e;for(t=$.pm(t),iq.length||(iq.push($.eq.themes.defaultTheme||{}),jq.push(iq[0])),e=iq.length-1;e<fq.length;e++){var i=fq[e];i=$.Sl($.z(i)?$.eq.themes[i]:i),iq.push($.C(i)?i:{}),jq.push({})}for(i=window.Infinity,e=0;e<iq.length;e++)jm(iq[e],t,e)&&(i=Math.min(i,e));for(e=Math.max(1,i);e<jq.length;e++){i=t.split("."),km(jq[e],[i[0]],lm($.Sl(mm(iq[e],i[0].split("."))),mm(jq[e-1],i[0].split(".")))),i=e;var n=t.split("."),s=im[n[0]];s||(im[n[0]]={wE:[],DI:0,LC:0}),s.DI=i}return mm(jq[jq.length-1],t.split("."))},kq=function(t,e){return function(i){e&&i||$.il(4,null,[t])}},lq=function(t,e,i){t=t.split(".");for(var n=$.ll,s=0;s<t.length;s++)if(!(n=n[t[s]]))return kq(e,i);return n},nq=function(t){return(t=mq[t])?t:kq("Exporting")},pq=function(t,e){oq[e]&&oq[e]==t&&delete oq[e]},qq=function(t,e){return t!==e},$.rq=function(t,e,i,n,s){return $.A(e)?$.rq.apply(null,$.Ga(t,e)):(e={zy:e,hX:i,Fr:n},$.p(s)&&(i=e.lea=s),t[i]=e)},$.sq=function(t,e){for(var i={},n=0;n<e.length;n++)i[e[n][1]]=$.rq.apply(null,$.Ga(t,e[n]));return i},$.tq=function(t,e,i,n,s,a,o,r){i={ho:i,Aka:n},$.p(s)&&(i.Cb=s),$.p(a)&&$.D(a)&&(i.g0=a,i.context=o),i.aha=r,t[e]=i},$.T=function(t,e){for(var i=0;i<e.length;i++)$.tq.apply(null,$.Ga(t,e[i]))},$.vq=function(){return $.sq({},$.uq())},$.uq=function(){return[[0,"minFontSize",$.wq],[0,"maxFontSize",$.wq],[0,"maxLength",$.xq],[1,"adjustFontSize",yq],[0,"fontSize",$.wq],[0,"fontFamily",$.zq],[0,"fontColor",$.Aq],[0,"fontOpacity",$.Bq],[0,"fontDecoration",$.bl],[0,"fontStyle",$.cl],[0,"fontVariant",$.dl],[0,"fontWeight",$.wq],[0,"letterSpacing",$.wq],[0,"textDirection",$.el],[0,"textShadow",$.Zb],[0,"lineHeight",$.wq],[0,"textIndent",$.Bq],[0,"vAlign",$.al],[0,"hAlign",$.$k],[0,"wordWrap",$.Cq],[0,"wordBreak",$.Cq],[0,"textOverflow",$.zq],[0,"selectable",$.Dq],[0,"disablePointerEvents",$.Dq],[0,"useHtml",$.Dq]]},$.Eq=function(t,e,i,n,s,a){$.T(t,[["minFontSize",e,n,void 0,a],["maxFontSize",e,n,void 0,a],["maxLength",e,n,void 0,a],["adjustFontSize",e,n,void 0,a],["fontSize",e,n,void 0,a],["fontFamily",e,n,void 0,a],["fontColor",i,s],["fontOpacity",i,s],["fontDecoration",e,n,void 0,a],["fontStyle",e,n,void 0,a],["fontVariant",e,n,void 0,a],["fontWeight",e,n,void 0,a],["letterSpacing",e,n,void 0,a],["textDirection",e,n,void 0,a],["textShadow",i,s],["lineHeight",e,n,void 0,a],["textIndent",e,n,void 0,a],["vAlign",e,n,void 0,a],["hAlign",e,n,void 0,a],["wordWrap",e,n,void 0,a],["wordBreak",e,n,void 0,a],["textOverflow",e,n,void 0,a],["selectable",i,s],["disablePointerEvents",i,s],["useHtml",e,n,void 0,a]])},$.U=function(t,e,i){for(var n in i||(t=t.prototype),e)i=e[n],t[n]=$.qa(Fq[i.zy],i.hX,i.lea,i.Fr)},$.Gq=function(t,e,i){for(var n=0;n<e.length;n++){var s=e[n];t.prototype[s]=function(t){return function(e){var n=this[i]();return $.p(arguments[0])?(n[t].apply(n,arguments),this):n[t]()}}(s)}},$.Iq=function(t,e,i,n){if(n&&t.oa)$.Hq(t.oa,e,i);else for(var s in e)e=i[s],$.p(e)&&(t.g?t[s](e):t[s]=e)},$.Tq=function(t,e,i,n,s,a){var o;for(o in s=$.p(s)?s:e){s=void 0;var r=e[o];t.ph(o)&&(s=t.nd(o),$.D(s)&&$.kl(8,null,[(n?n+" ":"")+o])),r&&($.p(s)||a||!t.check(t.getCapabilities(o))||(s=t.vf(o)),$.p(s)&&!$.D(s)&&(r.Fr==$.Jq||r.Fr==$.Nq||r.Fr==$.Oq||r.Fr==$.Pq||r.Fr==$.Qq||r.Fr==$.Rq?s=$.Rl(r.Fr([s])):r.Fr!=$.Sq||null===s?r.Fr==yq&&(s=r.Fr([s])):s=$.Rl(r.Fr(s)),i[o]=s))}},$.Hq=function(t,e,i){for(var n in e)e=i[n],$.p(e)&&(t[n]=e)},Xq=function(t,e,i,n){return $.p(n)?(n=i.call(this,n),Uq(this,t).call(this,this.nd(t),n)&&(this.ta(t,n),this.check(this.getCapabilities(t))&&(Vq(this,t).call(Wq(this,t)),e=this.ys(t),(t=this.CM(t))?this.B(t,e):this.va(e))),this):this.g(t)},Yq=function(t,e,i,n,s){if($.p(n)){for(var a=[],o=3;o<arguments.length;o++)a.push(arguments[o]);return n=i.call(this,a),Uq(this,t).call(this,this.nd(t),n)&&(this.ta(t,n),this.check(this.getCapabilities(t))&&(Vq(this,t).call(Wq(this,t)),a=this.ys(t),(o=this.CM(t))?this.B(o,a):this.va(a))),this}return this.g(t)},$.Cq=function(t){return t},$.Sq=function(t){return null===t?t:$.Ub(t)},$.Pq=function(t){return $.Wb.apply(null,t)},$.Jq=function(t){return $.D(t[0])?t[0]:$.Wb.apply(null,t)},$.Zl=function(t){return $.D(t)?t:$.Wb(t)},$.Qq=function(t){return $.Ub.apply(null,t)},$.Nq=function(t){return $.D(t[0])?t[0]:$.Ub.apply(null,t)},$.am=function(t){return $.D(t)?t:$.Ub(t)},$.Oq=function(t){return $.D(t[0])||!0===t[0]?t[0]:$.Yb.apply(null,t)},$.$l=function(t){return $.D(t)||!0===t?t:$.Yb(t)},$.Rq=function(t){return $.Yb.apply(null,t)},$.Dq=function(t){return!!t},$.Zq=function(t){return null===t?t:!!t},$.Bq=function(t){return Number(t)},$.xq=function(t){return null===t?t:Number(t)},$q=function(t){return Co(t)||0},$.zq=function(t){return String(t)},$.Aq=function(t){return null===t?t:String(t)},$.ar=function(t){return $.D(t)?t:String(t)},$.br=function(t){return $.yo(t,null)},$.cr=function(t){return $.D(t)?t:$.Ok(t)},dr=function(t){return null===t?t:$.Lk(t)},yq=function(t){var e=t[0];return 1==t.length?$.A(e)?{width:0<e.length?e[0]:void 0,height:1<e.length?e[1]:e[0]}:$.C(e)?{width:e.width,height:e.height}:{width:!!e,height:!!e}:{width:!!e,height:!!t[1]}},$.wq=function(t){return $.Bo(t)},$.er=function(t){return $.Za($.N(t),0,1)},$.fr=function(t){return $.A(t[0])?t[0]:t},$.gr=function(t){return $.D(t)?t:null},$.hr=function(){var t=this.jg();return t||(t=$.Ga(this.Wd(),this.Xd()),this.jg(t)),t},$.ir=function(t){for(var e=this.bh(),i=0;i<e.length;i++){var n=e[i];if(n&&(n=n[t],$.p(n)))return n}},$.V=function(){$.qf.call(this),this.Pa={},this.oa={},this.ua={},this.n4=!1,this.QB=[],this.WC=[],this.Nm={},this.Nl={},$.jr(this)},Wq=function(t,e){var i=t.ua[e];return i&&i.context||t},Vq=function(t,e){var i=t.ua[e];return i&&i.g0||$.ia},Uq=function(t,e){var i=t.ua[e];return i&&i.aha||qq},$.K=function(t,e,i){t.wa("signal",e,!1,i)},$.kr=function(t,e,i){t.gc("signal",e,!1,i)},lr=function(t,e){return t|(this.DJ[e]||0)},$.mr=function(t,e){return e in t.js&&e in t.Nl},$.nr=function(t,e,i,n){$.mr(t,e)&&(i=(t.js[e].DJ[i]||0)&~t.Nl[e],t.Nl[e]|=i,(i||t.Wj())&&t.va(n||0))},$.or=function(t,e,i,n){$.mr(t,e)&&(i=(0,$.Gg)(i,lr,0,t.js[e])&~t.Nl[e],t.Nl[e]|=i,(i||t.Wj())&&t.va(n||0))},$.jr=function(t){for(var e in t.js)t.Nl[e]=t.js[e].Ku},$.pr=function(t,e,i){$.mr(t,e)&&(t.Nl[e]&=~(t.js[e].DJ[i]||0))},$.qr=function(t,e,i){$.mr(t,e)&&(i=(0,$.Gg)(i,lr,0,t.js[e]),t.Nl[e]&=~i)},$.rr=function(t,e,i){return!!$.mr(t,e)&&!!(t.Nl[e]&(t.js[e].DJ[i]||0))},$.sr=function(t){return t.QB.length?t.QB:[t.oa]},$.tr=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n];s&&($.z(s)?i.push(s+"."+e):$.p(s[e])&&i.push($.Qc(s[e])))}return i},$.wr=function(t,e,i,n){if($.p(t.Nm[e])||(t.Nm[e]={A6:$.ur[e]}),t.Nm[e].JD)return t.Nm[e].JD;if($.p(t.Nm[e].enabled))return t.Nm[e].enabled;var s=t.Nm[e].A6?$.Ha(t.Nm[e].A6):[],a=$.tr($.sr(t),e);if(s.push.apply(s,a),i)return vr(t,e,n),t.Nm[e].JD;for(i=gq(),a=s.length;a--;){var o=s[a];if($.z(o))for(var r=o.split("."),l=i.length;l--;){o=i[l];for(var h=0;h<r.length;h++)o&&(o=o[r[h]]);if($.p(o)&&(($.da(o)||null===o)&&(o={enabled:!!o}),$.p(o.enabled)))return o.enabled?vr(t,e,n):t.Nm[e].enabled=!1,t.Nm[e].JD?t.Nm[e].JD:null}}return null},vr=function(t,e,i){t.Nm[e].enabled=!0,i=(i=$.D(i)?i:t[e]).call(t),t.Nm[e].JD||$.W(t,e,i)},$.W=function(t,e,i){var n=$.tr($.sr(t),e);i.Ga(n),$.p(t.Nm[e])||(t.Nm[e]={}),t.Nm[e].JD=i},$.xr=function(t){for(var e=arguments.length;e--;){var i=arguments[e];$.A(i)?$.xr.apply(null,i):$.J(i,$.V)&&i.ka()}},$.yr=function(t){for(var e=arguments.length;e--;){var i=arguments[e];$.A(i)?$.yr.apply(null,i):$.J(i,$.V)&&i.da(!0)}},$.zr=function(t){for(var e=arguments.length;e--;){var i=arguments[e];$.A(i)?$.zr.apply(null,i):$.J(i,$.V)&&i.da(!1)}},Ar=function(t,e,i){wd.call(this,"signal",t),this.f=e,i&&$.ra(this,i)},$.X=function(t,e){return!!(t.f&e)},$.Br=function(t){this.view=t,this.reset()},$.Cr=function(t){$.V.call(this),this.ee=t,t.wa("signal",this.XI,!1,this),this.B(1)},$.Dr=function(t){t.pf()||(t.aE&&(t.aE.length=0),t.Aw=null,t.wo=t.FC(),t.I(1))},$.Er=function(t,e,i){$.Dr(t);var n=[];if($.p(e)){t=t.$();var s=window.Infinity;for(i||(e=$.N(e)),t.reset();t.advance();){var a=t.ma(),o=t.get("x");if(i)o==e&&n.push(a);else if(o=$.N(o),!(0,window.isNaN)(o)){var r=Math.abs(o-e);if(r<s){s=r;var l=o;n.length=0}o==l&&n.push(a)}}}return n},Fr=function(t,e){var i,n=t.Af(e);if($.A(n)){var s=t.Ul(e);if(s.o){var a={};for(r in s=s.pr()){var o=s[r];for(i=0;i<o.length;i++)if(o[i]in n){o=t.fP(n[o[i]]),a[r]=o;break}}}else a=(0,$.Wa)(n,t.fP)}else if($.C(n))if((s=t.Ul(e)).o){for(r in a={},s=s.pr())for(o=s[r],i=0;i<o.length;i++)if(o[i]in n){o=n[o[i]],$.J(o,Date)&&(o=o.getTime()),(!$.p(o)||$.ea(o)&&(0,window.isNaN)(o))&&(o=null),a[r]=o;break}for(r in n)!n.hasOwnProperty(r)||r in s&&r in a||(o=t.fP(n[r]),a[r]=o)}else{var r=t.fP;for(a in s={},n)s[a]=r.call(void 0,n[a],a,n);a=s}else(!$.p(n)||$.ea(n)&&(0,window.isNaN)(n))&&(n=null),a=n;return a},Gr=function(t,e){$.Cr.call(this,t),this.b=e,e.wa("signal",this.XI,!1,this)},Hr=function(t,e,i){$.Cr.call(this,t),this.b=e,this.f=i},$.Jr=function(t,e){$.Cr.call(this,t),$.Ir(this,e)},bca=function(t,e,i,n){var s=$.ka(e);if("array"==s){if(t=t.Zc[i]){for(i=t[0],s=0;s<t.length;s++){if(t[s]<e.length)return e[t[s]]=n,e;t[s]<i&&(i=t[s])}return e[i]=n,e}$.kl(5,null,[i])}else"object"==s?void 0===oo(e,i,t.Zc[i],n)&&e.hasOwnProperty(i)&&((n=t.ee).At||(n.At={}),n.At[i]=!0):-1<(0,$.za)(Kr,i)?e=n:$.kl(7,null,[i]);return e},$.Ir=function(t,e){var i;if($.C(e))for(i in e)$.A(e[i])||(e[i]=[e[i]]);else e=void 0;t.o=!!e,t.Zc=e||Lr},$.Mr=function(t,e){$.V.call(this),this.data(t||null,e)},Nr=function(t,e){for(var i=[],n=0;n<e.length;n++){var s=e[n];if($.A(s)){var a=s.length;t.zK<a&&(t.zK=a),a=$.Ja(s,0)}else if($.C(s))for(var o in t.At||(t.At={}),a={},s)a[o]=s[o],t.At[o]=!0;else t.ZX=!0,a=s;i.push(a)}return i},$.Or=function(t,e){return new $.Mr(t,e)},Pr=function(t,e,i){$.Cr.call(this,t),this.b=e;var n=$.D(i)?i:"desc"==$.Mk(i,"asc")?Tba:ro;this.f=function(t,e){return n(t.value,e.value)||t.index-e.index}},Qr=function(t,e,i,n,s){i={x:s?s[0]:0};for(var a=0,o=n.length;a<o;a++)i[n[a]]=s?s[e]:e,e++;return t.Yd(i)},$.Sr=function(t,e){var i=tba(e);if("csv"==i)try{var n=new $.Lm;$.C(e)&&(n.lJ(e.rowsSeparator),n.hG(e.columnsSeparator),n.OH(e.ignoreTrailingSpaces),n.MH(e.ignoreFirstRow));var s=n.pC(t)}catch(d){s=null,$.il(101)}else{var a,o={},r=0,l=window.NaN,h=window.NaN;if(n=window.NaN,e&&((a=e.ignoreItems)&&(a=new RegExp("^("+a.join("|")+")$")),e.minLength&&(r=e.minLength),e.maxLength&&(l=e.maxLength),e.cutLength&&(h=e.cutLength),e.maxItems&&(n=e.maxItems)),"by-word"==i)t.split(Rr).forEach((function(t){var e=(t=t.replace(cca,"")).length;a&&a.test(t.toLowerCase())||e>l||e<r||((0,window.isNaN)(h)||(t=t.substr(0,h)),o[t=t.toLowerCase()]=(o[t]||0)+1)}));else{i=0;for(var c=(t=t.replace(Rr,"")).length;i<c;i++){var u=t[i];a&&a.test(u.toLowerCase())||(o[u=u.toLowerCase()]=(o[u]||0)+1)}}s=[],$.Dc(o,(function(t,e){s.push([e,t])})),(s=s.sort((function(t,e){return e[1]-t[1]}))).length=Math.min(s.length,n||window.Infinity)}return s},dca=function(t,e){if(this.b=[],this.f=e||Un,"number"==typeof t){var i=t;if(11<i&&(i=10),4>i)var n=this.f.mF[i];else n=8>i?this.f.rF[i-4]:(n=(n=this.f.sQ[i-8]).replace("{1}",this.f.mF[i-8])).replace("{0}",this.f.rF[i-8]);Tr(this,n)}else Tr(this,t)},Tr=function(t,e){for(var i=!1,n="",s=0;s<e.length;s++){var a=e.charAt(s);if(" "==a)for(0<n.length&&(t.b.push({text:n,count:0,gC:!1}),n=""),t.b.push({text:" ",count:0,gC:!1});s<e.length-1&&" "==e.charAt(s+1);)s++;else if(i)"'"==a?s+1<e.length&&"'"==e.charAt(s+1)?(n+="'",s++):i=!1:n+=a;else if(0<=eca.indexOf(a)){0<n.length&&(t.b.push({text:n,count:0,gC:!1}),n="");for(var o=e.charAt(s),r=s+1;r<e.length&&e.charAt(r)==o;)r++;o=r-s,t.b.push({text:a,count:o,gC:!1}),s+=o-1}else"'"==a?s+1<e.length&&"'"==e.charAt(s+1)?(n+="'",s++):i=!0:n+=a}for(0<n.length&&t.b.push({text:n,count:0,gC:!1}),i=!1,n=0;n<t.b.length;n++)Ur(t.b[n])?!i&&n+1<t.b.length&&Ur(t.b[n+1])&&(i=!0,t.b[n].gC=!0):i=!1},Ur=function(t){if(0>=t.count)return!1;var e="MydhHmsSDkK".indexOf(t.text.charAt(0));return 0<e||0==e&&3>t.count},Vr=function(t,e){var i=t.substring(e[0]).match(/^\s+/);i&&(e[0]+=i[0].length)},Yr=function(t,e,i,n,s,a){Vr(e,i);var o=i[0],r=n.text.charAt(0),l=-1;if(Ur(n))if(0<s){if(o+s>e.length)return!1;l=Wr(t,e.substring(0,o+s),i)}else l=Wr(t,e,i);switch(r){case"G":return 0<=(l=Xr(e,i,t.f.wQ))&&(a.era=l),!0;case"M":case"L":t:{if(0>(n=l)){if(t=t.f.BQ.concat(t.f.MQ).concat(t.f.IQ).concat(t.f.NQ),0>(n=Xr(e,i,t))){a=!1;break t}a.month=n%12}else a.month=n-1;a=!0}return a;case"E":return 0>(n=Xr(e,i,t.f.RQ))&&(n=Xr(e,i,t.f.KQ)),0>n?a=!1:(a.b=n,a=!0),a;case"a":return 0<=(l=Xr(e,i,t.f.oQ))&&(a.i=l),!0;case"y":t:{if(0>l){var h=e.charAt(i[0]);if("+"!=h&&"-"!=h){a=!1;break t}if(i[0]++,0>(l=Wr(t,e,i))){a=!1;break t}"-"==h&&(l=-l)}h||2!=i[0]-o||2!=n.count?a.year=l:(e=l,t=(i=(new Date).getFullYear()-80)%100,a.D=e==t,e+=100*Math.floor(i/100)+(e<t?100:0),a.year=e),a=!0}return a;case"Q":return 0>l?(0>(n=Xr(e,i,t.f.EQ))&&(n=Xr(e,i,t.f.JQ)),0>n?a=!1:(a.month=3*n,a.day=1,a=!0)):a=!1,a;case"d":return 0<=l&&(a.day=l),!0;case"S":return e=i[0]-o,a.o=3>e?l*Math.pow(10,3-e):Math.round(l/Math.pow(10,e-3)),!0;case"h":12==l&&(l=0);case"K":case"H":case"k":return 0<=l&&(a.Th=l),!0;case"m":return 0<=l&&(a.Bj=l),!0;case"s":return 0<=l&&(a.wh=l),!0;case"z":case"Z":case"v":e.indexOf("GMT",i[0])==i[0]&&(i[0]+=3);t:if(i[0]>=e.length)a.f=0,a=!0;else{switch(n=1,e.charAt(i[0])){case"-":n=-1;case"+":i[0]++}if(o=i[0],0>(l=Wr(t,e,i)))a=!1;else{if(i[0]<e.length&&":"==e.charAt(i[0])){if(h=60*l,i[0]++,0>(l=Wr(t,e,i))){a=!1;break t}h+=l}else h=24>(h=l)&&2>=i[0]-o?60*h:h%100+h/100*60;a.f=-h*n,a=!0}}return a;default:return!1}},Wr=function(t,e,i){if(t.f.SQ){for(var n=[],s=i[0];s<e.length;s++){var a=e.charCodeAt(s)-t.f.SQ;n.push(0<=a&&9>=a?String.fromCharCode(a+48):e.charAt(s))}e=n.join("")}else e=e.substring(i[0]);return(t=e.match(/^\d+/))?(i[0]+=t[0].length,(0,window.parseInt)(t[0],10)):-1},Xr=function(t,e,i){var n=0,s=-1;t=t.substring(e[0]).toLowerCase();for(var a=0;a<i.length;a++){var o=i[a].length;o>n&&0==t.indexOf(i[a].toLowerCase())&&(s=a,n=o)}return 0<=s&&(e[0]+=n),s},fca=function(){},$r=function(t){return $.C(t)||(t=String(t),t=Zr[t]||$.eq.format.locales[t]),t||null},$.Qo=function(t){return(t=$r(t))&&t.dateTimeLocale||null},as=function(t){return(t=$r(t))&&t.numberLocale||null},bs=function(t,e){var i=$.Qo(t);return i&&i[e||"dateTimeFormat"]||null},ds=function(t){if(!t)return Un;var e=$.oa(t);return e in cs||(cs[e]={wQ:t.eras,eZ:t.eraNames,iZ:t.narrowMonths,xZ:t.standaloneNarrowMonths,BQ:t.months,MQ:t.standaloneMonths,IQ:t.shortMonths,NQ:t.standaloneShortMonths,RQ:t.weekdays,AZ:t.standaloneWeekdays,KQ:t.shortWeekdays,zZ:t.standaloneShortWeekdays,g9:t.narrowWeekdays,yZ:t.standaloneNarrowWeekdays,JQ:t.shortQuarters,EQ:t.quarters,oQ:t.ampms||t.amPmS,mF:t.dateFormats||[],rF:t.timeFormats||[],sQ:t.dateTimeFormats||[],fK:t.firstDayOfWeek,w$:t.weekendRange,gK:t.firstWeekCutOffDay||t.firstWeekCutOfDay}),cs[e]},es=function(t,e){var i=$r(t);if(i){var n="object"==$.ka(t);Zr[n?e:t]=bp($.eq.format.locales.default,i)}},gs=function(t){return $.p(t)&&(fs=$.ma(t)?t.getTime():$.N(t)),(0,window.isNaN)(fs)?((t=new Date).setTime(Date.UTC(t.getUTCFullYear(),t.getUTCMonth())),t):new Date(fs)},$.Ro=function(t){if($.p(t)){var e=$.z(t),i="object"==$.ka(t);e||i?(es(t,i=i?"output":t),hs=e?i:Zr[i]||Zr.output||t):hs="default"}return hs},js=function(t){return $.p(t)&&(is=$.z(t)?t:null),is||bs(hs)||bs("output")||bs("default")||"yyyy.MM.dd"},ls=function(t){return $.p(t)&&(ks=$.z(t)?t:null),ks||bs(hs,"dateFormat")||bs("output","dateFormat")||bs("default","dateFormat")||"yyyy.MM.dd"},ns=function(t){return $.p(t)&&(ms=$.z(t)?t:null),ms||bs(hs,"timeFormat")||bs("output","timeFormat")||bs("default","timeFormat")||"HH:mm:ss"},$.ps=function(t,e,i,n){return $.ma(t)?t:$.ea(t)?(0,window.isNaN)(t)?null:new Date(t):$.z(t)?os(t,e,i,n):null},$.qs=function(t){var e=$r(hs);return(e=e&&e.messages)&&t in e?e[t]:t},$.rs=function(t,e,i){return e=$.Zk(e),((i?i+"_":"")+((t=$.Zk(t))==e?t:e+"_"+t)).replace(/-/g,"_")},$.ss=function(t,e,i){return t=(i=$.Qo(i)||$.Qo(hs)||$.Qo("output")||$.Qo("default"))&&i.formats&&i.formats[t],($.A(t)?t[Math.min(t.length-1,e||0)]:$.z(t)?t:"")||"yyyy/MM/dd'T'HH:mm:ss.SSS"},$.ts=function(t,e){var i=$.Qo(e)||$.Qo(hs)||$.Qo("output")||$.Qo("default");return i=i&&i.formats&&i.formats[t],$.A(i)?i:$.z(i)?[i]:[]},$.vs=function(t,e,i){return $.us(t,ls(),e,i)},ws=function(t,e,i){return $.us(t,ns(),e,i)},$.us=function(t,e,i,n){if(t=$.J(t,Date)?t:new Date(t),(0,window.isNaN)(t.getTime()))return String(t);n=$.Qo(n)||$.Qo(hs)||$.Qo("output")||$.Qo("default");var s=(e=e||is||js()||"yyyy.MM.dd")+$.oa(n);return s in xs||(n=ds(n),xs[s]=new $.Xn(e,n)),n=xs[s],(i=i||ys)in zs||(zs[i]=Sn(i)),n.format(t,zs[i])},$.Bs=function(t,e,i,n,s,a,o,r){var l;$.z(e)?l=as(e):$.C(e)&&(l=e);var h=as(hs)||as("default");if(e=$.ea(e)?e:l&&$.ea(l.decimalsCount)?l.decimalsCount:h.decimalsCount,i=$.z(i)?i:l&&$.z(l.decimalPoint)?l.decimalPoint:h.decimalPoint,n=$.z(n)?n:l&&$.z(l.groupsSeparator)?l.groupsSeparator:h.groupsSeparator,s=$.C(s)||$.da(s)?s:l&&($.C(l.scale)||$.da(l.scale))?l.scale:h.scale,a=$.da(a)?a:l&&$.da(l.zeroFillDecimals)?l.zeroFillDecimals:h.zeroFillDecimals,o=$.z(o)?o:l&&$.z(l.scaleSuffixSeparator)?l.scaleSuffixSeparator:h.scaleSuffixSeparator,r=$.da(r)?r:l&&$.da(l.useBracketsForNegative)?l.useBracketsForNegative:h.useBracketsForNegative,!0===s&&(s=As),(l=0>(t=Number(t)))&&(t=-t),h="",$.C(s)&&$.A(s.factors)&&$.A(s.suffixes)){var c=1,u=s.factors;s=s.suffixes;for(var d=Math.min(u.length,s.length),p=0;p<d;p++)if(t>=(c=u[p])||1>=c&&t>.1*c){h=s[p];break}h?h=o+h:c=1,t/=c}if(a=a?t.toFixed(e):$.Tm(t,e).toString(),t="",/(e+|e-)/.test(a)&&(e=a.split("e"),a=e[0],t="e"+e[1]),e=a.split("."),n){for(a=e[0],o=[];0<(s=a.substr(0,a.length-3)).length;)o.unshift(a.substr(-3)),a=s;a&&o.unshift(a),e[0]=o.join(n)}return n=l?"-":"",i=e.join(i)+t+h,l&&r&&(i=["(",i,")"].join(""),n=""),n+i},os=function(t,e,i,n){if(e=($.p(e)?e:Cs)||null){n=$.Qo(n)||$.Qo(Ds)||$.Qo("input")||$.Qo("default");var s=$.oa(n);(s=e+s)in Es||(n=ds(n),Es[s]=new dca(e,n));var a=Es[s];i=$.ma(i)?i:gs(),(e=-1==e.replace(/'.+?'/g,"").search(/z+/i))&&i.setTime(i.getTime()+6e4*i.getTimezoneOffset()),n=t.length;t:{var o=new fca;s=[0];for(var r=-1,l=0,h=0,c=0;c<a.b.length;c++){if(!(0<a.b[c].count)){if(r=-1," "==a.b[c].text.charAt(0)){if(u=s[0],Vr(t,s),s[0]>u)continue}else if(t.indexOf(a.b[c].text,s[0])==s[0]){s[0]+=a.b[c].text.length;continue}t=0;break t}if(0>r&&a.b[c].gC&&(r=c,h=l=0),0<=r){var u=a.b[c].count;if(c==r&&(u-=h,h++,0==u)){t=0;break t}Yr(a,t,s,a.b[c],u,o)||(c=r-1,s[0]=l)}else if(r=-1,!Yr(a,t,s,a.b[c],0,o)){t=0;break t}}e:{if(null==i)throw Error("Parameter 'date' should not be null.");if(null!=o.era&&null!=o.year&&0==o.era&&0<o.year&&(o.year=-(o.year-1)),null!=o.year&&i.setFullYear(o.year),t=i.getDate(),i.setDate(1),null!=o.month&&i.setMonth(o.month),null!=o.day?i.setDate(o.day):(a=wn(i.getFullYear(),i.getMonth()),i.setDate(t>a?a:t)),$.D(i.setHours)&&(null==o.Th&&(o.Th=i.getHours()),null!=o.i&&0<o.i&&12>o.Th&&(o.Th+=12),i.setHours(o.Th)),$.D(i.setMinutes)&&null!=o.Bj&&i.setMinutes(o.Bj),$.D(i.setSeconds)&&null!=o.wh&&i.setSeconds(o.wh),$.D(i.setMilliseconds)&&null!=o.o&&i.setMilliseconds(o.o),null!=o.f&&i.setTime(i.getTime()+6e4*(o.f-i.getTimezoneOffset())),o.D&&((t=new Date).setFullYear(t.getFullYear()-80),i.getTime()<t.getTime()&&i.setFullYear(t.getFullYear()+100)),null!=o.b)if(null==o.day)3<(t=(7+o.b-i.getDay())%7)&&(t-=7),o=i.getMonth(),i.setDate(i.getDate()+t),i.getMonth()!=o&&i.setDate(i.getDate()+(0<t?-7:7));else if(o.b!=i.getDay()){t=!1;break e}t=!0}t=t?s[0]-0:0}return n==t?(e&&i.setTime(i.getTime()-6e4*i.getTimezoneOffset()),i):null}return i=Number(t),t=new Date((0,window.isNaN)(i)?t:i),(0,window.isNaN)(t.getTime())?null:t},Fs=function(t){return $.z(t)&&(t=os(t)),Number(t)},$.Gs=function(){$.V.call(this),this.Ga("palette"),this.Xe=null,this.Gp(!0)},$.Hs=function(){$.V.call(this),this.Ga("hatchFillPalette")},$.Ls=function(){$.V.call(this),this.Ga("markerPalette")},$.Ms=function(){$.V.call(this),this.Xe=null,this.b=window.NaN,this.f=[],this.i=window.NaN,this.Gp(!0)},$.Ns=function(t,e){t.i!=e&&(t.i=e,((0,window.isNaN)(t.b)||null===t.b)&&t.B(16))},Ps=function(){this.G=[0,1],this.i=[0,1],this.D=[],this.o=Os,this.b=this.f=null},Qs=function(t,e){$.p(e)&&(t.G=$.Ja(e,0),t.f=t.b=null)},Rs=function(t,e){$.p(e)&&($.A(e)?(t.D=$.Ja(e,0),t.o=Os):(t.D=[],t.o=Number(e)||gca),t.f=t.b=null)},Us=function(t,e,i,n,s,a){var o=Math.min(t.length,e.length)-1;t[0]>t[o]&&(t=$.Ja(t,0).reverse(),e=$.Ja(e,0).reverse());for(var r=[],l=[],h=0;h<o;h++)r.push(Ss[i[h]||n](t[h],t[h+1])),l.push(Ts[s[h]||a](e[h],e[h+1]));return 1==o?function(t){return t=r[0](t),l[0](t)}:function(e){var i=$.Na(t,e,void 0);return 0>i&&(i=~i),i=$.Za(i,1,o)-1,e=r[i](e),l[i](e)}};Vs=function(t){$.V.call(this),this.scale=t,this.o=hca,this.i=ica,this.f=jca},Ws=function(t,e,i,n){e=Math.abs(i-e)/t.qn,i=t.f.length;for(var s=0;s<i;s++)if(e<=t.f[s])return n?t.o[s].clone():t.i[s].clone();return n?new $.En(yn,Math.ceil(e/31536e6)/4):new $.En(yn,Math.ceil(e/31536e6))},Xs=function(){$.V.call(this),this.Ga("defaultScaleSettings.linear"),this.cs=0,this.PD=!1,this.$B=1,this.cK=0,this.jY="none",this.iY="direct"},Ys=function(t,e,i){t.$B==e&&t.cK==i||(t.$B=e,t.cK=i,t.oN(),t.va(2))},Zs=function(t,e){return t.PD&&(e=1-e),e/t.$B+t.cK},$.dt=function(t,e){return $s(at[t],e?$.bt:ct)},$s=function(t,e){et||((et={})[ct]=$.ft,et[2]=$.gt,et[4]=$.ht,et[$.bt]=$.it,et[32]=function(){var t;return(t=$.eq.scales.linearColor)?t():$.il(4,null,["Color scales"])},et[16]=function(){var t;return(t=$.eq.scales.ordinalColor)?t():$.il(4,null,["Color scales"])});var i=et[t]||et[e]||null;return i&&i()||null},$.jt=function(t,e,i,n,s,a,o){var r=null;if(t!=e){n=n||15;var l,h=t?t.Ma():null,c=l=null;if($.z(e))var u=e||h;else $.J(e,Xs)?(u=e.Ma(),l=e):$.C(e)&&(u=e.type||h||i,c=e);(e=at[u])&n?(l||u==h||(l=$s(e,at[i]||null)),l&&(l.ka(),a&&(t&&$.kr(t,a,o),$.K(l,a,o)),l.va(4),r=t=l),t&&c&&(l||t.ka(),t.U(c),r=t)):s&&$.il(5,void 0,s)}return r},$.kt=function(){Xs.call(this),this.cl=window.NaN,this.dA=0,this.cA=1,this.Nn=this.Pn=this.DX=!0,this.BI=this.HI=.1,this.Lq=this.jt=this.max=this.min=window.NaN,this.Oq=null,this.GJ=this.Kc=!1},mt=function(t,e,i,n,s){return e=t+s*e,i&&0>=t*e?0:(n&&(t=$.Vm(e),i=+("1e-"+(Math.min($.Um(t),$.Um(e))+1)),t>e&&(t+=s*i),e=t),e)},$.nt=function(){$.kt.call(this),this.Ga("defaultScaleSettings.dateTime"),this.Di=this.xh=null},$.ht=function(){var t=new $.nt;return t.N(t.oa),t},pt=function(){$.V.call(this),this.f=this.b=null,this.i={UY:{},MS:{}};var t=$.Qo($.Ro());this.G=$.Ha(t.weekendRange),this.o=ot(this.G),this.D={}},ot=function(t){var e=t[1],i={};for(t=t[0];t<=e;t++)i[String((t+1)%7)]=!0;return i},qt=function(t,e,i,n){return i=kca.b(i),e.add(i),e=e.getTime(),n.push({from:t,to:e-1}),e},$.st=function(){$.V.call(this),this.Jo=this.Ko=this.Zm=this.$m=this.P6=this.Q6=this.Oh=this.Ph=this.Fj=this.Gj=this.Ze=this.$e=window.NaN,this.bm={value:.01,isPixels:!1},this.am={value:.01,isPixels:!1},this.LS=window.NaN,this.Kc=!1,this.sT=this.lM=window.NaN,this.jd=rt(lca),this.Qv=1,this.XG=0,this.cl=mca,this.Xq=this.je=null,this.eQ=this.gF=!1},tt=function(t){var e=new Date;return(0,window.isNaN)(t.lM)&&(t.lM=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),(0,window.isNaN)(t.sT)&&(t.sT=t.lM+864e5),{min:t.lM,max:t.sT}},$.ut=function(t,e,i){e=$.Xk(e),i=$.Xk(i),t.Ph==e&&t.Oh==i||(t.Ph=e,t.Oh=i,t.Gj=window.NaN,t.Fj=window.NaN,t.Kc=!1,t.pb(),t.va(4))},wt=function(t){var e=t.Xq.ob().width,i=$.vt(t.bm.value,e),n=$.vt(t.am.value,e),s=t.Oh-t.Ph;t.Gj=(0,window.isNaN)(t.$m)?(0,window.isNaN)(t.Ko)?Math.round(t.Ph-(Math.max(s*i/(e-i-n),0)||0)):Math.min(t.Ko,t.Ph):t.$m,t.Fj=(0,window.isNaN)(t.Zm)?(0,window.isNaN)(t.Jo)?Math.round(t.Oh+(Math.max(s*n/(e-i-n),0)||0)):Math.max(t.Jo,t.Oh):t.Zm},xt=function(t,e){var i=e?t.bm:t.am,n=e?t.am:t.bm,s=t.Xq.ob().width,a=t.Oh-t.Ph;n=a*n.value,s=(i=$.vt(i.value,s))*(a+n)/(s-i)||0,t.Gj=(0,window.isNaN)(t.$m)?(0,window.isNaN)(t.Ko)?e?t.Ph-s:t.Ph-n:Math.min(t.Ko,t.Ph):t.$m,t.Fj=(0,window.isNaN)(t.Zm)?(0,window.isNaN)(t.Jo)?e?t.Oh+n:t.Oh+s:Math.max(t.Jo,t.Oh):t.Zm},$.yt=function(t){if(t.Uj())return!0;var e=t.uj();return t.$e<=e.min},$.zt=function(t){if(t.Uj())return!0;var e=t.uj();return t.Ze>=e.max},rt=function(t){var e=[];if($.A(t)){for(var i=0;i<t.length;i++){var n=t[i];if($.A(n)){for(var s=[],a=0;a<n.length;a++){var o=n[a],r=null;if($.z(o)){r=$.Zk(o,null);var l=1}else $.C(o)&&(r=$.Zk(o.unit,null),l=$.P(o.count));r&&s.push({unit:r,count:l})}s.length&&e.push({range:$.tp(s[0].unit,s[0].count),levels:s})}}e.sort((function(t,e){return t.range-e.range}))}return e},$.vt=function(t,e){return 0<e?Math.max(Math.min(Math.floor(e/2)-1,t),0):0},$.At=function(t,e,i){var n=i.value;return i.isPixels?(i=t.Ze-t.$e,(0,window.isNaN)(i)?(t.BW=!0,.01*e):(t=t.Xq.ob().width,Math.round($.vt(n,t)*i/t)||0)):e*n},Bt=function(t,e){var i={value:0,isPixels:!!e};return $.p(t)&&("object"===$.ka(t)?(i.value=+t.value||0,i.isPixels=!!t.isPixels):i.value=+t||0),i},Ct=function(t,e){return t.value===e.value&&t.isPixels===e.isPixels},$.Dt=function(t){return!(!t.bm.isPixels&&!t.am.isPixels)},$.Et=function(t){$.Dt(t)&&!t.Uj()&&(t.Gj=window.NaN,t.Fj=window.NaN,t.Kc=!1)},$.Ft=function(t,e){if(t.pb(),$.z(e)){switch(e.toLowerCase()){case"current":(0,window.isNaN)(t.LS)&&(t.LS=(0,$.Ln)());var i=t.LS;break;case"start":i=t.Q6;break;case"end":i=t.P6}$.p(i)||(i=$.ps(e))}i=null!=i?i:$.Xk(e);var n=t.sj(),s=n.min;return(i-s)/(n.max-s)},$.Gt=function(t,e){var i=t.sj(),n=i.min;return Math.round(e*(i.max-n)+n)},$.Ht=function(t){t.pb();var e=t.sj();e=(e.max-e.min)/20;for(var i,n=t.jd.length-1,s=0;s<n;s++)if(e<=t.jd[s].range){i=t.jd[s];break}return i||(i=t.jd[n]),i.levels},$.It=function(t){$.V.call(this),this.qa=t},nca=function(t,e,i,n,s,a,o){function r(t){return 0>t?-l(-t+s-1):t?l(t+s-1):0}function l(t){return Ym(n,t)}var h=$.Xm(Math.abs(e),n),c=$.Xm(Math.abs(i),n),u=e*i,d=!1;return 0<u?0<e?(t=Jt(t,h,c,a,o),r=l,s=t.result[0]):(t=Jt(t,c,h,a,o),r=function(t){return-l(t)},d=!0,s=t.result[1]):t=0>u?Jt(t,-(h-(s-1)),c-(s-1),a,o):i?Jt(t,0,c-(s-1),a,o):Jt(t,-(h-(s-1)),0,a,o),t.Xa=(0,$.Wa)(t.Xa,r),t.result=(0,$.Wa)(t.result,r),d&&(t.Xa.reverse(),d=t.result[0],t.result[0]=t.result[1],t.result[1]=d,d=t.result[2],t.result[2]=t.result[3],t.result[3]=d),t.result[4]=s,t},Jt=function(t,e,i,n,s,a,o){o=o||0;var r=t.Jl,l=t.lh,h=t.qm,c=i-e;if(!(0,window.isNaN)(r)&&c/r>t.qa.an()&&($.kl(20,null,[c,r]),r=window.NaN,l=4,h=6),(0,window.isNaN)(r)){var u=window.NaN;for(t=window.NaN;l<=h;l++){var d=l-1;0==(u=$.Vm(c/d))&&(u=$.Vm(c/d,10));var p=Math.log(u);d=Math.pow(10,Math.floor(p*Math.LOG10E)),p=Math.pow(10,Math.ceil(p*Math.LOG10E));var g=$.Xm(u/p,2);d=[d,p,u<d+d?d/2:window.Infinity,Math.pow(2,Math.floor(g))*p,Math.pow(2,Math.ceil(g))*p],d=(0,$.Wa)(d,(function(t){return $.Po(u,t,0,10)||window.Infinity})),a||(d=(0,$.Wa)(d,(function(t){return(0,window.isFinite)(t)&&~~t==t?t:window.Infinity}))),(d=Math.min.apply(null,d))&&(0,window.isFinite)(d)?u=d:a||(u=Math.round(u)||1),d=$.Vm($.Oo(e,u,o))-e,d*=d,p=$.Vm($.Po(i,u,o))-i,d+=p*=p,((0,window.isNaN)(t)||d<t)&&(t=d,r=u)}}for((0,window.isNaN)(r)&&(r=.5),a=[e,i],h=[],c=$.Um(r),t=$.Vm($.Oo(e,r,o,c),c),n?a[0]=e=t:1e-7<e-t&&(h.push(e),a[2]=t),n=$.Vm($.Po(i,r,o,c),c),s?a[1]=i=n:1e-7<n-i&&(a[3]=n),e=$.Vm($.Po(e,r,o,c),c);e<=i;e=$.Vm(e+r,c))h.push(e);return 3 in a&&h.push(i),{Xa:h,result:a}},Kt=function(t,e,i,n,s,a,o){a=a||[],i=$.Tm(i,7);var r=0;if(o&&i<=t.Vc)for(o=t=$.Tm(i,7);o>=e&&(s!=o&&$.Da(a,o),!r||t!=o);o=$.Tm(o-n,7))r++;else for(o=t=$.Tm(e,7);o<=i&&(s!=o&&a.push(o),!r||t!=o);o=$.Tm(o+n,7))r++;return a},Lt=function(t,e,i,n){return t=t.Jl,(0,window.isNaN)(t)&&(t=(i-e)/(n-1)),Math.max(t,1e-7)},$.Mt=function(){$.kt.call(this),this.Ga("defaultScaleSettings.linear"),this.Di=this.xh=null,this.gS=!0,this.yw=10,this.GJ=!0,this.SK=this.L3},$.ft=function(){var t=new $.Mt;return t.N(t.oa),t},Nt=function(){$.Mt.call(this),this.Ga("defaultScaleSettings.log")},$.gt=function(){var t=new Nt;return t.N(t.oa),t.Xa().N(t.Xa().oa),t.yb().N(t.yb().oa),t},$.Ot=function(t){$.V.call(this),this.scale=t},$.Pt=function(t){t.Iz=null,t.Dx=null,t.Ok=null},$.Qt=function(){this.ih=[],this.Wf=[],this.Or=[],this.Ww=[],this.oz=[],this.WR=!0,this.XB={},this.s4=null,this.UF=!0,this.mb=null,Xs.call(this),this.Ga("defaultScaleSettings.ordinal")},$.Rt=function(t,e){null===e?t.Or.length=0:$.A(e)&&(t.Or=$.Ha(e)),t.Px()||(t.Or.length=0),t.Ww.length=0,t.oz.length=0,$.Pt(t.Xa()),t.va(2)},$.St=function(t){if(!t.oz||t.oz.length!=t.ih.length){var e,i=t.MY(),n=0;for(e in i)n+=i[e];for(t.oz=i.map((function(t){return t/n})),t.YJ=[0],i=0;i<t.oz.length;i++)t.YJ.push(t.oz[i]+t.YJ[i])}return t.oz},$.Tt=function(t){return $.A(t.Wf)?null:t.Wf},$.it=function(){var t=new $.Qt;return t.N(t.oa),t},Ut=function(){this.Zc=[]},Vt=function(t){this.Ld=t,this.f=[-1],this.b=void 0,this.D=this.V0,this.i=this.Y0,this.o=-1},Wt=function(t,e){if(!e.length||!t.f.length)return null;var i=e[++t.f[t.f.length-1]];if(!i)return t.f.pop(),Wt(t,Xt(t));var n=e;return i.bc()&&t.i(i)&&(t.f.push(-1),n=i.Uv()),t.D(i)?i:Wt(t,n)},Xt=function(t){var e=t.Ld.Uv();if(t.o=0,1<t.f.length)for(var i=0;i<t.f.length-1;i++)e=e[t.f[i]],t.o=i+1,e=e.Uv();return e},$.Yt=function(t,e){$.V.call(this),this.Ld=t,this.Zc=e,this.Ld.wa("treeItemMove",this.oO,!1,this),this.Ld.wa("treeItemUpdate",this.oO,!1,this),this.Ld.wa("treeItemCreate",this.oO,!1,this),this.Ld.wa("treeItemRemove",this.oO,!1,this),$.K(this.Ld,this.oja,this)},$.$t=function(t,e,i){this.Su=t,this.ee=i,this.Tk=e,this.Ci={},this.uid=++Zt},$.au=function(t,e,i,n){$.V.call(this),this.Zc=n||{},this.Iq=[],this.Ad={},this.dI={},this.QH={},this.WS=this.aw(),this.Ru=null,this.$C=!0,this.DS("id",!0),t&&this.Yr(t,e,i)},$.cu=function(t){var e=new $.au;if(e.ka(),"rootMapping"in t&&(e.Zc=t.rootMapping),"index"in t)for(var i=t.index,n=0,s=i.length;n<s;n++)e.DS(i[n]);if("children"in t)for(n=0,s=(i=t.children).length;n<s;n++)e.hc(bu(e,i[n]));return e.da(!1),"mapping"in t?e.Yd(t.mapping):e},gu=function(t,e){var i=new $.du(t,e),n=e[t.Zc[eu.yx]||eu.yx];if(n)for(var s=0,a=n.length;s<a;s++)fu(i,gu(t,n[s]));return i},hu=function(t,e,i,n){if(i){if(n)for(var s=e.bc();s--;)hu(t,e.xd(s),i,n);(n=t.Ad[i])&&(s=e.get(i),t.dI[i]&&(s=String(s)),t=$.Na(n,s,t.QH[i]),i={key:s,value:e},0>t?$.Da(n,i,~t):(t=n[t],$.A(t.value)?$.Ba(t.value,e):t.value!=e&&(t.value=[t.value],t.value.push(e))))}else for(s in t.Ad)hu(t,e,s,n)},iu=function(t,e,i,n){if(i){if(n)for(var s=e.bc();s--;)iu(t,e.xd(s),i,n);(n=t.Ad[i])&&(s=e.get(i),t.dI[i]&&(s=String(s)),e.get(i),(n=n[s=$.Na(n,s,t.QH[i])])&&($.A(n.value)&&1<n.value.length?$.Fa(n.value,e):Ea(t.Ad[i],s)))}else for(s in t.Ad)iu(t,e,s,n)},ju=function(t,e){hu(t,e),e.j("nc",!0);for(var i=0;i<e.bc();i++)ju(t,e.xd(i))},ku=function(t){return function(e,i){return t(e,i.key)}},$.du=function(t,e){this.Ld=t,this.Y=null,this.b=[],this.Ci={};var i=$.Qc(e);delete i[this.Ld.Zc[eu.yx]||eu.yx],delete i[this.Ld.Zc[eu.eC]||eu.eC],this.la=i,this.f={},this.uid=++Zt},bu=function(t,e){var i=new $.du(t,"treeDataItemData"in e?e.treeDataItemData:{});if("treeDataItemMeta"in e){var n,s=e.treeDataItemMeta;for(n in s)i.j(n,s[n])}if(s=e[t.Zc[eu.yx]||eu.yx],$.A(s))for(n=0;n<s.length;n++){var a=bu(t,s[n]);i.hc(a)}return i},lu=function(t){null!=t.Y&&(t.Y=null,t.Ld.va(16))},fu=function(t,e){$.Da(t.b,e,t.bc()),e.Y=t},mu=function(t,e){t.Ld=e;for(var i=0,n=t.bc();i<n;i++)mu(t.b[i],e)},nu=function(t,e){var i=String($.oa(e));if(i in t.f)return t.f[i][1];var n=null===t.getParent()?null:nu(t.getParent(),e);return n=new $.$t(e,t,n),t.f[i]=[e,n],n},$.ou=function(t,e,i,n){return new $.au(t,e,i,n)},pu=function(t,e,i,n,s,a,o){var r=$.Qc(e.treeDataItemData);for(var l in $.p(r.id)||(t.uW++,t.LH=-1),r.parent=[t.Py,a,o],a=t.Py++,i.push(r),r)l in n||(n[l]=s++);if((e=e.children)&&e.length)for(o=0,l=e.length;o<l;o++)pu(t,e[o],i,n,s,a,r.id)},$.qu=function(t,e){if(!t)return"";var i,n=t.F().children,s=[],a={},o={LH:1,uW:0,Py:0};for(a.id=0,a.parent=1,i=0;i<n.length;i++)pu(o,n[i],s,a,2,null,null);for(r in o.uW===o.Py?o.LH=0:0===o.uW&&(o.LH=1),n=[],a)n[a[r]]=r;var r=[];for(0>o.LH&&(a.__original_id__=n.length,a.__original_parent__=n.length+1,n.push("__original_id__","__original_parent__")),i=0;i<s.length;i++){var l=Array(n.length),h=s[i],c=h.parent;if(0>=o.LH)var u=c[0],d=c[1];else u=h.id,d=c[2];for(a=0;a<n.length;a++){var p=n[a],g=$.C(h[p])?co(h[p]):h[p];l[a]="id"===p?u:"parent"===p?null===d?void 0:d:"__original_parent__"===p?c[2]:"__original_id__"===p?h.id:g}r.push(l)}return $.kp(n,r,e)},$.Y=function(){$.V.call(this),this.wc=new nf(this),this.WE=this.oa.enabled=!0,this.B(4294967295)},$.ru=function(t,e,i,n,s,a,o,r){e.tag=t,t.wc.wa(e,"click",s||t.oh),t.wc.wa(e,"dblclick",t.oh),t.wc.wa(e,"mouseover",i||t.oh),t.wc.wa(e,"mouseout",n||t.oh),t.wc.wa(e,"mousedown",o||t.oh),t.wc.wa(e,"mouseup",r||t.oh),t.wc.wa(e,"mousemove",a||t.oh),t.wc.wa(e,"touchstart",t.oh),t.wc.wa(e,"touchend",t.oh),t.wc.wa(e,"touchcancel",t.oh),t.wc.wa(e,"touchmove",t.oh),t.wc.wa(e,"contextmenu",t.oh)},$.su=function(t,e,i,n,s,a,o,r){t.wc.wa(e,"click",s||o||t.Ih),t.wc.wa(e,"dblclick",o||t.Ih),t.wc.wa(e,"mouseover",i||o||t.Ih),t.wc.wa(e,"mouseout",n||o||t.Ih),t.wc.wa(e,"mousedown",r||o||t.Ih),t.wc.wa(e,"mouseup",o||t.Ih),t.wc.wa(e,"mousemove",a||o||t.Ih),t.wc.wa(e,"touchstart",o||t.Ih),t.wc.wa(e,"touchend",o||t.Ih),t.wc.wa(e,"touchcancel",o||t.Ih),t.wc.wa(e,"touchmove",o||t.Ih),t.wc.wa(e,"contextmenu",o||t.Ih)},$.tu=function(t,e,i,n){$.V.call(this),arguments.length&&this.set.apply(this,arguments)},uu=function(t,e,i){return null===t.Ew||(e=Math.max(e,$.L(t.Ew,i))),null===t.Bw||(e=Math.min(e,$.L(t.Bw,i))),e},vu=function(t,e,i){return null===t.Fw||(e=Math.max(e,$.L(t.Fw,i))),null===t.Dw||(e=Math.min(e,$.L(t.Dw,i))),e},$.wu=function(){$.Y.call(this)},$.xu=function(t,e){function i(){this.uo()}function n(){Rp(this.W,this)}t.prototype.W=function(){e.prototype.W.call(this);var t=this.O();return(t=t?t.Ja():null)&&(this.gr()?t.wa("stageresize",i,!1,this):t.gc("stageresize",i,!1,this)),$.K(this,n,this),this}},$.yu=function(){$.Y.call(this),this.WC=this.Ga($.ur.background),this.P=!0,this.Xb=this.Y=null,$.T(this.ua,[["fill",16],["stroke",20],["topStroke",20],["rightStroke",20],["bottomStroke",20],["leftStroke",20],["disablePointerEvents",64],["cornerType",4]])},zu=function(t,e,i,n){return t=t.xS(),$.L(4>t.length?t[0]:t[e],Math.min(n,i))||0},Au=function(t,e,i,n,s,a,o){switch(t.g("cornerType")){case"round":e.Ff(s,a,o,o,!1,!0);break;case"round-inner":e.Ff(s,a,o,o,!1,!1);break;case"cut":e.lineTo(s,a);break;default:e.lineTo(i,n).lineTo(s,a)}},Bu=function(){$.yu.call(this)},Cu=function(){this.P=$.mg(),this.kc="",this.f={},this.b=0},Du=function(t,e){return null!=e&&t.length>e?t.slice(0,e)+"...":t},Eu=function(t,e,i,n){$.V.call(this),this.Xb=this.Y=null,($.p(t)||$.p(e)||$.p(i)||$.p(n))&&this.set.apply(this,arguments),$.T(this.ua,[["left"],["top"],["bottom"],["right"]])},$.Gm=function(t){var e=arguments[0],i=arguments[1],n=arguments[2],s=arguments[3];if($.A(e)){var a=e;e=a[0],i=a[1],n=a[2],s=a[3],a=a.length}else a=arguments.length;if(!a)return{};if("object"==$.ka(e))var o=e.top||0,r=e.right||0,l=e.bottom||0,h=e.left||0;else 1==a?h=l=r=o=e||0:2==a?(l=o=e||0,h=r=i||0):3==a?(o=e||0,h=r=i||0,l=n||0):4<=a&&(o=e||0,r=i||0,l=n||0,h=s||0);return{top:o,left:h,bottom:l,right:r}},Gu=function(t,e){for(var i in Fu){var n=e[i];$.p(n)&&(t.oa[i]=n)}},$.Hu=function(t,e,i,n){Eu.call(this,t,e,i,n)},$.Ku=function(t,e){var i=e.top||0,n=e.left||0,s=Iu(t.height,i,e.bottom||0),a=Ju(t.width,n,e.right||0);return n=$.L(n,a),i=$.L(i,s),new $.I(t.left-n,t.top-i,a,s)},Iu=function(t,e,i){var n=1;return $.uo(e)?n-=(0,window.parseFloat)(e)/100:t+=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n-=(0,window.parseFloat)(i)/100:t+=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},Ju=function(t,e,i){var n=1;return $.uo(e)?n-=(0,window.parseFloat)(e)/100:t+=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n-=(0,window.parseFloat)(i)/100:t+=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},$.Lu=function(){this.b={}},oca=function(t){function e(t,e,i){if("%_message"==t)return $.qs(e&&e.key||"");var n="%"==t.charAt(0)?t.substr(1):t,s=n.toLowerCase(),a=i.pc.Im[t],o=i.pc.Dl[a]||i.pc.values[a]||i.pc.Dl[t]||i.pc.values[t]||i.pc.Dl[n]||i.pc.values[n];if(o)s=o.value;else{t:{for(var r in i.pc.Dl)if(i.pc.Dl.hasOwnProperty(r)&&r.toLowerCase()==s){o=i.pc.Dl[r].value;break t}for(r in i.pc.values)if(i.pc.values.hasOwnProperty(r)&&r.toLowerCase()==s){o=i.pc.values[r].value;break t}o=void 0}$.p(o)?s=o:(n=a&&i.getData(a)||i.getData(n),s=$.p(n)?n:i.Rg(s))}if(e&&"true"===e.localized&&(s=$.qs(s)),!$.p(s))return"";if(e=e||{},n=$.p(e.dateTimeFormat)||$.p(e.timeZone),e.type&&(e.type=fp(e.type)),!(a=g[String(e.type).toLowerCase()])){if(n)i="date-time";else{if(n=(a="%"==t.charAt(0)?t.substr(1):t).toLowerCase(),o=i.pc.Im[t],a=(t=i.pc.Dl[o]||i.pc.values[o]||i.pc.Dl[t]||i.pc.values[t]||i.pc.Dl[a]||i.pc.values[a]||i.pc.Dl[n]||i.pc.values[n])&&$.p(t.type)?t.type:"string",!t&&i.pc.Li.length)switch(n){case Mu.woa:case Mu.Hoa:case Mu.Y7:case Mu.Z7:case Mu.c8:case Mu.D9:case Mu.E9:case Mu.H9:case Mu.I9:case Mu.Q9:case Mu.C9:case Mu.M9:case Mu.O9:case Mu.x9:case Mu.y9:case Mu.L9:case Mu.z9:case Mu.T9:case Mu.N9:case Mu.A9:case Mu.V9:case Mu.P9:case Mu.B9:case Mu.W9:case Mu.X9:case Mu.Y9:case Mu.A7:case Mu.s7:case Mu.t7:case Mu.u7:case Mu.w7:case Mu.x7:case Mu.z7:case Mu.U7:case Mu.O7:case Mu.S7:case Mu.T7:case Mu.L7:case Mu.M7:case Mu.R7:case Mu.N7:case Mu.QQ:case Mu.H$:case Mu.K8:case Mu.X8:case Mu.OPEN:case Mu.E7:case Mu.D$:case Mu.n7:case Mu.P8:case Mu.o9:case Mu.n9:case Mu.oZ:case Mu.Z9:case Mu.S9:case Mu.U9:case Mu.R9:case Mu.K9:case Mu.J9:case Mu.d8:case Mu.W7:case Mu.X7:case Mu.V7:case Mu.P7:case Mu.Q7:case Mu.o7:case Mu.p7:case Mu.q7:case Mu.v7:case Mu.y7:case Mu.E$:case Mu.F$:case Mu.G$:case Mu.B$:case Mu.C$:case Mu.l9:a="number"}i=a}a=i}switch(a){case"":return"";case"string":return String(s);case"date-time":return $.us(s,e.dateTimeFormat,e.timeZone);case"date":return $.vs(s,e.timeZone);case"time":return ws(s,e.timeZone);case"number":return $.Bs(s,e.decimalsCount,e.decimalPoint,e.groupsSeparator,e.scale,e.zeroFillDecimals,e.scaleSuffixSeparator,e.useBracketsForNegative);case"percent":return $.zo($.Tm(100*s,2))}}function i(t){return t}function n(t,i){var n,s=h,a=[];for(n in s)if(s.hasOwnProperty(n)){var o=fp(n);o!=n&&(s[o]=s[n],a.push(n))}for(n=a.length;n--;)delete s[a[n]];!function(t){var e,i,n=[];for(i in t)if(t.hasOwnProperty(i)){var s=t[i];if(i in d){var a=d[i];if("number"==a&&(s=$.N(s)),"boolean"==a&&(s=u[fp(s).toLowerCase()],s="useNegativeSign"==i?!s:s),"scale"==a){var o=fp(s);if(o in u)s=u[o];else{s={},o=o.split("|");var r=function(t,e){return 0!=e%2};a=(0,$.Ye)(o[0].split(/\(([ \w\+\-]*)\)/),r),o=(0,$.Ye)(o[1].split(/\(([^\)]*)\)/),r);var l=(a=(0,$.Wa)(a,(function(t){return+t})))[0];for(r=[l],e=1;e<a.length;e++)l*=a[e],r.push(l);r.length!=o.length&&(a=Math.min(r.length,o.length),r.length=a,o.length=a),r.reverse(),o.reverse(),s.factors=r,s.suffixes=o}}}a=i,i in p&&p[i]&&(a=p[i])!=i&&n.push(i),t[a]=s}for(e=n.length;e--;)delete t[n[e]]}(h),c.push($.qa(e,t,i))}function s(t){c.push($.qa(i,t))}for(var a,o,r,l,h,c=[],u={true:!0,false:!1},d={numDecimals:"number",decimalsCount:"number",useNegativeSign:"boolean",useBracketsForNegative:"boolean",leadingZeros:"number",trailingZeros:"boolean",zeroFillDecimals:"boolean",scale:"scale"},p={numDecimals:"decimalsCount",decimalSeparator:"decimalPoint",thousandsSeparator:"groupsSeparator",useNegativeSign:"useBracketsForNegative",trailingZeros:"zeroFillDecimals"},g={number:"number",string:"string",datetime:"date-time",date:"date",time:"time",percent:"percent"},f=t.length,b=0,v="",m=!1,y=0;y<f;y++)switch(a=t.charAt(y),b){case 0:"{"==a?b=1:v+=a;break;case 1:"%"==a?(0<v.length&&s(v),v="%",b=2):(v+="{"+a,b=0);break;case 2:"}"==a?1<v.length?(o=v,v="",b=3):(v="{%}",b=0):v+=a;break;case 3:"{"==a?b=4:(n(o,null),v=a,b=0);break;case 4:"%"==a?(n(o,null),v="%",b=2):(r="{"+a,v=a,b=l="",h={},m="\\"==a,b=5);break;case 5:r+=a,m?(v+=a,m=!1):"\\"==a?m=!0:":"==a?(l=v,v="",b=6):"}"==a?(l=fp(v),h[l]="",n(o,h),r=v=b=l="",b=0):v+=a;break;case 6:r+=a,m?(v+=a,m=!1):"\\"==a?m=!0:","==a?(b=v,h[l]=b,b=l=v="",b=5):"}"==a?(b=v,h[l]=b,n(o,h),r=v=b=l="",b=0):v+=a}switch(b){case 0:0<v.length&&s(v);break;case 1:s("{");break;case 2:s("{"+v);break;case 3:n(o,null);break;case 4:n(o,null),s("{");break;case 5:case 6:s(r)}return c},$.Nu=function(t,e){if(!t.b[e]){var i=oca(e);t.b[e]=function(t){return(0,$.Wa)(i,(function(e){return e(t)})).join("")}}return t.b[e]},$.Pu=function(t){this.ka(),$.Y.call(this),t||(this.WC=this.Ga($.ur.labelsFactory)),delete this.oa.enabled,this.wb=null,this.TX="background padding height width offsetY offsetX position anchor rotation format positionFormatter minFontSize maxFontSize maxLength clip connectorStroke adjustFontSize useHtml fontSize fontWeight fontFamily fontColor textDirection textShadow wordWrap wordBreak fontOpacity fontDecoration fontStyle fontVariant letterSpacing lineHeight textIndent vAlign hAlign textOverflow selectable disablePointerEvents".split(" "),this.Nd={},$.Ou(this,"different"),this.da(!1),$.Eq(this.ua,20,20,9,1),$.T(this.ua,[["format",20,9],["positionFormatter",4,9],["position",20,9],["anchor",4,9],["offsetX",4,9],["offsetY",4,9],["connectorStroke",512,1],["rotation",4,9],["width",4,9],["height",4,9],["clip",256,1]])},Qu=function(t){return"auto"==(t=$.Dk(t,"auto"))&&(t=void 0),t},$.Ou=function(t,e){return $.p(e)?(e=$.zk(pca,e,"different"),t.aa!=e&&(t.aa=e,t.jC()&&t.B(4,9)),t):t.aa},Ru=function(t){t.Ia&&(t.Pa.background=t.Ia.Pa),t.Wa&&(t.Pa.padding=t.Wa.Pa)},qca=function(t){(0,$.Pe)(t.Da,(function(t){t&&t.xb&&!Su(t)&&t.xb.rb()}),t)},$.Xu=function(t,e,i,n,s){var a=new $.I(0,0,0,0),o=t.ja();if(o)var r=o.width,l=o.height;if($.J(e,$.Tu)&&!n){var h=e,c=h.Rh(),u=h.Hf();e=i||h.jc()||{value:{x:0,y:0}};var d=$.Uu(h);(o=Vu(h,(function(t,e){var i=$.J(e,$.Pu)?e.ja():e.ja;if(i)return i})))&&(r=o.width,l=o.height);var p=d.useHtml,g=d.width,f=d.height;n=d.offsetY,i=d.offsetX;var b=d.anchor,v=d.format,m=d.padding;c.style(d)}else t.b?t.b.clear():(t.b=t.vL(),t.b.hp=t),t.K||(t.K=$.sk(),t.K.Cd("aria-hidden","true")),h=t.b,c=t.K,$.J(e,$.Tu)?(t.b.N($.Uu(e)),u=e.Hf(),e=i||e.jc()||{value:{x:0,y:0}}):(u=e,e=i||{value:{x:0,y:0}}),t.b.N(n),p=$.p(h.g("useHtml"))?h.g("useHtml"):t.g("useHtml"),m=($.Jc(h.Pa.padding)&&$.Jc(h.oa.padding)?void 0:h.padding())||t.Wa||null,g=$.p(h.g("width"))?h.g("width"):t.g("width"),f=$.p(h.g("height"))?h.g("height"):t.g("height"),n=h.g("offsetY")||t.g("offsetY")||0,i=h.g("offsetX")||t.g("offsetX")||0,b=h.g("anchor")||t.g("anchor"),v=h.g("format")||t.g("format"),h.bi(c,!0,t.oa),h.bi.call(t,c,!1),h.bi(c,!1);if($.J(m,$.Hu)||(m=t.padding()),s=$.Wu(t,v,u,s),s=h.VK(s),c.width(null),c.height(null),p?c.htmlText(null!=s?String(s):null):c.text(null!=s?String(s):null),u=null!==g,h=null!==f,s=c.rb(),u){r=Math.ceil($.L(g,r));var y=m?m.Ng(r):r;a.width=r}else r=s.width,a.width=m?m.Lk(r):r;if($.p(y)&&c.width(y),s=c.rb(),h){y=Math.ceil($.L(f,l));var S=m?m.Yh(y):y;a.height=y}else y=s.height,a.height=m?m.$j(y):y;return $.p(S)&&c.height(S),S=$.Qc(t.g("positionFormatter").call(e,e)),t.S1(a,S,o,i,n,b)},$.Wu=function(t,e,i,n){if($.z(e)&&(e=$.Nu($.Lu.Id(),e)),t.i||(t.i={}),null!=n){if(!$.p(t.i[n])){if($.p(i)&&i.series){var s=i.series.$();$.D(s.select)&&s.select($.p(i.index)?i.index:n)}t.i[n]=e.call(i,i)}return t.i[n]}return e.call(i,i)},$.Yu=function(t,e){$.p(e)?t.i&&$.p(t.i[e])&&delete t.i[e]:t.i={}},$.Tu=function(){$.Y.call(this),delete this.oa.enabled,this.lx={},this.Nd={},this.ea="pointState seriesState chartState pointNormal seriesNormal chartNormal seriesStateTheme chartStateTheme auto seriesNormalTheme chartNormalTheme".split(" "),this.P=$.Ja(this.ea,0),this.xr=!0,this.Hi(),this.I(1024),$.Eq(this.ua,20,20,9,1),$.T(this.ua,[["format",1044,9],["positionFormatter",4,9],["position",4,9],["anchor",4,9],["offsetX",4,9],["offsetY",4,9],["connectorStroke",512,1],["rotation",4,9],["width",4,9],["height",4,9],["clip",256,1],["enabled",1,9]])},$.Zu=function(t,e){return null!=e?(t.state("seriesNormal")!=e&&(t.hp=e,t.state("seriesNormal",e),t.state("seriesNormalTheme",e?e.oa:null),t.B(16,1)),t):t.state("seriesNormal")},$.$u=function(t,e){return $.p(e)?(t.state("seriesState")!=e&&(t.state("seriesState",e),t.state("seriesStateTheme",e?e.oa:null),t.B(16,1)),t):t.state("seriesState")},av=function(t){return t.P||(t.P=$.Ja(t.ea,0))},$.bv=function(t,e,i){var n=!1,s=av(t);$.p(i)&&$.z(e)?(i=$.N(i),(t=(0,$.za)(s,e))!=i&&(i=(0,window.isNaN)(i)?s.length-1:i,s.length<=i&&(s.length=i+1),-1!=t&&delete s[t],s[i]=e)):($.A(e)?(t.P=$.Ja(e,0),n=!0):null===e&&(t.P=$.Ja(t.ea,0),n=!0),n&&t.B(17,9))},cv=function(t,e){return Vu(t,(function(t,i){if(($.J(i,$.Tu)||$.J(i,$.Pu))&&i.J(e))return!0}))||t.J(e)},dv=function(t,e){if($.p(e)){var i=!!e;return t.Nd.vertical!==i&&(t.Nd.vertical=i,$.p(t.Nd.vertical)||t.B(16,8)),t}return t.Nd.vertical},ev=function(t){t.Ia&&(t.Pa.background=t.Ia.Pa),t.Wa&&(t.Pa.padding=t.Wa.Pa)},Vu=function(t,e,i,n){var s=void 0,a=av(t);return $.va(a,(function(t,a){var o=$.z(t)?"auto"==t?this.Nd:this.lx[t]:t;o&&(o=e.call(this,t,o,a,i,n),$.p(o)&&("object"==$.ka(o)?null!=s?$.Sc(s,o):s=$.Qc(o):s=o))}),t),s},rca=function(t,e,i,n,s){if($.J(e,$.Tu)||$.J(e,$.Pu))if("enabled"==n)var a=null===(t=e[n]())?void 0:t;else a=e.xA(n);else"object"==$.ka(e)&&("adjustFontSize"==n?(e=e[n],$.p(e)?$.A(e)?(t=e[0],e=e[1]):$.C(e)?(t=e.width,e=e.height):(t=!!e,e=!!e):e=t=void 0,a={width:t,height:e}):"padding"==n&&$.ea(e[n])?a=$.Gm(e[n]):(a=e[n],"enabled"==n&&null===a&&(a=void 0)));return a&&$.D(a.F)&&(a=a.F()),s&&$.p(a)&&(a=s(a)),a},fv=function(t,e,i){return Vu(t,rca,e,i)},$.Uu=function(t){var e=av(t);if(1==e.length&&(e=e[0],t.b=$.z(e)?t.lx[e]:e),t.b)return $.Qc(t.b);for(var i={},n=0,s=(e=t.hp.TX).length;n<s;n++){var a=e[n],o=t.ic(a);"adjustFontSize"==a?(i.adjustByWidth=o.width,i.adjustByHeight=o.height):i[a]=o}return t.b=i,$.Qc(t.b)},$.iv=function(t,e,i,n,s,a,o){var r=sca(t);return t=$.Va(n,s+1),0>(n=$.Oa(t,(function(t){r.fontSize(t);var n=r.rb();return t=n.width,n=n.height,a&&t>e||o&&n>i?-1:a&&t==e||o&&n==i?0:1})))&&(n=~n-1),t[$.Za(n,0,t.length)]},sca=function(t){var e=$.Uu(t),i=e.useHtml,n=t.Hf();return t.J(1024)&&($.Yu(t.hp,t.ma()),t.I(1024)),e=t.tk(e.format,n,t.ma()),t.Rv||(t.Rv=$.sk(),t.Rv.Cd("aria-hidden","true")),i?t.Rv.htmlText($.p(e)?String(e):""):t.Rv.text($.p(e)?String(e):""),Vu(t,(function(t,e,i){t=0==i,$.J(e,$.Pu)||$.J(e,$.Tu)?this.bi.call(e,this.Rv,t):this.bi(this.Rv,t,e)})),t.Rv},Su=function(t){if($.da(t.xr))return t.xr;var e=$.Uu(t),i=null!==e.width,n=null!==e.height,s=e.useHtml,a=!!t.xb&&!!t.xb.path();return t=String(t.tk(e.format,t.Hf(),t.ma())),1!=(t=$.hc(ic(t))).split(/\n/g).length||i||n||s||a},jv=function(t){var e=Su(t),i=$.J(t.xb,Cu),n=$.J(t.xb,$.Qh);return!t.xb||e&&i||!e&&n},kv=function(){$.Pu.call(this)},lv=function(){$.Tu.call(this)},mv=function(t,e,i){this.pc={values:t||{},lg:e||null,Li:i||[],Im:{},Dl:{}},this.pc.Im["%Value"]="value",this.pc.Im["%YValue"]="value",this.pc.Im["%Index"]="index"},$.nv=function(t){return $.p(void 0)?(t.pc.values=void 0,t):t.pc.values},$.ov=function(t,e){var i;if($.p(e)){for(i in t)t.hasOwnProperty(i)&&!$.D(t[i])&&t[i]!=t.pc&&delete t[i];t.pc.values=e}for(i in t.pc.values)t[i]=t.pc.values[i].value;return t},$.pv=function(t){$.V.call(this),this.b=t},qv=function(t){this.pa=t,$.V.call(this)},rv=function(t,e,i){var n=t.pa.O()?t.pa.O().Ja().Xo():null;return n?$.p(i)?(n[e](i),t):n[e]():$.p(i)?(t[e+"_"]!==i&&(t[e+"_"]=i),t.B(16,2),t):t[e+"_"]},sv=function(t){var e={},i=t.text_,n=t.url_,s=t.alt_,a=t.imgAlt_,o=t.logoSrc_;return t=t.enabled_,$.p(i)&&(e.text=i),$.p(n)&&(e.url=n),$.p(s)&&(e.alt=s),$.p(a)&&(e.imgAlt=a),$.p(o)&&(e.logoSrc=o),$.p(t)&&(e.enabled=t),e},tv=function(){$.Y.call(this),this.Y=null,this.Uc={},this.Xb=null,$.T(this.ua,[["fontSize",20,9],["fontFamily",20,9],["fontColor",16,1],["fontOpacity",16,1],["fontDecoration",20,9],["fontStyle",20,9],["fontVariant",20,9],["fontWeight",20,9],["letterSpacing",20,9],["textDirection",20,9],["lineHeight",20,9],["textIndent",20,9],["textShadow",16,1],["vAlign",20,9],["hAlign",20,9],["wordWrap",20,9],["wordBreak",20,9],["textOverflow",20,9],["selectable",16,1],["disablePointerEvents",16,1],["useHtml",20,9]])},uv=function(){tv.call(this),this.Ia=null,this.K=void 0,this.xb=this.Wa=null,this.Oa=$.ok(),$.ru(this,this.Oa),$.T(this.ua,[["text",20,9],["position",4,9],["width",4,9],["height",4,9],["anchor",4,9],["offsetX",4,9],["offsetY",4,9],["rotation",4,9],["adjustFontSize",4,9],["minFontSize",0,0,0,this.ea],["maxFontSize",0,0,0,this.ea]]),this.ua.disablePointerEvents.g0=function(){this.background().disablePointerEvents(this.nd("disablePointerEvents"))}},vv=function(t){var e,i=t.ja(),n=t.g("width"),s=t.g("height"),a=t.Z1();i&&a?(null!=n?(t.Oi=n=$.L(n,a.width),i=!1):(n=0,i=!0),null!=s?(t.Ni=e=$.L(s,a.height),a=!1):(e=0,a=!0)):($.Do(n)?(i=!0,n=0):(i=!1,t.Oi=n=$.N(n)),$.Do(s)?(a=!0,e=0):(a=!1,t.Ni=e=$.N(s))),s=t.padding(),t.xb.width(null),t.xb.height(null),i?(n+=t.xb.rb().width,t.nn=n,t.Oi=s.Lk(n)):n=t.nn=s.Ng(n),t.xb.width(t.nn),a?(e+=t.xb.rb().height,t.ln=e,t.Ni=s.$j(e)):e=t.ln=s.Yh(e),t.xb.height(t.ln);var o=!i,r=!a,l=t.g("adjustFontSize");o=l&&(o&&l.width||r&&l.height),t.ka(),o?(n=t.dS(n,e),t.fontSize(n),t.xb.fontSize(n),i&&(t.xb.width(null),t.nn=t.xb.rb().width,t.xb.width(t.nn),t.Oi=s.Lk(t.nn)),a&&(t.xb.height(null),t.ln=t.xb.rb().height,t.xb.height(t.ln),t.Ni=s.$j(t.ln))):l&&(l.width||l.height)&&(t.fontSize(t.g("minFontSize")),t.xb.fontSize(t.g("minFontSize")),i&&(t.xb.width(null),t.nn=t.xb.rb().width,t.xb.width(t.nn),t.Oi=s.Lk(t.nn)),a&&(t.xb.height(null),t.ln=t.xb.rb().height,t.xb.height(t.ln),t.Ni=s.$j(t.ln))),t.da(!1),t.Lg=$.L(s.g("left"),t.Oi),t.Mg=$.L(s.g("top"),t.Ni)},wv=function(t){var e;return(e=!t.xb)&&(t.xb=$.sk(),t.xb.Cd("aria-hidden","true")),e},$.xv=function(){uv.call(this),$.T(this.ua,[["visible",128,1]]),this.oa.visible=!0},yv=function(){$.xv.call(this)},zv=function(){function t(){this.Zy=!0}function e(){this.$b=null}tv.call(this),this.Ga($.ur.legendItem),this.wb=$.ok(),this.ad=this.wb.text(),this.ad.Cd("aria-hidden","true"),this.YW=this.ZW=null,this.SF=window.NaN,this.p4={line:"black",spline:"black","step-line":"black",ohlc:"black",candlestick:"black"},this.xka={line:!0,spline:!0,"step-line":!0,ohlc:!0},this.ZC={iconStroke:"#999",iconFill:"#999",iconHatchFill:"none",iconMarkerStroke:"#999",iconMarkerFill:"#999",fontColor:"#999"},$.T(this.ua,[["text",20,9],["x",4,9,0,e],["y",4,9,0,e],["iconType",16,1,0,t],["iconTextSpacing",4,9,0,e],["maxWidth",4,9,0,e],["maxHeight",4,9,0,e],["iconFill",17,0,t],["iconStroke",16,1,0,t],["iconHatchFill",16,1,0,t]]),this.UK()},Bv=function(t,e,i){t.$l?t.$l.clear():t.$l=e.parent().path(),t.jw&&(Av(t,t.za),e=t.jw,($.z(e)?$.zp(e):e).call(t,t.$l,i/2,i/2,i/6))},tca=function(t){switch(t){case"step-area":t=function(t,e){t.moveTo(0,.6*e).lineTo(.5*e,.6*e).lineTo(.5*e,.1*e).lineTo(e,.1*e).lineTo(e,e).lineTo(0,e).lineTo(0,.6*e).close()};break;case"area":t=function(t,e){t.moveTo(0,.7*e).lineTo(.35*e,.3*e).lineTo(.5*e,.5*e).lineTo(e,0).lineTo(e,e).lineTo(0,e).lineTo(0,.7*e).close()};break;case"range-step-area":case"range-spline-area":case"range-area":t=function(t,e){t.moveTo(0,.2*e).lineTo(.5*e,.4*e).lineTo(e,.2*e).lineTo(e,.8*e).lineTo(.5*e,.6*e).lineTo(0,.8*e).close()};break;case"spline-area":t=function(t,e){var i=e/2;t.moveTo(e,.6*i).lineTo(e,e).lineTo(0,e).lineTo(0,1.3*i).Fe(0,i,i,.3*i,90,-90).Fe(e,i,i,.4*i,180,90).moveTo(0,0).close()};break;case"range-bar":t=function(t,e){t.moveTo(.35*e,0).lineTo(.65*e,0).lineTo(.65*e,.15*e).lineTo(.35*e,.15*e).close().moveTo(.1*e,.4*e).lineTo(.9*e,.4*e).lineTo(.9*e,.55*e).lineTo(.1*e,.55*e).close().moveTo(.25*e,.8*e).lineTo(.75*e,.8*e).lineTo(.75*e,.95*e).lineTo(.25*e,.95*e).close()};break;case"range-column":t=function(t,e){t.moveTo(0,.6*e).lineTo(0,.4*e).lineTo(.15*e,.4*e).lineTo(.15*e,.6*e).lineTo(0,.6*e).close().moveTo(.4*e,.9*e).lineTo(.4*e,.1*e).lineTo(.55*e,.1*e).lineTo(.55*e,.9*e).lineTo(.4*e,.9*e).close().moveTo(.8*e,.7*e).lineTo(.8*e,.3*e).lineTo(.95*e,.3*e).lineTo(.95*e,.7*e).lineTo(.8*e,.7*e).close()};break;case"bar":t=function(t,e){t.moveTo(0,0).lineTo(.6*e,0).lineTo(.6*e,.15*e).lineTo(0,.15*e).close().moveTo(0,.4*e).lineTo(e,.4*e).lineTo(e,.55*e).lineTo(0,.55*e).close().moveTo(0,.8*e).lineTo(.8*e,.8*e).lineTo(.8*e,.95*e).lineTo(0,.95*e).close()};break;case"column":t=function(t,e){t.moveTo(0,e).lineTo(0,.4*e).lineTo(.15*e,.4*e).lineTo(.15*e,e).close().moveTo(.4*e,e).lineTo(.4*e,0).lineTo(.55*e,0).lineTo(.55*e,e).close().moveTo(.8*e,e).lineTo(.8*e,.2*e).lineTo(.95*e,.2*e).lineTo(.95*e,e).close()};break;case"step-line":t=function(t,e){t.moveTo(0,.8*e).lineTo(.5*e,.8*e).lineTo(.5*e,.2*e).lineTo(e,.2*e).moveTo(0,0).close(),Bv(this,t,e)};break;case"line":t=function(t,e){t.moveTo(0,.5*e).lineTo(e,.5*e).close(),Bv(this,t,e)};break;case"spline":t=function(t,e){var i=e/2;t.Fe(0,i,i,.8*i,90,-90).Fe(e,i,i,.6*i,180,90).moveTo(0,0).close(),Bv(this,t,e)};break;case"bubble":case"circle":t=function(t,e){var i=e/2;t.Fe(i,i,i,i,0,360).close()};break;case"candlestick":t=function(t,e){t.moveTo(.5*e,0).lineTo(.5*e,e).moveTo(0,.3*e).lineTo(e,.3*e).lineTo(e,.7*e).lineTo(0,.7*e).lineTo(0,.3*e).close()};break;case"ohlc":t=function(t,e){t.moveTo(0,.2*e).lineTo(.5*e,.2*e).moveTo(.5*e,0).lineTo(.5*e,e).moveTo(.5*e,.8*e).lineTo(e,.8*e).close()};break;case"triangle-up":case"triangle-down":case"triangle-right":case"triangle-left":case"diamond":case"cross":case"diagonal-cross":case"star4":case"star5":case"star6":case"star7":case"star10":case"pentagon":case"trapezium":case"arrowhead":case"v-line":t=$.Ok(t);var e=$.zp(t);t=function(t,i){return e(t,i/2,i/2,i/2)};break;default:t=function(t,e){t.moveTo(0,0).lineTo(e,0).lineTo(e,e).lineTo(0,e).close()}}return t},Cv=function(t,e){t.$l&&t.$l.clear(),t.Fs?(e.call(t,t.lw.clear(),t.pp),t.Es&&e.call(t,t.Es.clear(),t.pp)):(t.lw.clear(),t.Es&&t.Es.clear())},Dv=function(t,e,i){t.bi(t.ad,!!i),i=t.g("fontColor"),e=t.fq?t.ZC.fontColor:e?$.Pl(i):i,(0,window.isNaN)(t.SF)?(t.ad.color(e),t.ad.fill(e)):(i=t.g("fontOpacity"),i=$.p(i)?i:1,e={keys:Cp(t.SF,i,e)},t.Rh().fill(e))},Ev=function(t,e){t.lw.stroke(uca(t,e)),t.lw.fill(vca(t,e)),t.Es&&t.Es.fill(t.fq?t.ZC.iconHatchFill:t.g("iconHatchFill"))},Av=function(t,e){t.$l&&(t.$l.fill(wca(t,e)),t.$l.stroke(xca(t,e)))},uca=function(t,e){if(t.fq)return t.ZC.iconStroke;var i=t.g("iconType");return $.cp(t.g("iconStroke"))&&i in t.p4?t.p4[i]:e?$.Pl(t.g("iconStroke")):t.g("iconStroke")},vca=function(t,e){return t.g("iconType")in t.xka?null:t.fq?t.ZC.iconFill:e?$.Pl(t.g("iconFill")):t.g("iconFill")},xca=function(t,e){return t.fq?t.ZC.iconMarkerStroke:e?$.Pl(t.hw):t.hw},wca=function(t,e){return t.fq?t.ZC.iconMarkerFill:e?$.Pl(t.gw):t.gw},Fv=function(t,e){return $.p(e)?(t.ZW=e,t):t.ZW},$.Hv=function(){tv.call(this),this.Jf=this.Yf=null,this.dc=Gv,this.qE=this.lL=!1,this.TH(),$.T(this.ua,[["text",20,9]]),this.B(4294967295)},Iv=function(t){var e=t.ja();if(e)var i=e.width,n=e.height;else i=n=void 0;var s=!!t.xb;if(s)var a=t.xb.rb(),o=a.width,r=a.height;var l=null!=t.Yf,h=null!=t.Jf;a=t.padding(),l?(o=$.uo(t.Yf)&&!$.p(i)?s?o:0:$.L(t.Yf,i),s&&(t.Lg=$.L(a.g("left"),o))):(o=s?o:0,s&&(t.Lg=$.L(a.g("left"),o)),o=a.Lk(o)),e&&i<o&&(o=i),h?(r=$.uo(t.Jf)&&!$.p(n)?s?r:0:$.L(t.Jf,n),s&&(t.Mg=$.L(a.g("top"),r))):(r=s?r:0,s&&(t.Mg=$.L(a.g("top"),r)),r=a.$j(r)),e&&n<r&&(r=n),s&&(t.xb.width(o),t.xb.height(r)),(e=$.Sm(t.af)).x=i?$.L(e.x,i):0,e.y=n?$.L(e.y,n):0,t.GC=new $.I(e.x,e.y,o,r)},$.Jv=function(t,e){$.p(e)&&(t.hO=e)},Kv=function(){$.Hv.call(this),this.Ga("defaultLegend.paginator.buttonsSettings"),this.b=$.ia,this.Ku(16,!1),this.TH()},Lv=function(t,e){$.p(e)&&t.b!=e&&(t.b=e,t.B(64,1))},$.Mv=function(t,e,i,n){Eu.apply(this,arguments)},Sv=function(){tv.call(this),this.Ga($.ur.paginator),this.ba=this.kc=null,Nv(this,1),this.UC(1),this.o=new Kv,this.o.padding(null),this.o.enabled(!0),$.Jv(this.o,(0,$.pa)(Ov,this)),$.K(this.o,Pv,this.o),this.i=new Kv,this.i.padding(null),this.i.enabled(!0),$.Jv(this.i,(0,$.pa)(Ov,this)),$.K(this.i,Pv,this.i);var t=this;Lv(this.o,Qv),Lv(this.i,Rv),$.T(this.ua,[["text",20,9],["orientation",4,9],["layout",4,9,0,function(){"horizontal"==this.g("layout")?(Lv(t.o,Qv),Lv(t.i,Rv)):(Lv(t.o,yca),Lv(t.i,zca))}]])},Tv=function(t,e){return $.p(e)?(t.ba||(t.ba=e),t):t.ba},Nv=function(t,e){if($.p(e)&&(e=Math.ceil((0,window.isNaN)((0,window.parseFloat)(e))?1:+e),t.P!=e)){if($.p(t.P)){if(!(0<e))throw Error("incorrect pageCount value!! Should be more than 0");e<t.aa+1&&(t.aa=e-1),t.P=e}else t.P=e;t.B(20,9)}},Uv=function(t){return((0,window.isNaN)(t.aa)?"-":String(t.aa+1))+" / "+((0,window.isNaN)(t.P)?"-":String(t.P))},Vv=function(t,e){return $.p(e)?(t.ea!=e&&(t.ea=e,t.B(1,t.mr())),t):t.ea},Wv=function(t){return!!t.enabled()&&Vv(t)},Xv=function(t,e){var i=t.padding(),n=t.margin(),s=t.ja();if(s)var a=s.width,o=s.height;t.K||(t.K={});var r=$.p(e)?e:t.P,l=r+t.g("layout").substr(0,1);if(t.K[l])r=t.K[l];else{var h=$.sk();h.Cd("aria-hidden","true"),t.bi(h,!0),h.text(r+" / "+r),r=h.rb(),$.qd(h);var c=r.height;"horizontal"==t.g("layout")?(h=2*c+20+r.width,r=r.height):(h=Math.max(c,r.width),r=2*c+20+r.height),r=t.K[l]=[h,r]}if(l=r[0],r=r[1],t.f=i.Lk(l),t.b=i.$j(r),s&&a<t.f&&(t.f=n.Ng(t.f)),s&&o<t.b&&(t.b=n.Yh(t.b)),i=n.Lk(t.f),l=n.$j(t.b),r=s?$.L(n.g("left"),t.f):0,n=s?$.L(n.g("top"),t.b):0,s){switch(t.g("orientation")){case"top":t.D=s.tb()+(a-i)/2+r,t.G=s.Vb()+n;break;case"right":t.D=s.cb()-i+r,t.G=s.Vb()+(o-l)/2+n;break;case"bottom":t.D=s.tb()+(a-i)/2+r,t.G=s.Va()-l+n;break;case"left":t.D=s.tb()+r,t.G=s.Vb()+(o-l)/2+n}t.$b=new $.I(t.D-r,t.G-n,i,l)}else t.D=r,t.G=n,t.$b=new $.I(0,0,i,l)},Yv=function(t,e){return t.$b&&!t.J(4)||Xv(t,e),t.$b},Pv=function(t){$.X(t,1)&&this.W()},Ov=function(t){var e=this.UC(),i=this.i2();switch(t){case this.o:0<e&&this.UC(e-1);break;case this.i:e<i&&this.UC(e+1);break;default:throw Error("Something wrong with onClickListener!")}},Qv=function(t,e){t.moveTo(e.cb(),e.Vb()).lineTo(e.cb(),e.Va()).lineTo(e.tb(),e.Vb()+e.height/2).close()},Rv=function(t,e){t.moveTo(e.tb(),e.Vb()).lineTo(e.cb(),e.Vb()+e.height/2).lineTo(e.tb(),e.Va()).close()},yca=function(t,e){t.moveTo(e.tb()+e.width/2,e.Vb()).lineTo(e.cb(),e.Va()).lineTo(e.tb(),e.Va()).close()},zca=function(t,e){t.moveTo(e.tb(),e.Vb()).lineTo(e.cb(),e.Vb()).lineTo(e.tb()+e.width/2,e.Va()).close()},Zv=function(){$.Y.call(this),this.Ga($.ur.separator),delete this.oa.enabled,this.Sc=null,this.G=this.D=window.NaN,this.Xb=this.Y=this.$b=null;var t=(0,$.pa)((function(t,e){if(e=e.clone().round(),!this.Nb()){var i=1==e.width?.5:0;e.left-=i,e.width+=2*i}t.moveTo(e.left,e.top).lineTo(e.left+e.width,e.top).lineTo(e.left+e.width,e.top+e.height).lineTo(e.left,e.top+e.height).close()}),this);this.bf(t),this.B(4294967295),$.T(this.ua,[["fill",16,1],["stroke",16,1],["width",20,9],["height",20,9],["orientation",20,9]])},$v=function(t){var e=t.margin(),i=t.ja();if(i)if(t.Nb())var n=i.width,s=i.height;else n=i.height,s=i.width;else n=s=void 0;var a=t.g("width"),o=t.g("height");o=$.cp(o)||!$.p(o)?"100%":o,a=$.L($.cp(a)||!$.p(a)?"100%":a,n),i&&n<e.Lk(a)&&(a=e.Ng(n)),o=$.L(o,s),i&&s<e.$j(o)&&(o=e.Yh(s));var r=e.Lk(a),l=e.$j(o);if(n=$.L(e.g("left"),n),e=$.L(e.g("top"),s),s=t.g("orientation")||"top",i)switch(s){case"top":t.D=i.tb()+n,t.G=i.Vb()+e,t.f=a,t.b=o,t.$b=new $.I(i.tb(),i.Vb(),r,l);break;case"bottom":t.D=i.tb()+n,t.G=i.Va()-l+e,t.f=a,t.b=o,t.$b=new $.I(i.tb(),i.Va()-l,r,l);break;case"left":t.D=i.tb()+e,t.G=i.Va()-n-a,t.f=o,t.b=a,t.$b=new $.I(i.tb(),i.Vb(),l,r);break;case"right":t.D=i.cb()-e-o,t.G=i.Vb()+n,t.f=o,t.b=a,t.$b=new $.I(i.cb()-l,i.Vb(),l,r)}else t.D=n,t.G=e,t.Nb()?t.$b=new $.I(0,0,r,l):t.$b=new $.I(0,0,l,r)},$.aw=function(){$.Y.call(this),delete this.oa.enabled,this.Ga($.ur.title),this.P=this.ba=this.wb=this.Ia=null,this.D=this.G=this.b=this.f=window.NaN,this.i=this.Wa=this.Qc=this.$b=null,this.Nd={},this.Nd.orientation="top",this.Xb=this.Y=null,this.r3=!1,$.Eq(this.ua,20,16,9,1),$.T(this.ua,[["width",4],["height",4],["align",4],["orientation",4],["rotation",4],["maxLength",20],["text",20]])},bw=function(t){var e=[t.oa];return t.Y&&(e=$.Ga(e,bw(t.Y))),e},cw=function(t,e){t.ba=0>e?null:e,$.p(t.width())||t.B(4)},$.dw=function(t,e){if($.p(e)){var i=t.g("orientation")!=e;return t.Nd.orientation=e,i&&t.B(4),t}return t.Nd.orientation},$.ew=function(t,e){if($.p(e)){var i=null==e?"":String(e);return t.aa!=i&&(t.aa=i,t.B(20,9)),t}return t.aa},fw=function(t){var e=!1;return t.wb||(e=!0,t.wb=$.ok(),t.background().O(t.wb),t.kc=t.wb.text(),t.kc.zIndex(.1),t.kc.Cd("aria-hidden","true"),$.ru(t,t.wb)),e},gw=function(t){var e=t.padding(),i=t.margin(),n=t.ja(),s=t.g("orientation"),a=0==t.AA()%180,o=0==(t.AA()+90)%180;if(n)if(o){var r=n.height;o=n.width}else r=n.width,o=n.height;else r=o=void 0;var l=fw(t);(l||t.J(16))&&(t.bi(l),t.I(16)),t.kc.width(null),t.kc.height(null),t.kc.oc(1,0,0,1,0,0),l=t.kc.rb();var h=t.ph("width")?t.nd("width"):t.ba||null;null===h?(t.G=l.width,t.f=e.Lk(t.G)):(t.f=$.L(h,r),t.G=e.Ng(t.f)),n&&r<i.Lk(t.f)?(t.f=i.Ng(r),t.G=e.Ng(t.f),t.kc.width(t.G)):null===h||t.kc.width(t.G),t.kc.oc(1,0,0,1,0,0),l=t.kc.rb(),null===(r=t.ph("height")?t.nd("height"):t.P||null)?(t.D=l.height,t.b=e.$j(t.D)):(t.b=$.L(r,o),t.D=e.Yh(t.b)),n&&o<i.$j(t.b)?(t.b=i.Yh(o),t.D=e.Yh(t.b),t.kc.height(t.D)):null===r||t.kc.height(t.D),t.$b=new $.I(-t.f/2,-t.b/2,t.f,t.b),e=$.Kb($.bb(t.AA()),0,0);var c=$.Ab(t.$b,e);o=$.L(i.g("left"),t.f),r=$.L(i.g("right"),t.f),l=$.L(i.g("top"),t.b),i=$.L(i.g("bottom"),t.b);var u=o+(h=c.width/2),d=l+(c=c.height/2),p="top"==s||"bottom"==s;if(n)if(p||a)if(p){switch(t.g("align")){case"left":u=n.tb()+o+h;break;case"right":u=n.cb()-r-h;break;default:u=(n.tb()+n.cb()+o-r)/2}"top"==s?d=n.Vb()+l+c:"bottom"==s&&(d=n.Va()-i-c)}else switch("right"==s?u=n.cb()-r-h:"left"==s&&(u=n.tb()+o+h),t.g("align")){case"top":case"left":d=n.Vb()+l+c;break;case"bottom":case"right":d=n.Va()-i-c;break;default:d=(n.Vb()+n.Va()+l-i)/2}else if("left"==s){switch(t.g("align")){case"top":case"right":d=n.Vb()+r+c;break;case"bottom":case"left":d=n.Va()-o-c;break;default:d=(n.Vb()+n.Va()-o+r)/2}u=n.tb()+l+h}else{switch(t.g("align")){case"top":case"left":d=n.Vb()+o+c;break;case"bottom":case"right":d=n.Va()-r-c;break;default:d=(n.Vb()+n.Va()+o-r)/2}u=n.cb()-l-h}n=[u,d,0,0],$.Jb(e).transform(n,0,n,0,2),t.i=e.translate(n[0]-n[2],n[1]-n[3]),t.$b=$.Ab(t.$b,t.i),t.i.translate(-t.f/2,-t.b/2),"top"==s||"bottom"==s||a?(t.$b.left-=o,t.$b.top-=l,t.$b.width+=o+r,t.$b.height+=l+i):(t.$b.left-=l,t.$b.top-=r,t.$b.width+=l+i,t.$b.height+=o+r)},hw=function(){$.aw.call(this)},iw=function(t){$.od.call(this),this.gb=t,this.i=this.f=this.o=this.b=this.Jc=null,this.D=this.G=""},jw=function(){return $.Me("DIV",{})},kw=function(t){if(!t.b){t.b=jw(t.gb.background()),t.b.className="anychart-tooltip";var e=t.gb.title();(e=jw(e.background())).className="anychart-tooltip-title",t.o=e,t.f=$.Me("HR"),t.f.setAttribute("noshade",!0),t.f.className="anychart-tooltip-separator",t.i=$.Me("DIV"),t.b.appendChild(t.o),t.b.appendChild(t.f),t.b.appendChild(t.i),e=t.getContext(),t=t.gb.g("onDomReady"),$.D(t)&&t.call(e)}},lw=function(t){kw(t);var e=$.ew(t.gb.title());if($.p(e)&&t.G!=e){kw(t),t.G=e,e=t.getContext();var i=t.gb.g("onBeforeTitleChange");$.D(i)&&!i.call(e)||(t.o.innerHTML=t.G,i=t.gb.g("onTitleChanged"),$.D(i)&&i.call(e))}$.Pf(t.o,t.gb.title().enabled()),$.Pf(t.f,t.gb.$r().enabled()),e=t.gb.Ri().text(),$.p(e)&&t.D!=e&&(kw(t),t.D=e,e=t.getContext(),i=t.gb.g("onBeforeContentChange"),!$.D(i)||i.call(e))&&(t.i.innerHTML=t.D,i=t.gb.g("onContentChanged"),$.D(i)&&i.call(e)),$.Pf(t.i,t.gb.Ri().enabled())},mw=function(){$.od.call(this),this.o=!1,this.Ir=$.Me("div"),this.b=$.hd&&!$.bd("9")?$.lk(null,1,1):$.lk(),this.b.Ax=!0,this.b.O(this.Ir),this.b.Pta=!0,this.Jc=null},nw=function(t,e,i){$.od.call(this),this.b=t,this.i=e||0,this.qo=i,this.f=(0,$.pa)(this.Ofa,this)},pw=function(t,e){$.qf.call(this),this.i=t,this.b=ow(this.i),this.K=e||100,this.o=$.Ld(t,"resize",this.D,!1,this)},qw=function(t){$.qf.call(this),this.f=t||window,this.i=$.Ld(this.f,"resize",this.o,!1,this),this.b=$.Ee(this.f||window)},ow=function(t){return t.b?t.b.clone():null},rw=function(){mw.call(this),this.i=new qw,this.f=new pw(this.i),$.Ld(this.f,"resize",this.D,!1,this)},$.ww=function(t){$.Y.call(this),this.Ga($.ur.tooltip),delete this.oa.enabled,this.fb=t,this.fa=new $.I(0,0,0,0),this.Y=null,this.o={},this.i=this.f=this.Xb=this.Ba=this.b=null,this.Za=!1,this.Ha={format:void 0,titleFormat:void 0},sw[String($.oa(this))]=this,$.Eq(this.ua,tw,640,1,1,this.xE),$.T(this.ua,[["useHtml",2|tw,16385,void 0,this.bL],["width",tw,9],["height",tw,9],["titleFormat",tw,1],["format",tw,1],["unionFormat",tw,1],["valuePrefix",tw,1],["valuePostfix",tw,1],["position",64,1],["anchor",64,1],["offsetX",64,1],["offsetY",64,1],["x",64,1],["y",64,1],["allowLeaveScreen",2,1],["allowLeaveChart",2,1],["allowLeaveStage",2,1],["displayMode",4096,1,uw],["positionMode",64,1,vw],["onDomReady",0,0],["onBeforeTitleChange",0,0],["onTitleChanged",0,0],["onBeforeContentChange",0,0],["onContentChanged",0,0],["hideDelay",0,0,0,this.uL]])},yw=function(t,e,i,n,s,a){if(t.enabled()){var o=t.g("allowLeaveStage"),r=t.g("allowLeaveScreen"),l=t.g("allowLeaveChart"),h=t.g("useHtml"),c=xw(t),u=h?0:t.g("offsetX");if(h=h?0:t.g("offsetY"),!r){t.x(e),t.y(i),r=c?0:n.x,c=c?0:n.y,n=t.ob();var d=$.Ee($.ll||window);0>n.left-u+r&&(e-=n.left-u+r),0>n.top-h+c&&(i-=n.top-h+c),n.cb()-u+r>d.width&&(e-=n.cb()-u+r-d.width),n.Va()-h+c>d.height&&(i-=n.Va()-h+c-d.height)}o||(t.x(e),t.y(i),(n=t.ob()).left<u&&(e-=n.left-u),n.top<h&&(i-=n.top-h),n.cb()>s.width+u&&(e-=n.cb()-s.width-u),n.Va()>s.height+h&&(i-=n.Va()-s.height-h)),l||(t.x(e),t.y(i),(n=t.ob()).left<a.left+u&&(e-=n.left-u-a.left),n.top<a.top+h&&(i-=n.top-h-a.top),n.cb()>a.cb()+u&&(e-=n.cb()-u-a.cb()),n.Va()>a.Va()+h&&(i-=n.Va()-h-a.Va())),t.x(e),t.y(i)}},Bw=function(t,e,i,n,s){var a=e.parent()?zw(e):t,o=a.g("positionMode")||"float";t=(a=a.ya()||$.Aw(t)).ob();var r=a.O().Ja();a=$.Zj(r),r=r.rb();var l=xw(e),h=e.g("position");switch(o){case"float":var c=l?i:i-a.x,u=l?n:n-a.y;break;case"point":var d;d=s&&s.Bh?s.Bh(h,!0).value:{x:i,y:n},c=l?d.x+a.x:d.x,u=l?d.y+a.y:d.y;break;case"chart":c=(i=$.Eo(t,h)).x+(l?a.x:0),u=i.y+(l?a.y:0)}yw(e,c,u,a,r,t)},Aca=function(t,e,i,n,s,a){if(t.check(uw|vw)&&(t.b=s?s.Ua():t,$.Cw(t,[t.b]),t.b.enabled())){for(var o={clientX:{value:i,type:"number"},clientY:{value:n,type:"number"},formattedValues:{value:[],type:""},points:{value:[],type:""}},r=[],l=0;l<e.length;l++){var h=e[l];if(h){var c=h.series;if(!$.p(c.Rk))return;var u=c.Ua();if(c.enabled()&&!Dw(u,h)){var d=c.Rk();o.formattedValues.value.push(Ew(u,d)),o.points.value.push(d),l||(o.x={value:d.lg().Gh(),type:"string"},o.name={value:d.getData("name"),type:"string"}),$.A(h.points)&&r.push({series:c,points:(0,$.Wa)(h.points,(function(t){return c.$().select(t),c.Rk(!0)}))})}}}r.length==e.length&&(o.allPoints={value:r,type:""}),o.formattedValues.value.length&&(r=t.b.g("useHtml")?"<br/>":"\n",o.joinedFormattedValues={value:o.formattedValues.value.join(r),type:"string"},a&&$.Sc(o,a),r=s&&s.xc&&s.xc()||e[0]&&e[0].series&&e[0].series.xc&&e[0].series.xc()||void 0,a=[],!s&&e[0]&&e[0].series&&a.push(e[0].series),s&&a.push(s),r&&a.push(r),(e=new $.Fw(o)).Li(a),s&&e.lg(s.$()),$.ov(e),t.b.Ri().text(Ew(t,e,!0)),$.ew(t.b.title(),Gw(t,e)),$.Cw(t.b),t.b.g("useHtml")&&lw(t.b.i),Hw(t.b).parent()||t.b.B(2),Iw(t,t.b),Bw(t,t.b,i,n,s),Jw(t.b,i,n))}},Dw=function(t,e){return!t.enabled()||e.nearestPointToCursor&&!(0,window.isFinite)(e.nearestPointToCursor.distance)},$.Nw=function(t,e,i,n,s,a,o){if(!t.f||t.f.NA()||!t.f.Hm()||t.check(uw)||e.length){$.Kw(t);var r=t.g("displayMode");if("single"==r)e=(s=e[0]).series,t.b=a?t:e.Ua(),!Dw(t.b,s)&&$.p(e.Rk)&&(a=e.Rk(),o&&($.Sc($.nv(a),o),$.ov(a)),a.clientX=i,a.clientY=n,$.ew(t.b.title(),Gw(t.b,a)),t.b.Ri().text(Ew(t.b,a)),t.b==t?$.Cw(t):(Lw(t),$.Cw(t,[t.b])),((o=t.g("useHtml"))&&!t.b.i.O()||!Hw(t.b).parent())&&t.b.B(2),o&&lw(t.b.i),Iw(t,t.b),Bw(t,t.b,i,n,e),Jw(t.b,i,n));else if("union"==r)Aca(t,e,i,n,s,o);else if("separated"==r)for(Lw(t),o=0;o<e.length&&(a=(r=e[o]).series,$.p(a.Rk));o++)s=a.Ua(),Dw(s,r)||((r=a.Rk()).clientX=i,r.clientY=n,$.ew(s.title(),Gw(s,r)),s.Ri().text(Ew(s,r)),Hw(s).parent()||s.B(2),s.g("useHtml")&&lw(s.i),Iw(t,s),Mw(t,s,i,n,a),Jw(s,i,n))}},Jw=function(t,e,i){if(t.enabled()){$.Kw(t),Hw(t).parent()||t.B(2),Iw(t,t),t.D&&t.D.uq()&&t.D.stop(),t.W();var n=Hw(t),s=n.ia();if(t.g("selectable")&&s){n.Dd(!1);t:{if(e<(n=t.ob()).tb())if(i<n.Vb()){s=n.cb();var a=n.tb(),o=n.Vb(),r=n.Va();i-=2}else i>n.Va()?(s=n.tb(),a=n.cb(),o=n.Vb(),r=n.Va(),i+=2):(s=a=n.tb()+2,o=n.Vb(),r=n.Va(),e-=2);else if(e>n.cb())i<n.Vb()?(s=n.cb(),a=n.tb(),o=n.Va(),r=n.Vb(),i-=2):i>n.Va()?(s=n.tb(),a=n.cb(),o=n.Va(),r=n.Vb(),i+=2):(s=a=n.cb()-2,o=n.Vb(),r=n.Va(),e+=2);else if(i<n.Vb())o=r=n.Vb()+2,s=n.cb(),a=n.tb(),i-=2;else{if(!(i>n.Va()))break t;o=r=n.Va()-2,s=n.tb(),a=n.cb(),i+=2}t.K=[s,o,a,r,e,i]}$.Yd(window.document,"mousemove",t.ZN,!1,t)}else s&&n.Dd(!0)}},$.Ow=function(t,e,i,n){$.Kw(t),t.b=t,n&&(n.clientX=e,n.clientY=i,$.ew(t.title(),Gw(t,n)),t.Ri().text(Ew(t,n))),t.g("useHtml")&&!t.b.i.O()&&t.b.B(2),Iw(t,t),Bw(t,t,e,i),Jw(t,e,i)},Gw=function(t,e){$.nv(e).titleText={value:t.jb.g("text"),type:"string"},$.ov(e);var i=t.g("titleFormat");return $.z(i)&&(i=$.Nu($.Lu.Id(),i)),i.call(e,e)},Ew=function(t,e,i){return $.nv(e).valuePrefix={value:t.g("valuePrefix")||"",type:"string"},$.nv(e).valuePostfix={value:t.g("valuePostfix")||"",type:"string"},$.ov(e),i=i?t.g("unionFormat"):t.g("format"),$.z(i)&&(i=$.Nu($.Lu.Id(),i)),t=t.g("maxLength"),e=i.call(e,e),Du(e,t)},Lw=function(t,e,i){if(e)return t.D&&t.D.stop(),t.remove(),!0;if(t.g("selectable")&&i){e=i.originalEvent.clientX,i=i.originalEvent.clientY;var n=t.ob().Tf(new $.gb(e,i)),s=Hw(t).ia();if(s&&!n)return $.Ld(s,"mouseleave",t.fN,!1,t),t.K=null,!1;if(Pw(t,e,i))return $.Ld(window.document,"mousemove",t.ZN,!1,t),s&&($.Ld(Hw(t).ia(),"mouseenter",t.xY,!1,t),$.Ld(Hw(t).ia(),"mouseleave",t.yY,!1,t)),!1;t.K=null}return t.g("hideDelay")?(t.uL(),t.D.uq()||t.D.start(),!1):(t.remove(),!0)},$.Kw=function(t){var e=t.Wj();t.title().Wj(e),t.$r().Wj(e),t.background().Wj(e),t.padding().Wj(e)},Hw=function(t){if(!t.Oa){t.Oa=$.ok(),$.ru(t,t.Oa);var e=t.background(),i=t.title(),n=t.$r(),s=t.Ri();e.O(t.Oa),i.O(t.Oa),n.O(t.Oa),s.O(t.Oa)}return t.Oa},$.Aw=function(t,e){return $.p(e)?(t.Ba=e,t):t.Ba},xw=function(t){return Bca&&t.g("allowLeaveStage")&&t.g("allowLeaveChart")},$.Cw=function(t,e){for(var i in e=e||[],t.o)(0,$.Qw)(e,(function(t){return String($.oa(t))==i}))||t.o[i].Lc(!0)},Rw=function(t){if(t.g("useHtml"))t.P=t.i.rb();else if(!t.P){t.Ri().ka(),t.bi(),t.Ri().da(!1);var e=t.g("width"),i=t.g("height"),n=(t.pa||$.Aw(t)).ob();e=$.L(e,n.width),i=$.L(i,n.height),n=!(0,window.isNaN)(e);var s=!(0,window.isNaN)(i),a=new $.I(0,0,0,0),o=null,r=null,l=t.title(),h=t.$r(),c=t.Ri();if(l.ka(),h.ka(),c.ka(),!n||!s){if(l.enabled()){"svg"==$.kk?l.ja(null):l.ja(t.pa&&t.pa.O()?t.pa.O().Ja().rb():null);var u=l.g("width"),d=null!=l.nd("width"),p=l.g("height"),g=null!=l.nd("height");$.uo(u)&&(o=u,n?(u=t.padding().Ng(e),l.width(u)):l.width(null)),$.uo(p)&&(r=p,s?(u=t.padding().Yh(i),l.height(u)):l.height(null)),p=l.yi(),a.width=e||Math.max(a.width,p.width),d?l.width(o):delete l.Pa.width,g?l.height(r):delete l.Pa.height,r=o=null,s||(a.height+=p.height)}if(c.enabled()){var f=(d=t.Y?t.Y.Ri():null)?d.width():void 0;d=d?d.height():void 0,c.ja(null),f=c.width()||f,d=c.height()||d,$.uo(f)&&(o=f,n?(u=t.padding().Ng(e),c.width(u)):c.width(null)),$.uo(d)&&(r=d,s?(u=t.padding().Yh(i),c.height(u)):c.height(null)),f=c.yi(),a.width=e||Math.max(a.width,f.width),o&&c.width(o),r&&c.height(r),s||(a.height+=f.height)}l.enabled()&&l.ja(new $.I(0,0,a.width,p.height)),c.enabled()&&c.ja(new $.I(0,0,a.width,f.height)),h.enabled()&&(h.ja(l.enabled()||c.enabled()?a:null),p=h.yi(),a.width=e||Math.max(a.width,p.width),s||(a.height+=p.height))}a=t.padding().NY(a),n&&(a.width=e),s&&(a.height=i),a.left=0,a.top=0,t.P=a,l.da(!1),h.da(!1),c.da(!1)}},Sw=function(t){if(Rw(t),!t.G){var e=t.g("anchor"),i=t.g("useHtml"),n=i?0:t.g("offsetX"),s=i?0:t.g("offsetY");i=i?$.Uf(t.i.Ya(),"margin"):new $.kb(0,0,0,0);var a=t.g("x"),o=t.g("y");a=new $.gb(a,o),$.Yo(a,e,n+i.left,s+i.top),e=$.Eo(t.P,e),a.x-=e.x,a.y-=e.y,t.G=a}},Mw=function(t,e,i,n,s){var a=i,o=n,r=t.g("positionMode")||"float",l=t.g("displayMode"),h=(t.ya()||$.Aw(t)).ob(),c=t.Ba.O().Ja(),u=c.rb();c=$.Zj(c);var d=xw(e);"float"==r?(a=d?i:i-c.x,o=d?n:n-c.y):"point"==r?(t="union"==l?t.g("position"):e.g("position"),t=s.Bh(t,!0).value,a=d?t.x+c.x:t.x,o=d?t.y+c.y:t.y):"chart"==r&&(a=t.ya().ob(),t="union"==l?t.g("position"):e.g("position"),a=(t=$.Eo(a,t)).x+(d?c.x:0),o=t.y+(d?c.y:0)),yw(e,a,o,c,u,h)},Tw=function(t){var e=null;return $.Aw(t)?e=$.Aw(t).O():t.ya()?e=t.ya().O():t.parent()&&(t=zw(t),$.Aw(t)?e=$.Aw(t).O():t.ya()&&(e=t.ya().O())),e},zw=function(t){for(;t.parent();)t=t.parent();return t},Iw=function(t,e){if(e.J(2))if(xw(e)||"vml"==$.kk){if(e.g("useHtml"))e.i.O($.Lp.body);else{var i=rw.Id();t.f&&t.f.NA()&&e.f.O(null),e.f=i,e.f.O(window.document.body),e.O(i.b),Hw(e).parent(e.O())}e.I(2)}else if(i=Tw(e)){var n=i.Ja().Tl();if(e.g("useHtml"))e.i.O(n);else{var s=Uw(e);(i=Vw[s])||(i=new mw,Vw[s]=i),e.f=i,Hw(e).parent(e.O()),i.O(n),e.O(i.b)}e.I(2)}},Pw=function(t,e,i){if(!t.K)return!1;var n=t.K[0],s=t.K[1],a=t.K[2],o=t.K[3],r=t.K[4],l=t.K[5];return t=$.cn(a,o,r,l,e,i),r=$.cn(r,l,n,s,e,i),$.cn(n,s,a,o,e,i)==t&&t==r},Uw=function(t){return t=Tw(t).Ja(),"stg"+$.oa(t)},$.Ww=function(){tv.call(this),this.Ga($.ur.legend),this.ba=this.Ub=null,this.Za=window.NaN,this.$a=!0,this.B(4294967295),$.su(this,this,null,null,null,null,this.Eaa,null),$.T(this.ua,[["inverted",16,1],["itemsLayout",4,9],["iconSize",4,9,0,function(){if(null!=this.Ub)for(var t=0,e=this.Ub.length;t<e;t++)this.Ub[t].kw(this.g("iconSize"))}],["width",68,9],["height",68,9],["maxWidth",68,9],["maxHeight",68,9],["position",0,0,0,function(){var t=this.g("position");$.C(t)?this.T5(t):(this.EW=!1,this.DW=null,this.FG=!1),this.B(4,9)}],["positionMode",0,0,0,function(){this.FG=!1,this.g("drag")?this.B(2048,9):this.va(8)}],["align",4,9,0,function(){this.FG=!1}],["drag",2048,1],["itemsFormat",1040,1],["titleFormat",132,9],["itemsSpacing",4,9],["itemsHAlign",16,1],["itemsSourceMode",1040,1],["hoverCursor",16,1,0,function(){if(null!=this.Ub)for(var t=0,e=this.Ub.length;t<e;t++)this.Ub[t].dV(this.V2)}],["iconTextSpacing",4,9,0,function(){if(null!=this.Ub)for(var t=0,e=this.Ub.length;t<e;t++)this.Ub[t].iconTextSpacing(this.g("iconTextSpacing"))}]])},Xw=function(t,e){if(!t.f||!e||t.f.length!=e.length)return!1;for(var i=0;i<e.length;i++)if(t.f[i]!=e[i])return!1;return!0},Yw=function(t,e){var i=t.Ua();if(i.enabled()){var n=e.itemIndex,s=t.Ub[n];s&&e&&(n={value:{value:s.g("text"),type:"string"},iconType:{value:s.g("iconType"),type:"string"},iconStroke:{value:s.g("iconStroke"),type:""},iconFill:{value:s.g("iconFill"),type:""},iconHatchFill:{value:s.g("iconHatchFill"),type:""},iconMarkerType:{value:s.iw(),type:"string"},iconMarkerStroke:{value:s.hu(),type:""},iconMarkerFill:{value:s.gu(),type:""},meta:{value:t.ud[n],type:""}},n=new $.Fw(n),$.Ow(i,e.clientX,e.clientY,$.ov(n)))}},Cca=function(t,e,i){if(null==t.Ub)return $.kn(0,0,0,0);for(var n,s,a=0,o=-Number.MAX_VALUE,r=0,l=-Number.MAX_VALUE,h=0,c=0,u=0,d=0,p=1,g=0,f=0,b=t.g("itemsLayout"),v=t.g("itemsSpacing"),m=0,y=t.Ub.length;m<y;m++)m in t.G||(a+=(n=(s=t.Ub[m].ob()).width)+v,o=Math.max(o,n),r+=(s=s.height)+v,l=Math.max(l,s),"horizontal-expandable"==b?c+n>e?(g=Math.max(g,c),f+=h,c=n+v,h=s+v):(c+=n+v,h=Math.max(h,s+v)):"vertical-expandable"==b&&(u+s>i?(f=Math.max(f,u),g+=d,p++,d=n+v,u=s+v):(u+=s+v,d=Math.max(d,n+v))));return!a||0>o?o=a=0:a-=v,!r||0>l?l=r=0:r-=v,t.me=p,"vertical"==b?$.kn(0,0,Math.max(0,o),Math.max(0,r)):"horizontal"==b?$.kn(0,0,Math.max(0,a),Math.max(0,l)):"vertical-expandable"==b?(f=Math.max(f,u)-v,$.kn(0,0,Math.max(0,g+(d-v)),Math.max(0,f))):"horizontal-expandable"==b?(g=Math.max(g,c)-v,$.kn(0,0,Math.max(0,g),Math.max(0,f+(h-v)))):$.kn(0,0,0,0)},Dca=function(t){if($.A(t.Ka))return t.Ka;if(null!=t.f){for(var e,i=[],n=0;n<t.f.length;n++)if(null!==(e=t.f[n])&&$.D(e.Ol)){var s=t.g("itemsFormat");$.z(s)&&(s=$.Nu($.Lu.Id(),s)),i=$.Ga(i,e.Ol(t.g("itemsSourceMode"),s))}return i}return[]},Eca=function(t,e){if(!$.A(e))return[];for(var i,n=[],s=t.$d(),a=0;a<e.length;a++)(0,window.isNaN)(e[a].iconSize)&&(e[a].iconSize=t.g("iconSize")),i={iconTextSpacing:t.g("iconTextSpacing"),iconSize:t.g("iconSize"),hoverCursor:t.g("hoverCursor")},$.Sc(i,s,e[a]),n.push(i);return n},Fca=function(t,e){var i;if(t.Ub||(t.o=[],t.Ub=[]),t.G={},!t.$a&&t.Ub){var n=0;for(i=e.length;n<i;n++){$.p(e[n].enabled)&&!e[n].enabled&&(t.G[n]=!0);for(var s=0;s<t.Ub.length;s++){var a=t.Ub[s],o=a.vJ(),r=a.Ki();if($.p(o)&&$.p(r)&&o==e[n].sourceUid&&r==e[n].sourceKey){a.clear(),a.N(e[n]),Dv(a,a.za,void 0),s=t.g("inverted")?e.length-1-n:n,a.wb.tag={index:s};break}}}}else if(e&&0<e.length)for($.Zw(t),t.ud=[],n=0;n<e.length;n++){$.p(e[n].enabled)&&!e[n].enabled&&(t.G[n]=!0);t:{for(a=t,i=e[n],s=0,o=a.o.length;s<o;s++)if((r=a.o[s]).Mja==i.sourceUid&&r.Lja==i.sourceKey){$.Ca(a.o,s,1),a=r;break t}(i=a.o.pop())||(i=new zv).Ga(a.oa,"defaultFontSettings"),a=i}a.O(t.ba),e[n].enabled=!1,a.N(e[n]),a.ph("text")||(a.Pa.text="Legend Item"),a.bi(a.Rh(),!0),i=t.g("inverted")?e.length-1-n:n,a.wb.tag={index:i},t.Ub.push(a),t.ud.push(e[n].meta?e[n].meta:{})}else $.Zw(t);for(n=0;n<t.Ub.length;n++)i=(a=t.Ub[n]).$d(),i=Bp(i),(s=Fv(a))||(s=t.P.Vx(),t.D.appendChild(s),Fv(a,s)),s.style.cssText=i,s.textContent=a.text();for((n=Tv(t.WI()))||(n=t.P.Vx(),t.D.appendChild(n),Tv(t.K,n)),i=t.WI().$d(),i=Bp(i),n.style.cssText=i,n=0;n<t.Ub.length;n++)a=t.Ub[n],i=(s=Fv(a)).getBBox(),i=new $.I(i.x,i.y,i.width,i.height),$.p(i)&&(a.YW=i);t.$a=!1,t.B(4)},$.Zw=function(t){for(var e=0,i=t.Ub.length;e<i;e++)t.o.push(t.Ub[e].clear());t.Ub.length=0},Gca=function(t){if(null!=t.Za&&!(0,window.isNaN)(t.Za)&&(t=t.b[t.Za]))for(var e=0;e<t.length;e++)t[e].enabled(!1).W()},$w=function(t,e,i,n){t.B(4),t.ka().ja(n).x(e).y(i).enabled(!0).da(!1).W()},Hca=function(t,e,i){if(null!=t.Ub){t.ba.oc(1,0,0,1,0,0);var n=t.b[e],s=t.g("itemsLayout");if(n)switch(s){case"horizontal":switch(t.g("itemsHAlign")){case"left":case"start":s=0;for(var a=t.g("itemsSpacing"),o=0;o<n.length;o++){var r=n[o];$w(r,s,0,i),s+=r.ob().zd()+a}break;case"right":case"end":for(s=t.g("itemsSpacing"),a=i.width,o=n.length-1;0<=o;o--)a-=(r=n[o]).ob().zd()+s,$w(r,a,0,i);break;case"center":for(s=t.g("itemsSpacing"),a=o=0;a<n.length;a++)o+=n[a].ob().zd()+s;for(r=(i.width-(o-s))/2,a=0;a<n.length;a++)o=n[a],$w(o,r,0,i),r+=o.ob().zd()+s}break;case"vertical":for(s=0,a=t.g("itemsSpacing"),o=0;o<n.length;o++)r=n[o],$w(r,0,s,i),s+=r.ob().qd()+a;break;case"horizontal-expandable":o=a=s=0,r=t.g("itemsSpacing");for(var l=0;l<n.length;l++){var h=n[l],c=h.ob();s+c.zd()>i.width&&(a+=o,o=s=0),$w(h,s,a,i),s+=h.ob().zd()+r,o=Math.max(o,c.qd()+r)}break;case"vertical-expandable":for(o=a=s=0,r=t.g("itemsSpacing"),l=0;l<n.length;l++)a+(c=(h=n[l]).ob()).qd()>i.height&&(s+=o,o=a=0),$w(h,s,a,i),a+=h.ob().qd()+r,o=Math.max(o,c.zd()+r)}(i=$.wr(t,"title"))&&i.enabled()&&"top"!=(i=i.g("orientation")||$.dw(i))&&"bottom"!=i&&(n=i=0,(s=t.Na.Pd)&&(i=s.Jd,n=s.Fd),(s=t.jb.yi()).top+=n,s.left+=i)}t.Za=e},ax=function(t,e){var i=$.N(e.itemIndex);if((0,window.isNaN)(i))return null;var n=e.type;switch(n){case"mouseout":n="legenditemmouseout";break;case"mouseover":n="legenditemmouseover";break;case"mousemove":n="legenditemmousemove";break;case"mousedown":n="legenditemmousedown";break;case"mouseup":n="legenditemmouseup";break;case"click":n="legenditemclick";break;case"dblclick":n="legenditemdblclick";break;default:return null}i=t.g("inverted")?t.Ub.length-1-i:i;var s=null,a=window.NaN,o=t.Ub[i];if(o&&t.f)for(var r=0;r<t.f.length;r++){var l=t.f[r];if($.oa(l)==o.vJ()&&$.D(l.Ms)&&l.Ms(t.g("itemsSourceMode"))){s=l,a=o.Ki();break}}return{type:n,itemIndex:i,itemSource:s,itemIndexInSource:a,target:t,originalEvent:e}},bx=function(){$.Ww.call(this)},$.cx=function(){$.V.call(this),$.T(this.ua,[["enabled",0,2],["duration",0,2]])},dx=function(t){$.V.call(this),this.ya=t,this.Us=null,$.T(this.ua,[["enabled",0,10],["titleFormat",0,2]])},ex=function(t,e){return $.p(e)?(t.Us!=e&&(t.Us&&$.kr(t.Us,t.PW,t),t.Us=e,$.K(t.Us,t.PW,t)),t):t.Us},fx=function(t){dx.call(this,t),this.tE=null,$.T(this.ua,[["mode",0,2]])},gx=function(t){dx.call(this,t.xc()),this.Sa=t,this.b=null},$.hx=function(t){$.V.call(this),this.Y=t,this.ua={},$.T(this.ua,[["spotRadius",0,0],["multiSelectOnClick",0,0],["unselectOnClickOutOfPoint",0,0],["hoverMode",0,2],["selectionMode",0,0],["zoomOnMouseWheel",0,0],["scrollOnMouseWheel",0,0]])},$.ix=function(t){this.target=t,this.f=[],this.b=[],this.Gc=$.gm},$.lx=function(t,e,i,n,s){if((0,window.isNaN)(i))return s;var a=$.Na(t.f,i);if(e==$.gm)0<a&&(s=$.jx(t,e,a,s));else{var o=!0,r=$.kx(t,window.NaN);0>a?($.Da(t.f,i,~a),$.Da(t.b,e,~a)):(o=!(t.b[a]&e))?t.b[a]|=e:$.p(n)&&(t.b[a]=n),t.target.enabled()&&t.target.$().select(i)&&(t.target.eh()||"single"!=t.target.Xl()||(r?t.target.ml(e):$.p(n)&&!r&&$.kx(t,window.NaN)&&t.target.ml(n)),o?s=t.target.pk(e,s):$.p(n)&&(s=t.target.pk(n,s)))}return s},$.kx=function(t,e){if($.p(e)){if((0,window.isNaN)(e))return!($.mx(t,$.wo)||t.Gc&$.wo);var i=$.nx(t,+e)}else i=t.Gc;return!(i&$.wo)},ox=function(t,e,i,n){if(!t.target.$().select(i))return n;var s=$.Na(t.f,i);return e!=$.gm&&(0>s?($.Da(t.f,i,~s),$.Da(t.b,e,~s),t.Gc==$.gm&&(n=t.target.pk(e,n)),$.kx(t,window.NaN)&&!t.target.eh()&&"single"==t.target.Xl()&&t.target.ml(e)):t.b[s]|=e),n},$.qx=function(t,e){var i,n=$.vo;if($.p(e)){if(!(e>=t.target.$().Hb())){var s=t.target.pq();if($.A(e))for($.Pa(e),i=e.length;i--;)s=ox(t,n,+e[i],s);else s=ox(t,n,+e,s);t.target.wm(s)}}else if(t.Gc&n)if(n==$.vo){for(i=t.b.length;i--;)$.px(t,n,i)&&($.Ca(t.b,i,1),$.Ca(t.f,i,1));t.Gc=$.gm}else n==$.wo&&(t.b.length=0,t.f.length=0,t.Gc=$.gm);else{for(i=t.b.length;i--;)$.px(t,n,i)&&($.Ca(t.b,i,1),$.Ca(t.f,i,1));t.Gc=n}},$.px=function(t,e,i){return!(t.b[i]&=~e)},$.jx=function(t,e,i,n){var s=t.f[i];return $.px(t,e,i)?($.Ca(t.f,i,1),$.Ca(t.b,i,1),t.target.enabled()&&t.target.$().select(s)&&t.Gc==$.gm&&(n=t.target.pk($.gm,n))):t.target.enabled()&&t.target.$().select(s)&&t.Gc==$.gm&&(n=t.target.pk(t.b[i],n)),n},$.rx=function(t,e,i,n){return(0,window.isNaN)(i)||0<=(i=$.Na(t.f,i))&&(n=$.jx(t,e,i,n)),n},$.sx=function(t,e){for(var i=[],n=0,s=t.b.length;n<s;n++)e&t.b[n]&&i.push(t.f[n]);return i},$.nx=function(t,e){var i=+e;return(0,window.isNaN)(i)?$.gm:0<=(i=$.Na(t.f,i))?t.b[i]:$.gm},$.tx=function(t,e,i){return i=$.Na(t.f,i),!!(e&t.b[i])},$.mx=function(t,e){return 0<=$.xa(t.b,(function(t){return!!(t&e)}))},$.em=function(t){return Math.min(t&($.vo|$.wo),$.wo)},$.ux=function(){this.ka(),$.Y.call(this),this.Ga("chart"),this.Wa=this.jb=this.Qc=this.lP=this.Ia=this.Na=null,this.sv=[],this.Jx=!0,this.jl=this.iL=this.fv=null,this.VR=!1,this.Mh=this.oi=0,this.kn={},this.sm=null,this.Ax=!1,this.Hn=this.Ts=this.Js=null,this.nB=!1,this.he=null,this.B(4294967295),$.T(this.ua,[["selectRectangleMarqueeFill",0,0,0,function(){this.jN()&&this.Hn.fill(this.g("selectRectangleMarqueeFill"))}],["selectRectangleMarqueeStroke",0,0,0,function(){this.jN()&&this.Hn.stroke(this.g("selectRectangleMarqueeStroke"))}]]),this.da(!1)},Ica=function(t){switch(t.Ma().toLowerCase()){case"map":return"map";case"gantt-resource":case"gantt-project":return"gantt";case"circular-gauge":case"linear-gauge":case"thermometer":case"tank":case"led":return"gauge";default:return"chart"}},$.vx=function(t,e){e?(t.Ts||(t.Ts=$.mk(0,0,0,0),t.Ts.zIndex(1e4)),t.Ts.Dd(!1),t.Ts.cursor("wait"),t.Ts.fill($.bm),t.Ts.stroke(null),t.Ts.Qf(t.ob()),t.Ts.parent(t.O())):t.Ts&&t.Ts.remove()},$.xx=function(t,e,i,n,s,a,o,r,l,h){return!!t.Na&&(wx(t),t.qN=!!h,t.yV=!1,t.Js=s?$.Ga(s):[t.dg()],t.g3=!1,t.DV=e,t.BV=i,t.CV=n,t.i3=!!o,t.Hn||(t.Hn=$.mk(0,0,0,0),t.Hn.zIndex(10001),t.Hn.Dd(!0)),t.Hn.stroke(r||"3 red"),t.Hn.fill(l||"red 0.5"),e=t.Na,t.AV=e,t.zV=a||null,t.lu=new nf(t),t.zV&&(t.lu.wa(e,"mouseover",t.rN,!0),t.lu.wa(window.document,"mousemove",t.rN,!0),t.lu.wa(window.document,"touchmove",t.rN,!0),t.lu.wa(e,"mouseout",t.rN,!0)),t.lu.wa(e,"touchstart",t.h3,!0),t.lu.wa(e,"mousedown",t.h3,!0),!0)},wx=function(t){t.Js&&(t.qN=!1,t.i3=!1,t.yV=!1,t.g3&&$.vx(t,!1),t.g3=!1,t.DV=t.BV=t.CV=null,t.Hn&&t.Hn.parent(null),t.zV=null,$.sd(t.Hy,t.lu),t.Js=t.Hy=t.lu=null,t.AV.cursor(null),t.AV=null)},yx=function(t,e,i){if(t.Js&&t.O()){var n=$.Zj(t.O().Ja());for(e-=n.x,i-=n.y,n=0;n<t.Js.length;n++){var s=t.Js[n];if(s&&s.left<e&&e<s.left+s.width&&s.top<i&&i<s.top+s.height)return n+1}}return 0},zx=function(t){$.ag.call(this,t.ia()),$.Yd(this.D,["touchstart","mousedown"],this.lk,!1,this)},$.Ax=function(t){var e,i=t.m2(),n={},s=0,a=1<i.length;for(a&&(n["#"]=s++),e=0;e<i.length;e++)s=i[e].wO(n,s);var o=[];for(r in n)o[n[r]]=r;var r=[];for(e=0;e<i.length;e++)for(var l=i[e],h=0,c=l.Hb();h<c;h++){var u=Array(s);t.VW(u,l.En(h),n),a&&(u[0]=e),r.push(u)}return{headers:o,data:r}},$.Bx=function(){this.Bi=null,$.ux.call(this),this.DP()&&$.su(this,this,this.If,this.hg,null,this.If,null,this.Sj)},Cx=function(t,e){var i=t.eg();i.ka(),!i.O()&&i.enabled()&&i.O(t.Na),i.ja(e),i.RA()||i.RA(t),i.da(!1),i.B(16),t.J(512)&&i.B(1024),i.W(),i=i.yd(),$.nb(t.qha,i)||$.nb(e,i)||(t.qha=i,t.B(4)),t.I(512)},$.Dx=function(){$.qf.call(this),this.state=this.mL=this.Jj=null},$.Ex=function(t,e){$.qf.call(this),this.Ed=t;var i=$.af(this.Ed)?this.Ed:this.Ed?this.Ed.body:null;this.D=!!i&&$.Qf(i),this.f=$.Ld(this.Ed,$.gd?"DOMMouseScroll":"mousewheel",this,e)},Fx=function(t){return $.xd&&($.Ad||Jca)&&0!=t%40?t:t/40},Gx=function(t,e,i,n){$.Bd.call(this,e),this.type="mousewheel",this.detail=t,this.deltaX=i,this.deltaY=n},$.Hx=function(t){$.V.call(this),this.Ia=this.Wa=this.Y=this.Xb=this.b=null,$.oa(this),this.f=0,$.T(this.ua,[["format",0,8,0,this.Ug],["maxLength",0,8,0,this.Ug],["adjustFontSize",0,0],["fontVariant",0,8,0,this.Ug],["letterSpacing",0,8,0,this.Ug],["textDirection",0,0],["textIndent",0,8,0,this.Ug],["textOverflow",0,1,0,this.Ug],["useHtml",0,8,0,this.Ug],["wordBreak",0,8,0,this.Ug],["wordWrap",0,8,0,this.Ug],["fontColor",0,1,0,this.Ug],["fontDecoration",0,8,0,this.Ug],["fontFamily",0,8,0,this.Ug],["fontOpacity",0,1,0,this.Ug],["fontSize",0,8,0,this.Ug],["fontStyle",0,8,0,this.Ug],["fontWeight",0,8,0,this.Ug],["hAlign",0,8,0,this.Ug],["lineHeight",0,8,0,this.Ug],["maxFontSize",0,0],["minFontSize",0,0],["vAlign",0,1,0,this.Ug],["textShadow",0,1,0,this.Ug],["anchor",0,1,0,this.Ug],["height",0,8,0,this.Ug],["offsetX",0,2,0],["offsetY",0,2,0],["position",0,3,0,this.Ug],["rotation",0,8,0,this.Ug],["width",0,8,0,this.Ug],["allowMultiline",0,8,0,this.Ug],["zIndex",0,0],["clip",0,0],["enabled",0,32768,0,this.Ug],["selectable",0,1,0,this.Ug],["disablePointerEvents",0,1,0,this.Ug],["autoRotate",0,1,0,this.Ug]]),t||this.Ga("defaultSimpleLabelsSettings")},$.Ix=function(){this.P=$.mg(),this.kc="",this.f={},this.aa=11,this.ho={style:!1,text:!1,MC:!1},this.O=null,this.b=[],this.i=[],this.$a=this.ba=this.ea=this.na=!1,this.G=this.K=null,this.Ha=this.fb=0,this.Ka=null,this.Ba=""},$.Kx=function(t){t.ho.MC=!1;for(var e=0;e<t.i.length;e++){var i=t.i[e];if(i)for(var n=0;n<i.length;n++)i[n].ld();i.length=0}t.i.length=0,t.K&&(t.K.ld(),t.K=null),t.G&&(t.G.ld(),t.G=null),Jx(t),t.na=!1,t.ea=!1,t.ba=!1},Jx=function(t,e){var i,n;if(e){for(i=0;i<t.b.length;i++)(n=t.b[i])&&n.ld();t.b.length=0}else for(i=t.b.length-1;0<=i;i--)(n=t.b[i])&&(n.ho.text?(n.ld(),--t.b.length):n.style(t.f))},$.Mx=function(t){t.ho.MC||(t.ho.MC=!0,t.f.useHtml?$.Uc()?Lh(t):t.$a=!0:Lx(t))},Nx=function(t){t.D||(t.D=Hi("foreignObject"),t.Za=$.Me("div"),t.Za.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.D.appendChild(t.Za)),t.Za.innerHTML=t.kc||""},Lx=function(t){t.$a=!1;var e=t.kc.split(/\n/g),i=t.f.width,n=t.f.wordBreak,s=t.f.wordWrap;if(n&&null!=i){if("break-all"==n){if(t.ea=!0,!t.i.length)for(s=0;s<e.length;s++){i=e[s],n=[];for(var a="",o=0;o<i.length;o++)a+=i[o],n.push(Ox(t,a));t.i.push(n)}}else if(t.na=!0,!t.i.length)for(t.K=Ox(t,"W W",t.K),t.G=Ox(t,"W",t.G),i=0;i<e.length;i++){for(s=(n=e[i]).split(" "),a="",n=[],o=0;o<s.length;o++)a+=s[o],n.push(Ox(t,a)),a+=o==s.length-1?"":" ";t.i.push(n)}Jx(t,!0)}else if(null==s&&1<e.length){for(t.ba=!0,i=0;i<e.length;i++)n=e[i],t.b[i]?Ox(t,n,t.b[i]):t.b.push(Ox(t,n));for(;i<t.b.length;i++)t.b[i].ld();t.b.length=e.length}},$.Qx=function(t){if(t.$a)$.Kx(t),Jx(t,!0),$.Xe(t.Vd());else if(t.ho.MC){var e;if(t.ho.MC=!1,t.D&&($.Xe(t.D),t.D=null,t.Za=null),t.na||t.ea){for(e=0;e<t.b.length;e++){var i=t.b[e];i.Ij(),$.Px(i,t.O)}t.ia&&($.Xe(t.ia),t.O=null)}else if(t.ba){for(e=0;e<t.b.length;e++)(i=t.b[e]).Ij(),$.Px(i,t.O);t.ia&&($.Xe(t.ia),t.O=null)}}},Ox=function(t,e,i){return(i=i||new $.Ix).style(t.f),i.text(e),i.Ij(),i},$.Rx=function(t){if(t.o){for(var e=0;e<t.b.length;e++)$.Rx(t.b[e]);e=t.o.vn,t.Ka&&e&&(e.qX(t.sb),$.Lc(e.ru,t.Ka),$.Xe($.ze(window.document,t.Ka)),t.Ka=null)}},Sx=function(t,e){if(t.o){var i=t.Vd();if(t.f.textOverflow){$.Rx(t),t.sb=$.Ji(t.o.vn,Cp(1,t.f.fontOpacity,t.f.fontColor||"black"),void 0,void 0,e);var n="url("+Li()+"#";t.Ka=Ki(t.P,t.sb,t.o.vn,e),i.setAttribute("fill",n+t.Ka+")")}else i.setAttribute("fill",t.f.fontColor)}},$.Px=function(t,e,i){var n,s;if(t.$a)t.O!=e&&((t.O=e)?(Nx(t),e.appendChild(t.D)):t.D&&$.Xe(t.D));else if(t.na||t.ea){var a=xl($.vl);for(t.O=e,t.G&&$.Px(t.G,a),t.K&&$.Px(t.K,a),n=0;n<t.i.length;n++)if(s=t.i[n])for(var o=0;o<s.length;o++)$.Px(s[o],a,i);for(n=0;n<t.b.length;n++)(s=t.b[n])&&$.Px(s,e,i)}else if(t.ba)for(t.O=e,n=0;n<t.b.length;n++)(s=t.b[n])&&$.Px(s,e,i);else t.O!=e&&(t.O=e,t=t.Vd(),e?e.appendChild(t):$.Xe(t))},$.Wx=function(t,e,i){if($.p(i)&&(t.o=i),t.$a){Nx(t),t.D.setAttribute("x",e.left),t.D.setAttribute("y",e.top),t.D.setAttribute("width",e.width),t.D.setAttribute("height",e.height),i=e.width,e=e.height;var n=t.f,s="display: table-cell; ";if("fontStyle"in n&&(s+="font-style: "+n.fontStyle+"; "),"fontVariant"in n&&(s+="font-variant: "+n.fontVariant+"; "),"fontFamily"in n&&(s+="font-family: "+n.fontFamily+"; "),"fontSize"in n){var a=(0,window.parseFloat)(n.fontSize);s+="font-size: "+(a=(0,window.isNaN)(a)?13:a)+"px; "}"fontWeight"in n&&(s+="font-weight: "+n.fontWeight+"; "),"letterSpacing"in n&&(s+="letter-spacing: "+n.letterSpacing+"; "),"fontDecoration"in n&&(s+="text-decoration: "+n.fontDecoration+"; "),"fontColor"in n&&(s+="color: "+n.fontColor+"; "),"vAlign"in n&&(s+="vertical-align: "+n.vAlign+"; "),"hAlign"in n&&(s+="text-align: "+n.hAlign+"; "),"wordBreak"in n&&n.wordBreak&&(s+="word-break: "+n.wordBreak+"; "),"textShadow"in n&&"none"!=n.textShadow&&(s+="text-shadow: "+n.textShadow+"; "),t.Za.setAttribute("style",s+"width: "+i+"px; height: "+e+"px; max-width: "+i+"px; max-height: "+e+"px;")}else if(!t.f.textOverflow||t.f.textOverflow&&1<=e.width)if(t.ea)Tx(t,e);else if(t.na)Tx(t,e,!0);else if(t.ba)Ux(t,e);else{Jx(t,!0),i=t.Vd(),a=null!=t.f.height;var o=null!=t.f.width,r=t.height(),l=t.f.anchor,h=t.f.position;switch(n="top",s="left",o&&t.f.hAlign&&(s=t.f.hAlign),a&&t.f.vAlign&&(n=t.f.vAlign),a=(o=Vx(e,r,h,l)).left,o=o.top,o+=t.aa,n){case"middle":o=Math.max(o,e.top+e.height/2+t.aa/2);break;case"bottom":o=Math.max(o,e.top+e.height-t.Ha+t.aa)}switch(s){case"right":a=Math.max(a,a+e.width-t.Ta.width);break;case"center":a=Math.max(a,a+e.width/2-t.Ta.width/2)}Sx(t,e),i.setAttribute("x",a),i.setAttribute("y",o)}else $.Px(t,null)},Tx=function(t,e,i){var n=$.L(t.f.width,e.width);Jx(t,!0),t.ho.MC=!0,t.Ta.width=0,t.Ta.height=0;for(var s,a,o=i?t.fb:0,r=0;r<t.i.length;r++){for(var l,h=t.i[r],c=0,u=0,d="",p=0;p<h.length;p++)if((a=(s=h[p]).Ta).width-u-o>n){l=p?h[p-1]:s,s=new $.Ix;var g=l.kc.replace(d,"");d=l.kc+(i?" ":""),s.text(g),s.style(t.f),u=l.width(),g=new $.I(a.left,a.top,u-c,a.height),c=u+=+o,s.Ta=g,s.fb=o,s.o=t.o,t.b.push(s),t.Ta.width=Math.max(t.Ta.width,g.width),t.Ta.height+=g.height}(s=h[h.length-1])&&1<=h.length&&s!=l&&(g=s.kc.replace(d,""),a=s.Ta,h=new $.I(a.left,a.top,a.width-u,a.height),t.Ta.width=Math.max(t.Ta.width,h.width),t.Ta.height+=h.height,(s=new $.Ix).text(g),s.Ta=h,s.style(t.f),s.o=t.o,t.b.push(s))}Ux(t,e)},Ux=function(t,e){var i,n=0;for(i=0;i<t.b.length;i++){var s=t.b[i];s.o=t.o,n+=s.height()}var a=null!=t.f.height,o="top";i="left",null!=t.f.width&&t.f.hAlign&&(i=t.f.hAlign),a&&t.f.vAlign&&(o=t.f.vAlign),s=Vx(e,n,t.f.position,t.f.anchor);var r=a?$.L(t.f.height,e.height):e.height,l=s.top;switch("middle"==o?l=Math.max(l,e.top+r/2-n/2):"bottom"==o&&(l=Math.max(l,e.top+r-n)),n=l,o=s.left,i){case $.Ph:case"left":for(i=0;i<t.b.length;i++)s=t.b[i],n=Xx(s,o,r=n-l,e,a,!i,n);break;case"center":for(i=0;i<t.b.length;i++)s=t.b[i],r=n-l,o=Math.max(e.left,e.left+e.width/2-s.Ta.width/2),n=Xx(s,o,r,e,a,!i,n);break;case"end":case"right":for(i=0;i<t.b.length;i++)s=t.b[i],r=n-l,o=Math.max(e.left,e.left+e.width-s.Ta.width),n=Xx(s,o,r,e,a,!i,n)}},Xx=function(t,e,i,n,s,a,o){var r=t.Vd(),l=t.height();return i+=l,Sx(t,n),s&&i<=n.height||!s||a?(r.setAttribute("x",e+"px"),r.setAttribute("y",o+t.aa),o+=l):(r.setAttribute("x","-99999px"),r.setAttribute("y","-99999px")),o},$.Yx=function(t){var e,i;if(t.Ta=new $.I(0,0,0,0),t.ea)for(e=0;e<t.i.length;e++){var n=t.i[e];for(i=0;i<n.length;i++)$.Yx(n[i])}else if(t.na)for($.Yx(t.K),$.Yx(t.G),t.fb=t.K.Ta.width-2*t.G.Ta.width,e=0;e<t.i.length;e++)for(n=t.i[e],i=0;i<n.length;i++)$.Yx(n[i]);else if(t.ba)for(e=0;e<t.b.length;e++)i=t.b[e],$.Yx(i),t.Ta.width=Math.max(t.Ta.width,i.Ta.width),t.Ta.height+=i.height();else e=t.Vd().getBBox(),t.Ta.left=e.x,t.Ta.top=-e.y,t.Ta.width=e.width,t.Ta.height=t.Ha},Vx=function(t,e,i,n){return $.fc(n,"center")?t.top-=e/2:$.fc(n,"bottom")&&(t.top-=e),{left:(t=$.Eo(t,i)).x,top:t.y}},$.Zx=function(t){$.Pu.call(this,t),$.Aa(this.TX,"autoRotate")||this.TX.push("autoRotate"),$.T(this.ua,[["autoRotate",4,9]])},$.$x=function(){$.Tu.call(this),$.T(this.ua,[["autoRotate",16,9]])},$.dy=function(t,e,i){this.ka(),$.Y.call(this),i||(this.WC=this.Ga($.ur.markersFactory)),delete this.oa.enabled,this.wv=!!e,this.K=!t,this.o=this.wb=null,this.b={},$.T(this.ua,[["position",4,9],["offsetY",4,9],["offsetX",4,9],["fill",16,1],["stroke",16,1,0],["positionFormatter",4,9],["anchor",4,9],["size",4,9],["rotation",4,9],["type",4,9]]),this.B(4294967295),this.da(!0)},$.ey=function(){$.Y.call(this),delete this.oa.enabled,this.f={},$.T(this.ua,[["position",4,9],["offsetY",4,9],["offsetX",4,9],["fill",16,1],["stroke",16,1],["positionFormatter",4,9],["anchor",4,9],["size",4,9],["rotation",4,9],["type",16,1]]),this.Hi()},$.fy=function(t,e){return null!=e?(t.i!=e&&(t.i=e,t.B(16,1)),t):t.i},$.gy=function(t,e){return $.p(e)?(t.K!=e&&(t.K=e,t.B(16,1)),t):t.K},hy=function(t,e,i,n,s,a){return $.gy(t)&&$.fy(t)!=$.gy(t)?$.p(i)?i:a?s:$.p(e)?e:n:$.p(e)?e:n},iy=function(){$.dy.call(this)},jy=function(){$.ey.call(this)},ky=function(){$.V.call(this),this.Xb=this.Y=null,this.I(4294967295),$.T(this.ua,[["stroke",0,1],["fill",0,1],["width",0,1],["offset",0,1],["enabled",0,1]])},ly=function(){$.V.call(this),$.T(this.ua,[["stroke",16,1],["length",16,1]])},$.my=function(t,e,i,n){if($.V.call(this),this.Yj=t,this.ua=e,this.aa=i,$.p(n)){for(var s in t={},this.fC)t[s]=this.fC[s];n=$.sq(t,n),this.fC=t,$.U(this,n,!0)}},$.ny=function(){return new $.Pu},$.oy=function(){return new $.Pu(!0)},$.py=function(){return new $.Zx(!0)},$.qy=function(){return new $.dy},$.ry=function(){return new $.dy(void 0,void 0,!0)},Kca=function(){return new ky},$.sy=function(t){$.K(t,this.de,this),t.kb(this)},Lca=function(t){$.K(t,this.Nga,this),t.kb(this)},$.ty=function(t){$.K(t,this.Mn,this),t.kb(this)},Mca=function(t){$.K(t,this.tja,this),t.kb(this)},Nca=function(t){$.K(t,this.vg,this)},$.uy=function(t,e){for(var i=0;i<e.length;i++)$.tq.apply(null,$.Ga(t.ua,e[i]))},vy=function(t){"object"!=$.ka(t)||"enabled"in t||(t.enabled=!0)},wy=function(t){var e,i={labels:t.Da,minLabels:t.o,maxLabels:t.f,headers:t.i,lowerLabels:t.K,markers:t.Bc,outlierMarkers:t.D,outline:t.G,connector:t.b,background:t.Ia};for(e in i){var n=i[e];n&&n.df&&(n.df(),n.WC.length&&n.Ga.apply(n,n.WC),$.W(t,e,n))}},$.xy=function(t,e){e?t.setAttribute("role",e):t.removeAttribute("role")},$.zy=function(t,e,i){$.A(i)&&(i=i.join(" "));var n="aria-"+e;""===i||null==i?(yy||(yy={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"}),e in(i=yy)?t.setAttribute(n,i[e]):t.removeAttribute(n)):t.setAttribute(n,i)},$.Ay=function(){},$.By=function(t){$.qf.call(this),this.f=t||$.ye(),this.$a=Oca,this.he=null,this.xf=!1,this.Ed=null,this.G=void 0,this.D=this.o=this.Y=this.dh=null,this.fb=!1},$.Cy=function(t,e){switch(t){case 1:return e?"disable":"enable";case 2:return e?"highlight":"unhighlight";case 4:return e?"activate":"deactivate";case 8:return e?"select":"unselect";case 16:return e?"check":"uncheck";case 32:return e?"focus":"blur";case 64:return e?"open":"close"}throw Error("Invalid component state")},$.Dy=function(t){return t.G||(t.G=new nf(t)),t.G},$.Ey=function(t){return null==t.$a&&(t.$a=$.Qf(t.xf?t.Ed:t.f.b.body)),t.$a},$.Fy=function(t){return t.o?t.o.length:0},$.Gy=function(t,e){if(t.D&&e){var i=t.D;i=(null!==i&&e in i?i[e]:void 0)||null}else i=null;return i},$.Hy=function(t,e){$.By.call(this,e),this.i=t||""},$.Jy=function(){return null!=Iy||(Iy="placeholder"in $.Re(window.document,"INPUT")),Iy},Ky=function(t){!t.K&&t.Qg&&t.Ya().form&&(t.Qg.wa(t.Ya().form,"submit",t.tga),t.K=!0)},$.Ly=function(t){return!!t.Ya()&&""!=t.Ya().value&&t.Ya().value!=t.i},$.My=function(t,e){null!=t.Ut&&(t.Ut=e),t.Ya().value=e,t.fo()},$.Ny=function(){$.Y.call(this),this.pa=this.b=this.o=null,this.i=!1,$.su(this,this),$.T(this.ua,[["scaleRangeMode",4,4]])},$.Py=function(t){var e=t.scale();if(e){var i=$.Oy(t);i.clear();var n=t.g("to"),s=t.g("from"),a=e.transform(s),o=e.transform(n);a>o&&(n=t.g("from"),s=t.g("to")),a=e.transform(s,0),e=e.transform(n,1),s=Math.min(e,a);var r=Math.max(e,a);(0,window.isNaN)(s)||(0,window.isNaN)(r)||!(0<=r&&1>=s||t.i)||(t.i||(s=$.Za(s,0,1),r=$.Za(r,0,1)),e=t.ja(),n=t.Qp(),t.Nb()?(a=Math.floor(e.Va()-e.height*r),s=Math.ceil(e.Va()-e.height*s),o=e.tb(),r=e.cb(),i.moveTo(o,a).lineTo(r,a).lineTo(r,s).lineTo(o,s).close()):(a=e.Va(),o=e.Vb(),s=Math.floor(e.tb()+e.width*s),r=Math.ceil(e.tb()+e.width*r),i.moveTo(s,a).lineTo(s,o).lineTo(r,o).lineTo(r,a).close()),t.i||i.clip(n.Ej(e)))}else $.il(2)},$.Oy=function(t){return t.D||(t.D=$.qk(),$.ru(t,t.D)),t.D},$.Qy=function(){$.Y.call(this),$.T(this.ua,[["stroke",0,1],["length",0,9],["position",0,9]]),this.path=$.qk(),$.ru(this,this.path)},$.Ry=function(t){if(!t.ep)switch(t.vh){case"top":t.ep=t.h1;break;case"right":t.ep=t.nT;break;case"bottom":t.ep=t.hT;break;case"left":t.ep=t.lT}return t.ep},$.Sy=function(){this.ka(),$.Y.call(this),this.Ga($.ur.axis),this.ci=[],this.Fk=[],this.Nd={},this.Nd.orientation="top",this.se=980,$.T(this.ua,[["width",this.se,9],["drawFirstLabel",this.se,9,0,function(){this.ae(),this.ns()},this],["drawLastLabel",this.se,9,0,function(){this.ae(),this.ns()},this],["staggerMode",this.se,9,0,this.ae,this],["overlapMode",this.se,9],["staggerMaxLines",0,0,0,function(){this.ae(),this.ns(),this.g("staggerMode")&&this.B(this.se,9)},this],["staggerLines",0,0,0,function(){this.ae(),this.ns(),this.g("staggerMode")&&this.B(this.se,9)},this],["orientation",this.se,9,0,this.ns,this],["stroke",this.se,9],["value",this.se,9,void 0,function(){null===this.g("value")?this.zh=void 0:this.zh=25,this.B(8)},this]]),this.da(!1)},$.Ty=function(t,e){if($.p(e)){var i=t.g("orientation")!=e;t.Nd.orientation=e,i&&t.B(t.se)}},Vy=function(t,e){var i=t.labels().enabled(),n=t.qb().enabled(),s=t.g("staggerMode");if(i||n)if(s)if(t.na)i=t.na;else if(s=t.labels(),(i=t.scale())&&s.enabled()){t.AJ=1,t.G=1,n=(i=i.Xa().get()).length;for(var a,o,r,l,h=0;h<n;h++)t.be(h,!0,i,e);s=s.g("position");var c=t.UH&&0>$.Ho(s)?t.UH:null,u=t.g("staggerMaxLines"),d=t.g("staggerLines"),p=t.g("drawFirstLabel"),g=t.g("drawLastLabel");for(s=[],h=0;h<n;h++)!h&&!p||h==n-1&&!g?s[h]=!1:(o=t.rd(h,!0,i,e),s[h]=!c||!Uy(t,c,o));if(null===d){var f=!1;for(h=1;!f&&h<=n;)for(f=!0,o=0;o<h;o++){for(a=o;a<n-h;a+=h){r=t.rd(a,!0,i,e);var b=t.rd(a+h,!0,i,e);if(s[a]&&$.bn(r,b)){f=!1,h++;break}}if(!f)break}t.AJ=f?h:n,t.G=null!==u&&t.AJ>u?u:t.AJ}else t.G=d;if((null!==d||null!==u&&t.AJ>u)&&"no-overlap"==t.g("overlapMode")){for(a=0;a<t.G;a++)for(u=-1,h=a;h<n;h+=t.G)r=t.rd(h,!0,i,e),b=-1!=u?t.rd(u,!0,i,e):null,l=h!=n-1&&t.g("drawLastLabel")?t.rd(n-1,!0,i,e):null,o=!c||!Uy(t,c,r),h?h==n-1?g&&o?(u=h,s[h]=!0):s[h]=!1:!o||$.bn(r,b)||$.bn(r,l)?s[h]=!1:(u=h,s[h]=!0):p&&o?(u=h,s[h]=!0):s[h]=!1;p||(s[0]=!1),g||(s[s.length-1]=!1)}for(b={labels:s,qb:!1},t.aa=[],t.ba=[],t.o||(t.o=[]),h=o=0;h<n;h++)(!s||s&&s[h])&&(t.o[h]?l=t.o[h]:(l=t.rd(h,!0,i,e),t.o[h]=l=$.mn(l)),l=t.Nb()?l.height:l.width,(!t.aa[o]||t.aa[o]<l)&&(t.aa[o]=l),t.ba[o]||(t.ba[o]=[]),t.ba[o].push(h),(o+1)%t.G?o++:o=0);i=t.na=b}else i=t.na={labels:!1,qb:!1};else i=t.sy(e);else i=!0;return i},$.Wy=function(t,e,i,n){var s=0,a=0,o=0,r=t.title(),l=t.labels(),h=t.qb(),c=t.g("orientation");r.enabled()&&(r.O()||r.O(t.O()),r.ka(),r.ja(e),$.dw(r,c),o=t.Nb()?r.yi().height:r.yi().width,r.da(!1)),r=t.scale(),l=l.enabled()&&$.p(r),h=h.enabled()&&$.p(r)&&$.J(r,$.kt);var u=t.Nb()?i:0;i=t.Nb()?0:i;var d=e?e.left:0,p=e?e.top:0,g=t.padding(),f=$.L(g.g("top"),e.height),b=$.L(g.g("right"),e.width),v=$.L(g.g("bottom"),e.height);switch(e=$.L(g.g("left"),e.width),c){case"top":case"left":d+=e,p+=f;break;case"right":d+=u-b,p+=f;break;case"bottom":d+=e,p+=i-v}if(c=new $.I(d,p,u,i),u=Vy(t,c),d=t.g("staggerMode"),l&&r)if(i=r.Xa().get(),f=$.C(u)?u.labels:!u,d)for(l=0;l<t.aa.length;l++)s+=t.aa[l];else for(l=0,e=i.length;l<e;l++)($.A(f)?f[l]:f)&&(p=$.mn(t.rd(l,!0,i,c)),(p=t.Nb()?p.height:p.width)>s&&(s=p));if(h&&!d)for(h=$.C(u)?u.qb:!u,i=r.yb().get(),l=0,e=h.length;l<e;l++)($.A(h)?h[l]:h)&&(p=$.mn(t.rd(l,!1,i,c)),(p=t.Nb()?p.height:p.width)>a&&(a=p));return t.l0(s,a,n)+o},Xy=function(t,e){var i=t.scale();return $.A(e)?(i.transform(e[0],0)+i.transform(e[1],1))/2:i.transform(e,.5)},Pca=function(t,e,i,n,s){var a=$.p(s)?s:t.ob();s=$.p(s)?s:t.line.rb();var o=i?t.Xa():t.yb(),r=i?t.labels():t.qb();return i=t.g("stroke"),i=$.dp(i),e=Xy(t,n[e]),n=r.g("position"),o=$.Io(o,$.Ho(n)),{value:{x:(t=t.HM(a,e,i,o,s)).x,y:t.y}}},Uy=function(t,e,i){var n=!1;switch(t.g("orientation")){case"top":case"bottom":n=e.left>i[0]||e.cb()<i[2];break;case"right":case"left":n=e.top>i[1]||e.Va()<i[7]}return n},Yy=function(){$.Sy.call(this)},$.Zy=function(){uv.call(this),this.pa=this.b=this.o=null,this.D="horizontal",this.i=null,this.G=!1,$.su(this,this),$.T(this.ua,[["align",4,9],["scaleRangeMode",4,4]])},$.$y=function(t,e){var i=!t.f&&t.D!=e;t.D=e,i&&t.B(4)},az=function(t){return $.p(void 0)?(void 0!==t.g("value")&&t.value(void 0),t):t.g("value")},$.bz=function(t){$.V.call(this),this.b=t||null,this.Da=null,this.pA={},this.f=[],this.ye=[],this.i=!1},$.dz=function(t){if(t.i=!1,t.b)var e=$.A(t.b)?t.b:[t.b];else{var i=$.Qo($.Ro()),n=$.Qo("default");n=(i=i||n)&&i.formats||n.formats}if(e)for(i=0;i<e.length;i++){var s=e[i];s in t.pA||cz(t,s)}else if(n){for(var a in n)if(e=n[a],$.ec(a,"timeline_"))for(i=0;i<e.length;i++)(s=e[i])in t.pA||cz(t,s)}else"yyyy/MM/dd'T'HH:mm:ss.SSS"in t.pA||cz(t,"yyyy/MM/dd'T'HH:mm:ss.SSS")},$.ez=function(t){if(!t.i){for(var e=0;e<t.ye.length;e++){var i=t.ye[e],n=t.f[e];n.width=i.Ta.width,n.height=i.Ta.height}t.i=!0}},cz=function(t,e){var i={index:t.f.length,width:window.NaN,height:window.NaN,format:e};t.pA[e]=i,t.f.push(i),(i=new $.Ix).text($.us(Qca,e,0)),i.style(t.labels().flatten()),i.Ij(),t.ye.push(i)},$.fz=function(){$.kt.call(this),this.Ga("defaultLinearColorScale"),this.BI=this.HI=0,this.yw=10},$.gz=function(t){var e=new $.fz;return e.N(e.oa),e.Jj.apply(e,arguments),e},hz=function(t){$.Ot.call(this,t)},$.iz=function(){Xs.call(this),this.df().Ga("defaultScaleSettings.ordinalColor","defaultOrdinalColorScale"),this.Wf=this.Xe=null,this.jd=[],this.bo=this.xk=null,this.la=[],this.eW=!1},Rca=function(t){$.Pa(t,(function(t,e){var i=t.start>e.start?1:t.start<e.start?-1:0;return i||(i=t.end>e.end?1:t.end<e.end?-1:0),(t.gp&&e.gp?Math.max(t.start,e.start)<=Math.min(t.end,e.end):Math.max(t.start,e.start)<Math.min(t.end,e.end))&&(t.start>e.start?t.sourceIndex>e.sourceIndex?e.end=t.start:(t.start=e.end,t.start>=t.end&&(t.enabled=!1)):t.start<e.start?t.sourceIndex>e.sourceIndex?(e.start=t.end,e.start>=e.end&&(e.enabled=!1)):t.end=e.start:t.sourceIndex>e.sourceIndex?(e.start=t.end,e.start>=e.end&&(e.enabled=!1)):(t.end=e.start,t.start>=t.end&&(t.enabled=!1))),i}))},$.jz=function(t){var e=new $.iz;return e.N(e.oa),e.Yy(t),e},$.kz=function(){$.Y.call(this),this.Ga("defaultGridSettings"),this.o=null,this.HL="horizontal",this.Fa=this.Xb=this.Y=null,this.D={},this.aa=null,$.T(this.ua,[["stroke",16],["fill",4],["drawFirstLine",64],["drawLastLine",64],["isMinor",80,9]])},lz=function(t,e){$.J(e,$.Ms)||$.C(e)&&"range"==e.type?t.Hc($.Ms):($.J(e,$.Gs)||$.C(e)||null==t.Fa)&&t.Hc($.Gs)},$.mz=function(t,e){var i=!t.f&&t.HL!=e;t.HL=e,i&&t.B(64)},nz=function(t,e,i){var n=e?t.aa:t.qa;if($.p(i)){var s=i&&$.D(i.Ma)&&i.Ma(),a=(s="stock-scatter-date-time"==s||"stock-ordinal-date-time"==s)?i==n?null:i:$.jt(n,i,null,15,null,t.zg,t);(a||null===i&&n)&&(i=n==a,a||$.kr(n,t.zg,t),n=a,e?t.aa=n:t.qa=n,a&&!s&&a.da(i),i||t.B(20,9))}},$.oz=function(t,e){var i=t.g("fill");if($.D(i)){var n={index:e,grid:t,palette:t.cc()||t.Y.cc()};i=i.call(n)}return(n=e in t.D?t.D[e.toString()]:t.D[e.toString()]=t.d_()).fill(i),n},pz=function(){$.kz.call(this)},qz=function(){$.kz.call(this)},sz=function(){$.qf.call(this),this.dc=$.rz,this.D=this.o=null},$.vz=function(t){t=$.oa(t),delete tz[t],$.Jc(tz)&&uz&&uz.stop()},wz=function(){uz||(uz=new nw((function(){Sca()}),20));var t=uz;t.uq()||t.start()},Sca=function(){var t=(0,$.Ln)();$.Dc(tz,(function(e){e.uG(t)})),$.Jc(tz)||wz()},$.xz=function(t,e,i,n){if(sz.call(this),!$.A(t)||!$.A(e))throw Error("Start and end parameters must be arrays");if(t.length!=e.length)throw Error("Start and end points must be the same length");this.b=t,this.f=e,this.duration=i,this.K=n,this.coords=[],this.Kd=0},yz=function(t,e){$.D(t.K)&&(e=t.K(e)),t.coords=Array(t.b.length);for(var i=0;i<t.b.length;i++)t.coords[i]=(t.f[i]-t.b[i])*e+t.b[i]},zz=function(t,e){wd.call(this,t),this.coords=e.coords,this.x=e.coords[0],this.y=e.coords[1],this.duration=e.duration,this.Kd=e.Kd,this.state=e.dc},Az=function(){sz.call(this),this.Wb=[]},Bz=function(){Az.call(this),this.b=0},Cz=function(){Az.call(this),this.b=0},Dz=function(){Bz.call(this)},$.Ez=function(t,e,i,n,s){$.xz.call(this,e,i,n,s),this.X=t},Fz=function(t,e,i){$.Ez.call(this,t,[],[],e,i)},Gz=function(t,e,i){$.Ez.call(this,t,[0,0],[0,0],e,i),this.G=window.NaN},Hz=function(t,e,i){$.Ez.call(this,t,[],[],e,i)},$.Jz=function(t,e,i){var n;if(n=t.prototype.js?$.Qc(t.prototype.js):{},$.A(i))for(var s=0;s<i.length;s++)Iz(n,e,i[s]);else Iz(n,e,i);t.prototype.js=n},Iz=function(t,e,i){t[e]||(t[e]={Ku:0,B3:-1,DJ:{}});var n=(t=t[e]).DJ;if(n[i])$.kl(702,void 0,[e,i]);else if(31==t.B3)$.kl(700,void 0,[e]);else{var s=++t.B3;n[i]=1<<s,t.Ku|=n[i],31==s&&$.kl(701,void 0,[e])}},$.Kz=function(){$.V.call(this),this.uY=[{kk:"area splineArea stepArea rangeArea rangeSplineArea rangeStepArea polygon".split(" "),JP:"areaLike"},{kk:"bar column box rangeBar rangeColumn candlestick waterfall".split(" "),JP:"barLike"},{kk:"hilo line spline stepLine jumpLine ohlc stick polyline".split(" "),JP:"lineLike"},{kk:"rangeBar rangeColumn rangeArea rangeSplineArea rangeStepArea hilo".split(" "),JP:"rangeLike"}],this.PB={}},$.Lz=function(){$.Y.call(this)},$.Mz=function(){$.Bx.call(this),this.hb=[],this.fc=this.fd=this.He=this.Fa=null;var t={};$.T(t,[["labels",0,0],["minLabels",0,0],["maxLabels",0,0]]),this.ca=new $.my(this,t,$.gm),this.ca.ta("labelsFactoryConstructor",$.oy),this.ca.ta("labelsAfterInitCallback",(function(t){t.I(4294967295),$.K(t,this.Kn,this)})),t={},$.T(t,[["labels",0,0],["minLabels",0,0],["maxLabels",0,0]]),this.za=new $.my(this,t,$.vo),this.za.ta("labelsFactoryConstructor",$.oy),$.T(t,[["labels",0,0],["minLabels",0,0],["maxLabels",0,0]]),this.Ea=new $.my(this,t,$.wo),this.Ea.ta("labelsFactoryConstructor",$.oy),$.T(this.ua,[["defaultSeriesType",0,0],["maxBubbleSize",32768,1,0,this.e3],["minBubbleSize",32768,1,0,this.e3],["pointWidth",32768,1,0,this.Ey],["maxPointWidth",32768,1,0,this.Ey],["minPointLength",32768,1,0,this.rB],["baseline",32768,1,0,this.Yja]])},$.Nz=function(t,e){function i(t){return function(e,i){return this.Ae(t,e,i)}}var n,s=t.prototype;for(n in e)s[$.pm(n)]=i(n)},$.Oz=function(t){var e,i=[Number.MAX_VALUE,-Number.MAX_VALUE];for(e=t.hb.length;e--;)if(t.hb[e].Ak()){var n=t.hb[e],s=i;if(n.J(512)){n.cP=Number.POSITIVE_INFINITY,n.bP=Number.NEGATIVE_INFINITY;for(var a=n.cg();a.advance();){var o=Number(a.get("size"));!(0,window.isNaN)(o)&&(0<=o||n.g("displayNegative"))&&((o=Math.abs(o))>n.bP&&(n.bP=o),o<n.cP&&(n.cP=o))}}s[0]=Math.min(s[0],n.cP),s[1]=Math.max(s[1],n.bP)}for(e=t.hb.length;e--;)t.hb[e].Ak()&&(n=t.hb[e],s=i[1],a=t.g("minBubbleSize"),o=t.g("maxBubbleSize"),n.sW=i[0],n.V3=s,n.Vha=a,n.Oha=o)},$.Pz=function(t,e,i,n,s){var a;if(t.J(32768)){$.xr(t.hb);var o=0;for(a=t.hb.length;o<a;o++){var r=t.hb[o];r.O(t.Na),r.ja(t.fc),t.Z5(r,e,i,n,s)}t.aL(),t.g1(),t.rB(!0),t.I(32768),$.zr(t.hb)}},$.Qz=function(t){function e(){this.Ey()}$.Mz.call(this),this.yX=this.ax=null,this.Ks=void 0,this.So=t,this.Fc=this.eb=null,this.FD=!1,this.pn={},this.mm={},this.Re=[],this.xn={},$.T(this.ua,[["barGroupsPadding",32772,9,0,e],["barsPadding",32772,9,0,e]])},$.Rz=function(t,e){for(var i=0,n=0;n<t.hb.length;n++){var s=t.hb[n];!s||!s.enabled()||e&&s.tl()!=e&&s.bb()!=e||(i|=s.B(1024))}i&&t.uV()},Sz=function(t){if(t.J(131072)){$.xr(t.hb);var e,i,n=t.hb.length,s=!n,a={},o={};for(e=0;e<n;e++)if(i=t.hb[e]){var r=i.Ra(),l=$.oa(r);a[l]=r,l in t.mm||(s=!0),r=i.bb(),o[l=$.oa(r)]=r,l in t.pn||(s=!0)}t.pn=o,t.mm=a,s&&(t.MA(),t.B(302350336)),$.zr(t.hb),t.I(131072)}},Uca=function(t){for(var e={},i=0;i<t.length;i++)for(var n=t[i],s=n.X.vm||[],a=0;a<s.length;a++){var o=s[a];e[o]=!0,n.data[o].j.missing=(Number(n.data[o].j.missing)||0)|(Number(Tz)||0)}return paa(e,(function(e,i){for(var n=0;n<t.length;n++)if(!Uz(t[n].data[+i].j.missing,Tca))return!1;return!0}))},Vca=function(t,e){var i=t[0].data,n=i.length,s=e.Mc(0),a=e.Mc(1);if(n){var o=function(t,e){return t-e.data.x};0>(s=$.Na(i,s,o))&&(s=~s-1),s=$.Za(s,0,n-1),0>(i=$.Na(i,a,o))&&(i=~i),i=$.Za(i,0,n-1),e.inverted()&&(n=s,s=i,i=n)}else s=i=window.NaN;return[s,i,s,i]},Vz=function(t){var e,i=[];for(e in t)i.push(t[e]);return i},Xz=function(t,e,i){var n=t.fc||$.kn(0,0,0,0),s=n.left,a=n.top,o=n.width,r=n.height;if(e-=(n=$.Zj(t.O().Ja())).x,i-=n.y,n=t.Ks?(r-(i-a))/r:(e-s)/o,e<s||e>s+o||i<a||i>a+r)return null;s=[];var l=t.qU();for(a=0,o=l.length;a<o;a++)if((r=l[a])&&r.enabled()){var h=r.Ra().Mc(n);if(t.So)var c=0<=(h=$.Wz(r,h))?[h]:$.A(h)?h:[];else c=$.Er(r.data(),h,$.J(r.Ra(),$.Qt));h=r.$();var u=window.Infinity;if(c.length){for(var d=0;d<c.length;d++)if(h.select(c[d]))for(var p=h.j("x"),g=r.Be(),f=0;f<g.length;f++){var b=h.j(g[f]);if((b=$.gn(p,b,e,i))<u){u=b;var v=c[d]}}s.push({X:r,vd:c,Ln:c[c.length-1],De:{index:v,Tf:u}})}}return s},$.Yz=function(t,e,i,n,s,a,o,r){for(var l=[],h=0;h<n.length;h++){var c=n[h];c&&l.push(s.call(t,c,a,o,r))}l.length&&(e[i]=l)},$.Zz=function(t,e,i,n,s){if(i){var a=$.oa(i);a in s||(s[a]=n.length,n.push(i.F())),t[e]=s[a]}},$.$z=function(){$.Ny.call(this),this.Ga("defaultLineMarkerSettings"),this.G="horizontal",$.T(this.ua,[["stroke",16,1],["value",0,0,0,function(){this.B(4,this.uD())}]])},$.aA=function(t,e){var i=!t.f&&t.G!=e;t.G=e,i&&t.B(4)},bA=function(){$.$z.call(this),this.Ga("standalones.lineAxisMarker")},$.cA=function(){function t(){this.B(4,this.uD())}$.Ny.call(this),this.Ga("defaultRangeMarkerSettings"),this.G="horizontal",$.T(this.ua,[["fill",16,1],["from",0,0,0,t],["to",0,0,0,t]])},$.dA=function(t,e){var i=!t.f&&t.G!=e;t.G=e,i&&t.B(4)},eA=function(){$.cA.call(this),this.Ga("standalones.rangeAxisMarker")},$.fA=function(){$.Zy.call(this),this.Ga("defaultFontSettings","defaultLabelSettings","defaultTextMarkerSettings"),$.T(this.ua,[["value",0,0,0,function(){this.B(4,this.uD())}]])},gA=function(){$.fA.call(this),this.Ga("standalones.textAxisMarker")},hA=function(){uv.call(this),this.aa=0,this.Oo=this.No=window.NaN,$.T(this.ua,[["format",20,9],["axisIndex",0,2]])},$.iA=function(){$.Y.call(this),this.mc=this.Yl=null,this.Pr=$.qk(),this.Sr=$.qk(),this.Pr.Dd(!0),this.Sr.Dd(!0),this.SY=!0,this.Y=this.Xb=null,this.nL={},$.T(this.ua,[["xStroke",16,1],["yStroke",16,1],["displayMode",0,0]])},lA=function(t,e,i){for(t=i?$.jA(t):$.kA(t),i=0;i<e.length;i++)e[i]&&t[i]&&t[i].df().parent(e[i])},mA=function(t,e,i,n){var s;for(s in t.nL){var a=t.nL[s],o=n?$.jA(a):$.kA(a);(o=o[i])||(o=n?a.YB(i):a.ZB(i)),o.df().parent(e)}t.Y&&((s=(o=n?$.jA(t.Y):$.kA(t.Y))[i])||(s=n?t.Y.YB(i):t.Y.ZB(i)),e.df().parent(s))},$.nA=function(t){switch(t.orientation()){case"left":return"right-center";case"top":return"center-bottom";case"right":return"left-center";case"bottom":return"center-top";default:return"left-top"}},$.jA=function(t){if(!t.hQ){t.hQ=[];var e,i=t.oa.xLabels;if($.A(i))for(e=0;e<i.length;e++)t.YB(e,i[e]);else"xLabel"in t.oa&&t.YB(0,t.oa.xLabel)}return t.hQ},$.kA=function(t){if(!t.kQ){t.kQ=[];var e,i=t.oa.yLabels;if($.A(i))for(e=0;e<i.length;e++)t.ZB(e,i[e]);else"yLabel"in t.oa&&t.ZB(0,t.oa.yLabel)}return t.kQ},$.oA=function(t,e){for(var i=t.length,n=0;n<i;n++){var s=t[n];s&&s.O(e)}},$.pA=function(t,e){for(var i=t.length,n=0;n<i;n++){var s=t[n];s&&s.ja(e)}},$.qA=function(t,e){return $.p(e)?(t.Yl!=e&&(t.Yl&&(t.Yl.gc("mouseover",t.If,!1,t),t.Yl.gc("mousemove",t.If,!1,t),t.Yl.gc("mouseout",t.hg,!1,t)),t.Yl=e,t.Yl&&(t.Yl.wa("mouseover",t.If,!1,t),t.Yl.wa("mousemove",t.If,!1,t),t.Yl.wa("mouseout",t.hg,!1,t))),t):t.Yl},rA=function(t,e){if($.p(e))e.O(null),e.remove();else for(var i=$.jA(t),n=0;n<i.length;n++){var s=i[n];s&&(s.O(null),s.remove())}},sA=function(t){return"left-top"==(t=t.vA())||"center-top"==t||"right-top"==t},tA=function(){$.V.call(this),$.tq(this.ua,"stroke",0,1)},uA=function(){$.yu.call(this),this.Ga("chart.defaultQuarterSettings"),this.Wa=this.Qc=this.jb=null,this.Da=[]},vA=function(t){$.V.call(this),this.Ga("chart.defaultQuarterSettings"),this.pa=t,this.i=this.b=this.f=this.o=null,this.D=[]},$.wA=function(t){$.Qz.call(this,t),this.$f=null,this.b=[],this.qf=[],this.og=[],this.rg=[],this.tg=[],this.Yg=[],this.Zg=[],this.jh=[],this.kh=[],this.na=null,this.aa=$.eq.annotations},xA=function(t,e){var i=e.Nb()^t.xa()?t.bb():t.Ra();$.J(e,$.kz)?nz(e,!0,i):e.WK(i)},yA=function(t,e){var i=e.dF();return $.J(i,$.Sy)?i:$.Aa(t.b,e)?t.qf[i]:$.Aa(t.qf,e)?t.b[i]:e},zA=function(t,e,i){t.pb(),e=$.Qc(e);var n,s,a=$.Ga(t.og,t.rg,t.tg,t.Yg,t.Zg,t.jh,t.kh);for(s=0;s<a.length;s++)if(n=a[s]){var o=!!(n.Nb()^t.xa());i^o&&(o=n.scale())&&((n=String($.oa(o)))in e||(e[n]=o))}for(t=i?t.b:t.qf,s=0;s<t.length;s++)(o=t[s]&&t[s].scale())&&((n=String($.oa(o)))in e||(e[n]=o));return e},AA=function(t,e){for(var i=Vz(e),n=$.Ga(t.og,t.rg,t.tg),s=0;s<n.length;s++){var a=n[s];if(a&&a.enabled()){var o=a.Nb()^t.xa()?t.bb():t.Ra();if(o=a.scale()?a.scale():o)for(var r=0;r<i.length;r++){var l=i[r];l===o&&"consider"==a.g("scaleRangeMode")&&l.Xc.apply(l,a.xs())}}}},Wca=function(t,e){var i=e.g("value"),n=yA(t,e);if(!n)return!0;var s=n.scale();return n=null===i,i=s.transform(i),s=s.sD()/2,n||!(0,window.isNaN)(i)&&i>=-s&&i<=1-s},$.BA=function(t,e){var i=t.bu(),n=$.p(e)?e:t.oa,s=$.p(e);t.im(n.xGrids,t.lm,i,s),t.im(n.yGrids,t.nm,i,s),t.im(n.xMinorGrids,t.Qr,i,s),t.im(n.yMinorGrids,t.Tr,i,s)},CA=function(t,e){for(var i=0;i<e.length;i++){var n=t[i];null!=n&&n.dF(e[i])}},DA=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n];s?(s=s.dF(),i[n]=$.ea(s)?s:(0,$.za)(e,s)):i[n]=null}return i},$.EA=function(t,e){this.ya=t,this.index=$.P(e,0,!0),this.kn={}},$.FA=function(t,e){$.EA.call(this,t.xc(),e),this.X=t},GA=function(t,e){$.FA.call(this,t,e)},$.HA=function(t,e,i,n){e?t.moveTo(n,i):t.moveTo(i,n)},$.IA=function(t,e,i){if(e)var n=1,s=0;else n=0,s=1;for(var a=2;a<arguments.length;a+=2)t.lineTo(arguments[a+n],arguments[a+s])},$.JA=function(t){$.od.call(this),this.X=t},KA=function(t,e){return 0>(t.prevValue-t.aa||1)*(e-t.aa||1)},Uz=function(t,e){return!!((Number(t)||0)&(e||255))},LA=function(t){$.V.call(this),this.Sa=t,this.b=null,$.T(this.ua,[["start",0,1],["point",0,1],["updatePoint",0,1],["finish",0,1],["needsZero",0,4],["needsWidth",0,4],["yValues",0,4]])},OA=function(t,e,i,n,s){if(t){var a=void 0;if(s&&!(a=i.j("shapes")))return;e=i?new MA(e,i,n||$.gm,a):new NA(e),t.call(e,e)}},NA=function(t){this.series=t,this.seriesState=t.fk()},MA=function(t,e,i,n){NA.call(this,t),this.b=e;for(var s=t.Be(),a=0;a<s.length;a++){var o=s[a];this[o]=e.j(o)}t.check(2)&&(this.size=e.j("size")),this.x=e.j("x"),this.pointState=i,this.missing=!!e.j("missing"),this.categoryWidth=t.q0,t.sp()&&(this.pointWidth=t.yu),$.PA(t)&&(this.zero=e.j("zero")),n&&(this.shapes=n)},$.QA=function(t,e,i,n,s,a){for($.od.call(this),this.P=n||"shapes",this.Jb=s||$.ia,this.X=t,this.Bd=null,this.aa=i,this.i={},this.D={},this.G={},this.f={},this.YC=!!a,t=0;t<e.length;t++){switch(i=e[t],n=$.cm(i.Yb,i.Ib?3:1,i.ac,i.Ik),s=$.cm(i.Zb,2,i.ac,i.Ik),a=i.Qb,String(a).toLowerCase()){case"none":var o=null;break;case"rect":o=$.mk;break;case"circle":o=$.nk;break;case"ellipse":o=$.pk;break;default:o=$.qk}this.i[a]||(this.i[a]=[],this.D[a]=[],this.G[a]=0),this.f[i.name]={fill:n,stroke:s,zIndex:+i.zIndex,Ib:i.Ib,nS:o,Qb:a,Yb:i.Yb,Zb:i.Zb}}},$.RA=function(t,e){if(t.Bd!=e)for(var i in t.Bd=e,t.i)for(var n=t.i[i],s=0;s<n.length;s++)n[s].parent(e)},TA=function(t,e,i,n,s,a,o){var r=(e=t.f[e]).fill(t.X,i),l=e.stroke(t.X,i);return a.fill(r),a.stroke(l),a.eq(t.YC),a.zIndex(e.zIndex+s),t.aa&&t.jP(a,e.Ib,n),e.Ib||SA(t,r,l),i=!(r||i!=$.gm&&e.fill(t.X,$.gm)||i!=$.vo&&e.fill(t.X,$.vo)||i!=$.wo&&e.fill(t.X,$.wo)),(o?e.Ib&&i:e.Ib)?i?a.parent(null):a.parent(t.Bd):o&&a.parent(t.Bd),a},$.UA=function(t,e,i,n,s){var a,o={};for(var r in i=i||t.f,a=!t.X.eh()||t.X.$().ma(),i)if("none"==i[r].Qb&&s)$.J(s,$.pg)&&(o[r]=TA(t,r,e,a,n||0,s));else{var l=r,h=void 0,c=t,u=r,d=e,p=a,g=n||0,f=c.f[u],b=f.Qb;c.D[b].length>c.G[b]?h=c.D[b][c.G[b]]:c.D[b].push(h=f.nS()),c.G[b]++,c.i[b].push(h),h=TA(c,u,d,p,g,h,!0),o[l]=h}return t.Jb(t.X,o,e),o},VA=function(t,e,i){for(var n in i){var s=t.f[n],a=i[n],o=s.fill(t.X,e),r=s.stroke(t.X,e);a.fill(o),a.stroke(r),s.Ib&&("none"==a.fill()&&"none"==a.stroke()?a.visible(!1):a.visible(!0)),s.Ib||SA(t,o,r)}t.Jb(t.X,i,e)},SA=function(t,e,i){t=t.X.$(),$.p(e)&&t.j("fill",e),$.p(i)&&t.j("stroke",i)},$.WA=function(t,e,i,n,s,a){$.QA.call(this,t,e,i,n,s,a)},$.XA=function(t,e,i,n,s,a){$.QA.call(this,t,e,i,n,s,a),this.o={}},YA=function(t,e,i,n,s){var a=void 0;if(n){var o=t.X.$();a=$.xo(i);var r=o.get(a);(o=r?r[n]:o.get($.hm(i,n)))?a=o:(r=t.X.kd(),o=t.X[a]()[n](),$.D(o)||r?o!=$.eq.themes.defaultTheme.chart.defaultSeriesSettings.base[a][n]||r?a=s?e.fill(t.X,i):e.stroke(t.X,i):(t={sourceColor:t.X.g("color")},a=o.call(t)):a=o)}return a},ZA=function(t,e,i){i=i||t.f;var n,s,a,o=t.X.$(),r="";for(a in i){var l=t.f[a],h=l.Zb,c=YA(t,l,e,l.Yb,!0);h=YA(t,l,e,h),l.Ib||(c&&$.dm(c)&&(n=c),h&&$.dm(h)&&(s=h)),r+=a+$.Tl(c)+$.Tl(h)}return SA(t,n,s),o.j("shapeNames",i),r},$A=function(t){$.V.call(this),this.Sa=t,this.Fm="both",this.ba=null,this.i=this.o=void 0,this.K=null,this.b=this.f=void 0,this.G=this.aa=10,this.D=this.P="#1D8BD1"},aB=function(t){return $.J(t,$.kt)&&!$.J(t,$.nt)&&"none"==t.jn()},bB=function(t){var e=t.hF(),i=t.iF(),n=t.jF(),s=t.bF(),a=t.cF();return t=t.fF(),s=$.p(a)||$.p(t)||$.uo(s)||!$.Do(s),$.p(i)||$.p(n)||$.uo(e)||!$.Do(e)||s},$.cB=function(){tv.call(this),this.Pa={},$.T(this.ua,[["text",20,9]])},$.eB=function(t,e,i,n){$.Y.call(this),this.ya=t,this.jf=e,this.Nd={},this.Nd.pointWidth="90%",this.Nd.isVertical=this.ya.xa(),this.Nd.minPointLength=0,this.gg=!1,this.kn={},this.eD=this.nA=null,this.re=i,this.ti=null,this.Rx=0,this.jl=null,this.Vj=[],this.eq=!1,this.Cu=new LA(this),$.K(this.Cu,this.Xja,this),$.T(this.ua,[["color",2048,65,4294967295],["xPointPosition",1024,1,4294967295],["pointWidth",1024,1,1024],["maxPointWidth",1024,1,1024],["minPointLength",1024,5,1024,this.yE],["connectMissingPoints",1024,1,$.dB],["displayNegative",1024,5,2],["stepDirection",1024,1,131072],["isVertical",1024,5,4294967295]]),this.TH(),this.Mz(n,!0)},$.fB=function(t){var e=1e-5*t.Wq;e=t.jf.zM(t)+e,t.zh=e},gB=function(){return[["fill",0,0,4294967295],["negativeFill",0,0,4294967295],["risingFill",0,0,4294967295],["fallingFill",0,0,4294967295],["stroke",0,0,4294967295],["lowStroke",0,0,4294967295],["highStroke",0,0,4294967295],["lowFill",0,0,4294967295],["highFill",0,0,4294967295],["negativeStroke",0,0,4294967295],["risingStroke",0,0,4294967295],["fallingStroke",0,0,4294967295],["medianStroke",0,0,4294967295],["stemStroke",0,0,4294967295],["whiskerStroke",0,0,4294967295],["hatchFill",0,0,4294967295],["negativeHatchFill",0,0,4294967295],["risingHatchFill",0,0,4294967295],["fallingHatchFill",0,0,4294967295],["highHatchFill",0,0,4294967295],["lowHatchFill",0,0,4294967295],["whiskerWidth",0,0,256],["type",0,0,8192],["size",0,0,8192],["labels",0,0],["minLabels",0,0],["maxLabels",0,0],["markers",0,0],["outlierMarkers",0,0]]},hB=function(t){return t.check(128)&&t.check(2097152)},$.PA=function(t){return!!t.Cu.g("needsZero")},$.iB=function(t,e){t.Nd.pointWidth=String(100*e)+"%"},$.jB=function(t,e){t.Nd.xPointPosition=e},$.kB=function(t,e){t.Nd.type=e,t.ca.Db().WF=e,t.check(8192)&&t.B(1024)},$.lB=function(t){return t.oe||(t.oe=new $.Fw),t.oe},$.nB=function(t,e,i,n){if(!t)return Xca;var s=$.oa(e)+"|"+t+"|"+i+(n?"|"+n:"");n=n||t;var a=mB[s];return a||(mB[s]=a=function(s,a,o){return(o=$.em(o))!=$.gm&&i&&(o=s.sc(t,o,a,e,!1,n),$.p(o))?o:s.sc(t,0,a,e,!1,n)}),a},Xca=function(){},oB=function(t,e,i,n,s,a){if(e.ka(),t.check(s)&&(!1!==e.enabled()||i||n)){if(e.O(t.U1()),t.J(a))return e.clear(),e.ja(t.fa),!0}else e.clear(),e.O(null);return e.W(),e.da(!1),!1},pB=function(t,e){var i=e[0],n=e[1]||i;return i.pH()[t]||n.pH()[t]||e[2]&&$.p(e[2][t])||e[3]&&$.p(e[3][t])},rB=function(t,e,i,n){var s=e[0],a=s.jp(i);a||(a=s.add(void 0,i)),a.jc(n),a.Hi(),i=e[1]||s;var o=(n=t.$()).j($.J(t.Rf,$.WA)?"shapes":"shapeNames"),r=t.rr(n.ma());return t.Rf.VB(r,o),n=n.j(t.check(8)?"markerStroke":"markerFill"),$.p(n)&&(t=s==t.ca.dl()?qB(t,n):t.Zv(n),!pB("fill",e)&&$.dm(t)&&(a.oJ(t),t=$.Ql(t),!pB("stroke",e)&&$.dm(t)&&a.pJ(t))),$.gy(a,i),a.td(e[2],e[3]),a},Yca=function(t,e){(0,$.Pe)(e,(function(t){$.J(t,$.Pu)?this.kT(t):t.W(),t.da(!1)}),t)},Zca=function(t,e,i,n,s,a,o){return i=rB(t,e,i,s),t=rB(t,e,n,a),o&&(i.W(),t.W()),[i,t]},qB=function(t,e){return $.p(e)?e:$.cm("fill",1,!1)(t,$.gm,!0)},$ca=function(t,e){return+$.Hc(t.RH,(function(t){return(0,$.Qw)(t,(function(t){return t==e}))}))},sB=function(t){t&&(t=t.j("shared"))&&(t.jB=window.NaN,t.dB=window.NaN)},uB=function(t){var e=t.gg;if($.da(e)){e=t.Mx.clone();var i=(e=$.Xo(e,1)).top,n=e.Va();i=Math.floor(i),n=Math.ceil(n),e.top=i,e.height=n-i,i=e.left,n=e.cb(),i=Math.floor(i),n=Math.ceil(n),e.left=i,e.width=n-i,t.check($.tB)&&(e=e.clone(),i=(t=t.ya).Mh,e.top-=i,e.height+=i,e.width+=t.oi)}return e},$.vB=function(t,e,i){return i=i||t.$(),e.Li(t.GS(i)).lg(i).Im(t.sF).Dl(t.aU(i)),$.ov(e,t.ym(e,i))},wB=function(t){this.Sa=t,$.Br.call(this,t.data())},$.xB=function(t,e,i,n,s){$.eB.call(this,t,e,i,n),this.state=new $.ix(this),this.Dka=s,$.tq(this.ua,"xMode",1024,5,4294967295),this.data(null)},$.yB=function(t,e,i){if(e){var n={},s=-window.Infinity;e=function(t,e){var i=e.data.x;if(i in n){var o=t[n[i]];t[n[i]]=e}else n[i]=t.length,t.push(e),i<s&&(a=!0),s=i;return o||null}}else e=function(t,e){return t.push(e),null};var a=!1;return t=t.bU([],e,i?function(t){return(t=$.ps(t))?t.getTime():window.NaN}:function(t){return t},window.isNaN),a&&$.Pa(t.data,ada),t},$.AB=function(t,e,i,n,s){var a="scatter"==t.g("xMode"),o=!1;for(n?n=a?function(t,i){var n=$.qo(i.data.x);return t.push(n in e?i:null),null}:function(t,i){var n=$.qo(i.data.x);if(n in e){var s=t[e[n]];t[e[n]]=i}return s||null}:s?n=function(t,e){return t.push(e),null}:a?(o=!0,n=function(t,n){var s=n.data.x,a=$.qo(s);return a in e||(e[a]=i.length,i.push(s)),t.push(n),null}):n=function(t,n){var s=n.data.x,a=$.qo(s);if(a in e){var o=t[e[a]];t[e[a]]=n}else e[a]=i.length,i.push(s),t.push(n);return o||null},o=(t=t.bU(o?[]:Array(i.length),n,(function(t){return t}),(function(t){return void 0===t}))).data,n=0;n<o.length;n++)o[n]||(o[n]=zB(i[n]));return t.Lp=e,t.qt=i,t},zB=function(t){var e={};return e.missing=BB,{data:{x:t},j:e}},ada=function(t,e){return $.po(t.data.x,e.data.x)},$.Wz=function(t,e){if(t.pd){if(t.pd.Lp){var i=t.pd.Lp[$.qo(e)];if((0,window.isNaN)(i))return-1;if("scatter"==t.g("xMode")){i=[];for(var n=t.pd.data,s=0;s<n.length;s++){var a=n[s];a.data.x==e&&i.push(a.j.rawIndex)}}return i}return t.pd.data.length?(0>(i=$.Oa(t.pd.data,(function(t){return e-t.data.x})))&&0<(i=~i)&&(i==t.pd.data.length||t.pd.data[i].data.x-e>e-t.pd.data[i-1].data.x)&&i--,i):-1}return t.wG.find("x",e)},$.CB=function(t,e,i,n,s){var a=t.$();a.reset();for(var o=[];a.advance();){var r=void 0,l=t,h=a,c=e,u=i,d=n,p=s;if($.J(l.Rf,$.WA)&&(r=h.j(l.Rf.P)))t:{var g=void 0,f=r,b=c;l=u;var v=d,m=p;for(g in f){var y=f[g];if($.J(y,$.ig)&&(y=y.rb()).left<=b+v&&b<=y.left+y.width&&y.top<=l+m&&l<=y.top+y.height){g=!0;break t}}g=!1}else g=h.j(l.Ah.zb+"X"),f=h.j(l.Ah.zb),l.Ah.zb==l.Ah.Ab?g=c<=g&&g<=c+d&&u<=f&&f<=u+p:(b=h.j(l.Ah.Ab+"X"),l=h.j(l.Ah.Ab),g=$.bn([g,f,b,l],[c,u,c+d,u,c+d,u+p,c,u+p]));!g&&(r=h.j("marker"))&&(g=r.Vd().rb().so(new $.I(c,u,d,p))),g&&o.push(a.ma())}return o},DB=function(t,e){return $.p(e)?(t.rka=!!e,t):t.rka||!1},$.EB=function(t,e,i){return t.enabled()?($.A(e)?(i||t.ie(),t.state.Lh($.wo,e,i?void 0:$.vo)):$.ea(e)&&t.state.Lh($.wo,e,i?void 0:$.vo),t):t},$.GB=function(t){$.Y.call(this),this.Ga($.ur.scroller),this.Ka=!1,this.vB=this.dO=this.G=this.ba=this.P=this.b=this.f=this.Aa=null,this.D=0,this.o=FB,this.fa=new $.I(0,0,0,0),this.i=new $.I(0,0,0,0),this.na=this.ea=this.Ba=null,this.Ha=0,this.Za=this.fb=this.$a=!1,this.Wa=this.aa=null,this.sb=!!t,$.T(this.ua,[["height",4,9],["minHeight",4,9],["maxHeight",4,9],["orientation",196,9],["inverted",16,1],["autoHide",256,9],["fill",16,1],["selectedFill",16,1],["outlineStroke",16,1],["allowRangeChange",0,0]])},HB=function(t){return t.Nb()?"ew-resize":"ns-resize"},$.IB=function(t,e,i){if((e=$.Za(Math.round(e*FB),0,FB))>(i=$.Za(Math.round(i*FB),0,FB))){var n=e;e=i,i=n}e==t.D&&i==t.o||(t.D=e,t.o=i,t.B(16,1))},JB=function(t){t.Ka||(t.Aa.hc(t.f),t.Aa.hc(t.b),t.Ka=!0)},KB=function(t){t.Ka&&t.K().g("autoHide")&&!t.Ha&&!t.$a&&(t.Aa.removeChild(t.f),t.Aa.removeChild(t.b),t.Ka=!1)},LB=function(t,e,i){(t=t.K()).g("enabled")?i?(i=t.lb().g("fill"),t=t.lb().g("stroke")):(i=t.Qa().g("fill"),t=t.Qa().g("stroke")):(i=$.bm,t="none"),e.fill(i),e.stroke(t)},MB=function(t,e,i,n,s){return t.dispatchEvent(t.N3(i,($.p(n)?n:t.D)/FB,($.p(s)?s:t.o)/FB,e))},OB=function(t,e,i){i=NB(t,e,i);var n=t.fa;switch(t.g("orientation")){case"right":case"left":n=(n.top+n.height-i)/n.height;break;default:n=(i-n.left)/n.width}if(t.g("inverted")&&(n=1-n),(i=t.g("allowRangeChange"))&&e==t.f)i=n,n=t.o/FB,e="thumb-drag";else if(i&&e==t.b)i=t.D/FB,e="thumb-drag";else{var s=(t.o-t.D)/FB/2;i=n-s,n+=s,e=!0===e?"selected-range-drag":"background-click"}(i=$.Za(Math.round(i*FB),0,FB))==(n=$.Za(Math.round(n*FB),0,FB))&&(n+=n<FB?1:-1),i>n&&(s=t.f,t.f=t.b,t.b=s,s=t.Ba,t.Ba=t.ea,t.ea=s,s=i,i=n,n=s),i==t.D&&n==t.o||!MB(t,e,"scrollerchange",i,n)||(t.D=i,t.o=n,t.B(16,1))},NB=function(t,e,i){var n=t.fa,s=t.Nb();return t=$.da(e)||!t.g("allowRangeChange")?(t.o-t.D)/FB*(s?n.width:n.height)/2:0,s?$.Za(i,n.left+t,n.left+n.width-t):$.Za(i,n.top+t,n.top+n.height-t)},PB=function(t,e){var i=(i=t.g("allowRangeChange"))&&e==t.f?t.D:i&&e==t.b?t.o:(t.D+t.o)/2;i/=FB,t.g("inverted")&&(i=1-i);var n=t.fa;return t.Nb()?n.left+n.width*i:n.top+n.height*(1-i)},QB=function(t,e,i){$.ag.call(this,e.ia()),this.i=t,this.b=i?e:null,this.Qj=void 0,this.rs=(0,$.pa)((function(){this.Qj=void 0,OB(this.i,this.b||!0,this.ba)}),this),$.bg(this),this.wa("end",this.Faa)},RB=function(t){$.V.call(this),this.Ga($.ur.thumbs),this.i=t,$.T(this.ua,[["enabled",80,1],["autoHide",16,1]]),t={},$.T(t,[["fill",16,1],["stroke",16,1]]),this.ca=new $.my(this,t,$.gm),$.W(this,"normal",this.ca),this.za=new $.my(this,t,$.vo),$.W(this,"hovered",this.za)},SB=function(){$.GB.call(this)},$.TB=function(){$.GB.call(this,!0),this.af="after-axes",$.tq(this.ua,"position",20,9)},UB=function(t,e){this.D=e,this.pa=t,this.i=0,this.b=1,this.o=!0,this.f=null},VB=function(t){var e=t.pa;if(Sz(e),e.J(65536)&&(e.Tq().f||e.Uq().f)&&e.pb(),t.f)if((e=t.f.scale)||(e=t.pa,e=t.D?e.Ra():e.bb()),t.f.count&&$.J(e,$.Qt))e=t.f.count/e.values().length,t.f.qfa?t.BB(1-e,1):t.BB(0,e);else if($.p(t.f.start)&&$.p(t.f.end)&&e){var i=Zs(e,e.transform(t.f.start,0)),n=Zs(e,e.transform(t.f.end,1));i>n&&(i=Zs(e,e.transform(t.f.end,0)),n=Zs(e,e.transform(t.f.start,1))),t.BB(i,n)}else t.f=null},$.WB=function(t){$.wA.call(this,!$.p(t)||t),this.Ga("cartesianBase"),this.Uc=new UB(this,!0),this.bg=new UB(this,!1),$.T(this.ua,[["zAngle",4,9],["zAspect",4,9],["zDistribution",131076,9],["zPadding",4,9]])},XB=function(t,e){var i="before-axes"==t.g("position");t.padding(0),t.ja(e);var n=t.Nb(),s=window.NaN;return i?s=n?e.height-t.yd().height:e.width-t.yd().width:e=t.yd(),{A0:e,E5:s}},YB=function(t,e,i,n){if("before-axes"==i.g("position"))switch(i.g("orientation")){case"top":i.padding().top(e[0]+(t.fb||0)),i.padding().bottom(0),e[0]+=n;break;case"bottom":i.padding().top(0),i.padding().bottom(e[2]+(t.Ha||0)),e[2]+=n;break;case"left":i.padding().left(e[3]+(t.Ka||0)),i.padding().right(0),e[3]+=n;break;case"right":i.padding().left(0),i.padding().right(e[1]+(t.$a||0)),e[1]+=n}return i.Nb()?(i.padding().left(e[3]),i.padding().right(e[1])):(i.padding().top(e[0]),i.padding().bottom(e[2])),e},$.ZB=function(t,e){this.f={},this.b=[],this.i=0;var i=arguments.length;if(1<i){if(i%2)throw Error("Uneven number of arguments");for(var n=0;n<i;n+=2)this.set(arguments[n],arguments[n+1])}else if(t)if(t instanceof $.ZB)for(i=t.Yt(),n=0;n<i.length;n++)this.set(i[n],t.get(i[n]));else for(n in t)this.set(n,t[n])},$.aC=function(t){if(t.i!=t.b.length){for(var e=0,i=0;e<t.b.length;){var n=t.b[e];$.$B(t.f,n)&&(t.b[i++]=n),e++}t.b.length=i}if(t.i!=t.b.length){var s={};for(i=e=0;e<t.b.length;)n=t.b[e],$.$B(s,n)||(t.b[i++]=n,s[n]=1),e++;t.b.length=i}},$.$B=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},$.bC=function(){Cz.call(this)},$.cC=function(t){$.V.call(this),this.ya=t,this.Xb=this.Y=null,this.I(4294967295),$.T(this.ua,[["stroke",0,1],["fill",0,1]])},$.dC=function(t,e,i,n){$.Fg.call(this),this.o=t,this.i=e||$.ia,this.f=$.p(n)?n:this,this.b=[]},$.eC=function(t){var e=t.b.pop();return e?t.i.call(t.f,e):e=t.o.call(t.f),t.hc(e),e},fC=function(t){$.JA.call(this,t)},gC=function(t,e,i,n,s,a,o){a=(a=$.R(a,1))<n?Math.floor(a):Math.ceil(a),$.HA(e[o.fill],t.xa,s,a),$.IA(e[o.fill],t.xa,i,n),$.HA(e[o.qe],t.xa,s,a),$.IA(e[o.qe],t.xa,i,n),$.HA(e[o.stroke],t.xa,i,n)},hC=function(t,e,i,n,s,a){var o=t.nh(a,t.prevValue);if(e!=t.b){var r=t.na,l=t.P,h=t.K;a=KA(t,a),t.ba&&a?(l=s,r=(i-t.na)*(l-t.P)/(n-t.P)+t.na):t.Ha&&!t.ba||(r+=(i-r)/2,l+=(n-l)/2),$.IA(t.b[h.fill],t.xa,r,l),$.IA(t.b[h.qe],t.xa,r,l),$.IA(t.b[h.stroke],t.xa,r,l),t.i=r,t.Km(),t.X.gh()&&(t.f=[r,l]),t.b=e,$.HA(t.b[o.fill],t.xa,r,s),$.IA(t.b[o.fill],t.xa,r,l),$.HA(t.b[o.qe],t.xa,r,s),$.IA(t.b[o.qe],t.xa,r,l),$.HA(t.b[o.stroke],t.xa,r,l)}$.IA(t.b[o.fill],t.xa,i,n),$.IA(t.b[o.qe],t.xa,i,n),$.IA(t.b[o.stroke],t.xa,i,n)},$.iC=function(t){$.JA.call(this,t)},jC=function(t,e,i){var n=e.j("x"),s=e.j("value");for(var a in e=e.j("size"),e=Math.abs(e),t.xa&&(t=n,n=s,s=t),i){(t=i[a]).To(n).Uo(s).Eb(e);var o=t.Pd;o&&!$.zb(o)&&t.oc(1,0,0,1,0,0)}},kC=function(t){$.JA.call(this,t)},$.lC=function(t){$.JA.call(this,t)},mC=function(t){$.JA.call(this,t)},nC=function(t,e,i,n){var s=e.j("x");e=e.j("value");var a=(s-=t.o/2)+t.o,o=$.$b(i[n.stroke].stroke());s=$.R(s,o),a=$.R(a,o),e=$.R(e,o),i=i[n.stroke],$.HA(i,t.xa,s,e),$.IA(i,t.xa,a,e)},$.oC=function(t){$.JA.call(this,t)},$.pC=function(t){$.JA.call(this,t),this.f=$.nB("type",$.cr,!0),this.b=$.nB("markerSize",$.Bq,!0,"size")},$.qC=function(t,e,i,n,s){var a=e.j("x"),o=e.j("value"),r=t.f(t.X,e,i);e=t.b(t.X,e,i),r=$.D(r)?r:$.zp(r),t.xa&&(t=a,a=o,o=t),r(n[s.path],a,o,e),r(n[s.qe],a,o,e)},rC=function(t){$.JA.call(this,t)},sC=function(t){$.JA.call(this,t)},$.tC=function(t){$.JA.call(this,t)},uC=function(){this.dc=0,this.G=this.D=this.Ba=this.na=window.NaN,this.Ha=this.K=!1,this.Za=[],this.$a=[],this.o=[],this.ea=[],this.ba=1,this.Wh=[]},vC=function(t){t.Ca=t.P,t.P=null},zC=function(t,e,i){var n=null;switch(t.dc){case 3:if(t.D==e&&t.G==i)break;n=t.na;var s=t.Ba,a=t.D,o=t.G;wC(t,n,s,a,o,e,i);var r,l=[],h=n+t.ea[0],c=s+t.ea[1],u=a-t.o[0]*t.ba,d=o-t.o[1]*t.ba,p=(h+u)/2,g=(c+d)/2;if(t.P){"middle"==t.b&&(t.b=g);var f=!1;if($.A(t.b))for(r=0;r<t.b.length&&!(f=!!un(n,s,h,c,p,g,t.b[r],t.b[r+1],t.b[r+2],t.b[r+3],t.b[r+4],t.b[r+5])[0]);r+=6);else f=s<=t.b&&g>=t.b||s>=t.b&&g<=t.b;f?(r=(f=xC(t,n,s,h,c,p,g)).dP,t.f("c",r[2],r[3],r[4],r[5],"bc",r[4],t.i),yC(t,f),vC(t),t.f("bs",r[4],t.i,r[4],r[5],"c",r[6],r[7],r[8],r[9],"c",u,d,a,o),l.push(r[0],r[1],r[2],r[3],r[4],r[5]),l.push(r[4],r[5],r[6],r[7],r[8],r[9]),l.push(p,g,u,d,a,o)):(r=(f=xC(t,p,g,u,d,a,o)).dP,t.f("c",h,c,p,g,"c",r[2],r[3],r[4],r[5],"bc",r[4],t.i),yC(t,f),vC(t),t.f("bs",r[4],t.i,r[4],r[5],"c",r[6],r[7],r[8],r[9]),l.push(n,s,h,c,p,g),l.push(r[0],r[1],r[2],r[3],r[4],r[5]),l.push(r[4],r[5],r[6],r[7],r[8],r[9]))}else t.f("c",h,c,p,g,"c",u,d,a,o),l.push(n,s,h,c,p,g,p,g,u,d,a,o);t.ba=(e-a)*t.Ka,t.ea[0]=t.o[0]*t.ba,t.ea[1]=t.o[1]*t.ba,n=l,t.na=t.D,t.Ba=t.G,t.D=e,t.G=i;break;case 2:if(t.D==e&&t.G==i)break;a=t.na,o=t.Ba,n=t.D,l=t.G,wC(t,a,o,n,l,e,i),s=[],c=(n-a)*t.Ka,h=n-t.o[0]*c,c=l-t.o[1]*c,t.P?(o=(a=xC(t,a,o,h,c,n,l)).dP,t.f("bs",o[0],t.i,o[0],o[1],"c",o[2],o[3],o[4],o[5],"bc",o[4],t.i),yC(t,a),vC(t),t.f("bs",o[4],t.i,o[4],o[5],"c",o[6],o[7],o[8],o[9]),s.push(o[0],o[1],o[2],o[3],o[4],o[5]),s.push(o[4],o[5],o[6],o[7],o[8],o[9])):(t.f("bs",a,t.i,a,o,"c",h,c,n,l),s.push(a,o,h,c,n,l)),t.ba=(e-n)*t.Ka,t.ea[0]=t.o[0]*t.ba,t.ea[1]=t.o[1]*t.ba,n=s,t.na=t.D,t.Ba=t.G,t.D=e,t.G=i,t.dc=3;break;case 1:if(t.na==e&&t.Ba==i)break;t.D=e,t.G=i,t.dc=2;break;case 0:t.na=e,t.Ba=i,t.dc=1}return n},AC=function(t){var e=null;switch(t.dc){case 3:var i=t.na,n=t.Ba,s=t.D,a=t.G;e=[];var o=i+t.ea[0],r=n+t.ea[1];if(t.P?(n=(i=xC(t,i,n,o,r,s,a)).dP,t.f("c",n[2],n[3],n[4],n[5],"bc",n[4],t.i),yC(t,i),vC(t),t.f("bs",n[4],t.i,n[4],n[5],"c",n[6],n[7],n[8],n[9],"bc",n[8],t.i),e.push(n[0],n[1],n[2],n[3],n[4],n[5]),e.push(n[4],n[5],n[6],n[7],n[8],n[9])):(t.f("c",o,r,s,a,"bc",s,t.i),e.push(i,n,o,r,s,a)),t.Wh.length){for(i=0;i<t.Wh.length;i+=6)0==i&&t.f("l",t.Wh[i],t.Wh[i+1]),t.f("c",t.Wh[i+2],t.Wh[i+3],t.Wh[i+4],t.Wh[i+5]);t.Wh.length=0}break;case 2:if(i=t.na,n=t.Ba,s=t.D,a=t.G,e=[],t.P){if(r=$.A(t.b)){var l=vn(i,n,s,a,t.b[0],t.b[1],t.b[4],t.b[5]);o=l.x,l=l.y}else o=(s-i)*((l="middle"==t.b?(n+a)/2:t.b)-n)/(a-n)+i;t.f("bs",i,t.i,i,n,"l",o,l,"bc",o,t.i),r&&t.f("l",t.b[4],t.b[5]),vC(t),t.f("bs",o,t.i,o,l,"l",s,a,"bc",s,t.i),r&&t.f("l",t.b[0],t.b[1]),e.push(i,n,i,n,o,l),e.push(o,l,s,a,s,a)}else t.f("bs",i,t.i,i,n,"l",s,a,"bc",s,t.i),e.push(i,n,i,n,s,a);if(t.Wh.length){for(i=0;i<t.Wh.length;i+=2)t.f("l",t.Wh[i],t.Wh[i+1]);t.Wh.length=0}break;case 1:e=null}return t.dc=0,e},BC=function(t,e){t.Ha^t.K&&(e=!e),t.Ka=e?-.25:.25},CC=function(t,e,i,n,s){t[0]=n-e,t[1]=s-i,e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),t[0]/=e,t[1]/=e},wC=function(t,e,i,n,s,a,o){CC(t.Za,n,s,e,i),CC(t.$a,n,s,a,o),0<=t.Za[1]*t.$a[1]?(t.o[0]=0>t.Ka?-1:1,t.o[1]=0):CC(t.o,t.Za[0],t.Za[1],t.$a[0],t.$a[1])},xC=function(t,e,i,n,s,a,o){var r=0,l=0,h=0,c=0,u=0,d=0,p={};if($.A(t.b)){for(var g=[],f=!1,b=t.b.length-1;0<b;b-=6){var v=$.Tm(t.b[b-5],3),m=$.Tm(t.b[b-4],3),y=$.Tm(t.b[b-3],3),S=$.Tm(t.b[b-2],3),w=$.Tm(t.b[b-1],3),x=$.Tm(t.b[b],3);if(C)p.Wh||(p.Wh=[]),p.Wh.push(v,m,y,S,w,x);else var C=un(e,i,n,s,a,o,v,m,y,S,w,x)[0];C?f||(r=v,l=m,h=y,c=S,u=w,d=x,f=!0):g.push(v,m,y,S,w,x)}C?(S=fn(e,i,n,s,a,o,C.x,C.y)||0,f=fn(r,l,h,c,u,d,C.x,C.y)||1):(C=new $.on(e,i),r=v,l=m,h=y,c=S,u=w,d=x,S=0,f=1)}else if("middle"==t.b)w=1-(S=.5),C=new $.on(w*w*e+2*S*w*n+S*S*a,w*w*i+2*S*w*s+S*S*o);else if($.Wm(i,t.b))C=new $.on(e,i),S=0;else if($.Wm(o,t.b))C=new $.on(a,o),S=1;else{C=new $.on(e,i),v=new $.on(n,s),m=new $.on(a,o),y=new $.on(e,t.b),S=new $.on(a,t.b),w=y.min(S),x=y.max(S),b=[];var D=pn(v,-2),T=C.add(D.add(m));D=(D=pn(C,-2)).add(pn(v,2));var k=new $.on(C.x,C.y),O=new $.on(y.y-S.y,S.x-y.x);for(T=tn(new rn(O.x*T.x+O.y*T.y,O.x*D.x+O.y*D.y,O.x*k.x+O.y*k.y+(y.x*S.y-S.x*y.y))),D=0;D<T.length;D++)0<=(k=T[D])&&1>=k&&(k=qn(qn(C,v,k),qn(v,m,k),k),y.x==S.x?w.y<=k.y&&k.y<=x.y&&b.push(k):y.y==S.y?w.x<=k.x&&k.x<=x.x&&b.push(k):k.x>=w.x&&k.y>=w.y&&k.x<=x.x&&k.y<=x.y&&b.push(k));S=(C=b[0])?fn(e,i,n,s,a,o,C.x,C.y):.5}return v=e*(w=1-S)+n*S,m=i*w+s*S,y=n*w+a*S,S=s*w+o*S,C?(n=C.x,s=C.y):s=n=window.NaN,p.dP=[e,i,v,m,n,s,y,S,a,o],$.A(t.b)&&(v=r*(w=1-f)+h*f,m=l*w+c*f,C?(n=C.x,s=C.y):s=n=window.NaN,g.push(n,s,h*w+u*f,c*w+d*f,u,d),p.bea=g,p.Wh||(p.Wh=[]),p.Wh.push(r,l,v,m,n,s)),p},yC=function(t,e){var i=e.bea,n=e.Wh;if(i)for(var s=i.length-1;0<s;s-=6)t.f("c",i[s-3],i[s-2],i[s-1],i[s]);t.Wh&&t.Wh.length&&t.f("c",t.Wh[2],t.Wh[3],t.Wh[4],t.Wh[5]),n&&(t.Wh=n)},DC=function(t){$.JA.call(this,t),this.i=new uC,this.D=new uC},EC=function(t){$.JA.call(this,t)},FC=function(t){$.JA.call(this,t)},GC=function(t,e,i,n){var s=e.j("x"),a=e.j("high");e=e.j("low");var o=$.$b(i[n].stroke());t.wv&&(s=$.R(s,o)),a=$.R(a,o),e=$.R(e,o),i=i[n],$.HA(i,t.xa,s,e),$.IA(i,t.xa,s,a)},HC=function(t){$.JA.call(this,t),this.f=new uC},IC=function(t){$.JA.call(this,t),this.i=new uC},JC=function(t){$.JA.call(this,t)},KC=function(t,e,i,n,s){var a=t.b[e.fill],o=t.b[e.stroke];switch(e=t.b[e.qe],t.P){case"forward":break;case"backward":i=t.D;break;default:i=(i+t.D)/2}return $.IA(a,t.xa,i,n,i,s),$.IA(e,t.xa,i,n,i,s),$.IA(o,t.xa,i,n,i,s),i},LC=function(t,e,i,n,s,a){$.HA(e[i.fill],t.xa,n,a),$.IA(e[i.fill],t.xa,n,s),$.HA(e[i.qe],t.xa,n,a),$.IA(e[i.qe],t.xa,n,s),$.HA(e[i.stroke],t.xa,n,s)},MC=function(t,e,i,n,s,a,o){var r=t.i;if(e!=t.b){var l=t.b[t.K.fill],h=t.b[t.K.qe];n=KA(t,n),t.ba&&n?(r=o,n=KC(t,t.K,s,t.i,r)):(n=KC(t,t.K,s,t.i,r),$.IA(l,t.xa,n,o),$.IA(h,t.xa,n,o)),l.close(),h.close(),t.b=e,l=t.b[i.fill],e=t.b[i.stroke],h=t.b[i.qe],$.HA(l,t.xa,n,o),$.IA(l,t.xa,n,r),$.HA(h,t.xa,n,o),$.IA(h,t.xa,n,r),$.HA(e,t.xa,n,r)}KC(t,i,s,r,a),$.IA(t.b[i.fill],t.xa,s,a),$.IA(t.b[i.qe],t.xa,s,a),$.IA(t.b[i.stroke],t.xa,s,a)},NC=function(t){$.JA.call(this,t)},OC=function(t,e,i,n,s){switch(e=t.b[e.stroke],t.P){case"forward":break;case"backward":i=t.D;break;default:i=(i+t.D)/2}return $.IA(e,t.xa,i,n,i,s),i},PC=function(t){$.JA.call(this,t)},QC=function(t,e,i,n){var s=e.j("x"),a=e.j("zero");e=e.j("value");var o=$.$b(i[n.stroke].stroke());t.wv&&(s=$.R(s,o)),a=(a=$.R(a,1))<e?Math.floor(a):Math.ceil(a),i=i[n.stroke],$.HA(i,t.xa,s,e),$.IA(i,t.xa,s,a)},$.SC=function(t){$.qf.call(this),this.f=this.i={},this.o=0,this.ea=Tc(bda),this.na=Tc(cda),this.K=!0,this.G=this.P=!1,this.aa=!0,this.D=null,this.b=t,$.Ld(this.b,"keydown",this.IU,void 0,this),$.RC&&$.Ld(this.b,"keypress",this.J2,void 0,this),$.Ld(this.b,"keyup",this.E2,void 0,this)},TC=function(t){this.b=t||null,this.next=t?null:{}},eda=function(t){if($.z(t[1]))t=(0,$.Wa)(dda(t[1]),(function(t){return UC(t.key||"",t.keyCode,t.$ha)}));else{var e=t,i=1;for($.A(t[1])&&(e=t[1],i=0),t=[];i<e.length;i+=2)t.push(UC("",e[i],e[i+1]))}return t},dda=function(t){t=(t=t.replace(/[ +]*\+[ +]*/g,"+").replace(/[ ]+/g," ").toLowerCase()).split(" ");for(var e,i=[],n=0;e=t[n];n++){var s=e.split("+"),a=null,o=null;e=0;for(var r,l=0;r=s[l];l++){switch(r){case"shift":e|=1;continue;case"ctrl":e|=2;continue;case"alt":e|=4;continue;case"meta":e|=8;continue}if(s=void 0,a=r,!VC){for(s in o={},WC)o[WC[s]]=Gp((0,window.parseInt)(s,10));VC=o}o=VC[a],a=r;break}i.push({key:a,keyCode:o,$ha:e})}return i},XC=function(t,e,i){var n=e.shift();(0,$.Pe)(n,(function(i){if((i=t[i])&&(0==e.length||i.b))throw Error("Keyboard shortcut conflicts with existing shortcut")})),e.length?(0,$.Pe)(n,(function(n){n=n.toString();var s=new TC;n=n in t?t[n]:t[n]=s,XC(n.next,e.slice(0),i)})):(0,$.Pe)(n,(function(e){t[e]=new TC(i)}))},YC=function(t,e){for(var i=0;i<e.length;i++){var n=t[e[i]];if(n)return n}},UC=function(t,e,i){return e=["c_"+e+"_"+(i=i||0)],""!=t&&e.push("n_"+t+"_"+i),e},ZC=function(t,e,i){wd.call(this,t,i),this.identifier=e},$C=function(t){this.b=t,this.reset()},aD=function(t,e){$.EA.call(this,t,e.j("index")),this.node=e},$.bD=function(t,e){$.Bx.call(this),this.Hr=["x","value"],this.fh=0,this.ba=[],this.Uc=[],this.data(t,e)},$.cD=function(t,e){var i=[];if(e){for(var n=e;n=n.getParent();)i.unshift(t.ce(n.j("index")));i.push(t.ce(e.j("index")))}return i},$.dD=function(){},fD=function(t,e,i){if(t=t.Ya?t.Ya():t){var n=[e];$.hd&&!$.bd("7")&&(n=$.eD($.Kj(t),e)).push(e),(i?$.Rj:Waa)(t,n)}},$.gD=function(t,e,i){(t=i||t.zH())&&t!=(i=e.getAttribute("role")||null)&&$.xy(e,t)},$.jD=function(t,e,i){e.Oe()||$.zy(i,"hidden",!e.Oe()),e.isEnabled()||t.Tu(i,1,!e.isEnabled()),$.hD(e,8)&&t.Tu(i,8,e.Ve()),$.hD(e,16)&&t.Tu(i,16,$.iD(e,16)),$.hD(e,64)&&t.Tu(i,64,$.iD(e,64))},$.kD=function(t,e){var i=t.Hh(),n=[i],s=t.Hh();for(s!=i&&n.push(s),i=e.dc,s=[];i;){var a=i&-i;s.push(t.$G(a)),i&=~a}return n.push.apply(n,s),(i=e.Cs)&&n.push.apply(n,i),$.hd&&!$.bd("7")&&n.push.apply(n,$.eD(n)),n},$.eD=function(t,e){var i=[];return e&&(t=$.Ga(t,[e])),(0,$.Pe)([],(function(n){!(0,$.lD)(n,$.qa($.Aa,t))||e&&!$.Aa(n,e)||i.push(n.join("_"))})),i},$.mD=function(t){var e=t.Hh();t.b={1:e+"-disabled",2:e+"-hover",4:e+"-active",8:e+"-selected",16:e+"-checked",32:e+"-focused",64:e+"-open"}},$.nD=function(){},$.oD=function(t,e){t&&(e?t.title=e:t.removeAttribute("title"))},$.qD=function(t,e){if(!t)throw Error("Invalid class name "+t);if(!$.D(e))throw Error("Invalid decorator function "+e);$.pD[t]=e},$.sD=function(t,e,i){if($.By.call(this,i),!e){e=this.constructor;for(var n;e&&(n=$.oa(e),!(n=rD[n]));)e=e.u?e.u.constructor:null;e=n?$.D(n.Id)?n.Id():new n:null}this.i=e,this.Qd=$.p(t)?t:null},$.uD=function(t,e){t.xf&&e!=t.WU&&tD(t,e),t.WU=e},$.vD=function(t,e){e&&(t.Cs?$.Aa(t.Cs,e)||t.Cs.push(e):t.Cs=[e],fD(t,e,!0))},wD=function(t,e,i){i?$.vD(t,e):e&&t.Cs&&$.Fa(t.Cs,e)&&(0==t.Cs.length&&(t.Cs=null),fD(t,e,!1))},tD=function(t,e){var i=$.Dy(t),n=t.Ya();e?(i.wa(n,$.xD.oF,t.Sj).wa(n,[$.xD.pF,$.xD.nF],t.tr).wa(n,"mouseover",t.po).wa(n,"mouseout",t.hg),t.BH!=$.ia&&i.wa(n,"contextmenu",t.BH),$.hd&&($.bd(9)||i.wa(n,"dblclick",t.D2),t.K||(t.K=new yD(t),$.rd(t,t.K)))):(i.gc(n,$.xD.oF,t.Sj).gc(n,[$.xD.pF,$.xD.nF],t.tr).gc(n,"mouseover",t.po).gc(n,"mouseout",t.hg),t.BH!=$.ia&&i.gc(n,"contextmenu",t.BH),$.hd&&($.bd(9)||i.gc(n,"dblclick",t.D2),$.qd(t.K),t.K=null))},$.BD=function(t,e){zD(t,4,e)&&AD(t,4,e)},$.CD=function(t,e){zD(t,16,e)&&AD(t,16,e)},$.iD=function(t,e){return!!(t.dc&e)},AD=function(t,e,i,n){n||1!=e?$.hD(t,e)&&i!=$.iD(t,e)&&(t.i.HU(t,e,i),t.dc=i?t.dc|e:t.dc&~e):t.Dj(!i)},$.hD=function(t,e){return!!(t.Lu&e)},DD=function(t,e){return!!(t.mv&e)&&$.hD(t,e)},zD=function(t,e,i){return $.hD(t,e)&&$.iD(t,e)!=i&&(!(t.EJ&e)||t.dispatchEvent($.Cy(e,i)))&&!t.md},ED=function(t,e){return!!t.relatedTarget&&$.cf(e,t.relatedTarget)},yD=function(t){$.od.call(this),this.f=t,this.b=!1,this.qo=new nf(this),$.rd(this,this.qo),t=this.f.Ed,this.qo.wa(t,"mousedown",this.i).wa(t,"mouseup",this.o).wa(t,"click",this.D)},GD=function(t,e){if(!FD)return t.button=0,t.type=e,t;var i=window.document.createEvent("MouseEvents");return i.initMouseEvent(e,t.bubbles,t.cancelable,t.view||null,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,t.relatedTarget||null),i},$.HD=function(){},$.ID=function(t,e,i){$.sD.call(this,t,e||$.HD.Id(),i)},$.JD=function(t,e){t.gb=e,$.oD(t.Ya(),e)},$.KD=function(t,e){var i=t.i,n=$.Ey(t),s=i.Hh()+"-collapse-left";i=i.Hh()+"-collapse-right",wD(t,n?i:s,!!(1&e)),wD(t,n?s:i,!!(2&e))},$.LD=function(t,e,i){$.ID.call(this,t||"",e,i),this.b=null,this.aa=0,this.P=null},$.ND=function(t,e){t.b=e,$.p(void 0)&&(t.aa=void 0),t.xf&&MD(t)},MD=function(t){var e=t.Ya();e=t.i.Gn(e);var i=$.Ae(window.document,"I",null,e)[0];t.b?i?(i.className=t.b,$.Pf(i,!0)):(i=$.Me("I",t.b),$.zy(i,"hidden",!0),$.We(e,i,t.aa),t.P&&(i=$.Me("SPAN","ac-fallback-symbol",t.P),$.We(e,i,t.aa+1))):i&&$.Pf(i,!1)},aa=[],$.OD=$.OD||{},$.fa=this,na="closure_uid_"+(1e9*Math.random()>>>0),aaa=0,$.Ln=Date.now||function(){return+new Date};var jk,wk=null,ue;$.H(ta,Error),ta.prototype.name="CustomError",$.za=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if($.z(t))return $.z(e)&&1==e.length?t.indexOf(e,0):-1;for(var i=0;i<t.length;i++)if(i in t&&t[i]===e)return i;return-1},$.fda=Array.prototype.lastIndexOf?function(t,e){return Array.prototype.lastIndexOf.call(t,e,t.length-1)}:function(t,e){var i=t.length-1;if(0>i&&(i=Math.max(0,t.length+i)),$.z(t))return $.z(e)&&1==e.length?t.lastIndexOf(e,i):-1;for(;0<=i;i--)if(i in t&&t[i]===e)return i;return-1},$.Pe=Array.prototype.forEach?function(t,e,i){Array.prototype.forEach.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=$.z(t)?t.split(""):t,a=0;a<n;a++)a in s&&e.call(i,s[a],a,t)},$.Ye=Array.prototype.filter?function(t,e,i){return Array.prototype.filter.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=[],a=0,o=$.z(t)?t.split(""):t,r=0;r<n;r++)if(r in o){var l=o[r];e.call(i,l,r,t)&&(s[a++]=l)}return s},$.Wa=Array.prototype.map?function(t,e,i){return Array.prototype.map.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=Array(n),a=$.z(t)?t.split(""):t,o=0;o<n;o++)o in a&&(s[o]=e.call(i,a[o],o,t));return s},$.Gg=Array.prototype.reduce?function(t,e,i,n){return n&&(e=(0,$.pa)(e,n)),Array.prototype.reduce.call(t,e,i)}:function(t,e,i,n){var s=i;return(0,$.Pe)(t,(function(i,a){s=e.call(n,s,i,a,t)})),s},$.Qw=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var i=t.length,n=$.z(t)?t.split(""):t,s=0;s<i;s++)if(s in n&&e.call(void 0,n[s],s,t))return!0;return!1},$.lD=Array.prototype.every?function(t,e,i){return Array.prototype.every.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=$.z(t)?t.split(""):t,a=0;a<n;a++)if(a in s&&!e.call(i,s[a],a,t))return!1;return!0},$.g=$.gb.prototype,$.g.clone=function(){return new $.gb(this.x,this.y)},$.g.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},$.g.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},$.g.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},$.g.translate=function(t,e){return t instanceof $.gb?(this.x+=t.x,this.y+=t.y):(this.x+=Number(t),$.ea(e)&&(this.y+=e)),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.x*=t,this.y*=i,this},$.g=$.kb.prototype,$.g.zd=function(){return this.right-this.left},$.g.qd=function(){return this.bottom-this.top},$.g.clone=function(){return new $.kb(this.top,this.right,this.bottom,this.left)},$.g.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},$.g.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},$.g.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this},$.g.translate=function(t,e){return t instanceof $.gb?(this.left+=t.x,this.right+=t.x,this.top+=t.y,this.bottom+=t.y):(this.left+=t,this.right+=t,$.ea(e)&&(this.top+=e,this.bottom+=e)),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.left*=t,this.right*=t,this.top*=i,this.bottom*=i,this},$.g=$.lb.prototype,$.g.clone=function(){return new $.lb(this.width,this.height)},$.g.zC=function(){return this.width*this.height},$.g.aspectRatio=function(){return this.width/this.height},$.g.Uj=function(){return!this.zC()},$.g.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},$.g.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},$.g.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.width*=t,this.height*=i,this},$.g=$.I.prototype,$.g.clone=function(){return new $.I(this.left,this.top,this.width,this.height)},$.g.so=function(t){return this.left<=t.left+t.width&&t.left<=this.left+this.width&&this.top<=t.top+t.height&&t.top<=this.top+this.height},$.g.Tf=function(t){return Math.sqrt($.rb(this,t))},$.g.ceil=function(){return this.left=Math.ceil(this.left),this.top=Math.ceil(this.top),this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},$.g.floor=function(){return this.left=Math.floor(this.left),this.top=Math.floor(this.top),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},$.g.round=function(){return this.left=Math.round(this.left),this.top=Math.round(this.top),this.width=Math.round(this.width),this.height=Math.round(this.height),this},$.g.translate=function(t,e){return t instanceof $.gb?(this.left+=t.x,this.top+=t.y):(this.left+=t,$.ea(e)&&(this.top+=e)),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.left*=t,this.width*=t,this.top*=i,this.height*=i,this},$.gb.prototype.Gh=function(){return this.x},$.gb.prototype.As=function(){return this.y},$.g=$.I.prototype,$.g.tb=function(){return this.left},$.g.Vb=function(){return this.top},$.g.zd=function(){return this.width},$.g.qd=function(){return this.height},$.g.cb=function(){return this.left+this.width},$.g.Va=function(){return this.top+this.height},$.lb.prototype.zd=function(){return this.width},$.lb.prototype.qd=function(){return this.height},$.E("acgraph.math.Size",$.lb),$.E("acgraph.math.coordinate",(function(t,e){return new $.gb(t,e)})),$.E("acgraph.math.rect",(function(t,e,i,n){return new $.I(t,e,i,n)})),$.E("acgraph.math.Rect",$.I);var PD=$.gb.prototype,iaa,jaa,kaa,laa,maa,naa,haa,rc,qc,oaa,Bc;PD.getX=PD.Gh,PD.getY=PD.As,PD=$.I.prototype,PD.getWidth=PD.zd,PD.getHeight=PD.qd,PD.getLeft=PD.tb,PD.getTop=PD.Vb,PD.getWidth=PD.zd,PD.getHeight=PD.qd,PD.getRight=PD.cb,PD.getBottom=PD.Va,$.g=$.Db.prototype,$.g.clone=function(){return new $.Db(this.od,this.We,this.gf,this.Le,this.Jd,this.Fd)},$.g.setTransform=function(t,e,i,n,s,a){if(!($.ea(t)&&$.ea(e)&&$.ea(i)&&$.ea(n)&&$.ea(s)&&$.ea(a)))throw Error("Invalid transform parameters");return this.od=t,this.We=e,this.gf=i,this.Le=n,this.Jd=s,this.Fd=a,this},$.g.scale=function(t,e){return this.od*=t,this.We*=t,this.gf*=e,this.Le*=e,this},$.g.translate=function(t,e){return this.Jd+=t*this.od+e*this.gf,this.Fd+=t*this.We+e*this.Le,this},$.g.rotate=function(t,e,i){return $.wb(this,$.Kb(t,e,i))},$.g.toString=function(){return"matrix("+[this.od,this.We,this.gf,this.Le,this.Jd,this.Fd].join()+")"},$.g.transform=function(t,e,i,n,s){var a=e;for(e+=2*s;a<e;){s=t[a++];var o=t[a++];i[n++]=s*this.od+o*this.gf+this.Jd,i[n++]=s*this.We+o*this.Le+this.Fd}},$.E("acgraph.vector.normalizeFill",$.Ub),$.E("acgraph.vector.normalizeStroke",$.Wb),$.E("acgraph.vector.normalizeHatchFill",$.Yb),$.E("acgraph.vector.normalizeTextShadow",$.Zb),$.ja($.ac),$.ac.prototype.f=0,$.ac.prototype.i=(1e9*Math.random()>>>0).toString(16),$.ac.prototype.b="ac_uid_"+(1e9*Math.random()>>>0),$.vc=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},iaa=/&/g,jaa=/</g,kaa=/>/g,laa=/"/g,maa=/'/g,naa=/\x00/g,haa=/[\x00&<>"']/,rc={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"},qc={"'":"\\'"},oaa=String.prototype.repeat?function(t,e){return t.repeat(e)}:function(t,e){return Array(e+1).join(t)};t:{var QD=$.fa.navigator;if(QD){var RD=QD.userAgent;if(RD){Bc=RD;break t}}Bc=""}var Rc="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Jca,hda,ida,jda,kda,a2;Yc[" "]=$.ia,$.yd=$.Cc("Opera"),$.hd=$.Uc(),$.Hp=$.Cc("Edge"),$.gda=$.Hp||$.hd,$.gd=$.Cc("Gecko")&&!(-1!=Bc.toLowerCase().indexOf("webkit")&&!$.Cc("Edge"))&&!($.Cc("Trident")||$.Cc("MSIE"))&&!$.Cc("Edge"),$.xd=-1!=Bc.toLowerCase().indexOf("webkit")&&!$.Cc("Edge"),$.Ad=$.Cc("Macintosh"),$.RC=$.Cc("Windows"),Jca=$.Cc("Linux")||$.Cc("CrOS"),hda=$.Cc("Android"),ida=Wc(),jda=$.Cc("iPad"),kda=$.Cc("iPod"),$.lda=Xc();t:{var SD="",TD=(a2=Bc,$.gd?/rv:([^\);]+)(\)|;)/.exec(a2):$.Hp?/Edge\/([\d\.]+)/.exec(a2):$.hd?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a2):$.xd?/WebKit\/(\S+)/.exec(a2):$.yd?/(?:Version)[ \/]?(\S+)/.exec(a2):void 0);if(TD&&(SD=TD?TD[1]:""),$.hd){var UD=$c();if(null!=UD&&UD>(0,window.parseFloat)(SD)){$.ad=String(UD);break t}}$.ad=SD}var qaa={},VD,WD=$.fa.document;VD=WD&&$.hd?$c()||("CSS1Compat"==WD.compatMode?(0,window.parseInt)($.ad,10):5):void 0;var cd=VD,saa={0:"Can't find an error message that corresponds to the specified error code",1:"Requested stage type is not supported",2:"Container should be defined to render stage",3:"Stage should have a DOM element",4:"Unable to set the parent component",5:"Trying to perform an operation with the disposed element",6:"Synchronous rendering didn't clean up all dirty states",7:"Can't add an element constructed by another Stage",8:"Wrong arguments passed to swapChildren",9:"Path must start with moveTo command",10:"Method must be implemented",11:"Missing required parameter",12:"Parameter type mismatch",13:"Required parameter is null or undefined",14:"Invalid number of parameters",15:"Sorry, this feature in not supported in VML oriented browsers"},uaa=!$.hd||$.dd(9),Xd=!$.hd||$.dd(9),mda=$.hd&&!$.bd("9"),zaa=function(){if(!$.fa.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return $.fa.addEventListener("test",$.ia,e),$.fa.removeEventListener("test",$.ia,e),t}(),md=0,nd={};$.od.prototype.md=!1,$.od.prototype.ld=function(){if(!this.md&&(this.md=!0,this.R(),0!=md)){var t=$.oa(this);delete nd[t]}},$.od.prototype.R=function(){if(this.bv)for(;this.bv.length;)this.bv.shift()()},wd.prototype.stopPropagation=function(){this.b=!0},wd.prototype.preventDefault=function(){this.defaultPrevented=!0,this.q5=!1},$.xD={pna:"click",wra:"rightclick",Una:"dblclick",oF:"mousedown",pF:"mouseup",Mpa:"mouseover",Lpa:"mouseout",Kpa:"mousemove",Ipa:"mouseenter",Jpa:"mouseleave",nF:"mousecancel",Jra:"selectionchange",Kra:"selectstart",$sa:"wheel",lpa:"keypress",kpa:"keydown",mpa:"keyup",Jma:"blur",Roa:"focus",Vna:"deactivate",Soa:"focusin",Toa:"focusout",kna:"change",rra:"reset",Hra:"select",nsa:"submit",hpa:"input",kra:"propertychange",toa:"dragstart",ooa:"drag",qoa:"dragenter",soa:"dragover",roa:"dragleave",f8:"drop",poa:"dragend",zsa:"touchstart",ysa:"touchmove",xsa:"touchend",wsa:"touchcancel",Gma:"beforeunload",yna:"consolemessage",zna:"contextmenu",Xna:"devicechange",Yna:"devicemotion",Zna:"deviceorientation",hoa:"DOMContentLoaded",Aoa:"error",J8:"help",upa:"load",Cpa:"losecapture",tqa:"orientationchange",qra:"readystatechange",sra:"resize",Era:"scroll",Gsa:"unload",Qma:"canplay",Rma:"canplaythrough",voa:"durationchange",yoa:"emptied",zoa:"ended",xpa:"loadeddata",ypa:"loadedmetadata",Cqa:"pause",Uqa:"play",Vqa:"playing",nra:"ratechange",Fra:"seeked",Gra:"seeking",isa:"stalled",psa:"suspend",vsa:"timeupdate",Vsa:"volumechange",Xsa:"waiting",gsa:"sourceopen",fsa:"sourceended",esa:"sourceclosed",Ula:"abort",Jsa:"update",Msa:"updatestart",Ksa:"updateend",$oa:"hashchange",zqa:"pagehide",Aqa:"pageshow",jra:"popstate",Cna:"copy",Bqa:"paste",J7:"cut",Ama:"beforecopy",Bma:"beforecut",Ema:"beforepaste",rqa:"online",qqa:"offline",Fpa:"message",vna:"connect",ipa:"install",Wla:"activate",Ioa:"fetch",Voa:"foreignfetch",Gpa:"messageerror",jsa:"statechange",Lsa:"updatefound",Bna:"controllerchange",ima:zd("AnimationStart"),gma:zd("AnimationEnd"),hma:zd("AnimationIteration"),Asa:zd("TransitionEnd"),Zqa:"pointerdown",fra:"pointerup",Yqa:"pointercancel",bra:"pointermove",dra:"pointerover",cra:"pointerout",$qa:"pointerenter",ara:"pointerleave",Yoa:"gotpointercapture",Dpa:"lostpointercapture",Opa:"MSGestureChange",Ppa:"MSGestureEnd",Qpa:"MSGestureHold",Rpa:"MSGestureStart",Spa:"MSGestureTap",Tpa:"MSGotPointerCapture",Upa:"MSInertiaStart",Vpa:"MSLostPointerCapture",Wpa:"MSPointerCancel",Xpa:"MSPointerDown",Ypa:"MSPointerEnter",Zpa:"MSPointerHover",$pa:"MSPointerLeave",aqa:"MSPointerMove",bqa:"MSPointerOut",cqa:"MSPointerOver",dqa:"MSPointerUp",n$:"text",tsa:$.hd?"textinput":"textInput",sna:"compositionstart",tna:"compositionupdate",rna:"compositionend",Cma:"beforeinput",Foa:"exit",vpa:"loadabort",wpa:"loadcommit",zpa:"loadredirect",Apa:"loadstart",Bpa:"loadstop",tra:"responsive",asa:"sizechanged",Hsa:"unresponsive",Usa:"visibilitychange",msa:"storage",moa:"DOMSubtreeModified",ioa:"DOMNodeInserted",koa:"DOMNodeRemoved",loa:"DOMNodeRemovedFromDocument",joa:"DOMNodeInsertedIntoDocument",foa:"DOMAttrModified",goa:"DOMCharacterDataModified",Fma:"beforeprint",Zla:"afterprint",Dma:"beforeinstallprompt",jma:"appinstalled"},$.H($.Bd,wd);var vaa=[1,4,2],taa={2:"touch",3:"pen",4:"mouse"};$.Bd.prototype.OA=function(){return Cd(this,0)&&!($.xd&&$.Ad&&this.ctrlKey)},$.Bd.prototype.stopPropagation=function(){$.Bd.u.stopPropagation.call(this),this.kf.stopPropagation?this.kf.stopPropagation():this.kf.cancelBubble=!0},$.Bd.prototype.preventDefault=function(){$.Bd.u.preventDefault.call(this);var t=this.kf;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,mda)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}},$.Bd.prototype.J1=ba(0);var Dd="closure_listenable_"+(1e6*Math.random()|0),waa=0;Hd.prototype.add=function(t,e,i,n,s){var a=t.toString();(t=this.b[a])||(t=this.b[a]=[],this.f++);var o=Jd(t,e,n,s);return-1<o?(e=t[o],i||(e.gL=!1)):((e=new xaa(e,this.src,a,!!n,s)).gL=i,t.push(e)),e},Hd.prototype.remove=function(t,e,i,n){if(!((t=t.toString())in this.b))return!1;var s=this.b[t];return-1<(e=Jd(s,e,i,n))&&(Gd(s[e]),Ea(s,e),0==s.length&&(delete this.b[t],this.f--),!0)},Hd.prototype.fH=function(t,e,i,n){var s=-1;return(t=this.b[t.toString()])&&(s=Jd(t,e,i,n)),-1<s?t[s]:null};var Ud="closure_lm_"+(1e6*Math.random()|0),ce={},fe="__closure_events_fn_"+(1e9*Math.random()>>>0);$.E("acgraph.events.listen",$.Ld),$.E("acgraph.events.listenOnce",Kd),$.E("acgraph.events.unlisten",$.Yd),$.E("acgraph.events.unlistenByKey",Zd),$.E("acgraph.events.removeAll",$.$d);var Baa=!$.hd||$.dd(9),Caa=!$.gd&&!$.hd||$.hd&&$.dd(9)||$.gd&&$.bd("1.9.1"),XD=$.hd&&!$.bd("9"),Daa=$.hd||$.yd||$.xd;$.he.prototype.By=!0,$.he.prototype.cu=function(){return this.b},$.he.prototype.toString=function(){return"Const{"+this.b+"}"},$.ge={},$.ie(""),$.ke.prototype.By=!0,$.ke.prototype.cu=function(){return this.f},$.ke.prototype.jV=!0,$.ke.prototype.b=ba(2),$.je={},$.le("about:blank"),$.ne.prototype.By=!0,$.me={},$.ne.prototype.cu=function(){return this.b},$.nda=$.oe(""),$.YD=RegExp("\\b(url\\([ \t\n]*)('[ -&(-\\[\\]-~]*'|\"[ !#-\\[\\]-~]*\"|[!#-&*-\\[\\]-~]*)([ \t\n]*\\))","g"),$.oda=RegExp("\\b(hsl|hsla|rgb|rgba|matrix|(rotate|scale|translate)(X|Y|Z|3d)?)\\([-0-9a-z.%, ]+\\)","g"),$.qe.prototype.jV=!0,$.qe.prototype.b=ba(1),$.qe.prototype.By=!0,$.qe.prototype.cu=function(){return this.f},$.pe={},$.re("<!DOCTYPE html>",0),$.re("",0),$.re("<br>",0);var Be={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Eaa={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},mf={IMG:" ",BR:"\n"};$.g=se.prototype,$.g.Ya=function(t){return $.ze(this.b,t)},$.g.getElementsByTagName=function(t,e){return(e||this.b).getElementsByTagName(String(t))},$.g.Ac=function(t,e,i){return Le(this.b,arguments)},$.g.createElement=function(t){return $.Re(this.b,t)},$.g.appendChild=$.Se,$.g.canHaveChildren=function(t){if(1!=t.nodeType)return!1;switch(t.tagName){case"APPLET":case"AREA":case"BASE":case"BR":case"COL":case"COMMAND":case"EMBED":case"FRAME":case"HR":case"IMG":case"INPUT":case"IFRAME":case"ISINDEX":case"KEYGEN":case"LINK":case"NOFRAMES":case"NOSCRIPT":case"META":case"OBJECT":case"PARAM":case"SCRIPT":case"SOURCE":case"STYLE":case"TRACK":case"WBR":return!1}return!0},$.g.Gi=$.Ve,$.g.Yga=$.We,$.g.Sl=$.Ze,$.g.W1=$.$e,$.g.$H=$.af,$.H(nf,$.od);var ZD=[];$.g=nf.prototype,$.g.wa=function(t,e,i,n){$.A(e)||(e&&(ZD[0]=e.toString()),e=ZD);for(var s=0;s<e.length;s++){var a=$.Ld(t,e[s],i||this.handleEvent,n||!1,this.qo||this);if(!a)break;this.b[a.key]=a}return this},$.g.Ce=function(t,e,i,n){return of(this,t,e,i,n)},$.g.gc=function(t,e,i,n,s){if($.A(e))for(var a=0;a<e.length;a++)this.gc(t,e[a],i,n,s);else(t=$.be(t,e,i||this.handleEvent,$.C(n)?!!n.capture:!!n,s||this.qo||this))&&(Zd(t),delete this.b[t.key]);return this},$.g.R=function(){nf.u.R.call(this),pf(this)},$.g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},$.H($.qf,$.od),$.qf.prototype[Dd]=!0,$.g=$.qf.prototype,$.g.Zi=function(){return this.TW},$.g.kb=function(t){this.TW=t},$.g.addEventListener=function(t,e,i,n){$.Ld(this,t,e,i,n)},$.g.removeEventListener=function(t,e,i,n){$.Yd(this,t,e,i,n)},$.g.dispatchEvent=function(t){var e,i=this.Zi();if(i)for(e=[];i;i=i.Zi())e.push(i);i=this.N$;var n=t.type||t;if($.z(t))t=new wd(t,i);else if(t instanceof wd)t.target=t.target||i;else{var s=t;t=new wd(n,i),$.Sc(t,s)}if(s=!0,e)for(var a=e.length-1;!t.b&&0<=a;a--){var o=t.currentTarget=e[a];s=$.sf(o,n,!0,t)&&s}if(t.b||(o=t.currentTarget=i,s=$.sf(o,n,!0,t)&&s,t.b||(s=$.sf(o,n,!1,t)&&s)),e)for(a=0;!t.b&&a<e.length;a++)o=t.currentTarget=e[a],s=$.sf(o,n,!1,t)&&s;return s},$.g.R=function(){$.qf.u.R.call(this),this.Bl(),this.TW=null},$.g.wa=function(t,e,i,n){return this.gy.add(String(t),e,!1,i,n)},$.g.Ce=function(t,e,i,n){return this.gy.add(String(t),e,!0,i,n)},$.g.gc=function(t,e,i,n){return this.gy.remove(String(t),e,i,n)},$.g.TB=function(t){return Id(this.gy,t)},$.g.Bl=function(t){if(this.gy){var e=this.gy;t=t&&t.toString();var i,n=0;for(i in e.b)if(!t||i==t){for(var s=e.b[i],a=0;a<s.length;a++)++n,Gd(s[a]);delete e.b[i],e.f--}e=n}else e=0;return e},$.g.fH=function(t,e,i,n){return this.gy.fH(String(t),e,i,n)};var vf={},Rf=$.gd?"MozUserSelect":$.xd||$.Hp?"WebkitUserSelect":null,Yf={thin:2,medium:4,thick:6},qda,rda,sda;$.pda=function(){if($.RC){var t=/Windows NT ([0-9.]+)/;return(t=t.exec(Bc))?t[1]:"0"}return $.Ad?(t=(t=/10[_.][0-9_.]+/).exec(Bc))?t[0].replace(/_/g,"."):"10":hda?(t=(t=/Android\s+([^\);]+)(\)|;)/).exec(Bc))?t[1]:"":(ida||jda||kda)&&(t=(t=/(?:iPhone|CPU)\s+OS\s+(\S+)/).exec(Bc))?t[1].replace(/_/g,"."):""}(),qda=$.Cc("Firefox"),$.$D=Wc()||$.Cc("iPod"),$.aE=$.Cc("iPad"),rda=$.Cc("Android")&&!(Vc()||$.Cc("Firefox")||$.Cc("Opera")||$.Cc("Silk")),sda=Vc(),$.bE=$.Cc("Safari")&&!(Vc()||$.Cc("Coast")||$.Cc("Opera")||$.Cc("Edge")||$.Cc("Silk")||$.Cc("Android"))&&!Xc(),$.tda=function(){if(qda)return $f(/Firefox\/([0-9.]+)/);if($.hd||$.Hp||$.yd)return $.ad;if(sda)return Xc()?$f(/CriOS\/([0-9.]+)/):$f(/Chrome\/([0-9.]+)/);if($.bE&&!Xc())return $f(/Version\/([0-9.]+)/);if($.$D||$.aE){var t=/Version\/(\S+).*Mobile\/(\S+)/.exec(Bc);if(t)return t[1]+"."+t[2]}else if(rda)return(t=$f(/Android\s+([0-9.]+)/))?t:$f(/Version\/([0-9.]+)/);return""}(),$.H($.ag,$.qf);var Faa=$.fa.document&&$.fa.document.documentElement&&!!$.fa.document.documentElement.setCapture&&!!$.fa.document.releaseCapture;$.g=$.ag.prototype,$.g.NX=function(t){this.f=t||new $.I(window.NaN,window.NaN,window.NaN,window.NaN)},$.g.Dj=function(t){this.K=t},$.g.R=function(){$.ag.u.R.call(this),$.Yd(this.D,["touchstart","mousedown"],this.lk,!1,this),pf(this.Qg),this.G&&this.o.releaseCapture(),this.D=this.target=null},$.g.lk=function(t){var e="mousedown"==t.type;if(!this.K||this.lp||e&&!t.OA())this.dispatchEvent("earlycancel");else{if(0==this.P){if(!this.dispatchEvent(new dg("start",this,t.clientX,t.clientY,t)))return;this.lp=!0,e&&t.preventDefault()}else e&&t.preventDefault();var i=(e=this.o).documentElement,n=!this.G;this.Qg.wa(e,["touchmove","mousemove"],this.Aga,{capture:n,passive:!1}),this.Qg.wa(e,["touchend","mouseup"],this.ey,n),this.G?(i.setCapture(!1),this.Qg.wa(i,"losecapture",this.ey)):this.Qg.wa(e?$.Ge(e):window,"blur",this.ey),this.D5&&this.Qg.wa(this.D5,"scroll",this.eja,n),this.clientX=this.na=t.clientX,this.clientY=this.Ba=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,this.ar(),this.aa=$.He($.ye(this.o).b)}},$.g.ey=function(t,e){if(pf(this.Qg),this.G&&this.o.releaseCapture(),this.lp){this.lp=!1;var i=this.VA(this.deltaX),n=this.xw(this.deltaY);this.dispatchEvent(new dg("end",this,t.clientX,t.clientY,t,i,n,e||"touchcancel"==t.type))}else this.dispatchEvent("earlycancel")},$.g.Aga=function(t){if(this.K){var e=t.clientX-this.clientX,i=t.clientY-this.clientY;if(this.clientX=t.clientX,this.clientY=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,!this.lp){var n=this.na-this.clientX,s=this.Ba-this.clientY;if(n*n+s*s>this.P){if(!this.dispatchEvent(new dg("start",this,t.clientX,t.clientY,t)))return void(this.md||this.ey(t));this.lp=!0}}e=(i=cg(this,e,i)).x,i=i.y,this.lp&&this.dispatchEvent(new dg("beforedrag",this,t.clientX,t.clientY,t,e,i))&&(eg(this,t,e,i),t.preventDefault())}},$.g.eja=function(t){var e=cg(this,0,0);t.clientX=this.clientX,t.clientY=this.clientY,eg(this,t,e.x,e.y)},$.g.VA=function(t){var e=this.f,i=(0,window.isNaN)(e.left)?null:e.left;return e=(0,window.isNaN)(e.width)?0:e.width,Math.min(null!=i?i+e:window.Infinity,Math.max(null!=i?i:-window.Infinity,t))},$.g.xw=function(t){var e=this.f,i=(0,window.isNaN)(e.top)?null:e.top;return e=(0,window.isNaN)(e.height)?0:e.height,Math.min(null!=i?i+e:window.Infinity,Math.max(null!=i?i:-window.Infinity,t))},$.g.ar=function(){this.deltaX=this.target.offsetLeft,this.deltaY=this.target.offsetTop},$.g.ls=function(t,e){this.target.style.left=t+"px",this.target.style.top=e+"px"},$.H(dg,wd),$.H(fg,$.ag),$.g=fg.prototype,$.g.Vja=function(){return this.i.dispatchEvent("earlycancel")},$.g.LO=function(t){return this.i.dispatchEvent(new dg(t.type,this,t.clientX,t.clientY,t.EC,t.left,t.top,t.o))},$.g.NX=function(t){this.f=t||new $.I(window.NaN,window.NaN,window.NaN,window.NaN)},$.g.ar=function(){this.deltaX=this.i.H1(),this.deltaY=this.i.I1()},$.g.VA=function(){if(this.b[0]=this.deltaX,this.b[1]=this.deltaY,!(0,window.isNaN)(this.f.left)||!(0,window.isNaN)(this.f.top)){var t=this.i.parent().Ig();t&&og(this.i.parent()).transform(this.b,0,this.b,0,1);var e=this.f,i=(0,window.isNaN)(e.left)?null:e.left,n=(0,window.isNaN)(e.width)?0:e.width,s=(0,window.isNaN)(e.top)?null:e.top;e=(0,window.isNaN)(e.height)?0:e.height,n-=this.i.zd(),e-=this.i.qd(),e=null!=s?s+e:window.Infinity,s=null!=s?s:-window.Infinity,this.b[0]=Math.min(null!=i?i+n:window.Infinity,Math.max(null!=i?i:-window.Infinity,this.b[0])),this.b[1]=Math.min(e,Math.max(s,this.b[1])),t&&t.transform(this.b,0,this.b,0,1)}return this.b[0]},$.g.xw=function(){return this.b[1]},$.g.ls=function(t,e){var i=og(this.i.parent());if(i){var n=[t,e];i.transform(n,0,n,0,1),t=n[0],e=n[1]}this.i.setPosition(t,e)},$.H($.ig,$.qf);var gg=4294967295;$.g=$.ig.prototype,$.g.EG=!1,$.g.YC=!1,$.g.nx=null,$.g.ox=null,$.g.zv=null,$.g.Av=null,$.g.rw=!1,$.g.VC=null,$.g.iE=null,$.g.Ud=null,$.g.Y=null,$.g.lB=null,$.g.hj=!0,$.g.ti=null,$.g.RL=!1,$.g.Pd=null,$.g.YG=null,$.g.WY=0,$.g.il=506631,$.g.XC=0,$.g.id=function(t){return $.p(t)?(t=t||"",this.he!=t&&(this.he=t,this.Pb(2048)),this):($.p(this.he)||this.id(bc($.ac.Id(),this)),this.he)},$.g.Ja=function(){var t=this.parent();return t?t.Ja():null},$.g.ia=function(){return this.Ud},$.g.parent=function(t){if($.p(t)){if(t){if(t!=this.Y){var e=this.Ja();e=e&&e!=t.Ja(),t.hc(this),e&&this.EO()}}else this.remove();return this}return this.Y},$.g.EO=function(){var t=this.clip();t&&t.id(null),this.Pb(536)},$.g.eN=function(){return!!this.Y},$.g.remove=function(){return this.Y&&this.Y.removeChild(this),this},$.g.title=function(t){return $.p(t)?(this.ox!=t&&(this.ox=t,this.Pb(65536)),this):this.ox},$.g.bT=function(t){return $.p(t)?(this.Av!=t&&(this.Av=t,this.Pb(131072)),this):this.Av},$.g.Cd=function(t,e){return $.p(e)?(this.BC[t]!==e&&(this.BC[t]=e,this.Pb(262144)),this):t in this.BC?this.BC[t]:$.mg().getAttribute(this.Ud,t)},$.g.cursor=function(t){return $.p(t)?(this.VC=t,this.tG(),this):this.VC},$.g.tG=function(){this.Pb(4096)},$.g.yr=function(){return!!this.XC},$.g.Vf=function(t){return!!(this.XC&t)},$.g.suspend=function(){this.IV=!0},$.g.resume=function(){this.IV=!1,this.Pb(this.FP),this.FP=0},$.g.Pb=function(t){(t&=this.il)&&(this.IV?this.FP|=t:(this.XC|=t,this.Y&&this.Y.Pb(64),!(t=this.Ja())||t.yf()||t.wN()||this.wN()||this.Sd()))},$.g.fl=function(t){return this.Y&&this.Y==t||(this.lB?this.lB==t&&(this.lB=null):this.lB=this.Y,this.Y=t,this.kb(t)),this},$.g.qv=$.ia,$.g.Mr=function(){this.vV=this.YG=null,this.ae(),this.Pb(4),ng(this)},$.g.Uy=function(){this.YG=null,this.ae(),$.mg().OI()&&this.Pb(256),ng(this)},$.g.Ig=function(){if(!this.YG){var t=this.Y?this.Y.Ig():null;this.YG=yb(t,this.Pd)}return this.YG},$.g.rotate=function(t,e,i){return this.qv(),t=$.Kb($.bb(t),e||0,i||0),this.Pd?$.Hb(this.Pd,t):this.Pd=t,this.Mr(),this},$.g.Du=function(t,e){var i=Lb(this.rb(),e||"center");return this.rotate(t,i[0],i[1])},$.g.JE=function(t,e,i){return this.rotate(t-this.tD(),e,i)},$.g.gP=function(t,e){return this.Du(t-this.tD(),e)},$.g.translate=function(t,e){return this.qv(),this.Pd?this.Pd.translate(t,e):this.Pd=(new $.Db).setTransform(1,0,0,1,t,e),this.Mr(),this},$.g.setPosition=function(t,e){var i=[t,e,this.Gh(),this.As()];return this.Pd&&$.Jb(this.Pd).transform(i,0,i,0,2),this.translate(i[0]-i[2],i[1]-i[3])},$.g.wka=function(t,e){if(this.qv(),this.Pd){var i=this.Pd.Jd,n=this.Pd.Fd;if(t==i&&e==n)return this;$.Fb(this.Pd,t-i,e-n)}else this.Pd=(new $.Db).setTransform(1,0,0,1,t,e);return this.Mr(),this},$.g.scale=function(t,e,i,n){return this.qv(),this.Pd||(this.Pd=new $.Db),$.Eb(this.Pd,t,e),$.Fb(this.Pd,(i||0)*(1-t),(n||0)*(1-e)),this.Mr(),this},$.g.XO=function(t,e,i){return i=Lb(this.rb(),i||"center"),this.scale(t,e,i[0],i[1])},$.g.RF=function(t,e,i,n,s,a){return this.qv(),this.Pd?$.wb(this.Pd,new $.Db(t,e,i,n,s,a)):this.Pd=new $.Db(t,e,i,n,s,a),this.Mr(),this},$.g.oc=function(t,e,i,n,s,a){return this.qv(),this.Pd?this.Pd.setTransform(t,e,i,n,s,a):this.Pd=new $.Db(t,e,i,n,s,a),this.Mr(),this},$.g.tD=function(){return $.Cb(this.Pd)},$.g.kp=function(){return this.Pd?[this.Pd.od,this.Pd.We,this.Pd.gf,this.Pd.Le,this.Pd.Jd,this.Pd.Fd]:[1,0,0,1,0,0]},$.g.Ac=function(t){var e,i=this.Ja();(e=i)&&(e=(e=cE)!=cE&&2!=e&&3!=e||0<i.xF(1)),(e||t)&&(this.Ud=this.Ft(),Uj(this),$.jg(this,1))},$.g.Ft=function(){return null},$.g.wN=function(){return this.rw},$.g.Sd=function(){if(this.rw=!0,this.md||!this.Ja())return this;if(this.Vf(1)){if(this.Ac(),this.Vf(1))return this;this.EG&&this.Om(this.EG)}return this.h0(),this.jk(),this.rw=!1,this},$.g.h0=function(){},$.g.jk=function(){if(this.Vf(262144)){var t=$.mg(),e=this.BC,i=this.ia();if(i&&$.C(e))for(var n in e){var s=e[n];null===s?i.removeAttribute(n):t.lc(i,n,s)}this.BC={},$.jg(this,262144)}this.Vf(2)&&($.mg().Ji(this),$.jg(this,2)),this.Vf(4096)&&this.k5(),this.Vf(8192)&&($.mg().S5(this),$.jg(this,8192)),(this.Vf(4)||this.Vf(256))&&this.Vw(),this.Vf(512)&&($.mg().HX(this),$.jg(this,512)),this.Vf(32768)&&($.mg().J5(this,this.YC),$.jg(this,32768)),this.Vf(65536)&&($.mg().RX(this,this.ox),$.jg(this,65536)),this.Vf(131072)&&($.mg().JX(this,this.Av),$.jg(this,131072)),this.Vf(2048)&&(t=$.mg(),$.qh(t,this.ia(),this.id()),$.jg(this,2048))},$.g.Vw=function(){$.mg().CB(this),$.jg(this,4),$.jg(this,256)},$.g.k5=function(){$.mg().I5(this,this.VC||this.iE),$.jg(this,4096)},$.g.Dd=function(t){return $.p(t)?(this.RL=!!t,this.Pb(8192),this):this.RL},$.g.dispatchEvent=function(t){return $.z(t)?t=t.toLowerCase():"type"in t&&(t.type=String(t.type).toLowerCase()),$.ig.u.dispatchEvent.call(this,t)},$.g.wa=function(t,e,i,n){return $.ig.u.wa.call(this,String(t).toLowerCase(),e,i,n)},$.g.Ce=function(t,e,i,n){return $.ig.u.Ce.call(this,String(t).toLowerCase(),e,i,n)},$.g.gc=function(t,e,i,n){return $.ig.u.gc.call(this,String(t).toLowerCase(),e,i,n)},$.g.Bl=function(t){return $.p(t)&&(t=String(t).toLowerCase()),$.ig.u.Bl.call(this,t)},$.g.zIndex=function(t){return $.p(t)?(t=+t||0,this.WY!=t&&(this.WY=t,this.Y&&this.Y.Pb(128)),this):this.WY||0},$.g.visible=function(t){return $.p(t)?(t=!!t,this.hj!=t&&(this.hj=t,this.Pb(2)),this):this.hj},$.g.eq=function(t){return $.p(t)?(t=!!t,this.YC!=t&&(this.YC=null==t||t,this.Pb(32768)),this):this.YC},$.g.clip=function(t){if(0==arguments.length)return this.ti;var e="none"==t?null:t;return!this.ti&&!e||this.ti&&this.ti===e||(e&&!$.J(e,$.Dg)?$.J(e,$.pg)&&e.eN()&&$.J(e.parent(),$.Dg)?(this.ti&&!this.ti.md&&$.Fa(this.ti.elements,this),this.ti=e.parent(),$.Ba(this.ti.elements,this)):this.ti?this.ti.shape(e):(this.ti=$.tk(e),$.Ba(this.ti.elements,this)):this.ti=e||null,this.Y&&this.Y.cG(),this.Pb(512)),this},$.g.nl=null,$.g.Gh=function(){return this.rb().left},$.g.As=function(){return this.rb().top},$.g.zd=function(){return this.rb().width},$.g.qd=function(){return this.rb().height},$.g.rb=function(){return this.nl||this.Xt(this.Pd)},$.g.tF=null,$.g.H1=function(){return this.kr().left},$.g.I1=function(){return this.kr().top},$.g.VT=function(){return this.kr().width},$.g.UT=function(){return this.kr().height},$.g.kr=function(){return this.tF||this.Xt(this.Ig())},$.g.Xt=function(t){var e=t==this.Pd;if(this.nl&&e)t=this.nl.clone();else{var i=t==this.Ig();this.tF&&i?t=this.tF.clone():(t=this.HC(t),e&&(this.nl=t.clone()),i&&(this.tF=t.clone()))}return t},$.g.HC=function(t){return $.Ab(this.ck(),t)},$.g.ck=function(){return this.Xt(null)},$.g.ae=function(){this.tF=this.nl=null},$.g.Om=function(t){return null!=t?((this.EG=t)&&!this.Vf(1)?(t=$.J(t,$.I)?this.EG:null,this.mf||(this.mf=new fg(this)),this.mf.Dj(!0),this.mf.NX(t)):this.mf&&this.mf.Dj(!1),this):this.EG},$.g.pe=function(t){if("id"in t&&this.id(t.id),"clip"in t){var e=$.tk();e.pe(t.clip),this.clip(e)}"drag"in t&&(e=t.drag,this.Om($.da(e)?e:new $.I(e.left,e.top,e.width,e.height))),"cursor"in t&&this.cursor(t.cursor),"transformation"in t&&this.oc.apply(this,t.transformation)},$.g.F=function(){var t={};this.he&&(t.id=this.he);var e=this.clip();return e&&(t.clip=e.F()),(e=this.cursor())&&(t.cursor=e),(e=this.Om())&&(t.drag=e),(e=this.Pd)&&(t.transformation=[e.od,e.We,e.gf,e.od,e.Jd,e.Fd]),t},$.g.ld=function(){$.ig.u.ld.call(this)},$.g.R=function(){this.eN()?this.remove():this.gD(),$.ig.u.R.call(this)},$.g.gD=function(){$.sd(this.qo,this.ti,this.mf),this.mf=this.ti=this.qo=null,this.fl(null),ik(this),this.Pd=this.IB=this.Ud=null};var dE=$.ig.prototype;dE.id=dE.id,dE.visible=dE.visible,dE.disableStrokeScaling=dE.eq,dE.domElement=dE.ia,dE.parent=dE.parent,dE.hasParent=dE.eN,dE.remove=dE.remove,dE.attr=dE.Cd,dE.title=dE.title,dE.desc=dE.bT,dE.getStage=dE.Ja,dE.cursor=dE.cursor,dE.disablePointerEvents=dE.Dd,dE.rotate=dE.rotate,dE.rotateByAnchor=dE.Du,dE.setRotation=dE.JE,dE.setRotationByAnchor=dE.gP,dE.translate=dE.translate,dE.setTranslation=dE.wka,dE.setPosition=dE.setPosition,dE.scale=dE.scale,dE.scaleByAnchor=dE.XO,dE.appendTransformationMatrix=dE.RF,dE.setTransformationMatrix=dE.oc,dE.getRotationAngle=dE.tD,dE.getTransformationMatrix=dE.kp,dE.clip=dE.clip,dE.zIndex=dE.zIndex,dE.getX=dE.Gh,dE.getY=dE.As,dE.getWidth=dE.zd,dE.getHeight=dE.qd,dE.getBounds=dE.rb,dE.getAbsoluteX=dE.H1,dE.getAbsoluteY=dE.I1,dE.getAbsoluteWidth=dE.VT,dE.getAbsoluteHeight=dE.UT,dE.getAbsoluteBounds=dE.kr,dE.listen=dE.wa,dE.listenOnce=dE.Ce,dE.unlisten=dE.gc,dE.unlistenByKey=dE.TB,dE.removeAllListeners=dE.Bl,dE.drag=dE.Om,dE.dispose=dE.ld,$.H($.pg,$.ig),$.g=$.pg.prototype,$.g.il=24|$.ig.prototype.il,$.g.fill=function(t,e,i,n,s,a,o){if(!$.p(t))return this.G;var r=$.Ub.apply(this,arguments);return this.G!=r&&(this.G=r,this.ec=2&this.ec|!(!r.mode&&!r.src),this.Pb(8)),this},$.g.stroke=function(t,e,i,n,s){if(!$.p(t))return this.i;var a=$.Wb.apply(this,arguments);return this.i!=a&&(this.i=a,this.ec=1&this.ec|a.mode<<1,this.Pb(16)),this},$.g.gl=function(t){return $.p(t)?($.z(this.i)?this.i={color:this.i,thickness:(0,window.isNaN)(t)?1:+t}:this.i.thickness=(0,window.isNaN)(t)?1:+t,this.Pb(16),this):$.z(this.i)?1:$.$b(this.i)},$.g.h0=function(){this.ec&&this.Vf(32)&&(1&this.ec&&this.Pb(8),2&this.ec&&this.Pb(16))},$.g.jk=function(){$.pg.u.jk.call(this),(this.Vf(8)||this.Vf(16))&&($.mg().R_(this),$.jg(this,8),$.jg(this,16))},$.g.pe=function(t){if("fill"in t){var e=t.fill,i=e.type;"pattern"==i?(i=e.bounds,(i=$.Sb(new $.I(i.left,i.top,i.width,i.height))).pe(e)):"hatchFill"==i?i=Xb(e.hatchType,e.color,e.thickness,e.size):($.C(e)&&"type"in e&&delete e.type,i=e),this.fill(i)}"stroke"in t&&this.stroke(t.stroke),$.pg.u.pe.call(this,t)},$.g.F=function(){var t=$.pg.u.F.call(this);if(this.G){if($.J(this.G,Mg))var e={type:"hatchFill",hatchType:this.G.type,color:this.G.color,thickness:this.G.Ef,size:this.G.size};else $.J(this.G,$.Qb)?e=this.G.F():$.C(this.G)&&"keys"in this.G?"cx"in this.G&&"cy"in this.G?(e=$.fd(this.G)).type="RadialGradientFill":(e=$.fd(this.G)).type="LinearGradientFill":e=this.G;e&&(t.fill=e)}return this.i?t.stroke=this.i:$.C(this.i)&&"keys"in this.i&&("cx"in this.i&&"cy"in this.i?(e=$.fd(this.i)).type="RadialGradientFill":(e=$.fd(this.i)).type="LinearGradientFill",t.stroke=e),t},$.g.R=function(){delete this.G,delete this.i,$.pg.u.R.call(this)};var eE=$.pg.prototype;eE.stroke=eE.stroke,eE.strokeThickness=eE.gl,eE.fill=eE.fill,eE.attr=eE.Cd,$.H(qg,$.pg),$.g=qg.prototype,$.g.il=32|$.pg.prototype.il,$.g.Sm=function(){return"ellipse"},$.g.To=function(t){return $.p(t)?(this.f.x!=t&&(this.f.x=t,this.ae(),this.Pb(32)),this):this.f.x},$.g.Uo=function(t){return $.p(t)?(this.f.y!=t&&(this.f.y=t,this.ae(),this.Pb(32)),this):this.f.y},$.g.Tp=function(t){return $.p(t)?($.ib(this.f,t)||(this.f.x=t.x,this.f.y=t.y,this.ae(),this.Pb(32)),this):this.f.clone()},$.g.Xr=function(t){return $.p(t)?(this.b!=t&&(this.b=t,this.ae(),this.Pb(32)),this):this.b},$.g.zx=function(t){return $.p(t)?(this.o!=t&&(this.o=t,this.ae(),this.Pb(32)),this):this.o},$.g.vka=function(t,e){return this.Xr(t),this.zx(e),this},$.g.ck=function(){return new $.I(this.f.x-this.b,this.f.y-this.o,this.b+this.b,this.o+this.o)},$.g.HC=function(t){if(t){var e=$.tb(this.f.x,this.f.y,this.b,this.o,0,360,!0);t.transform(e,0,e,0,e.length/2),t=ub.apply(null,e)}else t=this.ck();return t},$.g.Ft=function(){return $.mg().H0()},$.g.jk=function(){this.Vf(32)&&(this.Ep(),this.fill()&&this.fill().src&&this.Pb(8)),qg.u.jk.call(this)},$.g.Vw=function(){$.mg().K5(this),$.jg(this,4),$.jg(this,256)},$.g.Ep=function(){$.mg().KX(this),$.jg(this,32)},$.g.pe=function(t){this.To(t.cx).Uo(t.cy),"rx"in t&&this.Xr(t.rx),"ry"in t&&this.zx(t.ry),qg.u.pe.call(this,t)},$.g.F=function(){var t=qg.u.F.call(this);return t.type="ellipse",t.cx=this.To(),t.cy=this.Uo(),t.rx=this.Xr(),t.ry=this.zx(),t},$.g.R=function(){this.ae(),this.f=null,qg.u.R.call(this)},$.E("acgraph.vector.Ellipse",qg);var fE=qg.prototype;fE.center=fE.Tp,fE.centerX=fE.To,fE.centerY=fE.Uo,fE.radiusX=fE.Xr,fE.radiusY=fE.zx,fE.setRadius=fE.vka,$.H($.rg,qg),$.g=$.rg.prototype,$.g.Sm=function(){return"circle"},$.g.Eb=function(t){return null!=t?(this.Xr(t),this.zx(t),this):this.Xr()},$.g.Ft=function(){return $.mg().D0()},$.g.Ep=function(){$.mg().H5(this),$.jg(this,32)},$.g.pe=function(t){this.Xr(t.radius),$.rg.u.pe.call(this,t)},$.g.F=function(){var t=$.rg.u.F.call(this);return t.type="circle",delete t.rx,delete t.ry,t.radius=this.Xr(),t},$.E("acgraph.vector.Circle",$.rg);var gE=$.rg.prototype;gE.radius=gE.Eb,$.H($.sg,$.pg);var Gaa=[,2,2,6,6,2];$.g=$.sg.prototype,$.g.OT=function(t,e,i){tg(t,this.o,this.f,this.D,e,i)},$.g.mfa=function(t,e,i){if(this.pt)var n=this.pt;else{var s=this.Ig();s&&!$.zb(s)?(n=[],this.tJ(),s.transform(this.D,0,n,0,this.D.length/2)):n=this.D}tg(t,this.o,this.f,n,e,i)},$.g.il=32|$.pg.prototype.il,$.g.vv=null,$.g.ag=null,$.g.$X=!0,$.g.pt=null,$.g.Sm=function(){return"path"},$.g.Uj=function(){return 0==this.o.length},$.g.tJ=function(){if(!this.$X){var t=this.D,e=this.o,i=this.f;this.D=[],this.o=[],this.f=[],ug(this),tg((0,$.pa)((function(t,e){hE[t].apply(this,e)}),this),e,i,t),this.Pb(32)}},$.g.YN=function(t,e){return 1==$.ua(this.o)?this.D.length-=2:(this.o.push(1),this.f.push(1)),this.D.push(t,e),this.ag=this.vv=[t,e],this.pt=null,this.Pb(32),this},$.g.Ns=function(t,e,i){var n=$.ua(this.o);if(null==n)throw $.ld(9);for(2!=n&&(this.o.push(2),this.f.push(0)),n=0;n<arguments.length;n+=2)t=arguments[n],e=arguments[n+1],this.D.push(t,e);return this.f[this.f.length-1]+=n/2,this.ag=[t,e],this.ae(),this.pt=null,this.Pb(32),this},$.g.CL=function(t,e,i,n,s,a,o){var r=$.ua(this.o);if(null==r)throw $.ld(9);for(3!=r&&(this.o.push(3),this.f.push(0)),r=0;r<arguments.length;r+=6){var l=arguments[r+4],h=arguments[r+5];this.D.push(arguments[r],arguments[r+1],arguments[r+2],arguments[r+3],l,h)}return this.f[this.f.length-1]+=r/6,this.ag=[l,h],this.ae(),this.pt=null,this.Pb(32),this},$.g.Sja=function(t,e,i,n,s){if(0==this.o.length)throw $.ld(9);for(var a=this.ag[0],o=this.ag[1],r=0;r<arguments.length;r+=4){t=arguments[r],e=arguments[r+1];var l=arguments[r+2],h=arguments[r+3];this.CL(a+2*(t-a)/3,o+2*(e-o)/3,t+(l-t)/3,e+(h-e)/3,l,h),a=l,o=h}return this},$.g.U_=function(t,e,i,n){return t=$.tb(this.ag[0]-$.db(i,t),this.ag[1]-$.eb(i,e),t,e,i,n),this.CL.apply(this,t),this.ae(),this.pt=null,this.Pb(32),this},$.g.mS=function(){var t=$.ua(this.o);if(null==t)throw $.ld(9);return 5!=t&&(this.D.push(this.vv[0],this.vv[1]),this.o.push(5),this.f.push(1),this.ag=this.vv,this.Pb(32)),this},$.g.HC=function(t){if(this.ag){if(t&&!$.zb(t)){var e=[this.ag[0],this.ag[1]];t.transform(e,0,e,0,1),e=new $.I(e[0],e[1],0,0),this.tJ()}else e=new $.I(this.ag[0],this.ag[1],0,0);this.OT((function(t,e){$.kd(iE[t],e,this)}),{rect:e,transform:t},!0)}else e=new $.I(window.NaN,window.NaN,window.NaN,window.NaN);return e},$.g.Mr=function(){$.sg.u.Mr.call(this),this.pt=null},$.g.Uy=function(){$.sg.u.Uy.call(this),this.pt=null},$.g.Vw=function(){$.mg().Q5(this),$.jg(this,4),$.jg(this,256)},$.g.Ft=function(){return $.mg().M0()},$.g.jk=function(){$.sg.u.jk.call(this),this.Vf(32)&&($.mg().OX(this),$.jg(this,32))};var hE,jE=[];jE[1]=$.sg.prototype.YN,jE[2]=$.sg.prototype.Ns,jE[5]=$.sg.prototype.mS,jE[3]=$.sg.prototype.CL,jE[4]=$.sg.prototype.U_,hE=jE;var iE,kE=[];kE[1]=$.ia,kE[2]=function(t){var e=new $.I(0,0,0,0);if(this.transform){var i=arguments;this.transform.transform(i,0,i,0,Math.floor(arguments.length/2))}i=0;for(var n=arguments.length;i<n;i+=2)e.left=arguments[i],e.top=arguments[i+1],$.pb(this.rect,e)},kE[5]=$.ia,kE[3]=function(t){if(this.transform){var e=arguments;this.transform.transform(e,0,e,0,Math.floor(arguments.length/2))}$.pb(this.rect,ub.apply(null,arguments))},kE[4]=function(t,e,i,n,s,a,o,r){var l=new $.I(0,0,0,0);o=[t,o],r=[e,r],t-=$.db(s,i),e-=$.eb(s,n);var h=0<a?90:-90,c=90*(0<a?Math.ceil(s/90):Math.floor(s/90));for(s+=a;c<s^0>a;c+=h)switch((Math.floor(c/90)+4)%4){case 0:o.push(t+i);break;case 1:r.push(e+n);break;case 2:o.push(t-i);break;case 3:r.push(e-n)}l.left=Math.min.apply(null,o),l.width=Math.max.apply(null,o)-l.left,l.top=Math.min.apply(null,r),l.height=Math.max.apply(null,r)-l.top,$.pb(this.rect,l)},iE=kE,$.sg.prototype.Jg=function(){var t=0;if(this.Uj())return t;var e=[];return this.OT((function(i,n){if(1!=i){var s=$.Ja(e,e.length-2);if(4==i){var a=6;n=$.tb(s[0]-$.db(n[2],n[0]),s[1]-$.eb(n[2],n[1]),n[0],n[1],n[2],n[3])}else 2==i?a=2:3==i&&(a=6);for(var o=0,r=n.length-(a-1);o<r;o+=a){Array.prototype.push.apply(s,$.Ja(n,o,o+a));var l,h=t,c=s,u=c.length,d=u/2-1,p=[];for(l=0;l<u;l+=2)p.push({x:c[l],y:c[l+1]});for(c=[],u=0;100>=u;u++){var g={x:0,y:0};if(0==(l=u/100))c.push(p[0]);else if(1===l)c.push(p[d]);else{var f=p,b=1-l;if(1===d)l={x:b*f[0].x+l*f[1].x,y:b*f[0].y+l*f[1].y},c.push(l);else if(4>d){var v=b*b,m=l*l,y=0;if(2===d){f=[f[0],f[1],f[2],g];var S=v,w=b*l*2,x=m}else 3===d&&(S=v*b,w=v*l*3,x=b*m*3,y=l*m);l={x:S*f[0].x+w*f[1].x+x*f[2].x+y*f[3].x,y:S*f[0].y+w*f[1].y+x*f[2].y+y*f[3].y},c.push(l)}else{for(f=JSON.parse(JSON.stringify(p));1<f.length;){for(g=0;g<f.length-1;g++)f[g]={x:f[g].x+(f[g+1].x-f[g].x)*l,y:f[g].y+(f[g+1].y-f[g].y)*l};f.splice(f.length-1,1)}c.push(f[0])}}}for(g=p=0;g<c.length-1;g++)l=c[g],d=(u=c[g+1]).x-l.x,u=u.y-l.y,p+=Math.sqrt(d*d+u*u);t=h+(100*p|0)/100,s=$.Ja(s,s.length-2)}}$.kd(Array.prototype.push,n,e)})),t},$.sg.prototype.pe=function(t){this.vv=t.closePoint,this.ag=t.currentPoint,this.o=t.segments,this.f=t.count,this.D=t.arguments,this.Pb(32),$.sg.u.pe.call(this,t)},$.sg.prototype.F=function(){var t=$.sg.u.F.call(this);return t.type="path",$.yg(this,t)},$.sg.prototype.R=function(){this.ag=this.vv=null,this.ae(),this.pt=null,delete this.o,delete this.f,delete this.D,$.sg.u.R.call(this)},$.H($.Ag,$.sg),$.g=$.Ag.prototype,$.g.clear=function(){return vg(this)},$.g.moveTo=function(t,e){return this.YN(t,e)},$.g.lineTo=function(t,e,i){return $.sg.prototype.Ns.apply(this,arguments)},$.g.Sk=function(t,e,i,n,s,a,o){return $.sg.prototype.CL.apply(this,arguments)},$.g.lK=function(t,e,i,n,s){return $.sg.prototype.Sja.apply(this,arguments)},$.g.Fe=function(t,e,i,n,s,a,o){return t+=$.db(s,i),e+=$.eb(s,n),this.ag&&this.ag[0]==t&&this.ag[1]==e||(o?this.Ns(t,e):this.YN(t,e)),wg(this,i,n,s,a)},$.g.Ff=function(t,e,i,n,s,a){return xg(this,t,e,i,n,s,a)},$.g.arcTo=function(t,e,i,n){return wg(this,t,e,i,n)},$.g.MR=function(t,e,i,n){return this.U_(t,e,i,n)},$.g.close=function(){return this.mS()},$.g.HZ=function(){return this.ag?new $.gb(this.ag[0],this.ag[1]):null};var lE=$.Ag.prototype;$.E("acgraph.vector.Path",$.Ag),lE.moveTo=lE.moveTo,lE.lineTo=lE.lineTo,lE.curveTo=lE.Sk,lE.quadraticCurveTo=lE.lK,lE.arcTo=lE.arcTo,lE.arcToByEndPoint=lE.Ff,lE.arcToAsCurves=lE.MR,lE.circularArc=lE.Fe,lE.close=lE.close,lE.clear=lE.clear,lE.getCurrentPoint=lE.HZ,lE.getLength=lE.Jg,$.H(Cg,$.sg),$.g=Cg.prototype,$.g.il=32|$.pg.prototype.il,$.g.Sm=function(){return"rect"},$.g.Ho=function(t){return t!=this.b.left&&(this.b.left=t,Bg(this)),this},$.g.Io=function(t){return t!=this.b.top&&(this.b.top=t,Bg(this)),this},$.g.Go=function(t){return this.b.width!=t&&(this.b.width=t,Bg(this)),this},$.g.Fo=function(t){return this.b.height!=t&&(this.b.height=t,Bg(this)),this},$.g.Qf=function(t){return $.nb(this.b,t)||(this.b.left=t.left,this.b.top=t.top,this.b.width=t.width,this.b.height=t.height,Bg(this)),this},$.g.IX=function(t,e){var i,n,s=$.Ja(arguments,1),a=s[0];4>(n=$.z(a)?Vb(a,4):s).length?n=i=a=s=(0,window.parseFloat)(n[0]):(s=(0,window.parseFloat)(n[0]),a=(0,window.parseFloat)(n[1]),i=(0,window.parseFloat)(n[2]),n=(0,window.parseFloat)(n[3])),this.P[0]=s||0,this.K[0]=s?t:void 0,this.P[1]=a||0,this.K[1]=a?t:void 0,this.P[2]=i||0,this.K[2]=i?t:void 0,this.P[3]=n||0,this.K[3]=n?t:void 0},$.g.round=function(t,e,i,n){return $.Ca(arguments,0,0,"round"),this.IX.apply(this,arguments),Bg(this),this},$.g.gka=function(t,e,i,n){return $.Ca(arguments,0,0,"round-inner"),this.IX.apply(this,arguments),Bg(this),this},$.g.dea=function(t,e,i,n){return $.Ca(arguments,0,0,"cut"),this.IX.apply(this,arguments),Bg(this),this},$.g.pe=function(t){Cg.u.pe.call(this,t),this.Ho(t.x).Io(t.y).Go(t.width).Fo(t.height),t.cornerTypes&&(this.K=Vb(t.cornerTypes,4),t=Vb(t.cornerSizes,4),(0,$.Pe)(t,(function(t,e,i){i[e]=(0,window.parseFloat)(t)})),this.P=t,Bg(this))},$.g.F=function(){var t=Cg.u.F.call(this);return t.type="rect",t.x=this.b.left,t.y=this.b.top,t.width=this.b.width,t.height=this.b.height,t.cornerTypes=this.K.join(" "),t.cornerSizes=this.P.join(" "),t},$.g.R=function(){this.b=this.K=this.P=null,this.ae(),Cg.u.R.call(this)};var mE=Cg.prototype;$.E("acgraph.vector.Rect",Cg),mE.setX=mE.Ho,mE.setY=mE.Io,mE.setWidth=mE.Go,mE.setHeight=mE.Fo,mE.setBounds=mE.Qf,mE.cut=mE.dea,mE.round=mE.round,mE.roundInner=mE.gka,$.H($.Dg,$.od),$.Dg.prototype.o=function(t){return $.p(t)?(this.f=t,this.i&&((t=this.f).yf()?t.Qx.push(this):this.Sd()),this):this.f};var nE={rect:Cg,circle:$.rg,ellipse:qg,path:$.Ag};$.g=$.Dg.prototype,$.g.shape=function(t,e,i,n){if(arguments.length){if($.J(t,$.pg))if(this.b){var s=!1;for(o in nE){var a=nE[o];if($.J(this.b,a)&&$.J(t,a)){s=!0;break}}s?this.b.pe(t.F()):(this.b.parent(null),this.b=t,this.b.parent(this))}else this.b=t,this.b.parent(this);else{if($.J(t,$.I)){s=t.left;var o=t.top;a=t.width;var r=t.height}else $.A(t)?(s=null!=t[0]?t[0]:0,o=null!=t[1]?t[1]:0,a=null!=t[2]?t[2]:0,r=null!=t[3]?t[3]:0):$.C(t)?(s=null!=t.left?t.left:0,o=null!=t.top?t.top:0,a=null!=t.width?t.width:0,r=null!=t.height?t.height:0):(s=null!=t?t:0,o=null!=e?e:0,a=null!=i?i:0,r=null!=n?n:0);this.b?$.J(this.b,Cg)?this.b.Ho(s).Io(o).Go(a).Fo(r):(this.b.parent(null),this.b=$.mk(s,o,a,r),this.b.parent(this)):(this.b=$.mk(s,o,a,r),this.b.parent(this))}return this}return this.b},$.g.yr=function(){return this.i},$.g.id=function(t){return $.p(t)?(this.he=t,this):this.he},$.g.Sd=function(){if(this.i=!1,this.he){$.mg();var t=this.shape();if(t.ia())this.shape().Sd();else{var e=ck(this.Ja().vn,this);t.Sd(),t=t.ia(),e.appendChild(t)}}},$.g.F=function(){return this.b.F()},$.g.pe=function(t){var e=nE[t.type];e&&((e=new e).pe(t),this.shape(e))},$.g.hc=function(t){return t.remove(),t.fl(this),Eg(this),lg(t,!0),this},$.g.removeChild=function(t){t.fl(null);var e=t.ia();return e&&$.Xe(e),Eg(this),lg(t,!1),t},$.g.Ig=function(){return null},$.g.UI=function(){},$.g.Ja=function(){return this.o()},$.g.Pb=function(){Eg(this)},$.g.ld=function(){$.Dg.u.ld.call(this)},$.g.R=function(){this.f&&$.Fa(this.f.Qx,this),$.mg().Z0(this),this.b.ld(),delete this.f,delete this.he,delete this.elements,delete this.i,delete this.b,$.Dg.u.R.call(this)};var oE=$.Dg.prototype;oE.shape=oE.shape,oE.dispose=oE.ld,$.H($.Fg,$.ig),$.g=$.Fg.prototype,$.g.Sm=function(){return"layer"},$.g.il=224|$.ig.prototype.il,$.g.EO=function(){for(var t=0;t<this.children.length;t++)this.children[t].EO();$.Fg.u.EO.call(this)},$.g.Pb=function(t){$.Fg.u.Pb.call(this,t),192&t&&this.ae()},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){t.remove(),e=$.Za(e,0,this.bc()),$.Da(this.children,t,e),t.fl(this),t.yr()&&this.Pb(64),this.Pb(128),t.Uy();var i=this.cursor()||this.iE;return t.iE!=i&&(t.iE=i,t.tG()),this},$.g.xd=function(t){return this.children[t]||null},$.g.Kf=function(t){return(0,$.za)(this.children,t)},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){var e=null;return 0<=t&&t<this.bc()&&((e=this.md?this.children[t]:$.Ca(this.children,t,1)[0]).fl(null),this.Pb(128)),e},$.g.Gi=function(){for(var t=0;t<this.bc();t++)this.children[t].fl(null);return t=this.children,this.md||(this.children=[]),this.Pb(128),t},$.g.HP=function(t,e){return this.KJ(this.Kf(t),this.Kf(e))},$.g.KJ=function(t,e){if(0>t||t>=this.bc()||0>e||e>=this.bc())throw $.ld(8);if(t!=e){var i=this.children[t];this.children[t]=this.children[e],this.children[e]=i,this.Pb(128)}return this},$.g.cN=function(t){return!!t&&$.Aa(this.children,t)},$.g.bc=function(){return this.children.length},$.g.Pj=function(t,e){return $.p(e)||(e=this),(0,$.Pe)(this.children,t,e),this},$.g.Bd=function(){var t=$.ok();return t.parent(this),t},$.g.UP=function(){var t=$.uk();return t.parent(this),t},$.g.text=function(t,e,i,n){return t=$.sk(t,e),n&&t.style(n),i&&t.text(i),t.parent(this),t},$.g.iN=function(t,e,i,n){return t=$.sk(t,e),n&&t.style(n),i&&t.htmlText(i),t.parent(this),t},$.g.rect=function(t,e,i,n){return(t=$.mk(t,e,i,n)).parent(this),t},$.g.wk=function(t,e,i,n,s){return(t=rk(t,e,i,n,s)).parent(this),t},$.g.RO=function(t,e){return $.Da(arguments,this.path(),0),zi.apply(this,arguments).parent(this)},$.g.QO=function(t,e){return $.Da(arguments,this.path(),0),Ai.apply(this,arguments).parent(this)},$.g.SP=function(t,e){return $.Da(arguments,this.path(),0),yi.apply(this,arguments).parent(this)},$.g.rn=function(t,e,i){return(t=$.nk(t,e,i)).parent(this),t},$.g.ellipse=function(t,e,i,n){return(t=$.pk(t,e,i,n)).parent(this),t},$.g.path=function(){return $.qk().parent(this)},$.g.tP=function(t,e,i,n,s,a,o){return gi(this.path(),t,e,i,n,s,a,o).parent(this)},$.g.vP=function(t,e,i){return hi(this.path(),t,e,i).parent(this)},$.g.wP=function(t,e,i){return ii(this.path(),t,e,i).parent(this)},$.g.xP=function(t,e,i){return ji(this.path(),t,e,i).parent(this)},$.g.yP=function(t,e,i){return ki(this.path(),t,e,i).parent(this)},$.g.uP=function(t,e,i){return li(this.path(),t,e,i).parent(this)},$.g.RP=function(t,e,i){return mi(this.path(),t,e,i).parent(this)},$.g.OP=function(t,e,i){return ni(this.path(),t,e,i).parent(this)},$.g.QP=function(t,e,i){return oi(this.path(),t,e,i).parent(this)},$.g.PP=function(t,e,i){return pi(this.path(),t,e,i).parent(this)},$.g.QL=function(t,e,i){return qi(this.path(),t,e,i).parent(this)},$.g.yL=function(t,e,i){return ri(this.path(),t,e,i).parent(this)},$.g.PL=function(t,e,i){return si(this.path(),t,e,i).parent(this)},$.g.aN=function(t,e,i){return ti(this.path(),t,e,i).parent(this)},$.g.YP=function(t,e,i){return ui(this.path(),t,e,i).parent(this)},$.g.qg=function(t,e,i,n,s){return vi(this.path(),t,e,i,n,s).parent(this)},$.g.VL=function(t,e,i,n,s,a){return $.wi(this.path(),t,e,i,n,s,a).parent(this)},$.g.Ft=function(){return $.mg().Wo()},$.g.jk=function(){this.Vf(32)&&this.Ep();var t=this.Ja();t=t.xF(Math.floor(Math.max(500-t.ks,0)/3)),this.Vf(64)&&Hg(this);var e=this.Ja();e.ks-=t,this.Vf(128)&&(t=this.Ja().xF(this.children.length+this.ir.length+1),(e=Haa(this,t))<t)&&(this.Ja().ks-=t-e),this.Vf(64)&&Hg(this),$.Fg.u.jk.call(this)},$.g.tG=function(){$.Fg.u.tG.call(this);for(var t=this.children.length;t--;)this.children[t].iE=this.cursor()||this.iE,this.children[t].tG()},$.g.k5=function(){$.jg(this,4096)},$.g.UI=function(t){this.md||0<=(t=(0,$.za)(this.ir,t))&&$.Ca(this.ir,t,1)},$.g.Ep=function(){$.mg().O5(this),$.jg(this,32)},$.g.Vw=function(){this.Vf(4)&&$.mg().P5(this),$.jg(this,4),$.jg(this,256)},$.g.HC=function(t){for(var e=null,i=0,n=this.children.length;i<n;i++){var s=this.children[i];s=s.Xt(yb(t,s.Pd)),(0,window.isNaN)(s.left)||(0,window.isNaN)(s.top)||(0,window.isNaN)(s.width)||(0,window.isNaN)(s.height)||(e?$.pb(e,s):e=s)}return e||(e=$.Ab(new $.I(0,0,0,0),t)),e},$.g.qv=function(){for(var t=this.children.length;t--;)this.children[t].qv()},$.g.Mr=function(){$.Fg.u.Mr.call(this),Ig(this)},$.g.Uy=function(){$.Fg.u.Uy.call(this),Ig(this)},$.g.cG=function(){$.mg().zW()&&(this.Pb(512),this.eN()&&this.parent().cG())},$.g.pe=function(t){(0,$.Pe)(t.children,(function(t){switch(t.type){case"rect":var e=this.rect();break;case"circle":e=this.rn();break;case"ellipse":e=this.ellipse();break;case"image":e=this.wk();break;case"text":e=this.text();break;case"path":e=this.path();break;case"layer":e=this.Bd();break;default:e=null}e&&e.pe(t)}),this),$.Fg.u.pe.call(this,t)},$.g.F=function(){var t=$.Fg.u.F.call(this),e=[];return this.Pj((function(t){e.push(t.F())})),t.type="layer",t.children=e,t},$.g.R=function(){this.children&&$.sd.apply(null,this.children),this.ir&&delete this.ir,this.ae(),$.Fg.u.R.call(this)},$.g.gD=function(){this.children&&(0,$.Pe)(this.children,(function(t){t.gD()})),delete this.ir,delete this.children,$.Fg.u.gD.call(this)};var pE=$.Fg.prototype;$.E("acgraph.vector.Layer",$.Fg),pE.addChild=pE.hc,pE.addChildAt=pE.Eg,pE.removeChild=pE.removeChild,pE.removeChildAt=pE.Cj,pE.removeChildren=pE.Gi,pE.swapChildren=pE.HP,pE.swapChildrenAt=pE.KJ,pE.getChildAt=pE.xd,pE.hasChild=pE.cN,pE.forEachChild=pE.Pj,pE.indexOfChild=pE.Kf,pE.numChildren=pE.bc,pE.circle=pE.rn,pE.layer=pE.Bd,pE.unmanagedLayer=pE.UP,pE.ellipse=pE.ellipse,pE.rect=pE.rect,pE.truncatedRect=pE.SP,pE.roundedRect=pE.RO,pE.roundedInnerRect=pE.QO,pE.path=pE.path,pE.star=pE.tP,$.Fg.prototype.star4=$.Fg.prototype.vP,$.Fg.prototype.star5=$.Fg.prototype.wP,$.Fg.prototype.star6=$.Fg.prototype.xP,$.Fg.prototype.star7=$.Fg.prototype.yP,$.Fg.prototype.star10=$.Fg.prototype.uP,pE.diamond=pE.QL,pE.triangleUp=pE.RP,pE.triangleDown=pE.OP,pE.triangleRight=pE.QP,pE.triangleLeft=pE.PP,pE.cross=pE.yL,pE.diagonalCross=pE.PL,pE.hLine=pE.aN,pE.vLine=pE.YP,pE.pie=pE.qg,pE.donut=pE.VL,pE.text=pE.text,pE.html=pE.iN,pE.image=pE.wk,$.H($.Qb,$.Fg),$.g=$.Qb.prototype,$.g.il=2277,$.g.Sm=function(){return"fill-pattern"},$.g.parent=function(t){return $.p(t)?(t?this.fl(t):this.remove(),this):$.Qb.u.parent.call(this)},$.g.ck=function(){return this.Ta.clone()},$.g.Ft=function(){return $.mg().I0()},$.g.Ep=function(){$.mg().L5(this),$.jg(this,32)},$.g.jk=function(){if(!this.Bo){var t=this.Ja().vn.ia(),e=this.ia();t.appendChild(e)}this.Bo=!0,$.Qb.u.jk.call(this)},$.g.Vw=function(){this.Vf(4)&&$.mg().R5(this),$.jg(this,4)},$.g.pe=function(t){$.Qb.u.pe.call(this,t)},$.g.F=function(){var t=$.Qb.u.F.call(this),e=this.ck();return t.type="pattern",t.bounds=e,t},$.g.R=function(){$.Xe(this.ia()),this.Bb=null,$.Qb.u.R.call(this)};var qE=$.Qb.prototype;$.E("acgraph.vector.PatternFill",$.Qb),qE.addChild=qE.hc,qE.dispose=qE.ld,$.H(Mg,$.Qb);var Jg={zma:"backward-diagonal",Xoa:"forward-diagonal",hZ:"horizontal",FZ:"vertical",Gna:"dashed-backward-diagonal",fZ:"grid",Hna:"dashed-forward-diagonal",Ina:"dashed-horizontal",Jna:"dashed-vertical",cZ:"diagonal-cross",$na:"diagonal-brick",eoa:"divot",cpa:"horizontal-brick",Qsa:"vertical-brick",mna:"checker-board",una:"confetti",Tqa:"plaid",dsa:"solid-diamond",kta:"zig-zag",Ysa:"weave",Eqa:"percent-05",Fqa:"percent-10",Gqa:"percent-20",Hqa:"percent-25",Iqa:"percent-30",Jqa:"percent-40",Kqa:"percent-50",Lqa:"percent-60",Mqa:"percent-70",Nqa:"percent-75",Oqa:"percent-80",Pqa:"percent-90"},Iaa=function(){var t={"backward-diagonal":function(){Yg(this,[-1,0,this.size+1,0,this.Ef],-45)},"forward-diagonal":function(){Yg(this,[-1,0,this.size+1,0,this.Ef],45)},horizontal:function(){Yg(this,[-1,this.size/2,this.size+1,this.size/2,this.Ef])},vertical:function(){Yg(this,[this.size/2,-1,this.size/2,this.size+1,this.Ef])},"diagonal-cross":function(){Yg(this,[0,this.size/2,this.size,this.size/2,this.Ef,this.size/2,0,this.size/2,this.size,this.Ef],45)},grid:function(){Yg(this,[-1,this.size/2,this.size+1,this.size/2,this.Ef,this.size/2,-1,this.size/2,this.size+1,this.Ef])},"horizontal-brick":function(){Yg(this,[0,0,0,this.size/2-1,this.Ef,0,this.size/2-1,this.size,this.size/2-1,this.Ef,this.size/2,this.size/2-1,this.size/2,this.size-1,this.Ef,0,this.size-1,this.size,this.size-1,this.Ef])},"vertical-brick":function(){Yg(this,[0,0,0,this.size/2-1,this.Ef,0,this.size/2-1,this.size,this.size/2-1,this.Ef,this.size/2,this.size/2-1,this.size/2,this.size-1,this.Ef,0,this.size-1,this.size,this.size-1,this.Ef],90)},"diagonal-brick":function(){Yg(this,[0,0,0,this.size/2-1,this.Ef,0,this.size/2-1,this.size,this.size/2-1,this.Ef,this.size/2,this.size/2-1,this.size/2,this.size-1,this.Ef,0,this.size-1,this.size,this.size-1,this.Ef],45)},"checker-board":function(){Zg(this,[0,0,this.size/2,this.size/2,this.size/2,this.size])},confetti:function(){var t=this.size/8,e=this.size/4;Zg(this,[0,2*t,e,t,5*t,e,2*t,0,e,4*t,4*t,e,5*t,t,e,6*t,6*t,e])},plaid:function(){Ug(this,this.size/2,this.size/2);for(var t,e=this.size/8,i=0;2>i;i++){t=!1;for(var n=0;4>n;n++){t=!t;for(var s=0;4>s;s++)t&&Ug(this,e,e,n*e+i*this.size/2,s*e+this.size/2),t=!t}}},"solid-diamond":function(){Xg(this,[[this.size/2,0,0,this.size/2,this.size/2,this.size,this.size,this.size/2,this.size/2,0]],!0,!0)},"dashed-forward-diagonal":function(){Yg(this,[0,0,this.size/2,this.size/2,this.Ef])},"dashed-backward-diagonal":function(){Yg(this,[this.size/2,0,0,this.size/2,this.Ef])},"dashed-horizontal":function(){Yg(this,[0,0,this.size/2,0,this.Ef,this.size/2,this.size/2,this.size,this.size/2,this.Ef])},"dashed-vertical":function(){Yg(this,[0,0,0,this.size/2,this.Ef,this.size/2,this.size/2,this.size/2,this.size,this.Ef])},divot:function(){var t=.1*this.size,e=this.size*(.8-.2)/2;Xg(this,[[t+e,t,t,t+e/2,t+e,t+e],[this.size-t-e,this.size-t-e,this.size-t,this.size-t-e/2,this.size-t-e,this.size-t]])},"zig-zag":function(){Xg(this,[[0,0,this.size/2,this.size/2,this.size,0],[0,this.size/2,this.size/2,this.size,this.size,this.size/2]])},weave:function(){Xg(this,[[0,0,this.size/2,this.size/2,this.size,0],[0,this.size/2,this.size/2,this.size,this.size,this.size/2],[this.size/2,this.size/2,3*this.size/4,3*this.size/4],[this.size,this.size/2,3*this.size/4,this.size/4]])}};return t["percent-05"]=$.qa(Og,8,8,[0,0,4,4]),t["percent-10"]=$.qa(Og,8,4,[0,0,4,2]),t["percent-20"]=$.qa(Og,4,4,[0,0,2,2]),t["percent-25"]=$.qa(Og,4,2,[0,0,2,1]),t["percent-30"]=$.qa(Og,4,4,[0,0,2,0,3,1,0,2,2,2,1,3]),t["percent-40"]=$.qa(Og,4,8,[0,0,2,0,3,1,0,2,2,2,1,3,3,3,0,4,2,4,1,5,3,5,0,6,2,6,1,7,3,7]),t["percent-50"]=$.qa(Og,2,2,[0,0,1,1]),t["percent-60"]=$.qa(Og,4,4,[0,0,2,0,0,1,1,1,3,1,0,2,2,2,1,3,2,3,3,3]),t["percent-70"]=$.qa(Og,4,4,[0,0,2,0,3,0,0,1,1,1,2,1,0,2,2,2,3,2,0,3,1,3,2,3]),t["percent-75"]=$.qa(Vg,4,4,[0,0,2,2]),t["percent-80"]=$.qa(Vg,8,4,[0,0,4,2]),t["percent-90"]=$.qa(Vg,8,8,[7,7,4,3]),t}();Mg.prototype.Sm=function(){return"hatch-fill"},Mg.prototype.R=function(){if(this.Ja()){var t=this.Ja().vn,e=[this.type,this.color,this.Ef,this.size].join();$.Gc(t.i,e)&&$.Lc(t.i,e),t=$.ze(window.document,this.id()),$.Xe(t)}Mg.u.R.call(this)};var rE=Mg.prototype;rE.dispose=rE.ld,$.H(bh,$.ig),$.ah="meet",$.$g="none",$.g=bh.prototype,$.g.il=32|$.ig.prototype.il,$.g.Sm=function(){return"image"},$.g.jD=function(t){return null!=t?(t!=this.f&&(this.f=t,this.Pb(32)),this):this.f},$.g.align=function(t){return null!=t?(t!=this.b&&(this.b=t,this.Pb(32)),this):this.b},$.g.x=function(t){return null!=t?(t!=this.Bb.left&&(this.Bb.left=t,this.Pb(32),this.ae()),this):this.Bb.left},$.g.y=function(t){return null!=t?(t!=this.Bb.top&&(this.Bb.top=t,this.Pb(32),this.ae()),this):this.Bb.top},$.g.width=function(t){return null!=t?(t!=this.Bb.width&&(this.Bb.width=t,this.Pb(32),this.ae()),this):this.Bb.width},$.g.height=function(t){return null!=t?(t!=this.Bb.height&&(this.Bb.height=t,this.Pb(32),this.ae()),this):this.Bb.height},$.g.src=function(t){return $.p(t)?(t!=this.o&&(this.o=t,this.Pb(32)),this):this.o},$.g.opacity=function(t){return $.p(t)?(t!=this.i&&(this.i=t,this.Pb(32)),this):this.i},$.g.ck=function(){return this.Bb.clone()},$.g.Ft=function(){return $.mg().J0()},$.g.jk=function(){this.Vf(32)&&($.mg().OI()&&this.Pb(4),this.Ep()),bh.u.jk.call(this)},$.g.Vw=function(){$.mg().N5(this),$.jg(this,4),$.jg(this,256)},$.g.Ep=function(){$.mg().M5(this),$.jg(this,32)},$.g.pe=function(t){var e=t.bounds;this.x(e.left).y(e.top).width(e.width).height(e.height).src(t.src).align(t.align).jD(t.fittingMode),bh.u.pe.call(this,t)},$.g.F=function(){var t=bh.u.F.call(this);return t.type="image",t.bounds=this.ck(),t.src=this.src(),t.align=this.align(),t.fittingMode=this.jD(),t},$.g.R=function(){this.Bb=null,this.ae(),bh.u.R.call(this)},$.E("acgraph.vector.Image",bh);var sE=bh.prototype;sE.fittingMode=sE.jD,sE.align=sE.align,sE.x=sE.x,sE.y=sE.y,sE.width=sE.width,sE.height=sE.height,sE.src=sE.src,$.H(ch,$.qf);var eh=[$.hd&&!$.bd("11")?"readystatechange":"load","abort","error"];ch.prototype.start=function(){var t=this.f;(0,$.Pe)($.Fc(t),(function(e){var i,n=t[e];n&&(delete t[e],!this.md)&&(i=this.Y?$.ye(this.Y).Ac("IMG"):new window.Image,n.C0&&(i.crossOrigin=n.C0),this.qo.wa(i,eh,this.i),this.b[e]=i,i.id=e,i.src=n.src)}),this)},ch.prototype.i=function(t){var e=t.currentTarget;if(e){if("readystatechange"==t.type){if("complete"!=e.readyState)return;t.type="load"}void 0===e.naturalWidth&&("load"==t.type?(e.naturalWidth=e.width,e.naturalHeight=e.height):(e.naturalWidth=0,e.naturalHeight=0)),this.dispatchEvent({type:t.type,target:e}),this.md||fh(this,e.id)}},ch.prototype.R=function(){delete this.f,delete this.b,$.qd(this.qo),ch.u.R.call(this)},$.ja($.gh),$.g=$.gh.prototype,$.g.J5=$.ia,$.g.RX=$.ia,$.g.JX=$.ia,$.g.getAttribute=function(t,e){return t?t.getAttribute(e):void 0},$.g.lc=function(t,e,i){t.setAttribute(e,i)},$.g.W4=function(t,e){var i=e[3];t.push(e[0],e[1],0,180<Math.abs(i)?1:0,0<i?1:0,e[4],e[5])},$.g.c5=function(t,e){$.kd(Array.prototype.push,e,t)},$.g.Q0=function(){return null},$.g.l4=function(){return!1},$.g.n3=function(){return!1},$.g.OI=function(){return!1},$.g.zW=function(){return!1},$.H($.uh,$.ig),$.g=$.uh.prototype,$.g.kc=null,$.g.il=32|$.ig.prototype.il,$.g.Sm=function(){return"simple-text"},$.g.ck=function(){return this.Ta.clone()},$.g.text=function(t){return $.p(t)?(t!=this.kc&&(this.kc=String(t),(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.Pb(32),t||this.Ja().resume()),this):this.kc},$.g.Ft=function(){return $.mg().Vx()},$.g.jk=function(){this.Vf(32)&&($.mg(),this.ia().textContent=this.text(),$.jg(this,32)),$.uh.u.jk.call(this)},$.g.Vw=function(){$.jg(this,4),$.jg(this,256)};var tE=$.uh.prototype;tE.text=tE.text,$.E("acgraph.vector.SimpleText",$.uh),$.ja(vh);var Jh={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Jaa,Oh,Nh,uE,vE;vh.prototype.xb=null,$.H(Mh,$.od),$.g=Mh.prototype,$.g.Ud=null,$.g.Y=null,$.g.parent=function(t){return $.p(t)?(this.Y=t,this):this.Y},$.g.ia=function(){return this.Ud},$.g.Sm=function(){return"t-segment"},$.g.Ep=function(){""!=this.text&&(this.Ud=$.mg().IS())&&$.mg().JZ(this)},$.g.R=function(){$.Xe(this.Ud),this.Ud=null,Mh.u.R.call(this)},$.H($.Qh,$.pg),Jaa="normal",Oh="normal",Nh="",$.Ph="start",uE={AQ:"left",i$:$.Ph,xz:"center",m8:"end",GQ:"right"},vE={PQ:"top",f9:"middle",pQ:"bottom"},$.g=$.Qh.prototype,$.g.il=17504|$.pg.prototype.il,$.g.yc=null,$.g.kc=null,$.g.x=function(t){return null!=t?(this.No!=t&&(this.No=t,this.ba&&Wh(this),this.Ta.left=t,this.Pb(16384),this.ae()),this):this.No},$.g.y=function(t){return null!=t?(this.Oo!=t&&(this.Oo=t,this.ba&&Xh(this),this.Ta.top=t,this.Pb(16384),this.ae()),this):this.Oo},$.g.sx=function(){if($.mg().OI()){var t=this.Ig();t&&!$.zb(t)&&this.Pb(4)}},$.g.width=function(t){return $.p(t)&&Rh(this,"width")!=t&&(null===t||(t=Math.max((0,window.parseFloat)(t),0)||0),this.Yf=t),Rh(this,"width",t)},$.g.height=function(t){return $.p(t)&&(Rh(this,"height")==t||null!==t&&(t=Math.max((0,window.parseFloat)(t),0)||0),this.Jf=t),Rh(this,"height",t)},$.g.opacity=function(t){return null!=t?(this.yc.opacity=t,this.Pb(1024),this):this.yc.opacity},$.g.color=function(t){return null!=t?(this.yc.color=t,this.Pb(1024),this):this.yc.color},$.g.fontSize=function(t){return Rh(this,"fontSize",t)},$.g.fontFamily=function(t){return Rh(this,"fontFamily",t)},$.g.direction=function(t){return Rh(this,"direction",t)},$.g.fontStyle=function(t){return Rh(this,"fontStyle",t)},$.g.fontVariant=function(t){return Rh(this,"fontVariant",t)},$.g.fontWeight=function(t){return Rh(this,"fontWeight",t)},$.g.letterSpacing=function(t){return Rh(this,"letterSpacing",t)},$.g.er=function(t){return Rh(this,"decoration",t)},$.g.lineHeight=function(t){return null!=t&&(this.sb=Sh(t)),Rh(this,"lineHeight",t)},$.g.textIndent=function(t){return null!=t&&(this.o=t),Rh(this,"textIndent",t)},$.g.textShadow=function(t){return $.p(t)?Rh(this,"textShadow",$.Zb(t)):this.yc.textShadow},$.g.vAlign=function(t){if($.p(t))if("center"==t)t="middle";else{var e=!1;$.Dc(vE,(function(i){t==i&&(e=!0)})),e||(t="top")}return Rh(this,"vAlign",t)},$.g.Bm=function(t){if($.p(t))if("middle"==t)t="center";else{var e=!1;$.Dc(uE,(function(i){t==i&&(e=!0)})),e||(t=$.Ph)}return Rh(this,"hAlign",t)},$.g.Xu=function(t){return Rh(this,"wordBreak",t)},$.g.wordWrap=function(t){return Rh(this,"wordWrap",t)},$.g.textOverflow=function(t){return null!=t&&(this.fb=t),Rh(this,"textOverflow",t)},$.g.Hm=function(t){return Rh(this,"selectable",t)},$.g.path=function(t){return $.p(t)?(this.Sc=t,this.Ja()&&this.Sc.parent(this.Ja().vn),(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(17504),this.sx(),t||this.Ja().resume(),this):this.Sc},$.g.style=function(t){if(null!=t){$.Dc(t,(function(t,e){var i=e;switch(e){case"fontDecoration":case"textDecoration":i="decoration";break;case"fontColor":i="color";break;case"fontOpacity":i="opacity"}this.yc[i]=t}),this),this.Yf=(0,window.parseFloat)(this.yc.width)||0,this.Jf=(0,window.parseFloat)(this.yc.height)||0,this.yc.lineHeight&&(this.sb=Sh(this.yc.lineHeight));var e=this.yc.vAlign;if(null!=e)if("center"==e)this.yc.vAlign="middle";else{var i=!1;$.Dc(vE,(function(t){e==t&&(i=!0)})),i||(this.yc.vAlign="top")}var n=this.yc.hAlign;return null!=n&&("middle"==n?this.yc.hAlign="center":(i=!1,$.Dc(uE,(function(t){n==t&&(i=!0)})),i||(this.yc.hAlign=$.Ph))),null!=this.yc.direction&&(this.K="rtl"==this.yc.direction),null!=this.yc.textOverflow&&(this.fb=this.yc.textOverflow),null!=this.yc.textIndent&&(this.o=this.yc.textIndent),this.K&&(this.o=0),(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),t||this.Ja().resume(),this}return this.yc},$.g.htmlText=function(t){return $.p(t)?(t!=this.kc&&(this.kc=String(t),this.Hd=!0,(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.sx(),t||this.Ja().resume()),this):this.kc},$.g.Sm=function(){return"text"},$.g.ck=function(){return this.Ta.clone()},$.g.Xt=function(t){return this.ba||this.MB(),t?$.Qh.u.Xt.call(this,t):this.HC(null)},$.g.HC=function(t){if(this.path())if(this.yg)var e=this.yg;else{(e=$.mg()).Xp(),this.ba||this.MB();var i=this.path();i.ia()||i.Ac(!0),e.OX(i);var n=i.ia().parentNode,s=i.ia();e.f.appendChild(s),n||(n=$.cc($.ac.Id(),i.ia(),"path"),$.qh(e,i.ia(),n)),this.ia()||this.Ac(!0),this.rX(),this.Ep(),$.mg().QX(this),$.jg(this,1024),this.OO(),this.Vw(),n=$.cc($.ac.Id(),i.ia(),"path"),i=Li(),this.Ka.setAttributeNS("http://www.w3.org/1999/xlink","href",i+"#"+n),n=(i=this.ia()).parentNode,e.Op.appendChild(i),e=this.ia().getBBox(),n&&n.appendChild(i),e=new $.I(e.x,e.y,e.width,e.height)}else e=this.Ta.clone();return $.Ab(e,t)},$.g.hH=ba(4),$.g.ae=function(){$.Qh.u.ae.call(this),this.yg=null},$.g.X3=function(t){for(var e=$.mg().o,i=arguments,n={},s=0,a=e.length;s<a;s++)for(var o=i.length;o--;){var r=i[o];if(r&&(r=r[e[s]],$.p(r))){n[e[s]]=r;break}}return n},$.g.Vm=function(t,e){var i=this.X3(this.yc,e);return ih($.mg(),t,i)},$.g.vU=function(){return this.ba||this.MB(),this.Od},$.g.rH=function(){return this.ba||this.MB(),this.D},$.g.mK=function(){this.pM(),this.me++,this.nK("",null,!0);var t=this.f[0]?this.f[0].height:0;this.Sb+=$.z(this.sb)?(0,window.parseInt)(this.sb,0)+t:this.sb*t},$.g.nK=function(t,e,i){if(!this.qc){e=e||{};var n=this.Vm(t,e),s=0==this.b.length?this.o:0;if(this.bj)for(;this.P+n.width+s>this.Za&&!this.qc;){var a=Th(this,t,e,s+this.P,this.Za,n);1>a&&0==this.f.length&&(a=1),0!=a&&(s=$.nc(t.substring(0,a)),n=this.Vm(s,e),Uh(this,s,e,n)),this.pM(),1==t.length&&(this.qc=!0),s=0,t=$.nc(t.substring(a,t.length)),n=this.Vm(t,e)}this.qc||!t.length&&!i||Uh(this,t,e,n)}},$.g.pM=function(){if(!this.qc&&0!=this.f.length){var t=0==this.ea.length;if(this.Jf&&this.D+this.Ba>this.Jf&&0!=this.ea.length)Vh(this),this.qc=!0;else{if(this.Ba=$.z(this.sb)?(0,window.parseInt)(this.sb,0)+this.Ba:this.sb*this.Ba,$.mg().l4()){var e,i=this.K&&this.yc.hAlign==$.Ph||!this.K&&"end"==this.yc.hAlign||"right"==this.yc.hAlign,n="center"==this.yc.hAlign;if(this.K&&"end"==this.yc.hAlign||!this.K&&this.yc.hAlign==$.Ph||"left"==this.yc.hAlign){n=this.K?0:this.o&&t?this.o:0;var s=0;for(e=this.f.length;s<e;s++)(i=this.f[s]).x=n,i.y=this.D+this.na+i.height-1.5*i.f,n+=i.width}else if(n)for(n=-this.P/2,!this.K&&this.o&&t&&(n+=this.o),s=0,e=this.f.length;s<e;s++)(i=this.f[s]).x=n+i.width/2,i.y=this.D+this.na+i.height-1.5*i.f,n+=i.width;else if(i)for(n=this.K&&this.o&&t?-this.o:0,s=this.f.length-1;0<=s;s--)(i=this.f[s]).x=n,i.y=this.D+this.na+i.height-1.5*i.f,n-=i.width}if(t){var a=this.f[0];a.f=this.na,a.i=!0,this.o&&"center"==this.yc.hAlign&&(a.mo=this.K?-this.o/2:this.o/2)}else{for(s=0;s<this.f.length;s++)if(""!=this.f[s].text){a=this.f[s];break}a&&(a.i=!0,this.ud||(a.um=this.Sb&&1<this.me?this.Sb:this.fh+this.na))}this.bj&&this.yc.wordWrap==Oh&&this.P>this.Za&&(1<this.f.length&&!this.f[0].text.length&&(i=(0,$.za)(this.b,this.f[0]),Ea(this.f,0),Ea(this.b,i)),i=$.ua(this.f),t=this.Vm(i.text,i.b),t=Th(this,i.text,i.b,0,this.Za-(this.P-t.width),t,!0),n=i.text.substring(0,t),t=this.Vm(n,i.b),i.text=n,this.bg=this.P=i.width=t.width,Vh(this,this.f)),this.path()&&(a.mo="start"==this.align?0:"middle"==this.align?this.path().Jg()/2-this.P/2:this.path().Jg()-this.P),this.D+=this.Ba,this.Od=Math.max(this.Od,this.P),this.fh=this.Ba-this.na,this.bg=this.P,this.ud||(this.me=this.Sb=0),this.ud=!0,this.na=this.P=this.Ba=0,this.ea.push(this.f),this.f=[]}}},$.g.text=function(t){return $.p(t)?(t!=this.kc&&(this.kc=String(t),this.Hd=!1,(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.sx(),t||this.Ja().resume()),this):this.kc},$.g.MB=function(){0!=this.b.length&&($.sd(this.b,this.ea),this.ea=[],this.b=[]),null!=this.yc.direction&&(this.K="rtl"==this.yc.direction),null!=this.yc.textIndent&&(this.o=this.yc.textIndent),this.K&&(this.o=0),this.Yf=(0,window.parseFloat)(this.yc.width)||0,this.Jf=(0,window.parseFloat)(this.yc.height)||0,this.qc=!1,this.na=this.P=this.Ba=this.me=this.Sb=this.D=this.Od=this.fh=this.bg=0,this.f=[],this.$a=this.aa=0,this.yg=null,this.align="start",this.yc.hAlign&&(this.align="rtl"==this.yc.direction?$.gd||$.hd?"end"==this.yc.hAlign||"left"==this.yc.hAlign?$.Ph:this.yc.hAlign==$.Ph||"right"==this.yc.hAlign?"end":"middle":"end"==this.yc.hAlign||"left"==this.yc.hAlign?"end":this.yc.hAlign==$.Ph||"right"==this.yc.hAlign?$.Ph:"middle":"end"==this.yc.hAlign||"right"==this.yc.hAlign?"end":this.yc.hAlign==$.Ph||"left"==this.yc.hAlign?$.Ph:"middle");var t,e=null!=this.yc.width;if(this.bj=this.path()||e,e=e?(0,window.parseFloat)(this.yc.width):Number.POSITIVE_INFINITY,this.Za=Math.max(this.path()?Math.min(this.path().Jg(),e):this.Yf,0),null!=this.kc){if(this.Hd)Lh(this);else{this.kc=$.hc(ic(this.kc));var i=this.kc.split(/\n/g);for(t=0;t<i.length;t++)null!=(e=$.nc(i[t]))&&(""!=e&&this.nK(e),this.mK())}this.o&&0<this.ea.length&&(e=this.ea[0][0],this.K?this.yc.hAlign&&this.yc.hAlign!=$.Ph&&"right"!=this.yc.hAlign||(e.mo-=this.o):this.yc.hAlign&&this.yc.hAlign!=$.Ph&&"left"!=this.yc.hAlign||(e.mo+=this.o)),this.yc.width||(this.Yf=this.Od),this.yc.height||(this.Jf=this.D),Wh(this),Xh(this),this.Ta=new $.I(this.No,this.Oo,this.Yf,this.Jf),this.ba=!0}},$.g.Ft=function(){return $.mg().Vx()},$.g.jk=function(){this.ba||this.MB(),this.Vf(64)&&this.rX(),this.Vf(1024)&&($.mg().QX(this),$.jg(this,1024)),this.Vf(32)&&this.Ep(),this.Vf(16384)&&this.OO(),$.Qh.u.jk.call(this)},$.g.rX=function(){this.Sc&&!this.Ka?this.Ka=$.mg().Q0():this.Sc||($.Xe(this.Ka),this.Ka=null),$.jg(this,64)},$.g.OO=function(){for(var t=0,e=this.b.length;t<e;t++){var i=this.b[t];i.Ud&&$.mg().IZ(i)}$.mg().PX(this),$.jg(this,16384)},$.g.Ep=function(){this.ia()&&$.Ve(this.ia()),this.Ka&&($.Ve(this.Ka),this.ia().appendChild(this.Ka));for(var t=0,e=this.b.length;t<e;t++)this.b[t].Ep();$.jg(this,32)},$.g.Vw=function(){$.mg().U5(this),$.jg(this,4),$.jg(this,256)},$.g.pe=function(t){this.x(t.x).y(t.y).style(t.style),t.html?this.htmlText(t.text):this.text(t.text),$.Qh.u.pe.call(this,t)},$.g.F=function(){var t=$.Qh.u.F.call(this);return t.type="text",t.x=this.x(),t.y=this.y(),t.html=this.Hd,t.text=this.text(),t.style=this.style(),t},$.g.R=function(){$.sd(this.b,this.f),this.b.length=0,this.f.length=0,delete this.ea,delete this.Ta,$.Qh.u.R.call(this)};var wE=$.Qh.prototype;$.E("acgraph.vector.Text",$.Qh),wE.text=wE.text,wE.style=wE.style,wE.htmlText=wE.htmlText,wE.path=wE.path,wE.x=wE.x,wE.y=wE.y,wE.fontSize=wE.fontSize,wE.color=wE.color,wE.fontFamily=wE.fontFamily,wE.direction=wE.direction,wE.fontStyle=wE.fontStyle,wE.fontVariant=wE.fontVariant,wE.fontWeight=wE.fontWeight,wE.letterSpacing=wE.letterSpacing,wE.decoration=wE.er,wE.opacity=wE.opacity,wE.lineHeight=wE.lineHeight,wE.textIndent=wE.textIndent,wE.vAlign=wE.vAlign,wE.hAlign=wE.Bm,wE.width=wE.width,wE.height=wE.height,wE.getTextHeight=wE.rH,wE.getTextWidth=wE.vU,wE.wordWrap=wE.wordWrap,wE.wordBreak=wE.Xu,wE.textOverflow=wE.textOverflow,wE.selectable=wE.Hm,$.H($.Yh,$.ig),$.g=$.Yh.prototype,$.g.Sm=function(){return"unmanageable-layer"},$.g.il=32|$.ig.prototype.il,$.g.content=function(t){return $.p(t)?(t!=this.Qd&&(this.Qd=t,this.Pb(32)),this):this.Qd},$.g.Ft=function(){return $.mg().Wo()},$.g.jk=function(){if($.Yh.u.jk.call(this),this.Vf(32)){var t=this.ia();$.Ve(t),$.z(this.Qd)?t.innerHTML=this.Qd:t.appendChild(this.Qd),$.jg(this,32)}},$.g.ck=function(){return $.mg().kW(this.Qd)},$.g.pe=function(t){"content"in t&&this.content(t.content),$.Yh.u.pe.call(this,t)},$.g.F=function(){var t=$.Yh.u.F.call(this);return t.content=$.z(this.Qd)?this.Qd:this.Qd.outerHTML,t};var xE=$.Yh.prototype,Paa,Qaa,Raa;xE.content=xE.content,$.E("acgraph.vector.primitives.star",gi),$.E("acgraph.vector.primitives.star4",hi),$.E("acgraph.vector.primitives.star5",ii),$.E("acgraph.vector.primitives.star6",ji),$.E("acgraph.vector.primitives.star7",ki),$.E("acgraph.vector.primitives.star10",li),$.E("acgraph.vector.primitives.diamond",qi),$.E("acgraph.vector.primitives.triangleUp",mi),$.E("acgraph.vector.primitives.triangleDown",ni),$.E("acgraph.vector.primitives.triangleRight",oi),$.E("acgraph.vector.primitives.triangleLeft",pi),$.E("acgraph.vector.primitives.cross",ri),$.E("acgraph.vector.primitives.diagonalCross",si),$.E("acgraph.vector.primitives.hLine",ti),$.E("acgraph.vector.primitives.vLine",ui),$.E("acgraph.vector.primitives.pie",vi),$.E("acgraph.vector.primitives.donut",$.wi),$.E("acgraph.vector.primitives.truncatedRect",yi),$.E("acgraph.vector.primitives.roundedRect",zi),$.E("acgraph.vector.primitives.roundedInnerRect",Ai),$.Fi.prototype.clone=function(){return new $.Fi(this.Hj,this.ze,this.mi,this.Pe)},$.H(Gi,$.gh),$.ja(Gi),$.g=Gi.prototype,$.g.Op=null,$.g.Mk=null,$.g.$D=null,$.g.yp=null,$.g.iu=null,$.g.Xp=function(){return this.Op||(this.Op=Hi("svg"),this.Mk=this.Vx(),this.$D=this.wF(""),this.f=this.AS(),this.Mk.appendChild(this.$D),this.Op.appendChild(this.Mk),this.Op.appendChild(this.f),this.i=this.Wo(),this.Op.appendChild(this.i),$.ph(this,this.Op,{width:0,height:0}),this.Op.style.cssText="position: absolute; left: -99999px; top: -99999px",this.yp=this.Wo(),this.Op.appendChild(this.yp),$.sh.document.body.appendChild(this.Op)),this.Op},$.g.measure=function(t,e){this.Xp();var i=null,n=0;return 0==t.length?(hh(this,"",e)?n=ih(this,"",e):(n=this.measure("a",e),n=new $.I(0,n.top,0,n.height),ih(this,"",e,n)),n):" "==t?$.jh(this,e):($.ec(t," ")&&(n+=i=$.jh(this,e).width),$.fc(t," ")&&(n+=i||$.jh(this,e).width),e.fontStyle?this.lc(this.Mk,"font-style",e.fontStyle):this.Mk.removeAttribute("font-style"),e.fontVariant?this.lc(this.Mk,"font-variant",e.fontVariant):this.Mk.removeAttribute("font-variant"),e.fontFamily?this.lc(this.Mk,"font-family",e.fontFamily):this.Mk.removeAttribute("font-family"),e.fontSize?this.lc(this.Mk,"font-size",e.fontSize):this.Mk.removeAttribute("font-size"),e.fontWeight?this.lc(this.Mk,"font-weight",e.fontWeight):this.Mk.removeAttribute("font-weight"),e.letterSpacing?this.lc(this.Mk,"letter-spacing",e.letterSpacing):this.Mk.removeAttribute("letter-spacing"),e.decoration?this.lc(this.Mk,"text-decoration",e.decoration):this.Mk.removeAttribute("text-decoration"),this.$D.nodeValue=t,i=this.Mk.getBBox(),e.fontVariant&&$.yd&&(this.$D.nodeValue=t.charAt(0).toUpperCase(),i.height=this.Mk.getBBox().height),new $.I(i.x,i.y,i.width+n,i.height))},$.g.kW=function(t){return this.Xp(),$.z(t)?this.yp.innerHTML=t:(t=t.cloneNode(!0),this.yp.appendChild(t)),t=this.yp.getBBox(),$.Ve(this.yp),new $.I(t.x,t.y,t.width,t.height)},$.g.TN=function(t,e){this.b||(th(this),this.b={},$.Ld(this.iu,"complete",(function(){this.D=!1}),!1,this),$.Ld(this.iu,"load",this.L$,!1,this)),this.b[$.oa(e)]=[t,e],this.D=!0,dh(this.iu,t,t),this.iu.start()},$.g.L$=function(t){var e=t.target;$.Dc(this.b,(function(t,i){t[0]==e.id&&(t[1].call(this,e.naturalWidth,e.naturalHeight),delete this.b[i])}),this)},$.g.n3=function(){return this.D},$.g.D4={1:"M",2:"L",3:"C",4:"A",5:"Z"},$.g.P0=function(){var t=Hi("svg");return $.hd||this.lc(t,"xmlns","http://www.w3.org/2000/svg"),this.lc(t,"border","0"),t},$.g.K0=function(){return Hi("linearGradient")},$.g.I0=function(){return Hi("pattern")},$.g.J0=function(){return Hi("image")},$.g.Wo=function(){return Hi("g")},$.g.D0=function(){return Hi("circle")},$.g.M0=function(){return Hi("path")},$.g.H0=function(){return Hi("ellipse")},$.g.AS=function(){return Hi("defs")},$.g.Vx=function(){return Hi("text")},$.g.Q0=function(){return Hi("textPath")},$.g.IS=function(){return Hi("tspan")},$.g.wF=function(t){return window.document.createTextNode(String(t))},$.g.L5=function(t){var e=t.ck();$.ph(this,t.ia(),{x:e.left,y:e.top,width:e.width,height:e.height,patternUnits:"userSpaceOnUse"})},$.g.M5=function(t){var e=t.ck();this.TN(t.src(),$.ia);var i=t.src()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n=t.ia(),s=e.left,a=e.top,o=e.width;switch(e=e.height,t.align()){case"x-min-y-min":var r="xMinYMin";break;case"x-mid-y-min":r="xMidYMin";break;case"x-max-y-min":r="xMaxYMin";break;case"x-min-y-mid":r="xMinYMid";break;case"x-mid-y-mid":r="xMidYMid";break;case"x-max-y-mid":r="xMaxYMid";break;case"x-min-y-max":r="xMinYMax";break;case"x-mid-y-max":r="xMidYMax";break;case"x-max-y-max":r="xMaxYMax";break;default:r="none"}r=r+" "+t.jD(),$.ph(this,n,{x:s,y:a,width:o,height:e,"image-rendering":"optimizeQuality",preserveAspectRatio:r,opacity:t.opacity()}),n.setAttributeNS("http://www.w3.org/1999/xlink","href",i)},$.g.I5=function(t,e){var i=t.ia();i&&(i.style.cursor=e||"")},$.g.PX=function(t){var e=t.ia();this.lc(e,"x",t.aa),this.lc(e,"y",t.$a)},$.g.QX=function(t){var e=t.style(),i=t.path(),n=t.ia();if(i&&t.Ja()){var s=t.Ja().vn;i.parent(s),i.Sd(),$.jg(i,gg);var a=i.ia();s.ia().appendChild(a),s=$.cc($.ac.Id(),a,"path"),$.qh(this,a,s),a=Li(),t.Ka.setAttributeNS("http://www.w3.org/1999/xlink","href",a+"#"+s)}t.Hm()?(n.style["-webkit-touch-callout"]="",n.style["-webkit-user-select"]="",n.style["-khtml-user-select"]="",n.style["-moz-user-select"]="",n.style["-ms-user-select"]="",n.style["-o-user-select"]="",n.style["user-select"]="",($.hd&&9==cd||$.yd)&&(n.removeAttribute("unselectable"),n.removeAttribute("onselectstart"))):(n.style["-webkit-touch-callout"]="none",n.style["-webkit-user-select"]="none",n.style["-khtml-user-select"]="none",n.style["-moz-user-select"]="moz-none",n.style["-ms-user-select"]="none",n.style["-o-user-select"]="none",n.style["user-select"]="none",($.hd&&9==cd||$.yd)&&(this.lc(n,"unselectable","on"),this.lc(n,"onselectstart","return false;"))),e.fontStyle?this.lc(n,"font-style",e.fontStyle):n.removeAttribute("font-style"),e.fontVariant?$.gd?n.style["font-variant"]=e.fontVariant:this.lc(n,"font-variant",e.fontVariant):$.gd?n.style["font-variant"]="":n.removeAttribute("font-variant"),e.fontFamily?(this.lc(n,"font-family",e.fontFamily),n.style.fontFamily=e.fontFamily):(n.removeAttribute("font-family"),n.style.fontFamily=""),e.fontSize?this.lc(n,"font-size",e.fontSize):n.removeAttribute("font-size"),e.fontWeight?this.lc(n,"font-weight",e.fontWeight):n.removeAttribute("font-weight"),e.color?this.lc(n,"fill",e.color):n.removeAttribute("fill"),e.letterSpacing?this.lc(n,"letter-spacing",e.letterSpacing):n.removeAttribute("letter-spacing"),e.decoration?this.lc(n,"text-decoration",e.decoration):n.removeAttribute("text-decoration"),e.direction?this.lc(n,"direction",e.direction):n.removeAttribute("direction"),e.hAlign&&!i?this.lc(n,"text-anchor","rtl"==e.direction?$.gd||$.hd?"end"==e.hAlign||"left"==e.hAlign?$.Ph:e.hAlign==$.Ph||"right"==e.hAlign?"end":"middle":"end"==e.hAlign||"left"==e.hAlign?"end":e.hAlign==$.Ph||"right"==e.hAlign?$.Ph:"middle":"end"==e.hAlign||"right"==e.hAlign?"end":e.hAlign==$.Ph||"left"==e.hAlign?$.Ph:"middle"):n.removeAttribute("text-anchor"),n.style.opacity=e.opacity?e.opacity:"1",t=e.textShadow,n.style.textShadow=t&&"none"!=t?t:""},$.g.IZ=function(t){var e=t.ia(),i=t.parent();(t.i||t.mo)&&this.lc(e,"x",i.path()?t.mo:i.aa+t.mo),this.lc(e,"dy",t.um)},$.g.JZ=function(t){var e=t.b,i=t.ia(),n=t.parent(),s=this.wF(t.text);i.appendChild(s),($.hd&&9==cd||$.yd)&&(n.Hm()?(i.removeAttribute("onselectstart"),i.removeAttribute("unselectable")):(this.lc(i,"onselectstart","return false;"),this.lc(i,"unselectable","on"))),e.fontStyle&&this.lc(i,"font-style",e.fontStyle),e.fontVariant&&this.lc(i,"font-variant",e.fontVariant),e.fontFamily&&this.lc(i,"font-family",e.fontFamily),e.fontSize&&this.lc(i,"font-size",e.fontSize),e.fontWeight&&this.lc(i,"font-weight",e.fontWeight),e.color&&this.lc(i,"fill",e.color),e.letterSpacing&&this.lc(i,"letter-spacing",e.letterSpacing),e.er&&this.lc(i,"text-decoration",e.er),(t.parent().path()?t.parent().Ka:t.parent().ia()).appendChild(i)},$.g.R_=function(t){Ni(this,t),Oi(this,t)},$.g.Ji=function(t){t.visible()?t.ia().removeAttribute("visibility"):this.lc(t.ia(),"visibility","hidden")},$.g.CB=function(t){var e=t.Pd;e&&!$.zb(e)?this.lc(t.ia(),"transform",e.toString()):t.ia().removeAttribute("transform")},$.g.R5=function(t){var e=t.Pd;e&&!$.zb(e)?this.lc(t.ia(),"patternTransform",e.toString()):t.ia().removeAttribute("patternTransform")},$.g.Q5=Gi.prototype.CB,$.g.N5=Gi.prototype.CB,$.g.P5=Gi.prototype.CB,$.g.U5=Gi.prototype.CB,$.g.K5=Gi.prototype.CB,$.g.hP=function(t,e,i){$.ph(this,t,{width:e,height:i})},$.g.RX=function(t,e){var i=t.ia();i&&(null!=e?(t.nx||(t.nx=Hi("title"),this.lc(t.nx,"aria-label","")),$.bf(t.nx)||$.We(i,t.nx,0),t.nx.innerHTML=e):t.nx&&i.removeChild(t.nx))},$.g.JX=function(t,e){var i=t.ia();i&&(null!=e?(t.zv||(t.zv=Hi("desc"),this.lc(t.zv,"aria-label","")),$.bf(t.zv)||$.We(i,t.zv,0),t.zv.innerHTML=e):t.zv&&i.removeChild(t.zv))},$.g.J5=function(t,e){var i=t.ia();i&&(e?this.lc(i,"vector-effect","non-scaling-stroke"):i.removeAttribute("vector-effect"))},$.g.O5=$.ia,$.g.H5=function(t){$.ph(this,t.ia(),{cx:t.To(),cy:t.Uo(),r:t.Eb()})},$.g.KX=function(t){$.ph(this,t.ia(),{cx:t.To(),cy:t.Uo(),rx:t.Xr(),ry:t.zx()})},$.g.OX=function(t){var e=$.rh(this,t,!1);e?this.lc(t.ia(),"d",e):this.lc(t.ia(),"d","M 0,0")},$.g.Z0=function(t){for(var e=t.elements,i=0;i<e.length;i++)e[i].ia()&&Pi(e[i]),e[i].clip(null);t=t.id(),(t=$.ze(window.document,t))&&($.Xe($.$e(t)),$.Xe(t))},$.g.HX=function(t){var e=t.clip();if(e){var i;if($.J(e,$.Dg)&&(i=e.id()),!i){i=t.Ja().vn;var n=ck(i,e),s=$.cc($.ac.Id(),n,"clip");$.bf(n)!=i.ia()&&(this.lc(n,"clip-rule","nonzero"),$.qh(this,n,s)),e.o(t.Ja()),e.id(s),(e=e.shape()).Sd(),(e=e.ia())&&(n.appendChild(e),i.ia().appendChild(n)),i=s}n=Li(),$.ph(this,t.ia(),{"clip-path":'url("'+n+"#"+i+'")',clipPathUnits:"userSpaceOnUse"})}else Pi(t)},$.g.S5=function(t){t.Dd()?this.lc(t.ia(),"pointer-events","none"):t.ia().removeAttribute("pointer-events")},$.H($.Si,wd),$.Ri="left",Paa="middle",Qaa="right",Raa="none",$.Si.prototype.preventDefault=function(){$.Si.u.preventDefault.call(this),this.kf.preventDefault()},$.Si.prototype.stopPropagation=function(){$.Si.u.stopPropagation.call(this),this.kf.stopPropagation()},$.Si.prototype.Ju=function(){wd.prototype.stopPropagation.call(this)},$.Si.prototype.OA=function(){return this.kf.OA()};var yE=$.Si.prototype;yE.stopPropagation=yE.stopPropagation,yE.stopWrapperPropagation=yE.Ju,yE.preventDefault=yE.preventDefault,Ti.prototype.get=function(){if(0<this.f){this.f--;var t=this.b;this.b=t.next,t.next=null}else t=this.i();return t};var jj=new Ti((function(){return new Wi}),(function(t){t.reset()})),ij;Vi.prototype.add=function(t,e){var i=jj.get();i.set(t,e),this.f?this.f.next=i:this.b=i,this.f=i},Vi.prototype.remove=function(){var t=null;return this.b&&(t=this.b,this.b=this.b.next,this.b||(this.f=null),t.next=null),t},Wi.prototype.set=function(t,e){this.b=t,this.f=e,this.next=null},Wi.prototype.reset=function(){this.next=this.f=this.b=null};var Yi,Zi=!1,$i=new Vi,kj,nj;kj=0,$.mj=2,nj=3,pj.prototype.reset=function(){this.context=this.f=this.i=this.b=null,this.o=!1};var qj=new Ti((function(){return new pj}),(function(t){t.reset()}));$.oj.prototype.then=function(t,e,i){return $.yj(this,$.D(t)?t:null,$.D(e)?e:null,i)},$.oj.prototype.then=$.oj.prototype.then,$.oj.prototype.$goog_Thenable=!0,$.oj.prototype.cancel=function(t){this.dc==kj&&$.aj((function(){var e=new xj(t);sj(this,e)}),this)},$.oj.prototype.K=function(t){this.dc=kj,$.lj(this,$.mj,t)},$.oj.prototype.P=function(t){this.dc=kj,$.lj(this,nj,t)},$.oj.prototype.G=function(){for(var t;t=tj(this);)uj(this,t,this.dc,this.D);this.o=!1};var Bj=Xi;$.H(xj,ta),xj.prototype.name="cancel",$.Cj=$.fa,$.H($.Fj,$.od),$.g=$.Fj.prototype,$.g.Bo=!1,$.g.uF=null,$.g.id=function(){return this.he||(this.he=bc($.ac.Id(),this))},$.g.Sm=function(){return"linear-gradient"},$.g.ld=function(){$.Fj.u.ld.call(this)},$.g.R=function(){this.uF&&(this.uF.qX(this),this.uF=null),this.transform=this.Ta=null,delete this.keys,this.mode=!1,$.Fj.u.R.call(this)};var zE=$.Fj.prototype;zE.dispose=zE.ld,$.H($.Hj,$.od),$.g=$.Hj.prototype,$.g.Bo=!1,$.g.vF=null,$.g.id=function(){return this.he||(this.he=bc($.ac.Id(),this))},$.g.Sm=function(){return"radial-gradient"},$.g.ld=function(){$.Hj.u.ld.call(this)},$.g.R=function(){this.vF&&(this.vF.j5(this),this.vF=null),this.transform=this.Ta=null,delete this.keys,$.Hj.u.R.call(this)};var AE=$.Hj.prototype;AE.dispose=AE.ld,$.H($.Jj,$.od),$.g=$.Jj.prototype,$.g.Ud=null,$.g.ia=function(){return this.Ud},$.g.Ac=function(){this.Ud=$.mg().AS()},$.g.clear=function(){$.Kc(this.ru),$.Kc(this.D),$.Kc(this.i),$.Kc(this.b),$.Ve(this.Ud)},$.g.qX=function(t){var e=$.Gj(t.keys,t.opacity,t.angle,t.mode,t.transform);$.Gc(this.ru,e)&&$.Lc(this.ru,e),t=$.ze(window.document,t.id()),$.Xe(t)},$.g.j5=function(t){var e=$.Ij(t.keys,t.Dc,t.uc,t.Se,t.i,t.opacity,t.Ta,t.transform);$.Gc(this.D,e)&&$.Lc(this.D,e),t=$.ze(window.document,t.id()),$.Xe(t)},$.g.Sd=function(){this.Ac();var t=this.o.ia(),e=this.ia();t.appendChild(e)},$.g.hc=function(t){return t.remove(),t.fl(this),this},$.g.removeChild=function(t){return t.fl(null),$.Xe(t.ia()),t},$.g.Ig=function(){return null},$.g.UI=$.ia,$.g.Ja=function(){return this.o},$.g.Pb=$.ia,$.g.R=function(){$.Xe(this.Ud),this.Ud=null,$.Dc(this.ru,(function(t){$.qd(t)})),$.Dc(this.D,(function(t){$.qd(t)})),$.Dc(this.b,(function(t){$.qd(t)})),$.Dc(this.i,(function(t){$.qd(t)})),this.i=this.b=this.D=this.ru=null,delete this.o},$.H($.Yj,$.qf);var cE=1;$.g=$.Yj.prototype,$.g.Yf=window.NaN,$.g.Jf=window.NaN,$.g.uM=window.NaN,$.g.tM=window.NaN,$.g.BL=window.NaN,$.g.AL=window.NaN,$.g.RN=100,$.g.JC=window.NaN,$.g.ks=0,$.Yj.prototype.pathToRadialGradientImage="RadialGradient.png",$.g=$.Yj.prototype,$.g.he=void 0,$.g.JJ=1,$.g.Jc=null,$.g.nx=null,$.g.ox=void 0,$.g.zv=null,$.g.Av=void 0,$.g.QR=!1,$.g.rw=!1,$.g.X6=!0,$.g.id=function(t){return $.p(t)?(t=t||"",this.he!=t&&(this.he=t,$.qh($.mg(),this.Ud,this.he)),this):($.p(this.he)||this.id(bc($.ac.Id(),this)),this.he)},$.g.Ja=function(){return this},$.g.parent=function(){return this},$.g.ia=function(){return this.Ud},$.g.width=function(t){return $.p(t)?(Vj(this,t)&&this.Dt(!0),this):this.Yf||0},$.g.height=function(t){return $.p(t)?(Wj(this,t)&&this.Dt(!0),this):this.Jf||0},$.g.resize=function(t,e){var i=Vj(this,t),n=Wj(this,e);(i||n)&&this.Dt(!0)},$.g.Nha=function(t){return $.p(t)?(0<=(t=(0,window.parseFloat)(t))&&(this.RN>t&&!(0,window.isNaN)(this.JC)&&(0,window.clearTimeout)(this.JC),this.RN=t,this.Dt(!0)),this):this.RN},$.g.O=function(t){return $.p(t)?(t=$.ze(window.document,t||null),this.Jc!=t&&(this.Jc=t,Xj(this),this.Dt(!0),this.Sd()),this):this.Jc?this.qp:null},$.g.Cfa=function(){return this.Jc},$.g.Tl=function(){return this.qp},$.g.suspend=function(){return this.JJ++,this},$.g.resume=function(t){return this.JJ=t?0:Math.max(this.JJ-1,0),this.Sd(),this},$.g.wda=function(t){return $.p(t)?(this.QR=!!t,this):this.QR},$.g.yf=function(){return!!this.JJ},$.g.wN=function(){return this.rw},$.g.title=function(t){return $.p(t)?(this.ox!=t&&(this.ox=t,$.mg().RX(this,this.ox)),this):this.ox},$.g.bT=function(t){return $.p(t)?(this.Av!=t&&(this.Av=t,$.mg().JX(this,this.Av)),this):this.Av},$.g.visible=function(t){return 0==arguments.length?this.Oa.visible():(this.Oa.visible(t),this)},$.g.data=function(t){if(0==arguments.length)return this.F();var e=t.type;if(e)switch(e){case"rect":var i=this.rect();break;case"circle":i=this.rn();break;case"ellipse":i=this.ellipse();break;case"image":i=this.wk();break;case"text":i=this.text();break;case"path":i=this.path();break;case"layer":i=this.Bd();break;default:i=null}else this.pe(t);return i&&i.pe(t),this},$.g.remove=function(){return this.O(null)},$.g.Gh=function(){return 0},$.g.As=function(){return 0},$.g.rb=function(){return new $.I(0,0,this.width(),this.height())},$.g.clip=function(t){return this.Oa.clip(t)},$.g.BM=function(){return this.s0},$.g.fullScreen=function(t){var e=this.Tl();if($.p(t))return e&&this.Ky()&&(t=!!t,this.fullScreen()!=t&&(t?e.mozRequestFullScreenWithKeys?e.mozRequestFullScreenWithKeys():e.webkitRequestFullscreen||e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.requestFullscreen&&e.requestFullscreen():(e=$.ye().b).webkitCancelFullScreen?e.webkitCancelFullScreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen?e.msExitFullscreen():e.exitFullscreen&&e.exitFullscreen())),this;if(!(t=!e)){t:{t=[(t=$.ye().b).webkitFullscreenElement,t.mozFullScreenElement,t.msFullscreenElement,t.fullscreenElement];for(var i=0;i<t.length;i++)if(null!=t[i]){t=t[i];break t}t=null}t=t!=e}return!t},$.g.Ky=function(){return $.Tj()},$.g.EY=function(t){return $.p(t)?(this.X6=!!t,this):this.X6},$.g.Sm=function(){return"stage"},$.g.sl=function(){return this.Oa},$.g.UI=function(t){this.Oa.UI(t)},$.g.cG=$.ia,$.g.Dt=function(t,e){t&&!(0,window.isNaN)(this.JC)&&(0,window.clearTimeout)(this.JC),this.JC=window.NaN;var i=(0,window.isNaN)(this.uM),n=(0,window.isNaN)(this.tM),s=i||n;if(s){var a=this.fullScreen()?$.Wf(this.qp):this.Jc?$.Wf(this.Jc):new $.lb(window.NaN,window.NaN);a.width=Math.max(a.width||0,0),a.height=Math.max(a.height||0,0);var o=!a.width&&!a.height;i=i?a.width:this.uM,n=n?a.height:this.tM}else i=this.uM,n=this.tM,o=!1;i==this.Yf&&n==this.Jf||o||(this.Yf=i,this.Jf=n,e||this.dispatchEvent("stageresize")),this.Jc&&s&&!$.Ch.isNodeJS&&(this.JC=(0,window.setTimeout)(this.Dt,this.RN))},$.g.Lda=function(){this.vn.clear()},$.g.pe=function(t){this.width(t.width),this.height(t.height),t.type="layer",this.sl().pe(t),this.sl().id(""),"id"in t&&this.id(t.id)},$.g.F=function(){var t=this.sl().F();return this.he&&(t.id=this.he),t.width=this.BL,t.height=this.AL,delete t.type,t},$.g.KZ=function(t){return this.ks+=t,t},$.g.M$=function(t){return t=Math.min(500-this.ks,t),this.ks+=t,t},$.g.xF=$.Yj.prototype.KZ,$.g.Sd=function(){if(!this.JJ&&this.Jc&&!this.rw)if(this.rw=!0,this.dispatchEvent("renderstart"),this.ks=0,this.QR)this.xF=this.M$,(0,window.setTimeout)(this.NO,0);else{if(this.xF=this.KZ,this.jk(),this.yr())throw $.ld(6);ak(this)}},$.g.NO=function(){this.jk(),this.yr()?(0,window.setTimeout)(this.NO,0):ak(this)},$.g.jk=function(){if(this.Qx&&this.Qx.length){for(var t=0;t<this.Qx.length;t++){var e=this.Qx[t];e.yr()&&e.Sd()}this.Qx.length=0}this.Oa.yr()&&this.Oa.Sd(),this.Xo&&this.Xo().Sd()},$.g.Pb=function(){},$.g.yr=function(){return this.Oa.yr()},$.g.Vf=function(t){return this.Oa.Vf(t)},$.g.Bd=$.Fg.prototype.Bd,$.g.UP=$.Fg.prototype.UP,$.g.text=$.Fg.prototype.text,$.g.iN=$.Fg.prototype.iN,$.g.rect=$.Fg.prototype.rect,$.g.wk=$.Fg.prototype.wk,$.g.RO=$.Fg.prototype.RO,$.g.QO=$.Fg.prototype.QO,$.g.SP=$.Fg.prototype.SP,$.g.rn=$.Fg.prototype.rn,$.g.ellipse=$.Fg.prototype.ellipse,$.g.path=$.Fg.prototype.path,$.g.tP=$.Fg.prototype.tP,$.g.vP=$.Fg.prototype.vP,$.g.wP=$.Fg.prototype.wP,$.g.xP=$.Fg.prototype.xP,$.g.yP=$.Fg.prototype.yP,$.g.uP=$.Fg.prototype.uP,$.g.RP=$.Fg.prototype.RP,$.g.OP=$.Fg.prototype.OP,$.g.QP=$.Fg.prototype.QP,$.g.PP=$.Fg.prototype.PP,$.g.QL=$.Fg.prototype.QL,$.g.yL=$.Fg.prototype.yL,$.g.PL=$.Fg.prototype.PL,$.g.aN=$.Fg.prototype.aN,$.g.YP=$.Fg.prototype.YP,$.g.qg=$.Fg.prototype.qg,$.g.VL=$.Fg.prototype.VL,$.g.E0=function(t,e,i,n){return new $.Dg(this,t,e,i,n)},$.g.pattern=function(t){return new $.Qb(t)},$.g.qe=function(t,e,i,n){return Xb(t,e,i,n)},$.g.bc=function(){return this.Oa.bc()},$.g.hc=function(t){return this.Oa.hc(t),this},$.g.Eg=function(t,e){return this.Oa.Eg(t,e),this},$.g.xd=function(t){return this.Oa.xd(t)},$.g.removeChild=function(t){return this.Oa.removeChild(t)},$.g.Cj=function(t){return this.Oa.Cj(t)},$.g.Gi=function(){return this.Oa.Gi()},$.g.cN=function(t){return this.Oa.cN(t)},$.g.Kf=function(t){return this.Oa.Kf(t)},$.g.HP=function(t,e){return this.Oa.HP(t,e),this},$.g.KJ=function(t,e){return this.Oa.KJ(t,e),this},$.g.Pj=function(t,e){return this.Oa.Pj(t,e),this},$.g.rotate=function(t,e,i){return this.Oa.rotate(t,e,i),this},$.g.Du=function(t,e){return this.Oa.Du(t,e),this},$.g.JE=function(t,e,i){return this.Oa.JE(t,e,i),this},$.g.gP=function(t,e){return this.Oa.gP(t,e),this},$.g.translate=function(t,e){return this.Oa.translate(t,e),this},$.g.setPosition=function(t,e){return this.Oa.setPosition(t,e),this},$.g.scale=function(t,e,i,n){return this.Oa.scale(t,e,i,n),this},$.g.XO=function(t,e,i){return this.Oa.XO(t,e,i),this},$.g.RF=function(t,e,i,n,s,a){return this.Oa.RF(t,e,i,n,s,a),this},$.g.oc=function(t,e,i,n,s,a){return this.Oa.oc(t,e,i,n,s,a),this},$.g.tD=function(){return this.Oa.tD()},$.g.kp=function(){return this.Oa.kp()},$.g.Ig=function(){return null},$.g.dispatchEvent=function(t){return $.z(t)?t=t.toLowerCase():"type"in t&&(t.type=String(t.type).toLowerCase()),$.Yj.u.dispatchEvent.call(this,t)},$.g.wa=function(t,e,i,n){return $.Yj.u.wa.call(this,String(t).toLowerCase(),e,i,n)},$.g.Ce=function(t,e,i,n){return $.Yj.u.Ce.call(this,String(t).toLowerCase(),e,i,n)},$.g.gc=function(t,e,i,n){return $.Yj.u.gc.call(this,String(t).toLowerCase(),e,i,n)},$.g.Bl=function(t){return $.p(t)&&(t=String(t).toLowerCase()),$.Yj.u.Bl.call(this,t)},$.g.sq=function(t){var e=new $.Si(t,this);if($.J(e.target,$.ig)){e.target.dispatchEvent(e);var i=e.type;switch(e.defaultPrevented&&t.preventDefault(),$.J(e.relatedTarget,$.ig)&&e.relatedTarget.Ja()==this||("mouseover"==i?this.Qg.wa(window.document,"mousemove",this.sq,!1):"mouseout"==i&&this.Qg.gc(window.document,"mousemove",this.sq,!1)),i){case"mousedown":this.Qg.wa(window.document,"mouseup",this.sq,!1);break;case"mouseup":this.Qg.gc(window.document,"mouseup",this.sq,!1);break;case"touchstart":this.Qg.wa(window.document,"touchmove",this.sq,{capture:!1,passive:!1});break;case"touchend":this.Qg.gc(window.document,"touchmove",this.sq,{capture:!1,passive:!1});break;case"pointerdown":this.Qg.wa(window.document,"pointermove",this.sq,!1);break;case"pointerup":this.Qg.gc(window.document,"pointermove",this.sq,!1)}}},$.g.ld=function(){$.Yj.u.ld.call(this)},$.g.R=function(){$.Yj.u.R.call(this),$.Dc(this.s0,(function(t,e,i){t.remove(),delete i[t]})),$.qd(this.Qg),this.Qg=null,$.qd(this.vn),delete this.vn,$.qd(this.Oa),this.jk(),this.Oa.gD(),delete this.Oa;var t=$.cc($.ac.Id(),this,"stage");delete $.Ch.sP[t],ik(this),$.Xe(this.qp),this.Jc=null,delete this.qp,this.Ud=null,$.Jc(hk)&&Kaa(),this.sm&&(this.sm.ld(),this.sm=null)};var BE=$.Yj.prototype,hk;$.E("acgraph.vector.Stage",$.Yj),BE.id=BE.id,BE.container=BE.O,BE.getContainerElement=BE.Cfa,BE.getDomWrapper=BE.Tl,BE.maxResizeDelay=BE.Nha,BE.dispose=BE.ld,BE.getBounds=BE.rb,BE.layer=BE.Bd,BE.unmanagedLayer=BE.UP,BE.circle=BE.rn,BE.ellipse=BE.ellipse,BE.rect=BE.rect,BE.truncatedRect=BE.SP,BE.roundedRect=BE.RO,BE.roundedInnerRect=BE.QO,BE.path=BE.path,BE.star=BE.tP,BE.star4=BE.vP,BE.star5=BE.wP,BE.star6=BE.xP,BE.star7=BE.yP,BE.star10=BE.uP,BE.diamond=BE.QL,BE.triangleUp=BE.RP,BE.triangleDown=BE.OP,BE.triangleRight=BE.QP,BE.triangleLeft=BE.PP,BE.cross=BE.yL,BE.diagonalCross=BE.PL,BE.hLine=BE.aN,BE.vLine=BE.YP,BE.pie=BE.qg,BE.donut=BE.VL,BE.text=BE.text,BE.html=BE.iN,BE.image=BE.wk,BE.data=BE.data,BE.pattern=BE.pattern,BE.hatchFill=BE.qe,BE.clearDefs=BE.Lda,BE.numChildren=BE.bc,BE.addChild=BE.hc,BE.addChildAt=BE.Eg,BE.removeChild=BE.removeChild,BE.removeChildAt=BE.Cj,BE.removeChildren=BE.Gi,BE.swapChildren=BE.HP,BE.swapChildrenAt=BE.KJ,BE.getChildAt=BE.xd,BE.hasChild=BE.cN,BE.forEachChild=BE.Pj,BE.indexOfChild=BE.Kf,BE.getX=BE.Gh,BE.getY=BE.As,BE.width=BE.width,BE.height=BE.height,BE.getBounds=BE.rb,BE.resize=BE.resize,BE.asyncMode=BE.wda,BE.resume=BE.resume,BE.suspend=BE.suspend,BE.isRendering=BE.wN,BE.isSuspended=BE.yf,BE.remove=BE.remove,BE.domElement=BE.ia,BE.visible=BE.visible,BE.rotate=BE.rotate,BE.rotateByAnchor=BE.Du,BE.setRotation=BE.JE,BE.setRotationByAnchor=BE.gP,BE.translate=BE.translate,BE.setPosition=BE.setPosition,BE.scale=BE.scale,BE.scaleByAnchor=BE.XO,BE.appendTransformationMatrix=BE.RF,BE.setTransformationMatrix=BE.oc,BE.getRotationAngle=BE.tD,BE.getTransformationMatrix=BE.kp,BE.clip=BE.clip,BE.createClip=BE.E0,BE.parent=BE.parent,BE.getStage=BE.Ja,BE.listen=BE.wa,BE.listenOnce=BE.Ce,BE.unlisten=BE.gc,BE.unlistenByKey=BE.TB,BE.removeAllListeners=BE.Bl,BE.title=BE.title,BE.desc=BE.bT,BE.getCharts=BE.BM,BE.fullScreen=BE.fullScreen,BE.isFullScreenAvailable=BE.Ky,BE.usePrintingFontFaces=BE.EY,$.H(bk,$.Jj),bk.prototype.clear=function(){$.Kc(this.f),bk.u.clear.call(this)},bk.prototype.R=function(){for(var t in bk.u.R.call(this),this.f)delete this.f[t];delete this.f},$.H(dk,$.Yj),dk.prototype.F0=function(){return new bk(this)},hk={},$.Ch=$.fa.acgraph,$.fa.IS_ANYCHART_AMD?$.sh=window:($.sh=$.fa,$.sh.acgraph=$.sh.acgraph||{}),$.kk=null,$.kk=$.hd&&!$.bd("9")?"vml":"svg",$.Ch.fontSize="10px",$.Ch.fontColor="#000",$.Ch.textDirection="ltr",$.Ch.fontFamily="Verdana";var vk=void 0,CE,aq,Xaa,Yaa,Zaa,$aa,aba,uda,bba,cba,dba,fba,gba,iba,Nk,jba,kba,lba,mba,vda,nba,oba,qba,EE,rba,wda,xda,eu,yda,zda,Ada,sba,uba,vba,wba,xba,yba,zba,Aba,Bda,Cda,Dda,pca,Eda,GE,Mu,HE;for(HE in $.E("acgraph.create",$.lk),$.E("acgraph.getStage",(function(t){return $.Ch.sP[t]})),$.E("acgraph.type",(function(){return $.kk})),$.E("acgraph.rect",$.mk),$.E("acgraph.circle",$.nk),$.E("acgraph.ellipse",$.pk),$.E("acgraph.path",$.qk),$.E("acgraph.text",$.sk),$.E("acgraph.layer",$.ok),$.E("acgraph.image",rk),$.E("acgraph.hatchFill",Xb),$.E("acgraph.patternFill",$.Sb),$.E("acgraph.clip",$.tk),$.E("acgraph.useAbsoluteReferences",(function(t){if(!$.p(t))return!!Li();wk=t})),$.E("acgraph.updateReferences",(function(){var t=vk;if(vk=void 0,$.p(t)&&Li()!=t){var e,i=$.mg();for(e in hk)if(hk.hasOwnProperty(e)){var n=(t=hk[e]).Ja();n&&($.J(t,$.ig)&&(n.yf()?t.Pb(512):t.Vf(512)||i.HX(t)),$.J(t,$.pg)&&(n.yf()?t.Pb(24):(t.Vf(8)||Ni(i,t),t.Vf(16)||Oi(i,t))))}}})),$.fa.IS_ANYCHART_AMD?($.eq=$.fa,$.ll=window):($.ll=$.fa,$.ll.anychart=$.ll.anychart||{},$.eq=$.ll.anychart),$.Ch.anychart=$.eq,$.Cj=$.ll||$.fa,$.Lp=$.ll.document,$.E("anychart.VERSION","8.13.1.1939"),$.E("anychart.DEVELOP",!1),$.E("anychart.DEFAULT_THEME","defaultTheme"),$.E("anychart.PERFORMANCE_MONITORING",!1),Xaa={Nma:"by-spot",Pma:"by-x",b$:"single"},Yaa={NONE:"none",$ra:"single-select",fqa:"multi-select",uoa:"drill-down"},Zaa={bZ:"default",Ena:"crosshair",Xqa:"pointer",Npa:"move",n$:"text",Wsa:"wait",J8:"help",nqa:"n-resize",jqa:"ne-resize",Goa:"e-resize",Zra:"se-resize",rsa:"s-resize",qsa:"sw-resize",cta:"w-resize",mqa:"nw-resize",kqa:"ns-resize",Boa:"ew-resize",lqa:"nwse-resize",iqa:"nesw-resize"},$aa={V8:"left-top",U8:"left-center",T8:"left-bottom",C7:"center-top",xz:"center",B7:"center-bottom",t9:"right-top",s9:"right-center",r9:"right-bottom",$Y:"auto"},aba={V8:"left-top",U8:"left-center",T8:"left-bottom",C7:"center-top",xz:"center",B7:"center-bottom",t9:"right-top",s9:"right-center",r9:"right-bottom",$Y:"auto"},uda={Hma:"before-axes",$la:"after-axes"},bba={xz:"center",AQ:"left",GQ:"right",PQ:"top",pQ:"bottom"},cba={FZ:"vertical",hZ:"horizontal"},dba={FZ:"vertical",hZ:"horizontal",Rsa:"vertical-expandable",dpa:"horizontal-expandable"},fba={AQ:"left",GQ:"right",PQ:"top",pQ:"bottom"},gba={yQ:"inside",mZ:"outside"},iba={pma:"asc",Wna:"desc",NONE:"none"},Nk={rQ:"circle",c$:"square",e8:"diamond",u$:"triangle-up",r$:"triangle-down",t$:"triangle-right",s$:"triangle-left",H7:"cross",cZ:"diagonal-cross",e$:"star4",f$:"star5",g$:"star6",h$:"star7",d$:"star10",k9:"pentagon",p$:"trapezium",tt:"line",v$:"v-line",l7:"arrowhead",oma:"arrow-up",nma:"arrow-right",kma:"arrow-down",lma:"arrow-left"},jba={rQ:"circle",p9:"rect",Sqa:"pin",Qoa:"flag"},kba={Isa:"up",noa:"down",$Y:"auto",pqa:"odd-even"},lba={Mra:"series",Tra:"series-positive",Sra:"series-negative",ZERO:"zero",xma:"axis"},mba={j9:"no-overlap",k7:"allow-overlap",rma:"auto-width"},vda={NONE:"none",zra:"round",J7:"cut",Ara:"round-inner"},nba={bC:"area",kF:"bar",qQ:"bubble",aZ:"candlestick",lF:"column",tt:"line",lZ:"ohlc",pZ:"range-area",qZ:"range-bar",FQ:"range-column",rZ:"range-spline-area",sZ:"range-step-area",vZ:"spline",wZ:"spline-area",DZ:"step-line",CZ:"step-area",rQ:"circle",c$:"square",u$:"triangle-up",r$:"triangle-down",t$:"triangle-right",s$:"triangle-left",e8:"diamond",H7:"cross",cZ:"diagonal-cross",e$:"star4",f$:"star5",g$:"star6",h$:"star7",d$:"star10",k9:"pentagon",p$:"trapezium",l7:"arrowhead",v$:"v-line",av:"marker",xra:"rising-falling"},oba={bZ:"default",Sma:"categories"},$.Pk={A$:"x",tt:"line",j8:"ellipse",kF:"bar"},qba={yQ:"inside",xz:"center",mZ:"outside"},EE={NONE:"none",QQ:"value",Dqa:"percent"},rba={Ura:"series-start",Ooa:"first-visible",Ora:"series-end",ppa:"last-visible"},wda={coa:"direct",ura:"reverse"},xda={bC:"area",kF:"bar",Lma:"box",qQ:"bubble",aZ:"candlestick",lF:"column",Q8:"jump-line",tt:"line",av:"marker",lZ:"ohlc",pZ:"range-area",qZ:"range-bar",FQ:"range-column",rZ:"range-spline-area",sZ:"range-step-area",vZ:"spline",wZ:"spline-area",CZ:"step-area",DZ:"step-line",k$:"stick",O8:"hilo"},eu={yx:"children",eC:"parent"},yda={v8:"first-date",w8:"first-visible-date",S8:"last-visible-date",R8:"last-date"},zda={bZ:"default",ora:"raw",Ira:"selected",Zoa:"grouped"},Ada={NONE:"none",A$:"x",QQ:"value",Kma:"both"},sba={Fna:"csv",Oma:"by-word",Mma:"by-char"},uba={AQ:"left",i$:"start",xz:"center",m8:"end",GQ:"right"},vba={PQ:"top",f9:"middle",pQ:"bottom"},wba={Ima:"blink",tpa:"line-through",yqa:"overline",Dsa:"underline",NONE:"none"},xba={i9:"normal",jpa:"italic",oqa:"oblique"},yba={i9:"normal",csa:"small-caps"},zba={Epa:"ltr",Bra:"rtl"},$.FE={Fsa:"unit",POINTS:"points",oZ:"range",hta:"ytd",lra:"qtd",eqa:"mtd",d9:"max"},Aba={v8:"first-date",w8:"first-visible-date",S8:"last-visible-date",R8:"last-date"},Bda={Esa:"union",Lra:"separated",b$:"single"},Cda={FLOAT:"float",Wqa:"point",lna:"chart"},Dda={FLOAT:"float",lsa:"sticky"},pca={Cra:"same",boa:"different"},Eda={xz:"center",Woa:"forward",yma:"backward"},GE={vma:"average",n7:"bubbleSize",o7:"bubbleSizePercentOfCategory",p7:"bubbleSizePercentOfSeries",q7:"bubbleSizePercentOfTotal",Tma:"categoryName",s7:"categoryYAverage",Vma:"categoryYMax",t7:"categoryYMedian",Yma:"categoryYMin",u7:"categoryYMode",v7:"categoryYPercentOfTotal",ana:"categoryYRangeAverage",w7:"categoryYRangeMax",dna:"categoryYRangeMedian",x7:"categoryYRangeMin",gna:"categoryYRangeMode",y7:"categoryYRangePercentOfTotal",z7:"categoryYRangeSum",A7:"categoryYSum",D7:"chartElements",E7:"close",Dna:"count",L7:"dataPlotBubbleMaxSize",M7:"dataPlotBubbleMinSize",N7:"dataPlotBubbleSizeAverage",O7:"dataPlotBubbleSizeSum",Kna:"dataPlotMaxXSumSeriesName",Mna:"dataPlotMaxYSumSeriesName",Lna:"dataPlotMaxXValuePointSeriesName",Nna:"dataPlotMaxYValuePointSeriesName",Ona:"dataPlotMinXSumSeriesName",Qna:"dataPlotMinYSumSeriesName",Pna:"dataPlotMinXValuePointSeriesName",Rna:"dataPlotMinYValuePointSeriesName",P7:"dataPlotPointCount",Q7:"dataPlotSeriesCount",R7:"dataPlotXAverage",S7:"dataPlotXMax",T7:"dataPlotXMin",U7:"dataPlotXSum",V7:"dataPlotYAverage",W7:"dataPlotYMax",X7:"dataPlotYMin",Y7:"dataPlotYRangeMax",Z7:"dataPlotYRangeMin",c8:"dataPlotYRangeSum",d8:"dataPlotYSum",K8:"high",P8:"index",X8:"low",d9:"max",Hpa:"min",gqa:"name",OPEN:"open",gra:"pointsCount",Qqa:"pertChartCriticalPathStandardDeviation",Rqa:"pertChartProjectDuration",oZ:"range",n9:"rangeEnd",o9:"rangeStart",Nra:"seriesAverage",x9:"seriesBubbleMaxSize",y9:"seriesBubbleMinSize",z9:"seriesBubbleSizeAverage",A9:"seriesBubbleSizeMedian",B9:"seriesBubbleSizeMode",C9:"seriesBubbleSizeSum",D9:"seriesFirstXValue",E9:"seriesFirstYValue",H9:"seriesLastXValue",I9:"seriesLastYValue",Pra:"seriesMax",Qra:"seriesMin",Rra:"seriesName",K9:"seriesPointCount",J9:"seriesPointsCount",Vra:"seriesSum",L9:"seriesXAverage",M9:"seriesXMax",N9:"seriesXMedian",O9:"seriesXMin",P9:"seriesXMode",Q9:"seriesXSum",R9:"seriesYAverage",S9:"seriesYMax",T9:"seriesYMedian",U9:"seriesYMin",V9:"seriesYMode",Wra:"seriesYRangeAverage",W9:"seriesYRangeMax",Xra:"seriesYRangeMedian",X9:"seriesYRangeMin",Yra:"seriesYRangeMode",Y9:"seriesYRangeSum",Z9:"seriesYSum",osa:"sum",QQ:"value",l9:"percentValue",B$:"xPercentOfSeries",C$:"xPercentOfTotal",D$:"xValue",E$:"yPercentOfCategory",F$:"yPercentOfSeries",G$:"yPercentOfTotal",H$:"yValue",fta:"xScalesMin",dta:"xScalesMax",jta:"yScalesMin",ita:"yScalesMax",jna:"catYSumArr_",Zma:"catYMinArr_",Wma:"catYMaxArr_",Uma:"catYAvgArr_",Xma:"catYMedianArr_",$ma:"catYModeArr_",ina:"catYRangeSumArr_",fna:"catYRangeMinArr_",cna:"catYRangeMaxArr_",bna:"catYRangeAvgArr_",ena:"catYRangeMedianArr_",hna:"catYRangeModeArr_"},Mu={},GE)GE.hasOwnProperty(HE)&&(Mu[HE]=GE[HE].toLowerCase());var Fda={D7:"chart-elements",Sna:"data-table"},Bba={NONE:"none",xna:"consider"},Gda={sqa:"ordinal",Dra:"scatter"},Hda={doa:"discrete",Ana:"continuous"},jl={};$.H(ql,$.od);var Eba=/^(.*\.)?anychart\.(com|stg|dev)$/i,IE=!1,ml=1,nl=2,ol=4,pl=8;$.g=ql.prototype,$.g.pf=function(){return!this.dc},$.g.J=function(t){return!!(this.dc&t)},$.g.I=function(t){this.dc&=~t},$.g.B=function(t,e){var i=t&~this.dc;this.dc|=i,!this.md&&!this.f.yf()&&i&&e&&this.f.Sd()},$.g.enabled=function(t){return $.p(t)?(this.G!=t&&(this.G=t,(tl(this)||this.K)&&this.B(ml,!0)),this):this.G},$.g.text=function(t){return $.p(t)?(this.kc!=t&&(this.kc=t,tl(this)&&this.B(ol,!0)),this):this.kc},$.g.yK=function(t){return $.p(t)?(this.Ha!=t&&(this.Ha=t,tl(this)&&this.B(nl,!0)),this):this.Ha},$.g.wK=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,tl(this)&&this.B(nl,!0)),this):this.aa},$.g.xK=function(t){return $.p(t)?(this.ba!=t&&(this.ba=t,tl(this)&&this.B(nl,!0)),this):this.ba},$.g.FF=function(t){return $.p(t)?(this.ea!=t&&(this.ea=t,tl(this)&&this.B(pl,!0)),this):this.ea},$.g.Ja=function(){return this.f},$.g.ia=function(){return this.Ud},$.g.Sd=function(){var t=tl(this);if(t&&$.p(this.Ba)&&!this.Ba&&this.B(ml,!1),this.Ba=t,this.pf()||this.md||!this.f||this.f.yf())return this;if(!this.enabled()&&(this.K||t))return this.J(ml)&&($.Xe(this.Ud),this.I(ml)),this;if(!IE){var e="",i=$.Me("STYLE");i.type="text/css",e+='.anychart-credits{position:absolute;overflow:hidden;right:9px;bottom:6px;height:10px;}.anychart-credits a {text-decoration:none;}.anychart-credits-logo{border:none;margin-right:2px;height:10px;width:10px;display:inline-block;vertical-align:top;}.anychart-credits-text{font-size:10px;line-height:9px;display:inline-block;vertical-align:top;text-decoration:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#929292;height:10px;}',i.styleSheet?i.styleSheet.cssText=e:i.appendChild(window.document.createTextNode(String(e))),$.We($.Ae(window.document,"head",void 0,void 0)[0],i,0),IE=!0}return this.Ud||(this.Ud=$.Me("DIV","anychart-credits")),this.i||(this.i=$.Me("A"),this.D=$.Me("SPAN","anychart-credits-text"),this.b=$.Me("IMG","anychart-credits-logo"),Ue(this.i,this.D),this.Ud.appendChild(this.i)),e=this.f.Tl(),this.J(ml)&&(e&&e.appendChild(this.Ud),this.I(ml)),this.J(nl)&&(e=$.gc.apply(null,[", v%s.%s.%s.%s"].concat(["8","13","1","1939"])),i=t?this.wK():"AnyChart - JavaScript Charts designed to be embedded and integrated{{anychart-version}}",$.Ce(this.i,{href:t?this.yK():"https://www.anychart.com/?utm_source=trial",title:i.replace("{{anychart-version}}",e),target:"_blank"}),$.Ce(this.b,{alt:t?this.xK():"AnyChart - JavaScript Charts"}),this.I(nl)),this.J(ol)&&(t=t?this.text():"AnyChart Trial Version",$.df(this.D,t),this.I(ol)),this.J(pl)&&((t=tl(this)?this.FF():rl())?(this.P=t,(e=th($.mg()))&&($.Ld(e,"complete",this.u4,!1,this),$.Ld(e,"load",this.g_,!1,this),$.Ld(e,"error",this.v4,!1,this),this.o&&(fh(e,t),this.o=!1),dh(e,t,t),this.o=!0,e.start())):$.Xe(this.b),this.I(pl)),this},$.g.g_=function(t){var e=this.P;t.target.id==e&&(this.md||(tl(this)?this.FF():rl())!=e||this.b.parentNode||$.We(this.i,this.b,0),$.Ce(this.b,{src:e}),this.o=!1)},$.g.u4=function(t){t.target.id==this.P&&(this.o=!1)},$.g.v4=function(t){t.target.id==this.P&&$.Xe(this.b)},$.g.N=function(t){this.f.suspend(),$.z(t)?(this.text(t),this.enabled(!0)):$.da(t)||null===t?this.enabled(!!t):$.C(t)&&(this.yK(t.url),this.text(t.text),this.wK(t.alt),this.xK(t.imgAlt),this.FF(t.logoSrc),this.enabled(t.enabled)),this.f.resume()},$.g.F=function(){var t={};return t.url=this.yK(),t.alt=this.wK(),t.imgAlt=this.xK(),t.text=this.text(),t.logoSrc=this.FF(),t.enabled=this.enabled(),t},$.g.R=function(){var t=$.mg();t.iu&&!t.iu.md&&(t=th($.mg()),$.Yd(t,"load",this.g_,!1,this),$.Yd(t,"complete",this.u4,!1,this),$.Yd(t,"error",this.v4,!1,this)),$.Xe(this.D),$.Xe(this.b),$.Xe(this.i),$.Xe(this.Ud),this.f=this.Ud=this.i=this.b=this.D=null,ql.u.R.call(this)};var JE=ql.prototype;JE.text=JE.text,JE.url=JE.yK,JE.alt=JE.wK,JE.imgAlt=JE.xK,JE.logoSrc=JE.FF,JE.enabled=JE.enabled,$.ll.performance&&$.D($.ll.performance.now)&&(0,$.pa)($.ll.performance.now,$.ll.performance),ul.prototype.measure=function(){xl(this);var t,e=[];for(t in this.b){var i=this.b[t];if(!i.FV){for(var n=0;n<i.oS.length;n++){var s=i.oS[n];s&&((s.ea?s.i[0]&&s.i[0][0]&&s.i[0][0].O:s.na?s.G.O:s.ba?s.b[0].O:s.O)||$.Px(s,this.f),e.push(s))}i.FV=!0}}for(t=0;t<e.length;t++)$.Yx(e[t])},ul.prototype.o=function(t){var e=t.target,i=$.X(t,$.KE);t=$.X(t,$.LE),(i||t)&&(e="m"+$.oa(e),(e=this.b[e]).FV=!t,i&&(e.oS=e.FO.Uw()))};var Al={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Gba=/#(.)(.)(.)/,yl=/^#(?:[0-9a-f]{3}){1,2}$/i,Fba=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,Hba,Iba,Yl,im,Hm,Cm,Em,Dm,Im,Jm,Fm,sm,um,wm,Am;$.bm={color:"#fff",opacity:1e-5},Hba=/^#(?:[0-9a-f]{3}){1,2}$/i,Iba=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,Yl={},$.E("anychart.color.blend",$.Kl),$.E("anychart.color.lighten",$.Pl),$.E("anychart.color.darken",$.Ql),$.E("anychart.color.setThickness",$.Wl),$.E("anychart.color.setOpacity",$.Ul),$.E("anychart.color.singleHueProgression",Ml),$.E("anychart.color.bipolarHueProgression",(function(t,e,i){return i=$.p(i)?i:7,t=Ml(t||"blue",Math.floor(i/2)+1,null,1),e=Ml(e||"red",Math.floor(i/2)+1,1),0==i%2&&$.Ca(t,t.length-1,1),$.Ca(e,0,1),t.concat(e)})),$.E("anychart.color.blendedHueProgression",$.Nl);for(var ME=[{Tb:"defaultScaleSettings.linear",Rb:[["defaultScaleSettings.",["log","dateTime"]]]},{Tb:"defaultOrdinalColorScale",Rb:["defaultScaleSettings.ordinalColor"]},{Tb:"defaultLinearColorScale",Rb:["defaultScaleSettings.linearColor"]},{Tb:"defaultFontSettings",Rb:[["default",["Title","CrosshairLabel","ButtonSettings.normal",["Tooltip",["",".contentInternal"]],["Legend",["",".paginator"]],["Label",["Factory","Settings"]]]],[["cartesianBase","scatter","mekko"],".defaultTextMarkerSettings"],["standalones.",["label","table","textAxisMarker"]],[["standalones","resource"],".resourceList.baseSettings"],"stock.eventMarkers.normal","chart.defaultAnnotationSettings.label"]},{Tb:"defaultLabelSettings",Rb:[["chart.",[[["","defaultQuarterSettings."],"defaultLabelSettings"]]],"defaultTextMarkerSettings"]},{Tb:"defaultBackground",Rb:[[[["default",["Title","Timeline.header","TextMarkerSettings","ButtonSettings.normal",["Tooltip",["",".contentInternal"]],"LabelFactory","CrosshairLabel",["Legend",["",".paginator"]]]],["chart",["",".defaultAnnotationSettings.label",[["",".defaultQuarterSettings"],".defaultLabelSettings"],".dataArea"]],["stock.",[[["defaultPlotSettings","scroller"],".xAxis"],"defaultPlotSettings.dataArea"]],["resource.",["grid","timeLine","resourceList"]],["standalones",["",".label",".resourceList"]]],".background"],"chart.defaultQuarterSettings"]},{Tb:"chart.defaultLabelSettings",Rb:["defaultNoDataLabel"]},{Tb:"defaultLabelFactory",Rb:[["default",[["Axis.",[[["minorL","l"],"abels"]]],["Timeline.",["header","labels"]]]],"standalones.labelsFactory",["map.axesSettings.",[[["l","minorL"],"abels"]]],[["pert.milestones",["resource.",["activities","conflicts"]]],".labels"],["pert.tasks.",[[["upper","lower"],"Labels"]]],"stock.defaultPlotSettings.defaultPriceIndicatorSettings.label","treeMap.normal.headers",[["venn","pieFunnelPyramidBase","sunburst",["sankey.",["node","flow","dropoff"]],[["heat","tree"],"Map"],[["chart.defaultAnnotation","linearGauge.defaultPointer",[["chart","map"],".defaultSeries"]],"Settings.base"]],".normal.labels"]]},{Tb:"chart.normal.labels",Rb:["chart.defaultSeriesSettings.base.normal.labels"]},{Tb:"defaultCrosshairLabel",Rb:[[["cartesianBase","mekko","scatter","map","stock"],".crosshair.defaultLabelSettings"]]},{Tb:"defaultMarkerFactory",Rb:["defaultTimeline.markers","standalones.markersFactory",[["venn","pieFunnelPyramidBase",[["heat","tree"],"Map"],[["chart.defaultAnnotation",[["chart","map"],".defaultSeries"]],"Settings.base"]],".normal.markers"]]},{Tb:"defaultTitle",Rb:[[[["default",["Tooltip","Axis","Legend","DataGrid.defaultColumnSettings"]],["chart",["",".defaultQuarterSettings"]],"stock.defaultPlotSettings","standalones","map.axesSettings"],".title"]]},{Tb:"defaultSeparator",Rb:[["default",[[["Tooltip.s","Legend.titleS"],"eparator"]]]]},{Tb:"defaultTooltip",Rb:[[[["default",["Legend","DataGrid","Timeline"]],"chart","pieFunnelPyramidBase",["pert.",["milestones","tasks"]],"stock.eventMarkers"],".tooltip"]]},{Tb:"defaultLegend",Rb:[[["chart","standalones"],".legend"]]},{Tb:"palette",Rb:[[["chart","stock.scroller",["default",["DataGrid","Timeline"]]],".palette"]]},{Tb:"hatchFillPalette",Rb:[[["chart","stock.scroller"],".hatchFillPalette"]]},{Tb:"hatchFillPaletteFor3D",Rb:["cartesian3dBase.hatchFillPalette"]},{Tb:"markerPalette",Rb:[[["chart","stock.defaultPlotSettings"],".markerPalette"]]},{Tb:"defaultGridSettings",Rb:[[["defaultMinor",["cartesianBase scatter polar radar heatMap stock.defaultPlotSettings".split(" "),".default"]],"GridSettings"],"map.gridsSettings",["standalones.",[[["linear","radar","polar"],"Grid"]]]]},{Tb:"defaultMinorGridSettings",Rb:[[["cartesianBase","scatter","polar","radar","stock.defaultPlotSettings"],".defaultMinorGridSettings"]]},{Tb:"defaultLineMarkerSettings",Rb:[["cartesianBase scatter mekko sparkline defaultTimeline stock.defaultPlotSettings".split(" "),".defaultLineMarkerSettings"],"standalones.lineAxisMarker"]},{Tb:"defaultTextMarkerSettings",Rb:[["cartesianBase scatter mekko sparkline defaultTimeline stock.defaultPlotSettings".split(" "),".defaultTextMarkerSettings"],"standalones.textAxisMarker"]},{Tb:"defaultRangeMarkerSettings",Rb:[["cartesianBase scatter mekko sparkline defaultTimeline stock.defaultPlotSettings".split(" "),".defaultRangeMarkerSettings"],"standalones.rangeAxisMarker"]},{Tb:"defaultAxis",Rb:[[[[["cartesianBase","heatMap","scatter","mekko"],[[".default",["X","Y"]]]],[["circular","linear"],"Gauge.default"]],"AxisSettings"],[["radar.","polar."],[[["x","y"],"Axis"]]],["stock.",[["defaultPlotSettings.",["defaultYAxisSettings","xAxis"]],"scroller.xAxis"]],"bullet.axis","defaultColorRange",["standalones.",[[["linear","polar","radar","radial"],"Axis"]]]]},{Tb:"defaultColorRange",Rb:[[["map","treeMap","calendar","standalones","tagCloud"],".colorRange"]]},{Tb:"defaultCallout",Rb:["map.defaultCalloutSettings"]},{Tb:"defaultScroller",Rb:[[[["cartesianBase.",["x","y"]]],"Scroller"],[["stock","standalones"],".scroller"],["resource.",[[["horizontal","vertical"],"ScrollBar"]]]]},{Tb:"defaultNoDataLabel",Rb:[[["chart","stock.defaultPlotSettings"],".noDataLabel"]]},{Tb:"defaultButtonSettings",Rb:["defaultDataGrid.buttons"]},{Tb:"chart",Rb:["tagCloud","scatter","radar","polar","bullet","map","sparkline",[[["cartesian",["","3d"]],"pieFunnelPyramid","gantt"],"Base"],["stock",["",".defaultPlotSettings"]],[["heat","tree"],"Map"],[["circular","linear"],"Gauge"],"pert","resource","mekko","venn","sunburst","sankey","calendar"]},{Tb:"chart.defaultSeriesSettings",Rb:["stock.scroller.defaultSeriesSettings"]},{Tb:"pieFunnelPyramidBase",Rb:["pie","pyramid","funnel"]},{Tb:"pie",Rb:["pie3d"]},{Tb:"cartesianBase.defaultAnnotationSettings.base",Rb:[["cartesianBase.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"cartesianBase.defaultSeriesSettings.rangeLike",Rb:[["cartesianBase.defaultSeriesSettings.",[["range",["Bar","Column",[["","Spline","Step"],"Area"]]],"hilo"]]]},{Tb:"cartesianBase.defaultSeriesSettings.base",Rb:[["cartesianBase.defaultSeriesSettings.",[[["area","bar","line"],"Like"],"marker","bubble"]]]},{Tb:"cartesianBase.defaultSeriesSettings.areaLike",Rb:[["cartesianBase.defaultSeriesSettings.",[[["a","splineA","stepA"],"rea"],["range",[[["","Spline","Step"],"Area"]]]]]]},{Tb:"cartesianBase.defaultSeriesSettings.barLike",Rb:[["cartesianBase.defaultSeriesSettings.",["bar","column","box",["range",["Bar","Column"]],"candlestick"]]]},{Tb:"cartesianBase.defaultSeriesSettings.lineLike",Rb:[["cartesianBase.defaultSeriesSettings.",[[["","sp"],"line"],[["step","jump"],"Line"],"ohlc","stick","hilo"]]]},{Tb:"cartesianBase",Rb:["cartesian","area",["vertical",["Area","Line"]],"bar","box","column","financial","line","jumpLine","stick","pareto","waterfall"]},{Tb:"waterfall.defaultSeriesSettings.barLike",Rb:["waterfall.defaultSeriesSettings.waterfall"]},{Tb:"cartesian3dBase.defaultSeriesSettings.base",Rb:[["cartesian3dBase.defaultSeriesSettings.",["bar","column","area","line","line2d"]]]},{Tb:"cartesian3dBase",Rb:[[["area","bar","column","line","cartesian"],"3d"]]},{Tb:"cartesian",Rb:["cartesian3d"]},{Tb:"bar",Rb:["bar3d"]},{Tb:"column",Rb:["column3d"]},{Tb:"area",Rb:[[["area","line"],"3d"]]},{Tb:"mekko.defaultSeriesSettings.base",Rb:[["mekko.defaultSeriesSettings.",["mosaic",[["","bar"],"mekko"]]]]},{Tb:"scatter.defaultAnnotationSettings.base",Rb:[["scatter.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"scatter.defaultSeriesSettings.base",Rb:[["scatter.defaultSeriesSettings.",["bubble","lineLike","marker"]]]},{Tb:"scatter.defaultSeriesSettings.lineLike",Rb:["scatter.defaultSeriesSettings.line"]},{Tb:"scatter",Rb:["marker","bubble","quadrant"]},{Tb:"radar.defaultSeriesSettings.base",Rb:[["radar.defaultSeriesSettings.",[[["area","line"],"Like"],"marker"]]]},{Tb:"radar.defaultSeriesSettings.areaLike",Rb:["radar.defaultSeriesSettings.area"]},{Tb:"radar.defaultSeriesSettings.lineLike",Rb:["radar.defaultSeriesSettings.line"]},{Tb:"polar.defaultSeriesSettings.base",Rb:[["polar.defaultSeriesSettings.",[[["area","line","bar"],"Like"],"marker"]]]},{Tb:"polar.defaultSeriesSettings.rangeLike",Rb:["polar.defaultSeriesSettings.rangeColumn"]},{Tb:"polar.defaultSeriesSettings.areaLike",Rb:[["polar.defaultSeriesSettings.",["area","polygon"]]]},{Tb:"polar.defaultSeriesSettings.lineLike",Rb:[["polar.defaultSeriesSettings.",[[["","poly"],"line"]]]]},{Tb:"polar.defaultSeriesSettings.barLike",Rb:[["polar.defaultSeriesSettings.",[[["c","rangeC"],"olumn"]]]]},{Tb:"chart.normal.labels",Rb:["sparkline.labels"]},{Tb:"chart.normal.markers",Rb:["sparkline.markers"]},{Tb:"chart.defaultSeriesSettings.base.normal",Rb:["sparkline.defaultSeriesSettings.base"]},{Tb:"chart.defaultSeriesSettings.area.normal",Rb:["sparkline.defaultSeriesSettings.area"]},{Tb:"chart.defaultSeriesSettings.line.normal",Rb:["sparkline.defaultSeriesSettings.line"]},{Tb:"chart.defaultSeriesSettings.column.normal",Rb:["sparkline.defaultSeriesSettings.column"]},{Tb:"sparkline.defaultSeriesSettings.base",Rb:[["sparkline.defaultSeriesSettings.",["area","line","column","winLoss"]]]},{Tb:"circularGauge.defaultPointerSettings.base",Rb:[["circularGauge.defaultPointerSettings.",["bar","marker","needle","knob"]]]},{Tb:"map.defaultSeriesSettings.base",Rb:[["map.defaultSeriesSettings.",["choropleth","bubble","marker","connector"]]]},{Tb:"heatMap.defaultAnnotationSettings.base",Rb:[["heatMap.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"stock.defaultAnnotationSettings.base",Rb:[["stock.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.base",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[[["area","bar","line"],"Like"],"marker"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.rangeLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[["range",["Column",[["","Spline","Step"],"Area"]]],"hilo"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.areaLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[[["a","splineA","stepA"],"rea"],["range",[[["","Spline","Step"],"Area"]]]]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.barLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",["column","rangeColumn","candlestick"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.lineLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[[["","sp"],"line"],[["step","jump"],"Line"],"ohlc","stick","hilo"]]]},{Tb:"stock.scroller.defaultSeriesSettings.base",Rb:[["stock.scroller.defaultSeriesSettings.",[[["area","bar","line"],"Like"],"marker"]]]},{Tb:"stock.scroller.defaultSeriesSettings.areaLike",Rb:[["stock.scroller.defaultSeriesSettings.",[[["a","splineA","stepA"],"rea"],["range",[[["","Spline","Step"],"Area"]]]]]]},{Tb:"stock.scroller.defaultSeriesSettings.barLike",Rb:[["stock.scroller.defaultSeriesSettings.",["column","rangeColumn","candlestick"]]]},{Tb:"stock.scroller.defaultSeriesSettings.lineLike",Rb:[["stock.scroller.defaultSeriesSettings.",[[["","sp"],"line"],[["step","jump"],"Line"],"ohlc","stick","hilo"]]]},{Tb:"stock.scroller.defaultSeriesSettings.rangeLike",Rb:[["stock.scroller.defaultSeriesSettings.",[["range",["Column",[["","Spline","Step"],"Area"]]],"hilo"]]]},{Tb:"defaultScrollBar",Rb:[[[["default",["DataGrid","Timeline"]],"standalones.timeline"],[[[".horizontal",".vertical"],"ScrollBar"]]]]},{Tb:"defaultDataGrid",Rb:[[["ganttBase","standalones"],".dataGrid"]]},{Tb:"defaultTimeline",Rb:[[["ganttBase.t",["standalones.",["projectT","resourceT"]]],"imeline"]]},{Tb:"defaultTimeline.elements",Rb:[["defaultTimeline.",["tasks","baselines","milestones","periods"]]]},{Tb:"defaultTimeline.elements.milestones",Rb:["defaultTimeline.elements.milestones.preview"]},{Tb:"defaultTimeline.tasks",Rb:[["defaultTimeline.",["groupingTasks"]]]},{Tb:"ganttBase",Rb:[["gantt",["Resource","Project"]]]},{Tb:"defaultGroupingSettings",Rb:[["stock.",[[["g","scrollerG"],"rouping"]]]]},{Tb:"linearGauge.defaultPointerSettings.base",Rb:[["linearGauge.defaultPointerSettings.","bar rangeBar marker tank thermometer led".split(" ")]]},{Tb:"linearGauge",Rb:["thermometer","tank","led"]},{Tb:"standalones.resourceList.baseSettings",Rb:[[["standalones.resourceList."],["names","types","descriptions","tags"]]]},{Tb:"resource.resourceList.baseSettings",Rb:[[["resource.resourceList."],["names","types","descriptions","tags"]]]},{Tb:"chart.defaultQuarterSettings",Rb:[["chart.quarters.",[[["right","left"],"Top"],[["right","left"],"Bottom"]]]]},{Tb:"mekko",Rb:["mosaic","barmekko"]},{Tb:"mekko.defaultAnnotationSettings.base",Rb:[["mekko.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]}],NE=0;NE<ME.length;NE++)ME[NE].Rb=Ya(ME[NE].Rb);for(var OE={},PE=0;PE<ME.length;PE++)for(var QE=ME[PE].Tb,RE=ME[PE].Rb,SE=0;SE<RE.length;SE++){var TE=RE[SE],UE=TE.split(".")[0],VE=OE[UE];VE||(OE[UE]=VE={wE:[],LC:0,DI:0});var WE=VE.wE[VE.wE.length-1];WE&&WE.Tb==QE?WE.Rb.push(TE):VE.wE.push({Tb:QE,Rb:[TE]})}im=OE,Hm=0,Cm=1,Em=2,Dm=3,Im=4,Jm=5,Fm=8,sm=function(){function t(t,i){for(var n=Xa(t),s=0;s<n.length;s++)e[n[s]]=i}var e={padding:Fm,margin:Fm,scale:7,palette:Im,fill:Cm,stroke:Em,hatchFill:Dm,hatchFillPalette:Jm,shapes:9};return t([["x","y","color"],"Scale"],7),t([["range","marker"],"Palette"],Im),t([["negative","first","last","max","min","rising","falling","background","progress","milestone","parent","connector","odd","even","title","slider","cell",["row",["","Odd","Even","Hover","Selected"]],["base",["","line"]],["icon",["","Marker"]],["drag",["Preview","Area"]],["hover",["","Negative","Rising","Falling"]],["select"," ed edElement Negative Rising Falling Marquee".split(" ")]],"Fill"],Cm),t([["negative","first","last","max","min","rising","falling","icon",["hover",["","Negative","Rising","Falling"]],["select",["","ed","Negative","Rising","Falling"]]],"HatchFill"],Dm),t([["column","row","connector","median","stem","whisker","negative","high","low","rising","falling","progress","milestone","parent","slider","background",[["","line"],"base"],["hover"," Median Stem Whisker Negative High Low Rising Falling".split(" ")],["icon",["","Marker"]],["drag",["Preview","Area"]],[["x","value"],"Error"],["select"," ed edElement Low High Negative Rising Falling edRising edFalling Median Stem Whisker Marquee".split(" ")]],"Stroke"],Em),e}(),um={"chart.chartLabels":"chart.defaultLabelSettings","chart.grids":"chart.defaultGridSettings","chart.minorGrids":"chart.defaultMinorGridSettings","chart.xAxes":"chart.defaultXAxisSettings","chart.yAxes":"chart.defaultYAxisSettings","chart.axes":"chart.defaultAxisSettings","chart.lineAxesMarkers":"chart.defaultLineMarkerSettings","chart.rangeAxesMarkers":"chart.defaultRangeMarkerSettings","chart.textAxesMarkers":"chart.defaultTextMarkerSettings","plot.lineAxesMarkers":"plot.defaultLineMarkerSettings","plot.rangeAxesMarkers":"plot.defaultRangeMarkerSettings","plot.textAxesMarkers":"plot.defaultTextMarkerSettings","chart.ranges":"chart.defaultRangeSettings","gauge.bars":"gauge.defaultPointerSettings","gauge.markers":"gauge.defaultPointerSettings","gauge.needles":"gauge.defaultPointerSettings","gauge.knobs":"gauge.defaultPointerSettings","gauge.ranges":"gauge.defaultRangeSettings","gauge.axes":"gauge.defaultAxisSettings","gauge.scaleBars":"gauge.defaultScaleBarSettings","map.callouts":"map.defaultCalloutSettings","chart.quarters.rightTop.labels":"chart.defaultQuarterSettings.defaultLabelSettings","chart.quarters.leftTop.labels":"chart.defaultQuarterSettings.defaultLabelSettings","chart.quarters.leftBottom.labels":"chart.defaultQuarterSettings.defaultLabelSettings","chart.quarters.rightBottom.labels":"chart.defaultQuarterSettings.defaultLabelSettings"},wm=["chart.scales","gauge.scales"],Am={"chart.series":{OL:"chart.defaultSeriesSettings",TP:"seriesType"},"map.series":{OL:"map.defaultSeriesSettings",TP:"seriesType"},"gauge.pointers":{OL:"gauge.defaultPointerSettings",TP:"pointerType"},annotationsList:{OL:"defaultAnnotationSettings",TP:"type"}},$.ur={title:["defaultFontSettings","defaultTitle"],background:["defaultBackground"],legend:["defaultFontSettings","defaultLegend"],legendItem:["defaultFontSettings"],paginator:["defaultFontSettings"],separator:["defaultSeparator"],titleSeparator:["defaultSeparator"],tooltip:["defaultFontSettings","defaultTooltip"],labelsFactory:["defaultFontSettings","defaultLabelFactory"],markersFactory:["defaultMarkerFactory"],axis:["defaultAxis"],scroller:["defaultScroller"],thumbs:["defaultScroller.thumbs"]},$.ur.xScroller=$.ur.scroller,$.ur.yScroller=$.ur.scroller,$.ur.titleSeparator=$.ur.separator,$.g=Km.prototype,$.g.getData=function(){return this.la},$.g.Tw=function(){this.la.push(this.f||[]),this.f=[]},$.g.fX=function(t,e){this.f.push(e)},$.g.start=function(){this.la=[],this.f=[]},$.g.Kd=$.ia,$.g.AK=function(){this.f&&this.f.length&&this.Tw()},$.H($.Lm,$.od),$.g=$.Lm.prototype,$.g.tp=null,$.g.uB="\n",$.g.Uz=",",$.g.kJ=window.NaN,$.g.gG=window.NaN,$.g.Yz=window.NaN,$.g.mw=!1,$.g.NH=!1,$.g.ah=window.NaN,$.g.$o=-1,$.g.Zo=-1,$.g.rM=!1,$.g.gX=window.NaN,$.g.lJ=function(t){return $.p(t)?(this.uB=t,this.kJ=this.uB.length-1,this):this.uB},$.g.hG=function(t){return $.p(t)?(this.Uz=t,this.gG=this.Uz.length-1,this):this.Uz},$.g.MH=function(t){return $.p(t)?(this.NH=!!t,this):this.NH},$.g.OH=function(t){return $.p(t)?(this.mw=!!t,this):this.mw},$.g.pC=function(t,e,i){if(this.tp=e||new Km,i=!!i,this.Qd=t||"",this.Yz=t.length,this.i=Mm(this.uB),this.f=Mm(this.Uz),this.ah=0,this.rM=this.ah==this.Yz,this.b=this.NH?this.Pja:this.T4,this.tp.start(),Qm(this)&&(this.NH?this.b=this.T4:this.tp.Tw()),this.NH=!1,i)this.DO();else{for(;Qm(this);)this.tp.Tw();if(this.tp.Kd(this.ah),this.tp.AK(),$.J(this.tp,Km))return this.tp.getData()}return null},$.g.DO=function(){(0,window.clearTimeout)(this.gX);for(var t=0,e=Qm(this);e&&500>t++;){if(this.md)return;this.tp.Tw(),e=Qm(this)}e&&this.tp.Tw(),this.md||(e?(this.tp.Kd(this.ah),this.gX=(0,window.setTimeout)(this.DO,0)):this.tp.AK())},$.g.T4=function(t,e){this.tp.fX(t,e)},$.g.Pja=$.ia,$.g.R=function(){(0,window.clearTimeout)(this.gX),this.f=this.i=this.tp=null,$.Lm.u.R.call(this)};var XE=$.Lm.prototype;$.E("anychart.data.csv.parser",$.Rm),XE.parse=XE.pC,XE.rowsSeparator=XE.lJ,XE.columnsSeparator=XE.hG,XE.ignoreTrailingSpaces=XE.OH,XE.ignoreFirstRow=XE.MH,$.I.prototype.F=function(){return{left:this.left,top:this.top,width:this.width,height:this.height}},$.on.prototype.add=function(t){return new $.on(this.x+t.x,this.y+t.y)},$.on.prototype.min=function(t){return new $.on(Math.min(this.x,t.x),Math.min(this.y,t.y))},$.on.prototype.max=function(t){return new $.on(Math.max(this.x,t.x),Math.max(this.y,t.y))},rn.prototype.tJ=function(){for(var t=this.b.length-1;0<=t&&1e-6>=Math.abs(this.b[t]);t--)this.b.pop()},$.E("anychart.math.rect",$.kn);var YE={wQ:["BC","AD"],eZ:["Before Christ","Anno Domini"],iZ:"JFMAMJJASOND".split(""),xZ:"JFMAMJJASOND".split(""),BQ:"January February March April May June July August September October November December".split(" "),MQ:"January February March April May June July August September October November December".split(" "),IQ:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),NQ:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),RQ:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),AZ:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),KQ:"Sun Mon Tue Wed Thu Fri Sat".split(" "),zZ:"Sun Mon Tue Wed Thu Fri Sat".split(" "),g9:"SMTWTFS".split(""),yZ:"SMTWTFS".split(""),JQ:["Q1","Q2","Q3","Q4"],EQ:["1st quarter","2nd quarter","3rd quarter","4th quarter"],oQ:["AM","PM"],mF:["EEEE, MMMM d, y","MMMM d, y","MMM d, y","M/d/yy"],rF:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],sQ:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],fK:6,w$:[5,6],gK:5},Un=YE;Un=YE;var Kba=/^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;$.En.prototype.clone=function(){return new $.En(this.ai,this.pg,this.xg,this.Th,this.Bj,this.wh)};var yn="y",zn="m",An="d",Bn="h",Cn="n",Dn="s";$.En.prototype.b=function(t){return new $.En(this.ai*t,this.pg*t,this.xg*t,this.Th*t,this.Bj*t,this.wh*t)},$.En.prototype.add=function(t){this.ai+=t.ai,this.pg+=t.pg,this.xg+=t.xg,this.Th+=t.Th,this.Bj+=t.Bj,this.wh+=t.wh},$.g=$.Mn.prototype,$.g.hD=Un.fK,$.g.iD=Un.gK,$.g.clone=function(){var t=new $.Mn(this.b);return t.hD=this.hD,t.iD=this.iD,t},$.g.getFullYear=function(){return this.b.getFullYear()},$.g.getMonth=function(){return this.b.getMonth()},$.g.getDate=function(){return this.b.getDate()},$.g.getTime=function(){return this.b.getTime()},$.g.getDay=function(){return this.b.getDay()},$.g.getUTCFullYear=function(){return this.b.getUTCFullYear()},$.g.getUTCMonth=function(){return this.b.getUTCMonth()},$.g.getUTCDate=function(){return this.b.getUTCDate()},$.g.UM=function(){return this.b.getDay()},$.g.getUTCHours=function(){return this.b.getUTCHours()},$.g.getUTCMinutes=function(){return this.b.getUTCMinutes()},$.g.getTimezoneOffset=function(){return this.b.getTimezoneOffset()},$.g.set=function(t){this.b=new Date(t.getFullYear(),t.getMonth(),t.getDate())},$.g.setFullYear=function(t){this.b.setFullYear(t)},$.g.setMonth=function(t){this.b.setMonth(t)},$.g.setDate=function(t){this.b.setDate(t)},$.g.setTime=function(t){this.b.setTime(t)},$.g.CU=function(t){this.b.setUTCFullYear(t)},$.g.Sfa=function(t){this.b.setUTCMonth(t)},$.g.Rfa=function(t){this.b.setUTCDate(t)},$.g.add=function(t){if(t.ai||t.pg){var e=this.getMonth()+t.pg+12*t.ai,i=this.getFullYear()+Math.floor(e/12);0>(e%=12)&&(e+=12);var n=Math.min(wn(i,e),this.getDate());this.setDate(1),this.setFullYear(i),this.setMonth(e),this.setDate(n)}t.xg&&(e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),12),t=new Date(e.getTime()+864e5*t.xg),this.setDate(1),this.setFullYear(t.getFullYear()),this.setMonth(t.getMonth()),this.setDate(t.getDate()),Kn(this,t.getDate()))},$.g.VM=function(t){return[this.getFullYear(),$.uc(this.getMonth()+1,2),$.uc(this.getDate(),2)].join(t?"-":"")},$.g.NJ=ba(6),$.g.toString=function(){return this.VM()},$.g.valueOf=function(){return this.b.valueOf()},$.H($.Nn,$.Mn),$.g=$.Nn.prototype,$.g.getHours=function(){return this.b.getHours()},$.g.getMinutes=function(){return this.b.getMinutes()},$.g.getSeconds=function(){return this.b.getSeconds()},$.g.getMilliseconds=function(){return this.b.getMilliseconds()},$.g.UM=function(){return this.b.getUTCDay()},$.g.getUTCHours=function(){return this.b.getUTCHours()},$.g.getUTCMinutes=function(){return this.b.getUTCMinutes()},$.g.BU=function(){return this.b.getUTCSeconds()},$.g.Pfa=function(){return this.b.getUTCMilliseconds()},$.g.setHours=function(t){this.b.setHours(t)},$.g.setMinutes=function(t){this.b.setMinutes(t)},$.g.setSeconds=function(t){this.b.setSeconds(t)},$.g.setMilliseconds=function(t){this.b.setMilliseconds(t)},$.g.s2=function(t){this.b.setUTCHours(t)},$.g.t2=function(t){this.b.setUTCMinutes(t)},$.g.u2=function(t){this.b.setUTCSeconds(t)},$.g.Qfa=function(t){this.b.setUTCMilliseconds(t)},$.g.add=function(t){$.Mn.prototype.add.call(this,t),t.Th&&this.s2(this.b.getUTCHours()+t.Th),t.Bj&&this.t2(this.b.getUTCMinutes()+t.Bj),t.wh&&this.u2(this.b.getUTCSeconds()+t.wh)},$.g.VM=function(t){var e=$.Mn.prototype.VM.call(this,t);return t?e+" "+$.uc(this.getHours(),2)+":"+$.uc(this.getMinutes(),2)+":"+$.uc(this.getSeconds(),2):e+"T"+$.uc(this.getHours(),2)+$.uc(this.getMinutes(),2)+$.uc(this.getSeconds(),2)},$.g.NJ=ba(5),$.g.toString=function(){return this.VM()},$.g.clone=function(){var t=new $.Nn(this.b);return t.hD=this.hD,t.iD=this.iD,t},$.H($.On,$.Nn),$.g=$.On.prototype,$.g.clone=function(){var t=new $.On(this.b);return t.hD=this.hD,t.iD=this.iD,t},$.g.add=function(t){(t.ai||t.pg)&&$.Mn.prototype.add.call(this,new $.En(t.ai,t.pg)),this.b=new Date(this.b.getTime()+1e3*(t.wh+60*(t.Bj+60*(t.Th+24*t.xg))))},$.g.getTimezoneOffset=function(){return 0},$.g.getFullYear=$.Nn.prototype.getUTCFullYear,$.g.getMonth=$.Nn.prototype.getUTCMonth,$.g.getDate=$.Nn.prototype.getUTCDate,$.g.getHours=$.Nn.prototype.getUTCHours,$.g.getMinutes=$.Nn.prototype.getUTCMinutes,$.g.getSeconds=$.Nn.prototype.BU,$.g.getMilliseconds=$.Nn.prototype.Pfa,$.g.getDay=$.Nn.prototype.UM,$.g.setFullYear=$.Nn.prototype.CU,$.g.setMonth=$.Nn.prototype.Sfa,$.g.setDate=$.Nn.prototype.Rfa,$.g.setHours=$.Nn.prototype.s2,$.g.setMinutes=$.Nn.prototype.t2,$.g.setSeconds=$.Nn.prototype.u2,$.g.setMilliseconds=$.Nn.prototype.Qfa;var lp=$.hd&&Lba();Qn.prototype.rD=function(t){return this.D-Tn(this,t)};var Zn=[/^'(?:[^']|'')*('|$)/,/^(?:G+|y+|Y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|m+|s+|v+|V+|w+|z+|Z+)/,/^[^'GyYMkSEahKHcLQdmsvVwzZ]+/];$.Xn.prototype.format=function(t,e){if(!t)throw Error("The date to format must be non-null.");var i=e?6e4*(t.getTimezoneOffset()-e.rD(t)):0,n=i?new Date(t.getTime()+i):t,s=n;e&&n.getTimezoneOffset()!=t.getTimezoneOffset()&&(n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-t.getTimezoneOffset())),s=new Date(t.getTime()+(i+(0<i?-864e5:864e5)))),i=[];for(var a=0;a<this.f.length;++a){var o=this.f[a].text;1==this.f[a].type?i.push(Nba(this,o,t,n,s,e)):i.push(o)}return i.join("")};var Mba=!1;bo.prototype.F=function(t){var e=[];return eo(this,t,e),e.join("")};var go={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Qba=/\uffff/.test("")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,ZE,Zt,mo,Sba,Rba,Yba,mp,cq,sp,rp,sw,Vw,xp,yp,$ba;Zt=0,$.jo=1,$.ko=2,$.lo=3,mo=4,Sba=5,Rba=6,$.Fo="center-top right-top right-center right-bottom center-bottom left-bottom left-center left-top".split(" "),Yba=/^[^<&"\n\r–]*$/,mp="treat_as_array",cq=null,sp=[45,113,99,117,108,106,110,124,109,118,35,120,99,111,91,123,85],rp=null,sw={},Vw={},$.up=[{Dg:"year",xe:31536e6,ds:!0},{Dg:"semester",xe:15768e6,ds:!1},{Dg:"quarter",xe:7884e6,ds:!1},{Dg:"month",xe:24192e5,ds:!0},{Dg:"third-of-month",xe:876e6,ds:!1},{Dg:"week",xe:6048e5,ds:!1},{Dg:"day",xe:864e5,ds:!0},{Dg:"hour",xe:36e5,ds:!0},{Dg:"minute",xe:6e4,ds:!0},{Dg:"second",xe:1e3,ds:!0},{Dg:"millisecond",xe:1,ds:!0}],xp=[1+Math.cos((.4-.5)*Math.PI),1+Math.cos((.8-.5)*Math.PI),1+Math.cos(.7*Math.PI),1+Math.cos(1.1*Math.PI),1+Math.cos(1.5*Math.PI)],yp=[1+Math.sin((.4-.5)*Math.PI),1+Math.sin((.8-.5)*Math.PI),1+Math.sin(.7*Math.PI),1+Math.sin(1.1*Math.PI),1+Math.sin(1.5*Math.PI)],$ba={decoration:"text-decoration",hAlign:"text-anchor",color:"fill",fontColor:"fill"},$.E("anychart.utils.printUtilsBoolean",(function(){return sl()})),$.E("anychart.utils.xml2json",$.np),$.E("anychart.utils.json2xml",$.qp),$.E("anychart.utils.hideTooltips",(function(t){for(var e in sw)if(sw.hasOwnProperty(e)){var i=sw[e];i.md||i.Lc(t)}})),$.E("anychart.utils.htmlTableFromCsv",Ap),$.E("anychart.utils.schedule",$.Ep),$.H($.Jp,$.qf),$.g=$.Jp.prototype,$.g.Ed=null,$.g.HN=null,$.g.MV=null,$.g.IN=null,$.g.qq=-1,$.g.SA=-1,$.g.$Q=!1;var $E={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},aF={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},bF=!$.xd||$.bd("525"),cF=$.Ad&&$.gd,Np,Qp,$p,bq,dq,fq,iq,jq,oq;$.g=$.Jp.prototype,$.g.Tfa=function(t){($.xd||$.Hp)&&(17==this.qq&&!t.ctrlKey||18==this.qq&&!t.altKey||$.Ad&&91==this.qq&&!t.metaKey)&&this.zE(),-1==this.qq&&(t.ctrlKey&&17!=t.keyCode?this.qq=17:t.altKey&&18!=t.keyCode?this.qq=18:t.metaKey&&91!=t.keyCode&&(this.qq=91)),bF&&!Ip(t.keyCode,this.qq,t.shiftKey,t.ctrlKey,t.altKey,t.metaKey)?this.handleEvent(t):(this.SA=Gp(t.keyCode),cF&&(this.$Q=t.altKey))},$.g.zE=function(){this.SA=this.qq=-1},$.g.wga=function(t){this.zE(),this.$Q=t.altKey},$.g.handleEvent=function(t){var e=t.kf,i=e.altKey;if($.hd&&"keypress"==t.type)var n=this.SA,s=13!=n&&27!=n?e.keyCode:0;else($.xd||$.Hp)&&"keypress"==t.type?(n=this.SA,s=0<=e.charCode&&63232>e.charCode&&Fp(n)?e.charCode:0):$.yd&&!$.xd?(n=this.SA,s=Fp(n)?e.keyCode:0):(n=e.keyCode||this.SA,s=e.charCode||0,cF&&"keypress"==t.type&&(i=this.$Q),$.Ad&&63==s&&224==n&&(n=191));var a=n=Gp(n);n?63232<=n&&n in $E?a=$E[n]:25==n&&t.shiftKey&&(a=9):e.keyIdentifier&&e.keyIdentifier in aF&&(a=aF[e.keyIdentifier]),$.gd&&bF&&"keypress"==t.type&&!Ip(a,this.qq,t.shiftKey,t.ctrlKey,i,t.metaKey)||(t=a==this.qq,this.qq=a,(e=new Kp(a,s,t,e)).altKey=i,this.dispatchEvent(e))},$.g.Ya=function(){return this.Ed},$.g.WM=function(t,e){this.IN&&this.wH(),this.Ed=t,this.HN=$.Ld(this.Ed,"keypress",this,e),this.MV=$.Ld(this.Ed,"keydown",this.Tfa,e,this),this.IN=$.Ld(this.Ed,"keyup",this.wga,e,this)},$.g.wH=function(){this.HN&&(Zd(this.HN),Zd(this.MV),Zd(this.IN),this.IN=this.MV=this.HN=null),this.Ed=null,this.SA=this.qq=-1},$.g.R=function(){$.Jp.u.R.call(this),this.wH()},$.H(Kp,$.Bd),$.dF=$.fa.acgraph,Np=!1,$.Yj.prototype.Ax=!1,$.Yj.prototype.Xo=function(t){return this.sm||(this.sm=new ql(this,this.Ax),this.sm.N($.zm("stageCredits"))),$.p(t)?(this.sm.N(t),this):this.sm},$.Pp=0,Qp=[],$.Tp={},$.Up={},$.Wp={},$.Vp={},$p=!1,bq=null,dq=[],fq=[],iq=[],jq=[],$.vl=new ul,oq={},function(){for(var t,e=["ms","moz","webkit","o"],i=0;t=e[i]&&!$.fa.requestAnimationFrame;++i)$.fa.requestAnimationFrame=$.fa[t+"RequestAnimationFrame"],$.fa.cancelAnimationFrame=$.fa[t+"CancelAnimationFrame"]||$.fa[t+"CancelRequestAnimationFrame"];if(!$.fa.requestAnimationFrame){var n=0;$.fa.requestAnimationFrame=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-n));return n=e+i,$.fa.setTimeout((function(){t(e+i)}),i)},$.fa.cancelAnimationFrame||($.fa.cancelAnimationFrame=function(t){(0,window.clearTimeout)(t)})}}(),$.E("anychart.graphics",$.dF),$.E("anychart.fromJson",$.Xp),$.E("anychart.fromXml",(function(t){return $.Xp($.np(t))})),$.E("anychart.onDocumentLoad",(function(t,e){CE||(CE=[]),CE.push([t,e]),$.Ld($.ll,"load",(function(){for(var t=0,e=CE.length;t<e;t++){var i=CE[t];i[0].apply(i[1])}CE.length=0}))})),$.E("anychart.onDocumentReady",(function(t,e){if($.ll.isNodeJS&&($p=!0),$p)t.call(e);else if(aq||(aq=[]),aq.push([t,e]),"complete"===$.Lp.readyState)(0,window.setTimeout)(Zp,1);else{var i=$.ll;$.Ld($.Lp,["DOMContentLoaded","readystatechange"],Yp,!1),$.Ld(i,"load",Yp,!1)}})),$.E("anychart.licenseKey",(function(t){return $.p(t)&&(bq=t),bq})),$.E("anychart.theme",(function(t){if($.p(t)){if(fq.length=0,t)if($.A(t))for(var e=0;e<t.length;e++)hq(t[e]);else hq(t);for(var i in dq.length=0,iq.length=0,jq.length=0,im)(t=im[i]).LC=Math.min(t.LC,1),t.DI=0}return fq})),$.E("anychart.appendTheme",hq),$.E("anychart.global",$.Mp),$.E("anychart.getChartById",(function(t){return oq[t]})),$.E("anychart.isAsync",$.Op),$.E("anychart.area",lq("anychart.area","Area chart")),$.E("anychart.area3d",lq("anychart.area3d","3D Area chart")),$.E("anychart.bar",lq("anychart.bar","Bar chart")),$.E("anychart.vertical",lq("anychart.vertical","Bar chart")),$.E("anychart.bar3d",lq("anychart.bar3d","3D Bar chart")),$.E("anychart.bubble",lq("anychart.bubble","Bubble chart")),$.E("anychart.bullet",lq("anychart.bullet","Bullet chart")),$.E("anychart.calendar",lq("anychart.calendar","Calendar chart")),$.E("anychart.cartesian",lq("anychart.cartesian","Cartesian chart")),$.E("anychart.cartesian3d",lq("anychart.cartesian3d","3D Cartesian chart")),$.E("anychart.scatter",lq("anychart.scatter","Scatter chart")),$.E("anychart.stick",lq("anychart.stick","Stick chart")),$.E("anychart.jumpLine",lq("anychart.jumpLine","JumpLine chart")),$.E("anychart.stepLine",lq("anychart.stepLine","StepLine chart")),$.E("anychart.ohlc",lq("anychart.ohlc","OHLC chart")),$.E("anychart.candlestick",lq("anychart.candlestick","Candlestick chart")),$.E("anychart.column",lq("anychart.column","Column chart")),$.E("anychart.column3d",lq("anychart.column3d","3D Column chart")),$.E("anychart.box",lq("anychart.box","Box chart")),$.E("anychart.financial",lq("anychart.financial","Financial chart")),$.E("anychart.funnel",lq("anychart.funnel","Funnel chart")),$.E("anychart.line",lq("anychart.line","Line chart")),$.E("anychart.verticalLine",lq("anychart.verticalLine","Vertical Line chart")),$.E("anychart.verticalArea",lq("anychart.verticalArea","Vertical Area chart")),$.E("anychart.marker",lq("anychart.marker","Marker chart")),$.E("anychart.sunburst",lq("anychart.sunburst","Sunburst chart")),$.E("anychart.pie",lq("anychart.pie","Pie chart")),$.E("anychart.pie3d",lq("anychart.pie3d","3D Pie chart")),$.E("anychart.pyramid",lq("anychart.pyramid","Pyramid chart")),$.E("anychart.radar",lq("anychart.radar","Radar chart")),$.E("anychart.polar",lq("anychart.polar","Polar chart")),$.E("anychart.pert",lq("anychart.pert","Pert chart")),$.E("anychart.sparkline",lq("anychart.sparkline","Sparkline chart")),$.E("anychart.heatMap",lq("anychart.heatMap","HeatMap chart")),$.E("anychart.gauges.circular",lq("anychart.gauges.circular","Circular gauge")),$.E("anychart.gauges.linear",lq("anychart.gauges.linear","Linear gauge")),$.E("anychart.gauges.tank",lq("anychart.gauges.tank","Tank gauge")),$.E("anychart.gauges.thermometer",lq("anychart.gauges.thermometer","Thermometer gauge")),$.E("anychart.gauges.led",lq("anychart.gauges.led","LED gauge")),$.E("anychart.map",lq("anychart.map","Map")),$.E("anychart.choropleth",lq("anychart.choropleth","Choropleth map")),$.E("anychart.bubbleMap",lq("anychart.bubbleMap","Bubble map")),$.E("anychart.connector",lq("anychart.connector","Connector map")),$.E("anychart.markerMap",lq("anychart.markerMap","Marker map")),$.E("anychart.seatMap",lq("anychart.seatMap","Seat map")),$.E("anychart.ganttProject",lq("anychart.ganttProject","Gantt Project chart")),$.E("anychart.ganttResource",lq("anychart.ganttResource","Gantt Resource chart")),$.E("anychart.stock",lq("anychart.stock","Stock chart")),$.E("anychart.treeMap",lq("anychart.treeMap","TreeMap chart")),$.E("anychart.circlePacking",lq("anychart.circlePacking","CirclePacking chart")),$.E("anychart.pareto",lq("anychart.pareto","Pareto chart")),$.E("anychart.resource",lq("anychart.resource","Resource chart")),$.E("anychart.quadrant",lq("anychart.quadrant","Quadrant chart")),$.E("anychart.venn",lq("anychart.venn","Venn chart")),$.E("anychart.tagCloud",lq("anychart.tagCloud","TagCloud chart")),$.E("anychart.timeline",lq("anychart.timeline","Timeline chart")),$.E("anychart.mekko",lq("anychart.mekko","Mekko chart")),$.E("anychart.mosaic",lq("anychart.mosaic","Mosaic chart")),$.E("anychart.barmekko",lq("anychart.barmekko","Barmekko chart")),$.E("anychart.waterfall",lq("anychart.waterfall","Waterfall chart")),$.E("anychart.wordtree",lq("anychart.wordtree","Wordtree chart")),$.E("anychart.sankey",lq("anychart.sankey","Sankey chart")),$.E("anychart.surface",lq("anychart.surface","Surface chart")),$.E("anychart.graph",lq("anychart.graph","Graph chart")),$.E("anychart.standalones.background",lq("anychart.standalones.background","anychart.standalones.Background")),$.E("anychart.standalones.colorRange",lq("anychart.standalones.colorRange","anychart.standalones.ColorRange")),$.E("anychart.standalones.dataGrid",lq("anychart.standalones.dataGrid","anychart.standalones.DataGrid")),$.E("anychart.standalones.label",lq("anychart.standalones.label","anychart.standalones.Label")),$.E("anychart.standalones.labelsFactory",lq("anychart.standalones.labelsFactory","anychart.standalones.LabelsFactory")),$.E("anychart.standalones.legend",lq("anychart.standalones.legend","anychart.standalones.Legend")),$.E("anychart.standalones.markersFactory",lq("anychart.standalones.markersFactory","anychart.standalones.MarkersFactory")),$.E("anychart.standalones.projectTimeline",lq("anychart.standalones.projectTimeline","anychart.standalones.ProjectTimeline")),$.E("anychart.standalones.resourceTimeline",lq("anychart.standalones.resourceTimeline","anychart.standalones.ResourceTimeline")),$.E("anychart.standalones.resourceList",lq("anychart.standalones.resourceList","anychart.standalones.ResourceList")),$.E("anychart.standalones.scroller",lq("anychart.standalones.scroller","anychart.standalones.scroller")),$.E("anychart.standalones.table",lq("anychart.standalones.table","anychart.standalones.Table")),$.E("anychart.standalones.title",lq("anychart.standalones.title","anychart.standalones.Title")),$.E("anychart.standalones.axes.linear",lq("anychart.standalones.axes.linear","anychart.standalones.axes.Linear")),$.E("anychart.standalones.axes.polar",lq("anychart.standalones.axes.polar","anychart.standalones.axes.Polar")),$.E("anychart.standalones.axes.radar",lq("anychart.standalones.axes.radar","anychart.standalones.axes.Radar")),$.E("anychart.standalones.axes.radial",lq("anychart.standalones.axes.radial","anychart.standalones.axes.Radial")),$.E("anychart.standalones.axisMarkers.line",lq("anychart.standalones.axisMarkers.line","anychart.standalones.axisMarkers.Line")),$.E("anychart.standalones.axisMarkers.range",lq("anychart.standalones.axisMarkers.range","anychart.standalones.axisMarkers.Range")),$.E("anychart.standalones.axisMarkers.text",lq("anychart.standalones.axisMarkers.text","anychart.standalones.axisMarkers.Text")),$.E("anychart.standalones.grids.linear",lq("anychart.standalones.grids.linear","anychart.standalones.grids.Linear")),$.E("anychart.standalones.grids.linear3d",lq("anychart.standalones.grids.linear3d","anychart.standalones.grids.Linear3d")),$.E("anychart.standalones.grids.polar",lq("anychart.standalones.grids.polar","anychart.standalones.grids.Polar")),$.E("anychart.standalones.grids.radar",lq("anychart.standalones.grids.radar","anychart.standalones.grids.Radar")),$.E("anychart.ui.contextMenu",lq("anychart.ui.contextMenu","Context Menu",!0)),$.E("anychart.ui.ganttToolbar",lq("anychart.ui.ganttToolbar","Gantt toolbar")),$.E("anychart.ui.preloader",lq("anychart.ui.preloader","Preloader")),$.E("anychart.ui.rangePicker",lq("anychart.ui.rangePicker","Range picker")),$.E("anychart.ui.rangeSelector",lq("anychart.ui.rangeSelector","Range selector")),$.E("anychart.ui.zoom",lq("anychart.ui.zoom","Zoom control")),$.E("anychart.ui.binding.exec",lq("anychart.ui.binding.exec","UI binding")),$.E("anychart.ui.binding.init",lq("anychart.ui.binding.init","UI binding")),$.E("anychart.fromXmlFile",lq("anychart.fromXmlFile","Data adapter")),$.E("anychart.fromJsonFile",lq("anychart.fromJsonFile","Data adapter")),$.E("anychart.data.parseHtmlTable",lq("anychart.data.parseHtmlTable","Data adapter")),$.E("anychart.data.loadJsonFile",lq("anychart.data.loadJsonFile","Data adapter")),$.E("anychart.data.loadXmlFile",lq("anychart.data.loadXmlFile","Data adapter")),$.E("anychart.data.loadCsvFile",lq("anychart.data.loadCsvFile","Data adapter")),$.E("anychart.data.loadGoogleSpreadsheet",lq("anychart.data.loadGoogleSpreadsheet","Data adapter"));var mq=$.Yj.prototype;mq.credits=mq.Xo,mq.saveAsPNG=nq("saveAsPng"),mq.saveAsJPG=nq("saveAsJpg"),mq.saveAsPDF=nq("saveAsPdf"),mq.saveAsSVG=nq("saveAsSvg"),mq.saveAsPng=nq("saveAsPng"),mq.saveAsJpg=nq("saveAsJpg"),mq.saveAsPdf=nq("saveAsPdf"),mq.saveAsSvg=nq("saveAsSvg"),mq.shareAsPng=nq("shareAsPng"),mq.shareAsJpg=nq("shareAsJpg"),mq.shareAsPdf=nq("shareAsPdf"),mq.shareAsSvg=nq("shareAsSvg"),mq.getPngBase64String=nq("getPngBase64String"),mq.getJpgBase64String=nq("getJpgBase64String"),mq.getSvgBase64String=nq("getSvgBase64String"),mq.getPdfBase64String=nq("getPdfBase64String"),mq.print=nq("print"),mq.toSvg=nq("toSvg");var Fq,eF=[];eF[0]=Xq,eF[1]=Yq,eF[2]=function(t,e,i,n){return t?$.kl(405,null,[e+"()",t+"()"],!0):$.kl(407,null,[e+"()"],!0),Xq.call(this,t,e,i,n)},eF[3]=function(t,e,i,n,s){return t?$.kl(405,null,[e+"()",t+"()"],!0):$.kl(407,null,[e+"()"],!0),Yq.apply(this,arguments)},Fq=eF,$.Z={},$.Z.vQ=[0,"enabled",$.Dq],$.Z.yz=[1,"fill",$.Qq],$.Z.cC=[1,"fill",$.Nq],$.Z.u8=[0,"fill",$.am],$.Z.jZ=[1,"negativeFill",$.Nq],$.Z.u9=[1,"risingFill",$.Nq],$.Z.q8=[1,"fallingFill",$.Nq],$.Z.Y8=[1,"lowFill",$.Nq],$.Z.L8=[1,"highFill",$.Nq],$.Z.Yn=[1,"stroke",$.Pq],$.Z.qF=[1,"stroke",$.Jq],$.Z.m$=[0,"stroke",$.Zl],$.Z.c9=[1,"lowStroke",$.Jq],$.Z.N8=[1,"highStroke",$.Jq],$.Z.h9=[1,"negativeStroke",$.Jq],$.Z.w9=[1,"risingStroke",$.Jq],$.Z.s8=[1,"fallingStroke",$.Jq],$.Z.e9=[1,"medianStroke",$.Jq],$.Z.j$=[1,"stemStroke",$.Jq],$.Z.x$=[1,"whiskerStroke",$.Jq],$.Z.xQ=[1,"hatchFill",$.Rq],$.Z.gZ=[1,"hatchFill",$.Oq],$.Z.apa=[0,"hatchFill",$.$l],$.Z.kZ=[1,"negativeHatchFill",$.Oq],$.Z.v9=[1,"risingHatchFill",$.Oq],$.Z.r8=[1,"fallingHatchFill",$.Oq],$.Z.M8=[1,"highHatchFill",$.Oq],$.Z.Z8=[1,"lowHatchFill",$.Oq],$.Z.eK=[0,"align",Fk],$.Z.y$=[0,"whiskerWidth",$.br],$.Z.EZ=[0,"type",$.cr],$.Z.uZ=[0,"size",$.Bq],$.Z.q$=[1,"trend",$.Jq],$.Z.fZ=[1,"grid",$.Jq],$.Z.k8=[1,"emptyFill",$.Nq],$.Z.l8=[1,"emptyHatchFill",$.Oq],$.Z.z8=[0,"fontFamily",$.zq],$.Z.D8=[0,"fontStyle",$.cl],$.Z.E8=[0,"fontVariant",$.dl],$.Z.G8=[0,"fontWeight",$.wq],$.Z.C8=[0,"fontSize",function(t){return null===t||$.D(t)||$.uo(t)?t:(0,window.parseFloat)(t)}],$.Z.x8=[0,"fontColor",$.Aq],$.Z.o$=[0,"textShadow",$.Zb],$.Z.A8=[0,"fontOpacity",$.Bq],$.Z.y8=[0,"fontDecoration",$.bl],$.Z.h8=[1,"dummyFill",$.Nq],$.Z.i8=[1,"dummyStroke",$.Jq],$.Z.o8=[0,"type",$.Rk],$.Z.iK=[0,"length",$.br],$.Z.dZ=[0,"direction",$.Sk],$.Z.n8=[0,"position",$.Tk],$.Z.G9=[0,"seriesId",$.zq],$.Z.t8=[0,"fieldName",$.zq],$.Z.jK=[0,"width",$.br],$.Z.hK=[0,"height",$.br],$.Z.H8=[0,"format",$.ar],$.Z.B8=[0,"fontPadding",$.br],$.Z.l$=[0,"stickToLeft",$.Dq],$.Z.p8=[0,"explode",$.br],$.Z.zz=[0,"startAngle",function(t){return $.ab($.N(t)||0)}],$.Z.I7=[0,"cursor",Ck],$.Z.G7=[0,"content",$.Cq],$.Z.dC=[0,"overlapMode",$.Uk],$.Z.ZY=[0,"anchor",$.Dk],$.Z.m9=[0,"position",$.Ek],$.Z.CQ=[0,"offsetY",$.Bq],$.Z.DQ=[0,"offsetX",$.Bq],$.Z.nZ=[0,"positionFormatter",$.gr],$.Z.HQ=[0,"rotation",$.xq],$.Z.tQ=[0,"drawFirstLabel",$.Dq],$.Z.uQ=[0,"drawLastLabel",$.Dq],$.Z.z$=[0,"width",$.xq],$.Z.I8=[0,"height",$.xq],$.Z.a$=[0,"shape",$.Aq],$.KE=524288,$.LE=1048576,$.gm=0,$.vo=1,$.wo=2,$.H($.V,$.qf),$.g=$.V.prototype,$.g.ra=0,$.g.sa=0,$.g.Xz=0,$.g.Lo=window.NaN,$.g.GP=0,$.g.nd=function(t){return this.Pa[t]},$.g.ph=function(t){return $.p(this.Pa[t])},$.g.vf=function(t){return this.oa[t]},$.g.g=function(t){return this.ph(t)?this.nd(t):this.vf(t)},$.g.ta=function(t,e){this.Pa[t]=e},$.g.check=function(){return!0},$.g.getCapabilities=function(t){return(t=this.ua[t])?t.Cb:0},$.g.CM=function(t){return(t=this.ua[t])&&t.ho||0},$.g.ys=function(t){return(t=this.ua[t])&&t.Aka||0},$.g.iH=function(){return null},$.g.Wj=function(t){return $.p(t)?(this.n4=t,this):this.n4},$.g.B=function(t,e){var i=(t&=this.sa)&~this.Xz;return this.Xz|=i,(i||this.Wj())&&this.va(e||0),i},$.g.I=function(t){this.Xz&=~t},$.g.pf=function(t){if(t=!(this.Xz&~(t||0)))t:{for(var e in this.Nl)if(this.Nl[e]){t=!1;break t}t=!0}return t},$.g.J=function(t){return!!(this.Xz&t)},$.g.va=function(t,e,i){(t&=this.ra)&&((0,window.isNaN)(this.Lo)||e?(e=this.Zi(),this.kb(null),t=new Ar(this,t,i),this.dispatchEvent(t),this.kb(e)):this.Lo|=t)},$.g.ka=function(){return this.GP++,(0,window.isNaN)(this.Lo)&&(this.Lo=0),this},$.g.da=function(t){if((0,window.isNaN)(this.Lo)||--this.GP)return this;var e=this.Lo;return this.Lo=window.NaN,t&&e&&this.va(e),this},$.g.F=function(){return{}},$.g.N=function(t){for(var e=[!1],i=0;i<arguments.length;i++)e.push(arguments[i]);return this.ga.apply(this,e)},$.g.ga=function(t,e){var i=arguments[1];if($.p(i)){this.ka();for(var n=[],s=0;s<arguments.length;s++)n.push(arguments[s]);!this.Ie.apply(this,n)&&$.C(i)&&this.U(i,t),this.da(!0)}return this},$.g.U=function(){},$.g.Ie=function(){return!1},$.g.Zd=function(){return null},$.g.Ga=function(t){if($.A(arguments[0]))return this.Ga.apply(this,arguments[0]);var e=[];if(arguments.length){for(var i=0;i<arguments.length;i++){var n=arguments[i];($.C(n)||-1==this.QB.indexOf(n))&&(this.QB.push(n),e.push(n))}this.MT()}return e},$.g.df=function(t){return this.QB.length=0,this.oa={},t&&(this.WC.length=0),this},$.g.MT=function(){for(var t=this.oa||{},e=(0,$.pa)(this.Zd,this),i=0;i<this.QB.length;i++){var n=this.QB[i];$.z(n)?t=$.zm(n,t,e):$.C(n)&&$.ra(t,n)}this.oa=t},$.H(Ar,wd),$.g=Ar.prototype,$.g.cla=function(){return $.X(this,1)},$.g.Xka=function(){return $.X(this,8)},$.g.Yka=function(){return $.X(this,16)},$.g.$ka=function(){return $.X(this,32)},$.g.ala=function(){return $.X(this,2)},$.g.bla=function(){return $.X(this,4)},$.g=$.V.prototype,$.g.dispatchEvent=function(t){return $.z(t)?t=t.toLowerCase():"type"in t&&(t.type=String(t.type).toLowerCase()),$.V.u.dispatchEvent.call(this,t)},$.g.wa=function(t,e,i,n){return $.V.u.wa.call(this,String(t).toLowerCase(),e,i,n)},$.g.Ce=function(t,e,i,n){return $.V.u.Ce.call(this,String(t).toLowerCase(),e,i,n)},$.g.gc=function(t,e,i,n){return $.V.u.gc.call(this,String(t).toLowerCase(),e,i,n)},$.g.TB=function(t){return $.V.u.TB.call(this,t)},$.g.Bl=function(t){return $.p(t)&&(t=String(t).toLowerCase()),$.V.u.Bl.call(this,t)};var fF=$.V.prototype;fF.listen=fF.wa,fF.listenOnce=fF.Ce,fF.unlisten=fF.gc,fF.unlistenByKey=fF.TB,fF.removeAllListeners=fF.Bl,fF.dispose=fF.ld,fF.isConsistent=fF.pf,fF.suspendSignalsDispatching=fF.ka,fF.resumeSignalsDispatching=fF.da,fF=Ar.prototype,fF.targetNeedsRedraw=fF.cla,fF.targetBoundsChanged=fF.Xka,fF.targetDataChanged=fF.Yka,fF.targetMetaChanged=fF.$ka,fF.targetNeedsReapplication=fF.ala,fF.targetNeedsRecalculation=fF.bla,$.E("anychart.PointState.NORMAL",$.gm),$.E("anychart.PointState.HOVER",$.vo),$.E("anychart.PointState.SELECT",$.wo),$.g=$.Br.prototype,$.g.select=function(t){return this.i=t-1,this.advance()},$.g.Iu=function(t){this.select(t)},$.g.current=function(){return this.i},$.g.reset=function(){return this.i=-1,this.f=void 0,this},$.g.advance=function(){this.f=this.view.Af(++this.i);var t=this.Hb();return!!t&&this.i<t},$.g.get=function(t){if(!(this.i>=this.Hb()))return this.view.Ul(this.i).dk(this.f,this.i,t)},$.g.lr=function(t){return this.get(t)},$.g.ma=function(){return this.i},$.g.Gh=function(){return this.get("x")},$.g.Hb=function(){return this.view.Hb()},$.g.j=function(t,e){return 1<arguments.length?(this.view.j(this.i,t,e),this):this.view.j(this.i,t)};var gF=$.Br.prototype;gF.select=gF.select,gF.reset=gF.reset,gF.advance=gF.advance,gF.get=gF.get,gF.meta=gF.j,gF.getIndex=gF.ma,gF.getRowsCount=gF.Hb,$.H($.Cr,$.V),$.g=$.Cr.prototype,$.g.ra=16,$.g.sa=1,$.g.wo=null,$.g.Aw=null,$.g.aE=null,$.g.zY=!1,$.g.Ui=function(){var t=new $.Cr(this);return $.rd(this,t),t},$.g.filter=function(t,e){var i=new Hr(this,t,e);return $.rd(this,i),i},$.g.sort=function(t,e){var i=new Pr(this,t,e);return $.rd(this,i),i},$.g.concat=function(t){return $.A(t)&&(t=new $.Mr(t)),$.J(t,$.Mr)&&(t=t.Yd()),t=new Gr(this,t),$.rd(this,t),t},$.g.Af=function(t,e){return $.Dr(this),t=this.wo?this.wo[t]:t,$.p(t)?this.ee.Af.apply(this.ee,arguments):t},$.g.En=function(t){return this.Af(t)},$.g.Hb=function(){return $.Dr(this),this.wo?this.wo.length:this.ee.Hb()},$.g.Ul=function(t){return $.Dr(this),this.Aw||(this.Aw=this.Zt()),1==this.Aw.length?this.Aw[0]:this.ee.Ul(this.wo?this.wo[t]:t)},$.g.Wv=function(){return this.ee.Wv()},$.g.wO=function(t,e){for(var i=this.Wv(),n=0;n<i.length;n++)e=i[n].wO(t,e);return e},$.g.find=function(t,e){if($.Dr(this),!$.p(t)||!$.p(e))return-1;if(this.Ct||(this.Ct={}),this.Ct[t]||(this.Ct[t]={}),this.Ct[t][e])return this.Ct[t][e];for(var i,n,s=this.$();s.advance();)if(i=s.ma(),n=s.get(t),this.Ct[t][n]=i,n==e)return i;return-1},$.g.qM=function(t,e,i){if($.Dr(this),!$.p(t)||!$.p(e))return null;this.$F||(this.$F={});var n=t+"|"+e;if(this.$F[n])return this.$F[n].slice();if(t>e){var s=t;t=e,e=s}var a=[];for((s=this.$()).reset();s.advance();){var o=s.ma(),r=i?o:s.get("x");r>=t&&r<=e&&a.push(o)}return this.$F[n]=a},$.g.get=function(t,e){if(!(t>=this.Hb()))return this.Ul(t).dk(this.Af(t),t,e)},$.g.set=function(t,e,i){var n=this.Af(t);return $.p(n)&&this.Af(t,bca(this.Ul(t),n,e,i)),this},$.g.$=function(){return $.Dr(this),new $.Br(this)},$.g.FC=function(){return null},$.g.XI=function(t){this.$F=this.Ct=null,$.X(t,16)&&this.B(1,16)},$.g.j=function(t,e,i){if(this.zY)return this.tO.apply(this,arguments);this.aE||(this.aE=[]);var n=this.aE[t];return n||(this.aE[t]=n={}),2<arguments.length?(n[e]=i,this):n[e]},$.g.tO=function(t,e,i){if(t=this.wo?this.wo[t]:t,!$.p(t))throw Error("Index can not be masked by this View");return 2<arguments.length?(this.ee.j(t,e,i),this):this.ee.j(t,e)},$.g.hd=function(t){this.Aw||(this.Aw=this.Zt());for(var e=0;e<this.Aw.length;e++)if(this.Aw[e].hd(t))return!0;return!1},$.g.ED=function(){return this.ee.ED()},$.g.Zt=function(){return this.ee.Zt()},$.g.fP=function(t){return $.J(t,Date)&&(t=t.getTime()),(!$.p(t)||$.ea(t)&&(0,window.isNaN)(t))&&(t=null),t},$.g.F=function(){for(var t=[],e=this.$();e.advance();)t.push(Fr(this,e.ma()));return t};var hF=$.Cr.prototype;hF.derive=hF.Ui,hF.filter=hF.filter,hF.sort=hF.sort,hF.concat=hF.concat,hF.row=hF.Af,hF.getRowsCount=hF.Hb,hF.getIterator=hF.$,hF.getDataSets=hF.Wv,hF.meta=hF.j,hF.get=hF.get,hF.set=hF.set,hF.find=hF.find,$.H(Gr,$.Cr),$.g=Gr.prototype,$.g.sa=0,$.g.Ul=function(t){var e=this.ee.Hb();return t<e?this.ee.Ul(t):this.b.Ul(t-e)},$.g.Zt=function(){return $.Ga(this.ee.Zt(),this.b.Zt())},$.g.ED=function(){return this.ee.ED()||this.b.ED()},$.g.Wv=function(){var t=this.ee.Wv(),e=this.b.Wv();return $.Ga(t,e)},$.g.Af=function(t,e){var i=this.ee.Hb();return t<i?this.ee.Af.apply(this.ee,arguments):(t-=i,this.b.Af.apply(this.b,arguments))},$.g.Hb=function(){return this.ee.Hb()+this.b.Hb()},$.g.XI=function(t){this.Ct=null,$.X(t,16)&&this.va(16)},$.g.tO=function(t,e,i){var n=this.ee.Hb();return t<n?n=this.ee:(t-=n,n=this.b),2<arguments.length?(n.j(t,e,i),this):n.j(t,e)},$.H(Hr,$.Cr),Hr.prototype.FC=function(){for(var t=[],e=this.ee.$();e.advance();)this.f(e.get(this.b))&&t.push(e.ma());return t},$.H($.Jr,$.Cr),$.g=$.Jr.prototype,$.g.ra=16,$.g.sa=0,$.g.dk=function(t,e,i){var n=$.ka(t);if("array"==n){if(n=this.Zc[i])for(var s=0;s<n.length;s++)if(n[s]<t.length){var a=t[n[s]];break}}else"object"==n?a=oo(t,i,this.Zc[i]):-1<(0,$.za)(Kr,i)&&(a=t);return!$.p(a)&&-1<(0,$.za)(iF,i)&&(a=e),a},$.g.Ul=function(){return this},$.g.Zt=function(){return[this]},$.g.Af=function(t,e){return this.ee.Af.apply(this.ee,arguments)},$.g.Hb=function(){return this.ee.Hb()},$.g.XI=function(t){this.Ct=null,$.X(t,16)&&this.va(16)},$.g.hd=function(t){if(this.ee.hd(t))return!0;var e,i=iF;for(e=0;e<i.length;e++)if(i[e]==t)return!0;if(this.ee.ED())for(i=Kr,e=0;e<i.length;e++)if(i[e]==t)return!0;if(i=this.Zc[t])for(e=0;e<i.length;e++)if(this.ee.hd(i[e]))return!0;return!1};var Lr={x:[0,"column","x","name"],value:[1,0,"value","y","close","heat"],size:[2,1],open:[1],high:[2],low:[3,1],close:[4],lowest:[1,"lowest","low"],q1:[2],median:[3],q3:[4],highest:[5,"highest","high"],outliers:[6],id:[0],lat:[0,"lat","y","value"],long:[1,"long","lon","x"],points:[0],y:[1,"row","y"],heat:[2,"heat","value"],category:[2],isTotal:[2],from:[0],to:[1],weight:[2,"value","flow","weight"],z:[2],name:[0],start:[1],end:[2]},Kr=["value","close"],iF=["x"];$.Jr.prototype.pr=function(){return this.Zc};var jF=$.Jr.prototype;$.E("anychart.data.Mapping.DEFAULT_MAPPING",Lr),$.E("anychart.data.Mapping.DEFAULT_SIMPLE_ROW_MAPPING",Kr),$.E("anychart.data.Mapping.DEFAULT_INDEX_MAPPING",iF),jF.getRowsCount=jF.Hb,jF.getIterator=jF.$,jF.row=jF.Af,jF.getMapping=jF.pr,$.H($.Mr,$.V),$.g=$.Mr.prototype,$.g.ra=16,$.g.zK=0,$.g.At=null,$.g.ZX=!1,$.g.data=function(t,e){return $.p(t)?($.Pp++,$.z(t)&&(t=$.Sr(t,e)),$.la(t)?(this.pc=Nr(this,t),this.va(16)):this.pc&&0<this.pc.length?(this.pc.length=0,this.va(16)):this.pc=[],$.Sp(),this):this.pc},$.g.Yd=function(t){return t=new $.Jr(this,t),$.rd(this,t),t},$.g.Af=function(t,e){var i=this.pc[t];return 1<arguments.length&&($.Pp++,this.pc[t]=e,this.va(16),$.Sp()),i},$.g.En=function(t){return this.Af(t)},$.g.Oaa=function(t){return $.Pp++,this.pc.push.apply(this.pc,Nr(this,arguments)),this.va(16),$.Sp(),this},$.g.Xga=function(t,e){return $.Pp++,$.Da(this.pc,Nr(this,[t])[0],e),this.va(16),$.Sp(),this},$.g.remove=function(t){return $.Pp++,Ea(this.pc,t),this.va(16),$.Sp(),this},$.g.Hb=function(){return this.pc.length},$.g.Ul=function(){throw Error("Wrong usage of the data Set")},$.g.Zt=function(){throw Error("Wrong usage of the data Set")},$.g.hd=function(t){return $.ea(t)?this.zK>t:!(!this.At||!this.At[t.split(".")[0]])},$.g.wO=function(t,e){function i(i){i in t||(t[i]=e++)}var n;for(n=0;n<this.zK;n++)i(n);if(this.At)for(n in this.At)i(n);return this.ZX&&i("value"),e},$.g.ED=function(){return this.ZX},$.g.j=function(){throw Error("Wrong usage of the data Set")},$.g.Wv=function(){return[this]};var kF=$.Mr.prototype;$.E("anychart.data.set",$.Or),kF.data=kF.data,kF.mapAs=kF.Yd,kF.row=kF.Af,kF.append=kF.Oaa,kF.insert=kF.Xga,kF.remove=kF.remove,kF.getRowsCount=kF.Hb,$.H(Pr,$.Cr),Pr.prototype.FC=function(){for(var t=[],e=this.ee.$();e.advance();)t.push({value:e.get(this.b),index:e.ma()});for($.Pa(t,this.f),e=t.length;e--;)t[e]=t[e].index;return t};var Rr=/[ \f\n\r\t\v\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\u3031-\u3035\u309b\u309c\u30a0\u30fc\uff70]+/g,cca=/[!-#%-*,-/:;?@\[-\]_{}\xa1\xa7\xab\xb6\xb7\xbb\xbf\u037e\u0387\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0af0\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f14\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cc0-\u1cc7\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u2329\u232a\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30-\u2e3b\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uaaf0\uaaf1\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]/g;$.E("anychart.data.mapAsTable",(function(t,e,i){if(!t||!$.A(t))return[];if($.p(e))switch(e=String(e).toLowerCase(),e){case"range":e=2;break;case"ohlc":e=4;break;default:e=1}else e=1;var n;if($.p(i)&&!(0,window.isNaN)(n=$.P(i,window.NaN,!1))||(n=$.A(t[0])?Math.floor((t[0].length-1)/e):0),(0,window.isNaN)(n)||0>=n)return[];if(t=new $.Mr(t),i=[],1==e)for(e=0;e<n;e++)i.push(t.Yd({x:[0],value:[1+e]}));else if(2==e)for(e=0;e<n;e++)i.push(t.Yd({x:[0],low:[1+2*e],high:[2*e+2]}));else if(4==e)for(e=0;e<n;e++)i.push(t.Yd({x:[0],open:[1+4*e],high:[4*e+2],low:[4*e+3],close:[4*e+4]}));return i})),$.E("anychart.data.buildMapping",Qr),$.E("anychart.data.parseText",$.Sr);var eca="GyMdkHmsSEDahKzZvQL";$.E("anychart.format.locales.default.dateTimeLocale",{eras:["BC","AD"],eraNames:["Before Christ","Anno Domini"],narrowMonths:"JFMAMJJASOND".split(""),standaloneNarrowMonths:"JFMAMJJASOND".split(""),months:"January February March April May June July August September October November December".split(" "),standaloneMonths:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),standaloneShortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),standaloneWeekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortWeekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),standaloneShortWeekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),narrowWeekdays:"SMTWTFS".split(""),standaloneNarrowWeekdays:"SMTWTFS".split(""),shortQuarters:["Q1","Q2","Q3","Q4"],quarters:["1st quarter","2nd quarter","3rd quarter","4th quarter"],ampms:["AM","PM"],firstDayOfWeek:0,weekendRange:[5,6],firstWeekCutOffDay:3,dateFormat:"y MMM d",timeFormat:"HH:mm:ss",dateTimeFormat:"y MMM d 'at' HH:mm:ss",formats:{full_year:"yyyy",full_year_semester:"MMM yyyy",full_year_quarter:"MMM yyyy",full_year_month:"MMM yyyy",full_year_third_of_month:"dd MMM yyyy",full_year_week:"dd MMM yyyy",full_year_day:"dd MMM yyyy",full_year_hour:"HH dd MMM yyyy",full_year_minute:"dd MMM yyyy, HH:mm",full_year_second:"dd MMM yyyy, HH:mm:ss",full_year_millisecond:"dd MMM yyyy, HH:mm:ss.SSS",timeline_year:["yyyy","yy"],timeline_year_semester:["Q yyyy","Q ''yy"],timeline_year_quarter:["QQ yyyy","QQ ''yy","Q yyyy","Q ''yy"],timeline_year_month:["MMMM yyyy","MMM yyyy","MMM ''yy","MM ''yy"],timeline_year_third_of_month:"EEEE, dd MMMM yyyy;EE, dd MMM yyyy;EE, dd MMM yy;dd MMM yyyy;dd MMMM yy;MM.dd.yyyy;MM.dd.yy".split(";"),timeline_year_week:"dd MMMM yyyy;dd MMM yyyy;dd MMMM yy;dd MMM yy;MM.dd.yyyy;MM.dd.yy".split(";"),timeline_year_day:"EEEE, dd MMMM yyyy;EE, dd MMM yyyy;EE, dd MMM yy;dd MMM yyyy;dd MMMM yy;MM.dd.yyyy;MM.dd.yy".split(";"),timeline_year_hour:["dd MMMM yyyy HH'h'","dd MMM yyyy HH'h'","dd MMM yy HH'h'","MM.dd.yyyy HH'h'","MM.dd.yy HH'h'"],timeline_year_minute:["dd MMMM yyyy HH:mm","dd MMM yyyy HH:mm","dd MMM yy HH:mm","MM.dd.yyyy HH:mm","MM.dd.yy HH:mm"],timeline_year_second:["dd MMMM yyyy HH:mm:ss","dd MMM yyyy HH:mm:ss","dd MMM yy HH:mm:ss","MM.dd.yyyy HH:mm:ss","MM.dd.yy HH:mm:ss"],timeline_year_millisecond:["dd MMMM yyyy HH:mm:ss.SSS","dd MMM yyyy HH:mm:ss.SSS","dd MMM yy HH:mm:ss.SSS","MM.dd.yyyy HH:mm:ss.SSS","MM.dd.yy HH:mm:ss.SSS"],timeline_semester:["Q"],timeline_semester_quarter:["QQ","Q"],timeline_semester_month:["MMMM","MMM","MM"],timeline_semester_third_of_month:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_semester_week:["dd MMMM","dd MMM","MM.dd","MM.dd"],timeline_semester_day:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_semester_hour:["dd MMMM HH'h'","dd MMM HH'h'","dd MMM HH'h'","MM.dd HH'h'","MM.dd HH'h'"],timeline_semester_minute:["dd MMMM HH:mm","dd MMM HH:mm","dd MMM HH:mm","MM.dd HH:mm","MM.dd HH:mm"],timeline_semester_second:["dd MMMM HH:mm:ss","dd MMM HH:mm:ss","dd MMM HH:mm:ss","MM.dd HH:mm:ss","MM.dd HH:mm:ss"],timeline_semester_millisecond:["dd MMMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS"],timeline_quarter:["QQ","Q"],timeline_quarter_month:["MMMM","MMM","MM"],timeline_quarter_third_of_month:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_quarter_week:["dd MMMM","dd MMM","MM.dd","MM.dd"],timeline_quarter_day:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_quarter_hour:["dd MMMM HH'h'","dd MMM HH'h'","dd MMM HH'h'","MM.dd HH'h'","MM.dd HH'h'"],timeline_quarter_minute:["dd MMMM HH:mm","dd MMM HH:mm","dd MMM HH:mm","MM.dd HH:mm","MM.dd HH:mm"],timeline_quarter_second:["dd MMMM HH:mm:ss","dd MMM HH:mm:ss","dd MMM HH:mm:ss","MM.dd HH:mm:ss","MM.dd HH:mm:ss"],timeline_quarter_millisecond:["dd MMMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS"],timeline_month:["MMMM","MMM","MM"],timeline_month_third_of_month:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_month_week:["dd MMMM","dd MMM","MM.dd","MM.dd"],timeline_month_day:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_month_hour:["dd MMMM HH'h'","dd MMM HH'h'","dd MMM HH'h'","MM.dd HH'h'","MM.dd HH'h'"],timeline_month_minute:["dd MMMM HH:mm","dd MMM HH:mm","dd MMM HH:mm","MM.dd HH:mm","MM.dd HH:mm"],timeline_month_second:["dd MMMM HH:mm:ss","dd MMM HH:mm:ss","dd MMM HH:mm:ss","MM.dd HH:mm:ss","MM.dd HH:mm:ss"],timeline_month_millisecond:["dd MMMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS"],timeline_third_of_month:["dd"],timeline_third_of_month_week:["dd"],timeline_third_of_month_day:["EEEE, dd","EE, dd","dd"],timeline_third_of_month_hour:["EEEE, dd HH'h'","EE, dd HH'h'","dd HH'h'"],timeline_third_of_month_minute:["EEEE, dd HH:mm","EE, dd HH:mm","dd HH:mm"],timeline_third_of_month_second:["EEEE, dd HH:mm:ss","EE, dd HH:mm:ss","dd HH:mm:ss"],timeline_third_of_month_millisecond:["EEEE, dd HH:mm:ss.SSS","EE, dd HH:mm:ss.SSS","dd HH:mm:ss.SSS"],timeline_week:["dd"],timeline_week_day:["EEEE, dd","EE, dd","dd"],timeline_week_hour:["EEEE, dd HH'h'","EE, dd HH'h'","dd HH'h'"],timeline_week_minute:["EEEE, dd HH:mm","EE, dd HH:mm","dd HH:mm"],timeline_week_second:["EEEE, dd HH:mm:ss","EE, dd HH:mm:ss","dd HH:mm:ss"],timeline_week_millisecond:["EEEE, dd HH:mm:ss.SSS","EE, dd HH:mm:ss.SSS","dd HH:mm:ss.SSS"],timeline_day:["EEEE, dd","EEEE, dd","EE, dd","dd"],timeline_day_hour:["EEEE, dd HH'h'","EE, dd HH'h'","dd HH'h'"],timeline_day_minute:["EEEE, dd HH:mm","EE, dd HH:mm","dd HH:mm"],timeline_day_second:["EEEE, dd HH:mm:ss","EE, dd HH:mm:ss","dd HH:mm:ss"],timeline_day_millisecond:["EEEE, dd HH:mm:ss.SSS","EE, dd HH:mm:ss.SSS","dd HH:mm:ss.SSS"],timeline_hour:["HH'h'","HH"],timeline_hour_minute:["HH:mm"],timeline_hour_second:["HH:mm:ss"],timeline_hour_millisecond:["HH:mm:ss.SSS"],timeline_minute:["mm''"],timeline_minute_second:["mm''ss\""],timeline_minute_millisecond:["mm''ss\"SSS","mm''ss\"SS"],timeline_second:['ss"',"ss"],timeline_second_millisecond:['ss"SSS','ss"SS'],timeline_millisecond:["SSS"],year:"yyyy",year_semester:"yyyy MMM",year_quarter:"yyyy MMM",year_month:"yyyy MMM",year_third_of_month:"MMM dd",year_week:"MMM dd",year_day:"MMM dd",year_hour:"MMM-dd HH",year_minute:"dd HH:mm",year_second:"HH:mm:ss",year_millisecond:"HH:mm:ss.SSS",semester:"MMM",semester_quarter:"MMM",semester_month:"MMM",semester_third_of_month:"dd",semester_week:"dd",semester_day:"dd",semester_hour:"HH",semester_minute:"HH:mm",semester_second:"HH:mm:ss",semester_millisecond:"SSS",quarter:"MMM",quarter_month:"MMM",quarter_third_of_month:"dd",quarter_week:"dd",quarter_day:"dd",quarter_hour:"HH",quarter_minute:"HH:mm",quarter_second:"HH:mm:ss",quarter_millisecond:"SSS",month:"MMM",month_third_of_month:"dd",month_week:"dd",month_day:"dd",month_hour:"HH",month_minute:"HH:mm",month_second:"HH:mm:ss",month_millisecond:"SSS",third_of_month:"dd",third_of_month_week:"dd",third_of_month_day:"dd",third_of_month_hour:"HH",third_of_month_minute:"HH:mm",third_of_month_second:"HH:mm:ss",third_of_month_millisecond:"SSS",week:"dd",week_day:"dd",week_hour:"HH",week_minute:"HH:mm",week_second:"HH:mm:ss",week_millisecond:"SSS",day:"dd",day_hour:"HH",day_minute:"HH:mm",day_second:"HH:mm:ss",day_millisecond:"SSS",hour:"HH",hour_minute:"HH:mm",hour_second:"HH:mm:ss",hour_millisecond:"SSS",minute:"HH:mm",minute_second:"HH:mm:ss",minute_millisecond:"SSS",second:"HH:mm:ss",second_millisecond:"SSS",millisecond:"SSS",charts_year:"yyyy",charts_semester:"MMM yyyy",charts_quarter:"MMM yyyy",charts_month:"MMM",charts_third_of_month:"dd MMM",charts_week:"dd MMM",charts_day:"dd MMM",charts_hour:"HH:mm",charts_minute:"HH:mm",charts_second:"HH:mm:ss",charts_millisecond:"HH:mm:ss.SSS",charts_year_semester:"MMM",charts_semester_quarter:"MMM",charts_quarter_month:"MMM",charts_month_third_of_month:"dd MMM",charts_third_of_month_week:"dd MMM",charts_week_day:"dd",charts_day_hour:"HH:mm",charts_hour_minute:"HH:mm",charts_minute_second:"HH:mm:ss",charts_second_millisecond:"HH:mm:ss.SSS"}}),$.E("anychart.format.locales.default.numberLocale",{decimalsCount:10,decimalPoint:".",groupsSeparator:"",scale:!1,zeroFillDecimals:!1,scaleSuffixSeparator:"",useBracketsForNegative:!1}),$.E("anychart.format.locales.default.messages",{});var Ida=/^([-]?\d+\.?\d*)(.*?)?$/,As={factors:[1e15,1e12,1e9,1e6,1e3,1e3,1,.001,1e-6,1e-9],suffixes:"P T G M K k  m u n".split(" ")},Ds="default",Cs=null,fs=window.NaN,hs="default",is=null,ks=null,ms=null,ys=0,xs={},Es={},zs={},cs={},Zr={};$.E("anychart.format.inputLocale",(function(t){if($.p(t)){var e=$.z(t),i="object"==$.ka(t);e||i?(es(t,i=i?"input":t),Ds=e?i:Zr[i]||Zr.input||t):Ds="default"}return Ds})),$.E("anychart.format.inputBaseDate",gs),$.E("anychart.format.inputDateTimeFormat",(function(t){return $.p(t)&&(Cs=$.z(t)?t:null),Cs})),$.E("anychart.format.outputLocale",$.Ro),$.E("anychart.format.outputTimezone",(function(t){return $.p(t)&&(ys=$.N(t)||0),ys})),$.E("anychart.format.outputDateFormat",ls),$.E("anychart.format.outputTimeFormat",ns),$.E("anychart.format.outputDateTimeFormat",js),$.E("anychart.format.parseDateTime",$.ps),$.E("anychart.format.parseNumber",(function(t,e){var i=as(e)||as(Ds)||as("default"),n=1;if($.z(t)){i.useBracketsForNegative&&"("==t.charAt(0)&&")"==t.charAt(t.length-1)&&(n=-1,t=t.substring(1,t.length-1)),t=(t=t.replace(i.decimalPoint,".")).replace(new RegExp(tc(i.groupsSeparator),"g"),"");var s=i.scale;if(!0===s&&(s=As),$.C(s)&&$.A(s.factors)&&$.A(s.suffixes)){var a=(t=t.replace(new RegExp(tc(i.scaleSuffixSeparator),"g"),"")).match(Ida);if(!a)return window.NaN;var o=1;if(t=+a[1],a=a[2]){var r=s.factors;s=s.suffixes;for(var l=Math.min(r.length,s.length),h=0;h<l;h++)if(a==s[h]){o=r[h];break}}t*=o}}return n*=+t,(0,window.isNaN)(n)?n:$.Tm(n,i.decimalsCount)})),$.E("anychart.format.subs",$.gc),$.E("anychart.format.getMessage",$.qs),$.E("anychart.format.getDateTimeFormats",$.ts),$.E("anychart.format.getDateTimeFormat",$.ss),$.E("anychart.format.getIntervalIdentifier",$.rs),$.E("anychart.format.date",$.vs),$.E("anychart.format.time",ws),$.E("anychart.format.dateTime",$.us),$.E("anychart.format.number",$.Bs),$.E("anychart.format.getLocale",$r),$.H($.Gs,$.V),$.g=$.Gs.prototype,$.g.ra=2,$.g.nc=function(t,e){this.Xe||(this.Xe=[]);var i=this.Xe.length;return t>=i&&0<i&&(t%=i),$.p(e)?(this.Xe[t]=e,this.va(2),this):(i=this.Xe[t])?i:null},$.g.items=function(t,e){return $.p(t)?($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.Xe),this.Xe=(0,$.Wa)(t,(function(t){return $.Ub(t)})),this.va(2),this):this.Xe},$.g.Gp=function(t){this.Xe=$.Ha(this.oa.items),t&&this.va(2)},$.g.F=function(){var t=$.Gs.u.F.call(this);t.type="distinct";for(var e=[],i=0;i<this.Xe.length;i++)e.push($.Rl(this.Xe[i]));return t.items=e,t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Gs)?{items:t.items()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),!0)},$.g.U=function(t,e){$.Gs.u.U.call(this,t,e),this.items(t.items)};var lF=$.Gs.prototype;$.E("anychart.palettes.distinctColors",(function(t,e){var i=new $.Gs;return $.p(t)&&i.items.apply(i,arguments),i})),lF.itemAt=lF.nc,lF.items=lF.items,$.H($.Hs,$.V),$.g=$.Hs.prototype,$.g.ra=2,$.g.nc=function(t,e,i,n,s){var a=this.items(),o=a.length;return t>=o&&0<o&&(t%=o),$.p(e)?(a[t]=$.Yb.apply(null,$.Ja(arguments,1)),this.va(2),this):a[t]||null},$.g.items=function(t,e){if(!this.b)if(this.b=[],$.p(this.oa.items))for(var i=0;i<this.oa.items.length;i++){var n=$.Yb.call(null,this.oa.items[i]);this.b.push(n)}else for(i in Jg)this.b.push(Jg[i]);return $.p(t)?($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.b),this.b=(0,$.Wa)(t,(function(t){return $.Yb.call(null,t)})),this.va(2),this):this.b},$.g.F=function(){for(var t=$.Hs.u.F.call(this),e=[],i=this.items(),n=0;n<i.length;n++)e.push($.Rl(i[n]));return t.items=e,t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Hs)?{items:t.items()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),!0)},$.g.U=function(t,e){$.Hs.u.U.call(this,t,e),this.items(t.items)},$.g.R=function(){$.sd(this.b),this.b=null,$.Hs.u.R.call(this)};var mF=$.Hs.prototype;$.E("anychart.palettes.hatchFills",(function(t,e){var i=new $.Hs;return i.items.apply(i,$.p(t)?arguments:$.Ec(Jg)),i})),mF.itemAt=mF.nc,mF.items=mF.items,$.H($.Ls,$.V),$.g=$.Ls.prototype,$.g.ra=2,$.g.nc=function(t,e){var i=this.items(),n=i.length;return t>=n&&0<n&&(t%=n),$.p(e)?((n=Qk(e))!=i[t]&&(i[t]=n,this.va(2)),this):(n=i[t])||null},$.g.items=function(t,e){if(!this.Bc)if(this.Bc=[],$.p(this.oa.items))for(var i=0;i<this.oa.items.length;i++)this.Bc.push(this.oa.items[i]);else for(i in Nk)this.Bc.push(Nk[i]);return $.p(t)?($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.Bc),this.Bc=(0,$.Wa)(t,(function(t){return Qk(t)})),this.va(2),this):this.Bc},$.g.F=function(){var t=$.Ls.u.F.call(this);return t.items=this.items(),t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Ls)?{items:t.items()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),!0)},$.g.U=function(t,e){$.Ls.u.U.call(this,t,e),this.items(t.items)};var nF=$.Ls.prototype;$.E("anychart.palettes.markers",(function(t,e){var i=new $.Ls;return $.p(t)&&i.items.apply(i,arguments),i})),nF.itemAt=nF.nc,nF.items=nF.items,$.H($.Ms,$.V),$.g=$.Ms.prototype,$.g.ra=2,$.g.sa=16,$.g.items=function(t,e){return $.p(t)?($.C(t)&&$.A(t.keys)?this.Xe=$.Ub(t).keys:($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.Xe),this.Xe=(0,$.Wa)(t,(function(t){return $.Ub(t)}))),this.B(16,2),this):this.Xe},$.g.count=function(t){return $.p(t)?(this.b!=t&&(this.b=t,this.B(16,2)),this):this.b},$.g.nc=function(t,e){if(this.J(16)){if(this.Xe&&0!=this.b){var i=[],n=$.A(this.Xe)?this.Xe:this.Xe.keys;if($.A(n)&&n.length){for(var s,a=this.b||this.i||n.length,o=1/(n.length-1),r=0;r<n.length;r++){var l=n[r];$.z(l)?(s=$.Ll(l),i.push({color:s?s.vk:"#000000",offset:r*o})):(s=$.Ll(l.color),i.push({color:s?s.vk:"#000000",offset:$.p(l.offset)?l.offset:r*o}))}if(Sa(i),this.f=[],1==i.length)for(r=0;r<a;r++)this.f[r]={color:i[0].color};else for(r=0;r<a;r++){for(s=1==a?0:r/(a-1),o=n=null,l=0;l<i.length;l++)s>=i[l].offset&&(n=i[l]),s<=i[l].offset&&null==o&&(o=i[l]);n||(n=i[0]),o||(o=i[i.length-1]),o.offset==n.offset?this.f[r]={color:n.color}:(s=1-(s-n.offset)/(o.offset-n.offset),this.f[r]={color:$.Tb($.Hl($.Cl(n.color),$.Cl(o.color),s))})}}}this.I(16)}return 1>(i=$.A(this.Xe)?this.Xe:this.Xe.keys).length?null:(i=this.b||this.i||i.length)?$.p(e)?(this.f[t]=e,this.va(2),this):(t>i-1&&(t=i-1),0>t&&(t=0),(i=this.f[t])?i:null):null},$.g.Gp=function(t){this.b=window.NaN,this.Xe="#1D8BD1 #F1683C #2AD62A #DBDC25 #8FBC8B #D2B48C #FAF0E6 #20B2AA #B0C4DE #DDA0DD #9C9AFF #9C3063 #FFFFCE #CEFFFF #630063 #FF8284 #0065CE #CECFFF #000084 #FF00FF #FFFF00 #00FFFF #840084 #840000 #008284 #0000FF #00CFFF #CEFFFF #CEFFCE #FFFF9C #9CCFFF #FF9ACE #CE9AFF #FFCF9C #3165FF #31CFCE #9CCF00 #FFCF00 #FF9A00 #FF6500".split(" "),this.B(16),t&&this.va(2)},$.g.F=function(){var t=$.Ms.u.F.call(this);t.type="range";for(var e=[],i=0;i<this.Xe.length;i++)e.push($.Rl(this.Xe[i]));return t.items=e,(0,window.isNaN)(this.b)||(t.count=this.b),t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Ms)?{items:t.items(),count:t.count()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),"count"in i&&this.count(i.count),!0)},$.g.U=function(t,e){$.Ms.u.U.call(this,t,e),this.items(t.items),this.count(t.count)};var oF=$.Ms.prototype;$.E("anychart.palettes.rangeColors",(function(t,e){var i=new $.Ms;return $.p(t)&&i.N.apply(i,arguments),i})),oF.itemAt=oF.nc,oF.items=oF.items,oF.count=oF.count,$.E("anychart.palettes.defaultPalette","#64b5f6 #1976d2 #ef6c00 #ffd54f #455a64 #96a6a6 #dd2c00 #00838f #00bfa5 #ffa000".split(" ")),$.E("anychart.palettes.earth","#827717 #c77532 #998675 #6b617b #c69c6d #d29b9b #879872 #16685d #57a7b1 #bdbdbd".split(" ")),$.E("anychart.palettes.monochrome",["#37474f","#757575","#90a4ae","#bdbdbd","#e1e1e1"]),$.E("anychart.palettes.provence","#aa8ab3 #b7cbe2 #cdd18e #938d9c #6f5264 #96246a #519790 #6aabcc #61687d #7b8030".split(" ")),$.E("anychart.palettes.morning","#0288d1 #58abd7 #ffe082 #f8bbd0 #f48fb1 #bbdefb #d4e157 #ff6e40 #03a9f4 #e1bee7".split(" ")),$.E("anychart.palettes.coffee","#482311 #8d5932 #d8b597 #f2d1be #9b301c #d81e05 #c5e1a5 #558b2f #ffab00 #e65100".split(" ")),$.E("anychart.palettes.wines","#6f3448 #857600 #f1a122 #a50b01 #400001 #a98b80 #c08081 #86614e #c26364 #615060".split(" ")),$.E("anychart.palettes.turquoise","#80deea #00acc1 #00838f #29b6f6 #0277bd #0277bd #8c9eff #9575cd #ce93d8 #8e24aa".split(" ")),$.E("anychart.palettes.pastel","#90caf9 #80cbc4 #aed581 #e6ee9c #ffcc80 #ffab91 #f8bbd0 #d1c4e9 #9e9e9e #c7b299".split(" ")),$.E("anychart.palettes.blue","#40c4ff #0288d1 #9fa8da #5c6bc0 #7e57c2 #54dbdf #15a9c7 #00897b #304ffe #0179be".split(" ")),$.E("anychart.palettes.glamour","#f8bbd0 #ce93d8 #ab47bc #d81b60 #880e4f #ffd600 #ff6e40 #03a9f4 #5e35b1 #1976d2".split(" ")),$.E("anychart.palettes.sea","#a9e1d4 #54dbdf #15a9c7 #207fbf #c0aca5 #8b8a92 #dbcb8f #dba869 #ffab00 #00897b".split(" ")),$.E("anychart.palettes.v6","#1D8BD1 #F1683C #2AD62A #DBDC25 #8FBC8B #D2B48C #FAF0E6 #20B2AA #B0C4DE #DDA0DD #9C9AFF #9C3063 #FFFFCE #CEFFFF #630063 #FF8284 #0065CE #CECFFF #000084 #FF00FF #FFFF00 #00FFFF #840084 #840000 #008284 #0000FF #00CFFF #CEFFFF #CEFFCE #FFFF9C #9CCFFF #FF9ACE #CE9AFF #FFCF9C #3165FF #31CFCE #9CCF00 #FFCF00 #FF9A00 #FF6500".split(" "));var Os=1,gca={LINEAR:Os,W8:2,Nsa:3},Ss=function(){var t={};return t[Os]=function(t,e){return t=$.N(t),(e=$.N(e)-t)?function(i){return($.N(i)-t)/e}:function(){return 0}},t[2]=function(t,e){return t=$.Xm(Math.abs($.N(t))),(e=$.Xm(Math.abs($.N(e)))-t)?function(i){return($.Xm(Math.abs($.N(i)))-t)/e}:function(){return 0}},t[3]=function(t,e){return t=Fs(t),(e=Fs(e)-t)?function(i){return(Fs(i)-t)/e}:function(){return 0}},t}(),Ts=function(){var t={};return t[Os]=function(t,e){return t=$.N(t),(e=$.N(e)-t)?function(i){return i*e+t}:function(){return t}},t[2]=function(t,e){var i=$.N(t),n=$.N(e),s=$.fb(i)||$.fb(n);return t=$.Xm(Math.abs(i)),(e=$.Xm(Math.abs(n))-t)?function(i){return Ym(Math.E,i*e+t)*s}:function(){return i}},t[3]=function(t,e){return t=Fs(t),(e=Fs(e)-t)?function(i){return Math.round(i*e+t)}:function(){return t}},t}();Ps.prototype.transform=function(t){return this.f||(this.f=Us(this.G,this.i,this.D,this.o,[],Os)),this.f(t)},Ps.prototype.Mc=function(t){return this.b||(this.b=Us(this.i,this.G,[],Os,this.D,this.o)),this.b(t)},Ps.prototype.xe=function(t){return $.p(t)?(this.i=$.Ja(t,0),this.f=this.b=null,this):$.Ja(this.i,0)},$.H(Vs,$.V),$.g=Vs.prototype,$.g.ra=2,$.g.Pp=null,$.g.qn=4,$.g.pm=null,$.g.jv=null,$.g.Mba=function(t,e,i,n,s,a){if($.p(t)){if(null===t)var o=null;else if($.z(t)&&1==arguments.length)o=Fn(t);else{if($.z(t))switch(t=$.Zk(t),e=$.N(e)||1,t){case"year":t="y";break;case"semester":t="m",e*=6;break;case"quarter":t="m",e*=4;break;case"month":t="m";break;case"third-of-month":t="d",e*=10;break;case"week":t="d",e*=7;break;case"day":t="d";break;case"hour":t="h";break;case"minute":t="n";break;case"second":t="s";break;case"millisecond":t="t"}o=new $.En(t,e,i,n,s,a)}var r;return(r=o&&this.Pp)&&(r=this.Pp,r=o.ai==r.ai&&o.pg==r.pg&&o.xg==r.xg&&o.Th==r.Th&&o.Bj==r.Bj&&o.wh==r.wh),r||!o&&!this.Pp||(o?(this.qn=window.NaN,this.Pp=o):(this.qn=4,this.Pp=null),this.jv=this.pm=null,this.va(2)),this}return Gn(this.Pp,!1)},$.g.dU=function(){this.scale.pb();var t=this.b;return t&&((t.ai?"year":t.pg&&((t.pg%6?!(t.pg%3)&&"quarter":"semester")||"month"))||t.xg&&(t.xg%7?"day":"week")||t.Th&&"hour"||t.Bj&&"minute"||t.wh&&(t.wh%1?"millisecond":"second"))||"millisecond"},$.g.eU=function(){this.scale.pb();var t=this.b;return t&&(t.ai||t.pg&&(!(t.pg%6)&&t.pg/6||!(t.pg%3)&&t.pg/3||t.pg)||t.xg&&(!(t.xg%7)&&t.xg/7||t.xg)||t.Th||t.Bj||t.wh&&(!(t.wh%1)&&t.wh||1e3*t.wh))||0},$.g.count=function(t){return $.p(t)?(this.qn!=t&&(this.Pp=null,this.qn=(0,window.isNaN)(t)||2>t?4:Math.ceil(+t),this.jv=this.pm=null,this.va(2)),this):this.qn},$.g.set=function(t){if(this.pm!=t){this.qn=window.NaN,this.Pp=null,this.pm=(0,$.Wa)(t,(function(t){return $.ps(t)})),$.Pa(this.pm);for(var e=this.pm[0],i=1,n=1;n<this.pm.length;n++){var s=this.pm[n];s!=e&&(this.pm[i++]=s),e=s}this.pm.length=t.length?i:0,this.jv=null,this.va(2)}return this},$.g.get=function(){var t=this.dk();return(0,$.Ye)(t,this.hfa,this)},$.g.dk=function(){if(this.pm)var t=this.pm;else this.scale.pb(),t=this.jv;return t||[]},$.g.hfa=function(t){return!(0>(t=this.scale.transform(t))||1<t)},$.g.EB=function(t,e,i,n){if(this.jv=null,!this.pm){var s=[],a=this.Pp,o=this.qn;for(a&&(n-i)/wp(a)>this.scale.an()&&($.kl(20,null,[n-i,wp(a)]),a=null,this.qn=4),a||(a=Ws(this,t,e,!0)),t=new $.On(new Date(i)),n=new $.On(new Date(n)),e=0;0>=t.getTime()-n.getTime()&&e<this.scale.an();t.add(a),e++)s.push(t.getTime());this.jv=s,this.qn=o,this.b=a}},$.g.DB=function(t,e,i,n){this.jv=null;var s=[t,e];if(!this.pm){var a=[],o=this.Pp,r=this.qn;o&&(e-t)/wp(o)>this.scale.an()&&($.kl(20,null,[e-t,wp(o)]),o=null,this.qn=4),o||(o=Ws(this,t,e,!1));var l=$.So(t,o,0),h=new $.On(new Date(l));for(i?s[0]=l:l<t&&h.add(o),t=new $.On(new Date(e)),e=0;0>=h.getTime()-t.getTime()&&e<this.scale.an();h.add(o),e++)a.push(h.getTime());n&&(!a.length||a[a.length-1]<t.getTime())&&a.push(s[1]=h.getTime()),this.jv=a,this.qn=r,this.b=o}return s};var jca=[1,2,5,10,20,50,100,200,500,1e3,2e3,5e3,1e4,2e4,3e4,6e4,12e4,3e5,6e5,12e5,18e5,36e5,72e5,108e5,216e5,288e5,432e5,576e5,864e5,1728e5,6048e5,864e6,12096e5,18144e5,24192e5,2628e6,5256e6,7884e6,10512e6,15768e6,31536e6,63072e6],hca=[new $.En(Dn,.001),new $.En(Dn,.001),new $.En(Dn,.001),new $.En(Dn,.005),new $.En(Dn,.005),new $.En(Dn,.01),new $.En(Dn,.02),new $.En(Dn,.04),new $.En(Dn,.1),new $.En(Dn,.2),new $.En(Dn,.5),new $.En(Dn,1),new $.En(Dn,2),new $.En(Dn,5),new $.En(Dn,10),new $.En(Dn,20),new $.En(Dn,30),new $.En(Cn,1),new $.En(Cn,1),new $.En(Cn,5),new $.En(Cn,10),new $.En(Cn,20),new $.En(Cn,30),new $.En(Bn,1),new $.En(Bn,2),new $.En(Bn,2),new $.En(Bn,3),new $.En(Bn,4),new $.En(Bn,8),new $.En(Bn,12),new $.En(An,1),new $.En(An,2),new $.En(An,7),new $.En(An,7),new $.En(An,7),new $.En(An,7),new $.En(zn,1),new $.En(zn,1),new $.En(zn,1),new $.En(zn,2),new $.En(zn,4),new $.En(zn,6)],ica=[new $.En(Dn,.001),new $.En(Dn,.002),new $.En(Dn,.005),new $.En(Dn,.01),new $.En(Dn,.02),new $.En(Dn,.05),new $.En(Dn,.1),new $.En(Dn,.2),new $.En(Dn,.5),new $.En(Dn,1),new $.En(Dn,2),new $.En(Dn,5),new $.En(Dn,10),new $.En(Dn,20),new $.En(Dn,30),new $.En(Cn,1),new $.En(Cn,2),new $.En(Cn,5),new $.En(Cn,10),new $.En(Cn,20),new $.En(Cn,30),new $.En(Bn,1),new $.En(Bn,2),new $.En(Bn,3),new $.En(Bn,6),new $.En(Bn,8),new $.En(Bn,12),new $.En(Bn,16),new $.En(An,1),new $.En(An,2),new $.En(An,7),new $.En(An,10),new $.En(An,14),new $.En(An,21),new $.En(An,28),new $.En(zn,1),new $.En(zn,2),new $.En(zn,3),new $.En(zn,4),new $.En(zn,6),new $.En(yn,1),new $.En(yn,2)];Vs.prototype.F=function(){var t=Vs.u.F.call(this);if(this.pm){for(var e=[],i=0;i<this.pm.length;i++)e.push(this.pm[i].getTime());t.explicit=e}else this.Pp?t.interval=Gn(this.Pp):(0,window.isNaN)(this.qn)||(t.count=this.qn);return t},Vs.prototype.Ie=function(t,e){return!!$.A(e)&&(this.set(e),!0)},Vs.prototype.U=function(t,e){Vs.u.U.call(this,t,e),$.A(t.explicit)?this.set(t.explicit):this.pm=null,this.qn=Math.max(2,Math.ceil($.N(t.count))),this.Pp=$.z(t.interval)?Fn(t.interval):null,this.jv=null};var pF=Vs.prototype,et,ct,at,qF;pF.interval=pF.Mba,pF.count=pF.count,pF.set=pF.set,pF.get=pF.get,pF.getIntervalUnit=pF.dU,pF.getIntervalUnitCount=pF.eU,$.H(Xs,$.V),$.g=Xs.prototype,$.g.ra=6,$.g.Xa=$.ia,$.g.Kr=function(t,e,i){return this.transform(t,i)},$.g.Lz=function(t){return t},$.g.vH=function(){return this.$B},$.g.zk=function(t){return $.Do(t)},$.g.Ne=function(t){return $.p(t)?(t=!!t,this.PD!=t&&(this.PD=t,this.oN(),this.va(2)),this):this.PD},$.g.oN=function(){},$.g.Bg=function(){return this.cs||this.Co(),this.cs++,this},$.g.Hg=function(t){return!!(this.cs=Math.max(this.cs-1,0))||this.IC(!!t)},$.g.Px=function(){return!1},$.g.sD=function(){return 0},$.g.gS=!1,$.g.jn=function(t){return $.p(t)?(t=this.gS?$.zk(EE,t,"none"):"none",this.jY!=t&&(this.jY=t,this.va(6)),this):this.gS?this.jY:"none"},$.g.kx=function(t){return $.p(t)?(t=$.zk(wda,t,"direct"),this.iY!=t&&(this.iY=t,"none"!=this.jn()&&this.va(6)),this):this.iY},$.g.CE=function(t){return Number(t)},$.g.F=function(){var t=Xs.u.F.call(this);return t.type=this.Ma(),t.inverted=this.Ne(),t},$.g.U=function(t,e){Xs.u.U.call(this,t,e),this.Ne(t.inverted)},ct=1,$.bt=8,qF={},qF.linear=ct,qF.log=2,qF["date-time"]=4,qF.ordinal=$.bt,qF["linear-color"]=32,qF["ordinal-color"]=16,at=qF;var rF=Xs.prototype;rF.inverted=rF.Ne,rF.startAutoCalc=rF.Bg,rF.finishAutoCalc=rF.Hg,$.H($.kt,Xs),$.g=$.kt.prototype,$.g.an=function(t){return $.p(t)?(t=$.P(t,1e3,!1),this.cl!=t&&(this.cl=t,this.Kc=!1,this.va(2)),this):this.cl},$.g.uh=function(t){if($.p(t)){t=$.N(t);var e=(0,window.isNaN)(t);return(e!=this.Pn||!e&&t!=this.min)&&(this.Pn=e,this.min=t,this.jt=window.NaN,this.Kc=!1,e&&this.va(4),this.va(2)),this}return this.pb(),this.min},$.g.di=function(t){if($.p(t)){t=$.N(t);var e=(0,window.isNaN)(t);return(e!=this.Nn||!e&&t!=this.max)&&(this.Nn=e,this.max=t,this.Lq=window.NaN,this.Kc=!1,e&&this.va(4),this.va(2)),this}return this.pb(),this.max},$.g.XQ=function(t){return $.p(t)?(t=!!t,this.BF!=t&&(this.BF=t,this.Pn&&(this.Kc=!1,this.va(6))),this):this.BF},$.g.WQ=function(t){return $.p(t)?(t=!!t,this.AF!=t&&(this.AF=t,this.Nn&&(this.Kc=!1,this.va(6))),this):this.AF},$.g.KB=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)&&(0,window.isNaN)(this.jt)||t==this.jt||(this.jt=t,this.min=window.NaN,this.Pn=!0,this.Kc=!1,this.va(4)),this):this.jt},$.g.JB=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)&&(0,window.isNaN)(this.Lq)||t==this.Lq||(this.Lq=t,this.max=window.NaN,this.Nn=!0,this.Kc=!1,this.va(4)),this):this.Lq},$.g.Qs=function(t){return $.p(t)?(t=+t||0,this.HI!=t&&(this.HI=t,this.Pn&&(this.Kc=!1,this.va(2))),this):this.HI},$.g.Os=function(t){return $.p(t)?(t=+t||0,this.BI!=t&&(this.BI=t,this.Nn&&(this.Kc=!1,this.va(2))),this):this.BI},$.g.oN=function(){this.Kc=!1},$.g.Co=function(){this.Aia=this.dA,this.zia=this.cA,this.dA=window.Infinity,this.cA=-window.Infinity,this.Kc=this.DX=!1},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++){var i=+arguments[e];(0,window.isNaN)(i)&&(i=(0,window.parseFloat)(arguments[e])),(0,window.isNaN)(i)||(this.DX=!0,i<this.dA&&(this.dA=i,this.Kc=!1),i>this.cA&&(this.cA=i,this.Kc=!1))}return this},$.g.IC=function(t){var e=this.Aia!=this.dA||this.zia!=this.cA;return e&&(this.Kc=!1,t||this.va(2)),e},$.g.Of=function(){return this.Pn||this.Nn},$.g.transform=function(t){return this.pb(),Number(this.Oq.transform(t))},$.g.pb=function(){this.Kc||(this.Kc=!0,this.dT(),this.sJ(),this.ex())},$.g.sJ=function(){},$.g.ex=function(){this.Oq||(this.Oq=new Ps);var t=this.cK*this.$B;t=[-t,this.$B-t],this.PD&&t.reverse(),this.Oq.xe(t)},$.g.dT=function(){var t=!this.Pn,e=!this.Nn,i="percent"==this.jn();t&&this.Xc(this.min),e&&this.Xc(this.max),this.DX||(this.dA=0,this.cA=i?100:1);var n=t?this.min:this.dA,s=e?this.max:this.cA;if(!t&&n>=this.jt&&(n=this.jt,t=!0),!e&&s<=this.Lq&&(s=this.Lq,e=!0),$.Wm(n,s,1e-6)){if(n==s)var a=.5;else a=n.toExponential().split("e")[1],a=+("1e-"+Math.max(Math.abs(a)+1,5));e?n-=2*a:t?s+=2*a:(n-=a,s+=a)}i&&(t=e=!0),t=this.Nz(n,s,!t,!e,this.GJ,!0),this.min=t.min,this.max=t.max,this.Lx=t.Lx||0},$.g.Nz=function(t,e,i,n,s,a){var o=e-t,r=o*this.HI;return o*=this.BI,{max:n?mt(e,o,s,a,1):e,min:i?mt(t,r,s,a,-1):t}},$.g.Mc=function(t){return this.pb(),this.Oq.Mc(t)},$.g.F=function(){var t=$.kt.u.F.call(this);return t.maximum=this.Nn?null:this.max,t.minimum=this.Pn?null:this.min,t.minimumGap=this.Qs(),t.maximumGap=this.Os(),t.softMinimum=(0,window.isNaN)(this.jt)?null:this.jt,t.softMaximum=(0,window.isNaN)(this.Lq)?null:this.Lq,t.softMaximum=(0,window.isNaN)(this.Lq)?null:this.Lq,t.alignMinimum=this.BF,t.alignMaximum=this.AF,t.maxTicksCount=this.cl,t},$.g.U=function(t,e){$.kt.u.U.call(this,t,e),this.Qs(t.minimumGap),this.Os(t.maximumGap),this.KB(t.softMinimum),this.JB(t.softMaximum),this.uh(t.minimum),this.di(t.maximum),this.XQ(t.alignMinimum),this.WQ(t.alignMaximum),this.an(t.maxTicksCount)};var sF=$.kt.prototype;sF.maxTicksCount=sF.an,sF.minimum=sF.uh,sF.maximum=sF.di,sF.extendDataRange=sF.Xc,$.H($.nt,$.kt),$.g=$.nt.prototype,$.g.zk=function(t){return!$.ps(t)},$.g.Ma=function(){return"date-time"},$.g.Xa=function(t){return this.xh||(this.xh=new Vs(this),$.W(this,"ticks",this.xh),$.K(this.xh,this.li,this)),$.p(t)?(this.xh.N(t),this):this.xh},$.g.yb=function(t){return this.Di||(this.Di=new Vs(this),$.W(this,"minorTicks",this.Di),$.K(this.Di,this.li,this)),$.p(t)?(this.Di.N(t),this):this.Di},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++)$.nt.u.Xc.call(this,Fs(arguments[e]));return this},$.g.ex=function(){$.nt.u.ex.call(this),Qs(this.Oq,[this.min,this.max]),Rs(this.Oq,3)},$.g.sJ=function(){var t=this.Xa().DB(this.min,this.max,this.Pn&&this.BF,this.Nn&&this.AF);this.yb().EB(this.min,this.max,t[0],t[1]),this.Pn&&(this.min=t[0]),this.Nn&&(this.max=t[1])},$.g.li=function(t){$.X(t,2)&&(this.Kc=!1,this.va(2))},$.g.F=function(){var t=$.nt.u.F.call(this);return t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t},$.g.U=function(t,e){$.nt.u.U.call(this,t,e),this.Xa(t.ticks),this.yb(t.minorTicks)},$.g.R=function(){$.sd(this.xh,this.Di),this.Di=this.xh=null,$.nt.u.R.call(this)};var tF=$.nt.prototype;$.E("anychart.scales.dateTime",$.ht),tF.getType=tF.Ma,tF.ticks=tF.Xa,tF.minorTicks=tF.yb,tF.transform=tF.transform,tF.inverseTransform=tF.Mc,tF.extendDataRange=tF.Xc,tF.softMinimum=tF.KB,tF.softMaximum=tF.JB,tF.alignMinimum=tF.XQ,tF.alignMaximum=tF.WQ,tF.minimumGap=tF.Qs,tF.maximumGap=tF.Os,$.H(pt,$.V),pt.prototype.ra=2;var Jda=new $.En(0,0,1),kca=new $.En(0,0,0,1);$.g=pt.prototype,$.g.C5=function(t){if($.p(t)){if("array"===$.ka(t)){for(var e=[],i=0;7>i;i++){t:{var n=t[i];if("object"===$.ka(n)&&"from"in n&&"to"in n){var s=+n.from;if(s<(n=+n.to)&&0<=s&&24>s&&0<n&&24>=n){s={from:s,to:n};break t}}s=null}e.push(s)}t=e.length?e:null}else t=null;if(this.b=t,this.D={},this.o={},this.b)for(t=0;t<this.b.length;t++)this.b[t]||(this.o[String(t)]=!0);else this.o=ot(this.G);return this.va(2),this}return this.b},$.g.HA=function(t){if($.p(t)){if("array"===$.ka(t)){for(var e=[],i=0;i<t.length;i++){t:{var n=t[i];if("object"===$.ka(n)&&"day"in n&&"month"in n){var s=+n.day,a=+n.month;if(!(0,window.isNaN)(s)&&0<=a&&12>a){s={day:s,month:a},"year"in n&&(a=+n.year,(0,window.isNaN)(a)||(s.year=a)),"label"in n&&(s.label=String(n.label)),n=s;break t}}n=null}n&&e.push(n)}t=e.length?e:null}else t=null;if(this.f=t,this.i={UY:{},MS:{}},this.D={},this.f)for(t=0;t<this.f.length;t++)e=(i=this.f[t]).year,i=($.p(e)?e+"-":"")+String(i.month)+"-"+String(i.day),$.p(e)?this.i.MS[i]=!0:this.i.UY[i]=!0;return this.va(2),this}return this.f},$.g.vD=function(t,e){var i=$.Xk(t),n=$.Xk(e),s=[];if((0,window.isNaN)(i)||(0,window.isNaN)(n))return s;i=$.Uo(i,"day",1,i),i=new Date(i);for(var a=(i=new $.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate())).getTime();a<n;){i.add(Jda);var o=i.getTime(),r=o-1e3,l=new Date(a),h=l.getUTCFullYear(),c=l.getUTCMonth(),u=l.getUTCDate(),d=l.getUTCDay();l=($.p(h)?h+"-":"")+c+"-"+u;var p=this.D[l];if(!$.p(p)){var g=!!this.o[d];p={isHoliday:!(!this.i.UY[($.p(void 0)?"undefined-":"")+c+"-"+u]&&!this.i.MS[l]),isWeekend:g,start:a,end:r,workingIntervals:[],notWorkingIntervals:[]},g?p.notWorkingIntervals.push({from:a,to:r}):(a=p,r=d,this.b&&(h=new $.On(h,c,u),u=this.b[r])&&(c=u.from,u=u.to,r=h.getTime(),r=qt(r,h,c,a.notWorkingIntervals),r=qt(r,h,u-c,a.workingIntervals),qt(r,h,24-u,a.notWorkingIntervals))),this.D[l]=p}l=p,s.push(l),a=o}return s},$.g.F=function(){var t=pt.u.F.call(this);return this.b&&!$.Jc(this.b)&&(t.schedule=JSON.parse(JSON.stringify(this.b))),this.f&&!$.Jc(this.f)&&(t.holidays=JSON.parse(JSON.stringify(this.f))),t},$.g.U=function(t,e){pt.u.U.call(this,t,e),"schedule"in t&&this.C5(t.schedule),"holidays"in t&&this.HA(t.holidays)};var uF=pt.prototype;uF.schedule=uF.C5,uF.holidays=uF.HA,uF.getWorkingSchedule=uF.vD,$.H($.st,$.V),$.st.prototype.ra=6;var mca=200,lca=[[{unit:"minute",count:10},{unit:"hour",count:1},{unit:"day",count:1}],[{unit:"hour",count:2},{unit:"day",count:1},{unit:"month",count:1}],[{unit:"day",count:1},{unit:"week",count:1},{unit:"month",count:1}],[{unit:"month",count:1},{unit:"quarter",count:1},{unit:"year",count:1}],[{unit:"quarter",count:1},{unit:"year",count:1},{unit:"year",count:10}]];$.g=$.st.prototype,$.g.Ma=function(){return"gantt"},$.g.dL=ba(7),$.g.Uj=function(){return(0,window.isNaN)(this.$e)&&(0,window.isNaN)(this.Ze)&&(0,window.isNaN)(this.Ph)&&(0,window.isNaN)(this.Oh)},$.g.reset=function(){this.Oh=this.Ph=this.Fj=this.Gj=this.Ze=this.$e=window.NaN,this.Kc=!1},$.g.Jr=function(t,e){return t=$.Xk(t),e=$.Xk(e),this.$e==t&&this.Ze==e||(0,window.isNaN)(e)||(0,window.isNaN)(t)||($.Et(this),this.$e=t,this.Ze=e,this.Kc=!1,this.pb(),this.va(4)),this},$.g.Qm=function(){if(this.Uj())this.m4=!0;else{this.m4=!1;var t=this.bm.isPixels,e=this.am.isPixels;t&&e?wt(this):t?xt(this,!0):e?xt(this,!1):this.uj(),this.$e=this.Gj,this.Ze=this.Fj,this.Kc=!0,this.va(4)}return this},$.g.Vr=function(t,e){var i=1/(t||1.25),n=$.p(e)?e:.5;if($.Et(this),!this.Uj()){var s=this.Ze-this.$e,a=this.$e-Math.round(s*(i-1)*n);i=this.Ze+Math.round(s*(i-1)*(1-n)),6e4>=Math.abs(a-i)&&(a=(i=(this.$e+this.Ze)/2)-3e4,i+=3e4),this.Jr(a,i)}return this},$.g.Wr=function(t,e){var i=t||1.25,n=$.p(e)?e:.5;if($.Et(this),!$.yt(this)||!$.zt(this)){var s=this.$e-Math.round((this.Ze-this.$e)*(i-1)*n);if(i=this.Ze+Math.round((this.Ze-this.$e)*(i-1)*(1-n)),this.uj(),$.Dt(this)){if(n=this.Xq.ob().width,this.bm.isPixels){var a=$.vt(this.bm.value,n);this.Gj=this.Ph-Math.round((a/n||0)*(i-s))}this.am.isPixels&&(a=$.vt(this.am.value,n),this.Fj=this.Oh+Math.round((a/n||0)*(i-s)))}if(s<this.Gj||i>this.Fj){if(s<this.Gj&&i>this.Fj)return this.Qm(),this;s<this.Gj&&this.Jr(this.Gj,i+(this.Gj-s)),i>this.Fj&&this.Jr(s-(i-this.Fj),this.Fj)}else this.Jr(s,i)}return this},$.g.kj=function(t,e,i){if($.Dt(this)&&$.ea(t)&&$.ea(e)){i=this.bm.isPixels;var n=this.am.isPixels;if(i&&n?wt(this):i?xt(this,!0):n&&xt(this,!1),n=this.Oh-this.Ph,(i=e-t)>=this.Fj-this.Gj)this.$e=this.Gj,this.Ze=this.Fj;else{this.$e=Math.min(t,e),this.Ze=Math.max(t,e);var s=$.At(this,n,this.bm),a=$.At(this,n,this.am);s=(0,window.isNaN)(this.$m)?(0,window.isNaN)(this.Ko)?this.Ph-s:Math.min(this.Ko,this.Ph):this.$m,a=(0,window.isNaN)(this.Zm)?(0,window.isNaN)(this.Jo)?this.Oh+a:Math.max(this.Jo,this.Oh):this.Zm,t<s?(this.$e=s,this.Ze=this.$e+i):e>a&&(this.Ze=a,this.$e=this.Ze-i)}this.Gj=s,this.Fj=a,this.Kc=!0,this.Uj()&&(this.QI=!0,this.MI=[t,e]),this.va(4),t=this}else t:{if(this.pb(),$.z(t)){if(0===e){t=this;break t}switch(a=$.zk(yda,i,$.p(void 0)?void 0:"first-visible-date"),s=$.Vo($.Zk(t,"day"),e||1),a){case"first-date":n=this.Ph;break;case"last-date":n=this.Oh,s=s.b(-1);break;case"last-visible-date":n=this.Ze,s=s.b(-1);break;case"first-visible-date":n=this.$e}n=new $.On($.ps(n)),a=$.Xk(n),n.add(s),n=$.Xk(n),s=Math.min(a,n),a=(n=Math.max(a,n))-s}else s=t,n=e,$.p(e)?a=e-t:n=t+(a=this.Ze-this.$e);var o=this.uj();a=Math.min(o.max-o.min,a),n>o.max&&(s=(n=o.max)-a),s<o.min&&(n=(s=o.min)+a),this.Uj()&&(this.QI=!0,this.MI=[t,e,i]),t=this.Jr(s,n)}return t},$.g.Px=function(){return!1},$.g.FA=function(t){$.X(t,2)&&this.va(2)},$.g.sj=function(){return this.pb(),this.Uj()?tt(this):{min:this.$e,max:this.Ze}},$.g.uj=function(){if((0,window.isNaN)(this.Gj))if((0,window.isNaN)(this.$m))if((0,window.isNaN)(this.Ko)){var t=((0,window.isNaN)(this.Zm)?(0,window.isNaN)(this.Jo)?this.Oh:Math.max(this.Oh,this.Jo):this.Zm)-this.Ph;t=$.At(this,t,this.bm),this.Gj=this.Ph-t}else this.Gj=Math.min(this.Ko,this.Ph);else this.Gj=this.$m;return(0,window.isNaN)(this.Fj)&&((0,window.isNaN)(this.Zm)?(0,window.isNaN)(this.Jo)?(t=this.Oh-((0,window.isNaN)(this.$m)?(0,window.isNaN)(this.Ko)?this.Ph:Math.min(this.Ph,this.Ko):this.$m),t=$.At(this,t,this.am),this.Fj=this.Oh+t):this.Fj=Math.max(this.Jo,this.Oh):this.Fj=this.Zm),this.Uj()?tt(this):{min:this.Gj,max:this.Fj}},$.g.uh=function(t){return $.p(t)&&(t=$.Xk(t),this.$m!=t&&(this.$m=t,this.Gj=window.NaN,this.Kc=!1,this.va(4))),this.$m},$.g.di=function(t){return $.p(t)&&(t=$.Xk(t),this.Zm!=t&&(this.Zm=t,this.Fj=window.NaN,this.Kc=!1,this.va(4))),this.Zm},$.g.KB=function(t){return $.p(t)&&(t=$.Xk(t),this.Ko!=t&&(this.Ko=t,this.Gj=window.NaN,this.Kc=!1,this.va(4))),this.Ko},$.g.JB=function(t){return $.p(t)&&(t=$.Xk(t),this.Jo!=t&&(this.Jo=t,this.Fj=window.NaN,this.Kc=!1,this.va(4))),this.Jo},$.g.Gla=function(t){return $.p(t)?(this.eQ!==t&&(this.eQ=!!t,this.Kc=!1,this.va(4)),this):this.eQ},$.g.Fla=function(t){return $.p(t)?(this.gF!==t&&(this.gF=!!t,this.Kc=!1,this.va(4)),this):this.gF},$.g.KT=function(t){return $.p(t)?(t=$.Za(t,1,12),this.Qv!=t&&(this.Qv=t,this.Kc=!1,this.va(4)),this):this.Qv},$.g.JT=function(t){return $.p(t)?(t=+t,(0,window.isNaN)(t)||this.XG==t||(this.XG=t,this.Kc=!1,this.va(4)),this):this.XG},$.g.transform=function(t){return $.Ft(this,t)},$.g.Mc=function(t){return $.Gt(this,t)},$.g.vz=function(t){return $.p(t)?((t=rt(t)).length==this.jd.length&&(0,$.lD)(t,(function(t,e){var i=this.jd[e].levels;return t.levels.length==i.length&&(0,$.lD)(t.levels,(function(t,e){return t.unit==i[e].unit&&t.count==i[e].count}))}),this)||(this.jd=t,this.Kc=!1,this.va(516)),this):(0,$.Wa)(this.jd,(function(t){return(0,$.Wa)(t.levels,(function(t){return{unit:t.unit,count:t.count}}))}))},$.g.an=function(t){return $.p(t)?(t=$.P(t,1e3,!1),this.cl!=t&&(this.cl=t,this.Kc=!1,this.va(516)),this):this.cl},$.g.calendar=function(t){return $.p(t)?(this.je!=t&&(this.je&&$.kr(this.je,this.FA,this),(this.je=t)&&$.K(this.je,this.FA,this),this.va(2)),this):(this.je||(this.je=new pt,$.K(this.je,this.FA,this),this.va(2)),this.je)},$.g.Qs=function(t,e){if($.p(t)){var i=Bt(t,e);return Ct(this.bm,i)||(this.bm=i,this.Gj=window.NaN,this.Kc=!1,this.va(4)),this}return this.bm.isPixels?this.bm:this.bm.value},$.g.Os=function(t,e){if($.p(t)){var i=Bt(t,e);return Ct(this.am,i)||(this.am=i,this.Fj=window.NaN,this.Kc=!1,this.va(4)),this}return this.am.isPixels?this.am:this.am.value},$.g.pb=function(){if(!this.Kc&&!this.Uj()){this.Kc=!0;var t=this.uj(),e=t.min;if(t=t.max,(0,window.isNaN)(e)?(0,window.isNaN)(this.$e)||(this.Ph=this.$e):(0,window.isNaN)(this.$e)?this.$e=e:this.$e=Math.max(this.$e,e),(0,window.isNaN)(t)?(0,window.isNaN)(this.Ze)||(this.Oh=this.Ze):(0,window.isNaN)(this.Ze)?this.Ze=t:this.Ze=Math.min(this.Ze,t),this.$e>this.Ze){var i=this.$e-this.Ze;this.$e=Math.max(this.Ze,e),this.Ze=Math.min(this.$e+i,t)}}},$.g.Fn=function(t,e,i,n,s){e=s||this.sj(),s=(t=this.sj()).min;var a=t.max;t=new $.On(new Date(s)),s=a-s;do{a=$.Vo(i,n);var o=t.clone();if(t.add(a),(a=Math.ceil(s/(t.getTime()-o.getTime())))>this.cl)switch(i){case"millisecond":i="second",n=1;break;case"second":59>n?n++:(n=1,i="minute");break;case"minute":59>n?n++:(n=1,i="hour");break;case"hour":23>n?n++:(n=1,i="day");break;case"day":29>n?n++:(n=1,i="month");break;case"month":11>n?n++:(n=1,i="year");break;default:n++}}while(a>this.cl);if(t="week"===i&&(this.eQ||this.gF)){s=e.min,a=n;var r=this.Qv,l=this.gF,h=new Date(s),c=1!==r;o=h.getMonth();var u=h=h.getFullYear();l?r=o:c?(--r,0<=o&&o<r&&(u=h-1)):r=0,s=$.Oo(s,6048e5*a,Date.UTC(u,r,1))}else s=$.Uo(e.min,i,n,2e3);if(a=s,n=$.Vo(i,n),e=e.max,s=[],1<this.Qv&&("year"===i||"semester"===i||"quarter"===i)){if(1<(i=this.Qv)?(o=new Date(a),i=Date.UTC(o.getUTCFullYear(),o.getUTCMonth()+i-1,o.getUTCDate(),o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds())):i=a,i>a){o=n.b(-1);var d=new $.On(new Date(i));do{d.add(o),i=d.getTime()}while(i>a)}}else d=new $.On(new Date(a));for(i=d.getTime(),a=n;i<e;)n=a,t&&(h=11===(o=new Date(i)).getMonth(),u=this.gF,r=this.Qv-1,l=o.getFullYear(),c=o.getMonth(),u?h?(h=0,r=l+1):(h=c+1,r=l):0===r?(h=0,r=l+1):(h=r,r=0<=c&&c<r?l:l+1),n=(o=(Date.UTC(r,h,1)-o)/1e3)<60*(60*(24*n.xg+n.Th)+n.Bj)+n.wh?new $.En(0,0,0,0,0,o):n),o=i,d.add(n),i=d.getTime(),s.push({start:o,end:i});return s},$.g.vD=function(){if(this.je){this.pb();var t=this.sj();return this.je.vD(t.min,t.max)}return[]},$.g.F=function(){var t=$.st.u.F.call(this);if((0,window.isNaN)(this.$e)||(t.visibleMinimum=this.$e),(0,window.isNaN)(this.Ze)||(t.visibleMaximum=this.Ze),(0,window.isNaN)(this.$m)||(t.minimum=this.$m),(0,window.isNaN)(this.Zm)||(t.maximum=this.Zm),(0,window.isNaN)(this.Ko)||(t.softMinimum=this.Ko),(0,window.isNaN)(this.Jo)||(t.softMaximum=this.Jo),(0,window.isNaN)(this.Ph)||(t.dataMinimum=this.Ph),(0,window.isNaN)(this.Oh)||(t.dataMaximum=this.Oh),t.minimumGap=this.bm,t.maximumGap=this.am,t.maxTicksCount=this.cl,t.zoomLevels=this.vz(),1<this.Qv&&(t.fiscalYearStartMonth=this.Qv),this.XG&&(t.fiscalYearOffset=this.XG),this.je){var e=this.je.F();$.Jc(e)||(t.calendar=e)}return t},$.g.U=function(t,e){$.st.u.U.call(this,t,e),this.Qs(t.minimumGap),this.Os(t.maximumGap),"minimum"in t&&this.uh(t.minimum),"maximum"in t&&this.di(t.maximum),"softMinimum"in t&&this.KB(t.softMinimum),"softMaximum"in t&&this.JB(t.softMaximum);var i=!1;"dataMinimum"in t&&(this.Ph=t.dataMinimum,i=!0),"dataMaximum"in t&&(this.Oh=t.dataMaximum,i=!0),"visibleMinimum"in t&&(this.$e=t.visibleMinimum,i=!0),"visibleMaximum"in t&&(this.Ze=t.visibleMaximum,i=!0),"zoomLevels"in t&&this.vz(t.zoomLevels),"fiscalYearStartMonth"in t&&this.KT(t.fiscalYearStartMonth),"fiscalYearOffset"in t&&this.JT(t.fiscalYearOffset),"maxTicksCount"in t&&this.an(t.maxTicksCount),"calendar"in t&&this.calendar().U(t.calendar),i&&(this.Kc=!1,this.pb(),this.va(4))};var vF=$.st.prototype;vF.getRange=vF.sj,vF.getTotalRange=vF.uj,vF.minimum=vF.uh,vF.maximum=vF.di,vF.softMinimum=vF.KB,vF.softMaximum=vF.JB,vF.minimumGap=vF.Qs,vF.maximumGap=vF.Os,vF.fiscalYearStartMonth=vF.KT,vF.fiscalYearOffset=vF.JT,vF.transform=vF.transform,vF.inverseTransform=vF.Mc,vF.zoomLevels=vF.vz,vF.maxTicksCount=vF.an,vF.calendar=vF.calendar,vF.weeksEndWithYear=vF.Gla,vF.weeksCycleMonthly=vF.Fla,$.H($.It,$.V),$.g=$.It.prototype,$.g.ra=2,$.g.Jl=window.NaN,$.g.lh=4,$.g.qm=6,$.g.Il=null,$.g.Hl=null,$.g.Vc=0,$.g.Fm="linear",$.g.RZ=function(t){return $.p(t)?(this.b!=t&&(this.b=t,"logarithmic"!=this.Fm&&this.va(2)),this):this.b},$.g.Oba=function(t){return $.p(t)?(this.Jl!=t&&(0>=(t=$.N(t))?(this.lh=4,this.qm=6,this.Jl=window.NaN):(this.qm=this.lh=window.NaN,this.Jl=+t),this.Hl=this.Il=null,this.va(2)),this):this.Jl},$.g.count=function(t,e){return $.p(t)?(this.lh!=t&&(this.Jl=window.NaN,this.lh=Math.ceil($.N(t)),this.qm=Math.ceil($.N(e)),2<=this.lh||(this.lh=4),this.qm>=this.lh||(this.qm=this.lh),this.Hl=this.Il=null,this.va(2)),this):[this.lh,this.qm]},$.g.eF=ba(9),$.g.XF=function(t){return $.p(t)?(t=+t||0,this.Vc!=t&&(this.Vc=t,this.Hl=null,this.Il||this.va(2)),this):this.Vc},$.g.set=function(t){return $.Ta(this.Il,t)||(this.Jl=this.qm=this.lh=window.NaN,this.Il=$.Ja(t,0),$.Ka(this.Il),$.Pa(this.Il,$.po),this.Hl=null,this.va(2)),this},$.g.get=function(){var t=this.dk();return(0,$.Ye)(t,(function(t){return 0<=(t=this.transform(t))&&1>=t}),this.qa)},$.g.dk=function(){if(this.Il)var t=this.Il;else this.qa.pb(),t=this.Hl;return t||[]},$.g.mode=function(t){return $.p(t)?(t="log"==(t=String(t).toLowerCase())||"logarithmic"==t?"logarithmic":"linear",this.Fm!=t&&(this.Hl=null,this.Fm=t,this.Il||this.va(2)),this):this.Fm},$.g.DB=function(t,e,i,n,s,a){return this.Il?(this.Hl=null,s=[t,e],i&&(s[0]=Math.min(t,this.Il[0]||0)),n&&(s[1]=Math.max(e,this.Il[this.Il.length-1]||0))):(t="logarithmic"==this.Fm?nca(this,t,e,s||10,a||0,!!i,!!n):Jt(this,t,e,!!i,!!n,this.b,this.Vc),this.Hl=t.Xa,s=t.result),s},$.g.EB=function(t,e,i,n,s){if(this.Il)this.Hl=null;else if(this.Hl?this.Hl.length=0:this.Hl=[],!(2>t.length)){e=e||10;var a="logarithmic"==this.Fm,o=a?this.R$:this.Nba,r=t.length-1,l=this.Jl,h=this.lh;if(!(0,window.isNaN)(this.Jl)){var c=t[r],u=t[0];a&&(u=$.Xm(u,e),c=$.Xm(c,e)),(c-u)/this.Jl>this.qa.an()&&($.kl(20,null,[c-u,this.Jl]),this.Jl=window.NaN,this.lh=4)}for($.p(i)?(u=t[0],c=t[1],o.call(this,u,c,i,c,this.lh,e,s||0,!0),u=1):u=0,$.p(n)&&r--,i=u;i<=r-1;i++)u=t[i],c=t[i+1],o.call(this,u,c,u,c,this.lh,e,s||0);$.p(n)&&(u=t[r],c=t[r+1],o.call(this,u,c,u,n,this.lh,e,s||0)),this.Jl=l,this.lh=h}},$.g.Nba=function(t,e,i,n,s,a,o,r){Kt(this,t,e,Lt(this,i,n,s),this.Hl[this.Hl.length-1],this.Hl,r)},$.g.R$=function(t,e,i,n,s,a,o){function r(t){return 0>t?-l(-t+o-1):t?l(t+o-1):0}function l(t){return Ym(a,t)}var h=$.Xm(Math.abs(i),a),c=$.Xm(Math.abs(n),a),u=$.Xm(Math.abs(t),a),d=$.Xm(Math.abs(e),a);n*=i,i=!1,0<n?0<t?r=l:(t=c,c=h,h=t,t=d,d=u,u=t,r=function(t){return-l(t)},i=!0):(u=-(u-o+1),d-=o-1,h=-(h-o+1),c-=o-1,n||(e?u=h=0:d=c=0)),s=Kt(this,u,d,Lt(this,h,c,s),window.NaN),s=(0,$.Wa)(s,r),i&&s.reverse(),this.Hl[this.Hl.length-1]==s[0]&&s.shift(),this.Hl=$.Ga(this.Hl,s)},$.g.F=function(){var t=$.It.u.F.call(this);return t.mode=this.Fm,t.base=this.Vc,t.allowFractional=this.b,this.Il?t.explicit=this.Il:(this.lh==this.qm?(0,window.isNaN)(this.lh)||(t.count=this.lh):((0,window.isNaN)(this.lh)||(t.minCount=this.lh),(0,window.isNaN)(this.qm)||(t.maxCount=this.qm)),(0,window.isNaN)(this.Jl)||(t.interval=this.Jl)),t},$.g.Ie=function(t,e){return!!$.A(e)&&(this.set(e),!0)},$.g.U=function(t,e){$.It.u.U.call(this,t,e),this.mode(t.mode),this.XF(t.base),this.Il=t.explicit||null,this.lh=$.N(t.count)||$.N(t.minCount)||window.NaN,this.qm=$.N(t.count)||$.N(t.maxCount)||window.NaN,this.Jl=$.N(t.interval)||window.NaN,this.RZ(t.allowFractional),this.Il?this.lh=this.qm=this.Jl=window.NaN:this.Jl?this.lh=this.qm=window.NaN:(this.lh=Math.ceil($.N(this.lh)),this.qm=Math.ceil($.N(this.qm)),2<=this.lh||(this.lh=4),this.qm>=this.lh||(this.qm=this.lh))};var wF=$.It.prototype;wF.interval=wF.Oba,wF.allowFractional=wF.RZ,wF.count=wF.count,wF.base=wF.XF,wF.set=wF.set,wF.get=wF.get,wF.mode=wF.mode,$.H($.Mt,$.kt),$.g=$.Mt.prototype,$.g.pL="none",$.g.sS="first-visible",$.g.Ma=function(){return"linear"},$.g.CE=function(t,e){for(var i=this.Xa().dk(),n=0,s=0;s<i.length-1;s++)n=Math.max(n,$.Um($.Vm(i[s+1]-i[s])));return $.Tm(Number(t),n+((0,window.isNaN)(e)?0:Number(e)))},$.g.Xa=function(t){return this.xh||(this.xh=this.ol(),$.W(this,"ticks",this.xh)),$.p(t)?(this.xh.N(t),this):this.xh},$.g.yb=function(t){return this.Di||(this.Di=this.ol(),$.W(this,"minorTicks",this.Di),this.Di.ka(),this.Di.count(5),this.Di.da(!1)),$.p(t)?(this.Di.N(t),this):this.Di},$.g.rY=function(t){return $.p(t)?((t=!!t)!=this.GJ&&(this.GJ=t,this.Pn||this.Nn)&&(this.Kc=!1,this.va(4)),this):this.GJ},$.g.ex=function(){$.Mt.u.ex.call(this),Qs(this.Oq,[this.min,this.max])},$.g.sJ=function(){var t=this.Pn&&this.min!=this.jt&&this.BF,e=this.Nn&&this.max!=this.Lq&&this.AF;t=this.Xa().DB(this.min,this.max,t,e,this.yw,this.Lx||0),(0,window.isNaN)(t[4])||(this.Lx=t[4]),this.Pn&&(this.min=t[0]),this.Nn&&(this.max=t[1]),e=this.yb();var i=this.Xa().dk();e.EB(i,this.yw,t[2],t[3],this.Lx)},$.g.li=function(t){$.X(t,2)&&(this.Kc=!1,this.va(2))},$.g.ol=function(){var t=new $.It(this);return $.K(t,this.li,this),t},$.g.Vz=function(t){if($.p(t)){if(t=$.zk(EE,t,"none"),this.pL!=t){switch(this.pL=t,this.pL){case"none":this.SK=this.L3;break;case"value":this.SK=this.P3;break;case"percent":this.SK=this.M3}this.va(6)}return this}return this.pL},$.g.x0=function(t){return $.p(t)?(t=$.Yk(t),this.sS!=t&&(this.sS=t,this.va(6)),this):this.sS},$.g.Lz=function(t,e){return this.SK(t,e)},$.g.L3=function(t){return t},$.g.P3=function(t,e){return $.N(t)-e},$.g.M3=function(t,e){return($.N(t)-e)/Math.abs(e||window.NaN)*100},$.g.F=function(){var t=$.Mt.u.F.call(this);return t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t.stackMode=this.jn(),t.stackDirection=this.kx(),t.stickToZero=this.rY(),t.comparisonMode=this.Vz(),t},$.g.U=function(t,e){$.Mt.u.U.call(this,t,e),this.Xa(t.ticks),this.yb(t.minorTicks),this.jn(t.stackMode),this.kx(t.stackDirection),this.rY(t.stickToZero),this.Vz(t.comparisonMode)},$.g.R=function(){$.sd(this.xh,this.Di),this.Di=this.xh=null,$.Mt.u.R.call(this)};var xF=$.Mt.prototype;$.E("anychart.scales.linear",$.ft),xF.transform=xF.transform,xF.inverseTransform=xF.Mc,xF.getType=xF.Ma,xF.ticks=xF.Xa,xF.minorTicks=xF.yb,xF.stackMode=xF.jn,xF.stackDirection=xF.kx,xF.stickToZero=xF.rY,xF.softMinimum=xF.KB,xF.softMaximum=xF.JB,xF.alignMinimum=xF.XQ,xF.alignMaximum=xF.WQ,xF.minimumGap=xF.Qs,xF.maximumGap=xF.Os,xF.comparisonMode=xF.Vz,xF.compareWith=xF.x0,$.H(Nt,$.Mt),$.g=Nt.prototype,$.g.qI=function(t){return $.p(t)?((t=(0,window.isNaN)(+t)?this.yw:+t)!=this.yw&&(this.yw=t,this.va(2)),this):this.yw},$.g.Ma=function(){return"log"},$.g.ex=function(){Nt.u.ex.call(this);var t=this.min,e=this.max,i=this.qI(),n=$.Vm($.Xm(Math.abs(t),i),6),s=$.Vm($.Xm(Math.abs(e),i),6),a=t*e,o=this.Lx;i=Ym(i,o),0<a?(a=Ss[Os](n,s),0>e?(t=[t,-i,i,-t],n=[0,a(o),a(o-2),a(o-2-n)]):(t=[-e,-i,i,e],n=[a(o-2-s),a(o-2),a(o),1])):0>a?(t=[t,-i,i,e],n=[0,(n-o)/(s=s-o+n-o+2),(n-o+2)/s,1]):(s=s-o+n-o+1,e?(t=[-e,-i,i,e],n=[-(s+1)/s,-1/s,1/s,1]):(t=[t,-i,i,-t],n=[0,(s-1)/s,(s+1)/s,(s+s+1)/s])),o=this.Oq.xe(),a=Ts[Os](o[0],o[1]),n=(0,$.Wa)(n,(function(t){return $.Vm(t)})),Qs(this.Oq,t),this.Oq.xe((0,$.Wa)(n,a)),Rs(this.Oq,[2,Os,2])},$.g.Nz=function(t,e,i,n,s,a){s=this.qI();var o=$.Xm(Math.abs(t),s),r=$.Xm(Math.abs(e),s),l=Math.min(Math.floor(o),Math.floor(r),0);if(i||n){var h=t*e;0<h?0<t?i=Nt.u.Nz.call(this,o,r,i,n,!1,!1):(n=(i=Nt.u.Nz.call(this,r,o,n,i,!1,!1)).max,i.max=i.min,i.min=n):0>h?(2>r-l+o-l&&l--,(i=Nt.u.Nz.call(this,-(o-(l-1)),r-(l-1),i,n,!1,!1)).min=-i.min+l-1,i.max+=l-1):e?(i=Nt.u.Nz.call(this,0,r-(l-1),!1,n,!1,!1)).max+=l-1:(i=Nt.u.Nz.call(this,-(o-(l-1)),0,i,!1,!1,!1)).min=-i.min+l-1,i={max:Ym(s,i.max)*$.fb(e),min:Ym(s,i.min)*$.fb(t),Lx:l},a&&(i.min=$.Vm(i.min),i.max=$.Vm(i.max))}else i={min:t,max:e,Lx:l};return i},$.g.F=function(){var t=Nt.u.F.call(this);return t.logBase=this.qI(),t},$.g.U=function(t,e){Nt.u.U.call(this,t,e),this.qI(t.logBase)};var yF=Nt.prototype;$.E("anychart.scales.log",$.gt),yF.getType=yF.Ma,yF.transform=yF.transform,yF.inverseTransform=yF.Mc,yF.logBase=yF.qI,$.H($.Ot,$.V),$.g=$.Ot.prototype,$.g.ra=2,$.g.Ex=window.NaN,$.g.Wf=null,$.g.Iz=null,$.g.jq=null,$.g.Dx=null,$.g.Ok=null,$.g.Jz=100,$.g.IK=function(t){return $.p(t)?(t=$.P(t,window.NaN),(0,window.isNaN)(t)||this.Ex==t||(this.Ex=t,this.Jz=window.NaN,this.Ok=this.Dx=this.jq=this.Iz=null,this.va(2)),this):this.Ex},$.g.jW=function(t){return $.p(t)?(t=$.P(t,window.NaN),(0,window.isNaN)(t)||this.Jz==t||(this.Jz=t,this.Ex=window.NaN,this.Ok=this.Dx=this.jq=this.Iz=null,this.va(2)),this):this.Jz},$.g.set=function(t){return $.Ta(this.jq,t)||(this.jq=$.Ha(t),this.jq=(0,$.Wa)(this.jq,(function(t){return $.N(t)})),$.Pa(this.jq),$.Ka(this.jq),this.jq[0]=0,this.Ok=this.Dx=this.Iz=null,this.va(2)),this},$.g.names=function(t){if($.p(t))return this.Wf!=t&&(this.Wf=t,this.va(2)),this;var e;if(t=this.dk(),this.Wf&&this.Wf.length<t.length||!this.Ok){var i=this.scale.names();for(this.Ok=[],e=0;e<t.length;e++){var n=$.A(t[e])?t[e][0]:t[e],s=this.scale.Yv(n);(0,window.isNaN)(s)?this.Ok.push(n):this.Ok.push(i[s])}}if(this.Wf)for(;this.Wf.length<t.length;)this.Wf.push(this.Ok[this.Wf.length]);for(n=this.Wf||this.Ok,i=Math.min(n.length,t.length),s=[],e=0;e<i;e++){var a=t[e];if($.A(a)){var o=a[0];a=a[1]}else o=a;o=this.scale.transform(o,0),a=this.scale.transform(a,1),0>o&&0>a||1<o&&1<a||s.push(n[e])}return s},$.g.get=function(){return(0,$.Ye)(this.dk(),(function(t){if($.A(t)){var e=t[0];t=t[1]}else e=t;return e=this.transform(e,0),t=this.transform(t,1),!(0>e&&0>t||1<e&&1<t)}),this.scale)},$.g.dk=function(){return this.Iz?this.Iz:this.jq?this.Iz=this.dW(this.jq):(this.Dx||(this.Dx=this.dW(this.j0())),this.Dx||[])},$.g.j0=function(){for(var t=this.scale.values().length,e=(0,window.isNaN)(this.Ex)?Math.ceil(t/this.Jz)||1:this.Ex,i=[],n=0;n<t;n+=e)i.push(n);return i},$.g.dW=function(t){var e=t.length||0,i=this.scale.values(),n=i.length;if(!e||!n)return[];for(var s=[],a=!1,o=0;o<e&&!a;o++){var r=t[o],l=t[o+1];(0,window.isNaN)(l)||l>=n?(l=n-1,a=!0):l--,s.push(r==l?i[r]:[i[r],i[l]])}return s},$.g.eF=ba(8),$.g.F=function(){var t=$.Ot.u.F.call(this);return this.jq?t.explicit=this.jq:(0,window.isNaN)(this.Jz)?(0,window.isNaN)(this.Ex)||(t.interval=this.Ex):t.maxCount=this.Jz,this.Wf&&(t.names=this.Wf),t},$.g.Ie=function(t,e){return!!$.A(e)&&(this.set(e),!0)},$.g.U=function(t,e){$.Ot.u.U.call(this,t,e),"explicit"in t&&t.explicit?this.set(t.explicit):"interval"in t?this.IK(t.interval):"maxCount"in t&&this.jW(t.maxCount),this.Wf=t.names||null,this.Ok=this.Dx=null};var zF=$.Ot.prototype;zF.interval=zF.IK,zF.maxCount=zF.jW,zF.set=zF.set,zF.get=zF.get,zF.names=zF.names,$.H($.Qt,Xs),$.g=$.Qt.prototype,$.g.Ma=function(){return"ordinal"},$.g.zk=function(t){return!$.p(t)},$.g.Xa=function(t){return this.mb||(this.mb=new $.Ot(this),$.W(this,"ticks",this.mb),$.K(this.mb,this.li,this)),$.p(t)?(this.mb.N(t),this):this.mb},$.g.values=function(t,e){if(!$.p(t))return this.ih;if(null===t)this.UF||(this.UF=!0,this.va(4));else{this.UF=!1;var i=$.A(t);this.Co(),i&&t.length?this.Xc.apply(this,t):this.Xc.apply(this,arguments),this.IC(!0)&&this.va(6)}return this},$.g.names=function(t){if($.p(t)){if(null===t)this.Wf=[];else if($.A(t))this.Wf=$.Ha(t);else{if(!$.z(t)||this.Wf==t)return this;this.Wf=t}return this.Sn=null,$.Pt(this.Xa()),this.va(2),this}if($.A(this.Wf)){if(this.Sn||(this.Sn=$.Ha(this.Wf)),this.Sn.length<this.ih.length)for(;this.Sn.length!=this.ih.length;)this.Sn.push(this.ih[this.Sn.length]);return this.Sn}return this.Ok||[]},$.g.Px=function(){if(!this.Or.length)return!1;for(var t=1;t<this.Or.length&&this.Or[t]==this.Or[0];t++);return t!=this.Or.length},$.g.MY=function(t){if($.p(t))return $.Rt(this,t),this.WR=!this.Or.length,this;if(this.Ww.length!=this.ih.length){for(var e=t=this.Ww.length=0,i=Math.min(this.Or.length,this.ih.length),n=!1,s=0;s<i;s++){var a=$.N(this.Or[s]);0<=a?(t+=a,e++,this.Ww.push(a)):(n=!0,this.Ww.push(void 0))}if(i<this.ih.length||n)for(t=0<e?t/e:1,e=0;e<this.ih.length;e++)this.Ww[e]||(this.Ww[e]=t)}return this.Ww},$.g.Yv=function(t){return t=+this.XB[$.qo(t)],(0,window.isNaN)(t)?window.NaN:t},$.g.Co=function(){this.s4=this.ih,this.ih=[],this.XB={},this.Sn=this.Ok=null,this.Ww.length=0,this.oz.length=0,this.mb&&$.Pt(this.mb)},$.g.IC=function(t){var e=!$.Ta(this.s4,this.ih);return e&&(this.mb&&$.Pt(this.mb),t||this.va(2)),e},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++){var i=arguments[e],n=$.qo(i);$.p(this.XB[n])||(this.XB[n]=this.ih.length,this.ih.push(i))}return this},$.g.Of=function(){return this.UF},$.g.sD=function(){return 1/this.ih.length*this.vH()},$.g.mode=function(t){return $.p(t)?(t=$.zk(Hda,t,"discrete"),this.Fm!=t&&(this.Fm=t,this.va(6)),this):this.Fm},$.g.transform=function(t,e){var i=this.Yv(t);if((0,window.isNaN)(i))return window.NaN;if(this.Px())i=(e||0)*$.St(this)[i]+this.YJ[i];else{var n=this.ih.length;i=i/n+(e||0)/n,"continuous"===this.Fm&&(i=$.Za((i*n-.5)/(n-1),0,1))}return n=(i-this.cK)*this.$B,this.PD?1-n:n},$.g.Mc=function(t){if(t=Zs(this,t),this.Px()){$.St(this);for(var e=1;e<this.YJ.length&&!(t<=this.YJ[e]);e++);t=e-1}else"continuous"===this.Fm&&(t=(t*((e=this.ih.length)-1)+.5)/e),t=$.Za(Math.ceil(t*this.ih.length)-1,0,this.ih.length-1);return this.ih[t]},$.g.li=function(t){$.X(t,2)&&this.va(2)},$.g.F=function(){var t=$.Qt.u.F.call(this);return this.UF||(t.values=this.values()),t.ticks=this.Xa().F(),this.Wf.length&&(t.names=this.Wf),!this.WR&&this.Px()&&(t.weights=this.Or),t.mode=this.Fm,t},$.g.U=function(t,e){$.Qt.u.U.call(this,t,e),this.values(t.values),this.Xa(t.ticks),this.names(t.names),this.MY(t.weights),this.mode(t.mode)},$.g.R=function(){$.qd(this.mb),$.Qt.u.R.call(this)};var AF=$.Qt.prototype;$.E("anychart.scales.ordinal",$.it),AF.getType=AF.Ma,AF.transform=AF.transform,AF.inverseTransform=AF.Mc,AF.ticks=AF.Xa,AF.values=AF.values,AF.names=AF.names,AF.extendDataRange=AF.Xc,AF.weights=AF.MY,$.g=Ut.prototype,$.g.mapping=function(t){if($.p(t)){if($.C(t))for(var e in this.Zc.length=0,t){var i=t[e];$.ea(i)&&(this.Zc[i]=e)}return this}return this.Zc},$.g.getData=function(){return this.la},$.g.Tw=function(){this.la.push(this.f),this.f={},this.b=!1},$.g.fX=function(t,e){var i=this.Zc[t];i=$.p(i)?i:"column"+t,null===e||(this.f[i]=e),this.b=!0},$.g.start=function(){this.la=[],this.f={},this.b=!1},$.g.Kd=$.ia,$.g.AK=function(){this.b&&this.Tw()},$.g=Vt.prototype,$.g.V0=function(){return!0},$.g.Y0=function(){return!0},$.g.reset=function(){return this.f.length=1,this.f[0]=-1,this.b=void 0,this.o=-1,this},$.g.current=function(){return this.b},$.g.Dfa=function(){return this.o},$.g.get=function(t){if(this.b)return this.b.get(t)},$.g.set=function(t,e){return this.b&&this.b.set(t,e),this},$.g.j=function(t,e){return 1<arguments.length?(this.b&&this.b.j(t)!=e&&this.b.j(t,e),this):this.b?this.b.j(t):void 0},$.g.bO=function(t){return $.p(t)?($.D(t)?this.D=t:this.D=this.V0,this):this.D},$.g.S6=function(t){return $.p(t)?($.D(t)?this.i=t:this.i=this.Y0,this):this.i},$.g.advance=function(){var t=Wt(this,Xt(this));return t&&(this.b=t),!!t},$.g.uC=function(){this.reset();for(var t=[];this.advance();)t.push(this.current());return t};var BF=Vt.prototype;BF.reset=BF.reset,BF.current=BF.current,BF.get=BF.get,BF.set=BF.set,BF.meta=BF.j,BF.getDepth=BF.Dfa,BF.advance=BF.advance,BF.toArray=BF.uC,BF.nodeYieldCondition=BF.bO,BF.traverseChildrenCondition=BF.S6,$.H($.Yt,$.V),$.g=$.Yt.prototype,$.g.ra=48|$.V.prototype.ra,$.g.oO=function(t){var e={};$.Sc(e,t),e.dataItem&&$.J(e.dataItem,$.du)&&(e.dataItem=nu(e.dataItem,this)),this.dispatchEvent(e)},$.g.oja=function(t){this.va(t.f)},$.g.pr=function(){return this.Zc},$.g.aw=function(){return new Vt(this)},$.g.search=function(t,e,i){return(t=this.Eo(t,e,i)).length?1==t.length?t[0]:t:null},$.g.Eo=function(t,e,i){for(t=this.Zc[t]||t,t=this.Ld.Eo(t,e,i),e=[],i=0;i<t.length;i++)e.push(nu(t[i],this));return e},$.g.filter=function(t){var e=this.aw();return e.bO(t),e.uC()},$.g.Yr=function(t,e,i){return this.Ld.Yr(t,e,i),this},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){return this.Ld.Eg(t,e),this.xd(e)},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){return(t=this.Ld.Cj(t))?nu(t,this):null},$.g.Gi=function(){return this.Ld.Gi(),this},$.g.Kf=function(t){return this.Ld.Kf(t)},$.g.Sl=function(){for(var t,e=this.Ld.bc(),i=[],n=0;n<e;n++)t=this.Ld.xd(n),i.push(nu(t,this));return i},$.g.Uv=function(){return this.Sl()},$.g.bc=function(){return this.Ld.bc()},$.g.xd=function(t){if(t=this.Ld.xd(t))return nu(t,this)},$.g.F=function(){var t=this.Ld.F();return t.mapping=this.Zc,t},$.g.xB=function(t){return(t=this.Ld.xB(t)).mapping=this.Zc,t},$.g=$.$t.prototype,$.g.Pq=function(){return this.Tk.Pq()},$.g.ND=ba(11),$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){return this.Tk.Eg(t,e),this},$.g.remove=function(){return this.ee?this.ee.removeChild(this):this.Su.removeChild(this),this},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){return(t=this.Tk.Cj(t))?nu(t,this.Su):null},$.g.Gi=function(){return this.Tk.Gi(),this},$.g.Kf=function(t){return this.Tk.Kf(t)},$.g.Sl=function(){for(var t,e=this.Tk.bc(),i=[],n=0;n<e;n++)t=this.Tk.xd(n),i.push(nu(t,this.Su));return i},$.g.Uv=function(){return this.Sl()},$.g.bc=function(){return this.Tk.bc()},$.g.xd=function(t){if(t=this.Tk.xd(t))return nu(t,this.Su)},$.g.get=function(t){if(arguments.length){var e=this.Su.pr(),i=arguments[0],n=[];return $.A(i)?n=i:$.z(i)&&(n=arguments),i=(0,$.Wa)(n,(function(t){return e[t]||t})),this.Tk.get(i)}},$.g.set=function(t){if(arguments.length){var e=this.Su.pr(),i=[],n=[],s=0,a=arguments[0];if($.A(a)){if(a=(n=a)[0],1<n.length&&$.z(a))if(1<arguments.length)var o=arguments[1];else o=n[n.length-1],s=1}else $.z(a)&&1<arguments.length&&(o=(n=arguments)[n.length-1],s=1);for(a=0;a<n.length-s;a++)i[a]=e[n[a]]||n[a];i.push(o),this.Tk.set.apply(this.Tk,i)}return this},$.g.fr=function(t){if(arguments.length){var e=this.Su.pr(),i=arguments[0],n=[];$.A(i)?n=i:$.z(i)&&(n=arguments),i=(0,$.Wa)(n,(function(t){return e[t]||t})),this.Tk.fr(i)}return this},$.g.DD=ba(13),$.g.j=function(t,e){return 1<arguments.length?this.Jk(t,e):this.no(t)},$.g.no=function(t){if(arguments.length){var e,i=arguments[0];if($.A(i)?e=i:$.z(i)&&(e=arguments),$.p(e)){var n,s=this.Ci;for(n=0;n<e.length&&(i=e[n],$.C(s)||$.A(s));n++){if(n==e.length-1)return s[i];s=s[i]}}}},$.g.Jk=function(t){if(arguments.length){var e=arguments[0],i=0,n=[];if($.A(e)){var s=e;if(e=s[0],1<s.length&&$.z(e))if(1<arguments.length)var a=arguments[1];else a=s[s.length-1],i=1}else $.z(e)&&1<arguments.length&&(a=(s=arguments)[s.length-1],i=1);if($.p(s)){var o=this.Ci,r=s[0];n.push(r);var l=o[r];for(e=1;e<s.length-i;e++){var h=s[e];if(!$.ea(h)&&!$.z(h))return this}for(e=1;e<s.length-i;e++)if(h=s[e],n.push(h),$.ea(h))if($.p(l)){if(!$.A(l))return this;l=(o=l)[h],r=h}else o[r]=[],l=o[h],o=o[r],r=h;else{if(!$.z(h))return this;if($.p(l)){if(!$.C(l))return this;l=(o=l)[h],r=h}else o[r]={},l=o[h],o=o[r],r=h}o[r]!=a&&(o[r]=a,this.Su.va(32,void 0,{item:this}))}}return this},$.g.getParent=function(){return this.ee},$.g.fl=function(t){this.ee=t};var CF=$.Yt.prototype;CF.getTraverser=CF.aw,CF.addData=CF.Yr,CF.search=CF.search,CF.searchItems=CF.Eo,CF.filter=CF.filter,CF.addChild=CF.hc,CF.addChildAt=CF.Eg,CF.getChildren=CF.Sl,CF.numChildren=CF.bc,CF.getChildAt=CF.xd,CF.removeChild=CF.removeChild,CF.removeChildAt=CF.Cj,CF.removeChildren=CF.Gi,CF.indexOfChild=CF.Kf,CF=$.$t.prototype,CF.get=CF.get,CF.set=CF.set,CF.meta=CF.j,CF.del=CF.fr,CF.getParent=CF.getParent,CF.addChild=CF.hc,CF.addChildAt=CF.Eg,CF.getChildren=CF.Sl,CF.numChildren=CF.bc,CF.getChildAt=CF.xd,CF.remove=CF.remove,CF.removeChild=CF.removeChild,CF.removeChildAt=CF.Cj,CF.removeChildren=CF.Gi,CF.indexOfChild=CF.Kf,$.H($.au,$.V),$.g=$.au.prototype,$.g.ra=48,$.g.DG=function(t){return $.p(t)?(this.$C=t,this):this.$C},$.g.va=function(t,e,i){!this.Lo&&16&t&&(this.Ru=null),$.au.u.va.call(this,t,e,i)},$.g.aw=function(){return new Vt(this)},$.g.Yr=function(t,e,i){if($.z(t)){var n=new $.Lm;"object"==$.ka(i)&&(n.lJ(i.rowsSeparator),n.hG(i.columnsSeparator),n.OH(i.ignoreTrailingSpaces),n.MH(i.ignoreFirstRow));var s=new Ut;s.mapping(e),n.pC(t,s),t=s.getData(),e="as-table"}else e=String(e).toLowerCase();switch(this.ka(),e){case"as-table":case"as-table":case"table":case"parentid":case"linear":case"plain":case"db":case"database":case"id":case"parentpointer":case"pointer":var a;n=[],s=[];var o=[];for(this.ka(),e=0,a=t.length;e<a;e++){var r=t[e],l=new $.du(this,r),h=r[this.Zc.id||"id"];if(o.push(l),null!=h)if(h=String(h),0>(r=$.Na(n,h,ro))){var c=~r;$.Da(n,h,c),(r=this.search("id",h))?(r=$.J(r,$.du)?r:r[0],$.Da(s,r,c),r.j("nc",!0),$.kl(1,null,[h])):$.Da(s,l,c)}else $.kl(2,null,[h])}for(e=0;e<o.length;e++)a=o[e],null!=(l=t[e][this.Zc[eu.eC]||eu.eC])?(l=String(l),0>(r=$.Na(n,l,ro))?((r=this.search("id",l))?(r=$.J(r,$.du)?r:r[0],fu(r,a)):(this.Iq.push(a),$.kl(3,null,[l])),ju(this,a)):(r=s[r],fu(r,a),r.j("nc")&&ju(this,a))):(this.Iq.push(a),ju(this,a));o.length&&this.va(16),this.da(!0);break;default:for(this.ka(),e=0,n=t.length;e<n;e++)s=gu(this,t[e]),this.Iq.push(s),ju(this,s);t.length&&this.va(16),this.da(!0)}if("array"==$.ka(i)){for(this.$C=!1,t=0;t<i.length;t++)n=i[t],"object"==$.ka(n)&&(e=n.from,n=n.to,($.z(e)||$.ea(e))&&($.z(n)||$.ea(n))&&(n=this.Eo("id",n)[0]))&&(s=n.get("dependsOn"),$.p(s)?"array"==$.ka(s)&&n.set("dependsOn",s.length,e):n.set("dependsOn",[e]));this.$C=!0}return this.da(!0),this},$.g.DS=function(t,e,i){if(!this.Ad[t])for(this.dI[t]=!!e,this.WS.reset(),this.Ad[t]=[],this.QH[t]=ku(i||ro),this.Ru||(this.Ru=this.WS.uC()),e=0;e<this.Ru.length;e++)hu(this,this.Ru[e],t);return this},$.g.Wja=function(t){return delete this.Ad[t],delete this.dI[t],delete this.QH[t],this},$.g.search=function(t,e,i){return(t=this.Eo(t,e,i)).length?1==t.length?t[0]:t:null},$.g.Eo=function(t,e,i){var n=this.dI[t],s=this.Ad[t];if(s)return i=$.D(i)?ku(i):this.QH[t],n=0<=(e=$.Na(s,n?String(e):e,i))?this.Ad[t][e].value:[],$.A(n)?n:[n];for(n=[],this.Ru||(this.Ru=this.WS.uC()),s=i||ro,i=0;i<this.Ru.length;i++)s(this.Ru[i].get(t),e)||n.push(this.Ru[i]);return n},$.g.find=function(t,e){return this.Eo(t,e)[0]},$.g.filter=function(t){var e=this.aw();return e.bO(t),e.uC()},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){var i=null;$.J(t,$.$t)&&(i=t.Su,t=t.Tk),this.ka();var n=null,s=-1,a=null,o=!0,r=null;return $.J(t,$.du)?((r=t.Pq())&&r!=this&&(a=r,r.ka()),s=(n=t.getParent())?n.Kf(t):r.Kf(t),t.remove()):(o=!1,t=gu(this,t)),e=$.Za(e,0,this.bc()),$.Da(this.Iq,t,e),ju(this,t),t.Pq(this),i&&nu(t,i).fl(null),this.va(16),this.da(!0),r&&r.da(!0),this.$C&&(i={type:o?"treeItemMove":"treeItemCreate",target:null,targetIndex:e,item:t},a&&(i.sourceTree=a),o&&(i.sourceIndex=s,i.source=n),this.dispatchEvent(i)),t},$.g.Sl=function(){return $.Ha(this.Iq)},$.g.Uv=function(){return this.Iq},$.g.bc=function(){return this.Iq.length},$.g.xd=function(t){return this.Iq[t]},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Kf=function(t){return $.J(t,$.$t)&&(t=t.Tk),(0,$.za)(this.Iq,t)},$.g.Cj=function(t){var e=null;return 0<=t&&t<=this.Iq.length&&(e=$.Ca(this.Iq,t,1)[0],iu(this,e,void 0,!0),this.va(16),this.$C&&this.dispatchEvent({type:"treeItemRemove",source:null,sourceIndex:t,item:e})),e},$.g.Gi=function(){if(this.Iq.length){for(var t in this.Iq.length=0,this.Ad)this.Ad[t].length=0;this.va(16)}return this},$.g.F=function(){return this.xB([])},$.g.xB=function(t){for(var e={rootMapping:this.Zc,children:[],index:[]},i=0;i<this.bc();i++){var n=this.xd(i);e.children.push(n.F(t))}for(var s in this.Ad)e.index.push(s);return e},$.g.Yd=function(t){return new $.Yt(this,t||{})},$.g=$.du.prototype,$.g.get=function(t){if(arguments.length){var e,i=arguments[0];if($.A(i)?e=i:$.z(i)&&(e=arguments),$.p(e)){var n,s=this.la;for(n=0;n<e.length&&(i=e[n],n||(i=this.Ld.Zc[i]||i),$.C(s)||$.A(s));n++){if(n==e.length-1)return s[i];s=s[i]}}}},$.g.set=function(t){if(arguments.length){var e=arguments[0],i=0,n=[];if($.A(e)){var s=e,a=s[0];if(1<s.length&&$.z(a))if(1<arguments.length)var o=arguments[1];else o=s[s.length-1],i=1}else $.z(e)&&1<arguments.length&&(a=e,o=(s=arguments)[s.length-1],i=1);if($.p(s)){var r=this.la,l=s[0];l=this.Ld.Zc[l]||l,n.push(l);var h=r[l];for(e=1;e<s.length-i;e++){var c=s[e];if(!$.ea(c)&&!$.z(c))return $.kl(17),this}for(e=1;e<s.length-i;e++)if(c=s[e],n.push(c),$.ea(c))if($.p(h)){if(!$.A(h))return $.kl(17),this;h=(r=h)[c],l=c}else r[l]=[],h=r[c],r=r[l],l=c;else{if(!$.z(c))return $.kl(17),this;if($.p(h)){if(!$.C(h))return $.kl(17),this;h=(r=h)[c],l=c}else r[l]={},h=r[c],r=r[l],l=c}r[l]!=o&&(r[l]=o,iu(this.Ld,this,a),hu(this.Ld,this,a),this.Ld.va(16),this.Ld.DG()&&this.Ld.dispatchEvent({type:"treeItemUpdate",item:this,path:n,field:n[0],value:o}))}else $.kl(17)}return this},$.g.fr=function(t){if(arguments.length){var e=arguments[0];if($.A(e))var i=e,n=i[0];else $.z(e)&&(i=arguments,n=e);if($.p(i)){var s,a=[],o=this.la;for(s=1;s<i.length;s++)if(e=i[s],!$.ea(e)&&!$.z(e))return this;for(s=0;s<i.length&&(e=i[s],a.push(e),$.C(o)||$.A(o));s++)if(s==i.length-1){if(!(e in o))break;var r=o[e];$.A(o)?Ea(o,e):delete o[e],iu(this.Ld,this,n),hu(this.Ld,this,n),this.Ld.va(16),this.Ld.DG()&&this.Ld.dispatchEvent({type:"treeItemUpdate",item:this,path:a,field:a[0],value:r,deleted:r})}else o=o[e]}}return this},$.g.DD=ba(12),$.g.j=function(t,e){return 1<arguments.length?this.Jk(t,e):this.no(t)},$.g.no=function(t){if(arguments.length){var e,i=arguments[0];if($.A(i)?e=i:$.z(i)&&(e=arguments),$.p(e)){var n,s=this.Ci;for(n=0;n<e.length&&(i=e[n],$.C(s)||$.A(s));n++){if(n==e.length-1)return s[i];s=s[i]}}}},$.g.Jk=function(t){if(arguments.length){var e=arguments[0],i=0,n=[];if($.A(e)){var s=e;if(e=s[0],1<s.length&&$.z(e))if(1<arguments.length)var a=arguments[1];else a=s[s.length-1],i=1}else $.z(e)&&1<arguments.length&&(a=(s=arguments)[s.length-1],i=1);if($.p(s)){var o=this.Ci,r=s[0];n.push(r);var l=o[r];for(e=1;e<s.length-i;e++){var h=s[e];if(!$.ea(h)&&!$.z(h))return this}for(e=1;e<s.length-i;e++)if(h=s[e],n.push(h),$.ea(h))if($.p(l)){if(!$.A(l))return this;l=(o=l)[h],r=h}else o[r]=[],l=o[h],o=o[r],r=h;else{if(!$.z(h))return this;if($.p(l)){if(!$.C(l))return this;l=(o=l)[h],r=h}else o[r]={},l=o[h],o=o[r],r=h}o[r]!=a&&(o[r]=a,this.Ld.va(32,void 0,{item:this}))}}return this},$.g.getParent=function(){return this.Y},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){var i=null;$.J(t,$.$t)&&(i=t.Su,t=t.Tk),this.Ld.ka();var n=null,s=null,a=-1,o=null,r=!0;return $.J(t,$.du)?((n=t.Pq())&&n!=this.Ld&&(o=n,n.ka()),a=(s=t.getParent())?s.Kf(t):n.Kf(t),t.remove()):(r=!1,t=gu(this.Ld,t)),e=$.Za(e,0,this.bc()),$.Da(this.b,t,e),hu(this.Ld,t,void 0,!0),t.Pq(this.Ld),t.Y=this,i&&nu(t,i).fl(nu(this,i)),this.Ld.va(16),this.Ld.da(!0),n&&n.da(!0),this.Ld.DG()&&(i={type:r?"treeItemMove":"treeItemCreate",target:this,targetIndex:e,item:t},o&&(i.sourceTree=o),r&&(i.sourceIndex=a,i.source=s),this.Ld.dispatchEvent(i)),t},$.g.Sl=function(){return $.Ha(this.b)},$.g.Uv=function(){return this.b},$.g.bc=function(){return this.b.length},$.g.xd=function(t){return this.b[t]},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){var e=null;return 0<=t&&t<=this.b.length&&(e=$.Ca(this.b,t,1)[0],iu(this.Ld,e,void 0,!0),lu(e),this.Ld.DG()&&this.Ld.dispatchEvent({type:"treeItemRemove",source:this,sourceIndex:t,item:e})),e},$.g.Gi=function(){var t=this.b.length;if(t){this.Ld.ka();for(var e=0;e<t;e++){var i=this.b[e];lu(i),iu(this.Ld,i,void 0,!0)}this.Ld.da(!1),this.b.length=0,this.Ld.va(16)}return this},$.g.Kf=function(t){return $.J(t,$.$t)&&(t=t.Tk),(0,$.za)(this.b,t)},$.g.remove=function(){if(this.Y)this.Y.removeChild(this);else{var t=this.Ld.Kf(this);0<=t&&this.Ld.Cj(t)}return this},$.g.Pq=function(t){return $.p(t)?(this.Ld!=t&&mu(this,t),this):this.Ld},$.g.clone=function(t){var e=$.Sl(this.la);delete e[this.Ld.Zc[eu.yx]||eu.yx],delete e[this.Ld.Zc[eu.eC]||eu.eC],e=new $.du(t,e);for(var i=0,n=this.bc();i<n;i++){var s=this.xd(i);e.hc(s.clone(t))}return e},$.g.ND=ba(10),$.g.F=function(t){var e={treeDataItemData:$.Qc(this.la)};if($.p(t)){var i;if(i=t.length)for(var n={},s=0;s<i;s++){var a=t[s];this.Ci.hasOwnProperty(a)&&(n[a]=this.Ci[a])}else n=$.Qc(this.Ci);e.treeDataItemMeta=n}if(n=this.bc())for(e.children=[],i=0;i<n;i++)s=this.xd(i),e.children.push(s.F(t));return e};var DF=$.au.prototype;$.E("anychart.data.tree",$.ou),DF.getTraverser=DF.aw,DF.dispatchEvents=DF.DG,DF.addData=DF.Yr,DF.createIndexOn=DF.DS,DF.removeIndexOn=DF.Wja,DF.search=DF.search,DF.searchItems=DF.Eo,DF.find=DF.find,DF.filter=DF.filter,DF.addChild=DF.hc,DF.addChildAt=DF.Eg,DF.getChildren=DF.Sl,DF.numChildren=DF.bc,DF.getChildAt=DF.xd,DF.removeChild=DF.removeChild,DF.removeChildAt=DF.Cj,DF.removeChildren=DF.Gi,DF.indexOfChild=DF.Kf,DF.mapAs=DF.Yd,DF=$.du.prototype,DF.get=DF.get,DF.set=DF.set,DF.meta=DF.j,DF.del=DF.fr,DF.getParent=DF.getParent,DF.addChild=DF.hc,DF.addChildAt=DF.Eg,DF.getChildren=DF.Sl,DF.numChildren=DF.bc,DF.getChildAt=DF.xd,DF.remove=DF.remove,DF.removeChild=DF.removeChild,DF.removeChildAt=DF.Cj,DF.removeChildren=DF.Gi,DF.indexOfChild=DF.Kf,$.H($.Y,$.V),$.g=$.Y.prototype,$.g.Jc=null,$.g.pO=!1,$.g.fn=null,$.g.ra=98313,$.g.sa=15,$.g.oh=function(t){t.Ju();var e=this.ig(t);return e.gE=t,e.getOriginalEvent=function(){return this.gE},this.dispatchEvent(e)},$.g.Ih=function(){},$.g.ig=function(t){var e,i=t.type;t:{for(e=t.relatedTarget;$.J(e,$.ig);){if($.J(e.tag,$.Y)){e=e.tag;break t}e=e.parent()}e=null}return{type:i,originalEvent:t,target:this,relatedTarget:e||t.relatedTarget,domTarget:t.target,relatedDomTarget:t.relatedTarget,offsetX:t.offsetX,offsetY:t.offsetY,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY,button:t.button,keyCode:t.keyCode,charCode:t.charCode,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,platformModifierKey:t.platformModifierKey,state:t.state}},$.g.O=function(t){if($.p(t)){var e=$.z(t)?$.Lp.getElementById(t):t;if(t=e||null===t,this.pO!=t){this.pO=t;var i=this.rP?this.Jc:null;if(this.ka(),t=2,e){var n=this.Jc&&this.Jc.Ja()&&this.Jc.Ja().rb();this.rP=!1,$.af(e)?this.rP?this.Jc.O(e):(this.Jc=this.O0(),"vml"!=$.kk&&this.Jc.ia().setAttribute("role","presentation"),this.Jc.O(e),this.rP=!0):this.Jc=e,this.fn||$.nb(n,this.Jc&&this.Jc.Ja()&&this.Jc.Ja().rb())||(t|=4)}else this.Jc=null;this.B(t,1),this.da(!0),i&&Rp((function(){if(i.BM){var t=$.cc($.ac.Id(),this,"chart");delete i.BM()[t]}$.qd(i)}),this)}return this}return this.Jc},$.g.O0=function(){var t=$.lk();return t.Ax=!1,t.Xo(),t},$.g.zIndex=function(t){return $.p(t)?(t=+t||0,this.Pa.zIndex!=t&&(this.Pa.zIndex=t,this.B(8,65537)),this):this.ph("zIndex")?this.Pa.zIndex:$.p(this.zh)?this.zh:this.oa.zIndex},$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!==t&&(this.Pa.enabled=t,this.B(1,this.mr()),this.WE&&(this.Pa.enabled?(this.tY&&this.da(!0),this.tY=!1):(this.ka(),this.tY=!0))),this):this.g("enabled")},$.g.mr=function(){return 32777},$.g.da=function(t){var e=this.tY&&2==this.GP;if(e){var i=this.Lo;this.Lo=this.mr(),this.GP--}return $.Y.u.da.call(this,t),e&&(this.ka(),i&&this.va(i)),this},$.g.zc=function(){return!(this.pf()||this.md||(this.enabled()?this.O()?(this.I(1),0):(this.remove(),this.I(2),this.pO||$.il(1),1):(this.J(1)&&(this.remove(),this.I(1),this.B(2)),1)))},$.g.remove=$.ia,$.g.ja=function(t,e,i,n){if($.p(t)){if(null===t)this.fn&&(this.fn=null,this.uo());else if($.J(t,$.I))var s=t.left,a=t.top,o=t.width,r=t.height;else $.C(t)?(s=t.left,a=t.top,o=t.width,r=t.height):(s=t,a=e,o=i,r=n);return s=$.N(s),a=$.N(a),o=$.N(o),r=$.N(r),(0,window.isNaN)(s)||(0,window.isNaN)(a)||(0,window.isNaN)(o)||(0,window.isNaN)(r)||this.fn&&this.fn.left==s&&this.fn.top==a&&this.fn.width==o&&this.fn.height==r||(this.fn?(this.fn.left=s,this.fn.top=a,this.fn.width=o,this.fn.height=r):this.fn=$.kn(s,a,o,r),this.uo()),this}return this.fn?this.fn.clone():this.Jc&&(l=this.Jc.Ja())?$.fa.isNodeJS?$.nn($.fa.defaultBounds):l.rb():null;var l},$.g.uo=function(){this.B(4,9)},$.g.gr=function(){return!0},$.g.Eu=function(t,e,i,n){var s=$.eq.exports;s?s.Eu(this,this.Jc,t,e,i,n):$.il(4,null,["Exporting"])},$.g.Yw=function(t,e,i,n,s){var a=$.eq.exports;a?a.Yw(this,this.Jc,t,e,i,n,s):$.il(4,null,["Exporting"])},$.g.Zw=function(t,e,i,n,s){var a=$.eq.exports;a?a.Zw(this,this.Jc,t,e,i,n,s):$.il(4,null,["Exporting"])},$.g.$w=function(t,e,i){var n=$.eq.exports;n?n.$w(this,this.Jc,t,e,i):$.il(4,null,["Exporting"])},$.g.Nq=function(t,e){var i=$.eq.exports;return i?i.Nq(this,this.Jc,t,e):($.il(4,null,["Exporting"]),"")},$.g.Hu=function(t,e,i,n,s,a,o){var r=$.eq.exports;r?r.Hu(this,this.Jc,t,e,i,n,s,a,o):$.il(4,null,["Exporting"])},$.g.FB=function(t,e,i,n,s,a,o,r){var l=$.eq.exports;l?l.FB(this,this.Jc,t,e,i,n,s,a,o,r):$.il(4,null,["Exporting"])},$.g.HB=function(t,e,i,n,s,a){var o=$.eq.exports;o?o.HB(this,this.Jc,t,e,i,n,s,a):$.il(4,null,["Exporting"])},$.g.GB=function(t,e,i,n,s,a,o,r){var l=$.eq.exports;l?l.GB(this,this.Jc,t,e,i,n,s,a,o,r):$.il(4,null,["Exporting"])},$.g.zA=function(t,e,i,n,s){var a=$.eq.exports;a?a.zA(this,this.Jc,t,e,i,n,s):$.il(4,null,["Exporting"])},$.g.wA=function(t,e,i,n,s,a){var o=$.eq.exports;o?o.wA(this,this.Jc,t,e,i,n,s,a):$.il(4,null,["Exporting"])},$.g.BA=function(t,e,i,n){var s=$.eq.exports;s?s.BA(this,this.Jc,t,e,i,n):$.il(4,null,["Exporting"])},$.g.yA=function(t,e,i,n,s,a){var o=$.eq.exports;o?o.yA(this,this.Jc,t,e,i,n,s,a):$.il(4,null,["Exporting"])},$.g.print=function(t,e){var i=$.eq.exports;i?i.print(this,this.Jc,t,e):$.il(4,null,["Exporting"])},$.g.LE=function(t,e,i,n){var s=$.eq.exports;s?s.LE(this,this.Jc,t,e,i,n):$.il(4,null,["Exporting"])},$.g.OE=function(){var t=$.eq.exports;t?t.OE(this,this.Jc):$.il(4,null,["Exporting"])},$.g.ME=function(t,e){var i=$.eq.exports;i?i.ME(this,this.Jc,t,e):$.il(4,null,["Exporting"])},$.g.NE=function(t,e){var i=$.eq.exports;i?i.NE(this,this.Jc,t,e):$.il(4,null,["Exporting"])},$.g.F=function(){var t=$.Y.u.F.call(this),e=$.V.prototype.g.call(this,"zIndex");return $.p(e)&&(t.zIndex=e),e=$.V.prototype.g.call(this,"enabled"),$.p(e)&&(t.enabled=e),t},$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=$.Y.prototype.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},$.g.U=function(t,e){if($.Y.u.U.call(this,t,e),e)"enabled"in t&&(this.oa.enabled=t.enabled),"zIndex"in t&&(this.oa.zIndex=t.zIndex);else{var i=t.enabled;this.enabled(null!=i?i:!$.p(i)||void 0),this.zIndex(t.zIndex)}},$.g.R=function(){$.qd(this.wc),this.fn=this.wc=null,this.rP&&$.qd(this.Jc),this.Jc=null,this.pO=!1,$.Y.u.R.call(this)};var EF=$.Y.prototype;EF.zIndex=EF.zIndex,EF.enabled=EF.enabled,EF.print=EF.print,$.H($.tu,$.V),$.g=$.tu.prototype,$.g.ra=2,$.g.Kx=window.NaN,$.g.Bx=window.NaN,$.g.ww=null,$.g.qx=null,$.g.bt=null,$.g.es=null,$.g.Yf=null,$.g.Jf=null,$.g.Fw=null,$.g.Ew=null,$.g.Dw=null,$.g.Bw=null,$.g.J6=function(t,e,i,n){if($.J(t,$.I)||$.C(t)?(n=t,t=$.N(n.left),e=$.N(n.top),i=$.N(n.width),n=$.N(n.height)):(t=$.N(t),e=$.N(e),i=$.N(i),n=$.N(n)),null===this.ww)if(null===this.bt){var s=0,a=null===this.Yf?+i||0:$.L(this.Yf,i);a=vu(this,a,i)}else{var o=$.L(this.bt,i,!0);a=null===this.Yf?o:$.L(this.Yf,i),s=o-(a=vu(this,a,i))}else s=$.L(this.ww,i),a=null===this.bt?null===this.Yf?+i-s||0:$.L(this.Yf,i):$.L(this.bt,i,!0)-s,a=vu(this,a,i);return null===this.qx?null===this.es?(o=(0,window.isNaN)(this.Kx)?0:this.Kx,i=null===this.Jf?(0,window.isNaN)(this.Bx)?+n||0:this.Bx:$.L(this.Jf,n),i=uu(this,i,n)):(o=$.L(this.es,n,!0),i=null===this.Jf?(0,window.isNaN)(this.Kx)?(0,window.isNaN)(this.Bx)?o:this.Bx:o-this.Kx:$.L(this.Jf,n),o-=i=uu(this,i,n)):(o=$.L(this.qx,n),i=null===this.es?null===this.Jf?(0,window.isNaN)(this.Bx)?+n-o||0:this.Bx:$.L(this.Jf,n):$.L(this.es,n,!0)-o,i=uu(this,i,n)),(0,window.isNaN)(t)||(s+=t),(0,window.isNaN)(e)||(o+=e),new $.I(s,o,a,i)},$.g.set=function(t,e,i,n){return this.ka(),this.ga(!0,t,e,i,n),this.da(!0),this},$.g.zB=function(t){var e=this.Bx!=t;this.Bx=t,e&&this.va(2)},$.g.left=function(t){return $.p(t)?((t=Co(t))!=this.ww&&(this.ww=t,this.va(2)),this):this.ww},$.g.top=function(t){return $.p(t)?((t=Co(t))!=this.qx&&(this.qx=t,this.va(2)),this):this.qx},$.g.right=function(t){return $.p(t)?((t=Co(t))!=this.bt&&(this.bt=t,this.va(2)),this):this.bt},$.g.bottom=function(t){return $.p(t)?((t=Co(t))!=this.es&&(this.es=t,this.va(2)),this):this.es},$.g.width=function(t){return $.p(t)?((t=Co(t))!=this.Yf&&(this.Yf=t,this.va(2)),this):this.Yf},$.g.height=function(t){return $.p(t)?((t=Co(t))!=this.Jf&&(this.Jf=t,this.va(2)),this):this.Jf},$.g.minWidth=function(t){return $.p(t)?((t=Co(t))!=this.Fw&&(this.Fw=t,this.va(2)),this):this.Fw},$.g.minHeight=function(t){return $.p(t)?((t=Co(t))!=this.Ew&&(this.Ew=t,this.va(2)),this):this.Ew},$.g.maxWidth=function(t){return $.p(t)?((t=Co(t))!=this.Dw&&(this.Dw=t,this.va(2)),this):this.Dw},$.g.maxHeight=function(t){return $.p(t)?((t=Co(t))!=this.Bw&&(this.Bw=t,this.va(2)),this):this.Bw},$.g.gr=function(){return $.uo(this.Yf)||$.uo(this.Jf)||$.uo(this.Fw)||$.uo(this.Ew)||$.uo(this.Dw)||$.uo(this.Bw)||$.uo(this.ww)||$.uo(this.qx)||null!==this.es||null!==this.bt||null===this.Yf||null===this.Jf},$.g.F=function(){var t=$.tu.u.F.call(this);return null!==this.qx&&(t.top=this.qx),null!==this.bt&&(t.right=this.bt),null!==this.es&&(t.bottom=this.es),null!==this.ww&&(t.left=this.ww),null!==this.Yf&&(t.width=this.Yf),null!==this.Jf&&(t.height=this.Jf),null!==this.Fw&&(t.minWidth=this.Fw),null!==this.Ew&&(t.minHeight=this.Ew),null!==this.Dw&&(t.maxWidth=this.Dw),null!==this.Bw&&(t.maxHeight=this.Bw),t},$.g.U=function(t){this.left(t.left),this.top(t.top),this.right(t.right),this.bottom(t.bottom),this.width(t.width),this.height(t.height),this.minWidth(t.minWidth),this.minHeight(t.minHeight),this.maxWidth(t.maxWidth),this.maxHeight(t.maxHeight)},$.g.Zd=function(t){var e=null;if($.A(t)){var i=$.p(t[0])?t[0]:null,n=$.p(t[1])?t[1]:null,s=$.p(t[2])?t[2]:null;e=$.p(t[3])?t[3]:null}else $.p(t)&&!$.C(t)&&(i=t);return t={left:i,top:n,width:s,height:e},this.left(i).top(n).width(s).height(e),t},$.g.Ie=function(t,e,i,n,s){if(t=!1,$.J(e,$.tu)){var a=e.ww,o=e.qx,r=e.Yf,l=e.Jf,h=e.Fw,c=e.Ew,u=e.Dw,d=e.Bw,p=e.bt,g=e.es;t=!0}else $.J(e,$.I)?(a=e.left,o=e.top,r=e.width,l=e.height,d=u=c=h=g=p=null,t=!0):$.A(e)?(a=$.p(e[0])?e[0]:null,o=$.p(e[1])?e[1]:null,r=$.p(e[2])?e[2]:null,l=$.p(e[3])?e[3]:null,d=u=c=h=g=p=null,t=!0):$.p(e)&&!$.C(e)&&(a=e,o=$.p(i)?i:null,r=$.p(n)?n:null,l=$.p(s)?s:null,d=u=c=h=g=p=null,t=!0);return t&&this.left(a).top(o).right(p).bottom(g).width(r).height(l).minWidth(h).minHeight(c).maxWidth(u).maxHeight(d),t};var FF=$.tu.prototype;FF.top=FF.top,FF.right=FF.right,FF.bottom=FF.bottom,FF.left=FF.left,FF.width=FF.width,FF.height=FF.height,FF.minWidth=FF.minWidth,FF.minHeight=FF.minHeight,FF.maxWidth=FF.maxWidth,FF.maxHeight=FF.maxHeight,FF.set=FF.set,FF.toRect=FF.J6,$.H($.wu,$.Y),$.g=$.wu.prototype,$.g.ra=$.Y.prototype.ra,$.g.sa=$.Y.prototype.sa,$.g.gr=function(){return this.Ta().gr()},$.g.ob=function(){return this.Ta().J6(this.ja())},$.g.Ta=function(t,e,i,n){return this.Bb||(this.Bb=new $.tu,$.K(this.Bb,this.Pk,this),$.W(this,"bounds",this.Bb)),$.p(t)?(this.Bb.N.apply(this.Bb,arguments),this):this.Bb},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.left=function(t){return $.p(t)?(this.Ta().left(t),this):this.Ta().left()},$.g.right=function(t){return $.p(t)?(this.Ta().right(t),this):this.Ta().right()},$.g.top=function(t){return $.p(t)?(this.Ta().top(t),this):this.Ta().top()},$.g.bottom=function(t){return $.p(t)?(this.Ta().bottom(t),this):this.Ta().bottom()},$.g.width=function(t){return $.p(t)?(this.Ta().width(t),this):this.Ta().width()},$.g.height=function(t){return $.p(t)?(this.Ta().height(t),this):this.Ta().height()},$.g.minWidth=function(t){return $.p(t)?(this.Ta().minWidth(t),this):this.Ta().minWidth()},$.g.minHeight=function(t){return $.p(t)?(this.Ta().minHeight(t),this):this.Ta().minHeight()},$.g.maxWidth=function(t){return $.p(t)?(this.Ta().maxWidth(t),this):this.Ta().maxWidth()},$.g.maxHeight=function(t){return $.p(t)?(this.Ta().maxHeight(t),this):this.Ta().maxHeight()},$.g.R=function(){$.qd(this.Bb),this.Bb=null,$.wu.u.R.call(this)};var GF=$.wu.prototype;GF.bounds=GF.Ta,GF.top=GF.top,GF.right=GF.right,GF.bottom=GF.bottom,GF.left=GF.left,GF.width=GF.width,GF.height=GF.height,GF.minWidth=GF.minWidth,GF.minHeight=GF.minHeight,GF.maxWidth=GF.maxWidth,GF.maxHeight=GF.maxHeight,GF.getPixelBounds=GF.ob,$.H($.yu,$.wu),$.yu.prototype.ra=32768|$.wu.prototype.ra,$.yu.prototype.sa=80|$.wu.prototype.sa;var Kda=$.yu.prototype,HF={};$.sq(HF,[[1,"fill",$.Qq],[1,"stroke",$.Pq],[1,"topStroke",$.Pq],[1,"rightStroke",$.Pq],[1,"bottomStroke",$.Pq],[1,"leftStroke",$.Pq],[0,"disablePointerEvents",$.Dq],[0,"cornerType",function(t,e){return $.zk(vda,t,e||"none")}]]),Kda.lR=HF,$.U($.yu,$.yu.prototype.lR),$.g=$.yu.prototype,$.g.g=$.ir,$.g.ys=function(){return 1},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.yS=function(t){var e=arguments[0];return $.A(e)?e:$.C(e)?[e.leftTop||0,e.rightTop||0,e.rightBottom||0,e.leftBottom||0]:$.Ja(arguments,0)},$.g.xS=function(t){if($.p(t)){var e=this.yS.apply(this,arguments);return $.Ta(e,this.Pa.corners)||(this.Pa.corners=e,this.B(20,1)),this}return this.yS(this.g("corners"))},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(null===t?($.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,$.K(this.Y,this.Tc,this))),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=1),this.Xb=null,this.B(e,i)},$.g.YT=function(){return this.ob()},$.g.W=function(){if(!this.zc())return this;var t,e=this.g("fill")||"none",i=this.g("stroke"),n=this.g("topStroke"),s=this.g("rightStroke"),a=this.g("bottomStroke"),o=this.g("leftStroke"),r=$.p(n)&&!$.cp(n),l=$.p(s)&&!$.cp(s),h=$.p(a)&&!$.cp(a),c=$.p(o)&&!$.cp(o),u=!!(r||l||h||c);if(h=r&&l&&h&&c,(l=(r=this.O()?this.O().Ja():null)&&!r.yf())&&r.suspend(),this.J(4)){if(this.Na||(this.Na=$.ok()),h&&this.f?this.f.clear().parent(null):(this.f||(this.f=$.qk()),this.f.parent(this.Na),this.f.clear()),u?(this.i||(this.i=$.qk()),this.i.parent(this.Na),this.i.clear()):this.i&&this.i.clear().parent(null),this.G)for(h=0,c=this.G.length;h<c;h++)(t=this.G[h])&&t.clear().parent(null);if(u)for(this.D=[n,s,a,o],this.G||(this.G=[]),this.b||(this.b=[]),h=0,c=this.D.length;h<c;h++)n=this.D[h],$.p(n)&&!$.cp(n)?((n=this.G[h]?this.G[h]:this.G[h]=$.qk()).parent(this.Na),n.clear(),this.b[h]=n):$.p(i)&&!$.cp(i)&&(this.D[h]=i,this.b[h]=this.f);if(n=(h=this.YT()).width,s=h.height,c=zu(this,0,n,s),a=zu(this,1,n,s),o=zu(this,2,n,s),t=zu(this,3,n,s),u){var d=this.b[0]?$.$b($.Wb(this.D[0]))/2:0,p=this.b[1]?$.$b($.Wb(this.D[1]))/2:0,g=this.b[2]?$.$b($.Wb(this.D[2]))/2:0,f=this.b[3]?$.$b($.Wb(this.D[3]))/2:0;for(h.left+=f,h.top+=d,h.width-=f+p,h.height-=d+g,a=[h.cb()-a,h.top,h.cb(),h.top,h.cb(),h.top+a,h.cb()-a+a*Math.cos($.bb(315)),h.top+a+a*Math.sin($.bb(315)),h.cb(),h.Va()-o,h.cb(),h.Va(),h.cb()-o,h.Va(),h.cb()-o+o*Math.cos($.bb(45)),h.Va()-o+o*Math.sin($.bb(45)),h.left+t,h.Va(),h.left,h.Va(),h.left,h.Va()-t,h.left+t+t*Math.cos($.bb(135)),h.Va()-t+t*Math.sin($.bb(135)),h.left,h.top+c,h.left,h.top,h.left+c,h.top,h.left+c+c*Math.cos($.bb(225)),h.top+c+c*Math.sin($.bb(225))],h=0,c=a.length;h<c;h+=8)if(o=zu(this,t=h/8,n,s),h||this.i.moveTo(a[a.length-4],a[a.length-3]),this.i.lineTo(a[h],a[h+1]),Au(this,this.i,a[h+2],a[h+3],a[h+4],a[h+5],o),t=this.b[t]){h?(b!=t&&t.moveTo(a[h-2],a[h-1]),Au(this,t,a[h-6],a[h-5],a[h-4],a[h-3],o)):(t.moveTo(a[a.length-2],a[a.length-1]),Au(this,t,a[a.length-6],a[a.length-5],a[a.length-4],a[a.length-3],o)),t.lineTo(a[h],a[h+1]),Au(this,t,a[h+2],a[h+3],a[h+6],a[h+7],o);var b=t}}else{for(b=$.$b($.Wb(i))/2,(0,window.isNaN)(b)&&(b=.5),h.left+=b,h.top+=b,h.width-=b+b,h.height-=b+b,a=[h.cb()-a,h.top,h.cb(),h.top,h.cb(),h.top+a,h.cb(),h.Va()-o,h.cb(),h.Va(),h.cb()-o,h.Va(),h.left+t,h.Va(),h.left,h.Va(),h.left,h.Va()-t,h.left,h.top+c,h.left,h.top,h.left+c,h.top],h=0,c=a.length;h<c;h+=6)h||this.f.moveTo(a[a.length-2],a[a.length-1]),this.f.lineTo(a[h],a[h+1]),Au(this,this.f,a[h+2],a[h+3],a[h+4],a[h+5],zu(this,(h/6+1)%4,n,s));this.f.close()}this.I(4),$.C(e)&&("keys"in e||"src"in e)&&this.B(16)}if(this.J(16)){if(u){for(h=0,c=this.b.length;h<c;h++)(t=this.b[h])&&t.stroke(this.D[h]);this.i.fill(e),this.i.stroke(null)}else this.f.stroke(i),this.f.fill(e);this.I(16)}if(this.J(64)){if(e=this.g("disablePointerEvents"),u){for(h=0,c=this.b.length;h<c;h++)(t=this.b[h])&&t.Dd(e);this.i.Dd(e)}else this.f.Dd(e);this.Na.Dd(e),this.I(64)}return this.J(8)&&(this.Na.zIndex(this.g("zIndex")),this.I(8)),this.J(2)&&(this.Na.parent(this.O()),this.I(2)),l&&r.resume(),this},$.g.remove=function(){this.Na&&this.Na.parent(null)},$.g.yd=function(){var t=this.ob();if(t=t?t.clone():$.kn(0,0,0,0),!this.enabled())return t;var e=this.g("stroke");return e=$.cp(e)?0:$.$b(e),t.top+=e,t.left+=e,t.height-=2*e,t.width-=2*e,t},$.g.F=function(){var t=$.yu.u.F.call(this);$.Tq(this,this.lR,t,"Background",void 0,this.P);var e=this.nd("corners");return e&&(e=4<=e.length?{leftTop:e[0],rightTop:e[1],rightBottom:e[2],leftBottom:e[3]}:e[0],t.corners=e),t},$.g.Zd=function(t){var e=null;return $.z(t)?e={fill:t,stroke:null,enabled:!0}:($.da(t)||null===t)&&(e={enabled:!!t}),e},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?("fill"in i&&(this.oa.fill=i.fill),"stroke"in i&&(this.oa.stroke=i.stroke),"enabled"in i&&(this.oa.enabled=i.enabled)):("fill"in i&&this.fill(i.fill),"stroke"in i&&this.stroke(i.stroke),"enabled"in i&&this.enabled(i.enabled)),!0)},$.g.U=function(t,e){$.yu.u.U.call(this,t,e),$.Iq(this,this.lR,t,e),e?"corners"in t&&(this.oa.corners=this.yS(t.corners)):this.xS(t.corners)},$.g.R=function(){$.sd(this.f,this.b,this.i),this.i=this.b=this.f=null,$.yu.u.R.call(this)},$.H(Bu,$.yu),$.xu(Bu,$.yu);var IF=$.yu.prototype;IF.corners=IF.xS,IF=Bu.prototype,$.E("anychart.standalones.background",(function(){var t=new Bu;return t.ga(!0,$.nm("standalones.background")),t})),IF.draw=IF.W,IF.parentBounds=IF.ja,IF.container=IF.O,$.g=Cu.prototype,$.g.text=function(t){this.kc=t},$.g.width=function(){return this.Ta?this.Ta.width:0},$.g.height=function(){return this.Ta?this.Ta.height:0},$.g.path=function(){return null},$.g.style=function(t){this.f=t},$.g.Ac=function(){this.ia=this.P.Vx()},$.g.setPosition=function(t,e){var i=this.Vd();$.p(t)&&t!=this.No&&(this.No=t,i.setAttribute("x",this.No)),$.p(e)&&e!=this.Oo&&(this.Oo=e,i.setAttribute("y",this.Oo+this.b))},$.g.Vd=function(){return this.ia||this.Ac(),this.ia},$.g.Ij=function(){var t=this.f,e=this.Vd();$.Jc(t)||(t.fontStyle?e.setAttribute("font-style",t.fontStyle):e.removeAttribute("font-style"),t.fontVariant?e.setAttribute("font-variant",t.fontVariant):e.removeAttribute("font-variant"),t.fontFamily?e.setAttribute("font-family",t.fontFamily):e.removeAttribute("font-family"),$.p(t.fontSize)?e.setAttribute("font-size",t.fontSize):e.removeAttribute("font-size"),$.p(t.fontWeight)?e.setAttribute("font-weight",t.fontWeight):e.removeAttribute("font-weight"),$.p(t.letterSpacing)?e.setAttribute("letter-spacing",t.letterSpacing):e.removeAttribute("letter-spacing"),t.fontDecoration?e.setAttribute("text-decoration",t.fontDecoration):e.removeAttribute("font-decoration"),t.fontColor?e.setAttribute("fill",t.fontColor):e.removeAttribute("font-color"),$.p(t.fontOpacity)?e.setAttribute("opacity",t.fontOpacity):e.removeAttribute("font-opacity"),t.disablePointerEvents?e.setAttribute("pointer-events",t.disablePointerEvents?"none":""):e.removeAttribute("pointer-events")),e.textContent=this.kc},$.g.rb=function(){if(!this.Ta){var t=this.Vd();t.removeAttribute("x"),t.removeAttribute("y"),t=t.getBBox(),this.Ta=new $.I(t.x,-t.y,t.width,t.height),this.b=-t.y}return this.Ta},$.H(Eu,$.V),Eu.prototype.ra=2;var Fu={};$.rq(Fu,0,"left",$q),$.rq(Fu,0,"top",$q),$.rq(Fu,0,"bottom",$q),$.rq(Fu,0,"right",$q),$.U(Eu,Fu),$.g=Eu.prototype,$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){return $.ir.call(this,t)||0},$.g.CM=function(){return 0},$.g.ys=function(){return 2},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(null===t?($.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,$.K(this.Y,this.Tc,this))),this):this.Y},$.g.Tc=function(){this.Xb=null,this.va(2)},$.g.set=function(t,e,i,n){var s=$.Gm.apply(this,arguments);return this.nd("top")===s.top&&this.nd("right")===s.right&&this.nd("bottom")===s.bottom&&this.nd("left")===s.left||(this.ta("top",s.top),this.ta("right",s.right),this.ta("bottom",s.bottom),this.ta("left",s.left),this.va(2)),this},$.g.Ej=function(t){var e=$.L(this.g("left"),t.width),i=$.L(this.g("right"),t.width),n=$.L(this.g("top"),t.height),s=$.L(this.g("bottom"),t.height);return new $.I(t.left+e,t.top+n,t.width-e-i,t.height-n-s)},$.g.Ng=function(t){return t-$.L(this.g("left"),t)-$.L(this.g("right"),t)},$.g.Yh=function(t){return t-$.L(this.g("top"),t)-$.L(this.g("bottom"),t)},$.g.NY=function(t){var e=$.L(this.g("left"),t.width),i=$.L(this.g("right"),t.width),n=$.L(this.g("top"),t.height),s=$.L(this.g("bottom"),t.height);return new $.I(t.left-e,t.top-n,t.width+e+i,t.height+n+s)},$.g.Lk=function(t){return t+$.L(this.g("left"),t)+$.L(this.g("right"),t)},$.g.$j=function(t){return t+$.L(this.g("top"),t)+$.L(this.g("bottom"),t)},$.g.F=function(){var t=Eu.u.F.call(this);return $.Tq(this,Fu,t,"Space"),t},$.g.Zd=function(t){return $.Gm.apply(null,arguments)},$.g.Ie=function(t,e){if($.p(arguments[1])){var i=this.Zd.apply(this,$.Ja(arguments,1));return t?Gu(this,i):this.set(i),!0}return!1},$.g.U=function(t,e){this.ka(),e?Gu(this,t):$.Iq(this,Fu,t),this.da(!0)};var JF=Eu.prototype;JF.set=JF.set,$.H($.Hu,Eu),$.Hu.prototype.NY=function(t){var e=this.Lk(t.width),i=this.$j(t.height),n=$.L(this.g("left"),e),s=$.L(this.g("top"),i);return new $.I(t.left-n,t.top-s,e,i)},$.Hu.prototype.$j=function(t){var e=this.g("top"),i=this.g("bottom");return Iu(t,e,i)},$.Hu.prototype.Lk=function(t){var e=this.g("left"),i=this.g("right");return Ju(t,e,i)},$.ja($.Lu),$.H($.Pu,$.Y),$.Pu.prototype.ra=8|$.Y.prototype.ra,$.Pu.prototype.sa=976|$.Y.prototype.sa;var KF=null,LF="fontSize fontFamily fontColor fontOpacity textDirection fontStyle fontVariant fontDecoration fontWeight letterSpacing lineHeight textIndent vAlign hAlign textOverflow selectable disablePointerEvents wordWrap wordBreak rotation".split(" ");$.Pu.prototype.f=$.vq(),$.U($.Pu,$.Pu.prototype.f);var Lda=$.Pu.prototype,MF={};$.sq(MF,[[0,"format",$.ar],[0,"positionFormatter",$.ar],[0,"position",$.Cq],[0,"anchor",Qu],[0,"offsetX",$.Cq],[0,"offsetY",$.Cq],[1,"connectorStroke",$.Pq],[0,"rotation",$.Bq],[0,"width",$.br],[0,"height",$.br],[0,"clip",$.Cq]]),Lda.Dz=MF,$.U($.Pu,$.Pu.prototype.Dz),$.g=$.Pu.prototype,$.g.enabled=function(t){if($.p(t)){var e=this.g("enabled");return null===t?($.Pu.u.enabled.call(this,t),this.I(1)):(null===e&&t&&this.B(1,this.mr()),$.Pu.u.enabled.call(this,t)),this}return this.g("enabled")},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,this.Ia.I(4294967295),$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this.Pa.background=this.Ia.Pa,this):this.Ia},$.g.vg=function(t){$.X(t,1)&&(this.Ia.I(4294967295),Ru(this),this.B(16,1))},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this.Pa.padding=this.Wa.Pa,this):this.Wa},$.g.fm=function(t){$.X(t,2)&&(Ru(this),this.B(4,9))},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e))return this.nd(t);t in this.f&&this[t](e)}else if($.C(t))for(var i in t)i in this.f&&this[i](t[i]);return this}for(var n in i={},this.f)if(n in this.f){var s=this.g(n);$.p(s)&&(i[n]=this.g(n))}return i},$.g.jC=function(){var t=this.g("adjustFontSize");return!!t&&(t.width||t.height)},$.g.Kq=function(t){var e=this.g("fontColor")!=t;null===t?delete this.Nd.fontColor:this.Nd.fontColor=t,e&&this.B(4)},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){return Ru(this),$.p(this.Pa[t])?this.Pa[t]:$.p(this.Nd[t])?this.Nd[t]:this.oa[t]},$.g.xA=function(t){return Ru(this),$.p(this.Pa[t])?this.Pa[t]:this.Nd[t]},$.g.pH=function(){return this.Pa},$.g.Vd=function(){return this.wb},$.g.sl=function(){return this.wb},$.g.clear=function(t){if(this.o||(this.o=[]),this.Da&&this.Da.length)if($.p(t))this.Da[t]&&(this.Da[t].clear(),this.o.push(this.Da[t]),$.Yu(this,t),delete this.Da[t]);else{for($.Yu(this),t=this.Da.length;t--;){var e=this.Da[t];e&&(e.clear(),this.o.push(e))}this.Da.length=0,this.B(128,1)}else this.Da=[];return this},$.g.be=function(t){return t=+t,this.Da&&this.Da[t]?this.Da[t]:null},$.g.jI=function(){return this.Da?this.Da.length:0},$.g.add=function(t,e,i){if($.p(this.Da)||(this.Da=[]),$.p(i))var n=+i,s=this.Da[n];return s?(s.ka(),s.clear()):((s=this.o&&0<this.o.length?this.o.pop():this.vL()).ka(),$.p(n)?this.Da[n]=s:(this.Da.push(s),n=this.Da.length-1),s.HE(n)),s.Hf(t),s.jc(e),s.hp=this,s.state("pointNormal",s),s.state("seriesNormal",this),s.state("seriesNormalTheme",this.oa),s.da(!1),s},$.g.vL=function(){return new $.Tu},$.g.remove=function(){this.wb&&this.wb.parent(null)},$.g.W=function(){if(this.md)return this;this.wb||(this.wb=$.ok(),$.ru(this,this.wb));var t=this.O()?this.O().Ja():null,e=t&&!t.yf();return e&&t.suspend(),this.Da&&(this.sM(),qca(this),(0,$.Pe)(this.Da,(function(t){t&&(t.O(this.wb),t.W())}),this)),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.wb.parent(this.O()),this.I(2)),this.I(4294967295),e&&t.resume(),this},$.g.sM=function(){(0,$.Pe)(this.Da,(function(t){t.sM()}),this)},$.g.S1=function(t,e,i,n,s,a){if(i)var o=i.width,r=i.height;return e=new $.gb(e.x,e.y),i=$.Eo(new $.I(0,0,t.width,t.height),a),e.x-=i.x,e.y-=i.y,n=$.p(n)?$.L(n,o):0,s=$.p(s)?$.L(s,r):0,$.Yo(e,a,n,s),t.left=e.x,t.top=e.y,t},$.g.measure=function(t,e,i,n){return t=this.yl(t,e,i,n),$.mn(t)},$.g.yl=function(t,e,i,n){if($.J(t,$.Tu)){var s=t.g("rotation"),a=$.p(s)?s:this.g("rotation")||0;"auto"==(s=t.g("anchor")||this.g("anchor"))&&i&&i.anchor&&(s=i.anchor),n=$.p(n)?n:t.ma()}else a=$.p(i)&&$.p(i.rotation)?i.rotation:this.g("rotation")||0,s=$.p(i)&&i.anchor||this.g("anchor");return t=$.Xu(this,t,e,i,n),e=a,s=$.Eo(t,s),s=$.Kb($.bb(e),s.x,s.y),t=$.ln(t)||[],s.transform(t,0,t,0,4),t},$.g.ig=function(t){for(var e,i=(t=$.Pu.u.ig.call(this,t)).domTarget;$.J(i,$.ig)&&(e=i.tag,!$.J(e,$.Y)&&$.Do(e));)i=i.parent();return t.labelIndex=$.N(e),t},$.g.R=function(){$.sd(this.Da,this.o,this.b,this.wb,this.Ia,this.Wa,this.b,this.K),this.K=this.b=this.Wa=this.Ia=this.wb=this.o=this.Da=null,$.Pu.u.R.call(this)},$.g.F=function(){var t=$.Pu.u.F.call(this);if($.p(t.enabled)||delete t.enabled,this.ph("background")&&!$.Jc(this.Pa.background)){var e=this.background().F();$.Jc(e)||(t.background=e)}return this.ph("padding")&&!$.Jc(this.Pa.padding)&&(e=this.padding().F(),$.Jc(e)||(t.padding=e)),(e=t.adjustFontSize)&&($.p(e.width)||$.p(e.height))||delete t.adjustFontSize,$.Tq(this,this.f,t,"Labels factory label text",void 0,!0),$.Tq(this,this.Dz,t,"Labels factory label props",void 0,!0),t},$.g.U=function(t,e){var i=this.enabled();if($.Pu.u.U.call(this,t,e),e?($.Iq(this.oa,this.f,t),$.Iq(this.oa,this.Dz,t),"enabled"in t&&(this.oa.enabled=t.enabled)):($.Iq(this,this.f,t),$.Iq(this,this.Dz,t),this.enabled("enabled"in t?t.enabled:i)),(i="background")in t){var n=this.background();e?n.ga(!!e,t[i]):this.background(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa}(i="padding")in t&&(n=this.padding(),e?n.ga(!!e,t[i]):this.padding(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa)},$.H($.Tu,$.Y),$.g=$.Tu.prototype,$.g.ra=8|$.Y.prototype.ra,$.g.sa=3856|$.Y.prototype.sa,$.g.Vd=function(){return this.wb},$.g.state=function(t,e,i){if($.p(e)){$.p(i)&&(i=$.N(i));var n=av(this);return this.lx[t]==e&&(0,$.za)(n,t)==i||(this.lx[t]=e,$.p(i)||-1!=(0,$.za)(n,t)||(i=n.length),(0,window.isNaN)(i)||$.bv(this,t,i),this.B(17,9)),this}return this.lx[t]},$.g.sR=$.vq(),$.U($.Tu,$.Tu.prototype.sR);var Mda=$.Tu.prototype,NF={};$.sq(NF,[[0,"format",$.ar],[0,"positionFormatter",$.ar],[0,"position",$.Cq],[0,"anchor",Qu],[0,"offsetX",$.Cq],[0,"offsetY",$.Cq],[1,"connectorStroke",$.Pq],[0,"rotation",$.Bq],[0,"width",$.br],[0,"height",$.br],[0,"clip",$.Cq],[0,"enabled",$.Zq]]),Mda.oC=NF,$.U($.Tu,$.Tu.prototype.oC),$.g=$.Tu.prototype,$.g.ma=function(){return this.Ad},$.g.HE=function(t){this.Ad=+t},$.g.background=function(t){var e=null===t;return e||this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this)),$.p(t)?(e?($.qd(this.Ia),delete this.Pa.background):(this.Ia.N(t),ev(this)),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&(ev(this),this.B(16,1))},$.g.padding=function(t,e,i,n){var s=null===t;if(s||this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.Pk,this)),$.p(t)){if(s)$.qd(this.Wa),delete this.Pa.padding;else{if($.J(t,$.Hu))for(var a in Fu)s=t.g(a),this.Wa.ta(a,s);else this.Wa.N.apply(this.Wa,arguments);ev(this)}return this}return this.Wa},$.g.Pk=function(t){$.X(t,2)&&(ev(this),this.B(16,8))},$.g.qk=function(t){return $.p(t)?(t=Qu(t),this.Nd.anchor!==t&&(this.Nd.anchor=t,$.p(this.Pa.anchor)||this.B(16,8)),this):this.Nd.anchor},$.g.Hf=function(t){return $.p(t)?(this.i!=t&&(this.i=t,this.B(16,1)),this):this.i},$.g.jc=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,this.B(2052,8)),this):this.aa},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){return ev(this),$.p(this.Pa[t])?this.Pa[t]:this.oa[t]},$.g.xA=function(t){return ev(this),this.Pa[t]},$.g.Pha=function(t){if(this.hp)var e=this.hp;else KF||(KF=new $.Pu).ta("positionFormatter",(function(){return this.value})),e=KF;var i=$.Uu(this);return i.format=String(t),e.measure({},this.jc(),i)},$.g.Hi=function(){$.sd(this.Ia,this.Wa),this.Wa=this.Ia=null,this.oa={},this.Pa={},this.Nd={},this.lx={pointNormal:this},this.P=null,this.hp&&(this.lx.seriesNormal=this.hp,this.lx.seriesNormalTheme=this.hp.oa),this.b=null},$.g.td=function(t,e){$.p(t)&&this.N(t),null!=e&&(this.lx.pointState=e),($.p(t)||$.p(e))&&this.B(17,9)},$.g.ic=function(t){if("adjustFontSize"==t){var e=fv(this,t,(function(t){return t.width}));return{width:e,height:t=fv(this,t,(function(t){return t.height}))}}return e=fv(this,t),"background"!=t||$.p(e)||(e=null),e},$.g.clear=function(){this.Hi(),this.wb&&(this.wb.parent(null),this.wb.Bl()),this.B(2)},$.g.tf=function(t,e){this.b||$.Uu(this);var i=this.b.positionFormatter,n=this.xr&&this.xb.path()?"center":Qu(this.b.anchor)||"left-top",s=dv(this),a=this.b.offsetX,o=this.b.offsetY,r=0,l=0;e&&(r=e.width,l=e.height);var h=this.jc(),c=$.Qc(i.call(h,h));c=new $.gb(c.x,c.y),h=h&&h.connectorPoint,this.Zf&&(this.Zf.clear(),this.Zf.oc(1,0,0,1,0,0)),h&&(this.Zf||(this.Zf=this.wb.path(),this.Zf.eq(!0)),this.Zf.stroke(this.b.connectorStroke),i=$.Qc(i.call(h,h)),this.Zf.moveTo(c.x,c.y).lineTo(i.x,i.y)),i=$.Eo(new $.I(0,0,t.width,t.height),n),c.x-=i.x,c.y-=i.y,a=$.p(a)?$.L(a,r):0,o=$.p(o)?$.L(o,l):0,s?$.Yo(c,n,o,a):$.Yo(c,n,a,o),t.left=c.x,t.top=c.y,Su(this)?this.xb.x(this.Lg+c.x).y(this.Mg+c.y):this.xb.setPosition(this.Lg+c.x,this.Mg+c.y)},$.g.Jt=function(){var t=this.jc(),e=this.b.positionFormatter,i=$.Qc(e.call(t,t));t=t&&t.connectorPoint,this.Zf&&(this.Zf.clear(),this.Zf.oc(1,0,0,1,0,0)),t&&(this.Zf||(this.Zf=this.wb.path(),this.Zf.eq(!0)),this.Zf.stroke(this.b.connectorStroke),e=$.Qc(e.call(t,t)),this.Zf.moveTo(i.x,i.y).lineTo(e.x,e.y))},$.g.bi=function(t,e,i){var n=$.p(i)?function(t){return i[t]}:$.J(this,$.Tu)?this.nd:$.Pu.prototype.xA;if($.J(t,$.Qh)){var s=n.call(this,"text"),a=n.call(this,"useHtml");(e||$.p(s)||$.p(a))&&(a?t.htmlText(s):t.text(s)),t.fontSize(n.call(this,"fontSize")),t.fontFamily(n.call(this,"fontFamily")),t.color(n.call(this,"fontColor")),t.opacity(n.call(this,"fontOpacity")),t.direction(n.call(this,"textDirection")),t.fontStyle(n.call(this,"fontStyle")),t.fontVariant(n.call(this,"fontVariant")),t.er(n.call(this,"fontDecoration")),t.fontWeight(n.call(this,"fontWeight")),t.letterSpacing(n.call(this,"letterSpacing")),t.lineHeight(n.call(this,"lineHeight")),t.textIndent(n.call(this,"textIndent")),t.textShadow(n.call(this,"textShadow")),t.vAlign(n.call(this,"vAlign")),t.Bm(n.call(this,"hAlign")),t.textOverflow(n.call(this,"textOverflow")),t.Hm(n.call(this,"selectable")),t.Dd(n.call(this,"disablePointerEvents")),t.wordWrap(n.call(this,"wordWrap")),t.Xu(n.call(this,"wordBreak"))}else{for(e={},s=0,a=LF.length;s<a;s++){var o=LF[s];e[o]=n.call(this,o)}t.style(e),t.Ij()}},$.g.sM=function(){this.J(16)&&(this.b=null);var t=this.ic("enabled");if(!Su(this)&&t){t=this.xb,(jv(this)||this.wb&&!this.wb.parent())&&(t=this.Rh(),$.mg().Xp().appendChild(t.Vd()),this.f&&this.f.content(null));var e=$.Uu(this),i=this.tk(e.format,this.Hf(),this.ma());t.text($.p(i)?String(i):""),this.bi(t,!0,e)}},$.g.W=function(){var t,e=this.hp;this.wb||(this.wb=$.ok()),this.wb.tag=this.Ad;var i=this.ic("enabled");if(cv(this,1)){if(!i)return this.wb&&this.wb.parent(null),this.I(1),this;this.O()&&!this.wb.parent()&&this.wb.parent(this.O()),this.I(1)}if(!i)return this;if(cv(this,2)&&(i&&((!this.hp.enabled()||$.p(this.enabled())&&!this.enabled())&&this.hp.Vd()&&(this.O()||this.O(e.Vd()),this.O().parent()||this.O().parent(e.O())),this.O()&&((t=Su(this))?this.wb.parent(this.O()):(this.f||(this.f=$.uk(),this.f.zIndex(1)),this.f.parent(this.wb),this.f.content(null),this.f.content(this.xb.Vd())))),this.I(2)),this.J(8)&&(this.O()&&this.O().zIndex(e.zIndex()),this.wb.zIndex(this.zIndex()),this.I(8)),this.J(1024)&&($.Yu(e,this.ma()),this.I(1024)),cv(this,20)){ev(this),this.b=null,t=Su(this);var n=null!==(i=$.Uu(this)).width,s=null!==i.height,a=i.useHtml,o=this.Hf(),r=this.tk(i.format,o,this.ma());this.wb.oc(1,0,0,1,0,0);var l,h=i.background,c=i.background;if(!$.C(c)||!c||"enabled"in c||(c.enabled=!1),(o=$.z(c)||$.da(c)||c&&c.enabled)||this.o?(this.o||(this.o=new $.yu,this.o.zIndex(0),this.o.O(this.wb)),this.ba&&this.o.N($.J(this.ba,$.yu)?this.ba.F():this.ba),this.o.N(c),this.o.W()):h&&(this.ba=h),this.Rh(),t?this.xb.parent(this.wb):(this.f||(this.f=$.uk(),this.f.zIndex(1)),this.f.parent(this.wb),this.f.content(this.xb.Vd())),this.G=Vu(this,(function(t,e){var i=$.J(e,$.Pu)?e.ja():$.J(e,$.Tu)?null:e.ja;if(i)return i})),this.G||(h=this.ja(),(e.O()||h)&&t?this.G=h||e.O().rb():this.G=$.kn(0,0,0,0)),this.G)var u=this.G.width,d=this.G.height;if(t?(this.xb.width(null),this.xb.height(null),a?this.xb.htmlText($.p(r)?String(r):""):this.xb.text($.p(r)?String(r):"")):this.xb.text($.p(r)?String(r):""),this.bi(this.xb,!0,i),t=new $.I(0,0,0,0),$.J(i.padding,$.Hu))var p=i.padding;else($.C(i.padding)||$.ea(i.padding)||$.z(i.padding))&&(p=new $.Hu,$.rd(this,p),p.N(i.padding));if(n||s){if(n){if(a=Math.ceil($.L(i.width,u)),p){var g=p.Ng(a);this.Lg=$.L(p.g("left"),a)}else this.Lg=0,g=a;t.width=a,a=!1}else a=(r=this.xb.rb()).width,p?(t.width=p.Lk(a),this.Lg=$.L(p.g("left"),t.width)):(this.Lg=0,t.width=a),a=!0;if($.p(g)&&this.xb.width(g),s){if(r=Math.ceil($.L(i.height,d)),p){var f=p.Yh(r);this.Mg=$.L(p.g("top"),r)}else this.Mg=0,f=r;t.height=r,r=!1}else r=(r=this.xb.rb()).height,p?(t.height=p.$j(r),this.Mg=$.L(p.g("top"),t.height)):(this.Mg=0,t.height=r),r=!0;$.p(f)&&this.xb.height(f)}else a=(r=this.xb.rb()).width,r=r.height,p?(t.width=p.Lk(a),this.Lg=$.L(p.g("left"),t.width),t.height=p.$j(r),this.Mg=$.L(p.g("top"),t.height)):(this.Lg=0,t.width=a,this.Mg=0,t.height=r),r=a=!0;(!a&&i.adjustByWidth||!r&&i.adjustByHeight)&&(l="different"==$.Ou(e)?$.iv(this,g,f,i.minFontSize,i.maxFontSize,i.adjustByWidth,i.adjustByHeight):Vu(this,(function(t,e){if($.J(e,$.Pu)&&$.p(e.Nd.fontSize))return e.Nd.fontSize})),this.ka(),this.xb.fontSize(l),n?(a=Math.ceil($.L(i.width,u)),t.width=a):(a=(r=this.xb.rb()).width,t.width=p?p.Lk(a):a),s?(r=Math.ceil($.L(i.height,d)),t.height=r):(r=(r=this.xb.rb()).height,t.height=p?p.$j(r):r),this.da(!1)),this.Bb=t,this.B(2048),this.I(20)}return cv(this,2048)&&(this.tf(this.Bb,this.G),o&&(this.o.ja(this.Bb),this.o.W()),this.b.rotation&&(e=$.Eo(this.Bb,this.b.anchor),e=$.Kb($.bb(this.b.rotation),e.x,e.y),this.wb.oc(e.od,e.We,e.gf,e.Le,e.Jd,e.Fd)),this.B(512),this.I(2048)),this.J(512)&&(this.Jt(),this.I(512)),cv(this,256)&&(this.wb&&this.wb.clip(this.b.clip),this.I(256)),this},$.g.Rh=function(){var t=$.J(this.xb,Cu),e=$.J(this.xb,$.Qh);return jv(this)&&(t&&this.f?this.f.parent(null):e&&this.xb&&this.xb.parent(null),Su(this)?(this.xb=new $.Qh,this.xb.Cd("aria-hidden","true"),this.xb.zIndex(1),this.xb.Dd(!0)):(this.xb=new Cu,this.xb.Vd().setAttribute("aria-hidden","true"))),this.xb},$.g.VK=function(t){var e=$.Uu(this).maxLength;return Du(t,e)},$.g.tk=function(t,e,i){return t=$.Wu(this.hp,t,e,i),this.VK(t)},$.g.F=function(){var t=$.Tu.u.F.call(this);if($.p(this.nd("background"))){var e=this.background().F();$.Jc(e)||(t.background=e)}return $.p(this.nd("padding"))&&(e=this.padding().F(),$.Jc(e)||(t.padding=e)),$.Tq(this,this.sR,t,"Labels factory label text"),$.Tq(this,this.oC,t,"Labels factory label props"),(e=t.adjustFontSize)&&($.p(e.width)||$.p(e.height))||delete t.adjustFontSize,this.ph("enabled")||delete t.enabled,t},$.g.U=function(t,e){var i=this.g("enabled");if($.Iq(this,this.sR,t),$.Iq(this,this.oC,t),$.Tu.u.U.call(this,t,e),$.p(t.enabled)||delete this.Pa.enabled,this.ta("enabled","enabled"in t?t.enabled:i),(i="background")in t){var n=this.background();e?n.ga(!!e,t[i]):this.background(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa}(i="padding")in t&&(n=this.padding(),e?n.ga(!!e,t[i]):this.padding(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa)},$.g.R=function(){$.sd(this.Ia,this.Wa,this.o,this.xb,this.wb,this.Rv),this.Rv=this.wb=this.Wa=this.Ia=this.xb=this.o=null,$.Tu.u.R.call(this)},$.H(kv,$.Pu),$.xu(kv,$.Pu),kv.prototype.vL=function(){return new lv},$.H(lv,$.Tu);var OF=$.Pu.prototype;OF.background=OF.background,OF.padding=OF.padding,OF.enabled=OF.enabled,OF.getLabel=OF.be,OF.getLabelsCount=OF.jI,OF=$.Tu.prototype,OF.getIndex=OF.ma,OF.padding=OF.padding,OF.background=OF.background,OF.clear=OF.clear,OF.measureWithText=OF.Pha,OF.draw=OF.W,OF=kv.prototype,$.E("anychart.standalones.labelsFactory",(function(){var t=new kv;return t.ga(!0,$.nm("standalones.labelsFactory")),t})),OF.draw=OF.W,OF.parentBounds=OF.ja,OF.container=OF.O,OF.add=OF.add,OF.clear=OF.clear,OF.measure=OF.measure,OF.measureWithTransform=OF.yl,$.g=mv.prototype,$.g.lg=function(t){return $.p(t)?(this.pc.lg=t,this):this.pc.lg},$.g.Li=function(t){return $.p(t)?(this.pc.Li=t,this):this.pc.Li},$.g.Im=function(t){return $.p(t)?(this.pc.Im=t,this):this.pc.Im},$.g.Dl=function(t){return $.p(t)?(this.pc.Dl=t,this):this.pc.Dl},$.g.getData=function(t){var e=this.pc.lg;return e?e.get.apply(e,arguments):void 0},$.g.no=function(t){var e=this.pc.lg?this.pc.lg.j(t):void 0;return $.p(e)||(e=(e=this.pc.values.series)?e.value.j(t):void 0),e},$.g.Rg=function(t){var e=void 0;if(t)for(var i=0;i<this.pc.Li.length&&(e=(e=this.pc.Li[i])&&e.Rg?e.Rg(t):void 0,!$.p(e));i++);return e},$.eq.format.Context=function(t,e,i){$.eq.format.Context.XF(this,"constructor",t,e,i)},$.H($.eq.format.Context,mv),$.Fw=$.eq.format.Context,$.E("anychart.format.Context",$.Fw);var PF=$.Fw.prototype;PF.getData=PF.getData,PF.getMeta=PF.no,PF.getStat=PF.Rg;var Nda=-1!=Bc.indexOf("PhantomJS"),Bca=!($.xd&&!Nda&&$.bd("534")&&!$.bd("536"));$.H($.pv,$.V),$.g=$.pv.prototype,$.g.ra=1,$.g.label=function(t){return this.i||(this.i=this.b.tL(),$.K(this.i,this.Caa,this),this.i.Ga("defaultFontSettings","defaultLabelSettings","defaultNoDataLabel"),$.W(this,"label",this.i)),$.p(t)?(this.i.N(t),this):this.i},$.g.Caa=function(){this.va(1)},$.g.U=function(t,e){$.pv.u.U.call(this,t,e),this.label().ga(!!e,t.label)},$.g.R=function(){$.qd(this.i),$.pv.u.R.call(this)},$.H(qv,$.V),$.g=qv.prototype,$.g.sa=16,$.g.ra=2,$.g.text=function(t){return rv(this,"text",t)},$.g.qR=function(t){return rv(this,"url",t)},$.g.nR=function(t){return rv(this,"alt",t)},$.g.oR=function(t){return rv(this,"imgAlt",t)},$.g.pR=function(t){return rv(this,"logoSrc",t)},$.g.enabled=function(t){return rv(this,"enabled",t)},$.g.F=function(){var t={},e=this.text(),i=this.qR(),n=this.nR(),s=this.oR(),a=this.pR(),o=this.enabled();return $.p(e)&&(t.text=e),$.p(i)&&(t.url=i),$.p(n)&&(t.alt=n),$.p(s)&&(t.imgAlt=s),$.p(a)&&(t.logoSrc=a),$.p(o)&&(t.enabled=o),t},$.g.Zd=function(t){return $.z(t)?{text:t,enabled:!0}:$.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&("text"in i&&this.text(i.text),this.enabled(i.enabled),!0)},$.g.U=function(t){this.ka(),this.text(t.text),this.qR(t.url),this.nR(t.alt),this.oR(t.imgAlt),this.pR(t.logoSrc),this.enabled(t.enabled),this.da(!0)};var QF=qv.prototype;QF.text=QF.text,QF.url=QF.qR,QF.alt=QF.nR,QF.imgAlt=QF.oR,QF.logoSrc=QF.pR,QF.enabled=QF.enabled,$.H(tv,$.Y),tv.prototype.ra=8|$.Y.prototype.ra,tv.prototype.sa=16|$.Y.prototype.sa;var RF={};$.sq(RF,[[0,"fontSize",$.wq],[0,"fontFamily",$.zq],[0,"fontColor",$.zq],[0,"fontOpacity",$.er],[0,"fontDecoration",$.bl],[0,"fontStyle",$.cl],[0,"fontVariant",$.dl],[0,"fontWeight",$.wq],[0,"letterSpacing",$.wq],[0,"textDirection",$.el],[0,"textShadow",$.Zb],[0,"lineHeight",$.wq],[0,"textIndent",$.wq],[0,"vAlign",$.al],[0,"hAlign",$.$k],[0,"wordWrap",$.zq],[0,"wordBreak",$.zq],[0,"textOverflow",$.zq],[0,"selectable",$.Dq],[0,"disablePointerEvents",$.Dq],[0,"useHtml",$.Dq]]),$.U(tv,RF);var SF={};$.rq(SF,0,"text",$.Aq),$.g=tv.prototype,$.g.parent=function(t){if($.p(t)){if(this.Y!=t){var e=String($.oa(this));null===t?($.kr(this.Y,this.Tc,this),delete this.Y.Uc[e],this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,this.Y.Uc[e]=this,$.K(this.Y,this.Tc,this))}return this}return this.Y},$.g.Tc=function(t){var e=16,i=1;($.X(t,8)||$.X(t,1))&&(e|=4,i|=8),$.X(t,32768)&&(e|=1),this.Xb=null,this.B(e,i)},$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e))return this.Pa[t];t in RF&&this[t](e)}else if($.C(t)){for(var i in this.ka(),t)t.hasOwnProperty(i)&&this.$d(i,t[i]);this.da(!0)}return this}for(var n in i={},RF){var s=this.g(n);$.p(s)&&(i[n]=s)}return i},$.g.bi=function(t,e){for(var i in RF)if(RF.hasOwnProperty(i)){switch(i){case"fontColor":var n="color";break;case"textDirection":n="direction";break;case"fontOpacity":n="opacity";break;case"fontDecoration":n="decoration";break;default:n=i}"useHtml"==n||!e&&t[n]()===this.g(i)||t[n](this.g(i))}if("text"in this.ua){i=this.g("text");var s=(n=!!this.g("useHtml"))?t.htmlText():t.text();(e||i!==s)&&(n?t.htmlText(i):t.text(i))}},$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!=t&&(this.Pa.enabled=t,this.B(1,32777),this.Pa.enabled?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},$.g.F=function(){var t=tv.u.F.call(this);return $.Tq(this,RF,t,"Text"),t},$.g.U=function(t,e){tv.u.U.call(this,t,e),e?$.Hq(this.oa,RF,t):$.Iq(this,RF,t)};var TF=tv.prototype;TF.textSettings=TF.$d,$.H(uv,tv),$.U(uv,SF),uv.prototype.ra=tv.prototype.ra,uv.prototype.sa=64|tv.prototype.sa,uv.prototype.ea=function(){var t=this.g("adjustFontSize");t&&(t.width||t.height)&&this.B(4,9)};var UF=function(){var t={};return $.rq(t,0,"position",$.Ek),$.rq(t,0,"width",$.br),$.rq(t,0,"height",$.br),$.rq(t,0,"anchor",(function(t){return null===t?null:$.Dk(t)})),$.rq(t,0,"offsetX",$.yo),$.rq(t,0,"offsetY",$.yo),$.rq(t,0,"rotation",$.xq),$.rq(t,1,"adjustFontSize",yq),$.rq(t,0,"minFontSize",$.Bq),$.rq(t,0,"maxFontSize",$.Bq),t}();$.U(uv,UF),$.g=uv.prototype,$.g.parent=function(t){var e=uv.u.parent.call(this);return $.p(t)?(e!=t&&(uv.u.parent.call(this,t),null===t?(this.background().parent(null),this.padding().parent(null)):(this.background().df().parent(t.background()),this.padding().parent(t.padding()))),this):e},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,this.Ia.Wj(!0),$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.V1=function(){var t=this.g("rotation");return null==t||(0,window.isNaN)(t)?this.na:t},$.g.qk=function(t){return $.p(t)?(this.ba!=t&&(this.ba=t,this.g("anchor")||this.B(4,9)),this):this.ba},$.g.vA=function(){return this.g("anchor")||this.qk()},$.g.sl=function(){return this.Oa},$.g.fo=function(t,e,i,n){var s=this.g("adjustFontSize");if(s)if(s.width&&s.height){if(t>i||e>n)return 1;if(t<i||e<n)return-1}else if(s.width){if(t<i)return-1;if(t>i)return 1}else if(s.height){if(e<n)return-1;if(e>n)return 1}return 0},$.g.dS=function(t,e){var i=this.g("minFontSize"),n=this.g("maxFontSize"),s=Math.round((n+i)/2),a=n,o=$.sk();if(o.Cd("aria-hidden","true"),this.bi(o,!0),o.fontSize(n),0>=this.fo(o.rb().width,o.rb().height,t,e))return n;o.fontSize(s);for(var r=n=this.fo(o.rb().width,o.rb().height,t,e);i!=a;){if(0>n)i=Math.min(s+1,a),s+=Math.floor((a-s)/2);else{if(!(0<n))break;a=Math.max(s-1,i),s-=Math.ceil((s-i)/2)}if(o.fontSize(s),0>=r*(n=this.fo(o.rb().width,o.rb().height,t,e)))break}if(!n)return $.qd(o),s;do{s+=r,o.fontSize(s),n=this.fo(o.rb().width,o.rb().height,t,e)}while(0>r*n);return $.qd(o),0<r&&(s-=r),s},$.g.Z1=function(){return this.ja()},$.g.rR=function(){return this.g("position")||"center"},$.g.tf=function(){var t=this.ja()||$.kn(0,0,0,0),e=t.left,i=t.top,n=t.width,s=t.height;t=new $.I(0,0,this.Oi,this.Ni);var a=new $.gb(0,0);if(this.ja())switch(this.rR()){case"left-top":a.x=e,a.y=i;break;case"left-center":a.x=e,a.y=i+s/2;break;case"left-bottom":a.x=e,a.y=i+s;break;case"center-top":a.x=e+n/2,a.y=i;break;case"center":a.x=e+n/2,a.y=i+s/2;break;case"center-bottom":a.x=e+n/2,a.y=i+s;break;case"right-top":a.x=e+n,a.y=i;break;case"right-center":a.x=e+n,a.y=i+s/2;break;case"right-bottom":a.x=e+n,a.y=i+s}else a.x=0,a.y=0;return e=$.Eo(new $.I(0,0,this.Oi,this.Ni),this.vA()),a.x-=e.x,a.y-=e.y,n=$.p(this.g("offsetX"))?$.L(this.g("offsetX"),n):0,s=$.p(this.g("offsetY"))?$.L(this.g("offsetY"),s):0,$.Yo(a,this.vA(),n,s),this.Lg+=a.x,this.Mg+=a.y,t.left=a.x,t.top=a.y,this.xb.x(this.Lg).y(this.Mg),t},$.g.W=function(){if(!this.zc())return this;var t=wv(this),e=this.O();return this.J(16)&&(this.bi(this.xb,t),this.I(16)),(t=$.wr(this,"background"))&&!t.O()&&t.O(this.Oa),this.J(2)&&(t&&t.W(),this.xb&&this.xb.parent(this.Oa),this.Oa.parent(e),this.I(2)),this.J(8)&&(t&&t.zIndex(0),this.xb&&this.xb.zIndex(1),this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(vv(this),this.K=this.tf(),this.B(64)),this.J(64)&&(t&&(t.Wj(!1),t.ka(),t.ja(this.K),t.W(),t.da(!1)),this.I(64)),this.J(4)&&(this.Oa.oc(1,0,0,1,0,0),e=this.V1(),t=this.vA(),$.p(e)&&!(0,window.isNaN)(e)||(e=0),t=$.Eo(this.K,t),this.Oa.JE(e,t.x,t.y),this.I(4)),this},$.g.remove=function(){this.Oa.parent(null)},$.g.yi=function(){if(this.J(16)){var t=wv(this);this.bi(this.xb,t),this.I(16)}return this.J(4)&&vv(this),new $.I(0,0,this.Oi,this.Ni)},$.g.F=function(){var t=uv.u.F.call(this);return $.Tq(this,SF,t,"Label Base Text"),$.Tq(this,UF,t,"Label Base"),t.background=this.background().F(),t.padding=this.padding().F(),t},$.g.Zd=function(t){return $.z(t)?{text:t,enabled:!0}:null},$.g.Ie=function(t,e){var i=this.Zd(arguments[1]);return i?(t?this.oa.text!==i.text&&(this.oa.text=i.text,this.B(20,9)):this.Pa.text!==i.text&&(this.Pa.text=i.text,this.B(20,9)),this.enabled(i.enabled),!0):$.Y.prototype.Ie.apply(this,arguments)},$.g.U=function(t,e){uv.u.U.call(this,t,e),$.Iq(this,SF,t,e),$.Iq(this,UF,t,e),this.background().ga(!!e,t.background),this.padding().ga(!!e,t.padding)},$.g.R=function(){$.sd(this.Wa,this.Ia,this.xb,this.Oa),delete this.Wa,delete this.Ia,delete this.xb,delete this.Oa,uv.u.R.call(this)},$.H($.xv,uv),$.xv.prototype.sa=128|uv.prototype.sa;var VF={};$.rq(VF,0,"visible",$.Dq),$.U($.xv,VF),$.xv.prototype.U=function(t,e){$.xv.u.U.call(this,t,e),e&&$.Iq(this,VF,t)},$.xv.prototype.W=function(){return this.zc()?($.xv.u.W.call(this),this.J(128)&&(this.sl().visible(this.g("visible")),this.I(128)),this):this},$.H(yv,$.xv),$.xu(yv,$.xv);var WF=$.xv.prototype;WF.background=WF.background,WF.padding=WF.padding,WF.draw=WF.W,WF=yv.prototype,$.E("anychart.standalones.label",(function(){var t=new yv;return t.N($.nm("standalones.label")),t})),WF.draw=WF.W,WF.parentBounds=WF.ja,WF.container=WF.O,$.H(zv,tv);var XF=function(){var t={};return $.sq(t,[[0,"x",$.Cq],[0,"y",$.Cq],[0,"iconType",function(t){return $.z(t)?$.Vk(t):t}],[0,"iconTextSpacing",function(t){var e=Number(t);return null===t?this.vf("iconTextSpacing"):(0,window.isNaN)(e)?this.g("iconTextSpacing"):e}],[0,"maxWidth",$.Cq],[0,"maxHeight",$.Cq],[1,"iconFill",$.Qq],[1,"iconStroke",$.Pq],[1,"iconHatchFill",$.Rq]]),t}();$.U(zv,SF),$.U(zv,XF),$.g=zv.prototype,$.g.ra=2|tv.prototype.ra,$.g.sa=tv.prototype.sa,$.g.Ay=function(t){return $.p(t)?(t=!!t,this.Fs!=t&&(this.Fs=t,this.Zy=!0,this.$b=null,this.B(20,1)),this):this.Fs},$.g.disabled=function(t){return $.p(t)?(this.fq!=t&&(this.fq=t,this.Zy=!0,this.B(16),this.W()),this):this.fq},$.g.iw=function(t){return $.p(t)?($.D(t)||(t=null===t?null:$.Ok(t)),this.jw!=t&&(this.jw=t,this.Zy=!0,this.B(16,1)),this):this.jw},$.g.gu=function(t,e,i,n,s,a,o){if($.p(t)){var r=$.Ub.apply(null,arguments);return this.gw!=r&&(this.gw=r,this.Zy=!0,this.B(16,1)),this}return this.gw},$.g.hu=function(t,e,i,n,s){if($.p(t)){var a=$.Wb.apply(null,arguments);return this.hw!=a&&(this.hw=a,this.Zy=!0,this.B(16,1)),this}return this.hw},$.g.vJ=function(t){return $.p(t)?(this.Fka=$.N(t),this):this.Fka},$.g.Ki=function(t){return $.p(t)?(this.Eka=t,this):this.Eka},$.g.j=function(t){return $.p(t)?(this.Ci=t,this):this.Ci},$.g.dV=function(t){return $.p(t)?(this.V2=t,this):this.V2},$.g.kw=function(t){return $.p(t)?(t=$.N(t),this.pp!=t&&(this.pp=t,this.$b=null,this.B(4,9)),this):this.pp},$.g.remove=function(){this.wb&&this.wb.parent(null)},$.g.W=function(){if(!this.zc())return this;var t;if((t=!this.lw)&&(this.lw=this.wb.path(),this.lw.oc(1,0,0,1,0,0)),this.KO||(this.KO=this.wb.rect().zIndex(5).stroke(null).fill("#FFFFFF 0.00001")),this.wb.cursor(this.dV()),!$.p(this.g("iconHatchFill"))||$.cp(this.g("iconHatchFill"))||this.Es||(this.Es=this.wb.path(),this.Es.oc(1,0,0,1,0,0),this.Es.stroke("none")),this.J(8)){var e=this.zIndex();this.wb.zIndex(e),this.I(8)}if(this.J(2)&&(e=this.O(),this.wb.parent(e),this.I(2)),e=this.g("iconType"),e=$.z(e)?tca(e):e,this.J(16)&&(Dv(this,this.za,t),this.Zy&&!t&&(Cv(this,e),this.Zy=!1),Ev(this,this.za),this.I(16)),this.J(4)){this.yi(),Cv(this,e),this.KO.Qf($.kn(0,0,this.$b.width,this.$b.height)),this.Zy=!1;var i=this.ad.ea;if(e=this.Fs?this.pp+this.g("iconTextSpacing"):0,this.ad.x(e),1<i.length){var n=$.$b(this.g("iconStroke"));e=0;for(var s=0,a=(i=i[0]).length;s<a;s++)e=Math.max(e,i[s].height);e=(n=Math.max(e,this.pp+n)/2)-e/2}else e=(n=this.$b.height/2)-this.YW.height/2;this.ad.y(e),this.lw.oc(1,0,0,1,0,n-this.pp/2),this.wb.oc(1,0,0,1,this.$b.left,this.$b.top),Dv(this,this.za,t),this.I(4)}return this},$.g.yi=function(){return this.enabled()?(this.$b||this.Mm(),this.$b):new $.I(0,0,0,0)},$.g.ob=function(){return this.$b||this.Mm(),this.$b},$.g.uo=function(){this.$b=null,zv.u.uo.call(this)},$.g.Mm=function(){var t=this.ja(),e=this.text(),i=(e=(null===e||0>e.indexOf("\n"))&&!this.g("useHtml")?this.YW:this.ad.rb()).width,n=e.height,s=$.$b(this.g("iconStroke")),a=this.pp+s;if(t)var o=t.width,r=t.height;else o=r=void 0;var l=$.L(this.g("maxWidth"),o);s=o?$.L(this.g("x"),o):0,r=r?$.L(this.g("y"),r):0;var h=this.Fs?a+this.g("iconTextSpacing"):0;if(this.SF=window.NaN,l?(o=l-h,i&&i>o&&"..."==this.ad.textOverflow()?this.SF=o/i:(this.ad.width(o),e=this.ad.rb()),i=l):(l=o?Math.min(o-h,i):i,l=Math.max(l,1e-5),"..."==this.ad.textOverflow()&&i&&i>l&&(this.SF=l/i),i=l+h),1<(l=this.ad.ea).length){for(n=0,a=l[0],l=0,o=a.length;l<o;l++)n=Math.max(n,a[l].height);n=Math.max(n/2,this.pp/2)+Math.max(e.height-n/2,this.pp/2)}else n=Math.max(this.Fs?a:0,n);this.$b=t?new $.I(t.tb()+s,t.Vb()+r,i,n):new $.I(s,r,i,n)},$.g.zd=function(){return this.ob().width},$.g.qd=function(){return this.ob().height},$.g.UK=function(){this.Oo=this.No=0,this.Fs=!0,this.fq=!1,this.iconType("square"),this.iconFill("black"),this.iconStroke("none"),this.iconHatchFill(null),this.jw=null,this.hw=this.gw="none",this.iconTextSpacing(5)},$.g.clear=function(){return this.ka(),this.$b=null,this.Pa={},this.UK(),this.jg(null),this.Lja=this.Ki(),this.Mja=this.vJ(),this.vJ(window.NaN),this.Ki(window.NaN),this.j(null),this.ta("maxWidth",null),this.ta("maxHeight",null),this.remove(),this.B(4294967295),this.da(!1),this},$.g.Rh=function(){return this.ad},$.g.U=function(t,e){zv.u.U.call(this,t,e),$.Iq(this,XF,t,e),$.Iq(this,SF,t,e),this.Ay(t.iconEnabled),this.iw(t.iconMarkerType),this.gu(t.iconMarkerFill),this.hu(t.iconMarkerStroke),this.disabled(t.disabled),this.vJ(t.sourceUid),this.Ki(t.sourceKey),this.j(t.meta),this.dV(t.hoverCursor),this.kw(t.iconSize)},$.g.R=function(){zv.u.R.call(this),this.ZW=null,$.sd(this.wb,this.ad,this.$l,this.lw,this.KO,this.Es),this.Es=this.KO=this.lw=this.$l=this.ad=this.wb=null};var YF=zv.prototype;YF.getTextElement=YF.Rh,YF.getContentBounds=YF.yi,YF.getWidth=YF.zd,YF.getHeight=YF.qd,YF.draw=YF.W,$.H($.Hv,tv),$.U($.Hv,SF),$.Hv.prototype.ra=tv.prototype.ra,$.Hv.prototype.sa=192|tv.prototype.sa;var Gv=2;$.g=$.Hv.prototype,$.g.Lu=29|Gv,$.g.xb=null,$.g.mj=null,$.g.state=function(t,e){return $.p(e)?(this.Ku(t)&&e!=this.state(t)&&(this.dc=e?t:this.dc&~t,0==this.dc&&(this.dc=Gv),this.B(64,1)),this):!!(this.dc&t)},$.g.Ku=function(t,e){return $.p(e)?(!e&&this.state(t)&&this.state(t,!1),this.Lu=e?this.Lu|t:this.Lu&~t,this):!!(this.Lu&t)},$.g.Qa=function(t){return this.state(Gv,t)},$.g.Tj=function(t){return this.state(4,t)},$.g.Rja=function(){this.state(8,!0)},$.g.checked=function(t){return this.state(16,t)},$.g.disabled=function(t){return this.state(1,t)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.position=function(t){return $.p(t)?(this.af=t,this.B(4,9),this):this.af},$.g.width=function(t){return $.p(t)?(this.Yf!=t&&(this.Yf=t,this.B(20,9)),this):this.Yf},$.g.height=function(t){return $.p(t)?(this.Jf!=t&&(this.Jf=t,this.B(20,9)),this):this.Jf},$.g.$x=function(t){this.$d(t),(t=!this.xb)&&(this.xb=$.sk(),this.xb.Cd("aria-hidden","true"),$.ru(this,this.xb,this.po,this.hg,null,null,this.Sj,this.tr),this.xb.Dd(!0)),this.bi(this.xb,t),this.J(4)&&(Iv(this),t=new $.I(0,0,this.GC.width,this.GC.height),this.xb.x(this.Lg),this.xb.y(this.Mg),this.xb.clip(t),this.xb.oc(1,0,0,1,0,0),this.xb.translate(this.GC.left,this.GC.top),this.B(64),this.I(4))},$.g.XL=function(t,e){this.mj||(this.mj=$.qk(),$.ru(this,this.mj,this.po,this.hg,null,null,this.Sj,this.tr));var i=this.mj,n=this.GC;i.clear();var s=n.left,a=n.top,o=n.width;n=n.height,i.moveTo(s,a).lineTo(s+o,a).lineTo(s+o,a+n).lineTo(s,a+n).close(),i.fill(t),i.stroke(e)},$.g.Lj=function(t){this.J(16)&&(this.$x(t.text),this.I(16)),this.J(4)&&(Iv(this),this.$x(t.text),this.B(64),this.I(4)),this.J(64)&&(this.XL(t.fill,t.stroke),this.I(64))},$.g.W=function(){if(!this.zc())return this;this.ka();var t=$.fd(this.p6);switch(this.dc){case 0:throw Error("Undefined button state.");case 4:this.Lj(t.hover);break;case 8:this.Lj(t.pushed);break;case 16:this.Lj(t.checked);break;case 1:this.Lj(t.disabled);break;default:this.Lj(t.normal)}return this.da(!0),this.J(8)&&(t=this.zIndex(),this.mj&&this.mj.zIndex(t),this.xb&&this.xb.zIndex(t),this.I(8)),this.J(2)&&(t=this.O(),this.mj&&this.mj.parent(t),this.xb&&this.xb.parent(t),this.I(2)),this.J(128)&&(this.xb&&this.xb.cursor(this.cursor()),this.mj&&this.mj.cursor(this.cursor()),this.I(128)),this},$.g.remove=function(){this.xb&&this.xb.parent(null),this.mj&&this.mj.parent(null)},$.g.po=function(t){this.disabled()||this.qE||this.checked()||this.oh(t)&&this.Tj(!0)},$.g.hg=function(t){this.disabled()||this.qE||this.checked()||(this.qE=!1,this.oh(t)&&this.Qa(!0))},$.g.Sj=function(t){t.preventDefault(),this.disabled()||(this.qE=!0,this.oh(t)&&this.Rja())},$.g.tr=function(t){!this.disabled()&&this.qE&&this.oh(t)&&(this.qE=!1,t=t.target==this.mj||t.target==this.xb,this.Ku(16)&&(this.lL=!this.lL)?this.checked(this.lL):t?(this.Tj(!0),$.D(this.hO)&&this.hO(this)):this.Qa(!0))},$.g.TH=function(){this.p6={normal:{stroke:"#dedede",fill:"#e7e7e7",text:{fontColor:"#7c868e"}},hover:{stroke:"#cecece",fill:"#eee",text:{fontColor:"#7c868e"}},pushed:{stroke:"#d0d0d0",fill:"#d9d9d9",text:{fontColor:"#333"}},checked:{stroke:"1 #666 1",fill:{keys:["0 #ffffff","0.5 #e7e7e7","1 #d0d0d0"],angle:"90"},text:{fontColor:"#000"}},disabled:{stroke:"1 #666 1",fill:"#aaa",text:{fontColor:"#777"}}}},$.g.cursor=function(t){return $.p(t)?(t=Ck(t,"default"),this.VC!=t&&(this.VC=t,this.B(128,1)),this):this.VC},$.g.R=function(){$.sd(this.Wa,this.xb,this.mj),this.mj=this.xb=this.Wa=null,$.Hv.u.R.call(this)},$.H(Kv,$.Hv),Kv.prototype.$x=$.ia,Kv.prototype.XL=function(t,e){this.mj||(this.mj=$.qk(),this.mj.cursor("pointer"),$.ru(this,this.mj,this.po,this.hg,null,null,this.Sj,this.tr)),this.mj.clear(),this.b(this.mj,this.GC),this.mj.fill(t),this.mj.stroke(e)},Kv.prototype.TH=function(){this.p6=this.oa},Kv.prototype.R=function(){$.qd(this.mj),this.mj=null,Kv.u.R.call(this)},$.H($.Mv,Eu),$.Mv.prototype.Ej=function(t){var e=this.Ng(t.width),i=this.Yh(t.height),n=$.L(this.g("left"),e),s=$.L(this.g("top"),i);return new $.I(t.left+n,t.top+s,e,i)},$.Mv.prototype.Yh=function(t){var e=this.g("top"),i=this.g("bottom"),n=1;return $.uo(e)?n+=(0,window.parseFloat)(e)/100:t-=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n+=(0,window.parseFloat)(i)/100:t-=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},$.Mv.prototype.Ng=function(t){var e=this.g("left"),i=this.g("right"),n=1;return $.uo(e)?n+=(0,window.parseFloat)(e)/100:t-=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n+=(0,window.parseFloat)(i)/100:t-=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},$.H(Sv,tv);var ZF={};$.sq(ZF,[[0,"orientation",$.Lk],[0,"layout",$.Gk]]),$.U(Sv,SF),$.U(Sv,ZF),$.g=Sv.prototype,$.g.ra=tv.prototype.ra,$.g.sa=64|tv.prototype.sa,$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.Pk,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.i2=function(){return this.P},$.g.UC=function(t){if($.p(t)){if(t=(0,window.isNaN)((0,window.parseFloat)(t))?0:+t,--t,this.aa!=t){if(!(0<=t&&t<this.P))throw Error("incorrect currentPage value!!");this.aa=t,this.B(16,1)}return this}return this.aa+1},$.g.remove=function(){var t=$.wr(this,"background");t&&t.remove(),this.o&&(this.o.remove(),this.o.B(2)),this.i&&(this.i.remove(),this.i.B(2)),this.kc&&this.kc.parent(null)},$.g.zc=function(){return!(this.pf()||(Wv(this)?this.O()?(this.I(1),0):(this.remove(),this.B(2),$.il(1),1):(this.J(1)&&(this.remove(),this.I(1),this.B(2)),1)))},$.g.W=function(){if(!this.zc())return this;var t,e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),(t=!this.kc)&&(this.kc=$.sk(),this.kc.Cd("aria-hidden","true"));var s=$.wr(this,"background");if(s&&s.ka(),this.J(4)&&Xv(this),this.J(2)&&(s&&s.O(e).W(),this.o&&this.o.O(e),this.kc&&this.kc.parent(e),this.i&&this.i.O(e),this.I(2)),this.J(64)&&(s&&(s.ja(this.D,this.G,this.f,this.b),s.W()),this.I(64)),this.J(8)&&(e=this.zIndex(),s&&s.zIndex(e),this.o&&this.o.zIndex(e),this.kc&&this.kc.zIndex(e),this.i&&this.i.zIndex(e),this.I(8)),this.J(16)&&(this.ka(),this.ta("text",Uv(this)),this.da(!1),this.bi(this.kc,t),this.B(4),this.I(16)),this.J(4)){this.ba.textContent=Uv(this),e=(t=this.ba.getBBox()).height;var a,o=this.ja();this.o.width(e).height(e).ja(o),this.i.width(e).height(e).ja(o);var r=$.L(this.padding().g("top"),this.b);o=$.L(this.padding().g("left"),this.f);var l=this.padding().Ng(this.f),h=this.padding().Yh(this.b);switch(r=this.G+r+(h-t.height)/2,o=this.D+o+(l-t.width)/2,this.g("layout")){case"horizontal":var c=a=r,u=o-10-e,d=o+t.width+10;break;case"vertical":c=r-10-e,a=r+t.height+10,u=d=o+(t.width-e)/2}this.o.position({x:u,y:c}),this.kc.oc(1,0,0,1,0,0),this.kc.translate(o,r),this.i.position({x:d,y:a}),this.o.disabled(!this.aa),this.i.disabled(this.aa+1==this.P),this.o.W(),this.i.W(),this.I(4)}return s&&s.da(!1),n&&i.resume(),this},$.g.ob=function(){return Yv(this)},$.g.yd=function(){this.$b&&!this.J(4)||Xv(this);var t=this.ja();if(t=t?t.clone():$.kn(0,0,0,0),!this.enabled())return t;switch(this.g("orientation")){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.F=function(){var t=Sv.u.F.call(this);return $.Tq(this,ZF,t),t.background=this.background().F(),t.padding=this.padding().F(),t.margin=this.margin().F(),t},$.g.U=function(t,e){Sv.u.U.call(this,t,e),$.Iq(this,ZF,t,e),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin),"background"in t&&this.background().ga(!!e,t.background)},$.g.R=function(){$.sd(this.o,this.i,this.Wa,this.Qc,this.Ia,this.kc),this.kc=this.Ia=this.Qc=this.Wa=this.i=this.o=null,$.Xe(this.ba),Sv.u.R.call(this)};var $F=Sv.prototype;$F.background=$F.background,$F.padding=$F.padding,$F.margin=$F.margin,$F.currentPage=$F.UC,$F.getPagesCount=$F.i2,$.H(Zv,$.Y),Zv.prototype.ra=32768|$.Y.prototype.ra,Zv.prototype.sa=20|$.Y.prototype.sa;var Oda=Zv.prototype,aG={};$.rq(aG,1,"fill",$.Nq),$.rq(aG,1,"stroke",$.Jq),$.rq(aG,0,"width",$.br),$.rq(aG,0,"height",$.br),$.rq(aG,0,"orientation",$.Lk),Oda.LQ=aG,$.U(Zv,Zv.prototype.LQ),$.g=Zv.prototype,$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(this.Y&&$.kr(this.Y,this.Tc,this),(this.Y=t)?($.K(this.Y,this.Tc,this),this.margin().parent(this.Y.margin())):this.margin().parent(null)),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=1),this.B(e,i)},$.g.uo=function(){this.B(20,9)},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.$A,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.bf=function(t){return $.p(t)?(this.ep!=t&&(this.ep=t,this.B(16,1)),this):this.ep},$.g.W=function(){if(!this.zc())return this;this.Sc||(this.Sc=$.qk());var t=this.O(),e=t?t.Ja():null,i=e&&!e.yf();if(i&&e.suspend(),this.J(4)&&($v(this),this.I(4)),this.J(16)){this.Sc.fill(this.g("fill")),this.Sc.stroke(this.g("stroke")),this.Sc.clear();var n=new $.I(this.D,this.G,this.f,this.b);this.ep&&$.D(this.ep)&&this.ep(this.Sc,n),this.I(16)}return this.J(2)&&(this.enabled()&&this.Sc.parent(t),this.I(2)),this.J(8)&&(t=this.zIndex(),this.Sc.zIndex(t),this.I(8)),i&&e.resume(),this},$.g.remove=function(){this.Sc&&this.Sc.parent(null)},$.g.yi=function(){return this.$b&&!this.J(4)||$v(this),new $.I(0,0,this.$b.width,this.$b.height)},$.g.yd=function(){this.$b&&!this.J(4)||($v(this),this.I(4));var t=this.ja()||$.kn(0,0,0,0);if(!this.enabled())return t;switch(this.g("orientation")){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.$A=function(t){$.X(t,2)&&this.B(20,9)},$.g.Nb=function(){var t=this.g("orientation");return!$.p(t)||"top"==t||"bottom"==t},$.g.F=function(){var t=Zv.u.F.call(this);$.Tq(this,this.LQ,t,"Separator");var e=this.margin().F();return $.Jc(e)||(t.margin=e),t},$.g.U=function(t,e){Zv.u.U.call(this,t,e),$.Iq(this,this.LQ,t,e),"margin"in t&&this.margin().ga(!!e,t.margin)},$.g.R=function(){$.sd(this.Qc,this.Sc),this.Sc=this.Qc=null,Zv.u.R.call(this)};var bG=Zv.prototype;bG.margin=bG.margin,bG.getRemainingBounds=bG.yd,$.H($.aw,$.Y),$.aw.prototype.ra=32768|$.Y.prototype.ra,$.aw.prototype.sa=80|$.Y.prototype.sa,$.aw.prototype.o=$.vq(),$.U($.aw,$.aw.prototype.o),$.aw.prototype.K=function(){var t={};return $.sq(t,[[0,"width",$.br],[0,"height",$.br],[0,"align",Fk],[0,"orientation",function(t){return this.r3?"bottom"==t?t:"top":$.Lk(t)}],[0,"rotation",$.Bq],[0,"text",$.zq],[0,"maxLength",$.xq]]),t}(),$.U($.aw,$.aw.prototype.K),$.g=$.aw.prototype,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=function(){var t=this.jg();return t||(t=$.Ga(this.Wd(),bw(this),this.Xd()),this.jg(t)),t},$.g.Xd=function(){var t=[this.Nd];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=$.ir,$.g.ys=function(){return 9},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(this.Y&&$.kr(this.Y,this.Tc,this),(this.Y=t)?($.K(this.Y,this.Tc,this),this.background().df().parent(this.Y.background()),this.padding().parent(this.Y.padding()),this.margin().parent(this.Y.margin())):(this.background().parent(null),this.padding().parent(null),this.margin().parent(null))),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=32769),this.Xb=null,this.B(e,i)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.zB=function(t){this.P=0>t?null:t,$.p(this.height())||this.B(4)},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.Pk,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.Pk,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e))return this.nd(t);t in this.o&&this[t](e)}else if($.C(t))for(var i in t)i in this.o&&this[i](t[i]);return this}for(var n in i={},this.o){var s=this.g(n);$.p(s)&&(i[n]=s)}return i},$.g.W=function(){if(!this.zc())return this;var t=fw(this),e=this.O();return this.ka(),this.J(2)&&(this.wb.parent(e),this.I(2)),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(16)&&(this.bi(t),this.I(16)),this.J(4)&&(gw(this),this.kc.x($.L(this.padding().g("left"),this.f)),this.kc.y($.L(this.padding().g("top"),this.b)),this.wb.oc(this.i.od,this.i.We,this.i.gf,this.i.Le,this.i.Jd,this.i.Fd),this.B(64),this.I(4)),this.J(64)&&((t=this.background()).ka(),t.ja(0,0,this.f,this.b),t.W(),t.da(!1),this.I(64)),this.da(!1),this},$.g.remove=function(){this.wb?this.wb.parent(null):this.kc&&this.kc.parent(null)},$.g.yd=function(){var t=this.ja();if(t=t?t.clone():$.kn(0,0,0,0),!this.enabled())return t;switch(this.$b&&!this.J(4)||gw(this),this.g("orientation")){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.hH=ba(3),$.g.yi=function(){return this.enabled()?(this.$b&&!this.J(4)||gw(this),this.$b.clone()):new $.I(0,0,0,0)},$.g.tk=function(){var t=this.g("text"),e=$.ew(this);if($.p(t)||$.p(e))return t=!t&&$.p(e)?e:t,e=this.g("maxLength"),Du(t,e)},$.g.bi=function(t){var e=this.g("useHtml"),i=this.tk();(t||$.p(i)||$.p(e))&&(e?this.kc.htmlText(i):this.kc.text(i)),this.kc.fontSize(this.g("fontSize")),this.kc.fontFamily(this.g("fontFamily")),this.kc.color(this.g("fontColor")),this.kc.direction(this.g("textDirection")),this.kc.Xu(this.g("wordBreak")),this.kc.wordWrap(this.g("wordWrap")),this.kc.opacity(this.g("fontOpacity")),this.kc.er(this.g("fontDecoration")),this.kc.fontStyle(this.g("fontStyle")),this.kc.fontVariant(this.g("fontVariant")),this.kc.fontWeight(this.g("fontWeight")),this.kc.letterSpacing(this.g("letterSpacing")),this.kc.lineHeight(this.g("lineHeight")),this.kc.textIndent(this.g("textIndent")),this.kc.textShadow(this.g("textShadow")),this.kc.vAlign(this.g("vAlign")),this.kc.Bm(this.g("hAlign")),this.kc.textOverflow(this.g("textOverflow")),this.kc.Hm(this.g("selectable")),this.kc.Dd(this.g("disablePointerEvents"))},$.g.AA=function(){var t=this.nd("rotation");if(delete this.Nd.rotation,t=$.p(t)?t:this.g("rotation"),$.p(t))return t;switch(this.g("orientation")){case"left":return this.Nd.rotation=-90;case"right":return this.Nd.rotation=90;default:return this.Nd.rotation=0}},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.clear=function(){this.wb&&this.wb.Gi()},$.g.F=function(){var t={},e=$.V.prototype.g.call(this,"zIndex");return $.p(e)&&(t.zIndex=e),e=$.V.prototype.g.call(this,"enabled"),$.p(e)&&(t.enabled=e),$.Tq(this,this.o,t,"Title text"),$.Tq(this,this.K,t,"Title props"),e=this.margin().F(),$.Jc(e)||(t.margin=e),e=this.padding().F(),$.Jc(e)||(t.padding=e),e=this.background().F(),$.Jc(e)||(t.background=e),t},$.g.Zd=function(t){return $.z(t)?{text:t,enabled:!0}:$.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?(this.oa.enabled=i.enabled,"text"in i&&(this.oa.text=i.text)):(this.enabled(i.enabled),"text"in i&&this.text(i.text)),!0)},$.g.U=function(t,e){$.aw.u.U.call(this,t,e),$.Iq(this,this.o,t,e),$.Iq(this,this.K,t,e),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin),"background"in t&&this.background().ga(!!e,t.background)},$.g.R=function(){$.sd(this.Ia,this.Qc,this.Wa,this.wb),this.wb=this.Wa=this.Qc=this.Ia=null,$.aw.u.R.call(this)},$.H(hw,$.aw),$.xu(hw,$.aw),hw.prototype.gr=function(){var t=this.width(),e=this.height();return $.uo(t)||$.uo(e)||null===t||null===e};var cG=$.aw.prototype;cG.textSettings=cG.$d,cG.background=cG.background,cG.margin=cG.margin,cG.padding=cG.padding,cG.getRemainingBounds=cG.yd,cG=hw.prototype,$.E("anychart.standalones.title",(function(){var t=new hw;return t.ga(!0,$.nm("standalones.title")),t})),cG.draw=cG.W,cG.parentBounds=cG.ja,cG.container=cG.O,$.H(iw,$.od),$.g=iw.prototype,$.g.getContext=function(){return{parentElement:this.b,titleElement:this.o,separatorElement:this.f,contentElement:this.i}},$.g.Ya=function(){return kw(this),this.b},$.g.WP=function(){var t=$.Uf(this.Ya(),"margin");$.Cf(this.Ya(),this.gb.G.x-t.left,this.gb.G.y-t.top)},$.g.visible=function(t){return $.p(t)?($.Pf(this.Ya(),!!t),this):"none"!=this.Ya().style.display},$.g.rb=function(){var t=$.Lf(this.Ya());return new $.I(0,0,t.width,t.height)},$.g.O=function(t){if($.p(t)&&this.Jc!=t){if(null!==t)return this.Jc=t,t=this.Ya(),this.Jc.appendChild(t),this;this.remove()}return this.Jc},$.g.remove=function(){this.b&&($.Xe(this.b),this.Jc=null)},$.g.R=function(){this.remove(),this.b=this.o=this.f=this.i=this.gb=null,iw.u.R.call(this)},$.H(mw,$.od);var Pda={position:"absolute","z-index":9999,left:0,top:0,width:"100%",height:"100%","pointer-events":"none"},dG={position:"relative",left:0,top:0,overflow:"hidden",width:"100%",height:"100%"},Qda={position:"relative",left:0,top:0,opacity:1,"pointer-events":"none"};$.g=mw.prototype,$.g.T_=function(){$.uf(this.Ir,Pda),$.uf(this.b.Tl(),dG),$.uf(this.b.ia(),Qda)},$.g.O=function(t){return $.p(t)?(t!=this.Jc&&((this.Jc=t)?(this.Jc.appendChild(this.Ir),this.T_(),this.b.Dt()):$.Xe(this.Ir)),this):this.Jc},$.g.Ja=function(){return this.b},$.g.NA=function(){return!0},$.g.Hm=function(t){return $.p(t)?(this.o=t,this):this.o},$.g.R=function(){$.qd(this.b),this.b=null,$.Xe(this.Ir),this.Ir=null},$.H(nw,$.od),$.g=nw.prototype,$.g.he=0,$.g.R=function(){nw.u.R.call(this),this.stop(),delete this.b,delete this.qo},$.g.start=function(t){this.stop(),this.he=$.Dj(this.f,$.p(t)?t:this.i)},$.g.stop=function(){this.uq()&&$.Ej(this.he),this.he=0},$.g.uq=function(){return 0!=this.he},$.g.Ofa=function(){this.he=0,this.b&&this.b.call(this.qo)},$.H(pw,$.qf),pw.prototype.R=function(){Zd(this.o),pw.u.R.call(this)},pw.prototype.D=function(){this.f||(this.f=new nw(this.G,this.K,this),$.rd(this,this.f)),this.f.start()},pw.prototype.G=function(){if(!this.i.md){var t=this.b,e=ow(this.i);if(this.b=e,t){var i=!1;t.width!=e.width&&(this.dispatchEvent("b"),i=!0),t.height!=e.height&&(this.dispatchEvent("a"),i=!0),i&&this.dispatchEvent("resize")}else this.dispatchEvent("a"),this.dispatchEvent("b"),this.dispatchEvent("resize")}},$.H(qw,$.qf),qw.prototype.R=function(){qw.u.R.call(this),this.i&&(Zd(this.i),this.i=null),this.b=this.f=null},qw.prototype.o=function(){var t=$.Ee(this.f||window);$.mb(t,this.b)||(this.b=t,this.dispatchEvent("resize"))},$.H(rw,mw),$.ja(rw);var Rda={position:"absolute","z-index":9999,left:"-10000px",top:"-10000px"},Sda={position:"absolute","z-index":9999,left:0,top:0},Tda={position:"fixed",left:0,top:0,opacity:1,"pointer-events":"none"},Uda={position:"fixed",left:0,top:0,opacity:1,width:"1px",height:"1px"},Vda={position:"fixed",left:0,top:0,opacity:1,"pointer-events":"none",overflow:"",display:"",width:"",height:""};rw.prototype.T_=function(){var t=window.document;$.hd&&(!$.bd("7")||t.documentMode&&6>=t.documentMode)?$.uf(this.Ir,Sda):$.uf(this.Ir,Rda),"svg"==$.kk?($.uf(this.Ja().Tl(),dG),$.uf(this.Ja().ia(),Tda)):($.uf(this.Ja().Tl(),Uda),$.uf(this.Ja().ia(),Vda)),this.D()},rw.prototype.D=function(){if("svg"==$.kk){var t=this.f;t=t.b?t.b.clone():null,this.Ja().resize(t.width,t.height)}},rw.prototype.NA=function(){return!1},rw.prototype.R=function(){$.sd(this.i,this.f),this.f=this.i=null,rw.u.R.call(this)},$.H($.ww,$.Y),$.ww.prototype.sa=6080|$.Y.prototype.sa;var tw=1988;$.ww.prototype.ra=49152|$.Y.prototype.ra;var uw=1,vw=2;$.ww.prototype.ba=$.vq(),$.U($.ww,$.ww.prototype.ba);var Wda=$.ww.prototype,eG={};$.sq(eG,[[0,"width",$.br],[0,"height",$.br],[0,"titleFormat",$.ar],[0,"format",$.ar],[0,"unionFormat",$.ar],[0,"valuePrefix",$.zq],[0,"valuePostfix",$.zq],[0,"position",$.Ek],[0,"anchor",$.Dk],[0,"offsetX",$.Bq],[0,"offsetY",$.Bq],[0,"x",$.Bq],[0,"y",$.Bq],[0,"allowLeaveScreen",$.Dq],[0,"allowLeaveChart",$.Dq],[0,"allowLeaveStage",$.Dq],[0,"displayMode",function(t){return $.zk(Bda,t,"single")}],[0,"positionMode",function(t){return $.zk(Cda,t,"float")}],[0,"onDomReady",$.gr],[0,"onBeforeTitleChange",$.gr],[0,"onTitleChanged",$.gr],[0,"onBeforeContentChange",$.gr],[0,"onContentChanged",$.gr],[0,"hideDelay",$.Bq]]),Wda.OQ=eG,$.U($.ww,$.ww.prototype.OQ),$.g=$.ww.prototype,$.g.Lc=function(t,e){for(var i in this.o){var n=this.o[i];n&&n.Lc(t,e)}return Lw(this,t,e)},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e)||!(t in this.ba))return this.g(t);this[t](e)}else{for(var i in this.ka(),t)i in this.ba&&this[i](t[i]);this.da(!0)}return this}var n={};for(i in this.ba){var s=this.g(i);$.p(s)&&(n[i]=s)}return n},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Yia,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.Yia=function(t){$.X(t,2)&&(this.xE(),this.B(tw,1))},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),this.Ia.kb(this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(1024,1)},$.g.title=function(t){return this.jb||(this.jb=new $.aw,$.K(this.jb,this.gB,this),this.jb.kb(this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.gB=function(t){$.X(t,8)?(this.xE(),this.B(tw,1)):$.X(t,1)&&this.B(128,1)},$.g.$r=function(t){return this.aa||(this.aa=new Zv,$.K(this.aa,this.lja,this),this.aa.kb(this),$.W(this,"separator",this.aa)),$.p(t)?(this.aa.N(t),this):this.aa},$.g.lja=function(t){$.X(t,8)?(this.xE(),this.B(tw,1)):$.X(t,1)&&this.B(256,1)},$.g.W=function(){$.Kw(this);var t=this.g("useHtml");if(t){if(this.pf()||this.md)return this;if(!this.enabled())return this.J(1)&&(this.remove(),this.I(1),this.B(2)),this;if(!this.i.O())return this.remove(),this.I(2),this;this.I(1)}else if(!this.zc())return this;var e=this.background(),i=this.title(),n=this.$r(),s=this.Ri();if(Iw(this,this),this.J(8)&&(Hw(this).zIndex(this.zIndex()),this.I(8)),this.J(4)){Rw(this);var a=this.P;this.na=this.padding().Ej(a),this.Ka=this.ea=null,this.I(4)}return this.J(64)&&(this.G=null,Sw(this),t?this.i.WP():Hw(this).oc(1,0,0,1,this.G.x,this.G.y),this.I(64)),t?lw(this.i):(this.J(1024)&&(e.ka(),e.ja(this.P),e.O(Hw(this)),e.W(),e.da(!1),this.I(1024)),this.J(128)&&(i.ka(),i.ja(this.na),i.W(),i.da(!1),!this.ea&&i.enabled()&&(this.ea=i.yd()),this.I(128)),this.J(256)&&(n.ka(),n.ja(this.ea||this.na),n.W(),n.da(!1),!this.Ka&&n.enabled()&&(this.Ka=n.yd()),this.I(256)),this.J(512)&&(t=this.Ka||this.ea||this.na,s.ka(),this.bi(),s.ja(t),s.W(),s.da(!1),this.I(512)),this.J(4096)&&this.I(4096)),this},$.g.ya=function(t){return $.p(t)?(this.pa=t,this):this.pa},$.g.WP=function(t,e){var i=this.g("displayMode");if("single"==i&&(Bw(this,this.b,t,e),Jw(this.b,t,e)),"union"==i)Bw(this,this.b,t,e),Jw(this.b,t,e);else if("separated"==i)for(var n in this.o)(i=this.o[n])&&(Mw(this,i,t,e),Jw(i,t,e))},$.g.Ri=function(t){return this.Qd||(this.Qd=new $.xv,$.K(this.Qd,this.Mia,this),this.Qd.kb(this),this.Qd.width("100%").height("100%"),$.W(this,"contentInternal",this.Qd)),$.p(t)?(this.Qd.N(t),this):this.Qd},$.g.Mia=function(t){$.X(t,8)?(this.xE(),this.B(tw,1)):$.X(t,1)&&this.B(512,1)},$.g.xE=function(){this.G=this.P=null},$.g.remove=function(){this.g("useHtml")&&this.i&&this.i.remove(),Hw(this).parent(null)},$.g.Wj=function(){return this.Za||this.check(uw)&&!$.Jc(this.o)},$.g.ob=function(){this.G=null,Sw(this);var t=this.g("useHtml"),e=t?0:this.g("offsetX");return t=t?0:this.g("offsetY"),new $.I(this.G.x+e,this.G.y+t,this.P.width,this.P.height)},$.g.yi=function(){return Rw(this),this.P},$.g.bi=function(){if(this.J(512)){for(var t in this.Ri().ka(),this.ba){var e=this.g(t);$.p(e)&&this.Ri().$d(t,e)}this.Ri().adjustFontSize(this.g("adjustFontSize")),this.Ri().minFontSize(this.g("minFontSize")),this.Ri().maxFontSize(this.g("maxFontSize")),this.Ri().da(!1)}},$.g.uL=function(){this.D&&this.D.uq()?this.$a=!0:($.qd(this.D),this.D=new nw((function(){this.remove(),this.$a&&(this.$a=!1,this.uL())}),this.g("hideDelay"),this))},$.g.ZN=function(t){if(Pw(this,t.clientX,t.clientY))this.f.NA()||this.f.Hm(!0);else{$.Yd(window.document,"mousemove",this.ZN,!1,this);var e=Hw(this).ia();e&&($.Yd(e,"mouseenter",this.xY,!1,this),$.Yd(e,"mouseleave",this.yY,!1,this)),this.fN(t)}},$.g.xY=function(){$.Yd(window.document,"mousemove",this.ZN,!1,this),Hw(this).ia()&&$.Yd(Hw(this).ia(),"mouseenter",this.xY,!1,this),this.K=null},$.g.yY=function(t){Hw(this).ia()&&$.Yd(Hw(this).ia(),"mouseleave",this.yY,!1,this),this.fN(t)},$.g.fN=function(t){if(2==t.kf.buttons)return!0;this.f.NA()||this.f.Hm(!1),Hw(this).ia()&&$.Yd(Hw(this).ia(),"mouseleave",this.fN,!1,this),this.K=null,this.g("hideDelay")?(this.uL(),this.D.uq()||this.D.start()):this.Lc(!0)},$.g.parent=function(t){if($.p(t)){if(this.Y!=t){var e=String($.oa(this));null===t?($.kr(this.Y,this.Tc,this),this.title().parent(null),this.$r().parent(null),this.background().parent(null),this.padding().parent(null),this.Ri().parent(null),this.Ri().padding().parent(null),delete this.Y.o[e],this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,this.title().df().parent(this.Y.title()),this.$r().df().parent(this.Y.$r()),this.background().df().parent(this.Y.background()),this.padding().parent(this.Y.padding()),this.Ri().parent(this.Y.Ri()),this.Ri().padding().parent(this.Y.Ri().padding()),this.Y.o[e]=this,this.bL(),$.K(this.Y,this.Tc,this))}return this}return this.Y},$.g.Tc=function(t){var e=0,i=0;this.bL(),($.X(t,8)||$.X(t,1))&&(e|=tw,i|=8,this.xE()),$.X(t,32768)&&(e|=1,i|=1),this.Xb=null,this.B(e,i)},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=$.ir,$.g.check=function(t){return!$.p(t)||!!(t&this.fb)},$.g.bL=function(){if(this.g("useHtml")){if(!ZE){ZE=!0;var t=$.ye(),e=$.Ae(t.b,"HEAD",void 0,void 0)[0];if(!e){var i=$.Ae(t.b,"BODY",void 0,void 0)[0];e=t.Ac("HEAD"),i.parentNode.insertBefore(e,i)}(i=t.Ac("STYLE")).innerHTML=".anychart-tooltip {border-radius: 3px;padding: 5px 10px;background: rgba(33, 33, 33, 0.7);border: none;display: inline-block;box-sizing: border-box;letter-spacing: normal;color: #fff;font-family: Verdana, Helvetica, Arial, 'sans-serif';font-size: 12px;position: absolute;pointer-events: none;margin: 10px 0px 10px 10px;}.anychart-tooltip-separator {color: rgba(206, 206, 206, 0.3);border: none;height: 1px;margin: 5px 0;}.anychart-tooltip-title{font-size: 14px;}",t.Yga(e,i,0)}this.i||(this.i=new iw(this))}else this.i&&this.i.remove();for(var n in this.o)this.o[n].bL();this.G=this.P=null},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=function(){var t=this.jg();return t||(t=$.Ga(this.Wd(),[this.Ha],this.Xd()),this.jg(t)),t},$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.F=function(){var t=$.ww.u.F.call(this);$.Tq(this,this.ba,t,void 0,void 0,!0),$.Tq(this,this.OQ,t,void 0,void 0,!0),delete t.x,delete t.y,delete t.zIndex;var e=this.title().F();return $.Jc(e)||(t.title=e),e=this.$r().F(),$.Jc(e)||(t.separator=e),e=this.background().F(),$.Jc(e)||(t.background=e),e=this.padding().Pa,$.Jc(e)||(t.padding=e),t},$.g.U=function(t,e){$.ww.u.U.call(this,t,e),$.Iq(this,this.ba,t,e),$.Iq(this,this.OQ,t,e),this.title().ga(!!e,t.title),this.$r().ga(!!e,t.separator),this.background().ga(!!e,t.background),this.padding().ga(!!e,t.padding);var i=t.contentInternal||{};i.position=i.position?i.position:"left-top",i.anchor=i.anchor?i.anchor:"left-top",this.Ri(i)},$.g.R=function(){if(delete this.Pa,delete this.oa,this.Y){var t=String($.oa(this));$.kr(this.Y,this.Tc,this),delete this.Y.o[t]}for(var e in this.o)(t=this.o[e])&&$.qd(t);if(this.f&&!this.f.NA()&&this.O(null),$.sd(this.jb,this.aa,this.Qd,this.Ia,this.Wa,this.Oa,this.D,this.i),this.i=this.D=this.Oa=this.Wa=this.Ia=this.Qd=this.aa=this.jb=null,this.f&&this.f.NA()&&Tw(this)){for(e in t=!0,sw)if(sw.hasOwnProperty(e)){var i=sw[e];if(i!=this&&this.f==i.f){t=!1;break}}t&&(e=Uw(this),delete Vw[e],$.qd(this.f))}delete this.f,delete sw[String($.oa(this))],$.ww.u.R.call(this)};var fG=$.ww.prototype;fG.title=fG.title,fG.separator=fG.$r,fG.background=fG.background,fG.padding=fG.padding,fG.hide=fG.Lc,fG.textSettings=fG.$d,$.H($.Ww,tv),$.Ww.prototype.ra=tv.prototype.ra;var gG=function(){function t(t){return function(e){var i="itemsSpacing"==t?(0,window.parseFloat)(e):Number(e);return null===e?this.vf(t):(0,window.isNaN)(i)?this.g(t):i}}var e={};return $.sq(e,[[0,"inverted",$.Dq],[0,"itemsLayout",eba],[0,"iconSize",$.N],[0,"width",$.Cq],[0,"height",$.Cq],[0,"maxWidth",$.Cq],[0,"maxHeight",$.Cq],[0,"position",function(t){return $.C(t)?(t.x=$.L(t.x)||0,t.y=$.L(t.y)||0,t):$.Lk(t)}],[0,"positionMode",hba],[0,"drag",$.Dq],[0,"itemsFormat",$.Cq],[0,"titleFormat",$.Cq],[0,"itemsHAlign",Fk],[0,"itemsSpacing",t("itemsSpacing")],[0,"itemsSourceMode",pba],[0,"hoverCursor",Ck],[0,"iconTextSpacing",t("iconTextSpacing")],$.Z.eK]),e}();$.U($.Ww,gG),$.g=$.Ww.prototype,$.g.sa=4032|tv.prototype.sa,$.g.items=function(t){return $.p(t)?(this.Ka!=t&&(this.Ka=t,this.B(1040,1)),this):this.Ka},$.g.RA=function(t){return $.p(t)?(t=$.A(t)?$.Ja(t,0):null===t?t:[t],Xw(this,t)||(this.f=t,this.B(1040,1)),this):this.f},$.g.tR=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,this.B(1040,1)),this):this.aa},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.Pk,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.title=function(t){return this.jb||(this.jb=new $.aw,$.K(this.jb,this.Mq,this),this.jb.kb(this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.Mq=function(t){var e=0,i=0;$.X(t,1)&&(e|=128,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.wY=function(t){return this.i||(this.i=new Zv,$.K(this.i,this.hla,this),$.W(this,"titleSeparator",this.i)),$.p(t)?(this.i.N(t),this):this.i},$.g.hla=function(t){var e=0,i=0;$.X(t,1)&&(e|=256,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.WI=function(t){return this.K||(this.K=new Sv,$.K(this.K,this.vja,this),$.W(this,"paginator",this.K)),$.p(t)?(this.K.N(t),this):this.K},$.g.vja=function(t){var e=0,i=0;$.X(t,1)&&(e|=512,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.Ua=function(t){return this.gb||(this.gb=new $.ww(0),$.K(this.gb,this.Bp,this),$.Aw(this.gb,this),this.gb.Ga($.ur.tooltip),$.W(this,"tooltip",this.gb),this.gb.ga(!0,this.gb.oa)),$.p(t)?(this.gb.N(t),this):this.gb},$.g.Bp=function(){var t=this.Ua();t.O()&&t.W()},$.g.ja=function(t,e,i,n){return $.Ww.u.ja.call(this,t,e,i,n)},$.g.yd=function(){var t=this.ja()||$.kn(0,0,0,0);if(!this.enabled()||"inside"==this.g("positionMode"))return t;this.$b&&!this.J(4)||this.Mm();var e=this.g("position");if($.C(e))return t;switch(e){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;default:case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.ob=function(){return this.$b&&!this.J(4)||this.Mm(),this.$b},$.g.T5=function(t){if(void 0===this.Na)this.EW=!0,this.DW=[t];else{this.EW=!1,this.DW=null;var e=this.ob(),i=this.ja();this.ea=t.x,this.na=t.y,this.FG=!0,this.Sb=(this.ea-i.left)/i.width,this.qc=(this.na-i.top)/i.height,this.ec=(i.width-(this.ea-i.left+e.width))/i.width,this.sb=(i.height-(this.na-i.top+e.height))/i.height,this.B(4,1)}},$.g.Daa=function(){if(void 0===this.Na)return null;var t=this.Na.Pd;return{x:t.Jd,y:t.Fd}},$.g.Mm=function(){var t=this.ja();null!=t&&0>=t.width&&0>=t.height&&(t=null);var e,i,n=this.margin(),s=this.padding(),a=0,o=0,r=this.g("width"),l=this.g("height"),h=this.g("maxWidth"),c=this.g("maxHeight");if(t){var u=t.width,d=t.height;if(null!=r){var p=Math.min(u,$.L(r,u),null!=h?$.L(h,u):u);h=s.Ng(n.Ng(p))}else h=null!=h?s.Ng(n.Ng($.L(h,u))):s.Ng(n.Ng(u));if(null!=l)var g=Math.min(d,$.L(l,d),null!=c?$.L(c,d):d),f=s.Yh(n.Yh(g));else f=null!=c?s.Yh(n.Yh($.L(c,d))):s.Yh(n.Yh(d))}else $.ea(r)&&!(0,window.isNaN)(r)?(p=r,h=s.Ng(r)):h=$.ea(h)&&!(0,window.isNaN)(h)?s.Ng(h):window.Infinity,$.ea(l)&&!(0,window.isNaN)(l)?(g=l,f=s.Yh(l)):f=$.ea(c)&&!(0,window.isNaN)(c)?s.Yh(c):window.Infinity;l=$.wr(this,"titleSeparator"),c=$.wr(this,"paginator"),r=$.wr(this,"title");var b=c&&c.g("orientation"),v="bottom"==b||"top"==b,m=r&&(r.g("orientation")||$.dw(r));m=m&&("bottom"==m||"top"==m);var y=r?0==r.AA()%180:0,S=l&&l.Nb();l&&l.ka(),c&&c.ka(),r&&r.ka();var w=e=null;do{e&&(w=e);var x=i=0,C=0,D=0;if(r&&r.enabled()){r.ja(null),cw(r,null),r.zB(null);var T=r.yi();m?(T.width>h&&(y?cw(r,h):r.zB(h),T=r.yi()),D=T.width,i+=T.height):(T.height>f&&(y?r.zB(f):cw(r,f),T=r.yi()),C=T.height,x+=T.width)}else T=null;l&&l.enabled()?(l.ja(null),e=l.yi(),S?i+=e.height:x+=e.width):e=null;var k=h-x,O=Cca(this,k,f-i),P=O.width;i+=O=O.height,x+=P,C=Math.max(C,O),D=Math.max(D,P),x=Math.max(D,x),D=Math.max(C,i),C=f,m&&(C-=T?T.height:0),S&&(C-=e?e.height:0),c.ja(null),i=Yv(c,1);var L=this.g("itemsLayout");if("horizontal"==L?P>k&&this.Ub&&1<this.Ub.length?Vv(c,!0):Vv(c,!1):"vertical-expandable"==L?P>k&&1<this.me?Vv(c,!0):Vv(c,!1):"vertical"!=L&&"horizontal-expandable"!=L||(O>C&&this.Ub&&1<this.Ub.length?Vv(c,!0):Vv(c,!1)),Wv(c)&&(v?(x=Math.max(x,i.width),D+=i.height):(x+=i.width,D=Math.max(D,i.height))),x=Math.min(x,h),C=Math.min(D,f),k=n.Lk(s.Lk(x)),O=n.$j(s.$j(C)),r&&r.enabled()){if(L=T.width,m||y){if(y&&!m){var G;D=Wv(c)?i.width:0;var F=(this.Ub&&this.Ub.length?this.Ub[0].ob().width:0)+D;G=P+D>=h-T.width?F:P,T=Math.max(Math.min(r.text().length,1),r.margin().Ng(x-L<=G?x-G:L)),cw(r,T)}else!y&&D>f&&(T=0,e&&S&&(T+=e.height),"top"!=b&&"bottom"!=b||(T+=i.height),P=Wv(c)&&!v?i.height:0,P=Math.max(this.Ub&&this.Ub.length?this.Ub[0].ob().height:0,P),T=Math.max(1,r.margin().Yh(f-T-P)),y?r.zB(T):cw(r,T));T=r.yi(),l&&(l.width(k),e=l.yi())}else T=r.yi(),l&&(l.width(O),e=l.yi());m?C-=T.height:x-=T.width}for(l&&l.enabled()&&(S?C-=e.height:x-=e.width),T=x,e=C,Wv(c)&&(v?e=C-i.height:T=x-i.width),P=T,x=e,this.b=[],e=0,C=this.Ub&&this.Ub.length,i=this.g("itemsSpacing"),T=0;T<C&&T in this.G;T++);if(0<x&&this.Ub&&T!=C)switch(this.b[e]=[],this.b[e][0]=this.Ub[T],this.g("itemsLayout")){case"horizontal":for(x=this.Ub[T].ob().zd(),T+=1;T<C;T++)T in this.G||(x+i+this.Ub[T].ob().zd()>P?(e++,this.b[e]=[],this.b[e][0]=this.Ub[T],x=this.Ub[T].ob().zd()):(x=x+i+this.Ub[T].ob().zd(),this.b[e].push(this.Ub[T])));break;case"vertical":for(P=this.Ub[T].ob().qd(),T+=1,C=this.Ub.length;T<C;T++)T in this.G||(P+i+this.Ub[T].ob().qd()>x?(e++,this.b[e]=[],this.b[e][0]=this.Ub[T],P=this.Ub[T].ob().qd()):(P=P+i+this.Ub[T].ob().qd(),this.b[e].push(this.Ub[T])));break;case"horizontal-expandable":var I=this.Ub[T].ob().zd()+i,E=this.Ub[T].ob().qd()+i,A=0;for(T+=1;T<C;T++)T in this.G||(L=(F=this.Ub[T]).ob().zd(),D=F.ob().qd(),I+L>P?((A+=E)+D>x?(e++,this.b[e]=[],this.b[e][0]=F,A=0):this.b[e].push(F),I=L+i,E=D+i):(I+=L+i,E=Math.max(E,D+i),this.b[e].push(F)));break;case"vertical-expandable":for(I=this.Ub[T].ob().zd()+i,E=this.Ub[T].ob().qd()+i,A=0,T+=1;T<C;T++)T in this.G||(L=(F=this.Ub[T]).ob().zd(),E+(D=F.ob().qd())>x?((A+=I)+L>P?(e++,this.b[e]=[],this.b[e][0]=F,A=0):this.b[e].push(F),I=L+i,E=D+i):(I=Math.max(I,L+i),E+=D+i,this.b[e].push(F)))}(i=$.wr(this,"paginator"))&&Nv(i,e+1),c.ja(null),e=c.ob()}while(!$.nb(w,e));if(p||(p=k),g||(g=O),this.$b=new $.I(a,o,p,g),this.FG)a=this.Sb<this.ec?Math.max(t.left,this.Sb*t.width+t.left):Math.min(t.cb(),t.cb()-(this.ec*t.width+p)),o=this.qc<this.sb?Math.max(t.top,this.qc*t.height+t.top):Math.min(t.Va(),t.Va()-(this.sb*t.height+g)),$.qb(t,this.$b)||(a<t.left&&(a=t.left),a+p>t.cb()&&(a=t.cb()-p),o<t.top&&(o=t.top),o+g>t.Va()&&(o=t.Va()-g));else if(t){switch(n=this.g("position"),s=this.g("align"),a=t.tb(),o=t.Vb(),n){case"left":case"right":switch(s){case"center":o+=(d-g)/2;break;case"right":case"bottom":o=t.Va()-g}break;case"top":case"bottom":switch(s){case"center":a+=(u-p)/2;break;case"right":case"bottom":a=t.cb()-p}}switch(n){case"right":a=t.cb()-p;break;case"bottom":o=t.Va()-g}}else a=$.L(n.g("left"),0),o=$.L(n.g("top"),0);this.$b.left=a,this.$b.top=o,this.padding().Ej(this.margin().Ej(this.$b)),(t=this.$b.clone()).left=0,t.top=0,this.Ha=this.margin().Ej(t),this.Od=this.padding().Ej(this.Ha),l&&l.da(!1),c&&c.da(!1),r&&r.da(!1),this.I(4)},$.g.remove=function(){this.Na&&this.Na.parent(null)},$.g.W=function(){if(!this.zc())return this;this.Na||(this.Na=$.ok(),$.ru(this,this.Na),this.ba||(this.ba=$.ok(),this.ba.parent(this.Na).zIndex(20))),this.J(8)&&(this.Na.zIndex(this.zIndex()),this.I(8));var t,e=this.O(),i=e?e.Ja():null;if(this.J(2)&&(this.Na.parent(e),this.I(2),"svg"==$.kk&&(this.P=$.mg(),e=this.P.Xp(),this.D=this.P.Wo(),e.appendChild(this.D))),(e=i&&!i.yf())&&i.suspend(),this.J(1024)&&(this.$a=!0,this.I(1024)),this.J(16)){var n=this.tR(),s=Dca(this);this.g("inverted")&&(s=s.reverse()),s=$.D(n)?n(s):s,this.Ub&&this.Ub.length!=s.length&&(this.$a=!0),n=Eca(this,s),Fca(this,n),this.I(16)}if(this.EW&&this.T5.apply(this,this.DW),Gca(this),this.J(4)){if(this.Ub&&"..."==this.g("textOverflow"))for(n=0,s=this.Ub.length;n<s;n++)this.Ub[n].ja(null),this.Ub[n].Rh().width(null);this.Mm(),this.B(3008),this.Na.oc(1,0,0,1,this.$b.left,this.$b.top),this.Na.clip(this.Ha),this.I(4)}(this.J(64)&&((n=$.wr(this,"background"))&&(n.ka(),n.ja(this.Ha),this.enabled()&&n.O(this.Na),n.da(!1),n.W()),this.I(64)),this.J(128)&&((n=$.wr(this,"title"))&&(n.ka(),n.ja(this.Od),this.enabled()&&n.O(this.Na),n.da(!1),n.W()),this.I(128)),n=this.jb?this.jb.yd():this.Od,this.J(256)&&((s=$.wr(this,"titleSeparator"))&&(s.ka(),s.ja(n),this.enabled()&&s.O(this.Na),s.da(!1),s.W()),this.I(256)),s=this.i?this.i.yd():n,n=$.wr(this,"paginator"),this.J(512)&&(n&&(n.ka(),n.ja(s),this.enabled()&&n.O(this.Na),n.da(!1),n.W()),this.I(512)),s=n&&Wv(n)?n.yd():s,n=n&&Wv(n)?n.UC()-1:0,s.width=Math.max(1,s.width),s.height=Math.max(1,s.height),Hca(this,n,s.ceil()),this.J(2048))&&(!this.ko&&this.g("drag")&&(this.ko=this.Na.rect(),this.ko.fill($.bm).stroke(null).zIndex(0),this.Na.wa("beforedrag",(function(){this.FG=!0,this.fb||(this.fb=!0,this.Ba||(this.Ba=$.mk(),this.Ba.fill($.bm).stroke(null).zIndex(100)),this.Ba.Qf(this.Ha),this.Ba.parent(this.Na),this.dispatchEvent("dragstart"))}),!1,this),this.Na.wa("drag",this.pga,!1,this),this.Na.wa("end",(function(){var t=this.Na.Pd,e=this.ob(),i=this.ja();this.ea=t.Jd,this.na=t.Fd,this.Sb=(this.ea-i.left)/i.width,this.qc=(this.na-i.top)/i.height,this.ec=(i.width-(this.ea-i.left+e.width))/i.width,this.sb=(i.height-(this.na-i.top+e.height))/i.height,this.fb&&(this.fb=!1,this.Ba.parent(null),this.dispatchEvent("dragend"))}),!1,this)),n=!1,this.g("drag")&&(n=this.margin().Ej("inside"==this.g("positionMode")?this.ja():(t=gaa(this.ja(),this.yd())).length?t[0]:$.kn(0,0,0,0))),this.ko&&this.ko.Qf(this.Ha),this.Na.Om(n),this.I(2048));return e&&i.resume(),this},$.g.pga=function(t){return this.dispatchEvent(t.type)},$.g.ig=function(t){t=$.Ww.u.ig.call(this,t);var e=$.so(t.domTarget);return e=$.N(e&&e.index),(0,window.isNaN)(e)||(t.itemIndex=e),t},$.g.Eaa=function(t){var e=ax(this,t);if(e&&this.dispatchEvent(e))switch(e.type){case"legenditemmouseover":var i=this.Ub&&this.Ub[e.itemIndex];e=e.itemSource,i&&(e&&$.D(e.wq)&&e.wq(i,t),i.za=!0,Ev(i,!0),Av(i,!0),Dv(i,!0),t&&Yw(this,t));break;case"legenditemmousemove":t&&Yw(this,t);break;case"legenditemmouseout":i=this.Ub&&this.Ub[e.itemIndex],e=e.itemSource,i&&(e&&$.D(e.vq)&&e.vq(i,t),(t=i).za=!1,Ev(t,!1),Av(t,!1),Dv(t,!1),this.Ua().Lc());break;case"legenditemclick":t.button==$.Ri&&(i=this.Ub&&this.Ub[e.itemIndex],e=e.itemSource,i&&e&&$.D(e.zr)&&e.zr.call(e,i,t))}},$.g.Ih=function(t){(t=ax(this,t))&&this.dispatchEvent(t)},$.g.F=function(){var t=$.Ww.u.F.call(this);return $.Tq(this,gG,t),t.margin=this.margin().F(),t.padding=this.padding().F(),t.background=this.background().F(),t.title=this.title().F(),t.titleSeparator=this.wY().F(),t.paginator=this.WI().F(),t.tooltip=this.Ua().F(),$.p(this.items())&&(t.items=this.items()),t},$.g.U=function(t,e){$.Ww.u.U.call(this,t,e),$.Iq(this,gG,t,e),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin),"title"in t&&this.title().ga(!!e,t.title),"background"in t&&this.background().ga(!!e,t.background),"titleSeparator"in t&&this.wY().ga(!!e,t.titleSeparator),"paginator"in t&&this.WI().ga(!!e,t.paginator),this.Ua().ga(!!e,t.tooltip),this.items(t.items),this.tR(t.itemsFormatter)},$.g.R=function(){$.Ww.u.R.call(this),this.D&&($.Ve(this.D),$.Xe(this.D)),$.sd(this.ko,this.gb,this.K,this.o,this.Ub,this.ba,this.Qc,this.Wa,this.Ia,this.jb,this.i,this.gb,this.Na,this.D),this.D=this.Na=this.gb=this.i=this.jb=this.Ia=this.ba=this.K=this.Wa=this.Qc=this.Ub=this.o=this.ko=null},$.H(bx,$.Ww),$.xu(bx,$.Ww),bx.prototype.gr=function(){var t=this.g("width"),e=this.g("height");return $.uo(t)||$.uo(e)||null===t||null===e},bx.prototype.Hd=function(t){if($.X(t,64)){this.ka(),t=t.target.d2(this.g("titleFormat"));var e=$.wr(this,"title");e&&null!==t&&$.ew(e,t),this.B(1040),this.O()&&this.W(),this.da(!1)}},bx.prototype.RA=function(t){if($.p(t)){if(t=$.A(t)?$.Ja(t,0):null===t?t:[t],!Xw(this,t)){if(this.f)for(var e,i=0;i<this.f.length;i++)(e=this.f[i]).NI&&e.NI()&&$.kr(e,this.Hd,e);if(this.f=t)for(e=0;e<this.f.length;e++)(t=this.f[e]).NI&&t.NI()&&$.K(t,this.Hd,this);this.B(1040,1)}return this}return this.f};var hG=$.Ww.prototype;hG.items=hG.items,hG.itemsFormatter=hG.tR,hG.margin=hG.margin,hG.padding=hG.padding,hG.background=hG.background,hG.title=hG.title,hG.titleSeparator=hG.wY,hG.paginator=hG.WI,hG.tooltip=hG.Ua,hG.getRemainingBounds=hG.yd,hG.getPixelBounds=hG.ob,hG.getCurrentPosition=hG.Daa,hG=bx.prototype,$.E("anychart.standalones.legend",(function(){var t=new bx;return t.N($.nm("standalones.legend")),t})),hG.draw=hG.W,hG.parentBounds=hG.ja,hG.container=hG.O,hG.itemsSource=hG.RA,$.H($.cx,$.V),$.cx.prototype.ra=2;var iG=function(){var t={};return $.sq(t,[[0,"enabled",$.Dq],[0,"duration",function(t){return null===t?this.vf("duration"):$.P(t,this.g("duration"),!0)}]]),t}();$.U($.cx,iG),$.cx.prototype.F=function(){var t={};return $.Tq(this,iG,t),t},$.cx.prototype.U=function(t,e){$.Iq(this,iG,t,e)},$.cx.prototype.Zd=function(t,e,i){return e=null,$.da(t)||null===t?(e={enabled:!!t},$.p(i)&&(e.duration=i)):(0,window.isNaN)(+t)||(e={enabled:!0,duration:+t}),e},$.cx.prototype.Ie=function(t,e){var i=this.Zd(e);return!!i&&("enabled"in i&&this.enabled(i.enabled),"duration"in i&&this.duration(i.duration),!0)},$.H(dx,$.V);var jG={};$.sq(jG,[[0,"enabled",$.Dq],[0,"titleFormat",$.ar]]),$.U(dx,jG),$.g=dx.prototype,$.g.ra=10|$.V.prototype.ra,$.g.PW=function(t){$.X(t,8)&&this.enabled(this.Us.g("enabled"))},$.g.F=function(){var t=dx.u.F.call(this);return $.Tq(this,jG,t),t},$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:$.D(t)?{titleFormat:t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&("enabled"in i&&this.enabled(i.enabled),"titleFormat"in i&&this.titleFormat(i.titleFormat),!0)},$.g.U=function(t,e){dx.u.U.call(this,t,e),$.Iq(this,jG,t,e)},$.g.R=function(){this.ya=null,this.Us&&(this.Us.va(2),$.kr(this.Us,this.PW,this)),this.Us=null,dx.u.R.call(this)},$.H(fx,dx);var kG={};$.rq(kG,0,"mode",(function(t){return $.zk(Fda,t,"chart-elements")})),$.U(fx,kG),$.g=fx.prototype,$.g.HS=function(){var t=this.ya;t.iL||(t.iL=new $.Fw);var e={chart:{value:t,type:""}};return t.iL.Li([t]),$.ov(t.iL,e)},$.g.JR=function(){var t=this.ya.Na;if(t.Cd("role",null),t.Cd("aria-hidden","true"),t.Cd("aria-label",null),$.Xe(this.tE),this.tE=null,this.g("enabled")){var e=this.HS();if(this.g("titleFormat")){var i=this.g("titleFormat");$.z(i)&&(i=$.Nu($.Lu.Id(),i)),i=i.call(e,e)}(e=$.wr(this.ya,"title"))&&!i&&e.g("text")&&e.enabled()&&(i=e.g("text")),"data-table"==this.g("mode")?(this.tE=this.ya.G6(i),(t=this.ya.O().O())&&$.We(t,this.tE,0)):i&&(t.Cd("aria-label",i),t.Cd("aria-hidden",null),t.Cd("role","article"))}},$.g.F=function(){var t=fx.u.F.call(this);return $.Tq(this,kG,t),t},$.g.U=function(t,e){fx.u.U.call(this,t,e),$.Iq(this,kG,t)},$.g.R=function(){$.Xe(this.tE),this.tE=null,fx.u.R.call(this)},$.H(gx,dx),gx.prototype.JR=function(){var t=null,e=null,i=this.Sa.sl()||this.b;this.g("enabled")&&this.g("titleFormat")&&(t=this.HS(),e=this.g("titleFormat"),$.z(e)&&(e=$.Nu($.Lu.Id(),e)),t=e.call(t,t),e="img"),this.Sa.check(4)&&!this.b&&(i=this.b=this.Sa.sl().Bd()),i.Cd("aria-label",t),i.Cd("role",e)},gx.prototype.HS=function(){return this.Sa.Rk()},gx.prototype.R=function(){$.qd(this.b),this.Sa=null,gx.u.R.call(this)},$.H($.hx,$.V);var lG={},nG;$.sq(lG,[[0,"spotRadius",$.P],[0,"multiSelectOnClick",$.Dq],[0,"unselectOnClickOutOfPoint",$.Dq],[0,"hoverMode",$.Ak],[0,"selectionMode",$.Bk],[0,"zoomOnMouseWheel",$.Dq],[0,"scrollOnMouseWheel",$.Dq]]),$.U($.hx,lG),$.hx.prototype.ra=2,$.hx.prototype.U=function(t,e){$.Iq(this,lG,t,e)},$.hx.prototype.F=function(){var t={};return $.Tq(this,lG,t),t},$.ix.prototype.Lh=function(t,e,i){var n;if($.p(e)){var s=this.target.pq(),a=this.target.$(),o=a.Hb(),r=!0;if($.da(e)&&e){for(e=a.ma(),n=o;n--;)s=$.lx(this,t,n,i,s),r=!1;a.select(e)}else if($.A(e))for($.Pa(e),n=e.length;n--;)(a=+e[n])<o&&(s=$.lx(this,t,a,i,s),r=!1);else+e<o&&(s=$.lx(this,t,+e,i,s),r=!1);r||this.target.wm(s)}else if(!(this.Gc&t)){for(i=$.gm,t==$.gm||t==$.vo?i=$.vo:t==$.wo&&(i=$.wo|$.vo),n=this.b.length;n--;)$.px(this,i,n)&&(this.target.$().select(this.f[n])&&this.target.pk($.gm),$.Ca(this.b,n,1),$.Ca(this.f,n,1));if(this.target.wm(),$.kx(this)){if(this.target.pf())if(this.target.eh())for(a=this.target.Ec();a.advance();)n=a.ma(),a.select(n)&&$.kx(this,n)&&this.target.ml(t);else $.kx(this,window.NaN)&&this.target.ml(t);this.Gc=t}}},$.ix.prototype.Vh=function(t,e){if($.p(e)){var i=this.target.pq(),n=this.target.$(),s=this.target.$().Hb();if($.da(e)&&e){for(var a=n.ma();s--;)i=$.rx(this,t,s,i);n.select(a)}else if($.A(e))for($.Pa(e),s=e.length;s--;)i=$.rx(this,t,+e[s],i);else if((0,window.isNaN)(e))for(s=this.f.length;s--;)i=$.jx(this,t,s);else i=$.rx(this,t,+e,i);this.target.wm(i),this.target.eh()||"single"!=this.target.Xl()||this.target.ml($.mx(this,$.wo)?$.wo:$.mx(this,$.vo)?$.vo:$.gm)}else{for(s=this.b.length;s--;)$.px(this,t,s)&&(this.target.$().select(this.f[s])&&this.target.pk($.gm),$.Ca(this.f,s,1),$.Ca(this.b,s,1));if(this.target.wm(),this.Gc&=~t,this.target.pf())if(this.target.eh())for(n=this.target.Ec();n.advance();)i=n.ma(),n.select(i)&&$.kx(this,i)&&this.target.ml(this.Gc);else this.target.ml(this.Gc)}},$.ix.prototype.fk=function(){return this.Gc},$.H($.ux,$.wu),$.g=$.ux.prototype,$.g.ra=$.wu.prototype.ra,$.g.sa=3552|$.wu.prototype.sa,$.g.DP=function(){return!0},$.g.uN=function(){return!1},$.g.r6=function(){return!0},$.g.eg=function(t){return $.il(8),$.p(t)?this:null},$.g.ef=function(){return null},$.g.aj=function(){return!1},$.g.ou=ba(15),$.g.O0=function(){var t=$.lk();return t.Ax=this.Ax,t.Xo(sv(this.Xo())),t},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.$A,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.$A=function(t){$.X(t,2)&&this.B(4,9)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(t){$.X(t,2)&&this.B(4,9)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.title=function(t){return this.jb||(this.jb=new $.aw,this.jb.kb(this),$.K(this.jb,this.QW,this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.QW=function(t){var e=0,i=0;$.X(t,1)&&(e|=160,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.label=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=this.sv[i];return s||((s=this.tL()).kb(this),s.Ga("defaultFontSettings","defaultLabelSettings"),this.sv[i]=s,$.K(s,this.Tia,this),this.B(256,1)),$.p(n)?(s.N(n),this):s},$.g.Tia=function(){this.B(256,1)},$.g.tL=function(){return new $.xv},$.g.LX=function(t,e){t.ja(e)},$.g.FW=function(t){$.X(t,1)&&this.B(256,1)},$.g.Gm=function(t){return this.Dq||(this.Dq=new $.pv(this),$.K(this.Dq,this.FW,this)),$.p(t)?(this.Dq.N(t),this):this.Dq},$.g.yj=function(){return!1},$.g.q6=function(){return!0},$.g.pb=$.ia,$.g.co=$.ia,$.g.Jv=function(){this.pb(),this.co()},$.g.La=function(t,e){return $.p(t)?$.p(e)?(this.kn[t.toLowerCase()]=e,this):this.kn[t.toLowerCase()]:this.kn},$.g.hJ=function(){this.kn={}},$.g.Rg=function(t){return this.Jv(),this.La(t)},$.g.Ua=function(t){return this.gb||(this.gb=this.xL(),$.W(this,"tooltip",this.gb)),$.p(t)?(this.gb.N(t),this):this.gb},$.g.xL=function(){var t=new $.ww(4294967295);return t.ya(this),$.Aw(t,this),this.DP()&&this.wa("pointshover",this.yka,!0),t},$.g.oU=function(t,e,i){return t=[],$.p(this.Ue())&&(t=(0,$.Wa)(this.Ue(),(function(t){return"scatter"==t.g("xMode")?t.$().select(e):t.$().select(i),{series:t,points:[e]}}))),(0,$.Ye)(t,(function(t){return t=t.series.$(),$.p(t.j("missing"))?!t.j("missing"):!$.Do(t.get("value"))}))},$.g.yka=function(t){if(!t.PT){var e=[];if((0,$.Pe)(t.seriesStatus,(function(i){0==i.points.length?("float"==this.gb.g("positionMode")&&this.gc("mousemove",this.QJ),this.gb.Lc(!1,t)):i.series.enabled()&&e.push(i)}),this),0!=e.length)if("float"==this.gb.g("positionMode")&&this.wa("mousemove",this.QJ),"single"==$.wr(this,"interactivity",!0,this.gd).g("hoverMode")){var i=[];if("single"==this.gb.g("displayMode"))i=t.seriesStatus;else{var n=i=t.seriesStatus[0].points[0];$.p(n.index)&&(n=i=n.index);var s=t.seriesStatus[0].series;s.tl&&$.J(s.tl(),$.Qt)&&"scatter"==s.g("xMode")&&(i=t.point.get("x")),i=this.oU(s,n,i)}$.Nw(this.gb,i,t.originalEvent.clientX,t.originalEvent.clientY,t.seriesStatus[0].series,this.Uu())}else{var a=e[0];e[0].series.$().select(e[0].nearestPointToCursor.index),(0,$.Pe)(e,(function(t){a.nearestPointToCursor.distance>t.nearestPointToCursor.distance&&(t.series.$().select(t.nearestPointToCursor.index),a=t)})),"single"==this.gb.g("displayMode")?$.Nw(this.gb,[a],t.originalEvent.clientX,t.originalEvent.clientY,a.series,this.Uu()):$.Nw(this.gb,e,t.originalEvent.clientX,t.originalEvent.clientY,a.series,this.Uu())}}},$.g.QJ=function(t){this.gb.WP(t.clientX,t.clientY)},$.g.Uu=function(){return!1},$.g.contextMenu=function(t){return this.rk||(this.rk=$.eq.ui.contextMenu(!!$.C(t)&&t.fromTheme))&&this.rk.itemsProvider(this.vS),$.p(t)?(this.rk&&this.rk.setup(t),this):this.rk},$.g.vS=function(t){var e=t.event?t.event.target.Zi():null,i=t.event?$.so(t.event.domTarget):null;return e=$.C(i)&&$.p(i.X)&&i.X.seriesType&&$.p(i.index)||e&&e.seriesType,i={},$.eq.exports&&$.Sc(i,$.Sl($.mG.exporting)),$.Tj()&&t.menuParent&&$.Sc(i,$.Sl($.mG[t.menuParent.fullScreen()?"full-screen-exit":"full-screen-enter"])),$.Sc(i,$.Sl($.mG.main)),t.menuParent.jx(i,t,e)},$.g.jx=function(t){return t},$.g.uO=ba(16),$.g.NM=function(){var t,e,i,n=[],s=this.Ue();for(e=0;e<s.length;e++)if((t=s[e])&&t.state&&t.ce&&t.enabled()){var a=$.sx(t.state,$.wo);for(i=0;i<a.length;i++)n.push(t.ce(a[i]))}return n},nG={"select-marquee-start":{index:9.3,text:"Start selection marquee",eventType:"anychart.startSelectMarquee",action:function(t){t.menuParent.AP(!1)}},"save-chart-as":{index:10,text:"Save chart as...",iconClass:"ac ac-file-image-o",subMenu:{"save-chart-as-png":{index:10,text:".png",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsPng",action:function(t){t.menuParent.Eu()}},"save-chart-as-jpg":{index:20,text:".jpg",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsJpg",action:function(t){t.menuParent.Yw()}},"save-chart-as-pdf":{index:30,text:".pdf",iconClass:"ac ac-file-pdf-o",eventType:"anychart.saveAsPdf",action:function(t){t.menuParent.Zw()}},"save-chart-as-svg":{index:40,text:".svg",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsSvg",action:function(t){t.menuParent.$w()}}}},"save-data-as":{index:20,text:"Save data as...",iconClass:"ac ac-save",subMenu:{"save-data-as-text":{index:10,text:".csv",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsCsv",action:function(t){t.menuParent.cz()}},"save-data-as-xlsx":{index:20,text:".xlsx",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsXlsx",action:function(t){t.menuParent.dz()}}}},"share-with":{index:30,text:"Share with...",iconClass:"ac ac-net",subMenu:{"share-with-facebook":{index:10,text:"Facebook",iconClass:"ac ac-facebook",eventType:"anychart.shareWithFacebook",action:function(t){t.menuParent.LE()}},"share-with-twitter":{index:20,text:"Twitter",iconClass:"ac ac-twitter",eventType:"anychart.shareWithTwitter",action:function(t){t.menuParent.OE()}},"share-with-linkedin":{index:30,text:"LinkedIn",iconClass:"ac ac-linkedin",eventType:"anychart.shareWithLinkedIn",action:function(t){t.menuParent.ME()}},"share-with-pinterest":{index:40,text:"Pinterest",iconClass:"ac ac-pinterest",eventType:"anychart.shareWithPinterest",action:function(t){t.menuParent.NE()}}}},"print-chart":{index:50,text:"Print",iconClass:"ac ac-print",eventType:"anychart.print",action:function(t){t.menuParent.print()}},"full-screen-enter":{index:60,text:"Enter full screen",action:function(t){t.menuParent.fullScreen(!0)}},"full-screen-exit":{index:60,text:"Exit full screen",action:function(t){t.menuParent.fullScreen(!1)}},about:{index:80,iconClass:"ac ac-cog",text:"AnyChart "+$.gc.apply(null,["v%s.%s.%s.%s"].concat(["8","13","1","1939"])),href:"https://anychart.com"},"save-config-as":{index:100,text:"Save config as...",iconClass:"ac ac-save",subMenu:{"save-config-as-json":{index:10,text:".json",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsJson",action:function(t){t.menuParent.VO()}},"save-config-as-xml":{index:20,text:".xml",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsXml",action:function(t){t.menuParent.WO()}}}},"link-to-help":{index:110,iconClass:"ac ac-question",text:"Need help? Go to support center!",href:"https://anychart.com/support"},"version-history":{index:120,text:"Version History",href:""}},$.mG={exporting:{"save-chart-as":nG["save-chart-as"],"save-data-as":nG["save-data-as"],"share-with":nG["share-with"],"print-chart":nG["print-chart"],"exporting-separator":{index:51}},"full-screen-enter":{"full-screen-enter":nG["full-screen-enter"],"full-screen-separator":{index:61}},"full-screen-exit":{"full-screen-exit":nG["full-screen-exit"],"full-screen-separator":{index:61}},main:{about:nG.about},"select-marquee":{"select-marquee-start":nG["select-marquee-start"],"select-marquee-separator":{index:9.4}}},$.g=$.ux.prototype,$.g.Xo=function(t){return this.sm||(this.sm=new qv(this),$.K(this.sm,this.Nia,this),$.W(this,"credits",this.sm),this.sm.U(this.sm.oa)),$.p(t)?(this.sm.N(t),this):this.sm},$.g.Nia=function(t){var e=0;$.X(t,2)&&(e|=1024),this.B(e,1)},$.g.mC=function(t,e){return this.fv||(this.fv=new $.cx,$.K(this.fv,this.Eia,this),$.W(this,"animation",this.fv)),$.p(t)?(this.fv.N.apply(this.fv,arguments),this):this.fv},$.g.Eia=function(){this.B(2048,1)},$.g.UL=$.ia,$.g.ut=function(t){return this.jl||(this.jl=new fx(this),$.K(this.jl,this.JW,this),$.W(this,"a11y",this.jl)),$.p(t)?(this.jl.N.apply(this.jl,arguments),this):this.jl},$.g.JW=function(){this.B(32,1)},$.g.aG=function(t){t=this.margin().Ej(t);var e=$.wr(this,"background");return this.J(68)&&(e&&(e.ka(),e.O()||e.O(this.Na),e.ja(t),e.da(!1),e.W()),this.I(64)),t=e&&e.enabled()?e.yd():t,t=this.iT(t),t=this.padding().Ej(t),e=this.title(),this.J(132)&&(e&&(e.ka(),e.O()||e.O(this.Na),e.ja(t),e.da(!1),e.W()),this.I(128)),(e&&e.enabled()?e.yd():t).clone()},$.g.iT=function(t){var e=this.O().Ja();if(!e)return t;e=e.Xo();var i=this.Xo();return e.N(sv(i)),delete i.text_,delete i.url_,delete i.alt_,delete i.imgAlt_,delete i.logoSrc_,delete i.enabled_,this.I(1024),t},$.g.Lj=function(){if(this.VR||(this.Jx?$.K(this,this.d3,this):$.kr(this,this.d3,this),this.VR=!0),this.zc()){this.ka();var t=$.wr(this.Gm(),"label");if(t&&this.q6()){var e=this.yj();t.visible()!==e&&this.Na&&(e=this.dispatchEvent({type:"datachanged",chart:this,hasData:!e})&&e),t.visible(e)}this.Na||(this.Na=$.ok(),$.ru(this,this.Na));var i=(e=this.O()?this.O().Ja():null)&&!e.yf();i&&e.suspend(),!this.rk&&$.p(this.oa.contextMenu)&&this.contextMenu(this.oa.contextMenu),this.rk&&this.rk.attach(this),this.J(8)&&(this.Na.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Na.parent(this.O()),this.I(2)),this.J(4)&&e&&e.wa("stageresize",this.az,!1,this);var n=this.ob(),s=n.width&&n.height;if(s){this.pv(),this.kg=this.aG(n),this.Qh(this.kg),this.RE(this.dg());var a=$.wr(this,"background"),o=a?a.g("fill"):null;if(a&&a.enabled()&&o&&"none"!=o||(this.lP||(this.lP=this.Na.rect(),this.lP.fill($.bm).stroke(null)),this.lP.Qf(this.kg)),this.J(260)){for(a=0,o=this.sv.length;a<o;a++){var r=this.sv[a];r&&(r.ka(),!r.O()&&r.enabled()&&r.O(this.Na),this.LX(r,n),r.W(),r.da(!1))}t&&(t.ka(),t.O(this.Na),this.LX(t,this.kg),t.W(),t.da(!1)),this.I(256)}}this.I(4),s&&(this.UL(),this.I(2048),this.J(32)&&((t=$.wr(this,"a11y"))&&t.JR(),this.I(32))),this.da(!1),t=$.cc($.ac.Id(),this,"chart"),this.Na.id(t),i&&e.resume(),e&&(e.BM()[t]=this),$.Dp(this,{type:"chartdraw",chart:this}),this.DP()&&this.kO()}},$.g.W=function(t){return t?(this.i0||(this.i0=(0,$.pa)(this.W,this)),(0,window.setTimeout)(this.i0,0)):this.Lj(),this},$.g.pv=function(){},$.g.Qh=function(){},$.g.RE=function(){},$.g.Oz=function(t){return $.p(t)?(this.Jx!=t&&(this.Jx=t,this.VR=!1,this.B(4,9),this.Jx&&this.W()),this):this.Jx},$.g.az=function(){this.Ta().gr()&&this.B(772,9)},$.g.dg=function(){return this.kg},$.g.tha=function(t,e){var i={x:t,y:e};if(this.O()&&this.O().Ja()){var n=$.Zj(this.O().Ja());i.x+=n.x,i.y+=n.y}return i},$.g.AU=function(t,e){var i={x:t,y:e};if(this.O()&&this.O().Ja()){var n=$.Zj(this.O().Ja());i.x-=n.x,i.y-=n.y}return i},$.g.remove=function(){this.Na&&this.Na.parent(null)},$.g.d3=function(){Rp(this.W,this)};var oG={};$.rq(oG,1,"selectRectangleMarqueeFill",$.Qq),$.rq(oG,1,"selectRectangleMarqueeStroke",$.Pq),$.rq(oG,3,"selectRectangleMarqueeFill",$.Qq,"selectMarqueeFill"),$.rq(oG,3,"selectRectangleMarqueeStroke",$.Pq,"selectMarqueeStroke"),$.U($.ux,oG),$.g=$.ux.prototype,$.g.RB=function(t){var e=this.md?{}:this.F();if($.p(gq()[0].chart.background.fill)){var i={};i[Ica(this)]=$.nm(this.Ma()),e=$.Bm(e,i)||{}}return t?$.ho(e):e},$.g.MP=function(t){return $.qp(this.RB(!1),"",t)},$.g.F=function(){var t,e=$.ux.u.F.call(this);e.type=this.Ma(),$.wr(this,"title")&&(e.title=this.title().F()),$.wr(this,"background")&&(e.background=this.background().F()),$.wr(this,"tooltip")&&(e.tooltip=this.Ua().F()),e.margin=this.margin().F(),e.padding=this.padding().F(),$.wr(this,"a11y")&&(e.a11y=this.ut().F()),$.p(this.Jx)&&(e.autoRedraw=this.Jx);for(var i=[],n=0;n<this.sv.length;n++)this.sv[n]&&i.push(this.sv[n].F());return 0<i.length&&(e.chartLabels=i),e.bounds=this.Ta().F(),$.wr(this,"animation")&&(e.animation=this.mC().F()),$.wr(this.Gm(),"label")&&(e.noDataLabel=this.Gm().label().F()),this.rk&&(e.contextMenu=this.contextMenu().serialize()),e.credits=this.Xo().F(),this.Tt&&(t=this.SG().F()),t&&!$.Jc(t)&&(e.exports=t),$.Tq(this,oG,e),e},$.g.U=function(t,e){"autoRedraw"in t&&(this.Jx=t.autoRedraw),$.ux.u.U.call(this,t,e),"title"in t&&this.title().ga(!!e,t.title),"background"in t&&this.background().ga(!!e,t.background),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin(t.margin);var i=t.chartLabels;if($.A(i))for(var n=0;n<i.length;n++)this.label(n,i[n]);$.z(t.container)&&this.O(t.container),this.Ta(t.bounds),this.left(t.left),this.top(t.top),this.width(t.width),this.height(t.height),this.right(t.right),this.bottom(t.bottom),this.mC(t.animation),"noDataLabel"in t&&this.Gm().label().ga(!!e,t.noDataLabel),"tooltip"in t&&this.Ua().ga(!!e,t.tooltip),"a11y"in t&&this.ut().ga(!!e,t.a11y),$.p(t.contextMenu)&&this.contextMenu(t.contextMenu),"credits"in t&&this.Xo(t.credits),"exports"in t&&this.SG(t.exports),$.Iq(this,oG,t)},$.g.$c=void 0,$.g.R=function(){$.sd(this.fv,this.jl,this.gb,this.Dq,this.qh,this.Ia,this.gb,this.Qc,this.Wa,this.jb,this.sv,this.rk,this.sm,this.Na),this.jb=this.Wa=this.Qc=this.gb=this.Ia=this.qh=this.Dq=this.jl=this.fv=null,this.sv.length=0,this.Na=this.sm=this.rk=null,$.ux.u.R.call(this),this.he&&pq(this,this.he)},$.g.Ih=function(t){var e,i=$.so(t.domTarget);if($.J(t.target,$.Pu)||$.J(t.target,$.dy)){var n=t.target.Zi();n.aj&&n.aj()&&(e=n),n=i}else $.J(t.target,$.Ww)?i&&(e=i.X,n=i.index):(e=i&&i.X,n=$.ea(i.index)?i.index:t.pointIndex);e&&!e.md&&e.enabled()&&$.D(e.Tg)&&($.p(t.pointIndex)||(t.pointIndex=$.A(n)?n[n.length-1]:n),(t=e.Tg(t))&&e.dispatchEvent(t))},$.g.ig=function(t){var e=$.ux.u.ig.call(this,t),i=$.so(e.relatedDomTarget);return(i=i&&i.X)&&!i.md&&i.enabled()?i.ig(t):e},$.g.mG=function(t,e){for(var i=[],n=0,s=t.length;n<s;n++){var a,o=t[n];a=o.De?{index:o.De.index,distance:o.De.Tf}:{index:window.NaN,distance:window.NaN},i.push({series:o.X,points:e?[]:o.vd?$.Ha(o.vd):[],nearestPointToCursor:a})}return i},$.g.XD=function(t,e,i){for(var n,s,a,o=window.Infinity,r=0,l=t.length;r<l;r++){var h=t[r];if(h.De){var c=h.De;(o>c.Tf||!n)&&(n=h.X,s=c.index,a=$.Aa(h.vd,c.index),o=c.Tf)}}return(t={index:s,series:n})[e]=i?!a:a,t},$.g.bl=function(t,e,i,n,s){var a=this.XD(i,t,n),o=[];if(!n)for(var r=0;r<i.length;r++)for(var l=i[r],h=l.X,c=0;c<l.vd.length;c++)o.push(h.ce(l.vd[c]));return h=a.series,t={type:"hovered"==t?"pointshover":"pointsselect",seriesStatus:this.mG(i,n),currentPoint:a,actualTarget:e.target,target:this,originalEvent:e,point:h.ce(a.index),points:o},s&&(t.PT=!0),t},$.g.TL=$.ia,$.g.hA=$.ia,$.g.If=function(t){var e=$.wr(this,"interactivity",!0,this.gd),i=$.so(t.domTarget),n=!1;if($.J(t.target,$.Ww)||this.$q(t.target)){if($.p(i)){if($.ea(i)&&(i=t.target.Zi()),i.fg){var s=i.fg.X,a=i.fg.vd;$.A(a)&&!a.length&&(a=window.NaN)}else s=i.X,a=i.index;n=!0}}else $.J(t.target,$.Pu)||$.J(t.target,$.dy)||$.J(t.target,$.ww)?((a=t.target.Zi()).aj&&a.aj()&&(s=a),a=i):t.target.Zi&&$.J(t.target.Zi(),$.ww)?((a=t.target.Zi().Zi()).aj&&a.aj()&&(s=a),a=i):(s=i&&i.X,a=$.ea(i&&i.index)?i.index:t.pointIndex);if(s&&!s.md&&s.enabled()&&$.D(s.Tg)){if(null!=(i=s.Tg(t))&&$.ea(i.pointIndex)&&!(0,window.isNaN)(i.pointIndex)&&(a=i.pointIndex),i&&($.to(s,t.relatedTarget)||s.dispatchEvent(i))&&"single"==e.g("hoverMode")&&($.A(a)&&!(0,$.lD)(a,(function(t){return $.tx(s.state,$.vo,t)}),this)||!$.tx(s.state,$.vo,a)&&!(0,window.isNaN)(a))){$.D(s.$i)&&s.$i(a,t),this.TL(a,s);var o=[];(i=$.sx(s.state,$.vo)).length&&o.push({X:s,vd:i,De:{index:$.A(a)?a[0]:a,Tf:0}}),o.length&&(s.$().select(o[0].De.index),this.dispatchEvent(this.bl("hovered",t,o,!1,n)),this.zl=o.length?o:null)}}else this.zl&&(this.Md(),this.dispatchEvent(this.bl("hovered",t,this.zl,!0)),this.zl=null);if("single"!=e.g("hoverMode"))if(i=!1,(a=this.oq(t))&&a.length){for(s=this.Ue(),e=0;e<s.length;e++){var r=!1;for(o=0;o<a.length;o++)r=r||s[e]==a[o].X;!r&&$.sx(s[e].state,$.vo).length&&(a.push({X:s[e],vd:[]}),s[e].Md(),i=!0)}for(e=0,o=a.length;e<o;e++){r=a[e],s=r.X;var l=r.vd,h=$.sx(s.state,$.vo);i=i||!$.Ta(l,h),s.state.fk()&$.vo||s.$i(r.vd)}i&&(this.dispatchEvent(this.bl("hovered",t,a,!1,n)),this.zl=a.length?a:null)}else $.J(t.target,$.Ww)||(this.Md(),this.zl&&this.dispatchEvent(this.bl("hovered",t,this.zl,!0)),this.zl=null)},$.g.hg=function(t){var e,i=$.wr(this,"interactivity",!0,this.gd).g("hoverMode"),n=$.so(t.domTarget),s=!1;if($.J(t.target,$.Pu)||$.J(t.target,$.dy)){var a=t.target.Zi();a.aj&&a.aj()&&(e=a),a=n}else $.J(t.target,$.Ww)||this.$q(t.target)?(n&&(n.fg?(e=n.fg.X,a=n.fg.vd,$.A(a)&&!a.length&&(a=window.NaN)):(e=n.X,a=n.index)),s=!0):(e=n&&n.X,a=$.ea(n.index)?n.index:t.pointIndex);if(e&&!e.md&&e.enabled()&&$.D(e.Tg)&&(n=e.Tg(t))){var o=$.so(t.relatedDomTarget);o=$.N($.C(o)?o.index:o);var r=$.to(e,t.relatedTarget),l="vml"==$.kk&&e.Ua&&$.to(e.Ua(),t.relatedTarget);r&&o==a||!e.dispatchEvent(n)||l||"single"!=i||(0,window.isNaN)(a)&&!$.A(a)||(e.Md(),this.hA(),this.dispatchEvent(this.bl("hovered",t,[{X:e,vd:[],De:{index:$.A(a)?a[0]:a,Tf:0}}],!1,s)))}"single"==i||$.to(this,t.relatedTarget)||(this.Md(),this.hA(),this.zl&&this.dispatchEvent(this.bl("hovered",t,this.zl,!0,s)),this.zl=null)},$.g.$q=function(){return!1},$.g.Sj=function(t){this.Eq(t)},$.g.h2=function(){return this},$.g.Eq=function(t){var e=this.h2();if(!e.nB){var i,n,s=$.wr(e,"interactivity",!0,e.gd),a=t.ctrlKey||t.metaKey,o=s.g("multiSelectOnClick"),r=a||t.shiftKey||o,l=$.so(t.domTarget),h=e.$q(t.target),c=$.J(t.target,$.Pu),u=$.J(t.target,$.dy);if(h=$.J(t.target,$.Ww)||h){if(l)if(n=l.fg||l.vd)var d=n.X,p=n.vd;else d=l.X,p=l.index}else c||u?((c=t.target.Zi()).aj&&c.aj()&&(d=c),p=l):(d=l&&l.X,p=l&&$.ea(l.index)?l.index:t.pointIndex);if(d&&!d.md&&d.enabled()&&$.D(d.Tg)){var g=d.Tg(t);if(g&&($.to(d,t.relatedTarget)||d.dispatchEvent(g))&&(h||(p=g.pointIndex),"single"==s.g("hoverMode"))){if("none"==s.g("selectionMode")||"none"==d.ej())return;var f=1==(c=$.sx(d.state,$.wo)).length&&c[0]==p;if(!r&&f)return;for((l=r)&&(l=!!(d.state.fk()&$.wo)),!o&&(l||!r||r&&"multi-select"!=s.g("selectionMode"))?(e.ie(),e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0))):"single-select"==d.ej()&&(e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0)),d.ie(),$.A(p)&&(p=p[p.length-1])),$.D(d.Ii)&&d.Ii(p,t),u=e.Ue(),o=[],l=0;l<u.length;l++)(i=u[l])&&(c=$.sx(i.state,$.wo)).length&&o.push({X:i,vd:c,De:{index:p,Tf:0}});o.length||o.push({X:d,vd:[],De:{index:p,Tf:0}}),e.dispatchEvent(e.bl("selected",g,o)),e.hm=f?null:o}}else"single"==s.g("hoverMode")&&s.g("unselectOnClickOutOfPoint")&&(h||e.ie(),e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0)),e.hm=null);if("single"!=s.g("hoverMode")&&"none"!=s.g("selectionMode"))if((p=e.oq(t))&&p.length){var b;if(h=!1,o=[],"single-select"==s.g("selectionMode")){var v;for(l=0,s=p.length;l<s;l++){var m=p[l];"none"!=(d=m.X).ej()&&(v||(v=m),v.De.Tf>m.De.Tf&&(v=m))}if(d=v.X,h=!(f=1==(c=$.sx(d.state,$.wo)).length&&c[0]==v.De.index)||f&&r,(a=r)&&(a=!!(d.state.fk()&$.wo)),!a&&r||f||d.ie(),d.Ii(v.De.index,t),(c=$.sx(d.state,$.wo)).length)for(o.push({X:d,vd:[v.De.index],De:v.De}),u=e.Ue(),l=0;l<u.length;l++)"none"!=(d=u[l]).ej()&&((b=d==o[0].X)||d.ie());else o.push({X:d,vd:c,De:m.De})}else{if(v=[],!r)for(u=e.Ue(),l=0;l<u.length;l++)if("none"!=(i=u[l]).ej()){for(b=!1,g=0;g<p.length;g++)b=b||i==p[g].X;!b&&$.sx(i.state,$.wo).length&&(v.push({X:i,vd:[]}),i.ie(),h=!0)}for(l=0,s=p.length;l<s;l++)if("none"!=(d=(m=p[l]).X).ej()){if(n="single-select"==d.ej()?[m.De.index]:m.vd,c=$.sx(d.state,$.wo),t.shiftKey){for(b=!0,g=0;g<n.length;g++)b=b&&$.Aa(c,n[g]);f=b}else a||(f=$.Ta(n,c));h=h||!f,f||((c=r)&&(c=!!(d.state.fk()&$.wo)),!c&&r&&"single-select"!=d.ej()||d.ie(),d.Ii(n,t)),(c=$.sx(d.state,$.wo)).length?o.push({X:d,vd:c,De:m.De}):v.push({X:d,vd:c,De:m.De})}for(l=0;l<v.length;l++)o.push(v[l])}h&&(e.dispatchEvent(e.bl("selected",t,o)),e.hm=o.length?o:null)}else h||e.ie(),e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0)),e.hm=null}},$.g.ie=function(){var t,e=this.Ue(),i=0;for(t=e.length;i<t;i++)e[i]&&e[i].ie()},$.g.Md=function(){var t,e=this.Ue(),i=0;for(t=e.length;i<t;i++)e[i]&&e[i].Md()},$.g.gd=function(t){return this.qh||(this.qh=this.ES(),$.K(this.qh,this.kO,this),$.W(this,"interactivity",this.qh)),$.p(t)?($.C(t)?this.qh.N(t):this.qh.hoverMode(t),this):this.qh},$.g.ES=function(){return new $.hx(this)},$.g.kO=function(){for(var t=this.Ue(),e=t.length;e--;)if(t[e]){var i=$.wr(this,"interactivity",!0,this.gd);t[e].Xl(i.g("hoverMode"))}},$.g.rN=function(t){this.Js&&this.AV.cursor(this.yV||yx(this,t.clientX,t.clientY)?this.zV:null)},$.g.h3=function(t){var e,i=this.O(),n=$.Zj(i.Ja()),s=t.clientX-n.x;n=t.clientY-n.y,"mousedown"==t.type&&!t.kf.OA()||!(e=yx(this,t.clientX,t.clientY))||this.DV&&!1===this.DV(e-1,s,n,0,0,t)||(this.XH=e-1,e=this.Js[this.XH],this.pw=s,this.MD=n,this.Hn.Qf(this.qN?new $.I(this.pw,e.top,0,e.height):new $.I(this.pw,this.MD,0,0)),this.Hn.parent(i),this.Hy||(this.Hy=new zx(this.Hn)),this.Hy.D5=$.ll,(e=e.clone()).left-=this.pw,e.top-=this.MD,this.Hy.NX(e),this.lu.wa(this.Hy,"drag",this.cha),this.lu.wa(this.Hy,"end",this.bha),this.yV=!0,this.Hy.lk(t.kf),t.preventDefault(),t.stopPropagation())},$.g.cha=function(t){if(this.qN){var e=this.Js[this.XH];e=new $.I(this.pw,e.top,t.left,e.height)}else e=new $.I(this.pw,this.MD,t.left,t.top);this.Hn.Qf(e),this.BV&&this.BV(this.XH,this.pw,this.MD,t.left,t.top,new $.Si(t.EC,this.O().Ja()))},$.g.bha=function(t){if(this.qN){var e=this.Js[this.XH];e=new $.I(this.pw,e.top,t.left,e.height)}else e=new $.I(this.pw,this.MD,t.left,t.top);this.Hn.Qf(e),e=!1,this.CV&&(e=!1===this.CV(this.XH,this.pw,this.MD,t.left,t.top,new $.Si(t.EC,this.O().Ja()))),e||this.i3?this.Hn.parent(null):wx(this)},$.H(zx,$.ag),zx.prototype.ar=function(){this.deltaX=this.deltaY=0},zx.prototype.ls=function(){},$.g=$.ux.prototype,$.g.Rka=function(t){return $.kl(405,null,["chart.startSelectMarquee()","chart.startSelectRectangleMarquee()"],!0),this.AP(t)},$.g.AP=function(t){return this.nB=$.xx(this,this.hja,this.fja,this.gja,this.MM(),void 0,t,this.g("selectRectangleMarqueeStroke"),this.g("selectRectangleMarqueeFill")),this},$.g.jN=function(){return!!this.Js},$.g.Dda=function(){return this.nB=!1,wx(this),this},$.g.MM=function(){return null},$.g.aA=function(t,e,i,n,s,a,o){e=$.Zj(this.O().Ja());var r=0>s?i+s:i,l=0>a?n+a:n;return{type:t,offsetX:o.offsetX,offsetY:o.offsetY,clientX:o.clientX,clientY:o.clientY,screenX:o.screenX,screenY:o.screenY,button:o.button,actionButton:o.actionButton,keyCode:o.keyCode,charCode:o.charCode,ctrlKey:o.ctrlKey,altKey:o.altKey,shiftKey:o.shiftKey,metaKey:o.metaKey,platformModifierKey:o.platformModifierKey,clientStartX:i+e.x,clientStartY:n+e.y,clientLeft:r+e.x,clientTop:l+e.y,startX:i,startY:n,left:r,top:l,width:Math.abs(s),height:Math.abs(a)}},$.g.hja=function(t,e,i,n,s,a){return this.dispatchEvent(this.aA("selectmarqueestart",t,e,i,n,s,a))},$.g.fja=function(t,e,i,n,s,a){return this.dispatchEvent(this.aA("selectmarqueechange",t,e,i,n,s,a))},$.g.gja=function(t,e,i,n,s,a){return t=this.aA("selectmarqueefinish",t,e,i,n,s,a),(e=this.dispatchEvent(t))&&this.$O(t),this.nB=!1,e},$.g.$O=function(){},$.g.fullScreen=function(t){var e=this.O();return e=e?e.Ja():null,$.p(t)?(e&&e.fullScreen(t),this):!!e&&e.fullScreen()},$.g.Ky=function(){var t=this.O();return!!(t=t?t.Ja():null)&&t.Ky()},$.g.SG=function(t){var e=$.fa.anychart.exports;return e?this.Tt||(this.Tt=e.create()):$.il(4,null,["Exporting"]),$.p(t)&&this.Tt?(this.Tt.U(t),this):this.Tt},$.g.ts=function(){return this.Ue()},$.g.m2=function(){var t=$.Ga.apply(null,(0,$.Wa)(this.ts(),(function(t){return t.data().Wv()})));return $.Ka(t,t,$.qo),t},$.g.VW=function(t,e,i){var n;if($.A(e))for(n=0;n<e.length;n++){var s=e[n];t[i[n]]=$.C(s)?co(s):s}else if($.C(e))for(n in e)s=e[n],t[i[n]]=$.C(s)?co(s):s;else t[i.value]=$.C(e)?co(e):e},$.g.d6=function(){return!0},$.g.sA=function(){return[]},$.g.tA=function(t){return t.ma()},$.g.rA=function(){return null},$.g.qA=function(t){return $.J(t,$.eB)?t.Be():["value"]},$.g.$W=function(t,e,i,n){return($.J(e,$.eB)?e.name():"series"+String(i))+(1<n?" ("+t+")":"")},$.g.nD=function(t,e,i,n){var s=$.qo(t);return s in n?n=n[s]:(n=n[s]=i.length,i.push([e||String(t)])),i[n]},$.g.N1=function(t,e,i,n,s,a,o){if((s=$.qo(t))in o){do{a=s+"_"+1..toString()}while(a in o);s=a}return o[s]=!0,s in n?n=n[s]:(n=n[s]=i.length,i.push([e||String(t)])),i[n]},$.g.O1=function(t){return $.D(t.$)?t.$():t.data().$()},$.g.W2=function(t){return $.qo(t.data().Wv()[0])},$.g.N4=function(t,e,i,n){for(var s=0;s<e.length;s++)t[s+n.length]=i.get(e[s])},$.g.M4=function(t,e,i,n){if(1<e.length)for(var s=0;s<i.length;s++)t.push(this.$W(i[s],e[n],n+1,i.length));else t.push.apply(t,i)},$.g.DM=function(t){for(var e=this.ts(),i=this.sA(),n={},s=[],a=0;a<e.length;a++){var o=e[a],r=this.qA(o);if(r.length){var l=this.O1(o,t);l.reset();for(var h=this.W2(o),c={};l.advance();){var u=this.tA(l);this.d6(t,o,u)&&(u=this.nD(u,this.rA(l,o),s,n,h,l.ma(),c),this.N4(u,r,l,i))}this.M4(i,e,r,a)}}return{headers:i,data:s}},$.g.Zj=function(t,e){var i="raw"==(t=$.zk(zda,t,"default"))?$.Ax(this):this.DM(t);return $.kp(i.headers,i.data,e)},$.g.H6=function(t,e){var i=this.Zj();return(i=Ap(i,t,e))?e?ef(i):i:null},$.g.G6=function(t,e){var i=this.H6(t);return i?($.uf(i,{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px"}),e?ef(i):i):i},$.g.WO=function(t){var e=$.eq.exports;if(e){var i=this.MP(!1);e.WO(this,i,t)}else $.il(4,null,["Exporting"])},$.g.VO=function(t){var e=$.eq.exports;if(e){var i=this.RB(!0);e.VO(this,i,t)}else $.il(4,null,["Exporting"])},$.g.cz=function(t,e,i){var n=$.eq.exports;n?(t=this.Zj(t,e),n.cz(this,t,i)):$.il(4,null,["Exporting"])},$.g.dz=function(t,e,i){var n=$.eq.exports;if(n){var s={rowsSeparator:"\n",columnsSeparator:",",ignoreFirstRow:!1};$.ra(s,i||{}),t=this.Zj(t,s),n.dz(this,t,e)}else $.il(4,null,["Exporting"])},$.g.id=function(t){if($.p(t)){if(this.he!=t)if(null===t)pq(this,this.he),this.he=t;else{var e=this.he;oq[t]&&oq[t]!=this?($.kl(21,null,[t],!0),e=!1):($.p(e)&&pq(this,e),oq[t]=this,e=!0),e&&(this.he=t)}return this}return this.he};var pG=$.ux.prototype;pG.a11y=pG.ut,pG.animation=pG.mC,pG.autoRedraw=pG.Oz,pG.title=pG.title,pG.background=pG.background,pG.margin=pG.margin,pG.padding=pG.padding,pG.label=pG.label,pG.container=pG.O,pG.contextMenu=pG.contextMenu,pG.draw=pG.W,pG.toJson=pG.RB,pG.toXml=pG.MP,pG.legend=pG.eg,pG.credits=pG.Xo,pG.tooltip=pG.Ua,pG.saveAsPng=pG.Eu,pG.saveAsJpg=pG.Yw,pG.saveAsPdf=pG.Zw,pG.saveAsSvg=pG.$w,pG.shareAsPng=pG.Hu,pG.shareAsJpg=pG.FB,pG.shareAsPdf=pG.GB,pG.shareAsSvg=pG.HB,pG.getPngBase64String=pG.zA,pG.getJpgBase64String=pG.wA,pG.getSvgBase64String=pG.BA,pG.getPdfBase64String=pG.yA,pG.toSvg=pG.Nq,pG.saveAsCsv=pG.cz,pG.saveAsXlsx=pG.dz,pG.saveAsXml=pG.WO,pG.saveAsJson=pG.VO,pG.exports=pG.SG,pG.toCsv=pG.Zj,pG.toA11yTable=pG.G6,pG.toHtmlTable=pG.H6,pG.localToGlobal=pG.tha,pG.globalToLocal=pG.AU,pG.getStat=pG.Rg,pG.getSelectedPoints=pG.NM,pG.credits=pG.Xo,pG.shareWithFacebook=pG.LE,pG.shareWithTwitter=pG.OE,pG.shareWithLinkedIn=pG.ME,pG.shareWithPinterest=pG.NE,pG.startSelectMarquee=pG.Rka,pG.startSelectRectangleMarquee=pG.AP,pG.inMarquee=pG.jN,pG.cancelMarquee=pG.Dda,pG.id=pG.id,pG.fullScreen=pG.fullScreen,pG.isFullScreenAvailable=pG.Ky,$.H($.Bx,$.ux),$.g=$.Bx.prototype,$.g.ra=$.ux.prototype.ra,$.g.sa=512|$.ux.prototype.sa,$.g.Ma=function(){return this.re},$.g.eg=function(t){return this.Bi||(this.Bi=new $.Ww,$.K(this.Bi,this.OW,this),this.Bi.kb(this),$.W(this,"legend",this.Bi),this.B(512,1)),$.p(t)?(this.Bi.N(t),this):this.Bi},$.g.OW=function(t){var e=0,i=0;$.X(t,1)&&(e|=512,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.Ms=function(t){return"default"==t},$.g.zr=function(t){t=t.Ki(),(t=this.ef(t))&&(t.enabled(!t.enabled()),t.enabled()?t.Zk():t.Md())},$.g.wq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Zk()},$.g.vq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Md()},$.g.aG=function(t){t=$.Bx.u.aG.call(this,t);var e=$.wr(this,"legend");return this.J(516)&&e&&"outside"==e.g("positionMode")&&$.z(e.g("position"))&&(Cx(this,t),this.I(512)),(t=e&&e.enabled()&&"outside"==e.g("positionMode")&&$.z(e.g("position"))?e.yd():t).clone()},$.g.RE=function(t){var e=$.wr(this,"legend");this.J(516)&&(e&&("inside"==e.g("positionMode")||$.C(e.g("position")))?Cx(this,t):this.I(512))},$.g.NI=function(){return!1},$.g.F=function(){var t=$.Bx.u.F.call(this);return $.wr(this,"legend")&&(t.legend=this.eg().F()),t.interactivity=this.gd().F(),t},$.g.U=function(t,e){$.Bx.u.U.call(this,t,e),"legend"in t&&this.eg(t.legend),this.gd(t.interactivity)},$.g.R=function(){$.qd(this.Bi),this.Bi=null,$.Bx.u.R.call(this)};var qG=$.Bx.prototype;qG.legend=qG.eg,qG.interactivity=qG.gd,qG.noData=qG.Gm,$.H($.Dx,$.qf),$.Dx.prototype.f=function(t,e){this.Jj=t,this.mL=e},$.Dx.prototype.b=function(t){this.state=t,$.Dp(this,"statechange")};var rG=$.Dx.prototype;rG.setRules=rG.f,rG.setState=rG.b,$.H($.Ex,$.qf),$.Ex.prototype.handleEvent=function(t){var e=0,i=0,n=t.kf;"mousewheel"==n.type?(t=Fx(-n.wheelDelta),$.p(n.wheelDeltaX)?(e=Fx(-n.wheelDeltaX),i=Fx(-n.wheelDeltaY)):i=t):(100<(t=n.detail)?t=3:-100>t&&(t=-3),$.p(n.axis)&&n.axis===n.HORIZONTAL_AXIS?e=t:i=t),$.ea(this.i)&&(e=$.Za(e,-this.i,this.i)),$.ea(this.o)&&(i=$.Za(i,-this.o,this.o)),this.D&&(e=-e),e=new Gx(t,n,e,i),this.dispatchEvent(e)},$.Ex.prototype.R=function(){$.Ex.u.R.call(this),Zd(this.f),this.f=null},$.H(Gx,$.Bd),$.H($.Hx,$.V),$.Hx.prototype.ra=32779|$.V.prototype.ra,$.Hx.prototype.ys=function(t){var e=$.Hx.u.ys.call(this,t),i=this.flatten().enabled;return"enabled"==t?(e=32768,i&&(e|=this.f,this.f=0)):i||(this.f|=e),e};var sG={};$.sq(sG,[[0,"format",$.ar],[1,"adjustFontSize",yq],[0,"fontVariant",$.dl],[0,"letterSpacing",$.wq],[0,"textDirection",$.el],[0,"textIndent",$.Bq],[0,"textShadow",$.Zb],[0,"textOverflow",$.Zq],[0,"useHtml",$.Dq],[0,"wordBreak",$.Cq],[0,"wordWrap",$.Cq],[0,"fontColor",$.Aq],[0,"fontDecoration",$.bl],[0,"fontFamily",$.zq],[0,"fontOpacity",$.Bq],[0,"fontSize",$.wq],[0,"fontStyle",$.cl],[0,"fontWeight",$.wq],[0,"hAlign",$.$k],[0,"lineHeight",$.wq],[0,"minFontSize",$.wq],[0,"maxFontSize",$.wq],[0,"maxLength",$.xq],[0,"vAlign",$.al],[0,"anchor",$.Dk],[0,"height",$.br],[0,"offsetX",$.br],[0,"offsetY",$.br],[0,"position",$.Ek],[0,"rotation",$.Bq],[0,"width",$.br],[0,"zIndex",$.Bq],[0,"allowMultiline",$.Zq],[0,"clip",$.Cq],[0,"enabled",$.Zq],[0,"selectable",$.Dq],[0,"disablePointerEvents",$.Dq],[0,"autoRotate",$.Dq]]),$.U($.Hx,sG),$.g=$.Hx.prototype,$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(null===t?($.kr(this.Y,this.Tc,this),this.padding().parent(null),this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,this.padding().parent(this.Y.padding()),$.K(this.Y,this.Tc,this),this.Ug())),this):this.Y},$.g.Tc=function(t){this.Ug(),this.va(t.f)},$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.Ug=function(){this.b=null},$.g.flatten=function(){if(!this.b)for(var t in this.b={},sG)sG.hasOwnProperty(t)&&(this.b[t]=this.g(t));return this.b},$.g.VK=function(t){var e=this.flatten().maxLength;return Du(t,e)},$.g.tk=function(t){var e=this.g("format")||$.ep;return $.z(e)&&(e=$.Nu($.Lu.Id(),e)),t=e.call(t,t),t=$.p(t)?String(t):"",this.VK(t)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.fm,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(){this.va(2)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu),$.p(t)?this:this.Ia},$.g.Ie=function(t,e){return!!$.da(e)&&(this.enabled(e),!0)},$.g.U=function(t,e){$.Hx.u.U.call(this,t,e),$.Iq(this,sG,t,e),this.padding().ga(!!e,t.padding)},$.g.F=function(){var t=$.Hx.u.F.call(this);$.Tq(this,sG,t,void 0,void 0,!0);var e=$.wr(this,"padding");return e&&(e=$.Qc(e.Pa),$.Jc(e)||(t.padding=e)),t},$.g.R=function(){this.b=null,this.parent(null),$.sd(this.Wa,this.Ia),this.Ia=this.Wa=null,$.Hx.u.R.call(this)};var tG=$.Hx.prototype;tG.padding=tG.padding,tG.background=tG.background,$.g=$.Ix.prototype,$.g.width=function(){return this.Ta?this.Ta.width:0},$.g.height=function(){if(this.Ta)var t=this.Ta.height;else if(this.b.length)for(var e=t=0;e<this.b.length;e++)t+=this.b[e].height();else t=this.Ha;return t},$.g.style=function(t){if($.p(t)){var e,i=t||{},n=this.f,s={};for(e in n)n[e]!==i[e]&&(s[e]=!0);for(e in i)i[e]!==n[e]&&(s[e]=!0);return $.Jc(s)||(this.ho.style=!0,this.f=i,t.fontSize&&(t=(0,window.parseFloat)(t.fontSize),t=(0,window.isNaN)(t)?13:t,this.Ha=24>t?t+3:Math.round(1.2*t),this.aa=Math.round(.8*this.Ha))),this}return this.f},$.g.nK=function(t){this.Ba+=t},$.g.mK=function(){this.Ba+="\n"},$.g.pM=function(){this.text(this.Ba),this.Ba="",Lx(this)},$.g.text=function(t){return $.p(t)?(t=ic(t),t=$.hc(t),this.kc!=t&&(this.ho.text=!0,this.kc=t),this):this.kc},$.g.Ac=function(){this.ia=this.P.Vx()},$.g.Vd=function(){return this.ia||this.Ac(),this.ia},$.g.Ij=function(){var t;if(this.na||this.ea)for(this.G&&this.G.Ij(),this.K&&this.K.Ij(),t=0;t<this.i.length;t++)for(var e=this.i[t],i=0;i<e.length;i++)e[i].Ij();else if(this.ba)for(t=0;t<this.b.length;t++)(e=this.b[t])&&e.Ij();else e=this.f,t=this.Vd(),this.ho.style&&("fontStyle"in e?t.setAttribute("font-style",e.fontStyle):t.removeAttribute("font-style"),"fontVariant"in e?t.setAttribute("font-variant",e.fontVariant):t.removeAttribute("font-variant"),"fontFamily"in e?(t.setAttribute("font-family",e.fontFamily),t.style.fontFamily=e.fontFamily):(t.removeAttribute("fontFamily"),t.style.fontFamily=""),t.style.textShadow="textShadow"in e&&"none"!=e.textShadow?e.textShadow:"","fontSize"in e?t.setAttribute("font-size",e.fontSize):t.removeAttribute("font-size"),"fontWeight"in e?t.setAttribute("font-weight",e.fontWeight):t.removeAttribute("font-weight"),"letterSpacing"in e?t.setAttribute("letter-spacing",e.letterSpacing):t.removeAttribute("letter-spacing"),"fontDecoration"in e?t.setAttribute("text-decoration",e.fontDecoration):t.removeAttribute("text-decoration"),"fontColor"in e?e.textOverflow||t.setAttribute("fill",e.fontColor):t.removeAttribute("fill"),"fontOpacity"in e?t.setAttribute("opacity",e.fontOpacity):t.removeAttribute("opacity"),"disablePointerEvents"in e?t.setAttribute("pointer-events",e.disablePointerEvents?"none":""):t.removeAttribute("pointer-events"),"selectable"in e&&!e.selectable?(t.style["-webkit-touch-callout"]="none",t.style["-webkit-user-select"]="none",t.style["-khtml-user-select"]="none",t.style["-moz-user-select"]="moz-none",t.style["-ms-user-select"]="none",t.style["-o-user-select"]="none",t.style["user-select"]="none",($.hd&&9==cd||$.yd)&&(t.setAttribute("unselectable","on"),t.setAttribute("onselectstart","return false;"))):(t.style["-webkit-touch-callout"]="",t.style["-webkit-user-select"]="",t.style["-khtml-user-select"]="",t.style["-moz-user-select"]="",t.style["-ms-user-select"]="",t.style["-o-user-select"]="",t.style["user-select"]="",($.hd&&9==cd||$.yd)&&(t.removeAttribute("unselectable"),t.removeAttribute("onselectstart"))),"anchor"in e?(e=e.anchor,t.setAttribute("text-anchor",$.ec(e,"center")?"middle":$.ec(e,"right")?"end":"start")):t.removeAttribute("text-anchor"),this.ho.style=!1),this.ho.text&&(t.textContent=this.kc,this.ho.text=!1)},$.g.rb=function(){return this.Ta?this.Ta:new $.I(0,0,0,this.Ha)},$.g.ld=function(){$.Rx(this),this.ia&&($.Xe(this.ia),this.ia=null),this.D&&($.Xe(this.D),this.Za=this.D=null),Jx(this,!0),this.o=this.O=null,this.style({}),this.text("")},$.H($.Zx,$.Pu),$.g=$.Zx.prototype,$.g.Dc=function(t){return $.p(t)?(t=$.N(t),this.tc!=t&&(this.tc=t,this.B(4,9)),this):this.tc},$.g.uc=function(t){return $.p(t)?(t=$.N(t),this.vc!=t&&(this.vc=t,this.B(4,9)),this):this.vc},$.g.Ty=function(t){return $.p(t)?(t=$.N(t),this.D!=t&&(this.D=t,this.B(4,9)),this):this.D},$.g.UE=function(t){$.p(t)&&(t=null===t?t:$.ab($.N(t)||0),this.P!=t&&(this.P=t,this.B(4,9)))},$.g.fz=function(t){return $.p(t)?(t=null===t?t:$.Za($.N(t)||0,-360,360),this.G!=t&&(this.G=t,this.B(4,9)),this):this.G};var Xda=$.Zx.prototype,uG=$.Qc($.Pu.prototype.Dz);$.rq(uG,0,"autoRotate",$.Dq),Xda.Dz=uG,$.U($.Zx,$.Zx.prototype.Dz),$.Zx.prototype.S1=function(t,e,i,n,s,a){if(i)var o=i.width,r=i.height;var l=e.angle,h=e.radius;e=$.p(e.radiusY)?e.radiusY:h;var c=0,u=0,d=this.Dc(),p=this.uc(),g=this.fz(),f=this.Ty();return(i||!(0,window.isNaN)(d)&&!(0,window.isNaN)(p))&&(c=i.left,u=i.top,c=(0,window.isNaN)(d)?c+o/2:d,u=(0,window.isNaN)(p)?u+r/2:p,i=$.p(f)&&!(0,window.isNaN)(f)?$.L(s,f):i?$.L(s,Math.min(o,r)/2):0,l+=$.L(n,null!=g?g:360),h+=i,e+=i),n=c+$.db(l,h),l=u+$.eb(l,e),n-=(a=$.Eo(new $.I(0,0,t.width,t.height),a)).x,l-=a.y,t.left=n,t.top=l,t},$.Zx.prototype.yl=function(t,e,i,n){if($.J(t,$.$x)){var s=(t.jc()?t.jc().value.angle:0)||0,a=t.AA(s),o=t.ic("anchor");"auto"==o&&(o=t.ic("autoRotate")?"center":$.Go(s)),n=$.p(n)?n:t.ma()}else o=($.p(i)&&$.p(i.rotation)?i.rotation:this.g("rotation"))||0,a=($.p(i)&&$.p(i.autoRotate)?i.autoRotate:this.g("autoRotate"))||!1,s=(e?e.value.angle:0)||0,a=a?0<s&&180>s?o+s+270:o+s+90:o,o=$.p(i)&&i.anchor||this.g("anchor");return t=$.Xu(this,t,e,i,n),e=a,i=$.Eo(t,o),e=$.Kb($.bb(e),i.x,i.y),t=$.ln(t)||[],e.transform(t,0,t,0,4),t},$.Zx.prototype.vL=function(){return new $.$x},$.H($.$x,$.Tu);var Yda=$.$x.prototype,vG=$.Qc($.Tu.prototype.oC);$.rq(vG,0,"autoRotate",$.Dq),Yda.oC=vG,$.U($.$x,$.$x.prototype.oC),$.$x.prototype.AA=function(t){var e=this.ic("rotation");return this.ic("autoRotate")?0<t&&180>t?e+t+270:e+t+90:e},$.$x.prototype.tf=function(t,e){this.b||$.Uu(this);var i=this.b.positionFormatter,n=this.xb.path()?"center":Qu(this.b.anchor)||"left-top",s=this.b.offsetX||0,a=this.b.offsetY||0,o=this.hp,r=this.jc(),l=$.Qc(i.call(r,r));i=l.angle,r=l.radius,l=$.p(l.radiusY)?l.radiusY:r;var h=0,c=0,u=o.Dc(),d=o.uc(),p=o.fz();if(o=o.Ty(),e||!(0,window.isNaN)(u)&&!(0,window.isNaN)(d)){h=e.left,c=e.top;var g=e.width,f=e.height;h=(0,window.isNaN)(u)?h+g/2:u,c=(0,window.isNaN)(d)?c+f/2:d,a=$.p(o)&&!(0,window.isNaN)(o)?$.L(a,o):e?$.L(a,Math.min(g,f)/2):0,i+=$.L(s,null!=p?p:360),r+=a,l+=a}s=h+$.db(i,r),a=c+$.eb(i,l),s-=(n=$.Eo(new $.I(0,0,t.width,t.height),n)).x,a-=n.y,this.Lg+=s,this.Mg+=a,t.left=s,t.top=a,this.b.rotation=this.AA(i),this.xr?this.xb.x(this.Lg).y(this.Mg):this.xb.setPosition(this.Lg,this.Mg)},$.H($.dy,$.Y);var Zda=function(){var t={};return $.sq(t,[$.Z.yz,$.Z.Yn,$.Z.CQ,$.Z.DQ,$.Z.nZ,$.Z.HQ,[0,"position",$.Aq],[0,"size",$.xq],[0,"anchor",function(t){return null===t?t:$.Dk(t)}],[0,"type",function(t){return $.D(t)||(t=$.Ok(t)),t}]]),t}();$.U($.dy,Zda),$.g=$.dy.prototype,$.g.ra=$.Y.prototype.ra,$.g.sa=80|$.Y.prototype.sa,$.g.MT=function(){for(var t in $.dy.u.MT.call(this),this.oa)t in this.ua&&(this.b[t]=!0)},$.g.enabled=function(t){return $.p(t)?(null===this.o&&t&&this.B(1,this.mr()),this.o=t,this.WE=null!==this.Pa.enabled,$.dy.u.enabled.call(this,t),this):this.o},$.g.Ma=function(){return this.Pa.type||this.oa.type},$.g.Tm=function(){return $.p(this.Pa.fill)?this.Pa.fill:this.oa.fill},$.g.oJ=function(t){this.D=t},$.g.g=function(t){var e=$.dy.u.g.call(this,t);return e||("stroke"==t?e=this.G||"none":"fill"==t?e=this.D||"black":"type"==t&&(e=this.WF||"diagonal-cross")),e},$.g.ta=function(t,e){$.dy.u.ta.call(this,t,e),this.b[t]=!0},$.g.gk=function(){return $.p(this.Pa.stroke)?this.Pa.stroke:this.oa.stroke},$.g.pJ=function(t){this.G=t},$.g.Dd=function(t){return $.p(t)?(this.RL=t,this.B(16,1),this):this.RL},$.g.measure=function(t){this.i||(this.i=$.qk());var e=this.ja();if(e)var i=e.width,n=e.height;var s=this.g("type"),a=this.g("size");e=this.g("anchor");var o=this.g("offsetX"),r=this.g("offsetY");return s=$.z(s)?$.zp(s):s,this.i.clear(),s.call(this,this.i,0,0,a),a=this.i.rb(),t=$.Qc(this.g("positionFormatter").call(t,t)),t=new $.gb(t.x,t.y),s=$.Eo(new $.I(0,0,a.width,a.height),e),t.x-=s.x,t.y-=s.y,$.Yo(t,e,$.p(o)?$.L(o,i):0,$.p(r)?$.L(r,n):0),a.left=t.x,a.top=t.y,a},$.g.clear=function(t){if(this.f||(this.f=[]),this.Bc&&this.Bc.length)if($.p(t))this.Bc[t]&&(this.Bc[t].clear(),this.f.push(this.Bc[t]),delete this.Bc[t]);else{for(t=this.Bc.length;t--;){var e=this.Bc[t];e&&(e.clear(),this.f.push(e))}this.Bc.length=0,this.B(64,1)}else this.Bc=[];return this},$.g.jp=function(t){return t=+t,this.Bc&&this.Bc[t]?this.Bc[t]:null},$.g.pH=function(){return this.b},$.g.Vd=function(){return this.wb},$.g.add=function(t,e){if($.p(this.Bc)||(this.Bc=[]),$.p(e))var i=+e,n=this.Bc[i];return n?n.clear():(n=this.f&&0<this.f.length?this.f.pop():this.L0(),$.p(i)?(this.Bc[i]=n,n.HE(i)):(this.Bc.push(n),n.HE(this.Bc.length-1))),n.jc(t),$.fy(n,this),n},$.g.L0=function(){return new $.ey},$.g.W=function(){if(this.md)return this;this.wb||(this.wb=$.ok(),this.K&&$.ru(this,this.wb)),this.wb.Dd(this.Dd());var t=this.wb.Ja(),e=t&&!t.yf();return e&&t.suspend(),this.Bc&&(0,$.Pe)(this.Bc,(function(t){t&&(t.O(this.wb),t.W())}),this),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.wb.parent(this.O()),this.I(2)),this.I(4294967295),e&&t.resume(),this},$.g.remove=function(){this.wb&&this.wb.remove()},$.g.sl=function(){return this.wb},$.g.F=function(){var t=$.dy.u.F.call(this);delete t.enabled;var e=this.enabled();return $.p(e)&&(t.enabled=e),$.p(this.Dd())&&(t.disablePointerEvents=this.Dd()),this.b.position&&(t.position=this.g("position")),this.b.anchor&&(t.anchor=this.g("anchor")),this.b.offsetX&&(t.offsetX=this.g("offsetX")),this.b.offsetY&&(t.offsetY=this.g("offsetY")),this.b.type&&(t.type=this.g("type")),this.b.rotation&&(t.rotation=(0,window.isNaN)(this.g("rotation"))?null:this.g("rotation")),$.p(this.g("size"))&&(t.size=this.g("size")),this.b.fill&&$.p(this.Pa.fill)&&(t.fill=$.Rl(this.Pa.fill)),this.b.stroke&&$.p(this.Pa.stroke)&&(t.stroke=$.Rl(this.Pa.stroke)),t},$.g.Zd=function(t){return $.z(t)?{type:t,enabled:!0}:null},$.g.Ie=function(t,e){var i=this.Zd(arguments[1]);return i?(this.type?this.type(i.type):this.ta("type",i.type),this.enabled(i.enabled),!0):$.Y.prototype.Ie.apply(this,arguments)},$.g.U=function(t,e){var i=this.enabled();if($.dy.u.U.call(this,t,e),e)for(var n in t)this.oa[n]=t[n],this.b[n]=!0;else $.Iq(this,wG,t);this.Dd(t.disablePointerEvents),this.enabled("enabled"in t?t.enabled:i)},$.g.R=function(){$.sd(this.Bc,this.f,this.wb),this.wb=this.f=this.Bc=null,$.dy.u.R.call(this)},$.g.ig=function(t){for(var e,i=(t=$.dy.u.ig.call(this,t)).domTarget;$.J(i,$.ig)&&(e=i.tag,!$.J(e,$.Y)&&$.Do(e));)i=i.parent();return t.markerIndex=$.N(e),t},$.H($.ey,$.Y);var wG=function(){var t={};return $.sq(t,[$.Z.ZY,$.Z.CQ,$.Z.DQ,$.Z.nZ,$.Z.HQ,[0,"position",$.Cq],[0,"size",$.Bq],[1,"fill",$.Qq],[1,"stroke",$.Pq],[0,"type",function(t){return $.D(t)||(t=$.Ok(t)),t}]]),t}();$.U($.ey,wG),$.g=$.ey.prototype,$.g.ra=$.Y.prototype.ra,$.g.sa=16|$.Y.prototype.sa,$.g.Vd=function(){return this.b},$.g.ma=function(){return this.Ad},$.g.HE=function(t){this.Ad=+t},$.g.jc=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,this.B(16,8)),this):this.aa},$.g.ta=function(t,e){this.f[t]=e},$.g.g=function(t){var e=$.p(this.f[t])?this.f[t]:this.oa[t];return $.p(e)||("stroke"==t?e=this.G:"fill"==t&&(e=this.D)),e},$.g.oJ=function(t){this.D=t},$.g.pJ=function(t){this.G=t},$.g.enabled=function(t){return $.p(t)?(this.f.enabled!=t&&(this.f.enabled=t,this.B(1,9)),this):$.p(this.f.enabled)?this.f.enabled:this.oa.enabled},$.g.clear=function(){this.Hi(),this.b&&(this.b.parent(null),this.b.Bl()),this.B(2)},$.g.Hi=function(){this.f.padding&&$.qd(this.f.padding),this.oa={},this.f={},this.o={},delete this.D,delete this.G},$.g.td=function(t,e){$.p(t)&&this.N(t),$.p(e)&&(this.o=e),this.B(17,9)},$.g.ic=function(t){var e,i=$.fy(this),n=$.gy(this)?$.gy(this):i,s=!(i&&n);return n!=i&&(e=n.pH()),"enabled"==t?hy(this,this.enabled(),this.o.enabled,!s&&i.enabled(),!s&&n.enabled(),null!==(s?null:n.enabled())):hy(this,this[t](),this.o[t],s?void 0:i[t](),s?void 0:n[t](),!(!e||!e[t]))},$.g.W=function(){if(this.md)return this;var t,e=$.fy(this),i=$.gy(this)?$.gy(this):e,n=!(e&&i);i!=e&&(t=i.pH()),this.b||(this.b=$.qk());var s=hy(this,this.enabled(),this.o.enabled,!n&&e.enabled(),!n&&i.enabled(),null!==(n?null:i.enabled()));if(null===s&&(s=!0),this.J(1)||!n&&i.J(1)){if(!s)return this.b.parent(null),this.I(4294967295),this;this.O()&&this.b.parent(this.O()),this.I(1)}if((this.J(2)||!n&&i.J(2))&&(s&&(!n&&e.Vd()&&(this.O()||this.O(e.Vd()),this.O().parent()||this.O().parent(e.O())),this.O()&&this.b.parent(this.O())),this.I(2)),(this.J(8)||!n&&i.J(8))&&(this.O()&&!n&&this.O().zIndex(e.zIndex()),this.b.zIndex(this.zIndex()),this.I(8)),this.J(16)||!n&&i.J(16)||!n&&i.J(4)){var a="anchor type size offsetY offsetX fill stroke positionFormatter rotation".split(" ");s={},n&&(this.ka(),$.p(this.g("positionFormatter"))||this.ta("positionFormatter",$.ep),$.p(this.g("size"))||this.ta("size",10),$.p(this.g("anchor"))||this.ta("anchor","center"),$.p(this.g("offsetX"))||this.ta("offsetX",0),$.p(this.g("offsetY"))||this.ta("offsetY",0),$.p(this.g("rotation"))||this.ta("rotation",0),this.da(!1));for(var o=0,r=a.length;o<r;o++){var l=a[o],h=this[l](),c=this.o[l],u=n?void 0:e[l]?e[l]():e.g(l),d=n?void 0:i[l]?i[l]():i.g(l);s[l]=hy(this,h,c,u,d,!(!t||!t[l]))}if(e=$.z(s.type)?$.zp(s.type):s.type,i=this.ja())var p=i.width,g=i.height;this.b.clear(),i=$.Dk(s.anchor),n=$.dp(s.stroke),this.i&&this.i.wv?e.call(this,this.b,0,0,s.size,n):e.call(this,this.b,0,0,s.size),t=this.b.ck(),a=this.jc(),a=$.Qc(s.positionFormatter.call(a,a)),a=new $.gb(a.x,a.y),o=$.Eo(new $.I(0,0,t.width,t.height),i),a.x-=o.x,a.y-=o.y,$.Yo(a,i,$.p(s.offsetX)?$.L(s.offsetX,p):0,$.p(s.offsetY)?$.L(s.offsetY,g):0),t.left=a.x+t.width/2,t.top=a.y+t.height/2,this.b.clear(),this.i&&this.i.wv?e.call(this,this.b,t.left,t.top,s.size,n):e.call(this,this.b,t.left,t.top,s.size),this.b.fill(s.fill),this.b.stroke(s.stroke),this.b.oc(1,0,0,1,0,0),this.b.JE(s.rotation||0,a.x+o.x,a.y+o.y),this.b.tag=this.ma(),this.I(16)}return this.I(4),this},$.g.F=function(){var t=$.ey.u.F.call(this);delete t.enabled;var e=this.enabled();return null!=e&&(t.enabled=e),$.p(this.g("position"))&&(t.position=this.g("position")),$.p(this.g("rotation"))&&(t.rotation=(0,window.isNaN)(this.g("rotation"))?null:this.g("rotation")),$.p(this.g("anchor"))&&(t.anchor=this.g("anchor")),$.p(this.g("offsetX"))&&(t.offsetX=this.g("offsetX")),$.p(this.g("offsetY"))&&(t.offsetY=this.g("offsetY")),$.p(this.g("type"))&&(t.type=this.g("type")),$.p(this.g("size"))&&(t.size=this.g("size")),$.p(this.g("fill"))&&(t.fill=$.Rl(this.g("fill"))),$.p(this.g("stroke"))&&(t.stroke=$.Rl(this.g("stroke"))),t},$.g.U=function(t,e){var i=this.enabled();$.ey.u.U.call(this,t,e),$.Iq(this,wG,t),$.p(t.enabled)||delete this.f.enabled,this.enabled("enabled"in t?t.enabled:i)},$.g.R=function(){$.qd(this.b),this.b=null,$.ey.u.R.call(this)},$.H(iy,$.dy),$.xu(iy,$.dy),iy.prototype.L0=function(){return new jy},$.H(jy,$.ey);var xG=$.dy.prototype;xG.disablePointerEvents=xG.Dd,xG.enabled=xG.enabled,xG=$.ey.prototype,xG=iy.prototype,$.E("anychart.standalones.markersFactory",(function(){var t=new iy;return t.N($.zm("standalones.markersFactory")),t})),xG.draw=xG.W,xG.parentBounds=xG.ja,xG.container=xG.O,xG.add=xG.add,xG.clear=xG.clear,xG.measure=xG.measure,xG=jy.prototype,xG.enabled=xG.enabled,xG.draw=xG.W,xG.clear=xG.clear,xG.getIndex=xG.ma,$.H(ky,$.V),$.g=ky.prototype,$.g.ra=1,$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t};var $da=ky.prototype,yG={};$.rq(yG,1,"stroke",$.Jq),$.rq(yG,1,"fill",$.Nq),$.rq(yG,0,"width",$.br),$.rq(yG,0,"offset",$.br),$.rq(yG,0,"enabled",$.Zq),$da.vK=yG,$.U(ky,ky.prototype.vK),$.g=ky.prototype,$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:$.z(t)?{fill:t,stroke:null,enabled:!0}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?(this.oa.enabled=i.enabled,"fill"in i&&(this.oa.fill=i.fill),"stroke"in i&&(this.oa.stroke=i.stroke)):(this.enabled(i.enabled),"fill"in i&&this.fill(i.fill),"stroke"in i&&this.stroke(i.stroke)),!0)},$.g.U=function(t,e){e?$.Hq(this.oa,this.vK,t):($.Iq(this,this.vK,t),this.enabled(!("enabled"in t)||t.enabled))},$.g.F=function(){var t={};return $.Tq(this,this.vK,t,"Map axes props"),t},$.g.R=function(){ky.u.R.call(this)},$.H(ly,$.V),ly.prototype.sa=16|$.V.prototype.sa,ly.prototype.ra=1;var zG={};$.sq(zG,[$.Z.Yn,$.Z.iK]),$.U(ly,zG),ly.prototype.F=function(){var t=ly.u.F.call(this);return $.Tq(this,zG,t,"Connector"),t},ly.prototype.U=function(t,e){ly.u.U.call(this,t),e?$.Hq(this.oa,zG,t):$.Iq(this,zG,t)},ly.prototype.Zd=function(t){return(0,window.isNaN)(t)?$.z(t)?{stroke:t}:null:{length:t}},ly.prototype.Ie=function(t,e){var i=this.Zd(e);return!!i&&("length"in i&&this.length(i.length),"stroke"in i&&this.stroke(i.stroke),!0)},$.H($.my,$.V),$.g=$.my.prototype,$.g.B=function(t,e){return this.Yj.B(t,e)},$.g.va=function(t,e){return this.Yj.va(t,e)},$.g.g=$.ir,$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa],e=this.Yj.iH(this.aa);return e&&t.push.apply(t,e.Xd()),t},$.g.Wd=function(){var t=[this.Pa],e=this.Yj.iH(this.aa);return e&&t.push.apply(t,e.Wd()),t},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb};var aea=$.my.prototype,AG={};$.sq(AG,[$.Z.cC,$.Z.jZ,$.Z.u9,$.Z.q8,$.Z.qF,$.Z.c9,$.Z.N8,$.Z.Y8,$.Z.L8,$.Z.h9,$.Z.w9,$.Z.s8,$.Z.e9,$.Z.j$,$.Z.x$,$.Z.gZ,$.Z.kZ,$.Z.v9,$.Z.r8,$.Z.M8,$.Z.Z8,$.Z.y$,$.Z.EZ,$.Z.uZ,$.Z.q$,$.Z.fZ,$.Z.k8,$.Z.l8,$.Z.z8,$.Z.D8,$.Z.E8,$.Z.G8,$.Z.C8,$.Z.x8,$.Z.A8,$.Z.y8,$.Z.o$,$.Z.h8,$.Z.i8,$.Z.p8,$.Z.G7,$.Z.z$,$.Z.I8,$.Z.a$]),aea.fC=AG,$.U($.my,$.my.prototype.fC),$.g=$.my.prototype,$.g.Jk=function(t,e){$.A(e)?$.tq.apply(null,$.Ga(this.ua,t,e)):$.C(e)&&(this.ua[t]=e)},$.g.labels=function(t){if(!this.Da){var e=this.g("labelsFactoryConstructor")||$.ny,i=this.g("labelsAfterInitCallback")||$.ia;this.Da=e(),this.Da.WE=!1,$.W(this,"labels",this.Da),i.call(this.Yj,this.Da)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.Da.N(t),this):this.Da},$.g.th=function(t){if(!this.o){var e=this.g("labelsFactoryConstructor")||$.oy,i=this.g("labelsAfterInitCallback")||$.ia;this.o=e(),this.o.WE=!1,$.W(this,"minLabels",this.o),i.call(this.Yj,this.o),this.o.I(4294967295)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.o.N(t),this):this.o},$.g.sh=function(t){if(!this.f){var e=this.g("labelsFactoryConstructor")||$.oy,i=this.g("labelsAfterInitCallback")||$.ia;this.f=e(),this.f.WE=!1,$.W(this,"maxLabels",this.f),i.call(this.Yj,this.f),this.f.I(4294967295)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.f.N(t),this):this.f},$.g.headers=function(t){if(!this.i){var e=this.g("labelsFactoryConstructor")||$.oy,i=this.g("headersAfterInitCallback")||Lca;this.i=e(),$.W(this,"headers",this.i),i.call(this.Yj,this.i)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.i.N(t),this):this.i},$.g.Jm=function(t){return this.labels(t)},$.g.Ck=function(t){if(!this.K){var e=this.g("labelsFactoryConstructor")||$.ny,i=this.g("labelsAfterInitCallback")||$.ia;this.K=e(),i.call(this.Yj,this.K)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.K.N(t),this):this.K},$.g.Db=function(t){if(!this.Bc){var e=this.g("markersFactoryConstructor")||$.qy,i=this.g("markersAfterInitCallback")||$.ia;this.Bc=e(),$.W(this,"markers",this.Bc),i.call(this.Yj,this.Bc)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.Bc.N(t),this):this.Bc},$.g.dl=function(t){if(!this.D){var e=this.g("outlierMarkersAfterInitCallback")||$.ia;this.D=new $.dy,$.W(this,"outlierMarkers",this.D),e.call(this.Yj,this.D)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.D.N(t),this):this.D},$.g.Zf=function(t){if(!this.b){var e=this.g("connectorAfterInitCallback")||$.ia;this.b=new ly,$.W(this,"connector",this.b),e.call(this.Yj,this.b)}return $.p(t)?(this.b.N(t),this):this.b},$.g.xt=function(t){if(!this.G){var e=this.g("outlineConstructor")||Kca,i=this.g("outlineAfterInitCallback")||$.ia;this.G=e(),$.W(this,"outline",this.G),i.call(this.Yj,this.G)}return $.p(t)?(this.G.N(t),this):this.G},$.g.background=function(t){if(!this.Ia){var e=this.g("backgroundAfterInitCallback")||Nca;this.Ia=new $.yu,$.W(this,"background",this.Ia),e.call(this.Yj,this.Ia),this.Ia.df()}return $.p(t)?(this.Ia.N(t),this):this.Ia},$.g.Qa=function(t){return this.Yj.Qa(t)},$.g.lb=function(t){return this.Yj.lb(t)},$.g.selected=function(t){return this.Yj.selected?this.Yj.selected(t):null},$.g.F=function(){var t=$.my.u.F.call(this);return $.Tq(this,this.fC,t,"State settings",this.ua),this.ua.labels&&(t.labels=this.labels().F()),this.ua.minLabels&&(t.minLabels=this.th().F()),this.ua.maxLabels&&(t.maxLabels=this.sh().F()),this.ua.headers&&(t.headers=this.headers().F()),this.ua.lowerLabels&&(t.lowerLabels=this.Ck().F()),this.ua.upperLabels&&(t.upperLabels=t.labels,delete t.labels),this.ua.markers&&(t.markers=this.Db().F()),this.ua.outlierMarkers&&(t.outlierMarkers=this.dl().F()),this.ua.connector&&(t.connector=this.Zf().F()),this.ua.outline&&(t.outline=this.xt().F()),this.ua.background&&(t.background=this.background().F()),t},$.g.U=function(t,e){$.my.u.U.call(this,t,e),$.Iq(this,this.fC,t,e);var i=$.Jc(t);if($.p(this.ua.labels)){var n=i?this.labels().oa:t.labels;vy(n),this.labels().ga(!!e,n)}$.p(this.ua.minLabels)&&(n=i?this.th().oa:t.minLabels,vy(n),this.th().ga(!!e,n)),$.p(this.ua.maxLabels)&&(n=i?this.sh().oa:t.maxLabels,vy(n),this.sh().ga(!!e,n)),$.p(this.ua.headers)&&(n=i?this.headers().oa:t.headers,vy(n),this.headers().N(n)),$.p(this.ua.lowerLabels)&&(n=i?this.Ck().oa:t.lowerLabels,vy(n),this.Ck().ga(!!e,n)),$.p(this.ua.upperLabels)&&(n=i?this.Jm().oa:t.upperLabels,vy(n),this.Jm().ga(!!e,n)),$.p(this.ua.markers)&&(n=i?this.Db().oa:t.markers,vy(n),this.Db().ga(!!e,n)),$.p(this.ua.outlierMarkers)&&(n=i?this.dl().oa:t.outlierMarkers,vy(n),this.dl().ga(!!e,n)),$.p(this.ua.connector)&&this.Zf().ga(!!e,i?this.Zf().oa:t.connector),$.p(this.ua.outline)&&this.xt().ga(!!e,i?this.xt().oa:t.outline),$.p(this.ua.background)&&(this.background().ga(!!e,t.background),this.background().I(4294967295))},$.g.df=function(t){return $.my.u.df.call(this,t),this.jg(null),this},$.g.R=function(){$.sd(this.Da,this.o,this.f,this.i,this.K,this.Bc,this.D,this.G,this.b,this.Ia),delete this.b,$.my.u.R.call(this)};var BG=$.my.prototype,yy;BG.labels=BG.labels,BG.minLabels=BG.th,BG.maxLabels=BG.sh,BG.headers=BG.headers,BG.upperLabels=BG.Jm,BG.lowerLabels=BG.Ck,BG.markers=BG.Db,BG.outlierMarkers=BG.dl,BG.connector=BG.Zf,BG.outline=BG.xt,BG.normal=BG.Qa,BG.hovered=BG.lb,BG.selected=BG.selected,Tc("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" ")),$.ja($.Ay),$.Ay.prototype.b=0,$.H($.By,$.qf),$.By.prototype.sb=$.Ay.Id();var Oca=null,Iy;$.g=$.By.prototype,$.g.oy=function(){return this.he||(this.he=":"+(this.sb.b++).toString(36))},$.g.Ya=function(){return this.Ed},$.g.fl=function(t){if(this==t)throw Error("Unable to set parent component");if(t&&this.Y&&this.he&&$.Gy(this.Y,this.he)&&this.Y!=t)throw Error("Unable to set parent component");this.Y=t,$.By.u.kb.call(this,t)},$.g.getParent=function(){return this.Y},$.g.kb=function(t){if(this.Y&&this.Y!=t)throw Error("Method not supported");$.By.u.kb.call(this,t)},$.g.Ac=function(){this.Ed=this.f.createElement("DIV")},$.g.Sd=function(t){this.vE(t)},$.g.vE=function(t,e){if(this.xf)throw Error("Component already rendered");this.Ed||this.Ac(),t?t.insertBefore(this.Ed,e||null):this.f.b.body.appendChild(this.Ed),this.Y&&!this.Y.xf||this.Gg()},$.g.Bs=ba(17),$.g.xH=ba(19),$.g.pl=ba(22),$.g.Gg=function(){this.xf=!0,this.Pj((function(t){!t.xf&&t.Ya()&&t.Gg()}))},$.g.Dh=function(){this.Pj((function(t){t.xf&&t.Dh()})),this.G&&pf(this.G),this.xf=!1},$.g.R=function(){this.xf&&this.Dh(),this.G&&(this.G.ld(),delete this.G),this.Pj((function(t){t.ld()})),!this.fb&&this.Ed&&$.Xe(this.Ed),this.Y=this.dh=this.Ed=this.D=this.o=null,$.By.u.R.call(this)},$.g.hc=function(t,e){this.Eg(t,$.Fy(this),e)},$.g.Eg=function(t,e,i){if(t.xf&&(i||!this.xf))throw Error("Component already rendered");if(0>e||e>$.Fy(this))throw Error("Child component index out of bounds");if(this.D&&this.o||(this.D={},this.o=[]),t.getParent()==this){var n=t.oy();this.D[n]=t,$.Fa(this.o,t)}else $.Mc(this.D,t.oy(),t);t.fl(this),$.Da(this.o,t,e),t.xf&&this.xf&&t.getParent()==this?(e=(i=this.AD()).childNodes[e]||null)!=t.Ya()&&i.insertBefore(t.Ya(),e):i?(this.Ed||this.Ac(),e=this.xd(e+1),t.vE(this.AD(),e?e.Ed:null)):this.xf&&!t.xf&&t.Ed&&t.Ed.parentNode&&1==t.Ed.parentNode.nodeType&&t.Gg()},$.g.AD=function(){return this.Ed},$.g.xd=function(t){return this.o&&this.o[t]||null},$.g.Pj=function(t,e){this.o&&(0,$.Pe)(this.o,t,e)},$.g.Kf=function(t){return this.o&&t?(0,$.za)(this.o,t):-1},$.g.removeChild=function(t,e){if(t){var i=$.z(t)?t:t.oy();t=$.Gy(this,i),i&&t&&($.Lc(this.D,i),$.Fa(this.o,t),e&&(t.Dh(),t.Ed&&$.Xe(t.Ed)),t.fl(null))}if(!t)throw Error("Child is not in parent component");return t},$.g.Cj=function(t,e){return this.removeChild(this.xd(t),e)},$.g.Gi=function(t){for(var e=[];this.o&&0!=this.o.length;)e.push(this.Cj(0,t));return e},$.H($.Hy,$.By),$.g=$.Hy.prototype,$.g.Ut=null,$.g.GH=!1,$.g.Ac=function(){this.Ed=this.f.Ac("INPUT",{type:"text"})},$.g.pl=ba(21),$.g.Gg=function(){$.Hy.u.Gg.call(this);var t=new nf(this);if(t.wa(this.Ya(),"focus",this.VU),t.wa(this.Ya(),"blur",this.iga),$.Jy())this.Qg=t;else{$.gd&&t.wa(this.Ya(),["keypress","keydown","keyup"],this.sga);var e=$.te(this.Ya());t.wa(e?$.Ge(e):window,"load",this.Iga),this.Qg=t,Ky(this)}this.fo(),this.Ya().u3=this},$.g.Dh=function(){$.Hy.u.Dh.call(this),this.Qg&&(this.Qg.ld(),this.Qg=null),this.Ya().u3=null},$.g.R=function(){$.Hy.u.R.call(this),this.Qg&&(this.Qg.ld(),this.Qg=null)},$.g.VU=function(){this.GH=!0;var t=this.Ya();if($.Sj(t,"label-input-label"),!$.Jy()&&!$.Ly(this)&&!this.b){var e=this;t=function(){e.Ya()&&(e.Ya().value="")},$.hd?$.Dj(t,10):t()}},$.g.iga=function(){$.Jy()||(this.Qg.gc(this.Ya(),"click",this.VU),this.Ut=null),this.GH=!1,this.fo()},$.g.sga=function(t){27==t.keyCode&&("keydown"==t.type?this.Ut=this.Ya().value:"keypress"==t.type?this.Ya().value=this.Ut:"keyup"==t.type&&(this.Ut=null),t.preventDefault())},$.g.tga=function(){$.Ly(this)||(this.Ya().value="",$.Dj(this.ega,10,this))},$.g.ega=function(){$.Ly(this)||(this.Ya().value=this.i)},$.g.Iga=function(){this.fo()},$.g.clear=function(){this.Ya().value="",null!=this.Ut&&(this.Ut="")},$.g.reset=function(){$.Ly(this)&&(this.clear(),this.fo())},$.g.vj=function(){return null!=this.Ut?this.Ut:$.Ly(this)?this.Ya().value:""},$.g.be=function(){return this.i},$.g.fo=function(){var t=this.Ya();$.Jy()?this.Ya().placeholder!=this.i&&(this.Ya().placeholder=this.i):Ky(this),$.zy(t,"label",this.i),$.Ly(this)?(t=this.Ya(),$.Sj(t,"label-input-label")):(this.b||this.GH||(t=this.Ya(),$.Qj(t,"label-input-label")),$.Jy()||$.Dj(this.bka,10,this))},$.g.Dj=function(t){this.Ya().disabled=!t;var e=this.Ya();t?$.Sj(e,"label-input-label-disabled"):$.Qj(e,"label-input-label-disabled")},$.g.isEnabled=function(){return!this.Ya().disabled},$.g.B1=ba(23),$.g.bka=function(){!this.Ya()||$.Ly(this)||this.GH||(this.Ya().value=this.i)},$.H($.Ny,$.Y),$.g=$.Ny.prototype,$.g.Ih=function(t){t:{var e=t.type;switch(e){case"mouseout":e="axismarkerout";break;case"mouseover":e="axismarkerover";break;case"mousemove":e="axismarkermove";break;default:t=null;break t}t={type:e,target:this,originalEvent:t,rawValue:this.tK(),formattedValue:this.kR(),offsetX:t.offsetX,offsetY:t.offsetY}}t&&this.dispatchEvent(t)},$.g.kR=function(){return"Value: "+this.tK()},$.g.ra=4|$.Y.prototype.ra,$.g.sa=20|$.Y.prototype.sa,$.g.xc=function(){return this.pa},$.g.WK=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma());if(t=e?t==this.o?null:t:$.jt(this.o,t,null,15,null,this.zg,this)){var i=this.o==t;this.o=t;var n=this.qa||this.b&&this.b.scale();n?t.da(!1):e||t.da(i),i||n||this.B(4,13)}}},$.g.Po=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma()),i=e?t==this.qa?null:t:$.jt(this.qa,t,null,15,null,this.zg,this);if(i||null===t&&this.qa){t=this.qa==i;var n=e&&!this.qa;i||$.kr(this.qa,this.zg,this),this.qa=i,n&&$.K(this.qa,this.zg,this),i&&!e&&i.da(t),t||this.B(4,13)}return this}return this.qa||this.b&&this.b.scale()||this.o},$.g.p3=function(){return!!this.qa},$.g.zg=function(t){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)&&(e|=1),this.B(4,8|e)},$.g.tK=function(){return $.p(void 0)?(void 0!==this.g("value")&&this.value(void 0),this):this.g("value")},$.g.uD=function(){var t=9;return"consider"==this.g("scaleRangeMode")&&(t|=4),t},$.g.mr=function(){return 4|$.Ny.u.mr.call(this)},$.g.xs=function(){return[this.tK()]},$.g.e_=function(){this.B(4,9)},$.g.axis=function(t){return $.p(t)?(this.b!=t&&(this.b&&$.kr(this.b,this.e_,this),this.b=t,$.K(this.b,this.e_,this),this.B(4,13)),this):this.b},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.Nb=function(){return"horizontal"==this.we()},$.g.fs=void 0,$.g.kv=void 0,$.g.W=function(){if(!this.scale())return $.il(2),this;if(!this.zc())return this;if(this.J(8)){var t=this.zIndex();$.Oy(this).zIndex(t),this.I(8)}return this.J(2)&&(t=this.O(),$.Oy(this).parent(t),this.I(2)),this.J(16)&&(this.kv(),this.I(16)),this.J(4)&&(this.fs(),this.I(4)),this},$.g.lo=function(){var t=this.scale();if(t){var e=$.Oy(this),i=t.transform(this.g("value"),.5);if(e.clear(),!(0,window.isNaN)(i)&&(0<=i&&1>=i||this.i)){t=this.ja();var n=this.Qp(),s=e.gl();this.Nb()?(i=t.Vb()+t.height-i*t.height,i=$.R(i,s),e.moveTo(t.tb(),i),e.lineTo(t.cb(),i)):(i=t.tb()+i*t.width,i=$.R(i,s),e.moveTo(i,t.Vb()),e.lineTo(i,t.Va())),this.i||e.clip(n.Ej(t))}}else $.il(2)},$.g.remove=function(){$.Oy(this).parent(null)};var CG={};$.sq(CG,[[0,"scaleRangeMode",gl]]),$.U($.Ny,CG),$.Ny.prototype.U=function(t,e){if($.Ny.u.U.call(this,t,e),"layout"in t&&t.layout&&this.we(t.layout),"axis"in t){var i=t.axis;$.ea(i)?this.pa&&this.axis(this.pa.ZG(i)):i.Iy&&i.Iy()&&this.axis(i)}$.Iq(this,CG,t,e)},$.Ny.prototype.F=function(){var t=$.Ny.u.F.call(this);return $.Tq(this,CG,t),t},$.Ny.prototype.R=function(){this.pa=this.b=null,$.sd(this.D,this.$g),this.$g=this.D=null,$.Ny.u.R.call(this)},$.H($.Qy,$.Y),$.Qy.prototype.ra=$.Y.prototype.ra,$.Qy.prototype.sa=$.Y.prototype.sa;var bea=$.Qy.prototype,DG={};$.sq(DG,[[1,"stroke",$.Pq],[0,"length",$.yo],[0,"position",$.Wk]]),bea.dR=DG,$.U($.Qy,$.Qy.prototype.dR),$.g=$.Qy.prototype,$.g.orientation=function(t){return $.p(t)?(t=$.Lk(t),this.vh!=t&&(this.vh=t,this.ep=null),this):this.vh},$.g.remove=function(){this.path&&this.path.parent(null)},$.g.W=function(){return this.path.clear(),this.path.stroke(this.g("stroke")),this.zc()?(this.J(8)&&(this.path.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.path.parent(this.O()),this.I(2)),this):this},$.g.h1=function(t,e,i,n){t=e.left+t*e.width;var s=i.top;t=$.R(t,this.path.gl());var a=this.g("position");e=$.L(this.g("length"),e.height),"outside"==a?(s-=n/2,i=-e):(s="center"==a?s+(i.height-e)/2:s+n/2,i=e),this.path.moveTo(t,s),this.path.lineTo(t,s+i)},$.g.nT=function(t,e,i,n){i=i.left,t=e.top+e.height-t*e.height,t=$.R(t,this.path.gl());var s=this.g("position");e=$.L(this.g("length"),e.width),"outside"==s?(i+=n/2,n=e):"center"==s?(i-=e/2,n=e):(i-=n/2,n=-e),this.path.moveTo(i,t),this.path.lineTo(i+n,t)},$.g.hT=function(t,e,i,n){t=e.left+t*e.width,i=i.top,t=$.R(t,this.path.gl());var s=this.g("position");e=$.L(this.g("length"),e.height),"outside"==s?(i+=n/2,n=e):"center"==s?(i-=e/2,n=e):(i-=n/2,n=-e),this.path.moveTo(t,i),this.path.lineTo(t,i+n)},$.g.lT=function(t,e,i,n){i=i.left,t=e.top+e.height-t*e.height,t=$.R(t,this.path.gl());var s=this.g("position");e=$.L(this.g("length"),e.width),"outside"==s?(i-=n/2,n=-e):(i="center"==s?i-e/2:i+n/2,n=e),this.path.moveTo(i,t),this.path.lineTo(i+n,t)},$.g.F=function(){var t=$.Qy.u.F.call(this);return $.Tq(this,this.dR,t,"AxisTicks"),t},$.g.U=function(t,e){$.Qy.u.U.call(this,t,e),$.Iq(this,this.dR,t,e)},$.g.R=function(){$.qd(this.path),this.path=null,$.Qy.u.R.call(this)},$.H($.Sy,$.Y),$.Sy.prototype.g=function(t){var e=$.Sy.u.g.call(this,t);return("orientation"==t&&null==e||!$.p(e))&&(e=this.Nd[t]),e};var EG={};$.sq(EG,[$.Z.jK,$.Z.tQ,$.Z.uQ,$.Z.dC,$.Z.Yn,[0,"staggerMode",$.Dq],[0,"staggerMaxLines",$.xq],[0,"staggerLines",$.xq],[0,"orientation",dr],[0,"value",Co]]),$.U($.Sy,EG),$.g=$.Sy.prototype,$.g.sa=976|$.Y.prototype.sa,$.g.ra=$.Y.prototype.ra,$.g.Pc=null,$.g.Er="axis",$.g.jb=null,$.g.Da=null,$.g.rc=null,$.g.mb=null,$.g.Rc=null,$.g.In=null,$.g.AJ=1,$.g.Hq=null,$.g.UH=null,$.g.Wa=null,$.g.ci=null,$.g.Fk=null,$.g.title=function(t){return this.jb||(this.jb=new $.aw,$.W(this,"title",this.jb),this.jb.kb(this),$.K(this.jb,this.Mq,this)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.Mq=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9):$.X(t,1)&&(e=64,i=1),this.B(e,i)},$.g.labels=function(t){return this.Da||(this.Da=new $.Pu,$.W(this,"labels",this.Da),this.Da.kb(this),$.K(this.Da,this.de,this)),$.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.Da.N(t),this):this.Da},$.g.de=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9):$.X(t,1)&&(e=384,i=1),this.labels().clear(),this.ns(),this.ik=null,this.ae(),this.B(e,i)},$.g.qb=function(t){return this.rc||(this.rc=new $.Pu,$.W(this,"minorLabels",this.rc),this.rc.kb(this),$.K(this.rc,this.Baa,this)),$.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.rc.N(t),this):this.rc},$.g.Baa=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9):$.X(t,1)&&(e=128,i=1),this.ik=null,this.ae(),this.qb().clear(),this.B(e,i)},$.g.ol=function(){return new $.Qy},$.g.Bz=function(){return this.line?this.line:this.line=$.qk()},$.g.Xa=function(t){return this.mb||(this.mb=this.ol(),$.W(this,"ticks",this.mb),this.mb.kb(this),$.K(this.mb,this.ZZ,this)),$.p(t)?(this.mb.N(t),this):this.mb},$.g.yb=function(t){return this.Rc||(this.Rc=this.ol(),$.W(this,"minorTicks",this.Rc),this.Rc.kb(this),$.K(this.Rc,this.ZZ,this)),$.p(t)?(this.Rc.N(t),this):this.Rc},$.g.ZZ=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9,this.ae()):$.X(t,1)&&(e=256,i=1),this.B(e,i)},$.g.scale=function(t){if($.p(t)){if(this.In!=t&&(t=$.jt(this.scale(),t,null,this.WT(),null,this.zg,this))){var e=this.In==t;this.In=t,this.ns(),this.ik=null,this.ae(),this.labels().clear(),this.qb().clear(),t.da(e),e||this.B(this.se,9)}return this}return this.In},$.g.WT=function(){return 15},$.g.zg=function(t){$.X(t,2)&&(this.ns(),this.ik=null,this.ae(),this.labels().clear(),this.qb().clear(),this.B(this.se,9))},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.fm,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.dF=function(t){return($.ea(t)||$.J(t,$.Sy))&&(this.Ba=t,this.B(this.se,9)),this.Ba},$.g.fm=function(t){$.X(t,2)&&(this.ns(),this.ik=null,this.ae(),this.B(this.se,9))},$.g.Iy=function(){return!0},$.g.ns=function(){this.na=null},$.g.sy=function(t){if(!this.ik||this.J(512)){var e=this.scale();if(e){var i=this.labels(),n=i.enabled(),s=e.Xa().get(),a=s.length;if(n){var o,r=0;for(o=a;r<o;r++)(0==r&&this.g("drawFirstLabel")||r==a-1&&this.g("drawLastLabel")||0<r&&r<a-1)&&this.be(r,!0,s,t)}if($.J(e,$.kt)){var l=this.qb(),h=l.enabled(),c=(l=e.yb().get()).length;if(h)for(r=0,o=c;r<o;r++)this.be(r,!1,l,t)}}if("allow-overlap"==this.g("overlapMode"))return{labels:n,qb:h};o=[];var u=[];if(e){var d,p,g,f=-1,b=-1,v=-1;r=i.g("position");var m=this.UH&&0>$.Ho(r)?this.UH:null,y=this.g("drawFirstLabel"),S=this.g("drawLastLabel");if($.J(e,$.kt)){i=r=0;for(var w;r<a||i<c;){var x=s[r],C=l[i],D=e.transform(x);if(w=e.transform(C),C=x=d=p=null,-1==b&&n)for(g=r;-1==b&&g<a;){C=!g&&y||g==a-1&&S||0!=g&&g!=a-1?this.rd(g,!0,s,t):null,x=-1!=f?this.rd(f,!0,s,t):null,d=g!=a-1&&S?this.rd(a-1,!0,s,t):null;var T=!m||!Uy(this,m,C);C&&T&&!$.bn(C,x)&&!$.bn(C,d)&&(0>=(T=e.transform(s[g]))&&y||1<=T&&S||0<T&&1>T)&&(b=g),g++}D<=w&&r<a||i==c?(n&&r==b?(f=r,b=-1,o.push(!0)):o.push(!1),r++,D==w&&(n||this.Xa().enabled())&&(u.push(!1),i++)):(h?(C=this.rd(i,!1,l,t),-1!=f&&(x=this.rd(f,!0,s,t)),-1!=b&&(d=this.rd(b,!0,s,t)),-1!=v&&(p=this.rd(v,!1,l,t)),D=!(D=this.qb().be(i))||!$.p(D.enabled())||D.enabled(),!(T=!m||!Uy(this,m,C))||$.bn(C,x)||$.bn(C,d)||$.bn(C,p)||!D?u.push(!1):0>=(T=e.transform(l[i]))&&y||1<=T&&S||0<T&&1>T?(v=i,u.push(!0)):u.push(!1)):u.push(!1),i++)}h||(u=!1)}else if($.J(e,Xs))for(S?(d=this.rd(a-1,!0,s,t),d=m&&Uy(this,m,d)?null:d):d=null,r=0;r<a;r++)n?(C=!r&&y||r==a-1&&S||0!=r&&r!=a-1?this.rd(r,!0,s,t):null,x=-1!=f?this.rd(f,!0,s,t):null,T=!m||!Uy(this,m,C),r?r==a-1?S&&T?(f=r,o.push(!0)):o.push(!1):!T||$.bn(C,x)||$.bn(C,d)?o.push(!1):(f=r,o.push(!0)):y&&T?(f=r,o.push(!0)):o.push(!1)):o.push(!1)}n||(o=!1),this.ik={labels:o,qb:u},this.B(this.se),this.I(512)}return this.ik},$.g.be=function(t,e,i,n){if(!e&&this.scale()&&!$.J(this.scale(),$.kt))return null;var s=e?this.labels():this.qb(),a=s.be(t);return a||((a=s.add(void 0,void 0,t)).Pa.ja=this.ja(),a.xr=null,$.bv(a,[a.Pa,s.Pa,s.oa])),s=i[t],s=$.A(s)?s[0]:s,a.jc(Pca(this,t,e,i,n)),a.Hf(this.nq(t,s)),a.sM(),a},$.g.rd=function(t,e,i,n){if(!e&&this.scale()&&!$.J(this.scale(),$.kt)||0>t)return null;var s=e?this.ci:this.Fk;if($.p(s[t]))return s[t];var a=Xy(this,i[t]);if(0>a||1<a)return[0,0];if(a=e?this.labels():this.qb(),i=this.be(t,e,i,n),n=Su(i))i.Pa.ja=this.ja(),$.bv(i,[i.Pa,a.Pa,a.oa]),e=a.measure(i,void 0,void 0,t);else{(e=i.Rh()).Ta&&($.mg().Xp().appendChild(e.Vd()),i.B(2),e.b=0,e.Ta=null,e.setPosition(0,0)),e=e.rb();var o=i.ic("padding");o&&!$.Jc(o)&&(e=$.Ku(e,o)),e.left=i.jc().value.x,e.top=i.jc().value.y}switch(a=a.g("position"),a=$.Ho(a),this.g("orientation")){case"top":e.top-=a*e.height/2;break;case"right":e.left+=a*e.width/2;break;case"bottom":e.top+=a*e.height/2;break;case"left":e.left-=a*e.width/2}if(n)e=$.ln(e);else{n=(a=$.Uu(i)).anchor||"left-top",i=$.Eo(new $.I(0,0,e.width,e.height),n),e.left-=i.x,e.top-=i.y,i=$.Eo(e,n),o=this.ja();var r=a.offsetX,l=a.offsetY,h=new $.gb(e.left,e.top);$.Yo(h,n,$.p(r)?$.L(r,o.width):0,$.p(l)?$.L(l,o.height):0),e.left=h.x,e.top=h.y,e=$.ln(e),a.rotation&&$.Kb($.bb(a.rotation),i.x,i.y).transform(e,0,e,0,4)}return s[t]=e},$.g.HM=function(t,e,i,n,s){var a=0,o=0;switch(this.g("orientation")){case"top":a=Math.round(t.left+e*t.width),o=s.top-i/2-n;break;case"right":a=s.cb()+i/2+n,o=Math.round(t.Va()-e*t.height);break;case"bottom":a=Math.round(t.left+e*t.width),o=s.Va()+i/2+n;break;case"left":a=s.left-i/2-n,o=Math.round(t.Va()-e*t.height)}return{x:a,y:o}},$.g.ae=function(){this.o&&(this.o.length=0),this.ci.length=0,this.Fk.length=0,this.Hq=this.ea=null},$.g.l0=function(t,e,i){var n=this.Xa(),s=this.yb(),a=this.labels().g("position"),o=this.qb().g("position"),r=n.g("position"),l=s.g("position"),h=$.Ho(a),c=$.Ho(o);return r=$.Ho(r),l=$.Ho(l),i?(i=n.enabled()?n.g("length"):0,s=s.enabled()?s.g("length"):0,r=r||h?h?t+i:t/2+Math.max(t/2,i):Math.max(t,i),h=l||c?h?e+s:e/2+Math.max(e/2,s):Math.max(e,s)):(r=i=$.Io(n,1),h=s=$.Io(s,1),"outside"==a?r+=t:"center"==a&&(r=Math.max(r,t/2)),"outside"==o?h+=e:"center"==o&&(h=Math.max(h,e/2))),Math.max(r,h)},$.g.Jg=function(t){return this.Nb()?this.padding().Ng(t):this.padding().Yh(t)},$.g.yd=function(t){var e=this.ja();if(e&&null===this.g("value")){var i=e.clone();if(this.scale()&&this.enabled()){var n=this.ob(t),s=this.padding();switch(t=e.height-s.Yh(e.height)+n.height,e=e.width-s.Ng(e.width)+n.width,this.g("orientation")){case"top":i.height-=t,i.top+=t;break;case"right":i.width-=e;break;case"bottom":i.height-=t;break;case"left":i.width-=e,i.left+=e}}return i}return new $.I(0,0,0,0)},$.g.bG=function(t,e,i,n){var s=this.g("width");return s?$.L(s,t):$.Wy(this,i,e,n)},$.g.ob=function(t){var e=t&&4!=(this.labels().enabled()?$.Ho(this.labels().g("position")):1)+(this.qb().enabled()?$.Ho(this.qb().g("position")):1)+(this.Xa().enabled()?$.Ho(this.Xa().g("position")):1)+(this.yb().enabled()?$.Ho(this.yb().g("position")):1),i=e?this.ea:this.Hq;if(!i||this.J(4)){if(i=this.ja()){if(i.top=Math.round(i.top),i.left=Math.round(i.left),i.width=Math.round(i.width),i.height=Math.round(i.height),this.Nb())var n=i.width,s=i.height;else n=i.height,s=i.width;n=this.Jg(n),t=this.bG(s,n,i,t);var a=this.padding();s=$.L(a.g("top"),i.height);var o=$.L(a.g("right"),i.width),r=$.L(a.g("bottom"),i.height);a=$.L(a.g("left"),i.width);var l=0,h=0,c=0,u=0;switch(this.g("orientation")){case"top":h=i.top+s,l=i.left+a,u=t,c=n;break;case"right":h=i.top+s,l=i.left+i.width-t-o,u=n,c=t;break;case"bottom":h=i.top+i.height-t-r,l=i.left+a,u=t,c=n;break;case"left":h=i.top+s,l=i.left+a,u=n,c=t}(i=new $.I(l,h,c,u)).round(),e?this.ea=i:this.Hq=i}else this.Hq=new $.I(0,0,0,0),this.ea=new $.I(0,0,0,0);this.I(4)}return e?this.ea:this.Hq},$.g.hR=function(t,e,i){e=t.Va(),e+=i/2,this.line.moveTo($.R(t.left,1)-.5,e).lineTo($.R(t.cb(),1)+.5,e)},$.g.gR=function(t,e,i){e=t.left,e-=i/2-1,this.line.moveTo(e,$.R(t.top,1)-.5).lineTo(e,$.R(t.Va(),1)+.5)},$.g.eR=function(t,e,i){e=t.top,e-=i/2-1,this.line.moveTo($.R(t.left,1)-.5,e).lineTo($.R(t.cb(),1)+.5,e)},$.g.fR=function(t,e,i){e=t.cb(),e+=i/2,this.line.moveTo(e,$.R(t.top,1)-.5).lineTo(e,$.R(t.Va(),1)+.5)},$.g.lo=function(){switch(this.Bz().clear(),this.g("orientation")){case"top":var t=this.hR;break;case"right":t=this.gR;break;case"bottom":t=this.eR;break;case"left":t=this.fR}var e=this.g("stroke"),i=$.dp(e),n=0==(i=i||1)%2?0:.5,s=this.ob();t.call(this,s,n,i,0,0),this.line.stroke(e)},$.g.GM=function(t,e,i,n,s,a){var o=this.ob(),r=this.line.rb(),l=this.g("stroke");l=$.dp(l);var h=0,c=0;switch(this.g("orientation")){case"top":h=Math.round(o.left+t*o.width)+s,c=r.top-a*(l/2+e.height/2+i)-n;break;case"right":h=r.cb()+a*(l/2+e.width/2+i)+n,c=Math.round(o.top+o.height-t*o.height)+s;break;case"bottom":h=Math.round(o.left+t*o.width)+s,c=r.Va()+a*(l/2+e.height/2+i)+n;break;case"left":h=r.left-a*(l/2+e.width/2+i)-n,c=Math.round(o.top+o.height-t*o.height)+s}return{x:h,y:c}},$.g.ke=function(t,e,i,n,s,a,o){if(s)var r=this.Xa(),l=this.labels();else r=this.yb(),l=this.qb();if(o){if(a=$.mn(this.rd(i,s,a)),o=0,s){var h=!0;if(1<this.G&&this.g("staggerMode"))for(var c=0,u=this.ba.length;c<u;c++){for(var d=this.ba[c],p=0,g=d.length;p<g;p++)if(i==d[p]){h=!1;break}if(!h)break;o+=this.aa[c]}}h=$.Ho(l.g("position")),r=$.Io(r,h),e={value:this.GM(e,a,o,r,n,h,s)},t=this.nq(i,t),(n=l.be(i))||(n=l.add(t,e,i),$.bv(n,[n.Pa,l.Pa,l.oa])),n.Hf(t),n.jc(e)}else l.clear(i)},$.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.title().B(2),this.Xa().B(2),this.yb().B(2),this.labels().B(2),this.qb().B(2),this.B(450)),!1))},$.g.cM=function(){var t=this.title();t.ja(this.ob()),$.dw(t,this.g("orientation")),t.W()},$.g.iR=function(){var t=this.zIndex();this.line.zIndex(t),this.title().zIndex(t),this.Xa().zIndex(t),this.yb().zIndex(t),this.labels().zIndex(t),this.qb().zIndex(t)},$.g.BE=function(t,e,i){return $.A(i)?i[t]:i},$.g.W=function(){var t=this.scale();if(!t)return $.il(2),this;if(!this.zc())return this;var e=this.g("orientation"),i=this.Xa(),n=this.yb();if(this.title().ka(),this.labels().ka(),this.qb().ka(),i.ka(),n.ka(),this.J(16)&&(this.lo(),this.I(16)),this.J(8)&&(this.iR(),this.I(8)),this.J(2)){var s=this.O();this.title().O(s),this.line.parent(s),i.O(s),n.O(s),this.labels().O(s),this.qb().O(s),this.I(2)}if(this.J(64)&&(this.cM(),this.I(64)),this.J(256)){var a=this.Xa();a.orientation(e),a.W();var o=$.Ry(a),r=this.yb();r.orientation(e),r.W();var l=$.Ry(r);this.I(256)}if(this.J(128)&&((e=this.labels()).O()||e.O(this.O()),e.ja(this.ja()),(e=this.qb()).O()||e.O(this.O()),e.ja(this.ja()),this.I(128)),$.p(o)||$.p(l)){s=(e=t.Xa().get()).length;var h,c=i.g("stroke"),u=c&&c.thickness?(0,window.parseFloat)(c.thickness):1;c=this.ob();var d=this.line.rb(),p=this.g("stroke");p=$.Wb(p),p=$.dp(p);var g=$.J(t,$.Qt);if($.J(t,$.kt)){var f=Vy(this);if($.C(f)){var b=f.labels;g=f.qb}else b=!f,g=!f;for(var v,m,y,S=t.yb().get(),w=(f=n.g("stroke"))&&f.thickness?(0,window.parseFloat)(f.thickness):1,x=f=0,C=S.length;f<s||x<C;){var D=e[f];v=S[x];var T=t.transform(D);if(m=t.transform(v),"log"==t.Ma()&&(T=$.Tm(T,6),m=$.Tm(m,6)),T<=m&&f<s||x==C){y=0==u%2?0:-.5;var k=this.BE(f,e,b);v=f,m=b,(h=$.A(m)?m[v]:$.da(m))&&o&&o.call(a,T,c,d,p,y),this.ke(D,t.transform(D,.5),f,y,!0,e,k),y=T,f++}else T=0==w%2?0:-.5,k=this.BE(x,S,g),D=x,h=g,(h=$.A(h)?h[D]:$.da(h))&&l&&y!=m&&l.call(r,m,c,d,p,T),this.ke(v,t.transform(v,.5),x,T,!1,S,k&&y!=m),x++}g&&this.qb().W()}else for(l=Vy(this),b=$.C(l)?l.labels:!l,l=0==u%2?0:-.5,f=0;f<s;f++)D=e[f],$.A(D)?(r=D[0],y=D[1],u=(t.transform(D[0],0)+t.transform(D[1],1))/2):(r=y=D,u=t.transform(D,.5)),k=g&&"continuous"==t.mode()?.5:0,T=t.transform(r,k),o&&(0<=T&&1>=T&&o.call(a,T,c,d,p,l),f==s-1&&0<=(T=t.transform(y,1))&&1>=T&&o.call(a,T,c,d,p,l)),k=$.A(b)?b[f]:b,this.ke(r,u,f,l,!0,e,k&&0<=u&&1>=u);this.labels().W()}return this.title().da(!1),this.labels().da(!1),this.qb().da(!1),i.da(!1),n.da(!1),this},$.g.remove=function(){this.jb&&this.jb.remove(),this.line&&this.line.parent(null),this.Xa().remove(),this.yb().remove(),this.Da&&this.Da.remove(),this.rc&&this.rc.remove()},$.g.uo=function(){this.ns(),this.ik=null,this.ae(),this.B(this.se,9)},$.g.nq=function(t,e){var i,n=this.scale(),s=!0,a=!1;if($.J(n,$.Qt)){var o=n.Xa().names()[t],r=e,l=i="string";s=!1}else $.J(n,$.nt)?(o=$.vs(e),i="string",l="date-time",r=e,a=!0):(o=(0,window.parseFloat)(e),r=(0,window.parseFloat)(e),i=l="number");return o={axis:{value:this,type:""},index:{value:t,type:"number"},value:{value:o,type:i},tickValue:{value:r,type:l},scale:{value:n,type:""}},s&&(o.max={value:$.p(n.max)?n.max:null,type:"number"},o.min={value:$.p(n.min)?n.min:null,type:"number"}),a&&(s=n.Xa(),o.intervalUnit={value:s.dU(),type:"string"},o.intervalUnitCount={value:s.eU(),type:"number"},s=n.yb(),o.minorIntervalUnit={value:s.dU(),type:"string"},o.minorIntervalUnitCount={value:s.eU(),type:"number"}),(n={})["%AxisName"]={value:this.title().text(),type:"string"},(s=new $.Fw(o)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),s.Dl(n),$.ov(s)},$.g.Nb=function(){var t=this.g("orientation");return"top"==t||"bottom"==t},$.g.F=function(){var t=$.Sy.u.F.call(this);return $.Tq(this,EG,t),this.ph("zIndex")||delete t.zIndex,t.title=this.title().F(),t.labels=this.labels().F(),t.minorLabels=this.qb().F(),t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t},$.g.U=function(t,e){$.Sy.u.U.call(this,t,e),$.Iq(this,EG,t,e),"title"in t&&this.title().ga(!!e,t.title),"padding"in t&&this.padding(t.padding),this.labels().ga(!!e,t.labels),this.qb().ga(!!e,t.minorLabels),this.Xa(t.ticks),this.yb(t.minorTicks)},$.g.R=function(){this.In&&$.kr(this.In,this.zg,this),this.In=null,$.sd(this.jb,this.Wa,this.line,this.Da,this.rc,this.mb,this.Rc),this.Rc=this.mb=this.rc=this.Da=this.line=this.Wa=this.jb=null,this.ci.length=0,this.Fk.length=0,this.Hq=null,$.Sy.u.R.call(this)},$.H(Yy,$.Sy),$.xu(Yy,$.Sy);var FG=$.Sy.prototype;FG.title=FG.title,FG.labels=FG.labels,FG.minorLabels=FG.qb,FG.ticks=FG.Xa,FG.minorTicks=FG.yb,FG.scale=FG.scale,FG.getRemainingBounds=FG.yd,FG.isHorizontal=FG.Nb,FG.padding=FG.padding,FG.getPixelBounds=FG.ob,FG.valueTarget=FG.dF,FG=Yy.prototype,$.E("anychart.standalones.axes.linear",(function(){var t=new Yy;return t.Ga("standalones.linearAxis"),t})),FG.padding=FG.padding,FG.draw=FG.W,FG.parentBounds=FG.ja,FG.container=FG.O,$.H($.Zy,uv),$.Zy.prototype.Ih=function(t){t:{var e=t.type;switch(e){case"mouseout":e="axismarkerout";break;case"mouseover":e="axismarkerover";break;case"mousemove":e="axismarkermove";break;default:t=null;break t}t={type:e,target:this,originalEvent:t,rawValue:az(this),formattedValue:"Value: "+az(this),offsetX:t.offsetX,offsetY:t.offsetY}}t&&this.dispatchEvent(t)},$.Zy.prototype.ra=4|uv.prototype.ra,$.Zy.prototype.sa=uv.prototype.sa;var GG={};$.sq(GG,[$.Z.eK,[0,"scaleRangeMode",gl]]),$.U($.Zy,GG),$.g=$.Zy.prototype,$.g.xc=function(){return this.pa},$.g.WK=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma());if(t=e?t==this.o?null:t:$.jt(this.o,t,null,15,null,this.zg,this)){var i=this.o==t;this.o=t;var n=this.qa||this.b&&this.b.scale();n?t.da(!1):e||t.da(i),i||n||this.B(4,13)}}},$.g.Po=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma());if(t=e?t==this.qa?null:t:$.jt(this.qa,t,null,15,null,this.zg,this)){var i=this.qa==t;this.qa=t,e||t.da(i),i||this.B(4,13)}return this}return this.qa||this.b&&this.b.scale()||this.o},$.g.p3=function(){return!!this.qa},$.g.zg=function(t){if(t.target==this.Po()){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)&&(e|=1),this.B(4,8|e)}},$.g.f_=function(){this.B(4,9)},$.g.axis=function(t){return $.p(t)?(this.b!=t&&(this.b&&$.kr(this.b,this.f_,this),this.b=t,$.K(this.b,this.f_,this),this.B(4,13)),this):this.b},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.we=function(t){return $.p(t)?(t=$.Gk(t),this.f!=t&&(this.f=t,this.B(4,9)),this):this.f?this.f:this.b?"left"==(t=this.b.g("orientation"))||"right"==t?"horizontal":"vertical":this.D},$.g.Nb=function(){return"horizontal"==this.we()},$.g.zc=function(){var t=$.Zy.u.zc.call(this)&&!(null==az(this)||!this.Po());return t?0<=(t=this.scale().transform(az(this),.5))&&1>=t||this.G?(this.B(6),!0):(this.remove(),this.I(6),!1):t},$.g.V1=function(){var t=this.g("rotation");return null==t||(0,window.isNaN)(t)?this.Nb()?0:-90:t},$.g.rR=function(){var t=this.g("align");if(this.Nb()){if("left"==t)return"left-center";if("right"==t)return"right-center"}else{if("top"==t)return"center-top";if("bottom"==t)return"center-bottom"}return"center"},$.g.vA=function(){var t=this.g("anchor");if(!t||"auto"==t)switch(this.rR()){case"center-top":case"right-center":t="right-center";break;case"center-bottom":case"left-center":t="left-center";break;default:t="center"}return t},$.g.Z1=function(){return this.i},$.g.ja=function(t,e,i,n){return $.p(t)?(null===t||$.J(t,$.I)?this.i=t:"object"==$.ka(t)?this.i=new $.I(t.left,t.top,t.width,t.height):this.i=new $.I(t||0,e||0,i||0,n||0),this.uo(),this):null!=az(this)&&this.Po()&&this.i?(t=this.i.clone(),e=this.scale().transform(az(this),.5),this.Nb()?(t.height=0,t.top=Math.round(this.i.top+this.i.height-e*this.i.height)):(t.width=0,t.left=Math.round(this.i.left+e*this.i.width)),t):null},$.g.uD=function(){var t=9;return"consider"==this.g("scaleRangeMode")&&(t|=4),t},$.g.mr=function(){return 4|$.Zy.u.mr.call(this)},$.g.xs=function(){return[az(this)]},$.g.F=function(){var t=$.Zy.u.F.call(this);return $.Tq(this,GG,t,"TextBase"),this.f&&(t.layout=this.f),t},$.g.U=function(t,e){if($.Zy.u.U.call(this,t,e),$.Iq(this,GG,t,e),"layout"in t&&t.layout&&this.we(t.layout),"axis"in t){var i=t.axis;$.ea(i)?this.pa&&this.axis(this.pa.ZG(i)):i.Iy&&i.Iy()&&this.axis(i)}},$.g.R=function(){$.qd(this.$g),this.b=this.pa=this.$g=null,$.Zy.u.R.call(this)},$.H($.bz,$.V),$.bz.prototype.sa=$.V.prototype.sa,$.bz.prototype.ra=$.V.prototype.ra|$.KE|$.LE;var Qca=Date.UTC(2e3,10,29,23,59,59,999);$.g=$.bz.prototype,$.g.Uw=function(){return this.ye},$.g.labels=function(t){return $.p(t)&&this.Da!=t?(this.Da&&$.kr(this.Da,this.Kn,this),this.Da=t,$.K(this.Da,this.Kn,this),this):this.Da},$.g.Kn=function(){this.ye.length||$.dz(this);for(var t=this.labels().flatten(),e=0;e<this.ye.length;e++){var i=this.ye[e];i.style(t),i.Ij()}this.va($.LE)},$.g.reset=function(){for(var t=0;t<this.ye.length;t++)this.ye[t].ld();this.ye.length=0,this.pA={},this.f.length=0},$.g.R=function(){this.reset(),this.ye.length=0;var t=$.vl,e="m"+$.oa(this);e in t.b&&($.kr(t.b[e].FO,t.o,t),delete t.b[e]),this.Da&&$.kr(this.Da,this.Kn,this),$.bz.u.R.call(this)},$.H($.fz,$.kt),$.g=$.fz.prototype,$.g.Ma=function(){return"linear-color"},$.g.w1=function(t){var e,i=[],n=0;for(e=arguments.length;n<e;n++){var s=arguments[n];if($.z(s))i.push(s);else if($.A(s))i.push.apply(i,s);else if($.C(s)){var a=s.keys;if($.p(a)&&$.A(a)){a=this.w1.apply(this,s.keys);var o=s.opacity;if($.p(o))for(var r=0;r<a.length;r++)s=a[r],$.p(s.opacity)||(s.opacity=o);i.push.apply(i,a)}else i.push(s)}}return $.Ub(i).keys},$.g.yia=function(t){for(var e=this.w1.apply(this,arguments),i=0,n=e.length;i<n;i++){var s=e[i];$.p(s.offset)||(s.offset=i?i==n-1?1:i/(n-1):0);var a=s.color;$.A(a)?s.color=$.Ha(a):$.z(a)&&(s.color=$.Cl($.Ll(a).vk))}return Sa(e),e},$.g.Jj=function(t){if(0<arguments.length&&$.p(arguments[0])){var e=this.yia.apply(this,arguments),i=this.Xe&&e.length==this.Xe.length;if(i)for(var n=0,s=e.length;n<s;n++){var a=!1;(0,$.Pe)(this.Xe,(function(t){a=a||$.Pc(t,e[n])})),i=i&&a}return i&&this.Xe||(this.Xe=e,this.va(2)),this}return this.Xe},$.g.Qq=function(t){t=this.transform(t);for(var e,i,n=0,s=this.Xe.length;n<s;n++){var a=this.Xe[n];if(i)break;t>=a.offset?e=a:i=a}var o;return o=e?i?$.Kl(i.color,e.color,(t-e.offset)/(i.offset-e.offset)):e.color:i.color,$.A(o)?$.Tb(o):o.color},$.g.pS=function(t){var e;this.pb(),t=$.Cl($.Ll(t).vk);var i=0;for(e=this.Xe.length;i<e;i++){var n=this.Xe[i],s=n.color;if(i!=this.Xe.length-1)var a=this.Xe[i+1],o=a.color;var r=(t[1]-s[1])/(o[1]-s[1]),l=(t[2]-s[2])/(o[2]-s[2]),h=(t[0]-s[0])/(o[0]-s[0]);if((0,window.isNaN)(h)&&(h=r||l),(0,window.isNaN)(r)&&(r=l||h),(0,window.isNaN)(l)&&(l=h||r),$.Wm(h,r)&&$.Wm(h,l)&&$.Wm(r,l)&&(r=Math.round(o[1]*r+(1-r)*s[1])==t[1],l=Math.round(o[2]*l+(1-l)*s[2])==t[2],Math.round(o[0]*h+(1-h)*s[0])==t[0]&&r&&l)){var c=this.xe*(h/(1/(a.offset-n.offset))+n.offset)+this.min;break}}return $.p(c)?c:window.NaN},$.g.Xa=function(t){return this.xh||(this.xh=this.ol(),$.W(this.xh,"ticks",this.xh)),$.p(t)?(this.xh.N(t),this.va(2),this):this.xh},$.g.yb=function(t){return this.Di||(this.Di=this.ol(),$.W(this.xh,"minorTicks",this.Di),this.Di.count(5)),$.p(t)?(this.Di.N(t),this.va(2),this):this.Di},$.g.sJ=function(){var t=this.Xa().DB(this.min,this.max,this.Pn&&this.min!=this.jt,this.Nn&&this.max!=this.Lq,this.yw);this.Pn&&(this.min=t[0]),this.Nn&&(this.max=t[1]),this.yb().EB(this.Xa().dk(),this.yw,t[2],t[3],this.Lx)},$.g.ex=function(){$.fz.u.ex.call(this),Qs(this.Oq,[this.min,this.max]),this.xe=this.max-this.min},$.g.li=function(t){$.X(t,2)&&(this.Kc=!1,this.va(2))},$.g.ol=function(){var t=new $.It(this);return $.K(t,this.li,this),t},$.g.F=function(){var t=$.fz.u.F.call(this);return t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t.colors=(0,$.Wa)(this.Jj(),(function(t){return t.offset+" "+$.Tb(t.color)+($.p(t.opacity)?" "+t.opacity:"")})),t},$.g.U=function(t,e){$.fz.u.U.call(this,t,e),this.Xa(t.ticks),this.yb(t.minorTicks),this.Jj(t.colors)},$.g.R=function(){$.sd(this.xh,this.Di),this.Di=this.xh=null,$.fz.u.R.call(this)};var HG=$.fz.prototype;$.E("anychart.scales.linearColor",$.gz),HG.getType=HG.Ma,HG.colors=HG.Jj,HG.valueToColor=HG.Qq,HG.colorToValue=HG.pS,HG.ticks=HG.Xa,HG.minorTicks=HG.yb,$.H(hz,$.Ot),hz.prototype.j0=function(){var t=[],e=this.scale.Yy();if(e.length||(e=this.scale.sr()),e){var i;e=e.length-1,i=(0,window.isNaN)(this.IK())?Math.ceil(e/this.jW())||1:this.IK();for(var n=0;n<e;n+=i)t.push(n)}return t},hz.prototype.dW=function(t){var e=t.length||0,i=this.scale.sr(),n=i.length-1;if(!e||!n)return[];for(var s=[],a=!1,o=0;o<e&&!a;o++){var r=t[o],l=t[o+1];(0,window.isNaN)(l)||l>=n?(l=n-1,a=!0):l--;var h=i[r].gp;if($.da(h)){h=(i[r].start+i[r].end)/2;var c=(i[l].start+i[l].end)/2}else c=i[l].gp;s.push(r==l?h:[h,c])}return s},$.H($.iz,Xs),$.g=$.iz.prototype,$.g.Ma=function(){return"ordinal-color"},$.g.oN=function(){this.Co()},$.g.Jj=function(t){if($.p(t))return null===t?this.Xe=[]:$.A(t)&&(this.Xe=$.Ha(t)),this.Co(),this.va(2),this;if($.A(this.Xe)){if(this.tB||(this.tB=$.Ha(this.Xe)),this.tB.length<this.jd.length)for(;this.tB.length!=this.jd.length;)this.tB.push(this.jd[this.tB.length]);return this.tB}return this.bo||[]},$.g.names=function(t){if($.p(t)){if(null===t)this.Wf=[];else if($.A(t))this.Wf=$.Ha(t);else{if(!$.z(t)||this.Wf==t)return this;this.Wf=t}return this.Co(),$.Pt(this.Xa()),this.va(4),this}if(this.pb(),$.A(this.Wf)){if(this.Sn||(this.Sn=$.Ha(this.Wf)),this.Sn.length<this.xk.length)for(;this.Sn.length!=this.xk.length;)this.Sn.push(this.xk[this.Sn.length]);return this.Sn}if(!this.Ok){this.Ok=[],t=0;for(var e=this.xk.length;t<e;t++){var i,n=this.xk[t];(i=$.p(n.gp)&&!$.da(n.gp)?n.gp:(0,window.isFinite)(n.start+n.end)?n.start===n.end?n.start:n.start+" - "+n.end:!0===n.gp?(0,window.isFinite)(n.start)?">= "+n.start:"<= "+n.end:(0,window.isFinite)(n.start)?"> "+n.start:"< "+n.end)||(i="default"),n.name||(n.name=i),this.Ok.push(i)}}return this.Ok},$.g.Yy=function(t){return $.p(t)?(this.jd!=t&&(this.jd=t,null===(t=t[t.length-1]).equal&&null===t.from&&null===t.to&&null===t.greater&&null===t.less||this.jd.push({equal:null,less:null,greater:null,from:null,to:null}),this.eW||(this.bo=$.zm("defaultOrdinalColorScale").autoColors(this.jd.length-1),this.bo.push("#000")),this.Co(),$.Pt(this.Xa()),this.va(4)),this):this.jd},$.g.sr=function(){return this.pb(),this.names(),this.xk},$.g.Dn=function(t){this.pb();var e=this.xk[this.xk.length-1];if(this.xk)for(var i=0;i<this.xk.length-1;i++){var n=this.xk[i];if(!0===n.gp&&t>=n.start&&t<=n.end&&-1<n.sourceIndex||!1===n.gp&&t>n.start&&t<n.end&&-1<n.sourceIndex||!1===n.gp&&window.Infinity==Math.abs(t)&&(t==n.start||t==n.end)||n.gp===t){e=n;break}}return e},$.g.Qq=function(t){this.pb();var e="none";if(t=this.Dn(t)){var i=t.sourceIndex;if(0<=i){var n=this.Jj();$.p(t.color)?e=t.color:n&&0<n.length&&(e=i>n.length-1?n[n.length-1]:n[i])}}return e},$.g.pS=function(t){this.pb(),t=$.Ll(t).vk;for(var e=window.NaN,i=0,n=this.xk.length;i<n;i++){var s=this.xk[i],a=this.Jj();if(t==$.Ll(s.color||a[s.sourceIndex]||a[a.length-1]).vk){e=(s.start+s.end)/2;break}}return e},$.g.Yv=function(t){return this.pb(),(t=this.Dn(t))?(0,$.za)(this.xk,t):-1},$.g.Xa=function(t){return this.xh||(this.xh=this.ol()),$.p(t)?(this.xh.N(t),this):this.xh},$.g.li=function(t){$.X(t,2)&&this.va(2)},$.g.ol=function(){var t=new hz(this);return $.W(t,"ticks",t),$.K(t,this.li,this),t},$.g.transform=function(t,e){this.pb();var i=this.Dn(t);return i&&"default"!==i.name?1/(this.xk.length-1)*((0,$.za)(this.xk,i)+(e||0)):window.NaN},$.g.Mc=function(t){return this.pb(),((t=this.xk[$.Za(Math.ceil(t*(this.xk.length-1))-1,0,this.xk.length-2)]).start+t.end)/2},$.g.Of=function(){return!!this.Yy.length},$.g.IC=function(t){return this.Kc=!1,t||this.va(2),!0},$.g.reset=function(){return this.Sn=this.Ix=this.Ok=this.tB=this.xk=null,this},$.g.Co=function(){this.reset(),this.la.length=0},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++)this.la.push(arguments[e]);return this},$.g.pb=function(){if(!this.xk){var t=[];if(!this.jd.length){this.Ix=[],$.Ka(this.la);var e=[],i=[];(0,$.Pe)(this.la,(function(t){var n=$.N(t);(0,window.isNaN)(t)?e.push({equal:t}):i.push(n)})),$.Pa(i);var n=Math.round(1+3.32*Math.log(i.length)/Math.log(10)),s=Math.floor(i[0]),a=(i[i.length-1]-s)/n,o=s,r=Math.ceil(o+a);for(s=0;s<n;s++)this.Ix.push({from:o,to:r}),o=r,r=Math.ceil(o+a);this.Ix=this.Ix.concat(e),this.Ix.length&&this.Ix.push({equal:null,less:null,greater:null,from:null,to:null}),this.eW||(this.bo=$.zm("defaultOrdinalColorScale").autoColors(this.Ix.length-1))&&this.bo.push("#000")}for(s=0,n=(r=this.jd.length?this.jd:this.Ix).length;s<n;s++){a=r[s],o=this.Wf?this.Wf[s]:null;var l=this.Jj(),h=this.Ne()?Math.max(0,l.length-2-s):s;l=l&&l[h]?l[h]:null,h=!0;var c=s,u=a.equal,d=$.N(a.from),p=$.N(a.to),g=$.N(a.less),f=$.N(a.greater),b=window.NaN,v=window.NaN,m=!0;$.p(u)?$.da(u)?(m=u,(0,window.isNaN)(f)?(0,window.isNaN)(g)||(b=-window.Infinity,v=g):(b=f,v=window.Infinity)):(d=$.N(u),(0,window.isNaN)(d)?m=u:v=b=d):(0,window.isNaN)(d)||(0,window.isNaN)(p)?(0,window.isNaN)(f)?(0,window.isNaN)(g)?h=!1:(b=-window.Infinity,v=g):(b=f,v=window.Infinity):(b=Math.min(d,p),v=Math.max(d,p)),h&&t.push({gp:m,start:b,end:v,sourceIndex:c,enabled:!0,color:a.color||l,name:a.name||o})}for(Rca(t),o=[],s=0,n=t.length;s<n;s++)(a=t[s]).enabled&&o.push(a);t.length=0,this.xk=o}},$.g.F=function(){var t=$.iz.u.F.call(this);return t.ticks=this.Xa().F(),this.jd&&this.jd.length&&(t.ranges=this.jd),this.Wf&&(t.names=this.Wf),this.Xe&&(t.colors=this.Xe),t},$.g.U=function(t,e){$.iz.u.U.call(this,t,e),this.Xa(t.ticks),this.Jj(t.colors),this.Yy(t.ranges),this.names(t.names)},$.g.R=function(){$.qd(this.xh),this.xh=null,$.iz.u.R.call(this)};var IG=$.iz.prototype;$.E("anychart.scales.ordinalColor",$.jz),IG.getType=IG.Ma,IG.colors=IG.Jj,IG.ranges=IG.Yy,IG.names=IG.names,IG.ticks=IG.Xa,IG.getRangeByValue=IG.Dn,IG.getProcessedRanges=IG.sr,IG.valueToColor=IG.Qq,IG.colorToValue=IG.pS,IG.getIndexByValue=IG.Yv,IG.transform=IG.transform,IG.inverseTransform=IG.Mc,$.H($.kz,$.Y),$.g=$.kz.prototype,$.g.ra=98312|$.Y.prototype.ra,$.g.sa=80|$.Y.prototype.sa,$.g.g=$.ir,$.g.ys=function(){return 1},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(this.Y&&$.kr(this.Y,this.Tc,this),(this.Y=t)&&$.K(this.Y,this.Tc,this)),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=80,i|=1),$.X(t,32768)&&(e|=1,i|=1),$.X(t,65536)&&(e|=8,i|=1),this.Xb=null,this.B(e,i)};var cea=$.kz.prototype,JG={};$.rq(JG,1,"stroke",$.Pq),$.rq(JG,1,"fill",$.Nq),$.rq(JG,0,"drawFirstLine",$.Dq),$.rq(JG,0,"drawLastLine",$.Dq),$.rq(JG,0,"isMinor",$.Dq),cea.Cz=JG,$.U($.kz,$.kz.prototype.Cz),$.g=$.kz.prototype,$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!=t&&(this.Pa.enabled=t,this.B(1,this.mr()),this.Pa.enabled?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},$.g.zIndex=function(t){return $.p(t)?(t=+t||0,this.Pa.zIndex!=t&&(this.Pa.zIndex=t,this.B(8,65537)),this):$.p(this.nd("zIndex"))?this.nd("zIndex"):$.p(this.zh)?this.zh:this.g("zIndex")},$.g.cc=function(t){return this.Fa||this.Y&&!this.oa.palette||(lz(this,this.oa.palette),$.W(this,"palette",this.Fa),this.Fa.Gp(!1)),$.p(t)?(lz(this,t),this.Fa.N(t),this):this.Fa},$.g.Hc=function(t){if(!$.J(this.Fa,t)){var e=!!this.Fa;$.qd(this.Fa),this.Fa=new t,$.K(this.Fa,this.Pf,this),e&&this.B(64,1)}},$.g.Pf=function(t){$.X(t,2)&&this.B(64,1)},$.g.Nb=function(){return"horizontal"==this.we()},$.g.c2=function(t){return"left"==(t=t.orientation())||"right"==t?"horizontal":"vertical"},$.g.q4=function(t){return $.Gk(t)},$.g.we=function(t){return $.p(t)?(t=this.q4(t),this.f!=t&&(this.f=t,this.aa=null,this.B(64,9)),this):this.f?this.f:this.b?this.c2(this.b):this.HL},$.g.scale=function(t){return $.p(t)?(nz(this,!1,t),this):this.qa?this.qa:this.b?this.b.scale():this.aa},$.g.zg=$.ia,$.g.axis=function(t){return $.p(t)?(this.b!=t&&(this.b&&$.kr(this.b,this.c0,this),this.b=t,$.K(this.b,this.c0,this),this.B(64,9)),this):this.b},$.g.c0=function(){this.B(80,9)},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.d_=function(){var t=$.qk();return t.parent(this.O()).zIndex(this.zIndex()).stroke("none"),t},$.g.Sz=function(){$.Dc(this.D,(function(t){t.clear()}))},$.g.Uh=function(){return this.o=this.o?this.o:$.qk()},$.g.u0=function(){var t=this.scale();return t||$.il(2),!!t},$.g.Lj=function(){var t=this.scale(),e=window.NaN,i=$.J(t,$.Qt),n=(i?t.Xa():this.g("isMinor")?t.yb():t.Xa()).get(),s=this.Nb()?[this.KG,this.HG]:[this.LG,this.IG];this.Sz(),this.Uh().clear();var a=this.ja()||$.kn(0,0,0,0),o=this.Xj&&this.Xj.uN(),r=$.dp(this.g("stroke"));if(o){var l=this.Xj;this.oi=l.oi,this.Mh=l.Mh,a.top-=this.Mh+r/2,a.height+=this.Mh+r/2,a.width+=this.oi}if((a=a.clone()).height=$.R(a.height,1)+.5,a.width=$.R(a.width,1)+.5,this.Uh().clip(a),a=s[1],s=s[0],r=-this.Uh().gl()%2/2,o&&this.Nb()){var h=t.Ne()?1:0;s.call(this,h,r)}for(o=0,l=n.length;o<l;o++){var c=n[o];$.A(c)&&(c=c[0]);var u=i&&"continuous"==t.mode()?.5:0;h=t.transform(c,u),"log"==t.Ma()&&(h=$.Tm(h,6)),o&&(u=$.oz(this,o-1))&&a.call(this,h,e,u,r),o?o==l-1?(this.g("drawLastLine")||i)&&s.call(this,h,r):s.call(this,h,r):this.g("drawFirstLine")&&s.call(this,h,r),e=h}i&&$.p(c)&&(h=t.Ne()?0:1,this.g("drawLastLine")&&s.call(this,h,r),(u=$.oz(this,o-1))&&a.call(this,h,e,u,r))},$.g.sK=function(){this.Uh().stroke(this.g("stroke"))},$.g.pv=$.ia,$.g.TK=function(){var t=this.O();this.Uh().parent(t),$.Dc(this.D,(function(e){e.parent(t)}))},$.g.xC=function(){var t=this.zIndex();this.Uh().zIndex(t+.03),$.Dc(this.D,(function(e){e.zIndex(t)}))},$.g.W=function(){return this.u0()&&this.zc()?(this.pv(),this.J(16)&&(this.sK(),this.I(16)),this.J(68)&&(this.Lj(),this.I(68)),this.J(8)&&(this.xC(),this.I(8)),this.J(2)&&(this.TK(),this.I(2)),this):this},$.g.remove=function(){this.Uh().parent(null),$.Dc(this.D,(function(t){t.parent(null)}))},$.g.F=function(){var t={};this.Fa&&(t.palette=this.Fa.F());var e=$.V.prototype.g.call(this,"zIndex");return $.p(e)&&(t.zIndex=e),e=$.V.prototype.g.call(this,"enabled"),t.enabled=$.p(e)?e:null,$.Tq(this,this.Cz,t,"Map grids props"),t},$.g.U=function(t,e){if("axis"in t){var i=t.axis;$.ea(i)?this.Xj&&this.axis(this.Xj.ZG(i)):$.J(i,$.Sy)&&this.axis(i)}t.palette&&this.cc(t.palette),e?$.Hq(this.oa,this.Cz,t):($.Iq(this,this.Cz,t),$.kz.u.U.call(this,t))},$.g.R=function(){for(var t in this.Xj=this.b=null,this.D)$.qd(this.D[t]);this.D=null,$.sd(this.Fa,this.$g,this.o),this.o=this.$g=this.Fa=null,$.kz.u.R.call(this)};var KG=$.kz.prototype;KG.enabled=KG.enabled,KG.palette=KG.cc,$.H(pz,$.kz),$.g=pz.prototype,$.g.zg=function(t){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)&&(e|=1),this.B(20,8|e)},$.g.KG=function(t){var e=this.ja()||$.kn(0,0,0,0);t=e.Va()-t*e.height,t=$.R(t,this.Uh().gl()),this.o.moveTo(e.tb(),t),this.o.lineTo(e.cb(),t)},$.g.LG=function(t){var e=this.ja()||$.kn(0,0,0,0);t=e.tb()+t*e.width;var i=this.Uh().gl();t=$.R(t,i),this.o.moveTo(t,e.Va()),this.o.lineTo(t,e.Vb())},$.g.HG=function(t,e,i){if(!(0,window.isNaN)(e)){var n=this.ja()||$.kn(0,0,0,0),s=this.Uh().gl();e=n.Va()-e*n.height,e=$.R(e,s),t=n.Va()-t*n.height,t=$.R(t,s),i.moveTo(n.tb(),e),i.lineTo(n.cb(),e),i.lineTo(n.cb(),t),i.lineTo(n.tb(),t),i.close()}},$.g.IG=function(t,e,i){if(!(0,window.isNaN)(e)){var n=this.ja()||$.kn(0,0,0,0),s=this.Uh().gl();e=n.tb()+e*n.width,e=$.R(e,s),t=n.tb()+t*n.width,t=$.R(t,s),i.moveTo(e,n.Vb()),i.lineTo(t,n.Vb()),i.lineTo(t,n.Va()),i.lineTo(e,n.Va()),i.close()}},$.H(qz,pz),$.xu(qz,pz);var LG=pz.prototype;LG.isHorizontal=LG.Nb,LG.scale=LG.scale,LG.axis=LG.axis,LG=qz.prototype,$.E("anychart.standalones.grids.linear",(function(){var t=new qz;return t.N($.nm("standalones.linearGrid")),t})),LG.layout=LG.we,LG.draw=LG.W,LG.parentBounds=LG.ja,LG.container=LG.O,$.H(sz,$.qf),$.rz=0,$.g=sz.prototype,$.g.Jw=function(){this.bp("begin")},$.g.cm=function(){this.bp("end")},$.g.eE=function(){this.bp("finish")},$.g.nO=function(){this.bp("play")},$.g.bp=function(t){this.dispatchEvent(t)};var tz={},uz=null;$.H($.xz,sz),$.g=$.xz.prototype,$.g.play=function(t){if(t||this.dc==$.rz)this.Kd=0,this.coords=this.b;else if(1==this.dc)return!1;$.vz(this),this.o=t=(0,$.Ln)(),-1==this.dc&&(this.o-=this.duration*this.Kd),this.D=this.o+this.duration,this.Kd||this.Jw(),this.nO(),-1==this.dc&&this.bp("resume"),this.dc=1;var e=$.oa(this);return e in tz||(tz[e]=this),wz(),this.uG(t),!0},$.g.stop=function(t){$.vz(this),this.dc=$.rz,t&&(this.Kd=1),yz(this,this.Kd),this.bp("stop"),this.cm()},$.g.R=function(){this.dc==$.rz||this.stop(!1),this.bp("destroy"),$.xz.u.R.call(this)},$.g.uG=function(t){t<this.o&&(this.D=t+this.D-this.o,this.o=t),this.Kd=(t-this.o)/(this.D-this.o),1<this.Kd&&(this.Kd=1),yz(this,this.Kd),1==this.Kd?(this.dc=$.rz,$.vz(this),this.eE(),this.cm()):1==this.dc&&this.en()},$.g.en=function(){this.bp("animate")},$.g.bp=function(t){this.dispatchEvent(new zz(t,this))},$.H(zz,wd),$.H(Az,sz),Az.prototype.add=function(t){$.Aa(this.Wb,t)||(this.Wb.push(t),$.Ld(t,"finish",this.f,!1,this))},Az.prototype.remove=function(t){$.Fa(this.Wb,t)&&$.Yd(t,"finish",this.f,!1,this)},Az.prototype.R=function(){(0,$.Pe)(this.Wb,(function(t){t.ld()})),this.Wb.length=0,Az.u.R.call(this)},$.H(Bz,Az),Bz.prototype.play=function(t){if(0==this.Wb.length)return!1;if(t||this.dc==$.rz)this.b=0,this.Jw();else if(1==this.dc)return!1;this.nO(),-1==this.dc&&this.bp("resume");var e=-1==this.dc&&!t;return this.o=(0,$.Ln)(),this.D=null,this.dc=1,(0,$.Pe)(this.Wb,(function(i){e&&-1!=i.dc||i.play(t)})),!0},Bz.prototype.stop=function(t){(0,$.Pe)(this.Wb,(function(e){e.dc==$.rz||e.stop(t)})),this.dc=$.rz,this.D=(0,$.Ln)(),this.bp("stop"),this.cm()},Bz.prototype.f=function(){this.b++,this.b==this.Wb.length&&(this.D=(0,$.Ln)(),this.dc=$.rz,this.eE(),this.cm())},$.H(Cz,Az),Cz.prototype.play=function(t){if(0==this.Wb.length)return!1;if(t||this.dc==$.rz)this.b<this.Wb.length&&this.Wb[this.b].dc!=$.rz&&this.Wb[this.b].stop(!1),this.b=0,this.Jw();else if(1==this.dc)return!1;return this.nO(),-1==this.dc&&this.bp("resume"),this.o=(0,$.Ln)(),this.D=null,this.dc=1,this.Wb[this.b].play(t),!0},Cz.prototype.stop=function(t){if(this.dc=$.rz,this.D=(0,$.Ln)(),t)for(t=this.b;t<this.Wb.length;++t){var e=this.Wb[t];e.dc==$.rz&&e.play(),e.dc==$.rz||e.stop(!0)}else this.b<this.Wb.length&&this.Wb[this.b].stop(!1);this.bp("stop"),this.cm()},Cz.prototype.f=function(){1==this.dc&&(this.b++,this.b<this.Wb.length?this.Wb[this.b].play():(this.D=(0,$.Ln)(),this.dc=$.rz,this.eE(),this.cm()))},$.H(Dz,Bz),Dz.prototype.update=function(){for(var t=(0,$.Ln)(),e=0;e<this.Wb.length;e++){var i=this.Wb[e];i.update(),i.uG(t)}},$.H($.Ez,$.xz),$.Ez.prototype.update=function(){},$.Ez.prototype.nO=function(){this.update()},$.Ez.prototype.R=function(){$.Ez.u.R.call(this),this.X=null},$.H(Fz,$.Ez),Fz.prototype.update=function(){this.b.length=this.f.length=0;for(var t=this.X.cg();t.advance();)if(!t.j("missing")){(0,window.isNaN)(t.j("destinationValue"))&&t.j("destinationValue",t.j("size"));var e=t.j("destinationValue");this.b.push(0>e?-1e-5:0),this.f.push(e),e=t.j("x");var i,n=t.j("value");(i=t.j("label"))&&(i=i.jc().value,this.b.push(e,n),this.f.push(i.x,i.y)),(i=t.j("marker"))&&(i=i.jc().value,this.b.push(e,n),this.f.push(i.x,i.y))}},Fz.prototype.en=function(){for(var t=this.X.cg(),e=0;t.advance();)if(!t.j("missing")){t.j("size",this.coords[e++]),this.X.bf.yt(t);var i=t.j("label");i&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W()),(i=t.j("marker"))&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W())}},Fz.prototype.cm=function(){this.en()},$.H(Gz,$.Ez),Gz.prototype.update=function(){this.i=uB(this.X),this.xa=this.X.g("isVertical");var t=this.X.clip();$.da(t)&&!t&&(this.i=this.X.xc().ob()),this.xa?(this.b[0]=this.i.top,this.X.Ra().Ne()||(this.b[0]+=this.i.height),this.b[1]=0,(0,window.isNaN)(this.G)&&(this.G=this.i.height),this.f[0]=this.i.top):(this.b[0]=this.i.left,this.X.Ra().Ne()&&(this.b[0]+=this.i.width),this.b[1]=0,(0,window.isNaN)(this.G)&&(this.G=this.i.width),this.f[0]=this.i.left),this.f[1]=this.G},Gz.prototype.en=function(){this.xa?(this.i.top=this.coords[0],this.i.height=this.coords[1]):(this.i.left=this.coords[0],this.i.width=this.coords[1]),this.X.bs(this.i)},Gz.prototype.cm=function(){this.xa?(this.i.top=this.coords[0],this.i.height=this.coords[1]):(this.i.left=this.coords[0],this.i.width=this.coords[1]),this.X.bs(this.i),this.G=window.NaN},$.H(Hz,$.Ez),Hz.prototype.update=function(){this.i=this.X.g("isVertical"),this.b.length=this.f.length=0;for(var t=this.X.cg();t.advance();)if(!t.j("missing")){var e=t.j("x");(0,window.isNaN)(t.j("destinationValue"))&&t.j("destinationValue",t.j("value"));var i=t.j("destinationValue"),n=t.j("zero");this.b.push(n),this.f.push(i),(i=t.j("label"))&&(i=i.jc().value,this.i?this.b.push(n,e):this.b.push(e,n),this.f.push(i.x,i.y)),(i=t.j("marker"))&&(i=i.jc().value,this.i?this.b.push(n,e):this.b.push(e,n),this.f.push(i.x,i.y))}},Hz.prototype.en=function(){for(var t=this.X.cg(),e=0;t.advance();)if(!t.j("missing")){t.j("value",this.coords[e++]),this.X.bf.yt(t);var i=t.j("label");i&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W()),(i=t.j("marker"))&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W())}},Hz.prototype.cm=function(){this.en()};var MG={};MG.bar=Hz,MG.bubble=Fz,MG.area=Gz,MG.line=Gz,MG["range-area"]=Gz,MG["range-spline-area"]=Gz,MG["range-step-area"]=Gz,MG.spline=Gz,MG["spline-area"]=Gz,MG["step-area"]=Gz,MG["step-line"]=Gz,MG.column=Hz,MG["jump-line"]=Hz,MG.stick=Hz,MG.mekko=Hz,$.H($.Kz,$.V),$.V.prototype.n2=function(t,e){if(!$.p(this.PB[t])){t=$.pm(t);var i=$.sr(this);if(this.PB[t]=$.tr(i,"base"),!e)for(var n=0;n<this.uY.length;n++)-1!=(0,$.za)(this.uY[n].kk,t)&&(this.PB[t]=$.Ga(this.PB[t],$.tr(i,this.uY[n].JP)));this.PB[t]=$.Ga(this.PB[t],$.tr(i,t))}return this.PB[t]},$.H($.Lz,$.Y),$.Jz($.Lz,"dataarea","appearance"),$.g=$.Lz.prototype,$.g.ra=$.Y.prototype.ra,$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(){$.nr(this,"dataarea","appearance",1)},$.g.remove=function(){this.Aa&&this.Aa.parent(null)},$.g.bs=function(t){this.Aa&&this.Aa.clip(t)},$.g.W=function(){if(!this.zc())return this;if(this.Aa||(this.Aa=$.ok()),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.J(4)&&($.nr(this,"dataarea","appearance"),this.I(4)),$.rr(this,"dataarea","appearance")){var t=$.wr(this,"background");t&&(t.ka(),t.O()||t.O(this.Aa),t.ja(this.ja()),t.da(!1),t.W()),$.pr(this,"dataarea","appearance")}return this},$.g.F=function(){var t=$.Lz.u.F.call(this);return t.background=this.background().F(),t},$.g.U=function(t,e){$.Lz.u.U.call(this,t,e),this.background().ga(!!e,t.background)},$.g.R=function(){$.sd(this.Ia),this.Ia=null,$.Lz.u.R.call(this)};var NG=$.Lz.prototype;NG.background=NG.background,$.H($.Mz,$.Bx),$.Jz($.Mz,"serieschart","dataarea"),$.Mz.prototype.sa=61440|$.Bx.prototype.sa,$.Mz.prototype.fj={},$.Mz.prototype.ms=function(t){return this.Ti||(this.Ti=new $.Kz,$.W(this,"defaultSeriesSettings",this.Ti)),$.p(t)?(this.Ti.oa=t,this):this.Ti},$.Mz.prototype.Ss=function(t){return String(t)};var OG=function(){var t={};return $.sq(t,[[0,"defaultSeriesType",function(t){return this.Ss(t)}],[0,"maxBubbleSize",$.wq],[0,"minBubbleSize",$.wq],[0,"pointWidth",$.yo],[0,"maxPointWidth",$.yo],[0,"minPointLength",$.yo],[0,"baseline",$.Bq]]),t}();$.U($.Mz,OG),$.g=$.Mz.prototype,$.g.Vv=function(t){t=this.Ss(t);var e=this.fj[t];return e&&e.Fb in $.PG?t=[t,e]:($.il(4,null,[t+" series"]),t=null),t},$.g.zM=function(t){return t.check(32768)?31:30},$.g.VX=function(t){var e=this.hb[this.hb.length-1];e=e?e.yh()+1:0,this.hb.push(t),t.yh(e),$.fB(t),t.Kq(this.cc().nc(e)),$.kB(t,this.Nf().nc(e)),t.dx(this.ve().nc(e)),t.kb(this),$.K(t,this.FE,this)},$.g.Ae=function(t,e,i){var n=this.Vv(t);return n?(t=n[0],(t=this.Gt(t,n[1])).data(e,i),this.VX(t),this.B(492288|(t.check($.tB)?4:0),1)):t=null,t},$.g.kl=function(t){var e=[],i=this.g("defaultSeriesType"),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.Ae(i,arguments[s]));else e.push(this.Ae(i,null));return this.da(!0),e},$.g.ty=function(t){return $.xa(this.hb,(function(e){return e.id()==t}))},$.g.ef=function(t){return this.Ai(this.ty(t))},$.g.Ai=function(t){return this.hb[t]||null},$.g.tj=function(){return this.hb.length},$.g.Ao=function(t){return this.Rn(this.ty(t))},$.g.Rn=function(t){var e=this.hb[t];return e&&($.Pp++,this.ka(),$.Ca(this.hb,t,1),$.qd(e),this.B(492304,1),this.da(!0),$.Sp()),this},$.g.Dp=function(){if(this.hb.length){$.Pp++,this.ka();var t=this.hb;this.hb=[],$.sd(t),this.B(492304,1),this.da(!0),this.hm=this.zl=null,this.gc("mousemove",this.QJ),$.Sp()}return this},$.g.FE=function(t){var e=0;$.X(t,32768)&&(e|=256),$.X(t,1)&&(e=32768),$.X(t,2048)&&(e=32),$.X(t,16)&&(e|=256,"categories"==this.eg().g("itemsSourceMode")&&(e|=512),this.MA()),$.X(t,4)&&(e|=458752),$.X(t,64)&&(e|=512,$.X(t,8)&&(e|=4)),this.B(e,1)},$.g.Ue=function(){return this.hb},$.g.Ey=function(){for(var t=this.hb.length;t--;)this.hb[t].sp()&&this.hb[t].B(1024)},$.g.e3=function(){for(var t=this.hb.length;t--;)this.hb[t].Ak()&&this.hb[t].B(1028)},$.g.xa=function(t){return!!$.p(t)&&this},$.g.Ra=function(){},$.g.aX=function(){},$.g.eT=function(){},$.g.ev=function(){return!0},$.g.Yja=function(t){for(var e=0;e<this.hb.length;e++){var i=this.hb[e];i&&i.yE(),t||i.B(1024)}},$.g.rB=function(t){for(var e=0;e<this.hb.length;e++){var i=this.hb[e];i&&i.yE()}t||this.Ey()},$.g.cc=function(t){return $.J(t,$.Ms)?(this.Hc($.Ms,t),this):$.J(t,$.Gs)?(this.Hc($.Gs,t),this):($.C(t)&&"range"==t.type?this.Hc($.Ms):($.C(t)||null==this.Fa)&&this.Hc($.Gs),$.p(t)?(this.Fa.N(t),this):this.Fa)},$.g.Nf=function(t){return this.He||(this.He=new $.Ls,$.K(this.He,this.yI,this),$.W(this,"markerPalette",this.He)),$.p(t)?(this.He.N(t),this):this.He},$.g.ve=function(t){return this.fd||(this.fd=new $.Hs,$.K(this.fd,this.HH,this),$.W(this,"hatchFillPalette",this.fd)),$.p(t)?(this.fd.N(t),this):this.fd},$.g.Hc=function(t,e){if($.J(this.Fa,t))e&&this.Fa.N(e);else{var i=!!this.Fa;$.qd(this.Fa),this.Fa=new t,$.W(this,"palette",this.Fa),this.Fa.Gp(),e&&this.Fa.N(e),$.K(this.Fa,this.Pf,this),i&&this.B(4608,1)}},$.g.Pf=function(t){$.X(t,2)&&this.B(4608,1)},$.g.yI=function(t){$.X(t,2)&&this.B(8704,1)},$.g.HH=function(t){$.X(t,2)&&this.B(16896,1)},$.g.labels=function(t){return $.p(t)?(this.ca.labels(t),this):this.ca.labels()},$.g.th=function(t){return $.p(t)?(this.ca.th(t),this):this.ca.th()},$.g.sh=function(t){return $.p(t)?(this.ca.sh(t),this):this.ca.sh()},$.g.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},$.g.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za},$.g.selected=function(t){return $.p(t)?(this.Ea.N(t),this):this.Ea},$.g.Kn=function(t){if($.X(t,1)){for(this.Qa().labels().I(4294967295),this.Qa().th().I(4294967295),this.Qa().sh().I(4294967295),t=this.hb.length;t--;){var e=this.hb[t];e.check($.QG)&&e.B(256)}this.B(32768,1)}};var dea={bar:["value"],line:["value"],polyline:["value"],area:["value"],polygon:["value"],column:["value"],spline:["value"],marker:["value"],"step-area":["value"],"step-line:":["value"],"spline-area":["value"],"jump-line":["value"],stick:["value"],mekko:["value"],bubble:["value","size"],"range-bar":["high","low"],"range-area":["high","low"],"range-column":["high","low"],"range-step-area":["high","low"],"range-spline-area":["high","low"],ohlc:["open","high","low","close"],candlestick:["open","high","low","close"],box:["lowest","q1","median","q3","highest"],connector:["points"],choropleth:["id","value"],"marker-map":["id","long","lat"],"bubble-map":["id","long","lat","size"],hilo:["high","low"],waterfall:["value"],moment:["value"],range:["start","end"]};$.g=$.Mz.prototype,$.g.data=function(t){if($.p(t)){var e=null;if(t){var i=t.title||t.caption;i&&this.title(i),t.header&&t.header.length&&(e=t.header),t.rows?this.Xf=t.rows:this.Xf=t}else this.Xf=t;$.J(t,$.Mr)||(t=$.Or(this.Xf),$.rd(this,t));var n=t.Af(0);i=1;var s=null;$.A(n)?i=n.length:$.C(n)&&(i=(s=$.Fc(n)).length);var a=this.tj(),o=1;n=0,this.ka();for(var r=0;r<a;r++){var l=this.Ai(n),h=l.Be(),c=o+h.length;c<=i?(o=Qr(t,o,c,h,s),l.data(o),e&&l.name(e[n+1]),o=c):(l=l.id(),this.Ao(l),n--),n++}a=this.g("defaultSeriesType"),h=dea[a];do{if(!((c=o+h.length)<=i))break;o=Qr(t,o,c,h,s),l=this.kl(o)[0],e&&l.name(e[n+1]),n++,o=c}while(o<=i);return this.B(256),this.da(!0),this}return this.Xf},$.g.MA=function(){},$.g.pv=function(){if(!this.pf()&&($.J(this.Fa,$.Ms)&&$.Ns(this.Fa,this.Ue().length),this.J(28672))){$.xr(this.hb);var t=0;this.J(20480)&&(t|=2048),this.J(8192)&&(t|=128);for(var e=this.hb.length;e--;){var i=this.hb[e],n=i.yh();i.Kq(this.cc().nc(n)),$.kB(i,this.Nf().nc(n)),i.dx(this.ve().nc(n)),i.B(t)}this.B(32768),this.I(28672),$.zr(this.hb)}},$.g.Z5=function(t,e,i,n,s){t.Qp(e||0,i||0,n||0,s||0)},$.g.aL=function(){this.aX(),this.eT(),$.Oz(this)},$.g.g1=function(){for(var t=0;t<this.hb.length;t++)this.hb[t].W()},$.g.yv=function(t){return this.tn||(this.tn=new $.Lz,$.K(this.tn,this.OS,this),$.W(this,"dataArea",this.tn)),$.p(t)?(this.tn.N(t),this):this.tn},$.g.OS=function(t){$.X(t,1)&&$.nr(this,"serieschart","dataarea",1)},$.g.RE=function(t){if($.Mz.u.RE.call(this,t),$.rr(this,"serieschart","dataarea")){var e=$.wr(this,"dataArea");e&&(e.ka(),e.O()||e.O(this.Na),e.ja(t),e.da(!1),e.W()),$.pr(this,"serieschart","dataarea")}},$.g.az=function(t){this.ka(),$.Mz.u.az.call(this,t),$.nr(this,"serieschart","dataarea",9),this.da(!0)},$.g.OW=function(t){$.X(t,8)&&$.nr(this,"serieschart","dataarea"),$.Mz.u.OW.call(this,t)},$.g.QW=function(t){$.X(t,8)&&$.nr(this,"serieschart","dataarea"),$.Mz.u.QW.call(this,t)},$.g.Ol=function(t,e){var i,n=[];if(this.pb(),this.ev()&&"categories"==t&&$.J(this.Ra(),$.Qt)){var s=this.Ra().names();if($.D(e)){var a=this.Ra().values(),o=0;for(i=a.length;o<i;o++){var r={value:a[o],name:s[o]};r=e.call(r,r),$.z(r)||(r=String(s[o])),n.push({text:r,iconEnabled:!1,sourceUid:$.oa(this),sourceKey:o})}}else for(o=0,i=s.length;o<i;o++)n.push({text:String(s[o]),iconEnabled:!1,sourceUid:$.oa(this),sourceKey:o})}else for(o=0,i=this.hb.length;o<i;o++)(a=(s=this.hb[o]).qD(e)).sourceUid=$.oa(this),a.sourceKey=s.id(),n.push(a);return n},$.g.xN=function(t){var e=t.enabled(),i=t.vm||[],n=!0;return(t=t.data()?t.data().Hb():0)&&t!=i.length||(n=!1),e&&n},$.g.yj=function(){for(var t=0,e=this.hb.length,i=0;i<e&&!this.xN(this.hb[i]);i++)t++;return t==e},$.g.U=function(t,e){$.Mz.u.U.call(this,t,e),$.Iq(this,OG,t,e),this.cc(t.palette),this.Nf(t.markerPalette),this.ve(t.hatchFillPalette),t.dataArea&&this.yv().ga(!!e,t.dataArea),this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),this.Ea.ga(!!e,t.selected)},$.g.$c=function(){this.ca.Ga(this.oa),$.W(this,"normal",this.ca),this.ca.ga(!0,{}),$.W(this,"hovered",this.za),this.za.ga(!0,{}),$.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},$.g.F=function(){var t=$.Mz.u.F.call(this);return $.Tq(this,OG,t),t.palette=this.cc().F(),t.markerPalette=this.Nf().F(),t.hatchFillPalette=this.ve().F(),this.tn&&(t.dataArea=this.yv().F()),t.normal=this.Qa().F(),t.hovered=this.lb().F(),t.selected=this.selected().F(),t},$.g.R=function(){this.ka(),this.Dp(),this.da(!1),$.sd(this.Fa,this.He,this.fd,this.tn,this.Ti,this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=this.Ti=this.tn=this.fd=this.He=this.Fa=null,$.Mz.u.R.call(this)};var RG=$.Mz.prototype;RG.labels=RG.labels,RG.minLabels=RG.th,RG.maxLabels=RG.sh,RG.normal=RG.Qa,RG.hovered=RG.lb,RG.selected=RG.selected,RG.isVertical=RG.xa,RG.dataArea=RG.yv,$.H($.Qz,$.Mz),$.Qz.prototype.sa=2031616|$.Mz.prototype.sa;var SG={};$.rq(SG,0,"barGroupsPadding",$.N),$.rq(SG,0,"barsPadding",$.N),$.U($.Qz,SG),$.g=$.Qz.prototype,$.g.g1=function(){for(var t="direct"==this.bb().kx(),e=0;e<this.hb.length;e++)this.hb[t?this.hb.length-e-1:e].W()},$.g.uy=function(){return null},$.g.wy=function(){return null},$.g.ev=function(){return!0},$.g.zU=function(){return"ordinal"},$.g.CA=function(){return 15},$.g.xD=function(){return["Chart scale","ordinal, linear, log, date-time"]},$.g.tH=function(){return"linear"},$.g.sH=function(){return this.CA()},$.g.SM=function(){return this.xD()},$.g.nH=function(){return 0},$.g.tV=function(){},$.g.Ra=function(t){if($.p(t)){if(t=$.jt(this.eb,t,this.zU(),this.CA(),this.xD(),this.iQ,this)){var e=this.eb==t;this.Bia=this.eb?String($.oa(this.eb)):null,this.eb=t,t.da(e),e||(t=131072,this.ev()&&"categories"==this.eg().g("itemsSourceMode")&&(t|=512),t|=this.nH(),this.B(t,1),this.tV(this.eb))}return this}return this.eb||(this.eb=$.jt(this.eb,{},this.zU(),this.CA(),null,this.iQ,this),this.eb.da(!1)),this.eb},$.g.iQ=function(t){if(this.ka(),$.X(t,4)){var e=458752;this.ev()&&"categories"==this.eg().g("itemsSourceMode")&&(e|=512),this.B(e,1)}$.X(t,2)&&$.Rz(this,this.eb),this.da(!0)},$.g.bb=function(t){if($.p(t)){if(t=$.jt(this.Fc,t,this.tH(),this.sH(),this.SM(),this.Yu,this)){var e=this.Fc==t;this.Cia=this.Fc?String($.oa(this.Fc)):null,this.Fc=t,this.Fc.da(e),e||(this.B(131072|this.nH(),1),this.tV(this.Fc))}return this}return this.Fc||(this.Fc=$.jt(this.Fc,{},this.tH(),this.sH(),null,this.Yu,this),this.Fc.da(!1)),this.Fc},$.g.Yu=function(t){this.ka(),$.X(t,4)&&this.B(458752,1),$.X(t,2)&&$.Rz(this,this.Fc),this.da(!0)},$.g.uV=function(){this.B(32768,1)},$.g.Lj=function(){this.pf(1572864)||$.Qz.u.Lj.call(this)},$.g.pb=function(){if(this.ka(),Sz(this),this.So){if(this.J(65536)){var t,e;for(v in this.kA={},this.xn={},this.mm){var i=this.mm[v];i.Of()&&i.Bg()}for(this.Re=this.CS(),t=0;t<this.Re.length;t++){var n=this.Re[t];i=n.X.Ra();var s=n.X.bb();i=$.oa(i),s=$.oa(s),this.xn[i]||(this.xn[i]=[]),this.kA[i]||(this.kA[i]={}),this.kA[i][s]||(this.kA[i][s]=[]),this.xn[i].push(n),this.kA[i][s].push(n)}for(v in this.xn){if(i=(s=this.xn[v])[0].X.Ra(),1<s.length)if(n=s[s.length-1],$.J(i,$.Qt)){var a=n.qt;for(t=0;t<s.length-1;t++)for(e=(n=s[t]).data.length;e<a.length;e++)n.data.push(zB(a[e]))}else{var o,r;a=[];var l=s[0].data;n=s[1].data,e=l.length;var h=n.length,c=o=0,u=o<e?l[o].data.x:window.NaN;for(r=c<h?n[c].data.x:window.NaN;!(0,window.isNaN)(u)&&!(0,window.isNaN)(r);){var d=u<=r,p=u>=r;a.push(d?u:r),d&&(u=++o<e?l[o].data.x:window.NaN),p&&(r=++c<h?n[c].data.x:window.NaN)}for(;!(0,window.isNaN)(u);)a.push(u),u=++o<e?l[o].data.x:window.NaN;for(;!(0,window.isNaN)(r);)a.push(r),r=++c<h?n[c].data.x:window.NaN;for(t=2;t<s.length;t++){var g=[];for(l=a,n=s[t].data,e=l.length,h=n.length,c=o=0,u=o<e?l[o]:window.NaN,r=c<h?n[c].data.x:window.NaN;!(0,window.isNaN)(u)&&!(0,window.isNaN)(r);)d=u<=r,p=u>=r,g.push(d?u:r),d&&(u=++o<e?l[o]:window.NaN),p&&(r=++c<h?n[c].data.x:window.NaN);for(;!(0,window.isNaN)(u);)g.push(u),u=++o<e?l[o]:window.NaN;for(;!(0,window.isNaN)(r);)g.push(r),r=++c<h?n[c].data.x:window.NaN;a=g}for(t=0;t<s.length;t++)if((e=(l=(n=s[t]).data).length)<a.length){for(c=[],u=(h=l[o=0])?h.data.x:window.NaN,e=0;e<a.length;e++)u<=(r=a[e])?(c.push(h),u=(h=l[++o])?h.data.x:window.NaN):c.push(zB(r));n.data=c}}if(a=Uca(s),t=!$.Jc(a),n=s[0],i.Of())if($.J(i,$.Qt))this.UR(i,s,t,a);else if(n.data.length){if(t)for(t=0;t<n.data.length;t++)t in a||i.Xc(n.data[t].data.x);else i.Xc(n.data[0].data.x,n.data[n.data.length-1].data.x);if(hB(n.X))if(n.XU)for(a=n.X.Ec();a.advance();)Uz(a.j("missing"),TG)||(l=n.X.error().vs(!0),t=a.get("x"),i.Xc(t-l[0],t+l[1]));else bB(n.X.error())&&((a=n.X.Ec()).select(0),l=n.X.error().vs(!0),t=a.get("x"),i.Xc(t-l[0],t+l[1]),a.select(n.data.length-1),l=n.X.error().vs(!0),t=a.get("x"),i.Xc(t-l[0],t+l[1]))}$.J(i,$.Qt)&&this.DT(i,s)}for(v in this.bS(),this.mm)(i=this.mm[v]).Of()&&i.Hg();$.Jc(this.mm)&&this.Ra().Of()&&(this.Ra().Bg(),this.Ra().Hg()),this.I(65536)}if(this.KR(),this.J(262144)){var f;for(f in this.FD=!1,this.pn)(t=this.pn[f]).Of()&&t.Bg();for(var b in this.kA){var v=this.xn[b];for(i=this.mm[b],$.J(i,$.Qt)?(i=v[0].data.length,s=this.r2(),t=this.q2(),i=[$.Za(Math.floor(s*i-1),0,i-1),$.Za(Math.ceil(t*i+1),0,i-1),$.Za(Math.floor(s*i+.5),0,i-1),$.Za(Math.floor(t*i-.5),0,i-1)]):i=Vca(v,i),i=(n=i)[0],s=n[1],t=n[2],n=n[3],a=0;a<v.length;a++)r=(l=v[a]).data,l.X.check($.dB)&&l.cO!==r.length&&(o=s,u=r[l=i],e=r[o],u.j.missing&&u.j.notMissingStart&&(r=u.j.notMissingStartIndex,l=(0,window.isNaN)(r)?l:r),!u.j.missing&&u.j.hasPreviousMissingFromStart&&(r=u.j.notMissingStartIndexForPreviousMissing,l=Math.min(l,(0,window.isNaN)(r)?l:r)),e.j.missing&&e.j.notMissingEnd&&(r=e.j.notMissingEndIndex,o=(0,window.isNaN)(r)?o:r),!e.j.missing&&e.j.hasPreviousMissingFromEnd&&(r=u.j.notMissingEndIndexForPreviousMissing,o=Math.max(o,(0,window.isNaN)(r)?o:r)),o=(l=[l,o])[1],i=Math.min(i,l[0]),s=Math.max(s,o));for(var m in v=(t=[i,s,t,n])[0],i=t[1],s=t[2],l=t[3],a=this.kA[b]){if(n=a[m],t=this.pn[m],u=this.uH(t),r="direct"==(r=this.bb().kx()),h="percent"==u,o="none"!=u){var y=[];for(p=v;p<=i;p++)y.push({Sw:0,Cp:0,Iw:0,Rw:0,zp:0,Hw:0,pE:!1,cE:!1,Rs:!1,PE:{jB:window.NaN,dB:window.NaN,dN:!1,i1:!1}})}for(u=0;u<n.length;u++)if(d=(e=n[r?n.length-u-1:u]).X,e.rj=v,e.lastIndex=i,e.zJ=o&&d.EP(),e.uu=window.Infinity,e.tu=-window.Infinity,this.FD=this.FD||e.zJ,c=e.data,e.zJ||h)for(p=v;p<=i;p++){g=c[p];var S=y[p-v];g.j.shared=S.PE,g.j.stackedMissing=S.Rs,Uz(g.j.missing,TG)?S.Rs=!0:(d=this.mU(g),p>=s&&p<=l&&(e.uu>d&&(e.uu=d),e.tu<d&&(e.tu=d)),0<=d?(g.j.stackedZero=S.Cp,S.Cp+=d,g.j.stackedValue=S.Cp,h||(S.pE?(g.j.stackedZeroPrev=S.Sw,g.j.stackedValuePrev=S.Sw+d):g.j.stackedZeroPrev=g.j.stackedValuePrev=window.NaN,S.cE?(g.j.stackedZeroNext=S.Iw,g.j.stackedValueNext=S.Iw+d):g.j.stackedZeroNext=g.j.stackedValueNext=window.NaN)):(g.j.stackedZero=S.zp,S.zp+=d,g.j.stackedValue=S.zp,h||(S.pE?(g.j.stackedZeroPrev=S.Rw,g.j.stackedValuePrev=S.Rw+d):g.j.stackedZeroPrev=g.j.stackedValuePrev=window.NaN,S.cE?(g.j.stackedZeroNext=S.Hw,g.j.stackedValueNext=S.Hw+d):g.j.stackedZeroNext=g.j.stackedValueNext=window.NaN)),h||(this.ps(t,g.j.stackedValuePrev),this.ps(t,g.j.stackedValue),this.ps(t,g.j.stackedValueNext),(g=c[p-1])&&(Uz(g.j.missing,TG)?S.pE=!0:0<=d?S.Sw+=d:S.Rw+=d),(g=c[p+1])&&(Uz(g.j.missing,TG)?S.cE=!0:0<=d?S.Iw+=d:S.Hw+=d)),S.Rs=!1,S.PE.dN=S.PE.dN||!(!S.Cp&&!S.zp))}else{var w=d.Be();for(p=v;p<=i;p++)if((g=c[p])&&!Uz(g.j.missing,TG)){for(S=0;S<w.length;S++)this.ps(t,g.data[w[S]]);if(p>=s&&p<=l)for(S=0;S<w.length;S++)d=$.N(g.data[w[S]]),e.uu>d&&(e.uu=d),e.tu<d&&(e.tu=d)}if(e.X.check(256))for(p=v;p<=i;p++)if(d=(g=c[p]).data.outliers,!Uz(g.j.missing,TG)&&$.A(d))for(S=0;S<d.length;S++)this.ps(t,d[S]);if(hB(e.X)&&(bB(e.X.error())||e.Q2))for(c=e.X.Ec();c.advance();)Uz(c.j("missing"),TG)||(p=e.X.error().vs(!1),d=$.N(c.get("value")),this.ps(t,d-p[0]),this.ps(t,d+p[1]))}if(h)for(this.ps(t,0),u=0;u<n.length;u++)for(c=(e=n[u]).data,p=v;p<=i;p++)g=c[p],S=y[p-v],Uz(g.j.missing,TG)?(g.j.stackedPositiveZero=g.j.stackedPositiveZero/S.Cp*100||0,g.j.stackedNegativeZero=g.j.stackedNegativeZero/S.zp*100||0):(0<=(d=g.j.stackedValue)?(r=S.Cp,d&&this.ps(t,100)):(r=-S.zp,this.ps(t,-100)),g.j.stackedZero=g.j.stackedZero/r*100||0,g.j.stackedValue=g.j.stackedValue/r*100||0);o&&this.P4(n,v,i,t)}}for(f in this.cS(),this.pn)(t=this.pn[f]).Of()&&t.Hg();$.Jc(this.pn)&&this.bb().Of()&&(this.bb().Bg(),this.bb().Hg()),this.B(1572864),this.I(262144)}this.LR()}else this.eS(),this.Q_();this.da(!1)},$.g.Q_=function(){},$.g.UR=function(t,e,i,n){if(e=e[0],i){var s={},a=[];for(i=0;i<e.data.length;i++)if(!(i in n)){var o=e.data[i].data.x;s[$.qo(o)]=a.length,a.push(o)}}else s=e.Lp,a=e.qt;t.XB=s,t.ih=a},$.g.DT=function(t,e){var i,n,s,a=$.Tt(t);if(a){var o=e[0].qt.length,r=Array(o);for(i=0;i<e.length;i++){var l=e[i].data;if(0<o)for(n=0;n<l.length;n++)!$.p(r[n])&&$.p(s=l[n].data[a])&&(r[n]=s,o--)}t.Ok=r}},$.g.PM=function(){var t=this.Ra(),e={};if(t.Of())for(t=0;t<this.hb.length;t++){var i=this.hb[t];if(i&&i.enabled()){var n=$.oa(i.Ra());e[n]||(e[n]={qt:[],Lp:{}});var s=e[n].qt;if(n=e[n].Lp,i=i.data())for(i=i.$();i.advance();){var a=i.get("x"),o=$.qo(a);o in n||(n[o]=s.length,s.push(a))}}}else e[$.oa(t)]={qt:t.values(),Lp:t.XB};return e},$.g.CS=function(){for(var t=[],e=0;e<this.hb.length;e++){var i=this.hb[e];if(i&&i.enabled()){var n=i.Ra();if($.J(n,$.Qt)){var s=this.PM(),a=$.oa(i.Ra());i=$.AB(i,s[a].Lp,s[a].qt,!n.Of())}else i=$.yB(i,!0,$.J(n,$.nt));t.push(i)}}return t},$.g.uH=function(t){return t.jn()},$.g.ps=function(t,e){t.Xc(e)},$.g.mU=function(t){return+t.data.value},$.g.P4=function(){},$.g.eS=function(){if(this.J(327680)){$.xr(this.hb);var t,e,i,n=this.hb.length;for(e in this.Re.length=0,this.xn={},this.mm){var s=this.mm[e];s.Of()&&s.Bg()}for(e in this.pn){var a=this.pn[e];a.Of()&&a.Bg()}for(t=0;t<n;t++)if((i=this.hb[t])&&i.enabled()){s=i.Ra(),a=i.bb();var o=$.J(s,$.Qt)?$.AB(i,{},[],!1,!0):$.yB(i,!1,$.J(s,$.nt));o.uu=window.Infinity,o.tu=-window.Infinity;var r=(i=o.X).vm||[];if(r.length)for(e=0;e<r.length;e++){var l=o.data[r[e]].j;l.missing=(Number(l.missing)||0)|(Number(Tz)||0)}for(e=hB(i)&&(o.XU||bB(o.X.error())),r=i.Ec(),l=i.Be();r.advance();)if(!Uz(r.j("missing"),TG))if(i=r.get("x"),s.Xc(i),e){var h=o.X.error().vs(!0);i=$.N(i),s.Xc(i-h[0],i+h[1]),h=o.X.error().vs(!1),i=$.N(r.get("value")),a.Xc(i-h[0],i+h[1]),o.uu>i&&(o.uu=i),o.tu<i&&(o.tu=i)}else for(h=0;h<l.length;h++)i=r.get(l[h]),a.Xc(i),i=$.N(i),(0,window.isNaN)(i)||(o.uu>i&&(o.uu=i),o.tu<i&&(o.tu=i));o.rj=0,o.lastIndex=o.data.length,e=$.oa(s),(s=this.xn[e])||(this.xn[e]=s=[]),s.push(o),this.Re.push(o)}for(e in this.bS(),this.cS(),this.mm)(s=this.mm[e]).Of()&&s.Hg();for(e in this.pn)(a=this.pn[e]).Of()&&a.Hg();this.B(1572864),$.zr(this.hb),this.I(327680)}},$.g.bS=function(){},$.g.cS=function(){},$.g.vy=function(){return this.pb(),Vz(this.mm)},$.g.xy=function(){return this.pb(),Vz(this.pn)},$.g.co=function(){if(this.J(524288)){this.hJ();var t,e=0,i=0,n=-window.Infinity,s=window.Infinity,a=-window.Infinity,o=window.Infinity,r=0,l=-window.Infinity,h=window.Infinity,c=-window.Infinity,u=window.Infinity,d=0,p=-window.Infinity,g=window.Infinity,f=!1;for(t in this.xn){var b=this.xn[t];if(this.So)for(var v=b[0].data.length,m=Array(v),y=0;y<v;y++)m[y]=[];for(var S,w,x,C,D=0;D<b.length;D++)if((w=(S=b[D]).X)&&w.enabled()){var T=w.name(),k=[],O=[],P=[];x=w.check($.fm|$.UG),(C=w.Ak())&&(f=!0);var L=0,G=window.Infinity,F=-window.Infinity,I=0,E=window.Infinity,A=-window.Infinity,U=window.Infinity,_=-window.Infinity,j=0,M=window.Infinity,N=-window.Infinity,B=0;for(y=0;y<S.data.length;y++){var R=S.data[y];if(Uz(R.j.missing,BB)||L++,!Uz(R.j.missing,TG)){if(x){var H=$.N(R.data.open);(0,window.isNaN)(H)||(F=Math.max(H,F),G=Math.min(H,G)),H=$.N(R.data.close),(0,window.isNaN)(H)||(F=Math.max(H,F),G=Math.min(H,G)),H=$.N(R.data.high);var z=$.N(R.data.low);F=Math.max(H,z,F),G=Math.min(H,z,G),H-=z,A=Math.max(H,A),E=Math.min(H,E)}else C&&(H=$.N(R.data.size),N=Math.max(H,N),M=Math.min(H,M),B+=H,P.push(H)),H="heat-map"==this.Ma()?"heat":"value",H=$.N(R.data[H]),F=Math.max(H,F),G=Math.min(H,G);I+=H,k.push(H),this.So?m[y].push(H):(H=$.N(R.data.x),_=Math.max(H,_),U=Math.min(H,U),j+=H,O.push(H))}}if(e+=L,i+=I,F>n){n=F;var V=T}if(G<s){s=G;var q=T}if(I>a){a=I;var W=T}if(I<o){o=I;var K=T}if(r+=j,_>l){l=_;var Y=T}if(U<h){h=U;var X=T}if(j>c){c=j;var J=T}if(j<u){u=j;var Z=T}y=L?I/L:0,w.La("seriesSum",I),w.La("seriesMin",G),w.La("seriesMax",F),w.La("seriesAverage",y),w.La("seriesPointsCount",L),w.La("seriesPointCount",L),w.La("sum",I),w.La("max",F),w.La("min",G),w.La("average",y),w.La("pointsCount",L),x?(w.La("seriesYRangeMax",A),w.La("seriesYRangeMin",E),w.La("seriesYRangeSum",I),w.La("seriesYRangeAverage",y),w.La("seriesYRangeMode",$m(k)),w.La("seriesYRangeMedian",Zm(k))):(C&&(w.La("seriesBubbleMaxSize",N),w.La("seriesBubbleMinSize",M),w.La("seriesBubbleSizeSum",B),w.La("seriesBubbleSizeAverage",L?B/L:0),w.La("seriesBubbleSizeMode",$m(P)),w.La("seriesBubbleSizeMedian",Zm(P)),d+=B,p=Math.max(p,N),g=Math.min(g,M)),w.La("seriesYMax",F),w.La("seriesYMin",G),w.La("seriesYSum",I),w.La("seriesFirstYValue",k[0]),w.La("seriesLastYValue",k[k.length-1]),w.La("seriesYAverage",y),w.La("seriesYMode",$m(k)),w.La("seriesYMedian",Zm(k))),this.So||(w.La("seriesXMax",_),w.La("seriesXMin",U),w.La("seriesXSum",j),w.La("seriesFirstXValue",O[0]),w.La("seriesLastXValue",O[k.length-1]),w.La("seriesXAverage",L?j/L:0),w.La("seriesXMode",$m(O)),w.La("seriesXMedian",Zm(O)))}if(this.So){for(C=Array(v),k=Array(v),O=Array(v),P=Array(v),L=Array(v),G=Array(v),y=0;y<v;y++){for(w=m[y],x=0,D=window.Infinity,S=-window.Infinity,F=0;F<w.length;F++)x+=I=w[F],D=Math.min(D,I),S=Math.max(S,I);C[y]=x,k[y]=D,O[y]=S,P[y]=x/w.length,L[y]=Zm(w),G[y]=$m(w)}for(D=0;D<b.length;D++)(w=(S=b[D]).X)&&w.enabled()&&((x=w.check($.fm|$.UG))?(w.La("catYRangeSumArr_",C),w.La("catYRangeMinArr_",k),w.La("catYRangeMaxArr_",O),w.La("catYRangeAvgArr_",P),w.La("catYRangeMedianArr_",L),w.La("catYRangeModeArr_",G)):(w.La("catYSumArr_",C),w.La("catYMinArr_",k),w.La("catYMaxArr_",O),w.La("catYAvgArr_",P),w.La("catYMedianArr_",L),w.La("catYModeArr_",G)))}}this.La("dataPlotYSum",i),this.La("dataPlotYRangeSum",i),this.La("dataPlotYMax",n),this.La("dataPlotYRangeMax",n),this.La("dataPlotYMin",s),this.La("dataPlotYRangeMin",s),this.La("dataPlotYAverage",e?i/e:0),this.La("dataPlotSeriesCount",this.Re.length),this.La("dataPlotPointCount",e),this.La("dataPlotMaxYValuePointSeriesName",V),this.La("dataPlotMinYValuePointSeriesName",q),this.La("dataPlotMaxYSumSeriesName",W),this.La("dataPlotMinYSumSeriesName",K),f&&(this.La("dataPlotBubbleSizeSum",d),this.La("dataPlotBubbleMinSize",g),this.La("dataPlotBubbleMaxSize",p),this.La("dataPlotBubbleSizeAverage",e?d/e:0)),this.So||(this.La("dataPlotXSum",r),this.La("dataPlotXMax",l),this.La("dataPlotXMin",h),this.La("dataPlotXAverage",e?r/e:0),this.La("dataPlotMaxXValuePointSeriesName",Y),this.La("dataPlotMinXValuePointSeriesName",X),this.La("dataPlotMaxXSumSeriesName",J),this.La("dataPlotMinXSumSeriesName",Z)),this.I(524288)}if(this.J(1048576)){for(e=this.vy(),i=this.xy(),s=0;s<e.length;s++)if(n=e[s],$.J(n,$.kt))if($.p(Q))var Q=Math.min(n.uh(),Q),tt=Math.max(n.di(),tt);else Q=n.uh(),tt=n.di();for(s=0;s<i.length;s++)if(n=i[s],$.J(n,$.kt))if($.p(et))var et=Math.min(n.uh(),et),it=Math.max(n.di(),it);else et=n.uh(),it=n.di();this.La("xScalesMin",Q),this.La("xScalesMax",tt),this.La("yScalesMin",et),this.La("yScalesMax",it),this.I(1048576)}(Q=this.La("chartElements")||{}).series=this.hb.length,this.La("chartElements",Q)},$.g.r2=function(){return 0},$.g.q2=function(){return 1},$.g.aX=function(){},$.g.KR=function(){},$.g.LR=function(){},$.g.eT=function(){var t,e,i;if(this.So)for(e in this.xn)if($.J(this.mm[e],$.Qt)||$.J(this.mm[e],$.nt)){var n=this.xn[e],s=i=0,a={},o={};for(t=0;t<n.length;t++){var r=n[t].X,l=r.bb(),h=$.oa(l);r.check(262144)&&(r.g("isVertical")?"none"==this.uH(l)?s++:h in o||(s++,o[h]=!0):"none"==this.uH(l)?i++:h in a||(i++,a[h]=!0))}this.SL(i,n,!0),this.SL(s,n,!1)}},$.g.SL=function(t,e,i){var n=this.g("barsPadding"),s=this.g("barGroupsPadding");if(0<t)for(var a=(t=1/(t+(t-1)*n+s))*s/2,o={},r=0;r<e.length;r++)if((s=e[r].X).check(262144)&&i^s.g("isVertical")){var l=s.bb();"none"==this.uH(l)?($.jB(s,a+t/2),$.iB(s,t),a+=t*(1+n)):(l=$.oa(l))in o?($.jB(s,o[l]+t/2),$.iB(s,t)):($.jB(s,a+t/2),$.iB(s,t),o[l]=a,a+=t*(1+n))}},$.g.UL=function(){var t=$.wr(this,"animation");if(t&&t.g("enabled")&&0<t.g("duration"))if(this.Og&&1==this.Og.dc)this.Og.update();else if(this.J(2048)){$.qd(this.Og),this.Og=new Dz,t=t.g("duration");for(var e=0;e<this.hb.length;e++){var i=this.hb[e];if(i.enabled()&&null==i.hi().g("point")){var n=MG[i.re];n&&this.Og.add(new n(i,t))}}this.Og.wa("begin",(function(){$.vx(this,!0),$.Dp(this,{type:"animationstart",chart:this})}),!1,this),this.Og.wa("end",(function(){$.vx(this,!1),$.Dp(this,{type:"animationend",chart:this})}),!1,this),this.Og.play(!1)}},$.g.jx=function(t,e,i){e={},$.Sc(e,$.Sl(i?VG["chart-with-series-point"]:VG["chart-with-series-default"]),$.Sl($.mG["select-marquee"]),t);var n=this.FM();if((t=e["exclude-points-list"]).subMenu={},t.enabled=!1,n.length){i={};for(var s,a=0;a<n.length;a++){var o;o="candlestick"==(s=n[a].ef().kk())||"ohlc"==s?"o - "+n[a].get("open")+", h - "+n[a].get("high")+", l - "+n[a].get("low")+", c - "+n[a].get("close"):"box"==s||"range-area"==s||"range-bar"==s||"range-column"==s||"range-spline-area"==s||"range-step-area"==s?"high - "+n[a].get("high")+", low - "+n[a].get("low"):"bubble"==s?"x - "+n[a].get("x")+", y - "+n[a].get("value")+", size - "+n[a].get("size"):n[a].get("value"),i["exclude-points-point-"+a]={index:10.01,text:n[a].ef().name()+": "+o,eventType:"anychart.include",scrollable:!0,action:(0,$.pa)(n[a].ef().lV,n[a].ef(),n[a].ma())}}i["excluded-points-separator"]={index:10.01+10},(o=$.Sl(WG["exclude-points-include-all"])).index=10.01+20,i["exclude-points-include-all"]=o,t.subMenu=i,t.enabled=!0}return e},$.g.FM=function(){return(0,$.Gg)((0,$.Wa)(this.hb,(function(t){return t.FM()})),(function(t,e){return daa(t,e)}),[])};var WG={"exclude-points-point":{index:7,text:"Exclude",eventType:"anychart.exclude",action:function(t){t.menuParent.ka();for(var e,i=t.selectedPoints,n=0;n<i.length;n++)e=i[n],$.D(e.ef)&&e.ef().v1(e.ma());t.menuParent.da(!0)}},"exclude-points-list":{index:8,text:"Include",subMenu:[],enabled:!1},"exclude-points-keep-only":{index:9,text:"Keep only",eventType:"anychart.keepOnly",action:function(t){t.menuParent.ka();var e,i,n=t.menuParent.Ue();for(i=0;i<n.length;i++)if((e=n[i])&&e.state){var s=$.sx(e.state,$.wo);e.t3(s)}t.menuParent.da(!0)}},"exclude-points-include-all":{index:30,text:"Include all",eventType:"anychart.includeAll",action:function(t){t.menuParent.ka();var e,i=t.menuParent.Ue();for(e=0;e<i.length;e++){var n=i[e];$.D(n.kV)&&n.kV()}t.menuParent.da(!0)}}},VG={"chart-with-series-default":{"exclude-points-list":WG["exclude-points-list"],"exclude-points-separator":{index:8.5}},"chart-with-series-point":{"exclude-points-point":WG["exclude-points-point"],"exclude-points-list":WG["exclude-points-list"],"exclude-points-keep-only":WG["exclude-points-keep-only"],"chart-with-series-point-separator":{index:9.2}}};$.g=$.Qz.prototype,$.g.qU=function(){return this.hb},$.g.oq=function(t){var e=this.fc||$.kn(0,0,0,0),i=t.clientX,n=t.clientY,s=$.Zj(this.O().Ja());t=i-s.x,s=n-s.y;var a=e.left,o=e.top,r=e.width,l=e.height;if(t<a||t>a+r||s<o||s>o+l)return null;e=[];var h=this.gd();if("by-spot"==h.g("hoverMode")){for(i=h.g("spotRadius"),this.Ks?(n=(l-(s-i-o))/l,a=(l-(s+i-o))/l,o=t,t=s,s=o):(n=(t-i-a)/r,a=(t+i-a)/r),o=0,r=this.hb.length;o<r;o++)if((l=this.hb[o])&&l.enabled()){h=l.Ra().Mc(n);var c=l.Ra().Mc(a),u=this.So?l.qM(h,c):l.data().qM(h,c);c=l.Ec();for(var d,p=[],g=window.Infinity,f=0;f<u.length;f++)if(h=u[f],c.select(h)&&!c.j("missing")){for(var b=c.j("x"),v=!1,m=l.Be(),y=0;y<m.length;y++){var S=c.j(m[y]);S=$.gn(b,S,t,s),v=v||S<=i,S<g&&(g=S,d=h)}v&&p.push(h)}p.length&&e.push({X:l,vd:p,Ln:p[p.length-1],De:{index:d,Tf:g}})}}else"by-x"==this.gd().g("hoverMode")&&(e=Xz(this,i,n));return e},$.g.kO=function(){},$.g.aA=function(t,e,i,n,s,a,o){for(t=$.Qz.u.aA.call(this,t,e,i,n,s,a,o),n=!0,s=[],e=0;e<this.hb.length;e++){var r=this.hb[e];i=r.enabled()?$.CB(r,t.left,t.top,t.width,t.height):[],a=(0,$.lD)(i,(function(t){return $.nx(r.state,t)>=$.wo})),n=n&&a,s.push({series:r,pointsInRect:i,allPointsAreSelected:a})}return t.seriesStatus=s,t.allPointsAreSelected=n,t},$.g.$O=function(t){var e=t.shiftKey||t.ctrlKey||t.metaKey,i=t.seriesStatus;if(e&&t.allPointsAreSelected)for(t=0;t<i.length;t++)i[t].series.ie(i[t].pointsInRect);else for(t=0;t<i.length;t++)$.EB(i[t].series,i[t].pointsInRect,e)},$.g.nD=function(t,e,i,n,s,a,o){return this.So?$.Qz.u.nD.call(this,t,e,i,n,s,a,o):this.N1(t,e,i,n,s,a,o)},$.g.sA=function(){return["x"]},$.g.tA=function(t){return t.get("x")},$.g.rA=function(t){return t=t.get("name"),$.z(t)?t:null},$.g.bu=function(t){if(!this.ax||this.yX){var e,i=$.Sl(this.vf("scales"));if(t&&t.scales){for(var n=0;n<i.length;n++)t.scales[n]&&$.ra(i[n],t.scales[n]);t.scales.length>i.length&&(i=$.Ga(i,$.Ja(t.scales,i.length)))}if(n={},$.A(i))for(e=0;e<i.length;e++){var s=i[e];$.z(s)&&(s={type:s});var a=$.dt(s.type,!1);a.Ga(s),a.ticks&&(s=a.ticks().oa,$.ra(s,a.oa.ticks),a.oa.ticks=s),a.minorTicks&&(s=a.minorTicks().oa,$.ra(s,a.oa.minorTicks),a.oa.minorTicks=s),a.N(a.oa),n[e]=a}else if($.C(i))for(e in i)i.hasOwnProperty(e)&&(s=i[e],$.z(s)&&(s={type:s}),(a=$.dt(s.type,!1)).Ga(s),a.ticks&&(s=a.ticks().oa,$.ra(s,a.oa.ticks),a.oa.ticks=s),a.minorTicks&&(s=a.minorTicks().oa,$.ra(s,a.oa.minorTicks),a.oa.minorTicks=s),a.N(a.oa),n[e]=a);for(e=["xScale","yScale"],i=0;i<e.length;i++){var o=e[i];s=t?t[o]:this.vf(o),$.ea(s)||$.z(s)&&!(0,window.isNaN)(Number(s))?a=n[s]:$.z(s)?a=$.dt(s,null):$.C(s)?((a=s.type?$.dt(s.type,!0):this[o]()).Ga(s),a.ticks&&(s=a.ticks().oa,$.ra(s,a.oa.ticks),a.oa.ticks=s),a.minorTicks&&(s=a.minorTicks().oa,$.ra(s,a.oa.minorTicks),a.oa.minorTicks=s),a.N(a.oa)):a=null,a&&this[o](a)}this.ax=n,this.yX=!1}return this.ax},$.g.U=function(t,e){$.Qz.u.U.call(this,t,e),$.Iq(this,SG,t),(t.scales||t.xScale||t.yScale)&&(this.yX=!0);var i=this.bu(t);this.ht(t,i,e)},$.g.F=function(){var t=$.Qz.u.F.call(this),e={},i=[];return $.Tq(this,SG,t),$.Zz(t,"xScale",this.Ra(),i,e),$.Zz(t,"yScale",this.bb(),i,e),this.ft(t,i,e),t.scales=i,t},$.g.ht=function(t,e,i){this.kP(t,e,i)},$.g.ft=function(t,e,i){this.eP(t,e,i)},$.g.ML=function(){return 1},$.g.kP=function(t,e,i){var n=t.series;if($.A(n))for(t=0;t<n.length;t++){var s=n[t],a=s.seriesType||this.g("defaultSeriesType");(a=this.Ae(a,s.data))&&(a.ga(!!i,s),$.C(s)&&("xScale"in s&&s.xScale>this.ML()&&a.Ra(e[s.xScale]),"yScale"in s&&s.yScale>this.ML()&&a.bb(e[s.yScale])))}},$.g.eP=function(t,e,i){var n,s=[];for(n=0;n<this.hb.length;n++){var a=this.hb[n],o=a.F();$.Zz(o,"xScale",a.Ra(),e,i),$.Zz(o,"yScale",a.bb(),e,i),s.push(o)}s.length&&(t.series=s)},$.g.im=function(t,e,i,n){if($.A(t))for(var s=0;s<t.length;s++){var a=t[s],o=e.call(this,s);$.Jc(a)||(n?o.N(a):o.Ga(a),(a=$.C(a)&&"scale"in a?a.scale:o.vf("scale"))>this.ML()&&o.scale(i[a]))}},$.g.R=function(){$.qd(this.Og),$.Qz.u.R.call(this)},$.H($.$z,$.Ny);var XG={};$.sq(XG,[[1,"stroke",$.Pq],[0,"value",$.Cq]]),$.U($.$z,XG),$.g=$.$z.prototype,$.g.ra=$.Ny.prototype.ra,$.g.sa=$.Ny.prototype.sa,$.g.we=function(t){return $.p(t)?(t=$.Gk(t),this.f!=t&&(this.f=t,this.B(4,9)),this):this.f?this.f:this.axis()?"left"==(t=this.axis().orientation())||"right"==t?"horizontal":"vertical":this.G},$.g.scale=function(t){return this.Po(t)},$.g.fs=function(){this.lo()},$.g.kv=function(){$.Oy(this).stroke(this.g("stroke"))},$.g.R=function(){this.ta("stroke",null),$.$z.u.R.call(this)},$.g.F=function(){var t=$.$z.u.F.call(this);return $.Tq(this,XG,t),this.f&&(t.layout=this.f),t},$.g.U=function(t,e){$.$z.u.U.call(this,t,e),$.Iq(this,XG,t)},$.H(bA,$.$z),$.xu(bA,$.$z);var YG=$.$z.prototype;YG.scale=YG.scale,YG.axis=YG.axis,YG.layout=YG.we,YG.isHorizontal=YG.Nb,YG=bA.prototype,$.E("anychart.standalones.axisMarkers.line",(function(){return new bA})),YG.draw=YG.W,YG.parentBounds=YG.ja,YG.container=YG.O,$.H($.cA,$.Ny),$.ZG={},$.sq($.ZG,[[1,"fill",$.Qq],[0,"from",$.Cq],[0,"to",$.Cq]]),$.U($.cA,$.ZG),$.g=$.cA.prototype,$.g.kR=function(){return"From: "+this.g("from")+" to: "+this.g("to")},$.g.ra=$.Ny.prototype.ra,$.g.sa=$.Ny.prototype.sa,$.g.we=function(t){return $.p(t)?(t=$.Gk(t),this.f!=t&&(this.f=t,this.B(4,9)),this):this.f?this.f:this.axis()?"left"==(t=this.axis().orientation())||"right"==t?"horizontal":"vertical":this.G},$.g.scale=function(t){return this.Po(t)},$.g.xs=function(){return[this.g("from"),this.g("to")]},$.g.tK=function(){return $.p(void 0)&&($.p((void 0).from)&&this.from((void 0).from),$.p((void 0).to)&&this.to((void 0).to)),{from:this.g("from"),to:this.g("to")}},$.g.fs=function(){$.Py(this)},$.g.kv=function(){$.Oy(this).stroke(null).fill(this.g("fill"))},$.g.R=function(){this.ta("fill",null),$.cA.u.R.call(this)},$.g.F=function(){var t=$.cA.u.F.call(this);return $.Tq(this,$.ZG,t,void 0,void 0,!0),this.f&&(t.layout=this.f),t},$.g.U=function(t,e){$.cA.u.U.call(this,t,e),$.Iq(this,$.ZG,t)},$.H(eA,$.cA),$.xu(eA,$.cA);var $G=$.cA.prototype;$G.scale=$G.scale,$G.axis=$G.axis,$G.layout=$G.we,$G.isHorizontal=$G.Nb,$G=eA.prototype,$.E("anychart.standalones.axisMarkers.range",(function(){return new eA})),$G.draw=$G.W,$G.parentBounds=$G.ja,$G.container=$G.O,$.H($.fA,$.Zy);var aH={};$.sq(aH,[[0,"value",$.Cq]]),$.U($.fA,aH),$.g=$.fA.prototype,$.g.ra=$.Zy.prototype.ra,$.g.sa=$.Zy.prototype.sa,$.g.scale=function(t){return this.Po(t)},$.g.F=function(){var t=$.fA.u.F.call(this);return $.Tq(this,aH,t),t},$.g.U=function(t,e){$.fA.u.U.call(this,t,e),$.Iq(this,aH,t,e)},$.H(gA,$.fA),$.xu(gA,$.fA);var bH=$.fA.prototype;bH.scale=bH.scale,bH.axis=bH.axis,bH.layout=bH.we,bH.background=bH.background,bH.padding=bH.padding,bH.isHorizontal=bH.Nb,bH=gA.prototype,$.E("anychart.standalones.axisMarkers.text",(function(){return new gA})),bH.draw=bH.W,bH.parentBounds=bH.ja,bH.container=bH.O,$.H(hA,uv),hA.prototype.ra=2|uv.prototype.ra;var cH={};$.sq(cH,[[0,"format",$.ar],[0,"axisIndex",$.Cq]]),$.U(hA,cH),$.g=hA.prototype,$.g.Hf=function(t){return $.p(t)?(this.i!=t&&(this.i=t,this.B(16,1)),this):this.i},$.g.x=function(t){return $.p(t)&&this.No!=t&&(this.No=t,this.B(4,9)),this},$.g.y=function(t){return $.p(t)&&this.Oo!=t&&(this.Oo=t,this.B(4,9)),this},$.g.tf=function(){if(this.ja())var t=this.ja();else{t=new $.I(0,0,0,0);var e=this.xb.rb();t.width=this.padding().Lk(e.width),t.height=this.padding().$j(e.height)}e=t.width;var i=t.height;t=new $.I(0,0,this.Oi,this.Ni);var n=new $.gb(0,0);n.x=this.No,n.y=this.Oo;var s=this.vA(),a=$.Eo(new $.I(0,0,this.Oi,this.Ni),s);n.x-=a.x,n.y-=a.y,a=this.g("offsetX");var o=this.g("offsetY");return $.Yo(n,s,$.p(a)?$.L(a,e):0,$.p(o)?$.L(o,i):0),this.Lg+=n.x,this.Mg+=n.y,t.left=n.x,t.top=n.y,this.xb.x(this.Lg).y(this.Mg),(e=this.xb.clip())?e.shape(this.Lg,this.Mg,this.nn,this.ln):(e=$.tk(this.Lg,this.Mg,this.nn,this.ln),this.xb.clip(e)),t},$.g.F=function(){var t=hA.u.F.call(this);return $.Tq(this,cH,t,"Crosshair Label"),t},$.g.U=function(t,e){hA.u.U.call(this,t,e),$.Iq(this,cH,t,e)};var dH=hA.prototype;dH.background=dH.background,dH.padding=dH.padding,$.H($.iA,$.Y),$.iA.prototype.ra=2|$.Y.prototype.ra,$.iA.prototype.sa=16|$.Y.prototype.sa;var eH={};$.rq(eH,1,"xStroke",$.Pq),$.rq(eH,1,"yStroke",$.Pq),$.rq(eH,0,"displayMode",(function(t){return $.zk(Dda,t,"float")})),$.U($.iA,eH),$.g=$.iA.prototype,$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){if($.p(t)){if(this.Y!=t){var e=String($.oa(this));if(null===t){$.kr(this.Y,this.Tc,this),t=$.jA(this);var i=$.kA(this);for(t=$.Ga(t,i),i=0;i<t.length;i++){var n=t[i];n&&n.parent(null)}delete this.Y.nL[e],this.Y=null}else this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,lA(this,$.jA(this.Y),!0),lA(this,$.kA(this.Y),!1),this.Y.nL[e]=this,$.K(this.Y,this.Tc,this)}return this}return this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=32769),this.Xb=null,this.B(e,i)},$.g.v3=function(t){$.X(t,2)&&this.va(2)},$.g.$h=function(t){return $.p(t)?(this.mc!=t&&(this.mc=t),this):this.mc},$.g.YB=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=$.jA(this),a=s[i];return a||((a=new hA).Ga("defaultFontSettings","defaultCrosshairLabel"),s[i]=a,mA(this,a,i,!0),$.K(a,this.v3,this),i=this.zIndex(),a.zh=i),$.p(n)?(a.N(n),this):a},$.g.ZB=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=$.kA(this),a=s[i];return a||((a=new hA).Ga("defaultFontSettings","defaultCrosshairLabel"),s[i]=a,mA(this,a,i,!1),$.K(a,this.v3,this),i=this.zIndex(),a.zh=i),$.p(n)?(a.N(n),this):a},$.g.W=function(){if(!this.zc())return this;var t=this.ja(),e=this.zIndex(),i=this.O();this.J(16)&&(this.Pr.stroke(this.g("xStroke")),this.Sr.stroke(this.g("yStroke")),this.I(16));var n,s=$.jA(this),a=$.kA(this);if(a=(s=$.Ga(s,a)).length,this.J(2)&&(this.Pr.parent(i),this.Sr.parent(i),$.oA(s,i),this.I(2)),this.J(8)){for(this.Pr.zIndex(e),this.Sr.zIndex(e),i=0;i<a;i++)(n=s[i])&&(n.zh=e);this.I(8)}return this.J(4)&&($.pA(s,t),this.I(4)),this},$.g.Lc=function(){this.$U(),this.aV()},$.g.$U=function(t){this.Pr.clear(),rA(this,t)},$.g.aV=function(t){if(this.Sr.clear(),$.p(t))t.O(null),t.remove();else{t=$.kA(this);for(var e=0;e<t.length;e++){var i=t[e];i&&(i.O(null),i.remove())}}},$.g.If=function(t){if(this.enabled()){var e=t.clientX,i=t.clientY,n=$.Zj(this.O().Ja());if(t=e-n.x,n=i-n.y,"sticky"==this.g("displayMode")&&(e=Xz(this.Yl,e,i))){i=window.Infinity;for(var s=0;s<e.length;s++){var a=e[s],o=a.De.Tf;if(o<i){i=o;var r=a.X,l=a.De.index}}(r=r.$()).select(l),l=$.N(r.j("x")),r=$.$o(r.j("value"),r.j("close"),r.j("high")),r=$.N(r),this.Yl.Ks?(n=l,(0,window.isNaN)(r)||(t=r)):(t=l,(0,window.isNaN)(r)||(n=r))}t>=(l=this.ja()).tb()&&t<=l.cb()&&n>=l.Vb()&&n<=l.Va()?(this.ka(),l=$.jA(this),r=$.kA(this),this.Kt(l,!0,t,n),this.Kt(r,!1,t,n),this.da(!0)):this.Lc()}},$.g.Zx=function(t,e,i,n){var s=e?this.Pr:this.Sr;if((e=this.g(e?"xStroke":"yStroke"))&&!$.cp(e)){var a=(e=this.ja()).cb()-e.tb(),o=e.Va()-e.Vb();i-=e.tb();var r,l=n-e.Vb();n=t.Nb(),t=t.scale(),i=n?i:l,a=n?a:o,o=n?e.tb():e.Vb(),0>(r="linear"==(l=t.Ma())||"datetime"==l||"log"==l?i/a:t.transform(t.Mc(i/a),.5))||1<r?s.clear():(t=o+r*a,a=s.gl(),n?(r=$.R(t,a),n=e.Vb(),t=r,e=e.Va()):(r=e.tb(),n=$.R(t,a),t=e.cb(),e=n),s.clear().moveTo(r,n).lineTo(t,e))}},$.g.ke=function(t,e,i,n,s,a){var o=$.jA(this),r=$.kA(this);if(i=e?o[i]:r[i],e?i.ph("enabled")&&i.Pa.enabled||i.enabled()&&this.SY:i.enabled()){e=(r=this.ja()).cb()-r.tb();var l=r.Va()-r.Vb();if(e=(o=t.Nb())?e:l,l=t.scale(),$.p(a)?s=a:(n-=r.tb(),s-=r.Vb(),s=(o?n:s)/e),0>(s=l.transform(l.Mc(s),.5))||1<s)i.O(null),i.remove();else{if(n=this.nq(t,o?s:1-s),a=i.g("format")||t.labels().g("format")||$.ep,$.z(a)&&(a=$.Nu($.Lu.Id(),a)),i.text(a.call(n,n)),i.qk($.nA(t)),a=this.ja(),n=o=0,t){var h=t.ob(),c=t.enabled();r=c?h.tb():a.cb(),l=c?h.Vb():a.Va();var u=c?h.cb():a.tb();switch(h=c?h.Va():a.Vb(),t.orientation()){case"left":o=this.bI(i)?u-1:u+1,n=Math.round(a.top+s*e);break;case"top":o=Math.round(a.left+s*e),n=sA(i)?h-1:h+1;break;case"right":o=this.bI(i)?r-1:r+1,n=Math.round(a.top+s*e);break;case"bottom":o=Math.round(a.left+s*e),n=sA(i)?l-1:l+1}t=o,e=n}else t=o,e=n;i.x(t).y(e),i.O(this.O()),i.W()}}},$.g.Kt=function(t,e,i,n,s,a){var o,r,l=$.qA(this);if($.p(s))for(o=0;o<t.length;o++)(r=t[o])&&(a||r.ph("enabled")&&r.Pa.enabled?this.ke(this.mc,e,o,i,n,s):rA(this,r));else for(s=e?l.uy:l.wy,o=0;o<t.length;o++)if(r=t[o])if(a=r.g("axisIndex"),(a=s.call(l,a))&&$.p(a.scale().Mc(0))){if(!h){this.Zx(a,e,i,n);var h=!0}this.ke(a,e,o,i,n)}else this.$U(r)},$.g.bI=function(t){return"left-top"==(t=t.vA())||"left-center"==t||"left-bottom"==t},$.g.nq=function(t,e){if(!t)return null;var i=t.scale(),n=i.Ma(),s=i.Mc(e),a="number";switch(n){case"linear":case"log":var o=i.CE(s);break;case"ordinal":o=String(s),a="string";break;case"stock-scatter-date-time":case"stock-ordinal-date-time":case"date-time":o=$.vs(s),a="string"}return $.ov(new $.Fw({value:{value:o,type:a},rawValue:{value:s,type:"number"},max:{value:$.p(i.max)?i.max:null,type:"number"},min:{value:$.p(i.min)?i.min:null,type:"number"},scale:{value:i,type:""},tickValue:{value:s,type:"number"}}))},$.g.hg=function(t){var e=this.ja(),i=t.offsetX;t=t.offsetY,(i<=e.tb()||i>=e.cb()||t<=e.Vb()||t>=e.Va())&&this.Lc()},$.g.remove=function(){this.Lc()},$.g.R=function(){this.Yl&&(this.Yl.gc("mouseover",this.If,!1,this),this.Yl.gc("mousemove",this.If,!1,this),this.Yl.gc("mouseout",this.hg,!1,this),this.Yl=null),$.sd(this.Pr,this.Sr,this.hQ,this.kQ),this.Pr=this.Sr=this.hQ=this.kQ=null,$.iA.u.R.call(this)},$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!=t&&(this.Pa.enabled=t,this.B(1,32777),this.Pa.enabled?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},$.g.F=function(){var t,e=$.iA.u.F.call(this);$.Tq(this,eH,e,"Crosshair");var i=[],n=$.jA(this),s=$.kA(this);for(t=0;t<n.length;t++)n[t]&&i.push(n[t].F());for(0<i.length&&(e.xLabels=i),i=[],t=0;t<s.length;t++)s[t]&&i.push(s[t].F());return 0<i.length&&(e.yLabels=i),e},$.g.U=function(t,e){var i;$.iA.u.U.call(this,t,e),$.Iq(this,eH,t,e);var n=t.xLabels;if($.A(n))for(i=0;i<n.length;i++)this.YB(i,n[i]);else"xLabel"in t&&this.YB(0,t.xLabel);if(n=t.yLabels,$.A(n))for(i=0;i<n.length;i++)this.ZB(i,n[i]);else"yLabel"in t&&this.ZB(0,t.yLabel)};var fH=$.iA.prototype;fH.xLabel=fH.YB,fH.yLabel=fH.ZB,$.H(tA,$.V);var eea=tA.prototype,gH={};$.rq(gH,1,"stroke",$.Pq),eea.uR=gH,$.U(tA,tA.prototype.uR),$.g=tA.prototype,$.g.sa=$.V.prototype.sa,$.g.ra=1|$.V.prototype.ra,$.g.F=function(){var t=tA.u.F.call(this);return $.Tq(this,this.uR,t),t},$.g.U=function(t,e){tA.u.U.call(this,t,e),$.Iq(this,this.uR,t,e)},$.g.R=function(){this.i=null,tA.u.R.call(this)},$.H(uA,$.yu),$.g=uA.prototype,$.g.sa=384|$.yu.prototype.sa,$.g.title=function(t){return this.jb||(this.jb=new $.aw,this.jb.kb(this),$.K(this.jb,this.Mq,this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.Mq=function(t){var e=0,i=0;$.X(t,1)&&(e|=128,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.$A,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.$A=function(t){$.X(t,2)&&this.B(4,9)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(t){$.X(t,2)&&this.B(4,9)},$.g.label=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=this.Da[i];return s||((s=new $.xv).kb(this),s.Ga("defaultFontSettings","defaultLabelSettings","chart.defaultQuarterSettings.defaultLabelSettings"),this.Da[i]=s,$.K(s,this.Naa,this),this.B(256,1)),$.p(n)?(s.N(n),this):s},$.g.Naa=function(){this.B(256,1)},$.g.YT=function(){return this.margin().Ej(this.ob())},$.g.W=function(){if(!this.zc())return this;if(this.J(4)&&this.B(384),uA.u.W.call(this),this.J(128)){var t=$.wr(this,"title");t&&(t.ka(),t.O(this.Na),t.zIndex(10),t.ja(this.ob()),t.da(!1),t.W()),this.I(128)}if(this.J(256)){t=this.YT();for(var e=0,i=this.Da.length;e<i;e++){var n=this.Da[e];n&&(n.ka(),n.O(this.Na),n.ja(this.padding().Ej(t)),n.zIndex(20),n.da(!1),n.W())}this.I(256)}return this},$.g.F=function(){var t=uA.u.F.call(this),e=$.wr(this,"title");e&&(t.title=e.F()),t.margin=this.margin().F(),t.padding=this.padding().F(),e=[];for(var i=0;i<this.Da.length;i++)this.Da[i]&&e.push(this.Da[i].F());return 0<e.length&&(t.labels=e),t},$.g.U=function(t,e){uA.u.U.call(this,t,e),"title"in t&&this.title().ga(!!e,t.title),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin);var i=t.labels;if($.A(i))for(var n=0;n<i.length;n++)this.label(n,i[n])},$.g.R=function(){$.sd(this.jb,this.Qc,this.Wa,this.Da),this.Da=this.Wa=this.Qc=this.jb=null,uA.u.R.call(this)};var hH=uA.prototype;hH.title=hH.title,hH.margin=hH.margin,hH.padding=hH.padding,hH.label=hH.label,$.H(vA,$.V),$.g=vA.prototype,$.g.zm=function(){return this.o||$.wr(this,"rightTop"),this.b||$.wr(this,"leftBottom"),this.i||$.wr(this,"rightBottom"),this.f||$.wr(this,"leftTop"),this.D},$.g.t5=function(t){return this.o||(this.o=new uA,$.K(this.o,this.pa.GO,this.pa),this.D[0]=this.o,$.W(this,"rightTop",this.o)),$.p(t)?(this.o.N(t),this):this.o},$.g.G3=function(t){return this.f||(this.f=new uA,$.K(this.f,this.pa.GO,this.pa),this.D[1]=this.f,$.W(this,"leftTop",this.f)),$.p(t)?(this.f.N(t),this):this.f},$.g.E3=function(t){return this.b||(this.b=new uA,$.K(this.b,this.pa.GO,this.pa),this.D[2]=this.b,$.W(this,"leftBottom",this.b)),$.p(t)?(this.b.N(t),this):this.b},$.g.s5=function(t){return this.i||(this.i=new uA,$.K(this.i,this.pa.GO,this.pa),this.D[3]=this.i,$.W(this,"rightBottom",this.i)),$.p(t)?(this.i.N(t),this):this.i},$.g.F=function(){var t=vA.u.F.call(this);return this.o&&(t.rightTop=this.o.F()),this.f&&(t.leftTop=this.f.F()),this.b&&(t.leftBottom=this.b.F()),this.i&&(t.rightBottom=this.i.F()),t},$.g.U=function(t){vA.u.U.call(this,t),this.t5(t.rightTop),this.G3(t.leftTop),this.E3(t.leftBottom),this.s5(t.rightBottom)},$.g.R=function(){$.sd(this.o,this.f,this.b,this.i),this.i=this.b=this.f=this.o=null,this.D.length=0,vA.u.R.call(this)};var iH=vA.prototype;iH.rightTop=iH.t5,iH.leftTop=iH.G3,iH.leftBottom=iH.E3,iH.rightBottom=iH.s5,$.H($.wA,$.Qz),$.g=$.wA.prototype,$.g.sa=266338304|$.Qz.prototype.sa,$.g.xa=function(t){if($.p(t)){if(t=!!t,!!this.Ks!=t){for(this.Ks=t,t=this.hb.length;t--;)this.hb[t].isVertical(this.Ks);var e=$.Ga(this.b,this.qf);for($.xr(e),t=e.length;t--;){var i=e[t];if(i){switch(i.g("orientation")){case"bottom":var n="left";break;case"top":n="right";break;case"left":n="bottom";break;case"right":n="top"}i.orientation(n)}}for(i=$.Ga(this.Yg,this.Zg,this.jh,this.kh,this.og,this.rg,this.tg),$.xr(i),t=i.length;t--;){var s=i[t];s&&(n="horizontal"==s.we()?"vertical":"horizontal",s.we(n))}$.yr(e,i)}return this}return this.Ks=$.p(this.Ks)?this.Ks:!!this.g("isVertical")},$.g.MA=function(){this.aa&&this.Nk().MA()},$.g.co=function(){if(this.J(524288)){$.wA.u.co.call(this);var t=this.La("chartElements");t.axes={x:0,y:0},t.grids={x:0,y:0,xMinor:0,yMinor:0};for(var e=Math.max(this.b.length,this.qf.length,this.Yg.length,this.Zg.length,this.jh.length,this.kh.length);e--;)this.b[e]&&t.axes.x++,this.qf[e]&&t.axes.y++,this.Yg[e]&&t.grids.x++,this.Zg[e]&&t.grids.y++,this.jh[e]&&t.grids.xMinor++,this.kh[e]&&t.grids.yMinor++;this.La("chartElements",t)}},$.g.pta=function(t){return $.p(t)?(this.yg=t,this):this.yg||{}},$.g.qta=function(t){return $.p(t)?(this.zG=t,this):this.zG||{}},$.g.fA=function(t){return this.aq||(this.aq=$.zm("defaultGridSettings")),$.p(t)?(this.aq=t,this):this.aq||{}},$.g.gA=function(t){return this.bq||(this.bq=$.zm("defaultMinorGridSettings")),$.p(t)?(this.bq=t,this):this.bq||{}},$.g.DF=function(){return new pz},$.g.ip=function(t){return(t?this.fA():this.gA()).zIndex+.001*$.Ga(this.Yg,this.Zg,this.jh,this.kh).length},$.g.lm=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.Yg[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"horizontal":"vertical"),s.zIndex(this.ip(!0)),this.Yg[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.nm=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.Zg[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"vertical":"horizontal"),s.zIndex(this.ip(!0)),this.Zg[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.Qr=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.jh[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"horizontal":"vertical"),s.Ga("defaultMinorGridSettings"),s.zIndex(this.ip(!1)),this.jh[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.Tr=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.kh[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"vertical":"horizontal"),s.Ga("defaultMinorGridSettings"),s.zIndex(this.ip(!1)),this.kh[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.wu=function(){this.B(8388608,1)},$.g.$h=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.b[i];return s||((s=new $.Sy).dF(0),s.kb(this),$.W(this,"defaultXAxisSettings",s),this.b[i]=s,$.K(s,this.xo,this),this.B(3145732,1)),$.p(n)?(s.N(n),this):s},$.g.ij=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.qf[i];return s||((s=new $.Sy).dF(0),$.W(this,"defaultYAxisSettings",s),s.kb(this),this.qf[i]=s,$.K(s,this.xo,this),this.B(3145732,1)),$.p(n)?(s.N(n),this):s},$.g.wD=ba(24),$.g.yD=ba(25),$.g.xo=function(t){var e=0,i=0;$.X(t,1)&&(e|=2097152,i|=1),$.X(t,8)&&(e|=4),this.ka(),this.B(e,i),$.nr(this,"serieschart","dataarea",1),this.da(!0)},$.g.ZG=function(t){return t>=this.b.length?this.qf[t-this.b.length]:this.b[t]},$.g.uy=function(t){return this.b[t]},$.g.wy=function(t){return this.qf[t]},$.g.X5=function(t){t.scale(this.bb())},$.g.nH=function(){return 2097152},$.g.a_=function(){return new $.$z},$.g.Ym=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.og[i];if(!s){s=this.a_();var a=$.tr($.sr(this),"defaultLineMarkerSettings");s.Ga(a),s.pa=this,$.aA(s,this.xa()?"vertical":"horizontal"),this.og[i]=s,s.kb(this),$.K(s,this.Kw,this),this.B(5242880,1)}return $.p(n)?(s.N(n),this):s},$.g.b_=function(){return new $.cA},$.g.gn=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.rg[i];if(!s){s=this.b_();var a=$.tr($.sr(this),"defaultRangeMarkerSettings");s.Ga(a),s.pa=this,$.dA(s,this.xa()?"vertical":"horizontal"),this.rg[i]=s,s.kb(this),$.K(s,this.Kw,this),this.B(5242880,1)}return $.p(n)?(s.N(n),this):s},$.g.c_=function(){return new $.fA},$.g.mn=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.tg[i];if(!s){s=this.c_();var a=$.tr($.sr(this),"defaultTextMarkerSettings");s.Ga(a),s.pa=this,$.$y(s,this.xa()?"vertical":"horizontal"),this.tg[i]=s,s.kb(this),$.K(s,this.Kw,this),this.B(5242880,1)}return $.p(n)?(s.N(n),this):s},$.g.Kw=function(t){var e=4227072;$.X(t,4)&&(e|=327680),this.B(e,1)},$.g.tV=function(t){for(var e=0,i=$.Ga(this.og,this.rg,this.tg),n=0;n<i.length;n++){var s=i[n];s&&s.enabled()&&s.scale()==t&&(e|=s.B(4))}e&&this.B(4194304,1)},$.g.vy=function(){return this.pb(),Vz(zA(this,this.mm,!0))},$.g.xy=function(){return this.pb(),Vz(zA(this,this.pn,!1))},$.g.bS=function(){AA(this,this.mm)},$.g.cS=function(){AA(this,this.pn)},$.g.mh=function(t){return this.$f||(this.$f=new $.iA,this.$f.enabled(!1),$.qA(this.$f,this),$.K(this.$f,this.fB,this),$.W(this,"crosshair",this.$f),this.B(16777216,1)),$.p(t)?(this.$f.N(t),this):this.$f},$.g.fB=function(){this.B(16777216,1)},$.g.Nk=function(t){return this.aa?this.Ba||(this.ud=new this.aa.ChartController(this),this.Ba=new this.aa.PlotController(this.ud,this),$.W(this,"annotations",this.Ba),$.K(this.Ba,this.aR,this)):$.il(4,null,["Annotations"]),$.p(t)?(this.Ba&&this.Ba.N(t),this):this.Ba||null},$.g.aR=function(){this.B(33554432,1)},$.g.PS=function(t){return $.p(t)?(this.Sb=t,this):this.Sb},$.g.Eq=function(t){this.aa&&this.Nk().ie(),$.wA.u.Eq.call(this,t)},$.g.dg=function(){return this.fc},$.g.M1=function(t){return t.clone().round()},$.g.mD=function(t,e){var i,n,s,a,o,r,l=this.ob().clone(),h=$.Ga(this.b,this.qf),c=0,u=0;for(i=h.length;u<i;u++)if((n=h[u])&&n.enabled()&&null===n.g("value")){switch(n.g("orientation")){case"top":a||(a=n);break;case"bottom":r||(r=n);break;case"right":o||(o=n);break;case"left":s||(s=n)}n.ka();var d=n.padding().Pa;d.top=0,d.right=0,d.bottom=0,d.left=0,n.B(n.se)}do{i=[0,0,0,0];var p=!0;for(d=t.clone(),this.$a=this.Ka=this.Ha=this.fb=window.NaN,u=h.length;u--;)if((n=h[u])&&n.enabled()&&null===n.g("value")){n.ja(t);var g=n.g("orientation"),f=n.g("stroke");$.C(f)||(f=$.Wb(f)),f=$.$b(f),"top"==g?(n.padding().top(i[0]),n.padding().bottom(0),g=n.yd(a!=n),i[0]=t.height-g.height,(0,window.isNaN)(this.fb)&&(this.fb=f)):"bottom"==g?(n.padding().bottom(i[2]),n.padding().top(0),g=n.yd(r!=n),i[2]=t.height-g.height,(0,window.isNaN)(this.Ha)&&(this.Ha=f)):"left"==g?(n.padding().left(i[3]),n.padding().right(0),g=n.yd(s!=n),i[3]=t.width-g.width,(0,window.isNaN)(this.Ka)&&(this.Ka=f)):"right"==g&&(n.padding().right(i[1]),n.padding().left(0),g=n.yd(o!=n),i[1]=t.width-g.width,(0,window.isNaN)(this.$a)&&(this.$a=f))}for(i=this.S_(i,e||0),d.left+=i[3],d.top+=i[0],d.width-=i[1]+i[3],d.height-=i[2]+i[0],u=h.length;u--;)if((n=h[u])&&n.enabled()&&null===n.g("value")){switch(f=n.yd(a!=n&&r!=n&&s!=n&&o!=n),n.Nb()?(n.padding().left(i[3]),n.padding().right(i[1]),(g=n.yd(a!=n&&r!=n)).height!=f.height&&(p=!1)):(n.padding().top(i[0]),n.padding().bottom(i[2]),(g=n.yd(s!=n&&o!=n)).width!=f.width&&(p=!1)),g=n.ob(!1),n.g("orientation")){case"top":var b="bottom";break;case"right":b="left";break;case"bottom":b="top";break;case"left":b="right"}n=null,f=l.top;var v=l.height,m=l.left+l.width,y=l.top+l.height,S=g.left+g.width,w=g.top+g.height;switch(b){case"top":g.top>l.top&&(n=new $.I(l.left,l.top,l.width,g.top-l.top));break;case"bottom":w<y&&(n=new $.I(l.left,w,l.width,y-w));break;case"left":g.left>l.left&&(n=new $.I(l.left,f,g.left-l.left,v));break;case"right":S<m&&(n=new $.I(S,f,m-S,v))}n&&(l=n)}c++}while(!p&&5>c);for(u=0,i=h.length;u<i;u++)(n=h[u])&&n.enabled()&&null===n.g("value")&&(n!=a&&n!=r&&n!=s&&n!=o||(c=n,$.p(l)&&(c.UH=l,c.ik=null,c.ns(),c.ae())),n.da(!1));for(l=d,u=0;u<h.length;u++)(s=h[u])&&s.g("enabled")&&null!==(o=s.g("value"))&&(s.ka(),s.ja(l),a=s.ob(!0),r=yA(this,s))&&(b=r.scale(),r=s.g("orientation"),c=0,s.padding(c),i=b.sD(),o=b.transform(o)+(b.Ne()?-i:i)/2,"top"===r?c=l.height*(1-o)-a.height:"bottom"===r?c=l.height-l.height*(1-o)-a.height:"right"===r?c=l.width-l.width*o-a.width:"left"===r&&(c=l.width*o-a.width),s.padding()[r](c),s.da(!1));return d.clone().round()},$.g.S_=function(t){return t},$.g.XT=function(){return 199262208},$.g.WL=function(t){for(var e=0;e<t.length;e++){var i=t[e];i&&(i.ka(),i.O(Wca(this,i)?this.Na:null),i.W(),i.da(!1))}},$.g.jR=function(){var t;if(this.J(8388608)){var e=$.Ga(this.Zg,this.Yg,this.jh,this.kh),i=0;for(t=e.length;i<t;i++){var n=e[i];n&&(n.ka(),n.scale()||xA(this,n),n.ja(this.fc),n.O(this.Na),n.Qp(this.fb,this.$a,this.Ha,this.Ka),n.W(),n.da(!1))}this.I(8388608)}if(this.J(2097152)&&(this.WL(this.b),this.WL(this.qf),this.I(2097152)),this.J(4194304)){for(i=0,t=(e=$.Ga(this.og,this.rg,this.tg)).length;i<t;i++)(n=e[i])&&(n.ka(),n.scale()||xA(this,n),n.ja(this.fc),n.O(this.Na),n.Qp(this.fb,this.$a,this.Ha,this.Ka),n.W(),n.da(!1));this.I(4194304)}},$.g.Qh=function(t){var e;if(this.aa&&(this.Nk(),this.ud.gv(!0)),this.pb(),!this.pf()){if($.xr(this.b,this.qf),this.J(2097156)){var i,n=0;for(e=this.b.length;n<e;n++)(i=this.b[n])&&(i.B(i.se),i.ae(),$.Yu(i.labels()),$.Yu(i.qb()),!i||i.scale()&&String($.oa(i.scale()))!=this.Bia||(i.scale(this.Ra()),this.B(4)));for(n=0,e=this.qf.length;n<e;n++)(i=this.qf[n])&&($.Yu(i.labels()),$.Yu(i.qb()),!i||i.scale()&&String($.oa(i.scale()))!=this.Cia||(this.X5(i),this.B(4)))}if(this.J(4)&&(n=this.M1(t),this.fc=this.mD(n),this.MA(),this.B(this.XT())),this.jR(),$.Pz(this,this.fb,this.$a,this.Ha,this.Ka),this.J(16777216)&&((n=$.wr(this,"crosshair"))&&(n.ka(),n.ja(this.fc),n.O(this.Na),n.W(),n.da(!1)),this.I(16777216)),this.J(33554432)&&(this.aa&&((n=this.Nk()).ka(),n.ja(this.fc),n.O(this.Na),n.W(),n.da(!1)),this.I(33554432)),this.J(134217728)){if(this.na||(this.na=this.Na.path(),this.na.zIndex(2)),t=this.zL().g("stroke"),n=$.$b(t),!$.cp(t)&&$.p(t)){var s=this.fc.clone();i=(e=s.top)+s.height;var a=s.left;s=a+s.width;var o=$.R((a+s)/2,n),r=$.R((e+i)/2,n);this.na.clear().moveTo(o,e).lineTo(o,i).moveTo(a,r).lineTo(s,r)}this.na&&(this.na.stroke(t),this.na.clip(this.fc)),this.ec=[],t=this.fc.width/2,e=this.fc.height/2,this.ec[0]=$.kn(this.fc.left+t+n/2,this.fc.top,t-n/2,e-n/2),this.ec[1]=$.kn(this.fc.left,this.fc.top,t-n/2,e-n/2),this.ec[2]=$.kn(this.fc.left,this.fc.top+e+n/2,t-n/2,e-n/2),this.ec[3]=$.kn(this.fc.left+t+n/2,this.fc.top+e+n/2,t-n/2,e-n/2),this.B(67108864),this.I(134217728)}if(this.J(67108864)){for(t=this.HO().zm(),n=0;n<t.length;n++)(e=t[n])&&(e.O(this.Na),e.ja(this.ec[n]),e.W());this.I(67108864)}$.zr(this.b,this.qf)}},$.g.GO=function(){this.B(67108864,1)},$.g.HO=function(t){return this.Za||(this.Za=new vA(this),$.W(this,"quarters",this.Za)),$.p(t)?(this.Za.N(t),this):this.Za},$.g.cea=function(){this.B(134217732,1)},$.g.zL=function(t){return this.ea||(this.ea=new tA,$.W(this,"crossing",this.ea),$.K(this.ea,this.cea,this)),$.p(t)?(this.ea.N(t),this):this.ea},$.g.U=function(t,e){$.wA.u.U.call(this,t,e),this.zL(t.crossing),this.HO(t.quarters)},$.g.ht=function(t,e,i){$.wA.u.ht.call(this,t,e,i),"isVertical"in t&&(this.Ks=!!t.isVertical),this.aa&&this.Nk(t.annotations),$.BA(this,t),this.Wg(t),e=this.bu();var n=$.p(t)?t:this.oa,s=$.p(t);this.im(n.lineAxesMarkers,this.Ym,e,s),this.im(n.rangeAxesMarkers,this.gn,e,s),this.im(n.textAxesMarkers,this.mn,e,s),"crosshair"in t&&this.mh().ga(!!i,t.crosshair),"yCrossAxes"in t&&CA(this.qf,t.yCrossAxes),"xCrossAxes"in t&&CA(this.b,t.xCrossAxes)},$.g.Wg=function(t){var e=this.bu(),i=$.p(t)?t:this.oa;t=$.p(t),this.im(i.xAxes,this.$h,e,t),this.im(i.yAxes,this.ij,e,t)},$.g.F=function(){var t=$.wA.u.F.call(this);return t.crossing=this.zL().F(),t.quarters=this.HO().F(),t.yCrossAxes=DA(this.qf,this.b),t.xCrossAxes=DA(this.b,this.qf),t},$.g.ft=function(t,e,i){$.wA.u.ft.call(this,t,e,i),t.isVertical=this.xa();var n=[];$.Yz(this,t,"xAxes",this.b,this.EX,e,i,n),$.Yz(this,t,"yAxes",this.qf,this.EX,e,i,n),$.Yz(this,t,"xGrids",this.Yg,this.rK,e,i,n),$.Yz(this,t,"yGrids",this.Zg,this.rK,e,i,n),$.Yz(this,t,"xMinorGrids",this.jh,this.rK,e,i,n),$.Yz(this,t,"yMinorGrids",this.kh,this.rK,e,i,n),$.Yz(this,t,"lineAxesMarkers",this.og,this.FX,e,i,n),$.Yz(this,t,"rangeAxesMarkers",this.rg,this.FX,e,i,n),$.Yz(this,t,"textAxesMarkers",this.tg,this.FX,e,i,n),t.crosshair=this.mh().F()},$.g.EX=function(t,e,i,n){var s=t.F();return $.Zz(s,"scale",t.scale(),e,i),n.push($.oa(t)),s},$.g.rK=function(t,e,i,n){var s=t.F();return $.Zz(s,"scale",t.scale(),e,i),(t=t.axis())&&(0>(n=(0,$.za)(n,$.oa(t)))?("layout"in s||(s.layout=t.Nb()?"horizontal":"vertical"),"scale"in s||$.Zz(s,"scale",t.scale(),e,i)):s.axis=n),s},$.g.FX=function(t,e,i,n){var s=t.F();return t.p3()&&$.Zz(s,"scale",t.Po(),e,i),(t=t.axis())&&(0>(n=(0,$.za)(n,$.oa(t)))?("layout"in s||(s.layout=t.Nb()?"horizontal":"vertical"),"scale"in s||$.Zz(s,"scale",t.scale(),e,i)):s.axis=n),s},$.g.R=function(){$.sd(this.b,this.qf,this.og,this.rg,this.tg,this.Yg,this.Zg,this.jh,this.kh,this.Za,this.ea,this.ud),delete this.b,delete this.qf,this.ud=this.ea=this.Za=this.kh=this.jh=this.Zg=this.Yg=this.tg=this.rg=this.og=null,$.wA.u.R.call(this)};var jH=$.wA.prototype;jH.isVertical=jH.xa,$.g=$.EA.prototype,$.g.ma=function(){return this.index},$.g.xc=function(){return this.ya},$.g.get=function(t){return this.ya.data().get(this.index,t)},$.g.set=function(t,e){return this.ya.data().set(this.index,t,e),this},$.g.lb=function(t){var e=this.xc(),i=$.tx(e.state,$.vo,this.index);return $.p(t)&&i!=t?(t?e.Tj(this.index):e.Md(this.index),this):i},$.g.selected=function(t){var e=this.xc(),i=$.tx(e.state,$.wo,this.index);return $.p(t)&&i!=t?(t?e.select(this.index):e.ie(this.index),this):i},$.g.iy=function(){return this.index<this.ya.data().Hb()},$.g.La=function(t,e){return $.p(t)?$.p(e)?(this.kn[t.toLowerCase()]=e,this):this.kn[t.toLowerCase()]:this.kn},$.g.Jv=function(){this.ya.Jv()},$.g.Rg=function(t){this.Jv();var e=this.La(t);return $.p(e)?e:this.get(t)};var kH=$.EA.prototype;kH.getIndex=kH.ma,kH.getChart=kH.xc,kH.get=kH.get,kH.set=kH.set,kH.hovered=kH.lb,kH.selected=kH.selected,kH.exists=kH.iy,kH.getStat=kH.Rg,$.H($.FA,$.EA),$.g=$.FA.prototype,$.g.ef=function(){return this.X},$.g.get=function(t){t:{var e=this.X,i=this.index;if(e.pd){var n=void 0,s=e.pd.data[i];if(s)if(t in(i=s.data))n=i[t];else{if(s=s.j.rawIndex,e=e.data(),!$.p(s)){t=n;break t}n=e.Af(s),n=e.Ul(s).dk(n,s,t),i[t]=n}t=n}else t=e.data().get(i,t)}return t},$.g.set=function(t,e){return this.X.SX(this.index,t,e),this},$.g.Mfa=function(){return this.X.tU(this.index)},$.g.Nfa=function(){return this.X.uU(this.index)},$.g.selected=function(t){var e=this.ef(),i=$.tx(e.state,$.wo,this.index);return $.p(t)&&i!=t?(t?e.select(this.index):e.ie(this.index),this):i},$.g.lb=function(t){var e=this.ef(),i=$.tx(e.state,$.vo,this.index);return $.p(t)&&i!=t?(t?e.Tj(this.index):e.Md(this.index),this):i},$.g.iy=function(){return this.index<this.X.$().Hb()},$.g.Jv=function(){$.FA.u.Jv.call(this);var t=this.ya,e=this.X,i=e.check($.fm|$.UG),n=i?this.get("high")-this.get("low"):this.get("value");this.La("index",this.index),$.p(n)&&this.La("value",n);var s=this.get("size");if($.ea(t.La("dataPlotXSum"))){var a=n/t.La("dataPlotXSum");this.La("xPercentOfTotal",$.Tm(100*a,2))}$.ea(e.La("seriesXSum"))&&(a=n/e.La("seriesXSum"),this.La("xPercentOfSeries",$.Tm(100*a,2))),$.ea(e.La("seriesBubbleSizeSum"))&&(a=s/e.La("seriesBubbleSizeSum"),this.La("bubbleSizePercentOfSeries",$.Tm(100*a,2)),a=s/t.La("dataPlotBubbleSizeSum"),this.La("bubbleSizePercentOfTotal",$.Tm(100*a,2)),this.La("bubbleSize",s)),a=i?e.La("catYRangeSumArr_"):e.La("catYSumArr_"),s=this.get("x"),a?(this.La("categoryName",s),s=a[this.index],i?(a=n/e.La("seriesYRangeSum"),this.La("yPercentOfSeries",$.Tm(100*a,2)),a=n/t.La("dataPlotYSum"),this.La("yPercentOfTotal",$.Tm(100*a,2)),this.La("yPercentOfCategory",$.Tm(n/s*100,2)),a=s/t.La("dataPlotYSum"),this.La("categoryYRangePercentOfTotal",$.Tm(100*a,2)),this.La("categoryYRangeSum",s),this.La("categoryYRangeMax",e.La("catYRangeMaxArr_")[this.index]),this.La("categoryYRangeMin",e.La("catYRangeMinArr_")[this.index]),this.La("categoryYRangeAverage",e.La("catYRangeAvgArr_")[this.index]),this.La("categoryYRangeMedian",e.La("catYRangeMedianArr_")[this.index]),this.La("categoryYRangeMode",e.La("catYRangeModeArr_")[this.index])):(a=n/e.La("seriesYSum"),this.La("yPercentOfSeries",$.Tm(100*a,2)),a=n/t.La("dataPlotYSum"),this.La("yPercentOfTotal",$.Tm(100*a,2)),this.La("yPercentOfCategory",$.Tm(n/s*100,2)),a=s/t.La("dataPlotYSum"),this.La("categoryYPercentOfTotal",$.Tm(100*a,2)),this.La("categoryYSum",s),this.La("categoryYMax",e.La("catYMaxArr_")[this.index]),this.La("categoryYMin",e.La("catYMinArr_")[this.index]),this.La("categoryYAverage",e.La("catYAvgArr_")[this.index]),this.La("categoryYMedian",e.La("catYMedianArr_")[this.index]),this.La("categoryYMode",e.La("catYModeArr_")[this.index]))):(a=s/e.La("seriesXSum"),this.La("xPercentOfSeries",$.Tm(100*a,2)),a=n/e.La("seriesYSum"),this.La("yPercentOfSeries",$.Tm(100*a,2)),a=s/t.La("dataPlotXSum"),this.La("xPercentOfTotal",$.Tm(100*a,2)),a=n/t.La("dataPlotYSum"),this.La("yPercentOfTotal",$.Tm(100*a,2)))};var lH=$.FA.prototype;lH.get=lH.get,lH.set=lH.set,lH.hovered=lH.lb,lH.selected=lH.selected,lH.getSeries=lH.ef,lH.getStackValue=lH.Mfa,lH.getStackZero=lH.Nfa,lH.exists=lH.iy,$.H(GA,$.FA),GA.prototype.b=function(){return this.X.K1?Math.abs(this.X.K1(this.index)):Math.abs(this.X.data().j(this.index,"size"))};var mH=GA.prototype,fea,BB,Tz,Tca,TG;mH.getPixelRadius=mH.b,$.PG={},$.dB=16,$.tB=2048,$.UG=16384,$.fm=65536,$.H($.JA,$.od),$.g=$.JA.prototype,$.g.aF=$.ia,$.g.type=0,$.g.flags=0,$.g.Np=["value"],$.g.El="value",$.g.Kh={},$.g.nh=function(t,e){var i=this.X.check(32768),n=this.X.check($.fm),s=this.X.check(8),a=this.X.eh(),o={},r="hatchFill",l="stroke",h="fill",c=s?"stroke":"path";return n?(t>e?this.Hd&&(c="high",r="highHatchFill"):this.Od&&(c="low",r="lowHatchFill"),o.path=c,o.qe=r):a?(this.X.gh()||(this.ba?t<this.aa&&(c="negative",r="negativeHatchFill"):this.Ha&&(t>e||(0,window.isNaN)(e)?(c="rising",r="risingHatchFill"):t<e&&(c="falling",r="fallingHatchFill"))),s?o.stroke=c:(o.path=c,o.qe=r)):(this.X.gh()||(this.ba?t<this.aa&&(l="negativeStroke",h="negativeFill",r="negativeHatchFill"):this.Ha&&(t>e||(0,window.isNaN)(e)?(l="risingStroke",h="risingFill",r="risingHatchFill"):t<e&&(l="fallingStroke",h="fallingFill",r="fallingHatchFill"))),o.stroke=l,i||(o.fill=h,o.qe=r)),o},$.g.Be=function(){return this.Np},$.g.Gd=function(t,e){if(null!=this.X.hi().g("point"))this.wn=this.Cea,this.aF=this.wla;else{t:{var i=this.Kh;for(var n in i){var s=t.f[n];if(!s||s.Qb!=i[n]){i=!1;break t}}i=!0}if(!i)return $.il(300,null,[this.X.name(),this.X.kk(),this.Kh]),void(this.wn=$.ia);this.wn=this.Dea,this.aF=this.WB}this.bd=t,this.G=!1,this.Ba=!!(this.flags&$.dB)&&!!this.X.g("connectMissingPoints"),this.Gc=this.X.fk(),this.o=this.X.yu,this.xa=this.X.g("isVertical"),this.wv=$.p(e)?e:2.5<this.X.q0-this.o&&10<this.o,i=this.X.hi(),n=this.X,OA(i.g("start"),n),this.aa=this.X.jf.g("baseline"),this.nf=!!this.X.tl()&&this.X.tl().Px(),i=this.X.Qa(),this.ba=$.p(i.nd("negativeStroke"))||$.p(i.nd("negativeFill")),this.Ha=$.p(i.nd("risingStroke"))||$.p(i.nd("fallingStroke"))||$.p(i.nd("risingFill"))||$.p(i.nd("fallingFill")),this.qc=$.p(i.nd("highFill")),this.Uc=$.p(i.nd("lowFill")),this.Hd=$.p(i.nd("highStroke"))||this.qc,this.Od=$.p(i.nd("lowStroke"))||this.Uc,this.prevValue=window.NaN},$.g.Cea=function(t,e){var i=this.X.hi(),n=this.X;OA(i.g("point"),n,t,e)},$.g.Dea=function(t,e){if(t.j("missing"))this.jA(t,e|this.Gc),this.G=this.G&&this.Ba;else{if(this.nf){var i=$.p(t.j("category"))?t.j("category"):t.ma();this.o=this.X.my(i)}this.G?this.ug(t,e|this.Gc):this.Qo(t,e|this.Gc),this.G=!0}},$.g.Rl=function(){if(this.wn!=$.ia){null!=this.X.hi().g("point")||this.Km();var t=this.X.hi(),e=this.X;OA(t.g("finish"),e)}},$.g.Qo=function(t,e){this.ug(t,e)},$.g.ug=function(){},$.g.jA=function(){this.Ba||this.Km()},$.g.Km=function(){},$.g.WB=function(t,e){this.X.eh()||(ZA(this.bd,e,t.j("shapeNames")),this.bd.VB(e,t.j("shapeNames")))},$.g.wla=function(t,e){var i=this.X.hi(),n=this.X;OA(i.g("updatePoint"),n,t,e,!0)},$.g.yt=function(){},$.g.uK=function(){},$.g.R=function(){this.bd=this.X=null,$.JA.u.R.call(this)},fea=10*1e-6,$.nH={name:"fill",Qb:"path",Yb:"fill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.oH={name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:2e-6},$.pH={name:"negative",Qb:"path",Yb:null,Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:2e-6},$.qH={name:"hatchFill",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.rH={name:"lowHatchFill",Qb:"path",Yb:"lowHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.sH={name:"highHatchFill",Qb:"path",Yb:"highHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.tH={name:"circle",Qb:"circle",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},$.uH={name:"hatchFill",Qb:"circle",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.vH={name:"negativeFill",Qb:"path",Yb:"negativeFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.wH={name:"negativeStroke",Qb:"path",Yb:null,Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:2e-6},$.xH={name:"negative",Qb:"circle",Yb:"negativeFill",Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:0},$.yH={name:"negative",Qb:"path",Yb:"negativeFill",Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:0},$.zH={name:"negativeHatchFill",Qb:"circle",Yb:"negativeHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.AH={name:"rising",Qb:"path",Yb:"risingFill",Zb:"risingStroke",ac:!0,Ib:!1,zIndex:0},$.BH={name:"rising",Qb:"path",Yb:null,Zb:"risingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.CH={name:"risingStroke",Qb:"path",Yb:null,Zb:"risingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.DH={name:"risingFill",Qb:"path",Yb:"risingFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.EH={name:"risingHatchFill",Qb:"path",Yb:"risingHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.FH={name:"falling",Qb:"path",Yb:"fallingFill",Zb:"fallingStroke",ac:!0,Ib:!1,zIndex:0},$.GH={name:"falling",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.HH={name:"fallingStroke",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.IH={name:"fallingFill",Qb:"path",Yb:"fallingFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.JH={name:"fallingHatchFill",Qb:"path",Yb:"fallingHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.KH={name:"negativeHatchFill",Qb:"path",Yb:"negativeHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.LH={name:"highFill",Qb:"path",Yb:"highFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.MH={name:"highStroke",Qb:"path",Yb:null,Zb:"highStroke",ac:!0,Ib:!1,zIndex:2e-6},$.NH={name:"high",Qb:"path",Yb:"highFill",Zb:"highStroke",ac:!0,Ib:!1,zIndex:0},$.OH={name:"low",Qb:"path",Yb:"lowFill",Zb:"lowStroke",ac:!0,Ib:!1,zIndex:0},$.PH={name:"lowFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.QH={name:"lowStroke",Qb:"path",Yb:null,Zb:"lowStroke",ac:!0,Ib:!1,zIndex:2e-6},$.RH={name:"path",Qb:"path",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},$.SH={name:"front",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:5*1e-6},$.QG=8388608,BB=2,Tz=4,Tca=6,TG=7,$.H(LA,$.V),LA.prototype.sa=0,LA.prototype.ra=7,LA.prototype.gx=function(t){return $.p(t)?(this.b=$.A(t)?(0,$.Wa)(t,(function(t){return{name:String(t.name),Qb:String(t.shapeType),Yb:t.fillName,Zb:t.strokeName,ac:!!t.canBeHoveredSelected,Ik:!!t.scrollerSelected,Ib:!!t.isHatchFill,zIndex:+t.zIndex||0}})):null,this.va(2),this):(0,$.Wa)(this.b||this.Sa.Ah.Lb,(function(t){return{name:t.name,shapeType:t.Qb,fillName:t.Yb,strokeName:t.Zb,canBeHoveredSelected:t.ac,scrollerSelected:t.Ik,isHatchFill:t.Ib,zIndex:t.zIndex}}))};var TH={};$.sq(TH,[[0,"start",$.gr],[0,"point",$.gr],[0,"updatePoint",$.gr],[0,"finish",$.gr],[0,"needsZero",$.Dq],[0,"needsWidth",$.Dq],[0,"yValues",$.fr]]),$.U(LA,TH),$.g=LA.prototype,$.g.ph=function(t){return null!=this.Pa[t]},$.g.F=function(){var t=LA.u.F.call(this);return $.Tq(this,TH,t,"Series Rendering Settings"),this.b&&(t.shapes=this.gx()),t},$.g.U=function(t,e){LA.u.U.call(this,t),$.Iq(this,TH,t,e);var i=t.shapes;$.p(i)&&this.gx(i)},$.g.Ie=function(t,e){return!!$.D(e)&&(this.point(e),!0)},$.g.R=function(){LA.u.R.call(this),this.b=this.Sa=null},NA.prototype.ed=function(t,e,i){if(i)for(var n={},s=0;s<i.length;s++)n[i[s]]=!0;return this.series.Rf.ed(t||$.gm,n,e)},NA.prototype.Rg=function(t){var e=this.series;return e.ya.Jv(),e.La(t)},$.H(MA,NA),MA.prototype.f=function(t){return this.b.get(t)},MA.prototype.tU=function(){var t=this.b.j("stackedValue");return $.p(t)?t:this.b.get("value")},MA.prototype.uU=function(){var t=this.b.j("stackedZero");return $.p(t)?t:0};var UH=LA.prototype;UH.shapes=UH.gx,UH=NA.prototype,UH.getShapesGroup=UH.ed,UH.getStat=UH.Rg,UH=MA.prototype,UH.getDataValue=UH.f,UH.getStackedValue=UH.tU,UH.getStackedZero=UH.uU,$.H($.QA,$.od),$.g=$.QA.prototype,$.g.jP=function(t,e,i){t&&(e?delete t.tag:t.tag={X:this.X,index:i},t.Dd(e))},$.g.uv=function(){var t,e;for(t in this.i){var i=this.i[t];for(e=0;e<i.length;e++){var n=i[e];n.parent(null),$.J(n,$.Ag)&&(n.clear(),n.oc(1,0,0,1,0,0))}this.G[t]=0,i.length=0}},$.g.ed=function(t,e,i,n){return $.UA(this,t,e,i,n)},$.g.yF=ba(27),$.g.zt=function(t,e){if($.A(e))for(var i=0;i<e.length;i++)this.zt(t,e[i]);else if(e)for(i in e)e[i].zIndex(this.f[i].zIndex+t)},$.g.Mo=function(t,e){if($.A(e))for(var i=0;i<e.length;i++)VA(this,t,e[i]);else e&&VA(this,t,e)},$.g.bs=function(t){for(var e in this.i)for(var i=this.i[e],n=0;n<i.length;n++)i[n].clip(t)},$.g.R=function(){for(var t in this.D)$.sd(this.D[t]),this.D[t].length=0,this.i[t].length=0;this.f=this.Bd=null,$.QA.u.R.call(this)},$.H($.WA,$.QA),$.WA.prototype.ed=function(t,e,i,n){var s=this.X.$();return i=i||0,this.X.eh()&&this.X.kt()&&(i+=Number(s.j("stateZIndex"))||Number(s.get("zIndex"))||0),t=$.WA.u.ed.call(this,t,e,i,n),s.j(this.P,t),t},$.WA.prototype.zt=function(t,e){var i=this.X.$();t+=this.X.kt()&&Number(i.get("zIndex"))||0,$.WA.u.zt.call(this,t,e)},$.WA.prototype.VB=function(t,e){var i,n,s,a=this.X.$();for(s in e){var o=this.f[s];if(o&&!o.Ib){var r=o.fill(this.X,+t,void 0,void 0,"fill");o=o.stroke(this.X,+t,void 0,void 0,"stroke"),r&&$.dm(r)&&(i=r),o&&$.dm(o)&&(n=o)}}a.j("markerFill",i),a.j("markerStroke",n)},$.H($.XA,$.QA),$.g=$.XA.prototype,$.g.jP=function(t,e){$.XA.u.jP.call(this,t,e,!0)},$.g.uv=function(){$.XA.u.uv.call(this),this.o={}},$.g.ed=function(t,e){var i=ZA(this,t,e),n=this.X.$(),s=n.ma();if(this.b=this.o[i],!this.b){var a=$.XA.u.ed.call(this,t,e);this.b=this.o[i]={gx:[a],rows:[],mV:[]},(0,window.isNaN)(s)||(this.b.mV.push(s),this.b.rows.push(n.current()))}return this.b.gx[this.b.gx.length-1]},$.g.yF=ba(26),$.g.zt=function(t){var e,i=this.X.$().current(),n=this.X.$().ma();for(e in this.o)for(var s=this.o[e],a=s.rows,o=0,r=a.length;o<r;o++){this.X.$().Iu(a[o],s.mV[o]);for(var l=s.gx,h=0;h<l.length;h++)$.XA.u.zt.call(this,t,l[h])}i&&this.X.$().Iu(i,n)},$.g.Mo=function(t){var e=this.X.$().current();for(var i in this.K=this.X.$().ma(),this.o)for(var n=this.o[i],s=n.rows,a=0,o=s.length;a<o;a++){this.X.$().Iu(s[a],n.mV[a]);for(var r=n.gx,l=0;l<r.length;l++)$.XA.u.Mo.call(this,t,r[l])}e&&this.X.$().Iu(e,this.K),this.K=void 0},$.g.VB=function(t,e){var i=this.X.$(),n=i.ma();if(n=$.p(this.K)?this.K:n,e&&0<=n){var s,a,o;for(o in e){var r=this.f[o];r&&!r.Ib&&(n=r.fill(this.X,t,void 0,void 0,"fill"),r=r.stroke(this.X,t,void 0,void 0,"stroke"),n&&$.dm(n)&&(s=n),r&&$.dm(r)&&(a=r))}i.j("markerFill",s),i.j("markerStroke",a)}},$.g.R=function(){this.o=null,$.XA.u.R.call(this)},$.H($A,$.V),$.g=$A.prototype,$.g.ra=5,$.g.sa=16,$.g.mode=function(t){return $.p(t)?(t=$.zk(Ada,t,"both"),this.Fm!=t&&(this.Fm=t,this.va(5)),this):this.Fm},$.g.hF=function(t){return $.p(t)?(t=$.yo(t),this.ba!=t&&(this.ba=t,this.o=this.i=void 0,this.va(5)),this):this.ba},$.g.jF=function(t){return $.p(t)?(t=$.yo(t),this.o!=t&&(this.o=t,this.va(5)),this):this.o},$.g.iF=function(t){return $.p(t)?(t=$.yo(t),this.i!=t&&(this.i=t,this.va(5)),this):this.i},$.g.bF=function(t){return $.p(t)?(t=$.yo(t),this.K!=t&&(this.K=t,this.f=this.b=void 0,this.va(5)),this):this.K},$.g.fF=function(t){return $.p(t)?(t=$.yo(t),this.f!=t&&(this.f=t,this.va(5)),this):this.f},$.g.cF=function(t){return $.p(t)?(t=$.yo(t),this.b!=t&&(this.b=t,this.va(5)),this):this.b},$.g.gQ=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)||this.aa==t||(this.aa=t,this.va(1)),this):this.aa},$.g.ZP=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)||this.G==t||(this.G=t,this.va(1)),this):this.G},$.g.$J=function(t,e,i,n,s){if($.p(t)){var a=$.D(t)?t:$.Wb.apply(null,arguments);return a!=this.P&&(this.P=a,this.va(1)),this}return this.P},$.g.SJ=function(t,e,i,n,s){if($.p(t)){var a=$.D(t)?t:$.Wb.apply(null,arguments);return a!=this.D&&(this.D=a,this.va(1)),this}return this.D},$.g.jT=function(t,e,i,n,s,a,o,r){if(aB(t)){t=e?s:n;var l=o!=(e?n:s);n=r!=(e?n:s),s=e?this.gQ():this.ZP(),e^i?(e=s||0,l&&a.moveTo(o,t-e/2).lineTo(o,t+e/2),a.moveTo(o,t).lineTo(r,t),n&&a.moveTo(r,t-e/2).lineTo(r,t+e/2)):(e=s||0,l&&a.moveTo(t-e/2,o).lineTo(t+e/2,o),a.moveTo(t,o).lineTo(t,r),n&&a.moveTo(t-e/2,r).lineTo(t+e/2,r))}},$.g.W=function(t,e){var i=t?this.Sa.tl():this.Sa.bb(),n=this.Sa.$(),s=n.j("x"),a=n.j("value"),o=$.N(t?n.get("x"):n.get("value")),r=this.cU(t),l=this.Sa,h=l.$().ma();n=l.eD.length?l.eD.pop():$.qk().zIndex(4e-6),l.Aa.hc(n),l.Rf.jP(n,l.check(524288),h),n.stroke(r),n.fill(null),l.nA.push(n),l=(r=this.vs(t))[0],r=r[1],0===l&&0===r||(l?(l=i.transform(o-l),l=this.Sa.Qe(l,t)):l=t?s:a,r?(o=i.transform(o+r),o=this.Sa.Qe(o,t)):o=t?s:a,this.jT(i,t,e,s,a,n,l,o))},$.g.cU=function(t){return t=this.Sa.cU(t),$.C(t)&&"keys"in t&&!$.C(t.mode)&&(t.mode=this.Sa.ob()),t},$.g.vs=function(t){if(!hB(this.Sa))return[0,0];var e=(t=t?"x":"value")+"Error",i=t+"LowerError",n=t+"UpperError",s=this.Sa.$();e=s.get(e)||this[e](),i=s.get(i)||this[i](),n=s.get(n)||this[n]();var a=$.uo(e)||!$.Do(e),o=$.uo(n)||!$.Do(n)||a;return a=$.uo(i)||!$.Do(i)||a,t=s.get(t),e=$.L(e,t),[i=a?i?$.L(i,t):e/2:0,n=o?n?$.L(n,t):e/2:0]},$.g.F=function(){var t=$A.u.F.call(this);return t.mode=this.mode(),t.xError=this.hF(),$.p(this.jF())&&(t.xUpperError=this.jF()),$.p(this.iF())&&(t.xLowerError=this.iF()),t.valueError=this.bF(),$.p(this.fF())&&(t.valueUpperError=this.fF()),$.p(this.cF())&&(t.valueLowerError=this.cF()),t.xErrorWidth=this.gQ(),t.valueErrorWidth=this.ZP(),$.D(this.xErrorStroke)&&($.D(this.$J())?$.kl(8,null,["x error stroke"]):t.xErrorStroke=$.Rl(this.$J())),$.D(this.valueErrorStroke)&&($.D(this.SJ())?$.kl(8,null,["value error stroke"]):t.valueErrorStroke=$.Rl(this.SJ())),t},$.g.Zd=function(t){return $.z(t)||$.ea(t)||null===t?{xError:t,valueError:t}:$.da(t)?{mode:t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&("xError"in i?(this.ka(),this.hF(i.xError),this.bF(i.valueError),this.da(!0)):"mode"in i&&(i.mode?this.mode("both"):this.mode("none")),!0)},$.g.U=function(t,e){$A.u.U.call(this,t,e),this.mode($.p(t.mode)||"none"!=this.Fm?t.mode:"both"),this.hF(t.xError),this.jF(t.xUpperError),this.iF(t.xLowerError),this.bF(t.valueError),this.fF(t.valueUpperError),this.cF(t.valueLowerError),this.gQ(t.xErrorWidth),this.ZP(t.valueErrorWidth),this.$J(t.xErrorStroke),this.SJ(t.valueErrorStroke)};var VH=$A.prototype;VH.mode=VH.mode,VH.xError=VH.hF,VH.xUpperError=VH.jF,VH.xLowerError=VH.iF,VH.valueError=VH.bF,VH.valueUpperError=VH.fF,VH.valueLowerError=VH.cF,VH.xErrorWidth=VH.gQ,VH.valueErrorWidth=VH.ZP,VH.xErrorStroke=VH.$J,VH.valueErrorStroke=VH.SJ,$.H($.cB,tv);var WH={};$.rq(WH,0,"text",$.ar),$.U($.cB,WH),$.g=$.cB.prototype,$.g.reset=function(){this.Pa={},this.fq=this.pp=this.hw=this.gw=this.jw=this.fV=this.gV=this.eV=this.iV=this.Fs=this.hV=void 0},$.g.GD=function(t){return $.p(t)?(t=$.Do(t)?5:+t,this.hV!=t&&(this.hV=t,this.va(1)),this):this.hV},$.g.Ay=function(t){return $.p(t)?(t=!!t,this.Fs!=t&&(this.Fs=t,this.va(1)),this):this.Fs},$.g.HD=function(t){return $.p(t)?($.z(t)&&(t=$.Vk(t)),this.iV!=t&&(this.iV=t,this.va(1)),this):this.iV},$.g.Gs=function(t,e,i,n,s,a,o){if($.p(t)){var r=null===t||$.D(t)?t:$.Ub.apply(null,arguments);return r!=this.eV&&(this.eV=r,this.va(1)),this}return this.eV},$.g.Is=function(t,e,i,n,s){if($.p(t)){var a=null===t||$.D(t)?t:$.Wb.apply(null,arguments);return a!=this.gV&&(this.gV=a,this.va(1)),this}return this.gV},$.g.Hs=function(t,e,i,n){if($.p(t)){var s=$.D(t)?t:$.Yb.apply(null,arguments);return s!=this.fV&&(this.fV=s,this.va(1)),this}return this.fV},$.g.iw=function(t){return $.p(t)?($.D(t)||(t=$.Ok(t)),this.jw!=t&&(this.jw=t,this.va(1)),this):this.jw},$.g.gu=function(t,e,i,n,s,a,o){if($.p(t)){var r=$.Ub.apply(null,arguments);return this.gw!=r&&(this.gw=r,this.va(1)),this}return this.gw},$.g.hu=function(t,e,i,n,s){if($.p(t)){var a=$.Wb.apply(null,arguments);return this.hw!=a&&(this.hw=a,this.va(1)),this}return this.hw},$.g.kw=function(t){return $.p(t)?(t=$.N(t),this.pp!=t&&(this.pp=t,this.va(1)),this):this.pp},$.g.format=function(t){return this.text(t)},$.g.disabled=function(t){return $.p(t)?(t=!!t,this.fq!=t&&(this.fq=t,this.va(1)),this):this.fq},$.g.F=function(){var t=$.cB.u.F.call(this);return $.Tq(this,SF,t,"Legend Item Settings"),$.p(this.GD())&&(t.iconTextSpacing=this.GD()),$.p(this.Ay())&&(t.iconEnabled=this.Ay()),$.p(this.kw())&&(t.iconSize=this.kw()),$.z(this.HD())&&(t.iconType=this.HD()),$.z(this.iw())&&(t.iconMarkerType=this.iw()),$.p(this.disabled())&&(t.disabled=this.disabled()),$.p(this.Gs())&&!$.D(this.Gs())&&(t.iconFill=$.Rl(this.Gs())),$.p(this.Is())&&!$.D(this.Is())&&(t.iconStroke=$.Rl(this.Is())),$.p(this.Hs())&&!$.D(this.Hs())&&(t.iconHatchFill=$.Rl(this.Hs())),$.p(this.gu())&&!$.D(this.gu())&&(t.iconMarkerFill=this.gu()),$.p(this.hu())&&!$.D(this.hu())&&(t.iconMarkerStroke=this.hu()),t},$.g.U=function(t,e){this.ka(),$.cB.u.U.call(this,t,e),e?$.Hq(this.oa,WH,t):$.Iq(this,WH,t),this.GD(t.iconTextSpacing),this.Ay(t.iconEnabled),this.HD(t.iconType),this.Is(t.iconStroke),this.Gs(t.iconFill),this.Hs(t.iconHatchFill),this.iw(t.iconMarkerType),this.gu(t.iconMarkerFill),this.hu(t.iconMarkerStroke),this.kw(t.iconSize),this.disabled(t.disabled),this.da(!0)};var XH=$.cB.prototype;XH.iconTextSpacing=XH.GD,XH.iconEnabled=XH.Ay,XH.iconType=XH.HD,XH.iconFill=XH.Gs,XH.iconStroke=XH.Is,XH.iconHatchFill=XH.Hs,XH.iconMarkerType=XH.iw,XH.iconMarkerFill=XH.gu,XH.iconMarkerStroke=XH.hu,XH.iconSize=XH.kw,XH.format=XH.format,XH.disabled=XH.disabled,$.H($.eB,$.wu),$.Gq($.eB,"fill negativeFill risingFill fallingFill stroke lowStroke highStroke lowFill highFill negativeStroke risingStroke fallingStroke medianStroke stemStroke whiskerStroke hatchFill negativeHatchFill risingHatchFill fallingHatchFill highHatchFill lowHatchFill whiskerWidth type size".split(" "),"normal"),$.eB.prototype.sa=130976|$.wu.prototype.sa,$.eB.prototype.ra=2132|$.wu.prototype.ra,$.eB.prototype.zQ=fea,$.eB.prototype.sF={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x"};var mB={};$.g=$.eB.prototype,$.g.o0=!0,$.g.sW=window.NaN,$.g.V3=window.NaN,$.g.cP=window.NaN,$.g.bP=window.NaN,$.g.tW=window.NaN,$.g.W3=window.NaN,$.g.Ma=function(){return this.re},$.g.kk=function(t){return $.p(t)?((t=this.ya.Vv(t))&&t[0]!=this.re&&(this.re=t[0],this.Mz(t[1],!1),this.B(5664,this.ra)),this):this.re},$.g.wU=function(){var t=$.D(this.xc().uN)&&this.xc().uN();return this.jf.ms().n2(this.re,t)},$.g.Mz=function(t,e){var i=new $.PG[t.Fb](this);this.Ah&&this.Aa&&(!this.check(4)&&this.check(4,t,i)?($.qd(this.Aa),this.Aa=null):this.check(4)&&!this.check(4,t,i)&&(this.Aa=null)),this.Ah=t,this.qu=this.Qu=null,$.qd(this.bf),this.bf=i,this.ka(),this.rE(),$.D(this.jf.ms().n2)?(this.df(),this.Ga(this.wU())):this.oa=this.jf.ms()[$.pm(this.re)]||{},this.ca.df(),$.W(this,"normal",this.ca),wy(this.ca),this.ca.ga(!0,{}),this.za.df(),$.W(this,"hovered",this.za),wy(this.za),this.za.ga(!0,{}),this.Ea.df(),$.W(this,"selected",this.Ea),wy(this.Ea),this.Ea.ga(!0,{}),this.check(256)?this.RH={}:this.RH&&delete this.RH,this.Nd.xPointPosition=.5,this.vC(this.oa,!0,!0,e),this.da(!1),(i=this.Cu).oa=this.oa.rendering||{},i.oa.needsZero=i.Sa.check(1),i.oa.needsWidth=i.Sa.check(1024),i.oa.yValues=$.Ja(i.Sa.bf.Be(),0),$.fB(this)},$.g.rE=function(){$.qd(this.Rf);var t=this.Cu;this.Rf=new(2==this.Ah.Kb?$.WA:$.XA)(this,t.b||t.Sa.Ah.Lb,this.check(524288),null,this.Ah.Jb,this.eq)},$.g.vC=function(t,e,i,n){hB(this)&&this.error().ga(!!i,t.error),e&&this.Ls().reset(),this.Ls().ga(!!i,t.legendItem),"tooltip"in t&&this.Ua().ga(!!i,t.tooltip),$.p(n)||(n=i),n&&(this.clip(t.clip),this.zIndex(t.zIndex)),this.ut().ga(!!i,t.a11y||this.oa.a11y)},$.g.Xja=function(t){var e=1024,i=1;$.X(t,4)&&(i|=4),$.X(t,2)&&(e|=32768),this.B(e,i)},$.g.ma=function(){return this.md?-1:(0,$.za)(this.jf.Ue(),this)},$.g.yh=function(t){return $.p(t)?(this.Wq=t,this):this.Wq},$.g.id=function(t){return $.p(t)?(t=String(t),this.he!=t&&(this.he=t,this.va(64)),this):this.he||String(this.Wq)},$.g.j4=function(){this.va(64),this.ya.g("categorizedBySeries")&&this.tl().va(4)},$.g.name=function(t){return $.p(t)?(t=String(t),this.Er!=t&&(this.Er=t,this.j4()),this):this.Er||"Series "+this.ma()},$.g.j=function(t,e){if(this.Ci||(this.Ci={}),$.p(t)){if($.p(e)){var i=this.Ci[t];return $.p(i)&&i==e||(this.Ci[t]=e),this}return $.C(t)?(this.Ci!=t&&(this.Ci=t),this):this.Ci[t]}return this.Ci},$.g.nN=function(t,e,i){return new $.my(t,e,i,void 0)},$.g.R3=function(t){$.sy.call(this,t),t.I(4294967295)},$.g.S3=function(t){$.ty.call(this,t),t.I(4294967295)},$.g.TH=function(){var t={};$.T(t,[["fill",3072,65,4294967295],["negativeFill",3072,65,4294967295],["risingFill",3072,65,4294967295],["fallingFill",3072,65,4294967295],["stroke",3072,65,4294967295],["lowStroke",2048,65,4294967295],["highStroke",2048,65,4294967295],["lowFill",2048,65,4294967295],["highFill",2048,65,4294967295],["negativeStroke",3072,65,4294967295],["risingStroke",3072,65,4294967295],["fallingStroke",3072,65,4294967295],["medianStroke",2048,65,4294967295],["stemStroke",2048,65,4294967295],["whiskerStroke",2048,65,4294967295],["hatchFill",3072,65,4294967295],["negativeHatchFill",2048,65,4294967295],["risingHatchFill",2048,65,4294967295],["fallingHatchFill",2048,65,4294967295],["highHatchFill",2048,65,4294967295],["lowHatchFill",2048,65,4294967295],["whiskerWidth",1024,1,256],["type",1024,65,8192],["size",1024,1,8192],["labels",0,0],["minLabels",0,0],["maxLabels",0,0],["markers",0,0],["outlierMarkers",0,0]]),this.ca=this.nN(this,t,$.gm),this.ca.ta("labelsAfterInitCallback",$.sy),this.ca.ta("markersAfterInitCallback",$.ty),this.ca.ta("outlierMarkersAfterInitCallback",Mca),t={},$.T(t,gB()),this.za=this.nN(this,t,$.vo),this.za.ta("labelsFactoryConstructor",$.oy),this.za.ta("markersFactoryConstructor",$.ry),this.za.ta("labelsAfterInitCallback",this.R3),this.za.ta("markersAfterInitCallback",this.S3),t={},$.T(t,gB()),this.Ea=this.nN(this,t,$.wo),this.Ea.ta("labelsFactoryConstructor",$.oy),this.Ea.ta("markersFactoryConstructor",$.ry),this.Ea.ta("labelsAfterInitCallback",this.R3),this.Ea.ta("markersAfterInitCallback",this.S3)},$.g.check=function(t,e,i){return!!(t&(e||this.Ah).Cb|t&(i||this.bf).flags)},$.g.kt=function(){return this.check(1048576)},$.g.EP=function(){return this.check(32)},$.g.jL=function(){return!0},$.g.Ak=function(){return this.check(2)},$.g.sp=function(){return!!this.Cu.g("needsWidth")},$.g.aO=function(){return!0},$.g.eh=function(){return this.check(512)},$.g.aj=function(){return!0},$.g.ou=ba(14),$.g.L2=function(){return this.gh()},$.g.jH=function(){var t=0;if(this.sp()){t=this.dH("pointWidth"),t=$.L(t,this.my());var e=this.dH("maxPointWidth");null!=e&&(e=$.L(e,this.my()),t=Math.min(t,e))}return t},$.g.Eh=function(){return this.VF||$.Yb("diagonal-brick")},$.g.mr=function(){return this.ra},$.g.Kq=function(t){this.Nd.color=t,this.ca.Db().oJ(this.Zv()),this.ca.Db().pJ(this.qy()),this.ca.dl().oJ(qB(this)),this.ca.dl().pJ($.Ql(this.Qa().dl().fill()))},$.g.dx=function(t){this.VF=$.Yb(t)},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu,this.$g.set(0)),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.bG=function(t){var e=0>t;return t=((t=Math.abs(t))-this.sW)/(this.V3-this.sW),!(0,window.isNaN)(t)&&(0,window.isFinite)(t)||(t=.5),t=this.tW+t*(this.W3-this.tW),e?-t:t},$.g.Be=function(){return this.Cu.g("yValues")},$.g.sl=function(){return this.Aa},$.g.xc=function(){return this.ya},$.g.$=function(){return this.iterator||this.Ec()},$.g.Ec=function(){return this.iterator=this.cg()},$.g.tl=function(){return this.ya.Ra()},$.g.bb=function(t){if($.p(t)){if(t){if(t=$.jt(this.Fc,t,null,15,null,this.zg,this)){var e=this.Fc==t;this.Fc=t,this.Fc.da(e),e||this.B(1024,5)}}else this.Fc&&(this.Fc&&$.kr(this.Fc,this.zg,this),this.Fc=null,this.B(1024,5));return this}return this.Fc||this.jf.bb()},$.g.zg=function(t){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)?this.B(1024,1|e):this.va(e)},$.g.Lr=function(t,e){return this.Qe(this.tl().transform(t,e),!0)},$.g.Jp=function(t,e){return this.Qe(this.bb().transform(t,e),!1)},$.g.hi=function(t){return $.p(t)?(this.Cu.N(t),this):this.Cu},$.g.error=function(t){return hB(this)||$.kl(12,void 0,[this.kk()]),this.Lv||(this.Lv=new $A(this),$.K(this.Lv,this.Ria,this)),$.p(t)?(this.Lv.N(t),this):this.Lv},$.g.Ria=function(t){var e=0;$.X(t,1)&&(e|=1),$.X(t,4)&&(e|=4),this.B(1024,e)},$.g.vs=function(t){return this.error().vs(t)},$.g.cU=function(t){var e=t?this.error().$J():this.error().SJ();if($.D(e)){var i=this.Ge();e=$.Wb(e.call(i,i))}if(this.kt()){var n=this.k2(t?"xErrorStroke":"valueErrorStroke");$.D(n)?(i=this.Ge(e),n=$.Wb(n.call(i,i))):n&&(n=$.Wb(n))}return n||e},$.g.jT=function(t){if(t=!t.j("missing")){var e=this.error(),i=e.Sa.$();t=i.get("xError")||e.hF();var n=i.get("xLowerError")||e.iF(),s=i.get("xUpperError")||e.jF(),a=i.get("valueError")||e.bF(),o=i.get("valueLowerError")||e.cF();e=i.get("valueUpperError")||e.fF(),a=$.p(o)||$.p(e)||$.uo(a)||!$.Do(a),t=$.p(n)||$.p(s)||$.uo(t)||!$.Do(t)||a}if(t)switch(t=this.error(),n=t.mode(),s=this.g("isVertical"),n){case"x":t.W(!0,s);break;case"value":t.W(!1,s);break;case"both":t.W(!0,s),t.W(!1,s)}},$.g.clip=function(t){return $.p(t)?(null===t&&(t=!1),this.gg!=t&&(this.gg=t,this.B(4096,1)),this):this.gg},$.g.Ls=function(t){return this.vp||(this.vp=new $.cB,$.K(this.vp,this.NW,this)),$.p(t)?(this.vp.N(t),this):this.vp},$.g.NW=function(t){var e=64,i=!1;$.X(t,8)&&(e|=8,i=!0),this.va(e,i)},$.g.qD=function(t){var e=this.Ls();e.I(e.sa);var i=tv.prototype.F.call(e);$.p(e.GD())&&(i.iconTextSpacing=e.GD());var n=e.g("text");return $.p(n)&&(i.text=n),$.p(e.Ay())&&(i.iconEnabled=e.Ay()),$.p(e.HD())&&(i.iconType=e.HD()),$.p(e.kw())&&(i.iconSize=e.kw()),$.p(e.Gs())&&(i.iconFill=e.Gs()),$.p(e.Is())&&(i.iconStroke=e.Is()),$.p(e.Hs())&&(i.iconHatchFill=e.Hs()),$.p(e.iw())&&(i.iconMarkerType=e.iw()),$.p(e.gu())&&(i.iconMarkerFill=e.gu()),$.p(e.hu())&&(i.iconMarkerStroke=e.hu()),$.p(e.disabled())&&(i.disabled=e.disabled()),e=this.g("color"),n=this.RC(),t=i.text||t,$.z(t)&&(t=$.Nu($.Lu.Id(),t)),i.text=$.D(t)?t.call(n,n):this.e2(n),i.disabled="disabled"in i?!!i.disabled:!this.enabled(),i.meta=this.j(),"marker"!=i.iconType||this.check(8192)||(i.iconFill=this.ca.Db().g("fill"),i.iconStroke=this.ca.Db().g("stroke")),i.iconType=this.pD(i.iconType,n),i.iconEnabled=!("iconEnabled"in i)||!!i.iconEnabled,i.iconStroke=this.eH(i.iconStroke,2,e,n),i.iconFill=this.eH(i.iconFill,1,e,n),i.iconHatchFill=this.eH(i.iconHatchFill,3,this.Eh(),n),this.check(4194304)&&this.ca.Db().enabled()?(i.iconMarkerType=i.iconMarkerType||this.ca.Db().type(),i.iconMarkerFill=i.iconMarkerFill||this.ca.Db().g("fill"),i.iconMarkerStroke=i.iconMarkerStroke||this.ca.Db().g("stroke")):(i.iconMarkerType=null,i.iconMarkerFill=null,i.iconMarkerStroke=null),i},$.g.pD=function(t){return"marker"==t?"line"==(t=this.check(8192)?this.g("type"):this.check(4194304)?this.ca.Db().type():"square")&&(t="v-line"):$.D(t)||(t=$.Vk(t)),t},$.g.eH=function(t,e,i){if(t)$.D(t)?(e={sourceColor:i},t=t.call(e,e)):t=$.Rl(t);else{if(2==e)var n="stroke";else if(3==e){if(this.check(8))return null;n="hatchFill"}else this.check(8)?(n="stroke",e=2):n="fill";t=this.ca.g(n);var s=this.ca.oa[n];if($.D(t)&&t==s)return e=this.RC([{sourceColor:{value:i,type:"string"}}]),t.call(e,e);t=$.cm(n,e,!1)(this,$.gm,!0)}return t},$.g.e2=function(){return this.name()},$.g.Ua=function(t){if(!this.px&&(this.px=new $.ww(0),this.px.df(),this.ya.r6())){var e=this.ya,i=e.Ua();this.px.parent(i),this.px.ya(e),$.W(this,"tooltip",this.px)}return $.p(t)?(this.px.N(t),this):this.px},$.g.kd=function(t){if($.p(t)){if(null===t&&this.vb)this.vb=null,this.B(65536,129);else if(t=$.jt(this.vb,t,null,48,null,this.Wp,this)){var e=this.vb==t;this.vb=t,this.vb.da(e),e||this.B(65536,129)}return this}return this.vb},$.g.Bn=ba(28),$.g.Wp=function(t){$.X(t,6)&&this.B(65536,129)},$.g.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},$.g.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za},$.g.selected=function(t){return $.p(t)?(this.Ea.N(t),this):this.Ea},$.g.k2=function(t){return this.kt()?this.$().get(t):void 0},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){var e=this.Pa[t];return null==e&&(null!=(e=this.oa[t])||(e=this.Nd[t])),e},$.g.dH=function(t){return null!=this.Pa[t]?this.Pa[t]:null!=this.jf.Pa[t]?this.jf.Pa[t]:null!=this.ya.Pa[t]?this.ya.Pa[t]:null!=this.oa[t]?this.oa[t]:null!=this.jf.oa[t]?this.jf.oa[t]:null!=this.ya.oa[t]?this.ya.oa[t]:this.Nd[t]},$.g.sc=function(t,e,i,n,s,a,o){var r=0==e?this.ca:1==e?this.za:this.Ea;if(o)return n(r.g(t));if(this.kt()){o=i.get(0==e?"normal":1==e?"hovered":"selected");var l=$.Zo($.p(o)?o[t]:void 0,i.get($.hm(e,t)),r.g(t))}if($.p(l))l=n(l);else{if((t=a||t)in this.ua&&(l=this.g(t),$.p(l)))return n(l);s&&(r=this.Ea),null==(l=r.Pa[t])&&(null!=(l=r.oa[t])||e||(l=this.Nd[t]),$.p(l)&&(l=n(l)))}return l},$.g.U1=function(){return this.O()},$.g.iA=function(t,e,i,n,s,a,o,r,l){var h,c,u,d,p,g,f,b,v,m=o.ma();if((0,window.isNaN)(m))return null;if(a&&((h=this.RH[m])||(h=this.RH[m]=[])),t[0]&&(c=t[0].call(this.ca)),o.j("missing")||o.j("skipDrawing"))t=!1;else{r=$.em(r);var y=n&&this.kt();e[0]&&(u=e[0].call(this.ya.ca));var S=c;if(y)var w=(n=o.get("normal"))?n[i[0]]:o.get(i[0]);if(3<t.length&&(e[3]&&(g=e[3].call(this.ya.ca)),t[3]&&(f=t[3].call(this.ca)),y))var x=(n=o.get("normal"))?n[i[3]]:o.get(i[3]);if(r){var C=1==r?"hovered":"selected";if(e[r]&&(d=e[r].call(this.ya[C]())),t[r]&&(p=t[r].call(this[C]())),y)var D=(n=o.get(C))?n[i[0]]:o.get(i[r]);if(3<t.length&&(e[r+3]&&(b=e[r+3].call(this.ya[C]())),t[r+3]&&(v=t[r+3].call(this[C]())),y))var T=(n=o.get(C))?n[i[3]]:o.get(i[r+3])}w=(T=(0,$.Wa)([w,x,D,T],(function(t){return!$.C(t)||"enabled"in t||((t=$.Qc(t)).enabled=!0),t})))[0],x=T[1],D=T[2],T=T[3],t=Vba($.no([T,0,D,0,v,mo,p,mo,b,mo,d,mo,x,0,w,0,f,mo,S,mo,g,mo,u,mo],"enabled"))}if(t){if(t=s?this.nG():null,c=[S,p,w,D],e=[u,S,w,d,p,D,g,f,x,b,v,T],!a)return"rangeMode"!=(a=ap(s?$.no([T,0,D,0,v,$.jo,p,$.jo,b,$.jo,d,$.jo,x,0,w,0,f,$.jo,S,$.jo,g,$.jo,u,$.jo,v,$.ko,p,$.ko,d,$.ko,f,$.ko,S,$.ko,u,$.ko],"position"):$.no([D,0,p,mo,w,0,S,mo],"position"),"auto"))||s?(h=this.Bh(a,!0),this.aM(c,e,m,h,t,l,a)):(h=this.Bh("high",!0),s=this.Bh("low",!0),a=m+this.qB.length,Zca(this,c,m,a,h,s,l));if(s=o.j("x"),this.g("isVertical"))for(m=0;m<a.length;m++)h[m]=this.aM(c,e,h[m],{value:{x:a[m],y:s}},t,l).ma();else for(m=0;m<a.length;m++)h[m]=this.aM(c,e,h[m],{value:{x:s,y:a[m]}},t,l).ma()}else if(a)for(m=0;m<h.length;m++)c.clear(h[m]);else c.clear(m),s||"rangeMode"==(a=ap($.no([D,0,p,mo,w,0,S,mo],"position"),"auto"))&&(a=m+this.qB.length,c.clear(a));return null},$.g.T1=function(t){var e=this.g("isVertical");return this.bb().Ne()&&(t=!t),e?t?0:180:t?270:90},$.g.jS=function(t){return"low"!=t&&"lowest"!=t&&("high"==t||"highest"==t||0<=(Number(this.$().get(t))||0))},$.g.n5=function(t){return $.Jo(t,180)},$.g.AE=function(t,e){var i=$.Ek(t,null);return i&&"auto"!==i?i=this.n5(i):(i=this.jS(t),i=this.T1(i),i=$.Go(i)),$.Jo(i,e)},$.g.t0=function(t,e){var i=$.mn(t.yl(e,void 0,{anchor:e.qk()})),n=e.qk(),s=e.ic("rotation");if(n=$.Jo(n,-s),$.No(n)&&i.left<this.fa.left||$.Mo(n)&&i.left+i.width>this.fa.left+this.fa.width){var a=n;0<=(n=(0,$.za)($.Fo,a))&&(a=$.Fo.length,a=$.Fo[(a-n)%a]),n=a}($.Lo(n)&&i.top<this.fa.top||$.Ko(n)&&i.top+i.height>this.fa.top+this.fa.height)&&0<=(i=(0,$.za)($.Fo,n))&&(n=$.Fo.length,n=$.Fo[(n-i+4)%n]),n=$.Jo(n,s),e.qk(n)},$.g.UX=function(t,e,i,n,s,a,o,r,l,h,c,u,d){$.bv(t,$.no([d,0,o,0,u,$.jo,a,$.jo,c,$.jo,s,$.jo,h,0,n,0,l,$.jo,i,$.jo,r,$.jo,e,$.jo,u,$.ko,a,$.ko,s,$.ko,t,$.jo,t,$.lo,l,$.ko,i,$.ko,e,$.ko]))},$.g.O_=$.ia,$.g.aM=function(t,e,i,n,s,a,o){if(s){var r=n;(n=(t=t[0]).be(i))||(n=t.add(void 0,void 0,i)),n.Hf(s),r=this.XN(n,r),n.jc(r),n.Hi(),e.unshift(n),this.UX.apply(this,e),e=n.ic("anchor"),dv(n,this.g("isVertical")),$.p(o)&&"auto"==e&&(o=this.AE(o,Number(n.ic("rotation"))||0),n.qk(o),this.t0(t,n)),this.O_(n,i),i=n}else i=rB(this,t,i,n);return a&&i.W(),i},$.g.labels=function(t){return $.p(t)?(this.ca.labels(t),this):this.ca.labels()},$.g.th=function(t){return $.p(t)?(this.ca.th(t),this):this.ca.th()},$.g.sh=function(t){return $.p(t)?(this.ca.sh(t),this):this.ca.sh()},$.g.de=function(t){$.X(t,1)&&this.B(256,1025)},$.g.tf=function(t,e,i){var n=this.xc(),s=[this.ca.labels,this.za.labels,this.Ea.labels],a=this.jL()?[n.Qa().labels,n.lb().labels,n.selected().labels]:[],o=["label","hoverLabel","selectLabel"];t.j("isMaxPoint")?(s.push(this.ca.sh,this.za.sh,this.Ea.sh),this.jL()&&a.push(n.Qa().sh,n.lb().sh,n.selected().sh),o.push("maxLabel","hoverMaxLabel","selectMaxLabel")):t.j("isMinPoint")&&(s.push(this.ca.th,this.za.th,this.Ea.th),this.jL()&&a.push(n.Qa().th,n.lb().th,n.selected().th),o.push("minLabel","hoverMinLabel","selectMinLabel")),t.j("label",this.iA(s,a,o,this.kE(),!0,null,t,e,i))},$.g.TQ=function(){},$.g.kT=function(t){t.W()},$.g.XN=function(t,e){return e},$.g.Db=function(t){return $.p(t)?(this.ca.Db(t),this):this.ca.Db()},$.g.Mn=function(t){$.X(t,1)&&this.B(128,65)},$.g.gq=function(t,e,i){t.j("marker",this.iA([this.ca.Db,this.za.Db,this.Ea.Db],[],["marker","hoverMarker","selectMarker"],this.vO(),!1,null,t,e,i))},$.g.Zv=function(t){return t=$.p(t)?t:$.cm(this.check(8)?"stroke":"fill",1,!1)(this,$.gm,!0,!0),$.Ul(t,1,!0)},$.g.qy=function(){return $.Ql(this.ca.Db().g("fill"))},$.g.dl=function(t){return $.p(t)?(this.ca.dl(t),this):this.ca.dl()},$.g.tja=function(t){$.X(t,1)&&this.B(128,1)},$.g.$L=function(t,e,i){var n=t.j("outliers");n&&n.length&&this.iA([this.ca.dl,this.za.dl,this.Ea.dl],[],["outlierMarker","hoverOutlierMarker","selectOutlierMarker"],this.UW(),!1,n,t,e,i)},$.g.kE=function(){return!1},$.g.vO=function(){return!1},$.g.UW=function(){return!1},$.g.I4=function(){return!1},$.g.gh=function(){return!1},$.g.iB=function(){return!1},$.g.yE=function(){if(this.gh()&&this.eh()&&this.sp()){var t=this.$();for(t.reset();t.advance();)sB(t);sB(this.LM()),sB(this.KM())}},$.g.remove=function(){this.check(4)?$.RA(this.Rf,null):this.Aa&&this.Aa.remove();var t=this.ca.labels();t.Vd()&&(t.Vd().remove(),t.B(2)),(t=this.ca.Db())&&(t.remove(),t.B(2)),(t=this.ca.dl())&&(t.remove(),t.B(2))},$.g.ut=function(t){return this.jl||(this.jl=new gx(this),$.K(this.jl,this.JW,this),$.J(this.ya,$.ux)&&(ex(this.jl,this.ya.ut()),ex(this.jl).va(2))),$.p(t)?(this.jl.N.apply(this.jl,arguments),this):this.jl},$.g.JW=function(){this.B(32,1)},$.g.W=function(){if(!this.zc())return this;if(this.ka(),$.p(this.Nd.color)&&this.J(16768)&&this.Kq(this.Nd.color),this.J(32768)&&(this.rE(),this.I(32768)),this.J(4)){this.fa=this.ob(),this.Mx=this.$g?this.$g.Ej(this.fa):this.fa;var t=Math.min(this.fa.height,this.fa.width);this.tW=$.L(this.Vha,t),this.W3=$.L(this.Oha,t),this.B(7168)}this.J(512)&&(this.Ec(),this.bX(),this.B(68640,2049),this.I(512)),this.k0(),this.J(1024)&&this.B(24960),t=[];var e=[],i=!1;if(this.J(1026)&&(this.cX(),this.nE()),this.J(1282)){var n=this.ca.labels(),s=this.ca.th().enabled()||this.ca.sh().enabled()||this.za.labels().enabled()||this.Ea.labels().enabled()||this.za.th().enabled()||this.Ea.th().enabled()||this.za.sh().enabled()||this.Ea.sh().enabled();oB(this,n,s,this.kE(),$.QG,256)&&(s=this.zIndex()+this.zQ+(this.gh()?1:0),n.zh=s,n.B(8),this.check($.QG)&&t.push(this.tf),e.push(n),i=!0),this.ca.th().I(4294967295),this.ca.sh().I(4294967295),this.za.th().I(4294967295),this.za.sh().I(4294967295),this.Ea.th().I(4294967295),this.Ea.sh().I(4294967295),this.I(256)}if(this.J(1154)&&(n=this.ca.Db(),s=this.za.Db().enabled()||this.Ea.Db().enabled(),oB(this,n,s,this.vO(),4194304,128)&&(s=this.zIndex()+12e-6+(this.gh()?1:0),n.zh=s,this.check(4194304)&&t.push(this.gq),e.push(n)),this.I(128)),this.J(9218)){if(this.eD||(this.eD=[]),this.nA)for(;this.nA.length;)(n=this.nA.pop()).clear(),n.parent(null),this.eD.push(n);else this.nA=[];hB(this)&&"none"!=this.error().mode()&&(this.I4()||bB(this.error()))&&t.push(this.jT),this.I(8192)}if(this.J(17410)&&(n=this.ca.dl(),s=this.za.dl().enabled()||this.Ea.dl().enabled(),oB(this,n,s,this.UW(),256,16384)&&(s=this.zIndex()+11e-6,n.zh=s,this.check(256)&&t.push(this.$L),e.push(n)),this.I(16384)),n=t.length,this.J(1024)){if(s=this.uX()){var a=this.Be();if(this.bJ(s,a),i&&this.TQ(),this.ya.g("categorizedBySeries")){i=this.Ec();var o=this.Iha,r=this.ya.g("barsPadding"),l=this.ya.g("barGroupsPadding"),h=i.Sa.pd.cO;this.Pz=1/(l+r*(h-1)+h),$.iB(this,this.Pz),this.nE(),this.Gd(!1)}else o=this.XA,this.Gd(),i=this.Ec();for((r=this.LM())&&(this.XA(r,a,s),this.wn(r,this.rr(r.ma()))),i.reset();i.advance();)for(i.j("destinationValue",window.NaN),l=this.rr(i.ma()),o.call(this,i,a,s),this.wn(i,l),r=0;r<n;r++)t[r].call(this,i,l,!1);(r=this.KM())&&(this.XA(r,a,s),this.wn(r,this.rr(r.ma()))),this.Rl()}else for(i=this.Ec();i.advance();)this.uI(i,this.Be(),window.NaN);this.I(2056),this.check(4)&&this.B(4096)}else if(n)for(i&&this.TQ(),i=this.Ec();i.advance();)for(l=this.rr(i.ma()),r=0;r<n;r++)t[r].call(this,i,l,!1);return Yca(this,e),this.I(1026),this.J(2048)&&(this.Mo(),this.I(2048)),this.J(8)&&(this.xC(),this.I(8)),this.J(4096)&&(this.bs(),this.I(4096)),this.J(32)&&(this.ut().JR(),this.I(32)),this.I(65540),this.da(!1),this},$.g.Gd=function(t){this.bf.Gd(this.Rf,t)},$.g.wn=function(t,e){this.bf.wn(t,e)},$.g.Rl=function(){this.bf.Rl()},$.g.cX=function(){this.check(4)?this.Aa=this.O():(this.Aa||(this.Aa=$.ok(),this.o0&&$.ru(this,this.Aa)),this.Aa.zIndex(this.zIndex()),this.Aa.parent(this.O())),this.J(1024)&&this.Rf.uv(),$.RA(this.Rf,this.Aa)},$.g.nE=function(){this.q0=this.my(),this.yu=this.jH()},$.g.xC=function(){var t=this.zIndex();this.check(4)?this.bf.uK(t):this.Aa.zIndex(t)},$.g.bs=function(t){if(t=t||this.gg,$.da(t)&&(t=t?uB(this):null),t?(this.ti||(this.ti=$.tk()),this.ti.shape(t),t=this.ti):t=null,this.check(4)?this.Rf.bs(t):this.Aa.clip(t),this.check($.QG)){var e=this.ca.labels().Vd();e&&e.clip(t)}this.check(4194304)&&(e=this.ca.Db().Vd())&&e.clip(t),this.check(256)&&(e=this.ca.dl().Vd())&&e.clip(t)},$.g.Mo=function(){if($.J(this.Rf,$.WA))for(var t=this.Ec();t.advance();)this.Rf.Mo(this.rr(t.ma()),t.j("shapes"));else this.Rf.Mo(this.fk())},$.g.bX=$.ia,$.g.k0=function(){if(this.J(65536)){if(this.vb){var t=this.Be(),e=this.Ec();for(this.vb.ka(),this.vb.Bg();e.advance();){var i=e.get(t[1]);this.vb.Xc(i)}this.vb.Hg(),this.vb.da(!1),this.B(3072,129)}this.I(65536)}},$.g.uX=function(){return this.Be()},$.g.oH=function(){return[]},$.g.rr=function(){return $.gm},$.g.fk=function(){return $.gm},$.g.RD=function(){return!0},$.g.LM=function(){return null},$.g.KM=function(){return null},$.g.kH=function(t){return t.get("value")},$.g.Qe=function(t,e){if(e^this.g("isVertical"))var i=this.fa.left,n=this.fa.width;else i=this.fa.Va(),n=-this.fa.height;return i+t*n},$.g.Zs=function(t,e){for(var i=[],n=this.Qe(t,!0),s=0;s<e.length;s++)i.push(n,this.Qe(e[s],!1));return i},$.g.P_=function(t){if(this.g("isVertical"))var e=this.Mx.left,i=e+this.Mx.width;else i=(e=this.Mx.top)+this.Mx.height;return $.Za(t,e,i)},$.g.z0=function(){return!1},$.g.uI=function(t,e,i){i=this.Qe(i,!0),t.j("x",i);for(var n=0;n<e.length;n++)t.j(e[n],void 0),t.j(e[n]+"X",i)},$.g.YA=function(t,e,i){var n,s=[],a=[];for(n in e)s.push(n),a.push(e[n]);for(e=this.Zs(i,a),i=0;i<s.length;i++)t.j(s[i]+"X",e[2*i]),t.j(s[i],e[2*i+1]);t.j("x",e[0])},$.g.Fha=function(t,e,i,n){if(!t.j("missing")){e=t.j("shared");var s=t.j("value"),a=t.j("zero"),o=this.kH(t),r=Number(o);i=Math.max(Math.abs(s-a),this.rW),s=a>=s,null===o||(0,window.isNaN)(r)||0!=r||(s=!((s=this.g("isVertical"))^(o=this.bb().Ne()))),o=e.dN,r=t.j("valueRatio"),r=$.p(r)?!r:!i,s?(i=-i,(0,window.isNaN)(e.jB)?(e.jB=a+i,i=e.jB,o||(r=!1)):(i=(a=Math.min(a,e.jB))+i,e.jB=i)):(0,window.isNaN)(e.dB)?(e.dB=a+i,i=e.dB,o||(r=!1)):(i=(a=Math.max(a,e.dB))+i,e.dB=i),t.j("value",i),t.j("zero",a),t.j("skipDrawing",r)}return n},$.g.Gha=function(t,e,i,n){if(!t.j("missing")){var s=t.j("value");e=t.j("zero");var a=this.kH(t),o=Number(a);i=Math.max(Math.abs(s-e),this.rW),s=e>=s,null===a||(0,window.isNaN)(o)||0!=o||(s=!((a=this.g("isVertical"))^(o=this.bb().Ne()))),s&&(i=-i),t.j("value",e+i)}return n},$.g.Eha=function(t,e,i,n){if(!t.j("missing")){var s=((e=t.j("high"))+(i=t.j("low")))/2,a=Math.max(Math.abs(i-e),this.rW)/2;e>=i&&(a=-a),t.j("high",s-a),t.j("low",s+a)}return n},$.g.Kha=function(t,e,i,n,s){if(e=this.bb(),e={value:$.Za(e.transform(t.j("stackedValue"),.5),0,1),zero:$.Za(e.transform(t.j("stackedZero"),.5),0,1),prevValue:e.transform(t.j("stackedValuePrev"),.5),prevZero:e.transform(t.j("stackedZeroPrev"),.5),nextValue:e.transform(t.j("stackedValueNext"),.5),nextZero:e.transform(t.j("stackedZeroNext"),.5)},this.YA(t,e,s),t.j("zeroMissing",t.j("stackedMissing")),s=t.j("shared")){i=Math.abs(e.value-e.zero),e=s.dN;var a=t.j("valueRatio");i=$.p(a)?!a:!i,s.i1||e||(i=!1,s.i1=!0),t.j("skipDrawing",i)}return n},$.g.Bha=function(t,e,i,n){for(var s,a,o=this.bb(),r=0;r<i.length;r++){var l=e[r];a=t.lr(i[r]);var h=this.Rx;s=o.P3(a,h),a=o.M3(a,h),t.j(l+"Change",s),t.j(l+"PercentChange",$.Tm(Number(a),2)),t.j(l+"RatioChange",Number(a)/100)}return n},$.g.Cha=function(t,e,i,n,s){var a=!1;if(e=!1,!n&&0<=s&&1>=s){a=window.Infinity,s=-window.Infinity;var o,r=Math.min.apply(null,this.f5);for(e=Math.max.apply(null,this.f5),o=0;o<i.length;o++){var l;(l=$.J(this.bb(),$.Mt)?this.bb().Vz():null)&&"none"!=l?"value"==l?l=Number(t.j("valueChange")):(l=Number(t.j("valuePercentChange")),r=$.Tm(r,2),e=$.Tm(e,2)):l=Number(t.lr(i[o])),(0,window.isNaN)(l)||(s<l&&(s=l),a>l&&(a=l))}a=(0,window.isFinite)(a)&&r>=a,e=(0,window.isFinite)(s)&&e<=s}return t.j("isMinPoint",a),t.j("isMaxPoint",e),n},$.g.O3=function(t,e,i,n,s){for(var a=this.bb(),o={},r=0;r<i.length;r++){var l=a.transform(a.Lz(t.lr(i[r]),this.Rx),.5);(0,window.isNaN)(l)&&(n|=1),o[e[r]]=l}return this.YA(t,o,s),n},$.g.YD=function(t,e,i,n){return t.j("zeroX",t.j("x")),t.j("zero",this.Mi),t.j("zeroMissing",!1),n},$.g.Jha=function(t,e,i,n){return t.j("size",this.bG(Number(t.get("size")))),n},$.g.Hha=function(t,e,i,n){e=this.bb(),i=[];var s=t.get("outliers");if($.A(s))for(var a=0;a<s.length;a++)e.zk(s[a])||i.push(this.Qe(e.transform(e.Lz(s[a],this.Rx),.5),!1));return t.j("outliers",i),n},$.g.bJ=function(){var t=this.bb();if(this.Vj.length=0,this.gh()?this.Vj.push(this.Kha):(this.Vj.push(this.O3),$.PA(this)&&this.Vj.push(this.YD),$.J(t,$.Mt)&&"none"!=t.Vz()&&this.Vj.push(this.Bha)),this.aO()&&(this.f5=this.oH(!0),this.Vj.push(this.Cha)),this.eh()&&this.sp()&&"percent"!=this.bb().jn()){var e=this.dH("minPointLength"),i=this.g("isVertical")?this.fa.width:this.fa.height;this.rW=Math.abs($.L(e,i)),this.check($.fm|$.UG)?this.Vj.push(this.Eha):this.gh()?this.Vj.push(this.Fha):this.Vj.push(this.Gha)}this.Ak()&&this.Vj.push(this.Jha),this.check(256)&&this.Vj.push(this.Hha),$.PA(this)&&(e=this.jf.g("baseline")||0,this.YY=$.Za(t&&t.transform(e,.5)||e,0,1),this.Mi=this.P_(this.Qe(this.YY,!1)))},$.g.yU=function(){return this.g("xPointPosition")},$.g.XA=function(t,e,i){var n=this.z0()?0:-9&(Number(t.j("missing"))||0);this.RD(t)||(n|=8);var s=this.tl().Kr(t.Gh(),t.ma(),this.yU());if(t.j("xRatio",s),n)this.uI(t,e,s);else for(var a=0;a<this.Vj.length;a++)n=this.Vj[a].call(this,t,e,i,n,s);t.j("missing",n)},$.g.Iha=function(t,e,i){var n=-9&(Number(t.j("missing"))||0);this.RD(t)||(n|=8);var s=this.tl(),a=t.j("ordinalIndex"),o=this.name(),r=s.Kr(o,a,0);if(s=s.Kr(o,a,1),o=this.ya.g("barsPadding"),a=r+(s-r)*(this.ya.g("barGroupsPadding")/2*this.Pz+this.Pz/2+a*this.Pz*(1+o)),t.j("xRatio",a),n)this.uI(t,e,a);else for(r=0;r<this.Vj.length;r++)n=this.Vj[r].call(this,t,e,i,n,a);t.j("missing",n)},$.g.GS=function(t){return[this.ce(t.ma()),this,this.xc()]},$.g.aU=function(t){var e={},i=t.get("high")-t.get("low");return e["%Range"]={value:i,type:"number"},e["%Name"]={value:t.get("name"),type:"string"},e},$.g.p2=function(){return"string"},$.g.ym=function(t,e){var i=this.tl(),n=this.bb(),s={chart:{value:this.xc(),type:""},series:{value:this,type:""},xScale:{value:i,type:""},yScale:{value:n,type:""},index:{value:e.ma(),type:"number"},x:{value:e.Gh(),type:this.p2()},seriesName:{value:this.name(),type:"string"}};if(i&&$.D(i.Ma)&&(s.xScaleType={value:i.Ma(),type:"string"}),this.Ak()&&(s.size={value:e.get("size"),type:"number"}),hB(this)){if("both"==(i=this.error().mode())||"value"==i){var a=this.vs(!1);s.valueLowerError={value:a[0],type:"number"},s.valueUpperError={value:a[1],type:"number"}}"both"!=i&&"x"!=i||(a=this.vs(!0),s.xLowerError={value:a[0],type:"number"},s.xUpperError={value:a[1],type:"number"})}var o=this.Be();for(i=0;i<o.length;i++)s[a=o[i]]={value:e.get(a),type:"number"};if($.J(n,$.Mt)&&"none"!=n.Vz())for(n=["Change","PercentChange","RatioChange"],i=0;i<o.length;i++){a=o[i];for(var r=0;r<n.length;r++){var l=a+n[r];s[l]={value:e.j(l),type:"number"}}}return s},$.g.nG=function(){return $.vB(this,new $.Fw)},$.g.Rk=function(){return this.Qu||(this.Qu=new $.Fw),$.vB(this,this.Qu)},$.g.RC=function(t){this.YV||(this.YV=new $.Fw(void 0,void 0,[this,this.ya]));var e={series:{value:this,type:""},chart:{value:this.xc(),type:""},seriesName:{value:this.name(),type:"string"}};if(t)for(var i=0;i<t.length;i++)$.ra(e,t[i]);return this.YV.Li([this,this.ya]),$.ov(this.YV,e)},$.g.oG=function(t){var e=this.$(),i=e.j("x"),n=e.j(this.Ah.Ab),s=e.j(this.Ah.zb);return i=new $.I(i,Math.min(n,s),0,Math.abs(s-n)),this.sp()&&(i.left-=this.yu/2,i.width+=this.yu),this.Ak()&&(e=e.j("size"),i.left-=e,i.top-=e,i.width+=e+e,i.height+=e+e),this.g("isVertical")&&(e=i.left,i.left=i.top,i.top=e,e=i.height,i.height=i.width,i.width=e),$.Eo(i,t)},$.g.N0=function(t){var e=this.$(),i=e.j("x"),n=e.j(t);return $.p(n)||(n=e.get(t),$.p(n)?(this.gh()&&(n+=e.j("stackedZero")),n=this.Jp(n)):n=window.NaN),this.g("isVertical")?{x:n,y:i}:{x:i,y:n}},$.g.Bh=function(t,e){if(this.$().j("missing"))var i={x:window.NaN,y:window.NaN};else if((i=$.Ek(t,null))?i=this.oG(i):(i=this.N0(t),((0,window.isNaN)(i.x)||(0,window.isNaN)(i.y))&&(i=this.oG("center-top"))),e&&this.check($.tB)){var n=this.ya,s=this.ma();i.x+=n.QM(s,this.gh()),i.y-=n.RM(s,this.gh())}return{value:i}};var YH={};$.sq(YH,[[0,"color",$.Sq],[0,"xPointPosition",$.Bq],[0,"pointWidth",$.br],[0,"maxPointWidth",$.br],[0,"minPointLength",$.br],[0,"maxPointWidth",$.br],[0,"minPointLength",$.br],[0,"connectMissingPoints",$.Dq],[0,"displayNegative",$.Dq],[0,"stepDirection",function(t,e){return $.zk(Eda,t,e||"center")}],[0,"isVertical",$.Zq]]),$.U($.eB,YH),$.g=$.eB.prototype,$.g.La=function(t,e){return $.p(t)?$.p(e)?(this.kn[t.toLowerCase()]=e,this):this.kn[t.toLowerCase()]:this.kn},$.g.co=$.ia,$.g.Rg=function(t){return this.ya.Jv(),this.La(t)},$.g.F=function(){var t=$.eB.u.F.call(this);if(t.seriesType=this.kk(),t.clip=$.J(this.gg,$.I)?this.gg.F():this.gg,this.Ci&&(t.meta=this.j()),this.he&&(t.id=this.id()),this.Er&&(t.name=this.name()),this.Wq!=this.ma()&&(t.autoIndex=this.yh()),this.check(524288)){var e=this.Ua().F();$.Jc(e)||(t.tooltip=this.Ua().F()),t.legendItem=this.Ls().F()}return hB(this)&&(t.error=this.error().F()),$.Tq(this,YH,t),t.normal=this.ca.F(),t.hovered=this.za.F(),t.selected=this.Ea.F(),t.a11y=this.ut().F(),t},$.g.U=function(t,e){$.eB.u.U.call(this,t,e),this.id(t.id),this.yh(t.autoIndex),this.name(t.name),this.j(t.meta),this.clip(t.clip),this.ut(t.a11y),this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),this.Ea.ga(!!e,t.selected),$.Iq(this,YH,t),this.vC(t,!1,e)},$.g.R=function(){$.sd(this.nA,this.eD),this.check(4)||$.qd(this.Aa),$.sd(this.Rf,this.bf,this.ca,this.za,this.Ea,this.px,this.vp,this.Lv,this.Cu,this.$g,this.jl),this.px=this.vp=this.Cu=this.Lv=this.jl=this.$g=this.Fc=this.nA=this.Aa=this.ep=this.Ea=this.za=this.ca=null,delete this.Rf,delete this.ya,delete this.jf,delete this.iterator,delete this.oa,delete this.Nd,delete this.Pa,$.eB.u.R.call(this)};var ZH=$.eB.prototype;ZH.a11y=ZH.ut,ZH.getType=ZH.Ma,ZH.seriesType=ZH.kk,ZH.name=ZH.name,ZH.id=ZH.id,ZH.meta=ZH.j,ZH.getIndex=ZH.ma,ZH.yScale=ZH.bb,ZH.labels=ZH.labels,ZH.minLabels=ZH.th,ZH.maxLabels=ZH.sh,ZH.markers=ZH.Db,ZH.outlierMarkers=ZH.dl,ZH.normal=ZH.Qa,ZH.hovered=ZH.lb,ZH.selected=ZH.selected,ZH.tooltip=ZH.Ua,ZH.legendItem=ZH.Ls,ZH.clip=ZH.clip,ZH.error=ZH.error,ZH.transformX=ZH.Lr,ZH.transformY=ZH.Jp,ZH.getPixelBounds=ZH.ob,ZH.getPixelPointWidth=ZH.jH,ZH.getStat=ZH.Rg,ZH.rendering=ZH.hi,ZH.colorScale=ZH.kd,$.H(wB,$.Br),$.g=wB.prototype,$.g.reset=function(){return this.la=this.Sa.pd.data,wB.u.reset.call(this)},$.g.advance=function(){return this.i++,this.ag=this.la[this.i],this.f=void 0,!!this.la.length&&this.i<this.la.length},$.g.get=function(t){var e=void 0;if(this.ag)if(t in this.ag.data)e=this.ag.data[t];else{var i=this.ag.j.rawIndex;if(!this.f){if(!$.p(i))return this.ag.data[t]=e;this.f=this.view.Af(i)}this.ag.data[t]=e=this.view.Ul(i).dk(this.f,i,t)}return e},$.g.Hb=function(){return this.la.length},$.g.j=function(t,e){var i=1<arguments.length;if(!this.ag)return i?this:void 0;var n=this.ag.j;return i?(n[t]=e,this):n[t]};var $H=wB.prototype;$H.reset=$H.reset,$H.advance=$H.advance,$H.get=$H.get,$H.meta=$H.j,$H.getRowsCount=$H.Hb,$.H($.xB,$.eB),$.xB.prototype.sa=$.eB.prototype.sa,$.xB.prototype.ra=$.eB.prototype.ra;var aI={};$.sq(aI,[[0,"xMode",function(t){return $.zk(Gda,t,"ordinal")}]]),$.U($.xB,aI),$.g=$.xB.prototype,$.g.vC=function(t,e,i,n){$.xB.u.vC.call(this,t,e,i,n),this.ej(t.selectionMode)},$.g.my=function(t){return(($.p(t)&&$.J(this.Ra(),$.Qt)?$.St(this.Ra())[t]:this.Ra().sD())||this.Ra().vH()/this.$().Hb())*(this.g("isVertical")?this.fa.height:this.fa.width)},$.g.oH=function(){return[this.pd.uu,this.pd.tu]},$.g.Ra=function(t){if($.p(t)){if(t){if(t=$.jt(this.eb,t,null,15,null,this.zg,this)){var e=this.eb==t;this.eb=t,this.eb.da(e),e||this.B(1024,5)}}else this.eb&&(this.eb&&$.kr(this.eb,this.zg,this),this.eb=null,this.B(1024,5));return this}return this.eb||this.ya.Ra()},$.g.tl=function(){return this.Ra()},$.g.rr=function(t){return $.nx(this.state,t)},$.g.fk=function(){var t=this.state.fk();return t||this.eh()||"single"!=this.Xl()?t:$.mx(this.state,$.wo)?$.wo:$.mx(this.state,$.vo)?$.vo:$.gm},$.g.bX=function(){if(this.data().hd("state")){for(var t=this.cg(),e=[];t.advance();)"selected"==String(t.get("state")).toLowerCase()&&e.push(t.ma());e.length&&this.Ii(e)}$.xB.u.bX.call(this)},$.g.XN=function(t,e){if("auto"==this.labels().g("position")&&"continuous"==this.Ra().mode()){var i=e.value,n=i.x;i=i.y;var s=t.Rh();if(s&&s.text()){var a=s.Ta.width/2;s=this.Mx.cb();var o=this.Mx.tb(),r=n+a;return o>(a=n-a)&&r>o?n+=o-a:r>s&&a<s&&(n-=r-s),{value:{x:n,y:i}}}}return $.xB.u.XN.call(this,t,e)},$.g.kT=function(t){$.xB.u.kT.call(this,t);for(var e=t.jI(),i=0;i<e;i++){var n=t.be(i);if(n){var s=this.XN(n,n.jc());n.jc(s)}}t.W()},$.g.W=function(){return $.xB.u.W.call(this),DB(this,!0),this},$.g.Ge=function(t,e,i){var n,s=$.lB(this),a=e?this.cg():this.$(),o=a.ma();s.lg(a).Li([this.ce(o),this]),t=t||this.g("color")||"blue";var r=a.Gh();e=a.get("value");var l=$.p(a.get("name"))?a.get("name"):r;return a={x:{value:r,type:"date-time"},value:{value:e,type:"number"},index:{value:o,type:"number"},iterator:{value:a,type:""},autoColor:{value:t,type:""},chart:{value:this.ya,type:""},plot:{value:this.jf,type:""},series:{value:this,type:""},name:{value:l,type:"string"}},i=$.p(i)&&i,(o=this.kd())&&!i&&($.p(e)&&(n=o.Qq(e)),a.scaledColor={value:n,type:""},a.colorScale={value:o,type:""}),a.sourceColor={value:n||t,type:""},$.ov(s,a)},$.g.Yi=function(t){var e=$.lB(this),i=(t=t?this.cg():this.$()).ma();e.lg(t).Li([this.ce(i),this]);var n=this.Eh(),s=t.Gh(),a=t.get("value"),o=$.p(t.get("name"))?t.get("name"):s;return $.ov(e,{x:{value:s,type:"date-time"},value:{value:a,type:"number"},index:{value:i,type:"number"},iterator:{value:t,type:""},sourceHatchFill:{value:n,type:""},plot:{value:this.jf,type:""},chart:{value:this.ya,type:""},series:{value:this,type:""},name:{value:o,type:"string"}})},$.g.data=function(t,e){return $.p(t)?(this.qB!==t&&(this.qB=t,$.qd(this.gm),$.J(t,$.Cr)?this.ee=this.gm=t.Ui():this.ee=$.J(t,$.Mr)?this.gm=t.Yd():(this.gm=new $.Mr($.A(t)||$.z(t)?t:null,e)).Yd(),this.wG=this.ee,$.K(this.wG,this.dd,this),this.B(1536,85)),this):this.wG},$.g.dd=function(t){$.X(t,16)&&(t=327680,$.J(this.ya,$.wA)&&(t|=2097152),this.ya.B(t),this.B(1536,85))},$.g.cg=function(){return this.pd?new wB(this):this.data().$()},$.g.K1=function(t){return this.pd?(t=this.pd.data[t])?t.j.size:void 0:this.data().j(t,"size")},$.g.uU=function(t){return this.pd?(t=this.pd.data[t])?this.pd.zJ?t.j.stackedZero:0:void 0:this.data().j(t,"zero")},$.g.tU=function(t){return this.pd?(t=this.pd.data[t])?this.pd.zJ?t.j.stackedValue:t.data.value:void 0:this.data().j(t,"value")},$.g.SX=function(t,e,i){this.pd&&(t=(t=this.pd.data[t])&&t.j.rawIndex),this.data().set(t,e,i)},$.g.v1=function(t){this.vm||(this.vm=[]),$.A(t)||(t=[t]);for(var e=!1,i=0;i<t.length;i++)e=$.Ua(this.vm,t[i])||e;return e&&this.B(1024,5),e},$.g.lV=function(t){if(!this.vm)return!1;$.A(t)||(t=[t]);for(var e=!1,i=0;i<t.length;i++){var n=this.vm,s=$.Na(n,t[i],void 0);e=0<=s&&Ea(n,s)||e}return e&&this.B(1024,5),e},$.g.FM=function(){return(0,$.Wa)(this.vm||[],this.ce,this)},$.g.t3=function(t){this.vm?this.vm.length=0:this.vm=[];for(var e=this.$().Hb(),i=0;i<e;i++)this.vm.push(i);this.lV(t)},$.g.kV=function(){return!(!this.vm||!this.vm.length||(this.vm.length=0,this.B(1024,5),0))},$.g.kE=function(){return!this.pd||this.pd.N2},$.g.vO=function(){return!this.pd||this.pd.O2},$.g.UW=function(){return!this.pd||this.pd.P2},$.g.I4=function(){return!this.pd||this.pd.M2},$.g.gh=function(){return!this.pd||this.pd.zJ},$.g.iB=function(){return this.Ra().Ne()},$.g.RD=function(t){return t=t.ma(),"scatter"==this.g("xMode")&&(t=$.qo(this.pd.data[t].data.x),t=this.pd.Lp[t]),t>=this.pd.rj&&t<=this.pd.lastIndex},$.g.bU=function(t,e,i,n){var s,a=this.data(),o=a.$(),r=this.bb(),l=!1,h=!1,c=this.Ak(),u=[];this.eh()&&this.kt()&&u.push("zIndex"),c&&u.push("size"),this.check(256)&&u.push("outliers"),hB(this)&&(aB(this.Ra())&&(a.hd("xError")&&(u.push("xError"),l=!0),a.hd("xLowerError")&&(u.push("xLowerError"),l=!0),a.hd("xUpperError")&&(u.push("xUpperError"),l=!0)),aB(this.bb())&&(a.hd("valueError")&&(u.push("valueError"),h=!0),a.hd("valueLowerError")&&(u.push("valueLowerError"),h=!0),a.hd("valueUpperError")&&(u.push("valueUpperError"),h=!0))),$.J(r,$.Qt)&&(s=$.Tt(r))&&a.hd(s)&&u.push(s);var d=this.Ra();$.J(d,$.Qt)&&(s=$.Tt(d))&&a.hd(s)&&u.push(s);var p=this.oV();for(d=0;o.advance();){var g=i(o.get("x"));if(!n(g)){var f,b={};b.x=g,g=!1;var v=this.Be(),m=0;for(f=v.length;m<f;m++){s=v[m];var y=this.r4(o.get(s));g=g||r.zk(y),b[s]=y}for(m=0,f=u.length;m<f;m++)b[s=u[m]]=o.get(s);c&&(m=$.N(b.size=o.get("size")),(0,window.isNaN)(m)||0>m&&!this.g("displayNegative"))&&(g=!0),m={},g?m.missing=1:(m.missing=0,d++),m.rawIndex=o.ma(),m.ordinalIndex=d-1,b={data:b,j:m},this.XW(o,b,p),e(t,b)}}if(this.check($.dB)&&this.g("connectMissingPoints")&&d!==t.length)for(i=e=null,o=n=window.NaN,c=r=!1,u=0;u<t.length;u++)p=t.length-u-1,b=t[u],m=!!(g=t[p]).j.missing,b.j.missing?(r=!0,b.j.notMissingStart=e,b.j.notMissingStartIndex=n,e&&(e.j.connectsMissingPointsStart=!0)):((b.j.hasPreviousMissingFromStart=r)&&u&&(b.j.notMissingStartIndexForPreviousMissing=t[u-1].j.notMissingStartIndex),r=!1,e=b,n=u),m?(c=!0,g.j.notMissingEnd=i,g.j.notMissingEndIndex=o,i&&(i.j.connectsMissingPointsEnd=!0)):((g.j.hasPreviousMissingFromEnd=c)&&p<t.length-1&&(b.j.notMissingEndIndexForPreviousMissing=t[p+1].j.notMissingEndIndex),c=!1,i=g,o=p);return this.B(512),this.pd={data:t,X:this,cO:d,N2:this.check($.QG)&&(a.hd("normal")||a.hd("hovered")||a.hd("selected")||a.hd("label")||a.hd("hoverLabel")||a.hd("selectLabel")||a.hd("minLabel")||a.hd("hoverMinLabel")||a.hd("selectMinLabel")||a.hd("maxLabel")||a.hd("hoverMaxLabel")||a.hd("selectMaxLabel")),O2:this.check(4194304)&&(a.hd("normal")||a.hd("hovered")||a.hd("selected")||a.hd("marker")||a.hd("hoverMarker")||a.hd("selectMarker")),P2:this.check(256)&&(a.hd("outliers")||a.hd("normal")||a.hd("hovered")||a.hd("selected")||a.hd("outlierMarker")||a.hd("hoverOutlierMarker")||a.hd("selectOutlierMarker")),XU:l,Q2:h,M2:l||h}},$.g.oV=function(){return null},$.g.XW=function(){},$.g.r4=function(t){return t},$.g.qM=function(t,e){if(this.pd){var i=[],n="scatter"==this.g("xMode");if(this.pd.Lp)var s=this.pd.Lp[$.qo(t)],a=this.pd.Lp[$.qo(e)];else 0>(s=$.Oa(this.pd.data,(function(e){return t-e.data.x})))&&(s=~s),0>(a=$.Oa(this.pd.data,(function(t){return e-t.data.x})))&&(a=~a);if(!(0,window.isNaN)(s)&&!(0,window.isNaN)(a)){if(s>a){var o=s;s=a,a=o}if(n)for(o=this.pd.data,n=0;n<o.length;n++){var r=o[n],l=this.pd.Lp[$.qo(r.data.x)];l>=s&&l<=a&&i.push(r.j.rawIndex)}else for(a=Math.min(a,this.pd.data.length-1),n=s;n<=a;n++)i.push(n)}return i}return i=this.Ra(),(s=$.J(i,$.Qt))&&(t=i.Yv(t),e=i.Yv(e)),this.wG.qM(t,e,s)},$.g.pk=function(t,e){if(DB(this)){var i=this.$();if(8===i.j("missing"))return e;var n=i.j("shapes");return this.eh()&&(this.Rf.Mo(t,n),this.Rf.VB(t,n)),this.check(256)&&this.$L(i,t,!0),this.bf.aF(i,t),this.check(4194304)&&this.gq(i,t,!0),this.check($.QG)&&this.tf(i,t,!0),e}},$.g.wm=$.ia,$.g.ml=function(t){if(DB(this)){var e=this.$(),i=e.j("shapes");this.Rf.Mo(t,i),this.bf.aF(e,t),this.check(256)&&this.$L(e,t,!0)}},$.g.pq=$.ia,$.g.ej=function(t){return $.p(t)?((t=null===t?null:$.Bk(t))!=this.et&&(this.et=t),this):this.et},$.g.Xl=function(t){return $.p(t)?this:this.ya.gd().g("hoverMode")},$.g.Tj=function(t){return $.p(t)?this.$i(t):this.Zk(),this},$.g.Md=function(t){var e,i;return(e=!$.mx(this.state,$.vo))&&(e=!(this.state.fk()&$.vo)),e||!this.enabled()||(i=$.p(t)?t:this.state.Gc==$.gm?window.NaN:void 0,this.state.Vh($.vo,i)),this},$.g.$i=function(t){if(!this.enabled())return this;if($.A(t)){for(var e=$.sx(this.state,$.vo),i=0;i<e.length;i++)$.Aa(t,e[i])||this.state.Vh($.vo,e[i]);$.qx(this.state,t)}else $.ea(t)&&(this.Md(),$.qx(this.state,t));return this},$.g.Zk=function(){this.enabled()&&this.state.Lh($.vo)},$.g.select=function(t){return this.enabled()?($.p(t)?this.Ii(t):this.Gu(),this):this},$.g.ie=function(t){return this.enabled()?(e=$.p(t)?t:this.state.Gc==$.gm?window.NaN:void 0,this.state.Vh($.wo,e),this):this;var e},$.g.Ii=function(t,e){return $.EB(this,t,!(!e||!e.shiftKey))},$.g.Gu=function(){this.enabled()&&this.state.Lh($.wo)},$.g.ig=function(t){t=$.xB.u.ig.call(this,t);var e=this.g("isVertical");if(this.eh())t.pointIndex=$.N($.so(t.domTarget).index);else if(this.Dka){var i=this.fa||$.kn(0,0,0,0),n=$.Zj(this.O().Ja()),s=t.clientX,a=t.clientY;if(e){var o=a,r=i.top+n.y+i.height;i=-i.height}else o=s,r=i.left+n.x,i=i.width;if(i=this.Ra().Mc((o-r)/i),r=!!this.ya.g("categorizedBySeries"),this.ya&&r&&!this.eh()){r=this.Ra();var l=this.name(),h=r.Kr(l,window.NaN,0);l=r.Kr(l,window.NaN,1)-h;var c=this.ya.g("barsPadding"),u=this.ya.g("barGroupsPadding");for(c*=this.Pz,u*=this.Pz,r=this.pd.cO,l=(h+=l*(u-c)/2)+l*(this.Pz+c)*r,h=this.Qe(h,!0),l=(this.Qe(l,!0)-h)/r,r=h+(e?n.y:n.x),e=Math.floor((o-r)/l),o=-1,r=0;r<this.pd.data.length;r++)if(!(h=this.pd.data[r]).j.missing&&++o==e){i=h.data.x;break}}if(i=$.Wz(this,i),$.A(i)&&1<i.length){for(s-=n.x,n=a-n.y,a=this.$(),e=window.Infinity,o=-1,r=0;r<i.length;r++)if(a.select(i[r]))for(h=a.j("x"),l=this.Be(),c=0;c<l.length;c++)u=a.j(l[c]),(u=$.gn(h,u,s,n))<e&&(e=u,o=i[r]);i=o}0>i&&(i=window.NaN),t.pointIndex=i}return t},$.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},$.g.Tg=function(t){var e,i=t.type;switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":i="pointmousemove";break;case"mousedown":i="pointmousedown";break;case"mouseup":i="pointmouseup";break;case"click":case"touchstart":i="pointclick";break;case"dblclick":i="pointdblclick";break;default:return null}t.target!=this.Qa().dl()||(0,window.isNaN)(t.markerIndex)?"pointIndex"in t?e=t.pointIndex:"labelIndex"in t?e=t.labelIndex:"markerIndex"in t&&(e=t.markerIndex):e=$ca(this,t.markerIndex),e=$.N(e),t.pointIndex=e;var n=this.cg();return n.select(e)||n.reset(),{type:i,actualTarget:t.target,series:this,iterator:n,pointIndex:e,target:this,originalEvent:t,point:this.ce(e)}},$.g.ce=function(t){return this.Ak()?new GA(this,t):new $.FA(this,t)},$.g.F=function(){var t=$.xB.u.F.call(this);if($.Tq(this,aI,t),this.pd){for(var e=[],i=this.data(),n=new wB(this);n.advance();){var s=n.j("rawIndex");(0,window.isNaN)(s)?e.push({x:n.get("x")}):e.push(Fr(i,s))}t.data=e}else t.data=this.data().F();return $.p(this.ej())&&(t.selectionMode=this.ej()),t},$.g.U=function(t,e){$.xB.u.U.call(this,t,e),$.Iq(this,aI,t,e),"data"in t&&this.data(t.data||null),this.ej(t.selectionMode)},$.g.R=function(){$.qd(this.gm),delete this.wG,this.eb=this.pd=this.state=this.ee=this.gm=null,$.xB.u.R.call(this)};var bI=$.xB.prototype;bI.data=bI.data,bI.xScale=bI.Ra,bI.hover=bI.Tj,bI.unhover=bI.Md,bI.select=bI.select,bI.unselect=bI.ie,bI.selectionMode=bI.ej,bI.getPoint=bI.ce,bI.excludePoint=bI.v1,bI.includePoint=bI.lV,bI.keepOnlyPoints=bI.t3,bI.includeAllPoints=bI.kV,bI.getExcludedPoints=bI.FM,$.H($.GB,$.Y);var FB=1e6;$.GB.prototype.ra=$.Y.prototype.ra,$.GB.prototype.sa=464|$.Y.prototype.sa,$.GB.prototype.K=function(t){return this.aa||(this.aa=new RB(this),$.W(this,"thumbs",this.aa)),$.p(t)?(this.aa.N(t),this):this.aa};var cI=function(){function t(t){return function(e){var i=$.yo(e,null);return null===e?this.vf(t):null===i?this.g(t):i}}var e={};return $.sq(e,[[0,"height",t("height")],[0,"minHeight",t("minHeight")],[0,"maxHeight",t("maxHeight")],[0,"orientation",dr],[0,"inverted",$.Dq],[0,"autoHide",$.Dq],[1,"fill",$.Qq],[1,"selectedFill",$.Qq],[1,"outlineStroke",$.Pq],[0,"allowRangeChange",$.Dq]]),e}();$.U($.GB,cI),$.g=$.GB.prototype,$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(t){$.X(t,2)&&this.B(4,9)},$.g.Nb=function(){return"bottom"==this.g("orientation")||"top"==this.g("orientation")},$.g.remove=function(){this.Aa&&this.Aa.remove()},$.g.Oe=function(){return this.enabled()&&(!this.g("autoHide")||this.g("allowRangeChange")||0!=this.D||this.o!=FB)},$.g.W=function(){if(!this.zc())return this;if(this.I(256),!this.Oe())return this.remove(),this.B(2),this;if(this.pf())return this;if(this.Aa||(this.Aa=$.ok(),this.f=$.qk(),this.f.zIndex(100),this.b=$.qk(),this.b.zIndex(100),this.ba=this.Aa.rect(),this.ba.zIndex(1),this.dO=$.tk(),this.ba.clip(this.dO),this.G=this.Aa.rect(),this.G.zIndex(50),this.vB=$.tk(),this.G.clip(this.vB),this.P=this.Aa.path(),this.P.zIndex(99),$.ru(this,this.Aa,this.Iaa,this.bia),this.wc.wa(this.f,"mouseover",this.C6),this.wc.wa(this.f,"mouseout",this.B6),this.wc.Ce(this.f,"mousedown",this.ZE),this.wc.Ce(this.f,"touchstart",this.ZE),this.wc.wa(this.b,"mouseover",this.C6),this.wc.wa(this.b,"mouseout",this.B6),this.wc.Ce(this.b,"mousedown",this.ZE),this.wc.Ce(this.b,"touchstart",this.ZE),this.wc.Ce(this.G,"mousedown",this.ZE),this.wc.Ce(this.G,"touchstart",this.ZE),this.wc.wa(this.ba,"click",this.xia)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(128)&&(this.f.cursor(HB(this)),this.b.cursor(HB(this)),this.G.cursor(HB(this)),this.B(84),this.I(128)),this.J(4)&&(this.VP(),this.I(4)),this.J(64)){var t=(Math.max($.$b(this.g("outlineStroke")),5)-1)/2;if(this.Nb()){var e=this.fa.top;if(this.K().g("enabled"))t=e+this.fa.height/2,this.f.clear().moveTo(-4,t-6).lineTo(-2,t-8).lineTo(2,t-8).lineTo(4,t-6).lineTo(4,t+6).lineTo(2,t+8).lineTo(-2,t+8).lineTo(-4,t+6).close().moveTo(-1,t-5).lineTo(-1,t+5).moveTo(1,t-5).lineTo(1,t+5),this.b.clear().moveTo(-4,t-6).lineTo(-2,t-8).lineTo(2,t-8).lineTo(4,t-6).lineTo(4,t+6).lineTo(2,t+8).lineTo(-2,t+8).lineTo(-4,t+6).close().moveTo(-1,t-5).lineTo(-1,t+5).moveTo(1,t-5).lineTo(1,t+5);else{var i=e+this.fa.height;this.f.clear().moveTo(-t,e).lineTo(t,e).lineTo(t,i).lineTo(-t,i).close(),this.b.clear().moveTo(-t,e).lineTo(t,e).lineTo(t,i).lineTo(-t,i).close()}}else e=this.fa.left,this.K().g("enabled")?(t=e+this.fa.width/2,this.f.clear().moveTo(t-6,-4).lineTo(t-8,-2).lineTo(t-8,2).lineTo(t-6,4).lineTo(t+6,4).lineTo(t+8,2).lineTo(t+8,-2).lineTo(t+6,-4).close().moveTo(t-5,-1).lineTo(t+5,-1).moveTo(t-5,1).lineTo(t+5,1),this.b.clear().moveTo(t-6,-4).lineTo(t-8,-2).lineTo(t-8,2).lineTo(t-6,4).lineTo(t+6,4).lineTo(t+8,2).lineTo(t+8,-2).lineTo(t+6,-4).close().moveTo(t-5,-1).lineTo(t+5,-1).moveTo(t-5,1).lineTo(t+5,1)):(i=e+this.fa.height,this.f.clear().moveTo(e,-t).lineTo(e,t).lineTo(i,t).lineTo(i,-t).close(),this.b.clear().moveTo(e,-t).lineTo(e,t).lineTo(i,t).lineTo(i,-t).close());this.B(16),this.I(64)}if(this.J(16)){switch(this.ba.Qf(this.fa),this.G.Qf(this.fa),this.dO.shape(this.fa),t=this.g("fill"),this.ba.fill("none"==t?$.bm:t).stroke(null),t=this.g("selectedFill"),this.G.fill("none"==t?$.bm:t).stroke(null),this.P.stroke(this.g("outlineStroke")).fill(null),LB(this,this.f,this.fb),LB(this,this.b,this.Za),this.g("orientation")){case"top":t=this.fa,i=this.D,e=this.o,this.g("inverted")&&(i=FB-i,e=FB-e),i=t.left+i/FB*t.width;var n=t.left+e/FB*t.width;this.f.oc(1,0,0,1,i,0),this.b.oc(1,0,0,1,n,0),e=Math.min(i,n),i=Math.max(i,n),this.vB.shape(e,t.top,i-e,t.height),e=$.R(e,1),i=$.R(i,1),n=$.R(t.top,1);var s=$.R(t.top+t.height,1);this.P.clear().moveTo(t.left,n).lineTo(e,n).lineTo(e,s).lineTo(i,s).lineTo(i,n).lineTo(t.left+t.width,n);break;case"right":t=this.fa,e=this.D,i=this.o,this.g("inverted")||(e=FB-e,i=FB-i),e=t.top+e/FB*t.height,n=t.top+i/FB*t.height,this.f.oc(1,0,0,1,0,e),this.b.oc(1,0,0,1,0,n),i=Math.min(e,n),e=Math.max(e,n),this.vB.shape(t.left,i,t.width,e-i),this.P.clear().moveTo(t.left,t.top).lineTo(t.left,i).lineTo(t.left+t.width,i).lineTo(t.left+t.width,e).lineTo(t.left,e).lineTo(t.left,t.top+t.height);break;case"bottom":t=this.fa,i=this.D,e=this.o,this.g("inverted")&&(i=FB-i,e=FB-e),i=t.left+i/FB*t.width,n=t.left+e/FB*t.width,this.f.oc(1,0,0,1,i,0),this.b.oc(1,0,0,1,n,0),e=Math.min(i,n),i=Math.max(i,n),this.vB.shape(e,t.top,i-e,t.height),e=$.R(e,1),i=$.R(i,1),n=$.R(t.top,1),s=$.R(t.top+t.height,1),this.P.clear().moveTo(t.left,n).lineTo(e,n).lineTo(e,s).lineTo(i,s).lineTo(i,n).lineTo(t.left+t.width,n);break;case"left":t=this.fa,e=this.D,i=this.o,this.g("inverted")||(e=FB-e,i=FB-i),e=t.top+e/FB*t.height,n=t.top+i/FB*t.height,this.f.oc(1,0,0,1,0,e),this.b.oc(1,0,0,1,0,n),i=Math.min(e,n),e=Math.max(e,n),this.vB.shape(t.left,i,t.width,e-i),this.P.clear().moveTo(t.left+t.width,t.top).lineTo(t.left+t.width,i).lineTo(t.left,i).lineTo(t.left,e).lineTo(t.left+t.width,e).lineTo(t.left+t.width,t.top+t.height)}this.K().g("autoHide")||JB(this),this.I(16)}return this},$.g.yd=function(){var t=this.ja();return t=t?t.clone():$.kn(0,0,0,0),this.Oe()&&(this.J(4)&&(this.VP(),this.I(4)),this.Nb()?(t.height-=this.i.height,"top"==this.g("orientation")&&(t.top+=this.i.height)):(t.width-=this.i.width,"left"==this.g("orientation")&&(t.left+=this.i.width))),t},$.g.VP=function(){var t=this.ja(),e=this.Nb()?t.height:t.width,i=$.L(this.g("height"),e),n=$.L(this.g("maxHeight"),e),s=$.L(this.g("minHeight"),e);e=i,(0,window.isNaN)(s)||(e=Math.max(e,s)),(0,window.isNaN)(n)||(e=Math.min(i,n)),e=this.Nb()?this.padding().$j(e):this.padding().Lk(e),this.i.left=t.left,this.i.top=t.top,i=this.g("orientation"),this.Nb()?(this.i.width=t.width,this.i.height=e,"bottom"==i&&(this.i.top+=t.height-e)):(this.i.width=e,this.i.height=t.height,"right"==i&&(this.i.left+=t.width-e)),this.sb||this.Nb()?this.fa=this.padding().Ej(this.i):(e=this.padding(),"left"==i?(i=$.L(e.g("left"),this.i.width),t=$.L(e.g("top"),this.i.height),n=$.L(e.g("right"),this.i.width),e=$.L(e.g("bottom"),this.i.height)):(i=$.L(e.g("right"),this.i.width),t=$.L(e.g("bottom"),this.i.height),n=$.L(e.g("left"),this.i.width),e=$.L(e.g("top"),this.i.height)),this.fa.left=this.i.left+e,this.fa.top=this.i.top+i,this.fa.width=this.i.width-e-t,this.fa.height=this.i.height-i-n),this.B(80)},$.g.Iaa=function(t){t.Ju(),!$.to(this.Aa,t.relatedTarget)&&this.oh(t)&&(this.$a=!0,JB(this))},$.g.bia=function(t){t.Ju(),!$.to(this.Aa,t.relatedTarget)&&this.oh(t)&&(this.$a=!1,KB(this))},$.g.C6=function(t){t=t.target,$.J(t,$.Ag)&&(t==this.f?LB(this,this.f,this.fb=!0):t==this.b&&LB(this,this.b,this.Za=!0))},$.g.B6=function(t){t=t.target,$.J(t,$.Ag)&&(t==this.f?LB(this,this.f,this.fb=!1):t==this.b&&LB(this,this.b,this.Za=!1))},$.g.ZE=function(t){if($.J(t.currentTarget,$.ig)){var e,i=t.currentTarget;i!=this.f||this.Ba?i!=this.b||this.ea?i!=this.G||this.na||(this.na=e=new QB(this,this.G,!1)):this.ea=e=new QB(this,this.b,!0):this.Ba=e=new QB(this,this.f,!0),e&&(this.wc.wa(e,"start",this.Haa),this.wc.wa(e,"end",this.Gaa),e.lk(t.kf))}},$.g.xia=function(t){var e=$.Zj(this.Aa.Ja());t=this.Nb()?t.clientX-e.x:t.clientY-e.y,MB(this,"background-click","scrollerchangestart")&&(OB(this,!1,t),MB(this,"background-click","scrollerchangefinish"))},$.g.Haa=function(t){if(this.g("allowRangeChange")&&t.f!=this.na){t=HB(this);var e="thumb-drag"}else t=HB(this),e="selected-range-drag";return(e=MB(this,e,"scrollerchangestart"))&&(this.Ha++,this.f.cursor(null),this.b.cursor(null),this.G.cursor(null),$.uf(window.document.body,"cursor",t)),e},$.g.Gaa=function(t){this.Ha=Math.max(this.Ha-1,0),KB(this),this.f.cursor(HB(this)),this.b.cursor(HB(this)),this.G.cursor(HB(this)),$.uf(window.document.body,"cursor",""),t=this.g("allowRangeChange")&&t.f!=this.na?"thumb-drag":"selected-range-drag",MB(this,t,"scrollerchangefinish")},$.g.N3=function(t,e,i,n){return{type:t,startRatio:e,endRatio:i,source:n}},$.g.R=function(){$.qd(this.Aa),this.G=this.ba=this.P=this.b=this.f=this.Aa=null,$.qd(this.Ba),this.Ba=null,$.qd(this.ea),this.ea=null,$.qd(this.na),this.na=null,$.qd(this.aa),this.aa=null,$.qd(this.Wa),this.Wa=null,$.GB.u.R.call(this)},$.g.F=function(){var t=$.GB.u.F.call(this);return $.Tq(this,cI,t,"Scroller"),t.thumbs=this.K().F(),t},$.g.U=function(t,e){$.GB.u.U.call(this,t,e),$.Iq(this,cI,t,e),"thumbs"in t&&this.K().ga(!!e,t.thumbs)},$.H(QB,$.ag),$.g=QB.prototype,$.g.Faa=function(){$.p(this.Qj)&&($.ll.cancelAnimationFrame(this.Qj),this.rs(0))},$.g.ar=function(){this.i.Nb()?(this.deltaX=PB(this.i,this.b),this.deltaY=0):(this.deltaX=0,this.deltaY=PB(this.i,this.b))},$.g.ls=function(t,e){this.ba=this.i.Nb()?t:e,$.p(this.Qj)||(this.Qj=$.ll.requestAnimationFrame(this.rs))},$.g.VA=function(t){return this.i.Nb()?NB(this.i,this.b,t):0},$.g.xw=function(t){return this.i.Nb()?0:NB(this.i,this.b,t)},$.H(RB,$.V),$.Gq(RB,["fill","stroke"],"normal"),RB.prototype.B=function(t,e){return this.i.B(t,e)},RB.prototype.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},RB.prototype.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za};var dI={};$.sq(dI,[[0,"enabled",$.Cq],[0,"autoHide",$.Cq]]),$.U(RB,dI),$.g=RB.prototype,$.g.F=function(){var t={};return t.normal=this.Qa().F(),t.hovered=this.lb().F(),$.Tq(this,dI,t,"Scroller thumbs"),t},$.g.U=function(t,e){this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),$.Iq(this,dI,t)},$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.enabled(i.enabled),!0)},$.g.R=function(){$.sd(this.ca,this.za),this.za=this.ca=null,RB.u.R.call(this)},$.H(SB,$.GB),$.xu(SB,$.GB),SB.prototype.Jr=function(t,e){return $.IB(this,t,e),this},SB.prototype.ec=function(t){return $.p(t)?($.IB(this,t,this.o/FB),this):this.D/FB},SB.prototype.Sb=function(t){return $.p(t)?($.IB(this,this.D/FB,t),this):this.o/FB};var eI=$.GB.prototype;eI.thumbs=eI.K,eI=RB.prototype,eI.normal=eI.Qa,eI.hovered=eI.lb,eI=SB.prototype,$.E("anychart.standalones.scroller",(function(){var t=new SB;return t.N($.nm("standalones.scroller")),t})),eI.setRange=eI.Jr,eI.startRatio=eI.ec,eI.endRatio=eI.Sb,eI.parentBounds=eI.ja,eI.getRemainingBounds=eI.yd,eI.container=eI.O,eI.padding=eI.padding,eI.draw=eI.W,$.H($.TB,$.GB);var fI={};$.rq(fI,0,"position",(function(t,e){return $.zk(uda,t,e||"after-axes")})),$.U($.TB,fI),$.TB.prototype.F=function(){var t=$.TB.u.F.call(this);return $.Tq(this,fI,t),t},$.TB.prototype.U=function(t,e){$.TB.u.U.call(this,t,e),$.Iq(this,fI,t,e)},$.g=UB.prototype,$.g.BB=function(t,e){return t=$.Za($.N(t),0,1),(0,window.isNaN)(t)&&(t=this.i),e=$.Za($.N(e),0,1),(0,window.isNaN)(e)&&(e=this.b),this.f=null,this.i==t&&this.b==e||(this.i=t,this.b=e,this.pa.B(268435456,1)),this},$.g.W5=function(t,e,i){return this.f={start:t,end:e,scale:i},this.pa.B(268435456,1),this},$.g.V5=function(t,e,i){return this.f={count:$.P(t),scale:i,qfa:!!e},this.pa.B(268435456,1),this},$.g.Fz=function(){return VB(this),this.i},$.g.Ez=function(){return VB(this),this.b},$.g.wS=function(t){return $.p(t)?(t=!!t,this.o!=t&&(this.o=t),this):this.o},$.g.N=function(t){return $.p(t)&&((0,window.isNaN)(+t)?$.C(t)&&(this.wS(t.continuous),$.p(t.startValue)&&$.p(t.endValue)?this.W5(t.startValue,t.endValue,$.J(t.scale,Xs)?t.scale:void 0):$.p(t.pointsCount)?this.V5(t.pointsCount,t.fromEnd,$.J(t.scale,Xs)?t.scale:void 0):this.BB(t.startRatio,t.endRatio)):this.BB(0,1/Math.abs(+t||1))),this},$.g.F=function(){return{startRatio:this.Fz(),endRatio:this.Ez(),continuous:this.o}};var gI=UB.prototype;gI.setTo=gI.BB,gI.setToValues=gI.W5,gI.setToPointsCount=gI.V5,gI.getStartRatio=gI.Fz,gI.getEndRatio=gI.Ez,gI.continuous=gI.wS,$.H($.WB,$.wA);var hI=function(){var t={};return $.sq(t,[[0,"zAngle",function(t){return $.Za($.N(t),0,90)}],[0,"zAspect",function(t){return $.ea(t)?Math.max(t,0):t}],[0,"zDistribution",$.Dq],[0,"zPadding",function(t){return Math.max($.N(t),0)||0}]]),t}();$.U($.WB,hI),$.g=$.WB.prototype,$.g.sa=1879048192|$.wA.prototype.sa,$.g.Tq=function(t){return $.p(t)?(this.ka(),this.Uc.N(t),this.da(!0),this):this.Uc},$.g.Uq=function(t){return $.p(t)?(this.ka(),this.bg.N(t),this.da(!0),this):this.bg},$.g.Mp=function(t){return this.D||(this.D=new $.TB,this.D.kb(this),$.K(this.D,this.$Z,this),this.wc.wa(this.D,"scrollerchange",this.qK),this.wc.wa(this.D,"scrollerchangefinish",this.qK),this.B(536870916,1),$.W(this,"xScroller",this.D)),$.p(t)?(this.D.N(t),this):this.D},$.g.Ur=function(t){return this.G||(this.G=new $.TB,this.G.kb(this),$.K(this.G,this.$Z,this),this.wc.wa(this.G,"scrollerchange",this.qK),this.wc.wa(this.G,"scrollerchangefinish",this.qK),this.B(1073741828,1),$.W(this,"yScroller",this.G)),$.p(t)?(this.G.N(t),this):this.G},$.g.$Z=function(t){var e=t.target==this.Mp()?536870912:1073741824,i=1;$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.qK=function(t){var e=t.target==this.Mp()?this.Uc:this.bg;e.wS()^"scrollerchangefinish"==t.type&&(t.preventDefault(),this.ka(),e.BB(t.startRatio,t.endRatio),this.da(!0))},$.g.Gt=function(t,e){return new $.xB(this,this,t,e,!0)},$.g.Ss=function(t){return $.zk(xda,t,"line")},$.g.mD=function(t){return t=XB(this.Ur(),t),this.Dk=t.E5,t=XB(this.Mp(),t.A0),$.WB.u.mD.call(this,t.A0,t.E5)},$.g.S_=function(t,e){var i=YB(this,t,this.Mp(),e),n=this.Ur();return YB(this,i,n,this.Dk)},$.g.KR=function(t){if(this.J(268435456)){for(var e in this.mm){var i=this.Tq().Fz(),n=1/(this.Tq().Ez()-i);Ys(this.mm[e],n,i)}$.IB(this.Mp(),this.Tq().Fz(),this.Tq().Ez()),t||this.B(570687488)}},$.g.LR=function(t){if(this.J(268435456)){for(var e in this.pn){var i=this.Uq().Fz(),n=1/(this.Uq().Ez()-i);Ys(this.pn[e],n,i)}$.IB(this.Ur(),this.Uq().Fz(),this.Uq().Ez()),t||this.B(1107296256)}},$.g.Q_=function(){this.J(268435456)&&(this.KR(!0),this.LR(!0),this.B(1644167168))},$.g.pb=function(){$.WB.u.pb.call(this),this.I(268435456)},$.g.r2=function(){return this.Uc.Fz()},$.g.q2=function(){return this.Uc.Ez()},$.g.XT=function(){return 1610612736|$.WB.u.XT.call(this)},$.g.jR=function(){$.WB.u.jR.call(this),this.J(536870912)&&(this.Mp().O(this.Na),this.Mp().W(),this.I(536870912)),this.J(1073741824)&&(this.Ur().O(this.Na),this.Ur().W(),this.I(1073741824))},$.g.d6=function(t,e,i){var n=this.P1(e);return e=n.transform(i,0),i=n.transform(i,1),"selected"!=t||1>=Math.min(e,i)&&0<=Math.max(e,i)},$.g.P1=function(t){return t.tl()},$.g.ht=function(t,e,i){$.WB.u.ht.call(this,t,e,i),$.Iq(this,hI,t),"xScroller"in t&&this.Mp().ga(!!i,t.xScroller),"yScroller"in t&&this.Ur().ga(!!i,t.yScroller);var n=t.xZoom;$.C(n)&&($.ea(n.scale)||$.z(n.scale))?(i=n.scale,n.scale=e[n.scale],this.Tq(n),n.scale=i):this.Tq(n),t=t.yZoom,$.C(t)&&($.ea(t.scale)||$.z(t.scale))?(i=t.scale,t.scale=e[t.scale],this.Uq(t),t.scale=i):this.Uq(t)},$.g.F=function(){var t=$.WB.u.F.call(this);return $.Tq(this,hI,t),t.xScroller=this.Mp().F(),t.yScroller=this.Ur().F(),t.xZoom=this.Tq().F(),t.yZoom=this.Uq().F(),{chart:t}},$.g.R=function(){$.WB.u.R.call(this),$.sd(this.D,this.G),this.G=this.D=null},$.g=$.ZB.prototype,$.g.zs=ba(29),$.g.Yt=function(){return $.aC(this),this.b.concat()},$.g.Uj=function(){return 0==this.i},$.g.clear=function(){this.f={},this.i=this.b.length=0},$.g.remove=function(t){return!!$.$B(this.f,t)&&(delete this.f[t],this.i--,this.b.length>2*this.i&&$.aC(this),!0)},$.g.get=function(t,e){return $.$B(this.f,t)?this.f[t]:e},$.g.set=function(t,e){$.$B(this.f,t)||(this.i++,this.b.push(t)),this.f[t]=e},$.g.forEach=function(t,e){for(var i=this.Yt(),n=0;n<i.length;n++){var s=i[n],a=this.get(s);t.call(e,a,s,this)}},$.g.clone=function(){return new $.ZB(this)},$.H($.bC,Cz),$.bC.prototype.update=function(){for(var t=0;t<this.Wb.length;t++)this.Wb[t].update();this.Wb.length&&this.Wb[0].uG((0,$.Ln)())},$.H($.cC,$.V),$.g=$.cC.prototype,$.g.ra=9,$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t};var gea=$.cC.prototype,iI={};$.rq(iI,1,"stroke",$.Pq),$.rq(iI,1,"fill",$.Qq),gea.mR=iI,$.U($.cC,$.cC.prototype.mR),$.g=$.cC.prototype,$.g.content=function(t){return $.p(t)?(this.Qd!=t&&(this.b=$.J(t,$.ig)||$.J(t,$.Y)?this.Qd:this.gi,this.gi=this.Qd=t,this.ak||(this.ak=$.ok()),$.J(t,$.ig)?this.ak.hc(t):$.J(t,$.Y)?(t.ka(),t.O(this.ak)):(t=$.Xp(t))?(this.gi=t,t.ka(),t.O(this.ak)):this.gi=null,this.va(8)),this):this.Qd},$.g.ce=function(){var t=this.ya.ZT();return{x:t[0],y:t[1]}},$.g.rb=function(){var t=this.ya.L1();return t?t.clone():$.kn(0,0,0,0)},$.g.eG=function(){if(this.b){var t=this.b;$.J(t,$.ig)?(this.ak.Ja().gc("renderfinish",this.ya.kK,!1,this.ya),t.remove()):(t.ka(),$.J(t,$.Tu)?$.Zu(t)&&$.Zu(t).clear(t.ma()):$.J(t,$.ey)?$.fy(t)&&$.fy(t).clear(t.ma()):$.J(t,$.Y)&&(t.O(null),t.remove()),this.gi.gc("chartdraw",this.ya.kL,!1,this.ya),t.da(!1)),this.b=null}},$.g.U=function(t,e){$.cC.u.U.call(this,t,e),$.Iq(this,this.mR,t,e),"content"in t&&this.content(t.content)},$.g.F=function(){var t={};return $.Tq(this,this.mR,t,"Map axes props"),this.gi&&$.J(this.gi,$.ux)&&(t.content=this.gi.RB()),t},$.g.R=function(){this.b=this.gi,this.eG(),this.gi=this.Qd=null,$.sd(this.ak),this.ak=null,$.cC.u.R.call(this)};var jI=$.cC.prototype;jI.content=jI.content,jI.getPoint=jI.ce,jI.getBounds=jI.rb,$.H($.dC,$.Fg),$.dC.prototype.clear=function(){for(var t;t=this.bc();)this.b.push(this.Cj(t-1));return this},$.dC.prototype.R=function(){for(var t=this.b.length;t--;)$.qd(this.b[t]);this.b=null,delete this.o,delete this.i,this.f=null,$.dC.u.R.call(this)},$.H(fC,$.JA),$.PG[1]=fC,$.g=fC.prototype,$.g.type=1,$.g.flags=225|$.dB,$.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},$.g.vea=function(t,e,i,n,s,a,o){a=t.j("nextZeroX");var r=t.j("nextZero"),l=t.j("nextValueX");t=t.j("nextValue"),(0,window.isNaN)(r)||(0,window.isNaN)(t)?(gC(this,this.b,e,i,n,s,o),this.f=[n,s]):(gC(this,this.b,l,t,a,r,o),this.f=[a,r])},$.g.wea=function(t,e,i,n,s,a,o){gC(this,this.b,e,i,n,s,o),this.i=e,this.Mi=s},$.g.Eea=function(t,e,i,n,s,a){var o=this.bd,r=this.nh(a,this.prevValue),l={};l[r.stroke]=!0,l[r.fill]=!0,l[r.qe]=!0,o=o.ed(this.Gc,l),l=t.j("prevZeroX");var h=t.j("prevZero"),c=t.j("prevValueX"),u=t.j("prevValue");(0,window.isNaN)(h)||(0,window.isNaN)(u)||(hC(this,o,c,u,h,a),this.f.push(l,h),this.Km(),gC(this,o,e,i,n,s,r),this.f=[n,s]),hC(this,o,e,i,s,a),this.f.push(n,s),e=t.j("nextZeroX"),i=t.j("nextZero"),n=t.j("nextValueX"),t=t.j("nextValue"),(0,window.isNaN)(i)||(0,window.isNaN)(t)||(this.Km(),gC(this,o,n,t,e,i,r),this.f=[e,i])},$.g.Fea=function(t,e,i,n,s,a){t=this.bd;var o=this.nh(a,this.prevValue),r={};r[o.stroke]=!0,r[o.fill]=!0,r[o.qe]=!0,t=t.ed(this.Gc,r),hC(this,t,e,i,s,a),this.i=n},$.g.Gd=function(t){fC.u.Gd.call(this,t),this.ec=!!this.X.g("closed"),this.fb=!1,this.Sb=this.ea=this.sb=this.D=window.NaN,this.X.L2()?(this.Za=this.vea,this.$a=this.Eea):(this.Za=this.wea,this.$a=this.Fea)},$.g.jA=function(t,e){(0,window.isNaN)(this.D)&&(this.fb=!0),fC.u.jA.call(this,t,e)},$.g.Qo=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.nh(i,this.prevValue),s={};s[n.stroke]=!0,s[n.fill]=!0,s[n.qe]=!0,this.b=e.ed(this.Gc,s),e=t.j("x"),s=t.j("value");var a=t.j("zeroX"),o=t.j("zero");this.Za(t,e,s,a,o,i,n),(0,window.isNaN)(this.D)&&(this.D=e,this.sb=s,this.ea=a,this.Sb=o),this.na=e,this.P=s,this.prevValue=i,this.Ka=o,this.K=n},$.g.ug=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n=t.j("x"),s=t.j("value"),a=t.j("zeroX"),o=t.j("zero");this.$a(t,n,s,a,o,e),this.na=n,this.P=s,this.prevValue=e,this.Ka=o,this.K=i},$.g.Km=function(){if(this.G){var t=this.b,e=this.K,i=t[e.fill];if(t=t[e.qe],this.f){for(e=this.f.length-1;0<=e;e-=2){var n=this.f[e-1],s=this.f[e];s=(s=$.R(s,1))<this.P?Math.floor(s):Math.ceil(s),$.IA(i,this.xa,n,s),$.IA(t,this.xa,n,s)}i.close(),t.close(),this.f=null}else(0,window.isNaN)(this.i)||(e=(e=$.R(this.Mi,1))<this.P?Math.floor(e):Math.ceil(e),$.IA(i,this.xa,this.i,e),$.IA(t,this.xa,this.i,this.Mi),i.close(),t.close())}},$.g.Rl=function(){this.ec&&!(0,window.isNaN)(this.D)&&(this.Ba||this.G&&!this.fb)&&(hC(this,this.b,this.D,this.sb,this.Ka,this.prevValue),this.X.gh()?this.f.push(this.ea,this.Sb):this.i=this.ea),fC.u.Rl.call(this)},$.H($.iC,$.JA),$.PG[4]=$.iC,$.g=$.iC.prototype,$.g.type=4,$.g.flags=514,$.g.Kh={circle:"circle",hatchFill:"circle",negative:"circle",negativeHatchFill:"circle"},$.g.ug=function(t,e){if(0>t.j("size"))var i="negative",n="negativeHatchFill";else i="circle",n="hatchFill";var s={};s[i]=!0,s[n]=!0,i=this.bd.ed(e,s),jC(this,t,i)},$.g.yt=function(t){var e=t.j("shapes");jC(this,t,e)},$.H(kC,$.JA),$.PG[5]=kC,$.g=kC.prototype,$.g.type=5,$.g.flags=263744|$.UG,$.g.Kh={rising:"path",risingHatchFill:"path",falling:"path",fallingHatchFill:"path"},$.g.Np=["open","high","low","close"],$.g.El="close",$.g.ug=function(t,e){var i=Number(t.get("open"))<Number(t.get("close"));if(i)var n="rising",s="risingHatchFill";else n="falling",s="fallingHatchFill";var a={};a[n]=!0,a[s]=!0,a=this.bd.ed(e,a);var o=t.j("x"),r=t.j("open"),l=t.j("high"),h=t.j("low"),c=t.j("close"),u=this.o/2;n=a[n],$.HA(n,this.xa,o,l),$.IA(n,this.xa,o,i?c:r),$.HA(n,this.xa,o-u,r),$.IA(n,this.xa,o+u,r,o+u,c,o-u,c,o-u,r),$.HA(n,this.xa,o,h),$.IA(n,this.xa,o,i?r:c),n=a[s],$.HA(n,this.xa,o,l),$.IA(n,this.xa,o,i?c:r),$.HA(n,this.xa,o-u,r),$.IA(n,this.xa,o+u,r,o+u,c,o-u,c,o-u,r),$.HA(n,this.xa,o,h),$.IA(n,this.xa,o,i?r:c)},$.H($.lC,$.JA),$.PG[6]=$.lC,$.g=$.lC.prototype,$.g.type=6,$.g.flags=263905,$.g.Kh={path:"path",hatchFill:"path"},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.path]=!0,a[s.qe]=!0,t.j("names",s),i=i.ed(e,a),this.EF(t,i[s.path],i[s.qe]),this.prevValue=n},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("names");for(e in i)i[e].clear();this.EF(t,i[n.path],i[n.qe])},$.g.EF=function(t,e,i){if(!t.j("skipDrawing")){var n=t.j("x"),s=t.j("zero");t=t.j("value");var a=(n-=this.o/2)+this.o,o=$.$b(e.stroke());this.wv&&(n=$.R(n,o),a=$.R(a,o),t=$.R(t,o),s=this.xa?(s=$.R(s,1))<t?Math.floor(s):Math.ceil(s):$.R(s,o)),$.HA(e,this.xa,n,t),$.IA(e,this.xa,a,t,a,s,n,s),e.close(),$.HA(i,this.xa,n,t),$.IA(i,this.xa,a,t,a,s,n,s),i.close()}},$.H(mC,$.JA),$.PG[19]=mC,$.g=mC.prototype,$.g.type=19,$.g.flags=34505,$.g.Kh={stroke:"path"},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.stroke]=!0,t.j("names",s),i=i.ed(e,a),nC(this,t,i,s),this.prevValue=n},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("names");for(e in i)i[e].clear();nC(this,t,i,n)},$.H($.oC,$.JA),$.PG[8]=$.oC,$.g=$.oC.prototype,$.g.type=8,$.g.flags=32969|$.dB,$.g.Kh={stroke:"path"},$.g.Gd=function(t){$.oC.u.Gd.call(this,t),this.ud=!!this.X.g("closed"),this.ec=!1,this.fb=this.ea=window.NaN},$.g.jA=function(){(0,window.isNaN)(this.ea)&&(this.ec=!0)},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n={};n[i.stroke]=!0,this.b=this.bd.ed(this.Gc,n),n=t.j("x"),t=t.j("value"),$.HA(this.b[i.stroke],this.xa,n,t),(0,window.isNaN)(this.ea)&&(this.ea=n,this.fb=t),this.na=n,this.P=t,this.prevValue=e,this.K=i},$.g.ug=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.nh(i,this.prevValue),s={};s[n.stroke]=!0,e=e.ed(this.Gc,s),s=t.j("x");var a=t.j("value");if(e!=this.b){var o=this.na,r=this.P,l=KA(this,i);this.ba&&l?(r=t.j("zero"),t=(s-this.na)*(r-this.P)/(a-this.P)+this.na):this.Ha&&!this.ba?t=o:(t=o+(s-o)/2,r+=(a-r)/2),$.IA(this.b[this.K.stroke],this.xa,t,r),this.b=e,$.HA(this.b[n.stroke],this.xa,t,r)}$.IA(this.b[n.stroke],this.xa,s,a),this.na=s,this.P=a,this.prevValue=i,this.K=n},$.g.Rl=function(){this.QZ(),$.oC.u.Rl.call(this)},$.g.QZ=function(){this.ud&&!(0,window.isNaN)(this.ea)&&(this.Ba||this.G&&!this.ec)&&$.IA(this.b[this.K.stroke],this.xa,this.ea,this.fb)},$.H($.pC,$.JA),$.PG[9]=$.pC,$.g=$.pC.prototype,$.g.type=9,$.g.flags=8832,$.g.Kh={path:"path",hatchFill:"path"},$.g.WB=function(t,e){var i=t.j("shapes"),n=t.j("names");i&&(i[n.path].clear(),i[n.qe].clear(),$.qC(this,t,e,i,n))},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.path]=!0,a[s.qe]=!0,t.j("names",s),i=i.ed(e,a),$.qC(this,t,e,i,s),this.prevValue=n},$.H(rC,$.JA),$.PG[10]=rC,$.g=rC.prototype,$.g.type=10,$.g.flags=263752|$.UG,$.g.Kh={rising:"path",falling:"path"},$.g.Np=["open","high","low","close"],$.g.El="close",$.g.ug=function(t,e){var i=Number(t.get("open"))<Number(t.get("close"))?"rising":"falling",n={};n[i]=!0;var s=this.bd.ed(e,n);n=t.j("x");var a=t.j("open"),o=t.j("high"),r=t.j("low"),l=t.j("close"),h=this.o/2;i=s[i],$.HA(i,this.xa,n,o),$.IA(i,this.xa,n,r),$.HA(i,this.xa,n-h,a),$.IA(i,this.xa,n,a),$.HA(i,this.xa,n+h,l),$.IA(i,this.xa,n,l)},$.H(sC,$.JA),$.PG[11]=sC,$.g=sC.prototype,$.g.type=11,$.g.flags=$.dB|$.fm|0,$.g.Kh={fill:"path",hatchFill:"path",lowStroke:"path",highStroke:"path"},$.g.Np=["low","high"],$.g.El="high",$.g.nh=function(t,e){var i={},n="fill",s="hatchFill";return t>e?this.qc&&(n="highFill",s="highHatchFill"):this.Uc&&(n="lowFill",s="lowHatchFill"),i.bV="highStroke",i.$V="lowStroke",i.fill=n,i.qe=s,i},$.g.Qo=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]),n=this.nh(n,i),(i={})[n.bV]=!0,i[n.$V]=!0,i=e.ed(this.Gc,i),this.P=i[n.bV],this.ea=i[n.$V],(i={})[n.fill]=!0,i[n.qe]=!0,this.b=e.ed(this.Gc,i),e=t.j("x"),i=t.j("high"),t=t.j("low");var s=this.b[n.fill],a=this.b[n.qe];$.HA(s,this.xa,e,t),$.IA(s,this.xa,e,i),$.HA(a,this.xa,e,t),$.IA(a,this.xa,e,i),$.HA(this.P,this.xa,e,i),this.f=[e,t,s,a],this.D=e,this.K=i,this.na=t,this.i=n},$.g.ug=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]),n=this.nh(n,i),(i={})[n.fill]=!0,i[n.qe]=!0,e=e.ed(this.Gc,i),i=t.j("x");var s=t.j("high"),a=t.j("low");if(this.b!=e){var o=vn(this.D,this.K,i,s,this.D,this.na,i,a);if(o){t=this.b[this.i.fill];var r=this.b[this.i.qe];$.IA(t,this.xa,o.x,o.y),$.IA(r,this.xa,o.x,o.y),this.f.push(o.x,o.y,t,r),this.b=e,t=this.b[n.fill],r=this.b[n.qe],$.HA(t,this.xa,o.x,o.y),$.HA(r,this.xa,o.x,o.y),this.f.push(o.x,o.y,t,r)}}t=this.b[n.fill],r=this.b[n.qe],$.IA(t,this.xa,i,s),$.IA(r,this.xa,i,s),$.IA(this.P,this.xa,i,s),this.f.push(i,a,t,r),this.D=i,this.K=s,this.na=a,this.i=n},$.g.Km=function(){if(this.G&&this.f){for(var t=!0,e=null,i=this.f.length-1;0<=i;i-=4){var n=this.f[i-3],s=this.f[i-2],a=this.f[i-1],o=this.f[i];e&&a!=e?($.HA(a,this.xa,n,s),$.HA(o,this.xa,n,s)):($.IA(a,this.xa,n,s),$.IA(o,this.xa,n,s)),t?($.HA(this.ea,this.xa,n,s),t=!1):$.IA(this.ea,this.xa,n,s),e=a}this.f=null}},$.H($.tC,$.JA),$.PG[12]=$.tC,$.g=$.tC.prototype,$.g.type=12,$.g.flags=263680|$.fm,$.g.Kh={path:"path",hatchFill:"path"},$.g.Np=["low","high"],$.g.El="high",$.g.ug=function(t,e){if(!t.j("skipDrawing")){var i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]),n=this.nh(n,i),(i={})[n.path]=!0,i[n.qe]=!0,t.j("name",n.path),i=this.bd.ed(e,i);var s=t.j("x"),a=t.j("high"),o=t.j("low"),r=(s-=this.o/2)+this.o,l=$.$b(i[n.path].stroke());this.wv&&(s=$.R(s,l),r=$.R(r,l)),a=$.R(a,l),o=$.R(o,l),l=i[n.path],$.HA(l,this.xa,s,o),$.IA(l,this.xa,r,o),$.IA(l,this.xa,r,a),$.IA(l,this.xa,s,a),l.close(),l=i[n.qe],$.HA(l,this.xa,s,o),$.IA(l,this.xa,r,o),$.IA(l,this.xa,r,a),$.IA(l,this.xa,s,a),l.close()}},uC.prototype.xa=function(t){return $.p(t)?(this.K=t,this):this.K},uC.prototype.aa=function(t){return $.p(t)?(this.i=t,this):this.i},uC.prototype.f=function(t){var e,i,n=arguments;for(e=0;e<this.Ca.length;e++){var s=this.Ca[e],a=0;for(i=n.length;a<i;a++)switch(n[a]){case"m":if(this.K)var o=n[a+2],r=n[a+1];else o=n[a+1],r=n[a+2];s.moveTo(o,r),a+=2;break;case"bs":if(this.K){o=n[a+2],r=n[a+1];var l=n[a+4],h=n[a+3]}else o=n[a+1],r=n[a+2],l=n[a+3],h=n[a+4];s.b?(s.moveTo(o,r),s.lineTo(l,h)):s.moveTo(l,h),a+=4;break;case"bc":this.K?(l=n[a+2],h=n[a+1]):(l=n[a+1],h=n[a+2]),s.b&&s.lineTo(l,h),a+=2;break;case"c":this.K?(o=n[a+2],r=n[a+1],l=n[a+4],h=n[a+3]):(o=n[a+1],r=n[a+2],l=n[a+3],h=n[a+4]),s.lK(o,r,l,h),a+=4;break;case"l":this.K?(o=n[a+2],r=n[a+1]):(o=n[a+1],r=n[a+2]),s.lineTo(o,r)}}},$.H(DC,$.JA),$.PG[13]=DC,$.g=DC.prototype,$.g.type=13,$.g.flags=$.dB|$.fm|0,$.g.Kh={fill:"path",hatchFill:"path",lowStroke:"path",highStroke:"path"},$.g.Np=["low","high"],$.g.nh=function(t,e){var i={},n="fill",s="hatchFill";return t>e?this.qc&&(n="highFill",s="highHatchFill"):this.Uc&&(n="lowFill",s="lowHatchFill"),i.bV="highStroke",i.$V="lowStroke",i.fill=n,i.qe=s,i},$.g.Gd=function(t){DC.u.Gd.call(this,t),this.i.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.i.Ha=t),this.D.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.D.Ha=t),this.K=[]},$.g.Qo=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]);var s={highStroke:!0,lowStroke:!0};s=e.ed(this.Gc,s),this.P=s.highStroke,this.ea=s.lowStroke;var a=this.nh(n,i);(s={})[a.fill]=!0,s[a.qe]=!0,e.ed(this.Gc,s),e=t.j("x"),s=t.j("high"),t=t.j("low"),BC(this.i,!1),this.i.Ca=[this.P],(s=zC(this.i,e,s))&&this.K.push.apply(this.K,s),s=this.X.$().current(),a=this.X.$().ma(),this.f=[e,t,n,i,s,a]},$.g.ug=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]);var s=this.nh(n,i),a={};a[s.fill]=!0,a[s.qe]=!0,e.ed(this.Gc,a),e=t.j("x"),s=t.j("high"),t=t.j("low"),(s=zC(this.i,e,s))&&this.K.push.apply(this.K,s),s=this.X.$().current(),a=this.X.$().ma(),this.f.push(e,t,n,i,s,a)},$.g.Km=function(){var t=this.bd;if(this.G){var e=AC(this.i);if(e&&this.K.push.apply(this.K,e),this.i.Ca=[this.ea],BC(this.i,!0),BC(this.D,!0),e=[],this.f){for(var i=!0,n=this.X.cg(),s=this.f.length-1;0<=s;s-=6){var a=this.f[s-2],o=this.f[s-3],r=this.f[s-4],l=this.f[s-5];n.Iu(this.f[s-1],this.f[s]),o=this.nh(o,a),a=t.ed(this.Gc,n.j("shapeNames")),zC(this.D,l,r),zC(this.i,l,r),i?(this.b=a,r=a[o.fill],l=a[o.qe],this.D.Ca=[r,l],i=!1):(r=s==this.f.length-7||5==s?6:12,r=$.Ca(this.K,this.K.length-r,r),$.qa($.Ca,e,void 0,0).apply(null,r),this.b!=a&&(r=[r=a[o.fill],l=a[o.qe]],(o=this.D).b=e.slice(),o.P=r,e.length=0,this.b=a))}$.qa($.Ca,this.D.Wh,void 0,0).apply(null,e),AC(this.D),AC(this.i),this.f=null}}},$.H(EC,$.JA),$.PG[14]=EC,$.g=EC.prototype,$.g.type=14,$.g.flags=$.dB|$.fm|131072,$.g.Kh={fill:"path",hatchFill:"path",highStroke:"path",lowStroke:"path"},$.g.Np=["low","high"],$.g.El="high",$.g.Gd=function(t){EC.u.Gd.call(this,t),this.P=this.X.g("stepDirection")||"center"},$.g.Qo=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("high");t=t.j("low"),$.HA(e.fill,this.xa,i,t),$.IA(e.fill,this.xa,i,n),$.HA(e.hatchFill,this.xa,i,t),$.IA(e.hatchFill,this.xa,i,n),$.HA(e.highStroke,this.xa,i,n),this.D=i,this.i=n,this.f=[i,t]},$.g.ug=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("high");t=t.j("low");var s=e.fill,a=e.hatchFill;switch(e=e.highStroke,this.P){case"forward":$.IA(s,this.xa,i,this.i),$.IA(a,this.xa,i,this.i),$.IA(e,this.xa,i,this.i);break;case"backward":$.IA(s,this.xa,this.D,n),$.IA(a,this.xa,this.D,n),$.IA(e,this.xa,this.D,n);break;default:var o=(i+this.D)/2;$.IA(s,this.xa,o,this.i,o,n),$.IA(a,this.xa,o,this.i,o,n),$.IA(e,this.xa,o,this.i,o,n)}$.IA(s,this.xa,i,n),$.IA(a,this.xa,i,n),$.IA(e,this.xa,i,n),this.D=i,this.i=n,this.f.push(i,t)},$.g.Km=function(){if(this.G&&this.f){var t=this.bd.ed(this.Gc),e=t.fill,i=t.hatchFill;t=t.lowStroke;for(var n=window.NaN,s=window.NaN,a=!0,o=this.f.length-1;0<=o;o-=2){var r=this.f[o-1],l=this.f[o];if(a)$.HA(t,this.xa,r,l),a=!1;else switch(this.P){case"forward":$.IA(e,this.xa,n,l),$.IA(i,this.xa,n,l),$.IA(t,this.xa,n,l);break;case"backward":$.IA(e,this.xa,r,s),$.IA(i,this.xa,r,s),$.IA(t,this.xa,r,s);break;default:n=(r+n)/2,$.IA(e,this.xa,n,s,n,l),$.IA(i,this.xa,n,s,n,l),$.IA(t,this.xa,n,s,n,l)}$.IA(e,this.xa,r,l),$.IA(i,this.xa,r,l),$.IA(t,this.xa,r,l),n=r,s=l}e.close(),i.close(),this.f=null}},$.H(FC,$.JA),$.PG[31]=FC,$.g=FC.prototype,$.g.type=31,$.g.flags=295433|$.fm,$.g.Kh={stroke:"path"},$.g.Gd=function(t){FC.u.Gd.call(this,t),this.wv=2<this.o},$.g.Np=["low","high"],$.g.El="high",$.g.ug=function(t,e){var i=this.X.Be(),n=t.get(i[1]),s=t.get(i[0]),a={};i="stroke",n>s?this.Hd&&(i="highStroke"):this.Od&&(i="lowStroke"),a[i]=!0,t.j("name",i),n=this.bd.ed(e,a),GC(this,t,n,i)},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("name");for(e in i)i[e].clear();GC(this,t,i,n)},$.H(HC,$.JA),$.PG[15]=HC,$.g=HC.prototype,$.g.type=15,$.g.flags=32969|$.dB,$.g.Kh={stroke:"path"},$.g.Gd=function(t){HC.u.Gd.call(this,t),this.f.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.f.Ha=t)},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n=t.j("x");t=t.j("value");var s={};s[i.stroke]=!0,this.b=this.bd.ed(this.Gc,s),this.f.Ca=[this.b[i.stroke]],BC(this.f,!1),zC(this.f,n,t),this.P=t,this.prevValue=e},$.g.ug=function(t){var e=t.get(this.X.Be()[0]),i=this.bd,n=this.nh(e,this.prevValue),s={};s[n.stroke]=!0,i=i.ed(this.Gc,s);var a=t.j("x");if(s=t.j("value"),zC(this.f,a,s),i!=this.b){var o;a=this.P;var r=KA(this,e);o=this.ba&&r?t.j("zero"):this.Ha&&!this.ba?a:"middle",t=this.f,n=[i[n.stroke]],t.b=o,t.P=n,this.b=i}this.P=s,this.prevValue=e},$.g.Km=function(){this.G&&AC(this.f)},$.g.R=function(){this.f.Ca=null,HC.u.R.call(this)},$.H(IC,$.JA),$.PG[16]=IC,$.g=IC.prototype,$.g.type=16,$.g.flags=225|$.dB,$.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},$.g.Gd=function(t){IC.u.Gd.call(this,t),this.i.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.i.Ha=t)},$.g.jA=function(t){if(this.Ba){if(this.X.gh()){var e=t.j("x"),i=t.j("zero");t=t.j("zeroMissing"),this.f.push(e,i,t)}}else this.Km()},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n=t.j("x"),s=t.j("zero"),a=t.j("zeroMissing");t=t.j("value"),s=Wo(s),t=Wo(t),BC(this.i,!1),this.i.aa(s),zC(this.i,n,t);var o={};o[i.stroke]=!0,o[i.fill]=!0,o[i.qe]=!0,this.b=this.bd.ed(this.Gc,o),(o=this.b[i.fill]).b=!0;var r=this.b[i.qe];r.b=!0,(i=this.b[i.stroke]).b=!1,this.i.Ca=[o,i,r],this.X.gh()?this.f=[n,s,a]:this.Mi=s,this.P=t,this.prevValue=e},$.g.ug=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.D=this.nh(i,this.prevValue),s=t.j("x"),a=t.j("zero"),o=t.j("zeroMissing");t=t.j("value"),a=Wo(a),t=Wo(t),zC(this.i,s,t);var r={};if(r[n.stroke]=!0,r[n.fill]=!0,r[n.qe]=!0,(e=e.ed(this.Gc,r))!=this.b){var l;r=this.P;var h=KA(this,i);l=this.ba&&h?a:this.Ha&&!this.ba?r:"middle",(r=e[n.fill]).b=!0,(h=e[n.qe]).b=!0;var c=e[n.stroke];c.b=!1,r=[r,c,h],(n=this.i).b=l,n.P=r,this.i.aa(a),this.b=e}this.X.gh()&&this.f.push(s,a,o),this.P=t,this.prevValue=i},$.g.Km=function(){if(this.G&&(AC(this.i),this.f)){var t=this.D,e={};e[t.stroke]=!0,e[t.fill]=!0,e[t.qe]=!0,this.b=this.bd.ed(this.Gc,e),(e=this.b[t.fill]).b=!1;var i=this.b[t.qe];i.b=!1,(t=this.b[t.stroke]).b=!1,this.i.Ca=[e,t,i],BC(this.i,!0);for(var n=t=window.NaN,s=!1,a=!0,o=this.f.length-1;0<=o;o-=3){var r=this.f[o-2],l=this.f[o-1],h=this.f[o];a?($.IA(e,this.xa,r,l),$.IA(i,this.xa,r,l),h||zC(this.i,r,l),a=!1):h&&s?($.IA(e,this.xa,r,l),$.IA(i,this.xa,r,l)):h?(AC(this.i),BC(this.i,!0),$.IA(e,this.xa,t,l,r,l),$.IA(i,this.xa,t,l,r,l)):(s&&($.IA(e,this.xa,r,n,r,l),$.IA(i,this.xa,r,n,r,l)),zC(this.i,r,l)),t=r,n=l,s=h}AC(this.i),this.f=null}},$.g.R=function(){this.i.Ca=null,IC.u.R.call(this)},$.H(JC,$.JA),$.PG[17]=JC,$.g=JC.prototype,$.g.type=17,$.g.flags=131297|$.dB,$.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},$.g.Gd=function(t){JC.u.Gd.call(this,t),this.P=this.X.g("stepDirection")||"center"},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.bd,n=this.nh(e,this.prevValue),s={};s[n.stroke]=!0,s[n.fill]=!0,s[n.qe]=!0,i=this.b=i.ed(this.Gc,s),s=t.j("x"),t.j("zeroX");var a=t.j("zero"),o=t.j("value");if(this.X.gh()){var r=t.j("nextZero");if(t=t.j("nextValue"),(0,window.isNaN)(r)||(0,window.isNaN)(t))LC(this,i,n,s,o,a),this.f=[s,a],this.i=o;else{var l=i.stroke;$.HA(l,this.xa,s,o),$.IA(l,this.xa,s,o),LC(this,i,n,s,t,r),this.f=[s,r],this.i=t}}else LC(this,i,n,s,o,a),this.ea=s,this.Mi=a,this.i=o;this.D=s,this.prevValue=e,this.Ka=a,this.K=n},$.g.ug=function(t){var e=t.get(this.X.Be()[0]),i=this.bd,n=this.nh(e,this.prevValue),s={};s[n.stroke]=!0,s[n.fill]=!0,s[n.qe]=!0,i=i.ed(this.Gc,s),s=t.j("x"),t.j("zeroX");var a=t.j("zero"),o=t.j("value");if(this.X.gh()){var r=t.j("prevZero"),l=t.j("prevValue"),h=t.j("nextZero");t=t.j("nextValue"),(0,window.isNaN)(r)||(0,window.isNaN)(l)?(MC(this,i,n,e,s,o,a),this.f.push(s,a)):(MC(this,i,n,e,s,l,a),this.f.push(s,r),this.D=s,this.i=l,this.Km(),LC(this,i,n,s,o,a),this.f=[s,a]),(0,window.isNaN)(h)||(0,window.isNaN)(t)?this.i=o:($.IA(i.stroke,this.xa,s,o),this.Km(),LC(this,i,n,s,t,h),this.f=[s,h],this.i=t)}else MC(this,i,n,e,s,o,a),this.ea=s,this.i=o;this.D=s,this.prevValue=e,this.Ka=a,this.K=n},$.g.Km=function(){if(this.G){var t=this.b,e=this.K,i=t[e.fill];if(t=t[e.qe],(0,window.isNaN)(this.ea)){if(this.f){var n=window.NaN;e=window.NaN;for(var s=this.f.length-1;0<=s;s-=2){var a=this.f[s-1],o=this.f[s];if(!(0,window.isNaN)(e))switch(this.P){case"forward":$.IA(i,this.xa,n,o),$.IA(t,this.xa,n,o);break;case"backward":$.IA(i,this.xa,a,e),$.IA(t,this.xa,a,e);break;default:n=(a+n)/2,$.IA(i,this.xa,n,e,n,o),$.IA(t,this.xa,n,e,n,o)}$.IA(i,this.xa,a,o),$.IA(t,this.xa,a,o),n=a,e=o}i.close(),t.close(),this.f=null}}else $.IA(i,this.xa,this.ea,this.Mi),$.IA(t,this.xa,this.ea,this.Mi),i.close(),t.close()}},$.H(NC,$.JA),$.PG[18]=NC,$.g=NC.prototype,$.g.type=18,$.g.flags=164041|$.dB,$.g.Kh={stroke:"path"},$.g.Gd=function(t){NC.u.Gd.call(this,t),this.P=this.X.g("stepDirection")||"center"},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n={};n[i.stroke]=!0,this.b=this.bd.ed(this.Gc,n),n=t.j("x"),t=t.j("value"),$.HA(this.b[i.stroke],this.xa,n,t),this.D=n,this.i=t,this.prevValue=e,this.K=i},$.g.ug=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.nh(i,this.prevValue),s={};s[n.stroke]=!0,e=e.ed(this.Gc,s),s=t.j("x");var a=t.j("value"),o=this.i;if(e!=this.b){var r=KA(this,i);this.ba&&r&&(o=t.j("zero")),t=OC(this,this.K,s,this.i,o),this.b=e,$.HA(this.b[n.stroke],this.xa,t,o)}OC(this,n,s,o,a),$.IA(this.b[n.stroke],this.xa,s,a),this.D=s,this.i=a,this.prevValue=i,this.K=n},$.H(PC,$.JA),$.PG[20]=PC,$.g=PC.prototype,$.g.type=20,$.g.flags=296681,$.g.Kh={stroke:"path"},$.g.Gd=function(t){PC.u.Gd.call(this,t),this.wv=2<this.o},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.stroke]=!0,t.j("names",s),i=i.ed(e,a),QC(this,t,i,s),this.prevValue=n},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("names");for(e in i)i[e].clear();QC(this,t,i,n)};var WC={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps-lock",27:"esc",32:"space",33:"pg-up",34:"pg-down",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:"semicolon",61:"equals",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",93:"context",96:"num-0",97:"num-1",98:"num-2",99:"num-3",100:"num-4",101:"num-5",102:"num-6",103:"num-7",104:"num-8",105:"num-9",106:"num-multiply",107:"num-plus",109:"num-minus",110:"num-period",111:"num-division",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",186:"semicolon",187:"equals",189:"dash",188:",",190:".",191:"/",192:"`",219:"open-square-bracket",220:"\\",221:"close-square-bracket",222:"single-quote",224:"win"},VC;$.H($.SC,$.qf);var bda=[27,112,113,114,115,116,117,118,119,120,121,122,123,19],cda="color date datetime datetime-local email month number password search tel text time url week".split(" ");$.g=$.SC.prototype,$.g.Al=function(t,e){XC(this.i,eda(arguments),t)},$.g.R=function(){$.SC.u.R.call(this),this.i={},$.Yd(this.b,"keydown",this.IU,!1,this),$.RC&&$.Yd(this.b,"keypress",this.J2,!1,this),$.Yd(this.b,"keyup",this.E2,!1,this),this.b=null},$.g.E2=function(t){$.gd&&(32==this.D&&32==t.keyCode&&t.preventDefault(),this.D=null),$.RC&&!this.ba&&$.RC&&t.ctrlKey&&t.altKey&&this.IU(t)},$.g.J2=function(t){32<t.keyCode&&$.RC&&t.ctrlKey&&t.altKey&&(this.ba=!0)},$.g.IU=function(t){t:{var e=t.keyCode;if(""!=t.key){var i=t.key;if("Control"==i||"Shift"==i||"Meta"==i||"AltGraph"==i){e=!1;break t}}else if(16==e||17==e||18==e){e=!1;break t}var n="TEXTAREA"==(i=t.target).tagName||"INPUT"==i.tagName||"BUTTON"==i.tagName||"SELECT"==i.tagName,s=!n&&(i.isContentEditable||i.ownerDocument&&"on"==i.ownerDocument.designMode);e=!((n||s)&&!this.ea[e]&&!this.G&&(s||(!this.aa||!(t.altKey||t.ctrlKey||t.metaKey))&&("INPUT"==i.tagName&&this.na[i.type]?13!=e:"INPUT"!=i.tagName&&"BUTTON"!=i.tagName||32==e)))}e&&("keydown"==t.type&&$.RC&&t.ctrlKey&&t.altKey?this.ba=!1:(e=Gp(t.keyCode),i=UC(t.key,e,(t.shiftKey?1:0)|(t.ctrlKey?2:0)|(t.altKey?4:0)|(t.metaKey?8:0)),(!(n=YC(this.f,i))||1500<=(0,$.Ln)()-this.o)&&(this.f=this.i,this.o=(0,$.Ln)()),(n=YC(this.f,i))&&n.next&&(this.f=n.next,this.o=(0,$.Ln)()),n&&(n.next?t.preventDefault():(this.f=this.i,this.o=(0,$.Ln)(),this.K&&t.preventDefault(),this.P&&t.stopPropagation(),i=n.b,n=t.target,s=this.dispatchEvent(new ZC("shortcut",i,n)),(s&=this.dispatchEvent(new ZC("shortcut_"+i,i,n)))||t.preventDefault(),$.gd&&(this.D=e)))))},$.H(ZC,wd),$.H($C,$.Br),$.g=$C.prototype,$.g.advance=function(){this.f=this.b[++this.i];var t=this.Hb();return!!t&&this.i<t},$.g.get=function(t){if(!(this.i>=this.Hb())&&$.p(t)&&this.f){if(this.f.j){var e=this.f.j("treemap_type");if(1==e||3==e||4==e)return;if(e=this.f.j(t))return e}if(this.f.get)return this.f.get(t)}},$.g.ma=function(){return this.i},$.g.Hb=function(){return this.b.length},$.g.j=function(t,e){if(this.f&&this.f.j)return 1<arguments.length?(this.f.j(t,e),this):this.f.j(t)},$.H(aD,$.EA),$.g=aD.prototype,$.g.ma=function(){return this.index},$.g.xc=function(){return this.ya},$.g.Zca=function(){return this.node},$.g.get=function(t){return this.node.get.apply(this.node,arguments)},$.g.set=function(t){return this.node.set.apply(this.node,arguments),this},$.g.lb=function(t){var e=$.tx(this.ya.state,$.vo,this.index);return $.p(t)&&e!=t?(t?this.ya.$i(this.index):this.ya.Md(this.index),this):e},$.g.selected=function(t){if(this.node.bc())return!!$.p(t)&&this;var e=$.tx(this.ya.state,$.wo,this.index);return $.p(t)&&e!=t?(t?this.ya.Ii(this.index):this.ya.ie(this.index),this):e},$.g.iy=function(){return!0};var kI=aD.prototype,lI;kI.getIndex=kI.ma,kI.getChart=kI.xc,kI.getNode=kI.Zca,kI.get=kI.get,kI.set=kI.set,kI.hovered=kI.lb,kI.selected=kI.selected,kI.exists=kI.iy,$.H($.bD,$.Bx),$.g=$.bD.prototype,$.g.eh=function(){return!0},$.g.Ak=function(){return!1},$.g.aj=function(){return!0},$.g.Ue=function(){return[this]},$.g.ra=16|$.bD.prototype.ra,$.g.sa=4112|$.Bx.prototype.sa,$.g.pk=$.ia,$.g.ml=$.ia,$.g.wm=$.ia,$.g.pq=$.ia,$.g.Xl=function(t){return $.p(t)?((t=$.Ak(t))!=this.K&&(this.K=t),this):this.K},$.g.ej=function(t){return $.p(t)?((t=null===t?null:$.Bk(t))!=this.et&&(this.et=t),this):this.et},$.g.qC=function(t){if(t){var e=this.$().f;t.tag={X:this,index:e.j("index"),node:e}}},$.g.ce=function(t){var e=null;return(t=this.ba[t])&&(e=new aD(this,t)),e},$.g.ig=function(t){t=$.Y.prototype.ig.call(this,t);var e=$.so(t.domTarget).index;if(!$.p(e)&&$.mx(this.state,$.vo)){var i=$.sx(this.state,$.vo);i.length&&(e=i[0])}return e=$.N(e),(0,window.isNaN)(e)||(t.pointIndex=e),t},$.g.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},$.g.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za},$.g.selected=function(t){return $.p(t)?(this.Ea.N(t),this):this.Ea},$.g.oq=function(){return[]},$.g.$i=function(t){if(!this.enabled())return this;if($.A(t)){for(var e=$.sx(this.state,$.vo),i=0;i<e.length;i++)$.Aa(t,e[i])||this.state.Vh($.vo,e[i]);$.qx(this.state,t)}else $.ea(t)&&(this.Md(),$.qx(this.state,t));return this},$.g.Md=function(t){var e,i;(e=$.mx(this.state,$.vo))||(e=!!(this.state.fk()&$.vo)),e&&this.enabled()&&(i=$.p(t)?t:this.state.Gc==$.gm?window.NaN:void 0,this.state.Vh($.vo,i))},$.g.Ii=function(t,e){var i=e&&e.shiftKey?void 0:e?$.vo:$.gm;return $.A(t)?(e||this.ie(),this.state.Lh($.wo,t,i)):$.ea(t)&&this.state.Lh($.wo,t,i),this},$.g.jr=function(t){this.zl&&(this.Md(),this.dispatchEvent(this.bl("hovered",{target:this},this.zl,!0)),this.zl=null),this.St();var e,i=null;if($.J(t,$.du)||$.J(t,$.$t))i=t;else if($.A(t)){if((e=this.data())&&e.bc()){e=e.xd(0);for(var n=0;n<t.length&&e;n++)e=e.xd(t[n]);e&&(i=e)}}else(e=this.data())&&e.bc()&&(i=e.Eo("id",t)[0]);this.IE(i)},$.g.data=function(t,e){return $.p(t)?($.J(t,$.au)||$.J(t,$.Yt)?t!=this.la&&(this.la&&$.kr(this.la,this.dd,this),this.la=t,$.K(this.la,this.dd,this)):(this.la&&$.kr(this.la,this.dd,this),this.la=new $.au(t,e),$.K(this.la,this.dd,this)),this.B(4352,1),this):this.la},$.g.dd=function(t){$.X(t,16)&&this.B(4352,1)},$.g.$=function(){return this.sd||this.Ec()},$.g.Ec=function(){return this.sd=new $C(this.Uc)},$.g.Zj=function(t,e){return $.qu(this.data(),e)},$.g.F=function(){var t=$.bD.u.F.call(this),e=this.data();e&&(t.treeData=e.xB());var i=[];if(e=this.uA())for(var n,s=1;s<e.length;s++)n=e[s-1].node,i[s-1]=n.Kf(e[s].node);return i.length&&(t.drillTo=i),t.normal=this.ca.F(),t.hovered=this.za.F(),t.selected=this.Ea.F(),t},$.g.U=function(t,e){$.bD.u.U.call(this,t,e),"treeData"in t&&this.data($.cu(t.treeData)),"drillTo"in t&&this.jr(t.drillTo),this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),this.Ea.ga(!!e,t.selected)},$.ja($.dD);var hea={button:"pressed",checkbox:"checked",menuitem:"selected",menuitemcheckbox:"checked",menuitemradio:"checked",radio:"checked",tab:"selected",treeitem:"selected"},rD;if($.g=$.dD.prototype,$.g.zH=function(){},$.g.Ac=function(t){return t.f.Ac("DIV",$.kD(this,t).join(" "),t.Qd)},$.g.Gn=function(t){return t},$.g.yH=ba(31),$.g.Xk=ba(34),$.g.CD=function(t){$.Ey(t)&&this.z2(t.Ya(),!0),t.isEnabled()&&this.AH(t,t.Oe())},$.g.GU=function(t,e){$.Sf(t,!e,!$.hd&&!$.yd)},$.g.z2=function(t,e){fD(t,this.Hh()+"-rtl",e)},$.g.w2=function(t){var e;return!(!$.hD(t,32)||!(e=t.Ya()))&&$.gf(e)&&$.jf(e)},$.g.AH=function(t,e){var i;if($.hD(t,32)&&(i=t.Ya())){if(!e&&$.iD(t,32)){try{i.blur()}catch(n){}$.iD(t,32)&&t.ZM(null)}($.gf(i)&&$.jf(i))!=e&&$.ff(i,e)}},$.g.Ji=function(t,e){$.Pf(t,e),t&&$.zy(t,"hidden",!e)},$.g.HU=function(t,e,i){var n=t.Ya();if(n){var s=this.$G(e);s&&fD(t,s,i),this.Tu(n,e,i)}},$.g.Tu=function(t,e,i){lI||(lI={1:"disabled",8:"selected",16:"checked",64:"expanded"}),e=lI[e];var n=t.getAttribute("role")||null;n&&(n=hea[n]||e,e="checked"==e||"selected"==e?n:e),e&&$.zy(t,e,i)},$.g.ew=ba(36),$.g.Hh=function(){return"anychart-control"},$.g.$G=function(t){return this.b||$.mD(this),this.b[t]},$.g.qH=ba(35),$.H($.nD,$.dD),$.ja($.nD),$.g=$.nD.prototype,$.g.zH=function(){return"button"},$.g.Tu=function(t,e,i){switch(e){case 8:case 16:$.zy(t,"pressed",i);break;default:$.nD.u.Tu.call(this,t,e,i)}},$.g.Ac=function(t){var e=$.nD.u.Ac.call(this,t);$.oD(e,t.gb);var i=t.vj();return i&&this.v2(e,i),$.hD(t,16)&&this.Tu(e,16,$.iD(t,16)),e},$.g.Xk=ba(33),$.g.vj=$.ia,$.g.v2=$.ia,$.g.Hh=function(){return"anychart-button"},rD={},$.pD={},$.H($.sD,$.By),$.g=$.sD.prototype,$.g.Qd=null,$.g.dc=0,$.g.Lu=39,$.g.mv=255,$.g.EJ=0,$.g.hj=!0,$.g.Cs=null,$.g.WU=!0,$.g.Ac=function(){var t=this.i.Ac(this);this.Ed=t,$.gD(this.i,t,this.lH()),this.i.GU(t,!1),this.Oe()||this.i.Ji(t,!1)},$.g.lH=function(){return null},$.g.AD=function(){return this.i.Gn(this.Ya())},$.g.xH=ba(18),$.g.pl=ba(20),$.g.Gg=function(){if($.sD.u.Gg.call(this),$.jD(this.i,this,this.Ed),this.i.CD(this),-2&this.Lu&&(this.WU&&tD(this,!0),$.hD(this,32))){var t=this.Ya();if(t){var e=this.Zl||(this.Zl=new $.Jp);e.WM(t),$.Dy(this).wa(e,"key",this.oo).wa(t,"focus",this.Xfa).wa(t,"blur",this.ZM)}}},$.g.Dh=function(){$.sD.u.Dh.call(this),this.Zl&&this.Zl.wH(),this.Oe()&&this.isEnabled()&&this.i.AH(this,!1)},$.g.R=function(){$.sD.u.R.call(this),this.Zl&&(this.Zl.ld(),delete this.Zl),delete this.i,this.K=this.Cs=this.Qd=null},$.g.AM=function(){var t=this.Qd;if(!t)return"";if(!$.z(t))if($.A(t))t=$.Wa(t,$.lf).join("");else{if(XD&&null!==t&&"innerText"in t)t=$.hc(t.innerText);else{var e=[];kf(t,e,!0),t=e.join("")}t=(t=t.replace(/ \xAD /g," ").replace(/\xAD/g,"")).replace(/\u200B/g,""),XD||(t=t.replace(/ +/g," "))," "!=t&&(t=t.replace(/^\s*/,""))}return $.lc(t)},$.g.Oe=function(){return this.hj},$.g.Ji=function(t,e){if(e||this.hj!=t&&this.dispatchEvent(t?"show":"hide")){var i=this.Ya();return i&&this.i.Ji(i,t),this.isEnabled()&&this.i.AH(this,t),this.hj=t,!0}return!1},$.g.isEnabled=function(){return!$.iD(this,1)},$.g.Dj=function(t){var e=this.getParent();e&&"function"==typeof e.isEnabled&&!e.isEnabled()||!zD(this,1,!t)||(t||($.BD(this,!1),this.rq(!1)),this.Oe()&&this.i.AH(this,t),AD(this,1,!t,!0))},$.g.rq=function(t){zD(this,2,t)&&AD(this,2,t)},$.g.uq=function(){return $.iD(this,4)},$.g.Ve=function(){return $.iD(this,8)},$.g.rJ=function(t){zD(this,8,t)&&AD(this,8,t)},$.g.Cl=function(t){zD(this,64,t)&&AD(this,64,t)},$.g.hn=function(t,e){if(this.xf&&$.iD(this,t)&&!e)throw Error("Component already rendered");!e&&$.iD(this,t)&&AD(this,t,!1),this.Lu=e?this.Lu|t:this.Lu&~t},$.g.po=function(t){!ED(t,this.Ya())&&this.dispatchEvent("enter")&&this.isEnabled()&&DD(this,2)&&this.rq(!0)},$.g.hg=function(t){!ED(t,this.Ya())&&this.dispatchEvent("leave")&&(DD(this,4)&&$.BD(this,!1),DD(this,2)&&this.rq(!1))},$.g.BH=$.ia,$.g.Sj=function(t){this.isEnabled()&&(DD(this,2)&&this.rq(!0),t.OA()&&(DD(this,4)&&$.BD(this,!0),this.i&&this.i.w2(this)&&this.Ya().focus())),t.OA()&&t.preventDefault()},$.g.tr=function(t){this.isEnabled()&&(DD(this,2)&&this.rq(!0),this.uq()&&this.Vs(t)&&DD(this,4)&&$.BD(this,!1))},$.g.D2=function(t){this.isEnabled()&&this.Vs(t)},$.g.Vs=function(t){DD(this,16)&&$.CD(this,!$.iD(this,16)),DD(this,8)&&this.rJ(!0),DD(this,64)&&this.Cl(!$.iD(this,64));var e=new wd("action",this);return t&&(e.altKey=t.altKey,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.i=t.i),this.dispatchEvent(e)},$.g.Xfa=function(){DD(this,32)&&zD(this,32,!0)&&AD(this,32,!0)},$.g.ZM=function(){DD(this,4)&&$.BD(this,!1),DD(this,32)&&zD(this,32,!1)&&AD(this,32,!1)},$.g.oo=function(t){return!!(this.Oe()&&this.isEnabled()&&this.EA(t))&&(t.preventDefault(),t.stopPropagation(),!0)},$.g.EA=function(t){return 13==t.keyCode&&this.Vs(t)},!$.D($.sD))throw Error("Invalid component class "+$.sD);if(!$.D($.dD))throw Error("Invalid renderer class "+$.dD);var iea=$.oa($.sD);rD[iea]=$.dD,$.qD("anychart-control",(function(){return new $.sD(null)})),$.H(yD,$.od);var FD=!$.hd||$.dd(9);yD.prototype.i=function(){this.b=!1},yD.prototype.o=function(){this.b=!0},yD.prototype.D=function(t){if(this.b)this.b=!1;else{var e=t.kf,i=e.button,n=e.type,s=GD(e,"mousedown");this.f.Sj(new $.Bd(s,t.currentTarget)),s=GD(e,"mouseup"),this.f.tr(new $.Bd(s,t.currentTarget)),FD||(e.button=i,e.type=n)}},yD.prototype.R=function(){this.f=null,yD.u.R.call(this)},$.H($.HD,$.nD),$.ja($.HD),$.g=$.HD.prototype,$.g.zH=function(){},$.g.Ac=function(t){return $.uD(t,!1),t.mv&=-256,t.hn(32,!1),t.f.Ac("BUTTON",{class:$.kD(this,t).join(" "),disabled:!t.isEnabled(),title:t.gb||"",value:t.vj()||""},t.AM()||"")},$.g.yH=ba(30),$.g.Xk=ba(32),$.g.CD=function(t){$.Dy(t).wa(t.Ya(),"click",t.Vs)},$.g.GU=$.ia,$.g.z2=$.ia,$.g.w2=function(t){return t.isEnabled()},$.g.AH=$.ia,$.g.HU=function(t,e,i){$.HD.u.HU.call(this,t,e,i),(t=t.Ya())&&1==e&&(t.disabled=i)},$.g.vj=function(t){return t.value},$.g.v2=function(t,e){t&&(t.value=e)},$.g.Tu=$.ia,$.H($.ID,$.sD),$.g=$.ID.prototype,$.g.vj=function(){return this.na},$.g.SX=function(t){this.na=t},$.g.R=function(){$.ID.u.R.call(this),delete this.na,delete this.gb},$.g.Gg=function(){if($.ID.u.Gg.call(this),$.hD(this,32)){var t=this.Ya();t&&$.Dy(this).wa(t,"keyup",this.EA)}},$.g.EA=function(t){return 13==t.keyCode&&"key"==t.type||32==t.keyCode&&"keyup"==t.type?this.Vs(t):32==t.keyCode},$.qD("anychart-button",(function(){return new $.ID(null)})),$.H($.LD,$.ID),$.LD.prototype.Ac=function(){$.LD.u.Ac.call(this),$.Ce(this.Ya(),{type:"button"}),MD(this)}}.call(this,$)),_.tree_data||(_.tree_data=1,function(t){}.call(this,$)),_.gantt_base||(_.gantt_base=1,function(t){var e,i,n,s;t.mI=function(){t.V.call(this),this.B(4294967295),t.T(this.ua,[["id"],["className"]])},t.nI=function(){t.V.call(this),this.Wa=new t.Hu,t.K(this.Wa,this.Pk,this),this.Xb=this.Y=null,this.I(4294967295),t.Eq(this.ua,0,0,9,1),t.T(this.ua,[["fill",0,1],["format",20,9]])},t.oI=function(){t.Y.call(this),this.ab=this.b=null,this.G=new t.mI,t.K(this.G,this.Raa,this),this.Ia=new t.yu,t.K(this.Ia,this.Paa,this),this.Wa=new t.Hu,t.K(this.Wa,this.fm,this),this.D=new t.nI,this.D.parent(this),t.K(this.D,this.Oga,this),this.Xb=this.Y=this.eb=null,this.Da=[],this.K=[],t.Eq(this.ua,20,20,9,1),t.T(this.ua,[["format",20,9],["stroke",16,1],["fill",16,1],["levelHeight",16,1],["drawTopLine",256,1],["drawRightLine",256,1],["drawBottomLine",256,1],["drawLeftLine",256,1]])},e=function(e,i,n){var s=e.Da[i]||null;if(!s&&n){e.Kv(),n=t.nm("defaultLabelFactory.format");var a=t.nm("defaultLabelFactory.positionFormatter");(s=new t.Pu).format(n),s.positionFormatter(a),s.df(),s.enabled(!0),s.O(e.Lf),e.Da[i]=s}return s},i=function(t,e,i){return(t=t.K[e])?t.nd(i):void 0},n=function(t,e,i,n,s,a){for(var o=0,r=a.length;o<r;o++){var l=a[o];if(n.width=null,n.height=null,i.measure(t.Am(e,l),void 0,n).width<s.width)return o}return r-1},s=function(e,i){t.V.call(this),this.Yk=e,this.Ad=i,t.Eq(this.ua,20,20,9,1),t.T(this.ua,[["format",20,9],["enabled",512,1],["stroke",16,1],["fill",16,1],["height",16,1]])},t.H(t.mI,t.V),t.mI.prototype.sa=23,t.mI.prototype.ra=1|t.V.prototype.ra;var a={};t.rq(a,0,"id",t.zq),t.rq(a,0,"className",t.zq),t.U(t.mI,a),t.g=t.mI.prototype,t.g.enabled=function(e){return t.p(e)?(this.Pa.enabled!=e&&(e=this.Pa.enabled=e,this.B(1,1),e?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},t.g.target=function(e){return t.p(e)?(this.b!=e&&(this.b=e,this.B(2)),this):this.b},t.g.Ya=function(){return this.Ud},t.g.Qf=function(t){this.Bb=t,this.B(4)},t.g.ph=function(t){return null!=this.Pa[t]},t.g.CM=function(){return 16},t.g.ys=function(){return 1},t.g.zc=function(){return!(this.pf()||this.md||(this.enabled()?this.target()?(this.I(1),0):(this.remove(),this.B(2),t.il(1),1):(this.J(1)&&(this.remove(),this.I(1),this.B(2)),1)))},t.g.W=function(){if(!this.zc())return this;if(this.Ud||(this.Ud=t.Me("DIV"),t.uf(this.Ud,{position:"absolute","pointer-events":"none"})),this.J(2)&&(this.b.appendChild(this.Ud),this.I(2)),this.J(16)){var e=this.g("id");t.p(e)&&this.Ud.setAttribute("id",e),e=this.g("className"),t.p(e)&&(this.Ud.className=e),this.I(16)}return this.J(4)&&(t.Cf(this.Ud,this.Bb.left,this.Bb.top),t.If(this.Ud,this.Bb.width,this.Bb.height),this.I(4)),this},t.g.remove=function(){this.Ud&&t.Xe(this.Ud)},t.g.Ie=function(e,i){return!(!t.da(i)&&null!==i||(e?this.oa.enabled=!!i:this.enabled(!!i),0))},t.g.F=function(){var e=t.mI.u.F.call(this);t.Tq(this,a,e,"Overlay ui element");var i=t.V.prototype.g.call(this,"enabled");return e.enabled=t.p(i)?i:null,e},t.g.U=function(e,i){t.mI.u.U.call(this,e,i),i?(t.Hq(this.oa,a,e),"enabled"in e&&(this.oa.enabled=e.enabled)):(t.Iq(this,a,e),this.enabled(e.enabled))},t.g.R=function(){t.mI.u.R.call(this)};var o=t.mI.prototype;o.getElement=o.Ya,o.enabled=o.enabled,t.H(t.nI,t.V),t.g=t.nI.prototype,t.g.ra=9|t.V.prototype.ra,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this),this.Wa.parent(this.Y.padding())),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(n|=8),t.X(e,32768)&&(i|=1,n|=9),this.B(i,n)};var r=t.vq();t.rq(r,0,"format",t.ar),t.U(t.nI,r);var l={};t.rq(l,1,"fill",t.Qq),t.U(t.nI,l),t.g=t.nI.prototype,t.g.padding=function(e,i,n,s){return t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.Pk=function(e){t.X(e,2)&&this.B(4,9)},t.g.U=function(e,i){i?(t.Hq(this.oa,l,e),t.Hq(this.oa,r,e)):(t.Iq(this,r,e),t.Iq(this,l,e)),this.padding().ga(!!i,e.padding)},t.g.F=function(){var e={};return e.padding=this.padding().F(),t.Tq(this,r,e,"Time line holidays settings text props"),t.Tq(this,l,e,"Time line holidays settings props"),e},t.g.R=function(){t.nI.u.R.call(this),t.qd(this.Wa),this.Wa=null};var h=t.nI.prototype;h.padding=h.padding,t.H(t.oI,t.wu),t.oI.prototype.sa=2e3|t.wu.prototype.sa,t.oI.prototype.ra=t.wu.prototype.ra;var c=t.vq();t.rq(c,0,"format",t.ar),t.U(t.oI,c);var u={};t.sq(u,[[1,"stroke",t.Pq],[1,"fill",t.Qq],[0,"levelHeight",t.br],[0,"drawTopLine",t.Dq],[0,"drawRightLine",t.Dq],[0,"drawBottomLine",t.Dq],[0,"drawLeftLine",t.Dq]]),t.U(t.oI,u),t.g=t.oI.prototype,t.g.Ra=function(e){return t.p(e)?(this.eb!=e&&(this.eb&&t.kr(this.eb,this.h_,this),(this.eb=e)&&t.K(this.eb,this.h_,this),this.B(128,1)),this):this.eb},t.g.MX=function(t){this.f=t,this.B(512,1)},t.g.level=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var a=e}else n=e,a=i;var o=this.K[n];return o||(this.K[n]=o=new s(this,n)),t.p(a)?(o.N(a),this):o},t.g.background=function(e){return t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.padding=function(e,i,n,s){return t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.HA=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.Qaa=function(e){return t.p(e)?(this.G.N(e),this.B(1024,1),this):this.G},t.g.ph=function(t){return null!=this.Pa[t]},t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this)),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(n|=8),t.X(e,32768)&&(i|=1,n|=9),this.B(i,n)},t.g.h_=function(e){var i=0;t.X(e,4)&&(i|=512),t.X(e,2)&&(i|=384),this.B(i,1)},t.g.Paa=function(){this.B(64,1)},t.g.fm=function(e){t.X(e,2)&&this.B(4,9)},t.g.Oga=function(){this.B(16,1)},t.g.Raa=function(){this.B(1024,1)},t.g.Am=function(e,i){var n=t.us(e,i);return t.ov(new t.Fw({value:{value:n,type:"string"},tickValue:{value:e,type:"number"},scale:{value:this.eb,type:""}}))},t.g.wi=function(e){var i=this.Da[e];e=this.ba[e]?this.ba[e]:this.ba[e]=this.na[e][this.Ba];for(var n=0,s=i.jI();n<s;n++){var a=i.be(n),o=a.Hf().tickValue;a.Hf(this.Am(o,e)),o=i.measure(a);var r=a.ic("hAlign");o.left="left"==r||"start"==r?a.D.left:"right"==r||"end"==r?a.D.cb()-o.width:a.D.left+(a.D.width-o.width)/2,r=a.ic("vAlign"),o.top="top"==r?a.D.top:"bottom"==r?a.D.Va()-o.height:a.D.top+(a.D.height-o.height)/2,o.left=Math.max(a.K.left,Math.min(o.left,a.K.cb()-o.width)),o.top=Math.max(a.K.top,Math.min(o.top,a.K.Va()-o.height)),a.jc({value:{x:o.left,y:o.top}})}t.Yu(i),i.W()},t.g.W=function(){if(this.zc()){var s,a=!1,o=!1;if(this.Kv(),this.J(2)&&(this.b.parent(this.O()),this.I(2)),this.J(8)&&(this.b.zIndex(this.zIndex()),this.Ia.zIndex(0),this.o.zIndex(1),this.Lf.zIndex(2),this.I(8)),this.J(4)&&(this.ab=this.ob(),t.Xo(this.ab,0),this.gg.shape(this.ab),this.ba.length=0,this.B(1472),this.I(4)),this.J(512)){var r=this.f.length,l=this.aa.length;this.ba.length=0,this.na.length=0,this.fb.length=0,this.Za.length=0;var h=this.i.length=0,u=0;for(r=Math.max(r,l),s=0;s<r;s++){var d=this.f[s],p=this.aa[s];l=this.ea[s];var g=this.Ka[s],f=this.Ha[s],b=i(this,s,"enabled");if(!d||!b&&t.p(b)){p&&p.clear().parent(null),l&&l.clear().parent(null),g&&g.clear().parent(null),f&&f.clear().parent(null);var v=e(this,s,!1)}else{var m=t.Zo(i(this,s,"height"),d.height,this.g("levelHeight"),null);if(null===m?(this.i[s]=null,u++):(this.i[s]=t.L(m,this.ab.height),h+=this.i[s]),"formats"in d)this.na[s]=d.formats;else{m=d.unit;var y=void 0;this.f[s+1]&&(y=this.f[s+1].unit)!=m&&(y=t.vp(y,-1)),this.na[s]=t.ts(t.rs(d.unit,y,"timeline"))}p?p.clear().parent(this.o):(p=this.o.path(),this.aa[s]=p),l?l.clear().parent(this.o):(l=this.o.path(),this.ea[s]=l),g?g.clear().parent(this.o):(g=this.o.path(),this.Ka[s]=g),f?f.clear().parent(this.o):(f=this.o.path(),this.Ha[s]=f),v=e(this,s,!0)}v&&v.clear()}this.P=(this.ab.height-h)/u,this.B(400),this.I(512)}if(this.J(16)){for(h=t.nm("defaultLabelFactory"),u={},t.Tq(this,c,u),u.format=this.g("format"),u.padding=this.padding(),m={},t.Tq(this.D,c,m),m.padding=this.D.padding(),r=this.f.length,s=0;s<r;s++)if(d=this.f[s],b=i(this,s,"enabled"),d&&(b||!t.p(b))){p=this.aa[s],l=this.ea[s],g=this.Ka[s],f=this.Ha[s];var S={};t.Sc(S,h),t.Sc(S,u),y={},t.Hq(y,c,d),"padding"in d&&(y.padding=d.padding),t.Sc(S,y),this.K[s]&&t.Hq(S,c,this.K[s].Pa),S.enabled=!0,S.width=null,S.height=null,this.fb[s]=S,S={},t.Sc(S,h),t.Sc(S,u),t.Sc(S,m),t.Sc(S,y),(y=d.holiday)&&(t.Hq(S,c,y),"padding"in y&&(S.padding=y.padding)),S.enabled=!0,S.width=null,S.height=null,this.Za[s]=S,S=t.Zo(i(this,s,"stroke"),d.stroke,this.g("stroke")),b=t.Zo(i(this,s,"fill"),d.fill,this.g("fill")),g.fill(null).stroke(S),p.fill(b).stroke(null),(p=t.Zo(i(this,s,"fill"),y&&y.fill,this.D.nd("fill")))||(p=b),f.fill(null).stroke(S),l.fill(p).stroke(null)}this.B(256),this.I(16)}if(this.J(64)&&(this.Ia.ja(this.ab),this.Ia.O(this.b),this.Ia.W(),this.I(64)),this.J(128)&&(a=!0,this.I(128)),this.J(256)&&(o=!0,this.I(256)),this.J(1024)&&(this.G.target(this.O().Ja().Tl()),this.G.Qf(this.ob()),this.G.W(),this.I(1024)),this.eb&&(a||o))for(a=(r=this.f.length)-1,s=this.ab.height+this.ab.top,h=!!this.g("drawTopLine"),u=!!this.g("drawRightLine"),m=!!this.g("drawBottomLine"),y=!!this.g("drawLeftLine"),S=0;S<r;S++)if(d=this.f[S],b=i(this,S,"enabled"),d&&(b||!t.p(b))){b=S==a;var w=null===this.i[S]?this.i[S]=this.P:this.i[S];p=this.aa[S].clear(),l=this.ea[S].clear(),g=this.Ka[S].clear(),f=this.Ha[S].clear(),o&&(v=this.Da[S]).clear();var x=(v=(d=this.eb.Fn(0,this.ab.width,d.unit,d.count)).length)-1,C=t.$b(g.stroke()),D=!S&&m?C/2:S?Math.ceil(C/2):0;s=t.R(s-D,C);var T=b&&h?C/2:b?0:Math.floor(C/2);for(w-=(S?D/2:D)+(b?T:T/2),w=t.R(s-w,C,!0),D=this.Ba=0;D<v;D++){var k=D==x,$=d[D],O=$.holiday,P=O?f:g;C=t.$b(P.stroke()),T=t.R(this.un($.start),C),C=t.R(this.un($.end),C);var L=Math.floor(T),G=Math.ceil(C),F=h||!b?Math.ceil(w):Math.floor(w),I=m&&!S?Math.floor(s):Math.ceil(s);y&&!D&&P.moveTo(T,F).lineTo(T,I),!u&&k||P.moveTo(C,F).lineTo(C,I),!h&&b||P.moveTo(L,w).lineTo(G,w),m&&!S&&P.moveTo(L,s).lineTo(G,s),(O?l:p).moveTo(L,I).lineTo(G,I).lineTo(G,F).lineTo(L,F).close(),o&&(k=S,O=O?this.Za[k]:this.fb[k],G=this.i[k],P=this.Da[k],L=t.kn(T,w,C-T,G),T=Math.max(T,this.ab.left),T=t.kn(T,w,Math.min(C,this.ab.cb())-T,G),C=P.add({tickValue:$.start},null,D),(G=O.padding)?(t.J(G,t.Hu)||(this.$a||(this.$a=new t.Hu),this.$a.N(O.padding),G=this.$a),C.K=G.Ej(T),C.D=G.Ej(L)):(C.K=T,C.D=L),O.anchor="left-top",C.Rh().clip(C.K),C.td(O),C.padding(0),this.ba[k]||this.Ba==this.na[k].length-1||(this.Ba=Math.max(this.Ba,n(this,$.start,P,O,C.D,this.na[k]))))}o&&this.wi(S),s=w}}},t.g.Kv=function(){this.b||(this.b=t.ok(),this.gg=t.tk(),this.b.clip(this.gg),this.o=this.b.Bd(),this.aa=[],this.ea=[],this.Ka=[],this.Ha=[],this.Lf=this.b.Bd(),this.i=[],this.fb=[],this.Za=[],this.na=[],this.ba=[])},t.g.un=function(t){return(this.eb.un?this.eb.un(t):this.eb.transform(t)*this.ab.width)+this.ab.left},t.g.remove=function(){this.b&&this.b.parent(null)},t.g.F=function(){var e=t.oI.u.F.call(this);return t.Tq(this,u,e,"Resource Timeline"),t.Tq(this,c,e,"Resource Timeline text settings"),e.background=this.Ia.F(),e.padding=this.Wa.F(),e.holidays=this.D.F(),e.overlay=this.G.F(),this.K.length&&(e.levels=(0,t.Wa)(this.K,(function(t){return t?t.F():{}}))),e},t.g.U=function(e,i){t.oI.u.U.call(this,e,i),i?(t.Hq(this.oa,u,e),t.Hq(this.oa,c,e)):(t.Iq(this,u,e),t.Iq(this,c,e)),"background"in e&&this.Ia.ga(!!i,e.background),"padding"in e&&this.Wa.ga(!!i,e.padding),"holidays"in e&&this.D.U(e.holidays,i),"overlay"in e&&this.G.ga(!!i,e.overlay);var n=e.levels;if(t.A(n))for(var s=0;s<n.length;s++)this.level(s,n[s])},t.g.R=function(){t.qd(this.b),this.b=null,t.qd(this.Ia),this.Ia=null,t.qd(this.Wa),this.Wa=null,t.qd(this.gg),this.gg=null,t.qd(this.D),this.D=null,t.sd(this.aa),this.aa=null,t.sd(this.ea),this.ea=null,t.sd(this.Da),this.Da=null,t.qd(this.G),this.G=null,t.sd(this.K),this.Lf=this.o=this.K=null,t.oI.u.R.call(this)},t.H(s,t.V),t.U(s,c);var d={};t.sq(d,[[0,"enabled",t.Dq],[1,"stroke",t.Pq],[1,"fill",t.Qq],[0,"height",t.br]]),t.U(s,d),t.g=s.prototype,t.g.B=function(t,e){return this.Yk.B(t,e)},t.g.vf=function(t){return"enabled"==t||this.Yk.g("height"==t?"levelHeight":t)},t.g.F=function(){var e=s.u.F.call(this);return t.Tq(this,d,e,"TimeLine Header Level",void 0,!0),t.Tq(this,c,e,"TimeLine Header Level text settings",void 0,!0),e},t.g.Ie=function(e,i){return!(!t.da(i)&&null!==i||(this.enabled(!!i),0))},t.g.U=function(e){if(s.u.U.call(this,e),t.Iq(this,d,e),t.C(e.labels)){var i=this.nd("enabled");t.Iq(this,c,e.labels),this.ta("enabled",i)}t.Iq(this,c,e)},t.g.R=function(){this.Yk=null,s.u.R.call(this)};var p=t.oI.prototype;p.background=p.background,p.padding=p.padding,p.holidays=p.HA,p.overlay=p.Qaa,p.level=p.level,p=s.prototype}.call(this,$)),_.gantt_part||(_.gantt_part=1,function(t){var e=function(t,i){return!!t.getParent()&&(t.getParent()==i||e(t.getParent(),i))},i=function(e){return!!e.flatten().useHtml&&!t.Uc()},n=function(t){var e=t.flatten(),n=null!=e.width;return(e=!i(t)&&n&&"left"!=e.hAlign)||(n=null!=(e=t.flatten()).width,e=!i(t)&&n&&"break-word"==e.wordWrap),e||(n=null!=(e=t.flatten()).width,e=!i(t)&&n&&e.wordBreak),e},s=function(){t.Y.call(this),this.K=this.P=this.G=this.ba=this.Vc=null,this.f="vertical",this.aa=this.sb=1,this.na=t.Ub("#e0e0e0",this.aa),this.Ba=t.Wb("#d5d5d5",this.aa),this.Ha=t.Ub("#d5d5d5",this.aa),this.Ka=t.Wb("#656565",this.aa),this.b=0,this.i=1,this.o=this.D=null,this.ea=!1,this.Za=-1,this.fb=!0,this.$a=5},a=function(e){return"svg"===t.kk?Math.floor(e)+.5:Math.floor(e)},o=function(e){if(t.p(i)){var i=+i;return!(0,window.isNaN)(i)&&e.b!=i&&0<=i&&1>i&&(i==e.i?(e.i=1,e.b=i):(e.b=Math.min(i,e.i),e.i=Math.max(i,e.i)),g(e),e.B(64,1),m(e,"api")),e}return e.b},r=function(e){if(t.p(i)){var i=+i;return!(0,window.isNaN)(i)&&e.i!=i&&0<i&&1>=i&&(i==e.b?(e.b=0,e.i=i):(e.i=Math.max(i,e.b),e.b=Math.min(i,e.b)),g(e),e.B(64,1),m(e,"api")),e}return e.i},l=function(e,i,n){if(i=+i,!(0,window.isNaN)(i)){i=t.Za(i,0,1);var s=e.i-e.b;i=t.Tm(t.Za(i+s,0,1),4),s=t.Tm(i-s,4),e.b==s&&e.i==i||(e.b=s,e.i=i,g(e),e.B(64,1),m(e,n||"api"))}return e},h=function(t,e){e=+e;var i=(0,window.isNaN)(e)?40:e;if(t.o&&i&&(i=+(i+=v(t)?t.o.top:t.o.left),t.o&&!(0,window.isNaN)(i))){var n=v(t);i!=(n?t.o.top:t.o.left)&&(n?t.o.top=i:t.o.left=i,b(t),f(t),t.B(64,1),m(t,"user_action"))}},c=function(e,i){e.na=t.Ul(e.na,i,!0),e.Ba=t.Ul(e.Ba,i,!1),e.Ha=t.Ul(e.Ha,i,!0),e.Ka=t.Ul(e.Ka,i,!1),e.B(16,1)},u=function(e){return e.G||(e.G=new t.Hv,e.G.Ku(16,!1),t.K(e.G,(function(){e.G.W()})),t.Jv(e.G,(function(){e.aQ()?h(e,40):e.scroll(.05,"user_action")}))),e.G},d=function(e){return e.P||(e.P=new t.Hv,e.P.Ku(16,!1),t.K(e.P,(function(){e.P.W()})),t.Jv(e.P,(function(){e.aQ()?h(e,-40):e.scroll(-.05,"user_action")}))),e.P},p=function(e,i){var n=v(e),s=e.K.Om(),a=e.K.rb(),o=!!i,r=n?s.top:s.left;s=n?s.height:s.width;var l=n?a.top:a.left,h=l+(n?a.height:a.width);10>=(n?a.height:a.width)?(n=e.i-e.b,e.b=(l-r)*(1-n)/(s-10),e.i=Math.min(e.b+n,1)):(e.b=t.Tm((l-r)/s,5),e.i=t.Tm((h-r)/s,5)),g(e),o||e.B(64,1),m(e)},g=function(e){if(e.D&&e.o)if(v(e)){var i=e.D.height,n=t.Tm((e.i-e.b)*i,1);e.o.top=t.Tm(e.b*i,1)+e.D.top,e.o.height=n}else i=e.D.width,n=t.Tm((e.i-e.b)*i,1),e.o.left=t.Tm(e.b*i,1)+e.D.left,e.o.width=n},f=function(e){if(e.D&&e.o){var i=v(e),n=i?e.o.top-e.D.top:e.o.left-e.D.left,s=i?n+e.o.height:n+e.o.width;i=i?e.D.height:e.D.width,e.b=t.Tm(n/i,4),e.i=t.Tm(s/i,4)}},b=function(t){var e=t.o;t=t.D,e.width>t.width&&(e.width=t.width),e.height>t.height&&(e.height=t.height),e.top+e.height>t.top+t.height&&(e.top-=e.top+e.height-(t.top+t.height)),e.left+e.width>t.left+t.width&&(e.left-=e.left+e.width-(t.left+t.width)),e.top<t.top&&(e.top=t.top),e.left<t.left&&(e.left=t.left)},v=function(t){return"horizontal"!=t.f.toLowerCase()},m=function(t,e){if(t.fb){0<=t.Za&&((0,window.clearTimeout)(t.Za),t.Za=-1);var i={type:"scrollchange",startRatio:t.b,endRatio:t.i,visibleBounds:t.o,source:e||"user_action"};t.Za=(0,window.setTimeout)((function(){t.dispatchEvent(i),t.Za=-1}),0)}},y=function(e){t.V.call(this),this.i=!!e,this.na={},this.Ba={},this.ea=[],this.la=null,this.D=[],this.Zr=[],this.b=[],this.Zh=this.te=null,this.Sb=1,this.o=this.f=window.NaN,this.Ka=this.P=0,this.qc=!1,this.G=0,this.lE=!1,this.Ha=null,this.ba=this.K=window.NaN,this.ec=0,this.aa=null,this.Za=20,this.$a=this.fb=window.NaN,this.iz=[],this.sb={}},S=function(e,i){return t.p(i)&&e.Za!=i?(e.Za=i,e.B(128,2),e):e.Za},w=function(e,i){return t.N(i.get("rowHeight"))||e.Za},x=function(e,i){for(var n=["actualStart","actualEnd","baselineStart","baselineEnd"],s=0;s<n.length;s++){var a=n[s],o=i.get(a);null!=o?(o=t.ps(o),i.j(a,null===o?window.NaN:+o)):i.j(a,window.NaN),L(e,i.j(a))}},C=function(e,i){var n=i.get("periods");if(e.i&&t.A(n)){for(var s=window.NaN,a=window.NaN,o=0,r=n.length;o<r;o++){var l=n[o],h=i.no("periods",o,"start"),c=t.ps(l.start);null===c?i.Jk("periods",o,"start",null):(c=+c,i.Jk("periods",o,"start",c),h=c),c=i.no("periods",o,"end");var u=t.ps(l.end);null===u?i.Jk("periods",o,"end",null):(u=+u,i.Jk("periods",o,"end",u),c=u),null===(u=t.ps(l.baselineStart))?i.Jk("periods",o,"baselineStart",null):(u=+u,i.Jk("periods",o,"baselineStart",u)),null===(l=t.ps(l.baselineEnd))?i.Jk("periods",o,"baselineEnd",null):(l=+l,i.Jk("periods",o,"baselineEnd",l)),s=$(Math.min,s,a,h,c),a=$(Math.max,s,a,h,c),L(e,h),L(e,c)}i.j("minPeriodDate",s),i.j("maxPeriodDate",a)}},D=function(e,i){var n,s=i.get("markers");for(n=0;s&&n<s.length;n++){var a=s[n];a=a.value,a=null===(a=t.ps(a))?null:+a,i.Jk("markers",n,"value",a),L(e,a)}},T=function(t,e){if(e){var i=e.uid;e.j("collapsed")?t.sb[i]=e:delete t.sb[i]}},k=function(e,i,n){i.j("depth",n).j("index",e.ec++),e.Zr.push(i);var s=i.get("progressValue");null!=s?(s=t.uo(s)?(0,window.parseFloat)(s)/100:+s,i.j("progressValue",s)):i.j("progressValue",null),s=i.get("collapsed"),t.da(s)&&i.j("collapsed",s),T(e,i),x(e,i),C(e,i),D(e,i);for(var a=s=0,o=window.NaN,r=window.NaN,l=window.NaN,h=window.NaN,c=0,u=i.bc();c<u;c++){var d=i.xd(c);if(d.bc()?k(e,d,n+1):(d.j("depth",n+1).j("index",e.ec++),x(e,d),C(e,d),D(e,d),e.Zr.push(d)),!e.i){var p=d.j("actualStart");p=t.ea(p)&&!(0,window.isNaN)(p)?p:d.j("autoStart")||window.NaN;var g=d.j("actualEnd");g=t.ea(g)&&!(0,window.isNaN)(g)?g:d.j("autoEnd")||p;var f=d.j("baselineStart"),b=t.ea(f)&&!(0,window.isNaN)(f)?f:d.j("autoBaselineStart")||window.NaN,v=d.j("baselineEnd");f=t.ea(v)&&!(0,window.isNaN)(v)?v:d.j("autoBaselineEnd")||f,null!=(v=d.get("progressValue"))&&(v=t.Ao(v)),v=null!=v?v:d.j("autoProgress")||0,d.j("progressValue",v),o=O(Math.min,o,r,p,g),r=O(Math.max,o,r,p,g),l=O(Math.min,l,h,b,f),h=O(Math.max,l,h,b,f),(0,window.isNaN)(p)||(0,window.isNaN)(g)||(s+=v*(d=g-p),a+=d)}}i.bc()&&!e.i&&(0!=a&&i.j("autoProgress",s/a),i.j("autoStart",o),i.j("autoEnd",r),i.j("autoBaselineStart",l),i.j("autoBaselineEnd",h))},$=function(t,e,i,n,s){var a=[];return P(e)&&a.push(e),P(i)&&a.push(i),P(n)&&a.push(n),P(s)&&a.push(s),a.length?t.apply(null,a):window.NaN},O=function(t,e,i,n,s){var a=[];return P(e)&&(a.push(e),P(i)&&a.push(i)),P(n)&&(a.push(n),P(s)&&a.push(s)),a.length?t.apply(null,a):window.NaN},P=function(e){return t.ea(e)&&!(0,window.isNaN)(e)},L=function(e,i){t.ea(i)&&!(0,window.isNaN)(i)&&((0,window.isNaN)(e.K)&&(e.K=i,e.ba=i),e.K=Math.min(i,e.K),e.ba=Math.max(i,e.ba))},G=function(e,i,n){if(!e.b.length)return 0;var s=e.b.length-1;return(i=Math.min(i,s))>(n=t.p(n)?Math.min(n,s):s)&&(i=(n+=i-=n)-i),e.b[n]-(e.b[i-1]||0)},F=function(e,i){var n=t.Na(e.b,i);return 0<=n?n:~n},I=function(e){if(e.D.length){e.f=(0,window.isNaN)(e.f)?e.fb:e.f,e.o=(0,window.isNaN)(e.o)?e.$a:e.o,e.fb=window.NaN,e.$a=window.NaN,(0,window.isNaN)(e.f)||(e.f=t.Za(e.f,0,e.D.length-1)),(0,window.isNaN)(e.o)||(e.o=t.Za(e.o,0,e.D.length-1));var i=G(e,0,e.b.length-1);e.G>=i?(e.f=0,e.P=0,e.o=e.D.length-1):((0,window.isNaN)(e.f)&&(0,window.isNaN)(e.o)&&(e.f=0),(0,window.isNaN)(e.f)?(i=G(e,0,e.o))<e.G?(e.f=0,e.P=0,e.o=F(e,e.G)):(e.f=F(e,e.b[e.o]-e.G),e.P=G(e,e.f,e.o)-e.G):(i=G(e,e.f)-e.P)<e.G?(e.f=F(e,e.b[e.b.length-1]-e.G),e.o=e.b.length-1,e.P=G(e,e.f,e.o)-e.G):e.o=F(e,(e.f?e.b[e.f-1]:0)+e.G+e.P))}else e.f=0,e.o=0,e.P=0;e.lE=!0,t.Op()||e.I(256)},E=function(e,i){return t.p(i)?(e.G!=i&&(e.G=i,e.B(256,2)),e):e.G},A=function(e,i){t.p(i)&&e.te!=i&&(e.te=i,e.B(256,2))},U=function(e,i){t.p(i)&&e.Zh!=i&&(e.Zh=i,e.B(256,2))},_=function(t){for(;t.iz.length;)(0,window.clearTimeout)(t.iz.pop())},j=function(t){return t.te&&t.te.Gb||t.Zh&&t.Zh.Gb},M=function(e){t.Op()?e.iz.push(t.Ep((function(){this.iz.push(t.Ep(this.T0,void 0,this)),this.iz.push(t.Ep(this.ifa,void 0,this))}),void 0,e)):e.T0()},N=function(e){return e.aa||(e.aa=new s,e.aa.U(t.zm("defaultScrollBar")),e.aa.we("vertical"),e.aa.wa("scrollchange",(function(t){var i=t.startRatio;t=t.endRatio;var n=e.b[e.b.length-1];e.ka(),i?1==t?e.Nj(e.b.length):(t=Math.round(i*n),t-=(i=F(e,t))?e.b[i-1]:0,e.Cg(i).km(t)):e.Cg(0).km(0),e.da(!0)}))),e.aa},B=function(e,i){if(t.p(i)){var n=Math.max(+i,0);if(e.b.length){var s=e.b[e.b.length-1];e.ka(),n>s-e.G?e.Nj(e.b.length-1):(n-=(s=F(e,n))?e.b[s-1]:0,e.Cg(s).km(n)),t.Op()&&I(e),e.da(!0)}else e.Ka=n,e.qc=!0;return e}return e.Ka},R=function(t,e){t.la.ka();var i=t.la.aw();for(i.bO(t.hha);i.advance();){var n=i.current();n.j("collapsed",e),T(t,n)}t.la.da(!0)},H=function(){t.Y.call(this),this.f="vertical",this.K=this.o=this.G=this.Vc=null,this.af=.5,this.ea=this.aa=this.P=this.D=0,this.Za=this.Ka=!1,this.$a=t.yf(t.Lp.body,"cursor"),this.b=3,this.ba=!0,this.i=t.Wb("#acbece"),this.na=t.Ub({keys:["0 #9ccae3","0.5 #a9dbf6","1 #e3f4fc"],angle:-90,opacity:1}),this.Sb=t.Ub("#cecece"),this.Ba=t.Ub("#ccd7e1 0.3"),this.ec=t.Wb(null),this.fb=t.Ub("#fff 0"),this.sb=t.Wb(null),this.Ha=!0},z=function(e){var i=0;t.p(i)&&(i=+i,(0,window.isNaN)(i)||(i=Math.abs(i),e.D!=i&&(e.aa=i,e.B(64,1))))},V=function(e,i,n){t.uf(t.Lp.body,"cursor",n?e.$a:i?"e-resize":"n-resize")},q=function(e){var i=Y(e);e.Vc.cursor(i?"e-resize":"n-resize");var n=e.ab;if(e.ba)var s=i?n.tb()+e.af*(n.zd()-e.b):n.tb(),a=i?n.Vb():n.Vb()+e.af*(n.qd()-e.b),o=i?n.tb()+e.D-3:n.tb(),r=i?n.Vb():n.Vb()+e.D-3,l=i?n.zd()-e.D-e.P+6:n.zd(),h=i?n.qd():n.qd()-e.D-e.P+6;else s=i?n.tb()+e.af*n.zd()-e.b/2:n.tb(),a=i?n.Vb():n.Vb()+e.af*n.qd()-e.b/2,o=i?n.tb()+e.D-3-e.b/2:n.tb(),r=i?n.Vb():n.Vb()+e.D-3-e.b/2,l=i?n.zd()-e.D-e.P+6+e.b:n.zd(),h=i?n.qd():n.qd()-e.D-e.P+6+e.b;var c=i?e.b:n.zd(),u=i?n.qd():e.b,d=i?s-3:n.tb(),p=i?n.Vb():a-3,g=i?e.b+6:n.zd();i=i?n.qd():e.b+6,o=new t.I(o,r,l,h),e.G.Ho(s).Io(a).Go(c).Fo(u),e.o.Ho(d).Io(p).Go(g).Fo(i).Om(o)},W=function(e){return e.o||(e.o=t.mk().stroke(e.sb).fill(e.fb),t.Ld(e.o,"dblclick",e.aia,!1,e),t.Ld(e.o,"mousemove",e.eba,!1,e),t.Ld(e.o,"mouseout",e.fba,!1,e),t.Ld(e.o,"start",e.dba,!1,e),t.Ld(e.o,"drag",e.ko,!1,e),t.Ld(e.o,"end",e.cba,!1,e)),e.o},K=function(e){return e.K||(e.K=t.mk().visible(!1)),e.K},Y=function(t){return"horizontal"!=t.f.toLowerCase()},X=function(){t.Y.call(this),this.o=this.b=this.f=this.Vc=null,this.af=window.NaN,this.aa=this.P=!1,this.ea=t.yf(t.Lp.body,"cursor"),this.i=t.Wb("1 #acbece"),this.ba=t.Wb("1 #acbece"),this.D=1,this.G=t.Ub("#ccd7e1 0.3"),this.na=t.Ub("#fff 0.00001"),this.K=!0},J=function(e,i){t.uf(t.Lp.body,"cursor",i?e.ea:"e-resize")},Z=function(e){e.Vc.cursor("e-resize");var i=e.ab.left+e.af+e.D/2,n=new t.I(e.ab.left-3,e.ab.top,e.ab.width+6,e.ab.height);e.f.clear().moveTo(i,e.ab.top).lineTo(i,e.ab.top+e.ab.height),i=e.ab.left+e.af-3;var s=e.ab.left+e.af+e.D+3;e.b.oc(1,0,0,1,0,0),e.b.clear().moveTo(i,e.ab.top).lineTo(s,e.ab.top).lineTo(s,e.ab.top+e.ab.height).lineTo(i,e.ab.top+e.ab.height).close().Om(n)},Q=function(e){return e.o||(e.o=t.qk(),e.o.fill(e.G).stroke(null)),e.o},tt=function(){t.V.call(this),this.Xb=null,t.T(this.ua,[["fill",0,2],["stroke",0,2],["placementStroke",0,2],["enabled",0,32768]])},et=function(){this.f=this.i=this.b=null},it=function(t,e){if(t.b!=e){if(t.b){var i=t.b.Pq();i.ka(),t.b.j("selected",!1),i.da(!1)}else t.i=null;e?((i=e.Pq()).ka(),e.j("selected",!0),i.da(!1)):t.i=null,t.b=e}},nt=function(t,e){return!!t.b&&(e.j("selected")?(it(t,e),!0):t.b.j("selected")?t.b==e:(t.b=null,t.i=null,!1))},st=function(t,e,i){return!(!nt(t,e)||null==t.i)&&t.b==e&&t.i===i},at=function(t,e,i,n,s,a,o,r){e&&i?(t.f={sfa:e,kla:i,tfa:n,lla:s,G1:a,I6:o,y0:r||"finish-start"},it(t,null),t.i=null):t.f=null},ot=function(e,i){t.Y.call(this),this.yo=null,this.Jy=t.yk(),this.Vg=null,this.Gb=this,this.pu=!0,this.controller=null,e&&t.J(e,y)?(this.controller=e,this.pu=!1):(this.controller=new y(i),t.K(this.controller,this.AW,this),this.bz=new et),this.fa=null,this.Tn=1,this.Za=null,this.Od=[],this.me=this.Sb=this.yg=this.ec=this.Uc=this.fb=this.Zq=this.bj=this.sb=this.Vc=this.ud=null,this.G=45,this.M6=this.f=0,this.$a=this.D=this.Ba=this.Ha=null,this.mp=[],this.Hd=[],this.ea=-1,this.Dk=this.dn=0,this.vi=this.$y=!1,this.oj=null,this.altKey=!1,this.Vn=null,this.bx=this.Fu=0,this.Cm=!0,this.Ap=this.gb=this.i=this.Vi=null,this.zo=!1,t.su(this,this,this.k_,this.Vaa,this.Uaa,this.k_,this.Taa),t.T(this.ua,[["backgroundFill",16,1],["rowFill",16,1,void 0,function(){this.ta("rowOddFill",null),this.ta("rowEvenFill",null)}],["rowStroke",80,1,void 0,function(){this.Tn=t.dp(this.g("rowStroke")),this.pu||this.controller.Tn(this.Tn)}],["rowEvenFill",16,1],["rowOddFill",16,1],["rowHoverFill",0,0],["rowSelectedFill",16,1]])},rt=function(t,e){var i=e||dt(t),n=i.BN&&i.AN&&i.ZF===i.$K;return i=i.BN&&!i.AN,!t.bc()&&(n||i)},lt=function(t,e){var i=e||dt(t),n=i.fI&&i.eI&&i.start==i.end;return i=i.fI&&!i.eI,!t.bc()&&(i||n)},ht=function(t,e){var i=e||dt(t);return i.PA||i.QA&&i.YR},ct=function(t,e){var i=e||dt(t);return(!!t.bc()||i.QD)&&i.fI&&i.eI},ut=function(e,i){var n=window.NaN;return t.ea(e)&&!(0,window.isNaN)(e)?n=e:t.ea(i)&&!(0,window.isNaN)(i)&&(n=i),n},dt=function(e){var i=e.j("actualStart"),n=e.j("autoStart"),s=e.j("actualEnd"),a=e.j("autoEnd"),o=e.j("baselineStart"),r=e.j("autoBaselineStart"),l=e.j("baselineEnd"),h=e.j("autoBaselineEnd"),c=e.DD("baselineStart")||e.DD("baselineEnd")||!(0,window.isNaN)(r)||!(0,window.isNaN)(h),u=e.j("progressValue"),d=e.j("autoProgress"),p=e.get("baselineProgressValue"),g=t.ea(p)||t.uo(p);return p=g?t.uo(p)?(0,window.parseFloat)(p)/100:Number(p):window.NaN,i=ut(i,n),s=ut(s,a),o=ut(o,r),l=ut(l,h),u=ut(u,d),d=e.j("minPeriodDate"),h=e.j("maxPeriodDate"),{start:i,end:s,ZF:o,$K:l,f0:p,Kd:u,fI:!(0,window.isNaN)(i),eI:!(0,window.isNaN)(s),BN:!(0,window.isNaN)(o),AN:!(0,window.isNaN)(l),bN:c,QA:!(0,window.isNaN)(i)&&!(0,window.isNaN)(s)&&i!=s,eha:!(0,window.isNaN)(i)&&!(0,window.isNaN)(s)&&i==s&&e.bc(),PA:t.ea(o)&&!(0,window.isNaN)(o)&&t.ea(l)&&!(0,window.isNaN)(l)&&o!==l,EN:!(0,window.isNaN)(u),YR:g,Cta:d,Bta:h,DN:!(0,window.isNaN)(d)&&!(0,window.isNaN)(h),QD:!!e.get("anychartIsLoadable")}},pt=function(e,i){var n=e.no("periods",i),s=n?n.start:void 0,a=n?n.end:void 0,o=null!=s&&!(0,window.isNaN)(s),r=null!=a&&!(0,window.isNaN)(a),l=n?n.baselineStart:void 0;return{start:s,end:a,EI:o?s:r?a:null,ZF:l,$K:n=n?n.baselineEnd:void 0,BN:!(0,window.isNaN)(l),AN:!(0,window.isNaN)(n),PA:t.ea(l)&&!(0,window.isNaN)(l)&&t.ea(n)&&!(0,window.isNaN)(n)&&l!==n,fI:o,eI:r,DN:o&&r,CN:!!(o^r)}},gt=function(t,e,i){if(t.controller.i)var n="periods";else(t=i||dt(e)).PA?n="baselines":lt(e,t)?n="milestones":ct(e,t)?n="grouping-tasks":(t=t||dt(e)).fI&&t.eI&&t.start!=t.end&&!e.bc()&&!t.PA&&(n="tasks");return n},ft=function(t,e){t.Gb=e,t.Gb!=t&&t.uf().parent(t.Gb.uf())},bt=function(e,i){i&&!e.cQ?(t.Ld(t.Lp,"mousemove",e.fT,!1,e),e.cQ=!0):(t.Yd(t.Lp,"mousemove",e.fT,!1,e),e.cQ=!1)},vt=function(e){return e.Vc||(e.Vc=t.ok(),t.ru(e,e.Vc,null,null,null,null,e.j_)),e.Vc},mt=function(e){return e.Zq||(e.Zq=t.ok(),e.Zq.zIndex(30)),e.Zq},yt=function(e){return e.ec||(e.ec=t.ok(),e.ec.zIndex(35)),e.ec},St=function(e){return e.fb||(e.fb=t.ok(),e.fb.zIndex(40)),e.fb},wt=function(e){return e.Uc||(e.Uc=t.ok(),e.Uc.zIndex(45)),e.Uc},xt=function(e){return e.Sb||(e.Sb=t.ok(),e.Sb.zIndex(50)),e.Sb},Ct=function(e){return e.me||(e.me=t.ok(),e.me.zIndex(60)),e.me},Dt=function(t){return t.Ha||(t.Ha=mt(t).path(),t.Ha.stroke(null).zIndex(1)),t.Ha},Tt=function(t){return t.Ba||(t.Ba=mt(t).path(),t.Ba.stroke(null).zIndex(1)),t.Ba},kt=function(t){return t.D||(t.D=mt(t).path(),t.D.stroke(null).zIndex(2)),t.D},$t=function(t,e){return t.Hd[e]||(t.Hd[e]=mt(t).path(),t.Hd[e].stroke(null).zIndex(1)),t.Hd[e]},Ot=function(t){return t.$a||(t.$a=mt(t).path(),t.$a.stroke(null).zIndex(3)),t.$a},Pt=function(t){return t.Za||(t.Za=mt(t).path(),t.Za.stroke(t.g("rowStroke")).zIndex(4)),t.Za},Lt=function(t,e){return t.Od[e]||(t.Od[e]=mt(t).path(),t.Od[e].stroke(t.g("rowStroke")).zIndex(4)),t.Od[e]},Gt=function(t){return t.yg||(t.yg=wt(t).path()),t.yg},Ft=function(t){return t.ud||(t.ud=mt(t).path(),t.ud.zIndex(40)),t.ud},It=function(e,i){if(!e)return t.Xl;var n=i+"|"+e+"|false",s=Zi[n];if(!s){switch(i){case 2:s=t.Zl;break;case 3:s=t.$l;break;default:s=t.am}Zi[n]=s=t.qa(Et,e,s,3==i,!1)}return s},Et=function(e,i,n,s,a,o,r,l,h,c,u){if(o=t.em(o),s&&o!=t.gm){var d=a.sc(e,o,i);if(n&&!0===d&&(d=i(a.Eh())),t.p(d)){if(!t.D(d))return d;if(n)return n=a.Yi(),i(d.call(n,n))}}return s=a.sc(e,0,i),n&&!0===s&&(s=i(a.Eh())),t.D(s)&&(n=n?a.Yi():a.Ge(e,r,l,h,c,u),s=i(s.call(n,n))),d&&(n=a.Ge(e,r,l,h),s=i(d.call(n,n))),s},At=function(e){t.eq.ui.ContextMenu&&e.Gb.contextMenu&&(e=e.Gb.contextMenu()).Oe()&&e.Lc()},Ut=function(e){if(!e.yo){var i=vt(e).ia();i&&(e.yo=new t.Ex(i),t.Ld(e.yo,"mousewheel",e.Oy,!1,e),t.Ld(t.ll,"unload",(function(){t.Yd(e.yo,"mousewheel",e.Oy,!1,this)}))),e.tq().wa("scrolling",(0,t.pa)(e.XS,e,!0))}},_t=function(e){e.Gb.bg||(e.Gb.bg=new Bt(e.Gb,t.Lp),t.Ld(e.Gb.bg,"key",(function(t){18==t.keyCode&&(this.altKey=!0),(46==t.keyCode||t.metaKey&&8==t.keyCode)&&this.AG(t)}),!1,e.Gb))},jt=function(t){var e=Gt(t);e.fill(t.uf().g("fill")),e.stroke(t.uf().g("stroke"))},Mt=function(t,e){if(e){var i=It("rowSelectedFill",1)(t,0,e);return Ot(t).fill(i),it(t.Gb.nk(),e),t.B(128,1),!0}return!1},Nt=function(e,i){t.ag.call(this,e.ia()),this.b=i,this.y=this.x=0,t.bg(this)},Bt=function(e,i,n){t.Jp.call(this,i,n),this.b=e},Rt=function(){t.sg.call(this),this.j={}},Ht=function(){t.Y.call(this),this.Ga("defaultButtonSettings"),this.dc=0,t.T(this.ua,en),this.VE={},this.ca=new t.my(this,tn,0,nn),this.za=new t.my(this,tn,1,nn),this.Ea=new t.my(this,tn,2,nn),this.VE[0]=this.ca,this.VE[1]=this.za,this.VE[2]=this.Ea;var e=this.VE[0],i=this.VE[1],n=this.VE[2];this.BP={},this.BP[0]=[e.Pa,e.oa],this.BP[1]=[i.Pa,i.oa,e.Pa,e.oa],this.BP[2]=[n.Pa,n.oa,e.Pa,e.oa],this.YK={},e=e.background(),i=i.background(),n=n.background(),this.YK[0]=[e.oa,e.Pa],this.YK[1]=[e.oa,e.Pa,i.oa,i.Pa],this.YK[2]=[e.oa,e.Pa,n.oa,n.Pa]},zt=function(t){Ht.call(this),this.Ga("defaultDataGrid.buttons"),this.te=t,this.b=-1,this.Qa().background().P=!1,this.lb().background().P=!1,this.WE=this.selected().background().P=!1,this.kb(this.te)},Vt=function(e,i){t.Y.call(this),this.te=e,t.K(this.te.controller,this.Zda,this),this.Ad=i,this.Lw=[],this.gg=this.jz=this.jb=this.Zq=this.MJ=this.Vc=this.zj=null,this.Jf=0,this.ab=null,this.QT=this.kea,this.Lm=[],this.ye=[],this.Zr=[],this.QV=[],this.dX=this.eX=window.NaN,this.VD=this.yG,this.kb(this.te),t.T(this.ua,[["width",4,9,0,function(){this.ab=null}],["defaultWidth",0,0],["collapseExpandButtons",128,1],["depthPaddingMultiplier",128,1]]),this.I(1)},qt=function(t){for(var e=0;e<t.ye.length;e++)t.ye[e].ld();t.ye.length=0},Wt=function(e,i,n,s){var a=e.ye[i],o=e.Zr[i];if(n){var r=e.Lw[i];r||((r=new t.Hx).df(!0),r.parent(e.labels()),e.Lw[i]=r),e.VD(r,o)}if(s&&(t.Kx(a),a.Ta=null),o){if(n){var l=o.j("index");l=e.Lw[l]}else l=e.labels();e=e.te.Ic(o),e=l.tk(e),a.text(e)}a.style(l.flatten()),t.Mx(a),a.Ij()},Kt=function(e){return e.MJ||(e.MJ=t.ok()),e.MJ},Yt=function(e){return e.jz||(e.jz=t.qk(),Kt(e).Eg(e.jz,0),e.jz.fill(e.te.g("headerFill")),e.jz.stroke(null)),e.jz},Xt=function(e){return e.Zq||(e.Zq=t.ok()),e.Zq},Jt=function(){t.Hy.call(this),this.Bb=null},Zt=function(t,e,i){return{originalEvent:e,type:i,value:t.vj()}},Qt=function(e){if(ot.call(this,e),this.Ga("defaultDataGrid"),this.b=[],this.o=[],this.Ka=null,this.ba=0,this.P={},A(this.controller,this),this.qc=this.fh=this.K=null,this.Mw={first:window.NaN,sw:window.NaN,count:window.NaN,reset:!0},this.YE=[],t.T(this.ua,[["columnStroke",512,1],["headerFill",16,1],["fixedColumns",4,1,0,function(){this.Gb.B(4,1)}],["onEditStart",0,0],["onEditEnd",0,0]]),"columns"in(e=this.oa))for(var i=0;i<e.columns.length;i++)e.columns[i]&&se(this,i)},te=function(e){return function(i){return t.ea(i)?new t.Xn(e).format(new t.On(new Date(i))):t.p(i)?String(i):""}},ee=function(e){return e.Ka||(e.Ka=t.qk(),mt(e).Eg(e.Ka,0),e.Ka.stroke(null)),e.Ka},ie=function(e){return e=It("columnStroke",2)(e,0),t.dp(e)},ne=function(e,i){for(var n=ie(e),s=0,a=0,o=0,r=e.b.length;o<r;o++){var l=e.b[o];l&&l.enabled()&&!l.md&&(a=l.width(),t.uo(a)&&(a=90,l.ab=null,l.ka(),l.da(!1)),l.width(a),s+=a+=n)}return s-(i?a:0)},se=function(e,i,n,s){var a=!1,o=t.N(i);return(0,window.isNaN)(o)?(o=0,n=i):o=i,(i=e.b[o])||(i=new Vt(e,o),a=e.oa,i.Ga(a.defaultColumnSettings),"columns"in a&&i.Ga(a.columns[o]),t.K(i,e.Sda,e),t.wl(i),a=!0),t.p(n)?(a=t.J(n,Vt)?n.F():n,i.ga(!!s,a),i.enabled()&&i.O(St(e)),e.b[o]=i,e.B(528,1),e):(a&&(i.O(St(e)),e.b[o]=i,e.B(528,1),e.g("fixedColumns")&&e.Gb.B(4,1)),function(e){for(var i=0,n=0,s=e.b.length;n<s;n++)e.b[n]&&e.b[n].enabled()&&i++;if(i>e.o.length){var a=new X;n=It("columnStroke",2)(e,0),a.stroke(n),a.ba=n,a.O(xt(e)),t.K(a,(function(){a.W(),this.g("fixedColumns")&&this.Gb.B(4,1)}),e),a.wa("splitterpositionchange",(0,t.pa)(e.Gka,e,i-1)),a.wa("dblclick",(0,t.pa)(e.Hka,e,i-1)),a.wa("dragstart",(0,t.pa)(e.XS,e,!0)),a.wa("drag",(0,t.pa)(e.XS,e,!0)),e.o.push(a)}}(e),i)},ae=function(e){e.controller.iz.push(t.Ep((function(){!function(t){if(t.Mw.reset){t.Gb.dispatchEvent("workingstart");for(var e=0,i=0,n=t.b.length;i<n;i++){var s=t.b[i];s&&s.enabled()&&!s.md&&e++}i=t.controller.Zr,t=t.Mw,i.length?(t.first=0,t.count=Math.min(Math.max(1,Math.floor(300/e)),i.length),t.sw=t.first+Math.max(0,t.count-1),t.reset=!1):(t.first=window.NaN,t.sw=window.NaN,t.count=window.NaN,t.reset=!0)}}(this);var e=!1;if(this.Sv((function(i){if(!i.pf()){e=!0,i.Uw();var s=!1,a=!1,o=0;i.J(512)&&(s=!0),i.J(1024)&&(n(i.labels())&&(o|=t.LE),s=a=!0),i.J(2048)&&(o|=t.KE,s=a=!0),s&&i.Hx(a),i.va(o)}})),e)if(function(t){var e=t.controller.Zr;return t=t.Mw,!((0,window.isNaN)(t.sw)||t.sw>=e.length-1||(t.first=t.sw+1,t.sw=t.first+Math.min(e.length-1-t.first,t.count),0))}(this)){var i=Math.round(this.Mw.sw/this.controller.Zr.length*100);(0,window.isNaN)(i)?this.PN().enabled(!1):(this.PN().enabled(!0).ja(this.fa).text("Working: "+i+"%").W(),this.Gb.dispatchEvent({type:"working",progress:i})),t.vl.measure(),this.Sv((function(t){t.B(128),t.W()})),ae(this)}else this.Sv((function(t){t.I(3584),t.B(128),t.W()})),this.Wj(!1),this.PN().enabled(!1).W(),M(this.controller),this.controller.iz.push(t.Ep((function(){_(this.controller),this.Gb.dispatchEvent({type:"working",progress:100}),this.Gb.dispatchEvent("workingfinish")}),void 0,this))}),void 0,e))},oe=function(){Qt.call(this)},re=function(e){t.Ny.call(this),this.Ga("defaultLineMarkerSettings"),this.Po(e),t.kr(e,this.zg,this),t.T(this.ua,[["stroke",16,1],["value",0,0,0,function(){this.B(4,this.uD())}]])},le=function(e){t.Ny.call(this),this.Ga("defaultRangeMarkerSettings"),this.Po(e),t.kr(e,this.zg,this),t.T(this.ua,[["fill",16,1],["from",4,9],["to",4,9]])},he=function(e){t.Zy.call(this),this.Ga("defaultTextMarkerSettings"),this.Po(e),t.kr(e,this.zg,this),t.T(this.ua,[["value",0,0,0,function(){this.B(4,this.uD())}]])},ce=function(e){t.ag.call(this,e.ia()),this.element=e,this.y=this.x=0},ue=function(e){t.ag.call(this,e.ia()),this.element=e,this.Kd=window.NaN},de=function(t){ue.call(this,t)},pe=function(e,i,n){t.ag.call(this,i.ia()),this.element=i,this.My=!!n,this.i=this.b=window.NaN},ge=function(e,i){t.ag.call(this,e.ia()),this.element=e,this.b=!!i},fe=function(){t.V.call(this),this.Xb=null,t.T(this.ua,[["fill",0,2],["stroke",0,2],["size",0,2],["type",0,2],["verticalOffset",0,2],["horizontalOffset",0,2],["enabled",0,0]])},be=function(){t.V.call(this),this.Xb=this.b=this.f=null},ve=function(e){t.V.call(this),this.D=e,this.Xb=null,t.T(this.ua,[["fill",0,2],["stroke",0,2],["enabled",0,2]]),this.b=this.f=this.o=this.i=null},me=function(){t.V.call(this),this.b=this.Y=null,t.T(this.ua,[["position",0,1,void 0,this.at],["offsetY",0,1,void 0,this.at],["offsetX",0,1,void 0,this.at],["fill",0,1,void 0,this.at],["stroke",0,1,void 0,this.at],["anchor",0,1,void 0,this.at],["size",0,1,void 0,this.at],["rotation",0,1,void 0,this.at],["type",0,1,void 0,this.at],["enabled",0,1,void 0,this.at]])},ye=function(e,i,n,s,a,o,r){this.element=e,this.tag=s,this.b=r,this.predictedBounds=n,this.item=i,this.shapes=this.element.Rf.ed(i,s,o?t.wo:t.gm,void 0,void 0,void 0,a,r),t.p(a)&&(this.periodIndex=a,this.period=i.get("periods",a)),e.Ma(),(i=Te(e,i,a))&&(i=i.markerType),this.markerType=i||e.g("markerType")},Se=function(e,i){t.V.call(this),this.Ed=i,this.Xb=this.Y=null,t.T(this.ua,[["drawer",0,1],["shapes",0,1]])},we=function(t,e,i,n,s,a,o){e=new ye(t.Ed,e,i,n,s,a,o),t.g("drawer").call(e,e)},xe=function(e,i,n){if(t.od.call(this),this.G=e,this.D=i,this.wb=null,this.b={},this.f={},this.o={},this.i={},t.A(n))for(e=0;e<n.length;e++){var s=(i=n[e]).shapeType;switch(String(s).toLowerCase()){case"none":var a=null;break;case"rect":a=t.mk;break;case"circle":a=t.nk;break;case"ellipse":a=t.pk;break;default:a=t.qk}this.b[s]||(this.b[s]=[],this.f[s]=[],this.o[s]=0),this.i[i.name]={zIndex:+i.zIndex,nS:a,Qb:s,Dd:!!i.disablePointerEvents}}this.IP={}},Ce=function(t,e,i,n,s,a,o){e=t.i[e];var r=t.D.Tm(i,a,o);return i=t.D.gk(i,a,o),s.fill(r),s.stroke(i),s.kb(t.G),s.Dd(!!e.Dd),s.zIndex(e.zIndex+n),s.parent(t.Bd),s},De=function(e){t.V.call(this),this.Ga("defaultTimeline.elements"),this.Yj=this,this.Zh=e,this.Y=null,t.T(this.ua,[["height",0,1],["anchor",0,1],["position",0,1],["offset",0,1],["enabled",0,1]]),e={},t.T(e,[["fill",0,8192],["stroke",0,8192]]),this.ca=new t.my(this.Yj,e,t.gm),e={},t.T(e,[["fill",0,0],["stroke",0,0]]),this.Ea=new t.my(this.Yj,e,t.wo),this.gb=this.Vi=this.$s=this.Xb=this.cj=this.kI=this.Da=null},Te=function(e,i,n){if(t.p(n))return i.get("periods")[n];for(e=e.qr(),n=0;n<e.length;n++){var s=i.get(e[n]);if(t.p(s)){var a=s;break}}return a},ke=function(e){De.call(this,e),this.fi=null,t.T(this.ua,[["markerType",0,1]])},$e=function(e){ke.call(this,e),t.T(this.ua,[["depth",0,1],["drawOnCollapsedOnly",0,1]])},Oe=function(e){De.call(this,e),t.T(this.ua,[["drawOverEnd",0,1]])},Pe=function(t){Oe.call(this,t)},Le=function(e){De.call(this,e),t.T(this.ua,[["above",0,1],["disableWithRelatedTask",0,1]])},Ge=function(e){t.V.call(this),this.Yj=this,this.Zh=e,t.T(this.ua,[["previewStroke",0,2]]),e={},t.T(e,[["fill",0,8192],["stroke",0,8192]]),this.ca=new t.my(this.Yj,e,t.gm),e={},t.T(e,[["fill",0,0],["stroke",0,0]]),this.Ea=new t.my(this.Yj,e,t.wo)},Fe=function(t){De.call(this,t),this.Ga("defaultTimeline.groupingTasks"),this.Fi=null},Ie=function(e){De.call(this,e),this.fi=null,t.T(this.ua,[["markerType",0,1]])},Ee=function(e){Ie.call(this,e),t.T(this.ua,[["depth",0,1],["drawOnCollapsedOnly",0,1]])},Ae=function(t){De.call(this,t)},Ue=function(t){De.call(this,t),this.Ga("defaultTimeline.tasks"),this.Fi=null},_e=function(e,i){t.Y.call(this),this.Yk=e,this.qa=this.Yk.aa.scale(),this.Ad=i,this.Da=this.b=null,this.ye=[],this.Ia=null,this.mb=[],this.D=[],this.o="yyyy/MM/dd'T'HH:mm:ss.SSS",this.Bb={left:0,top:0,width:0,height:0},this.i=this.f=null,t.T(this.ua,[["enabled",1,32768],["stroke",16,1],["height",4,9]]),this.count=this.Dg=void 0},je=function(e){if(!e.b){var i=null!=e.i;e.Da&&!t.Jc(e.Da.Pa)&&(i=!0),i&&(e.b=new t.bz,e.b.labels(e.labels()),t.wl(e.b))}},Me=function(e){t.Y.call(this),this.Ga("defaultGanttHeader"),this.aa=e,this.i=null,this.K=new t.mI,this.Da=this.Ia=null,this.f=[],this.D=new t.nI,this.Bb={left:0,top:0,width:0,height:0},this.b=new t.bz,this.b.labels(this.labels()),t.dz(this.b),t.wl(this.b),t.T(this.ua,[["stroke",16,1],["levelHeight",512,1,void 0,this.rha],["drawTopLine",0,0],["drawRightLine",0,0],["drawBottomLine",0,0],["drawLeftLine",0,0]])},Ne=function(e,i){ot.call(this,e,i),this.Ga("defaultTimeline"),this.dD=this.Ev=this.Hv=this.Gv=this.Fv=this.mA=this.iq=this.EE=this.su=this.rh=null,this.KN=void 0,this.LN=window.NaN,this.gJ=!1,this.Mt=this.Rt=this.Qt=this.Nt=this.NG=this.Pt=this.Ot=null,this.gT=this.GG=this.Yx=!1,this.ap=this.Wx=null,this.WJ=[],this.VJ=0,this.WA=[],this.pB=[],this.OB=[],this.os=[],this.eY=this.JH=null,this.qa=new t.st,t.K(this.qa,this.ii,this),function(e,i){t.p(i)&&e.Xq!==i&&(null===i?(t.kr(e.Xq,e.dL,e),e.Xq=null):(e.Xq&&t.kr(e.Xq,e.dL,e),e.Xq=i,t.K(e.Xq,e.dL,e)))}(this.qa,this),this.TC=this.Kj=this.ov=this.fw=this.Bt=this.hk=this.Nw=this.Kk=this.dy=null,this.QE=[],t.T(this.ua,[["cropLabels",2048,1],["zoomOnMouseWheel",0,0],["columnStroke",16,1],["workingFill",0,0,0,function(){var t=this.g("workingFill");Ve(this).fill(t)}],["notWorkingFill",0,0,0,function(){var t=this.g("notWorkingFill");qe(this).fill(t)}],["holidaysFill",0,0,0,function(){var t=this.g("holidaysFill");He(this).fill(t)}],["weekendsFill",0,0,0,function(){var t=this.g("weekendsFill");ze(this).fill(t)}],["connectBy",128,1],["allowConnectorCaps",0,8192]]),U(this.controller,this),this.GA()},Be=function(t){return t.eY||(t.eY=t.controller.i?[t.Gr(),t.Wc(),t.Ml()]:[t.Nc(),t.np(),t.Wc(),t.Wc().Ei(),t.Ml(),t.Sp(),t.Sp().Ei(),t.Nc().Kd(),t.np().Kd(),t.Ml().Kd()]),t.eY},Re=function(e,i,n,s,a){return i={dha:!0,item:e,index:i,type:n,Ta:s},t.p(a)&&(i.Fq=a,e=e.get("periods"),i.ub=e[a]),i},He=function(t){return t.hN||(t.hN=Ai(t).path(),t.hN.zIndex(0),t.hN.stroke("none").fill(t.g("holidaysFill"))),t.hN},ze=function(t){return t.dQ||(t.dQ=Ai(t).path(),t.dQ.zIndex(0),t.dQ.stroke("none").fill(t.g("weekendsFill"))),t.dQ},Ve=function(t){return t.fQ||(t.fQ=Ai(t).path(),t.fQ.zIndex(1),t.fQ.stroke("none").fill(t.g("workingFill"))),t.fQ},qe=function(t){return t.eO||(t.eO=Ai(t).path(),t.eO.zIndex(1),t.eO.stroke("none").fill(t.g("notWorkingFill"))),t.eO},We=function(t){return t.EE||(t.EE=xt(t).path(),t.EE.zIndex(6),t.EE.stroke(It("columnStroke",2)(t,0))),t.EE},Ke=function(t){return t.iq||(t.iq=wt(t).path(),t.iq.zIndex(0).cursor("ew-resize"),t.wc.wa(t.iq,"mousedown",(function(t){t.stopPropagation()})),t.iq.Ce("mousedown",t.Rea,!1,t)),t.iq},Ye=function(t){return t.mA||(t.mA=wt(t).path(),t.mA.zIndex(10),t.wc.wa(t.mA,"mousedown",(function(t){t.stopPropagation()})),t.mA.Ce("mousedown",t.Sea,!1,t)),t.mA},Xe=function(t){return t.OG||(t.OG=wt(t).path(),t.OG.zIndex(10),t.wc.wa(t.OG,"mousedown",(function(t){t.stopPropagation()})),t.OG.Ce("mousedown",t.Iea,!1,t)),t.OG},Je=function(t){return t.Fv||(t.Fv=wt(t).path(),t.Fv.zIndex(20).cursor("col-resize"),t.Fv.Ei=Ke(t),t.wc.wa(t.Fv,"mousedown",(function(t){t.stopPropagation()})),t.Fv.Ce("mousedown",t.Qea,!1,t)),t.Fv},Ze=function(t){return t.Gv||(t.Gv=wt(t).path(),t.Gv.zIndex(30).cursor("col-resize"),t.Gv.Ei=Ke(t),t.wc.wa(t.Gv,"mousedown",(function(t){t.stopPropagation()})),t.Gv.Ce("mousedown",t.Tea,!1,t)),t.Gv},Qe=function(t){return t.Hv||(t.Hv=wt(t).path(),t.Hv.zIndex(40).cursor("move"),t.wc.wa(t.Hv,"mousedown",(function(t){t.stopPropagation()})),t.Hv.Ce("mousedown",t.Uea,!1,t)),t.Hv},ti=function(t){return t.Ev||(t.Ev=wt(t).path(),t.Ev.zIndex(50).cursor("move"),t.wc.wa(t.Ev,"mousedown",(function(t){t.stopPropagation()})),t.Ev.Ce("mousedown",t.Lea,!1,t)),t.Ev},ei=function(t){return t.dD||(t.dD=wt(t).path(),t.dD.zIndex(60),t.dD.Dd(!0)),t.dD},ii=function(t,e){for(var i=0;i<t.os.length;i++)t.os[i].clear().oc(1,0,0,1,0,0);t.os.length=0,e||(t.Ua().enabled(t.ot),t.ot=void 0)},ni=function(e,i,n,s){var a=i;switch(e=e.Ml().g("above"),n){case"tasks":case"periods":s&&"left-center"==i&&(a=e?"left-top":"left-bottom");break;case"grouping-tasks":a=t.Ko(i)?"left-top":"left-bottom",s&&"left-center"==i&&(a=e?"left-top":"left-bottom");break;case"baselines":"left-center"==i&&(a=e?"left-bottom":"left-top")}return a},si=function(e,i,n){if(e.Wx){var s=e.Wx.b?e.Fv:e.Gv,a=s.tag.item,o=s.tag.Fq,r=s.tag.Ta;switch(s.tag.type){case"baselines":s=e.Wx.b?a.j("baselineEnd"):a.j("baselineStart");break;case"periods":s=e.Wx.b?a.no("periods",o,"end"):a.no("periods",o,"start");break;default:s=dt(a),s=e.Wx.b?s.end:s.start}a=t.Zj(e.O().Ja()).x,i=n?0>n?e.fa.left:e.fa.left+e.fa.width:i.clientX-a,n=t.Ft(e.qa,s),n=e.fa.left+e.fa.width*n,e.iq.clear().moveTo(n,r.top).lineTo(i,r.top).lineTo(i,r.top+r.height).lineTo(n,r.top+r.height).close()}},ai=function(e,i,n,s){if(e.ap&&e.vi){var a=e.ap.My?e.Hv:e.Ev,o=a.tag.index;a=a.tag.Fq;var r=t.Zj(e.O().Ja()),l=r.x;r=r.y,n||s?(n=e.ap.b-l,i=e.ap.i-r):(n=i.clientX-l,i=i.clientY-r),s=Oi(e,o,a),o=e.nj().previewStroke(),l=t.dp(o)%2&&"svg"===t.kk?.5:0,a=e.ap.My?s.left:s.left+s.width,s=s.top+s.height/2+l,ei(e).stroke(o).clear().moveTo(a,s).lineTo(n,i)}},oi=function(t,e){var i="connectorselect";if(e)switch(i=e.type,i){case"mouseout":i="connectormouseout";break;case"mouseover":i="connectormouseover";break;case"mousemove":case"touchmove":i="connectormousemove";break;case"mousedown":case"touchstart":i="connectormousedown";break;case"mouseup":case"touchend":i="connectormouseup";break;case"click":i="connectorclick";break;case"dblclick":i="connectordblclick"}return{type:i,actualTarget:e?e.target:null,target:t,originalEvent:e}},ri=function(e,i){if(i&&i.originalEvent){var n=i.originalEvent,s=t.J(n,t.Si)?n.target:n.domTarget;if(s&&t.J(s,Rt)&&"connectors"==s.type){for(var a in n=oi(e,n),s.j)n[a]=s.j[a];return n}}return null},li=function(t,e){switch(e){case"periods":return t.Gr();case"tasks":return t.Nc();case"grouping-tasks":return t.np();case"baselines":return t.Ml();case"milestones":return t.Wc();case"baselines-milestones":return t.Sp();case"milestones-preview":return t.Wc().Ei();case"baselines-milestones-preview":return t.Sp().Ei()}return t.elements()},hi=function(t,e){return t.controller.i?t.Gr():lt(e)?t.Wc():ct(e)?t.np():t.Nc()},ci=function(e,i,n){if(t.p(n))var s=(i=pt(i,n)).PA?e.Ml():i.CN?e.Wc():e.Gr();else s=lt(i)?e.Wc():rt(i)?e.Sp():ht(i)?e.Ml():ct(i)?e.np():dt(i).DN?e.Gr():e.Nc();return s.Ua()},ui=function(t,e){var i=ri(t,e);return!!i&&(ii(t),t.Gb.dispatchEvent(i),!0)},di=function(t,e){var i=e&&e.originalEvent?e.originalEvent.domTarget:null;if(i&&"connectors"==i.type){ii(t);var n=ri(t,e);return t.Gb.dispatchEvent(n)&&((n=ri(t,e)).type="connectorselect",t.Gb.nk().f&&pi(t,e.originalEvent),t.Gb.dispatchEvent(n)&&(t.Gb.jJ(e.originalEvent),i=i.j,at(t.Gb.nk(),i.fromItem,i.toItem,i.fromItemIndex,i.toItemIndex,i.fromPeriodIndex,i.toPeriodIndex,i.connType),t.B(128,1))),!0}return!1},pi=function(t,e){var i=t.Gb.nk();if(i.f){var n=oi(t,e);n.type="connectorselect",t.Gb.dispatchEvent(n)&&(at(i,null),t.B(128,1))}},gi=function(t,e,i){var n=It("rowSelectedFill",1)(t,0,e);return Ot(t).fill(n),n=t.Gb.nk(),it(n,e),n.i=e?i:null,!!n.b&&(t.B(128,1),!0)},fi=function(t){if(t.VJ<t.WJ.length){var e=t.WJ[t.VJ++];e.reset()}else(e=new Rt).kb(t),t.WJ.push(e),t.VJ++;return e.parent(yt(t)),e},bi=function(t,e,i){return t*=e,(i=i.g("drawOverEnd"))?t:Math.min(t,e)},vi=function(e,i,n,s,a,o){var r="grouping-tasks"==i.Ma(),l=i.qd(s,o);r=t.L(l,a||r?n.height/2:n.height),l=i.g("anchor");var h=i.g("position");return s=i.rD(s,o),s=t.L(s,n.height),"auto"==l&&(l=ni(e,h,i.Ma(),a)),e=t.Eo(n,h),new t.I(e.x,e.y+(t.Ko(l)?0:t.Lo(l)?-r:-r/2)+s,n.width,r)},mi=function(e,i,n,s,a){return e=e.gk(n,a?t.wo:t.gm,s),e=t.dp(e)%2&&"svg"===t.kk?.5:0,n=Math.round(i.left)+e,s=Math.round(i.top)+e,new t.I(n,s,Math.round(i.left+i.width)+e-n,Math.round(i.top+i.height)+e-s)},yi=function(e,i,n,s){e.controller.data().ka(),t.p(s)?(t.A(i.j("periodBounds"))||i.Jk("periodBounds",[]),i.Jk("periodBounds",s,n)):i.j("relBounds",n),e.controller.data().da(!1)},Si=function(e,i,n,s,a,o){if(!o){if(!i.b)for(var r in i.b={},xn)o=i.g(r),t.p(o)&&(i.b[r]=o);o=i.b}(i=o).enabled&&(e=e.Db().add({value:n}),r=!("stroke"in i),((n=!("fill"in i))||r)&&(i=t.Qc(i),n&&(i.fill=t.Pl(s)),r&&(i.stroke=t.Pl(a))),e.N(i))},wi=function(e,i,n,s,a){var o=Te(n,i,a),r=o&&o.startMarker;o=o&&o.endMarker;var l=s.top+s.height/2,h={x:s.left,y:l};s={x:s.left+s.width,y:l},l=n.Tm(i,t.gm,a),i=n.gk(i,t.gm,a),a=n.BJ(),n=n.QG(),Si(e,a,h,l,i,r),Si(e,n,s,l,i,o)},xi=function(t,e){var i=t.g("enabled"),n=0!=t.g("depth"),s=e.j("collapsed");return s=!t.g("drawOnCollapsedOnly")||s,i&&n&&s},Ci=function(e,i,n,s,a,o){var r=a.QD||ct(i,a),l=t.p(o),h=r?e.np():l?e.Gr():e.Nc(),c=e.Ml();o=l?o:void 0,l=l?st(e.Gb.nk(),i,o):nt(e.Gb.nk(),i);var u=a.start,d=a.end;r&&(d=(0,window.isNaN)(d)?u:d,u=(0,window.isNaN)(u)?d:u);var p=a.ZF,g=a.$K;u=t.Ft(e.qa,u),d=t.Ft(e.qa,d),p=t.Ft(e.qa,p),g=t.Ft(e.qa,g);var f=h.g("enabled"),b=c.g("disableWithRelatedTask"),v=c.g("enabled")&&(!b||f);if(v=0<g&&1>p&&v,(b=0<d&&1>u&&f)||v){if(f=e.fa,b){var m=f.left+f.width*u;m=vi(e,h,new t.I(m,n,f.left+f.width*d-m,s),i,!0)}if(v){var y=f.left+f.width*p;y=vi(e,c,new t.I(y,n,f.left+f.width*g-y,s),i,!0)}if(m&&y&&Di(e,m,y,h,i),y&&(y=mi(c,y,i,void 0,l),u=e.io(i,c,y,o),we(c.hi(),i,y,u,o,l),wi(e,i,c,y)),m&&(r&&!m.width&&(u=m.height,m.left-=u/2,m.width=u,a.QA=!0),m=mi(h,m,i,o,l),u=e.io(i,h,m,o),r&&(d=e.Wc().Ei(),r=e.Sp().Ei(),d=xi(d,i),r=xi(r,i),Ti(e,0,i,n,s,t.oa(i),d,r,!0)),yi(e,i,m),a.QA?(we(h.hi(),i,m,u,void 0,l),wi(e,i,h,m),o=h.Kd(),a.EN&&o.g("enabled")&&(r=bi(a.Kd,m.width,o),u=vi(e,o,new t.I(m.left,m.top,r,m.height),i),d=e.io(i,o,u),we(o.hi(),i,u,d,void 0,l),r&&wi(e,i,o,u))):a.DN&&we(h.hi(),i,m,u,o,l)),y)var S=y;else m&&((S=m.clone()).top=n,S.height=s,(S=vi(e,c,S,i,!0)).top+=.5,Di(e,m,S,h,i));S&&(n=c.Kd(),a.YR&&n.g("enabled")&&(a=bi(a.f0,S.width,n),S=vi(e,n,new t.I(S.left,S.top,a,S.height),i),s=e.io(i,n,S),we(n.hi(),i,S,s,void 0,l),a&&wi(e,i,n,S)))}},Di=function(e,i,n,s,a){var o=s.g("anchor"),r=s.g("position"),l=e.Ml().g("anchor"),h=e.Ml().g("position");o==l&&r==h&&("auto"==o&&(o=ni(e,r,s.Ma(),!0)),"auto"==l&&(l=ni(e,h,e.Ml().Ma(),!0)),r=e.Ml().gk(a,t.gm),s=s.gk(a,t.gm),s=t.dp(s)/2,s+=a=t.dp(r)/2,o==l&&(e.Ml().g("above")?t.Ko(o)?i.top+=n.height+s:n.top-=i.height+s:t.Ko(o)?n.top+=i.height+s:i.top-=n.height+s))},Ti=function(t,e,i,n,s,a,o,r,l){var h=dt(i),c=lt(i,h),u=rt(i,h),d=t.Wc().Ei(),p=t.Sp().Ei(),g=d.g("depth");g=null==g||e<=g;var f=p.g("depth");if(c=g&&c,u=(f=null==f||e<=f)&&u,g||f){f=s/2;var b=(g=t.Ml().g("above"))?n:n+f;if(c&&o&&ki(t,d,i,l&&g?n+f:n,f,h,void 0,a),u&&r&&ki(t,p,i,b,f,h,void 0,a),ct(i,h)&&(o||r))for(h=0;h<i.bc();h++)d=i.xd(h),Ti(t,e+1,d,n,s,a,o,r,l)}},ki=function(e,i,n,s,a,o,r,l){if(o=null!=o?o:t.p(r)?pt(n,r):dt(n),e.controller.i)o=o.EI;else{var h=i.Ma();o="milestones"===h||"milestones-preview"===h?o.start:o.ZF}if(0<=(o=t.Ft(e.qa,o))&&1>=o&&i.g("enabled")){h=i.gk(n,t.gm),h=(t.cp(h)?0:t.z(h)?1:h.thickness?h.thickness:1)%2&&"svg"===t.kk?.5:0;var c=i.qd(n,r);c=t.L(c,a),s=vi(e,i,new t.I(Math.round(e.fa.left+e.fa.width*o)+h-Math.round(c/2),s,c,a),n,void 0,r),a=t.p(r)?st(e.Gb.nk(),n,r):nt(e.Gb.nk(),n),s=mi(i,s,n,r,a),o=e.io(n,i,s,r),yi(e,n,s,r),we(i.hi(),n,s,o,r,a,l)}},$i=function(t,e){var i=t.fa.top+t.uk()+1,n=t.controller.b,s=t.controller.Cg(),a=t.controller.km();return(e?n[e-1]:0)-((s?n[s-1]:0)+a)+i},Oi=function(e,i,n){var s=$i(e,i);i=e.controller.D[i];var a=w(e.controller,i);if(e.controller.i){var o=pt(i,n),r=0,l=o.CN,h=o.start,c=o.end,u=e.Gr();return l&&(u=e.Wc(),c=h=o.EI,r=u.qd(i,n),r=Math.round(t.L(r,a)/2)),h=t.Ft(e.qa,h)*e.fa.width+e.fa.left-r,c=t.Ft(e.qa,c)*e.fa.width+e.fa.left+r,vi(e,u,new t.I(h,s,c-h,a),i,void 0,n)}return r=(u=dt(i)).start,c=u.end,n=u.bN,h=0,(u=lt(i,u))&&(c=r,h=e.Wc().qd(i),h=Math.round(t.L(h,a)/2)),r=t.Ft(e.qa,r)*e.fa.width+e.fa.left-h,c=t.Ft(e.qa,c)*e.fa.width+e.fa.left+h,s=new t.I(r,s,c-r,a),u?(a=e.Wc(),e=vi(e,a,s,i,n)):ht(i)?(a=ct(i)?e.np():e.Nc(),n=vi(e,a,s,i,!0),u=e.Ml(),s=vi(e,u,s,i,!0),Di(e,n,s,a,i),e=n):(a=ct(i)?e.np():e.Nc(),e=vi(e,a,s,i,n)),e},Pi=function(e,i,n,s,a,o){s=s||"finish-start";var r=i.index,l=n.index;i=i.periodIndex,n=n.periodIndex;var h=e.controller.D,c=h[r];h=h[l];var u=hi(e,c),d=hi(e,h),p=Oi(e,r,i),g=Oi(e,l,n),f=w(e.controller,h);if(p&&g&&u.g("enabled")&&d.g("enabled")){if(d=!!(u=e.Gb.nk()).f&&u.f.sfa==c&&u.f.kla==h&&u.f.y0==s&&u.f.G1==i&&u.f.I6==n,u=null!=o,a)if(d)var b="object"==t.ka(a.selected)?a.selected.fill:void 0,v="object"==t.ka(a.selected)?a.selected.stroke:void 0;else b=t.p(a.fill)?a.fill:"object"==t.ka(a.normal)?a.normal.fill:void 0,v=t.p(a.stroke)?a.stroke:"object"==t.ka(a.normal)?a.normal.stroke:void 0;a=d?t.wo:t.gm,v=v||e.nj().gk(c,h,a,s,i,n),o=o||null,d=u?o:null;var m=t.dp(v)%2&&"svg"===t.kk?.5:0;switch((s+"").toLowerCase()){case"finish-finish":var y=Math.round(p.left+p.width)+m,S=Math.round(p.top+p.height/2)+m,x=Math.round(g.left+g.width)+m,C=Math.round(g.top+g.height/2)+m,D="left";p.top==g.top?(o=Li(e,y,S,x,C,o),y>x&&(D="right")):(p=Math.max(y+9,x+9),o=Li(e,y,S,p,S,o),o=Li(e,p,S,p,C,o),o=Li(e,p,C,x,C,o)),d=Gi(e,x,C,D,d);break;case"start-finish":if(y=Math.round(p.left)+m,S=Math.round(p.top+p.height/2)+m,x=Math.round(g.left+g.width)+m,C=Math.round(g.top+g.height/2)+m,D="left",y-5-5-4>x)o=Li(e,y,S,p=x+9,S,o),o=Li(e,p,S,p,C,o),o=Li(e,p,C,x,C,o);else{var T=g.top>=p.top;p=y-5,g=x+9;var k=$i(e,l);f=Math.round(T?k:k+f)+m,o=Li(e,y,S,p,S,o),o=Li(e,p,S,p,f,o),o=Li(e,p,f,g,f,o),o=Li(e,g,f,g,C,o),o=Li(e,g,C,x,C,o)}d=Gi(e,x,C,D,d);break;case"start-start":y=Math.round(p.left)+m,S=Math.round(p.top+p.height/2)+m,x=Math.round(g.left)+m,C=Math.round(g.top+g.height/2)+m,D="right",p.top==g.top?(o=Li(e,y,S,x,C,o),y>x&&(D="left")):(p=Math.min(y-4-5,x-4-5),o=Li(e,y,S,p,S,o),o=Li(e,p,S,p,C,o),o=Li(e,p,C,x,C,o)),d=Gi(e,x,C,D,d);break;default:y=Math.round(p.left+p.width)+m,S=Math.round(p.top+p.height/2)+m,(x=Math.round(g.left)+m)>=y?(x=Math.min(x+5,Math.round(g.left+g.width/2)+m),g.top>p.top?(C=Math.round(g.top)+m,o=Li(e,y,S,x,S,o),o=Li(e,x,S,x,C,o),d=Gi(e,x,C,"bottom",d)):g.top<p.top?(C=Math.round(g.top+g.height)+m,o=Li(e,y,S,x,S,o),o=Li(e,x,S,x,C,o),d=Gi(e,x,C,"top",d)):(x=Math.round(g.left)+m,C=Math.round(g.top+g.height/2)+m,o=Li(e,y,S,x,C,o),d=Gi(e,x,C,"right",d))):(C=Math.round(g.top+g.height/2),k=$i(e,l)+m,f=Math.round(g.top>p.top?k:k+f)+m,g=x-5-4,o=Li(e,y,S,p=y+5,S,o),o=Li(e,p,S,p,f,o),o=Li(e,p,f,g,f,o),o=Li(e,g,f,g,C,o),o=Li(e,g,C,x,C,o),d=Gi(e,x,C,"right",d))}r={fromItemIndex:r,toItemIndex:l,connType:s,fromItem:c,toItem:h},e.controller.i&&(r.fromPeriodIndex=i,r.toPeriodIndex=n),l=e.elements().uf().g("enabled")?"pointer":"default",o&&!u&&(o.tag=void 0,o.type="connectors",o.KS=null,o.cursor(l),r.path=o,o.j=r,o.stroke(v)),d&&!u&&(d.tag=void 0,d.type="connectors",d.KS=null,d.cursor(l),r.arrow=d,d.j=r,d.fill(b||e.nj().Tm(c,h,a,s,i,n)),d.stroke(v))}},Li=function(t,e,i,n,s,a){if(a)try{a.lineTo(n,s)}catch(h){a.moveTo(e,i).lineTo(n,s)}else{var o=Math.max(e,n),r=Math.min(i,s),l=Math.max(i,s);Math.min(e,n)<t.fa.left+t.fa.width&&o>t.fa.left&&r<t.fa.top+t.fa.height&&l>t.fa.top&&((a=fi(t)).type="connectors",a.zIndex(60).moveTo(e,i).lineTo(n,s))}return a},Gi=function(t,e,i,n,s){if(t.g("allowConnectorCaps")){var a=s||null;if(e>=t.fa.left&&e<=t.fa.left+t.fa.width&&i>=t.fa.top&&i<=t.fa.top+t.fa.height){var o=0,r=0,l=0,h=0;switch(n){case"left":r=i-4,l=o=(e+=1)+4,h=i+4;break;case"top":o=e-4,l=e+4,h=r=(i+=1)+4;break;case"right":r=i-4,l=o=--e-4,h=i+4;break;case"bottom":o=e-4,l=e+4,h=r=--i-4}null==s&&((a=fi(t)).type="connectors"),a.zIndex(70).moveTo(e,i).lineTo(o,r).lineTo(l,h).lineTo(e,i)}return a}return null},Fi=function(e,i,n,s){var a=e.fa.top+e.uk()+1,o=e.fa.top+e.fa.height;n=t.Ft(e.qa,n),s=t.Ft(e.qa,s),n=e.fa.left+e.fa.width*n,e=e.fa.left+e.fa.width*s,n=t.R(n,1),e=t.R(e,1),i.moveTo(n,a).lineTo(e,a).lineTo(e,o).lineTo(n,o).close()},Ii=function(t,e){if(t.TC&&Hn.hour>=Hn[t.TC]){var i,n=e.workingIntervals,s=e.notWorkingIntervals;for(i=0;i<s.length;i++){var a=s[i];Fi(t,qe(t),a.from,a.to)}for(i=0;i<n.length;i++)s=n[i],Fi(t,Ve(t),s.from,s.to)}},Ei=function(e){var i=e.qa.Uj(),n=e.qa.sj(),s=e.controller.K,a=e.controller.ba;e.qa.ka(),t.ut(e.qa,s,a),e.qa.Q6=s,e.qa.P6=a,!i||(0,window.isNaN)(s)||(0,window.isNaN)(a)||(e.qa.m4?e.qa.Qm():e.qa.QI?(e.qa.kj.apply(e.qa,e.qa.MI),e.qa.QI=!1,e.qa.MI=null):e.qa.BW?(s=e.qa).BW&&(s.BW=!1,t.Et(s),s.va(4)):(s=e.qa.uj(),e.qa.kj(s.min,s.min+Math.round((s.max-s.min)/10)))),!i&&(i=n.min,s=n.max-i)&&(i=(n=e.qa.sj()).min,e.qa.kj(i,i+s)),e.qa.da(!0)},Ai=function(e){return e.fS||(e.fS=t.ok(),e.fS.zIndex(33)),e.fS},Ui=function(e){return e.oB||(e.oB=t.ok(),e.oB.zIndex(34)),e.oB},_i=function(e){return e.NB||(e.NB=t.ok(),e.NB.zIndex(36)),e.NB},ji=function(e,i){var n=e.label.ic("position"),s=i.label.ic("position");return n=t.Eo(e.Ta,n),s=t.Eo(i.Ta,s),n.x-s.x||-1},Mi=function(e){var i=e.ic("background"),n=e.Rh().rb();return i&&i.enabled?(e=e.ic("padding"),t.Ku(n,e)):n},Ni=function(){Ne.call(this)},Bi=function(){Ne.call(this,void 0,!0)},Ri=function(e){t.Bx.call(this),this.Ga("ganttBase",e?"ganttResource":"ganttProject"),this.G=!!e,this.na=this.o=this.b=this.f=this.la=null,this.P=new et,this.i=null,this.ib=new y(this.G),A(this.ib,Hi(this)),U(this.ib,this.wf()),t.K(this.ib,this.B0,this),this.D=N(this.ib),this.D.zIndex(qn),t.K(this.D,this.mka,this),this.Ce("chartdraw",(function(){Ut(this.GF()),Ut(this.wf()),_t(this.GF()),_t(this.wf())}),!1,this),t.T(this.ua,[["headerHeight",4,1],["splitterPosition",4,1],["rowHoverFill",0,0,0,function(){this.wf().rowHoverFill(this.g("rowHoverFill")),Hi(this).rowHoverFill(this.g("rowHoverFill"))}],["rowSelectedFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowSelectedFill(this.g("rowSelectedFill")),this.f.rowSelectedFill(this.g("rowSelectedFill")),t.yr(this.f,this.b)}],["rowFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowFill(this.g("rowFill")),this.f.rowFill(this.g("rowFill")),t.yr(this.f,this.b)}],["rowEvenFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowEvenFill(this.g("rowEvenFill")),this.f.rowEvenFill(this.g("rowEvenFill")),t.yr(this.f,this.b)}],["rowOddFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowOddFill(this.g("rowOddFill")),this.f.rowOddFill(this.g("rowOddFill")),t.yr(this.f,this.b)}],["columnStroke",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.f.columnStroke(this.g("columnStroke")),this.b.columnStroke(this.g("columnStroke")),t.yr(this.f,this.b)}],["rowStroke",0,0,0,function(){t.xr(this.wf(),Hi(this),this.ib);var e=this.g("rowStroke");this.f.rowStroke(e),this.b.rowStroke(e),this.ib.Tn(t.dp(e)),t.yr(this.f,this.b,this.ib)}]])},Hi=function(e){return e.f||(e.f=new Qt(e.ib),t.W(e,"dataGrid",e.f),e.f.zIndex(t.zm("defaultDataGrid").zIndex),ft(e.f,e),t.K(e.f,e.hea,e)),e.f},zi=function(e,i,n){var s=e.la.Eo("id",i);return s.length?(i=s[0],e.dispatchEvent({type:"rowcollapseexpand",item:i,collapsed:n})&&i.j("collapsed",n)):t.kl(404,null,["Task",i]),e},Vi=function(e){return e.o||(e.o=new H,e.o.zIndex(10),t.K(e.o,(function(){this.o.W()}),e),function(e){return t.p(!0)?(t.da(!0)&&1!=e.ba&&(e.ba=!0,e.position(e.af)),e):e.ba}(function(e){var i=2;return t.p(i)?(i=+i,(0,window.isNaN)(i)||e.b==i||(e.b=i,e.B(64,1)),e):e.b}(e.o.ka().we("vertical").position(e.g("splitterPosition")).e1("#000 0.3").stroke("none")).fill("#cecece")).da(!1),e.o.wa("splitterpositionchange",(function(e){var i=this.padding(),n=this.ob();if(i=i.Ng(n.width),n=Vi(this).position(),i=Math.floor(n*i),this.f.g("fixedColumns")&&"drawing"!=e.src){e=i-(e=ne(this.f,!0))-ie(this.f);t:{for(var s=(n=this.f).b.length-1;-1<s;s--){var a=n.b[s];if(a&&a.enabled()&&!a.md){n=a;break t}}n=null}n&&(n.ka(),n.width(e),n.da(!1))}e={type:"splitterpositionchange",newPosition:i,oldPosition:this.g("splitterPosition")},this.ta("splitterPosition",i),this.B(4,1),t.Dp(this,e)}),void 0,e)),t.p(void 0)?(e.o.N(void 0),e):e.o},qi=function(){return new Ri(!1)},Wi=function(){return new Ri(!0)};t.Hy.prototype.B1=t.ca(23,(function(){this.b=!1})),t.$t.prototype.DD=t.ca(13,(function(t){return this.Tk.DD(t)})),t.du.prototype.DD=t.ca(12,(function(t){return t in this.la})),t.$t.prototype.ND=t.ca(11,(function(t){return e(this.Tk,t.Tk)})),t.du.prototype.ND=t.ca(10,(function(t){return e(this,t)})),t.st.prototype.dL=t.ca(7,(function(e){if(t.X(e,8)&&!this.Uj()&&t.Dt(this)){var i=t.yt(this),n=t.zt(this);e=this.bm.isPixels;var s=this.am.isPixels,a=this.Xq.ob().width;i&&n?this.Qm():i&&e?(a=(i=t.vt(this.bm.value,a))*(this.Ze-this.Ph)/(a-i)||0,this.Gj=this.$e=this.Ph-a,s&&(e=t.At(this,this.Ze-this.$e,this.am),this.Fj=this.Oh+e),this.Kc=!0):n&&s?(a=(i=t.vt(this.am.value,a))*(this.Oh-this.$e)/(a-i)||0,this.Fj=this.Ze=this.Oh+a,e&&(e=t.At(this,this.Ze-this.$e,this.bm),this.Gj=this.Ph-e),this.Kc=!0):t.Et(this),this.va(4)}})),t.Qh.prototype.hH=t.ca(4,(function(){if(null!=this.kc){var e=t.mg().measure(this.text(),this.style());return e.left=this.No,e.top=this.Oo,e}return new t.I(0,0,0,0)})),t.aw.prototype.hH=t.ca(3,(function(){return this.kc?this.kc.hH():null}));var Ki="minFontSize maxFontSize adjustFontSize fontSize fontFamily fontColor fontOpacity fontDecoration fontStyle fontVariant fontWeight letterSpacing textDirection lineHeight textIndent vAlign hAlign wordWrap wordBreak textOverflow selectable disablePointerEvents useHtml format".split(" ");t.H(s,t.wu),t.g=s.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=80|t.wu.prototype.sa,t.g.we=function(e){return t.p(e)?((e=t.Gk(e))!=this.f&&(this.f=e,this.B(4,1)),this):this.f},t.g.ZK=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return this.Ba!=o&&(this.Ba=t.Ul(o,this.aa,!1),this.B(16,1)),this}return this.Ba||"none"},t.g.XK=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.na!=l&&(this.na=t.Ul(l,this.aa,!0),this.B(16,1)),this}return this.na||"none"},t.g.pP=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return this.Ka!=o&&(this.Ka=t.Ul(o,this.aa,!1),this.B(16,1)),this}return this.Ka||"none"},t.g.oP=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.Ha!=l&&(this.Ha=t.Ul(l,this.aa,!0),this.B(16,1)),this}return this.Ha||"none"},t.g.DC=function(e){return t.p(e)?(e=t.N(e),this.Sb!=e&&(this.Sb=e,this.B(4,9)),this):this.Sb},t.g.zS=function(e){return t.p(e)?(e=t.N(e),this.$a!=e&&(this.$a=e,this.B(16,1)),this):this.$a},t.g.op=function(e){return t.p(e)?(t.da(e)&&(this.fb=e),this):this.fb},t.g.kg=function(e,i){return t.p(e)?(t.nb(this.D,e)||(this.D=e.clone(),this.o?b(this):this.o=this.D.clone(),f(this),this.B(64,1),m(this,i||"api")),this):this.D},t.g.aQ=function(e){return t.p(e)?(t.nb(this.o,e)||(this.o=e.clone(),this.D?b(this):this.D=this.o.clone(),f(this),this.B(64,1),m(this,"api")),this):this.o},t.g.scroll=function(e,i){e=+e;var n=(0,window.isNaN)(e)?.05:t.Za(e,-1,1);return n?l(this,this.b+n,i):this},t.g.$R=function(e){return t.p(e)?(t.da(e)&&this.ea!=e&&(this.ea=e,this.B(4,1)),this):this.ea},t.g.xW=function(e){return t.p(e)?(this.aa!=e&&(this.aa=e,c(this,this.aa)),this):this.aa},t.g.yW=function(e){return t.p(e)?(this.sb=e,this):this.sb},t.g.sk=function(){return this.Vc||(this.Vc=t.ok(),t.ru(this,this.Vc,this.e0,this.d0,this.xda)),this.Vc},t.g.e0=function(t){t.preventDefault(),c(this,this.sb),this.oh(t)},t.g.d0=function(t){t.preventDefault(),c(this,this.aa),this.oh(t)},t.g.xda=function(e){e.preventDefault();var i=v(this),n=this.K.rb(),s=this.K.Om(),a=i?e.offsetY:e.offsetX;s=i?t.Tm((a-s.top)/s.height,4):t.Tm((a-s.left)/s.width,4),(i?a<=n.top:a<=n.left)?l(this,s,"user_action"):(n=+s,(0,window.isNaN)(n)||(n=t.Za(n,0,1),i=this.i-this.b,n=t.Tm(t.Za(n-i,0,1),4),i=t.Tm(n+i,4),this.b==n&&this.i==i)||(this.b=n,this.i=i,g(this),this.B(64,1),m(this,"user_action"))),this.oh(e)},t.g.Cka=function(t){t.preventDefault(),this.oh(t)},t.g.ko=function(){p(this,!0),this.dispatchEvent("scrolling")},t.g.bba=function(){p(this,!1),this.dispatchEvent("scrollend")},t.g.W=function(){if(this.zc()){var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();if(n&&i.suspend(),this.sk().bc()||(this.Vc.hc(function(e){return e.ba||(e.ba=t.mk()),e.ba}(this)),this.Vc.hc(function(e){return e.K||(e.K=t.mk(),e.K.kb(e.sk()),t.Ld(e.K,"drag",e.ko,!1,e),t.Ld(e.K,"end",e.bba,!1,e),t.ru(e,e.K,e.e0,e.d0,null,null,null,e.Cka)),e.K}(this))),this.J(2)&&(this.sk().parent(e),this.I(2)),this.J(4)){if(this.ab=this.ob(),this.ab.left=a(this.ab.left),this.ab.top=a(this.ab.top),this.ab.width=Math.round(this.ab.width),this.ab.height=Math.round(this.ab.height),u(this).O()||this.G.O(this.Vc),d(this).O()||this.P.O(this.Vc),u(this).enabled(this.ea),d(this).enabled(this.ea),this.ea&&this.G&&this.P){this.G.ka(),this.P.ka();var s,o=v(this);e=this.ab;var r=3>(o?e.height:e.width)/(o?e.width:e.height),l=s=o?e.width:e.height,h=e.left,c=e.top;r&&(o?s=t.Tm(e.height/3,1):l=t.Tm(e.width/3,1)),r=o?e.left:e.left+e.width-l,o=o?e.top+e.height-s:e.top,this.G.ja(e),this.G.position({x:r,y:o}).width(l).height(s).W(),this.P.ja(e),this.P.position({x:h,y:c}).width(l).height(s).W(),this.G.da(!1),this.P.da(!1)}this.B(80),this.I(4)}this.J(16)&&(e=Math.min(this.$a,Math.min(this.ab.width,this.ab.height)/2),this.ba.fill(this.na).stroke(this.Ba).round(e),this.K.fill(this.Ha).stroke(this.Ka).round(e),this.I(16)),this.J(64)&&(0>=this.b&&1<=this.i||this.b==this.i?this.sk().visible(!1):(this.sk().visible(!0),e=v(this),l=this.ab,this.ba.Qf(l),this.ea?(c=this.G.width(),o=this.G.height(),s=e?l.left:l.left+c+1,h=e?l.top+o+1:l.top,c=e?l.width:l.width-2*(c+1),o=e?l.height-2*(o+1):l.height,s=new t.I(s,h,c,o)):s=l.clone(),c=e?s.height:s.width,h=o=t.Tm(c*(this.i-this.b),1),r=!1,10>o&&(r=!0,h=10),r?(o=this.b*(c-h)/(1+this.b-this.i),c=e?l.left:t.Tm(s.left+o,1),o=e?t.Tm(s.top+o,1):l.top):(c=e?l.left:t.Tm(s.left+this.b*s.width,1),o=e?t.Tm(s.top+this.b*s.height,1):l.top),r=e?l.width:h,e=e?h:l.height,this.K.Ho(a(c)).Io(a(o)).Go(Math.round(r)).Fo(Math.round(e)).Om(s),this.K.oc(1,0,0,1,0,0)),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),this.I(8)),n&&i.resume()}return this},t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.F=function(){var e=s.u.F.call(this);return t.D(this.ZK())?t.kl(8,null,["ScrollBar background stroke"]):e.backgroundStroke=t.Rl(this.ZK()),t.D(this.XK())?t.kl(8,null,["ScrollBar background fill"]):e.backgroundFill=t.Rl(this.XK()),t.D(this.oP())?t.kl(8,null,["ScrollBar slider fill"]):e.sliderFill=t.Rl(this.oP()),t.D(this.pP())?t.kl(8,null,["ScrollBar slider stroke"]):e.sliderStroke=t.Rl(this.pP()),e.mouseOverOpacity=this.yW(),e.mouseOutOpacity=this.xW(),e.buttonsVisible=this.$R(),e.barSize=this.DC(),e.cornersRadius=this.zS(),e},t.g.U=function(t,e){s.u.U.call(this,t,e),this.XK(t.backgroundFill),this.ZK(t.backgroundStroke),this.oP(t.sliderFill),this.pP(t.sliderStroke),this.yW(t.mouseOverOpacity),this.xW(t.mouseOutOpacity),this.$R(t.buttonsVisible),this.DC(t.barSize),this.zS(t.cornersRadius)},t.g.R=function(){t.sd(this.ba,this.G,this.P,this.K,this.Vc),this.Vc=this.K=this.P=this.G=this.ba=null,s.u.R.call(this)};var Yi=s.prototype;Yi.barSize=Yi.DC,Yi.backgroundStroke=Yi.ZK,Yi.backgroundFill=Yi.XK,Yi.sliderStroke=Yi.pP,Yi.sliderFill=Yi.oP,Yi.mouseOutOpacity=Yi.xW,Yi.mouseOverOpacity=Yi.yW,Yi.cornersRadius=Yi.zS,Yi.buttonsVisible=Yi.$R,t.H(y,t.V),t.g=y.prototype,t.g.ra=18,t.g.sa=448,t.g.dd=function(e){var i=0;t.X(e,32)&&(T(this,e.item),i|=128),t.X(e,16)&&(i|=64),this.te&&this.Zh&&this.Zh.Gb.B(256),this.B(i,2)},t.g.aba=function(t){return!t.j("collapsed")},t.g.hha=function(t){return!!t.bc()},t.g.data=function(e){if(t.p(e)){if(this.la!=e&&(t.J(e,t.au)||t.J(e,t.Yt))){var i=!1;this.sb={},this.la&&(t.kr(this.la,this.dd,this),i=!0),this.la=e,t.K(this.la,this.dd,this),this.Ha=this.la.aw(),this.Ha.S6(this.aba),this.Zh&&this.Zh.scale().reset(),t.Op()?(this.te&&(_(this),function(t){t.Mw.reset=!0,t.Sv((function(t){qt(t)}))}(this.te),i&&j(this).dispatchEvent("workingcancel")),j(this).B(256)):this.te&&this.Zh&&this.Zh.Gb.B(256),this.B(64,2)}return this}return this.la},t.g.km=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.B(256,2)),this):this.P},t.g.Cg=function(e){return t.p(e)?((0,window.isNaN)(e)||(this.f=e,this.o=window.NaN,this.fb=e,this.$a=window.NaN,this.P=0,this.B(256,2)),this):this.f},t.g.Nj=function(e){return t.p(e)?((0,window.isNaN)(e)||(this.f=window.NaN,this.o=e,this.fb=window.NaN,this.$a=e,this.B(256,2)),this):this.o},t.g.Tn=function(e){return t.p(e)?(this.Sb!=e&&(this.Sb=e,this.B(128,2)),this):this.Sb},t.g.T0=function(){if((t.Op()||!this.pf())&&this.J(64)){this.ec=0,this.ba=this.K=window.NaN,this.Zr.length=0,this.la.ka();for(var e=0,i=this.la.bc();e<i;e++){var n=this.la.xd(e);k(this,n,0)}this.K==this.ba&&(e=this.K,this.K=e-432e5,this.ba=e+432e5),this.la.da(!1),this.va(16),this.I(64),this.Zh&&Ei(this.Zh),this.B(128)}if(t.Op()||!this.pf()){if(this.J(128)){for(this.D.length=0,this.b.length=0,this.ea.length=0,this.na={},this.Ba={},e=0,this.Ha.reset();this.Ha.advance();){n=this.Ha.current(),this.D.push(n),e+=w(this,n)+this.Sb,this.b.push(e);var s=n.get("id");if(i={item:n,index:this.b.length-1},t.p(s)&&!this.Ba[s]&&(this.Ba[s]=i),this.i){if(i=n.get("periods"),t.A(i))for(n=0,s=i.length;n<s;n++){var a=i[n],o=a.id,r={period:a,index:this.b.length-1,periodIndex:n};if(this.na[o]||(this.na[o]=r),t.A(a.connector)){a=a.connector;for(var l=0;l<a.length;l++){var h=a[l];if(h){var c=this.na[h.connectTo]||h.connectTo;c={from:r,to:c},(o=h.connectorType)&&(c.type=o),c.connSettings=h,this.ea.push(c)}}}else a.connectTo&&(c={from:r,to:c=this.na[a.connectTo]||a.connectTo},(o=a.connectorType)&&(c.type=o),a.connector&&(c.connSettings=a.connector),this.ea.push(c))}}else if(t.A(n.get("connector")))for(n=n.get("connector"),s=0;s<n.length;s++)(r=n[s])&&(o=r.connectTo,c=r.connectBy,t.z(c)&&c&&(c=this.la.find(c,o))&&(o=c.get("id")),c={from:i,to:c=this.Ba[o]||o},(o=r.connectorType)&&(c.type=o),c.connSettings=r,this.ea.push(c));else n.get("connectTo")&&(o=n.get("connectTo"),c={from:i,to:c=this.Ba[o]||o},(o=n.get("connectorType"))&&(c.type=o),n.get("connector")&&(c.connSettings=n.get("connector")),this.ea.push(c))}this.I(128),this.B(256)}this.qc&&(B(this,this.Ka),this.qc=!1),I(this),t.Op()&&this.I(256),(0,window.isNaN)(this.K)||this.K!=this.ba||(this.K-=864e5,this.ba+=864e5)}t.Op()||(this.te&&this.te.oE(),this.Zh&&this.Zh.oE()),t.vl.measure(),e=null,this.te&&this.te.O()&&(e=this.te.O().Ja()),!e&&this.Zh&&this.Zh.O()&&(e=this.Zh.O().Ja()),e&&e.suspend(),this.te&&this.te.Lj(this.lE),this.Zh&&this.Zh.Lj(this.lE),this.aa&&(this.aa.ka(),this.aa.op(!1),n=0,s=1,this.b.length&&(s=(n=this.b[this.f]-G(this,this.f,this.f)+this.P)+this.G,this.Ka=n,r=this.b[this.b.length-1],i=new t.I(0,0,0,r),n=t.Tm(n/r,4),s=t.Tm(s/r,4),this.aa.kg(i)),i=this.aa,n=+n,r=+s,(0,window.isNaN)(n)||(0,window.isNaN)(r)||(n=t.Za(n,0,1),r=t.Za(r,0,1),(s=Math.min(n,r))==(n=Math.max(n,r))||i.b==s&&i.i==n||(i.b=s,i.i=n,g(i),i.B(64,1),m(i,"api"))),i.W().op(!0).da(!1)),(i=j(this))&&((n={totalListLength:this.b.length,startListIndex:this.f,endListIndex:this.o}).type=this.o>=this.b.length-2?"needsdataload":"nodataloadingneeded",t.Dp(i,n)),e&&e.resume(),this.lE=!1},t.g.ifa=function(){var e=this.te&&this.te.enabled();e&&this.te.oE(),this.iz.push(t.Ep((function(){if(e&&this.te.Lj(this.lE),this.Zh&&this.Zh.Lj(this.lE),!e){var t=j(this);t.dispatchEvent("workingstart"),t.dispatchEvent({type:"working",progress:100}),t.dispatchEvent("workingfinish")}}),void 0,this))},t.g.F=function(){var t=y.u.F.call(this);return t.isResourceChart=this.i,this.la&&(t.treeData=this.la.xB(["collapsed"])),t.verticalOffset=this.km(),(0,window.isNaN)(this.Cg())?(0,window.isNaN)(this.Nj())||(t.endIndex=this.Nj()):t.startIndex=this.Cg(),t.scrollTo=this.Ka,t},t.g.U=function(e,i){y.u.U.call(this,e,i),this.i=e.isResourceChart,"treeData"in e&&this.data(t.cu(e.treeData)),this.km(e.verticalOffset),"startIndex"in e?this.Cg(e.startIndex):"endIndex"in e&&this.Nj(e.endIndex),"scrollTo"in e&&B(this,+e.scrollTo)},t.H(H,t.wu),t.g=H.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=80|t.wu.prototype.sa,t.g.we=function(e){return t.p(e)?((e=t.Gk(e))!=this.f&&(this.f=e,this.position(this.af)),this):this.f},t.g.position=function(e){if(t.p(e)){e=t.uo(e)?(0,window.parseFloat)(e)/100:e;var i=0,n=1;return this.ab&&(n=Y(this)?this.ab.zd():this.ab.qd(),i=this.D/n,n=(n-this.P)/n),e=t.Za(e,i,n),(0,window.isNaN)(e)||(this.ab&&(this.af=e,this.Ha&&this.dispatchEvent("splitterpositionchange")),this.af=e,this.B(64,1)),this}return this.af},t.g.stroke=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return this.i!=o&&(this.i=o,this.B(80,1)),this}return this.i||"none"},t.g.fill=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.na!=l&&(this.na=l,this.B(16,1)),this}return this.na||"none"},t.g.e1=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.Ba!=l&&(this.Ba=l,this.B(16,1)),this}return this.Ba||"none"},t.g.op=function(e){return t.p(e)?(t.da(e)&&(this.Ha=e),this):this.Ha},t.g.sk=function(){return this.Vc||(this.Vc=t.ok()),this.Vc},t.g.dba=function(){this.Ka=!0,K(this).visible(!0);var e=Y(this);this.$a=t.yf(t.Lp.body,"cursor"),e?this.K.Ho(this.af*this.ab.zd()+this.ab.tb()).Io(this.ab.Vb()).Go(0).Fo(this.ab.qd()):this.K.Ho(this.ab.tb()).Io(this.af*this.ab.qd()+this.ab.Vb()).Go(this.ab.zd()).Fo(0)},t.g.ko=function(){var t=this.o.rb(),e=Y(this),i=this.b/2;V(this,e);var n=e?this.af*this.ab.zd()+this.ab.tb():this.af*this.ab.qd()+this.ab.Vb();t=e?t.tb()+t.zd()/2:t.Vb()+t.qd()/2,e?(this.K.Ho(Math.min(n,t)).Go(Math.abs(n-t)),this.G.Ho(t-i)):(this.K.Io(Math.min(n,t)).Fo(Math.abs(n-t)),this.G.Io(t-i))},t.g.cba=function(){this.Ka=!1,K(this).visible(!1);var e=this.o.rb(),i=Y(this);this.Za||V(this,i,!0),this.ba?(e=i?e.left+3-this.ab.left:e.top+3-this.ab.top,i=i?e/(this.ab.width-this.b):e/(this.ab.height-this.b)):(e=i?e.left+e.width/2-this.ab.left:e.top+e.height/2-this.ab.top,i=i?e/this.ab.width:e/this.ab.height),this.position(t.Tm(i,4))},t.g.eba=function(){this.Za=!0,this.G.fill("black")},t.g.aia=function(t){this.dispatchEvent({type:"dblclick",originalEvent:t})},t.g.fba=function(){this.Za=!1,this.Ka||V(this,Y(this),!0),this.G.fill(this.Sb)},t.g.W=function(){if(this.zc()){var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),this.sk().bc()||this.sk().hc(K(this)).hc(W(this)).hc(function(e){return e.G||(e.G=t.mk().Dd(!0).fill(e.na).stroke(e.i)),e.G}(this)),this.J(2)&&(this.sk().parent(e),this.I(2)),this.J(4)&&(this.ab=this.ob(),this.Ha&&this.dispatchEvent({type:"splitterpositionchange",src:"drawing"}),this.B(80),this.I(4)),this.J(16)&&(this.G.stroke(this.i).fill(this.na),this.K.fill(this.Ba).stroke(this.ec),this.o.fill(this.fb).stroke(this.sb),this.I(16)),this.J(64)&&(W(this).oc(1,0,0,1,0,0),this.D!=this.aa&&(e=Y(this)?this.ab.zd():this.ab.qd(),this.aa<=e&&(this.D=this.aa,this.aa>e-this.P&&(this.ea=e-this.aa),this.position(this.af))),this.P!=this.ea&&(e=Y(this)?this.ab.zd():this.ab.qd(),this.ea<=e&&(this.P=this.ea,this.ea>e-this.D&&(this.aa=e-this.ea),this.position(this.af))),q(this),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),q(this),this.I(8)),n&&i.resume()}return this},t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.R=function(){t.sd(this.K,this.o,this.G,this.Vc),this.Vc=this.G=this.o=this.K=null,H.u.R.call(this)},t.H(X,t.wu),t.g=X.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=80|t.wu.prototype.sa,t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.position=function(e){return t.p(e)?(this.af!=e&&(this.af=e,this.B(64,1)),this):this.af},t.g.stroke=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments),r=t.dp(o);return this.i==o&&r==this.D||(this.i=o,this.D=r,this.B(80,1)),this}return this.i||"none"},t.g.e1=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.G!=l&&(this.G=l,this.B(16,1)),this}return this.G||"none"},t.g.op=function(e){return t.p(e)?(t.da(e)&&(this.K=e),this):this.K},t.g.sk=function(){return this.Vc||(this.Vc=t.ok()),this.Vc},t.g.Kaa=function(){this.dispatchEvent("dragstart"),this.P=!0,this.ea=t.yf(t.Lp.body,"cursor"),Q(this).clear()},t.g.ko=function(){var t=this.b.rb();J(this);var e=this.ab.left+this.af+this.D/2;t=t.tb()+t.zd()/2,this.o.clear().moveTo(e,this.ab.top).lineTo(t,this.ab.top).lineTo(t,this.ab.top+this.ab.height).lineTo(e,this.ab.top+this.ab.height).close(),this.f.clear().moveTo(t,this.ab.top).lineTo(t,this.ab.top+this.ab.height),this.dispatchEvent("drag")},t.g.Jaa=function(){this.P=!1,this.o.clear();var t=this.b.rb();this.aa||J(this,!0),this.position(t.left+3-this.ab.left),this.dispatchEvent("dragend")},t.g.cia=function(t){t.preventDefault(),this.oh(t)},t.g.Laa=function(){this.aa=!0,this.f.stroke("2 black")},t.g.Maa=function(){this.aa=!1,this.P||J(this,!0),this.f.stroke(this.ba)},t.g.W=function(){if(this.zc()){var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),this.sk().bc()||this.sk().hc(Q(this)).hc(function(e){return e.b||(e.b=t.qk().fill(e.na).stroke(null),t.Ld(e.b,"start",e.Kaa,!1,e),t.Ld(e.b,"drag",e.ko,!1,e),t.Ld(e.b,"end",e.Jaa,!1,e),t.ru(e,e.b,null,e.Maa,null,e.Laa,null,e.cia)),e.b}(this)).hc(function(e){return e.f||(e.f=t.qk().Dd(!0).stroke(e.i)),e.f}(this)),this.J(2)&&(this.sk().parent(e),this.I(2)),this.J(4)&&(this.ab=this.ob(),this.K&&this.dispatchEvent("splitterpositionchange"),this.B(80),this.I(4)),this.J(16)&&(this.f.stroke(this.i),this.o.fill(this.G),this.b.fill(this.na),this.I(16)),this.J(64)&&((0,window.isNaN)(this.af)&&(this.af=Math.round((this.ab.width-this.D)/2)),this.K&&this.dispatchEvent("splitterpositionchange"),Z(this),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),Z(this),this.I(8)),n&&i.resume()}return this},t.g.R=function(){t.sd(this.o,this.b,this.f,this.Vc),this.Vc=this.f=this.b=this.o=null,X.u.R.call(this)},t.H(tt,t.V),tt.prototype.ra=32770,tt.prototype.sa=t.V.prototype.sa;var Xi={};t.sq(Xi,[[1,"fill",t.Qq],[1,"stroke",t.Pq],[1,"placementStroke",t.Pq],[0,"enabled",t.Zq]]),t.U(tt,Xi),t.g=tt.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.mO),this.Y=null):(this.Y&&t.kr(this.Y,this.mO,this),this.Y=e,t.K(this.Y,this.mO,this))),this):this.Y},t.g.mO=function(e){var i=0;t.X(e,32768)&&(i|=32768),t.X(e,2)&&(i|=2),this.va(i)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){tt.u.U.call(this,e,i),t.Iq(this,Xi,e,i)},t.g.F=function(){var e=tt.u.F.call(this);return t.Tq(this,Xi,e,void 0,void 0,!0),this.ph("enabled")&&null!==e.enabled||delete e.enabled,e},t.g.R=function(){this.Y&&(t.kr(this.Y,this.mO,this),this.Y=null),this.Xb=null,tt.u.R.call(this)},t.H(et,t.od),et.prototype.reset=function(){it(this,null),this.f=this.i=null},et.prototype.R=function(){this.reset(),this.la=null,et.u.R.call(this)},t.H(ot,t.wu),t.g=ot.prototype,t.g.ra=t.wu.prototype.ra|t.KE|2,t.g.sa=208|t.wu.prototype.sa,t.g.nk=function(){return this.bz},t.g.Ic=function(e,i,n,s,a,o){this.i||(this.i=new t.Fw);var r=this.controller.i,l={item:{value:e,type:""},name:{value:e.get("name"),type:"string"},id:{value:e.get("id"),type:"string"},linearIndex:{value:e.j("index")+1,type:"number"}};if(r){if(t.p(i)){r=t.Fc(i);for(var h={},c=["start","end"],u=0;u<r.length;u++){var d=r[u];if(!t.Aa(c,d)){var p=i[d],g="";t.ea(p)?g="number":t.uo(p)?g="percent":t.z(p)&&(g="string"),h[d]={value:p,type:g}}}this.i.Dl(h)}else this.i.Dl({});h=(r=pt(e,n)).CN,(c=gt(this,e))&&(l.rowType={value:c,type:"string"}),l.minPeriodDate={value:e.j("minPeriodDate"),type:"date-time"},l.maxPeriodDate={value:e.j("maxPeriodDate"),type:"date-time"},l.period={value:i,type:""},l.periodIndex={value:null!=n&&0<=n?n:void 0,type:"number"},l.periodStart={value:i?r.start:void 0,type:"date-time"},l.periodEnd={value:i?r.end:void 0,type:"date-time"},i=h?r.EI:l.periodEnd.value||l.maxPeriodDate.value,l.start={value:h?r.EI:l.periodStart.value||l.minPeriodDate.value,type:"date-time"},l.end={value:i,type:"date-time"},l.barBounds={value:e.no("periodBounds",n),type:""}}else n=dt(e),(i=gt(this,e,n))&&(l.rowType={value:i,type:"string"}),l.actualStart={value:e.j("actualStart"),type:"date-time"},l.actualEnd={value:e.j("actualEnd"),type:"date-time"},i=ct(e,n),l.progressValue={value:n.Kd,type:"percent"},l.autoStart={value:i?e.j("autoStart"):void 0,type:"date-time"},l.autoEnd={value:i?e.j("autoEnd"):void 0,type:"date-time"},l.start={value:n.start,type:"date-time"},l.end={value:n.end,type:"date-time"},l.autoProgress={value:i?e.j("autoProgress"):void 0,type:"percent"},l.barBounds={value:e.j("relBounds"),type:""},l.progress={value:n.Kd,type:"percent"},l.baselineProgress={value:n.YR?n.f0:0,type:"percent"},n.BN&&(l.baselineStart={value:n.ZF,type:"date-time"}),n.AN&&(l.baselineEnd={value:n.$K,type:"date-time"});return t.p(s)&&(l.elementType={value:s,type:"string"}),t.p(a)&&(l.hoverRatio={value:a,type:"number"}),t.p(o)&&(l.hoverDateTime={value:o,type:"date-time"}),this.i.lg(e),t.ov(this.i,l)},t.g.P$=t.ia,t.g.Q$=t.ia,t.g.OZ=t.ia,t.g.NZ=t.ia,t.g.PZ=t.ia,t.g.MZ=t.ia,t.g.Uaa=function(e){if(!this.zo)if(this.Cm)if((e=this.rl(e))&&!this.Gb.altKey){var i=t.Qc(e);i.type="rowMouseUp",i=this.jQ||this.Gb.dispatchEvent(i),this.jQ=!1;var n=this.Gb.dispatchEvent(e);i&&n&&(this.Gb.v5(e),this.lQ=!0)}else this.Gb.jJ(e);else this.Cm=!0;this.zo=!1},t.g.k_=function(t){if(this.lQ)this.lQ=!1;else{var e=this.rl(t);this.OZ(e,t),e&&this.Cm&&this.Gb.dispatchEvent(e)&&this.Gb.z5(e),e||this.Ua().Lc()}},t.g.Taa=function(t){switch(t.type){case"dblclick":t=this.rl(t),this.MZ(t),this.Cm?t&&this.Gb.dispatchEvent(t)&&this.Gb.w5(t):this.Cm=!0;break;case"mousedown":case"touchstart":this.j_(t);break;case"mouseup":case"touchend":t=this.rl(t),this.PZ(t),this.Cm&&t&&this.Gb.dispatchEvent(t)&&(this.Gb.TO(t),this.jQ=!0),this.Ua().Lc();break;case"contextmenu":this.Gb.dispatchEvent(t)}},t.g.Vaa=function(t){this.Cm&&(t=this.rl(t))&&this.Gb.dispatchEvent(t)&&this.Gb.A5(t)},t.g.j_=function(t){var e=this.rl(t);this.NZ(e),this.Cm&&(t.preventDefault(),e&&this.Gb.dispatchEvent(e)&&this.Gb.iJ(e))},t.g.v5=function(t){this.UO(t)},t.g.w5=function(t){this.SO(t)},t.g.UO=function(e){this.Cm&&Mt(this,e.item)&&((e=t.Qc(e)).type="rowSelect",this.Gb.dispatchEvent(e))},t.g.SO=function(t){if((t=t.item)&&ct(t)){var e=!t.j("collapsed");this.Gb.dispatchEvent({type:"rowcollapseexpand",item:t,collapsed:e})&&t.j("collapsed",e)}},t.g.z5=function(e){if(!this.vi){this.Gb.ro(e.hoveredIndex,e.startY,e.endY);var i=this.Ua(),n=this.Ic(e.item,e.period,e.periodIndex);t.Ow(i,e.originalEvent.clientX,e.originalEvent.clientY,n)}},t.g.A5=function(){this.Gb.ro()},t.g.TO=t.ia,t.g.iJ=t.ia,t.g.wW=t.ia,t.g.rl=function(e){if(this.mp.length){var i,n=this.controller.D,s=this.controller.Cg(),a=e.type;switch(a){case"mouseout":a="rowMouseOut",0<=this.ea&&(i=n[s+this.ea]);break;case"mouseover":a="rowMouseOver";break;case"mousemove":case"touchmove":a="rowMouseMove";break;case"mousedown":case"touchstart":a="rowMouseDown";break;case"mouseup":case"touchend":a="rowMouseUp";break;case"click":a="rowClick";break;case"dblclick":a="rowDblClick"}a={type:a,actualTarget:e.target,target:this,originalEvent:e};var o=this.fa.top+this.G+1,r=this.fa.top+t.Zj(this.O().Ja()).y+this.G;if(e=e.clientY-r,r=this.mp.length?this.mp[this.mp.length-1]:0,i)a.item=i;else{if(0>e||e>r)return null;i=t.Na(this.mp,e);var l=(o+=r=(this.ea=i=0<=i?i:~i)?this.mp[i-1]:0)+(this.mp[i]-r-this.Tn);a.item=n[s+i],a.startY=o,a.endY=l,a.hoveredIndex=this.ea,a.index=s+i,a.itemHeightMouseRatio=(e-r)/(this.mp[i]-r)}if(a.item)return(n=gt(this,a.item))&&(a.rowType=n),a}return null},t.g.uf=function(e){return this.Vi||(this.Vi=new tt,t.W(this,"edit",this.Vi),t.K(this.Vi,this.iO,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Vi.N(e),this):this.Vi},t.g.iO=function(e){t.X(e,2)&&jt(this)},t.g.bs=function(t){xt(this).clip(t),this.oB&&this.oB.clip(t),this.NB&&this.NB.clip(t),yt(this).clip(t)};var Ji={};t.sq(Ji,[[1,"backgroundFill",t.Qq],[1,"rowFill",t.Nq],[1,"rowStroke",t.Nq],[1,"rowEvenFill",t.Nq],[1,"rowOddFill",t.Nq],[1,"rowHoverFill",t.Nq],[1,"rowSelectedFill",t.Nq]]),t.U(ot,Ji);var Zi={};t.g=ot.prototype,t.g.dH=function(t,e){var i=this.g(t);return null!=i?i:this.g(e)},t.g.sc=function(t,e,i){return i("rowSelectedFill"==t||"rowHoverFill"==t||"selectedElementFill"==t||"selectedElementStroke"==t?this.g(t):this.dH(t,-1!=t.indexOf("Fill")?"baseFill":"baseStroke"))},t.g.Ge=function(e,i,n,s,a,o){var r=this.Gb.cc();switch(e){case"baseFill":e=r.nc(0);break;case"baseStroke":e=t.Pl(r.nc(0));break;case"progressFill":e=r.nc(1);break;case"progressStroke":e={color:"#fff",opacity:1e-5};break;case"baselineFill":e=t.Pl(r.nc(1),.7);break;case"baselineStroke":e=t.Ql(t.Pl(r.nc(1),.7));break;case"parentFill":e=r.nc(4);break;case"parentStroke":e=t.Pl(r.nc(4));break;case"milestoneFill":e=r.nc(9);break;case"milestoneStroke":e=t.Ql(r.nc(9));break;case"selectedElementFill":e=r.nc(2);break;case"selectedElementStroke":e=t.Ql(r.nc(2));break;case"selectedConnectorStroke":e=t.Wl(t.Pl(r.nc(2)),2);break;case"rowFill":e=t.zm("ganttBase").rowFill;break;case"rowHoverFill":e=t.zm("ganttBase").defaultRowHoverFill;break;case"rowSelectedFill":e=t.zm("ganttBase").defaultRowSelectedFill;break;default:e="blue"}return e={sourceColor:e},null!=i&&(t.p(s)?(e.fromItem=i,e.fromItemIndex=i.j("index"),e.toItem=n,e.toItemIndex=n.j("index"),e.connType=s):(e.item=i,e.itemIndex=i.j("index")),t.p(a)&&(t.p(o)?(i=i.get("periods")[a],n=n.get("periods")[o],e.fromPeriod=i,e.fromPeriodIndex=a,e.toPeriod=n,e.toPeriodIndex=o):(o=i.get("periods")[a],e.period=o,e.periodIndex=a))),e},t.g.Yi=function(){return{sourceHatchFill:this.Eh()}},t.g.Eh=function(){return t.Yb("diagonal-brick")},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(128,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(128,1)},t.g.d1=function(e){t.J(e.currentTarget,t.ig)&&!this.Vg&&(this.Vg=new Nt(this.Vc,this),this.Vg.wa("drag",this.ko,!1,this),this.Vg.wa("end",this.i_,!1,this),this.Vg.lk(e.kf))},t.g.ko=function(e){if(this.vi=!0,this.uf().g("enabled")&&!this.nf&&(bt(this,!0),this.Cm=!1,this.Gb.ro(),this.Ua().Lc(),e=this.rl(e))){var i=e.item,n=e.itemHeightMouseRatio,s=e.startY,a=e.endY;this.oj?(i&&i!=this.oj&&!i.ND(this.oj)?.2>n||.8<n?this.Gb.Iv(.2>n?s:a,void 0,"auto"):lt(i)?this.Gb.Iv(void 0,void 0,"not-allowed"):this.Gb.Iv(s,a,"auto"):this.Gb.Iv(void 0,void 0,"not-allowed"),this.P$(e)):(e=this.fa.top+t.Zj(this.O().Ja()).y+this.G,this.Gb.Iv(e+this.mp[this.mp.length-1],void 0,"auto"))}this.Ua().Lc(),this.zo=!0},t.g.i_=function(e){if(this.uf().enabled()&&!this.nf){var i=this.rl(e),n=this.controller.data();if(this.Q$(i),i){e=i.item;var s=i.hoveredIndex;s=this.controller.Cg()+s;var a=this.controller.D,o=.2>(i=i.itemHeightMouseRatio);if(i=.8<i,this.oj&&e&&e!=this.oj&&!e.ND(this.oj))if(o||i)if(o?(o=a[s-1],s=e):(o=e,s=a[s+1]),o&&s){a=o.j("depth");var r=s.j("depth");i?(n=e.getParent()||n).Eg(this.oj,n.Kf(e)+1):a==r?(e=(n=s.getParent()||s.Pq()).Kf(s),(i=this.oj.getParent()||this.oj.Pq())==n&&i.Kf(this.oj)<e&&(e=Math.max(0,e-1)),n.Eg(this.oj,e)):a<r?o.Eg(this.oj,0):o.ND(this.oj)||(n=e.getParent()||n,e=n.Kf(e),n.Eg(this.oj,e))}else s?(n=s.Pq()).Eg(this.oj,0):o&&(e=(n=o.getParent()||o.Pq()).Kf(o)+1,n.Eg(this.oj,e));else lt(e)||e.hc(this.oj)}else this.oj&&(i=this.fa.top+t.Zj(this.O().Ja()).y+this.G,e.clientY<i?n.Eg(this.oj,0):n.hc(this.oj));this.Gb.Iv(void 0,void 0,"auto"),this.oj=null}this.nf=!1,t.Dj((function(){this.zo=!1}),10,this),this.Vg.reset(),this.vi=!1,this.Cm=!0,(0,window.clearInterval)(this.Vn),this.Vn=null,bt(this,!1)},t.g.oT=function(){var e,i,n=this.fa.top+this.G+1,s=this.controller.km(),a=this.controller.Cg(),o=this.controller.Nj(),r=this.controller.D,l=n-s;this.Gb.ro(),this.mp.length=0,Tt(this).clear(),Dt(this).clear(),Ot(this).clear(),Pt(this).clear();for(var h=0;h<this.Hd.length;h++)this.Hd[h].clear(),t.p(this.Od[h])&&this.Od[h].clear();if(h=!1,this.Gb.na&&(e=this.Gb.na.Jj)&&(i=this.Gb.na.mL))for(var c in this.Ys=this.Ys||{},h=!0,e){if(!(c in this.Ys)){var u=mt(this).path();u.stroke(null).zIndex(5),this.Ys[c]=u}this.Ys[c].clear()}for(c=this.Tn%2&&"svg"===t.kk?.5:0,u=a;u<=o;u++){var d=r[u];if(!d)break;var p=u==a;l=p?n:l;var g=w(this.controller,d);if(g=p?g-s+1:g,t.D(this.g("rowFill"))){var f=$t(this,u);p=l+g,f.moveTo(this.fa.left,l).lineTo(this.fa.left+this.f,l).lineTo(this.fa.left+this.f,p).lineTo(this.fa.left,p).close()}else f=u%2?this.Ba:this.Ha,p=l+g,t.cp(f.fill())||f.moveTo(this.fa.left,l).lineTo(this.fa.left+this.f,l).lineTo(this.fa.left+this.f,p).lineTo(this.fa.left,p).close();if(d.j("selected")&&(it(this.Gb.nk(),d),this.$a.clear().moveTo(this.fa.left,l).lineTo(this.fa.left+this.fa.width,l).lineTo(this.fa.left+this.fa.width,p).lineTo(this.fa.left,p).close()),h){g=this.Gb.na.state;for(var b=0;b<i.length;b++)if((f=(0,i[b])(d,g))&&f in e){d=e[f],(f=this.Ys[f]).moveTo(this.fa.left,l).lineTo(this.fa.left+this.f,l).lineTo(this.fa.left+this.f,p).lineTo(this.fa.left,p).close().fill(d);break}}l=p+this.Tn,t.D(this.g("rowStroke"))?(d=Math.floor(l-this.Tn/2)+c,Lt(this,u).moveTo(this.fa.left,d).lineTo(this.fa.left+this.f,d+1e-4)):(d=Math.floor(l-this.Tn/2)+c,this.Za.moveTo(this.fa.left,d).lineTo(this.fa.left+this.f,d)),d=l-n,this.mp.push(d),this.M6=d}return n=new t.I(this.fa.left,this.fa.top-1,this.fa.width,l-this.fa.top+1),this.bs(n),n},t.g.Oy=function(e){At(this);var i=e.deltaX,n=e.deltaY,s=0<Math.abs(n),a=0<Math.abs(i);(t.RC||t.gd)&&(i*=18,n*=18);var l=!t.Lp.body.scrollLeft,h=this.tq(),c=N(this.controller),u=!1,d=!1;s&&(d=0>n,s=o(c),c=r(c),d=!(!s&&1==c)&&(0<s&&1>c||!s&&!d&&1!=c||1==c&&d&&0!=s)),a&&(a=0>i,u=o(h),h=r(h),u=a?u||1!=h?0<u&&1>h||1==h&&0!=u||!u&&l:l:!(!u&&1==h)&&(0<u&&1>h||!u&&1!=h)),(d||u)&&(e.preventDefault(),this.scroll(i,n))},t.g.AW=function(e){t.X(e,2)&&this.va(1)},t.g.Bp=function(){this.Ua().W()},t.g.kv=t.ia,t.g.fs=t.ia,t.g.hv=function(e){return t.p(e)?(S(this.controller,e),this):S(this.controller)},t.g.Lj=function(e){if(e&&this.B(64),!this.zc())return this;var i=this.O();if((e=i?i.Ja():null)&&e.suspend(),!vt(this).bc()){if(this.sb=this.Vc.rect(),this.sb.fill(this.g("backgroundFill")).stroke(null).zIndex(10),this.bj=this.Vc.rect(),this.bj.fill(t.bm).stroke(null).zIndex(20),this.nV(this.Vc),this.pu){var n=N(this.controller);t.K(n.O(Ct(this)),(function(e){t.X(e,8)?this.B(4,1):n.W()}),this)}var s=this.tq();t.K(s.O(Ct(this)),(function(e){t.X(e,1)&&s.W()}),s),this.Vc.Ce("mousedown",this.d1,!1,this),this.Vc.Ce("touchstart",this.d1,!1,this),t.Op()&&this.Vc.Ce("mousemove",(function(){Ut(this),_t(this)}),!1,this),this.mN(),this.Ap=e.rect(),this.Ap.stroke("none").fill("#000 0.1").zIndex(1e10)}if(this.J(2)&&(this.Vc.parent(i),this.I(2)),this.J(4)&&(i=this.ob(),this.fa=t.Xo(i,0),this.Vc.clip(this.fa),this.sb.Qf(this.fa),this.bj.Qf(this.fa),this.f=this.fa.width,this.K7&&this.Ap.Qf(this.fa),i=this.fa.top+this.G+.5,Ft(this).clear().moveTo(this.fa.left,i).lineTo(this.fa.left+this.f,i+1e-4),this.pu&&(i=(n=N(this.controller)).DC(),n.Ta(this.fa.left+this.fa.width-i-1,this.fa.top+this.uk()+i+1,i,this.fa.height-this.uk()-2*i-2)),i=(s=this.tq()).DC(),s.Ta(this.fa.left+i,this.fa.top+this.fa.height-i-1,this.fa.width-2*i,i),this.$y=!0,this.fs(),this.I(4)),this.J(64)&&(this.Ua().Lc(),this.$y=!0,this.WW(),this.I(64)),this.J(16)){this.sb.fill(this.g("backgroundFill"));var a=this.g("rowFill");if(i=this.controller.D,t.D(a))for(var o=0;o<i.length;o++)a=i[o],a=It("rowFill",1)(this,0,a),$t(this,o).fill(a);else{o=It("rowOddFill",1)(this,0),o=t.cp(o)?a:o;var r=It("rowEvenFill",1)(this,0);r=t.cp(r)?a:r,Dt(this).fill(o),Tt(this).fill(r)}if(t.D(this.g("rowSelectedFill"))||(a=this.Gb.nk().b,a=It("rowSelectedFill",1)(this,0,a),Ot(this).fill(a)),a=this.g("rowStroke"),t.D(a)){for(o=0;o<i.length;o++)a=i[o],a=It("rowStroke",2)(this,0,a),Lt(this,o).stroke(a);var l=It("rowStroke",2)(this,0,i[0])}else t.z(a)?l=a:t.C(a)&&a.color&&(l=a.color),Pt(this).stroke(a);l&&Ft(this).stroke(l),this.kv(),jt(this),this.I(16)}return this.J(8)&&(vt(this).zIndex(this.zIndex()),this.I(8)),this.J(128)&&(this.$y=!0,this.I(128)),this.dY(),this.$y&&(this.oT(),this.O4(),this.$y=!1),this.Kn(),this.T3(),e&&e.resume(),this.pu&&e&&!this.yo&&e.Ce("stagerendered",(function(){Ut(this),_t(this)}),void 0,this),this},t.g.mN=t.ia,t.g.nV=t.ia,t.g.oE=t.ia,t.g.pI=function(e){(this.K7=e)?this.Ap.Qf(this.fa):this.Ap.Qf(new t.I(0,0,0,0))},t.g.ro=function(e,i,n){var s=!1,a=!1;t.p(e)&&t.p(i)&&t.p(n)?this.dn==i&&this.Dk==n||(this.ea=e,this.dn=i,this.Dk=n,s=0<=this.ea):(0<=this.ea&&(this.ea=-1,this.Dk=this.dn=window.NaN),a=!0),s?(e=this.controller.D[e],e=It("rowHoverFill",1)(this,0,e),kt(this).clear().fill(e).moveTo(this.fa.left,this.dn).lineTo(this.fa.left+this.fa.width,this.dn).lineTo(this.fa.left+this.fa.width,this.Dk).lineTo(this.fa.left,this.Dk).close()):a&&kt(this).clear()},t.g.Iv=function(e,i,n){var s=Gt(this);t.p(e)?t.p(i)?s.clear().moveTo(this.fa.left,e).lineTo(this.fa.left+this.f,e).lineTo(this.fa.left+this.f,i).lineTo(this.fa.left,i).close().stroke(this.uf().g("stroke")):s.clear().moveTo(this.fa.left,e).lineTo(this.fa.left+this.f,e).stroke(this.uf().g("placementStroke")):s.clear(),t.p(n)&&t.uf(t.Lp.body,"cursor",n)},t.g.fT=function(e){var i=this.O();if(i){var n=t.Zj(i.Ja());i=this.fa.top+n.y+this.G+10;var s=n.y+this.fa.height-10-10,a=(n=n.x+this.fa.left+10)+this.fa.width-10-10,o=e.clientX,r=e.clientY;this.bx=this.Fu=0,(o<n||o>a)&&(this.Fu=o-n),(r<i||r>s)&&(this.bx=r-i);var l=this;!this.vi||this.Vn||this.nf||(this.Vn=(0,window.setInterval)((function(){l.wW(e)}),100))}},t.g.XS=function(t){this.nf=t},t.g.AG=function(){},t.g.WW=t.ia,t.g.O4=t.ia,t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.dY=function(){},t.g.Kn=t.ia,t.g.T3=t.ia,t.g.jJ=function(t){this.controller.data()&&(this.Gb==this&&this.dispatchEvent({type:"rowSelect",actualTarget:t?t.target:this,target:this,originalEvent:t,item:null,prevItem:this.Gb.nk().b}),this.Gb.nk().reset(),this.B(64,1))},t.g.data=function(e){var i=this.controller.data();return t.p(e)?(e!=i&&t.J(e,t.au)&&this.controller.data(e),this):i},t.g.W=function(){return this.md||(this.fa&&!this.fa.height&&this.fa.height||(this.fa=this.ob()),M(E(this.controller,this.fa.height-this.G-1).Tn(this.Tn))),this},t.g.Nj=function(e){return t.p(e)?(this.controller.Nj(e),this):this.controller.Nj()},t.g.Saa=function(){return this.controller.D},t.g.Cg=function(e){return t.p(e)?(this.controller.Cg(e),this):this.controller.Cg()},t.g.uk=function(e){return t.p(e)?(this.G!=e&&(this.G=e,this.fa||(this.fa=this.ob()),this.pu&&E(this.controller.ka(),this.fa.height-e-1).da(!1),this.B(4,1)),this):this.G},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),t.W(this,"tooltip",this.gb),t.K(this.gb,this.Bp,this),t.Aw(this.gb,this)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.OM=function(t){return this.Ua(t)},t.g.km=function(e){return t.p(e)?(this.controller.km(e),this):this.controller.km()},t.g.R=function(){t.Yd(window.document,"mousemove",this.fT,!1,this),this.Vi&&t.kr(this.Vi,this.iO,this),this.gb&&t.kr(this.gb,this.Bp,this),this.Gb.bg&&(this.Gb.bg.Bl(),t.qd(this.Gb.bg)),t.kr(this.controller,this.AW,this),this.Vg&&(this.Vg.gc("drag",this.ko,!1,this),this.Vg.gc("end",this.i_,!1,this)),t.sd(this.Fa,this.Vi,this.gb,this.bj,this.sb,this.Vg,this.ud,this.yg,this.Za,this.$a,this.D,this.Ba,this.Ha,this.me,this.Sb,this.Uc,this.fb,this.ec,this.oB,this.NB,this.Zq,this.Vc,this.bz),this.bz=this.Vi=this.Vc=this.Zq=this.NB=this.oB=this.ec=this.fb=this.Uc=this.Sb=this.me=this.Ha=this.Ba=this.D=this.$a=this.Za=this.yg=this.ud=this.Vg=this.controller=this.sb=this.bj=this.gb=null,ot.u.R.call(this)},t.g.F=function(){var e=ot.u.F.call(this);return(e.isStandalone=this.pu)&&(e.controller=this.controller.F(),e.defaultRowHeight=this.hv(),e.palette=this.cc().F()),t.Tq(this,Ji,e,void 0,void 0,!0),e.headerHeight=this.G,e.edit=this.uf().F(),e},t.g.U=function(e,i){ot.u.U.call(this,e,i),(this.pu="isStandalone"in e?e.isStandalone:"controller"in e)&&"controller"in e&&(this.controller=new y(void 0),t.K(this.controller,this.AW,this),this.controller.N(e.controller),this.hv(e.defaultRowHeight),this.cc(e.palette)),t.Iq(this,Ji,e,i),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip),this.uk(e.headerHeight),"edit"in e&&this.uf().ga(!!i,e.edit)},t.H(Nt,t.ag),Nt.prototype.ar=function(){this.deltaY=this.deltaX=0},Nt.prototype.ls=function(t,e){if(this.b.Gb.altKey||!this.b.uf().enabled()&&!this.b.nf){var i=this.x-t,n=this.y-e;this.x=t,this.y=e,this.b.scroll(i,n)}},Nt.prototype.reset=function(){this.y=this.x=0},t.H(Bt,t.Jp),Bt.prototype.zE=function(){Bt.u.zE.call(this),this.b.altKey=!1},Bt.prototype.WM=function(e,i){Bt.u.WM.call(this,e,i),t.Ld(t.ll,["visibilitychange","blur"],this.zE,!1,this)},Bt.prototype.wH=function(){Bt.u.wH.call(this),t.Yd(t.ll,["visibilitychange","blur"],this.zE,!1,this)},t.H(Rt,t.Ag),t.g=Rt.prototype,t.g.reset=function(){this.fill(null).stroke(null).clear(),this.KS=null,this.type=void 0,this.label&&(this.label.Hi(),this.label.enabled(!1),this.label.W()),this.ub=this.item=this.PV=this.label=null,this.Fq=void 0},t.g.KS=null,t.g.label=null,t.g.PV=null,t.g.item=null,t.g.ub=null,t.g.Fq=void 0,t.H(Ht,t.Y),t.g=Ht.prototype,t.g.sa=208|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.state=function(e){return t.p(e)?(this.dc!=e&&(this.dc=e,this.B(20,1)),this):this.dc},t.g.Ve=function(){return 2==this.dc},t.g.po=function(t){!this.Ve()&&this.oh(t)&&this.state(1)},t.g.hg=function(t){!this.Ve()&&this.oh(t)&&this.state(0)},t.g.Ds=function(t){this.oh(t)&&(this.Ve()?this.state(1):this.state(2))},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.K(this.Wa,this.fm,this)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.fm=function(e){t.X(e,2)&&this.B(4,9)};var Qi={};t.sq(Qi,[t.Z.I7,t.Z.jK,t.Z.hK]),t.U(Ht,Qi);var tn,en=[["cursor",128,1],["width",4,1],["height",4,1]],nn=t.uq(),sn={};t.T(sn,[["background",0,0],["content",20,1]]),t.Eq(sn,20,16,1,1),tn=sn,t.Gq(Ht,t.Fc(tn),"normal"),t.g=Ht.prototype,t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.W=function(){if(!this.zc())return this;this.ka(),this.Aa||(this.Aa=t.ok(),this.Ia=new t.yu,this.Ia.ga(!0,this.sc("background")),this.Ia.zIndex(0),this.Ia.O(this.Aa),this.Ia.kb(this),this.fu=this.Aa.rect().stroke(null).fill(t.bm).zIndex(999),t.ru(this,this.fu,this.po,this.hg,this.Ds,null)),this.ad||(this.ad=t.sk().zIndex(1)),this.Ed||(this.Ed=t.qk().zIndex(1).stroke(null).fill(null));var e=this.sc("content");return this.yN=t.z(e)||t.ea(e),this.m3=t.D(e),this.Ed.parent(null),this.ad.parent(null),this.yN?this.ad.parent(this.Aa):this.m3&&(this.xea=e,this.Ed.parent(this.Aa)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(128)&&(this.fu.cursor(this.g("cursor")),this.I(128)),this.J(16)&&this.yN&&this.bi(),this.J(4)&&(this.Ox(),this.B(80),this.I(4)),this.J(16)&&(this.yN&&this.$x(),this.I(16)),this.J(64)&&(this.XL(),this.I(64)),this.da(!1),this},t.g.fo=function(t,e,i,n){var s=this.sc("adjustFontSize");if(s)if(s.width&&s.height){if(t>i||e>n)return 1;if(t<i||e<n)return-1}else if(s.width){if(t>i)return 1;if(t<i)return-1}else if(s.height){if(e>n)return 1;if(e<n)return-1}return 0},t.g.dS=function(e,i){var n=this.sc("minFontSize"),s=this.sc("maxFontSize"),a=Math.round((s+n)/2),o=s,r=t.sk();r.Cd("aria-hidden","true"),this.bi(r),r.fontSize(s);var l=r.rb();if(0>=(l=this.fo(l.width,l.height,e,i)))return s;for(r.fontSize(a),l=r.rb(),s=l=this.fo(l.width,l.height,e,i);n!=o;){if(0>l)n=Math.min(a+1,o),a+=Math.floor((o-a)/2);else{if(!(0<l))break;o=Math.max(a-1,n),a-=Math.ceil((a-n)/2)}if(r.fontSize(a),l=r.rb(),0>=s*(l=this.fo(l.width,l.height,e,i)))break}if(!l)return t.qd(r),a;do{a+=s,r.fontSize(a),l=r.rb(),l=this.fo(l.width,l.height,e,i)}while(0>s*l);return t.qd(r),a},t.g.jC=function(){var t=this.sc("adjustFontSize");return t&&(t.width||t.height)},t.g.$x=function(){if(this.jC()){var t=this.dS(this.Oi,this.Ni);this.ad.fontSize(t)}this.ad.x(this.Lg),this.ad.y(this.Mg-1),this.ad.clip(this.Ll)},t.g.XL=function(){this.Ia.ka(),this.Ia.ja(this.Ll),this.Ia.ga(!1,this.sc("background")),this.Ia.W(),this.Ia.da(!1)},t.g.vg=function(e){t.X(e,1)&&(e.target.I(4294967295),this.va(1))},t.g.bh=function(){return this.BP[this.dc]},t.g.sc=function(e){if("background"==e){e={};var i=t.Ga(e,this.YK[this.dc]);t.Sc.apply(null,i)}else e=t.ir.call(this,e);return e},t.g.bi=function(e){var i=e||this.ad;if(i.color(this.sc("fontColor")),i.opacity(this.sc("fontOpacity")),i.Hm(this.sc("selectable")),i.Dd(this.sc("disablePointerEvents")),this.J(4)||e){e=this.sc("content");var n=this.sc("useHtml");t.p(e)&&(n?i.htmlText(e):i.text(e)),i.fontFamily(this.sc("fontFamily")),i.fontStyle(this.sc("fontStyle")),i.fontVariant(this.sc("fontVariant")),i.fontWeight(this.sc("fontWeight")),i.fontSize(this.sc("fontSize")),i.er(this.sc("fontDecoration")),i.direction(this.sc("textDirection")),i.Xu(this.sc("wordBreak")),i.wordWrap(this.sc("wordWrap")),i.letterSpacing(this.sc("letterSpacing")),i.lineHeight(this.sc("lineHeight")),i.textIndent(this.sc("textIndent")),i.textShadow(this.sc("textShadow")),i.vAlign(this.sc("vAlign")),i.Bm(this.sc("hAlign")),i.textOverflow(this.sc("textOverflow"))}},t.g.Ox=function(){var e,i,n=this.ja(),s=this.g("width"),a=this.g("height"),o=0,r=0;if(n){var l=n.width,h=n.height;if(null!=s?(this.Oi=e=t.L(s,l),o=Math.abs(e),n=!1):(e=0,n=!0),null!=a){this.Ni=i=t.L(a,h),r=Math.abs(i);var c=!1}else i=0,c=!0}else t.Do(s)?(n=!0,e=0):(n=!1,this.Oi=e=t.N(s),o=Math.abs(e)),t.Do(a)?(c=!0,i=0):(c=!1,this.Ni=i=t.N(a),r=Math.abs(i));var u=t.Sm(this.af);u.x=l?t.L(u.x,l):0,u.y=h?t.L(u.y,h):0,this.yN&&(l=this.padding(),this.ad.width(null),this.ad.height(null),n?(this.nn=e+=this.ad.rb().width,this.Oi=l.Lk(e)):this.nn=l.Ng(o),this.ad.width(this.nn),c?(this.ln=i+=this.ad.rb().height,this.Ni=l.$j(i)):this.ln=l.Yh(r),this.ad.height(this.ln),this.Lg=t.L(l.g("left"),this.Oi),this.Mg=t.L(l.g("top"),this.Ni),this.Lg+=u.x,this.Mg+=u.y),this.m3&&(s={path:this.Ed,width:s,height:a,state:this.Ve()?"selected":1==this.dc?"hovered":"normal"},this.xea.call(s,this.Ed),s=this.Ed.rb(),n&&(this.Oi=s.left+s.width),c&&(this.Ni=s.top+s.height),this.Ed.oc(1,0,0,1,u.x,u.y)),this.Ll=new t.I(u.x,u.y,this.Oi,this.Ni),this.fu.Qf(this.Ll)},t.g.position=function(e){return t.p(e)?(this.af=e,this.B(4,9),this):this.af},t.g.F=function(){var e=Ht.u.F.call(this);return t.Tq(this,Qi,e,"Button"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.padding=this.padding().F(),e},t.g.U=function(e,i){Ht.u.U.call(this,e,i),t.Iq(this,Qi,e,i),this.padding().ga(!!i,e.padding),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.R=function(){t.sd(this.fu,this.ad,this.Ed,this.Ia,this.Aa,this.Wa),this.Wa=this.Aa=this.Ia=this.Ed=this.ad=this.fu=null,t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,Ht.u.R.call(this)};var an=Ht.prototype;an.normal=an.Qa,an.hovered=an.lb,an.selected=an.selected,an.padding=an.padding,t.H(zt,Ht),zt.prototype.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this.ca,"background",this.ca.background()),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this.za,"background",this.za.background()),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{}),t.W(this.Ea,"background",this.Ea.background())},zt.prototype.Ds=function(e){if(this.kb(null),this.oh(e)){this.Ve()?this.state(1):this.state(2),e=this.te;var i=!this.Ve(),n=e.controller.D[this.b];if(n){var s={item:n,collapsed:i};n.get("anychartIsLoadable")&&!n.bc()?(s.type="ganttloaddata",i=!!t.p(i)&&i,n.j("collapsed",i),t.Dp(e.Gb,s)):n.bc()&&(s.type="rowcollapseexpand",e.Gb.dispatchEvent(s)&&n.j("collapsed",i))}}this.kb(this.te)},t.H(Vt,t.Y),Vt.prototype.sa=4048|t.Y.prototype.sa,Vt.prototype.ra=t.Y.prototype.ra|t.KE|t.LE|4096;var on={};t.rq(on,0,"width",t.br),t.rq(on,0,"defaultWidth",t.Bq),t.rq(on,0,"collapseExpandButtons",t.Dq),t.rq(on,0,"depthPaddingMultiplier",t.Bq),t.U(Vt,on),t.g=Vt.prototype,t.g.tka=function(e,i){var n=t.z(i)?function(t,e){if(!t.P[e])switch(e){case"direct-numbering":t.P[e]={formatter:t.$E,width:50};break;case"text":t.P[e]={formatter:t.$E,width:170};break;case"financial":t.P[e]={formatter:t.m7,textStyle:{hAlign:"right"},width:90};break;case"percent":t.P[e]={formatter:t.r7,textStyle:{hAlign:"right"},width:50};break;case"date-common-log":t.P[e]={formatter:te("dd/MMM/yyyy"),textStyle:{hAlign:"right"},width:90};break;case"date-iso-8601":t.P[e]={formatter:te("yyyy-MM-dd"),textStyle:{hAlign:"right"},width:90};break;case"date-us-short":t.P[e]={formatter:te("M/dd/yyyy"),textStyle:{hAlign:"right"},width:90};break;case"date-dmy-dots":t.P[e]={formatter:te("dd.MM.yy"),textStyle:{hAlign:"right"},width:90};break;default:t.P[e]={formatter:t.$E,width:90}}return t.P[e]}(this.te,i):i;if(t.C(n)){this.ka();var s=n.formatter,a=n.width;n=n.textStyle,t.p(s)&&this.labels().format((function(){return s(this.item.get(e))})),t.p(a)&&(this.width(a),this.defaultWidth(a)),t.p(n)&&this.labels(n),this.da(!0)}return this},t.g.kea=function(){return""},t.g.yG=t.ia,t.g.Zda=function(e){t.X(e,16)&&(qt(this),e=2048,(n(this.labels())||this.VD!=this.yG)&&(e|=1024),t.sd(this.Lw),this.Lw.length=0,this.B(e))},t.g.Uw=function(){var e;if(this.Zr=this.te.controller.Zr,t.Op()){var i=this.te.Mw,n=[];for(e=i.first;e<=i.sw;e++)this.ye[e]||(this.ye[e]=new t.Ix),n.push(this.ye[e]);return n}if(!this.ye.length)for(e=0;e<this.Zr.length;e++)i=new t.Ix,this.ye.push(i);return this.ye},t.g.Hx=function(e){var i,n=this.VD!=this.yG;if(t.Op()){var s=this.te.Mw;for(i=s.first;i<=s.sw;i++)Wt(this,i,n,e)}else for(i=0;i<this.ye.length;i++)Wt(this,i,n,e)},t.g.ma=function(){return this.Ad},t.g.labels=function(e){return this.zj||(this.zj=new t.Hx,this.zj.Ga("ganttDefaultSimpleLabelsSettings"),0==this.Ad?this.zj.Ga({format:"{%linearIndex}"}):1==this.Ad&&this.zj.Ga({format:"{%name}"}),t.K(this.zj,this.lI,this)),t.p(e)?(this.zj.N(e),this.B(128,1),this):this.zj},t.g.lI=function(e){var i=0,n=1;t.X(e,1)&&(i|=512,t.Op()&&(n|=4096)),t.X(e,8)&&(i|=1024,n|=4096),t.X(e,2)&&(i|=128,n|=4096),t.X(e,32768)&&(i|=128,this.zj.enabled()&&(n|=4096)),t.Op()&&4096&n&&(this.te.Mw.reset=!0,_(this.te.controller),this.te.Gb.dispatchEvent("workingcancel"),this.I(i)),this.B(i,n)},t.g.y3=function(e){return t.p(e)?(this.VD=e||this.yG,t.sd(this.Lw),this.Lw.length=0,this.B(1024,1),this):this.VD},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),this.jb.ka(),this.jb.O(Kt(this)).margin(0),this.jb.da(!1),t.K(this.jb,this.Mq,this),this.jb.kb(this)),t.p(e)?(this.ka(),this.jb.N(e),this.jb.O(Kt(this)),this.da(!0),this):this.jb},t.g.Mq=function(e){t.X(e,1)&&this.te.B(16,9)},t.g.sk=function(){return this.Vc||(this.Vc=t.ok()),this.Vc},t.g.position=function(e){return t.p(e)?(this.af&&this.af.x==e.x&&this.af.y==e.y||(this.af=e,this.ab=null,this.B(4,9)),this):this.af},t.g.height=function(e){return t.p(e)?(this.Jf!=e&&(this.Jf=e,this.ab=null,this.B(4,9)),this):this.Jf},t.g.gU=function(){return this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.Lf},t.g.remove=function(){this.Vc&&this.Vc.parent(null),this.te.B(512,1)},t.g.Ox=function(){if(this.ab)return this.ab;var e=this.te.ob(),i=t.L(this.g("width")||0,e.width);i=Math.max(hn,i);var n=t.L(this.Jf||0,e.height),s=t.Sm(this.af);return this.ab=new t.I(e.left+s.x,e.top+s.y,i,n)},t.g.ob=function(){return this.Ox()},t.g.Ada=function(e){t.X(e,1)&&this.B(256,1)},t.g.W=function(){if(this.zc()){var e,i,n=this.O(),s=n?n.Ja():null,a=s&&!s.yf();if(a&&s.suspend(),this.sk().bc()||this.sk().hc(this.gU()).hc(Xt(this)).hc(Kt(this)),this.J(2)&&(this.sk().parent(n),this.I(2)),this.J(4)&&(this.Ox(),this.sk().clip(this.ab),this.B(128),this.I(4)),t.Op()||(this.J(2048)&&(this.I(2048),this.B(128)),this.J(512)&&(this.I(512),this.B(128)),this.J(1024)&&(this.I(1024),this.B(128))),this.J(256)){n=this.te.controller.D;var o=this.te.Cg(),r=this.te.Nj(),l=-1;for(e=o;e<=r;e++){var h=n[e];if(!h)break;this.g("collapseExpandButtons")&&h.bc()&&(l++,(i=this.Lm[l])&&i.W())}this.I(256)}if(this.J(128)){l=this.te.uk(),Yt(this).clear().moveTo(this.ab.left,this.ab.top).lineTo(this.ab.left+this.ab.width,this.ab.top).lineTo(this.ab.left+this.ab.width,this.ab.top+l).lineTo(this.ab.left,this.ab.top+l).close(),n=new t.I(this.ab.left,this.ab.top,this.ab.width,l),this.title().ka(),this.jb.ja(n),this.jb.height(l),this.jb.da(!1),this.B(64),n=this.te.controller.D,o=this.te.Cg(),r=this.te.Nj();var c=this.te.km(),u=this.labels().padding(),d=this.ab.top+l+1-c;c=t.L(u.g("left"),this.ab.width),this.QV.length=0,l=-1;var p=this.te.buttons();e=p.Qa().g("content");var g=p.lb().g("content"),f=p.selected().g("content"),b=p.F();if(b.normal.content=e,b.hovered.content=t.Zo(g,e),b.selected.content=t.Zo(f,e),p.I(4294967295),!(0,window.isNaN)(this.eX)&&!(0,window.isNaN)(this.dX))for(e=this.eX;e<=this.dX;e++)(g=this.ye[e])&&(t.Px(g,null),t.Rx(g));for(this.eX=n[o]?n[o].j("index"):window.NaN,this.dX=n[r]?n[r].j("index"):window.NaN,e=o;e<=r&&(h=n[e]);e++){o=w(this.te.controller,h),g=h.j("depth")||0;var v=c+(g*=this.g("depthPaddingMultiplier"));f=0;var m=dt(h);if(this.g("collapseExpandButtons")&&(h.bc()||m.QD)){l++,(i=this.Lm[l])||(i=new zt(this.te),this.Lm.push(i),i.ga(!0,b),i.zIndex(10),i.O(Xt(this)),t.K(i,this.Ada,this)),i.ka(),i.N(b),f=(p.g("width")||0)+ln;var y=d+(o-(p.g("height")||0))/2,S="svg"===t.kk?.5:0;m=m.QD&&!h.bc()||h.j("collapsed")?1==i.dc?1:0:2;var x=i.enabled(!0);t.p(e)?x.b=e:x=x.b,x.ja(this.ab).position({x:Math.floor(this.ab.left+v)+S,y:Math.floor(y)+S}).state(m),i.da(!1),i.W()}i=d+o,h=h.j("index"),(v=this.ye[h])&&(this.labels().enabled()?((d=u.Ej(new t.I(this.ab.left,d,this.ab.width,o))).left+=f+g,d.width-=f+g,t.Px(v,this.xl),t.Wx(v,d,s),t.Qx(v),this.QV[h]=v.text()):t.Px(v,null)),d=i+this.te.Tn}for(;++l<this.Lm.length&&this.g("collapseExpandButtons")&&this.Lm[l].enabled();)this.Lm[l].enabled(!1).W();t.Op()?this.I(128):this.I(1664)}this.J(16)&&(Yt(this).fill(this.te.g("headerFill")),this.B(64),this.I(16)),this.J(64)&&(this.jb.W(),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),this.I(8)),a&&s.resume()}return this},t.g.U=function(e,i){Vt.u.U.call(this,e,i),t.Iq(this,on,e,i),this.labels().ga(!!i,e.labels),this.title().ga(!!i,e.title),this.y3(e.labelsOverrider||e.cellTextSettingsOverrider)},t.g.F=function(){var e=Vt.u.F.call(this);return t.Tq(this,on,e,void 0,void 0,!0),e.labels=this.labels().F(),e.title=this.title().F(),this.VD!=this.yG&&t.kl(8,null,["Data Grid Column cellTextSettingsOverrider"]),e},t.g.R=function(){qt(this),t.sd(this.zj,this.Lw,this.jb,this.jz,this.MJ,this.Zq,this.Vc,this.Lm),this.zj=null,this.Lw.length=0,this.Vc=this.Zq=this.MJ=this.jz=this.jb=null,this.Lm.length=0,Vt.u.R.call(this)};var rn=Vt.prototype;rn.title=rn.title,rn.enabled=rn.enabled,rn.labels=rn.labels,rn.labelsOverrider=rn.y3,rn.setColumnFormat=rn.tka,rn.draw=rn.W,rn.getPixelBounds=rn.ob,t.H(Jt,t.Hy),t.g=Jt.prototype,t.g.Ac=function(){Jt.u.Ac.call(this);var e=this.Ya();t.Qj(e,"anychart-label-input"),this.Zl=new t.Jp(this.Ya())},t.g.Ta=function(e){if(t.p(e)){if(this.Bb=e,e=this.Ya()){var i=this.Bb;i=t.gc("padding: 0px; position: absolute; left: %spx; top: %spx; width: %spx; height: %spx",i.left,i.top,i.width,i.height),t.Ce(e,{style:i})}return this}return this.Bb},t.g.show=function(e,i){var n=this.Ya();this.Ta(i),n&&(t.My(this,e||""),t.Pf(n,!0))},t.g.Lc=function(){var e=this.Ya();e&&t.Pf(e,!1)},t.g.OV=function(t){var e=Zt(this,t,"editinputkeypress");!this.dispatchEvent(e)||13!=t.keyCode&&27!=t.keyCode||(e=Zt(this,t,13==t.keyCode?"editinputsubmit":"editinputescape"),this.dispatchEvent(e)&&(this.Ya().blur(),this.Lc()))},t.g.NT=function(t){t=Zt(this,t,"editinputfocus"),this.dispatchEvent(t)},t.g.ZR=function(t){var e=Zt(this,t,"editinputblur");this.dispatchEvent(e)&&(e=Zt(this,t,"editinputbeforehide"),this.dispatchEvent(e)&&(e=Zt(this,t,"editinputhide"),this.dispatchEvent(e)&&this.Lc()))},t.g.Gg=function(){Jt.u.Gg.call(this),t.Ld(this.Zl,"key",this.OV,!1,this);var e=t.Dy(this);e.wa(this.Ya(),"focus",this.NT),e.wa(this.Ya(),"blur",this.ZR)},t.g.Dh=function(){var e=t.Dy(this);t.Yd(this.Zl,"key",this.OV,!1,this),e.gc(this.Ya(),"focus",this.NT),e.gc(this.Ya(),"blur",this.ZR),Jt.u.Dh.call(this)},t.g.R=function(){var e=t.Dy(this);t.Yd(this.Zl,"key",this.OV,!1,this),e.gc(this.Ya(),"focus",this.NT),e.gc(this.Ya(),"blur",this.ZR),t.qd(this.Zl),Jt.u.R.call(this)},t.H(Qt,ot),Qt.prototype.sa=512|ot.prototype.sa;var ln=5,hn=20;Qt.prototype.$E=function(e){return t.p(e)?String(e):""},Qt.prototype.m7=function(e){return t.p(e)?t.ea(e)?e.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1,"):String(e):""},Qt.prototype.r7=function(e){return t.ea(e)?t.Tm(100*e,2)+"%":t.p(e)?t.uo(e)?e:e+"%":""},Qt.prototype.XY=function(){};var cn={};t.sq(cn,[[1,"columnStroke",t.Pq],[1,"headerFill",t.Qq],[0,"onEditStart",t.gr],[0,"onEditEnd",t.gr],[0,"fixedColumns",t.Dq]]),t.U(Qt,cn),t.g=Qt.prototype,t.g.Sv=function(e,i,n){for(var s=-1,a=0,o=this.b.length;a<o;a++){var r=this.b[a];r&&r.enabled()&&!r.md&&((r=[r,++s]).push.apply(r,t.Ja(arguments,2)),e.apply(i||this,r))}},t.g.IA=function(e){return t.p(e)?(this.ba!=e&&(this.ba=e,this.B(512,1)),this):this.ba},t.g.KC=function(t,e){return se(this,t,e)},t.g.LZ=function(t){return this.KC(this.b.length,t)},t.g.Bfa=function(){for(var t=0,e=0;e<this.b.length;e++){var i=this.b[e];i&&!i.md&&t++}return t},t.g.PN=function(e){return this.aa||(this.aa=new t.xv,this.aa.O(Ct(this)),this.aa.background().enabled(!0).fill("red 0.5"),this.aa.text("Working..."),this.aa.anchor("left-top"),this.aa.position("left-top"),this.aa.padding(5),this.aa.enabled(!0),this.aa.ja(this.fa)),e?(this.aa.ga(!1,e),this):this.aa},t.g.oE=function(){t.Op()?ae(this):this.Sv((function(e){e.Uw();var i=!1,s=!1,a=0;e.J(512)&&(i=!0),e.J(1024)&&(n(e.labels())&&(a|=t.LE),i=s=!0),e.J(2048)&&(a|=t.KE,i=s=!0),i&&e.Hx(s),e.va(a)}))},t.g.Gka=function(e,i){var n=i.target;n.ab||(n.ab=n.ob()),this.Sv(this.$ja,this,e,new t.I(t.Tm(n.ab.left,1),t.Tm(n.ab.top,1),t.Tm(Math.min(n.af,n.ab.width-n.D),1),t.Tm(n.ab.height,1)).width+hn)},t.g.Hka=function(t,e){this.Sv(this.jea,this,t,e)},t.g.$ja=function(e,i,n,s){n==i&&(i={type:"splitterpositionchange",columnIndex:e.ma(),targetColumn:e,linearColumnIndex:i,oldWidth:e.ob().width,newWidth:s},e.width(s),t.Dp(this,i))},t.g.jea=function(t,e,i,n){i==e&&(i=(e=t.title()).height(),n.offsetY-this.fa.top<i&&(n=e.hH().width,n+=e.padding().g("left")+e.padding().g("right"),t.width(t.defaultWidth()?t.defaultWidth():n),this.g("fixedColumns")&&this.Gb.B(4,1)))},t.g.Sda=function(e){var i=0;t.X(e,1)&&(i|=16),t.X(e,8)&&(i|=512),t.X(e,4096)&&(i|=64,t.Op()&&(this.Mw.reset=!0)),t.Op()&&t.X(e,4096)&&this.O()&&this.I(i);var n=!1;this.g("fixedColumns")&&t.X(e,32776)&&(i|=4,n=!0),this.B(i,1),n&&this.Gb.B(4,1)},t.g.tq=function(e){if(!this.Sh){this.Sh=new s,this.Sh.U(t.zm("defaultScrollBar")),this.Sh.we("horizontal");var i=this;this.Sh.wa("scrollchange",(function(t){i.IA(Math.round(t.startRatio*i.f))})),t.K(this.Sh,this.AX,this)}return t.p(e)?(this.Sh.N(e),this):this.Sh},t.g.AX=function(e){t.X(e,8)&&this.B(4,1)},t.g.scroll=function(e,i){t.xr(this,this.controller),this.IA(this.ba+e);var n=this.controller.Cg(),s=this.controller.b,a=this.controller.km();return B(this.controller,(n?s[n-1]:0)+(a+i)),t.yr(this,this.controller),!0},t.g.fs=function(){var e=ee(this),i=this.fa.top+this.uk();e.clear().moveTo(this.fa.left,this.fa.top).lineTo(this.fa.left+this.fa.width,this.fa.top).lineTo(this.fa.left+this.fa.width,i).lineTo(this.fa.left,i).close(),e=ie(this);for(var n=i=0,s=this.b.length;n<s;n++){var a=this.b[n];a&&a.enabled()&&(t.uo(a.g("width"))&&(a.ab=null),i+=(a=a.Ox().width)+e)}this.f=i,this.B(512)},t.g.kv=function(){ee(this).fill(this.g("headerFill")),this.Sv((function(t){t.B(16),t.W()}))},t.g.nV=function(t){t.hc(mt(this)).hc(yt(this)).hc(St(this)).hc(wt(this)).hc(xt(this)).hc(Ct(this))},t.g.WW=function(){this.Sv((function(t){t.B(128),t.W()}))},t.g.ob=function(){var t=Qt.u.ob.call(this);return this.g("fixedColumns")&&(t.width=ne(this)),t},t.g.dY=function(){if(this.J(512)){var e,i,n=0,s=this.fa.left,a=this.fa.top,o=It("columnStroke",2)(this,0),r=t.dp(o),l=[],h=this.YE.length=0;for(e=this.b.length;h<e;h++)if(i=this.b[h])if(i.enabled()){var c=i.Ox().width;n+=c+r,l.push(i)}else i.W();for(this.f=n,this.fa.width>this.f&&(this.ba=0),this.ba=t.Za(this.ba,0,Math.abs(this.fa.width-this.f)),n=-this.ba,h=0,e=l.length;h<e;h++){(i=l[h]).ka(),i.position({x:n,y:0}),i.height(this.fa.height),c=i.Ox().width;var u=this.o[h],d=c,p=!(this.g("fixedColumns")&&h==l.length-1);u&&(u.ka(),p?(u.stroke(o),u.ba=o,this.YE.push(n+c+r),d+=r,u.Ta({left:s+n+hn,top:a,width:d+this.fa.width,height:this.fa.height}).op(!1).enabled(!0).position(c-hn).da(!1).W().op(!0)):u.enabled(!1).da(!1).W()),n+=d,i.da(!1),i.W()}for(this.$y=!0;h<this.o.length&&this.o[h].enabled();)this.o[h].enabled(!1),h++;this.Sh&&(s=new t.I(this.fa.left-this.ba,0,this.f,0),a=new t.I(this.fa.left,0,this.fa.width,0),this.Sh.ka().op(!1).kg(s).aQ(a).W().op(!0).da(!1),this.Sh.O()&&this.Sh.W()),this.I(512)}},t.g.k1=function(e){if(e={columnIndex:this.fh.ma(),item:this.qc,value:e.value},t.D(this.g("onEditEnd"))&&(e=this.g("onEditEnd").call(e))&&"object"==t.ka(e)&&!e.cancelEdit&&"object"==t.ka(e.itemMap)&&this.qc){e=e.itemMap;var i=this.controller.data();for(var n in i.ka(),e)e.hasOwnProperty(n)&&this.qc.set(n,e[n]);i.da(!0),this.RJ=!0,this.Bu=!1}},t.g.Mea=function(t){this.RJ||this.Bu||(this.k1.call(this,t),this.Bu=!1)},t.g.Nea=function(){this.Bu=!0},t.g.Oea=function(){this.Gb.pI(!0),this.RJ=!1},t.g.Pea=function(){this.RJ=this.Bu=!1,this.K.reset(),this.Gb.pI(!1)},t.g.MZ=function(e){if(e&&this.uf().g("enabled")){if(this.Cm=!1,!this.K){this.K=new Jt;var i=this.Gb.O().Ja();this.K.Sd(i.O()),this.K.wa("editinputsubmit",this.k1,!1,this),this.K.wa("editinputescape",this.Nea,!1,this),this.K.wa("editinputblur",this.Mea,!1,this),this.K.wa("editinputfocus",this.Oea,!1,this),this.K.wa("editinputhide",this.Pea,!1,this)}this.qc=e.item;var n=e.hoveredIndex,s=!1;if((i=e.index)==this.controller.Cg())this.controller.ka().Cg(i).km(0).da(!0);else if(i==this.controller.Nj()){this.controller.Nj(i),s=this.mp;var a=Math.min(s.length-1,n),o=this.fa.top+this.uk()+1;a=(o+=n=n?s[a-1]:0)+(s[a]-n-this.Tn)-2,s=!0}n=~t.Na(this.YE,e.originalEvent.offsetX-this.fa.left);for(var r=null,l=-1,h=0,c=this.b.length;h<c;h++){var u=this.b[h];if(u&&u.enabled()&&++l==n){r=u.Ox(),this.fh=u;break}}0>(n=r).left&&(this.IA(this.IA()+n.left),n.left=0),r=w(this.controller,e.item),l=e.hoveredIndex?2:1,(e=n?new t.I(n.left,e.startY,n.width-2,r-l):null)&&(s&&(e.top=o,e.height=a-o),this.fh&&(i=this.fh.QV[i],o={columnIndex:this.fh.ma(),item:this.qc,value:i},t.D(this.g("onEditStart"))&&(o=this.g("onEditStart").call(o))&&"object"==t.ka(o)&&!o.cancelEdit&&this.qc&&(this.K.show(null!=o.value?o.value:i,e),e=this.K,i=t.Ly(e),e.b=!0,e.Ya().focus(),i||t.Jy()||(e.Ya().value=e.i),e.Ya().select(),t.Jy()||(e.Qg&&e.Qg.Ce(e.Ya(),"click",e.VU),t.Dj(e.B1,10,e)))))}},t.g.iJ=function(t){this.vW(t)},t.g.vW=function(t){this.uf().g("enabled")&&(this.oj=t.item)},t.g.wW=function(){if(this.vi&&(this.Fu||this.bx)){var t=0,e=0;this.Fu&&(t=0<this.Fu?30:-30),this.bx&&(e=0<this.bx?30:-30),this.scroll(t,e)}},t.g.buttons=function(e){return this.Lm||(this.Lm=new zt(this),t.W(this,"buttons",this.Lm),this.Lm.$c(),t.K(this.Lm,this.Bda,this)),t.p(e)?(this.Lm.N(e),this):this.Lm},t.g.Bda=function(e){t.X(e,1)&&(this.buttons().I(4294967295),this.WW())},t.g.F=function(){var e=Qt.u.F.call(this);t.Tq(this,cn,e,void 0,void 0,!0),e.horizontalOffset=this.IA(),e.buttons=this.buttons().F(),e.columns=[];for(var i=0;i<this.b.length;i++){var n=this.b[i];e.columns.push(!!n&&n.F())}return this.Sh&&(e.horizontalScrollBar=this.tq().F()),e.tooltip=this.Ua().F(),e},t.g.U=function(e,i){if(Qt.u.U.call(this,e,i),t.Iq(this,cn,e,i),this.IA(e.horizontalOffset),this.buttons().ga(!!i,e.buttons),"defaultColumnSettings"in e&&this.XY(),this.onEditStart(e.onEditStart),this.onEditEnd(e.onEditEnd),"columns"in e)for(var n=0,s=e.columns.length;n<s;n++){var a=e.columns[n];a&&se(this,n,a,i)}"horizontalScrollBar"in e&&this.tq(e.horizontalScrollBar)},t.g.R=function(){t.sd(this.Sh,this.Ka,this.o,this.b,this.Lm),this.Ka=this.Sh=this.Lm=null,this.o.length=0,this.b.length=0,Qt.u.R.call(this)},t.H(oe,Qt),t.xu(oe,Qt),oe.prototype.vx=function(e){return t.p(e)?(N(this.controller).N(e),this):N(this.controller)},oe.prototype.F=function(){var t=oe.u.F.call(this);return t.verticalScrollBar=this.vx().F(),t},oe.prototype.U=function(t){oe.u.U.call(this,t),"verticalScrollBar"in t&&this.vx(t.verticalScrollBar)};var un=Qt.prototype;un.edit=un.uf,un.column=un.KC,un.data=un.data,un.addColumn=un.LZ,un.startIndex=un.Cg,un.endIndex=un.Nj,un.getVisibleItems=un.Saa,un.horizontalScrollBar=un.tq,un.horizontalOffset=un.IA,un.verticalOffset=un.km,un.tooltip=un.Ua,un.draw=un.W,un.buttons=un.buttons,un.getColumnsCount=un.Bfa,un.loadingMessage=un.PN,un=oe.prototype,t.E("anychart.standalones.dataGrid",(function(){var e=new oe;return e.N(t.nm("standalones.dataGrid")),e})),un.draw=un.W,un.data=un.data,un.addColumn=un.LZ,un.parentBounds=un.ja,un.container=un.O,un.headerHeight=un.uk,un.verticalScrollBar=un.vx,un.defaultRowHeight=un.hv,un.buttons=un.buttons,t.H(re,t.Ny);var dn={};t.sq(dn,[[1,"stroke",t.Pq],[0,"value",t.Cq]]),t.U(re,dn),t.g=re.prototype,t.g.ra=t.Ny.prototype.ra,t.g.sa=t.Ny.prototype.sa,t.g.scale=function(e){return t.p(e)?(t.kl(500),this):this.Po()},t.g.we=function(e){return t.p(e)?("horizontal"==e&&t.kl(501),this):"vertical"},t.g.fs=function(){this.lo()},t.g.kv=function(){t.Oy(this).stroke(this.g("stroke"))},t.g.R=function(){this.ta("stroke",null),re.u.R.call(this)},t.g.F=function(){var e=re.u.F.call(this);return t.Tq(this,dn,e),e},t.g.U=function(e,i){re.u.U.call(this,e,i),t.Iq(this,dn,e)};var pn=re.prototype;pn.scale=pn.scale,pn.layout=pn.we,pn.isHorizontal=pn.Nb,t.H(le,t.Ny);var gn={};t.sq(gn,[[1,"fill",t.Qq],[0,"from",t.Cq],[0,"to",t.Cq]]),t.U(le,gn),t.g=le.prototype,t.g.kR=function(){return"From: "+this.g("from")+" to: "+this.g("to")},t.g.ra=t.Ny.prototype.ra,t.g.sa=t.Ny.prototype.sa,t.g.we=function(e){return t.p(e)?("horizontal"==e&&t.kl(501),this):"vertical"},t.g.scale=function(e){return t.p(e)?(t.kl(500),this):this.Po()},t.g.fs=function(){t.Py(this)},t.g.kv=function(){t.Oy(this).stroke(null).fill(this.g("fill"))},t.g.R=function(){this.ta("fill",null),le.u.R.call(this)},t.g.F=function(){var e=le.u.F.call(this);return t.Tq(this,gn,e),e},t.g.U=function(e,i){le.u.U.call(this,e,i),t.Iq(this,gn,e,i)};var fn=le.prototype;fn.scale=fn.scale,fn.layout=fn.we,fn.isHorizontal=fn.Nb,t.H(he,t.Zy);var bn={};t.sq(bn,[[0,"value",t.Cq]]),t.U(he,bn),t.g=he.prototype,t.g.ra=t.Zy.prototype.ra,t.g.sa=t.Zy.prototype.sa,t.g.scale=function(e){return t.p(e)?(t.kl(500),this):this.Po()},t.g.we=function(e){return t.p(e)?("horizontal"==e&&t.kl(501),this):"vertical"},t.g.F=function(){var e=he.u.F.call(this);return t.Tq(this,bn,e),e},t.g.U=function(e,i){he.u.U.call(this,e,i),t.Iq(this,bn,e,i)};var vn=he.prototype;vn.scale=vn.scale,vn.layout=vn.we,vn.background=vn.background,vn.padding=vn.padding,vn.isHorizontal=vn.Nb,t.H(ce,t.ag),ce.prototype.ar=function(){this.deltaY=this.deltaX=0},ce.prototype.ls=function(t){this.element.oc(1,0,0,1,t,0)},ce.prototype.xw=function(){return 0},t.H(ue,t.ag),t.g=ue.prototype,t.g.ar=function(){this.deltaY=this.deltaX=0},t.g.ls=function(t){this.element.oc(1,0,0,1,t,0),this.Kd=(t-this.f.left)/this.f.width},t.g.l2=function(){var e=this.element.tag.item;return(t.p(e.j("progressValue"))?e.j("progressValue"):e.j("autoProgress"))||0},t.g.VA=function(e){var i=this.element.tag.Ta,n=this.l2();return n*=i.width,this.f.left=-n,this.f.width=i.width,t.Za(e,-n,i.width-n)},t.g.xw=function(){return 0},t.H(de,ue),de.prototype.l2=function(){var e=this.element.tag.item.get("baselineProgressValue")||0;return t.Ao(e)},t.H(pe,t.ag),pe.prototype.ar=function(){this.deltaY=this.deltaX=0},t.H(ge,t.ag),ge.prototype.xw=function(){return 0},t.H(fe,t.V),fe.prototype.ra=2,fe.prototype.sa=t.V.prototype.sa;var mn={};t.sq(mn,[[1,"fill",t.Qq],[1,"stroke",t.Pq],[0,"size",t.Bq],[0,"type",t.Ok],[0,"verticalOffset",t.Bq],[0,"horizontalOffset",t.Bq],[0,"enabled",t.Zq]]),t.U(fe,mn),t.g=fe.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){this.va(2)},t.g.Ie=function(e,i){return!(!t.da(i)&&null!==i||(e?this.oa.enabled=i:this.enabled(i),0))},t.g.U=function(e,i){fe.u.U.call(this,e,i),t.Iq(this,mn,e,i)},t.g.F=function(){var e=fe.u.F.call(this);return t.Tq(this,mn,e,void 0,void 0,!0),this.ph("enabled")&&null!==e.enabled||delete e.enabled,e},t.g.R=function(){this.Y&&(t.kr(this.Y,this.Tc,this),this.Y=null),this.Xb=null,fe.u.R.call(this)},t.H(be,t.V),t.g=be.prototype,t.g.ra=2,t.g.sa=t.V.prototype.sa,t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Pu().parent(null),this.Et().parent(null),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,this.Pu().parent(this.Y.Pu()),this.Et().parent(this.Y.Et()),t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){this.va(2)},t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.Pu=function(e){return this.f||(this.f=new fe,t.W(this,"thumb",this.f),t.K(this.f,this.BK,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.Et=function(e){return this.b||(this.b=new fe,t.W(this,"connectorThumb",this.b),t.K(this.b,this.BK,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.BK=function(){this.va(2)},t.g.U=function(t,e){be.u.U.call(this,t,e),this.Pu().ga(!!e,t.thumb),this.Et().ga(!!e,t.connectorThumb)},t.g.F=function(){var t=be.u.F.call(this);return t.thumb=this.Pu().F(),t.connectorThumb=this.Et().F(),t},t.g.R=function(){this.Y&&(t.kr(this.Y,this.Tc,this),this.Y=null),this.Xb=null,t.kr(this.f,this.BK,this),t.kr(this.b,this.BK,this),t.sd(this.f,this.b),this.b=this.f=null,be.u.R.call(this)};var yn=be.prototype;yn.thumb=yn.Pu,yn.connectorThumb=yn.Et,t.H(ve,t.V),ve.prototype.ra=2,ve.prototype.sa=t.V.prototype.sa;var Sn={};t.sq(Sn,[[1,"fill",t.Qq],[1,"stroke",t.Pq],[0,"enabled",t.Zq]]),t.U(ve,Sn),t.g=ve.prototype,t.g.g=function(e){var i=t.ir.call(this,e);return"enabled"==e&&(i=null!=i?i:this.D.g("enabled")),i},t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Gz),this.Cx().parent(null),this.Tx().parent(null),this.start().parent(null),this.end().parent(null),this.Y=null):(this.Y&&t.kr(this.Y,this.Gz,this),this.Y=e,this.Cx().parent(this.Y.Cx()),this.Tx().parent(this.Y.Tx()),this.start().parent(this.Y.start()),this.end().parent(this.Y.end()),t.K(this.Y,this.Gz,this))),this.start().jg(null),this.end().jg(null),this):this.Y},t.g.Cx=function(e){return this.i||(this.i=new fe,t.W(this,"thumbs",this.i),t.K(this.i,this.Gz,this)),t.p(e)?(this.i.N(e),this):this.i},t.g.Tx=function(e){return this.o||(this.o=new fe,t.W(this,"connectorThumbs",this.o),t.K(this.o,this.Gz,this)),t.p(e)?(this.o.N(e),this):this.o},t.g.start=function(e){return this.f||(this.f=new be,t.W(this,"start",this.f),this.f.Pu().parent(this.Cx()),this.f.Et().parent(this.Tx()),t.K(this.f,this.Gz,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.end=function(e){return this.b||(this.b=new be,t.W(this,"end",this.b),this.b.Pu().parent(this.Cx()),this.b.Et().parent(this.Tx()),t.K(this.b,this.Gz,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.Gz=function(){this.va(2)},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.U=function(e,i){ve.u.U.call(this,e,i),t.Iq(this,Sn,e,i),"thumbs"in e&&this.Cx().ga(!!i,e.thumbs),"connectorThumbs"in e&&this.Tx().ga(!!i,e.connectorThumbs),"start"in e&&this.start().ga(!!i,e.start),"end"in e&&this.end().ga(!!i,e.end)},t.g.F=function(){var e=ve.u.F.call(this);return t.Tq(this,Sn,e,void 0,void 0,!0),this.ph("enabled")&&null!==e.enabled||delete e.enabled,e.thumbs=this.Cx().F(),e.connectorThumbs=this.Tx().F(),e.start=this.start().F(),e.end=this.end().F(),e},t.g.R=function(){t.sd(this.i,this.o,this.f,this.b),this.b=this.f=this.o=this.i=null,ve.u.R.call(this)};var wn=ve.prototype;wn.thumbs=wn.Cx,wn.connectorThumbs=wn.Tx,wn.start=wn.start,wn.end=wn.end,t.H(me,t.V),me.prototype.ra=3;var xn={};t.sq(xn,[t.Z.m9,t.Z.DQ,t.Z.CQ,t.Z.yz,t.Z.Yn,t.Z.ZY,t.Z.uZ,t.Z.HQ,t.Z.vQ,[0,"type",t.Ok]]),t.U(me,xn),t.g=me.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(e){t.X(e,2)&&this.at()},t.g.at=function(){this.b=null,this.va(2,!0)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){me.u.U.call(this,e,i),t.Iq(this,xn,e,i)},t.g.F=function(){var e=me.u.F.call(this);return t.Tq(this,xn,e,void 0,void 0,!0),e},ye.prototype.ed=function(t,e,i,n){return this.element.Rf.ed(this.item,this.tag,t,e,i,n,this.periodIndex,this.b)},t.H(Se,t.V),Se.prototype.ra=1,Se.prototype.sa=t.V.prototype.sa;var Cn={};t.rq(Cn,0,"drawer",t.gr),t.rq(Cn,0,"shapes",t.Cq),t.U(Se,Cn),t.g=Se.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){this.va(1)},t.g.F=function(){var e=Se.u.F.call(this);return t.Tq(this,Cn,e,void 0,void 0,!0),e},t.g.U=function(e,i){Se.u.U.call(this,e),i?t.Hq(this.oa,Cn,e):t.Iq(this,Cn,e)},t.g.R=function(){this.Y&&(t.kr(this.Y,this.Tc,this),delete this.Y),this.Xb=null,Se.u.R.call(this)},t.H(xe,t.od),xe.prototype.uv=function(){var e,i;for(e in this.IP={},this.b){var n=this.b[e];for(i=0;i<n.length;i++){var s=n[i];s.parent(null),t.J(s,t.Ag)&&(s.clear(),s.oc(1,0,0,1,0,0))}this.o[e]=0,n.length=0}},xe.prototype.ed=function(e,i,n,s,a,o,r,l){var h={};s=s||this.i;var c=t.oa(e)+"_"+i.type+(t.p(r)?"_"+String(r):"");if("milestones-preview"==i.type||"baselines-milestones-preview"==i.type){for(var u=e;u.getParent();)u=u.getParent(),c+="_"+t.oa(u);t.p(l)&&(c+="_"+l)}for(var d in this.IP[c]=i,s)if("none"==s[d].Qb&&o)t.J(o,t.pg)&&(h[d]=Ce(this,d,e,a||0,o,n,r),h[d].tag=i);else{l=d,c=void 0,u=d;var p=e,g=a||0,f=n,b=r,v=this.i[u],m=v.Qb;this.f[m].length>this.o[m]?c=this.f[m][this.o[m]]:this.f[m].push(c=v.nS()),this.o[m]++,this.b[m].push(c),c=Ce(this,u,p,g,c,f,b),h[l]=c,h[d].tag=i}return h},xe.prototype.R=function(){for(var e in this.f)t.sd(this.f[e]),this.f[e].length=0,this.b[e].length=0;this.IP=this.i=this.Bd=null,xe.u.R.call(this)},t.H(De,t.V),t.Gq(De,["fill","stroke"],"normal"),De.prototype.ra=12291,De.prototype.sa=t.V.prototype.sa;var Dn={};t.rq(Dn,0,"height",t.br),t.rq(Dn,0,"anchor",(function(e){return null===e?null:"auto"==(e=t.Dk(e,"left-center"))?"auto":t.Ko(e)?"left-top":t.Lo(e)?"left-bottom":"left-center"})),t.rq(Dn,0,"position",(function(e){return null===e?null:(e=t.Ek(e,"left-center"),t.Ko(e)?"left-top":t.Lo(e)?"left-bottom":"left-center")})),t.rq(Dn,0,"offset",t.br),t.rq(Dn,0,"enabled",t.Zq),t.U(De,Dn),t.g=De.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.hi().parent(null),this.uf().parent(null),this.Ua().parent(null),this.BJ().parent(null),this.QG().parent(null),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,this.hi().parent(this.Y.hi()),this.uf().parent(this.Y.uf()),this.Ua().parent(this.Y.Ua()),this.BJ().parent(this.Y.BJ()),this.QG().parent(this.Y.QG()),t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.qr=function(){return this.cj||(this.cj=[])},t.g.Ge=function(e,i,n,s){return i={sourceColor:"stroke"==i?this.sU(n):this.rU(n),item:e,itemIndex:e.j("index")},t.p(s)&&(i.period=e.get("periods")[s],i.periodIndex=s),i},t.g.aH=function(e,i,n,s){var a,o=i===t.gm,r="stroke"==n?t.Zl:t.am,l=Te(this,e,s);return l&&(a=o?l[n]:"object"==t.ka(l.selected)?l.selected[n]:void 0),a?a=r(a):(a=(o?this.Qa():this.selected()).g(n),t.D(a)?(e=this.Ge(e,n,i,s),a=r(a.call(e,e))):a=r(a)),a},t.g.ws=function(){return"blue"},t.g.au=function(){return"blue"},t.g.kU=function(){return this.Um().nc(2)},t.g.lU=function(){return t.Ql(this.Um().nc(2))},t.g.rU=function(e){return e==t.gm?this.ws():this.kU()},t.g.sU=function(e){return e==t.gm?this.au():this.lU()},t.g.Um=function(){return this.wf().Gb.cc()},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),"all"!=this.Ma()&&this.gb.df(),t.W(this.Zh,"tooltip",this.gb),t.W(this,"tooltip",this.gb),t.Aw(this.gb,this.Zh),"all"==this.Ma()&&(this.gb.Za=!0,t.Kw(this.gb))),t.p(e)?(this.gb.N(e),this):this.gb},t.g.uf=function(e){return this.Vi||(this.Vi=new ve(this.Zh.uf()),t.W(this,"edit",this.Vi),t.K(this.Vi,this.iO,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Vi.N(e),this):this.Vi},t.g.iO=function(){this.va(2)},t.g.BJ=function(e){return this.CJ||(this.CJ=new me,t.W(this,"startMarker",this.CJ),t.K(this.CJ,this.i6,this)),t.p(e)?("object"!==t.ka(e)||"enabled"in e||(e.enabled=!0),this.CJ.N(e),this):this.CJ},t.g.QG=function(e){return this.RG||(this.RG=new me,t.W(this,"endMarker",this.RG),t.K(this.RG,this.i6,this)),t.p(e)?("object"!==t.ka(e)||"enabled"in e||(e.enabled=!0),this.RG.N(e),this):this.RG},t.g.i6=function(e){t.X(e,1)&&this.va(1)},t.g.Ma=function(){return"all"},t.g.wf=function(){return this.Zh},t.g.Tm=function(t,e,i){return this.aH(t,e,"fill",i)},t.g.gk=function(t,e,i){return this.aH(t,e,"stroke",i)},t.g.rE=function(){t.qd(this.Rf);var e=this.$s.g("shapes");e=this.Rf=new xe(this.wf(),this,e);var i=yt(this.wf());if(e.Bd!=i)for(var n in e.Bd=i,e.b)for(var s=e.b[n],a=0;a<s.length;a++)s[a].parent(i)},t.g.vj=function(t,e,i){return null!=(e=(i=Te(this,e,i))&&null!=(i=i[t])?i:e.get(t))?e:this.g(t)},t.g.qd=function(t,e){return this.vj("height",t,e)},t.g.rD=function(t,e){return this.vj("offset",t,e)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.K(this.Da,this.de,this),this.Da.df(),t.W(this,"labels",this.Da)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(){this.va(4096)},t.g.hi=function(e){return this.$s||(this.$s=new Se(this.Zh,this),t.W(this,"rendering",this.$s),t.K(this.$s,this.l5,this)),t.p(e)?(this.$s!=e&&this.$s.N(e),this):this.$s},t.g.l5=function(){this.rE(),this.va(1)},t.g.iH=function(e){var i=this.parent();return i?i[e&t.wo?"selected":"normal"]():null},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){De.u.U.call(this,e,i),t.Iq(this,Dn,e,i),this.labels().ga(!!i,e.labels),this.Qa().ga(!!i,e),this.Qa().ga(!!i,e.normal),this.selected().ga(!!i,e.selected),this.hi().ga(!!i,e.rendering),this.uf().ga(!!i,e.edit),this.Ua().ga(!!i,e.tooltip)},t.g.F=function(){var e=De.u.F.call(this);t.Tq(this,Dn,e,void 0,void 0,!0),e.labels=this.labels().F(),e.rendering=this.hi().F(),e.normal=this.Qa().F(),e.selected=this.selected().F(),e.edit=this.uf().F();var i=this.Ua().F();return t.Jc(i)||(e.tooltip=i),e},t.g.R=function(){t.kr(this.$s,this.l5,this),t.qd(this.$s),delete this.$s,this.Y&&(t.kr(this.Y,this.Tc,this),delete this.Y),this.Xb=null,t.sd(this.ca,this.Ea,this.Da,this.kI,this.Rf,this.Vi,this.gb),this.kI&&(this.kI.length=0),this.gb=this.Vi=this.Rf=this.Da=this.Ea=this.ca=null,De.u.R.call(this)};var Tn=De.prototype;Tn.rendering=Tn.hi,Tn.normal=Tn.Qa,Tn.selected=Tn.selected,Tn.labels=Tn.labels,Tn.edit=Tn.uf,Tn.tooltip=Tn.Ua,Tn.startMarker=Tn.BJ,Tn.endMarker=Tn.QG,t.H(ke,De);var kn={};t.sq(kn,[[0,"markerType",t.Ok]]),t.U(ke,kn),t.g=ke.prototype,t.g.Ma=function(){return"baselines-milestones"},t.g.ws=function(){return this.Um().nc(8)},t.g.au=function(){return t.Ql(this.Um().nc(8))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma()])},t.g.Ei=function(e){return"baselines-milestones-preview"==this.Ma()?null:(this.fi||(this.fi=new $e(this.wf()),t.W(this,"preview",this.fi),this.fi.$c(),this.fi.parent(this)),t.p(e)?(this.fi.N(e),this):this.fi)},t.g.F=function(){var t=ke.u.F.call(this);return"baselines-milestones"==this.Ma()&&(t.preview=this.Ei().F()),t},t.g.U=function(t,e){ke.u.U.call(this,t,e),"baselines-milestones"==this.Ma()&&this.Ei().ga(!!e,t.preview)},t.g.R=function(){t.sd(this.fi),ke.u.R.call(this)},t.H($e,ke);var $n={};t.sq($n,[[0,"depth",t.xq],[0,"drawOnCollapsedOnly",t.Dq]]),t.U($e,$n),$e.prototype.Ma=function(){return"baselines-milestones-preview"},$e.prototype.qr=function(){return this.cj||(this.cj=[this.Ma()],this.cj.push.apply(this.cj,this.parent().qr())),this.cj},$e.prototype.U=function(e,i){$e.u.U.call(this,e,i),t.Iq(this,$n,e,i)},$e.prototype.F=function(){var e=$e.u.F.call(this);return t.Tq(this,$n,e,void 0,void 0,!0),e};var On=ke.prototype;On.preview=On.Ei,(On=$e.prototype).preview=void 0,t.H(Oe,De);var Pn={};t.rq(Pn,0,"drawOverEnd",t.Dq),t.U(Oe,Pn),Oe.prototype.Ma=function(){return"progress"},Oe.prototype.ws=function(){return this.Um().nc(1)},Oe.prototype.au=function(){return t.bm},Oe.prototype.qr=function(){return this.cj||(this.cj=[this.Ma()])},t.H(Pe,Oe),Pe.prototype.Ma=function(){return"baseline-progress"},Pe.prototype.ws=function(){return"green"},Pe.prototype.qr=function(){return this.cj||(this.cj=[this.Ma(),"baselineProgress"])},t.H(Le,De);var Ln={};t.rq(Ln,0,"above",t.Dq),t.rq(Ln,0,"disableWithRelatedTask",t.Dq),t.U(Le,Ln),t.g=Le.prototype,t.g.Ma=function(){return"baselines"},t.g.ws=function(){return t.Pl(this.Um().nc(1),.7)},t.g.au=function(){return t.Ql(t.Pl(this.Um().nc(1),.7))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma(),"baseline"])},t.g.eJ=function(e){var i=0;t.X(e,4096)&&(i|=4096),t.X(e,1)&&(i|=1),t.X(e,8192)&&(i|=8192),this.va(i)},t.g.Kd=function(e){if(!this.Fi){this.Fi=new Pe(this.wf()),t.W(this,"progress",this.Fi),this.Fi.$c();var i=this.wf().elements();this.Fi.parent(i),this.Fi.uf().parent(this.uf()),t.K(this.Fi,this.eJ,this)}return t.p(e)?(this.Fi.N(e),this):this.Fi},t.g.U=function(e,i){Le.u.U.call(this,e,i),t.Iq(this,Ln,e,i),this.Kd().ga(!!i,e.progress)},t.g.F=function(){var e=Le.u.F.call(this);return t.Tq(this,Ln,e,void 0,void 0,!0),e.progress=this.Kd().F(),e};var Gn=Le.prototype;Gn.progress=Gn.Kd,t.H(Ge,t.V),t.Gq(Ge,["fill","stroke"],"normal"),Ge.prototype.ra=8194,Ge.prototype.sa=t.V.prototype.sa;var Fn={};t.sq(Fn,[[1,"previewStroke",t.Pq]]),t.U(Ge,Fn),t.g=Ge.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.Ge=function(e,i,n,s,a,o,r){return n={sourceColor:"stroke"==s?this.sU(n):this.rU(n),fromItem:e,fromItemIndex:e.j("index"),toItem:i,toItemIndex:i.j("index"),connType:a||"finish-start"},t.p(o)&&(n.fromPeriod=e.get("periods")[o],n.fromPeriodIndex=o),t.p(r)&&(n.toPeriod=i.get("periods")[r],n.toPeriodIndex=r),n},t.g.aH=function(e,i,n,s,a,o,r){var l=(n===t.gm?this.Qa():this.selected()).g(s),h="stroke"==s?t.Zl:t.am;return t.D(l)?(e=this.Ge(e,i,n,s,a,o,r),l=h(l.call(e,e))):l=h(l),l},t.g.ws=function(){return"#545f69"},t.g.au=function(){return"#545f69"},t.g.kU=function(){return"#545f69"},t.g.lU=function(){return t.Wl(t.Pl(this.Um().nc(2)),2)},t.g.rU=function(e){return e==t.gm?this.ws():this.kU()},t.g.sU=function(e){return e==t.gm?this.au():this.lU()},t.g.Um=function(){return this.wf().Gb.cc()},t.g.Ma=function(){return"connectors"},t.g.wf=function(){return this.Zh},t.g.Tm=function(t,e,i,n,s,a){return this.aH(t,e,i,"fill",n,s,a)},t.g.gk=function(t,e,i,n,s,a){return this.aH(t,e,i,"stroke",n,s,a)},t.g.U=function(e,i){Ge.u.U.call(this,e,i),t.Iq(this,Fn,e,i),this.Qa().ga(!!i,e),this.Qa().ga(!!i,e.normal),this.selected().ga(!!i,e.selected)},t.g.F=function(){var e=Ge.u.F.call(this);return t.Tq(this,Fn,e,void 0,void 0,!0),e.normal=this.Qa().F(),e.selected=this.selected().F(),e},t.g.R=function(){t.sd(this.ca,this.Ea),Ge.u.R.call(this)};var In=Ge.prototype;In.normal=In.Qa,In.selected=In.selected,t.H(Fe,De),t.g=Fe.prototype,t.g.Ma=function(){return"grouping-tasks"},t.g.ws=function(){return this.Um().nc(4)},t.g.au=function(){return t.Pl(this.Um().nc(4))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma()])},t.g.Kd=function(e){if(!this.Fi){this.Fi=new Oe(this.wf()),t.W(this,"progress",this.Fi),t.K(this.Fi,this.eJ,this);var i=this.wf().elements();this.Fi.parent(i),this.Fi.uf().parent(this.uf())}return t.p(e)?(this.Fi.N(e),this):this.Fi},t.g.eJ=function(e){var i=0;t.X(e,4096)&&(i|=4096),t.X(e,1)&&(i|=1),t.X(e,8192)&&(i|=8192),this.va(i)},t.g.F=function(){var t=Fe.u.F.call(this);return t.progress=this.Kd().F(),t},t.g.U=function(t,e){Fe.u.U.call(this,t,e),this.Kd().ga(!!e,t.progress)};var En=Fe.prototype;En.progress=En.Kd,t.H(Ie,De);var An={};t.sq(An,[[0,"markerType",t.Ok]]),t.U(Ie,An),t.g=Ie.prototype,t.g.Ma=function(){return"milestones"},t.g.ws=function(){return this.Um().nc(9)},t.g.au=function(){return t.Ql(this.Um().nc(9))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma(),"milestone","actual"])},t.g.Ei=function(e){return"milestones-preview"==this.Ma()?null:(this.fi||(this.fi=new Ee(this.wf()),t.W(this,"preview",this.fi),this.fi.$c(),this.fi.parent(this)),t.p(e)?(this.fi.N(e),this):this.fi)},t.g.F=function(){var t=Ie.u.F.call(this);return"milestones"==this.Ma()&&(t.preview=this.Ei().F()),t},t.g.U=function(t,e){Ie.u.U.call(this,t,e),"milestones"==this.Ma()&&this.Ei().ga(!!e,t.preview)},t.g.R=function(){t.sd(this.fi),Ie.u.R.call(this)},t.H(Ee,Ie);var Un={};t.sq(Un,[[0,"depth",t.xq],[0,"drawOnCollapsedOnly",t.Dq]]),t.U(Ee,Un),Ee.prototype.Ma=function(){return"milestones-preview"},Ee.prototype.qr=function(){return this.cj||(this.cj=[this.Ma()],this.cj.push.apply(this.cj,this.parent().qr())),this.cj},Ee.prototype.U=function(e,i){Ee.u.U.call(this,e,i),t.Iq(this,Un,e,i)},Ee.prototype.F=function(){var e=Ee.u.F.call(this);return t.Tq(this,Un,e,void 0,void 0,!0),e};var _n=Ie.prototype;_n.preview=_n.Ei,(_n=Ee.prototype).preview=void 0,t.H(Ae,De),Ae.prototype.Ma=function(){return"periods"},Ae.prototype.ws=function(){return this.Um().nc(0)},Ae.prototype.au=function(){return t.Pl(this.Um().nc(0))},Ae.prototype.qd=function(t,e){var i=Te(this,t,e);return i&&null!=(i=i.height)?i:Ae.u.qd.call(this,t,e)},t.H(Ue,De),t.g=Ue.prototype,t.g.Ma=function(){return"tasks"},t.g.ws=function(){return this.Um().nc(0)},t.g.au=function(){return t.Pl(this.Um().nc(0))},t.g.eJ=function(e){var i=0;t.X(e,4096)&&(i|=4096),t.X(e,1)&&(i|=1),t.X(e,8192)&&(i|=8192),this.va(i)},t.g.qr=function(){return this.cj||(this.cj=[this.Ma(),"actual"])},t.g.Kd=function(e){if(!this.Fi){this.Fi=new Oe(this.wf()),t.W(this,"progress",this.Fi),this.Fi.$c();var i=this.wf().elements();this.Fi.parent(i),this.Fi.uf().parent(this.uf()),t.K(this.Fi,this.eJ,this)}return t.p(e)?(this.Fi.N(e),this):this.Fi},t.g.F=function(){var t=Ue.u.F.call(this);return t.progress=this.Kd().F(),t},t.g.U=function(t,e){Ue.u.U.call(this,t,e),this.Kd().ga(!!e,t.progress)};var jn=Ue.prototype;jn.progress=jn.Kd,t.H(_e,t.Y),_e.prototype.sa=976|t.Y.prototype.sa,_e.prototype.ra=t.Y.prototype.ra;var Mn={};t.sq(Mn,[[0,"enabled",t.Zq],t.Z.Yn,t.Z.hK]),t.U(_e,Mn),t.Gq(_e,Ki,"labels"),t.Gq(_e,["fill"],"background"),t.g=_e.prototype,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.df(),this.Ia.parent(this.Yk.background()),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(256,1)},t.g.Qf=function(t){var e=this.Bb;return e.left==t.left&&e.top==t.top&&e.width==t.width&&e.height==t.height||(this.Bb=t,this.B(4)),this},t.g.m_=function(e){if(t.p(e)&&this.i!=e){if(this.i=e,je(this),this.b){e=this.b;var i=this.i;t.p(i)&&e.b!=i&&(e.b=i,e.reset(),t.dz(e),e.va(t.KE|t.LE))}return this.B(576,1),this}return this.i},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,this.Da.Ga("ganttDefaultSimpleLabelsSettings","defaultLevelsLabelsSettings"),this.Da.parent(this.Yk.labels()),t.K(this.Da,this.de,this)),t.p(e)?(this.Da.N(e),this.B(64,1),this):this.Da},t.g.de=function(e){var i=!1;this.b||(je(this),i=!!this.b),i&&(this.b.va(t.KE|t.LE),this.b.Kn(e)),this.B(64,1)},t.g.Am=function(e,i){var n=e.start,s=e.end,a=t.us(n,i),o=t.us(s,i),r=a,l=this.qa.KT();return a=this.qa.JT(),1<l&&("year"===this.Dg||"semester"===this.Dg||"quarter"===this.Dg?(1<l?(r=new Date(n),a=Date.UTC(r.getUTCFullYear()+(a||0),r.getUTCMonth()-(l-1),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())):a=n,r=t.us(a,i)):-1==i.indexOf("y")&&-1==i.indexOf("Q")||(l=new t.On(new Date(n)).getMonth()+1<l?-1:0,a=t.Vo("year",a+l),(l=new t.On(new Date(n))).add(a),a=l.getTime(),r=t.us(a,i))),t.ov(new t.Fw({value:{value:r,type:"string"},tickValue:{value:n,type:"number"},scale:{value:this.qa,type:""},end:{value:s,type:"number"},endValue:{value:o,type:"string"},unit:{value:this.Dg,type:"string"},count:{value:this.count,type:"number"}}))},t.g.mN=function(){this.Oa||(this.Oa=t.ok(),this.background().O(this.Oa),this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl),this.Lf.zIndex(1),this.Lf.parent(this.Oa),this.f=this.Oa.path(),this.f.zIndex(2))},t.g.W=function(){if(this.zc()){var e;if(this.mN(),this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.J(4)&&(this.B(896),this.I(4)),this.J(256)){var i=this.background();i.ka(),i.ja(this.Bb),i.W(),i.da(!1),this.I(256)}if(this.J(512)){if(null!=this.i)this.D=t.A(this.i)?this.i:[this.i];else{t:{i=this.Yk.f;for(var n=this.Ad;n<i.length;n++)if(e=i[n+1]){i=e;break t}i=null}if(i){var s=i.Dg;s!=this.Dg&&(s=t.vp(s,-1))}this.D=t.ts(t.rs(this.Dg,s,"timeline"))}this.o=this.D[0]||this.o,this.B(128),this.I(512)}if(this.J(128)){this.mb=this.qa.Fn(window.NaN,window.NaN,this.Dg,this.count),i=this.mb[0],s=this.Bb.left+this.qa.transform(i.start)*this.Bb.width,i=this.Bb.left+this.qa.transform(i.end)*this.Bb.width,i=Math.ceil(this.labels().padding().Ng(i-s)),n=this.b||this.Yk.b,t.ez(n),e=!1;var a=window.Infinity,o=this.o;for(s=0;s<this.D.length;s++){var r=this.D[s],l=n.pA;if(r in l){if((l=Math.ceil(l[r].width))<=i){this.o=r,e=!0;break}l<=a&&(a=l,o=r)}}e||(this.o=o),this.B(80),this.I(128)}if(this.J(64)){for(s=0;s<this.mb.length;s++)i=this.mb[s],n=this.ye[s]||(this.ye[s]=new t.Ix),e=this.Am(i,this.o),e=this.labels().tk(e),n.text(e),n.style(this.labels().flatten()),n.Ij(),t.Px(n,this.xl),e=Math.max(0,this.qa.transform(i.start)),e=this.Bb.left+e*this.Bb.width,e+=this.labels().padding().g("left"),i=this.Bb.left+this.qa.transform(i.end)*this.Bb.width,a=this.labels().padding().g("right"),i=Math.max(0,i-e-a),t.Wx(n,new t.I(e,this.Bb.top,i,this.Bb.height),this.O().Ja());for(i=this.ye.length;s<i;s++)n=this.ye[s],t.Px(n,null),t.Rx(n);this.I(64)}if(this.J(16)){for(this.f.clear(),s=this.g("stroke")||this.Yk.g("stroke"),n=t.dp(s),a=t.R(this.Bb.top,n),this.f.stroke(s).moveTo(this.Bb.left,a).lineTo(this.Bb.left+this.Bb.width,a),s=0;s<this.mb.length;s++)i=this.mb[s],e=this.Bb.left+this.qa.transform(i.start)*this.Bb.width,e=t.R(e,n),this.f.moveTo(e,a).lineTo(e,this.Bb.top+this.Bb.height);this.I(16)}}},t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.F=function(){var e=_e.u.F.call(this);t.Tq(this,Mn,e),t.Jc(this.background().Pa)||(e.background=this.background().F());var i=this.labels().F();return t.Jc(i)||(e.labels=i),this.i&&(e.formats=this.i),e},t.g.U=function(e,i){_e.u.U.call(this,e,i),t.Iq(this,Mn,e,i),this.labels().ka();for(var n=0;n<Ki.length;n++){var s=Ki[n];s in e&&this.labels()[s](e[s])}this.Da.da(!0),this.background().ga(!!i,e.background),this.Da.ga(!!i,e.labels),"formats"in e&&this.m_(e.formats)},t.g.R=function(){t.sd(this.f,this.Ia),this.b&&t.qd(this.b),this.b=this.qa=this.Yk=this.Ia=this.f=null;for(var e=0;e<this.ye.length;e++)this.ye[e].ld();_e.u.R.call(this)};var Nn=_e.prototype;Nn.labels=Nn.labels,Nn.background=Nn.background,Nn.formats=Nn.m_,t.H(Me,t.Y),Me.prototype.sa=528|t.Y.prototype.sa,Me.prototype.ra=t.Y.prototype.ra;var Bn={};t.sq(Bn,[[1,"stroke",t.Pq],[0,"levelHeight",t.br]]),t.U(Me,Bn),t.Gq(Me,Ki,"labels"),t.Gq(Me,["fill"],"background"),t.g=Me.prototype,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.Wj(!0),this.Ia.Ga("defaultGanttHeader.background"),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(16,1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,this.Da.Ga("ganttDefaultSimpleLabelsSettings","defaultLevelsLabelsSettings"),this.Da.Wj(!0),t.K(this.Da,this.de,this)),t.p(e)?(this.Da.N(e),this.B(512,1),this):this.Da},t.g.de=function(){this.B(512,1)},t.g.level=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.f[n];return a||(this.f[n]=a=new _e(this,n),a.labels().parent(this.labels()),t.K(a,this.sha,this),a.Ga("defaultLevelSettings")),t.p(s)?(a.N(s),this):a},t.g.sha=function(e){var i=0,n=0;t.X(e,32776)&&(this.P=null,i|=512,n|=1),t.X(e,1)&&(i|=512,n|=1),this.B(i,n)},t.g.MX=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=this.f[e]||this.level(e);n.Dg==i.unit&&n.count==i.count||(n.Dg=i.unit,n.count=i.count,n.B(512)),n.B(128)}this.B(512,1)},t.g.rha=function(){this.P=null},t.g.Qf=function(t){var e=this.Bb;return e.left==t.left&&e.top==t.top&&e.width==t.width&&e.height==t.height||(this.Bb=t,this.B(4,9)),this},t.g.ob=function(){return this.Bb},t.g.HA=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.Kv=function(){this.i||(this.i=t.ok(),this.gg=t.tk(),this.i.clip(this.gg),this.o=this.i.Bd())},t.g.W=function(){if(this.zc()){var e,i;this.Kv(),this.J(2)&&(this.i.parent(this.O()),this.I(2)),this.J(8)&&(this.i.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(t.ez(this.b),this.gg.shape(this.Bb),this.P=null,this.B(512),this.I(4));var n=!1;if(this.J(512)){if(n=!0,null==this.P){var s=0,a=0;for(this.G=[],e=0;e<this.f.length;e++)(i=this.f[e])&&i.enabled()&&(null!=(i=i.g("height")||this.g("levelHeight"))?(i=t.L(i,this.Bb.height),this.G[e]=i,s+=i):(this.G[e]=null,a++));this.P=a?Math.max(0,(this.Bb.height-s)/a):0}for(s=this.Bb.top+this.Bb.height,e=0;e<this.f.length;e++)if(i=this.f[e])if(i.enabled()){i.ka(),i.O(this.o),a=null!=(a=this.G[e])?a:this.P;var o=new t.I(this.Bb.left,s-a,this.Bb.width,a);t.Xo(o,0),i.Qf(o),i.da(!1),s-=a}else i.remove();this.I(512)}if(this.J(16)){for(n=!0,e=0;e<this.f.length;e++)(i=this.f[e])&&i.B(272);this.I(16)}if(n)for(e=0;e<this.f.length;e++)(i=this.f[e])&&i.W()}},t.g.F=function(){var e=Me.u.F.call(this);t.Tq(this,Bn,e),e.levels=[];for(var i=0;i<this.f.length;i++){var n=this.f[i];n&&e.levels.push(n.F())}return e.labels=this.labels().F(),e.background=this.background().F(),e},t.g.U=function(e,i){Me.u.U.call(this,e,i),t.Iq(this,Bn,e,i),this.background().ga(!!i,e.background),this.labels().ga(!!i,e.labels);var n=e.levels;if(t.A(n))for(var s=0;s<n.length;s++)this.level(s,n[s])},t.g.R=function(){this.aa=null,t.sd(this.f,this.b,this.D,this.K),this.f.length=0,this.b=this.K=this.D=null,Me.u.R.call(this)};var Rn=Me.prototype;Rn.background=Rn.background,Rn.level=Rn.level,Rn.labels=Rn.labels,Rn.getPixelBounds=Rn.ob,t.H(Ne,ot),Ne.prototype.ra=ot.prototype.ra,Ne.prototype.sa=14848|ot.prototype.sa;var Hn={millisecond:0,second:1,minute:2,hour:3,day:4,week:5,"third-of-month":6,month:7,quarter:8,semester:9,year:10},zn={};t.sq(zn,[[0,"cropLabels",t.Dq],[0,"zoomOnMouseWheel",t.Dq],[1,"columnStroke",t.Pq],[1,"workingFill",t.Qq],[1,"notWorkingFill",t.Qq],[1,"holidaysFill",t.Qq],[1,"weekendsFill",t.Qq],[0,"connectBy",t.zq],[0,"allowConnectorCaps",t.Dq]]),t.U(Ne,zn),t.g=Ne.prototype,t.g.elements=function(e){return this.dy||(this.dy=new De(this),t.W(this,"elements",this.dy),this.dy.$c(),t.K(this.dy,this.Vu,this)),t.p(e)?(this.dy.N(e),this):this.dy},t.g.Gr=function(e){return this.Nw||(this.Nw=new Ae(this),t.W(this,"periods",this.Nw),this.Nw.$c(),this.Nw.parent(this.elements()),t.K(this.Nw,this.Vu,this)),t.p(e)?(this.Nw.N(e),this):this.Nw},t.g.Nc=function(e){return this.Kk||(this.Kk=new Ue(this),t.W(this,"tasks",this.Kk),this.Kk.$c(),this.Kk.parent(this.elements()),t.K(this.Kk,this.Vu,this)),t.p(e)?(this.Kk.N(e),this):this.Kk},t.g.Wc=function(e){return this.hk||(this.hk=new Ie(this),t.W(this,"milestones",this.hk),this.hk.$c(),this.hk.parent(this.elements()),t.K(this.hk,this.Vu,this),t.K(this.hk.Ei(),this.Vu,this)),t.p(e)?(this.hk.N(e),this):this.hk},t.g.Sp=function(e){return this.Bt||(this.Bt=new ke(this),t.W(this,"baselineMilestones",this.Bt),this.Bt.$c(),this.Bt.parent(this.elements()),t.K(this.Bt,this.Vu,this),t.K(this.Bt.Ei(),this.Vu,this)),t.p(e)?(this.Bt.N(e),this):this.Bt},t.g.np=function(e){return this.fw||(this.fw=new Fe(this),t.W(this,"groupingTasks",this.fw),this.fw.$c(),this.fw.parent(this.elements()),t.K(this.fw,this.Vu,this)),t.p(e)?(this.fw.N(e),this):this.fw},t.g.Ml=function(e){return this.ov||(this.ov=new Le(this),t.W(this,"baselines",this.ov),this.ov.$c(),this.ov.parent(this.elements()),t.K(this.ov,this.Vu,this)),t.p(e)?(this.ov.N(e),this):this.ov},t.g.nj=function(e){return this.Kj||(this.Kj=new Ge(this),t.W(this,"connectors",this.Kj),this.Kj.$c(),t.K(this.Kj,this.Vu,this)),t.p(e)?(this.Kj.N(e),this):this.Kj},t.g.io=function(e,i,n,s){var a,o=e.get("id"),r=i.Ma(),l=i.kI||(i.kI=[i.labels(),i.wf().elements().labels(),i.wf().labels()]);(i=Te(i,e,s))&&(a=i.label),i=this.controller.km()+n.top-this.uk()-this.fa.top;var h=this.controller.Cg();return n={$H:!0,id:o,type:r,item:e,labels:l,Ta:n,PV:a,Af:i=F(this.controller,(this.controller.b[h-1]||0)+i)},t.p(s)&&(n.Fq=s,e=e.get("periods"),n.ub=e[s]),n},t.g.Vu=function(e){if(!t.X(e,2)){var i=0;t.X(e,4096)&&(i|=2048),t.X(e,1)&&(i|=64),t.X(e,8192)&&(i|=128),this.B(i,1)}},t.g.scale=function(e){return t.p(e)?(this.qa.N(e),this):this.qa},t.g.ii=function(e){var i=0;t.X(e,4)&&(i|=4608),t.X(e,2)&&(i|=8192),this.B(i,1)},t.g.$v=function(){return this.qa},t.g.GA=function(e){return this.Yk||(this.Yk=new Me(this),this.Yk.zIndex(80),t.K(this.Yk,this.T2,this),this.Yk.b.va(t.KE|t.LE)),t.p(e)?(this.Yk.N(e),this):this.Yk},t.g.T2=function(e){t.X(e,1)&&this.B(512,1)},t.g.IL=function(e){return t.p(e)?(this.RS=e,this):this.RS||{}},t.g.JL=function(e){return t.p(e)?(this.TS=e,this):this.TS||{}},t.g.NL=function(e){return t.p(e)?(this.VS=e,this):this.VS||{}},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.WA[n];return a||((a=new re(this.qa)).Ga(this.oa.defaultLineMarkerSettings),a.kb(this),this.WA[n]=a,t.K(a,this.Ry,this),this.B(4096,1)),t.p(s)?(a.N(s),this):a},t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.pB[n];return a||((a=new le(this.qa)).Ga(this.oa.defaultRangeMarkerSettings),a.kb(this),this.pB[n]=a,t.K(a,this.Ry,this),this.B(4096,1)),t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.OB[n];return a||((a=new he(this.qa)).Ga(this.oa.defaultTextMarkerSettings),a.kb(this),this.OB[n]=a,t.K(a,this.Ry,this),this.B(4096,1)),t.p(s)?(a.N(s),this):a},t.g.Ry=function(){this.B(4096,1)},t.g.labels=function(e){if(this.rh||(this.rh=new t.Pu,this.rh.kb(this),t.K(this.rh,this.de,this),t.W(this,"labels",this.rh)),t.p(e)){var i=!0;return t.J(e,t.Pu)?this.rh.N(e.F()):t.C(e)?this.rh.N(e):t.cp(e)?this.rh.enabled(!1):i=!1,i&&this.B(64,1),this}return this.rh},t.g.Db=function(e){if(this.su||(this.su=new t.dy,this.su.Ga("defaultTimeline.markers"),this.su.kb(this)),t.p(e)){var i=!0;return t.J(e,t.dy)?this.su.N(e.F()):t.C(e)?this.su.N(e):t.cp(e)?this.su.enabled(!1):i=!1,i&&this.B(64,1),this}return this.su},t.g.Rea=function(t){this.Ot=new ce(Ke(this)),this.Ot.wa("start",this.m1,!1,this),this.Ot.wa("drag",this.n1,!1,this),this.Ot.wa("end",this.o1,!1,this),this.Ot.lk(t.kf)},t.g.Sea=function(t){this.Pt=new ue(Ye(this)),this.Pt.wa("start",this.r1,!1,this),this.Pt.wa("drag",this.s1,!1,this),this.Pt.wa("end",this.p1,!1,this),this.Pt.lk(t.kf)},t.g.Iea=function(t){this.NG=new de(Xe(this)),this.NG.wa("start",this.Jea,!1,this),this.NG.wa("drag",this.Kea,!1,this),this.NG.wa("end",this.Hea,!1,this),this.NG.lk(t.kf)},t.g.Qea=function(t){this.Nt=new ge(Je(this),!0),this.Nt.wa("start",this.l1,!1,this),this.Nt.wa("drag",this.kM,!1,this),this.Nt.wa("end",this.jM,!1,this),this.Nt.lk(t.kf)},t.g.Tea=function(t){this.Qt=new ge(Ze(this),!1),this.Qt.wa("start",this.t1,!1,this),this.Qt.wa("drag",this.kM,!1,this),this.Qt.wa("end",this.jM,!1,this),this.Qt.lk(t.kf)},t.g.Uea=function(t){this.Rt=new pe(this,Qe(this),!0),this.Rt.wa("start",this.hM,!1,this),this.Rt.wa("drag",this.iM,!1,this),this.Rt.wa("end",this.gM,!1,this),this.Rt.lk(t.kf)},t.g.Lea=function(t){this.Mt=new pe(this,ti(this),!1),this.Mt.wa("start",this.hM,!1,this),this.Mt.wa("drag",this.iM,!1,this),this.Mt.wa("end",this.gM,!1,this),this.Mt.lk(t.kf)},t.g.m1=function(){this.Vg&&this.Vg.Dj(!1),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),this.Gb.ro(),Ye(this).clear(),Xe(this).clear(),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),t.uf(t.Lp.body,"cursor","ew-resize"),bt(this,!0)},t.g.n1=function(){this.vi=!0,this.Cm=!1,this.zo=this.gT=!0},t.g.o1=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0);var i=Ke(this).rb();ii(this);var n=e.target.element;e=n.tag.item;var s=this.controller.data();if(s.ka(),i=t.Gt(this.qa,"milestones"==n.tag.type||"milestones-preview"==n.tag.type?(i.left+i.width/2-this.fa.left)/this.fa.width:(i.left-this.fa.left)/this.fa.width),!(0,window.isNaN)(i))switch(n.tag.type){case"milestones":case"milestones-preview":if(this.controller.i){n=n.tag.Fq;var a=e.no("periods",n,"start");a=t.p(a)?"start":"end",e.set("periods",n,a,i),e.Jk("periods",n,a,i)}else e.set("actualStart",i),e.j("actualStart",i),t.p(e.get("actualEnd"))&&(e.set("actualEnd",i),e.j("actualEnd",i));break;case"periods":n=n.tag.Fq,a=e.no("periods",n,"start"),a=e.no("periods",n,"end")+(i-a),(0,window.isNaN)(a)||(e.set("periods",n,"start",i),e.Jk("periods",n,"start",i),e.set("periods",n,"end",a),e.Jk("periods",n,"end",a));break;case"baselines":n=e.j("baselineStart"),a=e.j("baselineEnd"),n=i-n,(0,window.isNaN)(a+n)||(e.set("baselineStart",i),e.j("baselineStart",i)),e.set("baselineEnd",a+n),e.j("baselineEnd",a+n);break;default:n=(a=(n=dt(e)).end)+(n=i-n.start),(0,window.isNaN)(n)||(e.set("actualStart",i),e.j("actualStart",i),e.set("actualEnd",n),e.j("actualEnd",n))}s.da(!0),Ei(this),this.gT=this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null}t.uf(t.Lp.body,"cursor",""),bt(this,!1)},t.g.r1=function(){this.Vg&&this.Vg.Dj(!1),this.GG=!0,this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),Ke(this).clear(),Xe(this).clear()},t.g.s1=function(){this.vi=!0,this.Cm=!1,this.zo=!0},t.g.p1=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0),ii(this);var i=(e=e.target).element.tag.item;(0,window.isNaN)(e.Kd)||i.set("progressValue",t.Tm(e.Kd,2)),this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null,this.GG=!1}},t.g.Jea=function(){this.Vg&&this.Vg.Dj(!1),this.GG=!0;var t=this.Ua();this.ot=t.enabled(),t.Lc(),t.enabled(!1),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),Ke(this).clear(),Ye(this).clear()},t.g.Kea=function(){this.vi=!0,this.Cm=!1,this.zo=!0},t.g.Hea=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0),ii(this);var i=(e=e.target).element.tag.item;(0,window.isNaN)(e.Kd)||i.set("baselineProgressValue",t.Tm(e.Kd,2)),this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null,this.GG=!1}},t.g.t1=function(){this.Vg&&this.Vg.Dj(!1),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),Ye(this).clear(),Xe(this).clear(),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),t.uf(t.Lp.body,"cursor","col-resize"),this.iq.cursor("col-resize"),bt(this,!0)},t.g.l1=function(){this.Vg&&this.Vg.Dj(!1),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),Ye(this).clear(),Xe(this).clear(),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),t.uf(t.Lp.body,"cursor","col-resize"),this.iq.cursor("col-resize"),bt(this,!0)},t.g.kM=function(t){this.vi=!0,this.Cm=!1,this.Wx=t.target,this.zo=!0,si(this,t)},t.g.jM=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0);var i=this.iq.rb();this.os.push(this.iq),ii(this);var n=(e=e.target.element).tag.item,s=e.tag.Fq,a=this.controller.data();a.ka();var o=(i.left+i.width-this.fa.left)/this.fa.width;if(i=t.Gt(this.qa,(i.left-this.fa.left)/this.fa.width),o=t.Gt(this.qa,o),!(0,window.isNaN)(i)&&!(0,window.isNaN)(o))switch(e.tag.type){case"periods":n.set("periods",s,"start",i),n.Jk("periods",s,"start",i),n.set("periods",s,"end",o),n.Jk("periods",s,"end",o);break;case"baselines":n.set("baselineStart",i),n.j("baselineStart",i),n.set("baselineEnd",o),n.j("baselineEnd",o);break;default:n.set("actualStart",i),n.j("actualStart",i),n.set("actualEnd",o),n.j("actualEnd",o)}a.da(!0),Ei(this),this.Wx=null,this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null}t.uf(t.Lp.body,"cursor",""),this.iq.cursor("ew-resize"),bt(this,!1)},t.g.hM=function(t){this.Vg&&this.Vg.Dj(!1),this.Gb.ro(),this.ap=t.target,ii(this),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),bt(this,!0)},t.g.iM=function(t){this.Yx=this.vi=!0,this.Cm=this.ET=!1,this.ap.b=t.clientX,this.ap.i=t.clientY,this.zo=!0},t.g.gM=function(){this.vi&&(this.Vg&&this.Vg.Dj(!0),this.Ua().enabled(this.ot),this.ot=void 0,ei(this).clear(),this.Yx=this.vi=!1,this.ET=!0,(0,window.clearInterval)(this.Vn),this.Vn=null),bt(this,!1)},t.g.OZ=function(e,i){if(this.vi){if(this.Yx)if(e&&this.ap){var n=e.originalEvent.domTarget;if(n&&n.tag&&n.tag.$H){var s=(n=n.tag).item;if("baselines"!=n.type&&"connectors"!=n.type&&"milestones-preview"!=n.type){var a=this.ap.element.tag,o=a.item,r=a.index,l=e.period,h=e.periodIndex;l?(a={item:o,period:a.ub,index:r,periodIndex:a.Fq},s={item:s,period:l,index:e.hoveredIndex+this.controller.Cg(),periodIndex:h}):(a={item:o,index:r},s={item:s,index:e.hoveredIndex+this.controller.Cg()}),n=.5>((l=i.clientX-t.Zj(this.O().Ja()).x)-(n=n.Ta).left)/n.width,n=this.ap.My?n?"start-start":"start-finish":n?"finish-start":"finish-finish",ei(this).clear(),Pi(this,a,s,n,void 0,ei(this))}else ai(this,i)}else ai(this,i)}else ai(this,i)}else if(e&&e.originalEvent){if((a=(a=e.originalEvent).domTarget)&&a.tag&&a.tag.$H){if(o=(h=(l=a.tag).item).get("id"),t.p(this.KN)||(this.KN=o),s=e.periodIndex,t.p(s)&&(0,window.isNaN)(this.LN)&&(this.LN=s),this.KN!=o&&this.LN!=s&&(ii(this,!0),this.KN=o,t.p(s)&&(this.LN=s)),l.Ta){if("baseline-progress"!=l.type){var c=l.type;o=l.Ta;var u=l.item;ii(this,!0),(r=li(this,c).uf()).g("enabled")&&(c=Re(u,null,c,o,s),(u=Ke(this)).tag=c,u.fill(r.g("fill")).stroke(r.g("stroke")).clear().moveTo(o.left,o.top).lineTo(o.left+o.width,o.top).lineTo(o.left+o.width,o.top+o.height).lineTo(o.left,o.top+o.height).close(),this.os.push(u))}if(h)if("tasks"==l.type||"grouping-tasks"==l.type||"progress"==l.type){if(c=l.Ta,u=l.item,(o=li(this,l.type).Kd().uf()).g("enabled")){var d=Re(u,null,"progress",c,void 0);(r=Ye(this)).tag=d,u=t.p(u.j("progressValue"))?u.j("progressValue"):u.j("autoProgress"),u=c.left+(u||0)*c.width,c=c.top+c.height,r.fill(o.g("fill")).stroke(o.g("stroke")).clear().moveTo(u,c-5).lineTo(u+5,c).lineTo(u+5,c+5).lineTo(u-5,c+5).lineTo(u-5,c).close(),this.os.push(r)}}else"baselines"!=l.type&&"baseline-progress"!=l.type||(c=l.Ta,u=l.item,(o=li(this,l.type).Kd().uf()).g("enabled")&&(d=Re(u,null,"baseline-progress",c,void 0),(r=Xe(this)).tag=d,u=u.get("baselineProgressValue")||0,u=t.Ao(u),u=c.left+u*c.width,c=c.top+c.height,r.fill(o.g("fill")).stroke(o.g("stroke")).clear().moveTo(u,c-5).lineTo(u+5,c).lineTo(u+5,c+5).lineTo(u-5,c+5).lineTo(u-5,c).close(),this.os.push(r)));else Ye(this).clear(),Xe(this).clear();if(h&&"milestones"!=l.type&&"milestones-preview"!=l.type){c=l.type,o=l.Ta,u=l.item,r=li(this,c).uf(),c=Re(u,null,c,o,s),u=r.start().Pu(),d=r.end().Pu();var p=o.left+o.width;if(r.g("enabled")&&u.g("enabled")){var g=Je(this);g.tag=c;var f=u.g("size");g.fill(u.g("fill")).stroke(u.g("stroke")).clear().moveTo(o.left-1,o.top).lineTo(o.left-1+f,o.top).lineTo(o.left-1+f,o.top+o.height).lineTo(o.left-1,o.top+o.height).close(),this.os.push(g)}r.g("enabled")&&d.g("enabled")&&((g=Ze(this)).tag=c,f=d.g("size"),g.fill(d.g("fill")).stroke(d.g("stroke")).clear().moveTo(p+1,o.top).lineTo(p+1-f,o.top).lineTo(p+1-f,o.top+o.height).lineTo(p+1,o.top+o.height).close(),this.os.push(g))}else Je(this).clear(),Ze(this).clear();h&&"baselines"!=l.type&&"milestones-preview"!=l.type?(o=e.hoveredIndex+this.controller.Cg(),r=l.type,h=l.Ta,c=l.item,l=li(this,r).uf(),s=Re(c,o,r,h,s),o=h.left+h.width,r=l.start().Et(),c=l.end().Et(),f=h.top+h.height/2,l.g("enabled")&&r.g("enabled")&&((u=Qe(this)).tag=s,u.fill(r.g("fill")).stroke(r.g("stroke")),g=t.zp(r.g("type")),d=r.g("size")/2,g.call(null,u,h.left-d+r.g("horizontalOffset"),f+r.g("verticalOffset"),d),this.os.push(u)),l.g("enabled")&&c.g("enabled")&&((u=ti(this)).tag=s,u.fill(c.g("fill")).stroke(c.g("stroke")),g=t.zp(c.g("type")),d=c.g("size")/2,g.call(null,u,o+d+c.g("horizontalOffset"),f+c.g("verticalOffset"),d),this.os.push(u))):(ti(this).clear(),Qe(this).clear())}}else!a||a.tag&&a.tag.dha||ii(this,!0);if(s=ri(this,e))this.Gb.dispatchEvent(s),this.JH=a.j;else if(this.JH){if(e&&e.originalEvent){for(n in a={type:"connectormouseout",actualTarget:e.originalEvent.target,target:this,originalEvent:e.originalEvent},this.JH)a[n]=this.JH[n];s=a}else s=null;this.Gb.dispatchEvent(s),this.JH=null}}else ii(this,!1)},t.g.iJ=function(t){this.vW(t)},t.g.TO=function(){this.Ua().enabled(this.ot),this.ot=void 0},t.g.vW=function(t){this.elements().uf().g("enabled")&&(this.oj=t.item)},t.g.NZ=function(t){t&&(t=ri(this,t))&&this.Gb.dispatchEvent(t)},t.g.PZ=function(e){if(this.ET&&(this.ET=!1,e)){var i=e.item,n=e.periodIndex,s=e.originalEvent,a=s.domTarget;if((a=a?a.tag:void 0)&&a.$H&&"baselines"!=a.type&&"milestones-preview"!=a.type){s=s.clientX-t.Zj(this.O().Ja()).x,a=a.Ta;var o=this.ap.My?this.Hv:this.Ev;if(a=.5>(s-a.left)/a.width,s=o.tag.item,a=this.ap.My?a?"start-start":"start-finish":a?"finish-start":"finish-finish",o=o.tag.Fq,a=a||"finish-start",t.J(s,t.du)||t.J(s,t.$t)||(s=(s=this.controller.data().Eo("id",s)).length?s[0]:null),s&&(t.J(i,t.du)||t.J(i,t.$t)||(i=(i=this.controller.data().Eo("id",i)).length?i[0]:null),i)){this.controller.data().ka();var r=!1;if(this.controller.i){var l=s.get("periods")[o],h=i.get("periods")[n];if(t.p(l)&&t.p(h)){var c=l.connector,u={};if(u.connectTo=h.id,u.connectorType=a,c)if(t.A(c))c=c.length;else{r=t.Qc(c);var d={};d.connectTo=l.connectTo,d.connectorType=l.connectorType||"finish-start",t.Sc(d,r),c=1,r=!0}else c=l.connectTo,t.p(c)?((d={}).connectTo=c,d.connectorType=l.connectorType||"finish-start",c=1,r=!0):c=0;n={type:"beforeCreateConnector",target:i,source:s,connectorType:a,targetPeriod:h,targetPeriodIndex:n,sourcePeriod:l,sourcePeriodIndex:o},this.Gb.dispatchEvent(n)&&(r&&s.set("periods",o,"connector",[d]),s.set("periods",o,"connector",c,u))}}else c=s.get("connector"),(u={}).connectTo=i.get("id"),u.connectorType=a,c?t.A(c)?c=c.length:(r=t.Qc(c),(d={}).connectTo=s.get("connectTo"),d.connectorType=s.get("connectorType")||"finish-start",t.Sc(d,r),c=1,r=!0):(c=s.get("connectTo"),t.p(c)?((d={}).connectTo=c,d.connectorType=s.get("connectorType")||"finish-start",c=1,r=!0):c=0),n={type:"beforeCreateConnector",target:i,source:s,connectorType:a},this.Gb.dispatchEvent(n)&&(r&&s.set("connector",[d]),s.set("connector",c,u));this.controller.data().da(!0)}}}(e=ri(this,e))?this.Gb.dispatchEvent(e):ei(this).clear(),this.Yx=!1,this.ap=null,this.Cm=!0},t.g.wW=function(t){if(this.vi&&!this.GG&&(this.Fu||this.bx)){var e=0,i=0;this.Fu&&(e=0<this.Fu?30:-30),(this.Yx||this.oj)&&this.bx&&(i=0<this.bx?30:-30),this.scroll(e,i,!0)&&(si(this,t,this.Fu),ai(this,t,this.Fu,this.bx))}},t.g.Ua=function(e){return t.p(e)?(this.elements().Ua(e),this):this.elements().Ua()},t.g.OM=function(t,e,i){return e?ci(this,e,i):this.Ua()},t.g.SO=function(t){if(!ui(this,t)&&(t=t.item)&&ct(t)){var e=!t.j("collapsed");this.Gb.dispatchEvent({type:"rowcollapseexpand",item:t,collapsed:e})&&t.j("collapsed",e)}},t.g.UO=function(e){di(this,e)||(pi(this,e),gi(this,e.item,e.periodIndex)&&((e=t.Qc(e)).type="rowSelect",this.Gb.dispatchEvent(e)))},t.g.rl=function(e){var i=Ne.u.rl.call(this,e),n=i&&i.originalEvent?i.originalEvent.domTarget:null;if(i&&n){var s=this.ob();s=Math.abs(s.left-e.offsetX)/s.width;var a=t.Gt(this.scale(),s);if(n.tag&&t.p(n.tag.type))var o=n.tag.type;i.hoverRatio=s,i.hoverDateTime=a,o&&(i.elementType=o,"milestones-preview"===o||"baselines-milestones-preview"===o)&&(i.tooltipItem=i.originalEvent.domTarget.tag.item),this.controller.i&&n.tag&&(i.period=n.tag.ub,i.periodIndex=n.tag.Fq),(e=function(e,i){var n=e.mp,s=e.uk();s=e.fa.top+t.Zj(e.O().Ja()).y+s,n=(0<=(n=t.Na(n,i.clientY-s))?n:~n)+e.controller.Cg();var a=new t.gb(i.offsetX,i.offsetY);return t.ya(e.QE[n]||[],(function(t){return!(!t.label.enabled()||0!==Mi(t.label).Tf(a))}),e)}(this,e))&&(this.controller.i?(i.period=e.ub,i.periodIndex=e.Fq,i.elementType=e.type):i.tooltipItem=e.item)}return i},t.g.YL=function(e,i,n){var s=e.get("markers");if(s)for(var a=0;a<s.length;a++){var o=s[a];if(o){var r=e.no("markers",a,"value");if(null!==r){var l=t.Ft(this.qa,r);if(0<=l&&1>=l){r=.7*n,l=Math.round(this.fa.left+this.fa.width*l);var h=Math.round(i+n/2);(l=this.Db().add({value:{x:l,y:h}})).ta("size",r/2),l.N(o)}}}}},t.g.oT=function(){var t=Ne.u.oT.call(this);return t.top+=this.uk(),yt(this).clip(t),t},t.g.bs=function(t){Ne.u.bs.call(this,t),Ai(this).clip(t)},t.g.mN=function(){xt(this).zIndex(33),this.Db().O(St(this)),this.labels().O(St(this)),this.GA().O(vt(this)),Ei(this)},t.g.fs=function(){this.GA().Qf({left:this.fa.left,top:this.fa.top,width:this.fa.width,height:this.uk()}),this.B(4096),this.gJ=!0},t.g.kv=function(){We(this).stroke(It("columnStroke",2)(this,0))},t.g.nV=function(t){t.hc(mt(this)).hc(Ai(this)).hc(Ui(this)).hc(yt(this)).hc(_i(this)).hc(St(this)).hc(wt(this)).hc(xt(this)).hc(Ct(this))},t.g.Kn=function(){this.J(2048)&&(this.Kt(),this.I(2048))},t.g.dY=function(){var e=this.GA();this.J(512)&&(this.gJ=this.$y=!0,e.B(512),this.B(8192),this.I(512));var i=t.Ht(this.qa);if(this.gJ){e.ka(),e.MX(i);for(var n=[],s=0;s<i.length;s++)if(e.level(s).enabled()){i=i[s],this.TC=i.unit,n=this.qa.Fn(window.NaN,window.NaN,i.unit,i.count);break}if(e.W(),e.da(!1),(e=n).length){n=(i=We(this).clear()).stroke(),n=t.dp(n),s=this.fa.top+this.uk()+1;for(var a=this.fa.top+this.fa.height,o=0,r=e.length;o<r;o++){var l=t.Ft(this.qa,e[o].start);l=this.fa.left+this.fa.width*l,l=t.R(l,n),i.moveTo(l,s).lineTo(l,a)}}i=this.qa.uj(),n=this.qa.sj(),e=t.Ft(this.qa,i.min)*this.fa.width,s=t.Ft(this.qa,i.max)*this.fa.width,i=t.Ft(this.qa,n.min)*this.fa.width,n=t.Ft(this.qa,n.max)*this.fa.width,this.Sh&&(e=new t.I(e,0,s-e,0),i=new t.I(i,0,n-i,0),this.Sh.ka().op(!1).kg(e).aQ(i).W().op(!0).da(!1),this.Sh.O()&&this.Sh.W())}if(this.J(8192)){if(Ve(this).clear(),qe(this).clear(),He(this).clear(),ze(this).clear(),this.qa.je&&this.TC&&Hn.day>=Hn[this.TC])for(e=this.qa.vD(),i=0;i<e.length;i++)s=(n=e[i]).start,a=n.end,o=n.isWeekend,n.isHoliday?"day"===this.TC?Fi(this,He(this),s,a):Ii(this,n):o?Fi(this,ze(this),s,a):Ii(this,n);this.I(8192)}},t.g.O4=function(){if(this.$y||this.gJ){for(var e=Be(this),i=0;i<e.length;i++){var n=e[i];n.Rf||n.rE(),n.Rf.uv()}if(yt(this).Gi(),this.VJ=0,this.Db().clear(),this.controller.i){if(this.Gr().g("enabled"))for(var s=this.fa.top+this.uk()+1-this.controller.km(),a=this.controller.D,o=this.controller.Cg();o<=this.controller.Nj();o++){var r=a[o];if(!r)break;var l=w(this.controller,r),h=s+l,c=r.get("periods");if(c)for(var u=0;u<c.length;u++){var d=pt(r,u);if(d.PA)Ci(this,r,s,l,d,u);else{var p=r,g=s,f=l,b=u,v=pt(p,b),m=v.start,y=v.end;if(v.DN){var S=t.Ft(this.qa,m),x=t.Ft(this.qa,y);if(0<x&&1>S){var C=this.fa.left+this.fa.width*S,D=this.fa.left+this.fa.width*x-C,T=this.Gr(),k=T.qd(p,b),$=t.L(k,f),O=new t.I(C,g,D,f),P=T.g("anchor"),L=T.g("position");"auto"==P&&(P=ni(this,L,"periods"));var G=T.rD(p,b),F=t.L(G,f),I=t.Eo(O,L),E=I.y+(t.Ko(P)?0:t.Lo(P)?-$:-$/2)+F,A=st(this.Gb.nk(),p,b),U=mi(T,new t.I(I.x,E,D,$),p,b,A),_=this.io(p,T,U,b);yi(this,p,U,b),we(T.hi(),p,U,_,b,A),wi(this,p,T,U,b)}}else v.CN&&ki(this,this.Wc(),p,g,f,v,b)}}this.YL(r,s,l),s=h+this.Tn}}else for(var j=this.fa.top+this.uk()+1-this.controller.km(),M=this.controller.D,N=this.controller.Cg();N<=this.controller.Nj();N++){var B=M[N];if(!B)break;var R,H=dt(B),z=w(this.controller,B),V=j+z,q=ht(B,H),W=ct(B,H),K=lt(B,H),Y=rt(B,H);if(R=!Y){var X=H||dt(B);R=!X.PA&&X.bN}var J=R;if(q)Ci(this,B,j,z,H);else if(W){var Z=B,Q=j,tt=z,et=H;if(this.np().g("enabled")&&(et.QA||et.eha||et.QD)){var it=this.Wc().Ei(),at=this.Sp().Ei(),ot=xi(it,Z),ut=xi(at,Z);Ti(this,0,Z,Q,tt,t.oa(Z),ot,ut,!1);var gt=et.start,ft=et.end;ft=(0,window.isNaN)(ft)?gt:ft,gt=(0,window.isNaN)(gt)?ft:gt;var bt=t.Ft(this.qa,gt),vt=t.Ft(this.qa,ft);if(0<vt&&1>bt){var mt=this.fa,St=this.np(),wt=mt.left+mt.width*bt,xt=mt.left+mt.width*vt-wt,Ct=vi(this,St,new t.I(wt,Q,xt,tt),Z);if(!Ct.width){var Dt=Ct.height;Ct.left-=Dt/2,xt=Dt,Ct.width=xt}var Tt=nt(this.Gb.nk(),Z);Ct=mi(St,Ct,Z,void 0,Tt);var kt=this.io(Z,St,Ct);yi(this,Z,Ct),we(St.hi(),Z,Ct,kt,void 0,Tt),wi(this,Z,St,Ct);var $t=St.Kd();if(et.EN&&$t.g("enabled")){var Ot=bi(et.Kd,xt,$t),Pt=vi(this,$t,new t.I(Ct.left,Ct.top,Ot,Ct.height),Z),Lt=this.io(Z,$t,Pt);we($t.hi(),Z,Pt,Lt,void 0,Tt),Ot&&wi(this,Z,$t,Pt)}}}}else if(K||Y){var Gt=this.Wc(),Ft=this.Sp(),It=this.Ml().g("above");if(K){var Et=H.bN?z/2:z;ki(this,Gt,B,It&&H.bN?j+Et:j,Et,H)}if(Y){var At=K?z/2:z;ki(this,Ft,B,K?It?j:j+At:j,At,H)}}else if(J){var Ut=B,_t=j,jt=z,Mt=H,Nt=Mt.QD||ct(Ut,Mt),Bt=Nt?this.np():this.Nc(),Rt=nt(this.Gb.nk(),Ut),Ht=Mt.start,zt=Mt.end;Nt&&(zt=(0,window.isNaN)(zt)?Ht:zt,Ht=(0,window.isNaN)(Ht)?zt:Ht);var Vt=t.Ft(this.qa,Ht),qt=t.Ft(this.qa,zt),Wt=Bt.g("enabled"),Kt=this.fa;if(0<qt&&1>Vt&&Wt){var Yt=Kt.left+Kt.width*Vt,Xt=vi(this,Bt,new t.I(Yt,_t,Kt.left+Kt.width*qt-Yt,jt),Ut,!0);if(Nt&&!Xt.width){var Jt=Xt.height;Xt.left-=Jt/2,Xt.width=Jt,Mt.QA=!0}Xt=mi(Bt,Xt,Ut,void 0,Rt);var Zt=this.io(Ut,Bt,Xt);if(Nt){var Qt=this.Wc().Ei(),te=this.Sp().Ei(),ee=xi(Qt,Ut),ie=xi(te,Ut);Ti(this,0,Ut,_t,jt,t.oa(Ut),ee,ie,!0)}if(yi(this,Ut,Xt),Mt.QA){we(Bt.hi(),Ut,Xt,Zt,void 0,Rt),wi(this,Ut,Bt,Xt);var ne=Bt.Kd();if(Mt.EN&&ne.g("enabled")){var se=bi(Mt.Kd,Xt.width,ne),ae=vi(this,ne,new t.I(Xt.left,Xt.top,se,Xt.height),Ut),oe=this.io(Ut,ne,ae);we(ne.hi(),Ut,ae,oe,void 0,Rt),se&&wi(this,Ut,ne,ae)}}}}else{var re=B,le=j,he=z,ce=H,ue=this.Nc();if(ue.g("enabled")&&ce.QA){var de=ce.end,pe=t.Ft(this.qa,ce.start),ge=t.Ft(this.qa,de);if(0<ge&&1>pe){var fe=this.fa,be=fe.left+fe.width*pe,ve=fe.left+fe.width*ge-be,me=vi(this,ue,new t.I(be,le,ve,he),re),ye=nt(this.Gb.nk(),re);me=mi(ue,me,re,void 0,ye);var Se=this.io(re,ue,me);yi(this,re,me),we(ue.hi(),re,me,Se,void 0,ye),wi(this,re,ue,me);var xe=ue.Kd();if(ce.EN&&xe.g("enabled")){var Ce=bi(ce.Kd,ve,xe),De=vi(this,xe,new t.I(me.left,me.top,Ce,me.height),re),Te=this.io(re,xe,De);we(xe.hi(),re,De,Te,void 0,ye),Ce&&wi(this,re,xe,De)}}}}this.YL(B,j,z),j=V+this.Tn}this.Db().W();for(var ke,$e=this.controller.ea,Oe=$e.length,Pe=this.controller.i?this.controller.na:this.controller.Ba;Oe--;){var Le=(ke=$e[Oe]).to;t.C(Le)||(Le=Pe[Le]),t.p(Le)?(ke.to=Le,Pi(this,ke.from,Le,ke.type,ke.connSettings)):t.Ca($e,Oe,1)}for(var Ge=this.VJ,Fe=this.WJ.length;Ge<Fe;Ge++)this.WJ[Ge].reset();this.B(2048),this.gJ=!1}},t.g.T3=function(){if(this.J(4096)){for(var e=t.Ga(this.WA,this.pB,this.OB),i=this.fa.top+this.uk()+1,n=new t.I(this.fa.left,i,this.fa.width,this.fa.height-this.uk()-1),s=0,a=e.length;s<a;s++){var o=e[s];if(o){var r=n,l=Ui(this);t.J(o,he)&&(r=new t.I(this.fa.left,i,this.fa.width,this.M6),l=_i(this)),o.ka(),o.B(4),o.ja(r),o.O(l),o.B(2),o.W(),o.da(!1)}}this.I(4096)}},t.g.de=function(){this.B(2048,1)},t.g.Kt=function(){this.labels().ka(),this.labels().clear(),this.QE=[];for(var e=this.g("cropLabels"),i=Be(this),n=0;n<i.length;n++){var s=i[n];if(s.g("enabled")){s.Rf||s.rE();var a=s.Rf.IP;for(g in a)if(a.hasOwnProperty(g)){var o=a[g];if(o.$H){var r=this.Ic(o.item,o.ub,o.Fq);o.label=this.labels().add(r,{value:{x:0,y:0}});var l=o.PV,h=o.labels,c=h&&h[0]?h[0]:null,u=this.elements().labels(),d=this.labels(),p=l&&t.p(l.enabled)?l.enabled:null;if(u=s&&t.p(u.enabled())?u.enabled():null,c=c&&t.p(c.enabled())?c.enabled():null,null===p?null===u?null===c?d.enabled():c:u:p){for(o.label.Hi(),o.label.enabled(!0),o.label.state("labelOwnSettings",o.label.Pa,0),o.label.state("pointState",l,1),l=h.length,d=0;d<l;d++)u=h[d],p=2+d,o.label.state("st"+p,u,p);for(d=0;d<l;d++)u=h[d],p=2+d+l,o.label.state("st"+p,u.oa,p);h=t.Dk(o.label.ic("position")),h={value:t.Eo(o.Ta,h)},o.label.jc(h),t.nv(r).label={value:o.label,type:""},t.ov(r),o.label.Hf(r),this.controller.data().ka(),o.item.j("label",o.label),this.controller.data().da(!1)}else o.label.enabled(!1);o.label.W(),t.A(this.QE[o.Af])||(this.QE[o.Af]=[]),r="periods"===o.type||"milestones"===o.type,h="milestones-preview"===o.type||"baselines-milestones-preview"===o.type,((l=this.controller.i)&&r||!l&&h)&&t.Ua(this.QE[o.Af],o,ji)}}}}if(e)for(n=this.controller.Cg(),e=this.controller.Nj();n<=e;n++)for(s=this.QE[n]||[],a=0;a<s.length;a++){h=s[a-1]||null;var g=s[a];r=s[a+1]||null,o=Mi(g.label),u=g,(l=r)?(d=l.Ta.tb()-u.Ta.cb(),p=Mi(l.label),u=u.Ta.cb()+d/2,l=p.tb()<l.Ta.tb()&&0<d?p.tb()<=u?u:p.tb():l.Ta.tb()):l=window.Infinity,(d=h)?(h=d.Ta.cb(),d.label.enabled()?(d.label.W(),d=Mi(d.label).cb(),d=Math.max(h,d)):d=h):d=-window.Infinity,h=Math.min(l,o.cb()),l=Math.max(d,o.tb()),d=Math.max(h-l,0),p=!1,"center"===g.label.ic("anchor").split("-")[0]&&(d=g.label.ic("position").split("-")[0],d=t.Eo(g.Ta,d),d=2*Math.min(d.x-l,h-d.x),p=!0),d<o.width&&(r&&(r=Mi(r.label),p=Math.max(o.top+o.height,r.top+r.height)-Math.min(o.top,r.top)<o.height+r.height),p&&(g.label.width(d),g.label.height(o.height)))}for(this.labels().da(!0),this.labels().W(),this.elements().labels().I(4294967295),e=0;e<i.length;e++)i[e].labels().I(4294967295)},t.g.AG=function(){var e=this.Gb.nk();if(e.f&&this.elements().uf().g("enabled")){var i=e.f,n=i.tfa,s=i.lla,a=i.y0,o=this.controller.D,r=o[n],l=o[s];if(n={type:"beforeRemoveConnector",fromItem:r,toItem:l,fromItemIndex:n,toItemIndex:s,connectorType:a},this.controller.i){s=i.G1;var h=r.get("periods")[s];o=h.connector,i=i.I6;var c=l.get("periods")[i];if(l=c.id,n.fromPeriodIndex=s,n.fromPeriod=h,n.toPeriodIndex=i,n.toPeriod=c,t.A(o))for(i=0;i<o.length;i++)(h=o[i])&&(c=h.connectorType||"finish-start",h.connectTo==l&&c==a&&this.Gb.dispatchEvent(n)&&(r.fr("periods",s,"connector",i),at(e,null)));else this.Gb.dispatchEvent(n)&&(r.fr("periods",s,"connector"),r.fr("periods",s,"connectorType"),r.fr("periods",s,"connectTo"),at(e,null))}else if(s=l.get("id"),o=r.get("connector"),t.A(o))for(i=0;i<o.length;i++)(l=o[i])&&(h=l.connectorType||"finish-start",s==l.connectTo&&h==a&&this.Gb.dispatchEvent(n)&&(r.fr("connector",i),at(e,null)));else this.Gb.dispatchEvent(n)&&(r.fr("connector"),r.fr("connectorType"),r.fr("connectTo"),at(e,null))}},t.g.vx=function(e){return t.p(e)?(N(this.controller).N(e),this):N(this.controller)},t.g.tq=function(e){if(!this.Sh){this.Sh=new s,this.Sh.U(t.zm("defaultScrollBar")),this.Sh.we("horizontal");var i=this.qa;this.Sh.wa("scrollchange",(function(t){var e=t.startRatio;t=t.endRatio;var n=i.uj(),s=n.min;n=n.max-s,i.Jr(Math.round(s+e*n),Math.round(s+t*n))})),t.K(this.Sh,this.AX,this)}return t.p(e)?(this.Sh.N(e),this):this.Sh},t.g.AX=function(e){t.X(e,8)&&this.B(4,1)},t.g.scroll=function(e,i,n){if(e||i){t.xr(this,this.qa,this.controller),n||(this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null,ii(this));var s=this.controller.Cg(),a=this.controller.b,o=this.controller.km();return B(this.controller,(s?a[s-1]:0)+(o+i)),e/=this.fa.width,n&&!this.Yx&&(this.Wx||this.gT)?(n=this.qa,e&&!n.Uj()&&(t.Et(n),n.uj(),i=Math.round((n.Ze-n.$e)*e),e=n.$e+i,i=n.Ze+i,!(0,window.isNaN)(n.$m)&&e<n.$m||!(0,window.isNaN)(n.Zm)&&i>n.Zm||(n.Ph=window.NaN,n.$e=e,n.Oh=window.NaN,n.Ze=i,n.va(4)))):(this.Yx||this.vi&&this.oj||!this.vi)&&(n=this.qa,e&&!n.Uj()&&(t.Et(n),i=n.uj(),e=0<=(e=Math.round((n.Ze-n.$e)*e))?Math.min(i.max-n.Ze,e):Math.max(i.min-n.$e,e),n.Jr(n.$e+e,n.Ze+e))),t.zr(this.qa,this.controller,this),this.B(4608,1),!0}return!1},t.g.vH=function(e){return e=t.Za(e,-100,100),1.05+Math.abs(e)/100},t.g.Oy=function(e){if(this.g("zoomOnMouseWheel")){e.preventDefault(),At(this),this.Ua().Lc();var i=e.deltaY,n=this.vH(i);e=e.clientX;var s=t.Zj(this.O().Ja()).x;e=(e-this.Bb.left()-s)/this.Ta().width(),0>i?this.qa.Vr(n,e):this.qa.Wr(n,e)}else Ne.u.Oy.call(this,e)},t.g.F=function(){var e=Ne.u.F.call(this);e.scale=this.qa.F(),e.labels=this.labels().F(),e.markers=this.Db().F(),e.header=this.GA().F(),t.Tq(this,zn,e,void 0,void 0,!0),e.elements=this.elements().F(),e.connectors=this.nj().F(),e.milestones=this.Wc().F(),this.controller.i?e.periods=this.Gr().F():(e.tasks=this.Nc().F(),e.groupingTasks=this.np().F(),e.baselines=this.Ml().F(),e.baselineMilestones=this.Sp().F());var i,n=[];for(i=0;i<this.WA.length;i++){var s=this.WA[i];s&&n.push(s.F())}for(n.length&&(e.lineAxesMarkers=n),n=[],i=0;i<this.pB.length;i++)(s=this.pB[i])&&n.push(s.F());for(n.length&&(e.rangeAxesMarkers=n),n=[],i=0;i<this.OB.length;i++)(s=this.OB[i])&&n.push(s.F());return n.length&&(e.textAxesMarkers=n),this.Sh&&(e.horizontalScrollBar=this.tq().F()),e.verticalScrollBar=this.vx().F(),e},t.g.U=function(e,i){Ne.u.U.call(this,e,i),"scale"in e&&this.qa.N(e.scale),this.labels().ga(!!i,e.labels),"markers"in e&&this.Db(e.markers),"header"in e&&!i&&this.GA().ga(!1,e.header),t.Iq(this,zn,e,i),this.elements().ga(!!i,e.elements),this.Wc().ga(!!i,e.milestones),this.nj().ga(!!i,e.connectors),this.controller.i?this.Gr().ga(!!i,e.periods):(this.Nc().ga(!!i,e.tasks),this.np().ga(!!i,e.groupingTasks),this.Ml().ga(!!i,e.baselines),this.Sp().ga(!!i,e.baselineMilestones)),"defaultLineMarkerSettings"in e&&this.IL(e.defaultLineMarkerSettings),"defaultRangeMarkerSettings"in e&&this.JL(e.defaultRangeMarkerSettings),"defaultTextMarkerSettings"in e&&this.NL(e.defaultTextMarkerSettings);var n,s=e.lineAxesMarkers,a=e.rangeAxesMarkers,o=e.textAxesMarkers;if(t.A(s))for(n=0;n<s.length;n++)this.Ym(n,s[n]);if(t.A(a))for(n=0;n<a.length;n++)this.gn(n,a[n]);if(t.A(o))for(n=0;n<o.length;n++)this.mn(n,o[n]);"horizontalScrollBar"in e&&this.tq(e.horizontalScrollBar),"verticalScrollBar"in e&&this.vx(e.verticalScrollBar)},t.g.R=function(){t.qd(this.Sh),this.Sh=null,t.kr(this.qa,this.ii),this.Yk&&t.kr(this.Yk,this.T2);for(var e=t.Ga(this.WA,this.OB,this.pB),i=0;i<e.length;i++){var n=e[i];n&&(t.kr(n,this.Ry),t.qd(n))}this.Ot&&(this.Ot.gc("start",this.m1,!1,this),this.Ot.gc("drag",this.n1,!1,this),this.Ot.gc("end",this.o1,!1,this)),this.Pt&&(this.Pt.gc("start",this.r1,!1,this),this.Pt.gc("drag",this.s1,!1,this),this.Pt.gc("end",this.p1,!1,this)),this.Nt&&(this.Nt.gc("start",this.l1,!1,this),this.Nt.gc("drag",this.kM,!1,this),this.Nt.gc("end",this.jM,!1,this)),this.Qt&&(this.Qt.gc("start",this.t1,!1,this),this.Qt.gc("drag",this.kM,!1,this),this.Qt.gc("end",this.jM,!1,this)),this.Rt&&(this.Rt.gc("start",this.hM,!1,this),this.Rt.gc("drag",this.iM,!1,this),this.Rt.gc("end",this.gM,!1,this)),this.Mt&&(this.Mt.gc("start",this.hM,!1,this),this.Mt.gc("drag",this.iM,!1,this),this.Mt.gc("end",this.gM,!1,this)),t.sd(this.dy,this.Nw,this.Kk,this.fw,this.hk,this.Bt,this.ov,this.Kj,this.qa,this.Yk,this.EE,this.iq,this.mA,this.Fv,this.Gv,this.Hv,this.Ev,this.dD,this.Ot,this.Pt,this.Nt,this.Qt,this.Rt,this.Mt,this.rh,this.su),this.Kj=this.su=this.rh=null,this.WA.length=0,this.pB.length=0,this.OB.length=0,Ne.u.R.call(this)},t.H(Ni,Ne),t.xu(Ni,Ne),t.H(Bi,Ne),t.xu(Bi,Ne);var Vn=Ne.prototype;Vn.edit=Vn.uf,Vn.horizontalScrollBar=Vn.tq,Vn.verticalScrollBar=Vn.vx,Vn.tooltip=Vn.Ua,Vn.labels=Vn.labels,Vn.markers=Vn.Db,Vn.scale=Vn.scale,Vn.textMarker=Vn.mn,Vn.lineMarker=Vn.Ym,Vn.rangeMarker=Vn.gn,Vn.header=Vn.GA,Vn.elements=Vn.elements,Vn.connectors=Vn.nj,Vn.tasks=Vn.Nc,Vn.milestones=Vn.Wc,Vn.baselineMilestones=Vn.Sp,Vn.groupingTasks=Vn.np,Vn.baselines=Vn.Ml,Vn.periods=Vn.Gr,Vn=Ni.prototype,t.E("anychart.standalones.projectTimeline",(function(){var e=new Ni;return e.N(t.nm("standalones.projectTimeline")),e})),t.E("anychart.standalones.resourceTimeline",(function(){var e=new Bi;return e.N(t.nm("standalones.resourceTimeline")),e})),Vn.draw=Vn.W,Vn.data=Vn.data,Vn.parentBounds=Vn.ja,Vn.container=Vn.O,Vn.headerHeight=Vn.uk,Vn.defaultRowHeight=Vn.hv,Vn.palette=Vn.cc,(Vn=Bi.prototype).draw=Vn.W,Vn.data=Vn.data,Vn.parentBounds=Vn.ja,Vn.container=Vn.O,Vn.headerHeight=Vn.uk,Vn.defaultRowHeight=Vn.hv,Vn.palette=Vn.cc,t.H(Ri,t.Bx),Ri.prototype.Ma=function(){return this.G?"gantt-resource":"gantt-project"},Ri.prototype.sa=12288|t.Bx.prototype.sa,Ri.prototype.ra=t.Bx.prototype.ra;var qn=20;t.g=Ri.prototype,t.g.Ue=function(){return[]},t.g.Tg=function(){return null},t.g.Ii=function(){return this},t.g.$i=function(){return this},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.B0=function(e){t.X(e,2)&&this.B(8192,1)},t.g.mka=function(e){t.X(e,1)&&e.target.W(),t.X(e,8)&&this.B(4,1)},t.g.hea=function(e){t.X(e,32768)&&this.B(4,1),M(this.ib)},t.g.data=function(e,i){return t.p(e)?(t.J(e,t.au)||t.J(e,t.Yt)?this.la!=e&&(this.la=e,this.B(4352,1)):(this.la=new t.au(e,i),this.B(4352,1)),this):this.la},t.g.hv=function(e){return t.p(e)?(S(this.ib,e),this):S(this.ib)},t.g.pI=function(t){this.f.pI(t),this.b.pI(t)};var Wn={};t.rq(Wn,0,"headerHeight",t.Cq),t.rq(Wn,0,"splitterPosition",t.Cq),t.rq(Wn,1,"rowHoverFill",t.Nq),t.rq(Wn,1,"rowSelectedFill",t.Nq),t.rq(Wn,1,"rowFill",t.Nq),t.rq(Wn,1,"rowEvenFill",t.Nq),t.rq(Wn,1,"rowOddFill",t.Nq),t.rq(Wn,1,"columnStroke",t.Pq),t.rq(Wn,1,"rowStroke",t.Jq),t.U(Ri,Wn),t.g=Ri.prototype,t.g.GF=function(e){return t.p(e)?(Hi(this).enabled(e),this):Hi(this)},t.g.wf=function(){if(!this.b){this.b=new Ne(this.ib,this.G),t.W(this,"timeline",this.b),this.b.zIndex(t.zm("defaulTimeline").zIndex),ft(this.b,this);var e=this;t.K(this.b,(function(){M(e.ib)}),this.ib)}return this.b},t.g.Vr=function(t){return this.wf().$v().Vr(t),this},t.g.Wr=function(t){return this.wf().$v().Wr(t),this},t.g.kj=function(t,e,i){return this.wf().$v().kj(t,e,i),this},t.g.Qm=function(){return this.wf().$v().Qm(),this},t.g.lfa=function(e){var i=this.b.fa;if(i&&i.width){var n=this.la.Eo("id",e);if(n.length){var s=(n=n[0]).j("actualStart"),a=n.j("actualEnd");if(!t.p(s)||((0,window.isNaN)(s)||t.p(a))&&s!=a){if(this.wf().$v().Jr(s,a),0<i.width&&(e=n.j("relBounds"),n=n.j("label"))&&(s=this.b.labels().measure(n,n.jc()),e&&s)){if(n=s.left<e.left,e=s.left+s.width>e.left+e.width,s.width<i.width){if(i=i.width/(i.width-s.width),n&&!e)var o=t.Gt(this.b.scale(),1-i),r=t.Gt(this.b.scale(),1);e&&!n&&(o=t.Gt(this.b.scale(),0),r=t.Gt(this.b.scale(),i))}else o=t.Gt(this.b.scale(),0),r=t.Gt(this.b.scale(),s.width/i.width);this.wf().$v().Jr(o,r)}}else t.kl(11,null,[e])}else t.kl(404,null,["Task",e])}return this},t.g.Yaa=function(e){return t.p(e)?(B(this.ib,e),this):B(this.ib)},t.g.$aa=function(t){return this.ib.ka().Cg(t).km(0).da(!0),this},t.g.Ra=function(e){return t.p(e)?(this.wf().scale(e),this):this.wf().scale()},t.g.Zaa=function(t){var e=this.ib;return t=t||e.b.length-1,e.Nj(t),this},t.g.Waa=function(){return R(this.ib,!0),this},t.g.Xaa=function(){return R(this.ib,!1),this},t.g.Afa=function(){return this.ib.sb},t.g.bfa=function(t){return zi(this,t,!1)},t.g.Oda=function(t){return zi(this,t,!0)},t.g.l_=function(){return this.na||(this.na=new t.Dx,this.na.wa("statechange",(function(){this.b.B(128,1),this.f.B(128,1)}),void 0,this)),this.na},t.g.Ol=function(){return[]},t.g.v5=function(t){this.UO(t)},t.g.w5=function(t){this.SO(t)},t.g.ro=function(t,e,i){this.f.ro(t,e,i),this.b.ro(t,e,i)},t.g.Iv=function(t,e,i){this.f.Iv(t,e,i),this.b.Iv(t,e,i)},t.g.nk=function(){return this.P},t.g.z5=function(e){var i=e.target;if(!i.vi&&!i.Yx){this.ro(e.hoveredIndex,e.startY,e.endY);var n=e.tooltipItem?e.tooltipItem:e.item,s=i.OM(void 0,n,e.periodIndex);if(t.J(i,Qt)){var a=ci(this.b,n),o=a.g("format");a=a.g("titleFormat"),s.Ha.format=o,s.Ha.titleFormat=a}else t.Cw(i.Ua());s.enabled()&&(i=i.Ic(n,e.period,e.periodIndex,e.elementType,e.hoverRatio,e.hoverDateTime),s.parent()&&t.Cw(s.parent()),t.Ow(s,e.originalEvent.clientX,e.originalEvent.clientY,i))}},t.g.A5=function(t){this.ro(),this.f.OM().Lc(),this.b.OM(void 0,t.item,t.periodIndex).Lc()},t.g.UO=function(e){if(!di(this.b,e)){var i=e.item,n=e.period,s=e.periodIndex,a=this.nk(),o=this.G?st(a,i,s):nt(a,i);i&&!o&&(o={type:"rowSelect",item:i,prevItem:a.b},t.p(n)&&(o.period=n,o.periodIndex=s),null!=a.i&&a.b&&(n=a.i,o.prevPeriodIndex=n,o.prevPeriod=a.b.get("periods",n)),this.dispatchEvent(o)&&(pi(this.b,e),Mt(this.f,i),gi(this.b,i,s)))}},t.g.SO=function(t){if(t&&!ui(this.b,t)&&(t=t.item)&&ct(t)){var e=!t.j("collapsed");this.dispatchEvent({type:"rowcollapseexpand",item:t,collapsed:e})&&t.j("collapsed",e)}},t.g.iJ=function(t){t.target.iJ(t)},t.g.jJ=function(t){var e=this.nk(),i={type:"rowSelect",actualTarget:t?t.target:this,target:this,originalEvent:t,item:null,prevItem:e.b};if(null!=e.i&&e.b){var n=e.i;i.prevPeriodIndex=n,i.prevPeriod=e.b.get("periods",n)}this.dispatchEvent(i)&&(this.f.jJ(t),this.b.jJ(t)),pi(this.b,t)},t.g.TO=function(t){t.target.TO(t)},t.g.uO=function(e){var i=e.event,n=e.target;return t.J(n,ot)&&(e.interactivityEvent=n.rl(i)),e},t.g.uf=function(e){return this.Vi||(this.Vi=new tt,t.W(this,"edit",this.Vi)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Vi.N(e),this):this.Vi},t.g.AG=function(t){this.f.AG(t),this.b.AG(t)},t.g.Qh=function(e){t.xr(Hi(this),this.wf(),Vi(this),this.ib),this.o.O()||(this.f.O(this.Na),this.b.O(this.Na),this.o.O(this.Na),this.D.O(this.Na));var i=this.f.g("fixedColumns"),n=this.g("headerHeight");if(this.J(4)&&0<e.width){if(this.f.enabled()){var s=i?ne(this.f):Math.round(t.L(this.g("splitterPosition"),e.width));if(this.o.Ta(e),i){var a=ne(this.f,!0);if(a){var o=this.o;a+=hn,o.D=a,o.aa=a,o.B(64)}else z(this.o)}else z(this.o);s=t.Za(s/e.width,0,1),this.o.op(!1),this.o.position(s),this.o.W(),this.o.op(!0),i&&this.o.position()!=s&&(this.o.op(!1),this.o.position(s),this.o.W(),this.o.op(!0))}else this.b.Ta().set(e);i=e.height-n-1,E(this.ib)!=i&&(this.b.uk(n),this.f.uk(n),E(this.ib,i)),i=this.f.enabled(),this.o.enabled(i),i&&((i=this.o).ab||(i.ab=i.ob()),s=i.ba?i.b:0,i=Y(i)?new t.I(t.Tm(i.ab.tb(),1),t.Tm(i.ab.Vb(),1),t.Tm((i.ab.zd()-s)*i.af,1),t.Tm(i.ab.qd(),1)):new t.I(t.Tm(i.ab.tb(),1),t.Tm(i.ab.Vb(),1),t.Tm(i.ab.zd(),1),t.Tm((i.ab.qd()-s)*i.af,1)),s=function(e){if(e.ab||(e.ab=e.ob()),e.ba){var i=t.Tm((e.ab.zd()-e.b)*e.af,1),n=t.Tm((e.ab.qd()-e.b)*e.af,1);return Y(e)?(i+=e.b,new t.I(t.Tm(e.ab.tb()+i,1),t.Tm(e.ab.Vb(),1),t.Tm(e.ab.zd()-i,1),t.Tm(e.ab.qd(),1))):(n+=e.b,new t.I(t.Tm(e.ab.tb(),1),t.Tm(e.ab.Vb()+n,1),t.Tm(e.ab.zd(),1),t.Tm(e.ab.qd()-n,1)))}return Y(e)?(i=e.ab.zd()*e.af,new t.I(t.Tm(e.ab.tb()+i,1),t.Tm(e.ab.Vb(),1),t.Tm(e.ab.zd()-i,1),t.Tm(e.ab.qd(),1))):(n=e.ab.qd()*e.af,new t.I(t.Tm(e.ab.tb(),1),t.Tm(e.ab.Vb()+n,1),t.Tm(e.ab.zd(),1),t.Tm(e.ab.qd()-n,1)))}(this.o),this.f.Ta().set(i),this.b.Ta().set(s)),i=this.b.ob(),s=this.D.DC(),this.D.Ta(e.left+e.width-s-1,i.top+n+s+1,s,i.height-n-2*s-2)}this.J(4096)&&(this.ib.data(this.la),this.B(8192),this.I(4096)),t.yr(this.f,this.b,this.o,this.ib),t.Op()&&this.f.Wj(!0),M(this.ib),0<e.width&&Vi(this).W(),this.J(8192)&&this.I(8192)},t.g.Zj=function(e,i){return t.qu(this.data(),i)},t.g.yj=function(){return!this.la||!this.la.bc()},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&(Hi(this).B(128),this.wf().B(128),this.B(8192,1))}},t.g.Pf=function(e){t.X(e,2)&&(Hi(this).B(128),this.wf().B(128),this.B(8192,1))},t.g.F=function(){var e=Ri.u.F.call(this);return t.Tq(this,Wn,e,void 0,void 0,!0),e.defaultRowHeight=this.hv(),e.controller=this.ib.F(),e.dataGrid=this.GF().F(),e.timeline=this.wf().F(),e.edit=this.uf().F(),e.palette=this.cc().F(),{gantt:e}},t.g.U=function(e,i){Ri.u.U.call(this,e,i),"controller"in e&&this.ib.U(e.controller,i),this.data(this.ib.data()),"dataGrid"in e&&this.GF().U(e.dataGrid,i),"timeline"in e&&this.wf().U(e.timeline,i),this.cc(e.palette),t.Iq(this,Wn,e,i),this.hv(e.defaultRowHeight),"edit"in e&&this.uf().ga(!!i,e.edit)},t.g.R=function(){t.kr(this.ib,this.B0,this),t.sd(this.Fa,this.ib,this.D,this.f,this.b,this.o,this.Vi,this.P),this.P=this.Vi=this.o=this.b=this.f=this.D=this.ib=this.Fa=null,Ri.u.R.call(this)};var Kn=Ri.prototype;Kn.data=Kn.data,Kn.dataGrid=Kn.GF,Kn.getTimeline=Kn.wf,Kn.zoomIn=Kn.Vr,Kn.zoomOut=Kn.Wr,Kn.zoomTo=Kn.kj,Kn.fitAll=Kn.Qm,Kn.fitToTask=Kn.lfa,Kn.scrollTo=Kn.Yaa,Kn.scrollToRow=Kn.$aa,Kn.scrollToEnd=Kn.Zaa,Kn.collapseAll=Kn.Waa,Kn.expandAll=Kn.Xaa,Kn.expandTask=Kn.bfa,Kn.collapseTask=Kn.Oda,Kn.getType=Kn.Ma,Kn.edit=Kn.uf,Kn.toCsv=Kn.Zj,Kn.xScale=Kn.Ra,Kn.defaultRowHeight=Kn.hv,Kn.palette=Kn.cc,Kn.rowsColoring=Kn.l_,Kn.statefulColoring=Kn.l_,Kn.getCollapsedItemsMap=Kn.Afa,t.Vp["gantt-resource"]=Wi,t.Vp["gantt-project"]=qi,t.E("anychart.ganttProject",qi),t.E("anychart.ganttResource",Wi)}.call(this,$)),_.theme_core||(_.theme_core=1,function(t){var e,i,n,s;t.vN=function(e,i){var n=null===e||"boolean"==typeof e||""==e?window.NaN:+e;return(0,window.isNaN)(n)?e:t.Bs(n,i,void 0,void 0,void 0,void 0,void 0,void 0)},t.wN=function(){return t.vN(this.value)},t.xN=function(){return this.name||this.getData("id")},e=function(){return this.x},t.zN=function(){return this.sourceColor},t.AN=function(){return t.Ul(this.sourceColor,.7,!0)},t.BN=function(){return t.Ul(this.sourceColor,.65,!0)},t.CN=function(){return t.Ul(this.sourceColor,.5,!0)},t.DN=function(){return t.Ul(this.sourceColor,.85,!0)},t.EN=function(){return t.Ql(this.sourceColor)},t.FN=function(){return t.Pl(this.sourceColor)},t.GN=function(){return t.Ul(t.Pl(this.sourceColor),.5,!0)},t.HN=function(){return t.Wl(this.sourceColor,1.5)},t.IN=function(){return t.Wl(this.sourceColor,1)},t.JN=function(){return t.Wl(t.Pl(this.sourceColor),1.5)},t.KN=function(){return"High: "+t.vN(this.high)+"\nLow: "+t.vN(this.low)},i=function(){return"Open: "+t.vN(this.open)+"\nHigh: "+t.vN(this.high)+"\nLow: "+t.vN(this.low)+"\nClose: "+t.vN(this.close)},n=function(){return t.Wl(this.sourceColor,1.5)},t.NN=function(){var e=this.chart,i=t.wr(e,"title");return i=i&&i.enabled()&&i.text()?i.text():"",(e.Ma()||"Anychart ")+" chart "+(i?" entitled "+i:"")},t.ON=function(){var e=this.chart,i=t.NN.apply(this);return(i+=", with "+e.Rg("count")+" points. ")+"Min value is "+e.Rg("min")+", max value is "+e.Rg("max")+"."},t.PN=function(){for(var e=this.chart,i=t.NN.call(this),n=e.tj(),s={},a=0;a<n;a++){var o=e.Ai(a).kk();s.hasOwnProperty(o)?s[o]+=1:s[o]=1}for(var r in i+=", with ",s)i+=s[r]+" "+r+" series, ";if(i+=". ",s=e.bb(),n=(e=e.Ra()).Ma(),"ordinal"==(a=s.Ma())){for(i+="Y-scale with "+(s=s.values()).length+" categories: ",a=0;a<s.length;a++)i+=s[a]+", ";i+=". "}else o=s.uh(),s=s.di(),"date-time"==a&&(o=t.us(o),s=t.us(s)),i+="Y-scale minimum value is "+o+" , maximum value is "+s+". ";if("ordinal"==n){for(i+="X-scale with "+(e=e.values()).length+" categories: ",n=0;n<e.length;n++)i+=e[n]+", ";i+=". "}else o=e.uh(),s=e.di(),"date-time"==n&&(o=t.us(o),s=t.us(s)),i+="X-scale minimum value is "+o+" , maximum value is "+s+". ";return i},t.QN=function(){for(var e=this.chart,i=t.NN.call(this),n=e.tj(),s={},a=0;a<n;a++){var o=e.Ai(a).Ma();s.hasOwnProperty(o)?s[o]+=1:s[o]=1}for(var r in i+=", with ",s)i+=s[r]+" "+r+" series, ";if(i+=". ",s=e.bb(),n=(e=e.Ra()).Ma(),"ordinal"==(a=s.Ma())){for(i+="Y-scale with "+(s=s.values()).length+" categories: ",a=0;a<s.length;a++)i+=s[a]+", ";i+=". "}else o=s.uh(),s=s.di(),"date-time"==a&&(o=t.us(o),s=t.us(s)),i+="Y-scale minimum value is "+o+", maximum value is "+s+". ";if("ordinal"==n){for(i+="X-scale with "+(e=e.values()).length+" categories: ",n=0;n<e.length;n++)i+=e[n]+", ";i+=". "}else o=e.uh(),s=e.di(),"date-time"==n&&(o=t.us(o),s=t.us(s)),i+="X-scale minimum value is "+o+", maximum value is "+s+". ";return i},s=function(e){return"date-time"===e.xScaleType?t.vs(e.x):t.vN(e.x)},t.E("anychart.themes.defaultTheme",{palette:{type:"distinct",items:"#64b5f6 #1976d2 #ef6c00 #ffd54f #455a64 #96a6a6 #dd2c00 #00838f #00bfa5 #ffa000".split(" ")},hatchFillPalette:{items:"backward-diagonal forward-diagonal horizontal vertical dashed-backward-diagonal grid dashed-forward-diagonal dashed-horizontal dashed-vertical diagonal-cross diagonal-brick divot horizontal-brick vertical-brick checker-board confetti plaid solid-diamond zig-zag weave percent-05 percent-10 percent-20 percent-25 percent-30 percent-40 percent-50 percent-60 percent-70 percent-75 percent-80 percent-90".split(" ")},hatchFillPaletteFor3D:{items:"backward-diagonal forward-diagonal dashed-backward-diagonal grid dashed-forward-diagonal dashed-horizontal dashed-vertical diagonal-cross diagonal-brick divot horizontal-brick vertical-brick checker-board confetti plaid solid-diamond zig-zag weave percent-05 percent-10 percent-20 percent-25 percent-30 percent-40 percent-50 percent-60 percent-70 percent-75 percent-80 percent-90 horizontal vertical".split(" ")},markerPalette:{items:"circle diamond square triangle-down triangle-up diagonal-cross pentagon cross v-line star5 star4 trapezium star7 star6 star10".split(" ")},defaultScaleSettings:{linear:{maxTicksCount:1e3,inverted:!1,maximum:null,minimum:null,minimumGap:.1,maximumGap:.1,softMinimum:null,softMaximum:null,alignMinimum:!0,alignMaximum:!0,ticks:{mode:"linear",base:0,explicit:null,minCount:4,maxCount:6,interval:window.NaN,allowFractional:!0},minorTicks:{mode:"linear",base:0,explicit:null,count:5,interval:window.NaN,allowFractional:!0},stackMode:"none",stackDirection:"direct",stickToZero:!0},ordinal:{type:"ordinal",inverted:!1,mode:"discrete",names:[],ticks:{maxCount:100}},log:{type:"log",logBase:10,ticks:{mode:"log"},minorTicks:{mode:"log"}},dateTime:{type:"date-time",alignMinimum:!1,alignMaximum:!1,minimumGap:0,maximumGap:0,ticks:{count:4},minorTicks:{count:4}}},defaultFontSettings:{fontSize:13,fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontColor:"#7c868e",textDirection:"ltr",fontOpacity:1,fontDecoration:"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:"normal",lineHeight:"normal",textIndent:0,textShadow:"none",maxLength:null,vAlign:"top",hAlign:"start",wordWrap:"normal",wordBreak:"normal",textOverflow:"",selectable:!1,disablePointerEvents:!1,useHtml:!1},defaultBackground:{enabled:!1,fill:"#ffffff",stroke:"none",cornerType:"round",corners:0},defaultSeparator:{enabled:!1,fill:"#CECECE 0.3",width:"100%",height:1,margin:{top:5,right:0,bottom:5,left:0},orientation:"top",stroke:"none",zIndex:1},defaultLabelFactory:{enabled:!1,offsetX:0,offsetY:0,width:null,height:null,clip:null,fontSize:12,minFontSize:8,maxFontSize:72,textShadow:"none",adjustFontSize:{width:!1,height:!1},anchor:"center",padding:4,rotation:0,format:t.wN,positionFormatter:t.wN},defaultSimpleLabelsSettings:{fontSize:13,fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontColor:"#7c868e",textDirection:"ltr",fontOpacity:1,fontDecoration:"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:"normal",lineHeight:"normal",textIndent:0,textShadow:"none",vAlign:"top",hAlign:"left",wordWrap:null,wordBreak:null,textOverflow:!1,selectable:!1,useHtml:!1,allowMultiline:!1,padding:4,width:null,height:null,anchor:"left-top",position:"left-top",offsetX:0,offsetY:0,enabled:!0,disablePointerEvents:!0},defaultMarkerFactory:{anchor:"center",size:6,offsetX:0,offsetY:0,rotation:0,positionFormatter:t.wN},defaultTitle:{enabled:!1,fontSize:16,text:"Title text",maxLength:null,width:null,height:null,align:"center",hAlign:"center",padding:0,margin:0},defaultTooltip:{enabled:!0,title:{fontColor:"#ffffff",text:"",fontSize:14,rotation:0,align:"left",hAlign:"left",orientation:"top",zIndex:1,background:{fill:"none",stroke:"none"}},contentInternal:{enabled:!0,fontSize:12,minFontSize:9,maxFontSize:13,fontColor:"#ffffff",hAlign:"left",text:"Tooltip Text",width:"100%",height:"100%",anchor:"left-top",offsetX:0,offsetY:0,position:"left-top",adjustFontSize:{width:!1,height:!1},padding:0,rotation:0,zIndex:1,background:{disablePointerEvents:!1,fill:"none",stroke:"none"}},fontSize:12,minFontSize:9,maxFontSize:13,maxLength:null,fontColor:"#ffffff",text:"Tooltip Text",width:null,height:null,adjustFontSize:{width:!1,height:!1},background:{enabled:!0,fill:"#212121 0.7",corners:3,zIndex:0,cornerType:"round"},offsetX:10,offsetY:10,padding:{top:5,right:10,bottom:5,left:10},valuePrefix:"",valuePostfix:"",position:"left-top",anchor:"left-top",hideDelay:0,titleFormat:t.wN,format:function(){return this.valuePrefix+t.vN(this.value)+this.valuePostfix},unionFormat:"{%joinedFormattedValues}",zIndex:0,allowLeaveChart:!0,allowLeaveScreen:!1,allowLeaveStage:!1},defaultAxis:{value:null,enabled:!0,startAngle:0,drawLastLabel:!0,drawFirstLabel:!0,staggerMaxLines:2,staggerMode:!1,staggerLines:null,width:null,overlapMode:"no-overlap",stroke:"#CECECE",title:{padding:5,fontSize:13,text:"Axis title",fontColor:"#545f69",zIndex:35},labels:{enabled:!0,format:t.wN,position:"outside",zIndex:35},minorLabels:{fontSize:9,format:t.wN,position:"outside",zIndex:35},ticks:{enabled:!0,length:6,position:"outside",stroke:"#CECECE",zIndex:35},minorTicks:{enabled:!1,length:4,position:"outside",stroke:"#EAEAEA",zIndex:35},zIndex:35},defaultGridSettings:{enabled:!0,isMinor:!1,drawFirstLine:!0,drawLastLine:!0,fill:function(){return this.palette.nc(this.index)},palette:{items:["none"]},stroke:"#CECECE",scale:1,zIndex:11},defaultMinorGridSettings:{isMinor:!0,stroke:"#EAEAEA",zIndex:10},defaultLineMarkerSettings:{enabled:!0,value:0,layout:null,stroke:{color:"#7c868e",thickness:2,opacity:1,dash:"",lineJoin:"miter",lineCap:"square"},zIndex:25.2,scale:1,scaleRangeMode:"none"},defaultTextMarkerSettings:{fontSize:12,value:0,anchor:"auto",align:"center",layout:null,text:"Text marker",zIndex:25.3,scale:1,scaleRangeMode:"none",rotation:null},defaultRangeMarkerSettings:{enabled:!0,from:0,to:0,layout:null,fill:"#c1c1c1 0.4",zIndex:25.1,scale:1,scaleRangeMode:"none"},defaultLegend:{enabled:!1,vAlign:"bottom",fontSize:12,textOverflow:"...",itemsLayout:"horizontal",itemsHAlign:"left",positionMode:"outside",itemsSpacing:15,items:null,itemsFormat:null,itemsSourceMode:"default",inverted:!1,hoverCursor:"pointer",iconTextSpacing:5,iconSize:15,width:null,height:null,position:"top",align:"center",padding:{top:0,right:10,bottom:10,left:10},margin:0,title:{fontSize:15},paginator:{enabled:!0,fontSize:12,fontColor:"#545f69",orientation:"right",layout:"horizontal",padding:{top:0,right:0,bottom:0,left:5},margin:0,zIndex:30,buttonsSettings:{normal:{stroke:"#757575",fill:"#9e9e9e"},hover:{stroke:"#546e7a",fill:"#7c868e"},pushed:{stroke:"#7c868e",fill:"#9e9e9e"},disabled:{stroke:null,fill:"#e0e0e0"}}},titleFormat:null,tooltip:{enabled:!1,allowLeaveScreen:!0},drag:!1,maxWidth:null,maxHeight:null,zIndex:200},defaultCrosshairLabel:{x:0,y:0,axisIndex:0,anchor:null,format:t.wN,enabled:!0,fontSize:12,minFontSize:8,maxFontSize:16,fontColor:"#ffffff",fontWeight:400,disablePointerEvents:!0,text:"Label text",background:{enabled:!0,disablePointerEvents:!0,fill:"#212121 0.7",corners:3,zIndex:0},padding:{top:5,right:10,bottom:5,left:10},width:null,height:null,offsetX:0,offsetY:0,adjustFontSize:{width:!1,height:!1},rotation:0},defaultCallout:{enabled:!0,orientation:"left",title:{enabled:!1},padding:0,margin:0,align:"center",labels:{enabled:!0,vAlign:"middle",hAlign:"center",positionFormatter:t.wN,adjustFontSize:!1,connectorStroke:null}},defaultScroller:{enabled:!1,fill:"#f7f7f7",selectedFill:"#ddd",outlineStroke:"none",height:16,minHeight:null,maxHeight:null,autoHide:!1,orientation:"bottom",position:"after-axes",allowRangeChange:!0,thumbs:{enabled:!0,autoHide:!1,normal:{fill:"#E9E9E9",stroke:"#7c868e"},hovered:{fill:"#ffffff",stroke:"#757575"}},inverted:!1,zIndex:35},defaultLabelSettings:{enabled:!0,text:"Chart label",width:null,height:null,anchor:"left-top",position:"left-top",offsetX:0,offsetY:0,minFontSize:8,maxFontSize:72,adjustFontSize:{width:!1,height:!1},rotation:0,zIndex:50},defaultButtonSettings:{padding:[3,5],normal:{hAlign:"center",vAlign:"middle",background:{enabled:!0,stroke:"#dedede",fill:"#e7e7e7",corners:[0]},content:"Button",disablePointerEvents:!0,selectable:!1,adjustFontSize:{width:!1,height:!1},minFontSize:8,maxFontSize:72},hovered:{},selected:{}},defaultNoDataLabel:{padding:{},disablePointerEvents:!1,enabled:!1,background:{zIndex:0,enabled:!1,visible:!1,disablePointerEvents:!1},fontFamily:"Arial",fontColor:"black",fontWeight:"bold",fontSize:15,position:"center",anchor:"center",zIndex:999999,text:"No data."},stageCredits:{text:"AnyChart",url:"https://www.anychart.com/?utm_source=registered",alt:"AnyChart - JavaScript Charts designed to be embedded and integrated{{anychart-version}}",imgAlt:"AnyChart - JavaScript Charts",logoSrc:"https://static.anychart.com/logo.png"},chart:{zIndex:0,enabled:!0,padding:{top:10,right:20,bottom:15,left:10},margin:{top:0,right:0,bottom:0,left:0},autoRedraw:!0,background:{enabled:!0,zIndex:.5},contextMenu:{fromTheme:!0,enabled:!0},title:{text:"Chart Title",padding:{top:0,right:0,bottom:10,left:0},zIndex:80,background:{zIndex:0}},animation:{enabled:!1,duration:1e3},interactivity:{hoverMode:"single",selectionMode:"multi-select",spotRadius:2,multiSelectOnClick:!1,unselectOnClickOutOfPoint:!0},tooltip:{displayMode:"single",positionMode:"float",title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return s(this.points[0])},format:function(){return this.formattedValues.join("\n")}},bounds:{top:null,right:null,bottom:null,left:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null},credits:{},defaultSeriesSettings:{base:{enabled:!0,isVertical:null,background:{enabled:!0},tooltip:{titleFormat:function(){return s(this)},format:function(){return this.seriesName+": "+this.valuePrefix+t.vN(this.value)+this.valuePostfix}},normal:{fill:t.BN,stroke:t.HN,lowStroke:t.HN,highStroke:t.HN,lowFill:t.zN,highFill:t.zN,negativeFill:t.zN,negativeStroke:t.HN,risingFill:t.zN,risingStroke:t.HN,fallingFill:t.zN,fallingStroke:t.HN,risingHatchFill:!1,fallingHatchFill:!1,hatchFill:!1,labels:{enabled:null,anchor:"auto",position:"value"},minLabels:{enabled:null},maxLabels:{enabled:null},outlierMarkers:{enabled:null},markers:{enabled:!1,disablePointerEvents:!1,position:"value",positionFormatter:t.wN,size:4}},hovered:{fill:t.zN,stroke:t.JN,lowFill:t.zN,highFill:t.zN,lowStroke:t.JN,highStroke:t.JN,negativeFill:t.zN,negativeStroke:t.JN,risingFill:t.zN,fallingFill:t.zN,risingStroke:t.JN,fallingStroke:t.JN,risingHatchFill:null,fallingHatchFill:null,hatchFill:null,labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null},outlierMarkers:{enabled:null},markers:{enabled:null,size:6}},selected:{fill:"#333 0.85",stroke:"#333 0.85",lowStroke:"#333 0.85",highStroke:"#333 0.85",lowFill:"#333 0.85",highFill:"#333 0.85",negativeFill:"#333 0.85",negativeStroke:"#333 0.85",risingFill:"#333 0.85",risingStroke:"#333 0.85",fallingFill:"#333 0.85",fallingStroke:"#333 0.85",risingHatchFill:null,fallingHatchFill:null,hatchFill:null,labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null},outlierMarkers:{enabled:null},markers:{enabled:null,fill:"#333 0.85",stroke:"1.5 #212121",size:6}},legendItem:{enabled:!0,iconType:"square"},clip:!0,color:null,xScale:null,yScale:null,error:{mode:"both",xError:null,xUpperError:null,xLowerError:null,valueError:null,valueUpperError:null,valueLowerError:null,xErrorWidth:10,valueErrorWidth:10,xErrorStroke:t.EN,valueErrorStroke:t.EN},pointWidth:null,connectMissingPoints:!1,a11y:{enabled:!1,titleFormat:"Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"}},marker:{normal:{fill:t.zN,stroke:n,size:4,labels:{offsetY:3}},hovered:{fill:t.FN,stroke:n,size:6},selected:{fill:"#333 0.85",stroke:"1.5 #212121",size:6},legendItem:{iconStroke:"none"}},bubble:{normal:{fill:t.AN,negativeFill:function(){return t.Ql(t.Ql(t.Ql(this.sourceColor)))},negativeStroke:function(){return t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor))))},negativeHatchFill:!1,labels:{anchor:"center"}},hovered:{fill:t.CN,negativeFill:function(){return t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor))))},negativeStroke:function(){return t.Ql(t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor)))))},negativeHatchFill:null},selected:{negativeFill:function(){return t.Ql(t.Ql(t.Ql(this.sourceColor)))},negativeStroke:function(){return t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor))))},negativeHatchFill:null},displayNegative:!1,legendItem:{iconStroke:"none"}},areaLike:{normal:{fill:t.BN},hovered:{fill:t.BN,markers:{enabled:!0}},selected:{markers:{enabled:!0}},legendItem:{iconStroke:"none"},stepDirection:"center"},barLike:{normal:{fill:t.DN},hovered:{fill:t.BN},legendItem:{iconStroke:"none"}},lineLike:{hovered:{markers:{enabled:!0}},selected:{markers:{enabled:!0}},stepDirection:"center"},rangeLike:{normal:{labels:{format:function(){return t.vN(this.high)},position:"high"},markers:{position:"high"}},tooltip:{format:t.KN}},candlestick:{normal:{risingFill:"#64b5f6",risingStroke:"#64b5f6",fallingFill:"#ef6c00",fallingStroke:"#ef6c00",risingHatchFill:!1,fallingHatchFill:!1,markers:{position:"high"},labels:{position:"high",format:e}},hovered:{risingFill:t.FN,risingStroke:t.EN,fallingFill:t.FN,fallingStroke:t.EN,risingHatchFill:null,fallingHatchFill:null},selected:{risingFill:"#333 0.85",risingStroke:"#333 0.85",fallingFill:"#333 0.85",fallingStroke:"#333 0.85",risingHatchFill:null,fallingHatchFill:null},tooltip:{format:i}},column:{isVertical:!1,normal:{labels:{offsetY:3}}},ohlc:{normal:{risingStroke:"#64b5f6",fallingStroke:"#ef6c00",markers:{position:"high"},labels:{position:"high",format:e}},hovered:{risingStroke:t.EN,fallingStroke:t.EN},selected:{risingStroke:"3 #333 0.85",fallingStroke:"3 #333 0.85"},tooltip:{format:i}},stick:{normal:{stroke:t.IN}},jumpLine:{pointWidth:"100%"},hilo:{pointWidth:1}},chartLabels:[],maxBubbleSize:"20%",minBubbleSize:"5%",a11y:{enabled:!0,titleFormat:t.NN,mode:"chart-elements"},normal:{labels:{enabled:!1},minLabels:{enabled:null},maxLabels:{enabled:null}},hovered:{labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null}},selected:{labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null}},crossing:{stroke:"none"},baseline:0,defaultQuarterSettings:{enabled:!1,zIndex:1,fill:"none",stroke:"none",title:{padding:5},defaultLabelSettings:{text:"Quarter label",anchor:"center",position:"center"},margin:{},padding:{}},quarters:{rightTop:{fill:"#e3f2fd",title:{orientation:"top"}},leftTop:{title:{orientation:"top"}},leftBottom:{fill:"#e3f2fd",title:{orientation:"bottom"}},rightBottom:{title:{orientation:"bottom"}}},selectRectangleMarqueeFill:"#d3d3d3 0.4",selectRectangleMarqueeStroke:"#d3d3d3",maxPointWidth:"100%",minPointLength:0,dataArea:{zIndex:10,background:{fill:"none"}}},cartesianBase:{defaultSeriesSettings:{base:{normal:{labels:{enabled:null,format:"{%Value}{decimalsCount:2}"}}},bar:{isVertical:!0,normal:{labels:{offsetY:3}},tooltip:{anchor:"left-top"}},column:{tooltip:{anchor:"left-top"}},rangeColumn:{isVertical:!1,tooltip:{anchor:"left-top",offsetX:10}},rangeBar:{normal:{labels:{offsetY:3}},isVertical:!0},box:{normal:{medianStroke:t.EN,stemStroke:t.EN,whiskerStroke:t.EN,whiskerWidth:0,outlierMarkers:{enabled:!0,disablePointerEvents:!1,position:"center",rotation:0,anchor:"center",offsetX:0,offsetY:0,type:"circle",size:3,positionFormatter:t.wN},markers:{position:"median"},labels:{position:"highest",format:function(){return"Highest: "+t.vN(this.highest)+"\nMedian: "+t.vN(this.median)+"\nLowest: "+t.vN(this.lowest)}}},hovered:{medianStroke:t.zN,stemStroke:t.zN,whiskerStroke:t.EN,whiskerWidth:null,outlierMarkers:{enabled:null,size:4}},selected:{medianStroke:"#333 0.85",stemStroke:"#333 0.85",whiskerStroke:"#333 0.85",whiskerWidth:null,outlierMarkers:{enabled:null,size:4,fill:"#333 0.85",stroke:"1.5 #212121"}},tooltip:{titleFormat:function(){return this.name||this.x},format:function(){return"Lowest: "+this.valuePrefix+t.vN(this.lowest)+this.valuePostfix+"\nQ1: "+this.valuePrefix+t.vN(this.q1)+this.valuePostfix+"\nMedian: "+this.valuePrefix+t.vN(this.median)+this.valuePostfix+"\nQ3: "+this.valuePrefix+t.vN(this.q3)+this.valuePostfix+"\nHighest: "+this.valuePrefix+t.vN(this.highest)+this.valuePostfix}}}},defaultXAxisSettings:{orientation:"bottom",title:{text:"X-Axis",padding:{top:5,right:0,bottom:0,left:0}},labels:{format:function(){var e=this.tickValue;switch(this.scale.Ma()){case"ordinal":return this.value;case"date-time":var i=this.intervalUnit;return t.us(e,t.ss(t.rs(i,i,"charts")));default:return t.Bs(this.value)}}},minorLabels:{format:function(){var e=this.tickValue;switch(this.scale.Ma()){case"ordinal":return this.value;case"date-time":var i=this.minorIntervalUnit;return t.us(e,t.ss(t.rs(i,t.vp(i),"charts")));default:return t.Bs(this.value)}}},scale:0},defaultYAxisSettings:{orientation:"left",title:{text:"Y-Axis",padding:{top:0,right:0,bottom:5,left:0}},labels:{format:"{%Value}"},scale:1},defaultAnnotationSettings:{},annotations:{annotationsList:[],zIndex:2e3},xAxes:[{}],yAxes:[{}],xGrids:[],yGrids:[],xMinorGrids:[],yMinorGrids:[],series:[],lineAxesMarkers:[],rangeAxesMarkers:[],textAxesMarkers:[],xScale:0,yScale:1,barsPadding:.4,barGroupsPadding:.8,maxBubbleSize:"20%",minBubbleSize:"5%",isVertical:!1,scales:[{type:"ordinal"},{type:"linear"}],yScroller:{orientation:"left",inverted:!1},crosshair:{enabled:!1,displayMode:"float",xStroke:"#969EA5",yStroke:"#969EA5",zIndex:41,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},xZoom:{continuous:!0,startRatio:0,endRatio:1},yZoom:{continuous:!0,startRatio:0,endRatio:1},a11y:{titleFormat:t.PN}},pieFunnelPyramidBase:{mode3d:!1,animation:{duration:500},normal:{fill:t.zN,stroke:"none",hatchFill:null,labels:{enabled:!0,fontColor:null,position:"inside",disablePointerEvents:!1,autoRotate:!1,zIndex:34,format:function(){return this.name?this.name:this.x}},markers:{enabled:!1,position:"center",positionFormatter:t.wN,zIndex:33}},hovered:{fill:t.FN,stroke:t.zN,labels:{enabled:null},markers:{enabled:null}},selected:{fill:"#333 0.85",stroke:"1.5 #212121",labels:{enabled:null},markers:{enabled:null}},connectorStroke:"#CECECE",overlapMode:"no-overlap",connectorLength:20,baseWidth:"70%",neckWidth:null,neckHeight:null,pointsPadding:0,forceHoverLabels:!0,outsideLabels:{disablePointerEvents:!1,autoColor:"#545f69"},insideLabels:{disablePointerEvents:!0,autoColor:"#ffffff"},legend:{enabled:!0,padding:{top:10,right:10,bottom:0,left:10},position:"bottom"},tooltip:{title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){return"Value: "+t.vN(this.value)+"\nPercent Value: "+(100*this.value/this.getStat("sum")).toFixed(1)+"%"}},interactivity:{hoverMode:"single"}},defaultScrollBar:{barSize:10,backgroundFill:"#e0e0e0",backgroundStroke:"#d5d5d5",sliderFill:"#d5d5d5",sliderStroke:"#656565",mouseOverOpacity:.45,mouseOutOpacity:.25,handlePositionChange:!0,startRatio:"0",endRatio:"1",buttonsVisible:!1,cornersRadius:5},standalones:{background:{enabled:!0,zIndex:0},label:{enabled:!0,text:"Label text",padding:0,width:null,height:null,anchor:"left-top",position:"left-top",offsetX:0,offsetY:0,minFontSize:8,maxFontSize:72,adjustFontSize:{width:!1,height:!1},rotation:0,zIndex:0},labelsFactory:{enabled:!0,zIndex:0},legend:{enabled:!0,zIndex:0},markersFactory:{enabled:!0,zIndex:0},title:{enabled:!0,zIndex:0},linearAxis:{enabled:!0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0}},polarAxis:{enabled:!0,startAngle:0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0}},radarAxis:{enabled:!0,startAngle:0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0}},radialAxis:{enabled:!0,startAngle:0,innerRadius:0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0},minorLabels:{padding:{top:1,right:1,bottom:0,left:1}}},linearGrid:{enabled:!0,scale:null,zIndex:0},polarGrid:{enabled:!0,layout:"circuit",zIndex:0},radarGrid:{enabled:!0,layout:"circuit",zIndex:0},lineAxisMarker:{enabled:!0,zIndex:0},textAxisMarker:{enabled:!0,zIndex:0},rangeAxisMarker:{enabled:!0,zIndex:0},scroller:{enabled:!0}}})}.call(this,$)),_.theme_tag_cloud||(_.theme_tag_cloud=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{tagCloud:{anglesCount:7,fromAngle:-90,toAngle:90,mode:"spiral",textSpacing:1,scale:{type:"linear"},colorRange:{},colorScale:null,normal:{fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontOpacity:1,fontDecoration:"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fill:function(){return t.Ul(this.scaledColor||this.sourceColor,.85,!0)},stroke:"none"},hovered:{fill:t.BN,stroke:"none"},selected:{fill:"#333 0.85",stroke:"none"},tooltip:{enabled:!0,title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){return"Frequency: "+t.vN(this.value)+"\nPercent of total: "+(100*this.value/this.getStat("sum")).toFixed(1)+"%"}},legend:{enabled:!1,itemsSourceMode:"categories",tooltip:{contentInternal:{background:{disablePointerEvents:!1}}}}}})}.call(this,$)),_.color_scales||(_.color_scales=1,function(t){var e,i,n,s,a;t.SN=function(t,e){var i=t.g("fontSize")!=e;null===e?delete t.Nd.fontSize:t.Nd.fontSize=e,i&&t.B(4)},t.TN=function(e){var i={};return t.Dc(e.Pa,(function(e,n){t.p(e)&&("adjustByHeight"!=n&&"adjustByWidth"!=n||(n="adjustFontSize"),i[n]=this.nd(n))}),e),i},t.UN=function(e,i){return t.zk(o,e,i||"clip")},e=function(){t.Qy.call(this)},t.WN=function(){t.Sy.call(this),this.Ga("defaultColorRange"),t.su(this,this,this.If,this.hg,null,this.If),this.wc.wa(this,"mousedown",this.Ds),this.se|=1024,t.T(this.ua,[["length",this.se,9],["align",this.se,9],["colorLineSize",this.se,9]])},t.XN=function(t){t.line&&(t.line.Bl(),t.line.remove(),t.line=null),t.lines&&(t.lines.length=0)},i=function(e){if(e.b){var i=e.scale();if(i&&t.J(i,t.iz)){e.i={};for(var n=e.b,s=n.Ec();s.advance();){var a=(t.p(n.ea)?s.j(n.ea):null)||s.get(n.bf?n.bf.El:n.Hr[1]);!(a=i.Dn(a))||(0,window.isNaN)(a.start)||(0,window.isNaN)(a.end)||(e.i[a.sourceIndex]||(e.i[a.sourceIndex]=[]),e.i[a.sourceIndex].push(s.ma()))}}}},n=function(e,i,n){var s=0;return i.enabled()&&(s=i.g("length"),s="center"==(i=i.g("position"))?Math.max((s-e.g("colorLineSize"))/2,0):t.p(n)?0<n?"outside"==i?0:s:0>n&&"inside"==i?0:s:s),s},s=function(e){var i=0,n=t.wr(e,"marker");if(n&&n.enabled()){e=e.g("orientation"),i=2*n.g("size");var s=n.g("offsetX");switch(n=n.g("offsetY"),s=t.p(s)?s:0,n=t.p(n)?n:0,e){case"top":i+=n;break;case"right":i-=s;break;case"bottom":i-=n;break;case"left":i+=s}}return i},t.aO=function(e,i){if(e.b){var n=e.scale(),s=t.wr(e,"marker"),a=e.b,o=a.kd()||(a.Bn?a.Bn():void 0),r=s&&s.enabled();if(a=a.enabled()&&o==n,e.enabled()&&r&&n&&a&&(n=e.line.rb(),r=t.Za(e.scale().transform(i,.5),0,1),!(0,window.isNaN)(r))){switch(a=e.g("orientation"),o=s.g("size"),a){case"top":var l=n.left+n.width*r,h=n.top+n.height+o,c=180;break;case"bottom":l=n.left+n.width*r,h=n.top-o,c=0;break;case"left":l=n.left+n.width+o,h=n.top+n.height-n.height*r,c=90;break;case"right":l=n.left-o,h=n.top+n.height-n.height*r,c=-90}s.ka(),s.ta("rotation",c),s.jc({value:{x:l,y:h}}),s.da(!1),s.W(),s.Vd().visible(!0)}}},t.bO=function(e){var i=t.wr(e,"marker");e.scale()&&i&&i.Vd().visible(!1)},a=function(){t.WN.call(this)},t.eB.prototype.Bn=t.ca(28,(function(){return this.vb}));var o={dma:"always-show",qna:"clip",f8:"drop"};t.H(e,t.Qy),e.prototype.h1=function(t,e,i,n,s){if(e=Math.round(e.left+t*e.width),e=1==t?e+s:e-s,t=this.g("length"),"outside"==(s=this.g("position")))var a=i.top-n/2,o=-t;else"center"==s?(a=i.top+(i.height-t)/2,o=t):"inside"==s&&(a=i.Va()+n/2,o=t);this.path.moveTo(e,a),this.path.lineTo(e,a+o)},e.prototype.nT=function(t,e,i,n,s){e=Math.round(e.top+e.height-t*e.height),e=1==t?e-s:e+s,t=this.g("length"),"outside"==(s=this.g("position"))?(i=i.cb()+n/2,n=t):"center"==s?(i=i.left+(i.width-t)/2,n=t):(i=i.left-n/2,n=-t),this.path.moveTo(i,e),this.path.lineTo(i+n,e)},e.prototype.hT=function(t,e,i,n,s){if(e=Math.round(e.left+t*e.width),e=1==t?e+s:e-s,t=this.g("length"),"outside"==(s=this.g("position")))var a=i.Va()+n/2,o=t;else"center"==s?(a=i.top+(i.height-t)/2,o=t):"inside"==s&&(a=i.top-n/2,o=-t);this.path.moveTo(e,a),this.path.lineTo(e,a+o)},e.prototype.lT=function(t,e,i,n,s){if(e=Math.round(e.top+e.height-t*e.height),e=1==t?e-s:e+s,t=this.g("length"),"outside"==(s=this.g("position")))var a=i.left-n/2,o=-t;else"center"==s?(a=i.left+(i.width-t)/2,o=t):"inside"==s&&(a=i.cb()+n/2,o=t);this.path.moveTo(a,e),this.path.lineTo(a+o,e)},t.H(t.WN,t.Sy);var r={};t.sq(r,[[0,"colorLineSize",t.Bq],t.Z.eK,t.Z.iK]),t.U(t.WN,r),t.g=t.WN.prototype,t.g.sa=1024|t.Sy.prototype.sa,t.g.ol=function(){return new e},t.g.Bz=function(){return this.line||(t.J(this.scale(),t.fz)?this.line=t.qk():t.J(this.scale(),t.iz)&&(this.line=t.ok(),this.lines=[]),this.line.zIndex(this.zIndex()),this.line.parent(this.O()),this.line.cursor("pointer"),t.ru(this,this.line)),this.line},t.g.Br=function(e){return this.$l||(this.$l=new t.ey,t.W(this,"marker",this.$l),this.$l.jc({value:{x:0,y:0}}),t.K(this.$l,this.Aaa,this)),t.p(e)?(this.$l.N(e),this.B(1024,1),this):this.$l},t.g.Aaa=function(e){t.X(e,1)&&this.B(1024,1)},t.g.target=function(e){return t.p(e)?(this.b!=e&&(this.b=e,i(this),t.K(this.b,this.Zka,this)),this):this.b},t.g.Zka=function(e){t.X(e,132)&&i(this)},t.g.nq=function(e,i){var n=this.scale(),s={};if(t.J(n,t.fz))var a=(0,window.parseFloat)(i),o=n.CE(a),r="number";else if(t.J(n,t.iz)){a=i,o=n.Xa().names()[e],r="string";var l=n.Dn(i);l&&(s.colorRange={value:{color:l.color,end:l.end,name:l.name,start:l.start,index:l.sourceIndex},type:""})}return s.index={value:e,type:"number"},s.value={value:o,type:r},s.tickValue={value:a,type:"number"},s.max={value:t.p(n.max)?n.max:null,type:"number"},s.min={value:t.p(n.min)?n.min:null,type:"number"},s.scale={value:n,type:""},t.ov(new t.Fw(s))},t.g.hR=function(e,i,n,s,a){n=e.top+e.height+n/2-s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(e.left+i,n).lineTo(e.left-i+e.width,n).lineTo(e.left-i+e.width,n-a).lineTo(e.left+i,n-a).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.width/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.left+i+r*l;u.moveTo(d,n).lineTo(d+r,n).lineTo(d+r,n-a).lineTo(d,n-a).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.gR=function(e,i,n,s,a){n=e.left-n/2+s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(n,e.top+i).lineTo(n,e.top-i+e.height).lineTo(n+a,e.top-i+e.height).lineTo(n+a,e.top+i).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.height/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.top+i+r*(s.length-1-l-1);u.moveTo(n,d).lineTo(n,d+r).lineTo(n+a,d+r).lineTo(n+a,d).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.eR=function(e,i,n,s,a){n=e.top-n/2+s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(e.left+i,n).lineTo(e.left-i+e.width,n).lineTo(e.left-i+e.width,n+a).lineTo(e.left+i,n+a).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.width/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.left+i+r*l;u.moveTo(d,n).lineTo(d+r,n).lineTo(d+r,n+a).lineTo(d,n+a).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.fR=function(e,i,n,s,a){n=e.left+e.width+n/2-s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(n,e.top+i).lineTo(n,e.top-i+e.height).lineTo(n-a,e.top-i+e.height).lineTo(n-a,e.top+i).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.height/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.top+i+r*(s.length-1-l-1);u.moveTo(n,d).lineTo(n,d+r).lineTo(n-a,d+r).lineTo(n-a,d).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.lo=function(){var e=this.Bz(),i=this.scale();if(i||this.scale(t.gz()),t.J(i,t.fz))e.clear(),e.stroke(this.g("stroke")),i=t.Ub(i.Jj()),this.Nb()?i.angle=0:i.angle=90,e.fill(i);else if(t.J(i,t.iz))for(e=0,i=this.lines.length;e<i;e++)this.lines[e].clear();switch(this.g("orientation")){case"top":var a=this.hR;break;case"right":a=this.gR;break;case"bottom":a=this.eR;break;case"left":a=this.fR}e=this.g("stroke"),i=0==(e=!(e=t.Wb(e))||t.cp(e)?0:e.thickness?(0,window.parseFloat)(e.thickness):1)%2?0:.5;var o=this.ob(),r=s(this),l=Math.round(this.g("colorLineSize")),h=n(this,this.Xa(),1),c=n(this,this.yb(),1);a.call(this,o,i,e,Math.max(h,c,r),l)},t.g.ob=function(){if(!this.Hq||this.J(4)){var e=this.ja();if(e){if(e.top=Math.round(e.top),e.left=Math.round(e.left),e.width=Math.round(e.width),e.height=Math.round(e.height),this.Nb())var i=e.width,n=e.height;else i=e.height,n=e.width;var s=this.Jg(i);n=this.width()?t.L(this.width(),n):t.Wy(this,e,s);var a=this.padding(),o=t.L(a.g("top"),e.height),r=t.L(a.g("right"),e.width),l=t.L(a.g("bottom"),e.height);a=t.L(a.g("left"),e.width);var h,c=this.g("align");switch(this.Nb()?(s+r+a>i&&(s=i-(r+a)),"left"==c||"top"==c?h=a:"right"==c||"bottom"==c?h=i-s-r:"center"==c&&(h=(i-s-r-a)/2)):(s+l+o>i&&(s=i-(l+o)),"left"==c||"top"==c?h=o:"right"==c||"bottom"==c?h=i-s-l:"center"==c&&(h=(i-s-l-o)/2)),this.g("orientation")){case"top":var u=e.top+o,d=e.left+h,p=n,g=s;break;case"right":u=e.top+h,d=e.left+e.width-n-r,p=s,g=n;break;case"bottom":u=e.top+e.height-n-l,d=e.left+h,p=n,g=s;break;case"left":u=e.top+h,d=e.left+a,p=s,g=n}this.Hq=new t.I(Math.round(d),Math.round(u),Math.round(g),Math.round(p))}else this.Hq=new t.I(0,0,0,0);this.I(4)}return this.Hq},t.g.Jg=function(e){return t.L(this.g("length"),e)},t.g.l0=function(e,i){var a=this.Xa(),o=this.yb(),r=a.g("position"),l=o.g("position");a=n(this,a);var h=n(this,o);return o=s(this),"outside"==r?"outside"==l?r=Math.max(e+a,i+h):(r="inside"==l?Math.max(e+a,i):Math.max(e+a,i+h),o=Math.max(h,o)):"inside"==r?"outside"==l?(r=Math.max(e,i+h),o=Math.max(a,o)):(r="inside"==l?Math.max(e,i):Math.max(e,i+h),o=Math.max(a,h,o)):"outside"==r?(r=Math.max(e+a,i+h),o=Math.max(a,o)):(r="inside"==l?Math.max(e+a,i):Math.max(e+a,i+h),o=Math.max(a,h,o)),l=!(l=this.g("stroke"))||t.cp(l)?0:l.thickness?(0,window.parseFloat)(l.thickness):1,r+o+(l=Math.round(this.g("colorLineSize"))+l)},t.g.scale=function(e){return(e=t.WN.u.scale.call(this,e))||(this.f||(this.f=t.gz(),this.f.Jj("#fff","#000")),e=this.f),e},t.g.WT=function(){return 48},t.g.zg=function(e){t.X(e,2)&&t.XN(this),t.WN.u.zg.call(this,e)},t.g.W=function(){if(!this.zc())return this;var e=t.wr(this,"marker");if(this.J(1024)&&(e&&(e.O(this.O()),e.zIndex(this.zIndex()+1),e.W(),e.Vd().visible(!1)),this.I(1024)),e&&(this.J(2)&&e.O(this.O()),this.J(8))){var i=this.zIndex();e.zIndex(i+1)}return t.WN.u.W.call(this)},t.g.Ds=function(e){if(this.b){var i=this.scale(),n=this.b,s=n&&(n.kd()||(n.Bn?n.Bn():void 0));if(this.enabled()&&i&&n.enabled()&&s==i){if(s=this.line.rb(),this.Nb()){var a=e.clientX,o=s.left+t.Zj(this.O().Ja()).x;s=(a-o)/s.width}else a=e.clientY,o=s.top+t.Zj(this.O().Ja()).y,s=(s.height-(a-o))/s.height;if(s=i.Mc(s),e.metaKey||e.shiftKey||!n.map||n.map.ie(),t.J(i,t.iz))s=i.Dn(s),i&&n&&(a=this.i[s.sourceIndex],"single"==(i=(i=n.xc()).gd()).g("hoverMode")?this.fg={X:n,vd:a}:this.fg=[{X:n,vd:a,Ln:a[a.length-1],De:{index:a[a.length-1],Tf:0}}]);else if(t.J(i,t.fz)){e=n.Ec(),a=window.Infinity;for(var r=window.NaN,l=i.uh(),h=i.di();e.advance();){o=e.get(n.bf?n.bf.El:n.Hr[1]),o=t.Za(o,l,h);var c=Math.abs(s-o);a>c&&(a=c,r=o)}for(a=[],e=n.Ec(),s=r;e.advance();)o=e.get(n.bf?n.bf.El:n.Hr[1]),(o=t.Za(o,l,h))==s&&a.push(e.ma());i&&n&&("single"==(i=(i=n.xc()).gd()).g("hoverMode")?this.fg={X:n,vd:a}:this.fg=[{X:n,vd:a,Ln:a[a.length-1],De:{index:a[a.length-1],Tf:0}}])}}}},t.g.If=function(e){if(this.b){var i=this.scale(),n=this.b,s=n.kd()||(n.Bn?n.Bn():void 0);if(this.enabled()&&i&&n.enabled()&&s==i){if(s=this.line.rb(),this.Nb()){var a=e.clientX,o=s.left+t.Zj(this.O().Ja()).x;s=(a-o)/s.width}else a=e.clientY,o=s.top+t.Zj(this.O().Ja()).y,s=(s.height-(a-o))/s.height;if(s=i.Mc(s),t.J(i,t.iz)){e=i.Dn(s);var r=this.i[e.sourceIndex];"single"==(o=(i=n.xc()).gd()).g("hoverMode")?this.fg={X:n,vd:r}:this.fg=[{X:n,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]}else if(t.J(i,t.fz)&&n){o=n.Ec(),r=window.Infinity;for(var l=window.NaN,h=i.uh(),c=i.di();o.advance();){a=o.get(n.bf?n.bf.El:n.Hr[1]),a=t.Za(a,h,c);var u=Math.abs(s-a);r>u&&(r=u,l=a)}for(r=[],o=n.Ec(),s=l;o.advance();)a=o.get(n.bf?n.bf.El:n.Hr[1]),(a=t.Za(a,h,c))==s&&r.push(o.ma());i&&n&&("single"==(o=(i=n.xc()).gd()).g("hoverMode")?(this.fg&&!(0,t.lD)(r,(function(e){return t.Aa(this.fg.vd,e)}),this)&&i.dispatchEvent(i.bl("hovered",e,[{X:n,vd:[],De:{index:this.fg.vd[this.fg.vd.length-1],Tf:0}}],!1)),this.fg={X:n,vd:r}):this.fg=[{X:n,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}])}t.aO(this,s)}}},t.g.hg=function(){t.bO(this);var e=this.b;e&&(this.Sa=e)},t.g.remove=function(){var e=t.wr(this,"marker");e&&e.remove(),t.WN.u.remove.call(this)},t.g.F=function(){var e=t.WN.u.F.call(this);return t.Tq(this,r,e),e.marker=this.Br().F(),e},t.g.U=function(e,i){t.WN.u.U.call(this,e,i),t.Iq(this,r,e,i),this.Br(e.marker)},t.g.R=function(){t.sd(this.$l,this.f),this.f=this.$l=null,t.WN.u.R.call(this)},t.H(a,t.WN),t.xu(a,t.WN);var l=t.WN.prototype;l.marker=l.Br,l=a.prototype,t.E("anychart.standalones.colorRange",(function(){var t=new a;return t.Ga("standalones.colorRange"),t})),l.padding=l.padding,l.draw=l.W,l.parentBounds=l.ja,l.container=l.O}.call(this,$)),_.heatmap_part||(_.heatmap_part=1,function(t){var e=function(e){t.JA.call(this,e)},i=function(e,i,n){if(n){var s=i==t.gm?"normal":i==t.vo?"hover":"select";i=e.j(s+"X");var a=e.j(s+"Y"),o=e.j(s+"Width");e=e.j(s+"Height"),e=new t.I(i,a,o,e),n.rect.Qf(e),n.hatchRect.Qf(e)}},n=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),t.Ou(this.Qa().labels(),"same"),this.Qa().labels().kb(this),this.b=t.cm("stroke",2,!0),this.ca.Jk("stroke",[1024,65,4294967295])},s=function(e,i,n,s,a){if((e=e.iA([e.Qa().labels,e.lb().labels,e.selected().labels],[],["label","hoverLabel","selectLabel"],e.kE(),!0,null,i,n,!1))&&((n=t.Uu(e)).adjustByHeight||n.adjustByHeight)){var o=i.j(s+"Width");i=i.j(s+"Height"),o-=(s=(new t.Hu).N(n.padding)).g("left")+s.g("right"),i-=s.g("top")+s.g("bottom"),t.qd(s),i=t.iv(e,o,i,n.minFontSize,n.maxFontSize,n.adjustByWidth,n.adjustByHeight),a=Math.min(a||window.Infinity,i)}return a},a=function(e,i){t.WB.call(this,!1),this.Ga("heatMap"),this.re="heat-map",this.ta("defaultSeriesType","heat-map"),this.Sa=this.Ae(this.g("defaultSeriesType"),e||null,i),t.T(this.ua,[["labelsDisplayMode",32768,1,0,function(){this.Sa.B(256)}]])},o=function(e,i){var n={},s=0,a=e.values(),o=[];if(a)for(var r=0;r<a.length;r++){var l=a[r],h=e.transform(l,0),c=e.transform(l,1);(!i||1>=Math.min(h,c)&&0<=Math.max(h,c))&&(n[t.qo(l)]=s++,o.push(String(l)))}return{values:n,names:o}},r=function(t,e){var i=new a(t,e);return i.iP(i.vf("colorScale"),i.bu()),i.Wg(),i.$c(),i};t.H(e,t.JA),t.PG[30]=e,t.g=e.prototype,t.g.type=30,t.g.flags=512,t.g.Np=["y"],t.g.Kh={rect:"rect",hatchRect:"rect"},t.g.ug=function(t,e){var n=this.bd.ed(e);i(t,e,n)},t.g.WB=function(t,e){var n=t.j("shapes");i(t,e,n)},t.H(n,t.xB),t.g=n.prototype,t.g.zQ=13e-6,t.g.sF={"%XValue":"x"},t.g.Ua=function(e){var i=this.ya.Ua(e);return t.p(e)?this:i},t.g.TQ=function(){var e,i,n=this.Qa().labels(),a=this.lb().labels(),o=this.selected().labels(),r=n.enabled(),l=r||a.enabled(),h=r||o.enabled(),c=n.jC();if(l=(c||a.jC())&&l,h=(c||o.jC())&&h,c=r&&c,r=e=i=window.NaN,t.SN(n,null),t.SN(a,null),t.SN(o,null),c||l||h){var u=this.$();for(u.reset();u.advance();)u.j("missing")||(c&&(r=s(this,u,t.gm,"normal",r)),l&&(e=s(this,u,t.vo,"hover",e)),h&&(i=s(this,u,t.wo,"select",i)))}c?t.SN(n,r):t.SN(n,null),l?t.SN(a,e):t.SN(a,null),h?t.SN(o,i):t.SN(o,null)},t.g.Dha=function(e,i,n,s){i=e.j("left");var a=e.j("right");n=e.j("top");var o=e.j("bottom"),r=this.b(this,t.gm),l=this.b(this,t.vo),h=this.b(this,t.wo);return r=t.$b(r)/2,l=t.$b(l)/2,h=t.$b(h)/2,a-=i,o-=n,e.j("normalX",i+r),e.j("normalY",n+r),e.j("normalWidth",a-r-r),e.j("normalHeight",o-r-r),e.j("hoverX",i+l),e.j("hoverY",n+l),e.j("hoverWidth",a-l-l),e.j("hoverHeight",o-l-l),e.j("selectX",i+h),e.j("selectY",n+h),e.j("selectWidth",a-h-h),e.j("selectHeight",o-h-h),s},t.g.RD=function(t){var e=this.tl(),i=this.bb(),n=t.get("x"),s=t.get("y"),a=e.transform(n,0),o=e.transform(n,1),r=i.transform(s,0);if(i=i.transform(s,1),0>a&&0>o||0>r&&0>i||1<a&&1<o||1<r&&1<i)return!1;var l=Math.round(this.Qe(a,!0)),h=Math.round(this.Qe(r,!1)),c=Math.round(this.Qe(o,!0)),u=Math.round(this.Qe(i,!1));return r=this.i/2,a=this.f/2,s=Math.min(l,c),l=Math.max(l,c),c=Math.min(h,u),h=Math.max(h,u),s+=Math.ceil(r),c+=Math.floor(a),l-=1==o?Math.ceil(r):Math.floor(r),h-=1==i?Math.floor(a):Math.ceil(a),t.j("left",s),t.j("top",c),t.j("right",l),t.j("bottom",h),t.j("x",e.transform(n,.5)),!0},t.g.bJ=function(t,e){this.Vj.length=0,this.Vj.push(this.Dha);var i=this.$();for(i.reset();i.advance();)this.XA(i,t,e);this.Vj.length=0},t.g.oG=function(e){var i=this.$(),n=i.j("left"),s=i.j("top"),a=i.j("right");return i=i.j("bottom"),(e=t.Eo(new t.I(n,s,a-n,i-s),e)).x=Math.floor(e.x),e.y=Math.floor(e.y),e},t.g.tf=function(e,i,n){var s=this.ya.g("labelsDisplayMode"),a=this.iA([this.Qa().labels,this.lb().labels,this.selected().labels],[],["label","hoverLabel","selectLabel"],this.kE(),!0,null,e,i,!1);if(a){var o=i==t.gm?"normal":i==t.vo?"hover":"select";i=e.j(o+"X");var r=e.j(o+"Y"),l=e.j(o+"Width");o=e.j(o+"Height"),r=t.kn(i,r,l,o),i=this.Qa().labels(),"drop"==s&&((l=t.Uu(a)).width=null,l.height=null,l=i.measure(a.Hf(),a.jc(),l),r.left>l.left+.5||r.cb()<l.cb()-.5||r.top>l.top+.5||r.Va()<l.Va()-.5)&&(i.clear(a.ma()),a=null),a&&((s="always-show"==s?this.fa:t.ob(this.fa,r))?(a.clip(s),n&&a.W()):i.clear(a.ma()))}e.j("label",a)},t.g.UX=function(e,i,n,s,a,o,r){t.bv(e,t.no([r,0,o,t.jo,s,0,n,t.jo,e,t.jo,o||n,t.lo,o,t.ko,e,t.lo,n,t.ko]))},t.g.nE=function(){for(var e=this.xc(),i=0,s=0,a=0,o=(e=t.Ga(e.Yg,e.Zg)).length;a<o;a++){var r=e[a];if(r&&r.enabled()){var l=t.$b(r.g("stroke"));r.Nb()?l>s&&(s=l):l>i&&(i=l)}}this.i=i,this.f=s,n.u.nE.call(this)},t.g.P_=function(e){var i=this.fa,n=i.Va()-this.Qp().bottom();return i=i.Vb()+this.Qp().top(),t.Za(e,i,n)},t.g.GS=function(){return[this,this.xc()]},t.g.aU=function(){return{}},t.g.ym=function(e,i){var n={chart:{value:this.xc(),type:""},series:{value:this,type:""},scale:{value:this.Ra(),type:""},index:{value:i.ma(),type:"number"},x:{value:i.get("x"),type:"string"},y:{value:i.get("y"),type:"string"},heat:{value:i.get("heat"),type:"number"},seriesName:{value:this.name(),type:"string"}},s=this.xc().kd();if(s){var a=i.get("heat");if(t.J(s,t.iz)){var o=s.Dn(a);o&&(n.colorRange={value:{color:o.color,end:o.end,name:o.name,start:o.start,index:o.sourceIndex},type:""}),n.color={value:s.Qq(a),type:""}}}return n},t.g.Ge=function(e,i,s){i=n.u.Ge.call(this,e,i,s),s=t.nv(i);var a,o=i.lg();s.x={value:o.get("x"),type:"string"},s.y={value:o.get("y"),type:"string"},s.heat={value:o.get("heat"),type:"number"},e=e||this.g("color")||"blue";var r=this.xc().kd();return r&&(o=o.get("heat"),t.p(o)&&(a=r.Qq(o)),s.scaledColor={value:a,type:""}),s.colorScale={value:r,type:""},s.sourceColor={value:a||e,type:""},t.ov(i,s)};var l=n.prototype;l.tooltip=l.Ua,t.H(a,t.WB),a.prototype.sa=-2147483648|t.WB.prototype.sa;var h={};h["heat-map"]={Fb:30,Kb:2,Lb:[{name:"rect",Qb:"rect",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},{name:"hatchRect",Qb:"rect",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6}],Ob:null,Jb:null,Cb:5767168|t.QG,Ab:"y",zb:"y"},a.prototype.fj=h;var c=["normal","hovered","selected"],u=["data","tooltip"];!function(){function e(e,i){for(var n=[],s=1;s<arguments.length;s++)n.push(arguments[s]);return s=(s=this.Ai(0))[e].apply(s,n),t.p(n[0])?this:s}for(var i=0;i<c.length;i++){var n=c[i];a.prototype[n]=t.qa(e,n)}}(),t.Gq(a,["fill","stroke","hatchFill","labels","markers"],"normal");var d={};t.rq(d,0,"labelsDisplayMode",t.UN),t.U(a,d),t.g=a.prototype,t.g.Ss=function(){return"heat-map"},t.g.Vv=function(t){return this.tj()?null:a.u.Vv.call(this,t)},t.g.Gt=function(t,e){return new n(this,this,t,e,!0)},t.g.CA=function(){return t.bt},t.g.xD=function(){return["HeatMap chart scale","ordinal"]},t.g.tH=function(){return"ordinal"},t.g.wu=function(){this.Sa.B(1024),this.B(8421376,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(-2147483136,1);else if(e=t.jt(this.vb,e,null,48,["HeatMap chart color scale","ordinal-color, linear-color"],this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||this.B(-2147483136,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(-2147483136,1)},t.g.Ol=function(e){var i,n=[];if("categories"==e){this.pb();var s=this.kd();if(s&&t.J(s,t.iz)){var a=this.Sa,o=s.sr();for(e=0,i=o.length;e<i;e++){var r=o[e];"default"!==r.name&&n.push({text:r.name,iconEnabled:!0,iconType:"square",iconFill:r.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:e,meta:{X:a,scale:s,xe:r}})}}}return n},t.g.Ms=function(t){return"categories"==t},t.g.zr=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){var o=[];n=n.xe;for(var r=s.Ec();r.advance();){var l=r.get("heat");n==a.Dn(l)&&o.push(r.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:o}:a.fg=[{X:s,vd:o,Ln:o[o.length-1],De:{index:o[o.length-1],Tf:0}}])}}},t.g.wq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){var o=n.xe,r=s.Ec();for(n=[];r.advance();){var l=r.get("heat");o==a.Dn(l)&&n.push(r.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:n}:a.fg=[{X:s,vd:n,Ln:n[n.length-1],De:{index:n[n.length-1],Tf:0}}])}}},t.g.vq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")&&"single"==this.gd().g("hoverMode")){var s=t.so(i.domTarget);s&&(s.X=n.X)}},t.g.mG=function(e,i){for(var n=[],s=0,a=e.length;s<a;s++){var o,r=e[s];o=r.De?{index:r.De.index,distance:r.De.Tf}:{index:window.NaN,distance:window.NaN},n.push({series:r.X,points:i?[]:r.vd?t.Ha(r.vd):[],nearestPointToCursor:o})}return n},t.g.XD=function(t,e,i){return(t=a.u.XD.call(this,t,e,i)).series=this,t},t.g.ce=function(t){return this.Sa.ce(t)},t.g.Uu=function(){return!0},t.g.Rk=function(){return this.Sa.Rk()},t.g.eS=function(){var e=this.J(327680);if(a.u.eS.call(this),e){var i=null,n=null,s=this.bb(),o=this.Ra(),r=t.Tt(o),l=t.Tt(s);if(r||l){if(r){var h=r;i=[]}if(l){var c=l;n=[]}for(var u=this.Sa.Ec();u.advance();){if(r){e=o.Yv(u.get("x"));var d=u.get(h);t.p(i[e])||(i[e]=d||u.get("x")||u.get("heat"))}l&&(e=s.Yv(u.get("y")),d=u.get(c),t.p(n[e])||(n[e]=d||u.get("y")||u.get("heat")))}r&&(o.Ok=i),l&&(s.Ok=n)}this.B(-2147483648)}if(this.J(-2147483648)){if(this.vb&&this.vb.Of()){for(this.vb.Bg(),(u=this.Sa.$()).reset();u.advance();)this.vb.Xc(u.get("heat"));this.vb.Hg()}this.Sa&&this.Sa.B(2048),this.B(32768),this.I(-2147483648)}},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Sa.data(e,i),this}return this.Sa.data()},t.g.Tj=function(t){return this.Sa.Tj(t),this},t.g.select=function(t){return this.Sa.select(t),this},t.g.DM=function(e){this.pb();var i="selected"==e,n=o(this.Ra(),i);e=n.values;var s=n.names;i=(n=o(this.bb(),i)).values;var a=n.names;n=[];for(var r=0;r<a.length;r++)n.push([a[r]]);for(a=this.Sa.cg();a.advance();){r=e[t.qo(a.get("x"))];var l=i[t.qo(a.get("y"))],h=String(a.get("heat"));(0,window.isNaN)(r)||(0,window.isNaN)(l)||(n[l][r+1]=h)}return s.unshift("#"),{headers:s,data:n}},t.g.F=function(){var t=a.u.F.call(this),e=t.chart;return delete e.barsPadding,delete e.barGroupsPadding,delete e.crosshair,delete e.defaultSeriesType,t},t.g.iP=function(e,i){if(t.ea(e))var n=i[e];else t.z(e)?(n=t.dt(e,null))||(n=i[e]):t.C(e)?(n=t.dt(e.type,null))&&n.N(e):n=null;n&&this.kd(n)},t.g.ht=function(e,i,n){this.iP(e.colorScale,i),a.u.ht.call(this,e,i,n),t.Iq(this,d,e)},t.g.ft=function(e,i,n){a.u.ft.call(this,e,i,n),t.Tq(this,d,e),t.Zz(e,"colorScale",this.kd(),i,n)},t.g.kP=function(e,i,n){i={};var s,a=c;for(s=0;s<a.length;s++){var o=a[s];t.p(e[o])&&(i[o]=e[o])}for(a=u,s=0;s<a.length;s++)o=a[s],t.p(e[o])&&(i[o]=e[o]);this.Sa.U(i,n)},t.g.eP=function(e){var i,n=this.Sa.F(),s=c;for(i=0;i<s.length;i++){var a=s[i];t.p(n[a])&&(e[a]=n[a])}for(s=u,i=0;i<s.length;i++)a=s[i],t.p(n[a])&&(e[a]=n[a])},t.g.R=function(){a.u.R.call(this),this.Sa=null};var p=a.prototype;p.getType=p.Ma,p.xGrid=p.lm,p.yGrid=p.nm,p.xAxis=p.$h,p.yAxis=p.ij,p.xScale=p.Ra,p.yScale=p.bb,p.hover=p.Tj,p.select=p.select,p.unhover=p.Md,p.unselect=p.ie,p.data=p.data,p.colorScale=p.kd,p.xZoom=p.Tq,p.yZoom=p.Uq,p.xScroller=p.Mp,p.yScroller=p.Ur,p.annotations=p.Nk,t.Tp["heat-map"]=r,t.E("anychart.heatMap",r)}.call(this,$)),_.binding||(_.binding=1,function(t){var e=function(e){var i=e.type;switch(t.z(i)&&i.toLowerCase()){case"checkbox":case"radio":return e.checked?e.value:null;case"select-one":return 0<=(i=e.selectedIndex)?e.options[i].value:null;case"select-multiple":i=[];for(var n,s=0;n=e.options[s];s++)n.selected&&i.push(n.value);return i.length?i:null;default:return null!=e.value?e.value:null}},i=function(e,n,s,a){if(t.z(e)){for(var o=[t.ll],r=0;r<arguments.length;r++)o.push(arguments[r]);return i.apply(null,o)}var l=n,h=/\s*\.?\s*(([\w_]+)(\(\s*(,?\s*([\d\.]+|".+"|'.+'|\{\d+\}))*\s*\))?)/,c=[],u=!1;do{var d=l.match(h);if(!d){u=!0;break}var p=d[3],g=void 0;p&&((p=/\(\s*(.*)\s*\)/.exec(p))[1]&&(g=p[1].split(/\s*,\s*/)),p=!0),c.push([d[2],p,g]),l=l.replace(d[0],"")}while(l.length);if(l=!u&&c){for(h=[],c=3;c<arguments.length;c++)h.push(arguments[c]);t:{c=e;try{for(u=0;u<l.length;u++){var f=l[u],b=f[0];if(o=f[1],r=f[2])for(d=0;d<r.length;d++){var v=r[d].replace(/^'(.*)'$/,"$1");if((v=v.replace(/^"(.*)"$/,"$1"))==r[d]){var m=r[d].match(/^\{(\d+)\}$/);if(m){var y=Number(m[1]);r[d]=t.p(h[y])?h[y]:void 0}}else r[d]=v}null!=s&&u==l.length-1&&(r=r||[]).push(s),c=o?c[b].apply(c,r):c[b]}}catch(S){f="Could not apply key '"+b,o&&(f+="()"),f+="'",r&&(f+=" with arguments ["+r+"]"),(o=t.ll.console)&&"object"!=typeof(r=o.warn||o.log)&&r.call(o,f),o=null;break t}o=c}return o}},n=function(e){if(t.p(e)||(e=".ac-control"),t.af(e)){var i=e;if(e=i.type,t.p(e)){var o="change";switch(e=e.toLowerCase()){case"button":case"submit":o="click";break;case"text":case"textarea":case"range":o="input"}a(i),t.Ld(i,o,s,!1),e=i.getAttribute("ac-chart-id"),e=t.eq.getChartById(e),t.Ld(e,"chartdraw",(function(){a(i)}),!1,i)}}else if(t.z(e))n(window.document.querySelectorAll(e));else if(t.A(e)||t.Qe(e))for(o=0;o<e.length;o++)n(e[o])},s=function(n){n.preventDefault();var s=n.target,a=n.target.getAttribute("ac-chart-id"),o=t.eq.getChartById(a);if(n=n.target.getAttribute("ac-key"),a&&o&&n&&(a=s.type,t.p(a))){switch(s=e(s),a.toLowerCase()){case"checkbox":s=!!s;break;case"date":s=t.eq.format.parseDateTime(s,"yyyy-MM-dd")}i(o,n,s)}},a=function(n){var s=n.type;if(t.p(s)){s=s.toLowerCase();var a=n.getAttribute("ac-chart-id"),o=t.eq.getChartById(a),r=n.getAttribute("ac-key");if(a&&o&&r&&(a=i(o,r),o=e(n),r=!0,null!=a&&!t.D(a))){switch(s){case"button":case"submit":case"radio":r=!1;break;case"checkbox":a=!!a,o=!!o;break;case"color":t.C(a)&&t.D(a.fill)&&(a=a.fill());break;case"date":a=t.eq.format.dateTime(a,"yyyy-MM-dd");break;default:a=t.da(a)?a:String(a),o=t.da(o)?o:String(o)}if(r&&a!=o){r=a;var l=n.type;switch(t.z(l)&&l.toLowerCase()){case"checkbox":case"radio":n.checked=r;break;case"select-one":if(n.selectedIndex=-1,t.z(r))for(var h=0;l=n.options[h];h++)if(l.value==r){l.selected=!0;break}break;case"select-multiple":for(t.z(r)&&(r=[r]),h=0;l=n.options[h];h++)if(l.selected=!1,r)for(var c,u=0;c=r[u];u++)l.value==c&&(l.selected=!0);break;default:n.value=null!=r?r:""}}"button"!=s&&"submit"!=s||(a==o?t.Qj(n,"btn-primary"):t.Sj(n,"btn-primary"))}}};t.E("anychart.ui.binding.exec",i),t.E("anychart.ui.binding.init",n)}.call(this,$)),_.pie||(_.pie=1,function(t){var e=function(e,i,n,s,a){var o,r=!1;if(!a)return!1;var l=0;for(o=a.length;l<o-1;l+=2){var h=l==o-2?0:l+2,c=l==o-2?1:l+3;r=r||t.en(a[l],a[l+1],a[h],a[c],e,i,n,s)}return r},i=function(t,e,i,n){var s,a=!1;if(!n)return!1;var o=0;for(s=n.length;o<s-1;o+=2)if(!a){a=n[o];var r=n[o+1];a=(t-a)*(t-a)+(e-r)*(e-r)>i*i}return a},n=function(){return new t.Zx},s=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e},a=function(e,i,n,s,a,r){t.Cr.call(this,e),this.i=i,this.f=s||null,this.o=a||function(t,e){return t.value+=Math.max(0,+e)||0,t},this.D=r||function(){return{value:0}},this.b=new o,this.b.j(0,"groupedPoint",!0),this.b.j(0,"name",n)},o=function(){t.V.call(this),t.Ir(this),this.f=void 0},r=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e,this.G=v(this.ya),this.i=this.ya.g("connectorStroke")},l=function(e,i){t.EA.call(this,e,i)},h=function(e,i){t.Bx.call(this),this.Ga("pieFunnelPyramidBase","pie"),this.contextMenu(this.oa.contextMenu),this.ka(),this.Yc=this.i=this.fd=this.Fa=this.Uc=null,this.nf=!0,this.Sb={},this.Dk=function(){var e=this.sourceColor,i=this.aquaStyleObj;return{keys:[{offset:0,color:t.Pl(e,.5)},{offset:.95,color:t.Ql(e,.4)},{offset:1,color:t.Ql(e,.4)}],cx:.5,cy:.5,fx:i.fx,fy:i.fy,mode:i.mode}},this.D=[],this.state=new t.ix(this),this.data(e||null,i),this.B(4294967295),t.T(this.ua,[["overlapMode",4096,1],["radius",4,1],["innerRadius",4,1],["startAngle",4112,1],["sort",16,1,0,function(){c(this)}],["insideLabelsOffset",4100,9],["connectorLength",4100,9],["outsideLabelsCriticalAngle",4096,1],["forceHoverLabels",4096,1],["connectorStroke",16,1],["mode3d",4116,1],["sliceDrawer",16,1]]);var s={};t.T(s,[["explode",4116,1],["fill",528,1],["stroke",528,1],["hatchFill",528,1],["labels",0,0],["outline",0,0]]),this.ca=new t.my(this,s,t.gm,[[1,"fill",function(e){var i=!1;return t.z(e[0])&&(e[0]=e[0].toLowerCase(),i="aquastyle"==e[0]),this.g("mode3d")&&i?this.g("fill"):t.D(e[0])||i?e[0]:t.Ub.apply(null,e)}]]),this.ca.ta("labelsFactoryConstructor",n),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.de,this),e.kb(this),this.B(4096,1)})),this.ca.ta("outlineAfterInitCallback",(function(e){t.K(e,this.uja,this),this.B(16,1)})),s={},t.T(s,[["explode",4116,1],["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0],["outline",16,1]]),this.za=new t.my(this,s,t.vo),this.za.ta("labelsFactoryConstructor",t.py),s={},t.T(s,[["explode",4116,1],["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0],["outline",16,1]]),this.Ea=new t.my(this,s,t.wo),this.Ea.ta("labelsFactoryConstructor",t.py),this.da(!1)},c=function(e){t.qd(e.P),delete e.sd,e.P=u(e,e.i),t.K(e.P,e.dd,e),e.B(13104,17)},u=function(e,i){if(null!=e.Uc){var n=i;i=new a(i,"value",e.yo,e.Uc,void 0,(function(){return{value:0}})),t.rd(n,i),i.zY=!0}return"none"!=(n=e.g("sort"))&&null!=n&&((i="asc"==n?i.sort("value",(function(t,e){return t-e})):i.sort("value",(function(t,e){return e-t}))).zY=!0),i},d=function(e,i,n){if(!e)return t.Xl;var s=i+"|"+e+"|"+n,a=J[s];if(!a){switch(i){case 2:a=t.Zl;break;case 3:a=t.$l;break;default:a=t.am}J[s]=a=t.qa(p,e,a,3==i,n)}return a},p=function(e,i,n,s,a,o,r,l){if(o!=t.gm&&s){var h=a.sc(e,o,a.$(),i,!1,void 0,r);if(n&&!0===h&&(h=i(a.Eh())),t.p(h)){if(!t.D(h))return h;if(n)return n=a.Yi(r),i(h.call(n,n))}}return e=a.sc(e,0,a.$(),i,!1,void 0,r),s=t.p(l)?l:e,l=t.z(e)&&"aquastyle"==e,n&&!0===e&&(e=i(a.Eh())),t.D(e)&&(n=n?a.Yi(r):a.Ge(s,r),e=i(e.call(n,n))),l&&(n=a.$(),n={aquaStyleObj:a.Sb,sourceColor:a.cc().nc(n.ma())},e=a.Dk.call(n)),h&&(n=a.Ge(e,r),e=i(h.call(n,n))),e},g=function(t,e,i){null!=(i=t.$().j(i||"hatchSlice"))&&(t=d("hatchFill",3,!0)(t,e,!1),i.stroke(null).fill(t))},f=function(e){return t.C(e)&&e.hasOwnProperty("mode")&&e.hasOwnProperty("cx")},b=function(e){return e=null===e?window.NaN:+e,!(t.ea(e)&&!(0,window.isNaN)(e)&&0<e)},v=function(e){return"outside"==t.Wk(e.labels().g("position"))},m=function(t,e){var i=e.ma();t.Za&&(t.Za[i]=null)},y=function(e){var i,n=e.$(),s=n.ma(),a=e.g("mode3d"),o="allow-overlap"==e.g("overlapMode");if(function(e){e.$a=[];var i=e.g("mode3d");e.ba?(e.ba.clear(),i&&e.ec.clear()):(e.ba=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.ba.parent(e.Na),e.ba.zIndex(32),i&&(e.ec=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.ec.parent(e.Na),e.ec.zIndex(29))),e.aa=[],i=e.g("connectorStroke"),e.ud||(e.ud=e.Na.path(),e.ud.stroke(i))}(e),!o)var r={},l=i=!1;for(n.reset();n.advance();)if(!b(n.get("value"))){var h=n.ma(),c=t.nx(e.state,h),u=n.j("start"),d=n.j("sweep"),p=(u+d/2)*Math.PI/180;u=90>(d=t.ab(t.cb(p)))||270<d;var g=_(e,h),f=a?.45*e.b:e.b,v=g[0]+e.b*Math.cos(p);if(f=g[1]+f*Math.sin(p),a&&(f+=.2*e.b/2),p=u?5:-5,n.j("connector",p),e.$a[2*h]=v,e.$a[2*h+1]=f,n.j("anchor",u?"left-center":"right-center"),v=e.ke(c,!1),m(e,v),v.na=d,c=M(e,c),n.j("explode",c),e.Hd&&-1!=(0,t.za)(e.Hd,h)&&v.enabled(!1),o)v&&0!=v.enabled()&&(h=v.ma(),m(e,v),u=e.ek(v),d=c?e.kg:e.me,e.Ka=Math.max(d.left-u.left,u.cb()-d.cb(),d.top-u.top,u.Va()-d.Va(),e.Ka),e.aa[h]||(f=e.$a[2*h+1]-.2*e.b/2,u=a&&f<e.uc?t.eC(e.ec):t.eC(e.ba),e.aa[h]=u,u.stroke(e.g("connectorStroke")),x(e,v,u)));else{if(h=r[c]){f=h[0],p=h[1],g=h[2];var y=h[3]}else(h=[]).push(f=[],p=[],g=[],y=[],c),r[c]=h;270<d&&!i&&(f.length||g&&g.length)&&(i=!0),90<d&&!l&&(p.length||y&&y.length)&&(l=!0),(u=u?i?y:p:l?g:f).push(v)}}if(e.dn=window.NaN,!o){var S=[];t.va(t.Ec(r),(function(t){var e=t[3].concat(t[1]),i=t[2].concat(t[0]);t=t[4],this.Nx(i,!1,S,t),this.Nx(e,!0,S,t),S=S.concat(i,e)}),e)}n.select(s),e.qc||(e.qc=[]),e.Hd||(e.Hd=[]),h=e.dn,-1!=(0,t.za)(e.qc,h)?t.ua(e.qc)!=h&&(e.Hd.push(h),e.qc.length=0):e.qc.push(h),e.Ka=Math.round(e.Ka)},S=function(e){e.b=Math.max(e.b-Math.max(e.Ka,0),0);var i=e.g("innerRadius");e.G=t.D(i)?i(e.b):t.L(i,e.b),i=e.G/Math.pow(2,.5)*2,e.na=t.kn(e.Dc-i/2,e.uc-i/2,i,i),e.fb=new t.I(e.Dc-e.b,e.uc-e.b,2*e.b,2*e.b),(i=e.labels()).ka(),i.Dc(e.Dc),i.uc(e.uc),i.Ty(e.b),i.UE(e.g("startAngle")),i.fz(360),i.ja(e.fb),i.da(!1),e.lb().labels().ja(e.fb)},w=function(t,e){t.Ba=e;var i=Math.min(t.na.width/t.Ba.width,t.na.height/t.Ba.height);(0,window.isFinite)(i)||(i=0),t.f.ak.oc(i,0,0,i,t.na.left-t.Ba.left*i+(t.na.width-i*t.Ba.width)/2,t.na.top-t.Ba.top*i+(t.na.height-i*t.Ba.height)/2)},x=function(e,i,n){var s=e.data().$(),a=i.ma(),o=e.g("mode3d");if(s.select(a)){var r=e.$a[2*a];a=e.$a[2*a+1],s=s.j("connector");var l=i.jc().value,h=t.p(i.g("offsetY"))?i.g("offsetY"):e.labels().g("offsetY");h||(h=0),h=t.L(h,e.b),(i=t.p(i.g("offsetX"))?i.g("offsetX"):e.labels().g("offsetX"))||(i=0);var c=t.bb(l.angle+t.L(i,360)),u=l.radius+h;i=e.Dc+u*Math.cos(c)-s,e=e.uc+(o?l.radiusY+h:u)*Math.sin(c),n.clear().moveTo(r,a).lineTo(i,e).lineTo(i+s,e)}},C=function(e,i,n){var s=e.$(),a=s.ma(),o=s.j("start"),r=s.j("sweep");if(n){var l=s.j("slice"),h=s.j("sliceOutline"),c=s.j("hatchSlice");l&&l.clear(),c&&c.clear(),h&&h.clear()}else e.ue&&(l=t.eC(e.ue),s.j("slice",l)),e.Od&&(h=t.eC(e.Od),s.j("sliceOutline",h)),e.o&&(c=t.eC(e.o),s.j("hatchSlice",c));if(l){var u=e.sc("outline.offset",i,s,t.br,!1)||0;n=e.sc("outline.width",i,s,t.br,!1)||0,u=t.L(u,e.b),n=t.L(n,e.b);var p=M(e,i);s.j("explode",p);var b=o+r/2;s=p*Math.cos(t.bb(b)),p*=Math.sin(t.bb(b));var v=e.b;if(b=v+u,u=v+u+n,v={centerX:e.Dc,centerY:e.uc,innerRadius:e.G,outerRadius:v,innerOutlineRadius:b,outerOutlineRadius:u,startAngle:o,sweepAngle:r,explodeX:s,explodeY:p,path:l},h&&(n?t.wi(h,e.Dc+s,e.uc+p,u,b,o,r):h.clear()),e.g("sliceDrawer").call(v,v),l.tag={X:e,index:a},e.g("mode3d"))for(r=e.D.length,n=e.$().ma(),o=0;o<r;o++)(h=e.D[o]).index==n&&I(e,h.type+"Path"+("outerFront"==h.type||"innerBack"==h.type||"outerBack"==h.type||"innerFront"==h.type?h.start:""),i);else n=(r=e.$()).j("slice"),t.p(n)&&(h=(s=d("fill",1,!0))(e,i,!1,null),f(h)&&null===h.mode&&(h.mode=e.fb?e.fb:null),n.fill(h),o=(s=d("stroke",2,!0))(e,i,!1,null),f(o)&&null===o.mode&&(o.mode=e.fb?e.fb:null),n.stroke(o),(n=e.$().j("sliceOutline"))&&(null===(s=e.sc("outline.enabled",i,r,t.Zq,!1))&&(s=e.sc("outline.enabled",0,r,t.Zq,!1)),s?(r=(s=d("outline.fill",1,!0))(e,0,!1,h),h=s(e,i,!1,r),f(h)&&null===h.mode&&(h.mode=e.fb?e.fb:null),o=(s=d("outline.stroke",2,!0))(e,i,!1,o),f(o)&&null===o.mode&&(o.mode=e.fb?e.fb:null)):h=o="none",n.fill(h).stroke(o)),g(e,i));c&&(c.pe(l.F()),c.tag={X:e,index:a},g(e,i))}},D=function(e,i,n,s,a,o,r,l,h,c){if(h+=String(a),c=e.Zz(h,c)){var u=.45*s,d=.2*e.b;o<a&&(o+=360),360==Math.abs(r)&&(a=0,o=180),r=t.bb(a),a=t.bb(o),o=i+s*+Math.cos(r).toFixed(5),r=n+u*+Math.sin(r).toFixed(5),i+=s*+Math.cos(a).toFixed(5),n+=u*+Math.sin(a).toFixed(5),c.moveTo(o,r),c.Ff(i,n,s,u,!1,!0),c.lineTo(i,n+d),c.Ff(o,r+d,s,u,!1,!1),c.lineTo(o,r),c.close(),I(e,h,l)}},T=function(e,i,n,s,a,o,r,l,h,c){if(h+=String(a),c=e.Zz(h,c)){var u=.45*s,d=.2*e.b;o<a&&(o+=360),360==Math.abs(r)&&(a=180,o=0),r=t.bb(a),a=t.bb(o),o=i+s*Math.cos(r),r=n+u*Math.sin(r),i+=s*Math.cos(a),n+=u*Math.sin(a),c.moveTo(o,r),c.Ff(i,n,s,u,!1,!0),c.lineTo(i,n+d),c.Ff(o,r+d,s,u,!1,!1),c.lineTo(o,r),c.close(),I(e,h,l)}},k=function(e,i,n,s,a,o,r,l,h){var c=t.bb(r);r=.2*e.b;var u=n+o*Math.cos(c);n+=a*Math.cos(c),o=s+.45*o*Math.sin(c),s+=.45*a*Math.sin(c),(h=e.Zz(i,h))&&(h.moveTo(u,o),h.lineTo(n,s),h.lineTo(n,s+r),h.lineTo(u,o+r),h.lineTo(u,o),h.close(),I(e,i,l))},$=function(e,i,n,s){var a=e.labels();if(a.ka(),a.fontOpacity(i),a.W(),a.da(!1),s&&e.aa)for(i=0;i<e.aa.length;i++)(s=e.aa[i])&&(a=e.g("connectorStroke"),a=t.Ul(a,n),s.stroke(a))},O=function(e){var i=e.$(),n=i.ma(),s=t.nx(e.state,n),a=M(e,s),o=(s=i.j("start"))+(i=i.j("sweep"));if(t.p(s)&&t.p(i)&&i){var r=s+i/2,l=a*Math.cos(t.bb(r));a=.45*a*Math.sin(t.bb(r)),e.D.push({index:n,type:"top",start:s,mt:i,hy:l,ky:a}),e.D.push({index:n,type:"bottom",start:s,mt:i,hy:l,ky:a}),360!=Math.abs(i)&&(e.D.push({index:n,type:"start",angle:s,hy:l,ky:a}),e.D.push({index:n,type:"end",angle:o,hy:l,ky:a}));var h=s,c=o;if(h==c)r=!1;else{h=t.bb(h),c=t.bb(c),r=t.Tm(Math.cos(h),7);var u=t.Tm(Math.cos(c),7);h=E(r,Math.sin(h)),c=E(u,Math.sin(c)),r=1==h||2==h||(3==h?1==c||2==c||3==c&&r>=u:4==h&&(4!=c||r>=u))}if(r)for(h=A(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="outerFront",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c];if((h=s)!=(c=o)&&e.G?(h=t.bb(h),c=t.bb(c),r=t.Tm(Math.cos(h),7),u=t.Tm(Math.cos(c),7),h=E(r,Math.sin(h)),c=E(u,Math.sin(c)),r=3==h||4==h||(1==h?3==c||4==c||1==c&&r<=u:2==h&&(2!=c||r<=u))):r=!1,r)for(h=U(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="innerBack",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c];for(h=U(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="outerBack",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c];for(h=A(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="innerFront",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c]}},P=function(e,i,n){var s=0,a=e.D.length;if(t.p(i))for(s=0;s<a;s++){var o=e.D[s];o.index==i&&L(e,o,n)}else{for(s=0;s<a;s++)switch(o=e.D[s],o.type){case"top":o.ez=1;break;case"outerFront":o.ez=o.Jn?1:t.Tm(Math.sin(t.bb(j(o.start,o.end))),7);break;case"innerBack":o.ez=o.Jn?-1:t.Tm(Math.sin(t.bb(j(o.start,o.end))),7);break;case"bottom":o.ez=-3;break;case"innerFront":o.ez=0;break;case"outerBack":o.ez=-2;break;default:o.ez=t.Tm(Math.sin(t.bb(o.angle)),7)}for(e.D.sort((function(t,e){return t.ez-e.ez})),s=0;s<a;s++)L(e,e.D[s])}e.D.length=0},L=function(e,i,n){var s=e.$();s.select(i.index);var a=t.nx(e.state,i.index),o=M(e,a);s.j("explode",o),s=e.Dc;var r=e.uc;o&&(s+=i.hy,r+=i.ky),o=e.b;var l=e.G;switch(i.type){case"top":G(e,s,r,o,l,i.start,i.mt,a,!0,n);break;case"bottom":G(e,s,r,o,l,i.start,i.mt,a,!1,n);break;case"outerFront":D(e,s,r,o,i.start,i.end,i.mt,a,"outerFront",n);break;case"innerBack":T(e,s,r,l,i.start,i.end,i.mt,a,"innerBack",n);break;case"outerBack":D(e,s,r,o,i.start,i.end,i.mt,a,"outerBack",n);break;case"innerFront":T(e,s,r,l,i.start,i.end,i.mt,a,"innerFront",n);break;case"start":k(e,"startPath",s,r,o,l,i.angle,a,n);break;case"end":k(e,"endPath",s,r,o,l,i.angle,a,n)}},G=function(e,i,n,s,a,o,r,l,h,c){if(0>s&&(s=0),0>a&&(a=0),s<a){var u=s;s=a,a=u}u=(h?"top":"bottom")+"Path",n+=h?0:.2*e.b,r=t.Za(r,-360,360),(h=e.Zz(u,c))&&(0>=a?360==Math.abs(r)?h.Fe(i,n,s,.45*s,o,r,!1):h.moveTo(i,n).Fe(i,n,s,.45*s,o,r,!0).close():(c=360>Math.abs(r),h.Fe(i,n,s,.45*s,o,r).Fe(i,n,a,.45*a,o+r,-r,c),c&&h.close()),I(e,u,l))},F=function(e,i){var n,s=e.$(),a=s.ma(),o=s.get("normal"),r=t.Zo(t.p(o)?o.fill:void 0,s.get("fill"),e.fill());return(i=t.em(i))==t.wo?(o=s.get("selected"),s=t.Zo(t.p(o)?o.fill:void 0,s.get("selectFill"),e.selected().fill(),r),r=e.EK(s,r)):i==t.vo?(o=s.get("hovered"),s=t.Zo(t.p(o)?o.fill:void 0,s.get("hoverFill"),e.lb().fill(),r),r=e.EK(s,r)):r=e.EK(r),r=t.z(r)?t.Ll(r):t.Ll(r.color),a=e.cc().nc(a),t.C(a)&&(a.color?n=t.Ll(a.color):a.keys&&a.keys.length&&(n=t.Ll(a.keys[0].color))),n=n?n.vk:a,r?r.vk:n},I=function(e,i,n){var s=e.$(),a=s.ma(),o=F(e,n),r=t.Cl(o),l=s.j(i);l.tag={X:e,index:a};var h,c=t.Il(r,.3),u=t.Hl([255,255,255],r,.1),d=t.Tb(t.Hl(r,c,.7));u=t.Tb(t.Hl(c,u,.1));var p=t.Tb(t.Hl(r,c,.8)),f=t.Tb(t.Hl(r,c,.2));r=t.Tb(t.Hl(r,c,.1));var b=t.em(n);c=b==t.vo,b=b==t.wo;var v,m=t.Vl(c?e.lb().fill():b?e.selected().fill():e.fill());f={color:c||b?t.Pl(f,.2):f,opacity:m},u={angle:45,keys:[{position:0,opacity:m,color:c||b?t.Pl(o,.2):t.Pl(o,.1)},{position:.19,opacity:m,color:c||b?t.Pl(u,.2):u},{position:1,opacity:m,color:c||b?t.Pl(p,.2):p}]},d=o={angle:-50,keys:[{position:0,opacity:m,color:c||b?t.Pl(o,.3):o},{position:1,opacity:m,color:c||b?t.Pl(d,.2):d}]},h="topPath"==i?o:"bottomPath"==i?d:t.ec(i,"outer")?u:t.ec(i,"inner")?f:{color:c||b?t.Pl(r,.2):r,opacity:m},v=b&&t.dm(e.selected().stroke())?e.selected().stroke():t.dm(e.stroke())?e.stroke():h,l.fill(h),l.stroke(v),i="hatch"+String(i.charAt(0)).toUpperCase()+i.substr(1),(s=s.j(i))&&(s.pe(l.F()),s.tag={X:e,index:a},g(e,n,i))},E=function(t,e){return 0<=t&&0<=e?1:0>=t&&0<=e?2:0>=t&&0>e?3:4},A=function(e,i){var n=t.Tm(Math.cos(t.bb(e)),7),s=t.Tm(Math.cos(t.bb(i)),7),a=E(n,Math.sin(t.bb(e))),o=E(s,Math.sin(t.bb(i))),r=[];if(1==a)switch(o){case 1:n>=s?r.push({start:e,end:i}):(r.push({start:e,end:180,Jn:!0}),r.push({start:360,end:i}));break;case 2:r.push({start:e,end:i,Jn:!0});break;case 3:case 4:r.push({start:e,end:180,Jn:!0})}else if(2==a)switch(o){case 1:r.push({start:e,end:180}),r.push({start:360,end:i});break;case 2:n>=s?r.push({start:e,end:i}):(r.push({start:e,end:180}),r.push({start:360,end:i,Jn:!0}));break;case 3:case 4:r.push({start:e,end:180})}else if(3==a)switch(o){case 1:r.push({start:360,end:i});break;case 2:r.push({start:360,end:i,Jn:!0});break;case 3:n>=s&&r.push({start:0,end:180,Jn:!0})}else if(4==a)switch(o){case 1:r.push({start:360,end:i});break;case 2:r.push({start:360,end:i,Jn:!0});break;case 3:r.push({start:360,end:180,Jn:!0});break;case 4:n>=s&&r.push({start:0,end:180,Jn:!0})}return r},U=function(e,i){var n=t.Tm(Math.cos(t.bb(e)),7),s=t.Tm(Math.cos(t.bb(i)),7),a=E(n,Math.sin(t.bb(e))),o=E(s,Math.sin(t.bb(i))),r=[];if(1==a)switch(o){case 1:n<=s&&r.push({start:180,end:360});break;case 3:r.push({start:180,end:i});break;case 4:r.push({start:180,end:i,Jn:!0})}else if(2==a)switch(o){case 1:r.push({start:180,end:360,Jn:!0});break;case 2:n<=s&&r.push({start:180,end:360,Jn:!0});break;case 3:r.push({start:180,end:i});break;case 4:r.push({start:180,end:i,Jn:!0})}else if(3==a)switch(o){case 1:case 2:r.push({start:e,end:360,Jn:!0});break;case 3:n>=s?(r.push({start:e,end:360}),r.push({start:180,end:i})):r.push({start:e,end:i});break;case 4:r.push({start:e,end:i,Jn:!0})}else if(4==a)switch(o){case 1:case 2:r.push({start:e,end:360});break;case 3:r.push({start:e,end:360}),r.push({start:180,end:i});break;case 4:n>=s?(r.push({start:e,end:360}),r.push({start:180,end:i})):r.push({start:e,end:i})}return r},_=function(e,i){var n=e.$();n.select(i);var s=e.Dc,a=e.uc,o=t.nx(e.state,i);if(o=M(e,o)){var r=e.g("mode3d"),l=n.j("start");n=(l+(n=n.j("sweep"))/2)*Math.PI/180,r=(r?.45*o:o)*Math.sin(n),s+=o*Math.cos(n),a+=r}return[s,a]},j=function(t,e){return e<t&&(e+=360),(t+e)/2},M=function(e,i,n){i=i||0;var s=e.$();return 1==s.Hb()?e=0:(n=e.sc("explode",i,s,t.br,!1,void 0,n),e=t.p(n)?t.L(n,e.bg):0),e},N=function(e){var i=e.Ua();e.gc(t.yk()?"mousemove":"touchstart",e.wR),i.Lc()},B=function(t,e,i,n){this.G=n,this.i=i,this.qg=e,this.labels=[],this.y=this.height=0,this.b=[],this.f=t,this.ZH=!1,this.nl=null},R=function(t,e){e&&(t.labels.push(e),t.Nx())},H=function(e,i){var n=t.ln(e.rb());return!t.bn(n,t.ln(i))},z=function(t){for(var e=0,i=t.labels.length;e<i;e++){var n=t.labels[e],s=t.b[3*e],a=t.b[3*e+1],o=t.b[3*e+2],r=n.jc().value;r.angle=s,r.radius=a,r.radiusY=o,m(t.qg,n)}},V=function(t,e){var i=new h(t,e);return i.$c(),i},q=function(t,e){var i=new h(t,e);return i.Ga("pie3d"),i.$c(),i};t.H(s,t.Ez),t.g=s.prototype,t.g.update=function(){this.b.length=this.f.length=0;for(var t=this.ya.cg();t.advance();)if(!t.j("missing")){var e=t.j("start"),i=t.j("sweep"),n=this.ya.b,s=this.ya.j2();this.b.push(this.ya.Vl(),0,0,0),this.f.push(e,i,n,s)}},t.g.Jw=function(){$(this.ya,1e-5,1e-5,v(this.ya))},t.g.en=function(){for(var e=this.ya.cg(),i=0;e.advance();)if(!e.j("missing")){e.j("start",this.coords[i++]),e.j("sweep",this.coords[i++]),e.j("radius",this.coords[i++]),e.j("innerRadius",this.coords[i++]);var n=this.ya,s=e,a=s.j("slice");a.clear();var o=s.j("start"),r=s.j("sweep"),l=s.j("radius"),h=s.j("innerRadius"),c=t.nx(n.state,s.ma());if(c=M(n,c)){var u=o+r/2;a=t.wi(a,n.Dc+c*Math.cos(t.bb(u)),n.uc+c*Math.sin(t.bb(u)),l,h,o,r)}else a=t.wi(a,n.Dc,n.uc,l,h,o,r);(o=s.j("hatchSlice"))&&(n.$().select(s.ma()),o.clear(),o.pe(a.F()),n=d("hatchFill",3,!0)(n,t.nx(n.state,s.ma()),!1,null),o.stroke(null).fill(n))}},t.g.cm=function(){this.en()},t.g.R=function(){s.u.R.call(this),this.ya=null},t.H(a,t.Cr),t.g=a.prototype,t.g.FC=function(){var e=[],i=this.ee.$(),n=void 0,s=void 0;if(this.f)for(;i.advance();){var a=i.get(this.i),o=i.get("name");t.p(o)||(o="Point "+i.ma()),this.f(a)?e.push(i.ma()):n?(n.push(a),s.push(o)):(n=[a],s=[o])}else for(a=0,i=i.Hb();a<i;a++)e.push(a);return n?(this.b.Af(0,(0,t.Gg)(n,this.o,this.D())),this.b.j(0,"names",s),this.b.j(0,"values",n)):(this.b.Af(0,n),this.b.j(0,"names",[]),this.b.j(0,"values",[])),e},t.g.Hb=function(){return t.Dr(this),(this.wo?this.wo.length:this.ee.Hb())+this.b.Hb()},t.g.Ul=function(e){t.Dr(this);var i=this.ee.Hb();return e<i?this.ee.Ul(e):this.b.Ul(e-i)},t.g.Zt=function(){return t.Ga(this.ee.Zt(),this.b)},t.g.Af=function(e,i){t.Dr(this);var n=this.wo?this.wo.length:this.ee.Hb();return e<n?t.Cr.prototype.Af.apply(this,arguments):(e-=n,this.b.Af.apply(this.b,arguments))},t.g.tO=function(e,i,n){var s=this.wo?this.wo.length:this.ee.Hb();if(e>s)throw Error("Index can not be masked by this View");return e>=s?(e-=s,2<arguments.length?(this.b.j.apply(this.b,arguments),this):this.b.j.apply(this.b,arguments)):t.Cr.prototype.tO.apply(this,arguments)},t.H(o,t.Jr),o.prototype.Af=function(t,e){if(!t){var i=this.f;return 1<arguments.length&&(this.f=e),i}},o.prototype.j=function(e,i,n){if(!e)return t.Cr.prototype.j.apply(this,arguments)},o.prototype.Hb=function(){return t.p(this.f)?1:0};var W=o.prototype;W.row=W.Af,W.getRowsCount=W.Hb,t.H(r,t.Ez),r.prototype.update=function(){this.b.length=this.f.length=0,this.b.push(1e-5,1e-5),this.f.push(1,this.i.opacity||1)},r.prototype.en=function(){$(this.ya,this.coords[0],this.coords[1],this.G)},r.prototype.cm=function(){this.en()},r.prototype.R=function(){r.u.R.call(this),this.i=this.ya=null,delete this.G},t.H(l,t.EA),l.prototype.Vl=function(){return this.ya.data().j(this.index,"start")},l.prototype.b=function(){var t=this.ya.data();return t.j(this.index,"start")+(t=t.j(this.index,"sweep"))};var K=l.prototype;K.getStartAngle=K.Vl,K.getEndAngle=K.b,K.hovered=K.lb,t.H(h,t.Bx),t.Gq(h,["fill","stroke","hatchFill","outline"],"normal"),t.Gq(h,["explode"],"selected"),h.prototype.ra=16|t.Bx.prototype.ra,h.prototype.sa=28688|t.Bx.prototype.sa;var Y,X=(Y={},t.sq(Y,[t.Z.dC,t.Z.zz,[0,"radius",function(e){return t.yo(e,"100%")}],[0,"innerRadius",function(e){return t.D(e)?e:t.yo(e)}],[0,"sort",t.Mk],[0,"insideLabelsOffset",t.yo],[0,"connectorLength",function(e){return t.yo(e,"20%")}],[0,"outsideLabelsCriticalAngle",function(e){return t.ab(t.L(e))}],[0,"forceHoverLabels",t.Cq],[1,"connectorStroke",t.Pq],[0,"mode3d",t.Dq],[0,"sliceDrawer",t.gr]]),Y);t.U(h,X),t.g=h.prototype,t.g.Ma=function(){return this.g("mode3d")?"pie-3d":"pie"},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.Ue=function(){return[this]},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}if(this.Xf!==e){if(this.Xf=e,this.i!=e||null===e){if(t.qd(this.Yc),t.J(e,t.Cr)){var s=e;this.Yc=null}else s=t.J(e,t.Mr)?(this.Yc=e).Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd();this.i=s.Ui()}c(this)}return this}return this.P},t.g.dd=function(e){t.X(e,16)&&this.B(13104,17)},t.g.$=function(){return this.sd||(this.sd=this.P.$())},t.g.Ec=function(){return this.sd=this.P.$()},t.g.cg=function(){return this.P.$()},t.g.group=function(e,i){return t.p(e)?(t.D(e)&&e!=this.Uc?(this.Uc=e,this.yo=i||"Grouped point",c(this)):t.cp(e)&&(this.Uc=null,c(this)),this):this.Uc},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)};var J={};t.g=h.prototype,t.g.sc=function(e,i,n,s,a,o,r){var l=!!(i&t.vo),h=!!(i&t.wo);return o=h?this.Ea:l?this.za:this.ca,a=e.split("."),o=(0,t.Gg)(a,(function(t,e){return t[e]()}),o),r?e=o:(r=n.get(h?"selected":l?"hovered":"normal"),r=t.p(r)?(0,t.Gg)(a,(function(t,e){return t?t[e]:t}),r):void 0,e=t.Zo(r,n.get(t.hm(i,e)),o)),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){return t.Yb(this.ve().nc(this.$().ma())||"none")},t.g.Yi=function(){var t=this.$();return{index:t.ma(),sourceHatchFill:this.Eh(),iterator:t}},t.g.Ge=function(e,i){var n,s=this.$();return i||(n=s.get("fill")),{index:s.ma(),sourceColor:t.Ub(e||n||this.cc().nc(s.ma())||"blue"),iterator:s,series:this,chart:this}},t.g.EK=function(e,i){var n=this.$().ma();if(t.z(e)&&"aquastyle"==e)n={aquaStyleObj:this.Sb,sourceColor:this.cc().nc(n)},n=this.Dk.call(n);else if(t.D(e)){var s=1<arguments.length?this.EK.apply(this,t.Ja(arguments,1)):this.cc().nc(n);n={index:n,sourceColor:s,iterator:this.$()},n=e.call(n)}else n=e;return n},t.g.yj=function(){return!this.$().Hb()},t.g.Tp=function(e){return this.f||(this.f=new t.cC(this),t.K(this.f,this.yja,this),t.W(this,"center",this.f)),t.p(e)?(this.f.N(e),this):this.f},t.g.yja=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=16388,n|=1),this.B(i,n)},t.g.labels=function(e){return t.p(e)?(this.ca.labels(e),this):this.ca.labels()},t.g.ek=function(e){this.Za||(this.Za=[]);var i=e.ma();return this.Za[i]||(this.Za[i]=t.mn(this.labels().yl(e))),this.Za[i]},t.g.de=function(e){var i=0,n=0;t.X(e,1)&&(i|=4096,n|=1),t.X(e,8)&&(i|=4100,n|=9),this.B(i,n)},t.g.uja=function(){this.B(20,1)},t.g.Ic=function(e){var i=this.$();return this.oe&&!e||(this.oe=new t.Fw),this.oe.lg(i).Li([this.ce(i.ma()),this]),e={x:{value:i.get("x"),type:"string"},value:{value:i.get("value"),type:"number"},name:{value:i.get("name"),type:"string"},index:{value:i.ma(),type:"number"},chart:{value:this,type:""}},i.j("groupedPoint")&&(e.name={value:i.j("name"),type:"string"},e.groupedPoint={value:!0,type:"string"},e.names={value:i.j("names"),type:""},e.values={value:i.j("values"),type:""}),t.ov(this.oe,e)},t.g.Bh=function(){var e=v(this),i=this.$(),n=i.j("start"),s=i.j("sweep"),a=1==i.Hb()||360==s;i=t.nx(this.state,i.ma()),i=M(this,i),n+=s/2;var o=this.g("mode3d");if(s=this.g("insideLabelsOffset"),o){if(e)a=this.b+this.ea,s=.45*this.b+this.ea,i&&(a+=i,s+=.45*i);else{var r=this.b;e=.45*this.b;var l=this.G;o=.45*this.G,a&&!l?s=a=0:(a=t.L(s,l+r),s=t.uo(s)?t.L(s,o+e):.45*t.L(s,o+e),i&&(a+=i,s+=.45*i))}return{value:{angle:n,radius:a,radiusY:s}}}return{value:{angle:n,radius:e?this.b+this.ea+i:t.L(s,a&&!this.G?0:this.b-this.G)+this.G+i,outerRadius:this.b,innerRadius:this.G}}},t.g.Nx=function(i,n,s,a){var o,r,l,h,c,u,d=null,p=this.$(),g=[],f=n?t.va:t.Pe;for(f(i,(function(t){t&&0!=t.enabled()&&(p.select(t.ma()),t.Hf(this.Ic()),C=this.ek(t),!d||H(d,C)?(d&&g.push(d),(d=new B(n,this,g,a||0)).iC(t)):d.iC(t))}),this),d&&g.push(d),i=0,o=g.length;i<o;i++)(d=g[i])&&d.fp&&(r||(r=[]),r=t.Ga(r,d.fp));d=null,r&&(t.Pa(r,(function(t,e){return t.ma()>e.ma()?1:t.ma()<e.ma()?-1:0})),f(r,(function(t){if(t){for(p.select(t.ma()),t.Hf(this.Ic()),C=this.ek(t),l=!0,h=0,c=g.length;h<c;h++)l=l&&H(g[h],C);if(l){for(d||(d=new B(n,this,[],a||0)),R(d,t),u=d.rb(),l=!0,h=0;h<c;h++)l=l&&H(g[h],u);d.ZH||!l?(d.labels.pop().enabled(!1),d.Nx(),g.push(d),d=null):t.enabled(!0)}else d&&(g.push(d),d=null)}}),this),d&&g.push(d));var b,v,y=this.g("mode3d"),S=this.g("connectorStroke");for(i=0,o=g.length;i<o;i++)if(d=g[i]){z(d);var w=0;for(b=d.labels.length;w<b;w++)if((r=d.labels[w])&&0!=r.enabled()){m(this,r),f=r.ma(),p.select(f);var C=this.ek(r);if(s){var D=this.$a[2*f],T=this.$a[2*f+1],k=p.j("connector"),$=r.jc().value,O=$.angle;O=t.bb(O),$=$.radius;var P=this.Dc+$*Math.cos(O)-k,L=this.uc+$*Math.sin(O),G=0;for(v=s.length;G<v;G++){O=s[G],m(this,O);var F=this.ek(O),I=O.ma(),E=_(this,I),A=E[0],U=E[1],j=p.j("start"),M=p.j("sweep");E=this.$a[2*I],I=this.$a[2*I+1],k=p.j("connector"),$=O.jc().value,O=$.angle,O=t.bb(O),$=$.radius,k=this.Dc+$*Math.cos(O)-k,$=this.uc+$*Math.sin(O),O=t.bb(j);var N=A+this.G*Math.cos(O),V=U+this.G*Math.sin(O),q=A+this.b*Math.cos(O),W=U+this.b*Math.sin(O);if(O=t.bb(j+M),j=A+this.G*Math.cos(O),M=U+this.G*Math.sin(O),A+=this.b*Math.cos(O),U+=this.b*Math.sin(O),O=t.ln(C),t.bn(O,t.ln(F))||e(N,V,q,W,O)||e(j,M,A,U,O)||e(E,I,k,$,O)||t.en(D,T,P,L,N,V,q,W)||t.en(D,T,P,L,j,M,A,U)||t.en(E,I,k,$,D,T,P,L)||t.bn(O,[q,W,N,V])||t.bn(O,[A,U,j,M])){r.enabled(!1);break}}}0!=r.enabled()&&((this.yg||this.nf)&&(G=a?this.kg:this.me,(G=Math.max(G.left-C.left,C.cb()-G.cb(),G.top-C.top,C.Va()-G.Va()))>this.Ka&&(this.dn=f),this.Ka=Math.max(this.Ka,G)),this.aa[f]||(G=this.$a[2*f+1]-.2*this.b/2,G=y&&G<this.uc?t.eC(this.ec):t.eC(this.ba),this.aa[f]=G,G.stroke(S),x(this,r,G)))}}},t.g.Mm=function(e){this.bg=Math.min(e.width,e.height);var i=M(this,t.gm,!0),n=M(this,t.vo,!0),s=M(this,t.wo,!0),a=Math.max(i,n||0,s||0),o=this.$();for(o.reset();o.advance();)i=M(this,t.gm),n=M(this,t.vo),s=M(this,t.wo),a=Math.max(i,n||0,s||0,a);i=this.ca.labels().enabled()||this.za.labels().enabled()||this.Ea.labels().enabled(),a=v(this)&&i?a:0,this.me=t.kn(e.left+a,e.top+a,e.width-2*a,e.height-2*a),i=this.bg-2*a,n=Math.max(t.L(this.g("radius"),i),0),this.g("mode3d")?this.b=Math.min(Math.min(n,(e.width-2*a)/2),(e.height-2*a)/1.3):this.b=Math.min(i/2,n),this.ea=t.L(this.g("connectorLength"),this.b),this.Ap=this.b,this.Ka=0,this.Dc=this.me.left+this.me.width/2,this.uc=this.me.top+this.me.height/2,i=t.bb(-145),a=.5*(n=Math.min(e.width,e.height)/2)*Math.cos(i)/e.width+.5,i=.5*n*Math.sin(i)/e.height+.5,0>e.width&&(e.width=0),0>e.height&&(e.height=0),this.Sb.fx=!(0,window.isNaN)(a)&&(0,window.isFinite)(a)?a:0,this.Sb.fy=!(0,window.isNaN)(i)&&(0,window.isFinite)(i)?i:0,this.Sb.mode=e,S(this)},t.g.pb=function(){if(this.J(8192)){this.hJ();for(var t,e=this.data().$(),i=0,n=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=0;e.advance();)t=e.get("value"),b(t)?i++:(t=+t,n=Math.min(t,n),s=Math.max(t,s),a+=t);var o;(e=e.Hb()-i)?o=a/e:n=s=a=o=void 0,this.La("count",e),this.La("min",n),this.La("max",s),this.La("sum",a),this.La("average",o),this.I(8192)}},t.g.pv=function(){this.Fa&&t.J(this.Fa,t.Ms)&&t.Ns(this.Fa,this.$().Hb())},t.g.kK=function(){var e=this.f.gi.rb();t.nb(e,this.Ba)||w(this,e)},t.g.kL=function(){this.B(4,1)},t.g.Qh=function(e){this.pb(),t.Yu(this.labels());var i=this.$();i.Hb();var n=this.g("mode3d"),s=this.Tp();if(this.J(16384)&&(s&&s.ak&&(this.f.eG(),this.f.ak.parent(this.Na),this.f.ak.zIndex(25),this.f.ak&&(t.J(this.f.gi,t.ig)?this.f.ak.Ja().wa("renderfinish",this.kK,!1,this):t.J(this.f.gi,t.Y)&&this.f.ak.wa("chartdraw",this.kL,!1,this))),this.I(16384)),this.J(4)&&(this.nf=!0,this.Mm(e),this.B(4112)),this.J(16)){this.yg=!0;var a=this.Vl(),o=0;for(i.reset();i.advance();)if(o=i.get("value"),b(o))i.j("missing",!0);else{o=(o=+o)/this.Rg("sum")*360;var r=i.get("state");r="selected"==r?t.wo:"hovered"==r?t.vo:"normal"==r?t.gm:window.NaN,(0,window.isNaN)(r)||this.state.Lh(r,i.ma()),i.j("start",a).j("sweep",o).j("explode",M(this,r)),a+=o}}if(this.J(4096)){if(this.labels().O()||this.labels().O(this.Na),this.labels().clear(),this.qc&&(this.qc.length=0),this.Hd&&(this.Hd.length=0),this.ba&&(this.ba.clear(),n&&this.ec.clear()),this.labels().enabled()){var l=v(this)?"outsideLabels":"insideLabels";if(a=t.wr(this,l,!0,(function(){var e=new t.V;return t.rd(this,e),t.W(this,l,e),e})).oa,this.labels().Kq(a.autoColor),this.labels().disablePointerEvents(a.disablePointerEvents),v(this)){if((this.yg||this.nf)&&(this.b=this.Ap,this.Ka=Number.NEGATIVE_INFINITY),y(this),this.yg||this.nf){for(a=5;this.Ka&&(0,window.isFinite)(this.Ka)&&a&&10<Math.abs(this.Ka);)S(this),this.Ka=Number.NEGATIVE_INFINITY,this.labels().clear(),this.ba&&(this.ba.clear(),n&&this.ec.clear()),y(this),a--;this.B(4)}}else for(i.reset();i.advance();)b(i.get("value"))||(a=t.nx(this.state,i.ma()),this.ke(a,!!(a&t.vo)))}this.labels().W(),this.labels().Vd().clip(e),this.B(16),this.I(4096)}if(this.J(16)){for(e=this.ca.xt().g("offset")||this.ca.xt().g("width")||this.za.xt().g("offset")||this.za.xt().g("width")||this.Ea.xt().g("offset")||this.Ea.xt().g("width"),this.Od?this.Od.clear():e&&(this.Od=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.Od.zIndex(30),this.Od.parent(this.Na)),this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ue.zIndex(30),this.ue.parent(this.Na)),this.o?this.o.clear():(this.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.o.parent(this.Na),this.o.zIndex(31).Dd(!0)),n&&(this.D.length=0),i.reset();i.advance();)b(i.get("value"))||(a=t.nx(this.state,i.ma()),n?O(this):C(this,a));if(n&&P(this),i=this.g("connectorStroke"),this.aa)for(n=0;n<this.aa.length;n++)(e=this.aa[n])&&e.stroke(i);this.G?(n=this.f.g("fill"),e=this.f.g("stroke"),this.Ha||(this.Ha=t.nk()),a=this.G-t.$b(e)/2,this.Ha.parent(this.Na).zIndex(20).stroke(e).fill(n).Eb(a)):this.Ha&&this.Ha.parent(null),this.ud&&this.ud.stroke(i),this.I(16)}this.J(4)&&s&&(i=s.gi,s=s.ak,t.J(i,t.ig)?(i=i.rb(),w(this,i),s.clip(null)):t.J(i,t.Y)&&(i.ja(this.na),i.da(!1),i.W(),s.oc(1,0,0,1,0,0),s.clip(t.nk(this.Dc,this.uc,this.G+2))),this.Ha&&this.G&&this.Ha.To(this.Dc).Uo(this.uc)),this.nf=!1},t.g.ke=function(n,s){if(v(this)){var a=n,o=this.$(),r=(a=t.em(a))==t.vo,l=a==t.wo,h=this.labels(),c=l?this.Ea.labels():r?this.za.labels():null,u=o.get("normal");u=t.p(u)?u.label:void 0;var d=l?o.get("selected"):r?o.get("hovered"):void 0;d=t.p(d)?d.label:void 0,u=t.Zo(u,o.get("label")),d=l?t.Zo(d,o.get("selectLabel")):r?t.Zo(d,o.get("hoverLabel")):null;var p=o.ma();a=h.be(p);var g,f=u&&t.p(u.enabled)?u.enabled:null,b=d&&t.p(d.enabled)?d.enabled:null;return r=r||l?null===b?null===c.enabled()?null===f?a&&t.p(a.enabled())?a.enabled():h.enabled():f:c.enabled():b:null===f?a&&t.p(a.enabled())?a.enabled():h.enabled():f,f=this.Ic(!0),b=this.Bh(),r?((l=!a)&&(a=h.add(f,b,p)),h=a.enabled(),a.Hi(),t.$u(a,c),a.td(u,d),a.enabled(h),o=o.j("anchor"),t.p(o)&&a.anchor(o),l||a.W()):a?(h=a.enabled(),a.clear(),a.enabled(h)):(a=h.add(f,b,p),o=o.j("anchor"),t.p(o)&&a.anchor(o),a.enabled(!1)),s&&(o=a)&&this.aa&&(c=o.ma(),(g=this.aa[c])?o&&0!=o.enabled()&&r?x(this,o,g):g.clear():r?x(this,o,this.ud):this.ud.clear()),a}g=(n=t.em(n))==t.vo,b=n==t.wo;var m=this.$();a=this.labels(),o=b?this.Ea.labels():g?this.za.labels():null,c=m.get("normal"),c=t.p(c)?c.label:void 0,u=b?m.get("selected"):g?m.get("hovered"):void 0,u=t.p(u)?u.label:void 0,c=t.Zo(c,m.get("label")),u=b?t.Zo(u,m.get("selectLabel")):g?t.Zo(u,m.get("hoverLabel")):null,d=m.ma(),h=a.be(d),p=c&&t.p(c.enabled)?c.enabled:null,r=u&&t.p(u.enabled)?u.enabled:null,l=this.Bh(),f=this.Ic(!0);var y=this.g("mode3d"),S=!0;if((!(b=g||b)||b&&!this.g("forceHoverLabels"))&&"allow-overlap"!=this.g("overlapMode")){var w=m.j("start"),C=m.j("sweep");S=this.Dc;var D=this.uc,T=M(this,n);if(T){var k=(w+C/2)*Math.PI/180,$=(y?.45*T:T)*Math.sin(k);S+=T*Math.cos(k),D+=$}k=w*Math.PI/180,T=S+this.b*Math.cos(k),$=D+(y?.45*this.b:this.b)*Math.sin(k),k=(w+C)*Math.PI/180,w=S+this.b*Math.cos(k),k=D+(y?.45*this.b:this.b)*Math.sin(k),this.sb?this.sb.clear():this.sb=new t.$x,this.sb.Hf(f),this.sb.jc(l),this.sb.Hi(),t.Zu(this.sb,this.labels()),t.$u(this.sb,a),this.sb.td(c,u),y=this.labels().yl(this.sb,null,null,d),C=(m=(1==m.Hb()||360==C)&&!this.G)||!e(S,D,w,k,y),k=!i(S,D,this.b,y),w=m||i(S,D,this.G,y),S=(m||!e(T,$,S,D,y))&&C&&k&&w}return(b?null===r?null===o.enabled()?null===p?a.enabled():p:o.enabled():r:null===p?a.enabled():p)&&S?(h?(h.Hf(f),h.jc(l)):h=a.add(f,l,d),h.Hi(),t.$u(h,o),h.td(c,u),g&&!h.O()&&a.Vd()&&(h.O(a.Vd()),h.O().parent()||h.O().parent(a.O()))):h&&a.clear(h.ma()),h},t.g.UL=function(){if(!this.g("mode3d")&&this.mC().g("enabled")&&0<this.mC().g("duration"))if(this.Og&&1==this.Og.dc)this.Og.update();else if(this.J(2048)){t.qd(this.Og),this.Og=new t.bC;var e=this.mC().g("duration"),i=e*(1-.85);e=new s(this,.85*e),i=new r(this,i),this.Og.add(e),this.Og.add(i),this.Og.wa("begin",(function(){this.bj=this.g("connectorStroke"),this.ta("connectorStroke","none"),t.vx(this,!0),t.Dp(this,{type:"animationstart",chart:this})}),!1,this),this.Og.wa("end",(function(){this.ta("connectorStroke",this.bj),t.vx(this,!1),t.Dp(this,{type:"animationend",chart:this})}),!1,this),this.Og.play(!1)}},t.g.Zz=function(e,i){var n=this.$(),s="hatch"+String(e.charAt(0)).toUpperCase()+e.substr(1);if(i){var a=n.j(e),o=n.j(s);a&&a.clear(),o&&o.clear()}else a=t.eC(this.ue),n.j(e,a),o=t.eC(this.ue),n.j(s,o);return a},t.g.ZT=function(){return[this.Dc,this.uc]},t.g.L1=function(){return this.na},t.g.yba=function(){return this.b},t.g.j2=function(){return this.G},t.g.Jfa=function(t){return M(this,t)},t.g.Vl=function(){return this.g("startAngle")+-90},t.g.ce=function(t){var e,i=new l(this,t);return this.$().select(t)&&i.iy()&&!b(e=i.get("value"))&&(t=e/this.Rg("sum")*100,i.La("percentValue",t),i.La("yPercentOfTotal",t)),i},t.g.Ol=function(e,i){var n=[],s=this.$().reset(),a="aquastyle"==this.ca.g("fill");if(a){var o=this.Sb;this.Sb={}}for(;s.advance();){var r=s.ma(),l=s.get("legendItem")||{},h=null;t.D(i)&&(h=this.Ic(),h=i.call(h,h),t.ea(h)&&(h=String(h))),t.z(h)||(h=s.j("groupedPoint")?s.j("name"):String(t.p(s.get("name"))?s.get("name"):s.get("x")));var c=this.g("mode3d"),u=d("fill",1,!1),p=d("stroke",2,!1),g=d("hatchFill",3,!1);h={enabled:!0,meta:{pointIndex:r,pointValue:s.get("value")},iconType:"square",text:h,iconStroke:c?t.Ql(F(this,t.gm),.2):p(this,t.gm,!1,null),iconFill:c?F(this,t.gm):u(this,t.gm,!1,null),iconHatchFill:g(this,t.gm,!1,null)},t.Sc(h,l),h.sourceUid=t.oa(this),h.sourceKey=r,n.push(h)}return a&&(this.Sb=o),n},t.g.Ms=function(){return!0},t.g.zr=function(t){t=t.Ki(),this.data().$().select(t)&&this.select(t)},t.g.wq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.vq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.oq=function(){return[]},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget).index;if(!t.p(i)&&t.mx(this.state,t.vo)){var n=t.sx(this.state,t.vo);n.length&&(i=n[0])}return i=t.N(i),(0,window.isNaN)(i)||(e.pointIndex=e.sliceIndex=i),e},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i;if("pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),(0,window.isNaN)(i))return null;e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,pie:this,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(e){var i;(i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()&&(t.p(e)?this.state.Vh(t.vo,e):this.state.Vh(t.vo,!0),N(this))},t.g.$i=function(e,i){if(!this.enabled())return this;if(t.A(e))for(var n=t.sx(this.state,t.vo),s=0;s<n.length;s++)t.Aa(e,n[s])||this.state.Vh(t.vo,n[s]);return t.qx(this.state,e),t.p(i)&&this.wR(i),this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo,!0)},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.ej=function(e){return t.p(e)?((e=t.Bk(e))!=this.fh&&(this.fh=e),this):this.fh},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.Gu=function(){N(this),this.state.Lh(t.wo,!0)},t.g.Ii=function(e,i){var n=i&&i.shiftKey?void 0:i?t.vo:t.gm;return t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,n)):t.ea(e)&&this.state.Lh(t.wo,e,n),this},t.g.ie=function(e){t.p(e)?this.state.Vh(t.wo,e):this.state.Vh(t.wo,!0)},t.g.pk=function(t,e){var i=this.$(),n=i.j("explode");return this.g("mode3d")?(O(this),P(this,i.ma(),!0)):C(this,t,!0),b(i.get("value"))||this.ke(t),e||n!=M(this,t)},t.g.wm=function(t){var e=this.$(),i=e.j("sweep"),n=e.get("value"),s=e.ma();1==e.Hb()||360==i||b(n)&&s!=e.Hb()||(t=!!t,i=v(this),t||i?i?(this.yg=!1,this.labels().ka(),this.labels().clear(),y(this),this.labels().W(),this.labels().da(!1)):(this.labels().clear(),e.select(s)):this.labels().W())},t.g.ml=t.ia,t.g.pq=t.ia,t.g.xL=function(){var e=new t.ww(0);return e.ya(this),t.Aw(e,this),t.K(e,this.Bp,this),t.W(this,"tooltip",e),e},t.g.Bp=function(){this.Ua().W()},t.g.wR=function(e){var i=t.wr(this,"legend");if(!e||!i||e.target!=i){i=this.Ua();var n=this.Ic();e&&(i.ka(),t.Ow(i,e.clientX,e.clientY,n),i.da(!1),this.wa(t.yk()?"mousemove":"touchstart",this.wR))}},t.g.Rk=function(){return this.Ic()},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.F=function(){var e=h.u.F.call(this);return e.data=this.data().F(),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),t.wr(this,"tooltip")&&(e.tooltip=this.Ua().F()),this.Tp()&&(e.center=this.Tp().F()),t.Tq(this,X,e,"Pie"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),{chart:e}},t.g.U=function(e,i){h.u.U.call(this,e,i),t.Iq(this,X,e,i),this.group(e.group),this.data(e.data),"center"in e&&this.Tp().ga(!!i,e.center),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip),"normal"in e&&this.Qa().ga(!!i,e.normal),"hovered"in e&&this.lb().ga(!!i,e.hovered),"selected"in e&&this.selected().ga(!!i,e.selected),"hatchFillPalette"in e&&this.ve().ga(!!i,e.hatchFillPalette),"palette"in e&&this.cc(e.palette)},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.R=function(){t.sd(this.Og,this.ca,this.za,this.Ea,this.f,this.Yc,this.i,this.P,this.Fa,this.fd),this.P=this.i=this.Yc=this.f=this.Ea=this.za=this.ca=this.Og=null,delete this.sd,this.fd=this.Fa=null,h.u.R.call(this)},t.g=B.prototype,t.g.iC=function(t){t&&(this.labels.push(t),this.pb())},t.g.rb=function(){if(!this.nl){var e=this.labels[0]?this.qg.ek(this.labels[0]).height:0;this.nl=new t.I(this.x,this.y+e/2,this.width,this.height)}return this.nl},t.g.ae=function(){this.nl=null},t.g.Nx=function(){var e=this.height=0;this.ae();var i=this.G,n=this.qg.Tp(),s=n?n.ce():this.qg.ZT(),a=this.qg.b+i;n=s.x,s=s.y;var o=this.qg.g("mode3d");if(o)var r=s+.45*a+this.qg.ea-.1+.2*this.qg.b/2,l=s-(.45*a+this.qg.ea)+.1-.2*this.qg.b/2;else r=s+a+this.qg.ea-.1,l=s-(a+this.qg.ea)+.1;for(var h=0,c=this.labels.length;h<c;h++){var u=this.labels[h];e+=(a=this.qg.ek(u)).top-this.height-a.height/2,this.height+=a.height}for(this.y=e/c,(e=this.y+this.height)>r&&(e=r,this.y=r-this.height),0!=this.labels.length&&(a=this.qg.ek(this.labels[0]).height,this.y+a<l&&(e=l-a+this.height,this.y=l-a)),r=this.qg.g("outsideLabelsCriticalAngle"),this.b.length=0,l=this.qg.data().$(),this.width=this.x=window.NaN,this.K=null,this.o=this.D=window.NaN,this.ZH=!1,h=0,c=this.labels.length;h<c;h++){u=this.labels[h],a=this.qg.ek(u);var d=h==c-1?0:this.qg.ek(this.labels[h+1]).height,p=u.ma();l.select(p);var g=l.j("start"),f=l.j("sweep");(p=t.p(u.g("offsetX"))?u.g("offsetX"):this.qg.labels().g("offsetX"))||(p=0),p=t.L(p,360);var b=t.p(u.g("offsetY"))?u.g("offsetY"):this.qg.labels().g("offsetY");b||(b=0),u=t.L(b,this.qg.b);var v=t.bb(g+f/2+p);f=this.f?5:-5;var m=this.qg.b+i,y=this.qg.b+this.qg.ea+i+u;if(o)var S=.45*(this.qg.b+i),w=.45*(this.qg.b+i+u)+this.qg.ea;else S=m,w=y;g=e;var x=m+this.qg.ea,C=S+this.qg.ea;Math.abs(g-s)>C&&(C=Math.abs(g-s)),C=x*Math.sqrt(Math.pow(C,2)-Math.pow(g-s,2))/C,x=n+(this.f?1:-1)*Math.abs(C),m=n+m*Math.cos(v),S=s+S*Math.sin(v);var D=n+y*Math.cos(v);if(v=s+w*Math.sin(v),w=Math.floor(t.gn(x,g,n,s))+b,y=0>C||w>y,(b=Math.abs(t.Bb(x-m,g-S,D-m,v-S)))>this.o||(0,window.isNaN)(this.o)||y){for(this.o=0>C?Number.POSITIVE_INFINITY:b,C=window.Infinity,w=v=0;w<this.labels.length;w++)l.select(this.labels[w].ma()),m=l.get("value"),(0,window.isNaN)(+m)||(m=+m),m<C&&(C=m,v=w);this.K=this.labels[v],this.D=v}(b>r||y)&&(this.ZH=!0),f=x+f,x=this.f?f:f-a.width,this.x=(0,window.isNaN)(this.x)||this.x>x?x:this.x,x=this.f?f+a.width:f,this.width=(0,window.isNaN)(this.width)||this.width<x?x:this.width,f-=n,g-=s,o&&(g+=.2*this.qg.b/2),x=Math.sqrt(Math.pow(f,2)+Math.pow(g,2))-u,u=Math.sqrt(Math.pow(f,2)+Math.pow(g,2))-u,y=window.NaN,0<f&&0<=g?y=t.cb(Math.atan(g/f)):0<f&&0>g?y=t.cb(Math.atan(g/f))+360:0>f?y=t.cb(Math.atan(g/f))+180:!f&&0<g?y=90:!f&&0>g&&(y=270),y-=p,this.b.push(y,x,u),e-=a.height/2+d/2}this.width-=this.x},t.g.pb=function(){if(this.Nx(),this.ZH){var e=this.K,i=this.D;(0,window.isNaN)(i)||(e.enabled(!1),this.fp||(this.fp=[]),this.fp.push(e),t.Ca(this.labels,i,1));var n=this.qg;e=this.labels;var s,a,o=this.i,r=o[o.length-1];if(r!=this){var l=null;i=e.slice();var h=o.length,c=!1,u=0;for(s=e.length;u<s;u++)if(a=e[u]){var d=n.ek(a);!r||H(r,d)?!l||H(l,d)?(l&&(o.push(l),r=l),d="left-center"==a.anchor(),l=new B(d,n,o,this.G),R(l,a)):(R(l,a),n.ZH?(a.enabled(!1),l.fp||(l.fp=[]),l.fp.push(a),l.labels.pop(),l.Nx()):r&&l&&!H(r,l.rb())&&(o.pop(),l.labels=t.Ga(r.labels,l.labels),r=null,l.Nx(),c=!0)):(a.enabled(!1),l&&(l.fp||(l.fp=[]),l.fp.push(a)))}if(l)if(0<o.length-h||c)this.labels=l.labels;else{if((n=l).fp){for(o=0,u=n.fp.length;o<u;o++)n.fp[o].enabled(!0);n.fp.length=0}i.length!=e.length&&(this.labels=i)}}this.pb()}else if((e=this.i[this.i.length-1])&&(i=e.rb()),i&&!H(this,i)){for(this.i.pop(),this.labels=t.Ga(e.labels,this.labels),e=0,i=this.labels.length;e<i;e++)this.labels[e].enabled(!0);this.pb()}};var Z=h.prototype;Z.center=Z.Tp,Z.group=Z.group,Z.data=Z.data,Z.labels=Z.labels,Z.getPixelRadius=Z.yba,Z.getPixelInnerRadius=Z.j2,Z.getPixelExplode=Z.Jfa,Z.palette=Z.cc,Z.tooltip=Z.Ua,Z.hatchFillPalette=Z.ve,Z.getType=Z.Ma,Z.getPoint=Z.ce,Z.toCsv=Z.Zj,Z.hover=Z.Tj,Z.unhover=Z.Md,Z.select=Z.select,Z.unselect=Z.ie,Z.normal=Z.Qa,Z.hovered=Z.lb,Z.selected=Z.selected,t.Tp.pie=V,t.Tp["pie-3d"]=q,t.E("anychart.pie",V),t.E("anychart.pie3d",q)}.call(this,$)),_.cartesian||(_.cartesian=1,function(t){var e=function(e,i,n){var s=["whiskerWidth","hoverWhiskerWidth","selectWhiskerWidth"];if(2==n)var a=e.Ea,o="selected";else 1==n?(a=e.za,o="hovered"):(a=e.ca,o="normal");return o=i.get(o),null!=(i=t.Zo(t.p(o)?o[s[0]]:void 0,i.get(s[n]),a.g(s[0])))||(i=e.ca.g(s[0])),t.L(i,e.yu)},i=function(e){t.JA.call(this,e)},n=function(){t.WB.call(this),this.Ga("cartesian"),t.T(this.ua,[["categorizedBySeries",327680,1]]),this.re="cartesian"},s=function(){var t=new n;return t.ta("defaultSeriesType","line"),t.$c(),t.Wg(),t},a=function(t){var e=new n;e.Ga("area"),e.ta("defaultSeriesType","area"),e.re="area",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.area(arguments[i]);return e},o=function(t){var e=new n;e.Ga("bar"),e.ta("defaultSeriesType","bar"),e.re="bar",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.bar(arguments[i]);return e},r=function(t){var e=new n;e.Ga("box"),e.ta("defaultSeriesType","box"),e.re="box",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.box(arguments[i]);return e},l=function(t){var e=new n;e.Ga("column"),e.ta("defaultSeriesType","column"),e.re="column",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.column(arguments[i]);return e},h=function(t){var e=new n;e.Ga("column"),e.ta("defaultSeriesType","hilo"),e.re="hilo",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.hilo(arguments[i]);return e},c=function(e){t.kl(405,null,["anychart.financial()","anychart.ohlc() or anychart.candlestick()"],!0);var i=new n;i.Ga("financial"),i.ta("defaultSeriesType","candlestick"),i.re="financial",i.Wg(),i.$c();for(var s=0,a=arguments.length;s<a;s++)i.candlestick(arguments[s]);return i},u=function(t){var e=new n;e.Ga("line"),e.ta("defaultSeriesType","line"),e.re="line",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.line(arguments[i]);return e},d=function(t){var e=new n;e.Ga("verticalArea"),e.ta("defaultSeriesType","area"),e.re="vertical-area",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.area(arguments[i]);return e},p=function(t){var e=new n;e.Ga("verticalLine"),e.ta("defaultSeriesType","line"),e.re="vertical-line",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.line(arguments[i]);return e},g=function(t){var e=new n;e.Ga("line","stick"),e.ta("defaultSeriesType","stick"),e.re="stick",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.stick(arguments[i]);return e},f=function(e){var i=new n;i.Ga("line","jumpLine"),i.ta("defaultSeriesType","jump-line"),i.re="jump-line",i.Wg(),i.$c();for(var s=t.pm("jump-line"),a=0,o=arguments.length;a<o;a++)i[s](arguments[a]);return i},b=function(e){var i=new n;i.Ga("line","stepLine"),i.ta("defaultSeriesType","step-line"),i.re="step-line",i.Wg(),i.$c();for(var s=t.pm("step-line"),a=0,o=arguments.length;a<o;a++)i[s](arguments[a]);return i},v=function(t){var e=new n;e.Ga("financial","ohlc"),e.ta("defaultSeriesType","ohlc"),e.re="ohlc",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.ohlc(arguments[i]);return e},m=function(t){var e=new n;e.Ga("financial","candlestick"),e.ta("defaultSeriesType","candlestick"),e.re="candlestick",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.candlestick(arguments[i]);return e};t.wA.prototype.yD=t.ca(25,(function(){return this.qf.length})),t.wA.prototype.wD=t.ca(24,(function(){return this.b.length})),t.IP={name:"median",Qb:"path",Yb:null,Zb:"medianStroke",ac:!0,Ib:!1,zIndex:2e-6},t.JP={name:"stem",Qb:"path",Yb:null,Zb:"stemStroke",ac:!0,Ib:!1,zIndex:2e-6},t.KP={name:"whisker",Qb:"path",Yb:null,Zb:"whiskerStroke",ac:!0,Ib:!1,zIndex:2e-6},t.H(i,t.JA),t.PG[3]=i,t.g=i.prototype,t.g.type=3,t.g.flags=263936,t.g.Kh={path:"path",hatchFill:"path",median:"path",stem:"path",whisker:"path"},t.g.Np=["lowest","q1","median","q3","highest"],t.g.ug=function(i,n){var s=this.bd.ed(n),a=i.j("x"),o=i.j("lowest"),r=i.j("q1"),l=i.j("median"),h=i.j("q3"),c=i.j("highest"),u=e(this.X,i,n)/2,d=this.o/2,p=s.path;t.HA(p,this.xa,a-d,r),t.IA(p,this.xa,a+d,r,a+d,h,a-d,h),p.close(),p=s.hatchFill,t.HA(p,this.xa,a-d,r),t.IA(p,this.xa,a+d,r,a+d,h,a-d,h),p.close(),p=s.median,t.HA(p,this.xa,a-d,l),t.IA(p,this.xa,a+d,l),p=s.stem,t.HA(p,this.xa,a,o),t.IA(p,this.xa,a,r),t.HA(p,this.xa,a,h),t.IA(p,this.xa,a,c),p=s.whisker,t.HA(p,this.xa,a-u,o),t.IA(p,this.xa,a+u,o),t.HA(p,this.xa,a-u,c),t.IA(p,this.xa,a+u,c)},t.g.WB=function(i,n){var s=i.j("shapes");if(s){var a=i.j("x"),o=i.j("lowest"),r=i.j("highest"),l=e(this.X,i,n)/2;(s=s.whisker).clear(),t.HA(s,this.xa,a-l,o),t.IA(s,this.xa,a+l,o),t.HA(s,this.xa,a-l,r),t.IA(s,this.xa,a+l,r)}},t.H(n,t.WB);var y={},S=7864320|t.QG;y.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y.bar={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y.box={Fb:3,Kb:2,Lb:[t.RH,t.qH,t.IP,t.JP,t.KP],Ob:null,Jb:null,Cb:S,Ab:"highest",zb:"lowest"},y.bubble={Fb:4,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.candlestick={Fb:5,Kb:2,Lb:[t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y.column={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y["jump-line"]={Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:3670016|t.QG,Ab:"value",zb:"value"},y.ohlc={Fb:10,Kb:2,Lb:[t.BH,t.GH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-area"]={Fb:11,Kb:1,Lb:[t.nH,t.QH,t.MH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-bar"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-column"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-spline-area"]={Fb:13,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-step-area"]={Fb:14,Kb:1,Lb:[t.nH,t.qH,t.MH,t.QH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y.spline={Fb:15,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y["spline-area"]={Fb:16,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y["step-area"]={Fb:17,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y["step-line"]={Fb:18,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.stick={Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y.hilo={Fb:31,Kb:2,Lb:[t.oH,t.MH,t.QH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},n.prototype.fj=y,t.Nz(n,n.prototype.fj),n.prototype.xN=function(t){var e=t.enabled(),i=t.vm||[],n=!0;return(t=t.data()?t.data().Hb():0)&&t!=i.length||(n=!1),e&&n},n.prototype.UR=function(e,i,s,a){if(this.g("categorizedBySeries")){a=i.length;var o=[],r={};for(s=0;s<a;s++){var l=i[s].X.name();o.push(l),r[l=t.qo(l)]=s}e.XB=r,e.ih=o}else n.u.UR.call(this,e,i,s,a)},n.prototype.DT=function(t,e){this.g("categorizedBySeries")||n.u.DT.call(this,t,e)};var w={};t.sq(w,[[0,"categorizedBySeries",t.Dq]]),t.U(n,w),n.prototype.F=function(){var e=n.u.F.call(this);return t.Tq(this,w,e.chart),e},n.prototype.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,w,e)},t.Tp.cartesian=s;var x=n.prototype;t.E("anychart.cartesian",s),x.xScale=x.Ra,x.yScale=x.bb,x.crosshair=x.mh,x.xGrid=x.lm,x.yGrid=x.nm,x.xMinorGrid=x.Qr,x.yMinorGrid=x.Tr,x.xAxis=x.$h,x.getXAxesCount=x.wD,x.yAxis=x.ij,x.getYAxesCount=x.yD,x.getSeries=x.ef,x.lineMarker=x.Ym,x.rangeMarker=x.gn,x.textMarker=x.mn,x.palette=x.cc,x.markerPalette=x.Nf,x.hatchFillPalette=x.ve,x.getType=x.Ma,x.addSeries=x.kl,x.getSeriesAt=x.Ai,x.getSeriesCount=x.tj,x.removeSeries=x.Ao,x.removeSeriesAt=x.Rn,x.removeAllSeries=x.Dp,x.getPlotBounds=x.dg,x.xZoom=x.Tq,x.yZoom=x.Uq,x.xScroller=x.Mp,x.yScroller=x.Ur,x.getStat=x.Rg,x.annotations=x.Nk,x.getXScales=x.vy,x.getYScales=x.xy,t.Tp.area=a,t.Tp.bar=o,t.Tp.box=r,t.Tp.column=l,t.Tp.hilo=h,t.Tp.financial=c,t.Tp.line=u,t.Tp["vertical-area"]=d,t.Tp["vertical-line"]=p,t.Tp.stick=g,t.Tp["jump-line"]=f,t.Tp["step-line"]=b,t.Tp.ohlc=v,t.Tp.candlestick=m,t.E("anychart.area",a),t.E("anychart.bar",o),t.E("anychart.vertical",o),t.E("anychart.box",r),t.E("anychart.column",l),t.E("anychart.hilo",h),t.E("anychart.financial",c),t.E("anychart.ohlc",v),t.E("anychart.candlestick",m),t.E("anychart.stick",g),t.E("anychart.jumpLine",f),t.E("anychart.stepLine",b),t.E("anychart.line",u),t.E("anychart.verticalArea",d),t.E("anychart.verticalLine",p)}.call(this,$)),_.mekko||(_.mekko=1,function(t){var e=function(e,i){e.WR&&t.Rt(e,i)},i=function(e,i,n,s,a,o){t.xB.call(this,e,i,n,s,a),this.nv=o},n=function(e,i){t.wA.call(this,!0),this.Ga("mekko"),this.tw=this.Pv=null,this.zla=!!e,this.nv=!!i,this.ta("defaultSeriesType","mekko"),t.T(this.ua,[["pointsPadding",4294967295,1]])},s=function(t,e,i,n,s,a){t.data.length&&(t.data[0].j.missing||(i.push(t.X.name()),n.push(t.data[0].data.value)),t.data[e].j.missing||(s.push(t.X.name()),a.push(t.data[e].data.value)))},a=function(e){t.JA.call(this,e)},o=function(e,i,n,s){if(0!=i.get("value")&&n){var a=i.j("x"),o=i.j("zero"),r=i.j("value"),l=s?i.j("pointWidth"):e.o;i.j("pointWidth",l),l=(a-=(l-=2*(s=Math.abs(t.Tm(t.L(e.X.ya.g("pointsPadding"),l)))))/2)+l,i=i.j("stroke")?i.j("stroke"):n.path.stroke();var h=(i=t.$b(i))/2;e.xa?(a=t.R(a,1),l=t.R(l,1)):(r=t.R(r,1),o=t.R(o,1)),a=t.R(a+h,i),l=t.R(l-h,i),r+=e.xa?-h:h,o-=e.xa?-h:h,r=t.R(r,i),o=t.R(o,i),s&&(o-=s=(i=Math.abs(o-r))>2*s?s:i/2-1,r+=s),s=n.path,t.HA(s,e.xa,a,r),t.IA(s,e.xa,l,r,l,o,a,o),s.close(),s=n.hatchFill,t.HA(s,e.xa,a,r),t.IA(s,e.xa,l,r,l,o,a,o),s.close()}},r=function(t){var e=new n(!1);e.re="mekko",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.mekko(arguments[i]);return e},l=function(t){var e=new n(!0);e.Ga("mosaic"),e.re="mosaic",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.mekko(arguments[i]);return e},h=function(t){var e=new n(!1,!0);e.Ga("barmekko"),e.re="barmekko",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.mekko(arguments[i]);return e};t.H(i,t.xB),i.prototype.r4=function(t){return!this.nv&&0>t?0:t},i.prototype.gq=function(t,e,n){(this.nv||0<t.get("value"))&&i.u.gq.call(this,t,e,n)},i.prototype.tf=function(t,e,n){(this.nv||0<t.get("value"))&&i.u.tf.call(this,t,e,n)},t.H(n,t.wA);var c={};c.mekko={Fb:29,Kb:2,Lb:[t.RH,t.qH],Ob:null,Jb:null,Cb:5767168|t.QG,Ab:"value",zb:"zero"},n.prototype.fj=c,t.Nz(n,n.prototype.fj),t.g=n.prototype,t.g.sa=268435456|t.wA.prototype.sa,t.g.FE=function(e){n.u.FE.call(this,e),t.X(e,64)&&this.B(268435456,1)},t.g.FT=function(){if(t.p(void 0)){var e=t.jt(this.Pv,void 0,"ordinal",t.bt,null,this.hL,this);if(e){var i=this.Pv==e;this.Pv=e,this.Pv.da(i),i||(e=458752,(this.ev()&&"categories"==this.eg().g("itemsSourceMode")||this.nv)&&(e|=512),this.B(e,268435457))}return this}return this.Pv||(e=this.bu(),i=this.vf("firstCategoriesScale"),this.Pv=t.jt(this.Pv,e[i],null,void 0,null,this.hL,this),this.Pv.da(!1)),this.Pv},t.g.RV=function(){if(t.p(void 0)){var e=t.jt(this.tw,void 0,"ordinal",t.bt,null,this.hL,this);if(e){var i=this.tw==e;this.tw=e,this.tw.da(i),i||this.B(458752,268435457)}return this}return this.tw||(e=this.bu(),i=this.vf("lastCategoriesScale"),this.tw=t.jt(this.tw,e[i],null,void 0,null,this.hL,this),this.tw.da(!1)),this.tw},t.g.hL=function(e){this.ka(),t.X(e,4)&&(e=458752,(this.ev()&&"categories"==this.eg().g("itemsSourceMode")||this.nv)&&(e|=512),this.B(e,268435456)),this.da(!0)},t.g.CA=function(){return t.bt},t.g.xD=function(){return["Mekko chart X scale","ordinal"]},t.g.tH=function(){return"linear"},t.g.sH=function(){return 15},t.g.SM=function(){return["Chart scale","ordinal, linear, log, date-time"]},t.g.ev=function(){return!0},t.g.Ol=function(e,i){if(this.nv&&1==this.tj()&&t.J(this.Ra(),t.Qt)){this.pb();var s,a=[],o=this.Ra().names(),r=this.Ra().values(),l=this.Ai(0);for(s=0;s<r.length;s++){var h=null;t.D(i)&&(h={value:r[s],name:o[s]},h=i.call(h,h)),t.z(h)||(h=String(o[s]));var c=this.cc().nc(s);a.push({text:h,iconType:"square",iconStroke:t.Wl(c,1),iconFill:c,iconHatchFill:l.hatchFill()})}return a}return n.u.Ol.call(this,e,i)},t.g.X5=function(t){if(this.zla){var e=!this.Ra().Ne(),i="left"==t.g("orientation")||"bottom"==t.g("orientation");t.scale(i==e?this.FT():this.RV())}else t.scale(this.bb())},t.g.pb=function(){var i=this.J(196608);if(this.J(458752)&&this.B(268435456),n.u.pb.call(this),i){var a,o=[],r=[],l=this.Re.length;for(i=0;i<this.Re.length;i++){var h=this.Re[i].data;for(a=0;a<h.length;a++){if(t.p(r[a])||(r[a]=0),h[a].j.missing){r[a]++;var c=0}else c=t.N(h[a].data.value),c=this.nv?Math.abs(c):0>c?0:c;null==o[a]?o.push(c):o[a]+=c}}for(i=0;i<this.Re.length;i++)for(h=this.Re[i].data,a=c=0;a<h.length;a++)h[a].j.category=r[a]<l?c++:c;o=(0,t.Ye)(o,(function(t,e){return r[e]<l})),e(this.Ra(),o)}this.J(268435456)&&(function(t){if(t.Re.length){var i,n=[],a=[],o=[],r=[],l=t.Re[0].data.length-1;if("direct"==t.bb().kx())for(i=t.Re.length;i--;)s(t.Re[i],l,n,o,a,r);else for(i=0;i<t.Re.length;i++)s(t.Re[i],l,n,o,a,r);(l=t.FT()).Bg(),l.Xc.apply(l,n),l.Hg(),e(l,o),(l=t.RV()).Bg(),l.Xc.apply(l,a),l.Hg(),e(l,r)}}(this),this.I(268435456))};var u={};t.rq(u,0,"pointsPadding",t.Cq),t.U(n,u),t.g=n.prototype,t.g.Gt=function(t,e){return new i(this,this,t,e,!1,this.nv)},t.g.Ss=function(){return"mekko"},t.g.ML=function(){return 3},t.g.F=function(){var e=n.u.F.call(this);return t.Tq(this,u,e),{chart:e}},t.g.ft=function(t,e,i){n.u.ft.call(this,t,e,i)},t.g.EX=function(e,i,n,s){var a=e.F();return(e.scale()==this.FT()&&"left"!=e.g("orientation")||e.scale()==this.RV()&&"right"!=e.g("orientation"))&&t.Zz(a,"scale",e.scale(),i,n),s.push(t.oa(e)),a},t.g.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,u,e)};var d=n.prototype;d.xScale=d.Ra,d.yScale=d.bb,d.crosshair=d.mh,d.xAxis=d.$h,d.getXAxesCount=d.wD,d.yAxis=d.ij,d.getYAxesCount=d.yD,d.getSeries=d.ef,d.palette=d.cc,d.markerPalette=d.Nf,d.hatchFillPalette=d.ve,d.getType=d.Ma,d.addSeries=d.kl,d.getSeriesAt=d.Ai,d.getSeriesCount=d.tj,d.removeSeries=d.Ao,d.removeSeriesAt=d.Rn,d.removeAllSeries=d.Dp,d.getPlotBounds=d.dg,d.annotations=d.Nk,d.lineMarker=d.Ym,d.rangeMarker=d.gn,d.textMarker=d.mn,t.H(a,t.JA),t.PG[29]=a,t.g=a.prototype,t.g.type=29,t.g.flags=263905,t.g.Kh={path:"path",hatchFill:"path"},t.g.ug=function(t,e){if(!t.j("missing")){var i=this.bd.ed(e);o(this,t,i)}},t.g.yt=function(t){var e,i=t.j("shapes");for(e in i)i[e].clear();o(this,t,i,!0)},t.g.WB=function(t){if(!t.j("missing")){var e,i=t.j("shapes");for(e in i)i[e].clear();o(this,t,i,!0)}},t.Tp.mekko=r,t.Tp.mosaic=l,t.Tp.barmekko=h,t.E("anychart.mekko",r),t.E("anychart.mosaic",l),t.E("anychart.barmekko",h)}.call(this,$)),_.theme_graph||(_.theme_graph=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{graph:{labels:{enabled:!1,fontSize:8,fontColor:"#7c868e",disablePointerEvents:!0,selectable:!1,anchor:"center-top",position:"center-bottom",padding:{top:0,left:0,right:0,bottom:0}},padding:10,tooltip:{displayMode:"single",positionMode:"float",separator:{enabled:!1},title:{enabled:!1},titleFormat:""},nodes:{width:12,height:12,shape:"circle",tooltip:{format:"{%id}"},labels:{format:"{%id}",enabled:!1},normal:{fill:t.zN,stroke:t.EN},hovered:{fill:t.FN,stroke:t.zN},selected:{fill:"#333 0.85",stroke:"1.5 #212121"}},edges:{arrows:{enabled:!1,size:10,position:"100%"},stroke:t.FN,hovered:{stroke:t.EN},selected:{stroke:"#333 0.85"},labels:{enabled:!1,format:"from {%from} to {%to}"},tooltip:{format:"from: {%from}\nto: {%to}"}},layout:{type:"forced",iterationCount:500},interactivity:{enabled:!0,zoomOnMouseWheel:!0,scrollOnMouseWheel:!1,nodes:!0,edges:!0,magnetize:!1,hoverGap:7}}})}.call(this,$)),_.map_part||(_.map_part=1,function(t){var e=function(t,e,i){return t+i*(e-t)},i=function(t){var e=t.mi-t.Hj;return e*e+(t=t.Pe-t.ze)*t},n=function(t){switch(String(t).toLowerCase()){case"hammeraitoff":case"hammer-aitoff":case"hammer":return"hammer";case"wagner":case"wagner6":return"wagner6";case"undefined":case"null":case"none":case"wsg84":case"base":case"+proj=longlat +datum=WGS84 +no_defs":return"wsg84"}return t},s=function(e,i,n){t.Ex.call(this,e,i),this.b=n||function(){return!0}},a=function(){},o=function(t){return 0<t?Math.sqrt(t):0},r=function(){},l=function(){},h=function(){this.f=45*Math.PI/180,this.b=1/Math.tan(this.f)},c=function(){},u=function(){},d=function(){},p=function(){},g=function(t,e){this.scale=t,this.angle=e},f=function(){this.b=2,this.f=new g((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}))},b=function(){},v=function(){this.b=new g((function(){return 1}),Math.asin)},m=function(e){this.f=e,this.b=t.ll.proj4},y=function(){},S=function(){},w=function(e){var i=e(0,0);return!(!t.A(i)||(e=i[0],i=i[1],!t.ea(e)||(0,window.isNaN)(e)||!t.ea(i)||(0,window.isNaN)(i)))},x=function(e){if(t.C(e)){var i=new a,n=(t.D(e.forward)?e.forward:null)||(t.D(e)?e:null),s=t.D(e.invert)?e.invert:null;return n&&w(n)&&(i.forward=function(e,i){return e=t.bb(e),i=t.bb(i),n(e,i)},s&&w(s)&&(i.xj=function(e,i){var n=s(e,-i);return n[0]=t.cb(n[0]),n[1]=t.cb(n[1]),n})),i}switch(e){case"bonne":i=new h;break;case"eckert1":i=new c;break;case"eckert3":i=new u;break;case"fahey":i=new p;break;case"hammer":i=new f;break;case"aitoff":i=new r;break;case"mercator":i=new b;break;case"orthographic":i=new v;break;case"robinson":i=new y;break;case"wagner6":i=new S;break;case"wsg84":i=new a;break;case"equirectangular":i=new d;break;case"august":i=new l;break;default:try{t.ll.proj4?i=new m(e):(i=new a,Ie||(t.kl(19,null,null,!0),Ie=!0))}catch(o){i=new a}}return i},C=function(e){switch(e=String(e).toLowerCase()){case"undefined":case"null":case"none":case"wsg84":return!0;case"bonne":case"eckert1":case"eckert3":case"fahey":case"hammer":case"aitoff":case"mercator":case"orthographic":case"robinson":case"wagner6":case"equirectangular":case"august":return!1;default:return!t.ll.proj4}},D=function(e){t.hx.call(this,e),t.T(this.ua,[["zoomOnDoubleClick",0,0],["keyboardZoomAndMove",0,0],["drag",0,0],["copyFormat",0,0]])},T=function(e,i,n,s){t.EA.call(this,e,window.NaN),this.id=s,this.f=n,this.b=i},k=function(e,i){t.FA.call(this,e,i)},$=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),this.ss=[],this.GX=[],t.T(this.ua,[["startSize",1024,1,4294967295],["endSize",1024,1,4294967295],["curvature",1024,1025,4294967295]]),this.eq=!0,this.aP={},this.KH={},this.DE={},this.JA={}},O=function(t,e){t.i!=e&&(t.i=e,t.b||t.B(512,1))},P=function(t){return t.b||t.i},L=function(e,i){var n=!!(i&t.wo),s=!n&&!!(i&t.vo),a=e.$(),o=a.get("normal");o=t.p(o)?o.label:void 0;var r=a.get("hovered");r=t.p(r)?r.label:void 0;var l=a.get("selected");l=t.p(l)?l.label:void 0,o=t.Zo(o,a.get("label")),r=s?t.Zo(r,a.get("hoverLabel")):null,l=n?t.Zo(l,a.get("selectLabel")):null,a=o&&t.p(o.position)?o.position:void 0,r=r&&t.p(r.position)?r.position:void 0,l=l&&t.p(l.position)?l.position:void 0,o=e.Qa().labels();var h=e.lb().labels(),c=e.selected().labels();return s||n?s?t.p(r)?r:t.p(h.g("position"))?h.g("position"):t.p(a)?a:o.g("position"):t.p(l)?l:t.p(c.g("position"))?c.g("position"):t.p(a)?a:o.g("position"):t.p(a)?a:o.g("position")},G=function(e){var i="center";return(e=t.ab(e))?90>e?i="left-bottom":90==e?i="left-center":180>e?i="left-top":180==e?i="center-top":270>e?i="right-top":270==e?i="right-center":270<e&&(i="right-bottom"):i="center-bottom",i},F=function(e,i){t.p(i)&&!t.Ta(e.f,i)&&(e.f=i,e.B(256,1))},I=function(t){return 24==t.bf.type},E=function(e){var i=e.$(),n=i.ma(),s=t.nx(e.state,n),a=!!(s&t.wo),o=!a&&!!(s&t.vo),r=e.bf.type,l=i.j("shapes");if(l)if(e.Ak()||22==r){r=i.j("x");var h=i.j("value"),c=U(e,i);if(!c)return;var u=c.x;c=c.y;var d=l.path||l.circle||l.negative,p=((d=d.Pd)?-d.Jd:0)+u-r,g=(d?-d.Fd:0)+c-h;t.Dc(l,(function(t){t.translate(p,g)}))}else if(21==r){h=e.ZA,r=e.ya.zf.Ig().clone(),h&&t.wb(r,t.Jb(h));var f=r.od,b=r.Jd,v=r.Fd;t.Dc(l,(function(t){t.oc(f,0,0,f,b,v)}))}else 24==r&&(r=e.ya.zf.Ig(),(l=l.hatchFill)&&l.oc(r.od,r.gf,r.We,r.Le,r.Jd,r.Fd));e.check(4194304)&&(d=i.get("normal"),d=t.p(d)?d.marker:void 0,c=i.get("hovered"),c=t.p(c)?c.marker:void 0,l=i.get("selected"),l=t.p(l)?l.marker:void 0,d=t.Zo(d,i.get("marker")),c=t.Zo(c,i.get("hoverMarker")),l=t.Zo(l,i.get("selectMarker")),r=e.Qa().Db(),h=e.lb().Db(),u=e.selected().Db(),i=r.jp(n),d=d&&t.p(d.enabled)?d.enabled:null,c=c&&t.p(c.enabled)?c.enabled:null,l=l&&t.p(l.enabled)?l.enabled:null,(a=o||a?o?null===c?h&&null===h.enabled()?null===d?r.enabled():d:h.enabled():c:null===l?u&&null===u.enabled()?null===d?r.enabled():d:u.enabled():l:null===d?r.enabled():d)&&i&&i.Vd()&&i.jc()&&function(e,i,n){var s=i.Vd(),a=e.$(),o=e.$(),r=!!(n&t.wo);n=!r&&!!(n&t.vo);var l=o.get("normal");l=t.p(l)?l.marker:void 0;var h=o.get("hovered");h=t.p(h)?h.marker:void 0;var c=o.get("selected");c=t.p(c)?c.marker:void 0,l=t.Zo(l,o.get("marker")),h=t.Zo(h,o.get("hoverMarker")),c=t.Zo(c,o.get("selectMarker")),o=l&&t.p(l.position)?l.position:e.Qa().Db().g("position"),l=e.lb().Db().g("position"),h=h&&t.p(h.position)?h.position:t.p(l)?l:o,l=e.selected().Db().g("position"),c=c&&t.p(c.position)?c.position:t.p(l)?l:o,n=e.Bh(n?h:r?c:o),e=i.ic("rotation"),t.p(e)&&null!==e&&!(0,window.isNaN)(e)||(e=a.j("markerRotation")),r=i.ic("anchor"),t.p(r)&&null!==r||(r=a.j("markerAnchor")),t.p(e)&&s.Du(-e,r),i=i.jc().value,a=n.value,n=s.Pd,s.translate((n?-n.Jd:0)+a.x-i.x,(n?-n.Fd:0)+a.y-i.y),t.p(e)&&s.Du(e,r)}(e,i,s)),(a=(n=e.Qa().labels().be(n))&&n.Vd()&&n.jc()&&n.ic("enabled"))&&function(e,i,n){var s=i.Vd(),a=e.$();n=L(e,n);var o=e.Bh(n);n=i.ic("rotation");var r=i.ic("anchor");t.p(r)&&null!==r||(r=a.j("labelAnchor")),t.p(n)&&s.Du(-n,r);var l=i.jc().value;o=o.value;var h=s.Pd;s.translate(-h.Jd+o.x-l.x,-h.Fd+o.y-l.y),(l=i.Zf)&&"offset"!=a.j("positionMode")&&(i=i.ZA||e.ZA,a=e.ya.zf.Ig().clone(),i&&t.wb(a,t.Jb(i)),e=a.od,i=a.Jd,a=a.Fd,a=new t.Db(e,0,0,e,i,a),t.Hb(a,t.Jb(s.Pd)),e=a.od,t.Wm(e,1,1e-6)?a=i=0:(i=a.Jd,a=a.Fd),l.oc(e,0,0,e,i,a)),t.p(n)&&s.Du(n,r)}(e,n,s)},A=function(e){var i=e.$(),n=(n=i.j("features"))&&n.length?n[0]:null;if(!n||!I(e))return{x:0,y:0};var s=(n=n.properties)&&n.middleXYMode,a=i.get("middleXYMode");return"relative"==(s=t.p(a)?a:s||"relative")?e=_(e):"absolute"==s?(s=i.get("middle-x"),a=i.get("middle-y"),i=t.p(s)?s:n?n["middle-x"]:0,n=t.p(a)?a:n?n["middle-y"]:0,i=t.N(i),n=t.N(n),e={x:(e=e.ya.scale().transform(i,n))[0],y:e[1]}):e={x:0,y:0},e},U=function(e,i){var n=e.ya.scale(),s=!1,a=e.Be(),o=i.get(a[0]),r=i.get(a[1]);a=i.get(a[2]);var l=t.Do(r)&&r==o;return r=(0,window.parseFloat)(r),a=(0,window.parseFloat)(a),n=n.transform(r,a),(0,window.isNaN)(r)||(r=n[0]),(0,window.isNaN)(a)||l||(a=n[1]),((0,window.isNaN)(r)||(0,window.isNaN)(a))&&((n=i.j("features"))&&n.length&&n[0].properties?(i.j("regionId",o),o=_(e),(0,window.isNaN)(r)&&(r=o.x),((0,window.isNaN)(a)||l)&&(a=o.y)):s=!0),i.j("missing",s),s?null:{x:r,y:a}},_=function(e){var i=e.$(),n=(e=(e=i.j("features"))&&e.length?e[0]:null)?e.properties:null,s=i.get("middle-x"),a=i.get("middle-y");return i=t.p(s)?s:n&&t.p(n["middle-x"])?n["middle-x"]:.5,n=t.p(a)?a:n&&t.p(n["middle-y"])?n["middle-y"]:.5,e=(e=e?e.ia:null)?{x:(e=e.kr()).left+e.width*i,y:e.top+e.height*n}:null},j=function(e){this.map=e,this.status=0,this.timeout=null,this.zy=(0,t.pa)((function(t){this.status=t,this.map.dispatchEvent("animationend"),this.timeout=null}),this)},M=function(t,e){if(t.status^e)if(t.timeout&&e)(0,window.clearTimeout)(t.timeout),t.timeout=null;else if(e){t.status=e;var i=ge(t.map);t.map!=i&&t.map.kb(i),t.map.dispatchEvent("animationstart")}else t.timeout&&(0,window.clearTimeout)(t.timeout),t.timeout=(0,window.setTimeout)(t.zy,oi,e);else t.status&&e&&t.timeout&&((0,window.clearTimeout)(t.timeout),t.timeout=null)},N=function(e,i,n,s,a,o){this.map=e,this.i=!!a,t.xz.call(this,i,n,s,o)},B=function(t,e,i,n,s,a,o){N.call(this,t,[],[],s,a,o),this.ss=e,this.xJ=i,this.fe=n,this.G=o},R=function(e,i){t.D(e.G)&&(i=e.G(i));var n=(0,t.pa)(e.aS,{t:i,fe:e.fe,xJ:e.xJ,TT:e.map.scale()});e.fe.Yo.ratio(i),e.map.scale().ka(),e.map.scale().Bg(!1),he(e.map,e.ss,n,!1,!0),e.map.scale().Hg(),e.map.scale().da(!0)},H=function(t,e,i,n,s,a){N.call(this,t,e,i,n,s,a),this.G=!1},z=function(e,i){if(e.map.ss()){var n=e.map.zf,s=n.ck().round(),a=n.rb().round(),o=e.map.Dc,r=e.map.uc,l=e.map.mQ/e.map.aC;e.map.Nr||(1>l&&!t.qb(a,s)&&(o=(r=ye(e.map,s,a))[1],r=r[2]),o<a.left?o=a.left:o>a.cb()&&(o=a.cb()),r<a.top?r=a.top:r>a.Va()&&(r=a.Va())),a=i/e.map.Sg(),n.scale(a,a,o,r),e.map.lq=i,n=n.Pd,e.map.scale().zoom=n.od,dt(e.map.scale(),n.Jd,n.Fd),ee(e.map)}},V=function(t,e,i){var n=t.map.zf.Pd;t.map.zf.oc(n.od,0,0,n.Le,e,i),t.map.scale().zoom=n.od,dt(t.map.scale(),n.Jd,n.Fd),ee(t.map)},q=function(){t.Y.call(this),delete this.oa.enabled,this.Xb=this.Y=null,this.path=t.qk(),this.path.eq(!0),t.ru(this,this.path),t.T(this.ua,[["stroke",0,1],["length",0,9],["position",0,9]])},W=function(t){switch(t.orientation()){case"top":t.b=t.qa.zq();break;case"right":t.b=t.qa.yq();break;case"bottom":t.b=t.qa.Cq();break;case"left":t.b=t.qa.Bq()}return t.b},K=function(e,i,n,s,a){switch(i){case"inside":i=t.$a(n,2*Math.PI)+1.5*Math.PI,"top"==e.orientation()||"left"==e.orientation()?s[0]<a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n+.5*Math.PI):s[0]>a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n+.5*Math.PI);break;case"center":i=K(e,"outside",n,s,a),s[0]+=Math.cos(i)*e.length()/2,s[1]+=Math.sin(i)*e.length()/2,i+=Math.PI;break;default:i=t.$a(n-Math.PI/2,2*Math.PI),"top"==e.orientation()||"left"==e.orientation()?s[0]>a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n-1.5*Math.PI):s[0]<=a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n-1.5*Math.PI)}return i},Y=function(t,e){t.qa.pb(),e=(0,window.parseFloat)(e);var i=W(t),n=t.g("position"),s=t.g("length");if(t.Nb()){var a=t.qa.transform(e,i,null);i=t.qa.transform(e+1,i,null)}else a=t.qa.transform(i,e,null),i=t.qa.transform(i,e+1,null);var o=Math.atan(-(a[1]-i[1])/(i[0]-a[0]));return(0,window.isNaN)(o)&&(o=0),n=K(t,n,o,a,i),[a[0],a[1],a[0]+Math.cos(n)*s,a[1]+Math.sin(n)*s,n]},X=function(e,i){var n=Y(e,i);return new t.I(Math.min(n[0],n[2]),Math.min(n[1],n[3]),Math.abs(n[0]-n[2]),Math.abs(n[1]-n[3]))},J=function(){t.Y.call(this),this.ci=[],this.Fk=[],this.Xb=this.Y=null,this.se=980,t.T(this.ua,[["stroke",16,1],["overlapMode",980,9],["drawFirstLabel",980,9],["drawLastLabel",980,9]])},Z=function(t,e){var i=(e?t.labels():t.qb()).g("position");if("center"==i)var n="center";else switch(t.vh){case"top":n="center-bottom";break;case"right":n="left-center";break;case"bottom":n="center-top";break;case"left":n="inside"==i?"left-center":"right-center"}return n},Q=function(e,i){if(!e.Hq||e.J(4)){var n=e.ja(),s=e.scale();if(t.p(i)&&s.Qf(i),s.pb(),e.Nb())var a=e.scale().wx(),o=e.scale().qz();else a=e.scale().xx(),o=e.scale().rz();a=a.get();var r=o.get();o=e.title();var l=e.labels(),h=e.parent().labels(),c=l.nd("enabled"),u=null==c?h.enabled():c;h=e.qb(),c=e.parent().qb();var d=h.nd("enabled");c=null==d?c.enabled():d;var p=e.Xa();p.qa=s,(d=e.yb()).qa=s,s=p.g("position");var g,f=t.Ho(s);if(s=d.g("position"),s=t.Ho(s),e.ae(),u)for(t.Yu(l),l=0,u=a.length;l<u;l++)p=t.mn(e.rd(l,!0,a)),g?t.pb(g,p):g=p;else if(p.enabled()&&0<=f)for(l=0,u=a.length;l<u;l++)f=X(p,(0,window.parseFloat)(a[l])),g?t.pb(g,f):g=f;if(c)for(t.Yu(h),l=0,u=r.length;l<u;l++)p=t.mn(e.rd(l,!1,r)),g?t.pb(g,p):g=p;else if(d.enabled()&&0<=s)for(l=0,u=r.length;l<u;l++)f=X(d,r[l]),g?t.pb(g,f):g=f;if(o.enabled()){switch(o.O()||o.O(e.O()),o.ka(),t.dw(o,e.vh),o.ja(n),n=o.yi(),e.vh){case"top":g.top-=n.height,g.height+=n.height;break;case"right":g.width+=n.width;break;case"bottom":g.height+=n.height;break;case"left":g.left-=n.width,g.width+=n.width}o.da(!1)}g||(g=new t.I(0,0,0,0)),e.Hq=g,e.I(4)}return e.Hq.clone()},tt=function(e){return e.line?e.line:e.line=t.qk().Dd(!0).eq(!0)},et=function(e){t.V.call(this),this.D=e,this.G=[],this.Xb=this.Y=null,this.I(4294967295),t.T(this.ua,[["stroke",0,1],["overlapMode",0,9],["drawFirstLabel",0,9],["drawLastLabel",0,9],["enabled",0,32768]])},it=function(){function e(t){t.enabled(null)}t.Y.call(this),this.Ga("defaultCallout"),this.f=this.b=null,t.su(this,this);var i={};t.T(i,[["labels",0,0]]),this.ca=new t.my(this,i,t.gm),this.ca.ta("labelsFactoryConstructor",t.oy),this.ca.ta("labelsAfterInitCallback",t.sy),this.za=new t.my(this,i,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",e),this.Ea=new t.my(this,i,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",e),this.se=448,t.T(this.ua,[["orientation",this.se,9],["align",this.se,9],["length",this.se,9],["width",this.se,9]])},nt=function(e,i,n,s){var a=i.ma(),o=i.ef(),r=o.Ec();r.select(a),s=t.p(s)?s:t.nx(o.state,a),i.state=s;var l=o.$(),h=!!(s&t.wo),c=!h&&!!(s&t.vo),u=o.Qa().labels();switch(i=(i=l.get("normal"))?i.label:void 0,i=t.Zo(i,l.get("label")),h?(h=(h=l.get("selected"))?h.label:void 0,h=t.Zo(h,l.get("selectLabel")),l=o.selected().labels()):c?(h=(h=l.get("hovered"))?h.label:void 0,h=t.Zo(h,l.get("hoverLabel")),l=o.lb().labels()):l=h=null,(c=o.Ic(!0)).b=o.ce(a),n.Hf(c),t.Zu(n,u),t.$u(n,l),n.td(i,h),t.Yu(u),s=!(i=!!(s&t.wo))&&!!(s&t.vo),a=e.Qa().labels(),s=i?e.selected().labels():s?e.lb().labels():a,(i=t.TN(a)).enabled=a.enabled(),(a=t.TN(s)).enabled=null===s.enabled()?i.enabled:s.enabled(),n.td(i,n.state("pointState")?t.Sc(n.state("pointState"),a):a),(a=e.Bh(n.ma())).connectorPoint={value:A(o)},n.jc(a),e.Nb()?(n.width(e.b),n.height(e.f)):(n.width(e.f),n.height(e.b)),e.g("orientation")){case"top":n.anchor("center-bottom");break;case"right":n.anchor("left-center");break;case"bottom":n.anchor("center-top");break;case"left":n.anchor("right-center")}return r.j("shapes")&&(e=r.j("fill"),r=r.j("stroke"),n.background().enabled(!0).fill(e).stroke(r)),n},st=function(){t.iA.call(this)},at=function(){t.kz.call(this),this.qa=this.i=null,t.T(this.ua,[["minorStroke",16]])},ot=function(e){t.V.call(this),this.Ga("defaultGridSettings"),this.Y=null,this.i=e,this.o=[],this.Fa=this.Xb=null,this.I(4294967295),t.T(this.ua,[["stroke",0,1],["minorStroke",0,1],["fill",0,1],["drawFirstLine",0,9],["drawLastLine",0,9],["enabled",0,32768],["zIndex",0,65536]])},rt=function(e,i){t.J(i,t.Ms)||t.C(i)&&"range"==i.type?e.Hc(t.Ms):(t.J(i,t.Gs)||t.C(i)||null==e.Fa)&&e.Hc(t.Gs)},lt=function(t,e,i){this.b=i||0,this.f=t,this.cT=e},ht=function(e){t.V.call(this),this.qa=e},ct=function(){t.V.call(this),this.Ga("map.geoScale"),this.cl=window.NaN,this.Ka=Number.MAX_VALUE,this.Ba=-Number.MAX_VALUE,this.Za=Number.MAX_VALUE,this.Ha=-Number.MAX_VALUE,this.fh=Number.MAX_VALUE,this.bg=-Number.MAX_VALUE,this.nf=Number.MAX_VALUE,this.me=-Number.MAX_VALUE,this.$a=this.fb=this.sb=this.Sb=!0,this.P=0,this.ea=this.aa=this.na=this.ba=this.bn=this.Aq=this.xq=this.cn=window.NaN,this.qc=this.ec=1,this.Kc=!1,this.cs=0,this.Ys=this.yo=!1,this.Bb=null},ut=function(t,e,i,n,s){t.na=e,t.ba=i,t.ea=n,t.aa=s},dt=function(t,e,i){t.Dk=e,t.dn=i},pt=function(t){return t.b||t.pb(),t.b},gt=function(t,e){t.yo=!1,t.Ys=e},ft=function(e){return t.p(e.bj)?e.bj:e.yo},bt=function(e){return t.p(e.yg)?e.yg:e.Ys},vt=function(t,e,i){var n=Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=-Number.MAX_VALUE,r=t.precision(),l=r[0],h=r[1];if(i){if(i=t.f,l=t.o,t.fe&&C(t.fe.default.Pg))(i=Tt(t,e,i))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]);else for(r=i;r<l;)(i=Tt(t,e,r))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=h;i=Tt(t,e,l)}else{h=t.i;var c=t.D;if(t.fe&&C(t.fe.default.Pg))(i=Tt(t,h,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]);else if(h>c){for(r=h;180>r;)(i=Tt(t,r,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=l;for(r=-180;r<h;)(i=Tt(t,r,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=l}else for(r=h;r<c;)(i=Tt(t,r,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=l;i=Tt(t,c,e)}return i[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),{cn:n,Aq:s,xq:a,bn:o}},mt=function(e,i,n){return e.pb(),e.Bb?(i=t.N(i),n=t.N(n),i=(i-e.cn)*e.ratio,n=(-n+e.bn)*e.ratio,[ft(e)?e.Bb.cb()-e.G-i:e.Bb.left+e.G+i,bt(e)?e.Bb.Va()-e.K-n:e.Bb.top+e.K+n]):[window.NaN,window.NaN]},yt=function(e,i,n){return e.pb(),e.Bb?(i=t.N(i),n=t.N(n),[+(ft(e)?e.Bb.cb()-e.G-i:i-e.Bb.left-e.G)/e.ratio+e.cn,-(bt(e)?e.Bb.Va()-e.K-n:n-e.Bb.top-e.K)/e.ratio+e.bn]):[window.NaN,window.NaN]},St=function(t,e,i,n){return t=t.fe.default,(e=(n.Yo||t.Yo).forward(e,i))[0]*=n.scale||t.scale,e[1]*=n.scale||t.scale,e[0]+=n.ri||0,e[1]+=n.jj||0,[e[0],e[1]]},wt=function(t,e,i){var n,s=!1,a=0;for(n=i.length-1;a<i.length;n=a++)i[a][1]>e!=i[n][1]>e&&t<(i[n][0]-i[a][0])*(e-i[a][1])/(i[n][1]-i[a][1])+i[a][0]&&(s=!s);return s},xt=function(e,i,n){if(!e.fe)return null;var s=window.NaN,a=window.NaN,o=t.Hc(e.fe,(function(e,o){if("default"!=o&&e.eu){var r=St(this,i,n,e),l=r[0];r=r[1];var h=e.eu;return(h=t.A(h)?wt(l,r,h):l>=h.left&&l<=h.left+h.width&&r<=h.top&&r>=h.top-h.height)&&(s=l,a=r),h}return!1}),e)||"default";return[e.fe[o],s,a]},Ct=function(e,i,n,s){if(!e.fe)return[];if(e.pb(),t.p(s))s=null!==s&&s in e.fe?e.fe[s]:e.fe.default;else{var a=xt(e,i,n);s=a[0];var o=a[1];a=a[2]}return(0,window.isNaN)(o)&&(o=(i=St(e,i,n,s))[0],a=i[1]),!e.Bb||(0,window.isNaN)(o)||(0,window.isNaN)(a)?[window.NaN,window.NaN]:(o=(+o-e.cn)*e.ratio,i=(-a+e.bn)*e.ratio,[ft(e)?e.Bb.cb()-e.G-o:e.Bb.left+e.G+o,bt(e)?e.Bb.Va()-e.K-i:e.Bb.top+e.K+i])},Dt=function(e,i,n,s){if(!e.fe)return[];var a,o=e.fe.default;return a=t.p(s)?s in e.fe?s:"default":t.Hc(e.fe,(function(e,s){if("default"!=s&&e.eu){var a=e.eu;return t.A(a)?wt(i,n,a):i>=a.left&&i<=a.left+a.width&&n<=a.top&&n>=a.top-a.height}return!1}),e)||"default",s=(e=e.fe[a]).Yo||o.Yo,i-=e.ri||o.ri||0,n-=e.jj||o.jj||0,a=e.scale||o.scale,e.Pg||o.Pg?s.xj(i/a,n/a):[i/a,n/a]},Tt=function(e,i,n){if((0,window.isNaN)(i)||(0,window.isNaN)(n))return[window.NaN,window.NaN];var s=window.NaN,a=window.NaN;if(t.p(null))var o=e.fe.default;else o=(a=xt(e,i,n))[0],s=a[1],a=a[2];return(0,window.isNaN)(s)?(e=e.fe.default,(i=(o.Yo||e.Yo).forward(i,n))[0]*=o.scale||e.scale,i[1]*=o.scale||e.scale,-620.8680523857!=o.ri&&(i[0]+=o.ri||0,i[1]+=o.jj||0),o=[i[0],i[1]]):o=[s,a],o},kt=function(e,i){this.f=i||t.Ma,this.b=e;for(var n=Math.floor(e.length/2);n--;)$t(this,n)},$t=function(t,e){var i=2*e+1,n=2*e+2,s=e;i<=t.b.length&&0<t.f(t.b[i],t.b[s])&&(s=i),n<=t.b.length&&0<t.f(t.b[n],t.b[s])&&(s=n),s!=e&&(Ot(t,e,s),$t(t,s))},Ot=function(t,e,i){var n=t.b[e];t.b[e]=t.b[i],t.b[i]=n},Pt=function(){},Lt=function(e,i,n){var s;if(n&&!n["middle-x"]&&!n["middle-y"]){var a=t.Ic(n,(function(t,e){return/middle-x/.test(e)})),o=t.Ic(n,(function(t,e){return/middle-y/.test(e)}))||.5;n["middle-x"]=a||.5,n["middle-y"]=o}switch(i.type){case"Point":return{coordinates:[i.coordinates[0],i.coordinates[1]],properties:n};case"MultiPoint":var r=[];for(e=i.coordinates,i=0,a=e.length;i<a;i++)r.push(e[0],e[1]);return{coordinates:r,properties:n};case"LineString":for(r=[],e=i.coordinates,i=0,a=e.length;i<a;i++)o=e[i],r.push(o[0],o[1]);return{paths:[r],properties:n};case"MultiLineString":var l=[],h=i.coordinates;for(i=0,a=h.length;i<a;i++){r=[];var c=0;for(s=(e=h[i]).length;c<s;c++)o=e[c],r.push(o[0],o[1]);l.push(r)}return{paths:l,properties:n};case"Polygon":h=[];var u=[],d=i.coordinates;for(i=0,a=d.length;i<a;i++){for(0!=i&&(r=[]),c=0,s=(e=d[i]).length;c<s;c++)o=e[c],i?r.push(o[0],o[1]):h.push(o[0],o[1]);r&&u.push(r)}return{polygones:[{outerPath:h,holes:u}],properties:n};case"MultiPolygon":l=[];var p=i.coordinates;for(i=0,a=p.length;i<a;i++){for(h=[],u=[],c=0,s=(d=p[i]).length;c<s;c++){0!=c&&(r=[]);for(var g=0,f=(e=d[c]).length;g<f;g++)o=e[g],c?r.push(o[0],o[1]):h.push(o[0],o[1]);r&&u.push(r)}d={outerPath:h,holes:u},l.push(d)}return{polygones:l,properties:n};case"GeometryCollection":if(i.geometries){for(r=[],c=i.geometries,i=0,a=c.length;i<a&&(o=Lt(e,c[i],c[i].properties),t.p(o));i++)r.push(o);return{geometries:r,properties:n||null}}t.il(10,"GeometryCollection object missing 'geometries' member.");break;default:t.il(10,"Geometry object must be one of 'Point', 'LineString', 'Polygon' or 'MultiPolygon'.")}return null},Gt=function(t){this.f=t,this.b=0,this.i=this.f.length,this.o=null,It(this)},Ft=function(t){return" ">=(t=t.f[t.b])&&(" "===t||"\n"===t||"\t"===t||"\r"===t||"\f"===t)},It=function(t){for(;t.b<t.i&&Ft(t);)t.b+=1;return t.b<t.i},Et=function(t){t.b<t.i&&!Ft(t)&&","!==t.f[t.b]||!(It(t)&&t.b<t.i)||","!==t.f[t.b]||(t.b+=1,It(t))},At=function(t){var e=0,i=0,n=[],s=1,a=1,o=t.b;if(It(t),t.b<t.i&&"+"===t.f[t.b]?t.b+=1:t.b<t.i&&"-"===t.f[t.b]&&(t.b+=1,s=-1),t.b===t.i||("0">t.f[t.b]||"9"<t.f[t.b])&&"."!==t.f[t.b])return null;for(var r=t.b;t.b<t.i&&"0"<=t.f[t.b]&&"9">=t.f[t.b];)t.b+=1;if(t.b!==r)for(var l=t.b-1,h=1;l>=r;)i+=h*(t.f[l]-0),--l,h*=10;if(t.b<t.i&&"."===t.f[t.b]){if(t.b+=1,t.b>=t.i||"0">t.f[t.b]||"9"<t.f[t.b])return null;for(;t.b<t.i&&"0"<=t.f[t.b]&&"9">=t.f[t.b];)n.push(t.f[t.b]-0),t.b+=1}if(t.b!==o&&t.b+1<t.i&&("e"===t.f[t.b]||"E"===t.f[t.b])&&"x"!==t.f[t.b+1]&&"m"!==t.f[t.b+1]){if(t.b+=1,"+"===t.f[t.b]?t.b+=1:"-"===t.f[t.b]&&(t.b+=1,a=-1),t.b>=t.i||"0">t.f[t.b]||"9"<t.f[t.b])return null;for(;t.b<t.i&&"0"<=t.f[t.b]&&"9">=t.f[t.b];)e*=10,e+=t.f[t.b]-0,t.b+=1}return i+=(0,window.parseFloat)("0."+n.join("")),i*=s,e&&(i*=Math.pow(10,a*e)),o===t.b?null:(Et(t),i)},Ut=function(t){if(t.b>=t.i)return null;var e=t.f[t.b];if(t.b+=1,"0"===e)e=0;else{if("1"!==e)return null;e=1}return Et(t),e},_t=function(){},jt=function(e,i,n,s){var a,o=t.Ze(i),r=[],l=0;for(a=o.length;l<a;l++){var h=o[l];if(t.af(h)){var c=h.tagName.toLowerCase(),u=!n||"g"==c||"svg"==c&&n?{}:null;if(i=Mt(e,h,u,s),u){if("g"==c||"svg"==c){var d=Ht(h,s),p=zt(e,h,"group");h=Vt(h),"g"==c?(c=p.id,t.p(c)?h.id=c:t.p(h.id)&&(c=h.id),u.tx=d,u.properties=h,u.attrs=p,u.id=c):(u.properties={},u.attrs={}),u.type="group",u.features=i}else u=i;u&&r.push(u)}else n?i&&(t.A(i)?r.push.apply(r,i):r.push(i)):("g"==c||"svg"==c)&&i&&r.push.apply(r,i)}}return r},Mt=function(e,i,n,s){var a=i.getAttribute("id");if(a&&e.b[a])var o=t.Sl(e.b[a]);else{var r=Nt(e,i);switch(i.tagName.toLowerCase()){case"rect":var l=+i.getAttribute("x"),h=+i.getAttribute("y"),c=+i.getAttribute("width"),u=+i.getAttribute("height");o=qt(e,i,[{type:"M",values:[l,h]},{type:"L",values:[l+c,h]},{type:"L",values:[l+c,h+u]},{type:"L",values:[l,h+u]},{type:"Z"}],s);break;case"circle":var d=+i.getAttribute("cx"),p=+i.getAttribute("cy"),g=+i.getAttribute("r"),f=d-g,b=Yt(e,[{type:"M",values:[f,p]},{type:"A",values:[g,g,0,1,0,f+2*g,p]},{type:"A",values:[g,g,0,1,0,f,p]},{type:"Z"}]);o=qt(e,i,b,s);break;case"ellipse":var v=+i.getAttribute("cx"),m=+i.getAttribute("cy"),y=+i.getAttribute("rx"),S=+i.getAttribute("ry"),w=v-y,x=Yt(e,[{type:"M",values:[w,m]},{type:"A",values:[y,S,0,1,0,w+2*y,m]},{type:"A",values:[y,S,0,1,0,w,m]},{type:"Z"}]);o=qt(e,i,x,s);break;case"polygon":for(var C=i.getAttribute("points").trim().split(/\s+|,/),D=[],T=0,k=C.length-1;T<k;T+=2)T?D.push({type:"L",values:[+C[T],+C[T+1]]}):D.push({type:"M",values:[+C[T],+C[T+1]]});D.push({type:"Z"}),o=qt(e,i,D,s);break;case"polyline":for(var $=i.getAttribute("points").trim().split(/\s+|,/),O=[],P=0,L=$.length-1;P<L;P+=2)P?O.push({type:"L",values:[+$[P],+$[P+1]]}):O.push({type:"M",values:[+$[P],+$[P+1]]});o=qt(e,i,O,s);break;case"path":var G=i.getAttribute("d")||"";if(G&&0!==G.length){var F=new Gt(G),I=[];if(F.b<F.i)var E=F.f[F.b],A=ei[E]?ei[E]:null,U="M"===A||"m"===A;else U=!0;if(U)for(;F.b<F.i;){t:{var _=F,j=_.f[_.b],M=ei[j]?ei[j]:null;if(null===M){if(null===_.o){var N=null;break t}if(null===(M=("+"===j||"-"===j||"."===j||"0"<=j&&"9">=j)&&"Z"!==_.o?"M"===_.o?"L":"m"===_.o?"l":_.o:null)){N=null;break t}}else _.b+=1;_.o=M;var B=null,R=M.toUpperCase();"H"===R||"V"===R?B=[At(_)]:"M"===R||"L"===R||"T"===R?B=[At(_),At(_)]:"S"===R||"Q"===R?B=[At(_),At(_),At(_),At(_)]:"C"===R?B=[At(_),At(_),At(_),At(_),At(_),At(_)]:"A"===R?B=[At(_),At(_),At(_),Ut(_),Ut(_),At(_),At(_)]:"Z"===R&&(It(_),B=[]),N=null===B||0<=B.indexOf(null)?null:{type:M,values:B}}if(null===N)break;I.push(N)}var H=I}else H=[];var z=Yt(e,Kt(H));o=qt(e,i,z,s);break;case"line":var V=+i.getAttribute("x1"),q=+i.getAttribute("x2"),W=+i.getAttribute("y1"),K=+i.getAttribute("y2");o=qt(e,i,[{type:"M",values:[V,W]},{type:"L",values:[q,K]}],s);break;case"text":var Y=Ht(i,s),X=Vt(i),J=zt(e,i,"element");X.id=J.id;var Z=i.cloneNode(!0);Y.Tv&&Z.setAttribute("transform",Y.Tv.toString()),Z.removeAttribute("data-ac-wrapper-id");var Q=J.id;t.p(Q)?X.id=Q:t.p(X.id)&&(Q=X.id),o={type:"text",text:i,cloneNode:Z,tx:Y,id:Q,properties:X,attrs:J};break;case"image":var tt=Ht(i,s),et=Vt(i),it=zt(e,i,"element"),nt=+i.getAttribute("x"),st=+i.getAttribute("y"),at=+i.getAttribute("width"),ot=+i.getAttribute("height");et.id=it.id;var rt=i.cloneNode(!0);tt.Tv&&rt.setAttribute("transform",tt.Tv.toString()),rt.removeAttribute("data-ac-wrapper-id");var lt=it.id;t.p(lt)?et.id=lt:t.p(et.id)&&(lt=et.id),o={type:"image",sourceNode:i,cloneNode:rt,bounds:t.kn(nt,st,at,ot),tx:tt,id:lt,properties:et,attrs:it};break;case"use":o=Nt(e,i);break;case"clippath":for(var ht=Ht(i,s),ct=jt(e,i,!0,ht.Tv),ut=[],dt=0,pt=ct.length;dt<pt;dt++)ut.push.apply(ut,ct[dt].commands);o={clippath:qt(e,i,ut,s)};break;case"lineargradient":var gt={};if(r)var ft=r.gradientUnits,bt=r.transform,vt=+r.x1,mt=+r.y1,yt=+r.x2,St=+r.y2,wt=(0,window.parseFloat)(r.opacity);var xt=i.getAttribute("gradientUnits")||ft,Ct=Ht(i).self||bt,Dt=+i.getAttribute("x1"),Tt=+i.getAttribute("y1"),kt=+i.getAttribute("x2"),$t=+i.getAttribute("y2"),Ot=(0,window.parseFloat)(i.getAttribute("opacity")),Pt=t.p(Dt)?Dt:t.p(vt)?vt:0,Lt=t.p(Tt)?Tt:t.p(mt)?mt:0,Ft=t.p(kt)?kt:t.p(yt)?yt:0,Et=t.p($t)?$t:t.p(St)?St:0,_t=(0,window.isNaN)(Ot)?t.p(wt)?wt:1:Ot;Pt=t.Tm(Pt,7),Lt=t.Tm(Lt,7);var Mt=(Ft=t.Tm(Ft,7))-Pt,Rt=(Et=t.Tm(Et,7))-Lt;gt.mode=!(!xt||"userspaceonuse"!=xt.toLowerCase())&&t.kn(Math.min(Pt,Ft),Math.min(Lt,Et),Math.abs(Mt),Math.abs(Rt));var Wt=Math.round(t.cb(Math.atan(Rt/Mt)));0<Mt&&0>Rt?Wt=Math.abs(Wt):0>=Mt&&0>=Rt?Wt=180-Math.abs(Wt):0>=Mt&&0<Rt?Wt=180+Math.abs(Wt):0<Mt&&0<Rt&&(Wt=360-Math.abs(Wt)),gt.opacity=_t;var Xt=t.Ze(i);gt.keys=Xt.length?Bt(i):r?r.keys:[],gt.angle=Wt,gt.transform=Ct,o=gt;break;case"radialgradient":var Jt={};if(r)var Zt=r.gradientUnits,Qt=r.gradientTransform,te=+r.r,ee=+r.cx,ie=+r.cy,ne=+r.fx,se=+r.fy,ae=(0,window.parseFloat)(r.opacity);var oe=i.getAttribute("gradientUnits")||Zt,re=Ht(i).self||Qt,le=+i.getAttribute("r"),he=+i.getAttribute("cx"),ce=+i.getAttribute("cy"),ue=+i.getAttribute("fx"),de=+i.getAttribute("fy"),pe=(0,window.parseFloat)(i.getAttribute("opacity")),ge=t.p(le)?le:t.p(te)?te:0,fe=t.p(he)?he:t.p(ee)?ee:0,be=t.p(ce)?ce:t.p(ie)?ie:0,ve=t.p(ue)?ue:t.p(ne)?ne:0,me=t.p(de)?de:t.p(se)?se:0,ye=(0,window.isNaN)(pe)?t.p(ae)?ae:1:pe;if(oe&&"userspaceonuse"==oe.toLowerCase()){var Se=2*ge,we=t.kn(fe-ge,be-ge,Se,Se);Jt.cx=.5,Jt.cy=.5,Jt.fx=(ve-we.left)/Se,Jt.fy=(me-we.top)/Se,Jt.mode=we}else Jt.cx=fe,Jt.cy=be,Jt.fx=ve,Jt.fy=me;Jt.opacity=ye,Jt.transform=re;var xe=t.Ze(i);Jt.keys=xe.length?Bt(i):r?r.keys:[],o=Jt;break;case"pattern":var Ce={},De=+i.getAttribute("x"),Te=+i.getAttribute("y"),ke=+i.getAttribute("width"),$e=+i.getAttribute("height");Ce.type="pattern",Ce.bounds=t.kn(De,Te,ke,$e),Ce.properties=Vt(i),Ce.attrs=zt(e,i,"group"),Ce.features=jt(e,i,Ce),Ce.properties.id=Ce.id=Ce.attrs.id,o=Ce;break;case"defs":case"desc":break;default:var Oe=Ht(i,s);o=jt(e,i,n,Oe.Tv)}o&&a&&(e.b[a]=o)}return o},Nt=function(e,i){var n=i.getAttributeNS("http://www.w3.org/1999/xlink","href"),s=null;return n&&(n=n.substring(1,n.length),(s=t.Sl(e.b[n]))||(n=e.i.getElementById(n))&&(s=Mt(e,n))),s},Bt=function(e){if(!e)return null;if((e=t.Ze(e))&&e.length)for(var i=[],n=0,s=e.length;n<s;n++){var a=e[n],o=t.yf(a,"stop-color"),r=(0,window.parseFloat)(t.yf(a,"stop-opacity"));o=o||a.getAttribute("stop-color"),r=(0,window.isNaN)(r)?(0,window.parseFloat)(a.getAttribute("stop-opacity")):r,a=(0,window.parseFloat)(a.getAttribute("offset")),i.push({offset:a,color:o,opacity:(0,window.isNaN)(r)?1:r})}return i},Rt=function(e,i){for(var n=i?i.clear():t.qk(),s=0,a=e.length;s<a;s++){var o=e[s],r=o.values;switch(o.type){case"M":n.moveTo(+r[0],+r[1]);break;case"L":n.lineTo(+r[0],+r[1]);break;case"C":n.Sk(+r[0],+r[1],+r[2],+r[3],+r[4],+r[5]);break;case"Z":n.close()}}return n},Ht=function(e,i){var n=e.tagName.toLowerCase();if(!(n="lineargradient"==n||"radialgradient"==n?e.getAttribute("gradientTransform"):e.getAttribute("transform")))return{self:null,Tv:t.p(i)?i:null};var s=(n=t.Mb(n)).clone();return i&&t.Hb(s,i),{self:n,Tv:s}},zt=function(e,i,n){var s={},a=i.attributes;s.fill={},s.stroke={};for(var o=0,r=a.length;o<r;o++){var l=a[o];switch(l.name=l.name.toLowerCase(),l.name){case"clip-path":var h=l.value.replace(/^url\s*\("*#(.+)"*\)/g,"$1");(h=e.b[h])&&(s[l.name]=h.clippath);break;case"opacity":t.p(s.fill.opacity)||(s.fill.opacity=l.value),t.p(s.stroke.opacity)||(s.stroke.opacity=l.value);break;case"fill":s.fill.color=l.value;break;case"fill-opacity":s.fill.opacity=l.value;break;case"stroke":s.stroke.color=l.value;break;case"stroke-opacity":s.stroke.opacity=l.value;break;case"stroke-linejoin":s.stroke.lineJoin=l.value;break;case"stroke-linecap":s.stroke.lineCap=l.value;break;case"stroke-width":s.stroke.thickness=l.value;break;case"stroke-dasharray":s.stroke.dash=l.value;break;default:"style"!=l.name&&"d"!=l.name&&"transform"!=l.name&&"data-ac-wrapper-id"!=l.name&&(s[l.name]=l.value)}}return"element"==n&&(t.p(s.fill.color)||(i.style?(s.fill.color=t.yf(i,"fill"),t.uf(i,"fill","")):s.fill.color="black"),n=s.fill.color.trim(),t.ec(n,"url")&&(a=n.replace(/"/g,"").replace(/^url\s*\(#(.+)\)/g,"$1"),s.fill=e.b[a]),s.stroke.color||(i.style?(s.stroke.color=t.yf(i,"stroke"),t.uf(i,"stroke","")):s.stroke.color="none"),t.ec(s.stroke.color.trim(),"url")&&(n=n.replace(/"/g,"").replace(/^url\s*\(#(.+)\)/g,"$1"),s.stroke=e.b[n])),(e=i.getAttribute("style"))&&(s.style=e),s},Vt=function(e){for(var i={},n=0,s=(e=t.Ze(e)).length;n<s;n++){var a=e[n];if("desc"==a.tagName){for(n=0,s=(e=t.Ze(a)).length;n<s;n++)i[(a=e[n]).tagName]=a.textContent;break}}return i},qt=function(e,i,n,s){if((s=Ht(i,s)).Tv)for(var a=t.fd(n),o=0,r=a.length;o<r;o++){var l=a[o].values;l&&s.Tv.transform(l,0,l,0,l.length/2)}return o=Vt(i),i=(e=zt(e,i,"element")).id,t.p(i)?o.id=i:t.p(o.id)&&(i=o.id),{type:"path",properties:o,id:i,commands:n,commands_tx:a,attrs:e,tx:s}},Wt=function(t,e,i,n,s,a,o,r,l,h,c){function u(t,e,i){return{x:t*Math.cos(i)-e*Math.sin(i),y:t*Math.sin(i)+e*Math.cos(i)}}var d=Math.PI*r/180,p=[];if(c){var g=c[0];l=c[1];var f=c[2],b=c[3]}else{e=(i=u(e,i,-d)).x,i=i.y,1<(b=(g=(e-(n=(s=u(n,s,-d)).x))/2)*g/(a*a)+(f=(i-(s=s.y))/2)*f/(o*o))&&(a*=b=Math.sqrt(b),o*=b),b=a*a;var v=o*o;f=(l=(l===h?-1:1)*Math.sqrt(Math.abs((b*v-b*f*f-v*g*g)/(b*f*f+v*g*g))))*a*f/o+(e+n)/2,b=l*-o*g/a+(i+s)/2,g=Math.asin(((i-b)/o).toFixed(9)),l=Math.asin(((s-b)/o).toFixed(9)),e<f&&(g=Math.PI-g),n<f&&(l=Math.PI-l),0>g&&(g=2*Math.PI+g),0>l&&(l=2*Math.PI+l),h&&g>l&&(g-=2*Math.PI),!h&&l>g&&(l-=2*Math.PI)}if(Math.abs(l-g)>120*Math.PI/180){v=l;var m=n,y=s;l=h&&l>g?g+120*Math.PI/180:g+120*Math.PI/180*-1,n=f+a*Math.cos(l),s=b+o*Math.sin(l),p=Wt(t,n,s,m,y,a,o,r,0,h,[l,v,f,b])}if(a=4/3*a*(t=Math.tan((l-g)/4)),t*=4/3*o,o=[e,i],e=[e+a*Math.sin(g),i-t*Math.cos(g)],i=[n+a*Math.sin(l),s-t*Math.cos(l)],n=[n,s],e[0]=2*o[0]-e[0],e[1]=2*o[1]-e[1],c)return[e,i,n].concat(p);p=[e,i,n].concat(p).join().split(",");var S=[],w=[];return p.forEach((function(t,e){e%2?w.push(u(p[e-1],p[e],d).y):w.push(u(p[e],p[e+1],d).x),6===w.length&&(S.push(w),w=[])})),S},Kt=function(t){var e=[],i=null,n=null,s=null,a=null;return t.forEach((function(t){switch(t.type){case"M":var o=t.values[0],r=t.values[1];e.push({type:"M",values:[o,r]}),s=o,a=r,i=o,n=r;break;case"m":o=i+t.values[0],r=n+t.values[1],e.push({type:"M",values:[o,r]}),s=o,a=r,i=o,n=r;break;case"L":o=t.values[0],r=t.values[1],e.push({type:"L",values:[o,r]}),i=o,n=r;break;case"l":o=i+t.values[0],r=n+t.values[1],e.push({type:"L",values:[o,r]}),i=o,n=r;break;case"C":var l=t.values[0],h=t.values[1],c=t.values[2],u=t.values[3];o=t.values[4],r=t.values[5],e.push({type:"C",values:[l,h,c,u,o,r]}),i=o,n=r;break;case"c":l=i+t.values[0],h=n+t.values[1],c=i+t.values[2],u=n+t.values[3],o=i+t.values[4],r=n+t.values[5],e.push({type:"C",values:[l,h,c,u,o,r]}),i=o,n=r;break;case"Q":l=t.values[0],h=t.values[1],o=t.values[2],r=t.values[3],e.push({type:"Q",values:[l,h,o,r]}),i=o,n=r;break;case"q":l=i+t.values[0],h=n+t.values[1],o=i+t.values[2],r=n+t.values[3],e.push({type:"Q",values:[l,h,o,r]}),i=o,n=r;break;case"A":o=t.values[5],r=t.values[6],e.push({type:"A",values:[t.values[0],t.values[1],t.values[2],t.values[3],t.values[4],o,r]}),i=o,n=r;break;case"a":o=i+t.values[5],r=n+t.values[6],e.push({type:"A",values:[t.values[0],t.values[1],t.values[2],t.values[3],t.values[4],o,r]}),i=o,n=r;break;case"H":o=t.values[0],e.push({type:"H",values:[o]}),i=o;break;case"h":o=i+t.values[0],e.push({type:"H",values:[o]}),i=o;break;case"V":r=t.values[0],e.push({type:"V",values:[r]}),n=r;break;case"v":r=n+t.values[0],e.push({type:"V",values:[r]}),n=r;break;case"S":c=t.values[0],u=t.values[1],o=t.values[2],r=t.values[3],e.push({type:"S",values:[c,u,o,r]}),i=o,n=r;break;case"s":c=i+t.values[0],u=n+t.values[1],o=i+t.values[2],r=n+t.values[3],e.push({type:"S",values:[c,u,o,r]}),i=o,n=r;break;case"T":o=t.values[0],r=t.values[1],e.push({type:"T",values:[o,r]}),i=o,n=r;break;case"t":o=i+t.values[0],r=n+t.values[1],e.push({type:"T",values:[o,r]}),i=o,n=r;break;case"Z":case"z":e.push({type:"Z",values:[]}),i=s,n=a}})),e},Yt=function(e,i){var n=[],s=null,a=null,o=null,r=null,l=null,h=null,c=null;return(0,t.Pe)(i,(function(t){switch(t.type){case"M":var e=t.values[0],i=t.values[1];n.push({type:"M",values:[e,i]}),h=e,c=i,r=e,l=i;break;case"C":var u=t.values[0],d=t.values[1],p=t.values[2],g=t.values[3];e=t.values[4],i=t.values[5],n.push({type:"C",values:[u,d,p,g,e,i]}),a=p,o=g,r=e,l=i;break;case"L":e=t.values[0],i=t.values[1],n.push({type:"L",values:[e,i]}),r=e,l=i;break;case"H":e=t.values[0],n.push({type:"L",values:[e,l]}),r=e;break;case"V":i=t.values[0],n.push({type:"L",values:[r,i]}),l=i;break;case"S":if(p=t.values[0],g=t.values[1],e=t.values[2],i=t.values[3],"C"===s||"S"===s)var f=r+(r-a),b=l+(l-o);else f=r,b=l;n.push({type:"C",values:[f,b,p,g,e,i]}),a=p,o=g,r=e,l=i;break;case"T":e=t.values[0],i=t.values[1],"Q"===s||"T"===s?(u=r+(r-a),d=l+(l-o)):(u=r,d=l),f=r+2*(u-r)/3,b=l+2*(d-l)/3,n.push({type:"C",values:[f,b,e+2*(u-e)/3,i+2*(d-i)/3,e,i]}),a=u,o=d,r=e,l=i;break;case"Q":u=t.values[0],d=t.values[1],e=t.values[2],i=t.values[3],f=r+2*(u-r)/3,b=l+2*(d-l)/3,n.push({type:"C",values:[f,b,e+2*(u-e)/3,i+2*(d-i)/3,e,i]}),a=u,o=d,r=e,l=i;break;case"A":u=t.values[0],d=t.values[1],p=t.values[2],g=t.values[3],f=t.values[4],e=t.values[5],i=t.values[6],0===u||0===d?(n.push({type:"C",values:[r,l,e,i,e,i]}),r=e,l=i):r===e&&l===i||Wt(this,r,l,e,i,u,d,p,g,f).forEach((function(t){n.push({type:"C",values:t}),r=e,l=i}));break;case"Z":n.push(t),r=h,l=c}s=t.type}),e),n},Xt=function(){},Jt=function(t,e){var i={type:"Feature",id:e.id,properties:e.properties||{},geometry:Zt(t,e)};return null==e.id&&delete i.id,i},Zt=function(e,i){function n(e){return e=t.Ja(e,0),r(e,0),e}function s(e){for(var i=[],n=0,s=e.length;n<s;++n){var a,o=e[n],h=i;h.length&&h.pop();for(var c=l[0>o?~o:o],u=0,d=c.length;u<d;++u)h.push(a=t.Ja(c[u],0)),r(a,u);0>o&&Xt.Id().reverse(h,d)}return 2>i.length&&i.push(t.Ja(i[0],0)),i}function a(e){for(e=s(e);4>e.length;)e.push(t.Ja(e[0],0));return e}function o(e){return(0,t.Wa)(e,a)}var r=function(e){if(!e)return t.ia;var i,n,s=e.scale[0],a=e.scale[1],o=e.translate[0],r=e.translate[1];return function(t,e){e||(i=n=0),i+=t[0],n+=t[1],t[0]=i*s+o,t[1]=n*a+r}}(e.transform),l=e.arcs,h={Point:function(t){return n(t.coordinates)},MultiPoint:function(e){return(0,t.Wa)(e.coordinates,n)},LineString:function(t){return s(t.arcs)},MultiLineString:function(e){return(0,t.Wa)(e.arcs,s)},Polygon:function(t){return o(t.arcs)},MultiPolygon:function(e){return(0,t.Wa)(e.arcs,o)}};return function e(i){var n=i.type;return"GeometryCollection"===n?{type:n,geometries:(0,t.Wa)(i.geometries,e)}:n in h?{type:n,coordinates:h[n](i)}:null}(i)},Qt=function(t){this.Y=t,this.b=!0,this.i=this.f=null},te=function(){t.Mz.call(this),this.Ga("map"),this.bA=this.Ht=null,this.rV=[],this.wl=null,this.zw=[],this.xM=this.An=null,this.Cr=0,this.Jy=!0,this.ta("zoomFactor",1.3),this.Fl=window.NaN,this.Q3=new j(this),t.Ld(this,"animationstart",(function(){this.j7=!0}),!1,this),t.Ld(this,"animationend",(function(){this.j7=!1;for(var t,e=this.hb.length;e--;)21==(t=this.hb[e]).bf.type&&(t.ZA=this.zf.Ig().clone(),t.B(1024),t.W());this.wC=!0,this.GW||le(this)}),!1,this),this.Nr=!1,this.c3=(0,t.pa)(this.$da,this),this.Wka=(0,t.pa)((function(){this.LJ&&this.Eq(this.RW),this.wc.gc(this,["pointerdown","touchstart"],this.z6,!1,this),this.z6=null,this.wc.gc(this,["pointermove","touchmove"],this.y6,!1,this),this.y6=null,this.u6=!1}),this),this.tea=(0,t.pa)((function(){this.FN||this.Eq(this.RW),this.wc.gc(this,["pointermove","mousemove"],this.w6,!1,this),this.w6=null,this.f4=!1}),this),this.O$=(0,t.pa)(this.Eq,this),this.vX=this.sG=null,this.It=[],this.jE=null,this.eo=[],this.ux(this.oa.unboundRegions||"as-is"),this.ta("defaultSeriesType","choropleth"),this.wc.wa(this,["pointerdown","touchstart"],this.Vka),t.T(this.ua,[["geoIdField",4194320,1],["overlapMode",8388608,1],["minZoomLevel",0,0],["maxZoomLevel",0,0],["selectPolygonMarqueeFill",0,0,0,function(){this.kN()&&this.Dm&&this.Dm.fill(this.g("selectPolygonMarqueeFill"))}],["selectPolygonMarqueeStroke",0,0,0,function(){this.kN()&&this.Dm&&this.Dm.stroke(this.g("selectPolygonMarqueeStroke"))}],["selectPolygonMarqueeMarker",0,0,0,function(){if(this.kN()&&this.rp){var e=this.g("selectPolygonMarqueeMarker")||{},i=t.Ub(e.fill),n=t.Wb(e.stroke);e=e.radius||15,this.rp.stroke(n),this.rp.fill(i),this.pN=e}}]])},ee=function(e){e.ue.oc(1,0,0,1,0,0);var i,n=e.zf.Ig();for(e.$f&&e.$f.update(),i=e.hb.length;i--;){var s=e.hb[i];s.enabled()&&s.kz()}for(i=e.eo.length;i--;)(s=e.eo[i]).enabled()&&s.kz();if(t.wr(e,"axesSettings"))for(s=e.Rp.zm(),i=0;i<s.length;i++){var a=s[i];a.enabled()&&a.kz(n)}if(t.wr(e,"gridsSettings"))for(i=(e=e.yy.zm()).length;i--;)(s=e[i]).enabled()&&s.kz(n)},ie=function(t){t.Y2=!1,ne(t),t.Dm.parent(null),t.ku.parent(null),t.rp.parent(null),t.Na.gc("mousemove",t.L4,!0,t),t.Na.gc("dblclick",t.K4,!0,t),t.Na.gc("click",t.J4,!0,t),t.yk.length=0,t.xV=t.wV=t.WH=null,t.nB=!1},ne=function(t){t.Dm&&(t.Dm.clear(),t.ku.clear(),t.rp.Eb(0))},se=function(t,e,i,n){return{type:t,offsetX:n.offsetX,offsetY:n.offsetY,clientX:n.clientX,clientY:n.clientY,screenX:n.screenX,screenY:n.screenY,button:n.button,actionButton:n.actionButton,keyCode:n.keyCode,charCode:n.charCode,ctrlKey:n.ctrlKey,altKey:n.altKey,shiftKey:n.shiftKey,metaKey:n.metaKey,platformModifierKey:n.platformModifierKey,originalEvent:n,polygon:e,polygonBounds:i}},ae=function(e,i){var n;return(n=re(e)?t.ok():new t.dC(e.Zz,e.v0)).parent(i),n.oc(1,0,0,1,0,0),n},oe=function(e,i){for(var n=i.Gi(),s=0,a=n.length;s<a;s++){var o=n[s];t.J(o,t.Ag)?e.v0(o):t.J(o,t.Fg)&&oe(e,o)}},re=function(e){return e.jE?"svg"==e.jE.Ma():!!e.An&&(t.z(e.An)&&t.ec(e.An,"<")||t.Oe(e.An))},le=function(e){var i,n,s,a,o,r,l,h={},c={},u="allow-overlap"!=e.g("overlapMode");for(e.GW=!0,i=e.hb.length;i--;){var d=e.hb[i],p=d.Ma();if(t.da(e.wC)?e.wC:e.wC[p]){var g=d.$(),f=g.Hb(),b=null===d.rO()&&u||"no-overlap"==d.rO();p=h[p]?h[p]:h[p]=[];var v=0;for(n=f;v<n;v++){(f={}).X=d,f.Ta=d.ek(v,t.gm),e.GW=e.GW&&!f.Ta,f.index=v,f.so=[],f.state=!0,g.select(f.index);var m,y=g.j("currentPointElement");y&&(m=y.properties),y=null!=(y=g.get("overlapMode"))?y:m&&null!=m.overlapMode?m.overlapMode:null,f.GV=null==y&&b||null!=y&&"no-overlap"==t.Uk(y),y=g.get("labelrank"),f.JO=(0,window.parseFloat)(t.p(y)?y:m&&t.p(m.labelrank)?m.labelrank:0),p.push(f)}c[d.ma()]=[]}}for(t.Dc(h,(function(e){for(i=0,n=e.length;i<n;i++){for(r=e[i],a=r.Ta,v=0,s=e.length;v<s;v++)l=e[v],o=l.Ta,i!=v&&t.bn(a,o)&&r.so.push(l);r.YU=r.so.length}for(var h=new kt(e,(function(t,e){return(t=t?t.YU:window.NaN)>(e=e?e.YU:window.NaN)?1:0}));e.length;){var u=h.pop();if(u.state&&u.GV){for(i=0,n=u.so.length;i<n;i++){var d=u.so[i];d.state&&u.state&&(u.GV&&!d.GV?u.state=!1:u.JO==d.JO?u.X.ma()<=d.X.ma()&&(u.state=!1):u.JO<d.JO&&(u.state=!1))}if(!u.state)for(i=0,n=u.so.length;i<n;i++)(d=u.so[i]).YU--,-1!=(d=(0,t.za)(e,d))&&$t(h,d)}c[u.X.ma()][u.index]=u.state}})),i=e.hb.length;i--;)(d=e.hb[i]).ka(),F(d,c[d.ma()]),d.W(),d.da(!1)},he=function(e,i,n,s,a){var o,r,l,h=0;for(r=i.length;h<r;h++)if(o=i[h]){if(s){var c={};t.Gc(o,"properties")&&(c.properties=t.Qc(o.properties))}else a&&(c=e.wl[h]);if(t.Gc(o,"geometries")){var u=o.geometries;s?l=[]:a&&(l=c.geometries);var d=u.length;for(o=0;o<d;o++){var p=s?l[o]={}:a?l[o]:null;ue(e,u[o],n,p,s)}}else ue(e,o,n,c,s);s&&(e.wl[h]=c)}},ce=function(e,i,n,s){if(i){var a;if(re(e)){if(t.Gc(i,"type"))if("group"==i.type){i.ia||(i.ia=ae(e,n));var o=i.features,r=o.length;for(a=0;a<r;a++)ce(e,o[a],i.ia,s);t.Dc(i.attrs,(function(t,e){"id"==e?i.ia.id(t):"clip-path"==e?(t.ia=Rt(t.commands,t.ia),i.ia.clip(t.ia)):i.ia.Cd(e,t)}),e)}else"image"==i.type?(i.ia||(i.ia=n.wk()),s=i.bounds,i.ia.x(s.left),i.ia.y(s.top),i.ia.width(s.width),i.ia.height(s.height),i.ia.src(i.attrs["xlink:href"])):"path"==i.type?(i.ia||(i.ia=e.Zz(n)),Rt(i.commands,i.ia),t.Dc(i.attrs,(function(e,s){if("id"==s)i.ia.id(e);else if("clip-path"==s)e.ia=Rt(e.commands,e.ia),i.ia.clip(e.ia);else if("fill"==s){if(t.C(e))if(e.type&&"pattern"==e.type){var l=e.bounds;if(!e.ia)for(e.ia=t.Sb(l),e.ia.parent(n),e.ia.oc(1,0,0,1,0,0),o=e.features,r=o.length,a=0;a<r;a++)ce(this,o[a],e.ia,null);l=e.ia}else l=e;else l=e;i.ia.fill(l)}else if("stroke"==s){if(t.C(e))if(e.type&&"pattern"==e.type){if(l=e.bounds,!e.ia)for(e.ia=t.Sb(l),e.ia.parent(n),e.ia.oc(1,0,0,1,0,0),o=e.features,r=o.length,a=0;a<r;a++)ce(this,o[a],e.ia,null);l=e.ia}else l=e;else l=e;i.ia.stroke(l)}else i.ia.Cd(s,e)}),e)):"text"==i.type&&(i.ia||(i.ia=new t.Yh),(s=i.cloneNode.cloneNode(!0)).removeAttribute("transform"),i.ia.content(s));i.ia&&((s=i.tx?i.tx.self:null)&&i.ia.oc(s.od,s.We,s.gf,s.Le,s.Jd,s.Fd),i.ia.parent(n),"group"!=i.type&&e.zw.push(i.ia))}else if(s=t.eC(n),i.ia=s,e.zw.push(s),t.Gc(i,"geometries"))for(s=i.geometries,r=s.length,a=0;a<r;a++)ue(e,s[a],e.f1);else ue(e,i,e.f1);if(e.J(262144)){for(s=e.hb.length;s--;)e.hb[s].ss=e.wl;e.I(262144)}}},ue=function(e,i,n,s,a){var o,r;if(i)if(t.Gc(i,"polygones")){var l=i.polygones,h=l.length;for(a?r=[]:s&&(r=s.polygones),o=0;o<h;o++){var c=l[o],u=c.outerPath,d=c.holes;if(a)var p={outerPath:u=t.Ha(u),holes:[]};else if(s){u=(p=r[o]).outerPath=t.Ha(u);var g=p.holes}var f=u.length;for(c=0;c<f-1;c+=2)n.call(e,u,c,i);for(f=d.length,c=0;c<f;c++){var b=d[c];for(a?(b=t.Ha(b),p.holes.push(b)):s&&(b=g[c]=t.Ha(b)),u=0;u<b.length-1;u+=2)n.call(e,b,u,i)}a&&r.push(p)}a&&(s.polygones=r)}else if(t.Gc(i,"paths")){for(h=(p=i.paths).length,a?l=[]:s&&(l=s.paths),o=0;o<h;o++)for(r=p[o],a?(r=t.Ha(r),l.push(r)):s&&(r=l[o]=t.Ha(r)),f=r.length,c=0;c<f-1;c+=2)n.call(e,r,c,i);a&&(s.paths=l)}else if(t.Gc(i,"coordinates"))for(f=(o=i.coordinates).length,a?(o=t.Ha(o),s.coordinates=o):s&&(o=s.coordinates=t.Ha(o)),c=0;c<f-1;c+=2)n.call(e,o,c,i);else if(t.Gc(i,"type"))if("path"==i.type)(a||s)&&(s.type=i.type,s.commands=i.commands,s.commands_tx=i.commands_tx,s.attrs=i.attrs,s.properties=i.properties,s.tx=i.tx),n.call(e,null,0,i);else if("image"==i.type)(a||s)&&(s.type=i.type,s.bounds=i.bounds,s.attrs=i.attrs,s.properties=i.properties,s.sourceNode=i.sourceNode,s.cloneNode=i.cloneNode,s.tx=i.tx),n.call(e,null,0,i);else if("text"==i.type)(a||s)&&(s.type=i.type,s.text=i.text,s.cloneNode=i.cloneNode,s.attrs=i.attrs,s.properties=i.properties,s.tx=i.tx),n.call(e,null,0,i);else if("group"==i.type){for(r=(f=i.features).length,a?o=[]:s&&(o=s.features),c=0;c<r;c++)p=f[c],a?(h={},t.Gc(p,"properties")&&(h.properties=p.properties)):s&&(h=p),ue(e,p,n,h,a),a&&o.push(h);a&&(s.features=o),(a||s)&&(s.type=i.type,s.attrs=i.attrs,s.tx=i.tx)}},de=function(t,e,i,n){if("group"==e.type)for(var s=0,a=e.features.length;s<a;s++){var o=e.features[s];i.call(n,e),de(t,o,i,n)}else i.call(n,e)},pe=function(t,e){if(!t.wl)return null;for(var i=0,n=t.wl.length;i<n;i++){var s=t.wl[i];if(s.properties[t.g("geoIdField")]==e)return s}return null},ge=function(t){var e=t.vX;return e||(t.lka={},e=t.lka.root=t,t.zX="root",t.sG=e,t.vX=e),e},fe=function(t){return{type:"drillchange",path:t=t.uA(),current:t[t.length-1]}},be=function(e,i,n){if(e.O()){var s=ge(e),a=e.Fh();s.Cv=!0;var o=pe(a,i);if(o){var r=o.ia.kr();o=o.properties}else t.kl(301,null,[i]),r=(r=s.dg())?new t.I(r.left+r.width/2-1,r.top+r.height/2-1,1,1):new t.I(0,0,1,1),(o={})[a.g("geoIdField")]=i;var l=t.zm("map");if(n.g("maxZoomLevel")==l.maxZoomLevel&&n.ta("maxZoomLevel",a.g("maxZoomLevel")),n.g("minZoomLevel")==l.minZoomLevel&&n.ta("minZoomLevel",a.g("minZoomLevel")),n.tj()&&!n.ef(0).kd()&&(l=a.ef(0).kd(),n.ef(0).kd(l)),n.tj()&&"choropleth"==n.ef(0).kk()&&!t.wr(n,"colorRange")&&t.wr(a,"colorRange")){l=a.Qi(),n.Qi(l.F());var h=n.Qi();h.labels().format(l.labels().format()),h.labels().positionFormatter(l.labels().positionFormatter()),h.qb().format(l.qb().format()),h.qb().positionFormatter(l.qb().positionFormatter())}!t.wr(n,"legend")&&t.wr(a,"legend")&&(l=a.eg(),n.eg(l.F())),n.wja=a,n.vX=ge(e),n.enabled(!0).O(e.O()).W(),n.Lc(),n.zX=i,n.kb(s),i=ye(n,r,void 0,!0),n.Nr=!0,n.Fl=0,n.kj(1/i[0],i[1],i[2]),e.Bv(n,(function(e,i,n,s,a){n.Cv&&(i.Ua().Lc(null),i.Lc(),i.Md(),n.sG=e,n.It.push(new T(i,e,a,this.zX)),e.show(),e.Ua().Lc(null),i=ye(e,s,void 0,!0),e.Fl=400,e.Nr=!0,e.kj(this.g("minZoomLevel"),i[1],i[2]),this.Bv(e,(function(e){this.kj(this.g("minZoomLevel")),e.Cv=!1,(0,window.setTimeout)((0,t.pa)((function(){this.dispatchEvent(fe(this))}),e),0)}),n))}),n,a,s,r,o)}},ve=function(e,i,n){var s=ge(e),a=e.Fh();if(a!=i){s.Cv=!0,a.Fl=700,function(e){var i=(e=e.Fh()).zf,n=e.g("minZoomLevel"),s=i.rb();i=i.kp();var a=(s.left+s.width/2)*(1-n);return s=(s.top+s.height/2)*(1-n),t.Wm(e.Sg(),n)&&t.Wm(i[4],a)&&t.Wm(i[5],s)}(a)||a.kj(e.g("minZoomLevel"));var o=n||1;e.Bv(a,(function(e,i){var n=pe(e,i.It[i.It.length-o].oy());if(n){var s=n.ia.kr(),a=ye(this,s);n=a[0],s=a[1],a=a[2]}else t.kl(301,null,[this.zX]),n=10;this.Nr=!0,this.Fl=400,this.kj(1/n,s,a),this.Bv(this,(function(e,i){this.kj(this.g("minZoomLevel")),this.Lc(),this.Md(),this.enabled(!1),i.sG=e,i.Cv=!1,t.Ca(i.It,i.It.length-o,o),e.Ua().Lc(null),this.Ua().Lc(null),e.show(),(0,window.setTimeout)((0,t.pa)((function(){this.dispatchEvent(fe(this))}),i),0)}),e,i)}),i,s)}},me=function(t,e){return{type:e,target:t.Fh(),from:t.aC,current:t.lq,to:t.mQ}},ye=function(e,i,n,s){e=e.Fh();var a=i.left+i.width/2,o=i.top+i.height/2,r=t.p(n)?n:e.dg(),l=r.left+r.width/2;return n=r.top+r.height/2,i=1/Math.max(i.width/r.width,i.height/r.height),s||(i=Math.max(Math.min(i*e.Sg(),e.g("maxZoomLevel")),e.g("minZoomLevel"))/e.Sg()),t.Wm(i,1,1e-7)?(s=l-a,o=n-o):(s=(l-i*a)/(1-i),o=(n-i*o)/(1-i)),[i*=e.Sg(),s,o]},Se=function(e){t.JA.call(this,e)},we=function(e){t.JA.call(this,e)},xe=function(e){t.JA.call(this,e),this.b=t.nB("curvature",t.N,!1,"curvature"),this.i=t.nB("startSize",t.Bq,!1,"startSize"),this.f=t.nB("endSize",t.Bq,!1,"endSize")},Ce=function(e,i,n,s,a,o,r,l,h,c,u,d,p,g){var f,b=Math.abs(s-o),v=Math.abs(a-r);v=t.Tm(t.cb(Math.atan(v/b)),7),o<s&&r<a?f=v:o<s&&r>a?f=-v:o>s&&r>a?f=v-180:o>s&&r<a&&(f=180-v);var m=u/2;v=0>d?-90:90;var y,S=s+Math.cos(t.bb(f+v))*m,w=a+Math.sin(t.bb(f+v))*m;u=s+Math.cos(t.bb(f-v))*m,f=a+Math.sin(t.bb(f-v))*m,b=Math.abs(i-l),v=Math.abs(n-h),v=t.Tm(t.cb(Math.atan(v/b)),7),l<i&&h<n?y=v-180:l<i&&h>n?y=180-v:l>i&&h>n?y=v:l>i&&h<n&&(y=-v),m=c/2,v=0>d?-90:90,b=i+Math.cos(t.bb(y+v))*m;var x=n+Math.sin(t.bb(y+v))*m;c=i+Math.cos(t.bb(y-v))*m,y=n+Math.sin(t.bb(y-v))*m;var C=t.gn(b,x,S,w);v=C/2*d;var D=(b+S)/2+Math.cos(t.bb(g))*v*1.2,T=(x+w)/2+Math.sin(t.bb(g))*v*1.2;v=C/2*d,m=0<d?1:-1,m=Math.abs(v)<C/4?C/4*m:Math.abs(v)>C/2?C/2*m:v,v=(0>d?90:-90)*p,C=D+Math.cos(t.bb(g+v))*m;var k=T+Math.sin(t.bb(g+v))*m;return v=(0>d?-90:90)*p,D+=Math.cos(t.bb(g+v))*m,v=T+Math.sin(t.bb(g+v))*m,e.moveTo(S,w),e.Sk(C,k,D,v,b,x),w=(b=t.gn(c,y,u,f))/2*d,S=(c+u)/2+Math.cos(t.bb(g))*w*1.2,w=(y+f)/2+Math.sin(t.bb(g))*w*1.2,v=b/2*d,m=0<d?1:-1,m=Math.abs(v)<b/4?b/4*m:Math.abs(v)>b/2?b/2*m:v,v=(0>d?90:-90)*p,b=S+Math.cos(t.bb(g+v))*m,x=w+Math.sin(t.bb(g+v))*m,v=(0>d?-90:90)*p,d=S+Math.cos(t.bb(g+v))*m,g=w+Math.sin(t.bb(g+v))*m,e.lineTo(c,y),e.Sk(d,g,b,x,u,f),e.close(),[i,n,l,h,o,r,s,a]},De=function(e){t.pC.call(this,e)},Te=function(){var t=new te;return t.$c(),t},ke=function(t){var e=new te;e.Ga("bubbleMap"),e.$c(),e.ta("defaultSeriesType","bubble");for(var i=0,n=arguments.length;i<n;i++)e.bubble(arguments[i]);return e},$e=function(t){var e=new te;e.Ga("choropleth"),e.$c(),e.ta("defaultSeriesType","choropleth");for(var i=0,n=arguments.length;i<n;i++)e.choropleth(arguments[i]);return e},Oe=function(t){var e=new te;e.Ga("connector"),e.$c(),e.ta("defaultSeriesType","connector");for(var i=0,n=arguments.length;i<n;i++)e.connector(arguments[i]);return e},Pe=function(t){var e=new te;e.Ga("markerMap"),e.$c(),e.ta("defaultSeriesType","marker");for(var i=0,n=arguments.length;i<n;i++)e.marker(arguments[i]);return e},Le=function(t){var e=new te;e.Ga("seatMap"),e.$c(),e.ta("defaultSeriesType","choropleth");for(var i=0,n=arguments.length;i<n;i++)e.choropleth(arguments[i]);return e};t.Bd.prototype.J1=t.ca(0,(function(){return this.kf}));var Ge={qma:"as-is",bpa:"hide"},Fe={nna:"choropleth",qQ:"bubble",av:"marker",wna:"connector"},Ie=!1;t.H(s,t.Ex),s.prototype.handleEvent=function(t){this.b(t)&&(t.preventDefault(),s.u.handleEvent.call(this,t))},s.prototype.R=function(){s.u.R.call(this),this.b=null},t.g=a.prototype,t.g.asin=function(t){return 1<t?Math.PI/2:-1>t?-Math.PI/2:Math.asin(t)},t.g.acos=function(t){return 1<t?0:-1>t?Math.PI:Math.acos(t)},t.g.sinh=function(t){return.5*(Math.exp(t)-Math.exp(-t))},t.g.cosh=function(t){return.5*(Math.exp(t)+Math.exp(-t))},t.g.forward=function(t,e){return[t,e]},t.g.xj=function(t,e){return[t,e]},t.H(r,a),r.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.cos(i),s=(s=this.acos(n*Math.cos(e/=2)))?s/Math.sin(s):1;return[e=2*n*Math.sin(e)*s,i=Math.sin(i)*s]},r.prototype.xj=function(e,i){if(e*e+4*i*i>Math.PI*Math.PI+1e-6)return[window.NaN,window.NaN];var n=e,s=i,a=25,o=0;do{var r=Math.sin(n),l=Math.sin(n/2),h=Math.cos(n/2),c=Math.sin(s),u=Math.cos(s),d=Math.sin(2*s),p=c*c,g=u*u,f=l*l,b=1-g*h*h,v=b?this.acos(u*h)*Math.sqrt(o=1/b):o=0;b=2*v*u*l-e;var m=v*c-i,y=o*(g*f+v*u*h*p),S=o*(.5*r*d-2*v*c*l);if(!(h=S*(r=.25*o*(d*l-v*c*g*r))-(u=o*(p*h+v*f*u))*y))break;n-=S=(m*S-b*u)/h,s-=b=(b*r-m*y)/h}while((1e-6<Math.abs(S)||1e-6<Math.abs(b))&&0<--a);return[t.Za(t.cb(n),-180,180),t.Za(t.cb(s),-180,180)]},t.H(l,a),l.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.tan(i/2),s=o(1-n*n),a=1+s*Math.cos(e/=2),r=(n/=a)*n;return[4/3*(s=Math.sin(e)*s/a)*(3+(a=s*s)-3*r),4/3*n*(3+3*a-r)]},l.prototype.xj=function(e,i){if(i*=.375,!(e*=.375)&&1<Math.abs(i))return[window.NaN,window.NaN];var n=1+e*e+i*i,s=Math.sqrt(.5*(n-Math.sqrt(n*n-4*i*i)));n=this.asin(s)/3,s?(s=Math.abs(i/s),s=Math.log(s+o(s*s-1))/3):(s=Math.abs(e),s=Math.log(s+o(s*s+1))/3);var a=Math.cos(n),r=this.cosh(s),l=r*r-a*a;return e=2*(0<e?1:0>e?-1:0)*Math.atan2(this.sinh(s)*a,.25-l),i=2*(0<i?1:0>i?-1:0)*Math.atan2(r*Math.sin(n),.25+l),[t.cb(e),t.cb(i)]},t.H(h,a),h.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=this.b+this.f-i,s=n?e*Math.cos(i)/n:n;return[e=n*Math.sin(s),i=this.b-n*Math.cos(s)]},h.prototype.xj=function(e,i){var n=Math.sqrt(e*e+(i=this.b-i)*i),s=this.b+this.f-n;return e=n/Math.cos(s)*Math.atan2(e,i),[t.cb(e),t.cb(s)]},t.H(c,a),c.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.sqrt(8/(3*Math.PI));return[e=n*e*(1-Math.abs(i)/Math.PI),n*i]},c.prototype.xj=function(e,i){var n=Math.sqrt(8/(3*Math.PI)),s=i/n;return e/=n*(1-Math.abs(s)/Math.PI),[t.cb(e),t.cb(s)]},t.H(u,a),u.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.sqrt(Math.PI*(4+Math.PI));return[e=2/n*e*(1+Math.sqrt(1-4*i*i/(Math.PI*Math.PI))),4/n*i]},u.prototype.xj=function(e,i){var n=Math.sqrt(Math.PI*(4+Math.PI))/2;return e=e*n/(1+o(1-i*i*(4+Math.PI)/(4*Math.PI))),[t.cb(e),t.cb(i*n/2)]},t.H(d,a),d.prototype.forward=function(e,i){return[e=t.bb(e),i=t.bb(i)]},d.prototype.xj=function(e,i){return[t.cb(e),t.cb(i)]},t.H(p,a),p.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.cos(t.bb(35)),s=Math.tan(i/2);return[e=e*n*o(1-s*s),(1+n)*s]},p.prototype.xj=function(e,i){var n=Math.cos(t.bb(35)),s=i/(1+n);return e=e?e/(n*o(1-s*s)):0,i=2*Math.atan(s),[t.cb(e),t.cb(i)]},t.H(g,a),g.prototype.forward=function(t,e){var i=Math.cos(e),n=this.scale(Math.cos(t)*i);return[t=n*i*Math.sin(t),e=n*Math.sin(e)]},g.prototype.xj=function(e,i){var n=t.gn(0,0,e,i),s=this.angle(n),a=Math.sin(s);return[e=Math.atan2(e*a,n*Math.cos(s)),i=Math.asin(n&&i*a/n)]},t.H(f,a),f.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=this.f.forward(e/2,i);return n[0]*=this.b,[e=n[0],i=n[1]]},f.prototype.xj=function(e,i){var n=this.f.xj(e/this.b,i);return n[0]*=2,e=n[0],i=n[1],[t.cb(e),t.cb(i)]},t.H(b,a),b.prototype.forward=function(e,i){return e=t.bb(e),i=t.bb(i),[e,i=Math.log(Math.tan(Math.PI/4+i/2))]},b.prototype.xj=function(e,i){return i=2*Math.atan(Math.exp(i))-Math.PI/2,[t.cb(e),t.cb(i)]},t.H(v,a),v.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=this.b.forward(e,i);return[e=n[0],i=n[1]]},v.prototype.xj=function(e,i){var n=this.b.xj(e,i);return e=n[0],i=n[1],[t.cb(e),t.cb(i)]},t.H(m,a),m.prototype.forward=function(t,e){return this.b(this.f).forward([t,e])},m.prototype.xj=function(t,e){return this.b(this.f).inverse([t,e])},t.H(y,a);var Ee=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];y.prototype.forward=function(e,i){if((0,window.isNaN)(e)||(0,window.isNaN)(i))return[window.NaN,window.NaN];e=t.bb(e),i=t.bb(i);var n,s=Math.min(18,36*Math.abs(i)/Math.PI),a=Math.floor(s);s-=a;var o=(n=Ee[a])[0],r=n[1],l=(n=Ee[++a])[0],h=n[1];return a=(n=Ee[Math.min(19,++a)])[0],n=n[1],[e*(l+s*(a-o)/2+s*s*(a-2*l+o)/2),i=(0<i?Math.PI/2:-Math.PI/2)*(h+s*(n-r)/2+s*s*(n-2*h+r)/2)]},y.prototype.xj=function(e,i){if((0,window.isNaN)(e)||(0,window.isNaN)(i))return[window.NaN,window.NaN];var n=i/Math.PI/2,s=90*n,a=Math.min(18,Math.abs(s/5)),o=Math.max(0,Math.floor(a));do{var r=Ee[o][1],l=Ee[o+1][1],h=Ee[Math.min(19,o+2)][1],c=h-r,u=2*(Math.abs(n)-l)/c;if(0<=(u*=1-(r=(h-2*l+r)/c)*u*(1-2*r*u))||1===o){s=(0<=i?5:-5)*(u+a),n=50;do{u=(a=Math.min(18,Math.abs(s)/5))-(o=Math.floor(a)),r=Ee[o][1],l=Ee[o+1][1],h=Ee[Math.min(19,o+2)][1],s-=t.cb(a=(0<=i?Math.PI/2:-Math.PI/2)*(l+u*(h-r)/2+u*u*(h-2*l+r)/2)-i)}while(1e-12<Math.abs(a)&&0<--n);break}}while(0<=--o);return a=Ee[o][0],n=Ee[o+1][0],o=Ee[Math.min(19,o+2)][0],i=t.bb(s),[t.cb(e/(n+u*(o-a)/2+u*u*(o-2*n+a)/2)),t.cb(i)]},t.H(S,a),S.prototype.forward=function(e,i){return e=t.bb(e),i=t.bb(i),[e*=Math.sqrt(1-3*i*i/(Math.PI*Math.PI)),i]},S.prototype.xj=function(e,i){return e/=Math.sqrt(1-3*i*i/(Math.PI*Math.PI)),[t.cb(e),t.cb(i)]},t.H(D,t.hx);var Ae={};t.sq(Ae,[[0,"zoomOnDoubleClick",t.Dq],[0,"keyboardZoomAndMove",t.Dq],[0,"drag",t.Dq],[0,"copyFormat",t.gr]]),t.U(D,Ae),D.prototype.F=function(){var e=D.u.F.call(this);return t.Tq(this,Ae,e),e},D.prototype.U=function(e,i){D.u.U.call(this,e,i),t.Iq(this,Ae,e)},t.H(T,t.EA),t.g=T.prototype,t.g.get=function(e){return t.D(this.ya.data)?this.ya.data().get(this.index,e):void 0},t.g.oy=function(){return this.id},t.g.nba=function(){return this.f},t.g.Q1=function(){return this.b},t.g.Ifa=function(){return this.xc()};var Ue=T.prototype;Ue.getId=Ue.oy,Ue.getProperties=Ue.nba,Ue.getCurrentChart=Ue.Q1,Ue.getParentChart=Ue.Ifa,Ue.get=Ue.get,t.H(k,t.FA),t.g=k.prototype,t.g.ny=function(){var t=this.X.$();return t.select(this.index),t.j("features")[0].properties},t.g.Efa=function(){var t=this.X.$();return t.select(this.index),t.j("features")[0].ia.kr()},t.g.Rha=function(e){if(t.p(e))return this.set("middle-x",e),this;(e=this.X.$()).select(this.index),e=(e=e.j("features"))&&e.length?e[0].properties:null;var i=this.get("middle-x");return t.p(i)?i:e?e["middle-x"]:.5},t.g.Sha=function(e){if(t.p(e))return this.set("middle-y",e),this;(e=this.X.$()).select(this.index),e=(e=e.j("features"))&&e.length?e[0].properties:null;var i=this.get("middle-y");return t.p(i)?i:e?e["middle-y"]:.5},t.g.pla=function(e,i){var n=this.xc();if(t.p(e)||t.p(i)){var s=P(this.X),a=this.ny();return a&&s&&(s=a[s])&&n.BT(s,e,i),this}return n.BT(this.ny()[P(this.X)])},t.g.translate=function(t,e){return this.xc().R6(this.ny()[P(this.X)],t,e),this},t.g.Pg=function(e){var i=this.xc();return t.p(e)?(i.zT(this.ny()[P(this.X)],e),this):i.zT(this.ny()[P(this.X)],e)},t.g.kka=function(e){var i=this.xc();return t.p(e)?(i.AT(this.ny()[P(this.X)],e),this):i.AT(this.ny()[P(this.X)],e)};var _e=k.prototype;_e.getFeatureProp=_e.ny,_e.getFeatureBounds=_e.Efa,_e.middleX=_e.Rha,_e.middleY=_e.Sha,_e.translation=_e.pla,_e.translate=_e.translate,_e.crs=_e.Pg,_e.scaleFactor=_e.kka,t.H($,t.xB),t.g=$.prototype,t.g.ra=1152|t.xB.prototype.ra,t.g.sa=4194304|t.xB.prototype.sa,t.g.zQ=13e-6,t.g.sF={},t.g.my=function(){return 0},t.g.HF=null,t.g.Ge=function(e,i,n){e=e||this.g("color")||"blue";var s,a=this.$(),o={},r=this.kd();return n=t.p(n)&&n,r&&!n&&(n=a.get(this.bf.El),t.p(n)&&(s=r.Qq(n)),t.Sc(o,{scaledColor:s,colorScale:r})),I(this)&&(s=a.j("currentPointElement"),r=(r=a.j("features"))&&r.length?r[0]:null,t.Sc(o,{properties:r?r.properties:null,attributes:s?s.attrs:null,element:s?s.domElement:null})),o.sourceColor=e,this.kt()&&(a=i?this.cg():a,t.Sc(o,{index:a.ma(),sourceColor:e,iterator:a,referenceValueNames:this.Be()})),o},t.g.Yi=function(t){var e=this.Eh();return this.kt()?{index:(t=t?this.cg():this.$()).ma(),sourceHatchFill:e,iterator:t,referenceValueNames:this.Be()}:{sourceHatchFill:e}},t.g.lD=function(e){return t.p(e)?(e!=this.b&&(this.b=e,this.B(1536,5)),this):this.b||this.i},t.g.ek=function(e,i){var n=this.$();n.select(e);var s=t.p(i)?i:t.nx(this.state,e),a=!!(s&t.wo),o=!a&&!!(s&t.vo),r=n.get("normal");r=t.p(r)?r.label:void 0;var l=(r=t.Zo(r,n.get("label")))&&t.p(r.enabled)?r.enabled:null,h=this.Qa().labels(),c=null;if(a){var u=n.get("selected");u=t.p(u)?u.label:void 0;var d=(u=t.Zo(u,n.get("selectLabel")))&&t.p(u.enabled)?u.enabled:null;c=this.selected().labels()}else o?(u=n.get("hovered"),u=t.p(u)?u.label:void 0,d=(u=t.Zo(u,n.get("hoverLabel")))&&t.p(u.enabled)?u.enabled:null,c=this.lb().labels()):u=null;return(a||o?null===d?null===c.enabled()?null===l?h.enabled():l:c.enabled():d:null===l?h.enabled():l)?(n=L(this,s),n=this.Bh(n),s=this.Ic(!0),a={},r&&t.Sc(a,r),c&&t.Sc(a,t.TN(c)),u&&t.Sc(a,u),u=a.anchor,t.p(u)&&null!==u||(a.anchor=this.$().j("labelAnchor")),t.ln(h.measure(s,n,a,e))):null},t.g.rO=function(e){return t.p(e)?(e=null===(e=!1===e?"no-overlap":e)?e:"allow-overlap"==t.Uk(e),this.HF!=e&&(this.HF=e,this.B(256,1025)),this):null===this.HF?this.ya.g("overlapMode"):this.HF?"allow-overlap":"no-overlap"},t.g.tf=function(e,i,n){var s=e.ma();this.f&&t.p(this.f[s])&&!this.f[s]||$.u.tf.call(this,e,i,n)},t.g.U1=function(){return this.Aa},t.g.RD=function(){return!0},t.g.XA=function(t){if(22==this.bf.type||this.Ak()){var e=U(this,t);t.j("x",e?e.x:window.NaN),t.j("value",e?e.y:window.NaN)}this.Ak()&&t.j("size",this.bG(Number(t.get("size"))))},t.g.co=function(){for(var e=-window.Infinity,i=window.Infinity,n=0,s=0,a=this.Ec();a.advance();){var o=this.enabled()?[this.$().get(this.bf.El)]:null;o&&(o=t.N(o[0]),(0,window.isNaN)(o)||(e=Math.max(e,o),i=Math.min(i,o),n+=o)),s++}a=n/s,this.La("seriesMax",e),this.La("seriesMin",i),this.La("seriesSum",n),this.La("seriesAverage",a),this.La("seriesPointsCount",s),this.La("seriesPointCount",s)},t.g.kz=function(){var t=this.Ec(),e=this.O()?this.O().Ja():null,i=e&&!e.yf();for(i&&e.suspend();t.advance()&&this.enabled();)E(this);i&&e.resume()},t.g.pk=function(e,i){var n=this.$();if(this.eh())if(I(this)){var s=n.j("features");if(!s)return void n.j("beforeDrawState",e);for(var a=0,o=s.length;a<o;a++){var r=s[a];t.p(r.ia)&&de(this.xc(),r,(function(i){var s=i.ia;if(s&&t.J(s,t.pg)){var a=n.j("beforeDrawState");t.ea(a)&&(e=a,n.j("beforeDrawState",null)),a=e;var o="s"+t.oa(s),r=s.zIndex();switch(a){case t.vo:o in this.DE&&(r=this.DE[o]),o in this.JA||(this.JA[o]=r,s.zIndex(1e4),n.j("stateZIndex",1e4),this.KH[o]=s);break;case t.wo:o in this.JA&&(r=this.JA[o],delete this.KH[o],delete this.JA[o]),o in this.DE||(this.DE[o]=r,s.zIndex(1e3),n.j("stateZIndex",1e3),this.aP[o]=s);break;default:o in this.KH&&(this.KH[o].zIndex(this.JA[o]),n.j("stateZIndex",null),delete this.KH[o],delete this.JA[o]),o in this.aP&&(this.aP[o].zIndex(this.DE[o]),n.j("stateZIndex",null),delete this.aP[o],delete this.DE[o])}n.j("currentPointElement",i),s={foreignFill:s},i.S2&&(s.hatchFill=i.S2),this.Rf.Mo(e,s),this.Rf.VB(e,s)}}),this)}}else s=n.j("shapes"),this.Rf.Mo(e,s),this.Rf.VB(e,s);return this.check(256)&&this.$L(n,e,!0),this.bf.aF(n,e),this.check(4194304)&&this.gq(n,e,!0),this.check(t.QG)&&this.tf(n,e,!0),i},t.g.pq=t.ia,t.g.k0=function(){this.I(65536)},t.g.pb=function(){if(I(this)||this.I(65536),this.J(4194304)||this.J(65536)){var e=this.Bn(),i=this.Be();this.GX.length=0;var n,s=this.Ec(),a=this.ya.SH;for(a&&(n=a[this.lD()]);s.advance();){if(this.J(4194304)){if(!n)continue;if(!(a=s.get(i[0]))||!(t.ea(a)||t.z(a)||t.A(a)))continue;a=t.A(a)?a:[a],s.j("features",void 0);for(var o=[],r=0,l=a.length;r<l;r++){var h=a[r],c=n[h];c&&(o.push(c),this.GX[s.ma()]=h)}s.j("features",o)}e&&this.J(65536)&&e.Xc(s.get(i[1]))}e&&this.J(65536)&&e.Hg(),this.I(65536),this.I(4194304)}},t.g.Gd=function(){this.pb(),this.ZA=this.ya.zf.Ig().clone(),$.u.Gd.call(this)},t.g.wn=function(e,i){if(this.J(4)&&I(this)){var n=e.j("features");if(n){var s=e.j("beforeDrawState");t.ea(s)&&(i=s,this.pk(i),e.j("beforeDrawState",null)),s=0;for(var a=n.length;s<a;s++){var o=n[s];t.p(o.ia)&&t.ru(this,o.ia)}}}$.u.wn.call(this,e,i)},t.g.qD=function(e){var i=this.Ls();i.I(i.sa);var n,s=i.F(),a={sourceColor:this.g("color")};return t.D(i.Gs())&&(s.iconFill=i.Gs().call(a,a)),t.D(i.Is())&&(s.iconStroke=i.Is().call(a,a)),t.D(i.Hs())&&(a.sourceColor=this.VF,s.iconHatchFill=i.Hs().call(a,a)),i=this.RC(),t.D(e)&&(n=e.call(i,i)),t.z(n)||(n=this.name()),"marker"==s.iconType&&this.check(4194304)&&(e=this.Qa().Db(),s.iconFill=e.fill(),s.iconStroke=e.stroke()),s.iconType=this.pD(s.iconType,i),n={text:n,iconEnabled:!0,iconStroke:void 0,iconFill:this.g("color"),iconHatchFill:void 0,disabled:!this.enabled()},t.Sc(n,s),n},t.g.GS=function(){return[this,this.xc()]},t.g.aU=function(){return{}},t.g.ym=function(e,i){var n=this.tl(),s={chart:{value:this.xc(),type:""},series:{value:this,type:""},scale:{value:n,type:""},index:{value:i.ma(),type:"number"},seriesName:{value:this.name(),type:"string"},id:{value:i.get("id"),type:"string"}},a=i.get("value");for(t.p(a)&&(s.value={value:a,type:"number"}),n&&t.D(n.Ma)&&(s.xScaleType={value:n.Ma(),type:"string"}),a=this.Be(),n=0;n<a.length;n++){var o=a[n];o in s||(s[o]={value:i.get(o),type:"number"})}if(21==this.bf.type){var r=i.j("pointsWithoutMissing");if(r&&r.length){for(s.startPoint={value:{lat:r[0],long:r[1]},type:""},s.endPoint={value:{lat:r[r.length-2],long:r[r.length-1]},type:""},o=[],n=0,a=r.length;n<a;n+=2)o.push({lat:r[n],long:r[n+1]});s.connectorPoints={value:o,type:""}}}else if((n=i.j("regionId"))&&(s.id={value:n,type:"string"}),n=(n=i.j("features"))&&n.length?n[0].properties:null)for(r in s.regionProperties={value:n,type:""},n)!n.hasOwnProperty(r)||r in s||(s[r]={value:n[r]});return s},t.g.$T=function(){return t.vB(this,new t.Fw)},t.g.nG=function(){return this.$T()},t.g.aO=function(){return!1},t.g.oba=function(t,e){var i=this.ya.scale().transform(t,e);return{x:i[0],y:i[1]}},t.g.Ic=function(e){return this.o&&!e||(this.o=new t.Fw),t.vB(this,this.o)},t.g.aM=function(e,i,n,s,a,o){var r=e[0],l=e[1],h=e[2];if(e=e[3],!s.value)return null;var c=a?r.be(n):r.jp(n);return c?(a&&c.Hf(a),c.jc(s)):c=a?r.add(a,s,n):r.add(s,n),c.Hi(),a?(c.qk(this.$().j("labelAnchor")),i.unshift(c),this.UX.apply(this,i)):(t.gy(c,l||r),h=t.Qc(h||{}),e=t.Qc(e||{}),i=c.ic("rotation"),t.p(i)&&null!==i&&!(0,window.isNaN)(i)||(i=this.$().j("markerRotation"),"rotation"in h||(h.rotation=i),"rotation"in e||(e.rotation=i)),i=c.ic("anchor"),t.p(i)&&null!==i||(i=this.$().j("markerAnchor"),"anchor"in h||(h.anchor=i),"anchor"in e||(e.anchor=i)),c.td(h,e)),o&&c.W(),24==this.bf.type&&(c.ZA=this.ya.zf.Ig().clone()),c},t.g.Bh=function(e){var i=this.$(),n={x:0,y:0};switch(this.bf.type){case 21:if(i.j("shapes").path){var s=i.j("sumDist"),a=i.j("connectorsDist"),o=i.j("points"),r=0;if(t.z(e))switch(e){case"start":var l=0;break;case"middle":l=.5;break;case"end":l=1;break;default:t.uo(e)?l=(0,window.parseFloat)(e)/100:(l=t.N(e),(0,window.isNaN)(l)&&(l=.5))}else l=t.N(e),(0,window.isNaN)(l)&&(l=.5);s*=l;for(var h=0,c=o.length;h<c;h+=8){if(e=a[h/8],s>=r&&s<=r+e){var u=(s-r)/e,d=o[h+2],p=o[h+3],g=o[h+4],f=o[h+5],b=o[h+6],v=o[h+7];n=g+(d-g)*(1-u);var m=f+(p-f)*(1-u);g=b+(g-b)*(1-u),f=v+(f-v)*(1-u),d=n+(d+(o[h]-d)*(1-u)-n)*(1-u),p=m+(p+(o[h+1]-p)*(1-u)-m)*(1-u),n=g+(n-g)*(1-u),g=f+(m-f)*(1-u),m=n+(d-n)*(1-u),u=g+(p-g)*(1-u),f=t.Tm(t.cb(Math.atan(Math.abs(g-p)/Math.abs(n-d))),7),n<d&&g<p?f-=180:n<d&&g>p?f=180-f:n>d&&g>p||n>d&&g<p&&(f=-f),i.j("labelAnchor",G(t.ab(f+90))),i.j("markerRotation",f),i.j("markerAnchor",1==l?"right-center":l?"center":"left-center")}r+=e}this.ya.j7||this.ya.dia||21!=this.bf.type?(a=this.ZA,i=this.ya.zf.Ig().clone(),a&&t.wb(i,t.Jb(a)),n={x:m*(a=i.od)+i.Jd,y:u*a+i.Fd}):n={x:m,y:u}}else n={x:0,y:0};break;case 22:case 23:n=U(this,i);break;case 24:if((u=(m=i.j("features"))&&m.length?m[0]:null)?(m=A(this),(e=i.get("label"))&&(h=e.positionMode,l=e.x,o=e.y),(n=(n=u.properties)&&n.label)&&(c=n&&n.positionMode,s=e.x,r=e.y),h=h||c||"relative",l=t.p(l)?l:s,r=t.p(o)?o:r,t.p(l)&&t.p(r)?(i.j("positionMode",h),a=m.x,o=m.y,"relative"==h?(l=t.yo(l),r=t.yo(r),l=t.uo(l)?(0,window.parseFloat)(l)/100:l,r=t.uo(r)?(0,window.parseFloat)(r)/100:r,(u=u.ia)?(l=(u=u.kr()).left+u.width*l,r=u.top+u.height*r):r=l=0):"absolute"==h?(l=(r=this.ya.scale().transform((0,window.parseFloat)(l),(0,window.parseFloat)(r)))[0],r=r[1]):"offset"==h&&(u=t.bb((0,window.parseFloat)(l)-90),l=a+(r=(0,window.parseFloat)(r))*Math.cos(u),r=o+r*Math.sin(u)),u=t.Tm(t.cb(Math.atan(Math.abs(o-r)/Math.abs(a-l))),7),a<l&&o<r?u-=180:a<l&&o>r?u=180-u:a>l&&o>r||a>l&&o<r&&(u=-u),a=G(t.ab(u-90)),i.j("labelAnchor",a),i.j("markerAnchor",a),a={x:l,y:r}):(i.j("labelAnchor","center"),i.j("markerAnchor","center"))):m=null,a?(a.connectorPoint={value:m},n=a):n=m,i=n&&n.connectorPoint)return delete n.connectorPoint,{connectorPoint:i,value:n}}return{value:n}},t.g.ce=function(t){return I(this)?new k(this,t):$.u.ce.call(this,t)};var je={};t.rq(je,0,"startSize",t.Bq),t.rq(je,0,"endSize",t.Bq),t.rq(je,0,"curvature",t.Bq),t.U($,je),$.prototype.F=function(){var e=$.u.F.call(this);return t.Tq(this,je,e),e.seriesType=this.Ma(),e.overlapMode=this.HF,t.p(this.b)&&(e.geoIdField=this.b),e},$.prototype.U=function(e,i){$.u.U.call(this,e,i),t.Iq(this,je,e),this.rO(e.overlapMode),this.lD(e.geoIdField)};var Me=$.prototype;Me.overlapMode=Me.rO,Me.geoIdField=Me.lD,Me.transformXY=Me.oba,Me.getPoint=Me.ce,t.H(N,t.xz),N.prototype.Jw=function(){this.i||M(this.map.Q3,1),N.u.Jw.call(this)},N.prototype.cm=function(){this.i||M(this.map.Q3,0),N.u.cm.call(this)},N.prototype.R=function(){N.u.R.call(this),this.map=null},t.H(B,N),B.prototype.aS=function(t,e){var i=(t[e]-this.fe.ri)/this.fe.scale,n=(t[e+1]-this.fe.jj)/this.fe.scale;this.xJ&&(i=(n=this.xJ.xj(i,n))[0],n=n[1]),i=this.fe.Yo.forward(i,n),t[e]=i[0]*this.fe.scale+this.fe.ri,t[e+1]=i[1]*this.fe.scale+this.fe.jj,this.TT.oM(t[e],t[e+1])},B.prototype.stop=function(e){t.vz(this),this.dc=t.rz,e&&(this.Kd=1),R(this,this.Kd),this.bp("stop"),this.cm()},B.prototype.uG=function(e){this.dc!=t.rz&&(this.Kd=(e-this.o)/(this.D-this.o),1<=this.Kd&&(this.Kd=1),R(this,this.Kd),1==this.Kd?(this.dc=t.rz,t.vz(this),this.eE(),this.cm()):1==this.dc&&this.en())},B.prototype.R=function(){B.u.R.call(this),this.fe=this.xJ=this.ss=null},t.H(H,N),H.prototype.Jw=function(){this.G=t.Wm(this.b[0],this.f[0],1e-5)&&this.map.oK,H.u.Jw.call(this)},H.prototype.en=function(){this.G?V(this,this.coords[1],this.coords[2]):z(this,this.coords[0]),this.i||ge(this.map).dispatchEvent(me(this.map,"zoom")),H.u.en.call(this)},H.prototype.eE=function(){if(this.map.ss()){var e=this.coords[0],i=this.coords[1],n=this.coords[2];this.G?V(this,i,n):(i=this.map.zf.Pd,n=this.map.g("minZoomLevel"),!this.map.Nr&&e<=n&&!t.zb(i)||this.map.mQ==n?(this.map.zf.oc(n,0,0,n,0,0),this.map.lq=n,this.map.scale().zoom=n,dt(this.map.scale(),0,0),ee(this.map)):z(this,e))}this.map.C3=this.map.Nr,this.map.Nr=!1,this.map.Fl=window.NaN,H.u.eE.call(this)},H.prototype.cm=function(){this.i||ge(this.map).dispatchEvent(me(this.map,"zoomend")),H.u.cm.call(this),this.map=this.map.si=null,this.ld()},t.H(q,t.Y),t.g=q.prototype,t.g.ra=t.Y.prototype.ra,t.g.sa=t.Y.prototype.sa,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this)),this):this.Y},t.g.Tc=function(e){var i=0;t.X(e,1)&&(i|=1),t.X(e,8)&&(i|=8),this.Xb=null,this.va(i)};var Ne=q.prototype,Be={};t.rq(Be,1,"stroke",t.Pq),t.rq(Be,0,"length",t.N),t.rq(Be,0,"position",t.Wk),Ne.DK=Be,t.U(q,q.prototype.DK),t.g=q.prototype,t.g.orientation=function(e){return t.p(e)?(e=t.Lk(e),this.vh!=e&&(this.vh=e,this.ep=null),this):this.vh},t.g.Nb=function(){var t=this.orientation();return"top"==t||"bottom"==t},t.g.remove=function(){this.path&&this.path.parent(null)},t.g.W=function(){return W(this),this.path.clear(),this.path.stroke(this.g("stroke")),this.zc()?(this.J(8)&&(this.path.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.path.parent(this.O()),this.I(2)),this):this},t.g.hq=function(t){t=Y(this,t),this.path.moveTo(t[0],t[1]),this.path.lineTo(t[2],t[3])},t.g.U=function(e,i){q.u.U.call(this,e,i),i?t.Hq(this.oa,this.DK,e):t.Iq(this,this.DK,e)},t.g.F=function(){var e=q.u.F.call(this);return t.Tq(this,this.DK,e,"Map axis ticks props"),e},t.g.R=function(){t.qd(this.path),this.path=null,q.u.R.call(this)},t.H(J,t.Y),t.g=J.prototype,t.g.sa=976|t.Y.prototype.sa,t.g.ra=32768|t.Y.prototype.ra,t.g.line=null,t.g.Er="axis",t.g.Da=null,t.g.mb=null,t.g.rc=null,t.g.Rc=null,t.g.qa=null,t.g.$b=null,t.g.ci=null,t.g.Fk=null,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this)),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=this.se,n|=8),t.X(e,32768)&&(i|=1,n|=9),this.Xb=null,this.B(i,n)};var Re={};t.rq(Re,1,"stroke",t.Pq),t.rq(Re,0,"overlapMode",t.Uk),t.rq(Re,0,"drawFirstLabel",t.Dq),t.rq(Re,0,"drawLastLabel",t.Dq),t.U(J,Re),t.g=J.prototype,t.g.title=function(e){return this.jb||(this.jb=new t.aw,this.jb.df(),this.jb.padding().df(),this.jb.margin().df(),t.W(this,"title",this.jb),this.jb.kb(this),this.jb.parent(this.parent().title()),t.K(this.jb,this.Mq,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.Mq=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=64,n=1),this.B(i,n)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,this.Da.df(),t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=384,n=1),this.ae(),this.B(i,n)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,this.rc.df(),t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.uba,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.uba=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=384,n=1),this.ae(),this.B(i,n)},t.g.ol=function(){var e=new q;return e.orientation(this.vh),e.kb(this),t.K(e,this.vba,this),e},t.g.Xa=function(e){return this.mb||(this.mb=this.ol(),this.mb.df(),t.W(this,"ticks",this.mb),this.mb.parent(this.parent().Xa())),t.p(e)?(this.mb.N(e),this):this.mb},t.g.yb=function(e){return this.Rc||(this.Rc=this.ol(),this.Rc.df(),t.W(this,"minorTicks",this.Rc),this.Rc.parent(this.parent().yb())),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.vba=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=384,n=1),this.ae(),this.B(i,n)},t.g.scale=function(e){return t.p(e)?(this.In!=e&&(this.In&&t.kr(this.In,this.ii,this),(this.In=e)&&t.K(this.In,this.ii,this),this.ae(),t.Yu(this.labels()),t.Yu(this.qb()),this.Xa().qa=this.In,this.yb().qa=this.In,this.B(this.se,9)),this):this.In},t.g.ii=function(e){t.X(e,2)&&(this.ae(),t.Yu(this.labels()),t.Yu(this.qb()),this.B(this.se,9))},t.g.orientation=function(e){return t.p(e)?(this.vh=e,this):this.vh},t.g.Nb=function(){return"top"==this.vh||"bottom"==this.vh},t.g.kz=function(t){this.Oa&&this.Oa.oc(t.od,t.gf,t.We,t.Le,t.Jd,t.Fd)},t.g.sy=function(){if(!this.ik||this.J(512)){if("allow-overlap"==this.g("overlapMode"))return!1;var e=this.scale(),i=[],n=[];if(e){var s,a,o,r=-1,l=-1,h=-1,c=(this.Nb()?this.scale().wx():this.scale().xx()).get(),u=c.length,d=this.parent().labels(),p=this.labels().nd("enabled");d=null==p?d.enabled():p;var g=this.Nb()?this.scale().qz():this.scale().rz();p=this.g("drawFirstLabel");var f=this.g("drawLastLabel"),b=g.get(),v=g=0,m=b.length,y=this.parent().qb(),S=this.qb().nd("enabled");for(y=null==S?y.enabled():S;g<u||v<m;){var w=(0,window.parseFloat)(c[g]);if(S=(0,window.parseFloat)(b[v]),this.Nb())var x=e.Lr(w),C=e.Lr(S);else x=e.Jp(w),C=e.Jp(S);if(S=w=s=a=null,-1==l&&d)for(o=g;-1==l&&o<u;){if(S=!o&&p||o==u-1&&f||0!=o&&o!=u-1?this.rd(o,!0,c):null,w=-1!=r?this.rd(r,!0,c):null,s=o!=u-1&&f?this.rd(u-1,!0,c):null,S&&!t.bn(S,w)&&!t.bn(S,s)){var D=this.Nb()?e.Lr(c[o]):e.Jp(c[o]);(0>=D&&p||1<=D&&f||0<D&&1>D)&&(l=o)}o++}x<=C&&g<u||v==m?(d&&g==l?(r=g,l=-1,i.push(!0)):i.push(!1),g++,x==C&&(d||this.Xa().enabled())&&(n.push(!1),v++)):(y?(S=this.rd(v,!1,b),-1!=r&&(w=this.rd(r,!0,c)),-1!=l&&(s=this.rd(l,!0,c)),-1!=h&&(a=this.rd(h,!1,b)),x=!(x=this.qb().be(v))||!t.p(x.enabled())||x.enabled(),t.bn(S,w)||t.bn(S,s)||t.bn(S,a)||!x?n.push(!1):0>=(D=this.Nb()?e.Lr(b[v]):D=e.Jp(b[v]))&&p||1<=D&&f||0<D&&1>D?(h=v,n.push(!0)):n.push(!1)):n.push(!1),v++)}y||(n=!1)}d||(i=!1),this.ik={labels:i,qb:n},this.I(512)}return this.ik},t.g.nq=function(e,i){i=(0,window.parseFloat)(i);var n=Math.abs(i)%1,s=Math.floor(Math.abs(i)),a=Math.floor(60*n);return s+="°",((n=Math.floor(60*n%1*60))||a)&&(10>a&&(a="0"+a),s+=a+"'"),s+=a=this.Nb()?0<i?"E":"W":0<i?"N":"S",a={axis:{value:this,type:""},scale:{value:a=this.scale(),type:""},index:{value:e,type:"number"},value:{value:s,type:"string"},tickValue:{value:i,type:"number"},max:{value:t.p(a.max)?a.max:null,type:"number"},min:{value:t.p(a.min)?a.min:null,type:"number"}},(s={})["%AxisName"]={value:this.title().text(),type:"string"},(a=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}).Dl(s),t.ov(a)},t.g.IM=function(e,i){switch(this.vh){case"top":var n=t.cb(e)+90;break;case"right":n=t.cb(e);break;case"bottom":n=t.cb(e)-90;break;case"left":n=t.cb(e)-180}var s=(i?this.Xa():this.yb()).g("position");return"inside"!=s&&"center"!=s||(n+=180),n},t.g.rd=function(e,i,n){var s=i?this.ci:this.Fk;if(t.p(s[e]))return s[e];var a=i?this.Xa():this.yb(),o=i?this.labels():this.qb(),r=i?this.parent().labels():this.parent().qb(),l=(0,window.parseFloat)(n[e]);n=Y(a,l);var h=o.g("position")||r.g("position");h=t.Ho(h);var c=a.g("position");return c=t.Ho(c),a.enabled()?0<c*h?(a=n[2],h=n[3]):0>c*h||c?(a=n[0],h=n[1]):(a=n[0]+(n[2]-n[0])/2,h=n[1]+(n[3]-n[1])/2):(a=n[0],h=n[1]),l=this.nq(e,l),a={value:{x:a,y:h}},h=t.TN(r),o=t.TN(o),n=this.IM(n[4],i),i=Z(this,i),t.Sc(h,o),t.p(h.rotation)||(h.rotation=n),t.p(h.anchor)||(h.anchor=i),r=r.yl(l,a,h,e),s[e]=r},t.g.yd=function(){var e=this.ja();return e?this.scale()&&this.g("enabled")?Q(this,e):e.clone():new t.I(0,0,0,0)},t.g.uo=function(){this.ae(),this.B(this.se,9)},t.g.ae=function(){this.ci.length=0,this.Fk.length=0,this.ik=null},t.g.ke=function(e,i,n){var s=i?this.Xa():this.yb(),a=i?this.labels():this.qb(),o=i?this.parent().labels():this.parent().qb(),r=Y(s,e),l=a.g("position")||o.g("position");l=t.Ho(l);var h=s.g("position");if(h=t.Ho(h),s.enabled())if(h||l)0<h*l||!h&&0>l?(c=r[2],u=r[3]):(0>h*l||!l||!h&&0<l)&&(c=r[0],u=r[1]);else var c=r[0]+(r[2]-r[0])/2,u=r[1]+(r[3]-r[1])/2;else c=r[0],u=r[1];e=this.nq(n,e),n=a.add(e,{value:{x:c,y:u}},n),r=this.IM(r[4],i),t.p(r)&&(r=t.N(r),n.Nd.rotation!==r&&(n.Nd.rotation=r,t.p(n.Pa.rotation)&&!(0,window.isNaN)(n.Pa.rotation)||n.B(16,9))),n.qk(Z(this,i)),i=t.TN(a),t.p(i.enabled)&&null==i.enabled&&delete i.enabled,t.bv(n,[n,i,"auto",o,a.oa,o.oa])},t.g.tba=function(){var t=this.scale(),e=t.precision()[0],i=t.Bq(),n=t.yq(),s=t.zq(),a=i;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,s,null);this.line.moveTo(o[0],o[1]),o=t.transform(n,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<n;){var r=(o=t.transform(a,s,null))[0];o=o[1],a==i?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(n,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.sba=function(){var t=this.scale(),e=t.precision()[1],i=t.yq(),n=t.Cq(),s=t.zq(),a=n;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,n,null);this.line.moveTo(o[0],o[1]),o=t.transform(i,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<s;){var r=(o=t.transform(i,a,null))[0];o=o[1],a==n?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(i,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.qba=function(){var t=this.scale(),e=t.precision()[0],i=t.Bq(),n=t.yq(),s=t.Cq(),a=i;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,s,null);this.line.moveTo(o[0],o[1]),o=t.transform(n,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<n;){var r=(o=t.transform(a,s,null))[0];o=o[1],a==i?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(n,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.rba=function(){var t=this.scale(),e=t.precision()[1],i=t.Bq(),n=t.Cq(),s=t.zq(),a=n;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,n,null);this.line.moveTo(o[0],o[1]),o=t.transform(i,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<s;){var r=(o=t.transform(i,a,null))[0];o=o[1],a==n?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(i,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.lo=function(){switch(tt(this).clear(),this.vh){case"top":var t=this.tba;break;case"right":t=this.sba;break;case"bottom":t=this.qba;break;case"left":t=this.rba}t.call(this),this.line.stroke(this.g("stroke"))},t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.zc=function(){return!this.pf()&&(this.g("enabled")?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.title().B(2),this.Xa().B(2),this.yb().B(2),this.labels().B(2),this.qb().B(2),this.B(2|this.se)),!1))},t.g.W=function(){var e=this.scale();if(!e)return t.il(2),this;if(e.pb(),!this.zc())return this;this.Oa||(this.Oa=t.ok(),this.title().O(this.Oa),tt(this).parent(this.Oa),this.Xa().O(this.Oa),this.yb().O(this.Oa),this.labels().O(this.Oa),this.qb().O(this.Oa));var i=this.vh;if(this.title().ka(),this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka(),this.J(16)&&(this.lo(),this.I(16)),this.J(8)){var n=this.zIndex();this.Oa.zIndex(n),tt(this).zIndex(1),this.I(8)}if(this.J(2)&&(n=this.O(),this.Oa.parent(n),this.I(2)),this.J(64)&&((n=this.title()).g("enabled")&&n.ja(Q(this)),t.dw(n,i),n.W(),this.I(64)),this.J(256)){var s=this.Xa();if(s.W(),s.enabled())var a=s.hq;var o=this.yb();if(o.W(),o.enabled())var r=s.hq;this.I(256)}if(this.J(128)){var l=this.labels();l.O()||l.O(this.O()),l.ja(this.ja()),l.clear(),l=null==(l=this.labels().nd("enabled"))?this.parent().labels().enabled():l;var h=this.qb();h.O()||h.O(this.O()),h.ja(this.ja()),h.clear(),h=null==(h=this.qb().nd("enabled"))?this.parent().qb().enabled():h,this.I(128)}if(t.p(a)||t.p(r)||l||h){n=(i=(this.Nb()?this.scale().wx():this.scale().xx()).get()).length;var c=this.sy();if(t.C(c)){h=c.labels;var u=c.qb}else h=!c,u=!c;for(var d,p=(this.Nb()?this.scale().qz():this.scale().rz()).get(),g=c=0,f=p.length;c<n||g<f;){var b=(0,window.parseFloat)(i[c]),v=(0,window.parseFloat)(p[g]);if(this.Nb()){var m=e.Lr(b);d=e.Lr(v)}else m=e.Jp(b),d=e.Jp(v);if(m<=d&&c<n||g==f){var y=t.A(h)?h[c]:h;t.da(h)&&(c||(y=y&&this.g("drawFirstLabel")),c==n-1&&(y=y&&this.g("drawLastLabel"))),(v=t.A(h)&&h[c]||t.da(h))&&a&&a.call(s,b),y&&this.ke(b,!0,c),y=m,c++}else(a||l)&&y==d||(m=t.A(u)?u[g]:u,(b=t.A(u)&&u[g]||t.da(u))&&r&&r.call(o,v),m&&this.ke(v,!1,g)),g++}u&&(t.Yu(this.parent().qb()),t.Yu(this.qb()),this.qb().W()),t.Yu(this.parent().labels()),t.Yu(this.labels()),this.labels().W()}return this.title().da(!1),this.labels().da(!1),this.qb().da(!1),this.Xa().da(!1),this.yb().da(!1),this.I(4),this},t.g.U=function(e,i){J.u.U.call(this,e,i),t.Iq(this,Re,e,i),this.title().ga(!!i,e.title),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Xa().ga(!!i,e.ticks),this.yb().ga(!!i,e.minorTicks)},t.g.F=function(){var e=J.u.F.call(this),i=this.title().F();return t.Jc(i)||(e.title=i),i=this.Xa().F(),t.Jc(i)||(e.ticks=i),i=this.yb().F(),t.Jc(i)||(e.minorTicks=i),i=t.TN(this.labels()),t.Jc(i)||(e.labels=i),i=t.TN(this.qb()),t.Jc(i)||(e.minorLabels=i),t.Tq(this,Re,e,"Map "+this.vh+" axis props"),e},t.g.R=function(){t.sd(this.jb,this.Da,this.rc,this.mb,this.Rc),this.Rc=this.mb=this.rc=this.Da=this.jb=null,J.u.R.call(this)};var He=J.prototype;He.title=He.title,He.labels=He.labels,He.minorLabels=He.qb,He.ticks=He.Xa,He.minorTicks=He.yb,t.H(et,t.V),t.g=et.prototype,t.g.sa=985,t.g.ra=32777,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e};var ze={};t.sq(ze,[t.Z.Yn,t.Z.dC,t.Z.tQ,t.Z.uQ,t.Z.vQ]),t.U(et,ze),t.g=et.prototype,t.g.zm=function(){return this.G},t.g.top=function(e){return this.o||(this.o=new J,this.o.df(),t.W(this,"top",this.o),this.o.orientation("top"),this.o.parent(this),t.K(this.o,this.D.gO,this.D),this.o.zh=li+0*hi,this.G[0]=this.o),t.p(e)?(this.o.N(e),this):this.o},t.g.right=function(e){return this.i||(this.i=new J,this.i.df(),t.W(this,"right",this.i),this.i.orientation("right"),this.i.parent(this),t.K(this.i,this.D.gO,this.D),this.i.zh=li+hi,this.G[1]=this.i),t.p(e)?(this.i.N(e),this):this.i},t.g.bottom=function(e){return this.b||(this.b=new J,this.b.df(),t.W(this,"bottom",this.b),this.b.orientation("bottom"),this.b.parent(this),t.K(this.b,this.D.gO,this.D),this.b.zh=li+2*hi,this.G[2]=this.b),t.p(e)?(this.b.N(e),this):this.b},t.g.left=function(e){return this.f||(this.f=new J,this.f.df(),t.W(this,"left",this.f),this.f.orientation("left"),this.f.parent(this),t.K(this.f,this.D.gO,this.D),this.f.zh=li+3*hi,this.G[3]=this.f),t.p(e)?(this.f.N(e),this):this.f},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),t.K(this.jb,this.Mq,this),this.jb.I(4294967295)),t.p(e)?(this.jb.N(e),this.jb.I(4294967295),this):this.jb},t.g.Mq=function(){this.jb.I(4294967295)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.U(this.Da.oa,!0),t.K(this.Da,this.de,this),this.Da.I(4294967295)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this.Da.I(4294967295),this):this.Da},t.g.de=function(e){this.Da.I(4294967295);var i=0;t.X(e,8)?i=9:t.X(e,1)&&(i=1),this.va(i)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.U(this.rc.oa,!0),t.K(this.rc,this.pba,this),this.rc.I(4294967295)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this.rc.I(4294967295),this):this.rc},t.g.pba=function(e){this.rc.I(4294967295);var i=0;t.X(e,8)?i=9:t.X(e,1)&&(i=1),this.va(i)},t.g.Xa=function(e){return this.mb||(this.mb=new q,t.W(this,"ticks",this.mb),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.yb=function(e){return this.Rc||(this.Rc=new q,t.W(this,"minorTicks",this.Rc),t.K(this.Rc,this.li,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.li=function(e){var i=0;t.X(e,8)?i=9:t.X(e,1)&&(i=1),this.va(i)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.Kg=function(e,i){var n=t.p(i)?i:{};this.left().ga(!!e,n.left),this.top().ga(!!e,n.top),this.right().ga(!!e,n.right),this.bottom().ga(!!e,n.bottom)},t.g.U=function(e,i){this.D.ka(),t.Iq(this,ze,e,i),i||this.enabled(!("enabled"in e)||e.enabled),this.title().ga(!!i,e.title),this.Xa().ga(!!i,e.ticks),this.yb().ga(!!i,e.minorTicks),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Kg(!!i,e),this.D.da(!0)},t.g.F=function(){var e={};if(this.f){var i=this.f.F();t.Jc(i)||(e.left=i)}return this.o&&(i=this.o.F(),t.Jc(i)||(e.top=i)),this.i&&(i=this.i.F(),t.Jc(i)||(e.right=i)),this.b&&(i=this.b.F(),t.Jc(i)||(e.bottom=i)),e.title=this.title().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),t.Tq(this,ze,e,"Map axes props"),e},t.g.R=function(){t.sd(this.o,this.i,this.b,this.f,this.jb,this.Da,this.rc,this.mb,this.Rc),this.f=this.b=this.i=this.o=null,this.G.length=0,this.Rc=this.mb=this.rc=this.Da=this.jb=null,et.u.R.call(this)};var Ve=et.prototype;Ve.left=Ve.left,Ve.top=Ve.top,Ve.right=Ve.right,Ve.bottom=Ve.bottom,Ve.title=Ve.title,Ve.ticks=Ve.Xa,Ve.minorTicks=Ve.yb,Ve.labels=Ve.labels,Ve.minorLabels=Ve.qb,t.H(it,t.Y),t.Gq(it,["labels"],"normal");var qe,We=(qe={},t.sq(qe,[[0,"orientation",function(e){return t.Lk(e,"right")}],t.Z.eK,t.Z.iK,t.Z.jK]),qe);t.U(it,We),t.g=it.prototype,t.g.sa=448|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=128,n=1),this.B(i,n)},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.W(this,"padding",this.Wa),t.K(this.Wa,this.Pk,this)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.margin=function(e,i,n,s){return this.Qc||(this.Qc=new t.Mv,t.W(this,"margin",this.Qc),t.K(this.Qc,this.Pk,this)),t.p(e)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},t.g.Pk=function(e){t.X(e,2)&&this.B(4,9)},t.g.items=function(e){return t.p(e)?(this.Ub!=e&&(this.Ub=e,this.B(16,1)),this):this.Ub||[]},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(256,1)},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),t.K(this.jb,this.Mq,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.Mq=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=64,n=1),this.B(i,n)},t.g.kz=function(){for(var t=0,e=this.Qa().labels().jI();t<e;t++){var i=this.Qa().labels().be(t),n=i.Zf,s=this.i[t],a=s.ef();a.Ec().select(s.ma()),i=this.Bh(i.ma()).value,a=A(a),n.clear().moveTo(i.x,i.y).lineTo(a.x,a.y)}},t.g.Ih=function(e){var i=this.i[t.p(e.labelIndex)?e.labelIndex:e.domTarget.lha];e.domTarget.tag={X:i.ef(),index:i.ma()},e.pointIndex=i.ma()},t.g.Nb=function(){var t=this.g("orientation");return"top"==t||"bottom"==t},t.g.sl=function(){return this.Bd||(this.Bd=t.ok()),this.Bd},t.g.yd=function(){var e=this.ja();if(e){if(e=e.clone(),this.enabled()){var i=this.ob(),n=i.height;switch(i=i.width,this.g("orientation")){case"top":e.height-=n,e.top+=n;break;case"right":e.width-=i;break;case"bottom":e.height-=n;break;case"left":e.width-=i,e.left+=i}}return e}return new t.I(0,0,0,0)},t.g.ob=function(){if(!this.K||this.J(4)){var e=this.ja();if(e){if(e.top=Math.round(e.top),e.left=Math.round(e.left),e.width=Math.round(e.width),e.height=Math.round(e.height),this.Nb())var i=e.width,n=e.height;else i=e.height,n=e.width;var s=0,a=0;this.f=this.b=null;for(var o=0,r=this.i.length;o<r;o++){var l=this.i[o],h=new t.Tu;nt(this,l,h),t.Yu(t.Zu(h)),l=h.ic("enabled")?t.Zu(h).measure(h):t.kn(0,0,0,0),t.Yu(t.Zu(h)),l.height>a&&(a=l.height),l.width>s&&(s=l.width)}this.Nb()||(o=s,s=a,a=o),o=this.i.length;var c=null==this.g("length"),u=null==this.g("width"),d=null!=this.g("length")?t.L(this.g("length"),i):s*o,p=null!=this.g("width")?t.L(this.g("width"),n):a;s=a=0;var g=!1,f=!1;(r=this.title()).enabled()&&(r.O()||r.O(this.O()),r.ka(),r.ja(e),t.dw(r,this.g("orientation")),this.Nb()?(a=r.yi().height,s=r.yi().width):(a=r.yi().width,s=r.yi().height),"top"==(g=r.g("orientation")||t.dw(r))||"bottom"==g?(g=this.Nb(),f=!this.Nb()):(g=!this.Nb(),f=this.Nb()),r.da(!1));var b=this.padding();h=t.L(b.g("top"),e.height),l=t.L(b.g("right"),e.width);var v=t.L(b.g("bottom"),e.height);b=t.L(b.g("left"),e.width);var m,y=this.margin(),S=t.L(y.g("top"),e.height),w=t.L(y.g("right"),e.width),x=t.L(y.g("bottom"),e.height);switch(y=t.L(y.g("left"),e.width),c&&!u?(c=p-(g?a:0),d=Math.min(f?c*o+s:Math.max(c*o,s),i),this.b=(d-(f?s:0))/o,this.f=c):!c&&u?(c=(d-(f?s:0))/o,p=Math.min(g?c+a:Math.max(c,a),n),this.b=c,this.f=p-(g?a:0)):c&&u?(n=Math.min(d,i-(f?s:0))/o,d=Math.max(p,f?a:0),c=Math.max(n,d)*o+v+h+x+S>i?(i-(v+h+x+S)-(f?s:0))/o:Math.max(n,d),d=f?c*o+s:Math.max(c*o,s),p=g?c+a:Math.max(c,a),this.f=this.b=c):(this.b=(d-(f?s:0))/o,this.f=p-(g?a:0)),n=this.g("align"),this.Nb()?(d+l+b+w+y>i&&(d=i-(l+b+w+y)),"left"==n||"top"==n?m=b+y:"right"==n||"bottom"==n?m=i-d-l-w:"center"==n&&(m=(i-d)/2)):(d+v+h+x+S>i&&(d=i-(v+h+x+S)),"left"==n||"top"==n?m=h+S:"right"==n||"bottom"==n?m=i-d-v-x:"center"==n&&(m=(i-d)/2)),this.g("orientation")){case"top":var C=e.top+h+S,D=e.left+m,T=p,k=d;this.D=new t.I(D,C,this.b,this.f);break;case"right":C=e.top+m,D=e.left+e.width-p-l-w,T=d,k=p,this.D=new t.I(D,C,this.f,this.b);break;case"bottom":C=e.top+e.height-p-v-x,D=e.left+m,T=p,k=d,this.D=new t.I(D,C,this.b,this.f);break;case"left":C=e.top+m,D=e.left+b+y,T=d,k=p,this.D=new t.I(D,C,this.f,this.b)}if(r.enabled())switch(g=r.g("orientation")||t.dw(r),g){case"top":this.D.left=D,this.D.top=C+(this.Nb()?a:s);break;case"left":this.D.left=D+(this.Nb()?s:a),this.D.top=C}this.kg=new t.I(Math.round(D),Math.round(C),Math.round(k),Math.round(T)),this.G=new t.I(this.kg.left-b,this.kg.top-h,this.kg.width+b+l,this.kg.height+h+v),this.K=new t.I(this.G.left-y,this.G.top-S,this.G.width+y+w,this.G.height+S+x)}else this.K=new t.I(0,0,0,0);this.B(this.se),this.I(4)}return this.K},t.g.Bh=function(t){if(null===this.b||null===this.f)return{value:{x:0,y:0}};var e=this.D;switch(this.g("orientation")){case"top":var i=e.left+this.b*t+this.b/2,n=e.top+this.f;break;case"right":i=e.left,n=e.top+this.b*t+this.b/2;break;case"bottom":i=e.left+this.b*t+this.b/2,n=e.top;break;case"left":i=e.left+this.f,n=e.top+this.b*t+this.b/2}return{value:{x:i,y:n}}},t.g.W=function(){if(!this.zc())return this;var e=this.Qa().labels();if(!this.ya&&this.i&&this.i.length&&(this.ya=this.i[0].xc(),t.Ld(this.ya,"pointshover",(function(i){i=i.seriesStatus;for(var n=0,s=this.i.length;n<s;n++)for(var a=this.i[n],o=a.ma(),r=0,l=i.length;r<l;r++){var h=i[r],c=h.series;if(c==a.ef()){for(var u=!1,d=0,p=(h=h.points).length;d<p;d++){var g=h[d];if(a.ma()==g.index){(c=nt(this,a,e.be(n),t.nx(c.state,o))).W(),t.Yu(t.Zu(c)),u=!0;break}}u||a.state!=t.vo||((c=nt(this,a,e.be(n),t.gm)).W(),t.Yu(t.Zu(c)))}}}),!1,this),t.Ld(this.ya,"pointsselect",(function(i){i=i.seriesStatus;for(var n=0,s=this.i.length;n<s;n++)for(var a=this.i[n],o=a.ma(),r=0,l=i.length;r<l;r++){var h=i[r],c=h.series;if(c==a.ef()){for(var u=!1,d=0,p=(h=h.points).length;d<p;d++){var g=h[d];if(a.ma()==g.index){(u=nt(this,a,e.be(n),t.nx(c.state,o))).W(),t.Yu(t.Zu(u)),u=!0;break}}!u&&a.state&t.wo&&((u=nt(this,a,e.be(n),t.nx(c.state,o))).W(),t.Yu(t.Zu(u)))}}}),!1,this)),this.sl(),this.o||(this.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()}),void 0,this),t.ru(this,this.o),this.o.kb(this)),this.title().ka(),e.ka(),this.J(8)){var i=this.zIndex();this.Bd.zIndex(i),this.title().zIndex(2),e.zIndex(1),this.background().zIndex(0),this.o.zIndex(1.1),this.I(8)}if(this.J(2)&&(i=this.O(),this.Bd.parent(i),this.title().O(this.Bd),e.O(this.Bd),this.background().O(this.Bd),this.o.parent(this.Bd),this.I(2)),this.J(256)&&((i=this.background()).ka(),i.ja(this.G),i.O(this.Bd),i.W(),i.da(!1),this.I(256)),this.J(64)&&((i=this.title()).ja(this.kg),i.W(),this.I(64)),this.J(128)){this.o.clear(),function(e){var i=e.Qa().labels();i.O()||i.O(e.O()),i.ja(e.ja()),i.clear();for(var n=0,s=e.i.length;n<s;n++){var a=e.i[n],o=i.add(null,null);if(nt(e,a,o),o.ic("enabled")){switch(a=(o=o.jc()).value.x,o=o.value.y,e.g("orientation")){case"top":a-=e.b/2,o-=e.f;var r=e.b,l=e.f;break;case"right":o-=e.b/2,r=e.f,l=e.b;break;case"bottom":a-=e.f/2,r=e.b,l=e.f;break;case"left":a-=e.f,o-=e.b/2,r=e.f,l=e.b}if(e.o){var h=t.eC(e.o);h.moveTo(a,o).lineTo(a+r,o).lineTo(a+r,o+l).lineTo(a,o+l).close(),h.lha=n,h.stroke(null).fill(t.bm)}}}}(this),e.B(8),e.W(),i=0;for(var n=e.jI();i<n;i++)t.Yu(t.Zu(e.be(i)));this.I(128)}return this.title().da(!1),e.da(!1),this},t.g.remove=function(){this.jb&&this.jb.remove(),this.Da&&this.Da.remove()},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.N(this.ca.oa),t.W(this,"hovered",this.za),this.za.N(this.za.oa),t.W(this,"selected",this.Ea),this.Ea.N(this.Ea.oa)},t.g.F=function(){var e=it.u.F.call(this);return t.Tq(this,We,e),e.title=this.title().F(),e.background=this.background().F(),e.padding=this.padding().F(),e.margin=this.margin().F(),e.items=this.items(),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.U=function(e,i){this.ka(),it.u.U.call(this,e,i),t.Iq(this,We,e),"title"in e&&this.title(e.title),"background"in e&&this.background(e.background),"padding"in e&&this.padding(e.padding),"margin"in e&&this.margin(e.margin),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.items(e.items),this.da(!0)},t.g.R=function(){t.sd(this.Wa,this.Qc,this.Ia,this.jb),this.G=this.jb=this.Ia=this.Qc=this.Wa=null,it.u.R.call(this)};var Ke=it.prototype;Ke.title=Ke.title,Ke.normal=Ke.Qa,Ke.hovered=Ke.lb,Ke.selected=Ke.selected,Ke.background=Ke.background,Ke.padding=Ke.padding,Ke.margin=Ke.margin,Ke.items=Ke.items,t.H(st,t.iA),t.g=st.prototype,t.g.show=function(e){var i=[],n=t.qA(this);if(e=n.oq(e))if((0,t.Pe)(e,(function(t){t.series.enabled()&&0!=t.points.length&&i.push(t)}),this),0==i.length)this.Lc();else{var s=i[0];(0,t.Pe)(i,(function(t){s.nearestPointToCursor.distance>t.nearestPointToCursor.distance&&(s=t)})),e=this.g("xStroke");var a=this.g("yStroke"),o=s.series,r=o.$();r.select(s.nearestPointToCursor.point.index);var l=t.N(r.j("x"));r=t.N(r.j("value")),((0,window.isNaN)(l)||(0,window.isNaN)(r))&&(l=(r=_(o).value).x,r=r.y),l=(r=(n=n.scale()).Mc(l,r))[0],r=r[1],o=n.Lr(l),n=n.Jp(r),this.wi(t.jA(this),!0,o,e,l),this.wi(t.kA(this),!1,n,a,r)}},t.g.update=function(e,i){if(this.enabled()){var n,s;n=t.p(e)?(0,window.parseFloat)(e):t.p(this.TV)?this.TV:0,s=t.p(i)?(0,window.parseFloat)(i):t.p(this.UV)?this.UV:0,n=t.qA(this).AU(n,s);var a=t.qA(this).Mc(n.x,n.y);n=a.long,s=a.lat;var o=t.qA(this).scale(),r=o.Lr(a.x);a=o.Jp(a.y),o=this.g("xStroke");var l=this.g("yStroke");0<r&&1>r&&0<a&&1>a?(this.wi(t.jA(this),!0,r,o,n),this.wi(t.kA(this),!1,r,l,s)):this.Lc()}},t.g.If=function(t){this.TV=t.clientX,this.UV=t.clientY,"sticky"!=this.g("displayMode")&&this.update(t.clientX,t.clientY)},t.g.hg=function(e){if(!t.to(t.qA(this),e.relatedTarget)){this.TV=e.clientX,this.UV=e.clientY,e=t.qA(this).AU(e.clientX,e.clientY);var i=t.qA(this).Mc(e.x,e.y),n=t.qA(this).scale();e=n.Lr(i.x),i=n.Jp(i.y),(0>e||1<e||0>i||1<i)&&this.Lc()}},t.g.W=function(){if(!this.zc())return this;this.Oa||(this.Oa=t.ok(),this.Pr.parent(this.Oa),this.Sr.parent(this.Oa)),this.J(16)&&(this.Pr.stroke(this.g("xStroke")),this.Sr.stroke(this.g("yStroke")),this.I(16));var e=t.Ga(t.jA(this),t.kA(this));if(this.J(2)){var i=this.O();this.Oa.parent(i),t.oA(e,this.Oa),this.I(2)}return this.J(8)&&(i=this.zIndex(),this.Oa.zIndex(i),this.I(8)),this.J(4)&&(i=this.ja(),t.pA(e,i),this.I(4)),this},t.g.lo=function(e,i,n){var s=t.qA(this).scale(),a=0==this.Pr.gl()%2?0:-.5,o=0==this.Sr.gl()%2?0:-.5;if(i.clear(),e.Nb()){var r=s.precision()[1];for(o=s.Cq();o<s.zq();)e=s.transform(n,o,null),o==s.Cq()?i.moveTo(e[0]-a,e[1]):i.lineTo(e[0]-a,e[1]),o+=r;e=s.transform(n,s.zq(),null),i.lineTo(e[0]-a,e[1])}else{for(r=s.precision()[0],a=s.Bq();a<s.yq();)e=s.transform(a,n,null),a==s.Bq()?i.moveTo(e[0],e[1]-o):i.lineTo(e[0],e[1]-o),a+=r;e=s.transform(s.yq(),n,null),i.lineTo(e[0],e[1]-o)}},t.g.tf=function(e,i,n){var s=this.nq(e,n),a=i.format()||t.ep;i.text(a.call(s,s)),i.qk(t.nA(e)),n=Y(e.Xa(),n),i.x(n[0]).y(n[1]),i.rotation(this.IM(e,n[4])),i.O(this.Oa).W()},t.g.IM=function(e,i){switch(e.orientation()){case"top":var n=t.cb(i)+90;break;case"right":n=t.cb(i);break;case"bottom":n=t.cb(i)-90;break;case"left":n=t.cb(i)-180}return n},t.g.nq=function(e,i){i=(0,window.parseFloat)(i);var n=Math.abs(i)%1,s=Math.floor(Math.abs(i)),a=Math.floor(60*n);return s+="°",((n=Math.floor(60*n%1*60))||a)&&(10>a&&(a="0"+a),s+=a+"'"),s+=a=e.Nb()?0<i?"E":"W":0<i?"N":"S",a=e.scale(),a={axis:{value:e,type:""},scale:{value:a,type:""},index:{value:window.NaN,type:"number"},value:{value:s,type:"string"},tickValue:{value:i,type:"number"},max:{value:t.p(a.max)?a.max:null,type:"number"},min:{value:t.p(a.min)?a.min:null,type:"number"}},(s={})["%AxisName"]={value:e.title().text(),type:"string"},(a=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}).Dl(s),t.ov(a)},t.g.wi=function(e,i,n,s,a){var o,r=t.qA(this),l=!1,h=i?r.uy:r.wy,c=i?this.$U:this.aV;i=i?this.Pr:this.Sr;var u=s&&"none"!=s;for(s=0;s<e.length;s++)if(o=e[s]){var d=o.g("axisIndex");(d=h.call(r,d))&&t.p(d.scale().Mc(0))&&0<n&&1>n?(!l&&u&&(this.lo(d,i,a),l=!0),o.enabled()&&this.tf(d,o,a)):c.call(this,o)}},t.H(at,t.kz);var Ye=at.prototype,Xe=t.kz.prototype.Cz;t.rq(Xe,1,"minorStroke",t.Pq),Ye.Cz=Xe,t.U(at,at.prototype.Cz),t.g=at.prototype,t.g.scale=function(e){return t.p(e)&&this.qa!=e&&(this.qa&&t.kr(this.qa,this.zg,this),(this.qa=e)&&t.K(this.qa,this.zg,this),this.B(68,9)),this.qa||this.b&&this.b.scale()||null},t.g.zg=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(20,i)},t.g.Uh=function(e){var i=e?this.o:this.i;return i||(e?(i=this.o=t.qk()).zIndex(1):(i=this.i=t.qk()).zIndex(0),i.Dd(!0).eq(!0),i.parent(this.Aa)),i},t.g.d_=function(){var e=t.qk();return e.parent(this.Aa).zIndex(3).stroke("none"),e},t.g.kz=function(t){this.Aa&&this.Aa.oc(t.od,t.gf,t.We,t.Le,t.Jd,t.Fd)},t.g.pv=function(){this.Aa||(this.Aa=t.ok())},t.g.TK=function(){var t=this.O();this.Aa.parent(t)},t.g.xC=function(){var t=this.zIndex();this.Aa.zIndex(t)},t.g.Bea=function(t,e,i,n){var s=(i=this.qa).Bq(),a=i.yq();if(C(i.fe.default.Pg)){var o=i.transform(s,t,null);e.moveTo(o[0],o[1]),o=i.transform(a,t,null),e.lineTo(o[0],o[1])}else{for(var r=s;r<a;)o=i.transform(r,t,null),r==s?e.moveTo(o[0],o[1]):e.lineTo(o[0],o[1]),r+=n;o=i.transform(a,t,null),e.lineTo(o[0],o[1])}},t.g.Aea=function(t,e,i,n){var s=(i=this.qa).Cq(),a=i.zq();if(C(i.fe.default.Pg)){var o=i.transform(t,s,null);e.moveTo(o[0],o[1]),o=i.transform(t,a,null),e.lineTo(o[0],o[1])}else{for(var r=s;r<a;)o=i.transform(t,r,null),r==s?e.moveTo(o[0],o[1]):e.lineTo(o[0],o[1]),r+=n;o=i.transform(t,a,null),e.lineTo(o[0],o[1])}},t.g.zea=function(t,e,i,n,s,a){s=(i=this.qa).Bq();var o=i.yq(),r=i.Cq();if((0,window.isNaN)(e)&&t!=r&&(e=r),!(0,window.isNaN)(e)){var l;if(C(i.fe.default.Pg))r=i.transform(s,t,null),n.moveTo(r[0],r[1]),r=i.transform(o,t,null),n.lineTo(r[0],r[1]),r=i.transform(o,t,null),n.lineTo(r[0],r[1]),r=i.transform(o,e,null),n.lineTo(r[0],r[1]),r=i.transform(o,e,null),n.lineTo(r[0],r[1]),r=i.transform(s,e,null),n.lineTo(r[0],r[1]),r=i.transform(s,e,null),n.lineTo(r[0],r[1]);else{for(l=s;l<o;)r=i.transform(l,t,null),l==s?n.moveTo(r[0],r[1]):n.lineTo(r[0],r[1]),l+=a;for(r=i.transform(o,t,null),n.lineTo(r[0],r[1]),l=t;l>e;)r=i.transform(o,l,null),n.lineTo(r[0],r[1]),l-=a;for(r=i.transform(o,e,null),n.lineTo(r[0],r[1]),l=o;l>s;)r=i.transform(l,e,null),n.lineTo(r[0],r[1]),l-=a;for(r=i.transform(s,e,null),n.lineTo(r[0],r[1]),l=e;l<t;)r=i.transform(s,l,null),n.lineTo(r[0],r[1]),l+=a}r=i.transform(s,t,null),n.lineTo(r[0],r[1]),n.close()}},t.g.yea=function(t,e,i,n,s,a){var o=(i=this.qa).Bq();s=i.Cq();var r=i.zq();if((0,window.isNaN)(e)&&t!=o&&(e=o),!(0,window.isNaN)(e)){var l;if(C(i.fe.default.Pg))o=i.transform(e,s,null),n.moveTo(o[0],o[1]),o=i.transform(t,s,null),n.lineTo(o[0],o[1]),o=i.transform(t,s,null),n.lineTo(o[0],o[1]),o=i.transform(t,r,null),n.lineTo(o[0],o[1]),o=i.transform(t,r,null),n.lineTo(o[0],o[1]),o=i.transform(e,r,null),n.lineTo(o[0],o[1]),o=i.transform(e,r,null),n.lineTo(o[0],o[1]);else{for(l=e;l<t;)o=i.transform(l,s,null),l==e?n.moveTo(o[0],o[1]):n.lineTo(o[0],o[1]),l+=a;for(o=i.transform(t,s,null),n.lineTo(o[0],o[1]),l=s;l<r;)o=i.transform(t,l,null),n.lineTo(o[0],o[1]),l+=a;for(o=i.transform(t,r,null),n.lineTo(o[0],o[1]),l=t;l>e;)o=i.transform(l,r,null),n.lineTo(o[0],o[1]),l-=a;for(o=i.transform(e,r,null),n.lineTo(o[0],o[1]),l=r;l>s;)o=i.transform(e,l),n.lineTo(o[0],o[1]),l-=a}o=i.transform(e,s,null),n.lineTo(o[0],o[1]),n.close()}},t.g.sK=function(){this.Uh(!0).stroke(this.g("stroke")),this.Uh(!1).stroke(this.g("minorStroke"))},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.Lj=function(){var e=this.qa,i=this.Uh(!0),n=this.Uh(!1);if(this.J(64)||this.J(4)){var s,a=window.NaN,o=e.precision();if(this.Nb()){var r=e.xx(),l=e.rz();o=o[0],e=e.zq();var h=[this.Bea,this.zea]}else r=e.wx(),l=e.qz(),o=o[1],e=e.yq(),h=[this.Aea,this.yea];r=r.get(),l=l.get(),this.Sz(),i.clear(),n.clear();var c=h[0],u=h[1],d=-i.gl()%2/2,p=0;for(s=r.length;p<s;p++){var g=r[p];p&&(h=t.oz(this,p-1))&&u.call(this,g,a,null,h,d,o),(!p&&this.g("drawFirstLine")||p==s-1&&this.g("drawLastLine")||0!=p&&p!=s-1)&&c.call(this,g,i,d,o),a=g}for(g!=e&&(h=t.oz(this,p-1))&&u.call(this,e,a,null,h,d),d=-i.gl()%2/2,p=0,s=l.length;p<s;p++)g=l[p],c.call(this,g,n,d,o);this.I(64),this.I(4)}},t.g.R=function(){t.sd(this.o,this.i),this.i=this.o=null,at.u.R.call(this)},t.H(ot,t.V),t.g=ot.prototype,t.g.sa=985,t.g.ra=98313,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e};var Je={};t.sq(Je,[t.Z.vQ,t.Z.Yn,t.Z.cC,[1,"minorStroke",t.Pq],[0,"drawFirstLine",t.Dq],[0,"drawLastLine",t.Dq],[0,"zIndex",t.N]]),t.U(ot,Je),t.g=ot.prototype,t.g.cc=function(e){return this.Fa||(rt(this,this.oa.palette),t.W(this,"palette",this.Fa),this.Fa.Gp(!1)),t.p(e)?(rt(this,e),this.Fa.N(e),this):this.Fa},t.g.Hc=function(e){if(!t.J(this.Fa,e)){var i=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.K(this.Fa,this.Pf,this),i&&this.va(1)}},t.g.Pf=function(e){t.X(e,2)&&this.va(1)},t.g.zm=function(){return this.o},t.g.vertical=function(e){if(!this.f){this.f=new at,t.mz(this.f,"vertical"),this.f.df().parent(this),t.W(this,"vertical",this.f);var i=this.g("zIndex")+this.o.length*hi;this.f.zh=i,t.K(this.f,this.i.t4,this.i),this.o.push(this.f)}return t.p(e)?(this.f.N(e),this):this.f},t.g.U2=function(e){if(!this.b){this.b=new at,t.mz(this.b,"horizontal"),this.b.df().parent(this),t.W(this,"horizontal",this.b);var i=this.g("zIndex")+this.o.length*hi;this.b.zh=i,t.K(this.b,this.i.t4,this.i),this.o.push(this.b)}return t.p(e)?(this.b.N(e),this):this.b},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.Kg=function(e,i){var n=t.p(i)?i:this.oa;this.U2().ga(!!e,n.horizontal),this.vertical().ga(!!e,n.vertical)},t.g.U=function(e,i){this.i.ka(),t.Iq(this,Je,e),i&&this.ta("enabled",!("enabled"in e)||e.enabled),e.palette&&this.cc(e.palette),this.Kg(!!i,e),this.i.da(!0)},t.g.F=function(){var e={};if(this.f){var i=this.f.F();t.Jc(i)||(e.vertical=i)}return this.b&&(i=this.b.F(),t.Jc(i)||(e.horizontal=i)),this.Fa&&(e.palette=this.Fa.F()),t.Tq(this,Je,e,"Map grids props"),e},t.g.R=function(){t.sd(this.f,this.b,this.Fa),this.Fa=this.b=this.f=null,this.o.length=0,this.i=null,ot.u.R.call(this)};var Ze=ot.prototype;Ze.horizontal=Ze.U2,Ze.vertical=Ze.vertical,Ze.palette=Ze.cc,t.H(lt,a),lt.prototype.ratio=function(e){return t.p(e)?(e=t.N(e)||0,this.b!=e&&(this.b=e),this):this.b},lt.prototype.forward=function(t,e){var i=this.f.forward(t,e),n=this.cT.forward(t,e);return[t=(1-this.b)*i[0]+this.b*n[0],e=(1-this.b)*i[1]+this.b*n[1]]},lt.prototype.xj=function(t,e){var i=this.f.xj(t,e),n=this.cT.xj(t,e);return[t=(1-this.b)*i[0]+this.b*n[0],e=(1-this.b)*i[1]+this.b*n[1]]},t.H(ht,t.V),t.g=ht.prototype,t.g.ra=2,t.g.Gl=window.NaN,t.g.Nh=4,t.g.om=6,t.g.ll=null,t.g.Ro=null,t.g.Vc=0,t.g.xba=function(e){return null!=e?(this.Gl!=e&&(0>=(e=t.N(e))?(this.Nh=4,this.om=6,this.Gl=window.NaN):(this.om=this.Nh=window.NaN,this.Gl=+e),this.Ro=this.ll=null,this.va(2)),this):this.Gl},t.g.count=function(e,i){return t.p(e)?(this.Nh!=e&&(this.Gl=window.NaN,this.Nh=Math.ceil(t.N(e)),this.om=Math.ceil(t.N(i)),2<=this.Nh||(this.Nh=4),this.om>=this.Nh||(this.om=this.Nh),this.Ro=this.ll=null,this.va(2)),this):[this.Nh,this.om]},t.g.XF=function(e){return t.p(e)?(e=+e||0,this.Vc!=e&&(this.Vc=e,this.Ro=null,this.ll||this.va(2)),this):this.Vc},t.g.set=function(e){return t.Ta(this.ll,e)||(this.Gl=this.om=this.Nh=window.NaN,this.ll=t.Ja(e,0),t.Ka(this.ll),t.Pa(this.ll,t.po),this.Ro=null,this.va(2)),this},t.g.get=function(){var e=this.dk(),i="horizontal"==this.vh?this.qa.Lr:this.qa.Jp;return(0,t.Ye)(e,(function(t){return 0<=(t=i.call(this,(0,window.parseFloat)(t)))&&1>=t}),this.qa)},t.g.dk=function(){if(this.ll)var t=this.ll;else this.qa.pb(),t=this.Ro;return t||[]},t.g.DB=function(e,i,n,s){this.Ro=null;var a=[e,i];if(this.ll)n&&(a[0]=Math.min(e,this.ll[0]||0)),s&&(a[1]=Math.max(i,this.ll[this.ll.length-1]||0));else{var o=[],r=this.Gl,l=this.Nh,h=this.om;if(!(0,window.isNaN)(r)&&(i-e)/r>this.qa.an()&&(this.qa.XY||(t.kl(20,null,[i-e,r]),this.qa.XY=!0),r=window.NaN,l=4,h=6),(0,window.isNaN)(r))for(var c=window.NaN,u=l;u<=h;u++){l=(i-e)/(u-1);var d=Math.log(l),p=Math.pow(10,Math.floor(d*Math.LOG10E)),g=Math.pow(10,Math.ceil(d*Math.LOG10E)),f=l<p+p?p/2:Number.POSITIVE_INFINITY;d=t.Xm(l/g,2),(d=Math.min(t.Po(l,p)||window.Infinity,t.Po(l,g)||window.Infinity,t.Po(l,f)||window.Infinity,t.Po(l,Math.pow(2,Math.floor(d))*g)||window.Infinity,t.Po(l,Math.pow(2,Math.ceil(d))*g)||window.Infinity))&&(0,window.isFinite)(d)&&(l=d),d=t.Vm(t.Oo(e,l,this.Vc))-e,d*=d,p=t.Vm(t.Po(i,l,this.Vc))-i,d+=p*=p,((0,window.isNaN)(c)||d<c)&&(c=d,r=l)}for(h=t.Um(r),c=t.Vm(t.Oo(e,r,this.Vc,h)),n?a[0]=e=c:1e-7<e-c&&(o.push(e),a[2]=c),n=t.Vm(t.Po(i,r,this.Vc,h)),s?a[1]=i=n:1e-7<n-i&&(a[3]=n),e=t.Vm(t.Po(e,r,this.Vc,h));e<=i;e=t.Vm(e+r))o.push(e);3 in a&&o.push(i),this.Ro=o}return a},t.g.EB=function(e,i,n){if(this.ll)this.Ro=null;else if(this.Ro?this.Ro.length=0:this.Ro=[],!(2>e.length)){var s=this.wba,a=e.length-1,o=this.Gl,r=this.Nh;if(!(0,window.isNaN)(this.Gl)){var l=e[a],h=e[0];(l-h)/this.Gl>this.qa.an()&&(t.kl(20,null,[l-h,this.Gl]),this.Gl=window.NaN,this.Nh=4)}for(t.p(i)?(h=e[0],l=e[1],s.call(this,h,l,i,l),h=1):h=0,t.p(n)&&a--,i=h;i<=a-1;i++)h=e[i],l=e[i+1],s.call(this,h,l,h,l);t.p(n)&&(h=e[a],l=e[a+1],s.call(this,h,l,h,n)),this.Gl=o,this.Nh=r}},t.g.wba=function(e,i,n,s){var a=this.Gl;for((0,window.isNaN)(a)&&(a=(s-n)/(this.Nh-1)),a=Math.max(a,1e-7),n=this.Ro[this.Ro.length-1],i=t.Tm(i,7),e=t.Tm(e,7);e<=i;e=t.Tm(e+a,7))n!=e&&this.Ro.push(e),n=e},t.g.F=function(){var t=ht.u.F.call(this);return this.ll?t.explicit=this.ll:(this.Nh==this.om?(0,window.isNaN)(this.Nh)||(t.count=this.Nh):((0,window.isNaN)(this.Nh)||(t.minCount=this.Nh),(0,window.isNaN)(this.om)||(t.maxCount=this.om)),(0,window.isNaN)(this.Gl)||(t.interval=this.Gl)),t},t.g.Ie=function(e,i){var n=arguments[1];return t.A(n)?(this.set(n),!0):t.V.prototype.Ie.apply(this,arguments)},t.g.U=function(e,i){ht.u.U.call(this,e,i),(this.ll=e.explicit||null)&&(0,t.Pe)(this.ll,(function(t,e,i){i[e]=(0,window.parseFloat)(t)})),this.Nh=e.count||e.minCount||window.NaN,this.om=e.count||e.maxCount||window.NaN,this.Gl=e.interval||window.NaN,this.ll?this.Nh=this.om=this.Gl=window.NaN:this.Gl?this.Nh=this.om=window.NaN:(this.Nh=Math.ceil(t.N(this.Nh)),this.om=Math.ceil(t.N(this.om)),2<=this.Nh||(this.Nh=4),this.om>=this.Nh||(this.om=this.Nh))};var Qe=ht.prototype;Qe.interval=Qe.xba,Qe.count=Qe.count,Qe.set=Qe.set,Qe.get=Qe.get,t.H(ct,t.V),t.g=ct.prototype,t.g.ra=6,t.g.Ma=function(){return"geo"},t.g.IC=function(t){var e=this.jQ!=this.Ka||this.RJ!=this.Ba||this.lQ!=this.Za||this.cQ!=this.Ha;return e&&(this.Kc=!1,t||this.va(2)),e},t.g.rb=function(){return this.Bb?this.Bb.clone():t.kn(0,0,0,0)},t.g.Qf=function(t){return this.Bb=t,this.Kc=!1,this},t.g.wx=function(e){return this.ud||(this.ud=this.ol(),this.ud.vh="horizontal"),t.p(e)?(this.ud.N(e),this):this.ud},t.g.qz=function(e){return this.Uc||(this.Uc=this.ol(),this.Uc.vh="horizontal"),t.p(e)?(this.Uc.N(e),this):this.Uc},t.g.xx=function(e){return this.Od||(this.Od=this.ol(),this.Od.vh="vertical"),t.p(e)?(this.Od.N(e),this):this.Od},t.g.rz=function(e){return this.Hd||(this.Hd=this.ol(),this.Hd.vh="vertical"),t.p(e)?(this.Hd.N(e),this):this.Hd},t.g.li=function(e){t.X(e,2)&&(this.Kc=!1,this.va(2))},t.g.ol=function(){var e=new ht(this);return t.K(e,this.li,this),e},t.g.an=function(e){return t.p(e)?(e=t.P(e,1e3,!1),this.cl!=e&&(this.cl=e,this.Kc=!1,this.va(2)),this):this.cl},t.g.precision=function(e,i){if(0<arguments.length){var n=0;return e&&(t.A(e)?(1<e.length&&(i=t.N(e[1])),e=t.N(e[0])):1==arguments.length&&(i=e=t.N(e)),0==e||(0,window.isNaN)(e)||this.YE==e||(this.YE=e,n=2)),i&&(i=t.N(i))&&this.$E!=i&&(this.$E=i,n=2),this.va(n),this}return[this.YE,this.$E]},t.g.mq=function(e){return t.p(e)?(e=+e||0,this.P!=e&&(this.P=e,this.Of()&&(this.Kc=!1,this.va(2))),this):this.P},t.g.Bq=function(e){if(t.p(e)){e=t.Za(t.N(e),-180,180);var i=(0,window.isNaN)(e);return(i!=this.Sb||!i&&e!=this.i)&&(e>=this.D?this.yq(e):(this.Sb=i,this.i=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.i},t.g.yq=function(e){if(t.p(e)){e=t.Za(t.N(e),-180,180);var i=(0,window.isNaN)(e);return(i!=this.fb||!i&&e!=this.D)&&(e<=this.i?this.Bq(e):(this.fb=i,this.D=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.D},t.g.Cq=function(e){if(t.p(e)){e=t.Za(t.N(e),-90,90);var i=(0,window.isNaN)(e);return(i!=this.sb||!i&&e!=this.f)&&(e>=this.o?this.zq(e):(this.sb=i,this.f=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.f},t.g.zq=function(e){if(t.p(e)){e=t.Za(t.N(e),-90,90);var i=(0,window.isNaN)(e);return(i!=this.$a||!i&&e!=this.o)&&(e<=this.f?this.Cq(e):(this.$a=i,this.o=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.o},t.g.Ne=function(e,i){if(t.p(e)||t.p(i)){var n=0;return t.p(e)&&(t.A(e)&&(1<e.length&&(i=e[1]),e=e[0]),this.bj!=e&&(this.bj=!!e,n=2)),t.p(i)?(i=!!i,this.yg!=i&&(this.yg=i,n=2)):1==arguments.length&&(e=!!e,this.yg!=e&&(this.yg=e,n=2)),this.va(n),this}return[ft(this),bt(this)]},t.g.Xc=function(t){for(var e=0;e<arguments.length-1;e+=2){var i=(0,window.parseFloat)(+arguments[e]),n=(0,window.parseFloat)(+arguments[e+1]);(0,window.isNaN)(i)||(0,window.isNaN)(n)||(i<this.fh&&(this.fh=i,this.Kc=!1),i>this.bg&&(this.bg=i,this.Kc=!1),n<this.nf&&(this.nf=n,this.Kc=!1),n>this.me&&(this.me=n,this.Kc=!1))}return this.Kc||this.va(2),this},t.g.oM=function(t){for(var e=arguments,i=0;i<e.length-1;i+=2){var n=+e[i],s=+e[i+1];if((0,window.isNaN)(n)&&(n=(0,window.parseFloat)(e[i])),(0,window.isNaN)(s)&&(s=(0,window.parseFloat)(e[i+1])),this.Ap){var a=Dt(this,n,s,null);this.Xc.apply(this,a)}n<this.Ka&&(this.Ka=n,this.Kc=!1),n>this.Ba&&(this.Ba=n,this.Kc=!1),s<this.Za&&(this.Za=s,this.Kc=!1),s>this.Ha&&(this.Ha=s,this.Kc=!1)}},t.g.Co=function(){this.Ap&&(this.fh=Number.MAX_VALUE,this.bg=-Number.MAX_VALUE,this.nf=Number.MAX_VALUE,this.me=-Number.MAX_VALUE),this.jQ=this.Ka,this.RJ=this.Ba,this.lQ=this.Za,this.cQ=this.Ha,this.Ka=Number.MAX_VALUE,this.Ba=-Number.MAX_VALUE,this.Za=Number.MAX_VALUE,this.Ha=-Number.MAX_VALUE,this.Kc=!1},t.g.Of=function(){return this.Sb&&(0,window.isNaN)(this.na)||this.sb&&(0,window.isNaN)(this.ea)||this.fb&&(0,window.isNaN)(this.ba)||this.$a&&(0,window.isNaN)(this.aa)},t.g.Bg=function(e){return this.Ap=!t.p(e)||e,this.cs||this.Co(),this.cs++,this},t.g.Hg=function(t){return!!(this.cs=Math.max(this.cs-1,0))||this.IC(!!t)},t.g.pb=function(){if(!this.Kc&&this.Bb){this.Kc=!0,this.dT();var e=[this.i,this.f],i=[this.D,this.o],n=this.wx().DB(e[0],i[0]);e=this.xx().DB(e[1],i[1]),this.qz().EB(this.wx().dk(),n[2],n[3]),this.rz().EB(this.xx().dk(),e[2],e[3]),this.ec=this.xq-this.cn,this.qc=this.bn-this.Aq,this.bz=this.D-this.i,this.Bu=this.o-this.f,this.ratio=Math.min(this.Bb.height/this.qc,this.Bb.width/this.ec),this.G=(this.Bb.width-this.ec*this.ratio)/2,this.K=(this.Bb.height-this.qc*this.ratio)/2,n=vt(this,this.i,!0),e=vt(this,this.D,!0),i=vt(this,this.f,!1);var s=vt(this,this.o,!1);this.cn=Math.min(n.cn,e.cn,i.cn,s.cn,n.xq,e.xq,i.xq,s.xq),this.xq=Math.max(n.cn,e.cn,i.cn,s.cn,n.xq,e.xq,i.xq,s.xq),this.Aq=Math.min(n.Aq,e.Aq,i.Aq,s.Aq,n.bn,e.bn,i.bn,s.bn),this.bn=Math.max(n.Aq,e.Aq,i.Aq,s.Aq,n.bn,e.bn,i.bn,s.bn),this.ec=this.xq-this.cn,this.qc=this.bn-this.Aq,this.bz=this.D-this.i,this.Bu=this.o-this.f,this.ratio=Math.min(this.Bb.height/this.qc,this.Bb.width/this.ec),this.G=(this.Bb.width-this.ec*this.ratio)/2,this.K=(this.Bb.height-this.qc*this.ratio)/2;t:{this.b||(this.b=t.qk()),n=(e=this.precision())[0],e=e[1],i=this.Bq(),s=this.yq();var a=this.Cq(),o=this.zq();if(this.b.clear(),this.fe&&C(this.fe.default.Pg)){var r=Ct(this,i,a,null);this.b.moveTo(r[0],r[1]),r=Ct(this,i,o,null),this.b.lineTo(r[0],r[1]),r=Ct(this,s,o,null),this.b.lineTo(r[0],r[1]),r=Ct(this,s,a,null),this.b.lineTo(r[0],r[1])}else{if(r=Ct(this,i,a,null),(0,window.isNaN)(r[0])||(0,window.isNaN)(r[1]))break t;this.b.moveTo(r[0],r[1]);for(var l=a;l<o;)r=Ct(this,i,l,null),this.b.lineTo(r[0],r[1]),l+=e;for(r=Ct(this,i,o,null),this.b.lineTo(r[0],r[1]),l=i;l<s;)r=Ct(this,l,o,null),this.b.lineTo(r[0],r[1]),l+=n;for(r=Ct(this,s,o,null),this.b.lineTo(r[0],r[1]),l=o;l>a;)r=Ct(this,s,l,null),this.b.lineTo(r[0],r[1]),l-=e;for(r=Ct(this,s,a,null),this.b.lineTo(r[0],r[1]),l=s;l>i;)r=Ct(this,l,a,null),this.b.lineTo(r[0],r[1]),l-=n}r=Ct(this,i,a,null),this.b.lineTo(r[0],r[1]),this.b.close()}}},t.g.dT=function(){var t=(this.fb?(0,window.isNaN)(this.ba)?this.bg:this.ba:this.D)-(this.Sb?(0,window.isNaN)(this.na)?this.fh:this.na:this.i),e=(this.$a?(0,window.isNaN)(this.aa)?this.me:this.aa:this.o)-(this.sb?(0,window.isNaN)(this.ea)?this.nf:this.ea:this.f);this.fb&&(this.D=(0,window.isNaN)(this.ba)?this.bg+t*this.P:this.ba),this.Sb&&(this.i=(0,window.isNaN)(this.na)?this.fh-t*this.P:this.na),this.$a&&(this.o=(0,window.isNaN)(this.aa)?this.me+e*this.P:this.aa),this.sb&&(this.f=(0,window.isNaN)(this.ea)?this.nf-e*this.P:this.ea),this.cn=this.Ka,this.Aq=this.Za,this.xq=this.Ba,this.bn=this.Ha},t.g.transform=function(t,e,i){return(t=Ct(this,t,e,i))[0]=t[0]*this.zoom+this.Dk,t[1]=t[1]*this.zoom+this.dn,t},t.g.Mc=function(e,i){return this.pb(),!this.Bb||(0,window.isNaN)(e)||(0,window.isNaN)(i)?[window.NaN,window.NaN]:(e=t.N(e),i=t.N(i),e=(e-this.Dk)/this.zoom,i=(i-this.dn)/this.zoom,Dt(this,+(ft(this)?this.Bb.cb()-this.G-e:e-this.Bb.left-this.G)/this.ratio+this.cn,-(bt(this)?this.Bb.Va()-this.K-i:i-this.Bb.top-this.K)/this.ratio+this.bn))},t.g.Lr=function(e){return this.pb(),e=t.N(e),e=t.Tm((e-this.i)/this.bz,3),ft(this)?1-e:e},t.g.Jp=function(e){return this.pb(),e=t.N(e),e=t.Tm((e-this.f)/this.Bu,3),bt(this)?1-e:e},t.g.F=function(){var t=ct.u.F.call(this);return t.type=this.Ma(),this.fb||(t.maximumX=this.D),this.$a||(t.maximumY=this.o),this.Sb||(t.minimumX=this.i),this.sb||(t.minimumY=this.f),t.precision=this.precision(),t.gap=this.mq(),t.xTicks=this.wx().F(),t.xMinorTicks=this.qz().F(),t.yTicks=this.xx().F(),t.yMinorTicks=this.rz().F(),(0,window.isNaN)(this.cl)||(t.maxTicksCount=this.cl),t},t.g.U=function(t,e){ct.u.U.call(this,t,e),this.Bq(t.minimumX),this.Cq(t.minimumY),this.yq(t.maximumX),this.zq(t.maximumY),this.precision(t.precision),this.mq(t.gap),this.wx(t.xTicks),this.qz(t.xMinorTicks),this.xx(t.yTicks),this.rz(t.yMinorTicks),this.an(t.maxTicksCount)},t.g.R=function(){t.sd(this.ud,this.Uc,this.Od,this.Hd),this.Hd=this.Od=this.Uc=this.ud=null,ct.u.R.call(this)};var ti=ct.prototype;ti.maxTicksCount=ti.an,ti.getType=ti.Ma,ti.gap=ti.mq,ti.xTicks=ti.wx,ti.xMinorTicks=ti.qz,ti.yTicks=ti.xx,ti.yMinorTicks=ti.rz,ti.extendDataRange=ti.Xc,ti.minimumX=ti.Bq,ti.maximumX=ti.yq,ti.minimumY=ti.Cq,ti.maximumY=ti.zq,ti.precision=ti.precision,kt.prototype.pop=function(){Ot(this,0,this.b.length-1);var t=this.b.pop();return $t(this,0),t},t.ja(Pt),Pt.prototype.Ma=function(){return"geo-json"},Pt.prototype.f=function(e){var i,n=[];switch(e.type){case"FeatureCollection":if(e.features){var s=e.features;for(e=0,i=s.length;e<i;e++){var a=s[e];n.push(Lt(this,a.geometry,a.properties))}}else t.il(10,"FeatureCollection object missing 'features' member.");break;case"GeometryCollection":if(e.geometries)for(s=e.geometries,e=0,i=s.length;e<i;e++)n.push(Lt(this,s[e],s[e].properties));else t.il(10,"GeometryCollection object missing 'geometries' member.");break;case"Feature":e.properties&&e.geometry?n.push(Lt(this,e.geometry,e.properties)):t.il(10,"Feature object missing 'properties' or 'geometry' member.");break;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":e.coordinates?n.push(Lt(this,e,null)):t.il(10,"Geometry object missing 'coordinates' member.");break;default:t.il(10,"GeoJSON object must be one of 'Point', 'LineString', 'Polygon', 'MultiPolygon', 'Feature', 'FeatureCollection' or 'GeometryCollection'.")}return n};var ei={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"};t.ja(_t),_t.prototype.Ma=function(){return"svg"},_t.prototype.f=function(e){var i,n;this.i=t.z(e)?(new window.DOMParser).parseFromString(e,"text/xml"):e,this.b={};var s=0;for(i=(e=this.i.getElementsByTagName("defs")).length;s<i;s++){var a=e[s],o=t.Ze(a);for(a=0,n=o.length;a<n;a++){var r=o[a];if(t.af(r)){var l=r.getAttribute("id");this.b[l]||Mt(this,r)}}}return jt(this,this.i,null,null)},t.ja(Xt),Xt.prototype.Ma=function(){return"topo-json"},Xt.prototype.f=function(e){var i=[],n=Pt.Id();return t.Dc(e.objects,(function(s){s=function(e,i,n){return"GeometryCollection"===n.type?{type:"FeatureCollection",features:(0,t.Wa)(n.geometries,(function(t){return Jt(i,t)}),e)}:Jt(i,n)}(this,e,s),i.push.apply(i,n.f(s))}),this),i},Xt.prototype.reverse=function(t,e){for(var i,n=t.length,s=n-e;s<--n;)i=t[s],t[s++]=t[n],t[n]=i},t.g=Qt.prototype,t.g.stroke=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return o!=this.i&&(this.i=o,this.Y.B(16,1)),this}return this.i},t.g.fill=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return l!=this.f&&(this.f=l,this.Y.B(16,1)),this}return this.f},t.g.enabled=function(e){return t.p(e)?(e=!!e,this.b!=e&&(this.b=e,this.Y.B(16,1)),this):this.b},t.g.N=function(e){return t.p(e)&&(this.Y.ka(),t.da(e)||null===e?this.enabled(!!e):t.C(e)&&(this.stroke(e.stroke),this.fill(e.fill),this.enabled(e.enabled)),this.Y.da(!0)),this},t.g.F=function(){var t={};return t.fill=this.fill(),t.enabled=this.enabled(),t.stroke=this.stroke(),t};var ii=Qt.prototype;ii.stroke=ii.stroke,ii.fill=ii.fill,ii.enabled=ii.enabled,t.H(te,t.Mz);var ni={},si=5767168|t.QG;ni.connector={Fb:21,Kb:2,Lb:[t.RH,t.qH,{name:"eventHandler",Qb:"path",Yb:!0,Zb:null,ac:!1,Ib:!1,zIndex:0}],Ob:null,Jb:null,Cb:si},ni.marker={Fb:22,Kb:2,Lb:[t.RH,t.qH],Ob:null,Jb:null,Cb:1572864|t.QG},ni.bubble={Fb:23,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:si,Ab:"value",zb:"value"},ni.choropleth={Fb:24,Kb:2,Lb:[{name:"foreignFill",Qb:"none",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},t.qH],Ob:null,Jb:null,Cb:si},te.prototype.fj=ni,t.Nz(te,te.prototype.fj);var ai={};t.sq(ai,[[0,"geoIdField",t.Cq],[0,"overlapMode",t.Uk],[0,"minZoomLevel",t.N],[0,"maxZoomLevel",t.N],[1,"selectPolygonMarqueeStroke",t.Pq],[1,"selectPolygonMarqueeFill",t.Qq],[0,"selectPolygonMarqueeMarker",t.Cq]]),t.U(te,ai),te.prototype.sa=268238864|t.Mz.prototype.sa,te.prototype.ra=1024|t.Mz.prototype.ra;var oi=100,ri={default:{crs:"wsg84",scale:1}},li=20,hi=1e-5;t.g=te.prototype,t.g.fO=0,t.g.uz=1,t.g.lq=1,t.g.Ek=null,t.g.Ma=function(){return"map"},t.g.uy=function(t){return this.axes().zm()[t]},t.g.wy=function(t){return this.axes().zm()[t]},t.g.$da=function(){if(!this.md){var e=this.O();if((e=e?e.Ja():null)&&this.dg()){e=e.Tl(),t.hd&&(e.style["-ms-touch-action"]="none"),t.DE||(t.DE=t.Me("textarea"),t.DE.setAttribute("readonly","readonly"),t.uf(t.DE,{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",left:0,top:0,width:"1px"}),window.document.body.appendChild(t.DE),t.Ld(t.DE,["focus","focusin","select"],(function(t){t.preventDefault()}))),this.wa("pointsselect",(function(e){t.DE.innerHTML=this.gd().g("copyFormat").call(e,e),t.DE.select()}),!1,this),this.Ag=new t.SC(t.DE),this.Ag.K=!0,this.Ag.P=!0,this.Ag.G=!0,this.Ag.aa=!0,this.Ag.Al("zoom_in",187,8),this.Ag.Al("zoom_out",189,8),this.Ag.Al("zoom_full_out",48,8),this.Ag.Al("zoom_in",187,2),this.Ag.Al("zoom_out",189,2),this.Ag.Al("zoom_full_out",48,2),this.Ag.Al("zoom_in",107,8),this.Ag.Al("zoom_out",109,8),this.Ag.Al("zoom_full_out",96,8),this.Ag.Al("zoom_in",107,2),this.Ag.Al("zoom_out",109,2),this.Ag.Al("zoom_full_out",96,2),this.Ag.Al("move_left",37),this.Ag.Al("move_right",39),this.Ag.Al("move_up",38),this.Ag.Al("move_down",40),this.Ag.Al("drill_up",8),this.Ag.Al("drill_up",27);var i,n,a=this.g("minZoomLevel"),o=this.g("maxZoomLevel");this.Ag.wa("shortcut",(function(e){if(this.qh.g("keyboardZoomAndMove")&&(!t.DE.ya||t.DE.ya==this)){var i=0;i=0,this.Jy=!0,this.Fl=100;var n=t.DE.ya.Fh();switch(e.identifier){case"zoom_in":n.Vr();break;case"zoom_out":n.Wr();break;case"zoom_full_out":n.Qm();break;case"move_up":i=10*n.Sg(),n.move(0,i);break;case"move_left":i=10*n.Sg(),n.move(i,0);break;case"move_down":i=-10*n.Sg(),n.move(0,i);break;case"move_right":i=-10*n.Sg(),n.move(i,0);break;case"drill_up":e=n.zf.Pd,t.Wm(n.Sg(),a)&&t.Wm(e.Jd,0)&&t.Wm(e.Fd,0)?(n.zf.oc(a,0,0,a,0,0),this.ay()):this.Cv||(n.si&&n.si.stop(),this.Bv(n,(function(){this.zD=!0,this.Fl=300,this.kj(a),this.Bv(this,(function(){this.zD=!1}))})))}}}),!1,this),this.gha=(0,t.pa)((function(e){if(!this.O())return!1;var i=t.Zj(this.O().Ja()),n=e.J1?e.kf:e,s=this.Fh();n=t.Za(1-n.deltaY/120,.7,2);var r=s.gd().g("zoomOnMouseWheel"),l=this.dg();return(l&&e.clientX>=l.left+i.x&&e.clientX<=l.left+i.x+l.width&&e.clientY>=l.top+i.y&&e.clientY<=l.top+i.y+l.height||!l)&&r&&!(1<n&&s.lq>=o||1>n&&s.lq<=a)}),this),this.Oy=new s(e,!1,this.gha),this.Oy.wa("mousewheel",(function(e){var i=this.Fh(),n=i.zf;this.Jy=!0;var s=t.Zj(this.O().Ja()),r=this.dg();if(r=r&&e.clientX>=r.left+s.x&&e.clientX<=r.left+s.x+r.width&&e.clientY>=r.top+s.y&&e.clientY<=r.top+s.y+r.height,this.qh.g("zoomOnMouseWheel")&&r&&!i.zD){r=t.Za(1-e.deltaY/120,.7,2),this.dJ=this.dK,this.dK=1<r||1==r&&!this.dJ,this.dJ!=this.dK&&i.si&&1==i.si.dc&&i.si.stop();var l=i.Sg();1>r&&t.Wm(l,a)&&!t.zb(n.Pd)?(n.oc(a,0,0,a,0,0),i.lq=a,i.zD=!1,i.si&&1==i.si.dc&&i.si.stop(),i.scale().zoom=a,dt(i.scale(),0,0),ee(i)):1<=r&&(t.Wm(l,o)||l>o)||1>=r&&(t.Wm(l,a)||l<a)||i.zoom(r,e.clientX-s.x,e.clientY-s.y,20)}}),!1,this),this.fW=function(e){if(this.O()&&this.O().Ja()){var i=t.Zj(this.O().Ja()),n=this.ob();if(n&&e.clientX>=n.left+i.x&&e.clientX<=n.left+i.x+n.width&&e.clientY>=n.top+i.y&&e.clientY<=n.top+i.y+n.height&&this.Jy){var s=t.Fe(t.ye(t.DE).b),a=s.scrollLeft,o=s.scrollTop;if(t.DE.select(),t.DE.ya=this,t.gd){var r=s.scrollLeft,l=s.scrollTop;(0,window.setTimeout)((function(){s.scrollLeft==r&&s.scrollTop==l&&t.ll.scrollTo(a,o)}),0)}else t.ll.scrollTo(a,o)}}},this.gW=function(e){if(this.qh.g("zoomOnDoubleClick")){var i=this.Fh(),n=t.Zj(this.O().Ja()),s=i.dg();s&&e.clientX>=s.left+n.x&&e.clientX<=s.left+n.x+s.width&&e.clientY>=s.top+n.y&&e.clientY<=s.top+n.y+s.height&&(this.Jy=!0,n=this.g("zoomFactor"),s=e.clientX,e=e.clientY,this.Fl=100,i.zoom(n,s,e))}},this.wI=function(){this.OJ=0,this.ey(),t.Yd(window.document,["pointermove","touchmove"],this.O6,!1,this)},this.hW=function(){this.Om||(t.Yd(window.document,"mousemove",this.bB,!1,this),t.Yd(window.document,"mouseup",this.cB,!1,this))},t.Ld(this.eg(),["drag","dragstart"],(function(){this.ON=!0}),!1,this),t.Ld(this.eg(),"dragend",(function(){this.ON=!1}),!1,this),t.Ld(e,"click",this.fW,!1,this),t.Ld(e,"dblclick",this.gW,!1,this),this.OJ=0,t.Ld(e,["pointerup","touchend"],this.wI,!1,this),this.wa("mousedown",(function(e){var s=t.Zj(this.O().Ja()),a=this.dg();a&&e.clientX>=a.left+s.x&&e.clientX<=a.left+s.x+a.width&&e.clientY>=a.top+s.y&&e.clientY<=a.top+s.y+a.height&&(this.Jy=!0,i=e.clientX,n=e.clientY,t.Ld(window.document,"mousemove",this.bB,!0,this),t.Ld(window.document,"mouseup",this.cB,!0,this))}),!1,this),this.bB=function(t){var e=this.Fh();this.qh.g("drag")&&1!=e.Sg()&&!this.ON&&(e.lk(),e.move(t.clientX-i,t.clientY-n),this.dispatchEvent("drag"),i=t.clientX,n=t.clientY)},this.cB=function(){if(this.FN){this.ey();for(var e=this.hb.length;e--;){var i=this.hb[e];21==i.bf.type&&(i.ZA=this.zf.Ig().clone(),i.B(1024,1),i.kz())}}t.Yd(window.document,"mousemove",this.bB,!0,this),t.Yd(window.document,"mouseup",this.cB,!0,this)},t.Ld(e,"mouseleave",this.hW,!1,this)}else(0,window.setTimeout)(this.c3,100)}},t.g.lk=function(){this.Om||(this.Om=!0,this.dispatchEvent("dragstart"))},t.g.ey=function(){this.Om&&(this.Om=!1,this.qh.g("drag")&&1!=this.Fh().Sg()&&!this.ON&&this.dispatchEvent("dragend"))},t.g.Vka=function(e){this.If(e),this.Jy=!1;var i=t.Zj(this.O().Ja()),n=this.dg();if(n&&e.clientX>=n.left+i.x&&e.clientX<=n.left+i.x+n.width&&e.clientY>=n.top+i.y&&e.clientY<=n.top+i.y+n.height){if(2==(n=(i=(e.gE||e).kf.kf).touches.length))e=i.touches[0],i=i.touches[1],this.OJ=t.gn(e.pageX,e.pageY,i.pageX,i.pageY),this.LJ=!1;else if(1==n){if(this.LJ=!0,this.RW=e,!this.u6){if(this.z6=this.wc.Ce(this,"touchstart",(function(t){1<t.gE.kf.kf.touches.length&&(this.LJ=!1)})),this.y6=this.wc.Ce(this,"touchmove",(function(){this.LJ=!1})),this.qh.g("drag")&&1!=this.Sg()){var s=(n=this.zf).ck();t.qb(n.rb(),s)&&i.preventDefault()}this.u6=!0,(0,window.setTimeout)(this.Wka,10)}this.k6=e.clientX,this.l6=e.clientY,this.Om=!0}else this.LJ=!1;t.Ld(window.document,["pointermove","touchmove"],this.O6,!1,this),t.Ld(window.document.body,["pointermove","touchmove"],(function(){return!1}),!1,this)}},t.g.Sj=function(t){this.nB||(this.FN=!1,this.RW=t,this.Sg()==this.g("minZoomLevel")?(0,window.setTimeout)(this.O$,0,t):this.f4||(this.w6=this.wc.Ce(this,"mousemove",(function(){this.FN=!this.ON})),this.f4=!0,(0,window.setTimeout)(this.tea,70)))},t.g.h2=function(){return this.sG||this},t.g.Eq=function(e){if("drill-down"==this.gd().g("selectionMode")){var i=this.Fh().pT();if(i){var n,s=t.so(e.domTarget);if(t.J(e.target,t.Pu)||t.J(e.target,t.dy)){(e=e.target.Zi()).aj&&e.aj()&&(n=e);var a=s}else t.J(e.target,t.Ww)||this.$q(e.target)?s&&(s.fg?(n=s.fg.X,a=s.fg.vd):(n=s.X,a=s.index)):(n=s&&s.X,a=t.ea(s.index)?s.index:e.pointIndex);n&&(i=i[s=n.ce(a).get("id")])&&(t.J(i,te)?this.jr(s,i):t.C(i)&&(this.VH[s]||(this.VH[s]=t.Xp(i)),this.jr(s,this.VH[s])))}}else te.u.Eq.call(this,e)},t.g.hg=function(e){var i,n=this.Fh(),s=n.gd().g("hoverMode"),a=t.so(e.domTarget),o=!1;if(t.J(e.target,t.Pu)||t.J(e.target,t.dy)){var r=e.target.Zi();r.aj&&r.aj()&&(i=r),r=a}else t.J(e.target,t.Ww)||n.$q(e.target)?(a&&(a.fg?(i=a.fg.X,r=a.fg.vd,t.A(r)&&!r.length&&(r=window.NaN)):(i=a.X,r=a.index)),o=!0):(i=a&&a.X,r=t.ea(a.index)?a.index:e.pointIndex);if(i&&!i.md&&i.enabled()&&t.D(i.Tg)&&(a=i.Tg(e))){var l=t.so(e.relatedDomTarget);l=t.N(t.C(l)?l.index:l),t.to(i,e.relatedTarget)&&l==r||!i.dispatchEvent(a)||"single"!=s||(0,window.isNaN)(r)&&!t.A(r)||(i.Md(),n.hA(),n.dispatchEvent(n.bl("hovered",e,[{X:i,vd:[],De:{index:t.A(r)?r[0]:r,Tf:0}}],!1,o)))}"single"==s||t.to(n,e.relatedTarget)||(n.Md(),n.hA(),n.zl&&n.dispatchEvent(n.bl("hovered",e,n.zl,!0,o)),n.zl=null)},t.g.Ih=function(t){this.FN||te.u.Ih.call(this,t)},t.g.O6=function(e){var i=e.kf,n=i.touches?i.touches.length:0;this.Jy=!1;var s=this.Fh(),a=s.zf;if(2==n){n=i.touches[0];var o=i.touches[1];i=t.gn(n.pageX,n.pageY,o.pageX,o.pageY),e=Math.min(n.pageX,o.pageX)+Math.abs(n.pageX-o.pageX)/2,n=Math.min(n.pageY,o.pageY)+Math.abs(n.pageY-o.pageY)/2;var r=25<Math.abs(i-this.OJ);o=this.g("minZoomLevel");var l=this.g("maxZoomLevel");this.qh.g("zoomOnMouseWheel")&&r&&(r=0<i-this.OJ?1.3:1/1.3,this.OJ=i,this.dJ=this.dK,this.dK=1<r||1==r&&!this.dJ,this.dJ!=this.dK&&s.si&&1==s.si.dc&&s.si.stop(),1>r&&t.Tm(s.Sg(),2)==o&&!t.zb(a.Pd)?(a.oc(o,0,0,o,0,0),s.lq=o,s.zD=!1,s.si&&1==s.si.dc&&s.si.stop(),s.scale().zoom=o,dt(s.scale(),0,0),ee(s)):1<r&&s.Sg()>=l||1>r&&s.Sg()<=o||(a=t.Of(this.O().ia()),s.zoom(r,e-a.left,n-a.top)))}else 1==n&&(this.Om&&this.qh.g("drag")&&1!=this.Sg()?(a=e.clientX-s.k6,i=e.clientY-s.l6,t.uf(window.document.body,"cursor","move"),s.move(a,i),s.k6=e.clientX,s.l6=e.clientY):t.uf(window.document.body,"cursor",""))},t.g.oq=function(e){if(t.J(e.target,t.Ww))return t.so(e.domTarget).vd;var i=this.lf||t.kn(0,0,0,0),n=e.clientX;e=e.clientY;var s=t.Zj(this.O().Ja());n-=s.x,e-=s.y,s=i.left;var a=i.top,o=i.width;if(i=i.height,n<s||n>s+o||e<a||e>a+i)return null;if(i=[],"by-spot"==(s=this.gd()).g("hoverMode")){var r=s.g("spotRadius");for(a=0,o=this.hb.length;a<o;a++){var l=this.hb[a];if(l.enabled()){var h=l.$(),c=[];h.reset();for(var u,d=window.Infinity;h.advance();)if(h.j("shape")){var p=h.j("x"),g=h.j("value");s=h.ma(),(p=t.gn(p,g,n,e))<=r&&(c.push(s),p<d&&(d=p,u=s))}c.length&&i.push({X:l,vd:c,Ln:c[c.length-1],De:{index:u,Tf:d}})}}}else this.gd().g("hoverMode");return i},t.g.mG=function(t,e){for(var i,n=[],s=0,a=t.length;s<a;s++){var o=t[s],r=o.X,l={series:r},h=r.$(),c=[];if(!e)for(var u=0;u<o.vd.length;u++){var d=o.vd[u];h.select(d)&&((i=(i=h.j("features"))&&i.length?i[0].properties:null)?(d={id:i[P(r)],index:h.ma(),properties:i},c.push(d)):c.push(d))}l.points=c,o.De?(d=o.De.index,h.select(d)&&(d={},(i=(i=h.j("features"))&&i.length?i[0].properties:null)?(d.id=i[P(r)],d.index=h.ma(),d.properties=i):d.index=h.ma()),o={point:d,distance:o.De.Tf}):o={index:window.NaN,distance:window.NaN},l.nearestPointToCursor=o,n.push(l)}return n},t.g.TL=function(e,i){var n=t.wr(this.Fh(),"colorRange");if(e=t.A(e)?e.length?e[0]:window.NaN:e,n&&n.target()&&!(0,window.isNaN)(e)){var s=n.target();if(s==i){var a=s.$();a.select(e),s=a.get(s.bf.El),t.aO(n,s)}}},t.g.hA=function(){var e=t.wr(this.Fh(),"colorRange");e&&e.enabled()&&t.bO(e)},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.ES=function(){return new D(this)},t.g.$O=function(e){var i=e.shiftKey||e.ctrlKey||e.metaKey,n=e.left,s=e.top,a=e.width;e=e.height;for(var o=0;o<this.hb.length;o++){var r=this.hb[o],l=r.ej()||this.gd().g("selectionMode");if("none"!=l){var h=t.CB(r,n,s,a,e);"single-select"==l&&(i=!1,h=h[0]),t.EB(r,h,i)}}},t.g.j6=function(e){var i=this.kja,n=this.ija,s=this.jja,a=this.g("selectPolygonMarqueeStroke"),o=this.g("selectPolygonMarqueeFill");if(this.Na){a=a||"red 0.5",o=o||"red 0.2";var r=this.g("selectPolygonMarqueeMarker")||{},l=t.Ub(r.fill||o),h=t.Wb(r.stroke||a);r=r.radius||15,this.xV=i,this.wV=n,this.WH=s,this.yk=[],this.Fy=window.Infinity,this.KD=-window.Infinity,this.Gy=window.Infinity,this.LD=-window.Infinity,this.Y2=!0,this.pN=r,this.f3=!!e,this.Dm||(this.Dm=this.Na.path(),this.ku=this.Na.path(),this.rp=this.Na.rn()),this.rp.parent(this.Na),this.rp.stroke(h),this.rp.fill(l),this.rp.zIndex(999),this.ku.parent(this.Na),this.ku.stroke(a,3,"3 3"),this.ku.zIndex(1e3),this.Dm.parent(this.Na),this.Dm.stroke(a),this.Dm.fill(o),this.Dm.zIndex(1e3),this.Na.wa("mousemove",this.L4,!0,this),this.Na.wa("dblclick",this.K4,!0,this),this.Na.wa("click",this.J4,!0,this),e=!0}else e=!1;return this.nB=e,this},t.g.L4=function(e){if(this.yk.length){var i=t.Zj(this.O().Ja()),n=e.clientX-i.x;for(e=e.clientY-i.y,i=t.jb(new t.gb(this.yk[0],this.yk[1]),new t.gb(n,e))<=this.pN,this.ku.clear(),i&&(this.ku.moveTo(n,e),this.ku.lineTo(this.yk[0],this.yk[1])),this.Dm.clear(),this.Dm.moveTo(this.yk[0],this.yk[1]),i=2;i<this.yk.length;i+=2)this.Dm.lineTo(this.yk[i],this.yk[i+1]);this.Dm.lineTo(n,e)}},t.g.J4=function(e){e.stopPropagation(),e.preventDefault();var i=t.Zj(this.O().Ja()),n=e.clientX-i.x;i=e.clientY-i.y,this.Fy=Math.min(n,this.Fy),this.KD=Math.max(n,this.KD),this.Gy=Math.min(i,this.Gy),this.LD=Math.max(i,this.LD),this.yk.push(n,i);var s=!1;2<this.yk.length&&(s=t.jb(new t.gb(this.yk[0],this.yk[1]),new t.gb(n,i))<=this.pN);var a=new t.I(this.Fy,this.Gy,this.KD-this.Fy,this.LD-this.Gy);s?(t.p(this.WH)&&this.WH.call(this,this.yk,a,e),this.f3?(ne(this),this.yk.length=0,this.KD=this.LD=-window.Infinity,this.Fy=this.Gy=window.Infinity):ie(this)):2==this.yk.length?(this.rp.To(n),this.rp.Uo(i),this.rp.Eb(this.pN),t.p(this.xV)&&this.xV.call(this,this.yk,a,e)):t.p(this.wV)&&this.wV.call(this,this.yk,a,e)},t.g.K4=function(e){var i=new t.I(this.Fy,this.Gy,this.KD-this.Fy,this.LD-this.Gy);this.WH&&this.WH.call(this,this.yk,i,e),this.f3?(ne(this),this.yk.length=0,this.KD=this.LD=-window.Infinity,this.Fy=this.Gy=window.Infinity):ie(this),e.stopPropagation(),e.preventDefault()},t.g.Eda=function(){return ie(this),this},t.g.kN=function(){return!!this.Y2},t.g.kja=function(t,e,i){return this.dispatchEvent(se("selectmarqueestart",t,e,i))},t.g.ija=function(t,e,i){return this.dispatchEvent(se("selectmarqueechange",t,e,i))},t.g.jja=function(n,s,a){var o=se("selectmarqueefinish",n,s,a);if(n=this.dispatchEvent(o)){var r=this.zf.Ig();for(s=o.polygon,a=0;a<s.length;a+=2)s[a]-=r.Jd,s[a]/=r.od,s[a+1]-=r.Fd,s[a+1]/=r.Le;var l=o.polygonBounds;for(l.left-=r.Jd,l.left/=r.od,l.top-=r.Fd,l.top/=r.Le,o=o.shiftKey||o.ctrlKey||o.metaKey,a=0;a<this.hb.length;a++){var h=(r=this.hb[a]).ej()||this.gd().g("selectionMode");if("none"!=h){for(var c=r,u=s,d=l,p=c.Ec(),g=[];p.advance();){var f,b=void 0,v=f=void 0,m=c,y=p,S=u,w=d,x=[],C=[];if(t.J(m.Rf,t.WA)&&(v=y.j(m.Rf.P)))for(b in v)if(y=v[b],t.J(y,t.Ag))if((0<=(m=t.yg(y)).segments.indexOf(4)||0<=m.segments.indexOf(3))&&(y.tJ(),m=t.yg(y)),0<(0,t.fda)(m.segments,1)){y=[];for(var D,T,k=0,$=D=window.Infinity,O=T=-window.Infinity,P=0;P<m.segments.length;P++){var L=m.count[P];if(y=y.concat(m.arguments.slice(k,k+2*L)),k+=2*L,P+1>=m.segments.length||1==m.segments[P+1]){for(L=0;L<y.length;L+=2)$=Math.min($,y[L]),O=Math.max(O,y[L]),D=Math.min(D,y[L+1]),T=Math.max(T,y[L+1]);L=[$,D,O,D,O,T,$,T],0<y.length&&t.bn(t.ln(w),L)&&(x.push(y),y=[])}}}else f=y.rb(),t.bn(t.ln(f),t.ln(w))&&x.push(m.arguments);else t.J(y,t.rg)?(m=y.Tp(),y=y.Eb(),x.push([m.x,m.y]),C.push({x:m.x,y:m.y,r:y})):x.push(t.ln(f));else v=y.j(m.Ah.zb+"X"),f=y.j(m.Ah.zb),m.Ah.zb==m.Ah.Ab?x.push([v,f]):(b=y.j(m.Ah.Ab+"X"),m=y.j(m.Ah.Ab),x.push([v,f,b,m,v,m,b,f]));for(v=!1,f=0;f<x.length;f++)for(b=x[f],m=0;m<b.length;m+=2){t:{if(y=b[m],k=b[m+1],$=window.Infinity,t.p(w)){if(y<w.tb()||y>w.cb()||k<w.Vb()||k>w.Va()){y=!1;break t}}else for(O=0;O<S.length;O+=2)$=Math.min($,S[O]);for(O=t.p(w)?{x:w.left-100,y:0}:{x:$,y:0},D=S.length-2,T=!1,$=0;$<S.length;$+=2)t.en(S[$],S[$+1],S[D],S[D+1],y,k,O.x,O.y)&&(T=!T),D=$;y=T}if(y){v=!0;break}}if(!(w=v)){for(f=!1,w=0;w<x.length;w++)if(!(4>(b=x[w]).length)){for(v=b.length-2,m=0;m<b.length;m+=2){for(y=S.length-2,k=0;k<S.length;k+=2){if(t.en(b[m],b[m+1],b[v],b[v+1],S[k],S[k+1],S[y],S[y+1])){f=!0;break}y=k}if(f)break;v=m}if(f)break}w=f}if(!w)for(w=!1,x=0;x<C.length;x++){for(b=C[x],v=S.length-2,f=0;f<S.length;f+=2){if($=S[f],k=S[f+1],y=S[v],O=S[v+1],v=b.x,m=b.y,y=new t.Fi($,k,y,O),($=v)instanceof t.gb?(k=$.y,$=$.x):k=m,O=y.Hj,D=y.ze,k=((Number($)-O)*(y.mi-O)+(Number(k)-D)*(y.Pe-D))/i(y),k=t.Za(k,0,1),y=new t.gb(e(y.Hj,y.mi,k),e(y.ze,y.Pe,k)),t.jb(y,new t.gb(v,m))<=b.r){w=!0;break}v=f}if(w)break}w&&g.push(p.ma())}c=g,"single-select"==h&&(o=!1,c=c[0]),t.EB(r,c,o)}}this.dispatchEvent({type:"pointsselect",points:this.NM(),seriesStatus:[]})}return n},t.g.JS=function(e,i){return this.xv||(this.xv=new t.cx,t.W(this,"crsAnimation",this.xv),t.K(this.xv,this.Oia,this)),t.p(e)?(this.xv.N.apply(this.xv,arguments),this):this.xv},t.g.Oia=function(){},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),t.K(this.Mb,this.Tz,this),this.B(524292,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=557072,n|=1,this.ow()),t.X(e,8)&&(i|=4,n|=8),t.X(e,2)&&(i|=524288,n|=8),this.B(i,n)},t.g.$q=function(e){return t.J(e,t.WN)},t.g.m0=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.eo[n];return a||((a=new it).kb(this),a.Ga(this.U0()),a.$c(),this.eo[n]=a,t.K(a,this.Gia,this),this.B(16777220,1)),t.p(s)?(a.N(s),this):a},t.g.Gia=function(e){var i=0,n=0;t.X(e,1)&&(i|=16777216,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.U0=function(e){return this.QS||(this.QS=t.zm("map.defaultCalloutSettings")),t.p(e)?(t.ra(this.QS,e),this):this.QS||{}},t.g.axes=function(e){if(!this.Rp){this.Rp=new et(this),t.W(this,"axesSettings",this.Rp),this.Rp.Kg(!0);for(var i=this.scale(),n=this.Rp.zm(),s=0;s<n.length;s++){var a=n[s];a.scale()!==i&&a.scale(i)}}return t.p(e)?(this.Rp.ga(!1,e),this):this.Rp},t.g.gO=function(e){var i=0;t.X(e,8)?i|=4:t.X(e,1)&&(i|=33554432),this.B(i,1)},t.g.PU=function(e){return this.yy||(this.yy=new ot(this),t.W(this,"gridsSettings",this.yy),this.yy.Kg(!0)),t.p(e)?(this.yy.ga(!1,e),this):this.yy},t.g.t4=function(){this.B(67108864,1)},t.g.mh=function(e){return this.$f||(this.$f=new st,t.W(this,"crosshair",this.$f),t.qA(this.$f,this),t.K(this.$f,this.fB,this)),t.p(e)?(this.$f.N(e),this):this.$f},t.g.fB=function(){this.B(134217728,1)},t.g.zM=function(t){return I(t)?15:30},t.g.VX=function(t){O(t,this.g("geoIdField")),this.wl&&(t.ss=this.wl),te.u.VX.call(this,t)},t.g.Gt=function(t,e){return new $(this,this,t,e,!0)},t.g.Ss=function(e){return t.zk(Fe,e,"choropleth")},t.g.FE=function(e){var i=0;if(t.X(e,32768)&&(i|=256),t.X(e,1)&&(i=32768,I(e.target)&&(i|=16)),t.X(e,1024)&&(i|=8388608),t.X(e,4)&&(i|=4194304),t.X(e,2048)&&(i=32),t.X(e,16)){i|=8422144,I(e.target)&&(i|=16);for(var n=this.hb.length;n--;)this.hb[n].B(4260356)}t.X(e,64)&&(i|=512,t.X(e,8)&&(i|=4)),t.X(e,128)&&(i|=524288,e=t.wr(this,"colorRange"))&&(e.ae(),e.B(e.se)),this.B(i,1)},t.g.ow=function(){for(var t=this.hb.length;t--;)this.hb[t].B(4)},t.g.Zz=function(e){return(e=e?e.path():t.qk()).eq(!0),e},t.g.v0=function(t){t.clear(),t.parent(null),t.Bl(),t.oc(1,0,0,1,0,0),delete t.tag},t.g.clear=function(){this.zf&&(re(this)?oe(this,this.zf):this.zf.clear()),this.zw.length=0},t.g.dg=function(){return this.lf},t.g.scale=function(e){return t.p(e)?(e&&t.J(e,ct)?this.qa!=e&&(this.qa&&t.kr(this.qa,this.yM,this),this.qa=e,t.K(this.qa,this.yM,this),this.B(65536,1)):(this.qa||(this.qa=new ct,this.qa.U(this.qa.oa,!0),t.K(this.qa,this.yM,this)),this.qa.N(e)),this):(this.qa||(this.qa=new ct,this.qa.U(this.qa.oa,!0),t.K(this.qa,this.yM,this)),this.qa)},t.g.yM=function(e){var i=0;t.X(e,4)&&(i|=65540),t.X(e,2)&&(i|=4),this.B(i,1)},t.g.Ra=function(){return null},t.g.bb=function(){return null},t.g.ux=function(e){return t.p(e)?(t.C(e)?(this.PJ&&!t.z(this.PJ)||(this.PJ=new Qt(this)),this.PJ.N(e)):this.PJ=t.zk(Ge,e,"hide"),this.B(16,1),this):this.PJ},t.g.ss=function(e){if(t.p(e)){if(t.z(e)&&!t.ec(e,"<")){this.xM=e;var i=e.split(".");e=t.ll;for(var n=0,s=i.length;n<s;n++)e=e[i[n]]}else this.xM=null;return this.An!=e&&(this.An=e,this.B(5095440,1)),this}return this.An},t.g.f1=function(e,i,n){var s=mt(this.scale(),e[i],e[i+1]);e=s[0],s=s[1],t.Gc(n,"coordinates")?n.ia.moveTo(e,s).lineTo(e,s):i?n.ia.lineTo(e,s):n.ia.moveTo(e,s)},t.g.aS=function(e,i,n){var s=this.TT;if(re(this.map))"image"==n.type||"text"==n.type?(e=t.mg().kW(n.cloneNode),s.oM(e.tb(),e.Vb(),e.cb(),e.Va())):"path"==n.type&&(this.map.lW||(this.map.lW=t.qk()),Rt(n.commands_tx?n.commands_tx:n.commands,this.map.lW),e=this.map.lW.rb(),s.oM(e.tb(),e.Vb(),e.cb(),e.Va()));else{if(this.V4){n=(e[i]-this.fe.ri)/this.fe.scale;var a=(e[i+1]-this.fe.jj)/this.fe.scale;this.U4&&(n=(a=this.U4.xj(n,a))[0],a=a[1]),a=this.V4.forward(n,a),e[i]=a[0]*this.fe.scale+this.fe.ri,e[i+1]=a[1]*this.fe.scale+this.fe.jj}s.oM(e[i],e[i+1])}},t.g.iT=function(t){return this==ge(this)?te.u.iT.call(this,t):t},t.g.mD=function(e){var i=e.clone();if(t.wr(this,"axesSettings")){var n=0,s=0,a=0,o=0;i=e.clone();for(var r,l=this.Rp.zm(),h=0;h<l.length;h++)if((r=l[h]).g("enabled")){r.ja(e);var c=r.yd(),u=e.left-c.left;n<u&&c.left&&(n=u),s<(u=e.top-c.top)&&c.top&&(s=u),a<(u=c.cb()-e.cb())&&c.cb()&&(a=u),o<(u=c.Va()-e.Va())&&c.Va()&&(o=u),r.B(4)}i.left+=n,i.top+=s,i.width-=n+a,i.height-=s+o}return i},t.g.pb=function(){var e,i=this.scale(),s=!1;if(this.J(262144)){var a=this.ss();if(null!=a){a=t.z(this.An)&&!t.ec(a,"<")?t.eq.maps[this.An]:this.An,t.z(a)&&t.ec(a,"<")||t.Oe(a)?this.jE=_t.Id():"topology"===a.type.toLowerCase()?this.jE=Xt.Id():this.jE=Pt.Id(),this.rV=this.jE.f(a),t.qd(this.wl),this.wl=null,(s=a["ac-geoFieldId"])&&this.ta("geoIdField",s),this.Ek={};var o=(s=a["ac-tx"]||{}).default;o||(o=s.default=t.Qc(ri.default)),t.Dc(s||ri,(function(e,i){var s={};s.Pg=t.p(e.crs)?n(e.crs):o.Pg,s.wJ=s.Pg,s.Yo=x(s.Pg),s.h6=x(s.wJ),s.scale=e.scale||o.scale||1,s.ri=t.p(e.xoffset)?(0,window.parseFloat)(e.xoffset):0,s.jj=t.p(e.yoffset)?(0,window.parseFloat)(e.yoffset):0,t.p(e.heatZone)&&(s.eu=t.A(e.heatZone)?e.heatZone:t.nn(e.heatZone)),this.Ek[i]=s}),this),(s=a.scale)?ut(i,"minLon"in s?s.minLon:window.NaN,"maxLon"in s?s.maxLon:window.NaN,"minLat"in s?s.minLat:window.NaN,"maxLat"in s?s.maxLat:window.NaN):ut(i,window.NaN,window.NaN,window.NaN,window.NaN)}this.zf?this.clear():(this.zf=ae(this,this.Na),this.zf.zIndex(10),ge(this)==this&&this.c3()),re(this)&&!this.mx&&(this.mx=ae(this,this.zf)),this.ue||(this.ue=this.Na.Bd(),this.ue.zIndex(30)),s=!0,this.B(65540)}if(this.J(65536)){if(this.Ek){if(function(t,e){t.fe=e,t.Kc=!1}(i,this.Ek),this.zf){var r=this.zf.Pd;i.zoom=r.od,dt(i,r.Jd,r.Fd)}var l=this.Ek?this.Ek.default:null,h=!this.bA,c=null===this.Ht?l.wJ:this.Ht;r=!this.wl,this.eB=null,h&&this.Ht?this.eB=this.Ht:this.bA==l.Pg&&this.bA==c||h||re(this)||(this.eB=c);var u=!!this.eB&&!re(this);if(l.Pg!=this.eB&&l.wJ!=this.eB||t.wr(this,"crsAnimation")&&this.xv.g("enabled")){if(!C(l.wJ))var d=l.h6;u&&(e=x(this.eB))}var p=l.Yo;for(h&&(this.bA=c),u&&(this.dr&&1==this.dr.dc&&(this.dr.stop(),this.dr.ld(),this.dr=null),this.bA=this.eB,l.Pg=this.bA,l.Yo=x(l.Pg)),r?(a=this.rV,this.wl=[]):a=u?this.rV:this.wl,h=t.wr(this,"crsAnimation"),(this.dr&&this.dr.dc==t.rz||!this.dr)&&(h&&h.g("enabled")&&0<h.g("duration")&&!r&&u?(l.Yo=new lt(p,e),this.dr=new B(this,a,d,l,h.g("duration"),this!=this.Fh()),this.dr.Ce("end",(function(){this.map.dr.stop(),this.map.dr.ld(),this.fe.Yo=this.fe.Yo.cT}),!0,{map:this,fe:l}),this.dr.play()):(e=(0,t.pa)(this.aS,{fe:l,U4:d,V4:e,TT:this.scale(),map:this}),re(this),i.ka(),i.Bg(s),he(this,a,e,r,u),i.Hg(),i.da(!0),re(this)?(gt(i,!0),this.mx.parent(this.zf),this.mx.oc(1,0,0,1,0,0)):gt(i,!1))),e=-window.Infinity,d=window.Infinity,r=s=0,i=this.hb.length;i--;)(a=this.hb[i]).B(512,1),a.co(),e=Math.max(e,a.La("seriesMax")),d=Math.min(d,a.La("seriesMin")),s+=a.La("seriesSum"),r+=a.La("seriesPointsCount");for(u=s/r,i=0;i<this.hb.length;i++)(a=this.hb[i]).La("max",e),a.La("min",d),a.La("sum",s),a.La("average",u),a.La("pointsCount",r),(a=t.$b(a.stroke()))>this.Cr&&(this.Cr=a)}this.I(65536)}if(this.J(4194304)){if(e=this.g("geoIdField"),this.SH={},this.SH[e]={},this.wl){for(i=this.hb.length;i--;)a=this.hb[i],t.p(a.lD())&&a.lD()!=e&&(this.SH[a.lD()]={});for(i=0,a=this.wl.length;i<a;i++)e=this.wl[i],de(this,e,(function(t){var e=t.properties;if(e)for(var i in this.SH)i in e&&(this.SH[i][e[i]]=t)}),this)}this.I(4194304)}},t.g.RE=function(){te.u.RE.call(this,this.kg),this.yv().bs(pt(this.scale()))},t.g.Qh=function(e){ge(this);var i,n,s,a=this.g("maxZoomLevel"),o=this.g("minZoomLevel"),r=this.scale();if(this.pb(),this.J(32768)){for(i=this.hb.length;i--;){var l=this.hb[i];l.ka(),l.O(this.ue),I(l)&&l.pb(),l.da(!1)}this.wC={},t.Oz(this)}if(this.J(4)){for(i=0,s=this.eo.length;i<s;i++){var h=this.eo[i];h.B(4)}if(t.wr(this,"axesSettings"))for(i=0,s=(l=this.Rp.zm()).length;i<s;i++){var c=l[i];t.Yu(c.labels()),t.Yu(c.qb()),c.B(c.se)}if(t.wr(this,"gridsSettings"))for(i=0,s=(h=this.yy.zm()).length;i<s;i++)(l=h[i]).B(80);this.B(67108864),this.B(33554432),this.B(16777216)}if(this.J(524288)&&t.wr(this,"colorRange")){for(i=0,s=this.hb.length;i<s;i++)I(this.hb[i])&&(n=this.hb[i]);n&&(this.Mb.ka(),this.Mb.scale(n.kd()),this.Mb.target(n),this.Mb.kb(ge(this)),this.Mb.da(!1),this.B(4))}if(this.J(16777216))for(i=0,s=this.eo.length;i<s;i++)if(h=this.eo[i]){n=[];for(var u=0,d=0,p=(c=h.items()).length;d<p;d++)for(var g=c[d],f=0,b=this.hb.length;f<b;f++){l=this.hb[f];var v=(0,t.za)(l.GX,g);(l=-1!=v?l.ce(v):null)&&(n[u]=l,u++)}h.ka(),h.i=n,h.kb(ge(this)),h.O(this.Na),h.zIndex(60),h.da(!1)}if(h=this.zf,this.J(4)){if(this.Mb){this.Mb.ja(e.clone().round());var m=this.Mb.yd()}else m=e.clone();for(this.Na.clip(this.ob()),(e=t.C(this.ux())?t.$b(this.ux().stroke()):0)>this.Cr&&(this.Cr=e),m.left=m.left+this.Cr/2,m.top=m.top+this.Cr/2,m.width=m.width-this.Cr,m.height=m.height-this.Cr,e=m,s=this.eo,l=e.clone(),d=u=c=n=0,i=s.length;i--;)(p=s[i])&&p.enabled()&&(p.ja(e),"top"==(g=p.orientation())?(p=p.yd(),n=e.height-p.height):"bottom"==g?(p=p.yd(),c=e.height-p.height):"left"==g?(p=p.yd(),u=e.width-p.width):"right"==g&&(p=p.yd(),d=e.width-p.width));if(l.left+=u,l.top+=n,l.width-=d+u,l.height-=c+n,(e=this.mD(l).clone()).left+=this.Cr/2,e.top+=this.Cr/2,e.width-=this.Cr,e.height-=this.Cr,r.Qf(e),this.lf=e,t.wr(this,"axesSettings"))for(i=0,s=(l=this.Rp.zm()).length;i<s;i++)(c=l[i]).ae();if(this.zf&&this.Ek&&!this.Ek.default.ri&&this.zf.clip(pt(r)),this.clear(),re(this)&&(r.pb(),this.mx.parent(this.zf),this.mx.oc(1,0,0,1,0,0),this.mx.scale(r.ratio,r.ratio,0,0),r=mt(r,0,0),n=new t.Db(1,0,0,1,r[0],r[1]),t.wb(n,this.mx.Pd),this.mx.oc(n.od,n.We,n.gf,n.Le,n.Jd,n.Fd)),this.wl)for(e=re(this)?this.mx:this.zf,i=0,s=this.wl.length;i<s;i++)r=this.wl[i],ce(this,r,e);for(i=this.hb.length;i--;)(l=this.hb[i]).ja(this.lf),l.B(4,1);r=8388608,re(this)&&(r|=16),this.B(r)}if(this.J(2097152)){r=this.Sg(),i=this.uz*r;var y=(n=this.zf.Ig()).Jd,S=n.Fd;(!(r==o&&i<o||r==a&&i>a)&&h||this.Nr)&&(l=!(t.p(this.Dc)&&t.p(this.uc)),((0,window.isNaN)(this.Dc)||(0,window.isNaN)(this.uc))&&(c=(e=pt(this.scale()).ck()).top+e.height/2,s=(e.left+e.width/2-y)/n.od,e=(c-S)/n.Le,(0,window.isNaN)(this.Dc)&&(this.Dc=s),(0,window.isNaN)(this.uc)&&(this.uc=e)),e=1>this.uz,this.Nr||(i>a?(this.uz=a/this.Sg(),i=this.uz*r):i<o&&e&&(this.uz=o/this.Sg(),i=this.uz*r)),a=this.Fl||200,this.si&&this.si.dc!=t.rz||l||(this.aC=r,this.mQ=i,((e=t.Wm(this.aC,this.mQ,1e-5))&&this.oK||!e)&&this!=this.Fh()||ge(this).dispatchEvent(me(this,"zoomstart"))?(t.eq.ui.ContextMenu&&(e=this.contextMenu()).Oe()&&e.Lc(),l=(e=this.zf).rb(),s=(this.Dc-y)/this.aC,e=(this.uc-S)/this.aC,this.Nr||(s<l.left?s=l.left:s>l.cb()&&(s=l.cb()),e<l.top?e=l.top:e>l.Va()&&(e=l.Va())),this.si=new H(this,[r,y,S],[i,s*(1-this.aC),e*(1-this.aC)],a,this!=this.Fh()),this.si.play()):e&&(s=(e=(a=this.Fh()).zf.rb()).left+e.width/2,e=e.top+e.height/2,y=s*(1-a.lq),S=e*(1-a.lq),this.zf.oc(a.lq,0,0,a.lq,y,S),this.scale().zoom=a.lq,dt(this.scale(),y,S),ee(this)))),this.oK=!1,this.Fl=window.NaN,this.uz=1,this.I(2097152)}if(this.J(1048576)&&(this.Sg()!=o&&h&&(o=h.ck(),l=h.Xt(h.Ig()),y=this.C3?l.left+this.offsetX>=o.left&&0<this.offsetX||l.cb()+this.offsetX<=o.cb()&&0>this.offsetX?0:this.offsetX:l.left+this.offsetX>=o.left?o.left-l.left:l.cb()+this.offsetX<=o.cb()?o.cb()-l.cb():this.offsetX,S=this.C3?l.top+this.offsetY>=o.top&&0<this.offsetY||l.Va()+this.offsetY<=o.Va()&&0>this.offsetY?0:this.offsetY:l.top+this.offsetY>=o.top?o.top-l.top:l.Va()+this.offsetY<=o.Va()?o.Va()-l.Va():this.offsetY,y/=this.Sg(),S/=this.Sg(),this.offsetY=this.offsetX=0,y||S)&&(this.dia=!0,h.RF(1,0,0,1,y,S),n=h.Pd,dt(this.scale(),n.Jd,n.Fd),ee(this)),this.I(1048576)),this.J(33554432)){if(t.wr(this,"axesSettings"))for(l=this.Rp.zm(),i=0;i<l.length;i++)(c=l[i]).ka(),c.O(this.Na),c.W(),c.da(!1);this.I(33554432)}if(this.J(67108864)){if(t.wr(this,"gridsSettings"))for(i=0,s=(h=this.yy.zm()).length;i<s;i++)(l=h[i]).ka(),l.scale(this.scale()),l.O(this.Na),l.W(),l.da(!1);this.I(67108864)}if(this.J(134217728)&&((y=this.mh()).ka(),y.ja(m),y.O(this.Na),y.W(),y.da(!1),this.I(134217728)),this.J(16)){if("as-is"==(y=this.ux()))for(i=0,s=this.zw.length;i<s;i++)(m=this.zw[i]).visible(!0),m.Bl(),delete m.tag;else if(t.C(y)&&y.enabled())for(i=0,s=this.zw.length;i<s;i++)(m=this.zw[i]).visible(!0),m.Bl(),delete m.tag,t.J(m,t.pg)&&m.fill(y.fill()).stroke(y.stroke());else for(i=0,s=this.zw.length;i<s;i++)(m=this.zw[i]).visible(!1),m.Bl(),delete m.tag;this.ow(),this.B(32768),this.I(16)}if(this.J(32768)){for(i=this.hb.length;i--;)m=(l=this.hb[i]).Ma(),this.wC[m]=this.wC[m]||!l.pf(),l.ka(),l.kb(ge(this)),O(l,this.g("geoIdField")),l.W(),l.da(!1);this.I(32768)}if(this.J(8388608)&&(le(this),this.I(8388608)),this.J(524288)&&(t.wr(this,"colorRange")&&(this.Mb.ka(),this.Mb.O(this.Na),this.Mb.zIndex(50),this.Mb.W(),this.Mb.da(!1)),this.I(524288)),this.J(16777216)){for(i=0,s=this.eo.length;i<s;i++)(h=this.eo[i])&&(h.ka(),h.O(this.Na),h.zIndex(60),h.W(),h.da(!1));this.I(16777216)}},t.g.R6=function(e,i,n){var s=pe(this,e);if(s&&!re(this)){var a=s.ia.ck(),o=this.scale().Mc(a.left+a.width/2,a.top+a.height/2);e=(o=xt(this.scale(),o[0],o[1])[0])==this.Ek.default?this.Ek[e]={}:o,i/=this.Sg(),n/=this.Sg();var r=yt(this.scale(),a.left,a.top),l=yt(this.scale(),a.left+i,a.top+n);o=l[0]-r[0],r=l[1]-r[1],l=0;for(var h=s.polygones.length;l<h;l++){for(var c=s.polygones[l],u=c.outerPath,d=0;d<u.length-1;d+=2)u[d]+=o,u[d+1]+=r;for(c=c.holes,d=0;d<c.length-1;d+=2)c[d]+=o,c[d+1]+=r}e.ri=e.ri?e.ri+o:o,e.jj=e.jj?e.jj+r:r,a.left+=i,a.top+=n,i=yt(this.scale(),a.left,a.top),a=yt(this.scale(),a.left+a.width,a.top+a.height),e.eu=t.kn(i[0],i[1],Math.abs(a[0]-i[0]),Math.abs(a[1]-i[1])),this.B(65540,1)}return this},t.g.BT=function(e,i,n){var s=pe(this,e);if(s){var a=s.ia.ck(),o=this.scale().Mc(a.left+a.width/2,a.top+a.height/2);o=(o=xt(this.scale(),o[0],o[1])[0])==this.Ek.default?this.Ek[e]={}:o}if(t.p(i)||t.p(n)){if(s&&!re(this)){var r=o.jj||0;e=(o.ri||0)*this.scale().ratio,r*=this.scale().ratio,i=t.p(i)?i:e,n=t.p(n)?n:r,i/=this.Sg(),n/=this.Sg();for(var l=(i-e)/this.scale().ratio,h=(n-r)/this.scale().ratio,c=0,u=s.polygones.length;c<u;c++){for(var d=s.polygones[c],p=d.outerPath,g=0;g<p.length-1;g+=2)p[g]+=l,p[g+1]+=h;for(d=d.holes,g=0;g<d.length-1;g+=2)d[g]+=l,d[g+1]+=h}o.ri=o.ri?o.ri+l:l,o.jj=o.jj?o.jj+h:h,a.left+=i-e,a.top+=n-r,i=yt(this.scale(),a.left,a.top),a=yt(this.scale(),a.left+a.width,a.top+a.height),o.eu=t.kn(i[0],i[1],Math.abs(a[0]-i[0]),Math.abs(a[1]-i[1])),this.B(65540,1)}return this}return s?[o.ri*this.scale().ratio||0,o.jj*this.scale().ratio||0]:[window.NaN,window.NaN]},t.g.AT=function(e,i){var n=pe(this,e);if(n){var s=this.scale(),a=n.ia.rb(),o=s.Mc(a.left+a.width/2,a.top+a.height/2);o=(o=xt(s,o[0],o[1])[0])==this.Ek.default?this.Ek[e]={}:o}if(t.p(i)){if(n&&!re(this)){var r=t.N(i)||1,l=o.ri||0,h=o.jj||0,c=this.Ek.default.scale||ri.default.scale;c=o.scale?o.scale:c;var u=yt(s,a.left,a.top),d=yt(s,a.left+a.width,a.top+a.height),p=(d[0]-l)/c*r+l;d=(d[1]-h)/c*r+h,u=mt(s,(u[0]-l)/c*r+l,(u[1]-h)/c*r+h),d=mt(s,p,d),d=t.kn(u[0],u[1],Math.abs(d[0]-u[0]),Math.abs(d[1]-u[1])),u=yt(s,d.left+d.width/2,d.top+d.height/2),a=(p=yt(s,a.left+a.width/2,a.top+a.height/2))[0]-u[0],p=p[1]-u[1],u=yt(s,d.left,d.top),d=yt(s,d.left+d.width,d.top+d.height),u[0]+=a,u[1]+=p,d[0]+=a,d[1]+=p,s=0;for(var g=n.polygones.length;s<g;s++){for(var f=n.polygones[s],b=f.outerPath,v=0;v<b.length-1;v+=2)b[v]=(b[v]-l)/c*r+l+a,b[v+1]=(b[v+1]-h)/c*r+h+p;for(f=f.holes,v=0;v<f.length-1;v+=2)f[v]=(f[v]-l)/c*r+l+a,f[v+1]=(f[v+1]-h)/c*r+h+p}o.eu=t.kn(u[0],u[1],Math.abs(d[0]-u[0]),Math.abs(d[1]-u[1])),o.ri=o.ri?o.ri+a:a,o.jj=o.jj?o.jj+p:p,o.scale=r,this.B(65540,1)}return this}return n?o.scale||this.Ek.default.scale||1:window.NaN},t.g.zT=function(e,i){var n=pe(this,e);if(n){var s=this.scale(),a=n.ia.rb(),o=s.Mc(a.left+a.width/2,a.top+a.height/2);if(o=xt(s,o[0],o[1])[0],t.p(i)){if(!re(this)){n.ia.clear();var r=n.properties[this.g("geoIdField")],l=o==this.Ek.default?this.Ek[r]={}:o,h=l.Pg||this.Ek.default.Pg||ri.default.crs;o=x(h),r=x(i);for(var c=l.ri||0,u=l.jj||0,d=l.scale||this.Ek.default.scale||ri.default.scale,p=0,g=n.polygones.length;p<g;p++){for(var f=n.polygones[p],b=f.outerPath,v=0;v<b.length-1;v+=2){var m=(b[v]-c)/d,y=(b[v+1]-u)/d;m=o.xj(m,y),m=r.forward(m[0],m[1]),b[v]=m[0]*d+c,b[v+1]=m[1]*d+u,m=(y=mt(s,b[v],b[v+1]))[0],y=y[1],v?n.ia.lineTo(m,y):n.ia.moveTo(m,y)}for(f=f.holes,v=0;v<f.length-1;v+=2)m=(f[v]-c)/d,y=(f[v+1]-u)/d,m=o.xj(m,y),m=r.forward(m[0],m[1]),f[v]=m[0]*d+c,f[v+1]=m[1]*d+u,m=(y=mt(s,f[v],f[v+1]))[0],y=y[1],v?n.ia.lineTo(m,y):n.ia.moveTo(m,y)}for(u=n.ia.ck(),p=yt(s,u.left+u.width/2,u.top+u.height/2),c=(g=yt(s,a.left+a.width/2,a.top+a.height/2))[0]-p[0],d=g[1]-p[1],p=0,g=n.polygones.length;p<g;p++){for(b=(f=n.polygones[p]).outerPath,v=0;v<b.length-1;v+=2)b[v]+=c,b[v+1]+=d;for(f=f.holes,v=0;v<f.length-1;v+=2)f[v]+=c,f[v+1]+=d}n.ia.setPosition(a.left+a.width/2-u.width/2,a.top+a.height/2-u.height/2),u=n.ia.rb(),n=yt(s,u.left,u.top),s=yt(s,u.left+u.width,u.top+u.height),l.eu=t.kn(n[0],n[1],Math.abs(s[0]-n[0]),Math.abs(s[1]-n[1])),l.ri=l.ri?l.ri+c:c,l.jj=l.jj?l.jj+d:d,l.Pg=i,l.Yo=r,l.wJ=h,l.h6=o,this.B(65540,1)}s=this}else s=t.p(o.Pg)?o.Pg:this.Ek.default.Pg}else s=null;return s},t.g.Pg=function(e){return t.p(e)?(e=n(e),this.Ht!=e&&(this.Ht=e,this.B(65540,1)),this):this.Ht||this.bA||ri.default.crs},t.g.show=function(){this.Na.visible(!0)},t.g.Lc=function(){this.Na.visible(!1);var e=ge(this);e.zl&&(e.dispatchEvent(this.bl("hovered",{target:this},e.zl,!0,!0)),e.zl=null),e.gc("mousemove",e.QJ),(e=t.wr(this,"colorRange"))&&e.enabled()&&t.bO(e)},t.g.Fh=function(){return ge(this).sG},t.g.pT=function(e){return t.p(e)?(t.C(e)&&(this.by=e,this.VH&&t.Dc(this.VH,(function(t){t.ld()})),this.VH={}),this):this.by},t.g.Bv=function(e,i,n){var s=t.Ja(arguments,2);e.si?e.si.Ce("end",(function(){i.apply(this,s)}),!1,e):i.apply(e,s)},t.g.uA=function(){var e=ge(this),i=[new T(null,this,null,null)];return i.push.apply(i,t.Ja(e.It,0)),i},t.g.jr=function(e,i){var n=ge(this),s=this.Fh();if(i==s||n.Cv)return this;if(null===e||"null"==e)return ve(this,n,n.It.length),this;if(t.p(i))be(this,e,i);else if(this.by&&this.by[e])be(this,e,this.by[e]);else{for(s=n.It.length;s--;){var a=n.It[s];if(a.oy()==e){var o=a.Q1();break}}o?ve(this,o,n.It.length-1-s):t.kl(301,null,[e])}return this},t.g.ay=function(){var t=ge(this),e=this.Fh().wja;return!e||t.Cv?(t.Cv=!1,this):(ve(this,e),this)},t.g.Sg=function(){return this.lq},t.g.kj=function(e,i,n,s){return this.Nr||(e=t.Za(e,this.g("minZoomLevel"),this.g("maxZoomLevel"))),this.zoom(e/this.Sg(),i,n,s)},t.g.Sla=function(e,i){var n=this.Fh(),s=[];t.A(e)||(e=[e]);for(var a,o,r="",l=0,h=e.length;l<h;l++){var c=e[l];(o=pe(n,c))&&(r+=c+";",s.push(o))}if(s.length){c=n.zf.Ig();var u=this.AO&&r==this.AO&&this.zO&&function(t,e){return t==e||!!e&&t.od==e.od&&t.gf==e.gf&&t.Jd==e.Jd&&t.We==e.We&&t.Le==e.Le&&t.Fd==e.Fd}(c,this.zO);for(l=0,h=s.length;l<h;l++)o=(o=s[l]).ia,a?t.pb(a,u?o.rb():o.kr()):a=u?o.rb():o.kr();var d=c.od,p=c.Jd,g=c.Fd,f=(s=ye(n,a,void 0,u))[0],b=s[1],v=s[2];this.Bv(n,(function(){this.oK=!0,this.Fl=t.p(i)?i:(0,window.isNaN)(this.Fl)?500:this.Fl,u?(t.Wm(d,f,1e-5)?ge(this).dispatchEvent(me(this,"zoomstart"))&&(this.si=new H(this,[1,p,g],[1,p+b,g+v],this.Fl),this.si.play()):this.kj(this.g("minZoomLevel"),b,v,this.Fl),this.zO=this.AO=null):(t.Wm(d,f,1e-5)?ge(this).dispatchEvent(me(this,"zoomstart"))&&(this.si=new H(this,[1,p,g],[1,p+b,g+v],this.Fl),this.si.play()):this.kj(f,b,v,this.Fl),this.AO=r,this.si&&this.si.Ce("end",(function(){this.AO?this.zO=this.Fh().zf.Ig().clone():this.zO=null}),!1,this))}))}else t.kl(301,null,[e])},t.g.Vr=function(t){return this.zoom(this.g("zoomFactor"),void 0,void 0,t)},t.g.Wr=function(t){return this.zoom(1/this.g("zoomFactor"),void 0,void 0,t)},t.g.Qm=function(){return this.Cv||(this.si&&this.si.stop(),this.Bv(this,(function(){this.zD=!0,this.Fl=300;var t=this.Fh();t.kj(t.g("minZoomLevel")),this.Bv(this,(function(){this.zD=!1}))}))),this},t.g.zoom=function(e,i,n,s){if(t.p(e)){var a=0,o=0;if(t.p(s)&&(this.Fl=s),e=t.N(e),(this.Sg()==this.g("minZoomLevel")&&1>e||this.Sg()==this.g("maxZoomLevel")&&1<e)&&!this.Nr)return this;1!=e&&(this.uz=e,a=2097152,o=1),i=t.N(i),n=t.N(n),this.Dc==i&&this.uc==n||(this.Dc=i,this.uc=n,a=2097152,o=1),this.oK=!0,this.B(a,o)}return this},t.g.move=function(e,i){if(t.p(e)||t.p(i)){var n=0,s=0;t.p(e)&&(e=t.N(e),(0,window.isNaN)(e)||(this.offsetX=e,n=1048576,s=1)),t.p(i)&&(i=t.N(i),(0,window.isNaN)(i)||(this.offsetY=i,n=1048576,s=1)),this.B(n,s)}return this},t.g.transform=function(t,e){var i=this.scale().transform(t,e);return{x:i[0],y:i[1]}},t.g.Mc=function(t,e){var i=this.scale().Mc(t,e);return{x:i[0],long:i[0],y:i[1],lat:i[1]}},t.g.Ol=function(e,i){var n,s=[];if("default"==e){var a=0;for(n=this.hb.length;a<n;a++){var o=this.hb[a],r=o.kd(),l=o.qD(i);l.sourceUid=t.oa(this),l.sourceKey=o.id(),l.meta={scale:r},s.push(l)}}else if("categories"==e){if(this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.J(this.Mb.scale(),t.iz))r=this.Mb.scale(),o=this.Mb.target();else for(a=0,n=this.hb.length;a<n;a++)if(o=this.hb[a],t.J(o.kd(),t.iz)){r=o.kd();break}if(r)for(a=0,n=(l=r.sr()).length;a<n;a++){var h=l[a];"default"!==h.name&&s.push({text:h.name,iconEnabled:!0,iconType:"square",iconFill:h.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:a,meta:{X:o,scale:r,xe:h}})}}return s},t.g.Ms=function(t){return"default"==t||"categories"==t},t.g.zr=function(t,e){var i=t.j(),n=this.eg().g("itemsSourceMode");if("default"==n)n=t.Ki(),(n=this.ef(n))&&(n.enabled(!n.enabled()),n.enabled()?n.Zk():n.Md());else if("categories"==n){n=i.X;var s=i.scale;if(s&&n){var a=[];i=i.xe;for(var o=n.Ec();o.advance();){var r=o.get(n.bf.El);i==s.Dn(r)&&a.push(o.ma())}"single"==this.gd().g("hoverMode")?e.fg={X:n,vd:a}:e.fg=[{X:n,vd:a,Ln:a[a.length-1],De:{index:a[a.length-1],Tf:0}}]}}},t.g.wq=function(e,i){var n=e.j(),s=this.eg().g("itemsSourceMode");if("default"==s)s=e.Ki(),(!e||null!=s||(0,window.isNaN)(s))&&(s=this.ef(s))&&s.Zk();else if("categories"==s){s=n.X;var a=n.scale;if(a&&s){n=n.xe;for(var o=s.Ec(),r=[];o.advance();){var l=o.get(s.bf.El);n==a.Dn(l)&&r.push(o.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:r}:a.fg=[{X:s,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]),this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.aO(this.Mb,(n.start+n.end)/2)}}},t.g.vq=function(e,i){var n=e.j(),s=this.eg().g("itemsSourceMode");"default"==s?(n=e.Ki(),(!e||null!=n||(0,window.isNaN)(n))&&(n=this.ef(n))&&n.Md()):"categories"==s&&("single"==this.gd().g("hoverMode")&&(s=t.so(i.domTarget))&&(s.X=n.X),this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.bO(this.Mb))},t.g.Zj=function(e,i){var n=t.Ax(this);return t.kp(n.headers,n.data,i)};var ci={"select-submenu":{index:9,text:"Select points",iconClass:"ac ac-mouse-pointer",subMenu:{"select-polygon":{index:9.2,text:"Polygon",iconClass:"ac ac-pentagon",eventType:"anychart.startSelectPolygonMarquee",action:function(t){t.menuParent.j6(!1)}},"select-marquee":{index:9.3,text:"Marquee",iconClass:"ac ac-square",eventType:"anychart.startSelectMarquee",action:function(t){t.menuParent.AP(!1)}}}}};t.g=te.prototype,t.g.jx=function(e){var i={};return t.Sc(i,t.Sl(ci),e),i},t.g.ila=function(){return function(e,i,n){var s={type:"FeatureCollection",crs:i.crs||{type:"name",properties:{name:n.default["src-code"]}},features:[],"ac-tx":{}};for(t.Dc(n,(function(e,i){var n={};t.p(e.Pg)&&(n.crs=e.Pg),t.p(e.scale)&&(n.scale=e.scale),t.p(e.ri)&&(n.xoffset=e.ri),t.p(e.jj)&&(n.yoffset=e.jj),t.p(e.eu)&&(n.heatZone=e.eu.F()),s["ac-tx"][i]=n})),e=s.features,n=0;n<i.length;n++){for(var a=i[n],o={type:"Feature",properties:a.properties,geometry:{type:"MultiPolygon",coordinates:[]}},r=0;r<a.polygones.length;r++){for(var l=[],h=a.polygones[r],c=0;c<h.outerPath.length-1;c+=2)l.push([h.outerPath[c],h.outerPath[c+1]]);o.geometry.coordinates.push([l])}e.push(o)}return s}(Pt.Id(),this.wl,this.Ek)},t.g.U=function(e,i){te.u.U.call(this,e,i),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings),"defaultCalloutSettings"in e&&this.U0(e.defaultCalloutSettings),"colorRange"in e&&this.Qi().ga(!!i,e.colorRange),"unboundRegions"in e&&this.ux(e.unboundRegions),t.Iq(this,ai,e);var n,s=e.geoData;if(s&&this.ss(t.ec(s,"{")?JSON.parse(s):s),this.JS(e.crsAnimation),this.Pg(e.crs),e.geoScale){var a=new ct;a.N(e.geoScale),this.scale(a)}if("callouts"in e)for(var o=0,r=(s=e.callouts).length;o<r;o++)(a=s[o])&&this.m0(o,a);if("axesSettings"in e&&this.axes().ga(!!i,e.axesSettings),"gridsSettings"in e&&this.PU().ga(!!i,e.gridsSettings),"crosshair"in e&&this.mh(e.crosshair),r=e.colorScales,s={},t.C(r))for(n in r)r.hasOwnProperty(n)&&(o=r[n],a=t.z(o)?o:o.type,a="ordinal-color"===(a=String(a).toLowerCase())?t.jz():t.gz(),t.C(o)&&a.N(o),s[n]=a);if(r=e.series,t.A(r))for(n=0;n<r.length;n++)a=((o=r[n]).seriesType||this.g("defaultSeriesType")).toLowerCase(),(a=this.Ae(a,o.data))&&(a.N(o),t.C(o)&&"colorScale"in o&&(o=o.colorScale,t.ea(o)?a.kd(s[o]):(a=t.z(o)?o:o.type,(a=t.dt(a,null))&&t.C(o)&&a.N(o))));n=e.drillDownMap,t.C(n)&&(this.by={},t.Dc(n,(function(e,i){this.pT()[i]=t.Xp(e)}),this))},t.g.F=function(){var e,i=te.u.F.call(this);i.unboundRegions=t.z(this.ux())?this.ux():this.ux().F(),t.wr(this,"colorRange")&&(i.colorRange=this.Qi().F()),i.geoScale=this.scale().F(),t.Tq(this,ai,i),e=this.xM?this.xM:re(this)?t.z(this.An)?this.An:"#document"==this.An.nodeName?this.An.documentElement.outerHTML:this.An.outerHTML:JSON.stringify(this.An),t.p(e)&&(i.geoData=e),i.crsAnimation=this.JS().F(),t.C(this.Ht)?t.kl(8,null,["Map crs"]):this.Ht&&(i.crs=this.Ht),e=[];for(var n={},s=[],a=0;a<this.hb.length;a++){var o=this.hb[a],r=o.F();if(o=o.kd()){var l=t.oa(o);n[l]?r.colorScale=(0,t.za)(s,n[l]):(n[l]=o.F(),s.push(n[l]),r.colorScale=s.length-1)}e.push(r)}for(n=[],a=0,r=this.eo.length;a<r;a++)(o=this.eo[a])&&(n[a]=o.F());return n.length&&(i.callouts=n),e.length&&(i.series=e),s.length&&(i.colorScales=s),t.wr(this,"axesSettings")&&(i.axesSettings=this.axes().F()),t.wr(this,"gridsSettings")&&(i.gridsSettings=this.PU().F()),t.wr(this,"crosshair")&&(i.crosshair=this.mh().F()),this.by&&(i.drillDownMap={},t.Dc(this.by,(function(e,n){var s=t.J(e,te)?e.F():e;i.drillDownMap[n]=s}),this.by)),{map:i}},t.g.R=function(){if(t.sd(this.Ag,this.Oy,this.$f,this.Mb,this.eo,this.Rp,this.bga,this.xv,this.Dm,this.ku,this.rp),this.Mb=this.$f=this.Oy=this.Ag=null,this.eo.length=0,this.rp=this.ku=this.Dm=this.xv=this.bga=this.Rp=null,this.O()&&this.O().Ja()){var e=this.O().Ja().Tl();this.fW&&t.Yd(e,"click",this.fW,!1,this),this.gW&&t.Yd(e,"dblclick",this.gW,!1,this),this.wI&&t.Yd(e,"pointerup",this.wI,!1,this),this.wI&&t.Yd(e,"touchend",this.wI,!1,this),this.hW&&t.Yd(e,"mouseleave",this.hW,!1,this)}te.u.R.call(this)};var ui=te.prototype;t.E("anychart.mapModule.Chart.DEFAULT_TX",ri),ui.getType=ui.Ma,ui.geoData=ui.ss,ui.unboundRegions=ui.ux,ui.toGeoJSON=ui.ila,ui.toCsv=ui.Zj,ui.getSeries=ui.ef,ui.addSeries=ui.kl,ui.getSeriesAt=ui.Ai,ui.getSeriesCount=ui.tj,ui.removeSeries=ui.Ao,ui.removeSeriesAt=ui.Rn,ui.removeAllSeries=ui.Dp,ui.colorRange=ui.Qi,ui.callout=ui.m0,ui.axes=ui.axes,ui.grids=ui.PU,ui.crosshair=ui.mh,ui.palette=ui.cc,ui.markerPalette=ui.Nf,ui.hatchFillPalette=ui.ve,ui.getPlotBounds=ui.dg,ui.crsAnimation=ui.JS,ui.featureTranslation=ui.BT,ui.translateFeature=ui.R6,ui.featureScaleFactor=ui.AT,ui.featureCrs=ui.zT,ui.crs=ui.Pg,ui.transform=ui.transform,ui.inverseTransform=ui.Mc,ui.zoom=ui.zoom,ui.move=ui.move,ui.zoomToFeature=ui.Sla,ui.zoomTo=ui.kj,ui.getZoomLevel=ui.Sg,ui.getCurrentScene=ui.Fh,ui.fitAll=ui.Qm,ui.zoomIn=ui.Vr,ui.zoomOut=ui.Wr,ui.drillTo=ui.jr,ui.drillUp=ui.ay,ui.drillDownMap=ui.pT,ui.getDrilldownPath=ui.uA,ui.startSelectPolygonMarquee=ui.j6,ui.inPolygon=ui.kN,ui.cancelPolygonMarquee=ui.Eda,t.H(Se,t.iC),t.PG[23]=Se,Se.prototype.type=23,Se.prototype.Np=["id","long","lat","size"],Se.prototype.El="size",t.H(we,t.JA),t.PG[24]=we,t.g=we.prototype,t.g.type=24,t.g.flags=516|t.dB,t.g.Np=["id","value"],t.g.Kh={foreignFill:"none",hatchFill:"path"},t.g.ug=function(e,i){var n=e.j("features");if(n)for(var s=0,a=n.length;s<a;s++){var o=n[s];t.p(o.ia)&&de(this.X.xc(),o,(function(n){var s=n.ia;if(s&&t.J(s,t.pg)){s.visible(!0),e.j("currentPointElement",n);var a=this.bd.ed(i,void 0,void 0,s),o=a.foreignFill;o&&(e.j("fill",o.fill()),e.j("stroke",o.stroke())),(a=a.hatchFill).pe(t.yg(s)),n.S2=a}}),this)}},t.H(xe,t.JA),t.PG[21]=xe,t.g=xe.prototype,t.g.type=21,t.g.flags=512|t.dB,t.g.Np=["points"],t.g.Kh={path:"path",hatchFill:"path"},t.g.ug=function(e,i){var n=this.i(this.X,e,i),s=this.f(this.X,e,i),a={};a.eventHandler=10>n||10>s,a.path=!0,a.hatchFill=!0,a=this.bd.ed(i,a);var o=this.b(this.X,e,0),r=0,l=0,h=[],c=[],u=0,d=10>n||10>s,p=this.Be(),g=this.X.xc().scale();if((p=e.get(p[0]))&&t.A(p)){for(var f,b,v,m=[],y=[],S=0,w=p.length;S<w;S+=2){var x=t.N(p[S]);f=t.N(p[S+1]),b=(v=g.transform(f,x))[0],v=v[1],(0,window.isNaN)(b)||(0,window.isNaN)(v)||(m.push(b,v),y.push(x,f))}e.j("pointsWithoutMissing",y),x=m}else x=null;for(g=0,p=x.length;g<p;g+=2){var C;if(f=a.path,b=a.hatchFill,m=x[g],y=x[g+1],d&&(C=a.eventHandler),!(0,window.isNaN)(m)&&!(0,window.isNaN)(y)){if(0!=g){var D=(S=t.gn(r,l,m,y))/2*o;v=(r+m)/2;var T=(l+y)/2,k=t.Tm(t.cb(Math.atan(Math.abs(l-y)/Math.abs(r-m))),7);if(w=1,m<=r&&y<=l)var $=k-90;else m<=r&&y>=l?$=270-k:m>=r&&y>=l?($=k-90,w=-1):m>=r&&y<=l&&($=180-k+90,w=-1);v+=Math.cos(t.bb($))*D*1.2,D=T+Math.sin(t.bb($))*D*1.2,T=S/2*o,k=0<o?1:-1;var O=Math.abs(T)<S/4?S/4*k:Math.abs(T)>S/2?S/2*k:T,P=(0>o?90:-90)*w;P=t.bb($+P),T=v+Math.cos(P)*O,k=D+Math.sin(P)*O,P=(0>o?-90:90)*w,P=t.bb($+P),v+=Math.cos(P)*O,D+=Math.sin(P)*O,O=Ce(f,r,l,m,y,T,k,v,D,n,s,o,w,$),d&&Ce(C,r,l,m,y,T,k,v,D,20,20,o,w,$),b.pe(t.yg(f)),h.push.apply(h,O),c.push(S),u+=S}r=x[g],l=x[g+1]}}e.j("points",h).j("sumDist",u).j("connectorsDist",c)},t.H(De,t.pC),t.PG[22]=De,De.prototype.type=22,De.prototype.Np=["id","long","lat"],De.prototype.WB=function(t,e){De.u.WB.call(this,t,e);var i=t.j("shapes");this.bd.zt(e,i)},De.prototype.ug=function(e,i){var n=this.bd,s=e.get(this.X.Be()[0]),a=this.nh(s,this.prevValue),o={};o[a.path]=!0,o[a.qe]=!0,e.j("names",a),n=n.ed(i,o,i),t.qC(this,e,i,n,a),this.prevValue=s},t.Wp.map=Te,t.Wp.bubble=ke,t.Wp.choropleth=$e,t.Wp.connector=Oe,t.Wp.marker=Pe,t.Wp["seat-map"]=Le,t.E("anychart.map",Te),t.E("anychart.bubbleMap",ke),t.E("anychart.choropleth",$e),t.E("anychart.connector",Oe),t.E("anychart.markerMap",Pe),t.E("anychart.seatMap",Le)}.call(this,$)),_.theme_pert||(_.theme_pert=1,function(t){var e=function(){return t.Wl(this.sourceColor,1.5)};t.ra(t.fa.anychart.themes.defaultTheme,{pert:{tooltip:{enabled:!1},horizontalSpacing:"15%",verticalSpacing:"25%",expectedTimeCalculator:function(){return void 0===this.duration?Math.round((this.optimistic+4*this.mostLikely+this.pessimistic)/6*100)/100:Number(this.duration)},background:{zIndex:0},milestones:{shape:"circle",size:"5%",normal:{labels:{enabled:!0,anchor:"left-top",vAlign:"middle",hAlign:"center",fontColor:"#fff",disablePointerEvents:!0,format:function(){return this.creator?this.index:this.isStart?"S":"F"}},fill:t.DN,stroke:"none"},hovered:{labels:{enabled:null,fontColor:"#fff",fontOpacity:1},fill:t.FN,stroke:e},selected:{labels:{enabled:null,fontWeight:"bold"},fill:"#333 0.85",stroke:"#333 0.85"},color:"#64b5f6",tooltip:{title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.creator?"Milestone - "+this.index:"Milestone - "+(this.isStart?"Start":"Finish")},format:function(){var t,e="";if(this.successors&&this.successors.length){for(e+="Successors:",t=0;t<this.successors.length;t++)e+="\n - "+this.successors[t].get("name");this.predecessors&&this.predecessors.length&&(e+="\n\n")}if(this.predecessors&&this.predecessors.length)for(e+="Predecessors:",t=0;t<this.predecessors.length;t++)e+="\n - "+this.predecessors[t].get("name");return e}}},tasks:{color:"#64b5f6",normal:{fill:t.DN,stroke:t.DN,dummyFill:t.DN,dummyStroke:function(){return{color:this.sourceColor,dash:"6 4"}},upperLabels:{enabled:!0,anchor:"center-bottom",vAlign:"bottom",hAlign:"center",fontSize:10,contColor:"#333",padding:{top:1,right:10,bottom:1,left:10},format:function(){return this.name}},lowerLabels:{enabled:!0,anchor:"center-top",vAlign:"top",hAlign:"center",fontSize:9,fontOpacity:.5,contColor:"#333",padding:{top:1,right:5,bottom:1,left:5},format:function(){return"t: "+t.vN(this.duration)}}},hovered:{fill:t.FN,stroke:e,upperLabels:{fontWeight:"bold"},lowerLabels:{fontWeight:"bold"}},selected:{fill:"#333 0.85",stroke:"#333 0.85",upperLabels:{fontWeight:"bold"},lowerLabels:{fontWeight:"bold"}},tooltip:{title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.name},format:function(){var e="Earliest start: "+t.vN(this.earliestStart)+"\nEarliest finish: "+t.vN(this.earliestFinish)+"\nLatest start: "+t.vN(this.latestStart)+"\nLatest finish: "+t.vN(this.latestFinish)+"\nDuration: "+t.vN(this.duration)+"\nSlack: "+t.vN(this.slack);return(0,window.isNaN)(this.variance)||(e+="\nStandard deviation: "+Math.round(100*this.variance)/100),e}}},criticalPath:{tasks:{tooltip:{title:{background:null}},color:"#e06666",normal:{lowerLabels:{},upperLabels:{}}},milestones:{tooltip:{title:{background:null}}}}}})}.call(this,$)),_.vml||(_.vml=1,function(t){var e=function(t){var e=Math.pow(10,6);return Math.round(t*e)/e},i=function(e,i,n,s,a){t.Dg.call(this,e,i,n,s,a)},n=function(e,i,n,s,a,o,r){t.Hj.call(this,e,i,n,i,i,o,r),this.b=s,this.f=a},s=function(e,i,n,s,a,o,r){o=null!=o?t.Za(o,0,1):1;var l=[];return(0,t.Pe)(e,(function(t){l.push(String(t.offset)+t.color+(t.opacity?t.opacity:null))})),l.join("")+o+i+n+s+a+(r?String(r.left)+r.top+r.width+r.height:"")},a=function(){t.gh.call(this);var e=window.document;c()||e.createStyleSheet().addRule("."+x,"behavior:url(#default#VML)");try{e.namespaces[w]||e.namespaces.add(w,S),this.f=function(e){return t.Me(w+":"+e,{class:x})}}catch(i){this.f=function(e){return t.Me(w+":"+e,{class:x,xmlns:"urn:schemas-microsoft.com:vml"})}}C&&(this.lc=this.ska)},o=function(e){return t.z(e)&&t.fc(e,"%")?(0,window.parseFloat)(e)+"%":(0,window.parseFloat)(String(e))+"px"},r=function(t){return 100*Math.round(t)},l=function(t,e){t[e]&&(t.cssText=t.cssText.replace(new RegExp("(^|; )("+e+": [^;]*)(;|$)","ig"),";"))},h=function(e,i){e.lc(i,"coordsize",r(1)+" "+r(1)),t.ph(e,i.style,{position:"absolute",left:o(0),top:o(0),width:o(1),height:o(1)})},c=function(){return!!t.ya(t.gk(),(function(t){return t.selectorText==="."+x}))},u=function(e,i){var n=e%90,s=t.bb(e),a=1,o=i.left+i.width/2,r=i.top+i.height/2,l=0>Math.sin(s)||180==e||360==e;return 90!=e&&270!=e||(n+=1e-6),180!=e&&(0>Math.tan(s)||90==e||270==e)&&(a=-1,n=90-n),n=t.bb(n),s=Math.tan(n),s=Math.sin(n)*(i.height/2-s*i.width/2)+Math.sqrt(Math.pow(i.width/2,2)*(1+Math.pow(s,2))),a*=Math.cos(n)*s,n=Math.sin(n)*s,l&&(a=-a,n=-n),{ei:new t.gb(Math.round(o-a),Math.round(r+n)),el:new t.gb(Math.round(o+a),Math.round(r-n))}},d=function(e,i){if(i.ei.x==i.el.x)var n=i.ei.x,s=e.y;else i.ei.y==i.el.y?(n=e.x,s=i.ei.y):(n=(i.ei.x*Math.pow(i.el.y-i.ei.y,2)+e.x*Math.pow(i.el.x-i.ei.x,2)+(i.el.x-i.ei.x)*(i.el.y-i.ei.y)*(e.y-i.ei.y))/(Math.pow(i.el.y-i.ei.y,2)+Math.pow(i.el.x-i.ei.x,2)),s=(i.el.x-i.ei.x)*(e.x-n)/(i.el.y-i.ei.y)+e.y);n=new t.gb(n,s),s=[t.Za(i.ei.x-i.el.x,-1,1),t.Za(i.ei.y-i.el.y,-1,1)];var a=[t.Za(i.ei.x-n.x,-1,1),t.Za(i.ei.y-n.y,-1,1)],o=[t.Za(i.el.x-n.x,-1,1),t.Za(i.el.y-n.y,-1,1)];return 0>(0==s[0]?(a[1]+o[1])*s[1]:(a[0]+o[0])*s[0])?-t.jb(i.ei,n):t.jb(i.ei,n)},p=function(e,i){t.od.call(this),this.b=e,this.i=i},g=function(e){delete e.b,t.Xe(e.oA),e.oA=null},f=function(e){t.Jj.call(this,e),this.f={},this.G={}},b=function(e,i,n){t.Yj.call(this,e,i,n)},v=function(e,i){t.Qh.call(this,e,i),this.Uc=null,this.Ha=!1,this.nf=null},m=function(t){var e=t.nf;return t=t.Ig(),!(null===e&&null===t||null!==e&&null!==t&&t.od==e.od&&t.gf==e.gf&&t.We==e.We&&t.Le==e.Le)},y=function(e){var i=e.Ha;e.Ha=e.xr();var n=!i&&e.Ha;i=i&&!e.Ha;var s=!e.Ja()||e.Ja().yf();s||e.Ja().suspend(),n?(e.Pb(1024),e.Pb(32),e.Pb(16384),e.Pb(4),e.Ta=new t.I(e.x(),e.y(),e.Yf,e.Jf)):i&&(e.Pb(1024),e.Pb(32),e.Pb(16384),e.Pb(4),e.Ta=e.Vm(e.Uc,{})),s||e.Ja().resume()};t.H(i,t.Dg),i.prototype.Sd=function(){var e=this.o(),i=e&&!e.yf();i&&e.suspend(),(0,t.Pe)(this.elements,(function(t){t.Pb(512)}),this),i&&e.resume()},t.E("acgraph.vml.Clip",i),t.H(n,t.Hj),t.H(a,t.gh),t.ja(a);var S="urn:schemas-microsoft-com:vml",w="any_vml",x="any_vml",C=t.sh.document&&t.sh.document.documentMode&&8<=t.sh.document.documentMode;t.g=a.prototype,t.g.Zn=null,t.g.mk=null,t.g.UJ=null,t.g.aB=null,t.g.Dr=null,t.g.CI=null,t.g.ska=function(t,e,i){t[e]=i},t.g.BS=function(){return t.Re(window.document,"div")},t.g.Xp=function(){this.aB=this.IS(),h(this,this.aB),this.aB.style.display="none",t.ph(this,this.aB,{filled:"true",fillcolor:"black",stroked:"false",path:"m0,0 l1,0 e"}),window.document.body.appendChild(this.aB),this.Zn=t.Me("DIV"),this.mk=t.Me("SPAN"),this.UJ=t.Me("SPAN"),window.document.body.appendChild(this.Zn),this.Zn.appendChild(this.UJ),this.Zn.appendChild(this.mk),t.uf(this.Zn,{position:"absolute",visibility:"hidden",left:0,top:0}),t.uf(this.UJ,{"font-size":"0px",border:"0 solid"}),this.UJ.innerHTML="a",this.b=t.Me("SPAN"),this.Zn.appendChild(this.b),t.uf(this.b,{"font-size":"0px",border:"0 solid"}),this.b.innerHTML="a",this.CI=t.Me("IMG"),t.uf(this.CI,{position:"absolute",left:0,top:0}),this.Zn.appendChild(this.CI),this.yp=t.Me("DIV"),this.Zn.appendChild(this.yp)},t.g.TN=function(e){return this.Zn||this.Xp(),this.lc(this.CI,"src",e),t.Of(this.CI)},t.g.measure=function(e,i){if(""==e)return new t.I(0,0,0,0);this.Zn||this.Xp(),t.Xe(this.Dr),this.Dr=this.wF(""),this.aB.appendChild(this.Dr);var n=null,s=0;if(" "==e)return t.jh(this,i);t.ec(e," ")&&(s+=n=t.jh(this,i).width),t.fc(e," ")&&(s+=n||t.jh(this,i).width),l(this.mk.style,"font-style"),l(this.mk.style,"font-variant"),l(this.mk.style,"font-family"),l(this.mk.style,"font-size"),l(this.mk.style,"font-weight"),l(this.mk.style,"letter-spacing"),l(this.mk.style,"text-decoration"),this.mk.style.cssText="",i.fontStyle&&(t.uf(this.mk,"font-style",i.fontStyle),t.uf(this.Dr,"font-style",i.fontStyle)),i.fontVariant&&(t.uf(this.mk,"font-variant",i.fontVariant),t.uf(this.Dr,"font-variant",i.fontVariant)),i.fontFamily&&(t.uf(this.mk,"font-family",i.fontFamily),t.uf(this.Dr,"font-family",i.fontFamily)),i.fontSize&&(t.uf(this.mk,"font-size",i.fontSize),t.uf(this.Dr,"font-size",i.fontSize)),i.fontWeight?(t.uf(this.mk,"font-weight",i.fontWeight),t.uf(this.Dr,"font-weight",i.fontWeight)):(t.uf(this.mk,"font-weight","normal"),t.uf(this.Dr,"font-weight","normal")),i.letterSpacing&&(t.uf(this.mk,"letter-spacing",i.letterSpacing),this.Dr.style["v-text-spacing"]="normal"==i.letterSpacing?"":i.letterSpacing),i.er&&(t.uf(this.mk,"text-decoration",i.decoration),t.uf(this.Dr,"text-decoration",i.decoration)),t.uf(this.mk,"border","0 solid"),this.lc(this.Dr,"string",e),n=t.Of(this.aB).width,t.uf(this.Zn,{left:0,top:0,width:"auto",height:"auto"}),this.mk.innerHTML=e;var a=t.Of(this.UJ);return t.Cf(this.Zn,0,-(a.top+a.height)),(a=t.Of(this.mk)).width=n+s,--a.left,this.mk.innerHTML="",a},t.g.kW=function(e){return this.Zn||this.Xp(),t.z(e)?this.yp.innerHTML=e:(e=e.cloneNode(!0),this.yp.appendChild(e)),e=t.Of(this.yp),this.yp.innerHTML="",e},t.g.D4={1:"m",2:"l",3:"c",4:"ae",5:"x"},t.g.W4=function(e,i){var n=i[2]+i[3];e.push(r(i[4]-t.db(n,i[0])),r(i[5]-t.eb(n,i[1])),r(i[0]),r(i[1]),Math.round(-65536*i[2]),Math.round(-65536*i[3]))},t.g.c5=function(e,i){t.kd(Array.prototype.push,(0,t.Wa)(i,r),e)},t.g.P0=function(){return t.Me("div",{style:"overflow:hidden;position:relative;"})},t.g.hP=function(e,i,n){t.ph(this,e.style,{width:o(i),height:o(n)})},t.g.AS=a.prototype.BS,t.g.Wo=a.prototype.BS,t.g.J0=function(){return this.f("image")},t.g.D0=function(){return this.f("shape")},t.g.M0=function(){return this.f("shape")},t.g.H0=function(){return this.f("shape")},t.g.K0=function(){return this.f("fill")},t.g.I0=a.prototype.BS,t.g.L5=t.ia,t.g.R5=t.ia,t.g.O5=function(e){t.ph(this,e.ia().style,{position:"absolute",left:o(0),top:o(0),width:o(1),height:o(1)})},t.g.M5=function(e){var i=e.ck(),n=e.ia(),s=e.src()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",a=e.align();if(a==t.$g){a=i.left;var r=i.top,l=i.width,h=i.height}else{l=(h=this.TN(s)).width/i.width,r=h.height/i.height;var c=e.jD()==t.ah;switch(r=1/((1<l&&1<r||1>l&&1>r?c?l>r:l<r:c?1<l:1>l)?l:r),l=h.width*r,h=h.height*r,a){case t.$g:a=i.width,r=i.height;break;case"x-min-y-min":a=i.left,r=i.top;break;case"x-mid-y-min":a=i.left+i.width/2-l/2,r=i.top;break;case"x-max-y-min":a=i.left+i.width-l,r=i.top;break;case"x-min-y-mid":a=i.left,r=i.top+i.height/2-h/2;break;default:case"x-mid-y-mid":a=i.left+i.width/2-l/2,r=i.top+i.height/2-h/2;break;case"x-max-y-mid":a=i.left+i.width-l,r=i.top+i.height/2-h/2;break;case"x-min-y-max":a=i.left,r=i.top+i.height-h;break;case"x-mid-y-max":a=i.left+i.width/2-l/2,r=i.top+i.height-h;break;case"x-max-y-max":a=i.left+i.width-l,r=i.top+i.height-h}}t.ph(this,n.style,{position:"absolute",left:o(a),top:o(r),width:o(l),height:o(h)}),this.lc(n,"src",s),e.clip(i)},t.g.H5=function(t){this.KX(t)},t.g.KX=function(e){var i=e.ia();h(this,i);var n=e.To(),s=e.Uo(),a=e.Xr(),o=e.zx(),l=e.Ig();l&&!t.zb(l)?(s=(n=t.tb(n,s,a,o,0,360,!1)).length,l.transform(n,0,n,0,s/2),l=["m",r(n[s-2]),r(n[s-1]),"c"],t.kd(Array.prototype.push,(0,t.Wa)(n,r),l)):l=["ae",r(n),r(s),r(a),r(o),0,-23592960],l.push("x"),t.jg(e,4),t.jg(e,256),this.lc(i,"path",l.join(" "))},t.g.OX=function(e){var i=e.ia();h(this,i);var n=t.rh(this,e,!0);n?this.lc(i,"path",n):(this.lc(i,"path","M 0,0"),i.removeAttribute("path")),t.jg(e,4),t.jg(e,256)},t.g.IS=function(){var t=this.f("shape"),e=this.f("path");return e.setAttribute("textpathok","t"),t.appendChild(e),t},t.g.Vx=function(){return t.Re(window.document,"span")},t.g.wF=function(t){var e=this.f("textpath");return e.setAttribute("on","t"),e.setAttribute("string",t),e},t.g.I5=function(t,e){var i=t.ia();i&&(i.style.cursor=e||"")},t.g.PX=function(e){var i=e.ia().style;if(e.xr()){if(!e.path()){var n=e.$a;e.b.length&&(n-=e.b[0].f);var s=e.aa;t.ph(this,i,{position:"absolute",overflow:"visible",left:o(s),top:o(n)})}}else s=e.x(),n=e.y(),e.vAlign()&&e.height()&&e.height()>e.D&&("middle"==e.vAlign()&&(n+=e.height()/2-e.D/2),"bottom"==e.vAlign()&&(n+=e.height()-e.D)),t.ph(this,i,{position:"absolute",overflow:"hidden",left:o(s),top:o(n)})},t.g.QX=function(e){var i=e.ia(),n=i.style;i.style.cssText="",e.xr()?(e.path()||t.ph(this,n,{width:o(1),height:o(1)}),i.innerHTML=""):null!=e.Uc&&(e.fontSize()&&t.uf(i,"font-size",e.fontSize()),e.color()&&t.uf(i,"color",e.color()),e.fontFamily()&&t.uf(i,"font-family",e.fontFamily()),e.fontStyle()&&t.uf(i,"font-style",e.fontStyle()),e.fontVariant()&&t.uf(i,"font-variant",e.fontVariant()),e.fontWeight()&&t.uf(i,"font-weight",e.fontWeight()),e.letterSpacing()&&t.uf(i,"letter-spacing",e.letterSpacing()),e.er()&&t.uf(i,"text-decoration",e.er()),e.opacity()&&(n.filter="alpha(opacity="+100*e.opacity()+")"),e.lineHeight()&&t.uf(i,"line-height",e.lineHeight()),e.textIndent()&&t.uf(i,"text-indent",e.textIndent()),"..."==e.textOverflow()&&t.uf(i,"text-overflow","ellipsis"),""==e.textOverflow()&&t.uf(i,"text-overflow","clip"),e.direction()&&t.uf(i,"direction",e.direction()),t.uf(i,"word-break",e.Xu()),t.uf(i,"word-wrap",e.wordWrap()),null!=e.width()?t.uf(this.b,"white-space","normal"):t.uf(this.b,"white-space","nowrap"),e.Bm()&&(i.style["text-align"]=e.K?"end"==e.Bm()||"left"==e.Bm()?"left":e.Bm()==t.Ph||"right"==e.Bm()?"right":"center":"end"==e.Bm()||"right"==e.Bm()?"right":e.Bm()==t.Ph||"left"==e.Bm()?"left":"center"),t.Sf(i,!e.Hm()),i.innerHTML=e.Uc,this.lc(n,"width",String(e.width()?o(e.width()):e.rb().width)),this.lc(n,"height",String(e.height()?o(e.height()):e.rb().height)))},t.g.IZ=function(e){var i=e.ia(),n=e.parent().path();if(n){var s=t.qk();s.pe(t.yg(n)),e.i&&s.translate(e.mo,e.um),e=n?t.rh(this,s,!0):"m "+r(e.x)+","+r(e.y)+" l "+(r(e.x)+1)+","+r(e.y)+" e",i.setAttribute("path",e)}},t.g.JZ=function(e){var i=e.parent(),n=i.style(),s=e.b,a=e.ia();n=t.Qc(n),t.Sc(n,s),e=this.wF(e.text),n.fontStyle&&t.uf(e,"font-style",n.fontStyle),n.fontVariant&&t.uf(e,"font-variant",n.fontVariant),n.fontFamily&&t.uf(e,"font-family",n.fontFamily),n.fontSize&&t.uf(e,"font-size",n.fontSize),n.fontWeight&&t.uf(e,"font-weight",n.fontWeight),n.letterSpacing&&(e.style["v-text-spacing"]="normal"==n.letterSpacing?"":n.letterSpacing),n.decoration&&t.uf(e,"text-decoration",n.decoration),n.hAlign&&(e.style["v-text-align"]=i.K?"end"==n.hAlign||"left"==n.hAlign?"left":n.hAlign==t.Ph||"right"==n.hAlign?"right":"center":"end"==n.hAlign||"right"==n.hAlign?"right":n.hAlign==t.Ph||"left"==n.hAlign?"left":"center"),n.opacity&&(s=this.f("fill"),this.lc(s,"opacity",n.opacity),a.appendChild(s)),a.appendChild(e),i.Hm()?a.removeAttribute("unselectable"):this.lc(a,"unselectable","on"),h(this,a),a.setAttribute("filled","t"),a.setAttribute("fillcolor",n.color),a.setAttribute("stroked","f"),i.ia().appendChild(a)},t.g.l4=function(){return!0},t.g.R_=function(e){var i=e.fill();t.J(i,t.Qb)&&(i="black");var a,o=e.stroke();a=t.z(o)?o:"keys"in o?0!=o.keys.length?o.keys[0].color:"#000":o.color;var r=!t.z(i)&&"keys"in i&&"cx"in i&&"cy"in i,l=!t.z(i)&&"keys"in i&&!r,h=!r&&!l,c="none"!=i&&"none"!=i.color,g="none"!=a&&0!=o.thickness,f=h&&c&&1!=i.opacity,b=!t.z(o)&&g&&(1!=o.opacity||"miter"!=o.lineJoin||"butt"!=o.lineCap||"none"!=o.dash);if(r||l||f||b){f=(b=e.Ja()).vn;var v=t.J(e,t.Ag)&&e.Uj()?new t.I(0,0,1,1):e.rb();if(l){var m=t.J(i.mode,t.I),y=t.Ja(i.keys,0);0!=y[0].offset&&y.unshift({offset:0,color:y[0].color,opacity:y[0].opacity});var S=y[y.length-1];1!=S.offset&&y.push({offset:1,color:S.color,opacity:S.opacity});var w=i.mode?t.oh(i.angle,v):i.angle;v=t.Ji(f,m?function(e,i,n,s){var a=u(n,s);s=t.jb(a.ei,a.el);var o=u(n,i);i=t.jb(o.ei,o.el),n=d(a.ei,o),a=d(a.el,o),o={offset:Math.round(n/i*100)/100,color:"",opacity:1};var r,l,h,c={offset:Math.round(a/i*100)/100,color:"",opacity:1},p=[];for(p.toString=function(){for(var t="\n",e=0,i=this.length;e<i;e++)t+="offset: "+this[e].offset+"; color: "+this[e].color+"; opacity: "+this[e].opacity+"\n";return t},p.push(o),h=0;h<e.length;h++){var g=e[h];g.color=t.Bl(g.color).vk,g.offset<=o.offset?r={offset:g.offset,color:g.color,opacity:g.opacity}:g.offset>o.offset&&g.offset<c.offset?p.push({offset:g.offset,color:g.color,opacity:g.opacity}):g.offset>=c.offset&&!l&&(l={offset:g.offset,color:g.color,opacity:g.opacity})}if(p.push(c),e=g=1,2<p.length){r||(r=p[1]),h=i*r.offset;var f=Math.abs(i*p[1].offset-h),b=t.Cl(String(r.color)),v=t.Cl(String(p[1].color));g-=0==f?0:Math.abs(n-h)/f,o.color=t.Tb(t.Hl(b,v,g)),l||(l=p[p.length-2]),f=i*l.offset,h=i*p[p.length-2].offset,g=Math.abs(h-f),f=t.Cl(String(p[p.length-2].color)),b=t.Cl(String(l.color)),e-=0==g?0:Math.abs(a-h)/g,c.color=t.Tb(t.Hl(f,b,e))}else r||0!=l.offset||(r=l),l||1!=r.offset||(l=r),h=i*r.offset,f=i*l.offset,b=t.Cl(String(r.color)),v=t.Cl(String(l.color)),g-=0==(f=Math.abs(f-h))?0:Math.abs(n-h)/f,e-=0==f?0:Math.abs(a-h)/f,o.color=t.Tb(t.Hl(b,v,g)),c.color=t.Tb(t.Hl(b,v,e));for(o.opacity=r.opacity,c.opacity=l.opacity,h=0;h<p.length;h++)p[h].offset=0==h?0:h==p.length-1?1:Math.abs(n-p[h].offset*i)/s;return p}(y,i.mode,w,v):y,i.opacity,w,i.mode)}else if(r){if(i.mode){var x=i.mode;S=Math.min(x.width,x.height),w=(i.cx*x.width-(v.left-x.left))/v.width,y=(i.cy*x.height-(v.top-x.top))/v.height,x=S/v.width,v=S/v.height}else w=i.cx,y=i.cy,x=v=1;v=function(e,i,a,o,r,l,h,c){var u=s(i,a,o,r,l,h,c=null!=c?c:null);return t.Gc(e.G,u)?e.G[u]:e.G[u]=new n(i,a,o,r,l,h,c)}(f,i.keys,w,y,x,v,i.opacity,i.mode)}else v=i;if(w=function(e,i,n){var a="";if(a=t.z(i)?a+(i+"1"):t.J(i,t.Hj)?s(i.keys,i.Dc,i.uc,i.b,i.f,i.opacity,i.Ta):t.J(i,t.Fj)?t.Gj(i.keys,i.opacity,i.angle,i.mode):a+(i.color+i.opacity),t.z(n))var o=n;else if("keys"in n){var r=0!=n.keys.length?n.keys[0]:n;o=r.color||"black",o+="opacity"in r?r.opacity:1}else o=n.color,o+="opacity"in n?n.opacity:1;return a+=String(n.thickness)+o+n.lineJoin+n.lineCap+n.dash,t.Gc(e.f,a)?e.f[a]:(i=new p(i,n),e.f[a]=i)}(f,v,o),!w.Bo){x=this.f("shapetype"),t.qh(this,x,t.cc(t.ac.Id(),w)),t.Se(f.ia(),x),w.Bo=!0;var C=null;if(l){var D=v;D.Bo&&(D=new t.Fj(D.keys,D.opacity,D.angle,D.mode),w.b=D),C=this.f("fill"),y=D.keys;var T=[];(0,t.Pe)(y,(function(t){T.push(t.offset+" "+t.color)}),this),b=t.ab(D.angle+270),S=y[y.length-1],h=y[0],t.ph(this,C,{type:"gradient",method:"none",colors:T.join(","),angle:b,color:h.color,opacity:m||(0,window.isNaN)(S.opacity)?D.opacity:S.opacity,color2:S.color,"o:opacity2":m||(0,window.isNaN)(h.opacity)?D.opacity:h.opacity}),x.appendChild(C),D.uF=f,D.Bo=!0}else r?((m=v).Bo&&(m=new n(m.keys,m.Dc,m.uc,m.b,m.f,m.opacity,m.Ta),w.b=m),C=this.f("fill"),h=(y=m.keys)[y.length-1],S=y[0],t.ph(this,C,{src:b.pathToRadialGradientImage,size:m.b+","+m.f,origin:".5, .5",position:m.Dc+","+m.uc,type:"pattern",method:"linear sigma",colors:"0 "+h.color+";1 "+S.color,color:h.color,opacity:(0,window.isNaN)(h.opacity)?m.opacity:h.opacity,color2:S.color,"o:opacity2":(0,window.isNaN)(S.opacity)?m.opacity:S.opacity}),x.appendChild(C),m.vF=f,m.Bo=!0):h&&(C=w.oA?w.oA:w.oA=this.f("fill"),t.z(i)?(t.ph(this,e.ia(),{fillcolor:i,filled:"none"!=i}),t.ph(this,C,{type:"solid",on:"none"!=i,color:i,opacity:1})):(t.ph(this,e.ia(),{fillcolor:i.color,filled:"none"!=i.color}),t.ph(this,C,{type:"solid",on:"none"!=i.color,color:i.color,opacity:(0,window.isNaN)(i.opacity)?1:i.opacity})));x.appendChild(C),m=w.HJ?w.HJ:w.HJ=this.f("stroke"),f=o.thickness?o.thickness:1,b=(h=function(t,e){if(!(t=String(t)))return"none";var i=t.split(" ");0!=i.length%2&&i.push.apply(i,i);for(var n=[],s=0;s<i.length;s++)n.push(Math.ceil((0,window.parseFloat)(i[s])/e));return n.join(" ")}(o.dash,f))?"flat":o.lineCap,t.ph(this,m,{joinstyle:o.lineJoin||"miter",endcap:"butt"==b?"flat":b,dashstyle:h,on:g,color:a,opacity:t.C(o)&&"opacity"in o?o.opacity:1,weight:f+"px"}),x.appendChild(m)}(r||l)&&(h=v.keys[v.keys.length-1],t.ph(this,e.ia(),{fillcolor:h.color,filled:"none"!=h.color})),t.ph(this,e.ia(),{filled:c,fillcolor:i.color||i,stroked:g,strokecolor:a,strokeweight:o.thickness?o.thickness+"px":"1px"}),t.ph(this,e.ia(),{type:"#"+t.cc(t.ac.Id(),w)})}else t.ph(this,e.ia(),{type:"",filled:c,fillcolor:i.color||i,stroked:g,strokecolor:a,strokeweight:o.thickness?o.thickness+"px":"1px"})},t.g.Ji=function(t){var e=t.ia().style;this.lc(e,"visibility",t.visible()?"":"hidden")},t.g.CB=function(i){var n,s=i.ck(),a=i.Ig();a?(n=i.IB?i.IB:i.IB=this.f("skew"),i.uJ||(i.ia().appendChild(n),i.uJ=!0),t.ph(this,n,{on:"true",origin:[-.5-s.left/s.width,-.5-s.top/s.height].join(),matrix:[e(a.od),e(a.gf),e(a.We),e(a.Le),0,0].join()}),t.ph(this,i.ia().style,{left:o(s.left+a.Jd),top:o(s.top+a.Fd)})):i.uJ&&(t.Xe(i.IB),i.uJ=!1)},t.g.K5=function(e){var i=e.ia(),n=e.To(),s=e.Uo(),a=e.Xr(),o=e.zx();(e=e.Ig())&&!t.zb(e)?(s=(n=t.tb(n,s,a,o,0,360,!1)).length,e.transform(n,0,n,0,s/2),e=["m",r(n[s-2]),r(n[s-1]),"c"],t.kd(Array.prototype.push,(0,t.Wa)(n,r),e)):e=["ae",r(n),r(s),r(a),r(o),0,-23592960],e.push("x"),this.lc(i,"path",e.join(" "))},t.g.N5=function(e){var i=e.ia().style;(e=e.Ig())&&this.lc(i,"rotation",String(t.Cb(e)))},t.g.Q5=function(e){var i=e.ia();(e=t.rh(this,e,!0))?this.lc(i,"path",e):i.removeAttribute("path")},t.g.P5=t.ia,t.g.U5=function(i){var n=i.Ig();if(n){var s=i.b,a=i.ia().style;if(i.xr()){if(!i.path()){var r=i.$a;i.b.length&&(r-=i.b[0].f);var l=i.aa;t.ph(this,a,{position:"absolute",overflow:"visible",left:o(l+n.Jd),top:o(r+n.Fd)})}if(m(i))for(i=0,a=s.length;i<a;i++){var h=s[i];if(h.IB){var c=h.IB;t.ph(this,c,{origin:[-.5-l,-.5-r].join(),matrix:[e(n.od),e(n.gf),e(n.We),e(n.Le),0,0].join()})}else c=h.IB=this.f("skew");!h.uJ&&h.ia()&&(h.ia().appendChild(c),h.uJ=!0);var u=[-.5-l,-.5-r].join();h.ia()&&(h.ia().rotation=0),t.ph(this,c,{on:"true",origin:u,matrix:[e(n.od),e(n.gf),e(n.We),e(n.Le),0,0].join()})}}else l=i.x(),r=i.y(),i.vAlign()&&i.height()&&i.height()>i.D&&("middle"==i.vAlign()&&(r+=i.height()/2-i.D/2),"bottom"==i.vAlign()&&(r+=i.height()-i.D)),t.ph(this,a,{position:"absolute",overflow:"hidden",left:o(l+n.Jd),top:o(r+n.Fd)})}},t.g.OI=function(){return!0},t.g.S5=t.ia,t.g.Z0=t.ia,t.g.HX=function(e){var i=t.J(e,t.Fg),n=e.clip();if(n){n=(n=(n=n.shape()).Xt(n.Pd)).clone();var s=e.ia().style;t.p(i)&&i?(e=e.Ig(),n=t.Ab(n,e)):t.J(e,v)&&!e.xr()||(n.left-=e.Gh()||0,n.top-=e.As()||0),e=n.left,i=n.top,this.lc(s,"clip",["rect(",i+"px",e+n.width+"px",i+n.height+"px",e+"px",")"].join(" "))}else n=e.ia().style,l(n,"clip")},t.g.zW=function(){return!0},t.H(p,t.od),t.g=p.prototype,t.g.Tm=function(){return this.b},t.g.oA=null,t.g.HJ=null,t.g.Bo=!1,t.g.Sm=function(){return"shape-type"},t.g.R=function(){delete this.b,delete this.i,t.Xe(this.oA),this.oA=null,t.Xe(this.HJ),this.HJ=null},t.H(f,t.Jj),f.prototype.clear=function(){t.Kc(this.f),t.Kc(this.G),f.u.clear.call(this)},f.prototype.j5=function(e){for(var i=t.Ij(e.keys,e.Dc,e.uc,e.b,e.f,e.opacity,e.Ta),n=t.Ec(this.f),s=0,a=n.length;s<a;s++){var o=n[s];o.Tm()==e&&g(o)}t.Gc(this.G,i)&&t.Lc(this.G,i)},f.prototype.qX=function(e){for(var i=t.Gj(e.keys,e.opacity,e.angle,e.mode),n=t.Ec(this.f),s=0,a=n.length;s<a;s++){var o=n[s];o.Tm()==e&&g(o)}e=this.ru,t.Gc(e,i)&&t.Lc(e,i)},f.prototype.R=function(){for(var e in this.f)t.qd(this.f[e]);this.f=null,f.u.R.call(this)},t.H(b,t.Yj),b.prototype.F0=function(){return new f(this)},b.prototype.E0=function(t,e,n,s){return new i(this,t,e,n,s)},t.E("acgraph.vml.Stage",b),t.H(v,t.Qh),t.g=v.prototype,t.g.textOverflow=function(t){return t&&(this.Ha=!0),v.u.textOverflow.call(this,t)},t.g.opacity=function(t){if(null!=t){if(t!==this.style().opacity){var e=!this.Ja()||this.Ja().yf();e||this.Ja().suspend(),this.style().opacity=t,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),e||this.Ja().resume()}return this}return this.style().opacity},t.g.color=function(t){if(null!=t){if(t!==this.style().color){var e=!this.Ja()||this.Ja().yf();e||this.Ja().suspend(),this.style().color=t,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),e||this.Ja().resume()}return this}return this.style().color},t.g.sx=function(){if(t.mg().OI()){var e=this.Ig();e&&!t.zb(e)&&(this.Pb(4),this.nf=null)}},t.g.xr=function(){var t=this.Ig();return!(!t||t&&1==t.od&&0==t.gf&&0==t.We&&1==t.Le)||!!this.textOverflow()},t.g.Xt=function(t){return this.Ha=this.xr(),v.u.Xt.call(this,t)},t.g.Sd=function(){if(v.u.Sd.call(this),m(this)||this.textOverflow()){t.mg();var e=this.ia();C&&this.ia()&&(e.innerHTML=e.innerHTML)}return this},t.g.rX=function(){t.jg(this,64)},t.g.OO=function(){this.Ha?v.u.OO.call(this):(t.mg().PX(this),t.jg(this,16384))},t.g.Ep=function(){this.Ha?v.u.Ep.call(this):t.jg(this,32)},t.g.MB=function(){if(this.Ha)v.u.MB.call(this);else{null!=this.direction()&&(this.K="rtl"==this.direction());var e=this.text();this.Hd||null==this.text()?this.Uc=e:this.Uc=t.oc(e),this.Ta=this.Vm(this.Uc,{})}},t.g.Vm=function(e,i){if(this.Ha)return v.u.Vm.call(this,e,i);var n=t.mg(),s=this.style();return n.Zn||n.Xp(),n.b.style.cssText="",s.fontStyle&&t.uf(n.b,"font-style",s.fontStyle),s.fontVariant&&t.uf(n.b,"font-variant",s.fontVariant),s.fontFamily&&t.uf(n.b,"font-family",s.fontFamily),s.fontSize&&t.uf(n.b,"font-size",s.fontSize),s.fontWeight&&t.uf(n.b,"font-weight",s.fontWeight),s.letterSpacing&&t.uf(n.b,"letter-spacing",s.letterSpacing),s.decoration&&t.uf(n.b,"text-decoration",s.decoration),s.textIndent&&t.uf(n.b,"text-indent",s.textIndent),t.uf(n.b,"word-break",s.wordBreak),t.uf(n.b,"word-wrap",s.wordWrap),null!=s.width||t.uf(n.b,"white-space","nowrap"),s.width&&t.uf(n.b,"width",s.width),t.uf(n.Zn,{left:0,top:0,width:"1px",height:"1px"}),t.uf(n.b,{border:"0 solid",position:"absolute",left:0,top:0}),n.b.innerHTML=e,s=t.Of(n.b),n.b.innerHTML="",s.left=this.x(),s.top=this.y(),this.D=s.height,this.height()&&(s.height=this.height()),s},t.g.qv=function(){var t=this.Ig();!t||this.Vf(256)||this.Vf(4)||(this.nf=t.clone())},t.g.Uy=function(){v.u.Uy.call(this),y(this)},t.g.Mr=function(){if(v.u.Mr.call(this),y(this),C&&m(this)){var t=!this.Ja()||this.Ja().yf();t||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),t||this.Ja().resume()}},t.g.R=function(){delete this.nf,v.u.R.call(this)};var D=v.prototype;D.color=D.color,D.opacity=D.opacity,D.textOverflow=D.textOverflow,t.E("acgraph.vml.Text",v),t.E("acgraph.vml.getRenderer",(function(){return a.Id()}))}.call(this,$)),_.theme_map||(_.theme_map=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{map:{defaultCalloutSettings:{},defaultSeriesSettings:{base:{normal:{fill:function(){return this.scaledColor||this.sourceColor},stroke:t.EN,hatchFill:!1,labels:{anchor:"center-bottom",enabled:null,adjustFontSize:{width:!0,height:!0},format:function(){return this.getData("name")?this.getData("name"):this.name?this.name:this.getData("id")?this.getData("id"):"lat: "+this.lat+"\nlong: "+this.long}},markers:{enabled:!1,disablePointerEvents:!1}},hovered:{fill:"#757575",stroke:{thickness:.5,color:"#545f69"},labels:{enabled:null},markers:{enabled:null}},selected:{fill:"#333 0.85",stroke:{thickness:.5,color:"#545f69"},labels:{enabled:null},markers:{enabled:null}},color:null,tooltip:{titleFormat:function(){return this.name||this.getData("name")||"Tooltip title"},format:function(){return"Id: "+this.id+"\nValue: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix}},xScale:null,yScale:null,a11y:{titleFormat:"Series named {%SeriesName}"},clip:!1},choropleth:{normal:{labels:{fontColor:"#212121",anchor:"center"},markers:{anchor:null}},colorScale:{}},connector:{startSize:0,endSize:0,curvature:.3,normal:{stroke:function(){return{thickness:2,color:this.sourceColor,lineJoin:"round"}},markers:{position:"middle",enabled:!0,size:15,stroke:"1.5 #f7f7f7",rotation:null,anchor:null,type:"arrowhead"},labels:{enabled:!1,position:"middle",anchor:null,format:function(){return"from: "+this.startPoint.lat+","+this.startPoint.long+"\nto: "+this.endPoint.lat+","+this.endPoint.long}}},hovered:{stroke:t.FN,markers:{stroke:"1.5 #f7f7f7",size:15}},selected:{stroke:"2 #333 0.85",markers:{fill:"#333 0.85",stroke:"1.5 #f7f7f7",size:15}},tooltip:{title:{enabled:!1},separator:{enabled:!1},format:function(){return"from: "+this.startPoint.lat+", "+this.startPoint.long+"\nto: "+this.endPoint.lat+", "+this.endPoint.long}}},bubble:{normal:{stroke:function(){return{thickness:2,color:t.Ql(this.sourceColor)}},labels:{anchor:"center"}},hovered:{fill:"#757575"},selected:{fill:"#333 0.85"},tooltip:{format:function(){var e=this.id?"Id: "+this.id:"lat: "+this.lat+"\nlong: "+this.long;return this.size&&(e+="\nValue: "+this.valuePrefix+t.vN(this.size)+this.valuePostfix),e}}},marker:{normal:{labels:{enabled:!0}},hovered:{labels:{fontWeight:"bold"}},selected:{labels:{fontWeight:"bold"}},tooltip:{format:function(){var e=this.id?"Id: "+this.id:"lat: "+this.lat+"\nlong: "+this.long;return this.value&&(e+="\nValue: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix),e}}}},colorRange:{zIndex:50},geoScale:{maxTicksCount:1e3,precision:2},callouts:[],axesSettings:{enabled:!1,title:{padding:5,fontSize:13,text:"Axis title",fontColor:"#545f69",zIndex:10},labels:{enabled:!0,padding:2,rotation:null,fontSize:10,anchor:"auto",position:"outside",zIndex:5},minorLabels:{enabled:null,padding:2,rotation:null,fontSize:9,anchor:null,position:"outside",zIndex:4},overlapMode:"no-overlap",ticks:{enabled:!0,length:5,position:"outside",stroke:"#CECECE",zIndex:3},minorTicks:{enabled:!1,length:2,position:"outside",stroke:"#CECECE",zIndex:2},drawFirstLabel:!0,drawLastLabel:!0,stroke:"#CECECE"},gridsSettings:{enabled:!1,minorStroke:"none",zIndex:5},crosshair:{enabled:!1,xStroke:"#969EA5",yStroke:"#969EA5",zIndex:110,xLabels:[{enabled:null,axisIndex:2}],yLabels:[{enabled:null,axisIndex:3}]},unboundRegions:{enabled:!0,fill:"#F7F7F7",stroke:"#e0e0e0"},maxBubbleSize:"10%",minBubbleSize:"1%",geoIdField:"id",interactivity:{copyFormat:function(t){for(var e="",i=0,n=(t=t.seriesStatus).length;i<n;i++){var s=t[i];if(s.points.length){e+="Series "+s.series.getIndex()+":\n";for(var a=0,o=s.points.length;a<o;a++){var r=s.points[a];e+="id: "+r.id+" index: "+r.index,a!=o-1&&(e+="\n")}i!=n-1&&(e+="\n")}}return e||"no selected points"},drag:!0,zoomOnMouseWheel:!1,keyboardZoomAndMove:!0,zoomOnDoubleClick:!1},minZoomLevel:1,maxZoomLevel:10,overlapMode:"no-overlap",crsAnimation:{enabled:!0,duration:300},legend:{enabled:!1,tooltip:{contentInternal:{background:{disablePointerEvents:!1}}}},selectPolygonMarqueeFill:"#d3d3d3 0.4",selectPolygonMarqueeStroke:"#d3d3d3",selectPolygonMarqueeMarker:{fill:"#d3d3d3 0.4",stroke:"#d3d3d3",radius:15}},choropleth:{},bubbleMap:{},markerMap:{},connector:{},seatMap:{}})}.call(this,$)),_.sankey||(_.sankey=1,function(t){var e=function(e,i){t.V.call(this),this.ya=e,this.re=i,this.gb=null;var n={};t.T(n,[["fill",0,8192],["stroke",0,8192],["labels",0,0]]),this.ca=new t.my(this,n,t.gm),t.W(this,"normal",this.ca),this.ca.ta("labelsFactoryConstructor",t.ny),this.ca.ta("labelsAfterInitCallback",t.sy),this.za=new t.my(this,n,t.vo),t.W(this,"hovered",this.za),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",(function(t){t.I(4294967295)}))},i=function(e,i){t.ux.call(this),this.Ga("sankey"),t.su(this,this,this.If,this.hg,null,this.If,null,null),t.T(this.ua,S),this.data(e||null,i),this.PR=(0,t.pa)(this.PR,this),this.NR=(0,t.pa)(this.NR,this)},n=function(t,e){for(var i=e.hE,s=0;s<i.length;s++){var a=i[s];e.level>=a.level&&(a.level=e.level+1,n(t,a)),a.level>t.G&&(t.G=a.level)}},s=function(t,e){return e?(t.hf[e]||(t.hf[e]={type:w,name:e,level:0,lN:0,qO:0,MG:0,PH:[],hE:[],Z2:[],C4:[],j1:[],uta:[],Fta:[],Cy:[],Sy:[],tS:!1}),t.hf[e]):null},a=function(e,i){var n,s=i.type;if(s==w){var a=i.name;e.isConflict={value:i.tS,type:"string"};var o=[];for(n=0;n<i.PH.length;n++){var r=i.PH[n],l=t.xa(r.hE,(function(t){return t==i}));o.push({name:r.name,value:r.C4[l]})}for(e.income={value:o,type:""},o=[],n=0;n<i.hE.length;n++)r=i.hE[n],l=t.xa(r.PH,(function(t){return t==i})),o.push({name:r.name,value:r.Z2[l]});e.outcome={value:o,type:""},e.dropoff={value:i.MG,type:"number"}}else a=s==x?i.from.name+" -> "+i.Je.name:i.from.name+" dropoff";e.type={value:D[s],type:"string"},e.name={value:a,type:"string"},e.value={value:i.weight,type:"number"}},o=function(e,i,n){n=n?e.node().lb().labels():e.node().Qa().labels(),e=e.node().Qa().labels(),n=n.g("position"),e=e.g("position"),e=t.Ek(n||e,"center");var s=n=0,a=(i.Hj+i.mi)/2,o=(i.ze+i.Pe)/2;switch(e){case"left-top":n=i.Hj,s=i.ze;break;case"left-center":n=i.Hj,s=o;break;case"left-bottom":n=i.Hj,s=i.Pe;break;case"center-top":n=a,s=i.ze;break;case"center":n=a,s=o;break;case"center-bottom":n=a,s=i.Pe;break;case"right-top":n=i.mi,s=i.ze;break;case"right-center":n=i.mi,s=o;break;case"right-bottom":n=i.mi,s=i.Pe}return{value:{x:n,y:s}}},r=function(t,e,i,n,s,a){for(var o,r,h=0;h<e.length;h++)r=(o=e[h]).path,l(t,t.b,r.tag,r,n),o.label.qk(i),o.label.jc({value:s(o,a)}),t.ke(t.b,o,n)},l=function(t,e,i,n,s){i=t.Ge(i),t=e.Tm(s,i),e=e.gk(s,i),n.fill(t),n.stroke(e)},h=function(t,e,i,n,s,a){var h=e.tag;l(t,t.f,h,e,i),e=h.element,r(t,e.Cy,n,i,a,"leftTop"),r(t,e.Sy,s,i,a,"rightTop"),e.label.jc(o(t,e,i)),t.ke(t.f,e,i)},c=function(t,e,i){var n=(e=e.tag).element;l(t,t.b,e,n.path,i),n.label.qk("center-bottom"),n.label.jc({value:t.CY(n)}),l(t,t.f,n.from.path.tag,n.from.path,i),l(t,t.f,n.Je.path.tag,n.Je.path,i),t.ke(t.b,n,i)},u=function(t,e,i){var n=e.tag;l(t,t.o,n,e,i),t.ke(t.o,n.element,i)},d=function(t){return(t.ze+t.Pe)/2},p=function(e,i){for(var n=0;n<e.i.length;n++)for(var s=e.i[n].hf,a=0;a<s.length;a++){var o=s[a];if(o.Cy.length){var r=(0,t.Gg)(o.Cy,(function(t,e){return t+d(e.from)*e.weight}),0,e);r=(r/(0,t.Gg)(o.Cy,(function(t,e){return t+e.weight}),0,e)-d(o))*i,o.ze+=r,o.Pe+=r}}},g=function(e,i){for(var n=e.i.slice(),s=0;s<n.length;s++)for(var a=e.i[s].hf,o=0;o<a.length;o++){var r=a[o];if(r.Sy.length){var l=(0,t.Gg)(r.Sy,(function(t,e){return t+d(e.Je)*e.weight}),0,e);l=(l/(0,t.Gg)(r.Sy,(function(t,e){return t+e.weight}),0,e)-d(r))*i,r.ze+=l,r.Pe+=l}}},f=function(t,e){for(var i=0;i<t.i.length;i++){var n,s=t.i[i].hf.slice(),a=e.top,o=a+e.height,r=s.length,l=t.g("nodePadding");for(s.sort(t.OR),n=0;n<r;++n){var h=s[n];0<(a-=h.ze)&&(h.ze+=a,h.Pe+=a),a=h.Pe+l}if(0<(a=a-l-o))for(h.ze=h.ze-a,h.Pe=h.Pe-a,a=h.ze,n=r-2;0<=n;--n)0<(a=(h=s[n]).Pe+l-a)&&(h.ze-=a,h.Pe-=a),a=h.ze}},b=function(e,i,n){var s;for(s=0;s<i.length;s++){var a=i[s];l(e,n,a.tag,a,t.gm)}},v=function(t,e){return new i(t,e)};t.H(e,t.V),t.Gq(e,["fill","stroke","labels"],"normal"),t.g=e.prototype,t.g.ra=28672|t.V.prototype.ra,t.g.Ma=function(){return this.re},t.g.Kg=function(){t.W(this,"normal",this.ca),t.W(this,"hovered",this.za)},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df(),t.W(this,"tooltip",this.gb),this.gb.parent(this.ya.Ua()),this.gb.ya(this.ya)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.Bp=function(){this.va(16384)},t.g.de=function(){this.va(4096)},t.g.xI=function(){this.ca.labels().I(4294967295),this.za.labels().I(4294967295)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.Tm=function(t,e){return this.Fp("fill",t,e)},t.g.gk=function(t,e){return this.Fp("stroke",t,e)},t.g.Fp=function(e,i,n){return e=(i?this.za:this.ca).g(e)||this.ca.g(e),t.D(e)&&(e=e.call(n,n)),e},t.g.F=function(){var t=e.u.F.call(this);return t.tooltip=this.Ua().F(),t.normal=this.ca.F(),t.hovered=this.za.F(),t},t.g.U=function(t,i){e.u.U.call(this,t,i),"tooltip"in t&&this.Ua().ga(!!i,t.tooltip),this.ca.ga(!!i,t),this.ca.ga(!!i,t.normal),this.za.ga(!!i,t.hovered)},t.g.R=function(){t.sd(this.gb,this.ca,this.za),e.u.R.call(this)};var m=e.prototype;m.tooltip=m.Ua,m.normal=m.Qa,m.hovered=m.lb,t.H(i,t.ux),t.Jz(i,"sankey",["appearance","data","flowlabels","nodelabels"]),i.prototype.ra=t.ux.prototype.ra;var y={};t.sq(y,[[0,"nodeWidth",t.br],[0,"nodePadding",t.Bq],[0,"curveFactor",t.er]]),t.U(i,y);var S=[["nodeWidth",4,1],["nodePadding",4,1],["curveFactor",4,1]];t.g=i.prototype,t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Xf!==e&&(this.Xf=e,t.qd(this.la),t.qd(this.Yc),this.sd=null,t.J(e,t.Cr)?this.la=e.Ui():this.la=t.J(e,t.Mr)?e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(256),t.nr(this,"sankey","data",1)),this}return this.la},t.g.dd=function(){this.B(256),t.nr(this,"sankey","data",1)},t.g.cg=function(){return this.la.$()},t.g.Ec=function(){return this.sd=this.la.$()},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.Ma=function(){return"sankey"},t.g.pb=function(){if(t.rr(this,"sankey","data")){this.hf={},this.D={},this.G=-1;for(var e=this.$().reset();e.advance();){var i=String(e.get("from")),a=e.get("to");a=null===a||t.C(a)?null:String(a);var o=t.N(e.get("weight")),r=!i.length,l=null!==a&&!a.length;t.ea(o)&&0<o&&!r&&!l&&(i=s(this,i),r=s(this,a),a=i,i=r,r=this.$().ma(),this.D[r]={type:i?x:C,Ch:r,from:a,Je:i,weight:o},a.qO+=o,i?(a.Sy.push(this.D[r]),a.C4.push(o),a.hE.push(i),i.lN+=o,i.Z2.push(o),i.PH.push(a),i.Cy.push(this.D[r]),a.level>=i.level&&(i.level=a.level+1,n(this,i)),i.level>this.G&&(this.G=i.level)):(a.MG+=o,a.j1.push(o)))}for(var h in this.i=[],this.Ba=!0,this.hf)(o=this.hf[h]).weight=Math.max(o.lN,o.qO),e=o.hE.length+o.j1.length,this.Ba&&!e&&(o.level=this.G),o.PH.length&&e&&(o.tS=o.lN!=o.qO),e=o.level,this.i[e]||(this.i[e]={hf:[],weight:0,top:window.NaN}),(e=this.i[e]).hf.push(o),e.weight+=o.weight;for(o=h=0;o<this.i.length;o++)for(e=this.i[o],a=0;a<e.hf.length;a++)e.hf[a].id=h++;this.B(4),t.pr(this,"sankey","data")}},t.g.yj=function(){return!this.$().Hb()},t.g.Ue=function(){return[]},t.g.Bp=function(){this.Ua().W()},t.g.nG=function(e,i){this.aa&&!i||(this.aa=new t.Fw);var n={};if(a(n,e),e.type!=w){var s=this.$();s.select(e.Ch),this.aa.lg(s)}else this.aa.lg(null);return t.ov(this.aa,n)},t.g.Ux=function(e){this.Si||(this.Si=new t.Fw);var i={};if(e=e.element,a(i,e),e.type!=w){var n=this.$();n.select(e.Ch),this.Si.lg(n)}else this.Si.lg(null);return t.ov(this.Si,i)},t.g.Rga=function(t,e){return{x:t[e].x,y:t[e].y}},t.g.CY=function(t){return{x:(t.left+t.right)/2,y:t.topCenter}},t.g.If=function(e){var i=e.domTarget,n=i.tag;if(n){var s=n.element.type;s==w?(s=this.f.Ua(),h(this,i,t.vo,"left-bottom","right-bottom",this.Rga)):s==x?(s=this.b.Ua(),c(this,i,t.vo)):(s=this.o.Ua(),u(this,i,t.vo)),t.Ow(s,e.clientX,e.clientY,this.Ux(n))}else this.Ua().Lc()},t.g.hg=function(e){var i=(e=e.domTarget).tag;this.Ua().Lc(),i&&((i=i.element.type)==w?h(this,e,t.gm,"center-bottom","center-bottom",this.CY):i==x?c(this,e,t.gm):u(this,e,t.gm))},t.g.rT=function(e){var i=[];t.X(e,8192)&&i.push("appearance"),t.X(e,4096)&&(e=e.target.Ma()==w,i.push(e?"nodelabels":"flowlabels")),t.or(this,"sankey",i,1)},t.g.fM=function(i){return this.o||(this.o=new e(this,C),t.W(this,"dropoff",this.o),this.o.Kg(),t.K(this.o,this.rT,this)),t.p(i)?(this.o.N(i),this):this.o},t.g.vM=function(i){return this.b||(this.b=new e(this,x),t.W(this,"flow",this.b),this.b.Kg(),t.K(this.b,this.rT,this)),t.p(i)?(this.b.N(i),this):this.b},t.g.node=function(i){return this.f||(this.f=new e(this,w),t.W(this,"node",this.f),this.f.Kg(),t.K(this.f,this.rT,this)),t.p(i)?(this.f.N(i),this):this.f},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&t.nr(this,"sankey","appearance",1)}},t.g.Pf=function(e){t.X(e,2)&&t.nr(this,"sankey","appearance",1)},t.g.Ge=function(t){var e=t.element;t=t.element.type;var i=this.cc();return t==w?{id:e.id,name:e.name,sourceColor:i.nc(e.id),conflict:e.tS}:t==x?{from:e.from.name,to:e.Je.name,sourceColor:i.nc(e.from.id)}:{from:e.from.name,sourceColor:i.nc(e.from.id)}};var w=0,x=1,C=2,D={0:"node",1:"flow",2:"dropoff"};t.g=i.prototype,t.g.NR=function(t,e){return this.OR(t.from,e.from)},t.g.PR=function(t,e){return this.OR(t.Je,e.Je)},t.g.OR=function(t,e){return t.ze-e.ze},t.g.sV=function(t,e){return function(i){return t*(1-i)+e*i}},t.g.Qh=function(e){if(!this.pf()){if(this.pb(),this.Aa||(this.Aa=this.Na.Bd(),this.Aa.zIndex(30),this.node(),this.vM(),this.fM()),this.J(4)){this.Aa.Gi(),this.f.labels().B(2),this.b.labels().B(2),this.o.labels().B(2),this.K=[],this.ba=[],this.P=[],this.ea=[];var i=this.g("nodePadding"),n=this.g("nodeWidth");if(this.i.length){var s=this.i.length,a=e.width/s;a=.3*(n=t.L(n,a))}else n=a=s=0;var r,l=[];for(r=0;r<this.i.length;r++){var h=this.i[r],c=h.hf,u=c[c.length-1].MG?a:0;c=(e.height-u-i*(c.length-1))/h.weight,l.push(c)}for(this.na=Math.min.apply(null,l),i=(e.width-n)/(s-1),r=0;r<this.i.length;r++)for(c=(h=this.i[r]).hf,h=0;h<c.length;h++)(s=c[h]).Hj=e.left+s.level*i,s.mi=s.Hj+n,s.ze=e.top+h,s.Pe=s.ze+s.weight*this.na;for(var d in this.D)(c=this.D[d]).height=c.weight*this.na;for(f(this,e),c=1,r=32;0<r;--r)g(this,c*=.99),f(this,e),p(this,c),f(this,e);for(w in this.hf)(s=this.hf[w]).Sy.sort(this.PR),s.Cy.sort(this.NR);for(w in this.hf){var v=i=(s=this.hf[w]).ze;for(r=0;r<s.Sy.length;r++)(c=s.Sy[r]).ze=v+c.height/2,v+=c.height;for(r=0;r<s.Cy.length;r++)(c=s.Cy[r]).Pe=i+c.height/2,i+=c.height}for(w in this.hf)s=this.hf[w],(h=this.Aa.path()).zIndex(3),this.ba.push(h),h.tag={element:s},s.path=h,s.Hj=t.R(t.Tm(s.Hj,4),1),s.ze=t.R(t.Tm(s.ze,4),1),s.mi=t.R(t.Tm(s.mi,4),1),s.Pe=t.R(t.Tm(s.Pe,4),1),h.moveTo(s.Hj,s.ze).lineTo(s.mi,s.ze).lineTo(s.mi,s.Pe).lineTo(s.Hj,s.Pe).lineTo(s.Hj,s.ze).close();for(d in s=this.g("curveFactor"),this.D)if((c=this.D[d]).Je){(h=this.Aa.path()).zIndex(1),this.P.push(h),h.tag={element:c},c.path=h,e=c.from.mi,r=c.Je.Hj,v=c.ze,i=c.Pe,l=(u=this.sV(e,r))(s),u=u(1-s);var m=c.height/2;c.left=e,c.right=r,c.topCenter=(v+i)/2-m,c.leftTop={x:e,y:v-m},c.rightTop={x:r,y:i-m};var y=v-m,S=i-m;v+=m,i+=m,h.moveTo(e,y).Sk(l,y,u,S,r,S).lineTo(r,i).Sk(u,i,l,v,e,v).lineTo(e,y),3>c.height&&((h=this.Aa.path()).zIndex(2),this.ea.push(h),h.fill(t.bm).stroke(t.bm,3),h.moveTo(e,y).Sk(l,y,u,S,r,S).lineTo(r,i).Sk(u,i,l,v,e,v).lineTo(e,y),h.tag={element:c})}else i=c.from.MG*this.na,u=Math.min(i,n/4),r=(e=c.from.mi)+u,i=(l=c.from.Pe)-i,(h=this.Aa.path()).zIndex(1),this.K.push(h),h.tag={element:c},c.path=h,c.dka=r,c.eka=l,h.moveTo(e,i).arcTo(u,u,-90,90),i+u<l&&h.lineTo(r,l),h.lineTo((e+r)/2,l+a).lineTo(e,l).close();t.or(this,"sankey",["appearance","nodelabels","flowlabels"]),this.I(4)}if(t.rr(this,"sankey","appearance")&&(b(this,this.ba,this.f),b(this,this.P,this.b),b(this,this.K,this.o),t.pr(this,"sankey","appearance")),t.rr(this,"sankey","nodelabels")){for(var w in(c=this.f.labels()).clear().O(this.Aa).zIndex(3),this.hf)e=(s=this.hf[w]).id,n=this.nG(s,!0),a=o(this,s,t.gm),s.label=c.add(n,a,e),this.ke(this.f,s,t.gm);c.W(),this.f.xI(),t.pr(this,"sankey","nodelabels")}if(t.rr(this,"sankey","flowlabels")){for(d in w=this.b.labels(),r=this.o.labels(),w.clear().O(this.Aa).zIndex(3),r.clear().O(this.Aa).zIndex(3),this.D)c=this.D[d],e=t.N(d),s=c.Je,n=this.nG(c,!0),s?(a={value:this.CY(c)},c.label=w.add(n,a,e),c.label.qk("center-bottom")):(a={value:{x:c.dka,y:c.eka}},c.label=r.add(n,a,e),c.label.qk("left-center")),this.ke(s?this.b:this.o,c,t.gm);w.W(),r.W(),this.b.xI(),this.o.xI(),t.pr(this,"sankey","flowlabels")}}},t.g.ke=function(e,i,n){var s=i.label;if(s){var a=this.$();e.Ma()==w?a.reset():a.select(i.Ch),i=a.get("normal"),i=t.p(i)?i.label:void 0;var o=a.get("hovered");o=t.p(o)?o.label:void 0,i=t.Zo(i,a.get("label"),null),a=t.Zo(o,a.get("hoverLabel"),null),a=n?a:null,o=n?e.lb().labels():null;var r=e.Qa().labels();n=n?e.lb().labels().oa:null;var l=e.Qa().labels().oa,h=a&&t.p(a.enabled)?a.enabled:null,c=i&&t.p(i.enabled)?i.enabled:null,u=o&&null!==o.enabled()?o.enabled():null,d=r&&null!==r.enabled()?r.enabled():null;e=!1,(e=null!=h?h:null!=c?c:null!=u?u:d)?(s.enabled(!0),s.state("labelOwnSettings",s.Pa,0),s.state("pointState",a,1),s.state("pointNormal",i,2),s.state("elementState",o,3),s.state("elementNormal",r,4),s.state("elementStateTheme",n,5),s.state("auto",s.Nd,6),s.state("elementNormalTheme",l,7)):s.enabled(!1),s.W()}},t.g.ts=function(){return[this]},t.g.qA=function(){return["from","to","weight"]},t.g.F=function(){var e=i.u.F.call(this);return e.data=this.data().F(),e.tooltip=this.Ua().F(),e.palette=this.cc().F(),e.dropoff=this.fM().F(),e.flow=this.vM().F(),e.node=this.node().F(),t.Tq(this,y,e),{chart:e}},t.g.U=function(e,n){i.u.U.call(this,e,n),"data"in e&&this.data(e.data),this.cc(e.palette),"tooltip"in e&&this.Ua().ga(!!n,e.tooltip),"dropoff"in e&&this.fM().ga(!!n,e.dropoff),"flow"in e&&this.vM().ga(!!n,e.flow),"node"in e&&this.node().ga(!!n,e.node),t.Iq(this,y,e,n)},t.g.R=function(){t.sd(this.Fa,this.o,this.b,this.f,this.gb,this.K,this.ba,this.P,this.ea,this.la,this.Yc),this.gb=this.f=this.b=this.o=this.Fa=null,this.K.length=0,this.ba.length=0,this.P.length=0,this.ea.length=0,this.sd=this.Yc=this.la=null,i.u.R.call(this)};var T=i.prototype;T.getType=T.Ma,T.data=T.data,T.noData=T.Gm,T.tooltip=T.Ua,T.dropoff=T.fM,T.flow=T.vM,T.node=T.node,T.palette=T.cc,t.Tp.sankey=v,t.E("anychart.sankey",v)}.call(this,$)),_.venn||(_.venn=1,function(t){var e=function(e){function i(t){t.I(4294967295)}t.V.call(this),this.Ga("venn.intersections"),this.pa=e,e={},t.T(e,[["fill",0,8256],["stroke",0,8256],["hatchFill",0,8256],["labels",0,0],["markers",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("markersFactoryConstructor",t.ry),this.ca.ta("markersAfterInitCallback",t.ty),this.ca.ta("labelsFactoryConstructor",t.oy),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.de,this)})),e={},t.T(e,[["fill",0,8192],["stroke",0,8192],["hatchFill",0,8192],["labels",0,0],["markers",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("markersFactoryConstructor",t.ry),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("markersFactoryConstructor",t.ry),this.za.ta("labelsAfterInitCallback",i),this.za.ta("markersAfterInitCallback",i),this.Ea.ta("labelsAfterInitCallback",i),this.Ea.ta("markersAfterInitCallback",i)},i=function(t){for(var e=Array(t),i=0;i<t;++i)e[i]=0;return e},n=function(e,n){return(0,t.Wa)(i(e),(function(){return i(n)}))},s=function(t,e){for(var i=0,n=0;n<t.length;++n)i+=t[n]*e[n];return i},a=function(t){return Math.sqrt(s(t,t))},o=function(t,e){for(var i=0;i<e.length;++i)t[i]=-1*e[i]},r=function(t,e,i,n,s){for(var a=0;a<t.length;++a)t[a]=e*i[a]+n*s[a]},l=function(t,e,i,n,a){function o(o,u,p){for(var b=0;16>b;++b)if(a=(o+u)/2,r(n.x,1,i.x,a,e),c=n.Se=t(n.x,n.Vk),d=s(n.Vk,e),c>l+g*a*h||c>=p)u=a;else{if(Math.abs(d)<=-f*h)return a;0<=d*(u-o)&&(u=o),o=a,p=c}return 0}var l=i.Se,h=s(i.Vk,e),c=l,u=l,d=h,p=0;a=a||1;for(var g=g||1e-6,f=f||.1,b=0;10>b;++b){if(r(n.x,1,i.x,a,e),c=n.Se=t(n.x,n.Vk),d=s(n.Vk,e),c>l+g*a*h||b&&c>=u)return o(p,a,u);if(Math.abs(d)<=-f*h)break;if(0<=d)return o(a,p,c);u=c,p=a,a*=2}return a},h=function(t,e,i){var n={x:e.slice(),Se:0,Vk:e.slice()},h={x:e.slice(),Se:0,Vk:e.slice()},c=e.slice(),u=1,d=(i=i||{}).zI||20*e.length;n.Se=t(n.x,n.Vk),e=n.Vk.slice(),o(e,n.Vk);for(var p=0;p<d;++p){if(u=l(t,e,n,h,u),i.history&&i.history.push({x:n.x.slice(),Se:n.Se,Vk:n.Vk.slice(),alpha:u}),u){r(c,1,h.Vk,-1,n.Vk),r(e,Math.max(0,s(c,h.Vk)/s(n.Vk,n.Vk)),e,-1,h.Vk);var g=n;n=h,h=g}else o(e,n.Vk);if(1e-5>=a(n.Vk))break}return i.history&&i.history.push({x:n.x.slice(),Se:n.Se,Vk:n.Vk.slice(),alpha:u}),n},c=function(e,i,n){function s(t,e){return t.Se-e.Se}function a(t){for(var e=0;e<t.length;e++)m[v][e]=t[e];m[v].Se=t.Se}var o,l=(n=n||{}).zI||200*i.length,h=n.Dta||1.05,c=n.Qta||.001,u=n.Y3||1e-6,d=n.Y3||1e-5,p=void 0!==n.cka?n.cka:1,g=void 0!==n.Jda?n.Jda:2,f=void 0!==n.Qja?n.Qja:-.5,b=void 0!==n.zka?n.zka:.5,v=i.length,m=Array(v+1);m[0]=i,m[0].Se=e(i);for(var y=m[0].id=0;y<v;++y){var S=i.slice();S[y]=S[y]?S[y]*h:c,m[y+1]=S,m[y+1].Se=e(S),m[y+1].id=y+1}h=i.slice(),c=i.slice(),S=i.slice(),i=i.slice();for(var w=0;w<l;++w){for(m.sort(s),n.history&&((y=(0,t.Wa)(m,(function(t){var e=t.slice();return e.Se=t.Se,e.id=t.id,e}))).sort((function(t,e){return t.id-e.id})),n.history.push({x:m[0].slice(),Se:m[0].Se,Mta:y})),y=o=0;y<v;++y)o=Math.max(o,Math.abs(m[0][y]-m[1][y]));if(Math.abs(m[0].Se-m[v].Se)<u&&o<d)break;for(y=0;y<v;++y){for(o=h[y]=0;o<v;++o)h[y]+=m[o][y];h[y]/=v}if(y=m[v],r(c,1+p,h,-p,y),c.Se=e(c),c.Se<m[0].Se)r(i,1+g,h,-g,y),i.Se=e(i),i.Se<c.Se?a(i):a(c);else if(c.Se>=m[v-1].Se){if(o=!1,c.Se>y.Se?(r(S,1+f,h,-f,y),S.Se=e(S),S.Se<y.Se?a(S):o=!0):(r(S,1-f*p,h,f*p,y),S.Se=e(S),S.Se<c.Se?a(S):o=!0),o){if(1<=b)break;for(y=1;y<m.length;++y)r(m[y],1-b,m[0],b,m[y]),m[y].Se=e(m[y])}}else a(c)}return m.sort(s),{Se:m[0].Se,x:m[0]}},u=function(e,i){var n,s=d(e),a=(0,t.Ye)(s,(function(t){t:{for(var i=0;i<e.length;++i)if(f(t,e[i])>e[i].Eb+1e-10){t=!1;break t}t=!0}return t})),o=0,r=0,l=[];if(1<a.length){var h=m(a);for(n=0;n<a.length;++n){var c=a[n];c.angle=Math.atan2(c.x-h.x,c.y-h.y)}for(a.sort((function(t,e){return e.angle-t.angle})),h=a[a.length-1],n=0;n<a.length;++n){c=a[n],r+=(h.x+c.x)*(c.y-h.y);for(var u={x:(c.x+h.x)/2,y:(c.y+h.y)/2},p=null,b=0;b<c.sO.length;++b)if(-1<h.sO.indexOf(c.sO[b])){var v=e[c.sO[b]],y=Math.atan2(h.x-v.x,h.y-v.y),S=y-Math.atan2(c.x-v.x,c.y-v.y);0>S&&(S+=2*Math.PI),y-=S/2,y=f(u,{x:v.x+v.Eb*Math.sin(y),y:v.y+v.Eb*Math.cos(y)}),(null===p||p.width>y)&&(p={rn:v,width:y,ei:c,el:h})}null!==p&&(l.push(p),o+=g(p.rn.Eb,p.width),h=c)}}else{for(h=e[0],n=1;n<e.length;++n)e[n].Eb<h.Eb&&(h=e[n]);for(o=!1,n=0;n<e.length;++n)if(f(e[n],h)>Math.abs(h.Eb-e[n].Eb)){o=!0;break}o?o=r=0:(o=h.Eb*h.Eb*Math.PI,l.push({rn:h,ei:{x:h.x,y:h.y+h.Eb},el:{x:h.x-1e-10,y:h.y+h.Eb},width:2*h.Eb}))}return r/=2,i&&(i.zC=o+r,i.mta=o,i.Ita=r,i.yC=l,i.wta=a,i.xta=s),o+r},d=function(t){for(var e=[],i=0;i<t.length;++i)for(var n=i+1;n<t.length;++n)for(var s=v(t[i],t[n]),a=0;a<s.length;++a){var o=s[a];o.sO=[i,n],e.push(o)}return e},p=function(t,e){var i=Math.sqrt(t*t-e*e);return e*i+t*t*Math.atan2(e,i)},g=function(t,e){return p(t,e-t)-p(t,-t)},f=function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},b=function(t,e,i){return i>=t+e?0:i<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):g(t,t-(i*i-e*e+t*t)/(2*i))+g(e,e-(i*i-t*t+e*e)/(2*i))},v=function(t,e){var i=f(t,e),n=t.Eb,s=e.Eb;if(i>=n+s||i<=Math.abs(n-s))return[];var a=(n*n-s*s+i*i)/(2*i);s=Math.sqrt(n*n-a*a),n=t.x+a*(e.x-t.x)/i,a=t.y+a*(e.y-t.y)/i;var o=s/i*-(e.y-t.y);return[{x:n+o,y:a-(i=s/i*-(e.x-t.x))},{x:n-o,y:a+i}]},m=function(t){for(var e={x:0,y:0},i=0;i<t.length;++i)e.x+=t[i].x,e.y+=t[i].y;return e.x/=t.length,e.y/=t.length,e},y=function(t,e,i){return Math.min(t,e)*Math.min(t,e)*Math.PI<=i+1e-10?Math.abs(t-e):function(t,e){var i=0,n=n||{},s=n.zI||100;n=n.Ota||1e-10;var a=t(i),o=t(e),r=e-i;if(0<a*o)throw"Initial points must have opposite signs";if(0===a)return i;if(0===o)return e;for(o=0;o<s;++o){var l=i+(r/=2),h=t(l);if(0<=h*a&&(i=l),Math.abs(r)<n||0===h)return l}return i+r}((function(n){return b(t,e,n)-i}),t+e)},S=function(t){t=t.slice();var e,i=[],n={};for(e=0;e<t.length;++e){var s=t[e];if(1==s.ji.length)i.push(s.ji[0]);else if(2==s.ji.length){var a=s.ji[0],o=s.ji[1];n[[a,o]]=!0,n[[o,a]]=!0}}for(e=0;e<i.length;++e)for(a=i[e],s=e+1;s<i.length;++s)[a,o=i[s]]in n||t.push({ji:[a,o],size:0,SD:window.NaN});return t},w=function(t,e){var i=C(t);if(8<=t.length){var n=x(t,e);D(n,t)+1e-8<D(i,t)&&(i=n)}return i},x=function(e,i){function s(t,e){var i,n=d,s=0;for(i=0;i<e.length;++i)e[i]=0;for(i=0;i<n.length;++i)for(var a=t[2*i],o=t[2*i+1],r=i+1;r<n.length;++r){var l=t[2*r],h=t[2*r+1],c=n[i][r],u=p[i][r],g=(l-a)*(l-a)+(h-o)*(h-o),f=Math.sqrt(g);g-=c*c,0<u&&f<=c||0>u&&f>=c||(s+=2*g*g,e[2*i]+=4*g*(a-l),e[2*i+1]+=4*g*(o-h),e[2*r]+=4*g*(l-a),e[2*r+1]+=4*g*(h-o))}return s}var o,r=(i=i||{}).Kta||10,l=[],c={};for(o=0;o<e.length;++o){var u=e[o];1==u.ji.length&&(c[u.ji[0]]=l.length,l.push(u))}o=function(e,i,s){var a=n(i.length,i.length),o=n(i.length,i.length);return e=(0,t.Ye)(e,(function(t){return 2==t.ji.length})),(0,t.Wa)(e,(function(t){var e=s[t.ji[0]],n=s[t.ji[1]],r=y(Math.sqrt(i[e].size/Math.PI),Math.sqrt(i[n].size/Math.PI),t.size);a[e][n]=a[n][e]=r,r=0,t.size+1e-10>=Math.min(i[e].size,i[n].size)?r=1:1e-10>=t.size&&(r=-1),o[e][n]=o[n][e]=r})),{pea:a,Xda:o}}(e,l,c);var d=o.pea,p=o.Xda,g=a((0,t.Wa)(d,a))/d.length;for(d=(0,t.Wa)(d,(function(e){return(0,t.Wa)(e,(function(t){return t/g}))})),o=0;o<r;++o){for(c=[],u=0;u<2*d.length;u++)c.push(1/(u+1)*Math.abs(Math.sin(o)));if(c=h(s,c,i),!f||c.Se<f.Se)var f=c}for(r=f.x,f={},o=0;o<l.length;++o)f[(c=l[o]).ji[0]]={x:r[2*o]*g,y:r[2*o+1]*g,Eb:Math.sqrt(c.size/Math.PI)};return f},C=function(e){function i(t,e){return e.size-t.size}function n(t){return t.set in p}function s(t,e){o[e].x=t.x,o[e].y=t.y,p[e]=!0}for(var a,o={},r={},l=0;l<e.length;++l){var h=e[l];1==h.ji.length&&(a=h.ji[0],o[a]={x:1e10,y:1e10,Lta:o.length,size:h.size,Eb:Math.sqrt(h.size/Math.PI)},r[a]=[])}for(e=(0,t.Ye)(e,(function(t){return 2==t.ji.length})),l=0;l<e.length;++l){h=e[l];var c=t.p(h.weight)?h.weight:1,u=h.ji[0],d=h.ji[1];h.size+1e-10>=Math.min(o[u].size,o[d].size)&&(c=0),r[u].push({set:d,size:h.size,weight:c}),r[d].push({set:u,size:h.size,weight:c})}for(a in h=[],r)if(r.hasOwnProperty(a)){for(l=c=0;l<r[a].length;++l)c+=r[a][l].size*r[a][l].weight;h.push({set:a,size:c})}h.sort(i);var p={};for(s({x:0,y:0},h[0].set),l=1;l<h.length;++l){c=h[l].set;var g=(0,t.Ye)(r[c],n);if(a=o[c],g.sort(i),0===g.length)throw"ERROR: missing pairwise overlap information";for(u=[],d=0;d<g.length;++d){var f=o[g[d].set],b=y(a.Eb,f.Eb,g[d].size);u.push({x:f.x+b,y:f.y}),u.push({x:f.x-b,y:f.y}),u.push({y:f.y+b,x:f.x}),u.push({y:f.y-b,x:f.x});for(var m=d+1;m<g.length;++m){var S=o[g[m].set],w=y(a.Eb,S.Eb,g[m].size);for(S=v({x:f.x,y:f.y,Eb:b},{x:S.x,y:S.y,Eb:w}),w=0;w<S.length;++w)u.push(S[w])}}for(a=1e50,g=u[0],d=0;d<u.length;++d)o[c].x=u[d].x,o[c].y=u[d].y,(f=D(o,e))<a&&(a=f,g=u[d]);s(g,c)}return o},D=function(e,i){for(var n=0,s=0;s<i.length;++s){var a=i[s];if(1!=a.ji.length){if(2==a.ji.length){var o=e[a.ji[0]],r=e[a.ji[1]];o=b(o.Eb,r.Eb,f(o,r))}else o=u((l=a.ji,(0,t.Wa)(l,(function(t){return e[t]}))));n+=(t.p(a.weight)?a.weight:1)*(o-a.size)*(o-a.size)}}var l;return n},T=function(t,e){var i;if(t.sort((function(t,e){return e.Eb-t.Eb})),0<t.length){var n=t[0].x,s=t[0].y;for(i=0;i<t.length;++i)t[i].x-=n,t[i].y-=s}if(1<t.length)for(i=Math.atan2(t[1].x,t[1].y)-e,n=Math.cos(i),s=Math.sin(i),i=0;i<t.length;++i){var a=t[i].x,o=t[i].y;t[i].x=n*a-s*o,t[i].y=s*a+n*o}if(2<t.length){for(i=Math.atan2(t[2].x,t[2].y)-e;0>i;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI)for(n=t[1].y/(1e-10+t[1].x),i=0;i<t.length;++i)s=(t[i].x+n*t[i].y)/(1+n*n),t[i].x=2*s-t[i].x,t[i].y=2*s*n-t[i].y}},k=function(e){function i(i){return{max:Math.max.apply(null,(0,t.Wa)(e,(function(t){return t[i]+t.Eb}))),min:Math.min.apply(null,(0,t.Wa)(e,(function(t){return t[i]-t.Eb})))}}return{Sq:i("x"),st:i("y")}},$=function(e){function i(t,e,i){if(t){var n=t.Ta;if(e)e=r.Sq.max-n.Sq.min+l;else{e=r.Sq.max-n.Sq.max;var a=(n.Sq.max-n.Sq.min)/2-(r.Sq.max-r.Sq.min)/2;0>a&&(e+=a)}for(i?i=r.st.max-n.st.min+l:(i=r.st.max-n.st.max,0>(a=(n.st.max-n.st.min)/2-(r.st.max-r.st.min)/2)&&(i+=a)),n=0;n<t.length;++n)t[n].x+=e,t[n].y+=i,s.push(t[n])}}var n=Math.PI/2;null===n&&(n=Math.PI/2);var s=[];for(o in e)if(e.hasOwnProperty(o)){var a=e[o];s.push({x:a.x,y:a.y,Eb:a.Eb,Y5:o})}var o=function(e){function i(t){return t.parent!==t&&(t.parent=i(t.parent)),t.parent}e=(0,t.Wa)(e,(function(t){return t.parent=t}));for(var n=0;n<e.length;++n)for(var s=n+1;s<e.length;++s)f(e[n],e[s])+1e-10<e[n].Eb+e[s].Eb&&(a=e[s],o=e[n],i(a).parent=i(o));var a,o;for(s={},n=0;n<e.length;++n){var r=i(e[n]).parent.Y5;r in s||(s[r]=[]),s[r].push(e[n])}for(r in(0,t.Wa)(e,(function(t){delete t.parent})),e=[],s)s.hasOwnProperty(r)&&e.push(s[r]);return e}(s);for(e=0;e<o.length;++e)T(o[e],n),a=k(o[e]),o[e].size=(a.Sq.max-a.Sq.min)*(a.st.max-a.st.min),o[e].Ta=a;o.sort((function(t,e){return e.size-t.size}));var r=(s=o[0]).Ta,l=(r.Sq.max-r.Sq.min)/50;for(n=1;n<o.length;)i(o[n],!0,!1),i(o[n+1],!1,!0),i(o[n+2],!0,!0),n+=3,r=k(s);for(n={},e=0;e<s.length;++e)n[s[e].Y5]=s[e];return n},O=function(t,e,i){var n,s=e[0].Eb-f(e[0],t);for(n=1;n<e.length;++n){var a=e[n].Eb-f(e[n],t);a<=s&&(s=a)}for(n=0;n<i.length;++n)(a=f(i[n],t)-i[n].Eb)<=s&&(s=a);return s},P=function(e,i){var n,s=[];for(n=0;n<e.length;++n){var a=e[n];s.push({x:a.x,y:a.y}),s.push({x:a.x+a.Eb/2,y:a.y}),s.push({x:a.x-a.Eb/2,y:a.y}),s.push({x:a.x,y:a.y+a.Eb/2}),s.push({x:a.x,y:a.y-a.Eb/2})}a=s[0];var o=O(s[0],e,i);for(n=1;n<s.length;++n){var r=O(s[n],e,i);r>=o&&(a=s[n],o=r)}for(s={x:(n=c((function(t){return-1*O({x:t[0],y:t[1]},e,i)}),[a.x,a.y],{zI:500,Y3:1e-10}).x)[0],y:n[1]},a=!0,n=0;n<e.length;++n)if(f(s,e[n])>e[n].Eb){a=!1;break}for(n=0;n<i.length;++n)if(f(s,i[n])<i[n].Eb){a=!1;break}return a||(1==e.length?s={x:e[0].x,y:e[0].y}:(u(e,n={}),s=0===n.yC.length?{x:0,y:-1e3,oea:!0}:1==n.yC.length?{x:n.yC[0].rn.x,y:n.yC[0].rn.y}:i.length?P(e,[]):m((0,t.Wa)(n.yC,(function(t){return t.ei}))))),s},L=function(e,i){function n(t){t.I(4294967295)}t.Bx.call(this),this.Ga("venn"),this.sd=null,this.data(e||null,i),this.b=[],this.Fa=this.jm=null,this.i={},this.o=this.D=null,this.state=new t.ix(this),this.f=null,t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj);var s={};t.T(s,[["fill",16896,1],["hatchFill",16896,1],["stroke",16896,1],["labels",0,0],["markers",0,0]]),this.ca=new t.my(this,s,t.gm),this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ta("labelsAfterInitCallback",t.sy),this.ca.ta("markersAfterInitCallback",t.ty),s={},t.T(s,[["fill",16384,1],["hatchFill",16384,1],["stroke",16384,1],["labels",0,0],["markers",0,0]]),this.za=new t.my(this,s,t.vo),t.W(this,"hovered",this.za),this.Ea=new t.my(this,s,t.wo),t.W(this,"selected",this.Ea),this.za.ta("markersAfterInitCallback",n),this.Ea.ta("markersAfterInitCallback",n),this.ca.ta("labelsFactoryConstructor",t.ny),this.za.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsFactoryConstructor",t.oy),this.ca.ta("markersFactoryConstructor",t.qy),this.za.ta("markersFactoryConstructor",t.ry),this.Ea.ta("markersFactoryConstructor",t.ry),t.T(this.ua,[["dataSeparator",4096,1]])},G=function(e,i){if(!i||i.target!=e.eg()){var n=e.$().j("tooltip");n.Lc(!0);var s=e.Ic();i&&t.Ow(n,i.clientX,i.clientY,s)}},F=function(e){if(e.J(16384))for(var i=e.Ec(),n=0;n<e.b.length;n++){var s=e.b[n];i.select(s.SD),s=s.ji;var a=!1,o=e.Ua(),r=t.cm("fill",1,!1);if(1==s.length){var l=e.cc().nc(n);i.j("paletteFill",l);var h=s[0];e.i[h].Gta=l,e.i[h].o5=r(e,t.gm,!0)}else{for(a=[],o={},r=0;r<s.length;r++)h=s[r],l=e.i[h],a.push(l.o5),o[h]=l.o5;i.j("parentColors",a),i.j("parentColorsMap",o),a=!0,o=e.ju().Ua()}s=i.get("normal"),s=t.Zo(t.p(s)?s.hatchFill:void 0,i.get("hatchFill"),e.ve().nc(n)),i.j("hatchFillPaletteFill",s),i.j("isIntersection",a),i.j("paletteMarkerType",e.Nf().nc(n)),i.j("tooltip",o)}},I=function(e){if(e.length){for(var i,n=0;n<e.length;n++){var s=t.Ub(e[n]);i=i?t.Kl(i,s):s}return i||"black"}return"black"},E=function(t,e,i){if((e=e.yC).length)if(1==e.length)e=e[0].rn,t.moveTo(e.x+e.Eb+i.left,e.y+i.top).arcTo(e.Eb,e.Eb,0,360);else if(1<e.length){t.moveTo(e[0].el.x+i.left,e[0].el.y+i.top);for(var n=0;n<e.length;++n){var s=e[n];t.Ff(s.ei.x+i.left,s.ei.y+i.top,s.rn.Eb,s.rn.Eb,s.width>s.rn.Eb,!0)}t.close()}},A=function(e,i,n){var s=n.j("marker");if(s&&!n.j("isMissing")){var a=!!n.j("isIntersection"),o=a?e.ju():e,r=e.Qa().Db(),l=!!((i=t.em(i))&t.vo);i=!!(i&t.wo);var h=n.get("normal");h=t.p(h)?h.marker:void 0;var c=n.get("hovered");c=t.p(c)?c.marker:void 0;var u=n.get("selected");u=t.p(u)?u.marker:void 0;var d=t.Zo(h,n.get("marker"),{});c=t.Zo(c,n.get("hoverMarker")),h=t.Zo(u,n.get("selectMarker")),i?t.Sc(d,h||{}):l&&t.Sc(d,c||{}),u=d,c=i?h:l?c:d,o=i?o.selected().Db():l?o.lb().Db():o.Qa().Db(),h=i?e.selected().Db():l?e.lb().Db():e.Qa().Db(),d=c&&t.p(c.enabled)?c.enabled:null;var p=o.enabled();(null===d?null===p?r.enabled():p:d)?(r=e.Qa().Db().F(),l=i?e.selected().Db().F():l?e.lb().Db().F():{},e=a?e.ju().Qa().Db().F():{},i=a?o.F():{},t.Sc(r,l,e,i,u),d=r,t.p(d.type)||(d.type=o.Ma()||h.Ma()||n.j("paletteMarkerType")),t.p(d.fill)||(e=n.j("paletteFill"),a&&(n=n.j("parentColors"),(e=I(n)).opacity=1),d.fill=o.Tm()||h.Tm()||e),s.Hi(),s.enabled(!0),t.gy(s,o),s.td(d,c)):(t.gy(s,o),s.enabled(!1)),s.W()}},U=function(t,e){return new L(t,e)};t.H(e,t.V),t.Gq(e,["fill","stroke","hatchFill","labels","markers"],"normal"),t.g=e.prototype,t.g.ra=274496|t.V.prototype.ra,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.de=function(){this.va(4096)},t.g.xI=function(){this.Qa().labels().I(4294967295),this.lb().labels().I(4294967295),this.selected().labels().I(4294967295)},t.g.Mn=function(){this.va(262144)},t.g.Ua=function(e){if(!this.gb){this.gb=new t.ww(0);var i=this.pa.Ua();t.W(this,"tooltip",this.gb),this.gb.parent(i),this.gb.ya(this.pa)}return t.p(e)?(this.gb.N(e),this):this.gb},t.g.Kg=function(){t.W(this,"normal",this.ca),t.W(this,"hovered",this.za),t.W(this,"selected",this.Ea)},t.g.F=function(){var t=e.u.F.call(this);return t.normal=this.ca.F(),t.hovered=this.za.F(),t.selected=this.Ea.F(),t.tooltip=this.Ua().F(),t},t.g.U=function(t,i){e.u.U.call(this,t,i),this.ca.ga(!!i,t),this.ca.ga(!!i,t.normal),this.za.ga(!!i,t.hovered),this.Ea.ga(!!i,t.selected),this.Ua().ga(!!i,t.tooltip)},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.gb),e.u.R.call(this),this.gb=this.Ea=this.za=this.ca=null};var _=e.prototype;_.normal=_.Qa,_.hovered=_.lb,_.selected=_.selected,_.tooltip=_.Ua,t.H(L,t.Bx),t.Gq(L,["fill","stroke","hatchFill","labels","markers"],"normal"),t.g=L.prototype,t.g.ra=t.Bx.prototype.ra,t.g.sa=61440|t.Bx.prototype.sa,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.Ma=function(){return"venn"},t.g.Ue=function(){return[this]},t.g.Ak=function(){return!1},t.g.kt=function(){return!0},t.g.ml=function(t){var e=this.$();this.jm.Mo(t,e.j("shapes"))};var j={};t.rq(j,0,"dataSeparator",t.zq),t.U(L,j),t.g=L.prototype,t.g.eh=function(){return!0},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.sc=function(e,i,n,s,a,o,r){return o=this.$().j("isIntersection")?this.ju():this,a=0==i?this.ca:1==i?this.za:this.Ea,o=0==i?o.Qa():1==i?o.lb():o.selected(),r?a.g(e):(r=n.get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),o.nd(e),a.nd(e),o.vf(e),a.vf(e)),t.p(e)&&(e=s(e)),e)},t.g.Eh=function(){return this.$().j("hatchFillPaletteFill")||t.Yb("diagonal-brick")},t.g.Yi=function(){var t=this.$(),e=this.Eh();return{index:t.ma(),sourceHatchFill:e,iterator:t}},t.g.Ge=function(t){var e=this.$();return t=t||e.j("paletteFill")||this.g("color")||"blue",t={index:e.ma(),sourceColor:t,iterator:e},e.j("isIntersection")&&(t.parentColors=e.j("parentColors"),t.parentColorsMap=e.j("parentColorsMap")),t},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.Pf,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)},t.g.de=function(e){t.X(e,1)&&this.B(8192,1)},t.g.Mn=function(e){t.X(e,1)&&this.B(33280,65)},t.g.Ol=function(e,i){var n=[];if(this.yj())return n;this.pb(),F(this);for(var s,a=this.$().reset();a.advance();)if(!a.j("isMissing")){s=a.ma();var o=a.get("legendItem")||{},r=null;t.D(i)&&((r=this.Ic()).b=this.ce(s),r=i.call(r,r)),t.z(r)||(r=String(t.p(a.get("name"))?a.get("name"):a.get("x")));var l=t.cm("fill",1,!1),h=t.cm("stroke",2,!1),c=t.cm("hatchFill",3,!1);if(a.j("isIntersection")){var u=a.j("parentColors");u=I(u)}r={enabled:!0,meta:{pointIndex:s,pointValue:a.get("value"),series:this},iconType:this.Qa().Db().enabled()?a.j("paletteMarkerType"):"square",text:r,iconStroke:a.get("stroke")||h(this,t.gm,!0),iconFill:a.get("fill")||u||l(this,t.gm,!0),iconHatchFill:a.get("hatchFill")||c(this,t.gm,!0)},t.Sc(r,o),r.sourceUid=t.oa(this),r.sourceKey=s,n.push(r)}return n},t.g.Ms=function(){return!0},t.g.zr=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.wq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.vq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():t.J(e,t.Mr)?this.la=this.Yc=e.Yd():this.la=(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(4356,1)),this}return this.la},t.g.dd=function(){this.B(4352,1)},t.g.Ec=function(){return this.sd=this.la.$()},t.g.iea=function(t,e){return t.ji.length-e.ji.length},t.g.ju=function(i){return this.f||(this.f=new e(this),this.f.Kg(),t.K(this.f,this.Zga,this)),t.p(i)?(this.f.N(i),this):this.f},t.g.Zga=function(e){var i=0;t.X(e,4096)&&(i|=8192),t.X(e,262144)&&(i|=32768),t.X(e,8192)&&(i|=16384),t.X(e,64)&&(i|=512),this.B(i,1)},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget);return e.pointIndex=t.N(i.index),e},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.ce=function(e){return new t.EA(this,e)},t.g.$i=function(e,i){if(!this.enabled())return this;if(t.A(e)){for(var n=t.sx(this.state,t.vo),s=0;s<n.length;s++)t.Aa(e,n[s])||this.state.Vh(t.vo,n[s]);t.qx(this.state,e),t.p(i)&&G(this,i)}else t.ea(e)&&(this.Md(),t.qx(this.state,e),t.p(i)&&G(this,i));return this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo)},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(e){var i,n;(i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()&&(n=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.vo,n))},t.g.pk=function(t,e){var i=this.$();return this.jm.Mo(t,i.j("shapes")),this.ke(t,i),A(this,t,i),e},t.g.wm=t.ia,t.g.pq=t.ia,t.g.Xl=function(t){return this.gd().hoverMode(t)},t.g.ej=function(t){return this.gd().selectionMode(t)},t.g.Ii=function(e,i){var n=!(i&&i.shiftKey);return t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,n?t.vo:void 0)):t.ea(e)&&this.state.Lh(t.wo,e,n?t.vo:void 0),G(this,i),this},t.g.Gu=function(){this.enabled()&&this.state.Lh(t.wo)},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.ie=function(e){var i;this.enabled()&&(i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i))},t.g.rr=function(e){return t.nx(this.state,e)},t.g.Ic=function(e){var i=this.$();this.oe&&!e||(this.oe=new t.Fw),this.oe.lg(i).Li([this.ce(i.ma()),this]);var n=i.ma();e=0;for(var s=t.sx(this.state,t.wo),a=0;a<s.length;a++)i.select(s[a]),e+=i.get("value");return i.select(n),n=i.get("x"),s=t.p(i.get("name"))?i.get("name"):n,i={x:{value:n,type:"string"},value:{value:i.get("value"),type:"number"},index:{value:i.ma(),type:"number"},chart:{value:this,type:""},name:{value:s,type:"string"},isIntersection:{value:!!i.j("isIntersection"),type:"string"},selectedPointsSum:{value:e,type:"number"}},t.ov(this.oe,i)},t.g.QJ=function(t){this.$().j("tooltip").WP(t.clientX,t.clientY)},t.g.pb=function(){if(this.J(4096)&&!this.yj()){this.B(16384);for(var e,i,n=this.Ec(),s={},a=[];n.advance();)if(e=n.get("x"),i=n.ma(),t.A(e))1==e.length&&(s[String(e[0])]=e),a[i]=e;else{e=String(e);var o=this.g("dataSeparator");1==(o=e.split(o)).length&&(s[e]=e),a[i]=o}for(i=0;i<a.length;i++)if((e=a[i])&&1<e.length)for(o=0;o<e.length;o++)if(!(e[o]in s)){n.select(i),n.j("isMissing",!0);break}for(this.b.length=0,this.i={},this.o=null,n=this.Ec(),s=this.g("dataSeparator");n.advance();)n.j("isMissing")||(a=n.get("x"),i={size:i=Number(n.get("value")),SD:e=n.ma()},t.A(a)?(i.ji=a,1==a.length&&(this.i[a.join(s)]=i)):(e=(a=String(a)).split(s),i.ji=e,1==e.length&&(this.i[a]=i)),this.b.push(i));t.Ra(this.b,this.iea),F(this),n=function(t){var e=e||{};e.zI=e.zI||500;var i=e.vta||w,n=i(t=S(t));i=[];var s=[];for(a in n)n.hasOwnProperty(a)&&(i.push(n[a].x),i.push(n[a].y),s.push(a));for(e=c((function(e){for(var i={},a=0;a<s.length;++a){var o=s[a];i[o]={x:e[2*a],y:e[2*a+1],Eb:n[o].Eb}}return D(i,t)}),i,e).x,i=0;i<s.length;++i){var a=s[i];n[a].x=e[2*i],n[a].y=e[2*i+1]}return n}(this.b),this.o=$(n),this.I(4096)}},t.g.Qh=function(e){var i;if(this.pb(),this.jm||(this.jm=new t.WA(this,[t.nH,t.oH,t.qH],!0),t.RA(this.jm,this.Na)),0<e.width&&0<e.height){if(this.J(4)){this.jm.uv();var n=this.o,s=e.width,a=e.height,o=[],r=[];for(var l in n)n.hasOwnProperty(l)&&(r.push(l),o.push(n[l]));n=(l=k(o)).Sq,l=l.st;var h=Math.min(a/(l.max-l.min),s/(n.max-n.min));s=(s-(n.max-n.min)*h)/2;var c=(a-(l.max-l.min)*h)/2;a={};for(var d=0;d<o.length;++d){var p=o[d];a[r[d]]={Eb:h*p.Eb,x:s+(p.x-n.min)*h,y:c+(p.y-l.min)*h}}for(var g in o=this.b,r=[],n={},l=[],a)l.push(g),n[g]=[];for(g=0;g<l.length;g++)for(h=a[l[g]],s=g+1;s<l.length;++s)c=a[l[s]],(d=f(h,c))+c.Eb<=h.Eb+1e-10?n[l[s]].push(l[g]):d+h.Eb<=c.Eb+1e-10&&n[l[g]].push(l[s]);for(g=0;g<o.length;++g){for(l=o[g].ji,s={},c={},h=o[g].SD,d=0;d<l.length;++d){s[l[d]]=!0,p=n[l[d]];for(var b=0;b<p.length;++b)c[p[b]]=!0}for(i in d=[],p=[],a)i in s?d.push(a[i]):i in c||p.push(a[i]);s=P(d,p),r[h]=s,s.oea&&0<o[g].size&&t.kl(22,null,[String(l)])}for(this.D=r,i=0;i<this.b.length;i++){if(o=(n=this.b[i]).SD,(r=this.$()).select(o),r=[],1==(n=n.ji).length)g=n[0],r.push(a[g]);else for(l=0;l<n.length;l++)g=n[l],r.push(a[g]);u(r,n={}),r=(o=this.jm.ed(this.rr(o))).hatchFill,g=o.stroke,E(o.fill,n,e),E(r,n,e),E(g,n,e)}this.B(40960),this.I(16384)}if(this.J(8192)){for((a=this.Qa().labels()).clear(),a.O(this.Na),i=0;i<this.b.length;i++)o=(n=this.b[i]).SD,(r=this.$()).select(o),n=this.D[o],g=this.Ic(!0),n={value:{x:e.left+n.x,y:e.top+n.y}},n=a.add(g,n,o),r.j("label",n),this.ke(t.nx(this.state,o),r);a.W(),this.ju().xI(),this.I(8192)}if(this.J(32768)){for((a=this.Qa().Db()).ka(),a.O(this.Na),a.clear(),i=0;i<this.b.length;i++)o=(n=this.b[i]).SD,(r=this.$()).select(o),n=this.D[o],n={value:{x:e.left+n.x+.5,y:e.top+n.y+.5}},n=a.add(n,o),r.j("marker",n),A(this,t.nx(this.state,o),r);a.da(!1),a.W(),(e=this.ju()).Qa().Db().I(4294967295),e.lb().Db().I(4294967295),e.selected().Db().I(4294967295),this.I(32768)}if(this.J(16384)){for(F(this),r=this.Ec();r.advance();)this.jm.Mo(this.rr(r.ma()),r.j("shapes"));this.I(16384)}}},t.g.ke=function(e,i){var n=i.j("label");if(n&&!i.j("isMissing")){var s=i.j("isIntersection")?this.ju():this,a=!!((e=t.em(e))&t.vo),o=!!(e&t.wo),r=i.get("normal");r=t.p(r)?r.label:void 0;var l=i.get("hovered");l=t.p(l)?l.label:void 0;var h=i.get("selected");h=t.p(h)?h.label:void 0,r=t.Zo(r,i.get("label"),null),l=t.Zo(l,i.get("hoverLabel"),null),h=t.Zo(h,i.get("selectLabel"),null),h=o?h:a?l:null,l=o?s.selected().labels():a?s.lb().labels():null;var c=s.Qa().labels(),u=o?this.selected().labels():a?this.lb().labels():null,d=this.Qa().labels(),p=o?s.selected().labels().oa:a?s.lb().labels().oa:null;s=s.Qa().labels().oa,a=o?this.selected().labels().oa:a?this.lb().labels().oa:null,o=this.Qa().labels().oa;var g=h&&t.p(h.enabled)?h.enabled:null,f=r&&t.p(r.enabled)?r.enabled:null,b=l&&null!==l.enabled()?l.enabled():null,v=c&&null!==c.enabled()?c.enabled():null,m=u?u.enabled():null,y=d.enabled();(null===g?null===f?null===b?null===v?null===m?y:m:v:b:f:g)?(n.Hi(),n.enabled(!0),n.state("labelOwnSettings",n.Pa,0),n.state("pointState",h,1),n.state("pointNormal",r,2),n.state("intersectionsState",l,3),n.state("intersectionsNormal",c,4),n.state("chartState",u,5),n.state("chartNormal",d,6),n.state("intersectionsStateTheme",p,7),n.state("chartStateTheme",a,8),n.state("auto",n.Nd,9),n.state("intersectionsNormalTheme",s||null,10),n.state("chartNormalTheme",o||null,11)):n.enabled(!1),n.W()}},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.yj=function(){return!this.$().Hb()},t.g.F=function(){var e=L.u.F.call(this);return t.Tq(this,j,e,"Venn"),e.data=this.data().F(),e.normal=this.Qa().F(),e.hovered=this.lb().F(),e.selected=this.selected().F(),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),e.markerPalette=this.Nf().F(),e.intersections=this.ju().F(),{chart:e}},t.g.U=function(e,i){L.u.U.call(this,e,i),t.Iq(this,j,e,i),this.data(e.data),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.cc().ga(!!i,e.palette),this.Nf().ga(!!i,e.markerPalette),this.ve().ga(!!i,e.hatchFillPalette),this.ju().ga(!!i,e.intersections)},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.Fa,this.fd,this.He,this.jm,this.f,this.Yc,this.la),this.Yc=this.f=this.jm=this.He=this.fd=this.Fa=this.Ea=this.za=this.ca=null,delete this.la,this.sd=null,L.u.R.call(this)};var M=L.prototype;M.data=M.data,M.getType=M.Ma,M.intersections=M.ju,M.normal=M.Qa,M.hovered=M.lb,M.selected=M.selected,M.palette=M.cc,M.hatchFillPalette=M.ve,M.markerPalette=M.Nf,M.hover=M.Tj,M.unhover=M.Md,M.select=M.select,M.unselect=M.ie,t.Tp.venn=U,t.E("anychart.venn",U)}.call(this,$)),_.table||(_.table=1,function(t){var e=function(t,e){this.Y=t,this.Wf=e?D:C},i=function(t){this.Y=t},n=function(e){t.od.call(this),this.i=e,this.aa=this.P=null},s=function(t,e,i){n.call(this,t),this.reset(e,i)},a=function(t,e){n.call(this,t),this.Ad=e,this.b=null},o=function(t,e){n.call(this,t),this.Ad=e,this.b=null},r=function(e,i){t.Y.call(this),this.b=[],this.f=t.P(i,4),this.i=t.P(e,5),this.o=0,this.P=[],this.K=[],this.G=[],this.ba=[],this.aa=[],this.D={fill:"none",cellBorder:"black",topPadding:0,rightPadding:0,bottomPadding:0,leftPadding:0,hAlign:"start",vAlign:"top",enabled:!0,wordWrap:"break-word",wordBreak:"normal"},this.D.fill="#fff"},l=function(t){if(t.J(2048)){var e,i,n=[],s=t.o?t.b.length/t.o:0,a=Math.min(s,t.i),o=Math.min(t.o,t.f);for(e=0;e<a;e++){for(i=0;i<o;i++)n.push(t.b[e*t.o+i]);for(i=o;i<t.f;i++)n.push(S(t,e,i));for(i=o;i<t.o;i++){var r=t,l=t.b[e*t.o+i];l.content(null),r.P.push(l)}}for(e=a;e<t.i;e++)for(i=0;i<t.f;i++)n.push(S(t,e,i));for(e=a;e<s;e++)for(i=0;i<t.o;i++)a=t,(o=t.b[e*t.o+i]).content(null),a.P.push(o);t.b=n,t.o=window.NaN,t.I(2048),t.B(1984)}},h=function(t){if(t.J(64)){var e=t.ob(),i=y(t.f,t.G,t.hs,t.gs,t.GL,t.FL,t.EL,e.width,t.aa);e=y(t.i,t.K,t.dt,t.ct,t.MK,t.LL,t.KL,e.height,t.ba),t.I(64),(i||e)&&(t.aa=i||t.aa,t.ba=e||t.ba,t.B(1792))}},c=function(e,i,n,s,a,o,r){if(o&&"none"!=o){var l=(o.thickness?o.thickness:1)%2?.5:0;switch(i=m(e,i,n,s,a),(n=t.Tl(o))in e.rv?e=e.rv[n]:(s=e.Qn.length?e.Qn.pop():t.qk(),e.wb.hc(s),t.C(o)&&"keys"in o&&!t.C(o.mode)&&((o=t.Sl(o)).mode=e.ob()),s.stroke(o),s.fill(null),e=e.rv[n]=s),r){case 0:e.moveTo(i.tb(),i.Vb()+l),e.lineTo(i.cb()+1,i.Vb()+l);break;case 1:e.moveTo(i.cb()+l,i.Vb()),e.lineTo(i.cb()+l,i.Va()+1);break;case 2:e.moveTo(i.tb(),i.Va()+l),e.lineTo(i.cb()+1,i.Va()+l);break;case 3:e.moveTo(i.tb()+l,i.Vb()),e.lineTo(i.tb()+l,i.Va()+1)}}},u=function(t,e,i){if(e||i){var n;if((n=e&&e.nb("bottomBorder"))||(n=i&&i.nb("topBorder"))||(n=e&&e.nb("border"))||(n=i&&i.nb("border")))return n;if(t.Un){var s=t.Un[(e||window.NaN)&&e.f],a=t.Un[(i||window.NaN)&&i.f];if((n=s&&s.nb("bottomBorder"))||(n=a&&a.nb("topBorder"))||(n=s&&s.nb("border"))||(n=a&&a.nb("border"))||(n=s&&s.nb("cellBottomBorder"))||(n=a&&a.nb("cellTopBorder"))||(n=s&&s.nb("cellBorder"))||(n=a&&a.nb("cellBorder")))return n}return(s=t.sn&&t.sn[(e||i).D])&&((n=!e&&(s.nb("topBorder")||s.nb("border"))||!i&&(s.nb("bottomBorder")||s.nb("border")))||(n=s.nb("cellBottomBorder"))||(n=s.nb("cellTopBorder"))||(n=s.nb("cellBorder"))||(n=s.nb("cellBorder")))||(n=!e&&(t.nb("topBorder")||t.nb("border"))||!i&&(t.nb("bottomBorder")||t.nb("border")))||(n=e&&t.nb("cellBottomBorder"))||(n=i&&t.nb("cellTopBorder"))?n:t.nb("cellBorder")||"none"}return"none"},d=function(t,e,i){if(e||i){var n;if((n=e&&e.nb("rightBorder"))||(n=i&&i.nb("leftBorder"))||(n=e&&e.nb("border"))||(n=i&&i.nb("border")))return n;var s=t.Un&&t.Un[(e||i).f];if(s&&((n=!e&&(s.nb("leftBorder")||s.nb("border"))||!i&&(s.nb("rightBorder")||s.nb("border")))||(n=s.nb("cellRightBorder"))||(n=s.nb("cellLeftBorder"))||(n=s.nb("cellBorder"))||(n=s.nb("cellBorder"))))return n;if(t.sn){s=t.sn[(e||window.NaN)&&e.D];var a=t.sn[(i||window.NaN)&&i.D];if((n=s&&s.nb("rightBorder"))||(n=a&&a.nb("leftBorder"))||(n=s&&s.nb("border"))||(n=a&&a.nb("border"))||(n=s&&s.nb("cellRightBorder"))||(n=a&&a.nb("cellLeftBorder"))||(n=s&&s.nb("cellBorder"))||(n=a&&a.nb("cellBorder")))return n}return(n=!e&&(t.nb("leftBorder")||t.nb("border"))||!i&&(t.nb("rightBorder")||t.nb("border")))||(n=e&&t.nb("cellRightBorder"))||(n=i&&t.nb("cellLeftBorder"))?n:t.nb("cellBorder")||"none"}return"none"},p=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.dt&&i in e.dt&&(delete e.dt[i],s=!0):(e.dt||(e.dt=[]),e.dt[i]!=n&&(e.dt[i]=n,s=!0)),s&&e.B(64,1),e}return e.dt&&i in e.dt?e.dt[i]:null},g=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.ct&&i in e.ct&&(delete e.ct[i],s=!0):(e.ct||(e.ct=[]),e.ct[i]!=n&&(e.ct[i]=n,s=!0)),s&&e.B(64,1),e}return e.ct&&i in e.ct?e.ct[i]:null},f=function(e,i,n){return t.p(n)?(e.G[i]!=n&&(null===n?delete e.G[i]:e.G[i]=n,e.B(64,1)),e):i in e.G?e.G[i]:null},b=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.hs&&i in e.hs&&(delete e.hs[i],s=!0):(e.hs||(e.hs=[]),e.hs[i]!=n&&(e.hs[i]=n,s=!0)),s&&e.B(64,1),e}return e.hs&&i in e.hs?e.hs[i]:null},v=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.gs&&i in e.gs&&(delete e.gs[i],s=!0):(e.gs||(e.gs=[]),e.gs[i]!=n&&(e.gs[i]=n,s=!0)),s&&e.B(64,1),e}return e.gs&&i in e.gs?e.gs[i]:null},m=function(e,i,n,s,a,o){l(e),h(e);var r=e.ob();o=t.J(o,t.I)?o:new t.I(0,0,0,0);var c=e.aa[n-1]+1||0;return n=e.aa[Math.min(n+a,e.f)-1],o.width=n-c,o.left=r.left+c,c=e.ba[i-1]+1||0,n=e.ba[Math.min(i+s,e.i)-1],o.height=n-c,o.top=r.top+c,o},y=function(e,i,n,s,a,o,r,l,h){var c,u=!1,d=0,p=[],g=[],f=[],b=0;a=t.L(a,l),o=t.L(o,l),r=t.L(r,l);var v=!1;for(c=0;c<e;c++){var m=n?t.L(n[c],l):window.NaN,y=s?t.L(s[c],l):window.NaN,S=i[c],w=m,x=y;S=t.L(S,l),w=t.L(w,l),x=t.L(x,l),(0,window.isNaN)(S)&&(S=a),(0,window.isNaN)(w)&&(w=o),(0,window.isNaN)(x)&&(x=r),(0,window.isNaN)(w)||(S=Math.max(S,w)),(0,window.isNaN)(x)||(S=Math.min(S,x)),(0,window.isNaN)(S)?(b++,(0,window.isNaN)(m)?(0,window.isNaN)(o)||(g[c]=o,v=!0):(g[c]=m,v=!0),(0,window.isNaN)(y)?(0,window.isNaN)(r)||(f[c]=r,v=!0):(f[c]=y,v=!0)):(d+=S,p[c]=S)}if(v&&0<b){var C=[];n=b*b;do{for(s=!1,i=Math.max(3*b,l-d)/b,c=0;c<e;c++)if(!(c in p))if(c in C){if(C[c]==g[c]&&g[c]<i){d-=g[c],b++,delete C[c],s=!0;break}if(C[c]==f[c]&&f[c]>i){d-=f[c],b++,delete C[c],s=!0;break}}else{if(c in g&&g[c]>i){d+=C[c]=g[c],b--,s=!0;break}if(c in f&&f[c]<i){d+=C[c]=f[c],b--,s=!0;break}}}while(s&&0<b&&n--)}for(g=0,f=[],i=Math.max(3*b,l-d)/b,c=0;c<e;c++)g+=S=c in p?p[c]:C&&c in C?C[c]:i,l=Math.round(g)-1,f[c]=l,l!=h[c]&&(u=!0);return u?f:null},S=function(t,e,i){return t.P.length?t.P.pop().reset(e,i):new s(t,e,i)},w=function(t,e,i,n,s,a){return i.o&&i.o[e]||n&&n.o&&n.o[e]||s&&s.o&&s.o[e]||t.D&&t.D[e]||a},x=function(t,e){r.call(this,t,e)};t.ux.prototype.ou=t.ca(15,(function(){return!0})),t.eB.prototype.ou=t.ca(14,(function(){return!1}));var C=["topBorder","rightBorder","bottomBorder","leftBorder"],D=["cellTopBorder","cellRightBorder","cellBottomBorder","cellLeftBorder"];e.prototype.top=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[0],e,256)},e.prototype.right=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[1],e,256)},e.prototype.bottom=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[2],e,256)},e.prototype.left=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[3],e,256)};var T=e.prototype;T.top=T.top,T.right=T.right,T.bottom=T.bottom,T.left=T.left;var k=["topPadding","rightPadding","bottomPadding","leftPadding"];i.prototype.top=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[0],e,1024)},i.prototype.right=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[1],e,1024)},i.prototype.bottom=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[2],e,1024)},i.prototype.left=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[3],e,1024)};var $=i.prototype;$.top=$.top,$.right=$.right,$.bottom=$.bottom,$.left=$.left,t.H(n,t.od),t.g=n.prototype,t.g.nb=function(e,i,n){if(t.p(e)){if(t.p(i)){var s=!1;return null===i?this.o&&this.o[e]&&(delete this.o[e],s=!0):(this.o||(this.o={}),this.o[e]!=i&&(this.o[e]=i,s=!0)),s&&this.i.B(+n||1024,1),this}return this.o&&this.o[e]}return this.o||{}},t.g.fontSize=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontSize",e)},t.g.fontFamily=function(e){return t.p(e)&&(e=String(e)),this.nb("fontFamily",e)},t.g.Ica=function(e){return t.p(e)&&(e=String(e)),this.nb("fontColor",e)},t.g.Kca=function(e){return t.p(e)&&(e=t.Za(+e,0,1)),this.nb("fontOpacity",e)},t.g.Jca=function(e){return t.p(e)&&(e=t.bl(e)),this.nb("fontDecoration",e)},t.g.fontStyle=function(e){return t.p(e)&&(e=t.cl(e)),this.nb("fontStyle",e)},t.g.fontVariant=function(e){return t.p(e)&&(e=t.dl(e)),this.nb("fontVariant",e)},t.g.fontWeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontWeight",e)},t.g.letterSpacing=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("letterSpacing",e)},t.g.Lca=function(e){return t.p(e)&&(e=t.el(e)),this.nb("textDirection",e)},t.g.textShadow=function(e){return t.p(e)&&(e=t.Zb(e)),this.nb("textShadow",e)},t.g.lineHeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("lineHeight",e)},t.g.textIndent=function(e){return t.p(e)&&(e=(0,window.parseFloat)(t.Bo(e))),this.nb("textIndent",e)},t.g.vAlign=function(e){return t.p(e)&&(e=t.al(e)),this.nb("vAlign",e)},t.g.Bm=function(e){return t.p(e)&&(e=t.$k(e)),this.nb("hAlign",e)},t.g.wordWrap=function(t){return this.nb("wordWrap",t)},t.g.Xu=function(t){return this.nb("wordBreak",t)},t.g.textOverflow=function(e){return t.p(e)&&(e=String(e)),this.nb("textOverflow",e)},t.g.Hm=function(e){return t.p(e)&&(e=!!e),this.nb("selectable",e)},t.g.Dd=function(e){return t.p(e)&&(e=!!e),this.nb("disablePointerEvents",e)},t.g.Mca=function(e){return t.p(e)&&(e=!!e),this.nb("useHtml",e)},t.g.Hca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.i.ka(),this.nb("border",i,256);for(var r=0;4>r;r++)this.nb(C[r],null,256);return this.i.da(!0),this}return this.P||(this.P=new e(this,!1))},t.g.SW=function(e,n,s,a){if(t.p(e)){var o,r,l;if(t.A(e)){var h=e;e=h[0],n=h[1],s=h[2],a=h[3],h=h.length}else h=arguments.length;if(h)t.C(e)?(o=t.Bo(e.top)||0,r=t.Bo(e.right)||0,l=t.Bo(e.bottom)||0,c=t.Bo(e.left)||0):1==h?c=l=r=o=t.Bo(e)||0:2==h?(l=o=t.Bo(e)||0,c=r=t.Bo(n)||0):3==h?(o=t.Bo(e)||0,c=r=t.Bo(n)||0,l=t.Bo(s)||0):4<=h&&(o=t.Bo(e)||0,r=t.Bo(n)||0,l=t.Bo(s)||0,c=t.Bo(a)||0);else var c=l=r=o=0;return this.i.ka(),this.nb(k[0],o,1024),this.nb(k[1],r,1024),this.nb(k[2],l,1024),this.nb(k[3],c,1024),this.i.da(!0),this}return this.aa||(this.aa=new i(this))};var O=n.prototype;O.fontSize=O.fontSize,O.fontFamily=O.fontFamily,O.fontColor=O.Ica,O.fontOpacity=O.Kca,O.fontDecoration=O.Jca,O.fontStyle=O.fontStyle,O.fontVariant=O.fontVariant,O.fontWeight=O.fontWeight,O.letterSpacing=O.letterSpacing,O.textDirection=O.Lca,O.lineHeight=O.lineHeight,O.textIndent=O.textIndent,O.vAlign=O.vAlign,O.hAlign=O.Bm,O.wordWrap=O.wordWrap,O.wordBreak=O.Xu,O.textOverflow=O.textOverflow,O.selectable=O.Hm,O.disablePointerEvents=O.Dd,O.useHtml=O.Mca,O.border=O.Hca,t.H(s,n),t.g=s.prototype,t.g.reset=function(e,i){return(t.ea(this.Qd)||t.z(this.Qd))&&t.qd(this.gi),this.G=this.K=1,this.f=e,this.D=i,this.gi=this.Qd=null,this.b=window.NaN,delete this.o,this},t.g.content=function(e){if(t.p(e)){if(this.Qd!=e){if(this.Qd=e,this.gi&&this.i.eG(this.gi),t.ea(e)||t.z(e)){var i=this.i;i.rh||(i.rh=new t.Pu,i.rh.N(t.nm("standalones.labelsFactory")),i.rh.anchor("center"),i.rh.position("center")),this.gi=i.rh.add({value:String(e)},{value:{x:0,y:0}})}else t.J(e,t.ig)?(this.gi=t.ok(),this.gi.hc(e)):this.gi=e;this.i.B(1024,1)}return this}return this.Qd},t.g.Fx=function(e){return t.p(e)?((e=t.P(e,this.G))!=this.G&&(this.G=e,this.i.B(128,1)),this):this.G},t.g.Gx=function(e){return t.p(e)?((e=t.P(e,this.K))!=this.K&&(this.K=e,this.i.B(128,1)),this):this.K},t.g.Pca=function(){return this.f},t.g.Oca=function(){return this.D},t.g.En=function(){return this.i.En(this.f)},t.g.Nca=function(){return this.i.E_(this.D)},t.g.rb=function(){return m(this.i,this.f,this.D,this.K,this.G)},t.g.fill=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.padding=function(t,e,i,n){return this.SW.apply(this,arguments)},t.g.R=function(){(t.ea(this.Qd)||t.z(this.Qd))&&t.qd(this.gi),s.u.R.call(this)};var P=s.prototype;P.content=P.content,P.rowSpan=P.Gx,P.colSpan=P.Fx,P.padding=P.padding,P.getBounds=P.rb,P.getRowNum=P.Pca,P.getColNum=P.Oca,P.getRow=P.En,P.getCol=P.Nca,P.fill=P.fill,t.H(a,n),t.g=a.prototype,t.g.Tca=function(){return this.Ad},t.g.Sca=function(t){return this.i.Kz(t,this.Ad)},t.g.width=function(e){return t.p(e)?(f(this.i,this.Ad,e),this):f(this.i,this.Ad)},t.g.minWidth=function(e){return t.p(e)?(b(this.i,this.Ad,e),this):b(this.i,this.Ad)},t.g.maxWidth=function(e){return t.p(e)?(v(this.i,this.Ad,e),this):v(this.i,this.Ad)},t.g.G_=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.Qca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.i.ka(),this.nb("cellBorder",i,256);for(var r=0;4>r;r++)this.nb(D[r],null,256);return this.i.da(!0),this}return this.b||(this.b=new e(this,!0))},t.g.Rca=function(t,e,i,n){return this.SW.apply(this,arguments)};var L=a.prototype;L.width=L.width,L.maxWidth=L.maxWidth,L.minWidth=L.minWidth,L.getCell=L.Sca,L.getColNum=L.Tca,L.cellFill=L.G_,L.cellBorder=L.Qca,L.cellPadding=L.Rca,t.H(o,n),t.g=o.prototype,t.g.Xca=function(){return this.Ad},t.g.Wca=function(t){return this.i.Kz(this.Ad,t)},t.g.height=function(e){return t.p(e)?(this.i.y5(this.Ad,e),this):this.i.y5(this.Ad)},t.g.minHeight=function(e){return t.p(e)?(p(this.i,this.Ad,e),this):p(this.i,this.Ad)},t.g.maxHeight=function(e){return t.p(e)?(g(this.i,this.Ad,e),this):g(this.i,this.Ad)},t.g.H_=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.Uca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.i.ka(),this.nb("cellBorder",i,256);for(var r=0;4>r;r++)this.nb(D[r],null,256);return this.i.da(!0),this}return this.b||(this.b=new e(this,!0))},t.g.Vca=function(t,e,i,n){return this.SW.apply(this,arguments)};var G=o.prototype;G.height=G.height,G.maxHeight=G.maxHeight,G.minHeight=G.minHeight,G.getCell=G.Wca,G.getRowNum=G.Xca,G.cellFill=G.H_,G.cellBorder=G.Uca,G.cellPadding=G.Vca,t.H(r,t.wu),t.g=r.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=4032|t.wu.prototype.sa,t.g.rh=null,t.g.wb=null,t.g.PF=null,t.g.rv=null,t.g.Ov=null,t.g.Qn=null,t.g.QC=null,t.g.C_=null,t.g.D_=null,t.g.F_=null,t.g.Un=null,t.g.sn=null,t.g.dt=null,t.g.ct=null,t.g.hs=null,t.g.gs=null,t.g.MK=null,t.g.LL=null,t.g.KL=null,t.g.GL=null,t.g.FL=null,t.g.EL=null,t.g.wX=function(e){return t.p(e)?(e=t.P(e,this.i),this.i!=e&&((0,window.isNaN)(this.o)&&(this.o=this.f),this.i=e,this.B(2176,1)),this):this.i},t.g.qS=function(e){return t.p(e)?(e=t.P(e,this.f),this.f!=e&&((0,window.isNaN)(this.o)&&(this.o=this.f),this.f=e,this.B(2176,1)),this):this.f},t.g.Kz=function(e,i){return l(this),e=t.P(e,window.NaN,!0),i=t.P(i,window.NaN,!0),this.b[e*this.f+i]||null},t.g.En=function(e){return l(this),e=t.P(e,window.NaN,!0),(0,window.isNaN)(e)||e>=this.i?null:(this.Un||(this.Un=[]),e in this.Un||(this.Un[e]=new o(this,e)),this.Un[e])},t.g.E_=function(e){return l(this),e=t.P(e,window.NaN,!0),(0,window.isNaN)(e)||e>=this.f?null:(this.sn||(this.sn=[]),e in this.sn||(this.sn[e]=new a(this,e)),this.sn[e])},t.g.hka=function(e){return t.p(e)?(this.MK!=e&&(this.MK=e,this.B(64,1)),this):this.MK},t.g.jka=function(e){return t.p(e)?(this.LL!=e&&(this.LL=e,this.B(64,1)),this):this.LL},t.g.ika=function(e){return t.p(e)?(this.KL!=e&&(this.KL=e,this.B(64,1)),this):this.KL},t.g.Rda=function(e){return t.p(e)?(this.GL!=e&&(this.GL=e,this.B(64,1)),this):this.GL},t.g.Qda=function(e){return t.p(e)?(this.FL!=e&&(this.FL=e,this.B(64,1)),this):this.FL},t.g.Pda=function(e){return t.p(e)?(this.EL!=e&&(this.EL=e,this.B(64,1)),this):this.EL},t.g.yca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.ka(),this.nb("border",i,256);for(var r=0;4>r;r++)this.nb(C[r],null,256);return this.da(!0),this}return this.C_||(this.C_=new e(this,!1))},t.g.Yda=function(e,i){var n;if(t.p(e)){var s=!t.A(e),a=0;if(!s){var o=e.length;for(n=0;n<o;n++){var r=e[n];if(!t.A(r)){s=!0;break}r.length>a&&(a=r.length)}}if(!s&&o&&a){if(this.ka(),this.wX(o),this.qS(a),i)for(n=0;n<o;n++)for(s=0;s<a;s++){var l=this.Kz(n,s);l.Gx(1),l.Fx(1)}for(n=0;n<o;n++)for(r=e[n],s=0;s<a;s++){l=this.Kz(n,s);var h=r[s];l.content(t.p(h)?h:null)}this.da(!0)}else t.il(3);return this}for(a=[],n=0;n<this.i;n++){for(r=[],s=0;s<this.f;s++)r.push(this.Kz(n,s).content());a.push(r)}return a},t.g.W=function(){if(!this.zc())return this;this.wb||(this.wb=t.ok(),t.ru(this,this.wb),this.PF=this.wb.Bd());var e=this.wb.Ja(),i=e&&!e.yf();if(i&&e.suspend(),this.J(4)&&(this.B(64),(t.uo(this.left())||t.uo(this.top()))&&this.B(1792),this.I(4)),this.rh&&this.rh.ka(),l(this),h(this),this.J(128)){var n,s;for(n=0;n<this.b.length;n++)this.b[n].b=window.NaN;for(var a=0;a<this.i;a++)for(var o=0;o<this.f;o++){var r=a*this.f+o,p=this.b[r];if((0,window.isNaN)(p.b)&&(1<p.Fx()||1<p.Gx())){for(n=Math.min(this.i,a+p.Gx());n-- >a;)for(s=Math.min(this.f,o+p.Fx());s-- >o;)this.b[n*this.f+s].b=r;p.b=window.NaN}}this.I(128),this.B(1792)}if(this.J(512)){if(this.Qn||(this.Qn=[]),this.Ov)for(var g in this.Ov)(n=this.Ov[g]).clear(),n.parent(null),this.Qn.push(n),delete this.Ov[g];else this.Ov={};for(g=0;g<this.i;g++)for(n=0;n<this.f;n++)if(o=this.b[g*this.f+n],(0,window.isNaN)(o.b)){var f=m(this,g,n,o.Gx(),o.Fx(),f);s=g,a=n,(s=(o=o.fill())||(o=this.Un&&this.Un[s]&&this.Un[s].H_())||(o=this.sn&&this.sn[a]&&this.sn[a].G_())||(o=s%2?this.B5():this.x5())?o:this.nb("fill"))&&((a=t.Tl(s))in this.Ov?s=this.Ov[a]:(o=this.Qn.length?this.Qn.pop():t.qk(),this.wb.Eg(o,0),o.fill(s),o.stroke(null),s=this.Ov[a]=o),a=f.tb(),o=f.cb()+1,r=f.Vb(),p=f.Va()+1,s.moveTo(a,r),s.lineTo(o,r),s.lineTo(o,p),s.lineTo(a,p),s.close())}this.I(512)}if(this.J(256)){if(this.Qn||(this.Qn=[]),this.rv)for(var b in this.rv)(f=this.rv[b]).clear(),f.parent(null),this.Qn.push(f),delete this.rv[b];else this.rv={};for(f=0;f<this.f;f++)g=this.b[f],(0,window.isNaN)(g.b)&&c(this,0,f,1,g.Fx(),u(this,void 0,g),0);for(b=0;b<this.i;b++)g=this.b[b*this.f],(0,window.isNaN)(g.b)&&c(this,b,0,g.Gx(),1,d(this,void 0,g),3);for(b=0;b<this.i;b++)for(f=0;f<this.f;f++)s=b*this.f+f,g=this.b[s],(n=this.b[s+this.f])?(0,window.isNaN)(g.b)?(0,window.isNaN)(n.b)||(n.b==s?g=n=void 0:n=this.b[n.b]):(0,window.isNaN)(n.b)?g=this.b[g.b]:g.b==n.b?g=n=void 0:(g=this.b[g.b],n=this.b[n.b]):(0,window.isNaN)(g.b)||(g=this.b[g.b]),c(this,b,f,1,1,u(this,g,n),2),s=b*this.f+f,g=this.b[s],(n=f+1==this.f?void 0:this.b[s+1])?(0,window.isNaN)(g.b)?(0,window.isNaN)(n.b)||(n.b==s?g=n=void 0:n=this.b[n.b]):(0,window.isNaN)(n.b)?g=this.b[g.b]:g.b==n.b?g=n=void 0:(g=this.b[g.b],n=this.b[n.b]):(0,window.isNaN)(g.b)||(g=this.b[g.b]),c(this,b,f,1,1,d(this,g,n),1);this.I(256)}if(this.J(1024)){if(this.QC)for(;this.QC.length;){var v=this.QC.pop();t.J(v,t.ig)?v.remove():(v.ka(),t.J(v,t.Tu)?(o=v,t.Zu(o)&&t.Zu(o).clear(o.ma())):t.J(v,t.ey)?(s=v,t.fy(s)&&t.fy(s).clear(s.ma())):t.J(v,t.Y)&&(v.ou&&v.ou()&&(s=v).Oz(s.B4),v.O(null),v.remove()),t.kr(v,this.QU),v.da(!1))}for(b=this.i*this.f,f=0;f<b;f++)s=this.b[f],!(0,window.isNaN)(s.b)&&(v=s.gi)&&(t.J(v,t.Fg)?(v.Gi(),t.qd(v)):(v.ka(),t.kr(v,this.QU),t.J(v,t.Tu)||t.J(v,t.ey)?v.enabled(!1):v.ou&&v.ou()&&(s=v).Oz(s.B4),v.O(null),v.remove(),v.da(!1)));for((b=new t.Hu).ka(),f=0;f<this.i;f++)for(g=0;g<this.f;g++)if(v=(s=this.b[f*this.f+g]).gi,n=t.J(v,t.ig),v){if(a=this.Un&&this.Un[f],r=this.sn&&this.sn[g],n||v.ka(),(0,window.isNaN)(s.b)){var y=m(this,f,g,s.Gx(),s.Fx(),y);if(b.top(this.JM("topPadding",s,a,r,this)),b.right(this.JM("rightPadding",s,a,r,this)),b.bottom(this.JM("bottomPadding",s,a,r,this)),b.left(this.JM("leftPadding",s,a,r,this)),y=b.Ej(y),n){v.parent(this.PF),o=v.xd(0);var S=w(this,"hAlign",s,a,r,"start");switch(p=w(this,"vAlign",s,a,r,"top"),"start"==S?S="rtl"==w(this,"textDirection",s,a,r,"rtl")?"right":"left":"end"==S&&(S="rtl"==w(this,"textDirection",s,a,r,"rtl")?"left":"right"),S){case"right":s=y.left+y.width-o.VT();break;case"center":s=y.left+(y.width-o.VT())/2;break;default:s=y.left}switch(p){case"bottom":a=y.top+y.height-o.UT();break;case"middle":a=y.top+(y.height-o.UT())/2;break;default:a=y.top}o.setPosition(s,a),v.clip(y)}else{if(v.O(this.PF),t.J(v,t.Tu)){if((o=v).jc({value:{x:y.left,y:y.top}}),t.Zu(o)==this.rh){o.anchor("left-top"),o.width(y.width),o.height(y.height),(v=r&&r.o)&&o.N(v),(v=a&&a.o)&&o.N(v),(v=s.o)&&o.N(v),o.da(!1);continue}a=o.g("position")||t.$u(o)&&t.$u(o).g("position")||t.Zu(o)&&t.Zu(o).g("position"),a={value:t.Eo(y,a)},o.jc(a),o.W()}else t.J(v,t.ey)?(a=(s=v).g("position")||t.gy(s)&&t.gy(s).g("position")||t.fy(s)&&t.fy(s).g("position"),a={value:t.Eo(y,a)},s.jc(a),s.W()):t.J(v,t.Y)&&(v.ou&&v.ou()&&((s=v).B4=s.Oz(),s.Oz(!1)),(s=v).ja(y),s.W&&s.W());t.K(v,this.QU)}}n||v.da(!1)}b.da(!1),this.rh&&(this.rh.ka(),this.rh.N(this.D),this.rh.O(this.PF),this.rh.ja(this.ob()),this.rh.W(),this.rh.da(!1)),this.I(1024)}return this.rh&&this.rh.da(!1),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.wb.parent(this.O()),this.I(2)),this.rk||this.contextMenu({tta:!0,enabled:!0}),i&&e.resume(),this},t.g.oh=function(t){return"contextmenu"==t.type&&this.dispatchEvent(t)},t.g.remove=function(){this.wb&&this.wb.parent(null)},t.g.fontSize=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontSize",e)},t.g.fontFamily=function(e){return t.p(e)&&(e=String(e)),this.nb("fontFamily",e)},t.g.Cca=function(e){return t.p(e)&&(e=String(e)),this.nb("fontColor",e)},t.g.Eca=function(e){return t.p(e)&&(e=t.Za(+e,0,1)),this.nb("fontOpacity",e)},t.g.Dca=function(e){return t.p(e)&&(e=t.bl(e)),this.nb("fontDecoration",e)},t.g.fontStyle=function(e){return t.p(e)&&(e=t.cl(e)),this.nb("fontStyle",e)},t.g.fontVariant=function(e){return t.p(e)&&(e=t.dl(e)),this.nb("fontVariant",e)},t.g.fontWeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontWeight",e)},t.g.letterSpacing=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("letterSpacing",e)},t.g.Fca=function(e){return t.p(e)&&(e=t.el(e)),this.nb("textDirection",e)},t.g.textShadow=function(e){return t.p(e)&&(e=t.Zb(e)),this.nb("textShadow",e)},t.g.lineHeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("lineHeight",e)},t.g.textIndent=function(e){return t.p(e)&&(e=(0,window.parseFloat)(t.Bo(e))),this.nb("textIndent",e)},t.g.vAlign=function(e){return t.p(e)&&(e=t.al(e)),this.nb("vAlign",e)},t.g.Bm=function(e){return t.p(e)&&(e=t.$k(e)),this.nb("hAlign",e)},t.g.Xu=function(t){return this.nb("wordBreak",t)},t.g.wordWrap=function(t){return this.nb("wordWrap",t)},t.g.textOverflow=function(e){return t.p(e)&&(e=String(e)),this.nb("textOverflow",e)},t.g.Hm=function(e){return t.p(e)&&(e=!!e),this.nb("selectable",e)},t.g.Dd=function(e){return t.p(e)&&(e=!!e),this.nb("disablePointerEvents",e)},t.g.Gca=function(e){return t.p(e)&&(e=!!e),this.nb("useHtml",e)},t.g.Aca=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.B5=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("rowOddFill",e,512)},t.g.x5=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("rowEvenFill",e,512)},t.g.zca=function(i,n,s,a,o){if(t.p(i)){i=t.Wb.apply(null,arguments),this.ka(),this.nb("cellBorder",i,256);for(var r=0;4>r;r++)this.nb(D[r],null,256);return this.da(!0),this}return this.D_||(this.D_=new e(this,!0))},t.g.Bca=function(e,n,s,a){if(t.p(e)){var o,r,l;if(t.A(e)){var h=e;e=h[0],n=h[1],s=h[2],a=h[3],h=h.length}else h=arguments.length;if(h)t.C(e)?(o=t.Bo(e.top)||0,r=t.Bo(e.right)||0,l=t.Bo(e.bottom)||0,c=t.Bo(e.left)||0):1==h?c=l=r=o=t.Bo(e)||0:2==h?(l=o=t.Bo(e)||0,c=r=t.Bo(n)||0):3==h?(o=t.Bo(e)||0,c=r=t.Bo(n)||0,l=t.Bo(s)||0):4<=h&&(o=t.Bo(e)||0,r=t.Bo(n)||0,l=t.Bo(s)||0,c=t.Bo(a)||0);else var c=l=r=o=0;return this.ka(),this.nb(k[0],o,1024),this.nb(k[1],r,1024),this.nb(k[2],l,1024),this.nb(k[3],c,1024),this.da(!0),this}return this.F_||(this.F_=new i(this))},t.g.QU=function(e){t.D(e.target.W)&&e.target.W()},t.g.nb=function(e,i,n){if(t.p(e)){if(t.p(i)){var s=!1;return null===i?this.D[e]&&(delete this.D[e],s=!0):this.D[e]!=i&&(this.D[e]=i,s=!0),s&&this.B(+n||1024,1),this}return this.D&&this.D[e]}return this.D||{}},t.g.y5=function(e,i){return t.p(i)?(this.K[e]!=i&&(null===i?delete this.K[e]:this.K[e]=i,this.B(64,1)),this):e in this.K?this.K[e]:null},t.g.eG=function(t){this.QC=this.QC||[],this.QC.push(t)},t.g.JM=function(t,e){for(var i=1;i<arguments.length;i++){var n=arguments[i];if(n&&null!=(n=n.nb(t)))return n}return 0},t.g.R=function(){t.sd(this.b,this.P,this.Un,this.sn,this.Ov,this.rv,this.Qn),t.qd(this.rh),t.qd(this.wb),t.qd(this.PF),t.qd(this.rk),delete this.D,r.u.R.call(this)},t.g.SG=function(e){var i=t.fa.anychart.exports;return i?this.Tt||(this.Tt=i.create()):t.il(4,null,["Exporting"]),t.p(e)&&this.Tt?(this.Tt.U(e),this):this.Tt},t.g.Zj=function(e){var i=t.C(e)?e:{};e=i.rowsSeparator||"\n",t.gp(e);var n=i.columnsSeparator||",";t.gp(n),i=i.ignoreFirstRow||!1;var s,a,o,r=this.wX(),l=this.qS(),h=Array(r);for(s=0;s<r;s++)h[s]=Array(l);var c={},u=[];for(s=0;s<r;s++){for(a=0;a<l;a++)if(!(s*l+a in c)){var d=this.Kz(s,a),p=d.content();(-1!=(p=t.z(p)||t.ea(p)||t.da(p)?String(p):"").indexOf(n)||-1!=p.indexOf(e))&&(p='"'+(p=p.split('"').join('""'))+'"'),h[s][a]=p,p=d.Fx();var g=d.Gx();if(2!=g+p)for(d=0;d<g;d++)for(o=0;o<p;o++)0==d&&0==o||(h[s+d][a+o]="",c[(s+d)*l+(a+o)]=!0)}u.push(h[s].join(n))}return i&&u.shift(),u.join(e)},t.g.dz=function(e){var i=t.eq.exports;if(i){var n=this.Zj({rowsSeparator:"\n",columnsSeparator:",",ignoreFirstRow:!1});i.dz(this,n,e)}else t.il(4,null,["Exporting"])},t.g.cz=function(e,i){var n=t.eq.exports;if(n){var s=this.Zj(e);n.cz(this,s,i)}else t.il(4,null,["Exporting"])},t.H(x,r),t.xu(x,r),r.prototype.contextMenu=function(e){return!this.rk&&(this.rk=t.eq.ui.contextMenu(!0))&&(this.rk.itemsProvider(this.vS),this.rk.attach(this)),t.p(e)?(this.rk&&this.rk.setup(e),this):this.rk},r.prototype.vS=function(e){var i={};return t.eq.exports&&t.Sc(i,t.Sl(I.exporting)),t.Tj()&&e.menuParent&&t.Sc(i,t.Sl(I[e.menuParent.fullScreen()?"full-screen-exit":"full-screen-enter"])),t.Sc(i,t.Sl(I.main)),e.menuParent.jx(i,e)},r.prototype.jx=function(t){return t};var F={"save-table-as":{index:10,text:"Save table as...",iconClass:"ac ac-file-image-o",subMenu:{"save-table-as-png":{index:10,text:".png",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsPng",action:function(t){t.menuParent.Eu()}},"save-table-as-jpg":{index:20,text:".jpg",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsJpg",action:function(t){t.menuParent.Yw()}},"save-table-as-pdf":{index:30,text:".pdf",iconClass:"ac ac-file-pdf-o",eventType:"anychart.saveAsPdf",action:function(t){t.menuParent.Zw()}},"save-table-as-svg":{index:40,text:".svg",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsSvg",action:function(t){t.menuParent.$w()}}}},"save-data-as":{index:20,text:"Save data as...",iconClass:"ac ac-save",subMenu:{"save-data-as-text":{index:10,text:".csv",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsCsv",action:function(t){t.menuParent.cz()}},"save-data-as-xlsx":{index:20,text:".xlsx",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsXlsx",action:function(t){t.menuParent.dz()}}}},"share-with":{index:30,text:"Share with...",iconClass:"ac ac-net",subMenu:{"share-with-facebook":{index:10,text:"Facebook",iconClass:"ac ac-facebook",eventType:"anychart.shareWithFacebook",action:function(t){t.menuParent.LE()}},"share-with-twitter":{index:20,text:"Twitter",iconClass:"ac ac-twitter",eventType:"anychart.shareWithTwitter",action:function(t){t.menuParent.OE()}},"share-with-linkedin":{index:30,text:"LinkedIn",iconClass:"ac ac-linkedin",eventType:"anychart.shareWithLinkedIn",action:function(t){t.menuParent.ME()}},"share-with-pinterest":{index:40,text:"Pinterest",iconClass:"ac ac-pinterest",eventType:"anychart.shareWithPinterest",action:function(t){t.menuParent.NE()}}}},"print-table":{index:50,text:"Print",iconClass:"ac ac-print",eventType:"anychart.print",action:function(t){t.menuParent.print()}},"full-screen-enter":{index:60,text:"Enter full screen",action:function(t){t.menuParent.fullScreen(!0)}},"full-screen-exit":{index:60,text:"Exit full screen",action:function(t){t.menuParent.fullScreen(!1)}},about:{index:80,iconClass:"ac ac-cog",text:"AnyChart "+t.gc.apply(null,["v%s.%s.%s.%s"].concat(["8","13","1","1939"])),href:"https://anychart.com"},"link-to-help":{index:110,iconClass:"ac ac-question",text:"Need help? Go to support center!",href:"https://anychart.com/support"},"version-history":{index:120,text:"Version History",href:""}},I={exporting:{"save-table-as":F["save-table-as"],"save-data-as":F["save-data-as"],"share-with":F["share-with"],"print-table":F["print-table"],"exporting-separator":{index:51}},"full-screen-enter":{"full-screen-enter":F["full-screen-enter"],"full-screen-separator":{index:61}},"full-screen-exit":{"full-screen-exit":F["full-screen-exit"],"full-screen-separator":{index:61}},main:{about:F.about}};r.prototype.uO=function(t){return t},r.prototype.fullScreen=function(e){var i=this.O();return i=i?i.Ja():null,t.p(e)?(i&&i.fullScreen(e),this):!!i&&i.fullScreen()},r.prototype.Ky=function(){var t=this.O();return!!(t=t?t.Ja():null)&&t.Ky()};var E=r.prototype;E.rowsCount=E.wX,E.colsCount=E.qS,E.getCell=E.Kz,E.getRow=E.En,E.getCol=E.E_,E.rowsHeight=E.hka,E.rowsMinHeight=E.jka,E.rowsMaxHeight=E.ika,E.colsWidth=E.Rda,E.colsMinWidth=E.Qda,E.colsMaxWidth=E.Pda,E.border=E.yca,E.contents=E.Yda,E.contextMenu=E.contextMenu,E.draw=E.W,E.fullScreen=E.fullScreen,E.isFullScreenAvailable=E.Ky,E.fontSize=E.fontSize,E.fontFamily=E.fontFamily,E.fontColor=E.Cca,E.fontOpacity=E.Eca,E.fontDecoration=E.Dca,E.fontStyle=E.fontStyle,E.fontVariant=E.fontVariant,E.fontWeight=E.fontWeight,E.letterSpacing=E.letterSpacing,E.textDirection=E.Fca,E.textShadow=E.textShadow,E.lineHeight=E.lineHeight,E.textIndent=E.textIndent,E.vAlign=E.vAlign,E.hAlign=E.Bm,E.wordBreak=E.Xu,E.wordWrap=E.wordWrap,E.textOverflow=E.textOverflow,E.selectable=E.Hm,E.disablePointerEvents=E.Dd,E.useHtml=E.Gca,E.cellFill=E.Aca,E.rowEvenFill=E.x5,E.rowOddFill=E.B5,E.cellBorder=E.zca,E.cellPadding=E.Bca,E.saveAsPng=E.Eu,E.saveAsJpg=E.Yw,E.saveAsPdf=E.Zw,E.saveAsSvg=E.$w,E.shareAsPng=E.Hu,E.shareAsJpg=E.FB,E.shareAsPdf=E.GB,E.shareAsSvg=E.HB,E.getPngBase64String=E.zA,E.getJpgBase64String=E.wA,E.getSvgBase64String=E.BA,E.getPdfBase64String=E.yA,E.toSvg=E.Nq,E.toCsv=E.Zj,E.saveAsCsv=E.cz,E.saveAsXlsx=E.dz,E.exports=E.SG,E.shareWithFacebook=E.LE,E.shareWithTwitter=E.OE,E.shareWithLinkedIn=E.ME,E.shareWithPinterest=E.NE,E.parentBounds=E.ja,E.container=E.O,(E=x.prototype).draw=E.W,t.E("anychart.standalones.table",(function(t,e){return new x(t,e)}))}.call(this,$)),_.pareto||(_.pareto=1,function(t){var e=function(e){t.Jr.call(this,e),this.i=[],this.f=[],this.ih=[],this.b=0},i=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a)},n=function(i,n,a){if(t.p(a)&&-1<a){var o=null;i=i.data(),t.p(i)&&(i=i.Ul(a),t.J(i,e)||t.J(i,s))&&((o={}).cf=t.Tm(i.oD(a),2),o.rf=t.Tm(i.mH(a),2))}o&&(n.cf=o.cf,n.rf=o.rf)},s=function(e){t.Jr.call(this,e)},a=function(){t.WB.call(this),this.Ga("pareto"),this.o=t.ft(),this.o.uh(0).di(100),this.re="pareto"},o=function(e){if(t.p(e.i)){var i=e.i;t.Dr(i),i=i.b;var n,s=e.Ai(0);(n=s?s.bb():e.bb()).uh(0),i?n.di(i):n.di(1)}},r=function(e,i){return t.Do(e)?t.Do(i)?-1:1:t.Do(i)?-1:i-e},l=function(t){var e=new a;return e.ta("defaultSeriesType","column"),e.Wg(),e.$c(),e.data(t),e};t.H(e,t.Jr),t.g=e.prototype,t.g.sa=1,t.g.dk=function(i,n,s){return i=e.u.dk.call(this,i,n,s),"value"==s&&(i=t.N(i),(0,window.isNaN)(i)||0>i)&&(i=0),i},t.g.FC=function(){this.i=[],this.f=[],this.ih=[],this.b=0,this.I(1);for(var t,e=this.$();e.advance();)t=e.get("value"),this.ih.push(t),this.b+=t;if(this.ih.length)if(0==this.b)for(e=0;e<this.ih.length;e++)this.i[e]=0,this.f[e]=0;else for(this.i[0]=this.f[0]=100*this.ih[0]/this.b,e=1;e<this.ih.length;e++)this.i[e]=100*this.ih[e]/this.b,this.f[e]=this.f[e-1]+100*this.ih[e]/this.b;return null},t.g.XI=function(e){this.Ct=null,t.X(e,16)&&this.B(1,16)},t.g.oD=function(t){return this.f[t]},t.g.mH=function(t){return this.i[t]},t.g.vj=function(t){return this.ih[t]},t.H(i,t.xB),t.g=i.prototype,t.g.sF={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x","%CF":"cf","%RF":"rf"},t.g.ym=function(n,a){var o,r=i.u.ym.call(this,n,a),l=this.data();return t.p(l)&&t.p(r.index)&&-1<(o=Number(r.index.value))&&(l=l.Ul(o),t.J(l,e)||t.J(l,s))&&(r.cf={value:t.Tm(l.oD(o),2),type:"number"},r.rf={value:t.Tm(l.mH(o),2),type:"number"}),r},t.g.Ge=function(t,e){var s=i.u.Ge.call(this,t,e);return n(this,s,s.index),s},t.g.Yi=function(t){return t=i.u.Yi.call(this,t),n(this,t,t.index),t},t.g.ce=function(t){var e=i.u.ce.call(this,t);return n(this,e,t),e},t.H(s,t.Jr),s.prototype.dk=function(t,e,i){return"value"==i?this.ee.oD(e):s.u.dk.call(this,t,e,i)},s.prototype.oD=function(t){return this.ee.oD(t)},s.prototype.mH=function(t){return this.ee.mH(t)},t.H(a,t.WB),a.prototype.data=function(i,n){if(t.p(i)){if(i){var a=i.title||i.caption;a&&this.title(a),i.rows&&(i=i.rows)}if(this.qB!==i){this.qB=i,t.qd(this.gm),t.J(i,t.Cr)?this.ee=this.gm=i.Ui():t.J(i,t.Mr)?this.ee=this.gm=i.Yd():this.ee=(this.gm=new t.Mr(t.A(i)||t.z(i)?i:null,n)).Yd(),this.ka(),this.i&&t.kr(this.i,this.dd,this),t.qd(this.i),this.i=new e(this.ee.sort("value",r)),t.K(this.i,this.dd,this),o(this),a=this.Ai(0);var l=this.Ai(1);this.K&&t.qd(this.K),this.K=this.i.Ui(),a||(a=this.column()),a.data(this.K),this.P&&t.qd(this.P),this.P=new s(this.i),l||(l=this.line().clip(!1).Db(!0).bb(this.o)),l.data(this.P),this.da(!0)}return this}return this.i},a.prototype.dd=function(e){t.X(e,16)&&o(this)};var h={},c=7864320|t.QG;h.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h.bar={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h.box={Fb:3,Kb:2,Lb:[t.RH,t.qH,t.IP,t.JP,t.KP],Ob:null,Jb:null,Cb:c,Ab:"highest",zb:"lowest"},h.bubble={Fb:4,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h.candlestick={Fb:5,Kb:2,Lb:[t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h.column={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h["jump-line"]={Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h.stick={Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:3670016|t.QG,Ab:"value",zb:"value"},h.ohlc={Fb:10,Kb:2,Lb:[t.BH,t.GH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-area"]={Fb:11,Kb:1,Lb:[t.nH,t.QH,t.MH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-bar"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-column"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-spline-area"]={Fb:13,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-step-area"]={Fb:14,Kb:1,Lb:[t.nH,t.qH,t.MH,t.QH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h.spline={Fb:15,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h["spline-area"]={Fb:16,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h["step-area"]={Fb:17,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h["step-line"]={Fb:18,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},a.prototype.fj=h,t.Nz(a,a.prototype.fj),t.g=a.prototype,t.g.Gt=function(t,e){return new i(this,this,t,e,!0)},t.g.CA=function(){return t.bt},t.g.xD=function(){return["Pareto chart xScale","ordinal"]},t.g.sH=function(){return 3},t.g.SM=function(){return["Pareto chart yScale","scatter","linear, log"]},t.g.ts=function(){return[this]},t.g.qA=function(){return["value","CF","RF"]},t.g.N4=function(t,e,i){e=i.ma(),i=this.i.Ul(e),t[1]=i.vj(e),t[2]=i.oD(e),t[3]=i.mH(e)},t.g.pb=function(){this.J(131072)&&o(this),a.u.pb.call(this)},t.g.Qh=function(t){return this.J(131072)&&o(this),a.u.Qh.call(this,t)},t.g.P1=function(){return this.Ra()},t.g.R=function(){t.sd(this.i,this.ee,this.gm,this.K,this.P),this.P=this.K=this.gm=this.ee=this.i=null,t.qd(this.o),this.o=null,a.u.R.call(this)},t.g.F=function(){var e=a.u.F.call(this);return t.p(this.data())&&(e.chart.data=this.data().F()),e},t.g.Wg=function(t){a.u.Wg.call(this,t),this.ij(1).scale()||this.ij(1).scale(this.o)},t.g.U=function(t,e){a.u.U.call(this,t,e),e&&this.ij(1).scale(this.o),"data"in t&&this.data(t.data)};var u=a.prototype;u.data=u.data,u.xScale=u.Ra,u.yScale=u.bb,u.crosshair=u.mh,u.xGrid=u.lm,u.yGrid=u.nm,u.xMinorGrid=u.Qr,u.yMinorGrid=u.Tr,u.xAxis=u.$h,u.getXAxesCount=u.wD,u.yAxis=u.ij,u.getYAxesCount=u.yD,u.getSeries=u.ef,u.lineMarker=u.Ym,u.rangeMarker=u.gn,u.textMarker=u.mn,u.palette=u.cc,u.markerPalette=u.Nf,u.hatchFillPalette=u.ve,u.getType=u.Ma,u.addSeries=u.kl,u.getSeriesAt=u.Ai,u.getSeriesCount=u.tj,u.removeSeries=u.Ao,u.removeSeriesAt=u.Rn,u.removeAllSeries=u.Dp,u.getPlotBounds=u.dg,u.xZoom=u.Tq,u.yZoom=u.Uq,u.xScroller=u.Mp,u.yScroller=u.Ur,u.getStat=u.Rg,u.annotations=u.Nk,u.getXScales=u.vy,u.getYScales=u.xy,t.Tp.pareto=l,t.E("anychart.pareto",l)}.call(this,$)),_.theme_radar||(_.theme_radar=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{radar:{defaultSeriesType:"line",defaultSeriesSettings:{base:{clip:!1},area:{},line:{},marker:{}},xAxis:{scale:0,zIndex:25,labels:{zIndex:25},minorLabels:{zIndex:25},ticks:{zIndex:25},minorTicks:{zIndex:25}},yAxis:{scale:1},startAngle:0,innerRadius:0,xGrids:[{}],yGrids:[{}],minorGrids:[],scales:[{type:"ordinal"},{type:"linear"}],xScale:0,yScale:1,a11y:{titleFormat:t.PN}}})}.call(this,$)),_.theme_waterfall||(_.theme_waterfall=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{waterfall:{dataMode:"diff",drawTotalsAsAbsolute:!1,connectorStroke:"#697474",defaultSeriesType:"waterfall",defaultSeriesSettings:{waterfall:{normal:{fill:"#96a6a6",stroke:"#697474",risingFill:"#64b5f6",fallingFill:"#ef6c00",risingStroke:"#467fac",fallingStroke:"#a74c00",risingHatchFill:!1,fallingHatchFill:!1,labels:{enabled:!0,connectorStroke:"#c1c1c1",format:function(){return t.vN(this.isTotal?this.absolute:this.diff)}}},hovered:{risingFill:t.BN,fallingFill:t.BN,risingStroke:t.JN,fallingStroke:t.JN,risingHatchFill:null,fallingHatchFill:null},selected:{risingFill:"#333 0.85",fallingFill:"#333 0.85",risingStroke:"#333 0.85",fallingStroke:"#333 0.85",risingHatchFill:null,fallingHatchFill:null},tooltip:{format:function(){return this.isTotal?"Absolute: "+t.vN(this.absolute):"Absolute: "+t.vN(this.absolute)+"\nDifference: "+t.vN(this.diff)}}}},legend:{enabled:!0,itemsSourceMode:"categories"},scales:[{type:"ordinal"},{type:"linear",softMinimum:0,stackDirection:"reverse"}],stackLabels:{anchor:"auto",enabled:!1,format:"{%total}",position:"auto"},connectors:{stroke:"#697474",labels:{format:"{%stack}",position:"auto",anchor:"auto"}},arrow:{connector:{stroke:"#697474"},label:{fontSize:"12px",position:"auto",anchor:"auto"}},total:{enabled:!0,normal:{fill:"#96a6a6",stroke:"#697474",labels:{enabled:!0,anchor:"auto",position:"auto"}},hovered:{fill:t.BN,stroke:t.BN},tooltip:{enabled:!0,format:function(){return this.isTotal?"Absolute: "+this.value:"Value: "+this.value},titleFormat:function(){return this.isTotal?"Total: "+this.name:"Split: "+this.name}}}}})}.call(this,$)),_.theme_venn||(_.theme_venn=1,function(t){var e={titleFormat:"{%Name}",format:"Value: {%Value}"};t.ra(t.fa.anychart.themes.defaultTheme,{venn:{dataSeparator:"&",background:{zIndex:0},padding:{top:15,right:5,bottom:15,left:5},a11y:{enabled:!0,titleFormat:t.NN,mode:"chart-elements"},color:"#64b5f6",normal:{fill:t.CN,stroke:"none",hatchFill:!1,labels:{fontColor:"#f4f4f4",format:"{%Name}",enabled:!0,disablePointerEvents:!0,zIndex:100,fontWeight:"bold"},markers:{enabled:!1,zIndex:99,disablePointerEvents:!0,stroke:"none"}},hovered:{fill:t.GN,stroke:"none",hatchFill:!1,labels:{enabled:null},markers:{enabled:null}},selected:{fill:"#333 0.85",stroke:"none",hatchFill:!1,labels:{enabled:null},markers:{enabled:null}},tooltip:e,intersections:{normal:{fill:"#fff 0.00001",stroke:"none",labels:{fontWeight:"normal",format:"{%Value}",enabled:null},markers:{enabled:null}},hovered:{fill:"#fff 0.5",stroke:"none",labels:{enabled:null},hoverMarkers:{enabled:null}},selected:{fill:"#333 0.85",stroke:"none",labels:{enabled:null},markers:{enabled:null}},tooltip:e},legend:{enabled:!0,zIndex:0,tooltip:{enabled:!1},padding:{top:10,right:10,bottom:0,left:10},position:"bottom"}}})}.call(this,$)),_.theme_pie||(_.theme_pie=1,function(t){t.ra(t.eq.themes.defaultTheme,{pie:{sliceDrawer:function(){t.dF.vector.primitives.donut(this.path,this.centerX+this.explodeX,this.centerY+this.explodeY,this.outerRadius,this.innerRadius,this.startAngle,this.sweepAngle)},interactivity:{multiSelectOnClick:!0,unselectOnClickOutOfPoint:!1},animation:{duration:2e3},title:{text:"Pie Chart"},group:!1,sort:"none",radius:"45%",innerRadius:0,startAngle:0,outsideLabelsCriticalAngle:60,insideLabelsOffset:"50%",center:{fill:"none",stroke:"none"},normal:{labels:{format:"{%PercentValue}{decimalsCount:1,zeroFillDecimals:true}%"},explode:0,outline:{enabled:!0,width:0,offset:0,fill:t.GN,stroke:"none"}},hovered:{explode:0,outline:{enabled:null,width:10,offset:0,fill:t.zN,stroke:"none"}},selected:{explode:"5%",fill:t.zN,stroke:"none",outline:{enabled:null,width:10,offset:0,fill:t.GN,stroke:"none"}},a11y:{titleFormat:t.ON}},pie3d:{radius:"65%",mode3d:!0,selected:{explode:"5%"},aspect3d:.45,connectorLength:"15%",legendItem:{iconStroke:null}}})}.call(this,$)),_.theme_cartesian_3d||(_.theme_cartesian_3d=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{cartesian3dBase:{zAngle:45,zAspect:"50%",zDistribution:!1,zPadding:10,defaultSeriesSettings:{base:{normal:{stroke:"none",fill:t.zN},hovered:{stroke:"none",fill:t.FN},selected:{stroke:"none",fill:"#333"},tooltip:{anchor:"left-top",position:"left-top"}},area:{hovered:{markers:{enabled:!0}},selected:{markers:{enabled:!0}}},bar:{isVertical:!0},line:{hovered:{markers:{enabled:!0}},selected:{markers:{enabled:!0}}},line2d:{normal:{stroke:t.zN},hovered:{stroke:t.FN,markers:{enabled:!0}},selected:{stroke:"#333",markers:{enabled:!0}}}}},bar3d:{xGrids:[{}],yGrids:[{enabled:!0,scale:0}],yScale:{stackDirection:"reverse"}},column3d:{defaultSeriesType:"column"},area3d:{defaultSeriesType:"area",zDistribution:!0,zPadding:5},line3d:{defaultSeriesType:"line",zDistribution:!0,zPadding:5},cartesian3d:{defaultSeriesType:"column",xGrids:[{enabled:!0,scale:0}],yGrids:[{}]}})}.call(this,$)),_.theme_heatmap||(_.theme_heatmap=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{heatMap:{annotations:{annotationsList:[],zIndex:2e3},isVertical:!1,scales:[{type:"ordinal"},{type:"ordinal",inverted:!0},{type:"ordinal-color"}],xScale:0,yScale:1,colorScale:2,background:{enabled:!0},xAxes:[{orientation:"top"}],yAxes:[{}],xGrids:[],yGrids:[],tooltip:{enabled:!0,title:{enabled:!0,fontSize:13,fontWeight:"normal"},contentInternal:{fontSize:11},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){if(void 0!==this.heat){var t="Value: "+this.valuePrefix+this.heat+this.valuePostfix;return(0,window.isNaN)(+this.heat)||(t+="\nPercent Value: "+(100*this.heat/this.getStat("sum")).toFixed(1)+"%"),t}return"x: "+this.x+"\ny: "+this.y}},legendItem:{iconStroke:null},legend:{itemsSourceMode:"categories"},defaultXAxisSettings:{enabled:!0,orientation:"bottom",ticks:{enabled:!1},title:{text:"X-Axis",padding:5},scale:0},defaultYAxisSettings:{enabled:!0,orientation:"left",ticks:{enabled:!1},title:{text:"Y-Axis",padding:5},scale:1},defaultSeriesSettings:{heatMap:{normal:{fill:function(){if(this.colorScale){var e=this.iterator.get("heat");e=this.colorScale.valueToColor(e)}else e=t.Ul(this.sourceColor,.85,!0);return e},stroke:"1 #ffffff",labels:{disablePointerEvents:!0,enabled:!0,fontSize:11,anchor:"center",adjustFontSize:{width:!0,height:!0},minFontSize:7,maxFontSize:13,hAlign:"center",vAlign:"middle",fontWeight:"normal",fontColor:"#212121",selectable:!1,background:{enabled:!1},padding:{top:2,right:4,bottom:2,left:4},position:"center",format:function(){return t.vN(this.heat)}},markers:{enabled:!1,disablePointerEvents:!1,position:"center",rotation:0,anchor:"center",offsetX:0,offsetY:0,size:4,positionFormatter:t.wN,fill:"#dd2c00",type:"circle",stroke:"none"},hatchFill:!1},hovered:{fill:"#757575",stroke:"2 #ffffff",labels:{fontColor:"#f5f5f5",enabled:null},markers:{enabled:null,size:6},hatchFill:null},selected:{fill:"#333 0.85",stroke:"2 #ffffff",labels:{fontColor:"#fff",enabled:null},markers:{enabled:null,size:6,fill:"#333 0.85",stroke:"1.5 #212121"},hatchFill:null},tooltip:{enabled:!0,title:{enabled:!0,fontSize:13,fontWeight:"normal"},contentInternal:{fontSize:11},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){if(void 0!==this.heat){var t="Value: "+this.valuePrefix+this.heat+this.valuePostfix;return(0,window.isNaN)(+this.heat)||(t+="\nPercent Value: "+(100*this.heat/this.getStat("sum")).toFixed(1)+"%"),t}return"x: "+this.x+"\ny: "+this.y}}}},labelsDisplayMode:"drop",clip:!0,xZoom:{continuous:!0,startRatio:0,endRatio:1},yZoom:{continuous:!0,startRatio:0,endRatio:1},yScroller:{orientation:"right",inverted:!0},a11y:{titleFormat:t.NN}}})}.call(this,$)),_.theme_bullet||(_.theme_bullet=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{bullet:{background:{enabled:!0},layout:"horizontal",defaultRangeMarkerSettings:{enabled:!0,from:0,to:0,zIndex:2,fill:null},padding:{top:5,right:10,bottom:5,left:10},margin:0,defaultMarkerSettings:{fill:"#64b5f6",stroke:"2 #64b5f6",zIndex:2},rangePalette:{type:"distinct",items:["#828282","#a8a8a8","#c2c2c2","#d4d4d4","#e1e1e1"]},markerPalette:{items:["bar","line","x","ellipse"]},axis:{enabled:!1,title:{padding:0,margin:{top:0,right:0,bottom:10,left:0}},labels:{fontSize:9,padding:0},minorLabels:{padding:0},ticks:{enabled:!1},orientation:null,zIndex:3},title:{rotation:0},scale:{type:"linear",minimumGap:0,maximumGap:0,ticks:{minCount:2,maxCount:5,interval:window.NaN}},ranges:[],a11y:{titleFormat:function(){return t.NN.apply(this)+". "}}}})}.call(this,$)),_.calendar_part||(_.calendar_part=1,function(t){var e=function(e){t.Cr.call(this,e)},i=function(e){t.Y.call(this),this.pa=e,this.Ia=this.jb=null,this.ud=[],this.Uc=[],this.f=t.Qo(t.Ro())},n=function(t,e,i){var n=e.left,s=e.top,a=e.right;e=e.bottom,i?i.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close():(t.D.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close(),t.G.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close(),t.o.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close())},s=function(e,i,n,s){return n=s.left+e.Ka*(n+1)+n*e.Ha,i=s.top+e.Ka*(i+1)+i*e.Ha,s=t.R(n+e.Ha,1),e=t.R(i+e.Ha,1),{left:n=t.R(n,1),top:i=t.R(i,1),right:s,bottom:e}},a=function(t,e){for(var i=t.ea,n=0;n<e+1;n++)i+=t.fb[n];var s=((n=i-t.fb[e])-t.Ba)%7,a=(--i-t.Ba)%7;return{m6:n%7,Yea:i%7,Nta:s,n6:Math.floor((n-s)/7),rta:a,Zea:Math.floor((i-a)/7)}},o=function(){t.V.call(this)},r=function(){t.V.call(this),this.Da=null;var e={};t.T(e,[["fill",0,1],["stroke",0,1],["hatchFill",0,1]]);var i={};t.T(i,[["fill",0,0],["stroke",0,0],["hatchFill",0,0]]),this.ca=new t.my(this,e,t.gm),this.za=new t.my(this,i,t.vo),this.Ea=new t.my(this,i,t.wo),t.T(this.ua,[["spacing",0,8],["noDataFill",0,8192],["noDataStroke",0,8192],["noDataHatchFill",0,8192]])},l=function(){t.V.call(this),this.Da=null,t.T(this.ua,[["underSpace",0,8],["stroke",0,1],["noDataStroke",0,1]])},h=function(){t.V.call(this),this.Da=null,t.T(this.ua,[["rightSpace",0,8],["showWeekends",0,8]])},c=function(){t.V.call(this),this.Ia=this.jb=null,t.T(this.ua,[["format",0,1],["inverted",0,8],["monthsPerRow",0,1],["underSpace",0,8]])},u=function(e,i){t.Bx.call(this),this.Ga("calendar"),t.su(this,this,this.If,this.hg,null,this.If,this.paa,null),this.ba=[],this.data(e||null,i),this.aa=[],this.ea=[],this.i={},this.f=0,this.B(4294967295)},d=function(t,e){var n=t.ba[e];return n||((n=new i(t)).kb(t),t.ba[e]=n),n},p=function(e,i,n){var s=e.xg();if(n!==t.gm){var a=n===t.vo?s.lb():s.selected();if(null!=(a=a.g(i))&&!t.D(a))return a}return i=s.Qa().g(i),t.D(i)&&(s=e.Ge(),i=i.call(s,s)),a?(s=e.Ge(i),a.call(s,s)):i},g=function(t,e,i){var n=e.tag.Ch;t.$().select(n),n=p(t,"fill",i),t=p(t,"stroke",i),e.fill(n),e.stroke(t)},f=function(t,e){for(var i=t.ai().g("inverted"),n=0;n<t.ba.length;n++)d(t,i?t.aa.length-n-1:n).B(e)},b=function(t,e){var i=new u(t,e);return i.iP(i.vf("colorScale")),i},v=[31,28,31,30,31,30,31,31,30,31,30,31],m=[31,29,31,30,31,30,31,31,30,31,30,31];t.H(e,t.Cr),e.prototype.FC=function(){for(var e,i,n=[],s=this.ee.$();s.advance();)e=s.get("x"),i=Number(s.get("value")),null==(e=t.ps(e))||(0,window.isNaN)(i)||(i=s.ma(),n.push({value:+e,index:i}));for(n.sort((function(t,e){return t.value-e.value})),s=n.length;s--;)n[s]=n[s].index;return n},t.H(i,t.wu),t.g=i.prototype,t.g.sa=2080374800|t.wu.prototype.sa,t.g.gB=function(e){var i=536870912,n=0;t.X(e,1)&&(n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),this.jb.Wj(!0),t.K(this.jb,this.gB,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.qaa=function(){this.B(268435456,1)},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),this.Ia.Wj(!0),t.K(this.Ia,this.qaa,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.Kv=function(){this.Oa||(this.Oa=t.ok(),t.ru(this,this.Oa)),this.Za||(this.Za=t.mg().Wo(),this.Lf=t.uk(this.Za),this.Lf.zIndex(1),this.Lf.parent(this.Oa)),this.D||(this.D=this.Oa.path(),this.D.zIndex(1)),this.o||(this.o=this.Oa.path(),this.o.zIndex(2)),this.G||(this.G=this.Oa.path(),this.G.zIndex(3)),this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ue.zIndex(4),this.ue.parent(this.Oa)),this.P||(this.P=this.Oa.path(),this.P.zIndex(5)),this.K||(this.K=this.Oa.path(),this.K.zIndex(6))},t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.Mm=function(){var e=this.title(),i=this.ob(),n=i.left,s=i.top;i=i.width,e=24>(e=e.g("fontSize"))?e+3:Math.round(1.2*e);var a=t.L("2%",i),o=this.pa.pg().labels().g("fontSize");o=5+(24>o?o+3:Math.round(1.2*o))+this.Od;var r=i-e-a-1;this.Ha=(r-55*this.Ka)/54;var l=this.ba?7:7-this.b.length;l=this.Ha*l+(l-1+2)*this.Ka,this.$a=o+l,this.Hd=t.kn(n,s,i,this.$a),this.bg=t.kn(n,s,e,this.$a),this.yg=t.kn(n+e,s+o,a,l),this.me=t.kn(n+e+a,s,r,o),this.sb=t.kn(n+e+a,s+o,r,l)},t.g.W=function(){if(!this.zc())return this;this.Kv(),this.Ka=this.pa.xg().g("spacing"),this.Od=this.pa.pg().g("underSpace"),this.ba=this.pa.XJ().g("showWeekends"),this.b=this.f?t.Ha(this.f.weekendRange):[],this.fh=[],this.na={};var e,i=0;for(e=this.b[0];e<=this.b[1];e++){var o=(e+1)%7;this.fh[i++]=o,this.na[String(o)]=!0}for(this.aa={},this.Sb={},e=i=0;7>e;e++)o=(e+this.Ba)%7,!this.ba&&o in this.na||(this.aa[o]=i++),this.Sb[o]=e;if(this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(this.Mm(),this.B(1275068432)),this.J(1073741824)){for(e=this.pa.xg(),i=this.pa.pg(),this.D.stroke("none"),this.D.fill(e.g("noDataFill")),o=t.Yb(e.g("noDataHatchFill")),this.o.stroke("none"),this.o.fill(o),this.G.stroke(e.g("noDataStroke")),this.G.fill("none"),this.P.stroke(i.g("noDataStroke")),this.P.fill("none"),this.K.stroke(i.g("stroke")),this.K.fill("none"),this.D.clear(),this.G.clear(),this.o.clear(),e=this.ea;e<this.nf+this.ea;e++)i=(e-this.Ba)%7,o=Math.floor((e-i)/7),e<i&&(o+=1),!this.ba&&e%7 in this.na||n(this,s(this,this.aa[e%7],o,this.sb));this.K.clear(),this.P.clear(),e=this.Ka>>1,i=this.sb,o=this.i.d4;for(var r=this.ba?0:this.b.length,l=0;12>l;l++){var h=-1<o.indexOf(l)?this.K:this.P,c=a(this,l),u=c.m6,d=c.Yea,p=c.n6,f=c.Zea;if(!this.ba){for(;u in this.na;)c=this.Sb[u],u=(u+1)%7,7===(c+=1)&&(p+=1);for(;d in this.na;)c=this.Sb[d],d=(d-1+7)%7,-1==--c&&--f}c=6-r,u=this.aa[u],d=this.aa[d];var b=s(this,u,p,i),v=s(this,d,f,i);p=s(this,0,p+1,i),f=s(this,c,f-1,i);var m=p.top,y=f.bottom;h.moveTo(b.left-e,b.top-e),h.lineTo(b.left-e,y+e),d===c?h.lineTo(v.right+e,y+e):h.lineTo(f.right+e,y+e).lineTo(f.right+e,v.bottom+e).lineTo(v.right+e,v.bottom+e),h.lineTo(v.right+e,m-e),0===u?h.lineTo(b.left-e,m-e):h.lineTo(p.left-e,m-e).lineTo(p.left-e,b.top-e).lineTo(b.left-e,b.top-e),h.close()}this.I(1073741824)}if(this.J(805306372)&&((e=t.wr(this,"background"))&&e.enabled()&&e.ja(this.Hd),(e=t.wr(this,"title"))&&e.enabled()&&e.ja(this.bg),this.I(4)),this.J(268435456)&&((e=t.wr(this,"background"))&&(e.Wj(!1),e.ka(),e.O(this.Oa),e.zIndex(0),e.W(),e.da(!1)),this.I(268435456)),this.J(536870912)&&((e=t.wr(this,"title"))&&(e.Wj(!1),e.ka(),e.O(this.Oa),e.zIndex(1),e.W(),e.da(!1)),this.I(536870912)),h=this.f?this.f.narrowWeekdays:"SMTWTFS".split(""),o=this.f?this.f.shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),this.J(67108864)){for(e=0;7>e;e++)l=this.ud[e]||(this.ud[e]=new t.Ix),!this.ba&&e in this.na?t.Px(l,null):(i=h[e],r=s(this,this.aa[e],0,this.yg),r=t.kn(r.left,r.top,r.right-r.left,r.bottom-r.top),c=this.pa.XJ().labels().flatten(),l.text(i),l.style(c),l.Ij(),t.Px(l,this.Za),t.Wx(l,r,this.O().Ja()));this.I(67108864)}if(this.J(134217728)){for(e=0;12>e;e++)l=this.Uc[e]||(this.Uc[e]=new t.Ix),i=o[e],h=(r=a(this,e)).n6,0!==this.aa[r.m6%7]&&(h+=1),r=s(this,0,h,this.me),r=t.kn(r.left+5,r.top,r.right-r.left,r.bottom-r.top),h=this.pa.pg().labels().flatten(),l.text(i),l.style(h),l.Ij(),t.Px(l,this.Za),t.Wx(l,r,this.O().Ja());this.I(134217728)}if(this.J(16)){for(e=this.sd=this.pa.data().$(),i=this.i.S0,o=0;o<i.length;o++){for(r=i[o],e.select(r),h=0,c=(l=t.ps(e.Gh())).getUTCMonth(),u=0;u<c;u++)h+=this.fb[u];u=((h+=this.ea+l.getUTCDate()-1)-this.Ba)%7,c=Math.floor((h-u)/7),h<u&&(c+=1),h%=7,(u=t.eC(this.ue)).tag={Ch:r,x:l,value:e.get("value"),timestamp:l.getTime(),f7:c,day:h,month:l.getUTCMonth(),year:l.getUTCFullYear()},g(this.pa,u,t.gm),!this.ba&&h in this.na||n(this,s(this,this.aa[h],c,this.sb),u)}this.I(16)}return this},t.g.U=function(t,e){i.u.U.call(this,t,e),"background"in t&&this.background().ga(!!e,t.background),"title"in t&&this.title().ga(!!e,t.title)},t.g.R=function(){this.Oa.remove(),t.sd(this.D,this.o,this.G,this.P,this.K,this.Oa,this.Ia,this.jb),this.jb=this.Ia=this.Oa=this.K=this.P=this.G=this.o=this.D=null,i.u.R.call(this)},t.H(o,t.V),o.prototype.ra=1,t.H(r,o),t.Gq(r,["fill","stroke","hatchFill"],"normal"),r.prototype.ra=8200|o.prototype.ra;var y={};t.sq(y,[[0,"spacing",t.Bq],[1,"noDataFill",t.Qq],[1,"noDataStroke",t.Pq],[1,"noDataHatchFill",t.Rq]]),t.U(r,y),r.prototype.$c=function(){t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},r.prototype.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},r.prototype.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},r.prototype.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea};var S=r.prototype;S.normal=S.Qa,S.hovered=S.lb,S.selected=S.selected,t.H(l,o),l.prototype.ra=8|o.prototype.ra;var w={};t.sq(w,[[0,"underSpace",t.Bq],[1,"stroke",t.Pq],[1,"noDataStroke",t.Pq]]),t.U(l,w),t.g=l.prototype,t.g.raa=function(){this.va(1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,t.W(this,"labels",this.Da),t.K(this.Da,this.raa,this)),t.p(e)?(this.Da.N(e),this):this.Da},t.g.U=function(e,i){l.u.U.call(this,e,i),t.Iq(this,w,e,i),"labels"in e&&this.labels().ga(!!i,e.labels)},t.g.F=function(){var e=l.u.F.call(this);return t.Tq(this,w,e),t.wr(this,"labels")&&(e.labels=this.labels().F()),e},t.g.R=function(){t.qd(this.Da),this.Da=null,l.u.R.call(this)};var x=l.prototype;x.labels=x.labels,t.H(h,o),h.prototype.ra=8|o.prototype.ra;var C={};t.sq(C,[[0,"rightSpace",t.Bq],[0,"showWeekends",t.Dq]]),t.U(h,C),t.g=h.prototype,t.g.saa=function(){this.va(1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,t.W(this,"labels",this.Da),t.K(this.Da,this.saa,this)),t.p(e)?(this.Da.N(e),this):this.Da},t.g.U=function(e,i){h.u.U.call(this,e,i),t.Iq(this,C,e,i),"labels"in e&&this.labels().ga(!!i,e.labels)},t.g.F=function(){var e=h.u.F.call(this);return t.Tq(this,C,e),t.wr(this,"labels")&&(e.labels=this.labels().F()),e},t.g.R=function(){t.qd(this.Da),this.Da=null,h.u.R.call(this)};var D=h.prototype;D.labels=D.labels,t.H(c,o),c.prototype.ra=8|o.prototype.ra;var T={};t.sq(T,[[0,"format",t.ar],[0,"inverted",t.Dq],[0,"monthsPerRow",t.Bq],[0,"underSpace",t.Bq]]),t.U(c,T),t.g=c.prototype,t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),t.K(this.jb,this.gB,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.gB=function(){this.va(9)},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),t.K(this.Ia,this.taa,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.taa=function(){this.va(1)},t.g.U=function(e,i){c.u.U.call(this,e,i),t.Iq(this,T,e,i),"title"in e&&this.title().ga(!!i,e.title),"background"in e&&this.background().ga(!!i,e.background)},t.g.F=function(){var e=c.u.F.call(this);return t.Tq(this,T,e),t.wr(this,"title")&&(e.title=this.title().F()),t.wr(this,"background")&&(e.background=this.background().F()),e},t.g.R=function(){t.sd(this.jb,this.Ia),this.Ia=this.jb=null,c.u.R.call(this)};var k=c.prototype;k.title=k.title,k.background=k.background,t.H(u,t.Bx),t.g=u.prototype,t.g.ra=16|t.Bx.prototype.ra,t.g.sa=61440|t.Bx.prototype.sa,t.g.data=function(i,n){if(t.p(i)){if(i){var s=i.title||i.caption;s&&this.title(s),i.rows&&(i=i.rows)}return this.Xf!==i&&(this.Xf=i,t.sd(this.P,this.la,this.Yc),this.sd=null,t.J(i,t.Cr)?this.la=i.Ui():t.J(i,t.Mr)?this.la=i.Yd():(i=t.A(i)||t.z(i)?i:null,this.Yc=new t.Mr(i,n),this.la=this.Yc.Yd()),t.qd(this.P),delete this.sd,this.P=new e(this.la),t.K(this.P,this.dd,this),this.B(4096,1)),this}return this.P},t.g.dd=function(e){t.X(e,16)&&this.B(4096,1)},t.g.cg=function(){return this.P.$()},t.g.Ec=function(){return this.sd=this.P.$()},t.g.$=function(){return this.sd||(this.sd=this.P.$())},t.g.Ma=function(){return"calendar"},t.g.Ol=function(){return[]},t.g.pb=function(){if(this.J(4096)){this.aa=[],this.ea=[],this.i={};var e=this.data().$();for(e.reset();e.advance();){var i=Number(e.get("value")),n=e.get("x"),s=t.ps(n);n=e.ma();var a=s.getUTCFullYear();s=s.getUTCMonth(),a in this.i||(this.i[a]={d4:[],S0:[]});var o=this.i[a];o.S0.push(n),t.Ua(o.d4,s),t.Ua(this.aa,a),t.Ua(this.ea,i)}this.B(16388),this.I(4096)}this.J(16384)&&(e=this.ea,this.vb&&(this.vb.Of()?(this.vb.Bg(),this.vb.Xc(e[0],e[e.length-1]),this.vb.Hg()):(this.vb.Co(),this.vb.Xc(e[0],e[e.length-1])),t.J(this.vb,t.iz)&&t.Pt(this.vb.Xa())),f(this,16),this.B(8192),this.I(16384))},t.g.yj=function(){return!this.$().Hb()},t.g.Ue=function(){return[]},t.g.qja=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=1879048192),f(this,i),this.B(8192,1)},t.g.ai=function(e){return this.o||(this.o=new c,t.K(this.o,this.qja,this),t.W(this,"years",this.o)),t.p(e)?(this.o.N(e),this):this.o},t.g.Xia=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=1207959552),f(this,i),this.B(8192,1)},t.g.pg=function(e){return this.G||(this.G=new l,t.K(this.G,this.Xia,this),t.W(this,"months",this.G)),t.p(e)?(this.G.N(e),this):this.G},t.g.pja=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=67108864),f(this,i),this.B(8192,1)},t.g.XJ=function(e){return this.K||(this.K=new h,t.K(this.K,this.pja,this),t.W(this,"weeks",this.K)),t.p(e)?(this.K.N(e),this):this.K},t.g.Pia=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=16),t.X(e,8192)&&(i|=1073741824),f(this,i),this.B(8192,1)},t.g.xg=function(e){return this.b||(this.b=new r,t.W(this,"days",this.b),this.b.$c(),t.K(this.b,this.Pia,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.Jia=function(e){var i=0,n=0;t.X(e,1)&&(i|=32768,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),this.Mb.kb(this),t.K(this.Mb,this.Jia,this),this.B(32772,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Ux=function(e){this.Si||(this.Si=new t.Fw);var i=this.$();return i.select(e.Ch),e={x:{value:e.x,type:"date"},timestamp:{value:e.timestamp,type:"number"},value:{value:e.value,type:"string"},weekNumber:{value:e.f7,type:"number"},day:{value:e.day,type:"number"},month:{value:e.month,type:"number"},year:{value:e.year,type:"number"},index:{value:e.Ch,type:"number"}},t.ov(this.Si.lg(i),e)},t.g.Ge=function(t){var e=t||"blue 0.5";t=this.$().get("value");var i=this.kd();return e={value:t,sourceColor:e},i&&(e.scaledColor=i.Qq(t)),e},t.g.$q=function(e){return t.J(e,t.WN)},t.g.rl=function(t){var e=t.type,i=t.domTarget.tag;if(i&&!this.$q(i)){switch(e){case"mouseout":e="pointmouseout";break;case"mouseover":e="pointmouseover";break;case"mousemove":case"touchmove":e="pointmousemove";break;case"mousedown":case"touchstart":e="pointmousedown";break;case"mouseup":case"touchend":e="pointmouseup";break;case"click":e="pointclick";break;case"dblclick":e="pointdblclick"}return(t={type:e,actualTarget:t.target,target:this,originalEvent:t}).dataIndex=i.Ch,t.x=i.x,t.value=i.value,t.timestamp=i.timestamp,t.weekNumber=i.f7,t.day=i.day,t.month=i.month,t.year=i.year,t.point=i.Hta,t}return null},t.g.If=function(e){var i=this.rl(e);if(i&&this.dispatchEvent(i)){var n=e.domTarget;i=n.tag,this.D.tag=i;var s=this.Ua();i&&!this.$q(i)?(n=n.Cd("d"),this.D.Cd("d",n),g(this,this.D,t.vo),t.Ow(s,e.clientX,e.clientY,this.Ux(i))):(this.D.clear().fill("none").stroke("none"),s.Lc())}},t.g.hg=function(t){(t=this.rl(t))&&this.dispatchEvent(t)&&(this.Ua().Lc(),this.D.clear().fill("none").stroke("none"))},t.g.paa=function(t){(t=this.rl(t))&&this.dispatchEvent(t)},t.g.Kia=function(e){t.X(e,6)&&this.B(16384,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(16384,1);else if(e=t.jt(this.vb,e,null,48,null,this.Kia,this)){var i=this.vb==e;this.vb=e,t.W(this,"colorScale",this.vb),this.vb.da(i),i||this.B(16384,1)}return this}return this.vb},t.g.iP=function(e){if(t.z(e))var i=t.dt(e,null);else t.C(e)?(i=t.dt(e.type,null))&&i.N(e):i=null;i&&this.kd(i)},t.g.oaa=function(){return this.f},t.g.Qh=function(e){if(this.zc()){this.Aa||(this.Aa=this.Na.Bd(),this.Aa.zIndex(30)),this.D||(this.D=this.Aa.path(),this.D.zIndex(9999),this.D.Dd(!0)),this.pb();var i=t.wr(this,"colorRange");if(this.J(32768)&&i&&(i.ka(),i.scale(this.kd()),i.da(!1),this.B(4)),this.J(4)&&(i?(i.ja(e.clone().round()),this.lf=i.yd()):this.lf=e.clone(),this.B(8192),this.I(4)),this.J(32768)&&(i&&(i.ka(),i.O(this.Aa),i.zIndex(50),i.W(),i.da(!1)),this.I(32768)),this.J(8192)){var n=this.lf;e=this.ai().g("inverted"),i=this.ai().title();var s=this.ai().background(),a=i.F(),o=s.F();for(i.I(4294967295),i.background().I(4294967295),s.I(4294967295),i={title:a,background:o},this.f=0,n=n.clone(),s=this.o.g("underSpace"),o=this.aa.length,a=0;a<o;a++){var r=e?o-a-1:a,l=this.aa[r];(r=d(this,r)).U(i,!1),r.O(this.Aa);var h=r;if(h.ec!==l){h.ec=l;var c=h.ec;h.qc=0==c%400||0==c%4&&0!=c%100,h.nf=h.qc?366:365,h.fb=h.qc?m:v,h.Ba=h.f?h.f.firstDayOfWeek:0,h.ea=new Date(Date.UTC(h.ec,0,1)).getUTCDay(),h.ea<h.Ba&&(h.ea+=7)}r.i=this.i[l],r.title().text(String(l)),r.ja(n),r.W(),l=r.$a,n=t.kn(n.left,n.top+l+s,n.width,n.height),this.f+=l+s}for(0<o&&(this.f-=s),this.f+=this.lf.top-this.ob().top,e=this.aa.length;e<this.ba.length;e++)(i=this.ba[e]).enabled(!1),i.W();this.I(8192)}}},t.g.ts=function(){return[this]},t.g.qA=function(){return["x","value"]},t.g.F=function(){var e=u.u.F.call(this);return e.data=this.data().F(),e.tooltip=this.Ua().F(),t.wr(this,"years")&&(e.years=this.ai().F()),t.wr(this,"months")&&(e.months=this.pg().F()),t.wr(this,"weeks")&&(e.weeks=this.XJ().F()),t.wr(this,"days")&&(e.days=this.xg().F()),t.wr(this,"colorScale")&&(e.colorScale=this.kd().F()),t.wr(this,"colorRange")&&(e.colorRange=this.Qi().F()),{chart:e}},t.g.U=function(e,i){if(u.u.U.call(this,e,i),"data"in e&&this.data(e.data),"years"in e&&this.ai().ga(!!i,e.years),"months"in e&&this.pg().ga(!!i,e.months),"weeks"in e&&this.XJ().ga(!!i,e.weeks),"days"in e&&this.xg().ga(!!i,e.days),"colorScale"in e){var n=e.colorScale,s=null;t.z(n)?s=t.dt(n,null):t.C(n)&&(s=t.dt(n.type,null))&&s.N(n),s&&this.kd(s)}"colorRange"in e&&this.Qi(e.colorRange),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip)},t.g.R=function(){t.sd(this.la,this.Yc,this.o,this.G,this.K,this.b,this.vb,this.Mb),this.Yc=this.la=null,delete this.sd,this.Mb=this.vb=this.b=this.K=this.G=this.o=null,u.u.R.call(this)};var $=u.prototype;$.getType=$.Ma,$.data=$.data,$.noData=$.Gm,$.tooltip=$.Ua,$.colorRange=$.Qi,$.colorScale=$.kd,$.years=$.ai,$.months=$.pg,$.weeks=$.XJ,$.days=$.xg,$.getActualHeight=$.oaa,t.Tp.calendar=b,t.E("anychart.calendar",b)}.call(this,$)),_.circular_gauge||(_.circular_gauge=1,function(t){var e=function(e,i,n){return e=t.Pu.prototype.yl.call(e,i,n,void 0,void 0),t.mn(e)},i=function(e,i){return t.zk(B,e,i||"center")},n=function(e,i){return t.zk(R,e,i||"bar")},s=function(e){return null===e?e:t.zo(e)},a=function(){t.Y.call(this),this.mb=new t.dy,this.mb.ta("positionFormatter",t.ep),this.mb.ta("size",10),this.mb.ta("anchor","center"),this.mb.ta("offsetX",0),this.mb.ta("offsetY",0),this.mb.ta("rotation",0),this.mb.kb(this),this.Si={},t.T(this.ua,[["length",0,9],["type",0,9],["stroke",0,1],["fill",0,1],["hatchFill",0,9],["position",0,9]])},o=function(e,i){var n=t.Qc(e.Si);return t.D(i)?i.call(n,n):i},r=function(){t.Y.call(this),this.Ga("defaultAxis"),this.ci=[],this.Fk=[],this.w3=[],this.c4=[],this.sf=388,t.T(this.ua,[["overlapMode",this.sf,1],["startAngle",this.sf,9],["sweepAngle",this.sf,9],["fill",16,1],["width",this.sf,1],["radius",this.sf,9],["cornersRounding",this.sf,9],["drawFirstLabel",this.sf,9],["drawLastLabel",this.sf,9]])},l=function(e){return"log"===t.zk(H,e,"linear")?t.gt():t.ft()},h=function(e){var i=e.g("sweepAngle");return t.p(i)?i:e.Te.g("sweepAngle")},c=function(t,e,n){var s=e?t.Xa():t.yb();e=e?t.labels():t.qb(),e=i(e.g("position"));var a=t.Gq,o=s.g("position");return"outside"==e?(a+=t.lj/2+n,s.enabled()&&("outside"==o?a+=s.Ws:"center"==o&&(a+=s.Ws>t.lj?(s.Ws-t.lj)/2:0))):"inside"==e&&(a-=t.lj/2+n,s.enabled()&&("inside"==o?a-=s.Ws:"center"==o&&(a-=s.Ws>t.lj?(s.Ws-t.lj)/2:0))),a},u=function(i,n,s){var a=s?i.w3:i.c4;if(t.p(a[n]))return a[n];var o=s?i.labels():i.qb(),r=o.be(n),l=i.qa;return s=(s?l.Xa():l.yb()).get()[n],i=i.Am(n,s),s={value:{angle:0,radius:0}},a[n]=r?e(o,r):e(o,i,s),a[n]},d=function(e,n){n=t.ab(t.Vm(n,6));var s="center",a=i(e.labels().g("position"));return"inside"==a?n?0<n&&90>n?s="right-bottom":90==n?s="center-bottom":90<n&&180>n?s="left-bottom":180==n?s="left-center":180<n&&270>n?s="left-top":270==n?s="center-top":270<n&&(s="right-top"):s="right-center":"outside"==a&&(n?0<n&&90>n?s="left-top":90==n?s="center-top":90<n&&180>n?s="right-top":180==n?s="right-center":180<n&&270>n?s="right-bottom":270==n?s="center-bottom":270<n&&(s="left-bottom"):s="left-center"),s},p=function(){t.Y.call(this),t.T(this.ua,[["fill",16,1],["axisIndex",4,5],["position",4,9],["startSize",4,9],["endSize",4,9],["from",4,1],["to",4,1],["radius",4,1],["cornersRounding",4,9]])},g=function(e,i,n,s,a,o,r){r=!!t.p(r)&&r;var l=(o-a)/(s-n),h=e.Te.tc,c=e.Te.vc;if(s>n)for(e=n;e<=s;e++){var u=a+l*(e-n),d=e*Math.PI/180,p=h+u*Math.cos(d);u=c+u*Math.sin(d),r&&e==n?i.moveTo(p,u):i.lineTo(p,u)}else for(e=n;e>=s;e--)u=a+l*(e-n),d=e*Math.PI/180,p=h+u*Math.cos(d),u=c+u*Math.sin(d),r&&e==n?i.moveTo(p,u):i.lineTo(p,u);d=s*Math.PI/180,p=h+o*Math.cos(d),u=c+o*Math.sin(d),i.lineTo(p,u)},f=function(t,e,i,n,s){return"outside"==(t=t.g("position"))?e*(1+(s?0:n))+i/2:"inside"==t?e*(1-(s?0:n))-i/2:e*(1+(s?-.5:.5)*n)},b=function(e,i,n,s){var a=e.Te.vc;s=t.bb(s),i.x=e.Te.tc+n*Math.cos(s),i.y=a+n*Math.sin(s)},v=function(e,i,n,s,a,o,r,l,h,c,u,d,p,f,v,m,y){var S=(n+s)/2,w=(a+o)/2,x=(r+l)/2,C=e.Te.tc,D=e.Te.vc,T=i[p],k={},$={},O={},P={};b(e,k,a,n),b(e,$,o,s),b(e,O,l,s),b(e,P,r,n);var L=t.kn(0,0,0,0);L.left=Math.min(k.x,$.x,O.x,P.x),L.top=Math.min(k.y,$.y,O.y,P.y),L.width=Math.max(k.x,$.x,O.x,P.x)-L.left,L.height=Math.max(k.y,$.y,O.y,P.y)-L.top,k=[],O={},($={}).position="0",$.opacity=c,$.color=h,k.push($),O.position="1",O.opacity=d,O.color=u,k.push(O),c=(h=_(e.Te,e.g("axisIndex")).scale().Ne())?-1:1,(u={}).angle=-(S+90*c),u.keys=k,d=t.qk(),g(e,d,n,S,(r+a)/2,(x+w)/2,!0),g(e,d,S,s,(x+w)/2,(l+o)/2,!1),u.mode=d.rb(),g(e,T,n,S,a,w,!0),g(e,T,S,n,x,r,!1),!p&&f&&(r=C+t.db(n,a),n=D+t.eb(n,a),f<v/2?T.Ff(r,n,v-f,v-f,!1,h):T.Ff(r,n,f,f,!0,h)),g(e,T,S,s+.1*c,w,o,!0),p==i.length-1&&m&&(r=C+t.db(s+.1,l),n=D+t.eb(s+.1,l),m<y/2?T.Ff(r,n,y-m,y-m,!1,h):T.Ff(r,n,m,m,!0,h)),g(e,T,s+.1*c,S,l,x,!1),T.fill(u),t.qd(d)},m=function(e){e.Ca&&e.Ca.length&&(0,t.Pe)(e.Ca,(function(t){t.clear()}))},y=function(){t.Y.call(this),this.Oa=t.ok(),this.Ud=t.nk(),t.T(this.ua,[["radius",4,9],["stroke",16,1],["fill",16,1],["hatchFill",65536,1]])},S=function(){t.xv.call(this),this.vc=this.tc=window.NaN},w=function(){t.Y.call(this),this.o=t.qk(),this.o.stroke("none").fill(t.bm),this.f={},this.state=new t.ix(this),t.T(this.ua,[["stroke",16,1],["fill",16,1],["hatchFill",65536,1],["axisIndex",4,5]])},x=function(e,i,n){return t.D(i)?(e=i.call(e.f,e.f),e=n?t.Ub(e):t.Wb(e)):e=i,e},C=function(e,i){return t.p(i)?(e.G=i,e):e.G},D=function(e){e.ia||(e.ia=t.qk())},T=function(t,e){e&&(e.tag={X:t},e.tag.index=t.$().ma())},k=function(){w.call(this),t.T(this.ua,[["width",4,9],["position",4,9],["radius",4,9],["barDrawer",4,1]])},$=function(){w.call(this),t.T(this.ua,[["verticesCount",4,9],["verticesCurvature",4,9],["topRatio",4,9],["bottomRatio",4,9],["topRadius",4,9],["bottomRadius",4,9]])},O=function(e,i,n,s,a,o,r,l,h,c,u,d,p,g){g?(o=t.ab(n+o),s=t.ab(n+s/2-a)):(o=t.ab(n+s-o),s=t.ab(n+s/2+a)),n=h+Math.cos(t.bb(o))*l,l=c+Math.sin(t.bb(o))*l,h+=Math.cos(t.bb(s))*r,r=c+Math.sin(t.bb(s))*r,s=(n+h)/2,c=(l+r)/2;var f=t.bb(o+90);a=n+1e4*Math.cos(f);var b=l+1e4*Math.sin(f);a=(a-n)*(h-(f=(n*Math.pow(b-l,2)+h*Math.pow(a-n,2)+(a-n)*(b-l)*(r-l))/(Math.pow(b-l,2)+Math.pow(a-n,2))||0))/(b-l)+r||0,a=t.cb(Math.atan(t.gn(h,r,f,a)/t.gn(n,l,f,a))),u=o+(g?-u:u)+((f=e.g("topRatio"))<1-(b=e.g("bottomRatio"))?g?90-a:-(90-a):g?-(90-a):90-a),s+=Math.cos(t.bb(u))*d,c+=Math.sin(t.bb(u))*d,a=.5>(f=e.g("verticesCurvature"))?90:-90,e=s+.5*Math.cos(t.bb(u+a))*d,o=c+.5*Math.sin(t.bb(u+a))*d,a=.5>f?-90:90,s+=.5*Math.cos(t.bb(u+a))*d,d=c+.5*Math.sin(t.bb(u+a))*d,g?p?i.Sk(e,o,s,d,h,r):i.Sk(s,d,e,o,h,r):p?i.Sk(e,o,s,d,n,l):i.Sk(s,d,e,o,n,l)},P=function(){w.call(this),t.T(this.ua,[["size",4,9],["position",4,9],["radius",4,9],["type",4,9]]),this.ia=new t.dy,this.ia.kb(this),this.ia.ta("positionFormatter",t.ep),this.ia.ta("size",10),this.ia.ta("anchor","center"),this.ia.ta("offsetX",0),this.ia.ta("offsetY",0),this.ia.ta("rotation",0)},L=function(){w.call(this),t.T(this.ua,[["startWidth",4,9],["startRadius",4,9],["middleWidth",4,9],["middleRadius",4,9],["endWidth",4,9],["endRadius",4,9]])},G=function(e,i,n,s){var a=(s=s||0)+s,o=e.Wk(),r=i.scale(),l=o.tc,c=o.vc,u=i.Rj(),d=i.Vl(),p=h(i),g=o.Rj();o=t.L(e.g("startRadius"),g),o-=s,i=t.L(e.g("startWidth"),g),i+=a;var f=e.g("endRadius");u=null!=f?t.L(f,g):u,u+=s,s=null!=(s=e.g("endWidth"))?t.L(s,g):0,s+=a,f=null!=(f=e.g("middleRadius"))?t.L(f,g):.9*u,e=t.L(e.g("middleWidth"),g),e+=a,g=t.Za(r.transform(n),0,1),n=t.ab(d+g*p),r=t.bb(n),a=t.bb(t.ab(d+g*p+90)),d=t.bb(t.ab(d+g*p-90)),p=l+o*Math.cos(r),g=c+o*Math.sin(r);var b=l+f*Math.cos(r),v=c+f*Math.sin(r),m=l+u*Math.cos(r);return r=c+u*Math.sin(r),{angle:n,Dc:l,uc:c,Dja:o,Eja:i,Bja:f,Cja:e,zja:u,Aja:s,lY:p+i*Math.cos(a),nY:g+i*Math.sin(a),mY:p+i*Math.cos(d),oY:g+i*Math.sin(d),nW:b+e*Math.cos(a),pW:v+e*Math.sin(a),oW:b+e*Math.cos(d),qW:v+e*Math.sin(d),tT:m+s*Math.cos(a),vT:r+s*Math.sin(a),uT:m+s*Math.cos(d),wT:r+s*Math.sin(d)}},F=function(e,i){this.ka(),t.ux.call(this),this.Ga("circularGauge"),this.o=[],this.K=[],this.Bc=[],this.ba=[],this.aa=[],this.jd=[],this.f=[],this.Ka=this.Ba=this.$a=0,this.data(e||null,i),t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj),t.T(this.ua,[["fill",16,65],["stroke",16,1],["circularPadding",4,1],["encloseWithStraightLine",4,1],["startAngle",4,1],["sweepAngle",4,1],["defaultPointerType",0,0]]),this.da(!0),t.wr(this,"tooltip")},I=function(t,e){switch(e){case"bar":return t.K;case"marker":return t.Bc;case"needle":return t.ba;case"knob":return t.aa}return null},E=function(e,i){return t.xa(e.f,(function(t){return t.id()==i}))},A=function(e){return!(t.J(e,t.Mr)||t.J(e,t.Cr)||t.J(e,t.Jr)||t.A(e))&&!t.D(e)&&t.C(e)},U=function(t){for(var e=0,i=t.f.length;e<i;e++){var n=t.f[e];n&&n.B(4)}},_=function(t,e){return t.o[e]},j=function(e,i,n,s,a){var o=e.g("sweepAngle"),r=e.Vl(),l=r+o,h=t.bb(r),c=t.bb(l);e.P=e.D&&e.D.enabled()?t.L(e.D.g("radius"),a):0;var u=n+a*Math.cos(h);h=s+a*Math.sin(h);var d=n+a*Math.cos(c);if(c=s+a*Math.sin(c),0==o%360&&0!=o)i.Fe(n,s,a+e.b,a+e.b,r,o);else if(180<Math.abs(o)&&e.g("encloseWithStraightLine")){var p=90-(360-Math.abs(o))/2;i.Fe(u,h,e.b,e.b,0>o?r+90-p:r+270+p,0>o?-90+p:90-p),i.Fe(n,s,a+e.b,a+e.b,r,o,!0),i.Fe(d,c,e.b,e.b,l,0>o?-90+p:90-p,!0)}else if(0<(p=360-Math.abs(o)-90))i.Fe(u,h,e.b,e.b,0>o?r+90:r+270,0>o?-90:90),i.Fe(n,s,a+e.b,a+e.b,r,o,!0),i.Fe(d,c,e.b,e.b,l,0>o?-90:90,!0),i.Fe(n,s,e.b+e.P,e.b+e.P,0>o?l-45:l+45,0>o?-p:p,!0);else{p=t.bb(0>o?l-45:l+45);var g=n+Math.cos(p)*(e.b+e.P),f=s+Math.sin(p)*(e.b+e.P);p=t.bb(0>o?l-90:l+90);var b=d+Math.cos(p)*e.b,v=c+Math.sin(p)*e.b;p=t.bb(0>o?l-45+360-o+90:l+405-o-90);var m=n+Math.cos(p)*(e.b+e.P),y=s+Math.sin(p)*(e.b+e.P);p=t.bb(0>o?r+90:r-90);var S=u+Math.cos(p)*e.b,w=h+Math.sin(p)*e.b;p=f-v;var x=b-g;g=g*v-b*f,f=y-w,m=(x*(y=m*w-S*y)-(b=S-m)*g)/(p*b-f*x),p=(g*f-y*p)/(p*b-f*x),t.gn(m,p,n,s)<a?(i.Fe(u,h,e.b,e.b,0>o?r+90:r+270,0>o?-90:90),i.Fe(n,s,a+e.b,a+e.b,r,o,!0),i.Fe(d,c,e.b,e.b,l,0>o?-90:90,!0),i.lineTo(m,p)):i.Fe(n,s,a+e.b,a+e.b,0,360)}i.close()},M=function(e){return e.Za?e.Za.clone():t.kn(0,0,0,0)},N=function(t,e){var i=new F(t,e);return i.ta("defaultPointerType","needle"),i.Kg(),i},B={yQ:"inside",xz:"center",mZ:"outside"},R={kF:"bar",npa:"knob",av:"marker",hqa:"needle"},H={LINEAR:"linear",W8:"log"};t.H(a,t.Y);var z,V=(z={},t.sq(z,[[0,"length",function(e){return null===e?e:t.zo(e)}],t.Z.EZ,t.Z.qF,t.Z.cC,t.Z.xQ,[0,"position",function(t){return i(t)}]]),z);t.U(a,V),t.g=a.prototype,t.g.ra=t.Y.prototype.ra,t.g.sa=t.Y.prototype.sa,t.g.remove=function(){this.mb&&this.mb.remove(),this.f&&this.f.remove()},t.g.Gd=function(){var e=this.g("length");this.Ws=null!=e?t.L(e,this.b.Rj()):this.b.lj,this.Oc=this.b.Rj(),"outside"==(e=this.g("position"))?this.Oc+=this.b.lj/2+this.Ws/2:"inside"==e&&(this.Oc-=this.b.lj/2+this.Ws/2),this.Si.length=this.Ws,this.Si.radius=this.Oc,this.Si.cx=this.b.Wk().tc,this.Si.cy=this.b.Wk().vc,this.mb.clear();var i=this.g("stroke");e=this.g("fill"),t.D(i)||this.mb.ta("stroke",i),t.D(e)||this.mb.fill(e),this.mb.ta("size",this.Ws/2),i=this.g("type"),this.mb.type(i);var n=this.g("hatchFill");this.f||!n||t.cp(n)||(this.f=new t.dy,this.f.ta("positionFormatter",t.ep),this.f.ta("size",10),this.f.ta("anchor","center"),this.f.ta("offsetX",0),this.f.ta("offsetY",0),this.f.ta("rotation",0),this.f.O(this.O()),this.f.zIndex(K)),this.f&&(this.f.clear(),this.f.Dd(!0),this.f.ta("size",this.Ws/2),this.f.ta("type",i),this.f.ta("fill",e),this.f.ta("stroke",null))},t.g.hq=function(e,i){var n,s=t.bb(e),a=this.b.Wk().tc,r=this.b.Wk().vc;a+=this.Oc*Math.cos(s),s=r+this.Oc*Math.sin(s),r=this.mb.add({value:{x:a,y:s}}),n=t.p(r.g("rotation"))?r.g("rotation"):t.p(this.mb.g("rotation"))?this.mb.g("rotation"):0,this.Si.rotation=n+e+90,this.Si.x=a,this.Si.y=s,this.Si.angle=t.ab(e-st),this.Si.value=i,r.ta("rotation",n+e+90);var l=this.g("fill"),h=this.g("stroke");t.D(l)&&r.ta("fill",t.Ub(o(this,l))),t.D(h)&&r.ta("stroke",t.Wb(o(this,h))),this.f&&this.f.add({value:{x:a,y:s}}).rotation(n+e+90)},t.g.Rl=function(){if(this.zc()){if(this.J(8)){var t=this.zIndex(),e=.1*at;this.mb.zIndex(t+W*e),this.f&&this.f.zIndex(t+K*e),this.I(8)}this.J(2)&&(this.mb.O(this.O()),this.f&&this.f.O(this.O()),this.I(2)),this.mb.W(),this.f&&this.f.W(),this.I(4)}},t.g.F=function(){var e=a.u.F.call(this);return t.Tq(this,V,e),e},t.g.U=function(e,i){a.u.U.call(this,e,i),t.Iq(this,V,e,i)},t.H(r,t.Y);var q=function(){function e(e){return null===e?e:t.zo(e)}var i={};return t.sq(i,[t.Z.yz,t.Z.dC,[0,"startAngle",function(e){return null===e?e:t.ab(t.N(e)||0)}],[0,"width",e],[0,"sweepAngle",function(e){return null===e?e:t.Za(t.N(e)||0,-360,360)}],[0,"radius",e],[0,"cornersRounding",t.zo],[0,"drawFirstLabel",t.Dq],[0,"drawLastLabel",t.Dq]]),i}();t.U(r,q),r.prototype.ra=2|t.Y.prototype.ra,r.prototype.sa=912|t.Y.prototype.sa;var W=2,K=3;t.g=r.prototype,t.g.Pc=null,t.g.Da=null,t.g.rc=null,t.g.mb=null,t.g.Rc=null,t.g.scale=function(e){if(t.p(e)){if(e=t.jt(this.qa,e,null,3,null,this.ii,this)){var i=this.qa==e;this.qa=e,e.da(i),i||this.B(this.sf,3)}return this}return this.qa||(this.qa=t.ft(),t.K(this.qa,this.ii,this)),this.qa},t.g.ii=function(e){t.X(e,2)&&this.B(this.sf,3)},t.g.qb=function(e){return this.rc||(this.rc=new t.Zx,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.labels=function(e){return this.Da||(this.Da=new t.Zx,t.W(this,"labels",this.Da),this.Da.ga(!0,this.vf("labels")),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(){this.pj(),this.B(384,1)},t.g.yb=function(e){return this.Rc||(this.Rc=new a,t.W(this,"minorTicks",this.Rc),this.Rc.kb(this),this.Rc.b=this,t.K(this.Rc,this.li,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.Xa=function(e){return this.mb||(this.mb=new a,t.W(this,"ticks",this.mb),this.mb.kb(this),this.mb.b=this,t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0;t.X(e,8)&&(i=384,this.pj()),t.X(e,1)&&(i|=256),this.B(i,1)},t.g.Rj=function(){return this.Gq},t.g.Vl=function(){var t=this.g("startAngle");return null!=t?t+st:this.Te.Vl()},t.g.pj=function(){this.ci.length=0,this.Fk.length=0,this.w3.length=0,this.c4.length=0,this.ik=null},t.g.sy=function(){if(!this.ik||this.J(512)){if("allow-overlap"==this.g("overlapMode"))return!1;for(var e,i,n,s,a,o,r,l,h=this.scale(),c=[],u=[],d=this.g("drawFirstLabel"),p=this.g("drawLastLabel"),g=h.Xa().get(),f=g.length,b=-1,v=p&&!d?f-1:-1,m=-1,y=-1,S=this.labels().enabled(),w=h.yb().get(),x=0,C=0,D=w.length,T=this.qb().enabled();x<f||C<D;){if(e=g[x],n=w[C],i=h.transform(e),l=h.transform(n),n=e=s=a=null,-1==m&&S)for(r=x;-1==m&&r<f;)n=!r&&d||r==f-1&&p||0!=r&&r!=f-1?this.rd(r,!0):null,e=-1!=v?this.rd(v,!0):null,s=p&&!d?r==f-1?null:this.rd(f-1,!0):r!=b?this.rd(b,!0):null,t.bn(n,e)||t.bn(n,s)||(0>=(o=h.transform(g[r]))&&d||1<=o&&p||0<o&&1>o)&&(m=r),r++;i<=l&&x<f||C==D?(S&&x==m&&this.labels().enabled()?(-1==b&&(b=x),v=x,m=-1,c.push(!0)):c.push(!1),x++,i==l&&(this.labels().enabled()||this.Xa().enabled())&&(u.push(!1),C++)):(T?(n=this.rd(C,!1),-1!=v&&(e=this.rd(v,!0)),-1!=m&&(s=this.rd(m,!0)),-1!=y&&(a=this.rd(y,!1)),i=!(i=this.qb().be(C))||!t.p(i.enabled())||i.enabled(),t.bn(n,e)||t.bn(n,s)||t.bn(n,a)||!i?u.push(!1):0>=(o=h.transform(w[C]))||1<=o||0<o&&1>o?(-1==b&&(b=C),y=C,u.push(!0)):u.push(!1)):u.push(!1),C++)}T||(u=!1),S||(c=!1),this.ik={labels:c,qb:u},this.I(512)}return this.ik},t.g.rd=function(e,i){var n=i?this.ci:this.Fk;if(t.p(n[e]))return n[e];var s=u(this,e,i),a=i?this.labels():this.qb(),o=this.qa,r=(i?o.Xa():o.yb()).get()[e],l=o.transform(r);r=(o=a.be(e))&&t.p(o.g("autoRotate"))?o.g("autoRotate"):a.g("autoRotate");var p=o&&t.p(o.g("offsetX"))?o.g("offsetX"):a.g("offsetX"),g=o&&t.p(o.g("offsetY"))?o.g("offsetY"):a.g("offsetY"),f=c(this,i,r?s.height:0);f+=t.L(g,this.Te.Rj());var b=this.Vl();return g=h(this),l=t.ab(b+l*g),l+=t.L(p,g),g=t.bb(l),p=this.Te.tc+f*Math.cos(g),g=this.Te.vc+f*Math.sin(g),f=o&&t.p(o.g("rotation"))?o.g("rotation"):a.g("rotation"),r&&(f+=0<l&&180>l?l+270:l+90),a=o&&t.p(o.g("anchor"))?o.g("anchor"):r?a.g("anchor"):d(this,l),s.left=p,s.top=g,o=t.Eo(new t.I(0,0,s.width,s.height),a),s.left-=o.x,s.top-=o.y,a=t.Eo(s,a),a=t.Kb(t.bb(f),a.x,a.y),s=t.ln(s),a.transform(s,0,s,0,4),n[e]=s},t.g.Am=function(e,i){var n=this.scale();return n={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:n.CE((0,window.parseFloat)(i)),type:"number"},tickValue:{value:(0,window.parseFloat)(i),type:"number"},max:{value:t.p(n.max)?n.max:null,type:"number"},min:{value:t.p(n.min)?n.min:null,type:"number"},scale:{value:n,type:""}},(n=new t.Fw(n)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"mix"}),t.ov(n)},t.g.ke=function(e,i,n){var s=this.qa,a=n?s.Xa().get():s.yb().get(),o=(s=n?this.labels():this.qb()).be(e),r=o&&t.p(o.g("autoRotate"))?o.g("autoRotate"):s.g("autoRotate");o=u(this,e,n),n=c(this,n,r?o.height:0),a=this.Am(e,a[e]),o=s.add(a,{value:{angle:i,radius:n}},e),r||(e=h(this),s=o&&t.p(o.offsetX())?o.offsetX():s.offsetX(),i+=t.L(s,e),o.anchor(d(this,i)))},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.Xa().remove(),this.labels().remove(),this.yb().remove(),this.qb().remove()},t.g.W=function(){if(!this.zc())return this;var e=this.scale(),i=this.Vl(),n=h(this),s=this.Te.tc,a=this.Te.vc;if(this.Pc||(this.Pc=t.qk(),t.ru(this,this.Pc)),this.J(4)){var o=this.g("radius"),r=this.g("width");this.Gq=t.L(null!=o?o:"100%",this.Te.Rj()),this.lj=t.L(null!=r?r:"3%",this.Te.Rj()),o=t.L(this.g("cornersRounding"),this.lj);var l=this.Gq-this.lj/2,c=this.Gq+this.lj/2;this.Pc.clear(),this.Pc.Fe(s,a,this.Gq-this.lj/2,this.Gq-this.lj/2,i,n),o&&(r=s+t.db(i+n,c),c=a+t.eb(i+n,c),o<this.lj/2?this.Pc.Ff(r,c,this.lj-o,this.lj-o,!1,!1):this.Pc.Ff(r,c,o,o,!0,!1)),this.Pc.Fe(s,a,this.Gq+this.lj/2,this.Gq+this.lj/2,i+n,-n,!o),o&&(r=s+t.db(i,l),c=a+t.eb(i,l),o<this.lj/2?this.Pc.Ff(r,c,this.lj-o,this.lj-o,!1,!1):this.Pc.Ff(r,c,o,o,!0,!1)),this.Pc.close(),this.pj(),this.B(384),this.I(4)}if(this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka(),this.J(16)&&(this.Pc.fill(this.g("fill")),this.Pc.stroke(null),this.I(16)),this.J(256)){var u=this.Xa();u.B(4),u.Gd(),u=u.hq;var d=this.yb();d.B(4),d.Gd(),d=d.hq,this.I(256)}if(this.J(128)){var p=this.labels();p.ja(M(this.Te)),p.Dc(s),p.uc(a),p.UE(i),p.fz(n),p.Ty(this.Te.Rj()),p.clear(),p=this.ke;var g=this.qb();g.ja(M(this.Te)),g.Dc(s),g.uc(a),g.UE(i),g.fz(n),g.Ty(this.Te.Rj()),g.clear(),g=this.ke,this.I(128)}if(this.J(8)&&(s=this.zIndex(),a=.1*at,this.Pc.zIndex(s+a),this.Xa().zIndex(s),this.yb().zIndex(s),this.labels().zIndex(s+4*a),this.qb().zIndex(s+4*a),this.I(8)),this.J(2)&&(s=this.O(),this.Pc.parent(s),this.Xa().O(s),this.yb().O(s),this.labels().O(s),this.qb().O(s),this.I(2)),u||p||d||g){var f;if(o=(a=e.Xa().get()).length,l=(r=e.yb().get()).length,c=this.sy(),t.C(c)){s=c.labels;var b=c.qb}else s=!c,b=!c;for(var v,m,y,S=f=0;f<o||S<l;){var w=a[f];v=r[S];var x=e.transform(w);if(x<=(m=e.transform(v))&&f<o||S==l){c=t.ab(i+x*n);var C=t.A(s)?s[f]:s;(t.A(s)&&s[f]||t.da(s))&&u&&u.call(this.mb,c,w),C&&p&&p.call(this,f,c,!0),y=x,f++}else c=t.ab(i+m*n),C=t.A(b)?b[S]:b,(t.A(b)&&b[S]||t.da(b))&&d&&y!=m&&d.call(this.Rc,c,v),C&&g&&y!=m&&g.call(this,S,c,!1),S++}}return u&&this.Xa().Rl(),d&&this.yb().Rl(),p&&this.labels().W(),g&&this.qb().W(),this.labels().da(!1),this.qb().da(!1),this.Xa().da(!1),this.yb().da(!1),this},t.g.F=function(){var e=r.u.F.call(this);return t.Tq(this,q,e),e.scale=this.scale().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),e},t.g.U=function(e,i){r.u.U.call(this,e,i),t.Iq(this,q,e,i);var n=e.scale;if(t.z(n))var s=l(n);else t.C(n)?(s=l(n.type)).N(n):s=null;s&&this.scale(s),this.Xa(e.ticks),this.yb(e.minorTicks),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels)},t.g.R=function(){t.sd(this.Da,this.rc,this.mb,this.Rc,this.Pc),this.Pc=this.Rc=this.mb=this.Da=this.rc=null,r.u.R.call(this)};var Y=r.prototype;Y.scale=Y.scale,Y.ticks=Y.Xa,Y.minorTicks=Y.yb,Y.labels=Y.labels,Y.minorLabels=Y.qb,t.H(p,t.Y);var X={};t.sq(X,[[0,"fill",t.Ub],[0,"axisIndex",t.Bq],[0,"position",i],[0,"startSize",s],[0,"endSize",s],[0,"from",t.Bq],[0,"to",t.Bq],[0,"radius",s],[0,"cornersRounding",t.zo]]),t.U(p,X),t.g=p.prototype,t.g.sa=65552|t.Y.prototype.sa,t.g.ra=4|t.Y.prototype.ra,t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.remove=function(){this.ia&&this.ia.parent(null),this.Ca&&this.Ca.length&&(0,t.Pe)(this.Ca,(function(t){t.parent(null)}))},t.g.W=function(){var e=this.Te,i=_(e,this.g("axisIndex"));if(!this.zc())return this;if(!i||!i.enabled())return this.ia&&this.ia.clear(),m(this),this;var n=this.g("fill"),s=t.C(n)&&t.p(n.keys)&&!t.p(n.cx)&&!t.p(n.cy);if(s&&this.B(4),m(this),this.J(4)){var a=i.scale(),o=this.g("from"),r=this.g("to");if(a.zk(o)||a.zk(r))return this.ia&&this.ia.clear(),this.I(4),this;if(this.ia?this.ia.clear():this.ia=t.qk(),this.Ca||(this.Ca=[]),m(this),o!=r){var l=r<o,c=t.Za(a.transform(l?r:o),0,1),u=t.Za(a.transform(l?o:r),0,1);if(c==u)return this;a=(o=i.Vl())+c*(r=h(i)),(r=(o+=u*r)-a)||(r=c==u?0:360),u=t.bb(a),c=t.bb(o);var d=this.g("startSize"),p=this.g("endSize");d=null!=d?d:0,p=null!=p?p:"10%";var b=(0,window.parseFloat)(l?p:d)/100;l=(0,window.parseFloat)(l?d:p)/100,d=function(t,e,i,n,s,a){var o=e.Rj();e=f(t,o,i,s,!0);var r=f(t,o,i,a,!0),l=f(t,o,i,s,!1);if(l<e){var h=l;l=e,e=h}(o=f(t,o,i,a,!1))<r&&(h=o,o=r,r=h);var c=l-e,u=o-r;return e=f(t,n,i,s,!0),r=f(t,n,i,a,!0),(l=f(t,n,i,s,!1))<e&&(h=l,l=e,e=h),(o=f(t,n,i,a,!1))<r&&(h=o,o=r,r=h),[l+(t=(c-(l-e))/2),e-t,o+(i=(u-(o-r))/2),r-i]}(this,e,null!=(d=this.g("radius"))?0:i.lj,null!=d?t.L(d,e.Rj()):i.Rj(),b,l);var y=d[0];l=d[1],b=d[2];var S=d[3],w=this.g("cornersRounding");d=y-l,p=t.L(w,d);var x=b-S;w=t.L(w,x);var C,D=e.tc;if(e=e.vc,s){for(var T=n.keys,k=n.keys.length,$=0;$<k-1;$++)this.Ca[$]?C=this.Ca[$]:this.Ca[$]=C=t.qk(),C.clear().stroke("none").fill("none").parent(this.O()).zIndex(this.zIndex());for($=0;$<k-1;$++){C=T[$];var O=T[$+1],P=C.offset,L=O.offset;v(this,this.Ca,a+r*P,a+r*L,l+(S-l)*P,l+(S-l)*L,y+(b-y)*P,y+(b-y)*L,C.color,t.p(C.opacity)?C.opacity:t.p(n.opacity)?n.opacity:1,O.color,t.p(O.opacity)?O.opacity:t.p(n.opacity)?n.opacity:1,$,p,d,w,x)}}l==S?(n=D+Math.cos(u)*l,C=e+Math.sin(u)*l,this.ia.moveTo(n,C),this.ia.arcTo(l,l,a,r)):(n=D+Math.cos(u)*l,C=e+Math.sin(u)*l,this.ia.moveTo(n,C),g(this,this.ia,a,o,l,S)),i=i.scale().Ne(),w&&(n=D+t.db(o,b),C=e+t.eb(o,b),w<x/2?this.ia.Ff(n,C,x-w,x-w,!1,i):this.ia.Ff(n,C,w,w,!0,i)),b==y?(n=D+Math.cos(c)*b,c=e+Math.sin(c)*b,w||this.ia.lineTo(n,c),this.ia.arcTo(b,b,o,-r)):g(this,this.ia,o,a,b,y),p&&(n=D+t.db(a,l),C=e+t.eb(a,l),p<d/2?this.ia.Ff(n,C,d-p,d-p,!1,i):this.ia.Ff(n,C,p,p,!0,i)),this.ia.close()}else this.ia.clear();this.I(4)}return this.J(16)&&(s?this.ia.fill("none"):this.ia.fill(this.g("fill")),this.ia.stroke("none"),this.I(16)),this.J(8)&&(this.ia.zIndex(this.zIndex()),this.Ca&&this.Ca.length&&(0,t.Pe)(this.Ca,(function(t){t.zIndex(this.zIndex())}),this),this.I(8)),this.J(2)&&(this.ia.parent(this.O()),this.Ca&&this.Ca.length&&(0,t.Pe)(this.Ca,(function(t){t.parent(this.O())}),this),this.I(2)),this},t.g.F=function(){var e=p.u.F.call(this);return t.Tq(this,X,e),e},t.g.U=function(e,i){p.u.U.call(this,e,i),t.Iq(this,X,e)},t.g.R=function(){t.sd(this.Ca,this.ia),this.ia=this.Ca=null,p.u.R.call(this)},t.H(y,t.Y);var J={};t.sq(J,[[0,"radius",s],t.Z.Yn,t.Z.yz,t.Z.xQ]),t.U(y,J),t.g=y.prototype,t.g.sa=65552|t.Y.prototype.sa,t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.W=function(){if(!this.zc())return this;this.J(16)&&(this.Ud.fill(this.g("fill")),this.Ud.stroke(this.g("stroke")),this.I(16));var e=this.g("hatchFill");if(this.J(65536)&&(this.f||!e||t.cp(e)||(this.f=t.nk(),this.f.parent(this.Oa),this.f.zIndex(1)),this.f&&(this.f.fill(e),this.f.stroke(null),this.B(4)),this.I(65536)),this.J(2)&&(this.Oa.parent(this.O()),this.Ud.parent(this.Oa),this.f&&this.f.parent(this.Oa),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.Ud.zIndex(0),this.f&&this.f.zIndex(1),this.I(8)),this.J(4)){e=t.L(this.g("radius"),this.Te.Rj());var i=this.Te.tc,n=this.Te.vc;this.Ud.To(i),this.Ud.Uo(n),this.Ud.Eb(0>e?0:e),this.f&&(this.f.To(i),this.f.Uo(n),this.f.Eb(e)),this.I(4)}return this},t.g.F=function(){var e=y.u.F.call(this);return t.Tq(this,J,e),e},t.g.U=function(e,i){y.u.U.call(this,e,i),t.Iq(this,J,e,i)},t.g.R=function(){t.sd(this.Ud,this.f,this.Oa),this.Oa=this.f=this.Ud=null,y.u.R.call(this)},t.H(S,t.xv),t.g=S.prototype,t.g.Dc=function(e){return t.p(e)?(e=t.N(e),this.tc!=e&&(this.tc=e,this.B(4,9)),this):this.tc},t.g.uc=function(e){return t.p(e)?(e=t.N(e),this.vc!=e&&(this.vc=e,this.B(4,9)),this):this.vc},t.g.Ty=function(e){return t.p(e)?(e=t.N(e),this.D!=e&&(this.D=e,this.B(4,9)),this):this.D},t.g.UE=function(e){t.p(e)&&(e=null===e?e:t.ab(t.N(e)||0),this.P!=e&&(this.P=e,this.B(4,1)))},t.g.fz=function(e){return t.p(e)?(e=null===e?e:t.Za(t.N(e)||0,-360,360),this.G!=e&&(this.G=e,this.B(4,1)),this):this.G},t.g.tf=function(){var e=this.ja()||t.kn(0,0,0,0),i=e.left,n=e.top,s=e.width,a=e.height;e=new t.I(0,0,this.Oi,this.Ni);var o=new t.gb(0,0);if(this.ja()||!(0,window.isNaN)(this.tc)&&!(0,window.isNaN)(this.vc)){var r=this.g("offsetX"),l=this.g("offsetY");i=(0,window.isNaN)(this.tc)?i+s/2:this.tc,n=(0,window.isNaN)(this.vc)?n+a/2:this.vc;var h=null!=this.P?this.P:0,c=null!=this.G?this.G:360;s=t.p(this.D)&&!(0,window.isNaN)(this.D)?t.L(l,this.D):this.ja()?t.L(l,Math.min(s,a)/2):0,r=h+t.L(r,c),o.x=i+Math.cos(t.bb(r))*s,o.y=n+Math.sin(t.bb(r))*s}else o.x=0,o.y=0;return s=this.g("anchor"),s=t.Eo(new t.I(0,0,this.Oi,this.Ni),s),o.x-=s.x,o.y-=s.y,this.Lg+=o.x,this.Mg+=o.y,e.left=o.x,e.top=o.y,this.xb.oc(1,0,0,1,0,0),this.xb.translate(this.Lg,this.Mg),this.xb.clip(new t.I(0,0,this.nn,this.ln)),e},t.H(w,t.Y),w.prototype.sa=65552|t.Y.prototype.sa,w.prototype.ra=4|t.Y.prototype.ra;var Z={};t.sq(Z,[t.Z.qF,t.Z.cC,t.Z.xQ,[0,"axisIndex",t.Bq]]),t.U(w,Z),t.g=w.prototype,t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.ou=function(){return!1},t.g.Ch=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.B(4,5)),this):null!=this.P?this.P:this.i?0:C(this)},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.ma=function(){return this.md?-1:(0,t.za)(this.Te.Ue(),this)},t.g.yh=function(e){return t.p(e)?(this.Wq=e,this):this.Wq},t.g.id=function(e){return t.p(e)?(this.he=e,this):this.he||String(this.Wq)},t.g.remove=function(){this.ia&&(t.J(this.ia,t.Ag)?this.ia.parent(null):this.ia.O(null)),this.b&&(t.J(this.b,t.Ag)?this.b.parent(null):this.b.O(null))},t.g.data=function(e,i){return t.p(e)?(this.qB!==e&&(this.qB=e,t.qd(this.gm),this.sd=null,t.J(e,t.Cr)?this.i=this.gm=e.Ui():t.J(e,t.Mr)?this.i=this.gm=e.Yd():this.i=null===e?null:(this.gm=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.i&&t.K(this.i,this.dd,this),this.B(4,5)),this):this.i},t.g.dd=function(e){t.X(e,16)&&this.B(4,5)},t.g.$=function(){return this.i?this.sd||(this.sd=this.i.$()):this.Te.$()},t.g.Ec=function(){return this.i?this.sd=this.i.$():this.Te.Ec()},t.g.W=function(){if(this.J(16)){var e=this.g("fill"),i=this.g("stroke");this.ia.fill(x(this,e,!0)),this.ia.stroke(x(this,i,!1)),this.I(16)}return this.J(8)&&(this.ia.zIndex(this.zIndex()),this.o.zIndex(this.zIndex()+1),this.b&&(this.b.zIndex(this.zIndex()+.1*at),this.o.zIndex(this.b.zIndex()+1)),this.I(8)),this.J(2)&&(t.J(this.ia,t.Ag)?this.ia.parent(this.O()):this.ia.O(this.O()),this.b&&(t.J(this.b,t.Ag)?this.b.parent(this.O()):this.b.O(this.O())),this.o.parent(this.O()),this.I(2)),this},t.g.Ic=function(e){this.oe&&!e||(this.oe=new t.Fw);var i={series:{value:this,type:""},index:{value:(e=this.$()).ma(),type:"number"},value:{value:e.get("value"),type:"number"}};return this.oe.lg(e).Li([this]),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.pk=t.ia,t.g.wm=t.ia,t.g.ml=t.ia,t.g.pq=t.ia,t.g.ig=function(e){return(e=w.u.ig.call(this,e)).pointIndex=t.N(t.so(e.domTarget).index),e},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var s=this.$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,series:this,iterator:s,pointIndex:i,target:this,originalEvent:e}},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(){var e;return(e=!t.mx(this.state,t.vo))&&(e=!(this.state.fk()&t.vo)),e||!this.enabled()||this.state.Vh(t.vo,this.state.Gc==t.gm?window.NaN:void 0),this},t.g.$i=function(e){if(!this.enabled())return this;if(t.A(e)){for(var i=t.sx(this.state,t.vo),n=0;n<i.length;n++)t.Aa(e,i[n])||this.state.Vh(t.vo,i[n]);t.qx(this.state,e)}else t.ea(e)&&(this.Md(),t.qx(this.state,e));return this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo)},t.g.ie=function(){return this},t.g.ej=function(e){return t.p(e)?((e=null===e?null:t.Bk(e))!=this.et&&(this.et=e),this):this.et},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.F=function(){var e=w.u.F.call(this);return t.Tq(this,Z,e),e.pointerType=this.Ma(),this.i&&(e.data=this.data().F()),t.p(this.P)&&(e.dataIndex=this.P),this.he&&(e.id=this.id()),this.Wq!=this.ma()&&(e.autoIndex=this.yh()),e},t.g.U=function(e,i){w.u.U.call(this,e,i),t.Iq(this,Z,e,i),this.id(e.id),this.yh(e.autoIndex),this.Ch(e.dataIndex),"data"in e&&this.data(e.data||null)},t.g.R=function(){t.sd(this.ia,this.b,this.o),this.o=this.b=this.ia=null,w.u.R.call(this)};var Q=w.prototype;Q.id=Q.id,Q.data=Q.data,Q.dataIndex=Q.Ch,t.H(k,w),k.prototype.Ma=function(){return"bar"};var tt={};t.sq(tt,[[0,"width",s],[0,"position",i],[0,"radius",s],[0,"barDrawer",t.gr]]),t.U(k,tt),k.prototype.W=function(){var e=this.Wk(),i=_(e,this.g("axisIndex"));if(!this.zc())return this;if(D(this),!i||!i.enabled())return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;if(this.J(65536)){var n=this.g("hatchFill");this.b||!n||t.cp(n)||(this.b=t.qk(),this.b.parent(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.fill(n),this.b.stroke(null),this.B(4)),this.I(65536)}if(this.J(4)){n=e.tc;var s=e.vc,a=i.scale(),o=this.Ec();o.select(this.Ch());var r=(0,window.parseFloat)(o.get("value"));if(a.zk(r))return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;this.ia?this.ia.clear():this.ia=t.qk();var l=i.Rj(),c=i.lj;o=i.Vl();var u=h(i),d=this.g("radius");i=null!=d?t.L(d,e.Rj()):l,e=null!=(l=this.g("width"))?t.L(l,e.Rj()):c,c=t.p(d)?e/2:e/2+c/2,"outside"==(d=this.g("position"))?i+=c:"inside"==d&&(i-=c),c=t.Za(a.transform(0),0,1),0<=u^(r=t.Za(a.transform(r),0,1))>=c?(a=r,d=c):(a=c,d=r),a=t.ab(o+a*u),(o=t.ab(t.ab(o+d*u)-a))||(o=r==c?0:360),this.f.cx=n,this.f.cy=s,this.f.radius=i,this.f.startAngle=t.ab(a-st),this.f.sweepAngle=o,this.f.width=e,r={centerX:n,centerY:s,radius:i,startAngle:a,sweepAngle:o,width:e,path:this.ia},(u=this.g("barDrawer")).call(r,r),T(this,this.ia),this.b&&(n={centerX:n,centerY:s,radius:i,startAngle:a,sweepAngle:o,width:e,path:this.b},u.call(n,n)),(t.D(this.g("fill"))||t.D(this.g("stroke")))&&this.B(16),this.I(4)}return k.u.W.call(this),this},k.prototype.F=function(){var e=k.u.F.call(this);return t.Tq(this,tt,e,"Bar pointer"),e},k.prototype.U=function(e,i){k.u.U.call(this,e,i),t.Iq(this,tt,e,i)},t.H($,w),$.prototype.Ma=function(){return"knob"};var et=function(){var e={};return t.sq(e,[[0,"verticesCount",function(e){return(e=t.N(e))?e:this.g("verticesCount")}],[0,"verticesCurvature",t.Cq],[0,"topRatio",t.er],[0,"bottomRatio",t.er],[0,"topRadius",s],[0,"bottomRadius",s]]),e}();t.U($,et),$.prototype.W=function(){var e=this.Wk(),i=_(e,this.g("axisIndex"));if(!this.zc())return this;if(D(this),!i||!i.enabled())return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;if(this.J(65536)){var n=this.g("hatchFill");this.b||!n||t.cp(n)||(this.b=t.qk(),this.b.parent(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.fill(n),this.b.stroke(null),this.B(4)),this.I(65536)}if(this.J(4)){n=e.tc;var s=e.vc,a=i.scale(),o=this.Ec();o.select(this.Ch());var r=(0,window.parseFloat)(o.get("value"));if(a.zk(r))return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;this.ia?this.ia.clear():this.ia=t.qk(),o=i.Rj();var l=i.Vl(),c=h(i);i=null!=(i=this.g("topRadius"))?t.L(i,e.Rj()):.7*o;var u=this.g("bottomRadius");e=null!=u?t.L(u,e.Rj()):.6*o,o=this.g("verticesCount");var d=this.g("topRatio"),p=this.g("bottomRatio");d*=(u=360/o)/2,p*=u/2,a=t.Za(a.transform(r),0,1),a=t.ab(l+a*c),this.f.cx=n,this.f.cy=s,this.f.topRadius=i,this.f.bottomRadius=e,this.f.angle=t.ab(a-st),c=Math.abs(i-e)/2,l=i<e;var g=this.g("verticesCurvature");for(r=.5>g?90:-90,c*=Math.abs(.5-g),this.ia.clear(),g=0;g<o;g++){var f=t.ab(a+g*u);this.ia.Fe(n,s,e,e,f,p,0!=g),O(this,this.ia,f,u,d,p,i,e,n,s,r,c,l,!0);var b=t.ab(f+u/2-d);this.ia.Fe(n,s,i,i,b,2*d),O(this,this.ia,f,u,d,p,i,e,n,s,r,c,l,!1),f=t.ab(f+u-p),this.ia.Fe(n,s,e,e,f,p)}if(this.ia.close(),T(this,this.ia),this.b){for(this.b.clear(),g=0;g<o;g++)f=t.ab(a+g*u),this.b.Fe(n,s,e,e,f,p,0!=g),O(this,this.b,f,u,d,p,i,e,n,s,r,c,l,!0),b=t.ab(f+u/2-d),this.b.Fe(n,s,i,i,b,2*d),O(this,this.b,f,u,d,p,i,e,n,s,r,c,l,!1),f=t.ab(f+u-p),this.b.Fe(n,s,e,e,f,p);this.b.close()}this.I(4)}return $.u.W.call(this),this},$.prototype.F=function(){var e=$.u.F.call(this);return t.Tq(this,et,e,"Knob pointer"),e},$.prototype.U=function(e,i){$.u.U.call(this,e,i),t.Iq(this,et,e,i)},t.H(P,w),P.prototype.Ma=function(){return"marker"};var it=function(){var e={};return t.sq(e,[[0,"size",t.zo],[0,"position",i],[0,"radius",s],[0,"type",function(e){return t.D(e)?e:t.Ok(e,"line")}]]),e}();t.U(P,it),P.prototype.W=function(){var e=this.Wk(),i=_(e,this.g("axisIndex"));if(!this.zc())return this;if(D(this),!i||!i.enabled())return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;var n=this.g("type");if(this.J(65536)){var s=this.g("hatchFill");this.b||!s||t.cp(s)||(this.b=new t.dy,this.b.ta("positionFormatter",t.ep),this.b.ta("size",10),this.b.ta("anchor","center"),this.b.ta("offsetX",0),this.b.ta("offsetY",0),this.b.ta("rotation",0),this.b.O(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.ta("fill",s),this.b.ta("stroke",null),this.b.ta("size",this.D),this.b.ta("type",n),this.B(4)),this.I(65536)}if(this.J(4)){var a=e.tc;s=e.vc;var o=i.scale(),r=this.Ec();r.select(this.Ch());var l=(0,window.parseFloat)(r.get("value"));if(o.zk(l))return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;var c=i.Rj(),u=i.lj,d=i.Vl(),p=h(i);i=null!=(i=this.g("radius"))?t.L(i,e.Rj()):c,c=this.g("size"),this.D=null!=c?t.L(c,e.Rj()):u,"outside"==(e=this.g("position"))?i+=this.D+u/2:"inside"==e&&(i-=this.D+u/2),e=t.Za(o.transform(l),0,1),e=t.ab(d+e*p),o=t.bb(e),d=a+i*Math.cos(o),o=s+i*Math.sin(o),this.f.cx=a,this.f.cy=s,this.f.radius=i,this.f.size=this.D,this.f.angle=t.ab(e-st),this.ia.ta("size",this.D),this.ia.ta("type",n),(a=this.ia.add({value:{x:d,y:o}},0)).ta("rotation",e+90),this.b&&(this.b.ta("size",this.D),this.b.ta("type",n),this.b.add({value:{x:d,y:o}},0).ta("rotation",e+90)),(t.D(this.g("fill"))||t.D(this.g("stroke")))&&this.B(16),this.I(4)}return P.u.W.call(this),this.ia.W(),this.b&&this.b.W(),a&&a.Vd()&&(a.Vd().tag=r.ma()),this},P.prototype.F=function(){var e=P.u.F.call(this);return t.Tq(this,it,e,"Marker pointer"),e},P.prototype.U=function(e,i){P.u.U.call(this,e,i),t.Iq(this,it,e,i)},t.H(L,w),L.prototype.Ma=function(){return"needle"};var nt={};t.sq(nt,[[0,"startWidth",s],[0,"startRadius",s],[0,"middleWidth",s],[0,"middleRadius",s],[0,"endWidth",s],[0,"endRadius",s]]),t.U(L,nt),t.g=L.prototype,t.g.ph=function(t){return null!=this.Pa[t]},t.g.remove=function(){L.u.remove.call(this),this.o.clear()},t.g.W=function(){var e=_(this.Wk(),this.g("axisIndex"));if(!this.zc())return this;if(D(this),!e||!e.enabled())return this.o.clear(),this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;if(this.J(65536)){var i=this.g("hatchFill");this.b||!i||t.cp(i)||(this.b=t.qk(),this.b.parent(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.fill(i),this.b.stroke(null),this.B(4)),this.I(65536)}if(this.J(4)){i=e.scale();var n=this.Ec();n.select(this.Ch()),n=(0,window.parseFloat)(n.get("value"));var s=G(this,e,n);if(i.zk(n))return this.o.clear(),this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;this.ia||(this.ia=t.qk()),this.f.cx=s.Dc,this.f.cy=s.uc,this.f.startRadius=s.Dja,this.f.startWidth=s.Eja,this.f.middleRadius=s.Bja,this.f.middleWidth=s.Cja,this.f.endRadius=s.zja,this.f.endWidth=s.Aja,this.f.angle=t.ab(s.angle-st),this.ia.clear().moveTo(s.tT,s.vT).lineTo(s.nW,s.pW).lineTo(s.lY,s.nY).lineTo(s.mY,s.oY).lineTo(s.oW,s.qW).lineTo(s.uT,s.wT).close(),this.b&&this.b.clear().moveTo(s.tT,s.vT).lineTo(s.nW,s.pW).lineTo(s.lY,s.nY).lineTo(s.mY,s.oY).lineTo(s.oW,s.qW).lineTo(s.uT,s.wT).close(),e=G(this,e,n,5),this.o.clear().moveTo(e.tT,e.vT).lineTo(e.nW,e.pW).lineTo(e.lY,e.nY).lineTo(e.mY,e.oY).lineTo(e.oW,e.qW).lineTo(e.uT,e.wT).close(),T(this,this.o),(t.D(this.g("fill"))||t.D(this.g("stroke")))&&this.B(16),this.I(4)}return L.u.W.call(this),this},t.g.F=function(){var e=L.u.F.call(this);return t.Tq(this,nt,e,"Needle pointer"),e},t.g.U=function(e,i){L.u.U.call(this,e,i),t.Iq(this,nt,e,i)},t.H(F,t.ux),F.prototype.sa=446480|t.ux.prototype.sa,F.prototype.Ma=function(){return"circular-gauge"};var st=-90,at=1e-4;t.g=F.prototype,t.g.co=function(){F.u.co.call(this);for(var t=this.La("chartElements")||{},e=0,i=this.o.length;i--;)this.o[i]&&e++;t.axes=e,this.La("chartElements",t)},t.g.Ue=function(){return this.f},t.g.ts=function(){return[this]},t.g.oq=function(){return[]},t.g.Uu=function(){return!0},t.g.tL=function(){return new S},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),this.sd=null,t.J(e,t.Cr)?this.i=this.Yc=e.Ui():this.i=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.la=this.i,t.K(this.la,this.dd,this),U(this),this.B(266496,5)),this):this.la},t.g.dd=function(e){t.X(e,16)&&(U(this),this.B(266496,5))},t.g.$=function(){return this.sd||this.Ec()},t.g.Ec=function(){return this.sd=this.data().$()},t.g.bl=function(t,e,i,n,s){return t={type:"hovered"==t?"pointshover":"pointsselect",seriesStatus:this.mG(i,n),currentPoint:this.XD(i,t,n),actualTarget:e.target,target:this,originalEvent:e},s&&(t.PT=!0),t},t.g.iS=function(e){return this.D||(this.D=new y,t.W(this,"cap",this.D),this.D.Wk(this),t.K(this.D,this.Hia,this),this.B(16384,1)),t.p(e)?(this.D.N(e),this):this.D},t.g.Hia=function(e){var i=0,n=0;t.X(e,1)&&(i|=16384,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.xe=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jd[n];return a||(a=new p,this.jd[n]=a,a.zIndex(30+at*this.Ba),this.Ba++,a.Wk(this),a.Ga(this.vf("defaultRangeSettings")),t.K(a,this.Iia,this),this.B(266240,5)),t.p(s)?(a.N(s),this):a},t.g.Iia=function(){this.B(131072,1)},t.g.$z=function(e,i,s,a){var o="knob"==(e=n(e)),r=ot[e],l=I(this,e);if(r){r=new r;var h=this.f[this.f.length-1];h=h?h.yh()+1:0,this.f.push(r),l[i]=r,i=o?this.Ka++:this.$a++,o=(o?20:40)+at*i,r.yh(h),C(r,i),r.zIndex(o),t.ea(s)?r.Ch(s):r.data(s,a),r.Wk(this),s=this.vf("defaultPointerSettings"),r.Ga(s.base),r.Ga(s[t.pm(e)]),t.K(r,this.fb,this),this.B(266244,5)}else r=null;return r},t.g.vaa=function(t){var e=[],i=this.g("defaultPointerType"),n=arguments.length,s=I(this,i).length;if(this.ka(),n)for(var a=0;a<n;a++)e.push(this.$z(i,s+a,arguments[a]));return this.da(!0),e},t.g.zaa=function(t){return this.YZ(E(this,t))},t.g.YZ=function(e){var i=this.f[e];if(i){t.Pp++,t.Ca(this.f,e,1),e=i.Ma(),e=I(this,e);var n=(0,t.za)(e,i);-1!=n&&t.Ca(e,n,1),t.qd(i),this.B(266240,5),t.Sp()}return this},t.g.yaa=function(){if(this.f.length){t.Pp++;var e=this.f;this.f=[],this.K=[],this.aa=[],this.Bc=[],this.ba=[],this.Ka=this.$a=0,t.sd(e),this.B(266240,5),t.Sp()}return this},t.g.waa=function(t){return this.XZ(E(this,t))},t.g.XZ=function(t){return this.f[t]||null},t.g.nU=function(e){return t.ya(this.f,(function(t){return t.yh()==e}))},t.g.xaa=function(){return this.f.length},function(){function e(e){return function(i,n,s,a){var o=arguments.length,r=t.A(i)?window.NaN:t.N(i);if(3<o){(0,window.isNaN)(r)&&(r=0);var l=n,h=s,c=a}else 2<o?A(i)?(r=0,l=i,h=n,c=s):((0,window.isNaN)(r)&&(r=0),A(n)?(l=n,h=s):(h=n,c=s)):1<o?A(i)?(r=0,l=i,h=n):(0,window.isNaN)(r)?(r=0,h=i,c=n):A(n)?l=n:h=n:0<o?(0,window.isNaN)(r)&&(r=0,A(i)?l=i:h=i):r=0;return(o=I(this,e)[r])||(o=this.$z(e,r,h,c)),t.p(l)?(o.N(l),this):o}}var i,n=F.prototype;for(i in R)n[t.pm(R[i])]=e(R[i])}(),F.prototype.fb=function(e){var i=0,n=0;t.X(e,1)&&(i|=4096,n|=1),t.X(e,4)&&(i|=266240,n|=5),this.B(i,n)},F.prototype.axis=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.o[n];return a||((a=new r).Ga(this.vf("defaultAxisSettings")),a.Wk(this),this.o[n]=a,t.K(a,this.xo,this),this.B(32772,1)),t.p(s)?(a.N(s),this):a},F.prototype.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=32768,n|=1),t.X(e,8)&&(i|=135172),t.X(e,2)&&(i|=262148),this.B(i,n)};var ot={};ot.bar=k,ot.knob=$,ot.marker=P,ot.needle=L;var rt=function(){var e={};return t.sq(e,[t.Z.yz,t.Z.Yn,t.Z.zz,[0,"circularPadding",t.zo],[0,"encloseWithStraightLine",t.Cq],[0,"sweepAngle",function(e){return t.Za(t.N(e)||0,-360,360)}],[0,"defaultPointerType",n]]),e}();t.U(F,rt),t.g=F.prototype,t.g.Rj=function(){return this.na},t.g.Vl=function(){return this.g("startAngle")+st},t.g.yi=function(){return this.Ha?this.Ha.clone():t.kn(0,0,0,0)},t.g.LX=function(t){t.ja(M(this)),t.Ty(this.Rj()),t.Dc(this.tc),t.uc(this.vc),t.UE(this.Vl()),t.fz(this.g("sweepAngle"))},t.g.Qh=function(e){var i,n,s=t.Ga(this.K,this.Bc,this.ba,this.aa);if(t.xr(this.D,this.o,this.jd,s),this.J(262144)){var a=!1;if((0,t.Pe)(this.o,(function(t){t.scale().Bg(),a=a||t.scale().Of()})),a){var o=0;for(i=s.length;o<i;o++)if(n=s[o]){var r=n.$(),l=n.g("axisIndex");r.select(n.Ch()),(l=this.o[l])&&(l.scale().Xc(r.get("value")),t.J(n,k)&&l.scale().Xc(0))}}(0,t.Pe)(this.o,(function(t){t.scale().Hg()})),U(this),this.B(32768),this.B(131072),this.I(262144)}if(this.J(4)){for(function(e,i){e.G?e.G.clear():e.G=e.Na.path(),e.ea=1,e.b=t.L(e.g("circularPadding"),e.ea),e.na=e.ea-e.b,j(e,e.G,0,0,e.na);var n=e.G.rb(),s=Math.min(i.width/n.width,i.height/n.height),a=i.left+i.width/2-n.width/2*s,o=i.top+i.height/2-n.height/2*s;e.ea=s,e.tc=a+Math.abs(n.left)*s,e.vc=o+Math.abs(n.top)*s,e.b*=e.ea,e.na=e.ea-e.b,e.Za=new t.I(a,o,n.width*s,n.height*s),e.Ha=new t.I(a+e.b,o+e.b,n.width*s-e.b,n.height*s-e.b)}(this,e),this.G.clear(),j(this,this.G,this.tc,this.vc,this.na),this.G.zIndex(1),this.G.parent(this.Na),this.D&&this.D.B(4),o=0,i=this.o.length;o<i;o++)(l=this.o[o])&&l.B(4);for(U(this),o=0,i=this.jd.length;o<i;o++)(e=this.jd[o])&&e.B(4);this.B(184320)}if(this.J(16)&&(this.G.stroke(this.g("stroke")),this.G.fill(this.g("fill")),this.I(16)),this.J(16384)&&(this.D&&this.D.O(this.Na).W(),this.I(16384)),this.J(32768)){for(o=0,i=this.o.length;o<i;o++)(l=this.o[o])&&l.O(this.Na).W();this.I(32768)}if(this.J(4096)){for(o=0,i=s.length;o<i;o++)(n=s[o])&&(n.kb(this),n.O(this.Na).W());this.I(4096)}if(this.J(131072)){for(o=0,i=this.jd.length;o<i;o++)(e=this.jd[o])&&e.O(this.Na).W();this.I(131072)}t.zr(this.D,this.o,this.jd,s)},t.g.yj=function(){for(var e=this.$().Hb(),i=0,n=t.Ga(this.K,this.Bc,this.ba,this.aa),s=n.length,a=0;a<s;a++){var o=n[a];if(!o||o.enabled())break;i++}return!e||!s||i==s},t.g.Kg=function(e){var i,n=(e=e||this.oa).axes;if(n){var s=0;for(i=n.length;s<i;s++)n[s]&&this.axis(s,n[s])}if("pointers"in e){if(i=e.pointers,t.A(i))for(s=0;s<i.length;s++){var a=(n=i[s]).pointerType||this.g("defaultPointerType"),o=n.dataIndex,r=n.data||null;(a=this.$z(a,I(this,a).length))&&(a.Ch(o),a.data(r),a.N(n))}}else{if(n=e.bars)for(s=0,i=n.length;s<i;s++)n[s]&&this.bar(s,n[s]);if(n=e.markers)for(s=0,i=n.length;s<i;s++)n[s]&&this.marker(s,n[s]);if(n=e.needles)for(s=0,i=n.length;s<i;s++)n[s]&&this.needle(s,n[s]);if(n=e.knobs)for(s=0,i=n.length;s<i;s++)n[s]&&this.knob(s,n[s])}if(e=e.ranges)for(s=0,i=e.length;s<i;s++)e[s]&&this.xe(s,e[s])},t.g.U=function(e,i){F.u.U.call(this,e,i),t.Iq(this,rt,e,i),this.data(e.data),t.p(e.cap)&&this.iS(e.cap),this.gd(e.interactivity),this.Kg(e)},t.g.F=function(){var e=F.u.F.call(this);t.Tq(this,rt,e),e.data=this.data().F(),this.D&&(e.cap=this.iS().F()),e.interactivity=this.gd().F();var i,n=[],s=0;for(i=this.o.length;s<i;s++){var a=this.o[s];a&&n.push(a.F())}for(n.length&&(e.axes=n),i=[],s=0;s<this.f.length;s++)(n=this.f[s])&&i.push(n.F());for(i.length&&(e.pointers=i),n=[],s=0,i=this.jd.length;s<i;s++)(a=this.jd[s])&&n.push(a.F());return n.length&&(e.ranges=n),{gauge:e}},t.g.R=function(){t.sd(this.Yc,this.i,this.la,this.D,this.jd,this.o,this.K,this.Bc,this.ba,this.aa,this.f),this.D=this.sd=this.la=this.i=this.Yc=null,this.jd.length=0,this.o.length=0,this.K.length=0,this.Bc.length=0,this.ba.length=0,this.aa.length=0,this.f.length=0,F.u.R.call(this)};var lt=F.prototype;lt.data=lt.data,lt.cap=lt.iS,lt.axis=lt.axis,lt.addPointer=lt.vaa,lt.removePointer=lt.zaa,lt.removePointerAt=lt.YZ,lt.removeAllPointers=lt.yaa,lt.getPointer=lt.waa,lt.getPointerAt=lt.XZ,lt.getPointersCount=lt.xaa,lt.range=lt.xe,lt.getType=lt.Ma,lt.noData=lt.Gm,t.Up["circular-gauge"]=N,t.E("anychart.gauges.circular",N)}.call(this,$)),_.graph||(_.graph=1,function(t){var e=function(e,i,n){n=n||new t.gb(0,0);var s=e.x,a=e.y,o=Math.cos(i);i=Math.sin(i),e.x=(s-n.x)*o-(a-n.y)*i+n.x,e.y=(s-n.x)*i+(a-n.y)*o+n.y},i=function(){return new t.Hx(!0)},n=function(e){function n(t){t.kb(this)}t.V.call(this),this.pa=e,this.D=[],this.nt=[],this.f={normal:{},hovered:{},selected:{}},e={},t.T(e,[["fill",0,8192],["stroke",0,8192],["shape",0,8200],["labels",0,4096],["width",0,8200],["height",0,8200]]),this.ca=new t.my(this,e,t.gm),e={},t.T(e,[["fill",0,0],["stroke",0,0],["shape",0,0],["labels",0,0],["width",0,0],["height",0,0]]),this.za=new t.my(this,e,t.vo),this.Ea=new t.my(this,e,t.wo),this.ca.ta("labelsFactoryConstructor",i),this.za.ta("labelsFactoryConstructor",i),this.Ea.ta("labelsFactoryConstructor",i),this.ca.ta("labelsAfterInitCallback",t.sy),this.za.ta("labelsAfterInitCallback",n),this.Ea.ta("labelsAfterInitCallback",n)},s=function(e,i){var n=e.state(i),s=t.xo(n),a=i.id,o=i.eA,r=e.pa.group(i.groupId);if(!e.f[s][a]){var l=e.$();if(l.select(o),o=l.get("labels"),l=(l=l.get(s))&&l.labels?l.labels:{},o=o||{},t.ra(o,l),!t.Jc(o)){var h=new t.Hx(!0);h.N(o)}(l=e[s]().labels()).parent()||(0==n?l.parent(e.pa.labels()):l.parent(e.ca.labels())),(o=r?r[s]().labels():void 0)&&(o.parent()||(0==n?o.parent(e.pa.hf().labels()):o.parent(r.Qa().labels())),l=o),h&&(l=h.parent(l)),l.jg(null),t.K(l,e.de,e),e.f[s][a]=l}return e.f[s][a]},a=function(e){return(e=e.D.pop())||(e=t.qk()),e.clear(),e},o=function(t,e){return e.Gk||(e.Gk=t.tk()),e.Gk},r=function(e,i){var n=s(e,i);if(n.enabled()){var a=o(e,i),r=e.Ic(i);r=n.tk(r),a.text(r),r=n.flatten(),"auto"==n.g("anchor")&&((r=t.Qc(r)).position=i.iI?i.iI:"center-bottom",r.anchor=i.hI?i.hI:"center-top"),a.style(r),t.Mx(a),a.Ij()}},l=function(t){for(var e in t.f)for(var i in t.f[e])t.f[e][i].R();t.f={normal:{},hovered:{},selected:{}}},h=function(e){t.V.call(this),this.ib=e,this.Sc=new t.Ag},c=function(t,e){return e&&(t.Gea=e),t.Gea},u=function(e){t.V.call(this),this.b=e,t.T(this.ua,[["enabled",0,8192],["size",0,8192],["position",0,8192]])},d=function(e,i){var n=p(e,i,"size");return t.p(n)?n:e.g("size")},p=function(t,e,i){return(t=t.b.$()).select(c(e).eA),(t.get("arrow")||{})[i]},g=function(e){n.call(this,e),this.pa=e,this.type=Q,this.i=null,this.Sc=t.qk(),this.G=t.ok(),this.b=t.ok(),this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.K=this.Lf,this.b.parent(this.G),this.K.parent(this.G),t.wl(this)},f=function(e,i){var n=c(i),s=e.pa.b[n.Je];return n=e.pa.b[n.from],t.ab(t.cb(Math.atan2(s.position.y-n.position.y,s.position.x-n.position.x)))},b=function(e,i){var n=e.gk(i);return t.dp(n)},v=function(e,i){var n=e.pa.b[i.from],o=e.pa.b[i.Je];if(e.clear(i),e.pa.gd().g("edges")){i.path=a(e),i.path.tag=e.io(i),i.Zp=e.state(i);var l=b(e,i)+e.pa.gd().g("hoverGap");i.vr=a(e),i.vr.tag=i.path.tag,i.vr.fill(t.bm),i.vr.stroke(t.bm,l)}if(s(e,i).g("enabled")&&(i.Gk=e.tk()),e.TF().g("enabled")){l=e.TF();var u=new h(l);u.O(l.O()),i.AC=u,c(i.AC,i)}i.path?(i.path.moveTo(n.position.x,n.position.y),i.path.lineTo(o.position.x,o.position.y),i.path.parent(e.b),i.vr.moveTo(n.position.x,n.position.y),i.vr.lineTo(o.position.x,o.position.y),i.vr.parent(e.b),i.path.stroke(e.gk(i))):(e.Sc.moveTo(n.position.x,n.position.y),e.Sc.lineTo(o.position.x,o.position.y),e.Sc.stroke(e.gk(i))),i.AC&&i.AC.W(),i.Gk&&(t.Kx(i.Gk),r(e,i),t.Px(i.Gk,e.xl),t.Yx(i.Gk),e.tf(i))},m=function(t){var e=N(t.pa);t.b.suspend(),t.Sc.parent(t.b),t.Sc.clear();for(var i=N(t.pa),n=0;n<i.length;n++)t.clear(i[n]);for(i=0;i<e.length;i++)v(t,e[i]);t.b.resume()},y=function(t){n.call(this,t),this.pa=t,this.type=Z},S=function(){t.V.call(this),t.T(this.ua,[["enabled",0,0],["zoomOnMouseWheel",0,0,0,function(){this.g("zoomOnMouseWheel")&&this.ta("scrollOnMouseWheel",!1)}],["scrollOnMouseWheel",0,0,0,function(){this.g("scrollOnMouseWheel")&&this.ta("zoomOnMouseWheel",!1)}],["nodes",0,0],["edges",0,2],["magnetize",0,0],["hoverGap",0,2]])},w=function(e){t.V.call(this),this.pa=e,t.T(this.ua,[["type",0,1],["iterationCount",0,1]])},x=function(e){n.call(this,e),this.pa=e,this.type=J,this.G=t.ok(),this.b=t.ok(),this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.o=this.Lf,this.b.parent(this.G),this.o.parent(this.G),t.wl(this)},C=function(e,i){if("auto"==s(e,i).g("anchor")&&"forced"==e.pa.we().g("type"))if(0==e.pa.we().g("iterationCount")){var n=e.pa.na;n=360-t.ab(t.cb(Math.atan2(i.position.y-n.y,i.position.x-n.x))),i.hI=90<=n&&270>=n?"right-center":"left-center",i.iI="left-top"}else 1==i.it.length?(n=i.it[0],n=e.pa.b[n],i.position.x>n.position.x?(i.iI="right-center",i.hI="left-center"):(i.iI="left-center",i.hI="right-center")):(i.iI="center-bottom",i.hI="center-top")},D=function(e,i){var n=e.sB(i,"shape");n=n==t.Ok(n)?t.zp(n):e.Uja;var s=e.zd(i),a=e.qd(i),o=i.position.x,r=i.position.y,l=i.path;l.clear(),l.ia()&&l.ia().removeAttribute("transform"),n(l,o,r,a/2,s/2)},T=function(t,e){var i=t.Tm(e),n=t.gk(e);e.path.fill(i),e.path.stroke(n)},k=function(e,i){if(t.p(i))D(e,i),T(e,i);else for(var n=M(e.pa),s=0;s<n.length;s++){var a=e,o=n[s];D(a,o),T(a,o)}},$=function(e,i){var n=i.position.x,a=i.position.y,o=e.zd(i),r=e.qd(i);i.path.setPosition(n-o/2,a-r/2),s(e,i).enabled()&&(n=e.pa.O().Ja(),t.Px(i.Gk,e.xl),i.Gk.Vd().removeAttribute("transform"),t.Wx(i.Gk,e.ek(i),n),t.Qx(i.Gk))},O=function(e){t.ux.call(this),this.Ga("graph"),this.b={},this.K={},this.$a={},this.ea=null,this.Ka=[],this.ba=null,this.D={},this.o={},this.P={},this.mf=this.Oj=this.aa=null,this.la={nodes:null,edges:null},this.Xg=new t.Db,this.qc=L(this),this.zo=!1,this.Ha=this.Ba=this.Od=this.Za=0,this.EV=this.ud=!1,this.data(e)},P=function(t){var e;for(e in t.o){var i=t.o[e];A(t,i.id,J,0),delete t.o[e]}for(e in t.P)i=t.P[e],A(t,i.id,Q,0),delete t.P[e]},L=function(e){var i;return function(){t.Ej(i),i=t.Dj(e.uka,500,e)}},G=function(t,e){var i=t.kp(),n=i.od;return-i.We*n+e/n},F=function(t,e){var i=t.kp(),n=i.od;return-i.Fd*n+e/n},I=function(e,i,n){(i=e.b[i]).path.tag.Zp=n,e.Jh.state(i,n),k(e.Jh,i),e=e.Jh,s(e,i).enabled()&&!i.Gk&&(i.Gk=e.tk()),i.Gk&&(t.Kx(i.Gk),C(e,i),r(e,i),t.Px(i.Gk,e.xl),t.Yx(i.Gk),e.tf(i))},E=function(t,e,i){t.qh.g("edges")&&((e=t.D[e]).path.tag.Zp=i,t.i.state(e,i),v(t.i,e))},A=function(t,e,i,n){switch(i){case Q:if(t.qh.g("edges")){E(t,e,n),(i=(e=t.D[e]).from)in t.o||I(t,i,n);var s=e.Je;s in t.o||I(t,s,n),2==n&&(t.P[e.id]={id:e.id,type:Q},t.o[i]={id:i,type:J},t.o[s]={id:s,type:J})}break;case J:for(I(t,e,n),i=t.b[e].NC,s=0;s<i.length;s++){var a=i[s];a in t.P||E(t,a,n),2==n&&(t.P[a]={id:a,type:Q})}2==n&&(t.o[e]={id:e,type:J})}},U=function(e){for(var i,n=M(e),s=[],a=[],o=0,r=0,l=n.length;r<l;r++)if(i=n[r],-1==(0,t.za)(a,i)){var h=String(o);for(e.$a[h]=[],s.push(i.id),s.push.apply(s,i.it);i=s.pop();){var c=e.b[i];-1==(0,t.za)(a,c)&&(s.push.apply(s,c.it),a.push(c),e.$a[h].push(i),c.sY=String(o))}o++}},_=function(e){var i=e.la.edges;if(0<e.la.nodes.Hb()){var n=e.la.nodes.$();for(n.reset();n.advance();){var s=n.get("id");if(null!=s)if(s=String(s),e.b[s])t.kl(902,null,[s],!0);else{var a=e.b[s]={};a.index=n.ma(),a.id=s,a.eA=n.ma(),a.NC=[],a.it=[],a.Zp=0,a.position={x:n.get("x"),y:n.get("y")},null!=(s=n.get("group"))&&(e.K[s]||(e.K[s]=null),a.groupId=s)}else t.kl(907,null,[],!0)}n.reset()}if(0<i.Hb()){(i=e.la.edges.$()).reset();for(var o;i.advance();){o=i.get("from");var r=i.get("to");if(n=null!=(n=i.get("id"))?String(n):Q+"_"+i.ma(),o!=r)if(a=e.b[o],s=e.b[r],a&&s){(r={}).index=i.ma(),r.id=n,r.from=a.id,r.Je=s.id,r.eA=i.ma(),r.Zp=0;var l=!1;for(o=0;o<a.it.length;o++){var h=a.it[o];if(h==a.id||h==s.id){t.kl(900,null,[a.id,s.id],!0),l=!0;break}}if(!l)for(o=0;o<s.it.length;o++)if((h=s.it[o])==a.id||h==s.id){t.kl(900,null,[s.id,a.id],!0),l=!0;break}l||(a.NC.push(r.id),s.NC.push(r.id),a.it.push(s.id),s.it.push(a.id),e.D[n]=r)}else a||t.kl(903,null,[n,o],!0),s||t.kl(903,null,[n,r],!0);else t.kl(904,null,[n,r],!0)}300<i.Hb()&&e.gd().Ga({edges:!1}),i.reset()}},j=function(t){if(t.b)for(var e in t.b)t.Jh.clear(t.b[e]);if(t.D)for(var i in t.D)t.i.clear(t.D[i]);for(var n in t.hf().cD(),t.bk().cD(),t.b={},t.D={},t.ea=null,t.ba=null,t.$a={},t.o)delete t.o[n];for(n in t.P)delete t.P[n]},M=function(t){if(!t.ea)for(var e in t.ea=[],t.b)t.ea.push(t.b[e]);return t.ea},N=function(t){if(!t.ba)for(var e in t.ba=[],t.D)t.ba.push(t.D[e]);return t.ba},B=function(t){t.G.oc(t.Xg.od,t.Xg.We,t.Xg.gf,t.Xg.Le,t.Xg.Jd,t.Xg.Fd)},R=function(t){return new O(t)},H={Poa:"fixed",Uoa:"forced"};t.H(n,t.V),t.Gq(n,"fill stroke labels shape height width".split(" "),"normal"),t.g=n.prototype,t.g.ra=8192|t.KE|t.LE|36875,t.g.Kg=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),t.W(this,"hovered",this.za),t.W(this,"selected",this.Ea),this.ca.labels().parent(this.pa.labels()),this.za.labels().parent(this.ca.labels()),this.Ea.labels().parent(this.ca.labels())},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.gk=function(e){var i;return i=t.p(e)?this.sB(e,"stroke"):this.ca.g("stroke"),t.D(i)&&(e=this.Ge(e),i=i.call(e,e)),i},t.g.Tm=function(e){var i=this.sB(e,"fill");return t.D(i)&&(e=this.Ge(e),i=i.call(e,e)),i},t.g.Ma=function(){return this.type},t.g.state=function(t,e){return null!=e?(t.Zp=e,t):t.Zp||0},t.g.de=function(e){t.X(e,32768)&&this.va(t.KE);var i=this.pa,n=this.Ma(),s=t.X(e,8),a=[];if(t.p(n))switch(n){case J:case Z:a.push("nodes"),s&&i.Jh.va(t.LE);break;case Q:a.push("edges"),s&&i.i.va(t.LE)}t.X(e,1)&&(a.push("labelsStyle"),a.push("labelsEnabled")),t.X(e,2)&&a.push("labelsEnabled"),t.X(e,32768)&&(a.push("labelsEnabled"),a.push("labelsStyle")),t.X(e,8)&&(a.push("labelsBounds"),a.push("labelsEnabled"),a.push("labelsStyle")),t.or(i,"graph",a,1)},t.g.tk=function(){var e=this.nt.pop();return e||(e=new t.Ix),e},t.g.xU=function(t){var e={},i=this.$();return i.select(t.eA),this.i.lg(i),e.type={value:this.Ma(),type:"string"},e.id={value:t.id,type:"string"},e},t.g.Ic=function(e){return this.i||(this.i=new t.Fw),e=this.xU(e),t.ov(this.i,e)},t.g.io=function(t){var e={};return e.type=this.Ma(),e.id=t.id,e.Zp=this.state(t),e},t.g.Ge=function(e){var i=this.Ma(),n=i==J?1:0,s=this.pa.cc();return t.p(e)?{index:e.index,type:i,id:e.id,sourceColor:s.nc(n)}:{sourceColor:s.nc(n)}},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df(),t.W(this,"tooltip",this.gb),this.gb.parent(this.pa.Ua()),this.gb.ya(this.pa)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.U=function(t,e){n.u.U.call(this,t,e),"tooltip"in t&&this.Ua().N(t.tooltip),this.ca.N(t),this.ca.N(t.normal),this.za.N(t.hovered),this.Ea.N(t.selected)},t.g.F=function(){var e=n.u.F.call(this),i=this.ca.F(),s=this.za.F(),a=this.Ea.F();if(!t.Jc(i)){var o=i.labels;o&&t.Jc(o)&&delete i.labels,t.Jc(i)||(e.normal=i)}return t.Jc(s)||((o=s.labels)&&t.Jc(o)&&delete s.labels,t.Jc(s)||(e.hovered=s)),t.Jc(a)||((o=a.labels)&&t.Jc(o)&&delete a.labels,t.Jc(a)||(e.selected=a)),e},t.g.clear=function(e){var i=e.path;i&&(i.tag=null,i.clear(),i.parent(null),this.D.push(i),e.path=null),(i=e.Gk)&&(e.Gk=null,t.Px(i,null),this.nt.push(i))},t.g.cD=function(){l(this)},t.g.R=function(){var t;for(t=0;t<this.nt.length;t++)this.nt[t].ld();for(t=0;t<this.D.length;t++)this.D[t].R();this.nt.length=0,this.D.length=0,l(this)};var z=n.prototype;z.normal=z.Qa,z.hovered=z.lb,z.selected=z.selected,t.H(h,t.V),h.prototype.W=function(){var i=this.ib,n=p(i,this,"enabled");if(t.p(n)?n:i.g("enabled")){n=this.ib.b,i=f(n,this);var s=c(this),a=n.TF(),o=p(a,this,"position");a=1-t.Ao(t.p(o)?o:a.g("position")),o=n.pa.b[s.Je],s=n.pa.b[s.from];var r=n.pa.hf().zd(o)+t.dp(n.pa.hf().gk(o)),l=n.pa.hf().zd(s)+t.dp(n.pa.hf().gk(s));r=new t.gb(o.position.x+r/2,o.position.y),n=new t.gb(s.position.x+l/2+d(n.TF(),this),s.position.y),e(n,t.bb(i),new t.gb(s.position.x,s.position.y)),e(r,t.bb(i-180),new t.gb(o.position.x,o.position.y)),a=new t.gb(r.x-(r.x-n.x)*a,r.y-(r.y-n.y)*a),i=f(this.ib.b,this),n=d(this.ib,this),a=a.clone(),o=new t.gb(a.x-n,a.y-n/2),n=new t.gb(a.x-n,a.y+n/2),e(o,t.bb(i),a),e(n,t.bb(i),a),i=[a,o,n],this.Sc.parent(this.O()),this.Sc.clear(),this.Sc.moveTo(i[0].x,i[0].y),this.Sc.lineTo(i[1].x,i[1].y),this.Sc.lineTo(i[2].x,i[2].y),this.Sc.close(),this.Sc.fill(function(e,i){var n=p(e,i,"fill");if(!t.p(n)){n=e.b;var s=c(i);n=n.gk(s)}return n}(this.ib,this)),this.Sc.stroke(function(e,i){var n=p(e,i,"stroke");if(!t.p(n)){n=e.b;var s=c(i);n=n.gk(s)}return n}(this.ib,this))}else this.Sc.parent(null)},h.prototype.O=function(e){return t.p(e)&&(this.Jc=e),this.Jc},h.prototype.R=function(){t.qd(this.Sc),this.Sc=null,h.u.R.call(this)},t.H(u,t.V),u.prototype.ra=8192;var V={};t.sq(V,[[0,"enabled",t.Dq],[0,"size",t.Bq],[0,"position",t.Ao]]),t.U(u,V),u.prototype.O=function(t){return t&&(this.Jc=t),this.Jc},u.prototype.F=function(){var e={};return t.Tq(this,V,e),e},u.prototype.U=function(e,i){t.Iq(this,V,e,i)},t.H(g,n),t.g=g.prototype,t.g.Uw=function(){for(var t=[],e=N(this.pa),i=0;i<e.length;i++){var n=e[i],a=s(this,n);n=o(this,n),a.enabled()&&t.push(n)}return t},t.g.ek=function(i){var n=s(this,i),a=this.pa.b,o=a[i.from],r=a[i.Je];a=r.position.x;var l=o.position.x;r=r.position.y;var h=o.position.y;a==l?(h=(o=Math.max(r,h))+(Math.min(r,h)-o)/2,r=a):(o=Math.max(a,l),a=Math.min(a,l),l=Math.max(r,h),h=Math.min(r,h),o==a?(r=o,h+=(l-h)/2):h=((r=a+(o-a)/2)-a)/(o-a)*(l-h)+h),a=this.pa.b[i.from],o=this.pa.b[i.Je],a=new t.gb(a.position.x,a.position.y),o=new t.gb(o.position.x,o.position.y),r=new t.gb(r,h),h=b(this,i),l=this.Jg(i);var c=h/2;if(a.x>o.x){var u=o;o=a,a=u}return u=t.ab(t.cb(Math.atan2(a.y-o.y,a.x-o.x))),e(a,t.bb(-u),r),e(o,t.bb(-u),r),a.y+=c,o.y+=c,e(a,t.bb(u),r),e(o,t.bb(u),r),r=t.kn(a.x,a.y,l,h),r=n.padding().Ej(r),i.H4=a,i.angle=u?u+180:-270,r},t.g.tf=function(e){var i=s(this,e),n=o(this,e);if(n)if(i.enabled()){var a=this.pa.O().Ja();i=this.ek(e),t.Px(n,this.xl),t.Wx(n,i,a),t.Qx(n),a=n.Vd(),n=+a.getAttribute("x")-i.left,i=+a.getAttribute("y")-i.top,e.zta=n,e.Ata=i,i=e.angle+","+e.H4.x+","+e.H4.y,e.Gk.Vd().setAttribute("transform","rotate("+i+")")}else t.Px(n,null),t.Kx(n)},t.g.wi=function(){var t=this.pa.D;for(e in t){var e=this.pa.D[e];this.tf(e)}},t.g.Hx=function(){for(var t=N(this.pa),e=0;e<t.length;e++)r(this,t[e])},t.g.Fia=function(){this.va(8192)},t.g.TF=function(e){return this.o||(this.o=new u(this),t.W(this,"arrows",this.o),this.o.O(this.b),t.K(this.o,this.Fia,this)),t.p(e)?(this.o.N(e),this):this.o},t.g.clear=function(e){g.u.clear.call(this,e),t.qd(e.AC),e.AC=null,e.vr&&(e.vr.tag=null,e.vr.clear(),e.vr.parent(null),this.D.push(e.vr),e.vr=null)},t.g.sB=function(e,i){var n,s=t.xo(e.Zp),a=this[s]().g(i);if("fill"!=i&&"stroke"!=i){var o=this.normal().nd(i),r=this[s]().nd(i);t.p(r)?a=r:t.p(o)&&(a=o)}return(o=this.$()).select(e.eA),(r=o.get(i))&&(n=r),(r=o.get(s))&&r[i]&&(n=r[i]),t.p(n)?n:a},t.g.Jg=function(t){var e=this.pa.b[t.from];return t=this.pa.b[t.Je],Math.sqrt(Math.pow(t.position.x-e.position.x,2)+Math.pow(t.position.y-e.position.y,2))},t.g.cD=function(){g.u.cD.call(this),this.sd=null},t.g.$=function(){return this.sd||(this.sd=this.pa.data().edges.$())},t.g.hU=function(){return this.G},t.g.F=function(){var e=g.u.F.call(this),i=this.Ua().F();return t.Jc(i)||(e.tooltip=i),e},t.g.R=function(){for(var e=N(this.pa),i=0;i<e.length;i++){var n=e[i];this.clear(n),t.qd(n.AC)}g.u.R.call(this)};var q=g.prototype;q.arrows=q.TF,q.tooltip=q.Ua,t.H(y,n),y.prototype.Kg=function(){this.Qa().labels().parent(this.pa.hf().labels()),this.lb().labels().parent(this.Qa().labels()),this.selected().labels().parent(this.Qa().labels())},t.H(S,t.V),S.prototype.ra=2;var W={};t.sq(W,[[0,"enabled",t.Dq],[0,"zoomOnMouseWheel",t.Dq],[0,"scrollOnMouseWheel",t.Dq],[0,"magnetize",t.Dq],[0,"nodes",t.Dq],[0,"edges",t.Dq],[0,"hoverGap",t.Bq]]),t.U(S,W),S.prototype.Ie=function(e,i){return!!t.da(i)&&(this.enabled(i),!0)},S.prototype.U=function(e,i){S.u.U.call(this,e,i),t.Iq(this,W,e,i)},S.prototype.F=function(){var e=S.u.F.call(this);return t.Tq(this,W,e),e},t.H(w,t.V);var K,Y=(K={},t.sq(K,[[0,"type",function(e){return t.zk(H,e,"forced")}],[0,"iterationCount",t.Bq]]),K);t.U(w,Y),w.prototype.ra=1,w.prototype.Ie=function(e,i){return!!t.z(i)&&(this.type(i),!0)},w.prototype.U=function(e,i){w.u.U.call(this,e,i),t.Iq(this,Y,e,i)},w.prototype.F=function(){var e=w.u.F.call(this);return t.Tq(this,Y,e),e},t.H(x,n),t.g=x.prototype,t.g.ra=1|n.prototype.ra,t.g.cD=function(){x.u.cD.call(this),this.sd=null},t.g.$=function(){return this.sd||(this.sd=this.pa.data().nodes.$())},t.g.Uw=function(){for(var t=[],e=M(this.pa),i=0;i<e.length;i++){var n=e[i],a=s(this,n);n=o(this,n),a.enabled()&&t.push(n)}return t},t.g.sB=function(e,i){var n=t.xo(e.Zp),s=t.xo(0),a=this[s]()[i](),o=this[n]()[i]();if(a=t.p(o)?o:a,"fill"!=i&&"stroke"!=i){o=this[s]().nd(i);var r=this[n]().nd(i);t.p(r)?a=r:t.p(o)&&(a=o)}return o=this.pa.group(e.groupId),t.p(o)&&(s=o[s]().nd(i),null!=(o=o[n]().nd(i))?a=o:null!=s&&(a=s)),(o=this.$()).select(e.eA),s=o.get(i),a=t.p(s)?s:a,(s=o.get(n))&&t.p(s[i])?s[i]:a},t.g.xU=function(e){var i=x.u.xU.call(this,e),n=(0,t.Wa)(e.NC,(function(t){var i=this.pa.D[t];return t=i.from,i=i.Je,t!=e.id?t:i}),this);return i.siblings={value:n,type:""},i},t.g.Hx=function(){for(var t=M(this.pa),e=0;e<t.length;e++){var i=t[e];C(this,i),r(this,i)}},t.g.ek=function(e){var i=s(this,e),n=e.position.x,a=e.position.y,o=this.qd(e),r=this.zd(e);n-=r/2;var l=a-o/2,h=this.pa.na;return a=i.padding(),"auto"==i.g("anchor")&&"forced"==this.pa.we().g("type")&&0==this.pa.we().g("iterationCount")&&(e=new t.gb(e.position.x,e.position.y),i=((n=t.jb(h,e))+Math.max(r,o)/2)/n+.025,e.scale(i),(n=this.pa.na.clone()).scale(i),i=n.y-this.pa.na.y,n=e.x-=n.x-this.pa.na.x,l=e.y-=i),a.Ej(t.kn(n,l,r,o))},t.g.tf=function(e){var i=o(this,e);if(s(this,e).enabled()){var n=this.ek(e),a=this.pa.O().Ja();t.Px(i,this.xl),t.Wx(i,n,a),t.Qx(i),e.Gk&&(a=s(this,e),(i=e.Gk.Vd()).removeAttribute("transform"),a.g("autoRotate")&&(a=this.pa.na,90<=(e=t.ab(t.cb(Math.atan2(e.position.y-a.y,e.position.x-a.x))))&&270>=e&&(e+=180),e=t.ab(e),i.setAttribute("transform","rotate("+e+", "+n.left+", "+(n.top+n.height/2)+")")))}else t.Px(i,null),t.Kx(i)},t.g.wi=function(){for(var t=M(this.pa),e=0;e<t.length;e++)this.tf(t[e])},t.g.qd=function(e){return e=t.N(this.sB(e,"height")),(0,window.isNaN)(e)?this.g("height"):e},t.g.zd=function(e){var i=this.sB(e,"shape");return i===t.Ok(i)?this.qd(e):(e=t.N(this.sB(e,"width")),(0,window.isNaN)(e)?this.g("width"):e)},t.g.Uja=function(t,e,i,n,s){var a=e-s,o=i-n;return e+=s,i+=n,t.moveTo(a,o).lineTo(e,o).lineTo(e,i).lineTo(a,i).lineTo(a,o).close(),t},t.g.ZL=function(t){t.path||(t.path=a(this));var e=t.path;e.tag=this.io(t),t.Zp=this.state(t),t.path=e,e.parent(this.b)},t.g.hU=function(){return this.G},t.g.F=function(){var e=x.u.F.call(this),i=this.Ua().F();return t.Jc(i)||(e.tooltip=i),e},t.g.R=function(){for(var t=M(this.pa),e=0;e<t.length;e++)this.clear(t[e]);x.u.R.call(this)};var X=x.prototype;X.tooltip=X.Ua,t.H(O,t.ux),t.Jz(O,"graph","appearance data edges labelsBounds labelsEnabled labelsStyle layout nodes rotate selection transform".split(" "));var J="node",Z="group",Q="edge";t.g=O.prototype,t.g.ra=8194|t.ux.prototype.ra,t.g.sa=16|t.ux.prototype.sa,t.g.Ma=function(){return"graph"},t.g.yj=function(){return!this.la.nodes||!this.la.nodes.Hb()},t.g.Ue=function(){return[]},t.g.ts=function(){return[this]},t.g.Zj=function(){},t.g.Ux=function(t,e){return t==J?this.Jh.Ic(this.b[e]):this.i.Ic(this.D[e])},t.g.Ds=function(e){if(!this.zo){var i=e.domTarget.tag;if(i){var n=i.id,s=i.type;if(!t.Ad&&e.ctrlKey||t.Ad&&e.metaKey){if(2==i.Zp){if(s==J)for(A(this,n,J,0),delete this.o[n],i=this.b[n],e=0;e<i.NC.length;e++)n=i.NC[e],A(this,n,Q,0),delete this.o[n];else e=this.D[n],A(this,e.from,J,0),A(this,e.Je,J,0),A(this,e.id,Q,0),delete this.o[e.from],delete this.o[e.Je],delete this.P[e.id];return}A(this,i.id,i.type,2)}else P(this);A(this,i.id,i.type,2)}else P(this)}this.zo=!1},t.g.po=function(e){if(!this.mf||!this.mf.lp){var i,n=e.domTarget.tag;if(n){var s=n.type,a=n.id;n=n.Zp,this.Ua().Lc(),2!=n&&A(this,a,s,1),s==J?i=this.Jh.Ua():s==Q&&this.qh.g("edges")&&(i=this.i.Ua()),i&&t.Ow(i,e.clientX,e.clientY,this.Ux(s,a))}else this.Ua().Lc()}},t.g.G2=function(e){if(!this.mf||!this.mf.lp){var i,n=e.domTarget.tag;if(n){var s=n.type,a=n.id;this.Ua().Lc(),n.type==J?i=this.Jh.Ua():n.type==Q&&this.qh.g("edges")&&(i=this.i.Ua()),i&&t.Ow(i,e.clientX,e.clientY,this.Ux(s,a))}else this.Ua().Lc()}},t.g.gba=function(t){t.target.tag||this.oh(t)},t.g.uka=function(){this.fb.parent(this.sb)},t.g.hba=function(e){if(!this.mf||!this.mf.lp){var i=this.gd();if(i.g("enabled")){var n=e.deltaY;if(i.g("zoomOnMouseWheel")){var s=t.RC&&6>=Math.abs(e.deltaY)?0<e.deltaY?.8:0>e.deltaY?1.2:1:t.Za(1-e.deltaY/120,.7,2),a=this.kp().od*s;if(.4<a&&100>a){a=M(this).length+N(this).length,this.qh.g("edges")&&500<a&&(this.fb.parent(null),this.qc()),a=e.clientX;var o=e.clientY;t.Eb(this.Xg,s,s),t.Fb(this.Xg,(a||0)*(1-s),(o||0)*(1-s)),B(this)}}i.g("scrollOnMouseWheel")&&(this.Xg.translate(0,n),B(this)),e.preventDefault()}}},t.g.kp=function(){return this.Xg},t.g.hg=function(t){this.mf&&this.mf.lp&&this.gd().g("enabled")&&this.gd().g("nodes")||(t=t.domTarget.tag)&&2!=t.Zp&&A(this,t.id,t.type,0)},t.g.jx=function(e){var i={};return t.Sc(i,t.Sl(t.mG["select-marquee"]),e),i},t.g.$O=function(e){var i=this.kp();e=new t.I(e.left,e.top,e.width,e.height);for(var n=new t.gb(0,0),s=M(this),a=0;a<s.length;a++){var o=s[a];n.x=o.position.x*i.od+i.Jd,n.y=o.position.y*i.od+i.Fd,t.rb(e,n)||A(this,o.id,J,2)}this.zo=!0},t.g.select=function(e){t.p(e)?t.A(e)||(e=[e]):e=t.Fc(this.b),(0,t.Pe)(e,(function(t){t in this.b&&this.Ka.push(t)}),this),(0,t.Pe)(t.Fc(this.o),(function(e){t.Aa(this.Ka,e)||this.Ka.push(e)}),this),t.nr(this,"graph","selection",1)},t.g.ie=function(e){t.p(e)?t.A(e)||(e=[e]):e=t.Fc(this.o),(0,t.Pe)(t.Fc(this.o),(function(i){t.Aa(e,i)||this.Ka.push(i)}),this),t.nr(this,"graph","selection",1)},t.g.KW=function(e){t.X(e,8192)&&t.or(this,"graph",["edges","appearance"],1)},t.g.Uia=function(e){t.X(e,1)&&(this.B(4),t.or(this,"graph",["appearance","labelsStyle","labelsBounds","labelsEnabled","layout"],1))},t.g.Sia=function(e){t.X(e,2)&&this.B(4,1)},t.g.dd=function(){j(this),_(this),U(this),this.B(4),t.or(this,"graph","data appearance labelsStyle labelsBounds labelsEnabled layout".split(" "),1)},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&t.nr(this,"sankey","appearance",1)}},t.g.Pf=function(e){t.X(e,2)&&t.nr(this,"sankey","appearance",1)},t.g.hf=function(e){return this.Jh||(this.Jh=new x(this),t.W(this,"nodes",this.Jh),this.Jh.Kg(),t.K(this.Jh,this.KW,this)),e?(this.Jh.N(e),this):this.Jh},t.g.gd=function(e){return this.qh||(this.qh=new S,t.W(this,"interactivity",this.qh),t.K(this.qh,this.Sia,this)),t.p(e)?(this.qh.N(e),this):this.qh},t.g.group=function(e,i){if(null!=e){if(t.p(this.K[e])){if(null===this.K[e]){var n=new y(this);n.Kg(),t.K(n,this.KW,this),this.K[e]=n}return i?(this.K[e].N(i),this):this.K[e]}t.kl(905,null,[e],!0)}},t.g.we=function(e){return this.f||(this.f=new w(this),t.W(this,"layout",this.f),t.K(this.f,this.Uia,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.bk=function(e){return this.i||(this.i=new g(this),t.W(this,"edges",this.i),this.i.Kg(),t.K(this.i,this.KW,this)),t.p(e)?(this.i.N(e),this):this.i},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,t.W(this,"labels",this.Da)),t.p(e)?(this.Da.N(e),this):this.Da},t.g.wr=function(){if(!this.mf){this.mf=new t.ag(this.Aa.ia(),this.Aa);var e,i,n,s,a,o,r,l,h,c,u,d=null,p=[];this.mf.wa("start",(function(o){if(h=this.gd().g("enabled"),c=this.gd().g("nodes"),u=M(this).length+N(this).length,h)if(d=o.EC.target,a=d.tag,t.yk()&&this.Ua().Lc(),a&&a.type==J){if(c){var r=a.id;if(t.Jc(this.o))l=this.b[r];else if(r in this.o)for(var g in this.o)p.push(this.b[g]);else(!t.Ad&&!o.EC.ctrlKey||t.Ad&&!o.EC.metaKey)&&P(this),l=this.b[r];e=G(this,o.clientX),i=F(this,o.clientY)}}else P(this),e=o.clientX,i=o.clientY;n=o.clientX,s=o.clientY}),!1,this),this.mf.wa("drag",(function(t){if(h){this.EV=!0,this.Ua().Lc();var n=this.kp().od,s=t.clientX;if(t=t.clientY,a&&a.type==J){if(c){for(s=G(this,s),t=F(this,t),o=s-e,r=t-i,e=s,i=t,p.length||p.push(l),n=0;n<p.length;n++){t=s=p[n];var d=o,g=r;t.position.x+=d,t.position.y+=g,t.position.mo=d,t.position.um=g,$(this.Jh,s)}m(this.i)}}else o=(s-e)/n,r=(t-i)/n,e=s,i=t,this.Xg.translate(o,r),B(this);this.qh.g("edges")&&500<u&&this.fb.parent(null)}}),!1,this),this.mf.wa("end",(function(t){if(h){if(this.EV=!1,a&&a.type==J&&c&&!p.length){if(this.gd().g("magnetize")){for(var e,i=this.Jh,o=l,r=i.pa.$a[o.sY],d=e=window.Infinity,g=o.position.x,f=o.position.y,b=0;b<r.length;b++)if(o.id!=r[b]){var v=i.pa.b[r[b]].position;if(o.position.x>v.x-5&&o.position.x<v.x+5){var y=o.position.x-v.x;y<d&&(d=y,g=v.x)}o.position.y>v.y-5&&o.position.y<v.y+5&&(y=o.position.y-v.y)<e&&(e=y,f=v.y)}o.position.x=g,o.position.y=f,$(this.Jh,l)}m(this.i)}p.length=0}t.clientX==n&&s==t.clientY||(this.qh.g("edges")&&500<u&&this.qc(),this.zo=!0)}),!1,this)}},t.g.iba=function(){if(!this.aa){var e=this.Aa.ia();this.aa=new t.Ex(e,!1),this.aa.wa("mousewheel",this.hba,!1,this)}},t.g.Qh=function(i){if(!this.pf()){if(this.Aa||(this.Aa=this.Na.Bd(),this.hf(),this.bk(),this.we(),this.gd(),this.G=t.ok(),this.ec=t.tk(i),this.Uc=t.ok(),this.Oj=t.mk(i.left,i.top,i.width,i.height),this.Oj.fill(t.bm),this.Oj.stroke(null),this.Oj.parent(this.Uc),this.Uc.parent(this.Aa),this.wc.Ce(this,"chartdraw",this.wr),this.wc.Ce(this,"chartdraw",this.iba),t.yk()?t.su(this,this,this.po,this.hg,this.Ds,this.G2,null,null):(this.wc.gc(this.Na,"contextmenu",this.oh),this.wc.wa(this.Na,"contextmenu",this.gba),function(e){var i=null,n=!1;e.wc.wa(e,"touchstart",(function(e){n=!1,i=t.Dj((function(){this.EV||(this.zo=!1,this.Ds(e)),n=!0}),300,this)})),e.wc.wa(e,"touchend",(function(e){t.Ej(i),n||this.G2(e)}))}(this)),this.Sb=t.ok(),this.Hd=t.ok(),this.sb=t.ok(),this.fb=this.i.hU(),this.me=this.Jh.hU(),this.fb.parent(this.sb),this.me.parent(this.Hd),this.sb.parent(this.Sb),this.Hd.parent(this.Sb),this.Sb.parent(this.G),this.Aa.zIndex(30),this.Aa.clip(this.ec),this.G.parent(this.Aa),this.Jh.va(t.KE),this.i.va(t.KE)),t.rr(this,"graph","layout")){var n=this.we();switch(n.g("type")){case"forced":var s,a=M(n.pa),o=n.pa.$a,r=a.length,l=0,h=2*Math.PI/r;for(s=0;s<r;s++){var c=a[s];c.velocityX=0,c.velocityY=0,c.position.x=10*Math.cos(l),c.position.y=10*Math.sin(l),l+=h}h=n.g("iterationCount");for(var u=0;u<h;u++){for(s=0,r=a.length;s<r;s++)for((c=a[s]).sX=0,l=c.tX=0;l<r;l++){var d=a[l];if(c!=d&&c.sY==d.sY){var p=void 0,g=void 0,f=c.position.x-d.position.x;d=c.position.y-d.position.y;var b=Math.sqrt(f*f+d*d);0!=b&&(g=f/b/b*.9,p=d/b/b*.9),d=[g,p],c.sX+=d[0],c.tX+=d[1]}}for(s=0,r=a.length;s<r;s++)for((c=a[s]).SR=0,c.TR=0,p=c.it,l=0;l<p.length;l++){d=n.pa.b[p[l]],g=b=void 0,f=c.position.x-d.position.x,d=c.position.y-d.position.y;var v=Math.sqrt(f*f+d*d);0!=v&&(g=-f/v*(b=v*v/50)*10,b=-d/v*b*10),d=[g,b],c.SR+=d[0],c.TR+=d[1]}for(s=0,r=a.length;s<r;s++)(c=a[s]).velocityX+=c.sX+c.SR,c.velocityY+=c.tX+c.TR,c.velocityX=t.Za(c.velocityX,-.12,.12),c.velocityY=t.Za(c.velocityY,-.12,.12),c.position.x+=c.velocityX,c.position.y+=c.velocityY}if(0<h&&1<(u=t.Fc(o)).length){for(a=[],s=0;s<u.length;s++){if(f=o[p=u[s]],d=window.Infinity,g=-window.Infinity,h=window.Infinity,b=-window.Infinity,1==(r=f.length))d=(c=n.pa.b[f[0]]).position.y-.5,h=c.position.x-.5,g=c.position.y+.5,b=c.position.x+.5;else{for(l=0;l<r;l++)c=n.pa.b[f[l]],d=Math.min(d,c.position.y),g=Math.max(g,c.position.y),b=Math.max(b,c.position.x),h=Math.min(h,c.position.x);h-=.5,b+=.5,d-=.5,g+=.5}c=Math.abs(h-b),a.push({id:p,fJ:new t.I(h,d,c,Math.abs(g-d))})}for(s=r=0;s<a.length;s++)for(c=a[s].fJ,h=new t.gb(c.left,c.top).Gh(),c=a[s].fJ.zd(),a[s].mo=r-h,r+=c+.5,a[s].um=-t.sb(a[s].fJ).As(),h=o[a[s].id],l=0;l<h.length;l++)(c=n.pa.b[h[l]]).position.x+=a[s].mo,c.position.y+=a[s].um}break;case"fixed":for(o=M(n.pa),s=0;s<o.length;s++)c=o[s],r=(l=n.pa.data().nodes.En(c.eA)).x,l=l.y,null==r&&(r=0,t.kl(901,null,[c.id,"x"],!0)),null==l&&(l=0,t.kl(901,null,[c.id,"y"],!0)),c.position.x=r,c.position.y=l}t.pr(this,"graph","layout")}if(t.rr(this,"graph","rotate")){for(n=M(this),o=t.sb(this.kg),s=0;s<n.length;s++)c=n[s],r=new t.gb(c.position.x,c.position.y),e(r,t.bb(this.Od),o),c.position.x=r.Gh(),c.position.y=r.As();t.pr(this,"graph","rotate")}if(this.J(4)){if((n=this.ec.shape()).Ho(i.left),n.Io(i.top),n.Go(i.width),n.Fo(i.height),this.Oj.Ho(i.left),this.Oj.Io(i.top),this.Oj.Go(i.width),this.Oj.Fo(i.height),this.ud||"forced"===this.we().g("type")){for(c=M(this),o=i=window.Infinity,n=s=-window.Infinity,r=c.length,l=0;l<r;l++)a=c[l].position.x,h=c[l].position.y,i=Math.min(h,i),s=Math.max(a,s),n=Math.max(h,n),o=Math.min(a,o);for(n+=-i,s+=-o,u=Math.min((this.kg.width-.2*this.kg.width)/s,(this.kg.height-.2*this.kg.height)/n),u=(0,window.isFinite)(u)?u:1,l=0;l<r;l++)a=c[l].position.x,h=c[l].position.y,a+=-o,h+=-i,a*=u,h*=u,c[l].position.x=a,c[l].position.y=h;n*=u,s*=u,o=i=0,r=t.sb(this.kg).Gh(),c=t.sb(this.kg).As(),o=(s-o)/2+o,i=(n-i)/2+i,this.na=new t.gb(o,i),n=r-o,i=c-i,(0,window.isFinite)(n)||(n=0),(0,window.isFinite)(i)||(i=0),this.Xg.translate(-this.Ba,-this.Ha),this.Ba=n,this.Ha=i,this.Xg.translate(n,i)}else{for(r=(c=M(this)).length,o=i=window.Infinity,n=s=-window.Infinity,l=0;l<r;l++)a=c[l].position.x,h=c[l].position.y,i=Math.min(h,i),s=Math.max(a,s),n=Math.max(h,n),o=Math.min(a,o);o=(r=t.sb(this.kg).Gh())-((s-o)/2+o),i=(c=t.sb(this.kg).As())-((n-i)/2+i),this.Xg.translate(-this.Ba,-this.Ha),(0,window.isFinite)(o)||(o=0),(0,window.isFinite)(i)||(i=0),this.Ba=o,this.Ha=i,this.Xg.translate(o,i)}t.nr(this,"graph","transform"),t.or(this,"graph","edges nodes labelsStyle labelsEnabled labelsBounds appearance".split(" ")),this.I(4)}if(t.rr(this,"graph","edges")&&(m(this.i),t.rr(this,"graph","labelsStyle")&&this.i.Hx(),t.rr(this,"graph","labelsBounds")&&t.vl.measure(),t.rr(this,"graph","labelsEnabled")&&this.i.wi(),t.pr(this,"graph","edges")),t.rr(this,"graph","nodes")){for(i=this.Jh,n=M(i.pa),o=0;o<n.length;o++)i.ZL(n[o]);t.rr(this,"graph","appearance")&&k(this.Jh),t.rr(this,"graph","labelsStyle")&&this.Jh.Hx(),t.rr(this,"graph","labelsBounds")&&t.vl.measure(),t.rr(this,"graph","labelsEnabled")&&this.Jh.wi(),t.pr(this,"graph","edges")}t.rr(this,"graph","selection")&&(P(this),function(e){(0,t.Pe)(e.Ka,(function(t){A(this,t,J,2)}),e),e.Ka.length=0}(this),t.pr(this,"graph","selection")),t.qr(this,"graph",["appearance","labelsStyle","labelsBounds","labelsEnabled"]),t.rr(this,"graph","transform")&&(B(this),t.pr(this,"graph","transform"))}},t.g.zoom=function(e,i,n){var s=this.kp();return t.p(e)?(null===e?this.LT():(t.ea(i)||this.kg&&(i=this.kg.left+this.kg.width/2),t.ea(n)||this.kg&&(n=this.kg.top+this.kg.height/2),t.Eb(this.Xg,e,e),t.Fb(this.Xg,(i||0)*(1-e),(n||0)*(1-e)),t.nr(this,"graph","transform",1)),this):s.od},t.g.Fh=function(){return this},t.g.Qm=function(){this.LT()},t.g.Vr=function(){this.zoom(1.3)},t.g.Wr=function(){this.zoom(1/1.3)},t.g.move=function(e,i){if(t.p(e))return null===e&&(e=-this.Xg.Jd,i=-this.Xg.Fd),this.Xg.translate(e||0,i||0),t.nr(this,"graph","transform",1),this;var n=this.kp();return[n.Jd,n.Fd]},t.g.LT=function(e){return t.da(e)&&(this.ud=e,this.B(4)),this.Xg.setTransform(1,0,0,1,0,0),this.Xg.translate(this.Ba,this.Ha),t.nr(this,"graph","transform",1),this},t.g.rotation=function(e){return t.p(e)?(this.Za!=e&&(null===e&&(e=0),e=t.ab(e),this.Od=-this.Za+e,this.Za=e,this.B(4),t.or(this,"graph",["labelsStyle","rotate","appearance"],1)),this):this.Za},t.g.data=function(e){if(t.p(e)){if(null===e||t.p(e.nodes)&&t.p(e.edges)){var i,n=e&&e.edges?e.edges:null;e=e&&e.nodes?e.nodes:null,this.nf!==e&&(this.nf=e,this.la&&this.la.nodes&&(t.kr(this.la.nodes,this.dd),t.qd(this.la.nodes)),i=t.J(e,t.Mr)?e.Yd().Ui():t.J(e,t.Cr)?e.Ui():t.Or(e).Yd().Ui(),t.K(i,this.dd,this),this.la.nodes=i),e=n,this.bg!==e&&(this.bg=e,this.la&&this.la.edges&&(t.kr(this.la.edges,this.dd),t.qd(this.la.edges)),i=t.J(e,t.Mr)?e.Yd().Ui():t.J(e,t.Cr)?e.Ui():t.Or(e).Yd().Ui(),t.K(i,this.dd,this),this.la.edges=i),j(this),_(this),U(this),this.B(4),t.or(this,"graph","data appearance labelsStyle labelsBounds labelsEnabled layout".split(" "),1)}else t.kl(906,null,[],!0);return this}return this.la},t.g.F=function(){var e=O.u.F.call(this);t.Tq(this,O.b,e);var i=this.data().nodes;i=i?i.F():i;var n,s=this.data().edges;if(s=s?s.F():s,i)for(n=0;n<i.length;n++){var a=i[n];if(a&&a.id){var o=this.b[a.id];a.x=o.position.x,a.y=o.position.y}}for(n in e.graphData={nodes:i,edges:s},e.nodes=this.hf().F(),e.edges=this.bk().F(),i=this.labels().F(),t.Jc(i)||(e.labels=i),e.groups=[],this.K)(i={}).id=n,i.settings=this.group(n).F(),e.groups.push(i);return e.layout=this.we().F(),e.interactivity=this.gd().F(),(n=this.Xg.clone()).translate(-this.Ba,-this.Ha),e.transformationMatrix={m00_:n.od,m10_:n.We,m01_:n.gf,m11_:n.Le,m02_:n.Jd,m12_:n.Fd},e.rotation=this.rotation(),{chart:e}},t.g.U=function(e,i){if(O.u.U.call(this,e,i),t.Iq(this,O.b,e,i),"graphData"in e&&this.data(e.graphData),"edges"in e&&this.bk().N(e.edges),"nodes"in e&&this.hf().N(e.nodes),"transformationMatrix"in e){var n=e.transformationMatrix;this.Xg.setTransform(n.m00_,n.m10_,n.m01_,n.m11_,n.m02_,n.m12_)}if("rotation"in e&&(this.Za=+e.rotation),"labels"in e&&this.labels().N(e.labels),"layout"in e&&(this.we().N(e.layout),"forced"==e.layout.type&&t.pr(this,"graph","layout")),"group"in e){n=e.groups;for(var s=0;s<n.length;s++){var a=n[s];this.group(a.id,a.settings)}}"interactivity"in e&&this.gd().N(e.interactivity)},t.g.R=function(){t.sd(this.i,this.Jh,this.qh,this.f,this.mf),this.bk().R(),this.hf().R(),this.f=this.qh=this.Jh=this.i=this.ba=this.ea=null,this.D={},this.b={},this.K={},O.u.R.call(this)};var tt=O.prototype;tt.data=tt.data,tt.edges=tt.bk,tt.fit=tt.LT,tt.zoom=tt.zoom,tt.getCurrentScene=tt.Fh,tt.fitAll=tt.Qm,tt.zoomIn=tt.Vr,tt.zoomOut=tt.Wr,tt.select=tt.select,tt.unselect=tt.ie,tt.move=tt.move,tt.getType=tt.Ma,tt.group=tt.group,tt.rotation=tt.rotation,tt.nodes=tt.hf,tt.layout=tt.we,tt.interactivity=tt.gd,tt.noData=tt.Gm,t.Tp.graph=R,t.E("anychart.graph",R)}.call(this,$)),_.sparkline||(_.sparkline=1,function(t){var e=function(e,i){return t.zk(b,e,i||"line")},i=function(e){this.ka(),t.Y.call(this),this.ya=e,this.da(!1)},n=function(e,i){function n(){this.Sa&&this.Sa.B(16,1)}function s(){this.Sa&&this.Sa.B(64,1)}t.ux.call(this),this.Ga("sparkline"),this.nD=this.N1,this.state=new t.ix(this),this.Sa=this.Fc=this.eb=null,this.og=[],this.rg=[],this.tg=[],this.lf=null,this.b={},this.Ax=!0,this.G=new t.dy,this.G.ta("positionFormatter",t.ep),this.G.ta("size",10),this.G.ta("anchor","center"),this.G.ta("offsetX",0),this.G.ta("offsetY",0),this.G.ta("rotation",0),this.G.kb(this),this.G.zh=m,this.D=new t.Pu,this.D.positionFormatter(t.ep),this.D.format(t.ep),this.D.background(null),this.D.rotation(0),this.D.width(null),this.D.height(null),this.D.fontSize(11),this.D.minFontSize(8),this.D.maxFontSize(72),this.D.kb(this),this.D.zh=y,this.data(e||null,i),t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj),t.T(this.ua,[["seriesType",8192,1,0,function(){this.Sa&&(t.qd(this.Sa),this.Sa=null)}],["pointWidth",0,0,0,function(){this.Sa&&this.Sa.sp()&&this.Sa.B(80,1)}],["connectMissingPoints",0,0,0,function(){this.Sa&&!this.Sa.sp()&&this.Sa.B(80,1)}],["fill",0,0,0,n,this],["negativeFill",0,0,0,n,this],["firstFill",0,0,0,n,this],["lastFill",0,0,0,n,this],["maxFill",0,0,0,n,this],["minFill",0,0,0,n,this],["stroke",0,0,0,n,this],["hatchFill",0,0,0,s,this],["firstHatchFill",0,0,0,s,this],["lastHatchFill",0,0,0,s,this],["maxHatchFill",0,0,0,s,this],["minHatchFill",0,0,0,s,this],["negativeHatchFill",0,0,0,s,this]]),this.Ua()},s=function(e,i){var n=e.$().ma();return t.D(i)?(n={index:n,sourceHatchFill:t.Yb("diagonal-brick"),iterator:e.$()},n=t.Yb(i.call(n))):n=t.da(i)?i?t.Yb("diagonal-brick"):null:t.Yb(i),n},a=function(e,i){for(var n={},s=e.length;s--;){var a=e[s];if(a){var o=!t.J(a,t.Y);if(o?a.enabled:a.enabled())for(var r=0,l=i.length;r<l;r++){var h=i[r],c=o?a[h]:a[h]();t.p(c)&&(n[h]=t.J(c,t.V)?c.F():c)}}}return n},o=function(e,i){for(var n={},s=e.length;s--;){var a=e[s];if(a)for(var o=!t.J(a,t.Y),r=0,l=i.length;r<l;r++){var h=i[r],c=o?a[h]:a[h]();t.p(c)&&(n[h]=t.J(c,t.V)?c.F():c)}}return n},r=function(e,i,n,s){if(t.ea(i))var a=n[i];else t.z(i)?(a=t.dt(i,null))||(a=n[i]):t.C(i)?(a=t.dt(i.type,!0)).N(i):a=null;a&&e[s](a)},l=function(e,i,n,s){if(t.A(i))for(var a=0;a<i.length;a++){var o=i[a];e[s](a,o),t.C(o)&&"scale"in o&&1<o.scale&&e[s](a).scale(n[o.scale])}},h=function(t,e){var i=t.bu(e.scales);r(t,e.xScale,i,"xScale"),r(t,e.yScale,i,"yScale"),l(t,e.lineAxesMarkers,i,"lineMarker"),l(t,e.rangeAxesMarkers,i,"rangeMarker"),l(t,e.textAxesMarkers,i,"textMarker")},c=function(e){i.call(this,e),this.path=t.qk(),this.path.zIndex(1),this.f=null,this.b=[this.path]},u=function(e){c.call(this,e),this.i=t.qk(),this.i.zIndex(1.1),this.b.push(this.i)},d=function(t){i.call(this,t)},p=function(t){c.call(this,t)},g=function(t){i.call(this,t)},f=function(t,e){var i=new n(t,e);return i.Kg(),i},b={bC:"area",lF:"column",tt:"line",ata:"win-loss"};t.H(i,t.wu);var v={};t.g=i.prototype,t.g.fa=null,t.g.ra=20|t.wu.prototype.ra,t.g.sa=976|t.wu.prototype.sa,t.g.ly=!1,t.g.Mi=0,t.g.$=function(){return this.ya.$()},t.g.Ec=function(){return this.ya.Ec()},t.g.xc=function(){return this.ya},t.g.Ak=function(){return!1},t.g.sC=function(){if(!this.enabled())return null;var e=this.ya.bb(),i=this.ya.Ra(),n=this.$(),s=!1,a=n.get("x");return n=n.get("value"),t.p(a)&&t.p(n)?(e.zk(n)&&(n=window.NaN),i=i.zk(a)?window.NaN:this.Qe(i.transform(a,.5),!0),e=this.Qe(e.transform(n,.5),!1),((0,window.isNaN)(i)||(0,window.isNaN)(e))&&(s=!0),s?null:[i,e]):null},t.g.sp=function(){return!1},t.g.wn=function(){this.enabled()&&(this.ly=this.ly?this.NF():this.JK())&&this.tf(),this.enabled()&&this.ly&&this.gq()},t.g.remove=function(){this.ya.Db().O(null),this.Aa&&this.Aa.remove(),this.ya.labels().O(null),i.u.remove.call(this)},t.g.Gd=function(){this.ly=!1,this.fa=this.ob(),this.Aa||(this.Aa=t.ok()),this.zc();var e=this.ya.D;e.ka(),e.clear(),e.O(this.O()),e.ja(this.ob()),(e=this.ya.G).ka();var i=this.Zv();e.oJ(i),i=this.qy(),e.pJ(i),e.clear(),e.O(this.O()),e.ja(this.fa)},t.g.Rl=function(){var e=this.ya.G;e.W();var i=t.da(this.ya.clip())?this.ya.clip()?this.ya.ob():"none":this.ya.clip(),n=e.Vd();n&&n.clip(i),e.da(!1),e.I(4294967295),(e=this.ya.D).W(),(n=e.Vd())&&n.clip(i),e.da(!1),e&&e.I(4294967295),this.J(2)?this.I(0):this.I(4294967295)},t.g.Ic=function(e){this.oe&&!e||(this.oe=new t.Fw),e=this.$();var i={chart:{value:this.xc(),type:""},series:{value:this,type:""},index:{value:e.ma(),type:"number"},value:{value:e.get("value"),type:"number"},x:{value:e.get("x"),type:"string"},seriesName:{value:"Series "+e.ma(),type:"string"}};return this.oe.lg(e).Li([this,this.xc()]).Im({"%XValue":"x"}),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.Bh=function(e){var i=this.$(),n=i.j("shape");return n?(i=n.rb(),e=t.Dk(e),{value:t.Eo(i,e)}):{value:{x:i.j("x"),y:i.j("value")}}},t.g.JK=function(){return this.NF()},t.g.Qe=function(t,e){if(e)var i=this.fa.left,n=this.fa.width;else i=this.fa.Va(),n=-this.fa.height;return i+t*n},t.g.tf=function(){var t=this.ya,e=t.$(),i=e.get("value"),n=e.ma(),s=e.get("label");if(n==e.Hb()-1)var r=t.mI(),l=t.b.lastLabels;else n||(r=t.UG(),l=t.b.firstLabels);if(i==t.Rg("max"))var h=t.sh(),c=t.b.maxLabels;else i==t.Rg("min")&&(h=t.th(),c=t.b.minLabels);if(0>i)var u=t.SI(),d=t.b.negativeLabels;e=t.labels(),l=o([l,c,d,t.b.labels],w),s=a([s,r,h,u,e],w),s=o([s,l],w),r=t.D.be(n),h=null,s.enabled?(h=s.position||t.D.g("position"),h=t.Sa.Bh(h),u=t.Sa.Ic(),r?(r.Hf(u),r.jc(h)):r=t.D.add(u,h,n),r.Hi(),r.td(s),h=r):r&&r.clear(),(t=h)&&t.W()},t.g.gq=function(){var e=this.ya,i=e.$(),n=i.get("value"),s=i.ma(),r=i.get("marker");if(s==i.Hb()-1)var l=e.nI(),h=e.b.lastMarkers;else s||(l=e.VG(),h=e.b.firstMarkers);if(n==e.Rg("max"))var c=e.AI(),u=e.b.maxMarkers;else n==e.Rg("min")&&(c=e.GI(),u=e.b.minMarkers);if(0>n)var d=e.TI(),p=e.b.negativeMarkers;i=e.Db(),n=e.b.markers;var g=e.Xv(!0);g={fill:g,stroke:t.Ql(g)},h=o([h,u,p,n,g],S),r=a([r,l,c,d,i],S),r=o([r,h],S),l=e.G.jp(s),c=null,r.enabled?(c=r.position||e.G.g("position"),c=e.Sa.Bh(c),l?l.jc(c):l=e.G.add(c,s),l.Hi(),t.gy(l,e.G),l.td(r),c=l):l&&l.clear(),(e=c)&&e.W()},t.g.Zv=function(){return t.Ub(this.ya.MF(this.ya.g("fill")))},t.g.qy=function(){return t.Ql(this.Zv())},t.g.us=function(){var t=this.ya.G;return t.type("circle"),t.ta("size",1.8),t.ta("position","center"),{labels:{background:{enabled:!1},position:"center",anchor:"center-bottom"},color:"#4682B4"}},t.g.R=function(){t.qd(this.Aa),this.Aa=null,i.u.R.call(this)},t.H(n,t.ux),n.prototype.Ma=function(){return"sparkline"},n.prototype.sa=28672|t.ux.prototype.sa;var m=40,y=40;t.g=n.prototype,t.g.ig=function(e){e=n.u.ig.call(this,e);var i=this.Sa&&this.Sa.fa||t.kn(0,0,0,0);return i=(e.clientX-(i.left+t.Zj(this.O().Ja()).x))/i.width,i=this.Ra().Mc(i),0>(i=this.data().find("x",i))&&(i=window.NaN),e.pointIndex=i,e},t.g.Md=function(){},t.g.oq=function(e){var i=this.Sa&&this.Sa.fa||t.kn(0,0,0,0),n=e.clientX;e=e.clientY;var s=t.Zj(this.O().Ja());n-=s.x,e-=s.y,s=i.left;var a=i.top,o=i.width;return i=i.height,n<s||n>s+o||e<a||e>a+i?null:(i=[],s=(n-s)/o,s=this.Ra().Mc(s),s=(s=t.Er(this.data(),s,t.J(this.Ra(),t.Qt))).length?s[0]:window.NaN,(a=this.$()).select(s)&&(o=a.j("x"),a=a.j("value"),n=t.gn(o,a,n,e),(0,window.isNaN)(o)||(0,window.isNaN)(a)||i.push({X:this,vd:[s],Ln:s,De:{index:s,Tf:n}})),i)},t.g.ej=function(){return"none"},t.g.Ic=function(){this.oe||(this.oe=new t.Fw);var e=this.$();return this.oe.lg(e).Li([this]),e={x:{value:e.get("x"),type:"string"},value:{value:e.get("value"),type:"number"},index:{value:e.ma(),type:"number"},chart:{value:this,type:""}},t.ov(this.oe,e),this.oe},t.g.Rk=function(){return this.Ic()},t.g.Uu=function(){return!0},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,pie:this,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e}},t.g.Ii=function(){return this},t.g.$i=function(){return this},t.g.Ue=function(){return[this]},t.g.ie=t.ia,t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.ce=function(){return null},t.g.eh=function(){return!1},t.g.Ak=function(){return!1},t.g.ml=t.ia,t.g.pk=t.ia,t.g.wm=t.ia,t.g.pq=t.ia,t.g.ms=function(e){return t.p(e)?(this.Ti=e,this):(this.Ti||(this.Ti={}),e=t.pm(this.g("seriesType")),this.Ti[e]||(this.Ti[e]=t.Qc(this.Sa.oa)),this.Ti)};var S="enabled position anchor offsetX offsetY type size fill stroke".split(" "),w="enabled background padding position anchor offsetX offsetY rotation width height fontSize fontFamily fontColor fontOpacity fontDecoration fontStyle fontVariant fontWeight letterSpacing textDirection lineHeight textIndent vAlign hAlign wordWrap wordBreak textOverflow selectable disablePointerEvents useHtml".split(" ");t.g=n.prototype,t.g.Ra=function(e){return t.p(e)?((e=t.jt(this.eb,e,null,15))&&(this.eb=e,this.eb.da(!1),this.B(4096,1)),this):(this.eb||(this.eb=t.it()),this.eb)},t.g.bb=function(e){return t.p(e)?((e=t.jt(this.Fc,e,null,15))&&(this.Fc=e,this.Fc.da(!1),this.B(4096,1)),this):(this.Fc||(this.Fc=t.ft()),this.Fc)},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.og[n];return a||(a=new t.$z,t.W(this,"lineMarker",a),this.og[n]=a,a.kb(this),t.K(a,this.Ry,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.rg[n];return a||(a=new t.cA,this.rg[n]=a,a.kb(this),t.K(a,this.Ry,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.tg[n];return a||(a=new t.fA,t.W(this,"textMarker",a),this.tg[n]=a,a.kb(this),t.K(a,this.Ry,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.Ry=function(){this.B(16384,1)},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.i=this.Yc=e.Ui():this.i=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.la=this.i,t.K(this.la,this.dd,this),this.Sa&&this.Sa.B(16,21),this.B(256,1)),this):this.la},t.g.dd=function(e){t.X(e,16)&&(this.Sa&&this.Sa.B(16,21),this.B(256,1))},t.g.$=function(){return this.sd||this.Ec()},t.g.Ec=function(){return this.sd=this.data().$()},t.g.nJ=function(e){var i=0;t.X(e,32768)&&(i|=256),t.X(e,2048)&&(i=32),t.X(e,1)&&(i=8192),t.X(e,16)&&(i|=8448,this.ow()),t.X(e,4)&&(i|=4096),this.B(i,1)};var x,C=(x={},t.sq(x,[t.Z.cC,t.Z.jZ,t.Z.qF,t.Z.kZ,t.Z.gZ,[0,"seriesType",e],[0,"pointWidth",function(e){return t.yo(e,this.g("pointWidth"))}],[0,"connectMissingPoints",t.Dq],[1,"firstFill",t.Nq],[1,"lastFill",t.Nq],[1,"maxFill",t.Nq],[1,"minFill",t.Nq],[1,"lastHatchFill",t.Oq],[1,"firstHatchFill",t.Oq],[1,"maxHatchFill",t.Oq],[1,"minHatchFill",t.Oq]]),x);t.U(n,C),t.g=n.prototype,t.g.clip=function(e){return t.p(e)?(null===e&&(e=!1),this.gg!=e&&(this.gg=e,this.Sa&&this.Sa.B(4,9)),this):this.gg},t.g.MF=function(e,i){if(t.D(e)){var n=1<arguments.length?this.MF.apply(this,t.Ja(arguments,1)):this.b.color;n={index:this.$().ma(),sourceColor:n,iterator:this.$()},n=e.call(n)}else n=e;return n},t.g.g=function(e){var i=n.u.g.call(this,e);if(!i)switch(e){case"fill":case"negativeFill":case"firstFill":case"lastFill":case"maxFill":case"minFill":case"stroke":case"lastHatchFill":case"firstHatchFill":case"maxHatchFill":case"minHatchFill":i=this.b[e];break;case"hatchFill":case"negativeHatchFill":i=t.p(i)?i:this.b[e]}return i},t.g.Xv=function(e){var i=this.$(),n=i.get("value"),s=i.ma();return e=e&&t.p(i.get("fill"))?i.get("fill"):s==i.Hb()-1&&t.p(this.g("lastFill"))?this.g("lastFill"):!s&&t.p(this.g("firstFill"))?this.g("firstFill"):n==this.Rg("max")&&t.p(this.g("maxFill"))?this.g("maxFill"):n==this.Rg("min")&&t.p(this.g("minFill"))?this.g("minFill"):0>n&&t.p(this.g("negativeFill"))?this.g("negativeFill"):this.g("fill"),e=this.MF(e),t.Ub(e)},t.g.nr=function(){return t.Wb(this.MF(this.g("stroke")))},t.g.Db=function(e){return this.Bc||(this.Bc=new t.ey,t.W(this,"markers",this.Bc),t.K(this.Bc,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Bc.N(e),this):this.Bc},t.g.TI=function(e){return this.Ka||(this.Ka=new t.ey,t.W(this,"negativeMarkers",this.Ka),t.K(this.Ka,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Ka.N(e),this):this.Ka},t.g.VG=function(e){return this.aa||(this.aa=new t.ey,t.W(this,"firstMarkers",this.aa),t.K(this.aa,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.aa.N(e),this):this.aa},t.g.nI=function(e){return this.ea||(this.ea=new t.ey,t.W(this,"lastMarkers",this.ea),t.K(this.ea,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.ea.N(e),this):this.ea},t.g.AI=function(e){return this.na||(this.na=new t.ey,t.W(this,"maxMarkers",this.na),t.K(this.na,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.na.N(e),this):this.na},t.g.GI=function(e){return this.Ba||(this.Ba=new t.ey,t.W(this,"minMarkers",this.Ba),t.K(this.Ba,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Ba.N(e),this):this.Ba},t.g.Mn=function(e){t.X(e,1)&&this.Sa&&this.Sa.B(128,1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Tu,t.W(this,"labels",this.Da),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.SI=function(e){return this.Ha||(this.Ha=new t.Tu,t.W(this,"negativeLabels",this.Ha),t.K(this.Ha,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Ha.N(e),this):this.Ha},t.g.UG=function(e){return this.P||(this.P=new t.Tu,t.W(this,"firstLabels",this.P),t.K(this.P,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.P.N(e),this):this.P},t.g.mI=function(e){return this.ba||(this.ba=new t.Tu,t.W(this,"lastLabels",this.ba),t.K(this.ba,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.ba.N(e),this):this.ba},t.g.sh=function(e){return this.f||(this.f=new t.Tu,t.W(this,"maxLabels",this.f),t.K(this.f,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.f.N(e),this):this.f},t.g.th=function(e){return this.o||(this.o=new t.Tu,t.W(this,"minLabels",this.o),t.K(this.o,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.o.N(e),this):this.o},t.g.de=function(e){t.X(e,1)&&this.Sa&&this.Sa.B(256,1)},t.g.pb=function(){var e;if(this.J(4096)){this.hJ();var i=this.Ra(),n=this.bb();for(i.Of()&&i.Bg(),n.Of()&&n.Bg(),e=this.Ec();e.advance();){var s=e.get("x"),a=e.get("value");t.p(s)&&i.Xc(s),t.p(a)&&n.Xc(a)}e=!1,i.Of()&&(e|=i.Hg()),n.Of()&&(e|=n.Hg()),e&&this.ow(),i=-window.Infinity,n=window.Infinity;var o=s=0;for(e=this.Ec();e.advance();){var r=this.$();a=this.bb(),r=r.get("value"),(a=a.zk(r)?null:r)&&(a=t.N(a),(0,window.isNaN)(a)||(i=Math.max(i,a),n=Math.min(n,a),s+=a)),o++}e=s/o,this.La("max",i),this.La("min",n),this.La("sum",s),this.La("average",e),this.La("pointsCount",o),this.I(4096)}},t.g.Qh=function(e){if(this.J(8192)&&!this.Sa){var i=this.g("seriesType"),n=v[i];if(n){n=new n(this),i=t.pm(i),n.Ga("chart.defaultSeriesSettings.base.normal"),n.Ga("chart.defaultSeriesSettings."+i+".normal");var s=this.oa.defaultSeriesSettings;s&&n.Ga(s.base),s[i]&&n.Ga(s[i]),this.Sa=n,n.zh=30,t.K(n,this.nJ,this),this.b=this.ms()[t.pm(i)]||this.Sa.us(),this.B(12288,1)}else t.il(4,null,[i+" series"]),n=null;this.Sa=n}if(this.pb(),!this.pf()){if(t.xr(this.Sa),this.J(4)&&(this.lf=e.clone().round(),this.Sa.sp()&&(n=this.Sa,e=this.lf,i=n.Ec().Hb(),n=n.jH(e),i=(e.width-i*n)%(i-1),0!=e.height%2&&--e.height,0!=i&&(e.left+=Math.floor(i/2),e.width-=i)),this.ow(),this.B(24576)),this.J(16384)){for(i=0,n=(e=t.Ga(this.og,this.rg,this.tg)).length;i<n;i++)(s=e[i])&&(s.ka(),s.Nb()?s.scale(this.bb()):s.scale(this.Ra()),s.ja(this.lf),s.O(this.Na),s.W(),s.da(!1));this.I(16384)}if(this.J(8192)){if(e=this.Sa){for(e.O(this.Na),e.ja(this.lf),this.Sa.Gd(),e=this.Ec();e.advance();)this.Sa.wn();this.Sa.Rl(),this.Db().I(4294967295),this.GI().I(4294967295),this.AI().I(4294967295),this.TI().I(4294967295),this.VG().I(4294967295),this.nI().I(4294967295),this.labels().I(4294967295),this.th().I(4294967295),this.sh().I(4294967295),this.SI().I(4294967295),this.UG().I(4294967295),this.mI().I(4294967295)}this.I(8192)}t.zr(this.Sa)}},t.g.ow=function(){this.Sa&&this.Sa.B(80)},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.yj=function(){return!this.$().Hb()||!(this.Sa&&this.Sa.enabled())},t.g.bu=function(e){var i,n=this.Ma(),s={};if(t.A(e))for(i=0;i<e.length;i++){var a=e[i];t.z(a)&&(a={type:a}),a=t.qm(a,i,n);var o=t.dt(a.type,!1);o.N(a),s[i]=o}else if(t.C(e))for(i in e)e.hasOwnProperty(i)&&(a=e[i],t.z(a)&&(a={type:a}),a=t.qm(a,i,n),(o=t.dt(a.type,!1)).N(a),s[i]=o);return s},t.g.Kg=function(){h(this,this.oa)},t.g.U=function(e,i){n.u.U.call(this,e,i),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings),this.data(e.data),t.Iq(this,C,e),this.clip(e.clip),this.data(e.data),h(this,e),e.lastMarkers&&this.nI().ga(!!i,e.lastMarkers),e.firstMarkers&&this.VG().ga(!!i,e.firstMarkers),e.maxMarkers&&this.AI().ga(!!i,e.maxMarkers),e.minMarkers&&this.GI().ga(!!i,e.minMarkers),e.negativeMarkers&&this.TI().ga(!!i,e.negativeMarkers),e.markers&&this.Db().ga(!!i,e.markers),e.firstLabels&&this.UG().ga(!!i,e.firstLabels),e.lastLabels&&this.mI().ga(!!i,e.lastLabels),e.maxLabels&&this.sh().ga(!!i,e.maxLabels),e.minLabels&&this.th().ga(!!i,e.minLabels),e.negativeLabels&&this.SI().ga(!!i,e.negativeLabels),e.labels&&this.labels().ga(!!i,e.labels)},t.g.F=function(){var e=n.u.F.call(this);t.Tq(this,C,e);var i,s,a={},o=[];a[t.oa(this.Ra())]=this.Ra().F(),o.push(a[t.oa(this.Ra())]),e.xScale=o.length-1,this.Ra()!=this.bb()&&(a[t.oa(this.bb())]=this.bb().F(),o.push(a[t.oa(this.bb())])),e.yScale=o.length-1,e.clip=t.J(this.gg,t.I)?this.gg.F():this.gg,e.data=this.data().F(),e.lastMarkers=this.nI().F(),e.lastLabels=this.mI().F(),e.firstMarkers=this.VG().F(),e.firstLabels=this.UG().F(),e.maxMarkers=this.AI().F(),e.maxLabels=this.sh().F(),e.minMarkers=this.GI().F(),e.minLabels=this.th().F(),e.negativeMarkers=this.TI().F(),e.negativeLabels=this.SI().F(),e.markers=this.Db().F(),e.labels=this.labels().F();var r=[];for(i=0;i<this.og.length;i++)if(s=this.og[i]){var l=s.F();if(s=s.scale()){var h=t.oa(s);a[h]?l.scale=(0,t.za)(o,a[h]):(a[h]=s.F(),o.push(a[h]),l.scale=o.length-1)}r.push(l)}for(r.length&&(e.lineAxesMarkers=r),r=[],i=0;i<this.rg.length;i++)(s=this.rg[i])&&(l=s.F(),(s=s.scale())&&(a[h=t.oa(s)]?l.scale=(0,t.za)(o,a[h]):(a[h]=s.F(),o.push(a[h]),l.scale=o.length-1)),r.push(l));for(r.length&&(e.rangeAxesMarkers=r),r=[],i=0;i<this.tg.length;i++)(s=this.tg[i])&&(l=s.F(),(s=s.scale())&&(a[h=t.oa(s)]?l.scale=(0,t.za)(o,a[h]):(a[h]=s.F(),o.push(a[h]),l.scale=o.length-1)),r.push(l));return r.length&&(e.textAxesMarkers=r),e.scales=o,{chart:e}},t.g.R=function(){t.sd(this.og,this.rg,this.tg,this.Yc,this.i,this.la,this.Sa,this.Bc,this.Ka,this.aa,this.ea,this.na,this.Ba,this.Da,this.Ha,this.P,this.ba,this.f,this.o),this.og.length=0,this.rg.length=0,this.tg.length=0,this.i=this.Yc=null,delete this.la,delete this.sd,this.b=this.o=this.f=this.ba=this.P=this.Ha=this.Da=this.Ba=this.na=this.ea=this.aa=this.Ka=this.Bc=this.Sa=null,n.u.R.call(this)},t.Tp.sparkline=f;var D=n.prototype;t.E("anychart.sparkline",f),D.xScale=D.Ra,D.yScale=D.bb,D.lineMarker=D.Ym,D.rangeMarker=D.gn,D.textMarker=D.mn,D.data=D.data,D.clip=D.clip,D.lastMarkers=D.nI,D.lastLabels=D.mI,D.firstMarkers=D.VG,D.firstLabels=D.UG,D.maxMarkers=D.AI,D.maxLabels=D.sh,D.minMarkers=D.GI,D.minLabels=D.th,D.negativeMarkers=D.TI,D.negativeLabels=D.SI,D.markers=D.Db,D.labels=D.labels,D.getType=D.Ma,D.noData=D.Gm,t.H(c,i),t.g=c.prototype,t.g.wn=function(){var t;this.enabled()&&((t=this.ly?this.NF():this.JK())&&(this.gq(),this.tf()),this.ly=this.ya.g("connectMissingPoints")&&this.ly||t)},t.g.Gd=function(){if(c.u.Gd.call(this),!this.pf()&&this.enabled()){var e,i=this.ya.bb().transform(0);if((0,window.isNaN)(i)&&(i=0),this.Mi=this.Qe(t.Za(i,0,1),!1),i=this.b.length,this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(this.ya.clip()&&(e=t.da(this.ya.clip())?this.fa:this.ya.clip(),this.Aa.clip(e)),this.I(4)),this.J(16)){for(e=0;e<i;e++)this.b[e].clear();this.x_()}if(this.J(2)){for(e=this.O(),this.Aa.parent(e),e=0;e<i;e++)this.b[e].parent(this.Aa);this.f&&this.f.parent(this.Aa),this.I(2)}this.J(64)&&!this.f&&(this.f=t.qk(),this.f.parent(this.Aa),this.f.zIndex(2),this.f.Dd(!0))}},t.g.Rl=function(){this.yR(),this.A1(),c.u.Rl.call(this)},t.g.Bh=function(){var t=this.$();return{value:{x:t.j("x"),y:t.j("value")}}},t.g.yR=t.ia,t.g.A1=t.ia,t.g.x_=function(){this.path.stroke(this.ya.nr(),1),this.path.fill(null)},t.g.us=function(){return c.u.us.call(this)},t.H(u,c),v.area=u,t.g=u.prototype,t.g.Gd=function(){u.u.Gd.call(this),this.o=window.NaN},t.g.x_=function(){var e=t.Ub(this.ya.MF(this.ya.fill()));this.path.stroke(null),this.path.fill(e),this.i.stroke(this.ya.nr()),this.i.fill(null)},t.g.A1=function(){this.J(64)&&this.f&&(this.f.pe(this.path.F()),this.f&&(this.f.stroke(null),this.f.fill(s(this.ya,this.ya.g("hatchFill")))))},t.g.JK=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.yR(),this.path.moveTo(e,this.Mi).lineTo(e,t),this.i.moveTo(e,t),this.o=e,this.$().j("x",e).j("value",t)}return!0},t.g.NF=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.path.lineTo(e,t),this.i.lineTo(e,t),this.o=e,this.$().j("x",e).j("value",t)}return!0},t.g.yR=function(){(0,window.isNaN)(this.o)||this.path.lineTo(this.o,this.Mi).close()},t.g.us=function(){var t=u.u.us.call(this);return t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.5},t},t.H(d,i),v.column=d,t.g=d.prototype,t.g.Na=null,t.g.du=null,t.g.sp=function(){return!0},t.g.u5=function(){return t.mk()},t.g.jH=function(e){return e=e||this.fa,e=Math.floor((this.ya.Ra().sD()||1/this.$().Hb())*e.width),1>(e=Math.floor(t.L(this.ya.g("pointWidth"),e)))&&(e=1),e},t.g.Gd=function(){d.u.Gd.call(this);var e=this.ya.bb().transform(0);(0,window.isNaN)(e)&&(e=0),this.Mi=this.Qe(t.Za(e,0,1),!1),!this.pf()&&this.enabled()&&(this.Na||(this.Na=new t.dC(this.u5,t.ia),this.Na.zIndex(1)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(e=t.da(this.ya.clip())?this.ya.clip()?this.fa:"none":this.ya.clip(),this.Aa.clip(e),this.I(4)),this.J(16)&&this.Na.clear(),this.J(64)&&(this.du||(this.du=new t.dC(this.u5,t.ia),this.du.parent(this.Aa),this.du.zIndex(2),this.du.Dd(!0)),this.du.clear()),this.J(2)&&(this.Aa.parent(this.O()),this.Na.parent(this.Aa),this.du&&this.du.parent(this.Aa),this.I(2)))},t.g.NF=function(){var e=this.sC();if(!e)return!1;if(this.J(16)){var i=e[0],n=e[1];n=n<this.Mi?Math.ceil(n):Math.floor(n),e=t.eC(this.Na);var a=this.jH(),o=0==a%2?0:.5;this.$().j("x",i).j("value",n).j("shape",e);var r=Math.min(this.Mi,n);n=Math.abs(this.Mi-n),e.Ho(Math.ceil(i+o-a/2)).Io(r).Go(a).Fo(n),i=this.$().j("shape"),t.p(i)&&(i.fill(this.ya.Xv(!0)),i.stroke(null))}return this.J(64)&&(e=this.$(),i=this.du?t.eC(this.du):null,e.j("hatchFillShape",i),e=e.j("shape"),t.p(e)&&i&&i.pe(e.F()),null!=(i=this.$().j("hatchFillShape"))&&i.stroke(null).fill(function(e){var i=e.$(),n=i.get("value"),a=i.ma();return i=t.p(i.get("hatchFill"))?i.get("hatchFill"):a==i.Hb()-1&&t.p(e.g("lastHatchFill"))?e.g("lastHatchFill"):!a&&t.p(e.g("firstHatchFill"))?e.g("firstHatchFill"):n==e.Rg("max")&&t.p(e.g("maxHatchFill"))?e.g("maxHatchFill"):n==e.Rg("min")&&t.p(e.g("minHatchFill"))?e.g("minHatchFill"):0>n&&t.p(e.g("negativeHatchFill"))?e.g("negativeHatchFill"):e.g("hatchFill"),s(e,i)}(this.ya))),!0},t.g.us=function(){var t=d.u.us.call(this);return t.markers||(t.markers={}),t.markers.position="center-top",t.labels||(t.labels={}),t.labels.position="center-top",t.labels.anchor="center-bottom",t.negativeMarkers||(t.negativeMarkers={}),t.negativeMarkers.position="center-bottom",t.negativeLabels||(t.negativeLabels={}),t.negativeLabels.position="center-bottom",t.negativeLabels.anchor="center-top",t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.7},t.negativeFill={color:"#ef6c00",opacity:.7},t},t.H(p,c),v.line=p,t.g=p.prototype,t.g.JK=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.path.moveTo(e,t),this.$().j("x",e).j("value",t)}return!0},t.g.NF=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.path.lineTo(e,t),this.$().j("x",e).j("value",t)}return!0},t.g.Zv=function(){return this.ya.nr()},t.g.qy=function(){return t.Ql(this.ya.nr())},t.g.us=function(){var t=p.u.us.call(this);return t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.5},t},t.H(g,d),v["win-loss"]=g,g.prototype.Gd=function(){g.u.Gd.call(this),this.Mi=Math.round(this.Qe(.5,!1))},g.prototype.sC=function(){if(!this.enabled())return null;var e=this.ya.bb(),i=this.ya.Ra(),n=this.$(),s=!1,a=n.get("x");return n=0<(n=n.get("value"))?e.Ne()?0:1:0>n?e.Ne()?1:0:.5,t.p(a)&&t.p(n)?(e.zk(n)&&(n=window.NaN),e=i.zk(a)?window.NaN:this.Qe(i.transform(a,.5),!0),i=this.Qe(n,!1),((0,window.isNaN)(e)||(0,window.isNaN)(i))&&(s=!0),s?null:[e,i]):null},g.prototype.us=function(){var t=g.u.us.call(this);return t.markers||(t.markers={}),t.markers.position="center-top",t.markers.anchor="center-top",t.labels||(t.labels={}),t.labels.position="center-top",t.labels.anchor="center-top",t.negativeMarkers||(t.negativeMarkers={}),t.negativeMarkers.position="center-bottom",t.negativeMarkers.anchor="center-bottom",t.negativeLabels||(t.negativeLabels={}),t.negativeLabels.position="center-bottom",t.negativeLabels.anchor="center-bottom",t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.7},t.negativeFill={color:"#ef6c00",opacity:.7},t},t.Tp.sparkline=f,t.E("anychart.sparkline",f)}.call(this,$)),_.exports||(_.exports=1,function(t){var e,i,n,s,a,o,r,l,h,c,u,d,p,g,f,b,v,m,y,S,w,x,C,D,T,k,$,O,P,L,G,F,I,E,A,U,_,j,M,N,B,R,H,z,V,q,W,K,Y,X,J,Z,Q,tt,et,it,nt,st,at,ot,rt,lt,ht,ct,ut,dt,pt,gt,ft,bt,vt,mt,yt,St,wt,xt,Ct,Dt,Tt,kt,$t,Ot,Pt,Lt,Gt,Ft,It,Et,At,Ut,_t,jt;e=function(e,i,n){return t.p(n)||(n="a4"),n=Mt[n],t.p(e)&&t.p(i)?t.z(e)&&t.da(i)?(e=e.toLowerCase(),(e=Mt[e])&&(n=i?{width:e.height,height:e.width}:e)):(n.width=String(e),n.height=String(i)):t.p(e)&&(e=Mt[String(e)])&&(n=e),t.fc(n.width,"px")||t.fc(n.width,"mm")||(n.width+="px"),t.fc(n.height,"px")||t.fc(n.height,"mm")||(n.height+="px"),n},i=function(e,i){t.yj(e,null,i,void 0)},n=function(e,i){if(e){var n=t.Me("STYLE");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(window.document.createTextNode(String(e))),t.We(t.Ae(window.document,"head",void 0,i)[0],n,0)}},s=function(){Nt&&(window.document.body.removeChild(Nt),Nt=null)},a=function(e){if(!Nt){var i=window.document.createElement("iframe");if(Nt=i,t.uf(i,{visibility:"hidden",position:"fixed",right:0,bottom:0}),window.document.body.appendChild(i),e)for(var s,a=0,o=(e=t.gk()).length;a<o;a++)if((s=e[a]).type==Rt){var r="";s.cssText?r=s.cssText:s.style&&s.style.cssText&&s.selectorText&&(r=s.style.cssText.replace(/\s*-closure-parent-stylesheet:\s*\[object\];?\s*/gi,"").replace(/\s*-closure-rule-index:\s*[\d]+;?\s*/gi,""),r=s.selectorText+" { "+r+" }"),n(r,i.contentWindow.document)}n("body{padding:0;margin:0;height:100%;}@page {size: auto; margin: 0; padding:0}",i.contentWindow.document)}return Nt},o=function(){if(Nt){var e=Nt,i=e.contentWindow;t.Hp?((Bt=t.sh.open()).document.write(i.document.documentElement.innerHTML),s(),Bt.onafterprint=function(){(0,window.setTimeout)((function(){Bt.close()}),0)},(0,window.setTimeout)((function(){Bt.focus(),Bt.print()}),0)):t.hd?(0,window.setTimeout)((function(){t.uf(e,"visibility",""),i.onafterprint=s,i.focus(),i.print()}),0):(t.Dj(s,6),i.focus(),i.print())}},r=function(t){if(Ht[t])return Ht[t];if(t=String(t),!Ht[t]){var e=/function ([^\(]+)/.exec(t);Ht[t]=e?e[1]:"[Anonymous]"}return Ht[t]},l=function(e,i){var n=[];if(t.Aa(i,e))n.push("[...circular reference...]");else if(e&&50>i.length){n.push(r(e)+"(");for(var s=e.arguments,a=0;s&&a<s.length;a++){0<a&&n.push(", ");var o=s[a];switch(typeof o){case"object":o=o?"object":"null";break;case"string":break;case"number":o=String(o);break;case"boolean":o=o?"true":"false";break;case"function":o=(o=r(o))?o:"[fn]";break;default:o=typeof o}40<o.length&&(o=o.substr(0,40)+"..."),n.push(o)}i.push(e),n.push(")\n");try{n.push(l(e.caller,i))}catch(h){n.push("[exception trying to get caller]\n")}}else e?n.push("[...long stack...]"):n.push("[end]");return n.join("")},h=function(t){var e=Error();if(Error.captureStackTrace)Error.captureStackTrace(e,t||h),e=String(e.stack);else{try{throw e}catch(i){e=i}e=(e=e.stack)?String(e):null}return e||(e=l(t||arguments.callee.caller,[])),e},c=function(e){return e instanceof t.he&&e.constructor===t.he&&e.f===t.ge?e.b:"type_error:Const"},u=function(){var e=t.p(t.fa.URL)&&t.p(t.fa.URL.createObjectURL)?t.fa.URL:t.p(t.fa.webkitURL)&&t.p(t.fa.webkitURL.createObjectURL)?t.fa.webkitURL:t.p(t.fa.createObjectURL)?t.fa:null;if(null!=e)return e;throw Error("This browser doesn't seem to support blob URLs")},d=function(t){return u().createObjectURL(t)},p=function(){this.f=Vt},g=function(e){return e instanceof p&&e.constructor===p&&e.f===Vt?"":(t.ka(e),"type_error:TrustedResourceUrl")},f=function(e){return e instanceof t.ke&&e.constructor===t.ke&&e.i===t.je?e.f:(t.ka(e),"type_error:SafeUrl")},b=function(e){return e instanceof t.ke?e:(e=e.By?e.cu():String(e),qt.test(e)||(e="about:invalid#zClosurez"),t.le(e))},v=function(e){return e instanceof t.ne&&e.constructor===t.ne&&e.f===t.me?e.b:(t.ka(e),"type_error:SafeStyle")},m=function(e){return e.replace(t.YD,(function(t,e,i,n){var s="";return i=i.replace(/^(['"])(.*)\1$/,(function(t,e,i){return s=e,i})),t=b(i).cu(),e+s+t+s+n}))},y=function(e){if(e instanceof t.ke)e='url("'+f(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';else if(e instanceof t.he)e=c(e);else{var i=(e=String(e)).replace(t.oda,"$1").replace(t.YD,"url");if(i=Wt.test(i)){for(var n=i=!0,s=0;s<e.length;s++){var a=e.charAt(s);"'"==a&&n?i=!i:'"'==a&&i&&(n=!n)}i=i&&n}e=i?m(e):"zClosurez"}return e},S=function(e){var i,n="";for(i in e){if(!/^[-_a-zA-Z0-9]+$/.test(i))throw Error("Name allows only [-_a-zA-Z0-9], got: "+i);var s=e[i];null!=s&&(n+=i+":"+(s=t.A(s)?(0,t.Wa)(s,y).join(" "):y(s))+";")}return n?t.oe(n):t.nda},w=function(e){return e instanceof t.qe&&e.constructor===t.qe&&e.o===t.pe?e.f:(t.ka(e),"type_error:SafeHtml")},x=function(e){if(e instanceof t.qe)return e;var i=null;return e.jV&&(i=e.b()),e=t.pc(e.By?e.cu():String(e)),t.re(e,i)},C=function(e){if(e instanceof t.qe)return e;e=x(e);var i=w(e);return i=t.oc(i.replace(/  /g," &#160;"),void 0),t.re(i,e.b())},D=function(e){if(!t.C(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof t.ne||(e=S(e)),v(e)},T=function(e){function i(e){t.A(e)?(0,t.Pe)(e,i):(e=x(e),s+=w(e),e=e.b(),0==n?n=e:0!=e&&n!=e&&(n=null))}var n=0,s="";return(0,t.Pe)(arguments,i),t.re(s,n)},k=function(t,e){return(e||window.document).getElementsByTagName(String(t))},$=function(t){return t.contentDocument||t.contentWindow.document},O=function(e,i,n){t.zj(e,i,n,null)||t.aj(t.qa(i,e))},P=function(e){return new t.oj((function(i,n){var s=e.length,a=[];if(s)for(var o,r=function(t,e){s--,a[t]=e,0==s&&i(a)},l=function(t){n(t)},h=0;h<e.length;h++)o=e[h],O(o,t.qa(r,h),l);else i(a)}))},L=function(){var e=new t.oj(t.ia);return t.lj(e,t.mj,void 0),e},G=function(e,i,n){var s={};return i="object"==t.ka(i)?i:null,t.Dc(e,(function(e,a){s[a]=i?t.p(i[a])?i[a]:void 0:e,t.p(n)&&(s[a]=t.p(s[a])?s[a]:n[a])})),s},F=function(e){if(e.zs&&"function"==typeof e.zs)return e.zs();if(t.z(e))return e.split("");if(t.la(e)){for(var i=[],n=e.length,s=0;s<n;s++)i.push(e[s]);return i}return t.Ec(e)},I=function(e){if(e.Yt&&"function"==typeof e.Yt)return e.Yt();if(!e.zs||"function"!=typeof e.zs){if(t.la(e)||t.z(e)){var i=[];e=e.length;for(var n=0;n<e;n++)i.push(n);return i}return t.Fc(e)}},E=function(e,i){if(e.forEach&&"function"==typeof e.forEach)e.forEach(i,void 0);else if(t.la(e)||t.z(e))(0,t.Pe)(e,i,void 0);else for(var n=I(e),s=F(e),a=s.length,o=0;o<a;o++)i.call(void 0,s[o],n&&n[o],e)},A=function(t,e){if(t)for(var i=t.split("&"),n=0;n<i.length;n++){var s=i[n].indexOf("="),a=null;if(0<=s){var o=i[n].substring(0,s);a=i[n].substring(s+1)}else o=i[n];e(o,a?(0,window.decodeURIComponent)(a.replace(/\+/g," ")):"")}},t.DW=function(e){var i;this.o=this.K=this.i="",this.G=null,this.D=this.Sc="",this.b=!1,e instanceof t.DW?(this.b=t.p(void 0)?void 0:e.b,U(this,e.i),this.K=e.K,this.o=e.o,_(this,e.G),this.Sc=e.Sc,j(this,e.f.clone()),this.D=e.D):e&&(i=String(e).match(Zt))?(this.b=!1,U(this,i[1]||"",!0),this.K=M(i[2]||""),this.o=M(i[3]||"",!0),_(this,i[4]),this.Sc=M(i[5]||"",!0),j(this,i[6]||"",!0),this.D=M(i[7]||"")):(this.b=!1,this.f=new R(null,this.b))},U=function(t,e,i){t.i=i?M(e,!0):e,t.i&&(t.i=t.i.replace(/:$/,""))},_=function(t,e){if(e){if(e=Number(e),(0,window.isNaN)(e)||0>e)throw Error("Bad port number "+e);t.G=e}else t.G=null},j=function(t,e,i){e instanceof R?(t.f=e,K(t.f,t.b)):(i||(e=N(e,ne)),t.f=new R(e,t.b))},M=function(t,e){return t?e?(0,window.decodeURI)(t.replace(/%25/g,"%2525")):(0,window.decodeURIComponent)(t):""},N=function(e,i,n){return t.z(e)?(e=(0,window.encodeURI)(e).replace(i,B),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null},B=function(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)},R=function(t,e){this.f=this.b=null,this.i=t||null,this.o=!!e},H=function(e){e.b||(e.b=new t.ZB,e.f=0,e.i&&A(e.i,(function(t,i){e.add((0,window.decodeURIComponent)(t.replace(/\+/g," ")),i)})))},z=function(e){var i=I(e);if(void 0===i)throw Error("Keys are undefined");var n=new R(null,void 0);e=F(e);for(var s=0;s<i.length;s++){var a=i[s],o=e[s];t.A(o)?q(n,a,o):n.add(a,o)}return n},V=function(e,i){return H(e),i=W(e,i),t.$B(e.b.f,i)},q=function(e,i,n){e.remove(i),0<n.length&&(e.i=null,e.b.set(W(e,i),t.Ha(n)),e.f+=n.length)},W=function(t,e){var i=String(e);return t.o&&(i=i.toLowerCase()),i},K=function(t,e){e&&!t.o&&(H(t),t.i=null,t.b.forEach((function(t,e){var i=e.toLowerCase();e!=i&&(this.remove(e),q(this,i,t))}),t)),t.o=e},Y=function(){t.qf.call(this),this.Er="closure_frame"+re++,this.f=[],oe[this.Er]=this},X=function(e,i){var n=new Y;if(t.Ld(n,"ready",n.ld,!1,n),n.cw)throw Error("[goog.net.IframeIo] Unable to send, already active.");var s=new t.DW(e);if(!Qt){(Qt=t.Me("FORM")).acceptCharset="utf-8";var a=Qt.style;a.position="absolute",a.visibility="hidden",a.top=a.left="-10px",a.width=a.height="10px",a.overflow="hidden",window.document.body.appendChild(Qt)}if(n.Uk=Qt,i&&J(n.Uk,i),n.Uk.action=s.toString(),n.Uk.method="POST",n.cw=!0,n.jG=!1,n.LA=n.Er+"_"+(n.mia++).toString(36),n.vl=t.ye(n.Uk).Ac("IFRAME",{name:n.LA,id:n.LA}),t.hd&&7>Number(t.ad)&&(n.vl.src='javascript:""'),(s=n.vl.style).visibility="hidden",s.width=s.height="10px",s.display="none",t.xd?s.marginTop=s.marginLeft="-10px":(s.position="absolute",s.top=s.left="-10px"),t.hd&&!t.bd("11")){n.Uk.target=n.LA||"",t.ye(n.Uk).b.body.appendChild(n.vl),t.Ld(n.vl,"readystatechange",n.LW,!1,n);try{n.b=!1,n.Uk.submit()}catch(V){t.Yd(n.vl,"readystatechange",n.LW,!1,n),Q(n)}}else{if(t.ye(n.Uk).b.body.appendChild(n.vl),s=n.LA+"_inner",a=$(n.vl),window.document.baseURI){var o=t.pc(s);t.ie("Short HTML snippet, input escaped, safe URL, for performance"),o='<head><base href="'+t.pc(window.document.baseURI)+'"></head><body><iframe id="'+o+'" name="'+o+'"></iframe>',o=t.re(o,null)}else o=t.pc(s),t.ie("Short HTML snippet, input escaped, for performance"),o=t.re('<body><iframe id="'+o+'" name="'+o+'"></iframe>',null);t.yd&&!t.xd?a.documentElement.innerHTML=w(o):a.write(w(o)),t.Ld(a.getElementById(s),"load",n.jO,!1,n);var r=k("TEXTAREA",n.Uk);o=0;for(var l=r.length;o<l;o++){var u=r[o].value;t.lf(r[o])!=u&&(t.df(r[o],u),r[o].value=u)}(r=a.importNode(n.Uk,!0)).target=s,r.action=n.Uk.action,a.body.appendChild(r),u=k("SELECT",n.Uk);var d=k("SELECT",r);for(o=0,l=u.length;o<l;o++)for(var v=k("OPTION",u[o]),m=k("OPTION",d[o]),y=0,S=v.length;y<S;y++)m[y].selected=v[y].selected;for(u=k("INPUT",n.Uk),d=k("INPUT",r),o=0,l=u.length;o<l;o++)if("file"==u[o].type&&u[o].value!=d[o].value){n.Uk.target=s,r=n.Uk;break}try{n.b=!1,r.submit(),a.close(),t.gd&&t.Dj(n.x6,250,n)}catch(V){try{var x=t.ha("window.location.href");if(t.z(V))var O={message:V,name:"Unknown error",lineNumber:"Not available",fileName:x,stack:"Not available"};else{o=!1;try{var P=V.lineNumber||V.line||"Not available"}catch(q){P="Not available",o=!0}try{var L=V.fileName||V.filename||V.sourceURL||t.fa.$googDebugFname||x}catch(q){L="Not available",o=!0}O=!o&&V.lineNumber&&V.fileName&&V.stack&&V.message&&V.name?V:{message:V.message||"Not available",name:V.name||"UnknownError",lineNumber:P,fileName:L,stack:V.stack||"Not available"}}var G=O.fileName;if(null!=G||(G=""),/^https?:\/\//i.test(G)){var F=b(G);t.ie("view-source scheme plus HTTP/HTTPS URL");var I="view-source:"+f(F),E=t.le(I)}else{var A=t.ie("sanitizedviewsrc");E=t.le(c(A))}var U=C("Message: "+O.message+"\nUrl: ");x={href:E,target:"_new"};var _=O.fileName;if(!Kt.test("a"))throw Error("Invalid tag name <a>.");if("A"in Xt)throw Error("Tag name <a> is not allowed for SafeHtml.");if(P=null,L="",x)for(var j in x){if(!Kt.test(j))throw Error('Invalid attribute name "'+j+'".');var M=x[j];if(null!=M){if(E=L,G=j,(F=M)instanceof t.he)F=c(F);else if("style"==G.toLowerCase())F=D(F);else{if(/^on/i.test(G))throw Error('Attribute "'+G+'" requires goog.string.Const value, "'+F+'" given.');if(G.toLowerCase()in Yt)if(F instanceof p)F=g(F);else if(F instanceof t.ke)F=f(F);else{if(!t.z(F))throw Error('Attribute "'+G+'" on tag "a" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+F+'" given.');F=b(F).cu()}}F.By&&(F=F.cu()),L=E+" "+G+'="'+t.pc(String(F))+'"'}}var N="<a"+L;if(null!=_?t.A(_)||(_=[_]):_=[],!0===zt.a)N+=">";else{var B=T(_);N+=">"+w(B)+"</a>",P=B.b()}var R=x&&x.dir;R&&(P=/^(ltr|rtl|auto)$/i.test(R)?0:null);var H=t.re(N,P),z=T(U,H,C("\nLine: "+O.lineNumber+"\n\nBrowser stack:\n"+O.stack+"-> [end]\n\nJS stack traversal:\n"+h(void 0)+"-> "))}catch(q){z=C("Exception trying to expose exception! You win, we lose. "+q)}w(z),t.Yd(a.getElementById(s),"load",n.jO,!1,n),a.close(),Q(n)}}it(n)},J=function(e,i){var n=t.ye(e);E(i,(function(i,s){t.A(i)||(i=[i]),(0,t.Pe)(i,(function(t){t=n.Ac("INPUT",{type:"hidden",name:s,value:t}),e.appendChild(t)}))}))},Z=function(t,e){var i;t.jG=!0,t.cw=!1,i||"function"!=typeof t.i||t.i(e)&&(i=4),i?Q(t):(t.dispatchEvent("complete"),t.dispatchEvent("success"),tt(t))},Q=function(t){t.b||(t.cw=!1,t.jG=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"),tt(t),t.b=!0)},tt=function(t){et(t),it(t),t.Uk=null,t.dispatchEvent("ready")},et=function(e){var i=e.vl;i&&(i.onreadystatechange=null,i.onload=null,i.onerror=null,e.f.push(i)),e.KA&&(t.Ej(e.KA),e.KA=null),t.gd||t.yd&&!t.xd?e.KA=t.Dj(e.$0,2e3,e):e.$0(),e.vl=null,e.LA=null},it=function(e){e.Uk&&e.Uk==Qt&&t.Ve(e.Uk)},nt=function(e){return e.vl?t.hd&&!t.bd("11")?e.vl:$(e.vl).getElementById(e.LA+"_inner"):null},st=function(){},at=function(t){var e;return(e=t.b)||(e={},lt(t)&&(e[0]=!0,e[1]=!0),e=t.b=e),e},ot=function(){},rt=function(t){return(t=lt(t))?new window.ActiveXObject(t):new window.XMLHttpRequest},lt=function(t){if(!t.f&&void 0===window.XMLHttpRequest&&void 0!==window.ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],i=0;i<e.length;i++){var n=e[i];try{return new window.ActiveXObject(n),t.f=n}catch(s){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f},ht=function(e){t.qf.call(this),this.headers=new t.ZB,this.ba=e||null,this.f=!1,this.aa=this.b=null,this.na="",this.i=0,this.D="",this.o=this.Ba=this.K=this.ea=!1,this.G=0,this.P=null,this.Za=le,this.Ha=this.Ka=!1},t.RW=function(t,e,i,n,s,a,o){var r=new ht;ue.push(r),e&&r.wa("complete",e),r.Ce("ready",r.Kda),a&&(r.G=Math.max(0,a)),o&&(r.Ka=o),ct(r,t,i,n,s)},ct=function(e,i,n,s,a){if(e.b)throw Error("[goog.net.XhrIo] Object is active with another request="+e.na+"; newUri="+i);n=n?n.toUpperCase():"GET",e.na=i,e.D="",e.i=0,e.ea=!1,e.f=!0,e.b=e.ba?rt(e.ba):rt(ae),e.aa=e.ba?at(e.ba):at(ae),e.b.onreadystatechange=(0,t.pa)(e.x4,e);try{e.Ba=!0,e.b.open(n,String(i),!0),e.Ba=!1}catch(r){return void e.Lv(5,r)}i=s||"";var o=e.headers.clone();a&&E(a,(function(t,e){o.set(e,t)})),a=t.ya(o.Yt(),dt),s=t.fa.FormData&&i instanceof t.fa.FormData,!t.Aa(ce,n)||a||s||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(t,e){this.b.setRequestHeader(e,t)}),e),e.Za&&(e.b.responseType=e.Za),"withCredentials"in e.b&&e.b.withCredentials!==e.Ka&&(e.b.withCredentials=e.Ka);try{bt(e),0<e.G&&(e.Ha=ut(e.b),e.Ha?(e.b.timeout=e.G,e.b.ontimeout=(0,t.pa)(e.D6,e)):e.P=t.Dj(e.D6,e.G,e)),e.K=!0,e.b.send(i),e.K=!1}catch(r){e.Lv(5,r)}},ut=function(e){return t.hd&&t.bd(9)&&t.ea(e.timeout)&&t.p(e.ontimeout)},dt=function(t){return"content-type"==t.toLowerCase()},pt=function(t){t.ea||(t.ea=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))},gt=function(e){if(e.f&&void 0!==t.OD&&(!e.aa[1]||4!=vt(e)||2!=mt(e)))if(e.K&&4==vt(e))t.Dj(e.x4,0,e);else if(e.dispatchEvent("readystatechange"),e.YH()){e.f=!1;try{if(t.VW(e))e.dispatchEvent("complete"),e.dispatchEvent("success");else{e.i=6;try{var i=2<vt(e)?e.b.statusText:""}catch(n){i=""}e.D=i+" ["+mt(e)+"]",pt(e)}}finally{ft(e)}}},ft=function(e,i){if(e.b){bt(e);var n=e.b,s=e.aa[0]?t.ia:null;e.b=null,e.aa=null,i||e.dispatchEvent("ready");try{n.onreadystatechange=s}catch(a){}}},bt=function(e){e.b&&e.Ha&&(e.b.ontimeout=null),e.P&&(t.Ej(e.P),e.P=null)},t.VW=function(e){var i=mt(e);t:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break t;default:n=!1}return n||((i=0===i)&&(!(e=String(e.na).match(Zt)[1]||null)&&t.fa.self&&t.fa.self.location&&(e=(e=t.fa.self.location.protocol).substr(0,e.length-1)),i=!he.test(e?e.toLowerCase():"")),n=i),n},vt=function(t){return t.b?t.b.readyState:0},mt=function(t){try{return 2<vt(t)?t.b.status:-1}catch(e){return-1}},t.XW=function(e){if(e.b)return t.io(e.b.responseText)},t.YW=function(e){return t.z(e.D)?e.D:String(e.D)},yt=function(e,i,n){var s=e.width()/e.height();return{width:i=t.p(i)?i:n?Math.round(n*s):e.width(),height:n=t.p(n)?n:i?Math.round(i/s):e.height()}},St=function(e,i,n,s,a,o){n&&(i.responseType="base64"),s&&(i.save=!0);var r=o||t.ia,l=s?"url":"result";i=z(new t.ZB(i)),t.RW(de+"/"+e,(function(e){e=e.target,t.VW(e)?a(t.XW(e)[l]):r(t.YW(e))}),"POST",i.toString())},wt=function(e,i,n,s,a,o){n=yt(e,n,s),i.data=e.Nq(n.width,n.height),i.dataType="svg",i.responseType="file",i.width=n.width,i.height=n.height,t.p(a)&&(i.quality=a),t.p(o)&&(i["file-name"]=o)},xt=function(e,i,n,s,a,o,r){n=yt(e,n,s),i.data=e.Nq(n.width,n.height),i.dataType="svg",i.responseType="file",i.width=n.width,i.height=n.height,t.p(a)&&(i.quality=a),t.p(o)&&(i["force-transparent-white"]=o),t.p(r)&&(i["file-name"]=r)},Ct=function(e,i,n,s,a){i.data=e.Nq(n,s),i.dataType="svg",i.responseType="file",t.p(a)&&(i["file-name"]=a)},Dt=function(e,i,n,s,a,o,r){var l=null;t.p(n)?t.ea(n)?(i["pdf-width"]=n,i["pdf-height"]=t.ea(s)?s:e.height()):t.z(n)?(i["pdf-size"]=n||"a4",i.landscape=!!s,l=Jt[i["pdf-size"]],i.landscape&&(l={width:l.height,height:l.width})):(i["pdf-width"]=e.width(),i["pdf-height"]=e.height()):(i["pdf-width"]=e.width(),i["pdf-height"]=e.height()),t.p(a)&&(i["pdf-x"]=a),t.p(o)&&(i["pdf-y"]=o),t.p(r)&&(i["file-name"]=r),l?(n=l.width,l=l.height,s=e.width(),r=e.height(),(l=n<l?[n,n/s*r]:n>l?[l/r*s,l]:[n,l])[0]-=a||0,l[1]-=o||0,e=e.Nq(l[0],l[1])):e=e.Nq(i["pdf-width"],i["pdf-height"]),i.data=e,i.dataType="svg",i.responseType="file"},Tt=function(e,i,n,s,a){if("svg"==t.kk){var o={};wt(e,o,i,n,s,a),X(de+"/png",o)}else(0,window.alert)(t.ld(15))},kt=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};xt(e,r,i,n,s,a,o),X(de+"/jpg",r)}else(0,window.alert)(t.ld(15))},$t=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};Dt(e,r,i,n,s,a,o),X(de+"/pdf",r)}else(0,window.alert)(t.ld(15))},Ot=function(e,i,n,s){if("svg"==t.kk){var a={};Ct(e,a,i,n,s),X(de+"/svg",a)}else(0,window.alert)(t.ld(15))},Pt=function(t){var e="";return t&&(e=(new window.XMLSerializer).serializeToString(t)),e},Lt=function(){this.b={},this.i={},this.G={},this.o={},this.D={},this.ea=["svg2pdf.min.js","jspdf.min.js","canvg.min.js","xlsx.core.min.js"],this.k3=!1,this.K={}},Gt=function(e){var i=be,n=t.fa.anychart.exports;if(n.k3)return L();var s=i.ea,a=n.ic(e,"clientside").path;a+=t.fc(a,"/")?"":"/",e=[];for(var o=0;o<s.length;o++)i=new t.oj((function(e,i){var n=a+s[o],r=t.Re(window.document,"script");r.setAttribute("src",n),r.onload=r.onreadystatechange=function(){t.hl("info","Loaded external exporting script "+n),e()},r.onerror=function(){t.hl("warn","Failed tp load external script "+n),i()},t.Lp.head.appendChild(r)})),e.push(i);return P(e).then((function(){n.k3=!0}))},Ft=function(e,i,n){if(t.C(n)){var s={};t.Dc(n,(function(e,i){t.p(e)&&(s[i]=e)})),t.Jc(s)||(e[i]=s)}else t.p(n)&&(e[i]=n)},It=function(e,n,s,a){i(Gt(e).then((function(){var e=t.fa.XLSX,i=e.utils,a=t.Rm().pC(n),o=i.book_new();a=i.aoa_to_sheet(a),i.book_append_sheet(o,a,"data"),e=e.write(o,{type:"array"}),jt(new window.Blob([e],{type:fe.xlsx}),s,"xlsx")})),(function(){a()}))},Et=function(i,n,s,a){var o=s.paperSize,r=s.landscape,l=s.x||0,h=s.y||0,c=s.filename||"anychart";c+=".pdf";try{if(t.p(o)||t.p(r)){var u=e(o,r);if(t.z(o)){var d=Jt[o].width,p=Jt[o].height;(r&&p>d||!r&&p<d)&&(d=[p,p=d][0])}else d=(0,window.parseFloat)(u.width),p=(0,window.parseFloat)(u.height);var g=new t.fa.jsPDF(r?"l":"p","pt",o||[d,p]);t.z(n)?g.addImage(n,"png",l,h,d,p):t.fa.svg2pdf(n,g,{xOffset:l,yOffset:h,scale:1})}else{var f=i.width(),b=i.height();g=new t.fa.jsPDF(f>b?"l":"p","pt",[f,b]),t.z(n)?g.addImage(n,"png",l,h,f,b):t.fa.svg2pdf(n,g,{xOffset:l,yOffset:h,scale:1})}g.save(c)}catch(v){a(s)}},At=function(e,i,n,s,a,o,r){var l=fe[n],h=t.Re(window.document,"canvas");h.width=s,h.height=a,t.uf(h,{width:s,height:a,visibility:"hidden",position:"fixed",right:0,bottom:0}),t.Lp.body.appendChild(h);var c=h.getContext("2d"),p=new window.Image,g=i.quality||.92;e.setAttribute("width",s),e.setAttribute("height",a);var f=(new window.XMLSerializer).serializeToString(e),b=d(new window.Blob([f],{type:"image/svg+xml"}));p.onload=function(){try{if(h.msToBlob&&c.drawSvg){c.drawSvg(f,0,0,s,a);var e=h.toDataURL(l,g)}else c.drawImage(p,0,0,s,a),e=h.toDataURL(l,g);o(e),t.Xe(h),u().revokeObjectURL(b)}catch(n){r(i)}},p.src=b},Ut=function(t,e,i,n,s,a,o){function r(t){jt(t,l,i)}var l=n.filename||"anychart",h=0<e.getElementsByTagName("image").length;try{switch(i){case"svg":var c=(new window.XMLSerializer).serializeToString(e);jt(new window.Blob([c],{type:"image/svg+xml"}),l,i);break;case"png":case"jpg":At(e,n,i,s,a,r,o);break;case"pdf":h?At(e,n,i,s,a,(function(e){Et(t,e,n,o)}),o):Et(t,e,n,o)}}catch(u){o(n)}},_t=function(e,n,s,a){i(Gt(e).then((function(){function i(e){var i=e.getAttribute("href"),n=new window.Image,s=(0,window.parseFloat)(e.getAttribute("width")),a=(0,window.parseFloat)(e.getAttribute("height"));s=s||1,a=a||1,n.onload=function(){var i=t.Re(window.document,"CANVAS");t.Lp.body.appendChild(i);var r=i.getContext("2d");i.width=s,i.height=a,r.drawImage(n,0,0,s,a),r=i.toDataURL(),e.setAttribute("href",r),e.setAttribute("src",r),++f==b.length&&o(),t.Xe(i)},n.crossOrigin="anonymous",n.src=i}function o(){Ut(r,g,n,s,c,u,a)}var r=t.J(e,t.Yj)?e:e.O().Ja(),l=s.paperSize,h=s.landscape;if(t.z(l))var c=Jt[l].width,u=Jt[l].height;else c=s.width||r.width(),u=s.height||r.height();var d=r.width(),p=r.height();"pdf"==n&&t.z(l)&&(h&&u>c||!h&&u<c)&&(c=[u,u=c][0]),r.resize(c,u);var g=r.ia().cloneNode(!0);r.resize(t.z(d)?d:"100%",t.z(p)?p:"100%"),g.setAttribute("width",c),g.setAttribute("height",u);var f=0,b=g.getElementsByTagName("image");l=t.Aa(["png","jpg","pdf"],n);try{if(0<b.length){if((t.Cc("Trident")||t.Cc("MSIE"))&&l)throw"Internet explorer can't export chart with images to pdf, jpg or png";for(l=0;l<b.length;l++)i(b[l])}else o()}catch(v){a(s)}})),(function(){a(s)}))},jt=function(e,i,n){var s=t.Re(window.document,"a");if(t.z(e)){var a=(0,window.atob)(e.split(",")[1]);e=e.split(",")[0].split(":")[1].split(";")[0];for(var o=new window.ArrayBuffer(a.length),r=new window.Uint8Array(o),l=0;l<a.length;l++)r[l]=a.charCodeAt(l);a=new window.Blob([o],{type:e})}else a=e;i=i+"."+n,n=d(a),t.p(s.download)?(t.Lp.body.appendChild(s),s.href=n,s.download=i,s.click(),t.Xe(s)):t.p(t.fa.navigator.msSaveOrOpenBlob)?t.fa.navigator.msSaveOrOpenBlob(a,i):t.Mp.open(n,i),u().revokeObjectURL(n)},t.ZB.prototype.zs=t.ca(29,(function(){t.aC(this);for(var e=[],i=0;i<this.b.length;i++)e.push(this.f[this.b[i]]);return e})),t.ke.prototype.b=t.ca(2,(function(){return 1})),t.qe.prototype.b=t.ca(1,(function(){return this.i}));var Mt={"us-letter":{width:"215.9mm",height:"279.4mm"},a0:{width:"841mm",height:"1189mm"},a1:{width:"594mm",height:"841mm"},a2:{width:"420mm",height:"594mm"},a3:{width:"297mm",height:"420mm"},a4:{width:"210mm",height:"297mm"},a5:{width:"148mm",height:"210mm"},a6:{width:"105mm",height:"148mm"}},Nt=null,Bt=null,Rt=5,Ht={},zt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Vt={};p.prototype.By=!0,p.prototype.cu=function(){return""},p.prototype.jV=!0,p.prototype.b=function(){return 1};var qt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Wt=/^[-,."'%_!# a-zA-Z0-9]+$/,Kt=/^[a-zA-Z0-9-]+$/,Yt={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},Xt={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Jt={a0:{width:2384,height:3370},a1:{width:1684,height:2384},a2:{width:1191,height:1684},a3:{width:842,height:1191},a4:{width:595,height:842},a5:{width:420,height:595},a6:{width:297,height:420},a7:{width:210,height:297},a8:{width:48,height:210},a9:{width:105,height:148},b0:{width:2834,height:4008},b1:{width:2004,height:2834},b2:{width:1417,height:2004},b3:{width:1e3,height:1417},b4:{width:708,height:1e3},b5:{width:498,height:708},b6:{width:354,height:498},b7:{width:249,height:354},b8:{width:175,height:249},b9:{width:124,height:175},"arch-a":{width:648,height:864},"arch-b":{width:864,height:1296},"arch-c":{width:1296,height:1728},"arch-d":{width:1728,height:2592},"arch-e":{width:2592,height:3456},"crown-octavo":{width:348,height:527},"crown-quarto":{width:535,height:697},"demy-octavo":{width:391,height:612},"demy-quarto":{width:620,height:782},"royal-octavo":{width:442,height:663},"royal-quarto":{width:671,height:884},executive:{width:522,height:756},halfletter:{width:396,height:612},ledger:{width:1224,height:792},legal:{width:612,height:1008},letter:{width:612,height:792},tabloid:{width:792,height:1224}},Zt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;t.DW.prototype.toString=function(){var t=[],e=this.i;e&&t.push(N(e,te,!0),":");var i=this.o;return(i||"file"==e)&&(t.push("//"),(e=this.K)&&t.push(N(e,te,!0),"@"),t.push((0,window.encodeURIComponent)(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.G)&&t.push(":",String(i))),(i=this.Sc)&&(this.o&&"/"!=i.charAt(0)&&t.push("/"),t.push(N(i,"/"==i.charAt(0)?ie:ee,!0))),(i=this.f.toString())&&t.push("?",i),(i=this.D)&&t.push("#",N(i,se)),t.join("")},t.DW.prototype.clone=function(){return new t.DW(this)};var Qt,te=/[#\/\?@]/g,ee=/[#\?:]/g,ie=/[#\?]/g,ne=/[#\?@]/g,se=/#/g;t.g=R.prototype,t.g.add=function(t,e){H(this),this.i=null,t=W(this,t);var i=this.b.get(t);return i||this.b.set(t,i=[]),i.push(e),this.f+=1,this},t.g.remove=function(e){return H(this),e=W(this,e),!!t.$B(this.b.f,e)&&(this.i=null,this.f-=this.b.get(e).length,this.b.remove(e))},t.g.clear=function(){this.b=this.i=null,this.f=0},t.g.Uj=function(){return H(this),0==this.f},t.g.forEach=function(e,i){H(this),this.b.forEach((function(n,s){(0,t.Pe)(n,(function(t){e.call(i,t,s,this)}),this)}),this)},t.g.Yt=function(){H(this);for(var t=this.b.zs(),e=this.b.Yt(),i=[],n=0;n<e.length;n++)for(var s=t[n],a=0;a<s.length;a++)i.push(e[n]);return i},t.g.zs=function(e){H(this);var i=[];if(t.z(e))V(this,e)&&(i=t.Ga(i,this.b.get(W(this,e))));else{e=this.b.zs();for(var n=0;n<e.length;n++)i=t.Ga(i,e[n])}return i},t.g.set=function(t,e){return H(this),this.i=null,t=W(this,t),V(this,t)&&(this.f-=this.b.get(t).length),this.b.set(t,[e]),this.f+=1,this},t.g.get=function(t,e){if(!t)return e;var i=this.zs(t);return 0<i.length?String(i[0]):e},t.g.toString=function(){if(this.i)return this.i;if(!this.b)return"";for(var t=[],e=this.b.Yt(),i=0;i<e.length;i++){var n=e[i],s=(0,window.encodeURIComponent)(String(n));n=this.zs(n);for(var a=0;a<n.length;a++){var o=s;""!==n[a]&&(o+="="+(0,window.encodeURIComponent)(String(n[a]))),t.push(o)}}return this.i=t.join("&")},t.g.clone=function(){var t=new R;return t.i=this.i,this.b&&(t.b=this.b.clone(),t.f=this.f),t},t.H(Y,t.qf);var ae,oe={},re=0;t.g=Y.prototype,t.g.Uk=null,t.g.vl=null,t.g.LA=null,t.g.mia=0,t.g.cw=!1,t.g.jG=!1,t.g.KA=null,t.g.abort=function(){this.cw&&(t.$d(nt(this)),this.cw=this.jG=!1,this.dispatchEvent("abort"),tt(this))},t.g.R=function(){this.cw&&this.abort(),Y.u.R.call(this),this.vl&&et(this),it(this),delete this.i,this.Uk=null,delete oe[this.Er]},t.g.YH=function(){return this.jG},t.g.uq=function(){return this.cw},t.g.LW=function(){if("complete"==this.vl.readyState){t.Yd(this.vl,"readystatechange",this.LW,!1,this);try{var e=$(this.vl);if(t.hd&&"about:blank"==e.location&&!window.navigator.onLine)return void Q(this)}catch(i){return void Q(this)}Z(this,e)}},t.g.jO=function(){if(!t.yd||t.xd||"about:blank"!=(this.vl?$(nt(this)):null).location){t.Yd(nt(this),"load",this.jO,!1,this);try{Z(this,this.vl?$(nt(this)):null)}catch(e){Q(this)}}},t.g.$0=function(){for(this.KA&&(t.Ej(this.KA),this.KA=null);0!=this.f.length;){var e=this.f.pop();t.Xe(e)}},t.g.x6=function(){if(this.cw){var e=this.vl?$(nt(this)):null;e&&!t.Zc(e,"documentUri")?(t.Yd(nt(this),"load",this.jO,!1,this),Q(this)):t.Dj(this.x6,250,this)}},st.prototype.b=null,t.H(ot,st),ae=new ot,t.H(ht,t.qf);var le="",he=/^https?$/i,ce=["POST","PUT"],ue=[];t.g=ht.prototype,t.g.Kda=function(){this.ld(),t.Fa(ue,this)},t.g.D6=function(){void 0!==t.OD&&this.b&&(this.D="Timed out after "+this.G+"ms, aborting",this.i=8,this.dispatchEvent("timeout"),this.abort(8))},t.g.Lv=function(t,e){this.f=!1,this.b&&(this.o=!0,this.b.abort(),this.o=!1),this.D=e,this.i=t,pt(this),ft(this)},t.g.abort=function(t){this.b&&this.f&&(this.f=!1,this.o=!0,this.b.abort(),this.o=!1,this.i=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ft(this))},t.g.R=function(){this.b&&(this.f&&(this.f=!1,this.o=!0,this.b.abort(),this.o=!1),ft(this,!0)),ht.u.R.call(this)},t.g.x4=function(){this.md||(this.Ba||this.K||this.o?gt(this):this.bja())},t.g.bja=function(){gt(this)},t.g.uq=function(){return!!this.b},t.g.YH=function(){return 4==vt(this)};var de="//export.anychart.com";t.g=t.Yj.prototype,t.g.yla=function(e){return t.p(e)?(this.jy=(this.W6=!!e)?t.Ch.anychart.exports:null,this):!!this.W6},t.g.Hu=function(e,i,n,s,a,o,r){if("svg"==t.kk){var l={};wt(this,l,s,a,o,r),St("png",l,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.FB=function(e,i,n,s,a,o,r,l){if("svg"==t.kk){var h={};xt(this,h,s,a,o,r,l),St("jpg",h,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.HB=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};Ct(this,r,s,a,o),St("svg",r,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.GB=function(e,i,n,s,a,o,r,l){if("svg"==t.kk){var h={};Dt(this,h,s,a,o,r,l),St("pdf",h,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.zA=function(e,i,n,s,a){if("svg"==t.kk){var o={};wt(this,o,n,s,a),St("png",o,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.wA=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};xt(this,r,n,s,a,o),St("jpg",r,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.BA=function(e,i,n,s){if("svg"==t.kk){var a={};Ct(this,a,n,s),St("svg",a,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.yA=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};Dt(this,r,n,s,a,o),St("pdf",r,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.Eu=function(t,e,i,n){this.jy?this.jy.Eu(this,this,t,e,i,n):Tt(this,t,e,i,n)},t.g.Yw=function(t,e,i,n,s){this.jy?this.jy.saveAsJpg(this,this,t,e,i,n,s):kt(this,t,e,i,n,s)},t.g.Zw=function(t,e,i,n,s){this.jy?this.jy.saveAsPdf(this,this,t,e,i,n,s):$t(this,t,e,i,n,s)},t.g.$w=function(t,e,i){this.jy?this.jy.saveAsSvg(this,this,t,e,i):Ot(this,t,e,i)},t.g.print=function(i,s){if(t.p(i)||t.p(s)){var r=e(i,s,"us-letter"),l=a(this.EY()).contentWindow.document;n("html, body {height: 100%; overflow: hidden}",l);var h=t.Me("DIV");t.uf(h,{width:r.width,height:r.height}),l.body.appendChild(h),r=this.width(),l=this.height();var c=t.Wf(h);this.resize(c.width,c.height),"svg"==(c=this.ia()).tagName&&c.cloneNode?(c=c.cloneNode(!0),h.appendChild(c)):t.lk(h).data(this.data()),this.resize(r,l)}else h=a(this.EY()).contentWindow.document,"svg"==(l=this.ia()).tagName?l.cloneNode?r=l.cloneNode(!0):((l=t.lk(h.body)).data(this.data()),r=l.ia()):(l=t.lk(h.body)).data(this.data()),c=r,(l=t.mg()).lc(c,"width","100%"),l.lc(c,"height","100%"),l.lc(c,"viewBox","0 0 "+this.width()+" "+this.height()),t.uf(c,"width","100%"),t.uf(c,"height",""),t.uf(c,"max-height","100%"),h.body.appendChild(r);o()},t.g.Nq=function(i,n){if("svg"!=t.kk)return"";if(t.p(i)||t.p(n)){var s=e(i,n),a=t.bf(this.ia()),o=t.yf(a,"width");a=t.yf(a,"height"),this.resize(s.width,s.height),s=Pt(this.ia()),this.resize(o,a)}else t.mg().hP(this.ia(),this.width(),this.height()),s=Pt(this.ia()),t.mg().hP(this.ia(),"100%","100%");return'<?xml version="1.0" encoding="UTF-8" standalone="no"?>'+s},t.E("acgraph.server",(function(e){return t.p(e)&&(de=e),de}));var pe=t.Yj.prototype;pe.useAnychartExporting=pe.yla,pe.saveAsPNG=pe.Eu,pe.saveAsJPG=pe.Yw,pe.saveAsPDF=pe.Zw,pe.saveAsSVG=pe.$w,pe.saveAsPng=pe.Eu,pe.saveAsJpg=pe.Yw,pe.saveAsPdf=pe.Zw,pe.saveAsSvg=pe.$w,pe.shareAsPng=pe.Hu,pe.shareAsJpg=pe.FB,pe.shareAsPdf=pe.GB,pe.shareAsSvg=pe.HB,pe.getPngBase64String=pe.zA,pe.getJpgBase64String=pe.wA,pe.getSvgBase64String=pe.BA,pe.getPdfBase64String=pe.yA,pe.print=pe.print,pe.toSvg=pe.Nq,t.g=Lt.prototype,t.g.w0=function(e){return"object"==t.ka(e)?(t.ra(this.K,e),this):this.K},t.g.filename=function(e){return t.p(e)&&(this.aa=e),this.aa},t.g.wk=function(t,e){return this.b=G({width:t,height:e},t,this.b)},t.g.z1=function(t,e,i,n,s,a,o){return this.i=G({caption:t,link:e,name:i,description:n,width:s,height:a,appId:o},t,this.i)},t.g.T6=function(t,e,i){return this.G=G({url:t,width:e,height:i},t,this.G)},t.g.I3=function(t,e,i,n){return this.o=G({caption:t,description:e,width:i,height:n},t,this.o)},t.g.G4=function(t,e,i,n){return this.D=G({link:t,description:e,width:i,height:n},t,this.D)},t.g.UK=function(){this.aa="anychart",this.b={width:void 0,height:void 0},this.i={caption:t.ll.location?t.ll.location.hostname:"",link:void 0,name:void 0,description:void 0,appId:0x42607363aa4b7,width:1200,height:630},this.G={url:"https://export.anychart.com/sharing/twitter",width:1024,height:800},this.o={caption:"AnyChart",description:void 0,width:1200,height:630},this.D={link:void 0,description:void 0,width:1200,height:800},this.K={path:"https://cdn.anychart.com/3rd/",enabled:!0,fallback:!0}},t.g.F=function(){var t={};return Ft(t,"filename",this.aa),Ft(t,"image",this.b),Ft(t,"facebook",this.i),Ft(t,"twitter",this.G),Ft(t,"linkedin",this.o),Ft(t,"pinterest",this.D),Ft(t,"clientside",this.K),t},t.g.U=function(t){this.filename(t.filename),this.wk(t.image),this.z1(t.facebook),this.T6(t.twitter),this.I3(t.linkedin),this.G4(t.pinterest),this.w0(t.clientside)};var ge=Lt.prototype;ge.filename=ge.filename,ge.image=ge.wk,ge.facebook=ge.z1,ge.twitter=ge.T6,ge.linkedin=ge.I3,ge.pinterest=ge.G4,ge.clientside=ge.w0;var fe={png:"image/png",jpg:"image/jpeg",svg:"image/svg+xml",csv:"text/csv",pdf:"application/pdf",json:"application/json",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xml:"text/xml"},be=new Lt;be.UK(),be.create=function(){return new Lt},be.ic=function(e,i){var n=e&&e.exports?e.exports()[i]():void 0,s=t.fa.anychart.exports[i]();return"object"==t.ka(n)?G(s,n,s):t.p(n)?n:s},be.na=t.fa.IS_ANYCHART_AMD?t.eq.acgraph.server:t.ll.acgraph.server,be.ba=function(t,e,i){return function(){X(de+"/"+i,{"file-name":e,data:t,dataType:i,responseType:"file"})}},be.f=function(e,i){return function(n){e.fallback?(t.kl(1e3,null,[],!0),i.call(null,arguments)):t.kl(1002,null,[],!0)}},be.Eu=function(e,i,n,s,a,o){var r=i?i.Ja():null;r&&(i=be.ic(e,"image"),n=G({width:n,height:s,quality:a,filename:o},n,{width:i.width,height:i.height,filename:be.ic(e,"filename")}),s=be.ic(e,"clientside"),a=be.f(s,(function(t){Tt(r,t.width,t.height,t.quality,t.filename)})),s.enabled?_t(e,"png",n,a):s.fallback?Tt(r,n.width,n.height,n.quality,n.filename):t.kl(1001,null,[],!0))},be.Yw=function(e,i,n,s,a,o,r){var l=i?i.Ja():null;l&&(i=be.ic(e,"image"),n=G({width:n,height:s,quality:a,forceTransparentWhite:o,filename:r},n,{width:i.width,height:i.height,filename:be.ic(e,"filename")}),s=be.ic(e,"clientside"),a=be.f(s,(function(t){kt(l,t.width,t.height,t.quality,t.forceTransparentWhite,t.filename)})),s.enabled?_t(e,"jpg",n,a):s.fallback?kt(l,n.width,n.height,n.quality,n.forceTransparentWhite,n.filename):t.kl(1001,null,[],!0))},be.Zw=function(e,i,n,s,a,o,r){var l=i?i.Ja():null;l&&(i=be.ic(e,"image"),n=G({paperSize:n,width:n,landscape:s,height:s,x:a,y:o,filename:r},n,{width:i.width,height:i.height,filename:be.ic(e,"filename")}),s=be.ic(e,"clientside"),a=be.f(s,(function(t){$t(l,t.paperSize||t.width,t.landscape||t.height,t.x,t.y,t.filename)})),s.enabled?_t(e,"pdf",n,a):s.fallback?$t(l,n.paperSize||n.width,n.landscape||n.height,n.x,n.y,n.filename):t.kl(1001,null,[],!0))},be.$w=function(e,i,n,s,a){var o=i?i.Ja():null;o&&(i=be.ic(e,"image"),n=G({paperSize:n,width:n,landscape:s,height:s,filename:a},n,{width:i.width,height:i.height,filename:be.ic(e,"filename")}),s=be.ic(e,"clientside"),a=be.f(s,(function(t){Ot(o,t.paperSize||t.width,t.landscape||t.height,t.filename)})),s.enabled?_t(e,"svg",n,a):s.fallback?Ot(o,n.paperSize||n.width,n.landscape||n.height,n.filename):t.kl(1001,null,[],!0))},be.Nq=function(t,e,i,n){return(e=e?e.Ja():null)?(t=be.ic(t,"image"),i=G({paperSize:i,width:i,landscape:n,height:n},i,{width:t.width,height:t.height}),e.Nq(i.paperSize||i.width,i.landscape||i.height)):""},be.P=function(e,i,n,s){s=s||be.ic(e,"filename"),e=be.ic(e,"clientside");var a=be.ba(i,s,n),o=be.f(e,a);if(e.enabled)try{jt(new window.Blob([i],{type:fe[n]||""}),s,n)}catch(r){o()}else e.fallback?a():t.kl(1001,null,[],!0)},be.WO=function(t,e,i){be.P(t,e,"xml",i)},be.VO=function(t,e,i){be.P(t,e,"json",i)},be.cz=function(t,e,i){be.P(t,e,"csv",i)},be.dz=function(e,i,n){var s=be.ic(e,"clientside");n=n||be.ic(e,"filename");var a=be.ba(i,n,"xlsx"),o=be.f(s,a);s.enabled?It(e,i,n,o):s.fallback?a():t.kl(1001,null,[],!0)},be.Hu=function(t,e,i,n,s,a,o,r,l){if(e=e?e.Ja():null){var h=be.ic(t,"image");t=G({onSuccess:i,onError:n,asBase64:s,width:a,height:o,quality:r,filename:l},i,{width:h.width,height:h.height,filename:be.ic(t,"filename")}),e.Hu(t.onSuccess,t.onError,t.asBase64,t.width,t.height,t.quality,t.filename)}},be.FB=function(t,e,i,n,s,a,o,r,l,h){if(e=e?e.Ja():null){var c=be.ic(t,"image");t=G({onSuccess:i,onError:n,asBase64:s,width:a,height:o,quality:r,forceTransparentWhite:l,filename:h},i,{width:c.width,height:c.height,filename:be.ic(t,"filename")}),e.FB(t.onSuccess,t.onError,t.asBase64,t.width,t.height,t.quality,t.forceTransparentWhite,t.filename)}},be.HB=function(t,e,i,n,s,a,o,r){if(e=e?e.Ja():null){var l=be.ic(t,"image");t=G({onSuccess:i,onError:n,asBase64:s,paperSize:a,width:a,landscape:o,height:o,filename:r},i,{width:l.width,height:l.height,filename:be.ic(t,"filename")}),e.HB(t.onSuccess,t.onError,t.asBase64,t.paperSize||t.width,t.landscape||t.height,t.filename)}},be.GB=function(t,e,i,n,s,a,o,r,l,h){if(e=e?e.Ja():null){var c=be.ic(t,"image");t=G({onSuccess:i,onError:n,asBase64:s,paperSize:a,width:a,landscape:o,height:o,x:r,y:l,filename:h},i,{width:c.width,height:c.height,filename:be.ic(t,"filename")}),e.GB(t.onSuccess,t.onError,t.asBase64,t.paperSize||t.width,t.landscape||t.height,t.x,t.y,t.filename)}},be.zA=function(t,e,i,n,s,a,o){(e=e?e.Ja():null)&&(t=be.ic(t,"image"),i=G({onSuccess:i,onError:n,width:s,height:a,quality:o},i,{width:t.width,height:t.height}),e.zA(i.onSuccess,i.onError,i.width,i.height,i.quality))},be.wA=function(t,e,i,n,s,a,o,r){(e=e?e.Ja():null)&&(t=be.ic(t,"image"),i=G({onSuccess:i,onError:n,width:s,height:a,quality:o,forceTransparentWhite:r},i,{width:t.width,height:t.height}),e.wA(i.onSuccess,i.onError,i.width,i.height,i.quality,i.forceTransparentWhite))},be.BA=function(t,e,i,n,s,a){(e=e?e.Ja():null)&&(t=be.ic(t,"image"),i=G({onSuccess:i,onError:n,paperSize:s,width:s,landscape:a,height:a},i,{width:t.width,height:t.height}),e.BA(i.onSuccess,i.onError,i.paperSize||i.width,i.landscape||i.height))},be.yA=function(t,e,i,n,s,a,o,r){(e=e?e.Ja():null)&&(t=be.ic(t,"image"),i=G({onSuccess:i,onError:n,paperSize:s,width:s,landscape:a,height:a,x:o,y:r},i,{width:t.width,height:t.height}),e.yA(i.onSuccess,i.onError,i.paperSize||i.width,i.landscape||i.height,i.x,i.y))},be.print=function(t,e,i,n){(t=e?e.Ja():null)&&(i=G({paperSize:i,landscape:n},i),t.print(i.paperSize,i.landscape))},be.LE=function(e,i,n,s,a,o){var r=be.ic(e,"facebook"),l=G({caption:n,link:s,name:a,description:o},n,r),h=t.ll.open("","_blank","scrollbars=yes, width=550, height=550, top="+Number(window.screen.height/2-275)+", left="+Number(window.screen.width/2-275));be.Hu(e,i,(function(t){(t={app_id:r.appId,display:"popup",picture:t}).caption=l.caption,l.link&&(t.link=l.link,l.name&&(t.name=l.name),l.description&&(t.description=l.description));var e,i="";for(e in t)i+=i?"&":"",i+=e+"="+t[e];h.location.href="https://www.facebook.com/dialog/feed?"+i}),void 0,!1,r.width,r.height)},be.OE=function(e,i){var n=be.ic(e,"twitter"),s=Number(window.screen.width/2-300),a=Number(window.screen.height/2-260),o=t.Ae(window.document,"INPUT","ac-share-twitter-data-input",void 0);if(0<o.length){var r=o[0];o=t.Ae(window.document,"FORM","ac-share-twitter-form",void 0)[0]}else{o=t.Re(window.document,"FORM"),t.Qj(o,"ac-share-twitter-form"),o.target="Map",o.method="POST",o.action=n.url,r=t.Re(window.document,"INPUT"),t.Qj(r,"ac-share-twitter-data-input"),r.type="hidden",r.name="data";var l=t.Re(window.document,"INPUT");l.type="hidden",l.name="dataType",l.value="svg",o.appendChild(r),o.appendChild(l),k("BODY")[0].appendChild(o)}t.p(o)&&t.p(r)&&(r.value=be.Nq(e,i,n.width,n.height),t.ll.open("","Map","status=0,title=0,height=520,width=600,scrollbars=1, width=600, height=520, top="+a+", left="+s)&&o.submit())},be.ME=function(e,i,n,s){var a=be.ic(e,"linkedin"),o=G({caption:n,description:s},n,a),r=t.ll.open("","_blank","scrollbars=yes, width=550, height=520, top="+Number(window.screen.height/2-260)+", left="+Number(window.screen.width/2-275));be.Hu(e,i,(function(t){(t={mini:"true",url:t}).title=o.caption,o.description&&(t.summary=o.description);var e,i="";for(e in t)i+=i?"&":"",i+=e+"="+t[e];r.location.href="https://www.linkedin.com/shareArticle?"+i}),void 0,!1,a.width,a.height)},be.NE=function(e,i,n,s){var a=be.ic(e,"pinterest"),o=G({link:n,description:s},n,a),r=t.ll.open("","_blank","scrollbars=yes, width=550, height=520, top="+Number(window.screen.height/2-260)+", left="+Number(window.screen.width/2-275));be.Hu(e,i,(function(t){t={media:t},o.link&&(t.url=o.link),o.description&&(t.description=o.description);var e,i="";for(e in t)i+=i?"&":"",i+=e+"="+t[e];r.location.href="https://pinterest.com/pin/create/link?"+i}),void 0,!1,a.width,a.height)},t.E("anychart.exports",be),t.E("anychart.exports.server",be.na)}.call(this,$)),_.data_adapter||(_.data_adapter=1,function(t){var e=function(t){try{return t.b?t.b.responseText:""}catch(e){return""}},i=function(e,s,a,o,r,l,h,c,u){var d=n("fromXml",a,u);d&&(s=(0,t.pa)(i.b,void 0,s,a,u,d),t.RW(e,s,o,r,l,h,c))},n=function(e,i,n){var s=t.ll.anychart;return s?(s=s[e])||(i&&i.call(n,500,t.gc("anychart.%s is not available.",e)),null):(i&&i.call(n,500,"AnyChart in not present on the page."),null)},s=function(e){return[t.XW(e)||null]},a=function(e){try{var i=e.b?e.b.responseXML:null}catch(n){i=null}return[t.eq.utils.xml2json(i).data]},o=function(e){for(var i=(e=t.XW(e)).feed.entry,n={title:e.feed.title.$t,rows:[]},s=0,a=i.length;s<a;s++){var o=i[s],r=o.gs$cell.$t,l=o.gs$cell.col-1;o=o.gs$cell.row-1,n.rows[o]||(n.rows[o]=[]),n.rows[o][l]=r}return n.header=n.rows.shift(),[n,e]},r=function(t){return[e(t)]},l=function(e,i,n,s,a){if(a=a.target,t.VW(a)){try{var o=e(a)}catch(r){n&&n.call(s,500,r)}i.apply(s,o)}else n&&n.call(s,a.i,t.YW(a))};t.eq.exports||t.il(4,null,["Exporting"]),i.b=function(i,n,s,a,o){if(o=o.target,t.VW(o)){try{var r=a(e(o))}catch(l){n&&n.call(s,500,l)}i?t.z(i)?(r.container(i),r.draw()):t.D(i)&&i.call(s,r):r.container()&&r.draw()}else n&&n.call(s,o.i,t.YW(o))},t.E("anychart.fromXmlFile",i),t.E("anychart.fromJsonFile",(function(e,s,a,o,r,l,h,c,u){var d=n("fromJson",a,u);d&&(s=(0,t.pa)(i.b,void 0,s,a,u,d),t.RW(e,s,o,r,l,h,c))})),t.E("anychart.data.parseHtmlTable",(function(e,i,n,s,a,o){var r,l=window.document.querySelector(e||"table");if(e=null,l){s=s||"tr:first-child th",n=n||"td, th",i=i||"tr",e={},(a=l.querySelector(a||"caption"))&&(r=o?o.call(void 0,a):a.innerText),r&&(e.title=r);var h=l.querySelectorAll(s),c=[];for(a=null,s=0,r=h.length;s<r;s++){var u=h[s];u&&!a&&(a=t.bf(u)),c.push(o?o.call(void 0,u):u.innerText)}if(c.length&&(e.header=c),(i=l.querySelectorAll(i))&&i.length){for(l=[],s=0,r=i.length;s<r;s++)if((c=i[s])!=a){if(h=[],(c=c.querySelectorAll(n))&&c.length){u=0;for(var d=c.length;u<d;u++){var p=c[u];o?h.push(o.call(void 0,p)):h.push(p.innerText)}}h.length&&l.push(h)}e.rows=l}}return e})),t.E("anychart.data.loadJsonFile",(function(e,i,n,a,o,r,h,c,u){i=(0,t.pa)(l,void 0,s,i,n,u),t.RW(e,i,a,o,r,h,c)})),t.E("anychart.data.loadXmlFile",(function(e,i,n,s,o,r,h,c,u){i=(0,t.pa)(l,void 0,a,i,n,u),t.RW(e,i,s,o,r,h,c)})),t.E("anychart.data.loadCsvFile",(function(e,i,n,s,a,o,h,c,u){i=(0,t.pa)(l,void 0,r,i,n,u),t.RW(e,i,s,a,o,h,c)})),t.E("anychart.data.loadGoogleSpreadsheet",(function(e,i,n,s,a){i=(0,t.pa)(l,void 0,o,i,n,a),t.z(e)?(n=e,e="od6"):(n=e.key,e=t.p(e.sheet)?e.sheet:"od6"),(e=new t.DW("https://spreadsheets.google.com/feeds/cells/"+n+"/"+e+"/public/values")).f.set("alt","json"),n=Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^(0,t.Ln)()).toString(36),e.f.set("zx",n),t.RW(e.toString(),i,"GET",null,null,s)}))}.call(this,$)),_.pyramid_funnel||(_.pyramid_funnel=1,function(t){var e=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e},i=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e,this.G=!w(this.ya),this.i=this.ya.g("connectorStroke")},n=function(e,i,n){t.Bx.call(this),this.ka(),this.re=e,this.Ga("pieFunnelPyramidBase",e),this.fd=null,this.D=[],this.He=null,this.na=1,this.i=this.Fa=null,this.state=new t.ix(this),this.data(i||null,n),e={},t.T(e,[["fill",528,1],["stroke",528,1],["hatchFill",528,1],["labels",0,0],["markers",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.de,this),e.kb(this),this.B(4096,1)})),this.ca.ta("markersAfterInitCallback",t.ty),e={},t.T(e,[["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0],["markers",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),t.T(this.ua,[["baseWidth",16,1],["neckHeight",16,1],["neckWidth",16,1],["pointsPadding",16,1],["reversed",16,1],["overlapMode",4096,1],["connectorLength",4100,9],["connectorStroke",16,1]]),this.da(!1)},s=function(e,i){var n=e.$().j("point");if(t.p(n)){var s=t.cm("fill",1,!0)(e,i,!1,!0);n.fill(s),s=t.cm("stroke",2,!0)(e,i,!1,!0),n.stroke(s)}},a=function(e,i){var n=e.$().j("hatchPoint");if(null!=n){var s=t.cm("hatchFill",3,!0)(e,i,!1);n.stroke(null).fill(s)}},o=function(t,e){var i=t.G,n=t.f.height,s=t.$a,a=t.Ba;return e>n-a||n==a?s:s+(n-a-e)/(n-a)*(i-s)},r=function(e){return 0>=(e=t.N(e))||!(0,window.isFinite)(e)},l=function(t){var e,i=t.$(),n=i.ma(),s=t.f,a=i.j("height")/2,r=i.j("startY"),l=i.j("height")+r,h=null;(e=t.Ka)&&(n?n==i.Hb()-1?(r+=e/2)>l&&(r=l-t.na):(r+=e/2)>(l-=e/2)&&(l=(r=i.j("startY")+a)+t.na):(l-=e/2)<r&&(l=t.na));var c=o(t,r);a=(n=t.b-c/2)+c,c=o(t,l),c=(e=t.b-c/2)+c,r+=s.top,l+=s.top,n=s.left+n,a=s.left+a,0<t.Ba&&r<t.Ha&&l>t.Ha&&(h=l,l=t.Ha,c=o(t,l),c=(e=t.b-c/2)+c),e=s.left+e,c=s.left+c,t.g("reversed")||(r=s.height-(r-s.top)+s.top,l=s.height-(l-s.top)+s.top,h=h?s.height-(h-s.top)+s.top:null,r=[l,l=r][0],n=[e,e=n][0],a=[c,c=a][0]),i.j("x1",n),i.j("x2",a),i.j("x3",e),i.j("x4",c),i.j("y1",r),i.j("y2",l),i.j("y3",h)},h=function(e,i,n,s){var a=e.labels();if(a.ka(),a.fontOpacity(i),a.W(),a.da(!1),s&&e.aa)for(i=0;i<e.aa.length;i++)(s=e.aa[i])&&(a=e.g("connectorStroke"),a=t.Ul(a,n),s.stroke(a))},c=function(e){var i=e.$(),n=i.ma(),o=t.eC(e.ue),r=t.eC(e.o);i.j("point",o),i.j("hatchPoint",r),l(e);var h=i.j("x1"),c=i.j("x2"),u=i.j("x3"),d=i.j("x4"),p=i.j("y1"),g=i.j("y2"),f=i.j("y3");o.moveTo(h,p).lineTo(c,p),f?o.lineTo(d,g).lineTo(d,f).lineTo(u,f).lineTo(u,g):o.lineTo(d,g).lineTo(u,g),o.close(),i.j("point",o),o.tag={index:n,X:e},i=t.nx(e.state,i.ma()),s(e,i),r&&(r.pe(o.F()),r.tag={index:n,X:e},a(e,i))},u=function(e,i,n){var s=k(e),a=e.$(),o=e.f,r=t.p(n)?!!(n&t.wo):null,l=t.p(n)?!r&&!!(n&t.vo):null,h=a.get("normal");h=t.p(h)?h.label:void 0;var c=a.get("hovered");c=t.p(c)?c.label:void 0;var u=a.get("selected");u=t.p(u)?u.label:void 0,h=t.Zo(h,a.get("label")),c=l?t.Zo(c,a.get("hoverLabel")):null,r=(u=r?t.Zo(u,a.get("selectLabel")):null)||c||h||{},h=t.N(a.j("x1")),u=t.N(a.j("x2")),c=t.N(a.j("y1")),l=t.N(a.j("y2"));var p=t.N(a.j("y3"));switch(a=u-h,c+=(l=p?p-c:l-c)/2,u=t.N(r.offsetY)||0,i?n=d(e,i,n):(n=e.labels().yl(e.Ic(),null,r),n=t.mn(n)),r=i&&i.g("anchor")||e.labels().g("anchor"),i&&(c=i.jc().value.y),i=c+u,n.height>l&&("left-center"==r||"center"==r||"right-center"==r)&&(c+n.height/2>o.top+o.height&&(c=o.top+o.height-n.height/2),c-n.height/2<o.top&&(c=o.top+n.height/2)),i=P(e,i),s){case"inside":h+=a/2;break;case"outside-left":h=e.b-i/2,h=o.left+h-e.ea-n.width/2;break;case"outside-left-in-column":h=o.left+n.width/2;break;case"outside-right":h=e.b+i/2,h=o.left+h+e.ea+n.width/2;break;case"outside-right-in-column":h=o.left+o.width-n.width/2}return"left-top"==r||"center-top"==r||"right-top"==r?c-=.5:"left-bottom"!=r&&"center-bottom"!=r&&"right-bottom"!=r||(c+=.5),{value:{x:h,y:c}}},d=function(e,i,n){var s=!!(n&t.wo),a=!s&&!!(n&t.vo);return n=e.data().get(i.ma(),"label"),a=a?e.data().get(i.ma(),"hoverLabel"):null,s=(s?e.data().get(i.ma(),"selectLabel"):null)||a||n||{},e.data().j(i.ma(),"labelWidthForced")&&((s=t.Qc(s)).width=i.width()),e.$().select(i.ma()),i.Hf(e.Ic()),e=e.labels().yl(i.Hf(),i.jc(),s),t.mn(e)},p=function(e,i){if("no-overlap"==e.g("overlapMode")&&!w(e)&&e.labels().enabled()){S(e),e.Za=0;var n=e.state.fk()|(i?t.nx(e.state,i.ma()):0);g(e,n,i)}},g=function(e,i,n){if(10!=e.Za){for(var s,a,o,r,l=e.$().Hb(),h=!1,c=e.g("reversed"),u=0;u<l-1;u++)if(s=c?u:l-1-u,(s=e.labels().be(s))&&0!=s.enabled()&&(a=d(e,s,i),o=c?f(e,s):b(e,s))){r=d(e,o,i);var p=m(e,s),S=m(e,o);p&&S&&p==S||!(r.top<=a.top+a.height)||(h=!0,p&&S?y(e,p,S):!p&&S?v(e,o,s):v(e,s,o))}h&&((0,t.Pe)(e.D,(function(e){if(2>e.labels.length){var i=e.ya;i.D.length&&(e.clear(),t.Fa(i.D,e))}else{for(var s,a,o=0,r=0,l=i=0,h=e.labels.length;l<h;l++)s=e.labels[l],a=e.ya.state.fk()|t.nx(e.ya.state,s.ma()),a=e.rd(s,a),s=(s=e.ya.data().j(s.ma(),"point")).rb(),l||(o=s.top),i+=a.height,r+=s.height;(o=o+(r+=e.ya.Ka*(h-1))/2-i/2)+i>(r=e.ya.f).top+r.height&&(o=r.top+r.height-i),o<r.top&&(o=r.top),e.y=o,F(e,n)}})),e.Za++,g(e,i,n))}},f=function(t,e){if(!e)return null;var i=t.$().Hb();if(e.ma()==i-1)return null;for(var n,s=e.ma()+1;s<=i-1;s++)if((n=t.labels().be(s))&&!1!==n.enabled())return n;return null},b=function(t,e){if(!e||0==e.ma())return null;for(var i,n=e.ma()-1;0<=n;n--)if((i=t.labels().be(n))&&!1!==i.enabled())return i;return null},v=function(t,e,i){var n=m(t,e);null===n?((n=new G(t)).iC(e),n.iC(i),t.D.push(n)):n.iC(i)},m=function(e,i){return e.D.length?t.ya(e.D,(function(e){return-1!==(0,t.za)(e.labels,i)})):null},y=function(e,i,n){var s=i.labels[0].ma(),a=n.labels[0].ma();i.labels=e.g("reversed")==s<a?t.Ga(i.labels,n.labels):t.Ga(n.labels,i.labels),t.Fa(e.D,n)},S=function(e){e.D.length&&((0,t.Pe)(e.D,(function(t){t.clear()})),e.D.length=0)},w=function(t){return"inside"==k(t)},x=function(t){return"outside-right-in-column"==(t=k(t))||"outside-left-in-column"==t},C=function(t){return"outside-left"==(t=k(t))||"outside-left-in-column"==t},D=function(t){return"outside-right"==(t=k(t))||"outside-right-in-column"==t},T=function(e){if(e.labels().enabled()&&!w(e)){l(e);var i=e.$();i.j("labelWidthForced",void 0);var n=e.f,s=i.get("label"),a=u(e),r=e.Ic();if(r=e.labels().yl(r,a,s),s=(r=t.mn(r)).left,a=r.left+r.width,r=e.g("reversed")?o(e,r.top-n.top):o(e,n.height-(r.top+r.height)+n.top),C(e)){var h=e.b-r/2;h=n.left+h;var c=e.G/2;c=n.width-e.b-c,x(e)?a+5>h&&((h=a+5-h)>c?(e.b+=c,h=e.b-r/2,h=n.left+h,i.j("labelWidthForced",h-5-s)):e.b+=h):s<n.left&&((h=Math.abs(n.left-s))>c?(e.b+=c,10>(e=(h=e.b-r/2)-e.ea)&&(e=10),i.j("labelWidthForced",e)):e.b+=h)}else D(e)&&(h=e.b+r/2,h+=n.left,c=e.G/2,c=n.width-(n.width-e.b)-c,x(e)?(0>s||s-5<h)&&(h=Math.abs(h-s+5),0>s||h>c?(e.b=e.b-c,h=e.b+r/2,h+=n.left,i.j("labelWidthForced",a-5-h)):e.b=e.b-h):a>n.left+n.width&&((h=a-(n.left+n.width))>c?(e.b=e.b-c,10>(e=n.left+n.width-s+c)&&(e=10),i.j("labelWidthForced",e)):e.b=e.b-h))}},k=function(e){return e=e.labels().g("position"),t.zk(A,"outside"==e?"outside-left":e,"outside-left-in-column")},$=function(t,e,i,n){var s=t.f,a=e.ma();a=t.data().j(a,"point").rb(),n=(e=d(t,e,n)).left;var o=e.top+e.height/2;a=a.top+a.height/2;var r=P(t,a);if(C(t)){n+=e.width;var l=t.b-r/2;n>(l+=s.left)&&5>Math.abs(a-o)&&(n=l-5)}else D(t)&&(l=t.b+r/2,n<(l+=s.left)&&5>Math.abs(a-o)&&(n=l+5));i.clear().moveTo(n,o).lineTo(l,a+.001)},O=function(e,i,n){var s=i.ma();if(e.aa[s])$(e,i,e.aa[s],n);else{var a=t.eC(e.ba);e.aa[s]=a,a.stroke(e.g("connectorStroke")),$(e,i,a,n)}},P=function(t,e){var i=t.f;return t.g("reversed")?o(t,e-i.top):o(t,i.height-e+i.top)},L=function(t){var e=t.Ua();t.gc("mousemove",t.GK),e.Lc()},G=function(t){this.ya=t,this.labels=[]},F=function(e,i){var n=0,s=0,a=null,o=null,r=null,l=e.ya.state.fk()|(i?t.nx(e.ya.state,i.ma()):0);(0,t.Pe)(e.labels,(function(t){var i=t.jc().value,h=e.rd(t,l),c=e.y+n+s+h.height/2;if(a&&o&&r){var u=r.y+o.height/2+(a.g("offsetY")||0),d=c-h.height/2+(t.g("offsetY")||0);d<u&&(c+=u-d)}t.jc({value:{x:i.x,y:c}}),t.W(),O(e.ya,t,l),n+=h.height,s+=t.g("offsetY")||0,a=t,o=h,r={x:i.x,y:c}}))},I=function(t,e){var i=new n("funnel",t,e);return i.$c(),i},E=function(t,e){var i=new n("pyramid",t,e);return i.$c(),i},A={yQ:"inside",uqa:"outside-left",vqa:"outside-left-in-column",wqa:"outside-right",xqa:"outside-right-in-column"};t.H(e,t.Ez),t.g=e.prototype,t.g.update=function(){this.b.length=this.f.length=0;for(var t=this.ya.cg();t.advance();)if(!t.j("missing")){var e=t.j("x1"),i=t.j("x2"),n=t.j("x3"),s=t.j("x4"),a=t.j("y1"),o=t.j("y2"),r=t.j("y3");t.j("neck",!!r),this.b.push(e,i,n,s,0,0,0),this.f.push(e,i,n,s,a,o,r||0)}},t.g.Jw=function(){h(this.ya,1e-5,1e-5,!w(this.ya))},t.g.en=function(){for(var e=this.ya.cg(),i=0;e.advance();)if(!e.j("missing")){e.j("x1",this.coords[i++]),e.j("x2",this.coords[i++]),e.j("x3",this.coords[i++]),e.j("x4",this.coords[i++]),e.j("y1",this.coords[i++]),e.j("y2",this.coords[i++]),e.j("y3",this.coords[i++]);var n=this.ya,s=e,a=s.j("point");a.clear();var o=s.j("x1"),r=s.j("x2"),l=s.j("x3"),h=s.j("x4"),c=s.j("y1"),u=s.j("y2"),d=s.j("y3");a.moveTo(o,c).lineTo(r,c),s.j("neck")?a.lineTo(h,u).lineTo(h,d).lineTo(l,d).lineTo(l,u):a.lineTo(h,u).lineTo(l,u),a.close(),(o=s.j("hatchPoint"))&&(n.$().select(s.ma()),o.clear(),o.pe(a.F()),s=t.nx(n.state,s.ma()),a=t.cm("hatchFill",3,!0),o.stroke(null).fill(a(n,s,!1)))}},t.g.cm=function(){this.en()},t.g.R=function(){e.u.R.call(this),this.ya=null},t.H(i,t.Ez),i.prototype.update=function(){this.b.length=this.f.length=0,this.b.push(1e-5,1e-5),this.f.push(1,this.i.opacity||1)},i.prototype.en=function(){h(this.ya,this.coords[0],this.coords[1],this.G)},i.prototype.cm=function(){this.en()},i.prototype.R=function(){i.u.R.call(this),this.i=this.ya=null,delete this.G},t.H(n,t.Bx),t.Gq(n,["fill","stroke","hatchFill"],"normal"),t.g=n.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.ra=16|t.Bx.prototype.ra,t.g.sa=28688|t.Bx.prototype.sa,t.g.Ue=function(){return[this]},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}if(this.Xf!==e){if(this.Xf=e,this.i!=e||null===e){if(t.qd(this.Yc),delete this.sd,t.J(e,t.Cr)){var s=e;this.Yc=null}else s=t.J(e,t.Mr)?(this.Yc=e).Yd():t.A(e)||t.z(e)?(this.Yc=new t.Mr(e,i)).Yd():(this.Yc=new t.Mr(null)).Yd();this.i=s.Ui()}t.qd(this.P),this.P=this.i,t.K(this.P,this.dd,this),this.B(29456,17)}return this}return this.P},t.g.dd=function(e){t.X(e,16)&&this.B(29456,17)},t.g.$=function(){return this.sd||(this.sd=this.P.$())},t.g.Ec=function(){return this.sd=this.P.$()},t.g.cg=function(){return this.P.$()},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.yI,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.HH,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)},t.g.yI=function(e){t.X(e,2)&&this.B(528,1)},t.g.HH=function(e){t.X(e,2)&&this.B(528,1)},t.g.remove=function(){S(this),this.ue&&this.ue.parent(null),n.u.remove.call(this)},t.g.pv=function(){var e=this.$();this.Fa&&t.J(this.Fa,t.Ms)&&t.Ns(this.Fa,e.Hb())},t.g.Qh=function(e){if(!this.pf()){this.pb();var i=this.$();if(this.J(4)&&this.B(4112),this.J(16)){this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ue.zIndex(30),this.ue.parent(this.Na)),this.o?this.o.clear():(this.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.o.parent(this.Na),this.o.zIndex(31).Dd(!0)),this.Ka=Math.abs(t.Tm(t.L(this.g("pointsPadding"),e.height),2)),this.G=Math.abs(t.Tm(t.L(this.g("baseWidth"),e.width),2)),this.$a=Math.abs(t.Tm(t.L(this.g("neckWidth"),e.width),2)),this.Ba=Math.abs(t.Tm(t.L(this.g("neckHeight"),e.height),2)),this.Ha=e.top+e.height-this.Ba,this.b=e.width/2,this.ea=t.L(this.g("connectorLength"),(e.width-this.G)/2),0>this.ea&&(this.ea=5),this.f=e;var n=0,s=i.Hb()-t.N(this.La("count")),a=t.Tm(this.Ka/e.height*100,2);for(i.reset();i.advance();){var o=i.get("value"),l=r(o);o=r(o)?0:t.N(o);var h=t.Tm(o/t.N(this.La("sum"))*100,2);l&&(h=a),(h=t.Tm(e.height/(100+s*a)*h,2))||(h=this.na),i.j("value",o),i.j("height",h),i.j("startY",n),i.j("missing",l),n+=h,T(this)}for(i.reset();i.advance();)n=i.ma(),"selected"==String(i.get("state")).toLowerCase()&&this.state.Lh(t.wo,n),c(this);if(this.aa)for(n=0;n<this.aa.length;n++)(o=this.aa[n])&&o.stroke(this.g("connectorStroke"));this.B(4096),this.B(8192),this.I(16)}if(this.J(8192)){for(this.Db().O()||this.Db().O(this.Na),this.Db().clear(),i.reset();i.advance();)this.gq(this.state.Gc|t.nx(this.state,i.ma()));this.Db().W(),this.I(8192)}if(this.J(4096)){for(this.labels().O()||this.labels().O(this.Na),this.labels().clear(),this.ba&&this.ba.clear(),n=w(this)?this.oa.insideLabels:this.oa.outsideLabels,this.labels().Kq(n.autoColor),this.labels().disablePointerEvents(n.disablePointerEvents),w(this)||(this.ea=t.L(this.g("connectorLength"),(e.width-this.G)/2),0>this.ea&&(this.ea=5),this.ba?this.ba.clear():(this.ba=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ba.parent(this.Na),this.ba.zIndex(32)),this.ba.clip(e),this.aa=[]),i.reset();i.advance();)w(this)&&i.j("labelWidthForced",void 0),this.ke(this.state.Gc|t.nx(this.state,i.ma()));p(this),this.labels().W(),this.labels().Vd().clip(e),this.I(4096)}}},t.g.UL=function(){var n=t.wr(this,"animation");if(n&&n.g("enabled")&&0<n.g("duration"))if(this.Og&&1==this.Og.dc)this.Og.update();else if(this.J(2048)){t.qd(this.Og),this.Og=new t.bC;var s=n.g("duration");n=s*(1-.85),s=new e(this,.85*s),n=new i(this,n),this.Og.add(s),this.Og.add(n),this.Og.wa("begin",(function(){this.bj=this.g("connectorStroke"),this.ta("connectorStroke","none"),t.vx(this,!0),t.Dp(this,{type:"animationstart",chart:this})}),!1,this),this.Og.wa("end",(function(){this.ta("connectorStroke",this.bj),t.vx(this,!1),t.Dp(this,{type:"animationend",chart:this})}),!1,this),this.Og.play(!1)}},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget);return e.pointIndex=t.N(i.index),e},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.ce=function(e){var i,n=new t.EA(this,e);return this.$().select(e)&&n.iy()&&!r(i=n.get("value"))&&(e=t.Tm(i/this.Rg("sum")*100,2),n.La("percentValue",e),n.La("yPercentOfTotal",e)),n},t.g.oq=function(){return[]},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(e){var i;if((i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()){var n;for(n=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.vo,n),(e=this.$()).reset();e.advance();)this.ke(t.nx(this.state,e.ma()));p(this),L(this)}},t.g.$i=function(e,i){if(!this.enabled())return this;if(t.A(e)){for(var n=t.sx(this.state,t.vo),s=0;s<n.length;s++)t.Aa(e,n[s])||this.state.Vh(t.vo,n[s]);for(t.qx(this.state,e),t.p(i)&&this.GK(i),n=this.Ec();n.advance();)this.ke(t.nx(this.state,n.ma()));p(this)}else if(t.ea(e)&&(this.Md(),t.qx(this.state,e),t.p(i)&&this.GK(i),this.f)){for(n=this.Ec();n.advance();)this.ke(t.nx(this.state,n.ma()));p(this,this.labels().be(e))}return this.$().select(e[0]||e),this},t.g.Zk=function(){this.enabled()&&(this.state.Lh(t.vo),p(this,null))},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.Gu=function(){this.enabled()&&(L(this),this.state.Lh(t.wo),p(this,null))},t.g.Ii=function(e,i){if(!this.enabled())return this;var n=!(i&&i.shiftKey);if(t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,n?t.vo:void 0)):t.ea(e)&&this.state.Lh(t.wo,e,n?t.vo:void 0),this.f){for(n=this.Ec();n.advance();)this.ke(t.nx(this.state,n.ma()));var s;t.ea(e)&&(s=this.labels().be(e)),p(this,s)}return this.$().select(e[0]||e),this},t.g.ie=function(e){if(this.enabled()){var i;for(i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i),(e=this.$()).reset();e.advance();)this.ke(t.nx(this.state,e.ma()));p(this)}},t.g.pk=function(t,e){return s(this,t),a(this,t),this.gq(t),e},t.g.pq=t.ia,t.g.wm=t.ia,t.g.ml=function(t){this.ke(t),s(this,t),a(this,t),this.gq(t)};var U={};t.rq(U,0,"baseWidth",t.Cq),t.rq(U,0,"neckHeight",t.Cq),t.rq(U,0,"neckWidth",t.Cq),t.rq(U,0,"pointsPadding",t.Cq),t.rq(U,0,"reversed",t.Cq),t.rq(U,0,"overlapMode",t.Uk),t.rq(U,0,"connectorLength",t.Cq),t.rq(U,1,"connectorStroke",t.Pq),t.U(n,U),t.g=n.prototype,t.g.sc=function(e,i,n,s,a,o,r){return a=0==i?this.ca:1==i?this.za:this.Ea,r?e=a.g(e):(r=n.get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),a.g(e))),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){return t.Yb(this.ve().nc(this.$().ma())||"diagonal-brick")},t.g.Yi=function(){var t=this.$();return{index:t.ma(),sourceHatchFill:this.Eh(),iterator:t}},t.g.Ge=function(t){var e=this.$();return{index:e.ma(),sourceColor:t||this.cc().nc(e.ma())||"blue",iterator:e}},t.g.labels=function(e){return t.p(e)?(this.ca.labels(e),this):this.ca.labels()},t.g.de=function(e){var i=0,n=0;t.X(e,1)&&(i|=4096,n|=1),t.X(e,8)&&(i|=4100,n|=9),this.B(i,n)},t.g.ke=function(e){var i=this.$(),n=!!(e&t.wo),s=!n&&!!(e&t.vo),a=i.get("normal");a=t.p(a)?a.label:void 0;var o=i.get("hovered");o=t.p(o)?o.label:void 0;var r=i.get("selected");r=t.p(r)?r.label:void 0,a=t.Zo(a,i.get("label")),o=s?t.Zo(o,i.get("hoverLabel")):null,r=n?t.Zo(r,i.get("selectLabel")):null;var l,h=i.ma(),c=null,d=this.lb().labels(),p=this.selected().labels();n?c=l=p:s?c=l=d:l=this.labels();var g=this.labels().be(h),f=a&&t.p(a.enabled)?a.enabled:null,b=o&&t.p(o.enabled)?o.enabled:null,v=r&&t.p(r.enabled)?r.enabled:null;if(d=s||n?s?null===b?null===d.enabled()?null===f?this.labels().enabled():f:d.enabled():b:null===v?null===p.enabled()?null===f?this.labels().enabled():f:p.enabled():v:null===f?this.labels().enabled():f,f=u(this,null,e),b=this.Ic(),p=w(this),v=!0,!s&&!n&&p&&"no-overlap"==this.g("overlapMode")){l=l.yl(b,f,a,h);var m,y=[(v=this.$()).j("x1"),v.j("y1"),v.j("x2"),v.j("y1"),v.j("x4"),v.j("y2"),v.j("x3"),v.j("y2")],S=!0,x=0;for(m=y.length;x<m-1;x+=2){var C=x==m-2?0:x+2,D=x==m-2?1:x+3,T=y[x],k=y[x+1],$=y[C],P=y[D],L=l[x],G=l[x+1];C=l[C],D=l[D],v.j("y3")&&4==x&&(k=t.N(v.j("y3")),P=t.N(v.j("y3"))),T==$&&($+=.01),S=(S=S&&1==t.cn(T,k,$,P,L,G))&&1==t.cn(T,k,$,P,C,D)}v=S}return d&&v?(g?(g.Hi(),g.Hf(b),g.jc(f)):g=this.labels().add(b,f,h),t.$u(g,c),g.td(a,s?o:r),i.j("labelWidthForced")&&(g.width(t.N(i.j("labelWidthForced"))),i=o&&o.anchor?o.anchor:null,r=r&&r.anchor?r.anchor:null,a&&a.anchor&&a.anchor||i||r||(f=u(this,g,e),g.jc(f))),g.W(),(s||n)&&!g.O()&&this.labels().Vd()&&(g.O(this.labels().Vd()),g.O().parent()||g.O().parent(this.labels().O()),g.W())):g&&g.clear(),d&&!p&&O(this,g,e),g},t.g.Db=function(e){return t.p(e)?(this.ca.Db(e),this):this.ca.Db()},t.g.Mn=function(e){t.X(e,1)&&this.B(8192,1)},t.g.Zv=function(){var e=t.cm("fill",1,!1)(this,t.gm,!0,!0);return t.Ul(e,1,!0)},t.g.qy=function(){return t.Ql(this.Zv())},t.g.gq=function(e){var i=this.$(),n=!!(e&t.wo);e=!n&&!!(e&t.vo);var s=i.get("normal");s=t.p(s)?s.marker:void 0;var a=i.get("hovered");a=t.p(a)?a.marker:void 0;var o=i.get("selected");o=t.p(o)?o.marker:void 0,s=t.Zo(s,i.get("marker")),a=t.Zo(a,i.get("hoverMarker")),o=t.Zo(o,i.get("selectMarker"));var r=this.$().ma(),l=this.lb().Db(),h=this.selected().Db();i=n?h:e?l:this.Db();var c=this.Db().jp(r),u=s&&t.p(s.enabled)?s.enabled:null,d=a&&t.p(a.enabled)?a.enabled:null,p=o&&t.p(o.enabled)?o.enabled:null;if(e||n?e?null===d?null===l.enabled()?null===u?this.Db().enabled():u:l.enabled():d:null===p?null===h.enabled()?null===u?this.Db().enabled():u:h.enabled():p:null===u?this.Db().enabled():u){u=s&&s.position?s.position:null,d=a&&a.position?a.position:null,p=o&&o.position?o.position:null,u=function(e,i){i=t.Dk(i);var n=e.f,s=e.$(),a=s.j("point").rb(),o=s.j("x1"),r=s.j("y1");switch(i){case"left-top":r=s.j("y1"),o=s.j("x1");break;case"left-center":r+=a.height/2,s=P(e,r),o=e.b-s/2,o+=n.left;break;case"left-bottom":r+=a.height,o=s.j("x3");break;case"center-top":o=e.b,o+=n.left;break;case"center":r+=a.height/2,P(e,r),o=e.b,o+=n.left;break;case"center-bottom":r+=a.height,P(e,r),o=e.b,o+=n.left;break;case"right-top":o+=s=P(e,r);break;case"right-center":r+=a.height/2,s=P(e,r),o=e.b+s/2,o+=n.left;break;case"right-bottom":o=s.j("x4"),r+=a.height}return{value:{x:o,y:r}}}(this,u=e&&(d||l.g("position"))||n&&(p||h.g("position"))||u||this.Db().g("position")),c?c.jc(u):c=this.Db().add(u,r);var g={};u="position anchor offsetX offsetY type size fill stroke enabled".split(" "),s&&(0,t.Pe)(u,(function(t){t in s&&(g[t]=s[t])})),u=s&&s.type,r=t.p(u)?u:this.Db().Ma()||this.Nf().nc(r),u=a&&a.type,u=t.p(u)?u:l.Ma(),d=o&&o.type,d=t.p(d)?d:h.Ma(),g.type=n&&t.p(d)?d:e&&t.p(u)?u:r,r=s&&s.fill,r=t.p(r)?r:this.Db().Tm()||this.Zv(),u=a&&a.fill,u=t.p(u)?u:l.Tm(),d=o&&o.fill,d=t.p(d)?d:h.Tm(),g.fill=n&&t.p(d)?d:e&&t.p(u)?u:r,r=s&&s.stroke,r=t.p(r)?r:this.Db().gk()||this.qy(),u=a&&a.stroke,l=t.p(u)?u:l.gk()||this.qy(),u=o&&o.stroke,h=t.p(u)?u:h.gk()||this.qy(),g.stroke=n&&t.p(h)?h:e&&t.p(l)?l:r,c.Hi(),t.gy(c,i),c.td(g,e?a:o),c.W()}else c&&c.clear()},t.g.xL=function(){var e=new t.ww(0);return t.W(this,"tooltip",e),e.ya(this),t.K(e,this.Bp,this),e},t.g.Bp=function(){this.Ua().W()},t.g.GK=function(e){var i=t.wr(this,"legend");if(!e||!i||e.target!=i){i=this.Ua();var n=this.Ic();e&&(t.Ow(i,e.clientX,e.clientY,n),this.wa("mousemove",this.GK))}},t.g.pb=function(){if(this.J(16384)){this.hJ();for(var e,i=this.data().$(),n=0,s=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=0;i.advance();)e=i.get("value"),r(e)?n++:(e=r(e)?0:t.N(e),s=Math.min(e,s),a=Math.max(e,a),o+=e);var l;(i=i.Hb()-n)?l=o/i:s=a=o=l=void 0,this.La("count",i),this.La("min",s),this.La("max",a),this.La("sum",o),this.La("average",t.Tm(l||window.NaN,t.Um(o||0))),this.I(16384)}},t.g.Ic=function(){var e=this.$();return this.oe||(this.oe=new t.Fw),this.oe.lg(e).Li([this.ce(e.ma()),this]),e={x:{value:e.get("x"),type:"string"},value:{value:e.get("value"),type:"number"},name:{value:e.get("name"),type:"string"},index:{value:e.ma(),type:"number"},chart:{value:this,type:""}},t.ov(this.oe,e),this.oe},t.g.Rk=function(){return this.Ic()},t.g.Ol=function(e,i){for(var n,s=[],a=this.$().reset();a.advance();){n=a.ma();var o=a.get("legendItem")||{},r=null;t.D(i)&&((r=this.Ic()).b=this.ce(n),r=i.call(r,r)),t.z(r)||(r=String(t.p(a.get("name"))?a.get("name"):a.get("x")));var l=t.cm("fill",1,!1),h=t.cm("stroke",2,!1),c=t.cm("hatchFill",3,!1);r={enabled:!0,meta:{pointIndex:n,pointValue:a.get("value"),X:this},iconType:"square",text:r,iconStroke:h(this,t.gm,!1),iconFill:l(this,t.gm,!1),iconHatchFill:c(this,t.gm,!1)},t.Sc(r,o),r.sourceUid=t.oa(this),r.sourceKey=n,s.push(r)}return s},t.g.Ms=function(){return!0},t.g.zr=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.wq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.vq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.ej=function(){return null},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.yj=function(){return!this.$().Hb()},t.g.F=function(){var e=n.u.F.call(this);return e.data=this.data().F(),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),e.markerPalette=this.Nf().F(),e.tooltip=this.Ua().F(),t.Tq(this,U,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),{chart:e}},t.g.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,U,e),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.data(e.data),this.ve(e.hatchFillPalette),this.Nf(e.markerPalette),this.cc(e.palette),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip)},t.g.R=function(){t.sd(this.Og,this.ca,this.za,this.Ea,this.Yc,this.i,this.P,this.Fa,this.fd,this.He,this.ue,this.o,this.ba),this.P=this.i=this.Yc=this.Ea=this.za=this.ca=this.Og=null,delete this.sd,this.ba=this.o=this.ue=this.He=this.fd=this.Fa=null,n.u.R.call(this)},G.prototype.iC=function(e){this.labels.push(e),this.ya.g("reversed")?t.Pa(this.labels,(function(t,e){return t.ma()-e.ma()})):t.Pa(this.labels,(function(t,e){return e.ma()-t.ma()}))},G.prototype.clear=function(){this.labels.length=0},G.prototype.rd=function(e,i){var n=!!(i&t.wo),s=!n&&!!(i&t.vo),a=this.ya.data().get(e.ma(),"label");return s=s?this.ya.data().get(e.ma(),"hoverLabel"):null,n=(n?this.ya.data().get(e.ma(),"selectLabel"):null)||s||a||{},this.ya.data().j(e.ma(),"labelWidthForced")&&((n=t.Qc(n)).width=e.width()),this.ya.$().select(e.ma()),e.Hf(this.ya.Ic()),n=this.ya.labels().yl(e.Hf(),e.jc(),n),t.mn(n)},n.prototype.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},n.prototype.qA=function(){return["name","value"]};var _=n.prototype;_.data=_.data,_.getType=_.Ma,_.palette=_.cc,_.tooltip=_.Ua,_.hatchFillPalette=_.ve,_.markerPalette=_.Nf,_.labels=_.labels,_.markers=_.Db,_.hover=_.Tj,_.unhover=_.Md,_.select=_.select,_.unselect=_.ie,_.getPoint=_.ce,_.normal=_.Qa,_.hovered=_.lb,_.selected=_.selected,t.Tp.funnel=I,t.Tp.pyramid=E,t.E("anychart.funnel",I),t.E("anychart.pyramid",E)}.call(this,$)),_.theme_color_scales||(_.theme_color_scales=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{defaultColorRange:{enabled:!1,stroke:"#B9B9B9",orientation:"bottom",title:{enabled:!1},colorLineSize:10,padding:{top:10,right:0,bottom:0,left:0},margin:0,align:"center",length:"50%",marker:{padding:3,positionFormatter:t.wN,enabled:!0,disablePointerEvents:!1,position:"center",rotation:0,anchor:"center",offsetX:0,offsetY:0,type:"triangle-down",fill:"#333 0.85",stroke:"none",size:7},labels:{offsetX:0,offsetY:0,fontSize:11,padding:0},ticks:{stroke:"#B9B9B9",position:"outside",length:5,enabled:!0},minorTicks:{stroke:"#B9B9B9",position:"outside",length:3,enabled:!1}},defaultOrdinalColorScale:{inverted:!1,ticks:{maxCount:100},autoColors:function(e){return t.Nl("#90caf9","#01579b",e)}},defaultLinearColorScale:{maxTicksCount:1e3,colors:["#90caf9","#01579b"],minimumGap:0,maximumGap:0}}),t.ra(t.fa.anychart.themes.defaultTheme.standalones,{colorRange:{enabled:!0,zIndex:50}})}.call(this,$)),_.theme_sunburst||(_.theme_sunburst=1,function(t){var e=function(){var e=this.chart.calculationMode();return this.name+("parent-dependent"==e||"parent-independent"==e?"\n"+t.vN(this.value):"")};t.ra(t.fa.anychart.themes.defaultTheme,{sunburst:{animation:{duration:2e3},title:{text:"Sunburst Chart"},interactivity:{selectionMode:"drill-down"},radius:"45%",innerRadius:0,startAngle:0,a11y:{titleFormat:t.ON},center:{fill:"none",stroke:"none"},calculationMode:"ordinal-from-root",tooltip:{enabled:!0,title:!1,separator:!1,titleFormat:t.xN,format:e},leaves:{enabled:null,normal:{labels:{padding:"10%",hAlign:"center",position:"radial",format:t.xN}}},sort:"none",normal:{fill:t.zN,stroke:"#fff",labels:{adjustFontSize:[!0,!0],maxFontSize:14,minFontSize:1,padding:[1,"5%",1,"5%"],enabled:!0,hAlign:"center",vAlign:"middle",position:"circular",anchor:"center",fontColor:"#ffffff",format:e}},hovered:{fill:t.FN,stroke:t.zN,labels:{enabled:null}},selected:{fill:"#333 0.85",stroke:t.zN,labels:{enabled:null}}}})}.call(this,$)),_.pert||(_.pert=1,function(t){var e=function(e){return t.zk(y,e,"circle")},i=function(){t.V.call(this),this.Xb=this.Y=this.JN=this.gb=null,t.T(this.ua,[["color",0,8192]]);var e={};t.T(e,[["fill",0,8192],["stroke",0,8192],["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsFactoryConstructor",t.oy),this.ca.ta("labelsAfterInitCallback",this.UD),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",this.UD),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",this.UD)},n=function(e){var i=e.Ua().F(),n=e.Ua().g("titleFormat");return e=e.Ua().g("format"),n&&n!=t.ep&&(i.titleFormat=n),e&&e!=t.ep&&(i.format=e),i},s=function(){i.call(this),this.Ga("milestones"),t.T(this.ua,[["size",0,1],["shape",0,1]])},a=function(){i.call(this),this.Ga("tasks"),t.uy(this.ca,[["dummyFill",0,8192],["dummyStroke",0,8192],["lowerLabels",0,0],["upperLabels",0,0]]),this.ca.ta("lowerLabelsAfterInitCallback",this.UD),this.za.ta("lowerLabelsAfterInitCallback",this.UD),this.Ea.ta("lowerLabelsAfterInitCallback",this.UD)},o=function(){t.V.call(this),this.Ga("criticalPath"),this.Kk=this.hk=null},r=function(){t.Bx.call(this),this.Ga("pert"),this.la=null,this.b={},this.o={},this.f=[],this.Sb=[],this.Za=[],this.Ha=this.ba=this.i=null,this.ea=[],this.D={},this.Ka=this.Kk=this.hk=this.na=this.Lf=this.$a=this.fb=this.aa=this.Ba=null,this.P=[],this.K=[],this.G={},this.Ca=[],this.Uc=this.sb=0,this.ec=[],this.gb=this.qc=null,t.su(this,this,this.If,this.hg,this.Mda,this.If,null,this.Sj),t.T(this.ua,[["expectedTimeCalculator",8192,1],["verticalSpacing",4,1],["horizontalSpacing",4,1]])},l=function(e,i,n){var s=e.Ua(),a=!0;t.da(e.qc.enabled)&&(a=e.qc.enabled),s.N(e.qc),i&&t.da(i.enabled)&&(a=i.enabled),s.N(i),n&&t.da(n.enabled)&&(a=n.enabled),s.N(n),s.enabled(a)},h=function(t){if(t.o={},t.Sb.length&&t.Za.length)for(var e=0;e<t.Sb.length;e++)c(t,String(t.Sb[e].get("id")));for(var i in e=0,t.o){var n=t.o[i];n.nP||(e+=n.JY)}t.La("pertChartCriticalPathStandardDeviation",Math.sqrt(e)),t.I(8192)},c=function(e,i){var n,s=e.b[i];if(!(i in e.o)){e.o[i]={};var a=Number(s.item.get("optimistic")),o=Number(s.item.get("pessimistic"));e.o[i].JY=t.Tm(Math.pow((o-a)/6,2),3)}if(a=e.o[i],t.p(a.duration)||(o=e.Ic(!1,s,a),a.duration=t.Tm(e.g("expectedTimeCalculator").call(o,o),3)),o=a.duration,!t.p(a.qT)){var r=0;for(n=0;n<s.Hk.length;n++){var l=String(s.Hk[n].get("id")),h=e.o[l];t.p(h)&&t.p(h.lA)||c(e,l),r=Math.max(r,e.o[l].lA)}a.qT=t.Tm(r,3),a.lA=t.Tm(r+o,3)}if(!t.p(a.VV)){if(s.gj.length)for(r=window.Infinity,n=0;n<s.gj.length;n++)l=String(s.gj[n].get("id")),h=e.o[l],t.p(h)&&t.p(h.MN)||c(e,l),r=Math.min(r,e.o[l].MN);else{for(r=-window.Infinity,n=0;n<e.Za.length;n++)s=String(e.Za[n].get("id")),l=e.o[s],t.p(l)&&t.p(l.lA)||c(e,s),r=Math.max(r,e.o[s].lA);e.La("pertChartProjectDuration",r)}a.VV=t.Tm(r,3),a.MN=t.Tm(r-o,3),a.nP=t.Tm(r-a.lA,3)}},u=function(e,i){e!=i&&(t.Ba(e.Ar,i),t.Ba(i.Em,e))},d=function(e,i,n,s){return i={label:s||"",id:"",gj:[],Hk:[],Em:[],Ar:[],level:-1,ff:!1,left:0,top:0,My:n,pG:i,yn:!1,Rm:!1,bk:[],index:-1},n="m"+t.oa(i),e.D[n]=i,i.id=n,i},p=function(e,i,n){var s={from:i,Je:n,yn:!1,Rm:!1,pz:null,id:"",ff:!1},a="e"+t.oa(s);return s.id=a,e.G[a]=s,t.Ba(i.bk,s),t.Ba(n.bk,s),s},g=function(t,e){var i,n,s=[];for(i in t.G){var a=t.G[i];if(!a.Rm&&a.yn==e){a.yn=!e;var o={TJ:{},bk:{}};o.TJ[a.from.id]=a.from,o.TJ[a.Je.id]=a.Je,o.bk[a.id]=a;var r=[];for(a.from.Rm||a.from.yn!=e||(a.from.yn=!e,r.push(a.from)),a.Je.Rm||a.Je.yn!=e||(a.Je.yn=!e,r.push(a.Je));r.length;){var l=r.pop();for(n=0;n<l.bk.length;n++)if(!(a=l.bk[n]).Rm&&a.yn==e){a.yn=!e,o.bk[a.id]=a;var h=a.from==l?a.Je:a.from;h.Rm||h.yn!=e||(h.yn=!e,r.push(h)),o.TJ[h.id]=h}}s.push(o)}a.yn=!e}for(i in t.D)t.D[i].yn=!e;return s},f=function(t,e){var i,n,s,a=null,o=window.Infinity;for(i=0;i<t.length;i++){var r=t[i],l=0,h=-1;for(n=0;n<e.length;n++){var c=e[n],u=!0;for(s in r.TJ){var d=r.TJ[s];if(d.Rm&&0>c.indexOf(d)){u=!1;break}}if(u&&(0>h&&(h=n),++l>=o))break}if(!l)throw"non planar!";l<o&&(a=[i,h],o=l)}return a},b=function(e,i,n,s){var a=Math.atan((s-i)/(n-e)),o=Math.atan(.3);return i=a-o,a+=o,[n-(e=t.gn(0,0,3,10))*Math.cos(i),s-e*Math.sin(i),n-e*Math.cos(a),s-e*Math.sin(a)]},v=function(e,i){return t.da(e.enabled())?e.enabled():i},m=function(){var e=new r;return e.ga(!0,t.nm("pert")),e},y={rQ:"circle",vra:"rhombus",q9:"rectangle"};t.H(i,t.V),t.Gq(i,["fill","stroke","labels"],"normal"),i.prototype.ra=28672|t.V.prototype.ra,i.prototype.sa=t.V.prototype.sa;var S={};t.rq(S,1,"color",t.Qq),t.U(i,S),t.g=i.prototype,t.g.g=t.ir,t.g.iH=function(e){var i=this.parent();return i?i[e&t.wo?"selected":e&t.vo?"hovered":"normal"]():null},t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,this.Ua().df().parent(this.Y.Ua()),t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=4,n|=8),t.X(e,32768)&&(i|=1,n|=1),this.Xb=null,this.B(i,n)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.Xv=function(t,e){return this.Fp("fill",t,e)},t.g.nr=function(t,e){return this.Fp("stroke",t,e)},t.g.Fp=function(e,i,n){return e=(0==i?this.ca:1==i?this.za:this.Ea).g(e),t.D(e)&&(n.sourceColor=this.g("color"),e=e.call(n)),e},t.g.UD=function(e){t.K(e,this.Kn,this)},t.g.Kn=function(){this.va(4096)},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),t.W(this,"tooltip",this.gb),t.K(this.gb,this.Bp,this)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.Bp=function(){this.va(16384)},t.g.TA=function(e){return t.p(e)?(this.JN!=e&&(this.JN=e,this.ca.labels().O(this.JN)),this):this.JN},t.g.wi=function(){return this.ca.labels().W(),this},t.g.oL=function(){return this.ca.labels().clear(),this},t.g.F=function(){var e=i.u.F.call(this);return t.Tq(this,S,e,"Pert visual element"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F(),e},t.g.U=function(e,n){i.u.U.call(this,e,n),t.Iq(this,S,e),this.ca.ga(!!n,e),this.ca.ga(!!n,e.normal),this.za.ga(!!n,e.hovered),this.Ea.ga(!!n,e.selected),"tooltip"in e&&this.Ua().ga(!!n,e.tooltip)},t.g.R=function(){t.sd(this.gb),i.u.R.call(this)};var w=i.prototype;w.tooltip=w.Ua,w.normal=w.Qa,w.hovered=w.lb,w.selected=w.selected,t.H(s,i),s.prototype.ra=1|i.prototype.ra;var x,C=(x={},t.sq(x,[[0,"size",function(e){return t.yo(e,80)||0}],[0,"shape",e]]),x);t.U(s,C),s.prototype.F=function(){var e=s.u.F.call(this);return t.Tq(this,C,e),e},s.prototype.U=function(e,i){s.u.U.call(this,e,i),t.Iq(this,C,e)},t.H(a,i),t.Gq(a,["dummyFill","dummyStroke","lowerLabels","upperLabels"],"normal"),a.prototype.ra=i.prototype.ra,a.prototype.TA=function(t){return a.u.TA.call(this,t),(t=a.u.TA.call(this))&&this.ca.Ck().O(t),t},a.prototype.wi=function(){return this.ca.Ck().W(),a.u.wi.call(this)},a.prototype.oL=function(){return this.ca.Ck().clear(),a.u.oL.call(this)},t.H(o,t.V),t.g=o.prototype,t.g.ra=12289|t.V.prototype.ra,t.g.Wc=function(e){return this.hk||(this.hk=new s,t.W(this,"milestones",this.hk)),t.p(e)?(this.hk.N(e),this):this.hk},t.g.Nc=function(e){return this.Kk||(this.Kk=new a,t.W(this,"tasks",this.Kk)),t.p(e)?(this.Kk.N(e),this):this.Kk},t.g.F=function(){var t=o.u.F.call(this);return t.tasks=this.Nc().F(),t.milestones=this.Wc().F(),t},t.g.U=function(t,e){o.u.U.call(this,t,e),"milestones"in t&&this.Wc().U(t.milestones,e),"tasks"in t&&this.Nc().U(t.tasks,e)};var D=o.prototype;D.tasks=D.Nc,D.milestones=D.Wc,t.H(r,t.Bx),t.g=r.prototype,t.g.ra=t.Bx.prototype.ra,t.g.sa=61440|t.Bx.prototype.sa,t.g.Ma=function(){return"pert"},t.g.Ic=function(e,i,n,s){this.i&&!e||(this.i=new t.Fw),e={};var a=null;if(i){e.item={value:i.item,type:""},a=i.item,e.name={value:i.item.get("name"),type:"string"};var o=i.item.get("pessimistic");t.p(o)&&(e.pessimistic={value:+o,type:"number"}),o=i.item.get("optimistic"),t.p(o)&&(e.optimistic={value:+o,type:"number"}),o=i.item.get("mostLikely"),t.p(o)&&(e.mostLikely={value:+o,type:"number"}),o=i.item.get("duration"),t.p(o)&&(e.duration={value:+o,type:"number"}),e.successors={value:i.gj,type:""},e.predecessors={value:i.Hk,type:""},e.isCritical={value:i.ff,type:"string"}}return n&&(e.earliestStart={value:n.qT,type:"number"},e.earliestFinish={value:n.lA,type:"number"},e.latestStart={value:n.MN,type:"number"},e.latestFinish={value:n.VV,type:"number"},t.p(e.duration)||(e.duration={value:n.duration,type:"number"}),e.slack={value:n.nP,type:"number"},e.variance={value:n.JY,type:"number"}),s&&(e.successors={value:s.gj,type:""},e.predecessors={value:s.Hk,type:""},e.isCritical={value:s.ff,type:"string"},s.pG&&(e.creator={value:s.pG.item,type:""}),e.isStart={value:s.My,type:"string"},e.index={value:s.index,type:"number"}),this.i.Li([this]).lg(a),t.ov(this.i,e)},t.g.xL=function(){var e=new t.ww(0);return e.ya(this),t.K(e,this.Bp,this),e},t.g.Bp=function(){this.Ua().W()},t.g.data=function(e,i,n){return t.p(e)?(t.J(e,t.au)||t.J(e,t.Yt)?this.la!=e&&(this.la&&t.kr(this.la,this.dd,this),this.la=e):(this.la&&t.kr(this.la,this.dd,this),this.la=new t.au(e,i,n)),t.K(this.la,this.dd,this),this.B(4352,1),this):this.la},t.g.az=function(){this.Ta().gr()&&this.B(-6145,9)},t.g.dd=function(){this.B(4356,1)},t.g.Ol=function(){return[]},t.g.Ue=function(){return[]},t.g.If=function(e){var i=e.domTarget,s=this.Ua(),a=i.tag,o=!0;if(a)if(null!=a.m){var r=a.m;a=this.Ic(!0,void 0,void 0,r);var h=r.ff?this.Me().Wc():this.Wc(),c=r.Ve?t.wo:t.vo;o=h.Xv(c,a),h=h.nr(c,a),i.fill(o).stroke(h),o=!1,i=r.ff?n(this.Me().Wc()):void 0,s.ka(),l(this,n(this.Wc()),i),t.Ow(s,e.clientX,e.clientY,a),s.da(!0),(e=r.oX)&&(i=!0,s=this.Wc().Qa().labels(),e.td(s.$d()),i=v(s,i),r.Ve?(s=this.Wc().selected().labels(),e.td(s.$d()),i=v(s,i)):(s=this.Wc().lb().labels(),e.td(s.$d()),i=v(s,i)),r.ff&&(s=this.Me().Wc().Qa().labels(),e.td(s.$d()),i=v(s,i),r.Ve?(s=this.Me().Wc().selected().labels(),e.td(s.$d()),i=v(s,i)):(s=this.Me().Wc().lb().labels(),e.td(s.$d()),i=v(s,i))),e.enabled(i),e.W())}else null!=a.w&&(r=a.w,i=this.o[r.id],a=this.Ic(!0,r,i,void 0),c=r.Ve?t.wo:t.vo,o=(h=r.ff?this.Me().Nc():this.Nc()).Xv(c,a),h=h.nr(c,a),r.pX.stroke(h),r.X_.fill(o).stroke(h),h=r.DY,o=r.aW,h&&(i=!0,c=this.Nc().Qa().Jm(),h.td(c.$d()),i=v(c,i),r.Ve?(c=this.Nc().selected().Jm(),h.td(c.$d()),i=v(c,i)):(c=this.Nc().lb().Jm(),h.td(c.$d()),i=v(c,i)),r.ff&&(c=this.Me().Nc().Qa().Jm(),h.td(c.$d()),i=v(c,i),r.Ve?(c=this.Me().Nc().selected().Jm(),h.td(c.$d()),i=v(c,i)):(c=this.Me().Nc().lb().Jm(),h.td(c.$d()),i=v(c,i))),h.enabled(i),h.W()),o&&(i=!0,h=this.Nc().Qa().Ck(),o.td(h.$d()),i=v(h,i),r.Ve?(h=this.Nc().selected().Ck(),o.td(h.$d()),i=v(h,i)):(h=this.Nc().lb().Ck(),o.td(h.$d()),i=v(h,i)),r.ff&&(h=this.Me().Nc().Qa().Ck(),o.td(h.$d()),i=v(h,i),r.Ve?(h=this.Me().Nc().selected().Ck(),o.td(h.$d()),i=v(h,i)):(h=this.Me().Nc().lb().Ck(),o.td(h.$d()),i=v(h,i))),o.enabled(i),o.W()),o=!1,i=r.ff?n(this.Me().Nc()):void 0,s.ka(),l(this,n(this.Nc()),i),t.Ow(s,e.clientX,e.clientY,a),s.da(!0));o&&this.Ua().Lc()},t.g.hg=function(e){var i=e.domTarget;if(e=i.tag)if(null!=e.m){var n=e.m;e=n.ff?this.Me().Wc():this.Wc();var s=this.Ic(!0,void 0,void 0,n),a=n.Ve?t.wo:t.gm,o=e.Xv(a,s);if(s=e.nr(a,s),a=n.oX){e=!0;var r=this.Wc().Qa().labels();a.td(r.$d()),e=v(r,e),n.Ve&&(r=this.Wc().selected().labels(),a.td(r.$d()),e=v(r,e)),n.ff&&(r=this.Me().Wc().Qa().labels(),a.td(r.$d()),e=v(r,e),n.Ve&&(n=this.Me().Wc().selected().labels(),a.td(n.$d()),e=v(n,e))),a.enabled(e),a.W()}i.fill(o).stroke(s)}else null!=e.w&&(i=e.w,s=this.Ic(!0,i,this.o[i.id],void 0),a=i.Ve?t.wo:t.gm,o=(e=i.ff?this.Me().Nc():this.Nc()).Xv(a,s),s=e.nr(a,s),i.pX.stroke(s),i.X_.fill(o).stroke(s),n=i.DY,o=i.aW,n&&(e=!0,s=this.Nc().Qa().Jm(),n.td(s.$d()),e=v(s,e),i.Ve&&(s=this.Nc().selected().Jm(),n.td(s.$d()),e=v(s,e)),i.ff&&(s=this.Me().Nc().Qa().Jm(),n.td(s.$d()),e=v(s,e),i.Ve&&(s=this.Me().Nc().selected().Jm(),n.td(s.$d()),e=v(s,e))),n.enabled(e),n.W()),o&&(e=!0,n=this.Nc().Qa().Ck(),o.td(n.$d()),e=v(n,e),i.Ve&&(n=this.Nc().selected().Ck(),o.td(n.$d()),e=v(n,e)),i.ff&&(n=this.Me().Nc().Qa().Ck(),o.td(n.$d()),e=v(n,e),i.Ve&&(i=this.Me().Nc().selected().Ck(),o.td(i.$d()),e=v(i,e))),o.enabled(e),o.W()))},t.g.Mda=function(e){var i,n,s=e.metaKey||e.ctrlKey,a=e.domTarget,o=a.tag;if(t.J(e.target,t.Pu)&&(o=e.target.be(e.labelIndex).tag),t.J(a,t.ig)){if(o&&(null!=o.m?i=o.m:null!=o.w&&(n=o.w)),i||n)if(s)i&&(i.Ve=!i.Ve,i.Ve?t.Ba(this.K,i):t.Fa(this.K,i)),n&&(n.Ve=!n.Ve,n.Ve?t.Ba(this.P,n):t.Fa(this.P,n));else{for(e=0;e<this.K.length;e++)this.K[e].Ve=!1;for(e=0;e<this.P.length;e++)this.P[e].Ve=!1;this.K.length=0,this.P.length=0,i&&(i.Ve=!0,this.K.push(i)),n&&(n.Ve=!0,this.P.push(n))}else{for(e=0;e<this.K.length;e++)this.K[e].Ve=!1;for(e=0;e<this.P.length;e++)this.P[e].Ve=!1;this.K.length=0,this.P.length=0}this.dispatchEvent(function(t){var e,i={type:"pointsselect",selectedTasks:[],selectedMilestones:[]};for(e=0;e<t.P.length;e++){var n=t.P[e],s=t.o[n.id];n={item:n.item,name:n.item.get("name"),successors:n.gj,predecessors:n.Hk,earliestStart:s.qT,earliestFinish:s.lA,latestStart:s.MN,latestFinish:s.VV,duration:s.duration,slack:s.nP,variance:s.JY},i.selectedTasks.push(n)}for(e=0;e<t.K.length;e++)s={successors:(n=t.K[e]).gj,predecessors:n.Hk,isCritical:n.ff,isStart:n.My},n.pG&&(s.creator=n.pG.item),i.selectedMilestones.push(s);return i}(this)),this.B(32768,1)}};var T=function(){var e={};return t.rq(e,0,"expectedTimeCalculator",t.Cq),t.rq(e,0,"verticalSpacing",(function(e){return t.yo(e,20)})),t.rq(e,0,"horizontalSpacing",(function(e){return t.yo(e,20)})),e}();t.U(r,T),t.g=r.prototype,t.g.pb=function(){if(this.J(4096)){if(this.b={},this.Sb.length=0,this.Za.length=0,this.la&&!this.la.md){for(var e=this.la.Uv(),i=0;i<e.length;i++){var n=e[i],s=String(n.get("id"));s in this.b||(this.b[s]={id:s,item:n,gj:[],Hk:[],level:-1,ff:!1,YS:[],ZS:[]},this.Za.push(n));var a=n.get("dependsOn");if(t.p(a)&&"array"==t.ka(a))for(var o=0;o<a.length;o++){var r=String(a[o]);if(r in this.b)r!=s&&(this.b[r].gj.push(n),this.b[s].Hk.push(this.b[r].item),t.Fa(this.Za,this.b[r].item),t.Ua(this.b[r].ZS,s),t.Ua(this.b[s].YS,r));else{var l=this.la.Eo("id",r)[0];if(l){var c=String(l.get("id"));this.b[c]={id:c,item:l,gj:[n],Hk:[],level:-1,ff:!1,YS:[],ZS:[]},t.Fa(this.Za,l),this.b[s].Hk.push(l),t.Ua(this.b[c].ZS,s),t.Ua(this.b[s].YS,r)}}}else this.Sb.push(n)}var b,v;for(v in h(this),this.ea.length=0,this.D={},this.Ha=d(this,null,!0,"Start"),this.Ha.ff=!0,this.ba=d(this,null,!1,"Finish"),this.ba.ff=!0,this.b){var m=this.b[v],y=this.o[v];if(m.Hp||(m.Hp=d(this,m,!0,"S"+m.item.get("name"))),m.Pm||(m.Pm=d(this,m,!1,"F"+m.item.get("name")),m.Pm.pG=m),t.Ba(m.Hp.gj,m.item),t.Ba(m.Pm.Hk,m.item),y.nP||(m.ff=!0,m.Hp.ff=!0,m.Pm.ff=!0),m.gj.length)for(b=0;b<m.gj.length;b++){var S=String(m.gj[b].get("id")),w=this.b[S];w.Hp||(w.Hp=d(this,w,!0,"S"+w.item.get("name"))),w.Pm||(w.Pm=d(this,w,!1,"F"+w.item.get("name"))),u(w.Hp,m.Pm)}else u(this.ba,m.Pm);if(m.Hk.length)for(b=0;b<m.Hk.length;b++){var x=String(m.Hk[b].get("id")),C=this.b[x];C.Hp||(C.Hp=d(this,C,!0,"Start: "+C.item.get("name"))),C.Pm||(C.Pm=d(this,C,!1,"Finish: "+C.item.get("name"))),u(m.Hp,C.Pm)}else u(m.Hp,this.Ha)}var D,T,k,$,O,P,L=[];for(D in this.D){var G=this.D[D],F={};for(T=0;T<G.Em.length;T++){var I=G.Em[T];if(1==I.gj.length&&2>I.Ar.length&&!I.Hk.length){var E=String(I.gj[0].get("id")),A=this.b[E],U=A.Pm;for(k=0;k<G.Em.length;k++)if(T!=k){var _=G.Em[k];if(1==_.gj.length){var j=String(_.gj[0].get("id"));this.b[j].Pm==U&&(F[U.id]=U)}}}else F[I.id]=I}for(T=L.length=0;T<G.Em.length;T++)if(!((I=G.Em[T]).id in F)){E=String(I.gj[0].get("id"));var M=(A=this.b[E]).Hp;A.Hp=G,t.Ba(G.gj,A.item),L.push(M)}for(T=0;T<L.length;T++){var N=L[T];t.Fa(G.Em,N),delete this.D[N.id]}}for(D in this.D){for(G=this.D[D],F={},T=0;T<G.Ar.length;T++){var B=G.Ar[T];if(1==B.Hk.length&&2>B.Em.length&&!B.gj.length){var R=String(B.Hk[0].get("id")),H=this.b[R],z=H.Hp;for(k=0;k<G.Ar.length;k++)if(T!=k){var V=G.Ar[k];if(1==V.Hk.length){var q=String(V.Hk[0].get("id"));this.b[q].Hp==z&&(F[B.id]=B)}}}else F[B.id]=B}for(T=L.length=0;T<G.Ar.length;T++)(B=G.Ar[T]).id in F||(R=String(B.Hk[0].get("id")),M=(H=this.b[R]).Pm,H.Pm=G,t.Ba(G.Hk,H.item),L.push(M));for(T=0;T<L.length;T++)N=L[T],t.Fa(G.Ar,N),delete this.D[N.id]}for($ in this.G={},this.D){var W,K=this.D[$];for(W=0;W<K.gj.length;W++){var Y=String(K.gj[W].get("id")),X=this.b[Y],J=p(this,K,X.Pm);J.pz=X,J.ff=X.ff}for(W=0;W<K.Em.length;W++){var Z=K.Em[W];(J=p(this,K,Z)).ff=K.ff&&Z.ff}}this.Ca.length=0,this.Ha.level=0;for(var Q=[this.Ha],tt=[];Q.length;){var et,it=Q.pop(),nt=it.level;for(tt.length>nt&&(tt.length=nt),tt.push(it),it==this.ba&&this.Ca.push(tt.slice(0)),et=it.gj.length;et--;){var st=String(it.gj[et].get("id")),at=this.b[st].Pm,ot=nt+1;at.level=Math.max(ot,at.level),this.sb=Math.max(at.level,this.sb),Q.push(at)}for(et=it.Em.length;et--;){var rt=it.Em[et];ot=nt+1,rt.level=Math.max(ot,rt.level),this.sb=Math.max(rt.level,this.sb),Q.push(rt)}}for(var lt in this.G){var ht=this.G[lt];if(!ht.qw){var ct=ht.from,ut=ht.Je,dt=ut.level-ct.level;if(1<dt){for(var pt,gt,ft,bt=null,vt=0;vt<dt-1;vt++){var mt=!bt;bt=bt||ct,(pt={qw:!0,id:null,label:"Fake milestone "+vt,level:ct.level+1+vt,ff:ht.ff,yn:!1,Rm:!1,bk:[],Jja:null,CP:null,Ar:[bt],Em:[],d5:ht,gj:[],Hk:[],Eb:0}).id="fm"+t.oa(pt),this.D[pt.id]=pt,mt?((ft={qw:!0,from:bt,Je:pt,yn:!1,Rm:!1,pz:ht.pz,id:null,ff:ht.ff,d5:ht}).id="fe"+t.oa(ft),this.G[ft.id]=ft):(ft=bt.CP).Je=pt,(gt={qw:!0,from:pt,Je:null,yn:!1,Rm:!1,pz:ht.pz,id:null,ff:ht.ff,d5:ht}).id="fe"+t.oa(gt),this.G[gt.id]=gt,pt.CP=gt,pt.Jja=ft,pt.bk=[gt,ft],bt.qw?(bt.Em.push(pt),bt.CP.Je=pt):(ht.pz||(t.Fa(bt.Em,ut),t.Ba(bt.Em,pt)),t.Fa(bt.bk,ht),t.Ba(bt.bk,ft)),bt=pt}gt.Je=ut,t.Fa(ut.Ar,ct),t.Ba(ut.Ar,pt),pt.Em.push(ut);var yt=(0,t.za)(ut.bk,ht);0>yt&&(yt=0),t.Ca(ut.bk,yt,1,gt),delete this.G[ht.id]}}}this.ec.length=0,this.Ha.Rm=this.ba.Rm=!0;for(var St,wt=!1,xt=g(this,wt),Ct=[[this.Ha,this.ba]];St=f(xt,Ct);){var Dt=void 0,Tt=Ct,kt=St[1],$t=xt[St[0]],Ot=null;for(Dt in $t.bk){var Pt=$t.bk[Dt].from;Pt.Rm&&(!Ot||Ot.level>Pt.level)&&(Ot=Pt)}var Lt=[Ot];for(Pt=Ot;Pt;){var Gt=Pt.bk,Ft=null;for(Dt=0;Dt<Gt.length;Dt++){var It=Gt[Dt];if(It.from==Pt&&!It.Rm){It.Rm=!0;var Et=It.Je;Lt.push(Et),Et.Rm||(Et.Rm=!0,Ft=Et);break}}Pt=Ft}var At=void 0,Ut=void 0,_t=void 0,jt=void 0,Mt=Tt[kt],Nt=Lt,Bt=Mt.indexOf(Nt[0]),Rt=Mt.indexOf(Nt[Nt.length-1]);Bt<Rt?(jt=Bt,_t=Rt,Ut=!1):(jt=Rt,_t=Bt,Ut=!0);var Ht=Mt.slice(0,jt);if(Ut)for(At=Nt.length;At--;)Ht.push(Nt[At]);else Ht.push.apply(Ht,Nt);Ht.push.apply(Ht,Mt.slice(_t+1));var zt=Mt.slice(jt+1,_t);if(Ut)zt.push.apply(zt,Nt);else for(At=Nt.length;At--;)zt.push(Nt[At]);var Vt=[Ht,zt];t.Ca(Tt,kt,1,Vt[0],Vt[1]),xt=g(this,wt=!wt)}if(this.ec=Ct,this.ea[0]=[this.Ha],this.ea[this.sb]=[this.ba],this.Uc=1,2<this.ec.length)for(O=0;O<this.ec.length;O++){var qt=this.ec[O];t:{for(var Wt=window.Infinity,Kt=0,Yt=0;Yt<qt.length;Yt++){var Xt=qt[Yt];if(!Xt.level){var Jt=Yt;break t}Xt.level<Wt&&(Wt=Xt.level,Kt=Yt)}Jt=Kt}for(var Zt,Qt,te,ee=0;ee+=1,(Zt=(te=[qt[t.$a(Jt+ee,qt.length)],qt[t.$a(Jt-ee,qt.length)]])[0])!=(Qt=te[1])&&(Zt==Qt||Zt!=this.ba&&Qt!=this.ba);)Zt.bW=Qt,Qt.xla=Zt}for(P in this.D){var ie=this.D[P];if(ie!=this.Ha&&ie!=this.ba&&!ie.xla){var ne=ie.level;this.ea[ne]=[ie];for(var se=ie;se.bW;)this.ea[ne].push(se.bW),se=se.bW,this.Uc=Math.max(this.Uc,this.ea[ne].length)}}var ae=0;for(O=0;O<this.ea.length;O++){var oe=this.ea[O];for(P=0;P<oe.length;P++){var re=oe[P];re&&!re.qw&&(re.index=ae++)}}}this.I(4096)}},t.g.w4=function(e){var i=0;t.X(e,4096)&&(i|=16384),t.X(e,8192)&&(i|=32768),t.X(e,1)&&(i|=4),this.B(i,1)},t.g.A4=function(e){var i=0;t.X(e,4096)&&(i|=16384),t.X(e,8192)&&(i|=32768),this.B(i,1)},t.g.Wc=function(e){return this.hk||(this.hk=new s,t.W(this,"milestones",this.hk),t.K(this.hk,this.w4,this)),t.p(e)?(this.hk.N(e),this):this.hk},t.g.Nc=function(e){return this.Kk||(this.Kk=new a,t.W(this,"tasks",this.Kk),t.K(this.Kk,this.A4,this)),t.p(e)?(this.Kk.N(e),this):this.Kk},t.g.Me=function(e){return this.Ka||(this.Ka=new o,t.K(this.Ka.Wc(),this.w4,this),this.Ka.Wc().parent(this.Wc()),t.K(this.Ka.Nc(),this.A4,this),this.Ka.Nc().parent(this.Nc())),t.p(e)?(this.Ka.N(e),this):this.Ka},t.g.Tha=function(e){var i=e.tag;if(i&&null!=i.m){var n=i.m;i=n.ff?this.Me().Wc():this.Wc();var s=this.Ic(!0,void 0,void 0,n),a=n.Ve?t.wo:t.gm;n=i.Xv(a,s),i=i.nr(a,s),e.fill(n).stroke(i)}},t.g.Uha=function(t){if((t=t.tag)&&null!=t.m){var e=t.m,i=!0;if(t=e.oX){var n=this.Wc().Qa().labels();t.td(n.$d()),i=v(n,i),e.Ve&&(n=this.Wc().selected().labels(),t.td(n.$d()),i=v(n,i)),e.ff&&(n=this.Me().Wc().Qa().labels(),t.td(n.$d()),i=v(n,i),e.Ve&&(e=this.Me().Wc().selected().labels(),t.td(e.$d()),i=v(e,i))),t.enabled(i),t.W()}}},t.g.Jla=function(e){if((e=e.tag)&&null!=e.w){var i=(e=e.w).x3;i.clear(),i.oc(1,0,0,1,0,0);var n={width:null,height:null,rotation:0,padding:[0,0,0,0]},s=e.DY,a=e.aW;if(s){var o=!0,r=this.Nc().Qa().Jm();if(o=v(r,o),s.td(r.$d()),e.Ve){var l=this.Nc().selected().Jm();s.td(l.$d()),o=v(l,o)}e.ff&&(l=this.Me().Nc().Qa().Jm(),s.td(l.$d()),o=v(l,o),e.Ve&&(l=this.Me().Nc().selected().Jm(),s.td(l.$d()),o=v(l,o))),s.enabled(o),s.W(),o=t.Xu(r,s,void 0,n),i.moveTo(o.left,o.top).lineTo(o.left+o.width,o.top).lineTo(o.left+o.width,o.top+o.height).lineTo(o.left,o.top+o.height).close()}a&&(o=!0,s=this.Nc().Qa().Ck(),a.td(s.$d()),o=v(s,o),e.Ve&&(r=this.Nc().selected().Ck(),a.td(r.$d()),o=v(r,o)),e.ff&&(r=this.Me().Nc().Qa().Ck(),a.td(r.$d()),o=v(r,o),e.Ve&&(r=this.Me().Nc().selected().Ck(),a.td(r.$d()),o=v(r,o))),a.enabled(o),a.W(),n=t.Xu(s,a,void 0,n),i.moveTo(n.left,n.top).lineTo(n.left+n.width,n.top).lineTo(n.left+n.width,n.top+n.height).lineTo(n.left,n.top+n.height).close()),i.Du(e.rotation,"center")}},t.g.Ila=function(e){var i=e.tag;if(i)if(null!=i.w){var n=i.w,s=this.o[n.id],a=n.ff?this.Me().Nc():this.Nc();s=this.Ic(!0,n,s,void 0);var o=n.Ve?t.wo:t.gm;n=a.Xv(o,s),a=a.nr(o,s),i.a&&(t.C(a)&&delete(a=t.Qc(a)).dash,e.fill(n)),e.stroke(a)}else null!=i.d&&(a=i.d?this.Me().Nc():this.Nc(),s=this.Ic(!1,void 0,void 0,void 0),n=a.Fp("dummyFill",0,s),a=a.Fp("dummyStroke",0,s),i.a&&(t.C(a)&&delete(a=t.Qc(a)).dash,e.fill(n)),e.stroke(a))},t.g.Qh=function(e){if(this.pb(),this.J(8192)&&(h(this),this.I(8192)),this.na||(this.na=this.Na.Bd(),this.aa=new t.dC((function(){return t.qk()}),(function(t){t.clear(),t.tag=void 0})),this.aa.zIndex(1),this.aa.parent(this.na),this.fb=new t.dC((function(){var e=t.qk();return e.fill("none").stroke({color:"#fff",opacity:1e-4,thickness:6}),e}),(function(t){t.clear(),t.tag=void 0})),this.fb.zIndex(3),this.fb.parent(this.na),this.Ba=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.Ba.zIndex(3),this.Ba.parent(this.na),this.Lf=this.na.Bd(),this.Lf.zIndex(4),this.$a=new t.dC((function(){var e=t.qk();return e.fill({color:"#fff",opacity:1e-4}).stroke({color:"#fff",opacity:1e-4,thickness:2}),e}),(function(t){t.clear(),t.tag=void 0,t.oc(1,0,0,1,0,0)})),this.$a.zIndex(5),this.$a.parent(this.na),this.Wc().TA(this.Lf),this.Me().Wc().TA(this.Lf),this.Nc().TA(this.Lf),this.Me().Nc().TA(this.Lf),this.Wc().wi(),this.Nc().wi(),this.Me().Wc().wi(),this.Me().Nc().wi()),t.Aw(this.Ua(),this),t.Aw(this.Wc().Ua(),this),t.Aw(this.Nc().Ua(),this),t.Aw(this.Me().Wc().Ua(),this),t.Aw(this.Me().Nc().Ua(),this),this.J(4)){this.aa.clear(),this.fb.clear(),this.Ba.clear(),this.$a.clear(),this.Wc().oL(),this.Nc().oL();var i,n=t.L(this.g("verticalSpacing"),e.height),s=t.L(this.g("horizontalSpacing"),e.width),a=this.sb>=this.Uc?e.width:e.height,o=t.L(this.Me().Wc().g("size"),a),r=t.L(this.Wc().g("size"),a),l=Math.max(r,o);for(r=e.left+l/2,o=0;o<this.ea.length;o++){var c=this.ea[o];if(c){var u=e.top+l/2;for(i=0;i<c.length;i++){var d=c[i];if(d){if(!d.qw){var p=t.eC(this.Ba),g=d.ff?this.Me().Wc():this.Wc();g=d.Ve?g.selected().g("stroke"):g.Qa().g("stroke"),g=0==t.dp(g)%2?0:.5;var f=d.ff?this.Me().Wc():this.Wc(),v=t.L(f.g("size"),a),m=Math.round(v/2);switch(d.Eb=m,f.g("shape")){case"rhombus":p.moveTo(r+g-m,u+g).lineTo(r+g,u+g-m).lineTo(r+g+m,u+g).lineTo(r+g,u+g+m).close();break;case"rectangle":p.moveTo(r+g-m,u+g-m).lineTo(r+g+m,u+g-m).lineTo(r+g+m,u+g+m).lineTo(r+g-m,u+g+m).close();break;default:p.moveTo(r+g+m,u+g).arcTo(m,m,0,360)}p.tag={m:d},d.pX=p,f=this.Ic(!0,void 0,void 0,d),g=d.ff?this.Me().Wc():this.Wc(),(p=this.Wc().Qa().labels().add(f,{value:{x:r-m,y:u-m}})).td(g.Qa().labels().$d()),p.width(v),p.height(v),d.oX=p}d.left=r,d.top=u}u+=n}}r+=s}for(o in this.G)if(a=(f=this.G[o]).from,i=f.Je,s=(n=f.pz?f.pz:void 0)?this.o[n.id]:void 0,g=f.ff,!a.qw){l=t.eC(this.aa),d=t.eC(this.aa),c=t.eC(this.fb),l.tag=n?{w:n}:{d:g},d.tag=n?{w:n}:{d:g},d.tag.a=!0,c.tag=n?{w:n}:{d:g},g=f.ff?this.Me().Nc():this.Nc(),v=this.Ic(!0,n,s,void 0),n?(g=g.nr(n.Ve?t.wo:t.gm,v),n.pX=l,n.x3=t.eC(this.$a),n.x3.tag={w:n},n.X_=d):g=g.Fp("dummyStroke",0,v),g=0==t.dp(g)%2?0:.5,m=a.left+g+(a.Eb||0);var y=a.top+g;l.moveTo(m,y),c.moveTo(m,y),v=(m+i.left-i.Eb)/2,p=(i.top+y)/2;var S=Math.atan((i.top-a.top)/(i.left-i.Eb-a.left-a.Eb));if(n&&(n.rotation=180*S/Math.PI),f.qw){for(S=f.Je;S.qw;)r=S.left+g,u=S.top+g,l.lineTo(r,u),c.lineTo(r,u),S=(f=S.CP).Je;m=r,y=u,f=S.left+g-(S.Eb||0),S=S.top+g;var w=Math.atan((S-y)/(f-m)),x=b(m,y,f,S),C=f-10*Math.cos(w);w=S-10*Math.sin(w);var D=x[0],T=x[1],k=x[2];x=x[3],l.moveTo(m,y).lineTo(C,w)}else f=i.left+g-(i.Eb||0),S=i.top+g,w=Math.atan((S-y)/(f-m)),x=b(m,y,f,S),C=f-10*Math.cos(w),w=S-10*Math.sin(w),D=x[0],T=x[1],k=x[2],x=x[3],l.moveTo(m,y).lineTo(C,w);d.moveTo(C,w).lineTo(D,T).lineTo(f,S).lineTo(k,x).close(),c.lineTo(f,S),n&&(a=t.gn(0,0,i.left-i.Eb-a.left-a.Eb,i.top-a.top),f=this.Ic(!0,n,s,void 0),s=this.Nc().Qa().Jm().add(f,{value:{x:v+g,y:p+g}}),n.DY=s,s.width(a),s.height(e.height),s.rotation(n.rotation),s.tag={w:n},(g=this.Nc().Qa().Ck().add(f,{value:{x:v+g,y:p+g}})).width(a),g.height(e.height),n.aW=g,g.rotation(n.rotation),g.tag={w:n})}this.B(49152)}this.J(32768)&&(this.Ba.Pj(this.Tha,this),this.aa.Pj(this.Ila,this),this.B(16384),this.I(32768)),this.J(16384)&&(this.Wc().wi(),this.Nc().wi(),this.Me().Wc().wi(),this.Me().Nc().wi(),this.Ba.Pj(this.Uha,this),this.aa.Pj(this.Jla,this),this.I(16384))},t.g.yj=function(){return!this.la||!this.la.bc()},t.g.Zj=function(e,i){return t.qu(this.data(),i)},t.g.R=function(){this.Sb.length=0,this.Za.length=0,delete this.b,delete this.o,delete this.la,t.sd(this.Wc(),this.Nc(),this.Me()),t.sd(this.fb,this.$a,this.Ba,this.aa,this.Lf,this.na),this.na=this.Lf=this.aa=this.Ba=this.$a=this.fb=null,r.u.R.call(this)},t.g.F=function(){var e=r.u.F.call(this);return this.la&&(e.treeData=this.la.xB()),e.milestones=this.Wc().F(),e.tasks=this.Nc().F(),e.criticalPath=this.Me().F(),t.Tq(this,T,e),{chart:e}},t.g.U=function(e,i){r.u.U.call(this,e,i),this.qc=t.nm("defaultTooltip"),"treeData"in e&&this.data(t.cu(e.treeData)),"milestones"in e&&this.Wc().U(e.milestones,i),"tasks"in e&&this.Nc().U(e.tasks,i),"criticalPath"in e&&this.Me().U(e.criticalPath,i),t.Iq(this,T,e)};var k=r.prototype;k.getType=k.Ma,k.tasks=k.Nc,k.milestones=k.Wc,k.criticalPath=k.Me,k.data=k.data,k.toCsv=k.Zj,t.Tp.pert=m,t.E("anychart.pert",m)}.call(this,$)),_.theme_calendar||(_.theme_calendar=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{defaultMonthsLabelsSettings:{},calendar:{margin:0,padding:0,colorRange:{orientation:"top",enabled:!0},colorScale:{type:"linear-color"},background:{enabled:!1},years:{title:{enabled:!0,fontSize:40,width:"100%",fontColor:"#dfdfdf",orientation:"left",position:"center"},background:{enabled:!1},inverted:!1,underSpace:30,monthsPerRow:12,format:"{%year}"},months:{labels:{},stroke:"#0767b1",noDataStroke:"#c9c9c9",underSpace:5},weeks:{showWeekends:!0,labels:{width:"100%",position:"center",anchor:"center"},spacing:5},days:{noDataFill:"#f8f8f8",noDataStroke:"#fff",noDataHatchFill:{type:"backward-diagonal",color:"#e0e0e0",thickness:1,size:6},spacing:0,normal:{fill:function(){return this.scaledColor||this.sourceColor},stroke:"#fff",hatchFill:"backward-diagonal"},hovered:{fill:"#6363a3",stroke:"2 #6333a3"},selected:{}},tooltip:{titleFormat:"{%x}",format:"{%Value}"}}})}.call(this,$)),_.theme_scatter||(_.theme_scatter=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{scatter:{defaultSeriesType:"marker",legend:{enabled:!1},defaultSeriesSettings:{base:{clip:!0,color:null,tooltip:{titleFormat:function(){return this.seriesName},format:function(){return"x: "+this.x+"\ny: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix}},xScale:null,yScale:null,a11y:{enabled:!1,titleFormat:"Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"}},bubble:{normal:{negativeFill:t.EN,negativeStroke:t.EN,negativeHatchFill:null,labels:{anchor:"center"}},hovered:{negativeFill:t.EN,negativeStroke:t.EN,negativeHatchFill:void 0},displayNegative:!1,hatchFill:!1,tooltip:{format:function(){return"X: "+this.x+"\nY: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix+"\nSize: "+t.vN(this.size)}}},line:{connectMissingPoints:!1},marker:{normal:{size:5},hovered:{size:7},selected:{size:7}}},defaultAnnotationSettings:{},defaultXAxisSettings:{orientation:"bottom",scale:0,title:{text:"X-Axis"}},defaultYAxisSettings:{orientation:"left",scale:1,title:{text:"Y-Axis"}},series:[],xGrids:[],yGrids:[],xMinorGrids:[],yMinorGrids:[],xAxes:[{}],yAxes:[{}],lineAxesMarkers:[],rangeAxesMarkers:[],textAxesMarkers:[],scales:[{type:"linear"},{type:"linear"}],xScale:0,yScale:1,maxBubbleSize:"20%",minBubbleSize:"5%",crosshair:{enabled:!1,displayMode:"float",xStroke:"#969EA5",yStroke:"#969EA5",zIndex:41,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},a11y:{titleFormat:t.QN},annotations:{annotationsList:[],zIndex:2e3}},marker:{},bubble:{},quadrant:{scales:[{type:"linear",minimum:0,maximum:100},{type:"linear",minimum:0,maximum:100}],xScale:0,yScale:1,defaultXAxisSettings:{ticks:!1,labels:!1,title:{enabled:!1,align:"left"},stroke:"3 #bbdefb"},defaultYAxisSettings:{ticks:!1,labels:!1,title:{enabled:!1,align:"left"},stroke:"3 #bbdefb"},xAxes:[{},{orientation:"top"}],yAxes:[{},{orientation:"right"}],crossing:{stroke:"#bbdefb"},quarters:{rightTop:{enabled:!0},leftTop:{enabled:!0},leftBottom:{enabled:!0},rightBottom:{enabled:!0}}}})}.call(this,$)),_.sunburst||(_.sunburst=1,function(t){var e=function(e){t.V.call(this),this.target=e,this.Xb=this.Y=null,this.I(4294967295),t.T(this.ua,[["thickness",0,1],["enabled",0,1]]),e={},t.T(e,[["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsFactoryConstructor",t.py),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.oha,this),e.kb(this),this.B(16,1)})),e={},t.T(e,[["labels",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.py),e={},t.T(e,[["labels",0,0]]),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.py),this.ca.labels().I(4294967295)},i=function(e,i){t.bD.call(this,e,i),this.Ga("sunburst"),this.state=new t.ix(this),this.P={},this.i=[],this.D=[],this.ec=[],this.Sb=[],this.aa=this.fd=this.Fa=null,this.me={},this.B(4294967295),t.T(this.ua,[["radius",4,1],["innerRadius",4,1],["startAngle",16,1],["calculationMode",16,1],["sort",16,1]]);var n={};t.T(n,[["fill",528,1],["stroke",528,1],["hatchFill",528,1],["labels",0,0]]),this.ca=new t.my(this,n,t.gm),this.ca.ta("labelsFactoryConstructor",t.py),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.Kn,this),e.kb(this),this.B(16,1)})),n={},t.T(n,[["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0]]),this.za=new t.my(this,n,t.vo),this.za.ta("labelsFactoryConstructor",t.py),n={},t.T(n,[["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0]]),this.Ea=new t.my(this,n,t.wo),this.Ea.ta("labelsFactoryConstructor",t.py),this.Dk=(0,t.pa)(this.Vga,this)},n=function(e,i){var n=this.calculationMode(),s=!!e.j("isLeaf"),a=!!i.j("isLeaf");return s=t.N("parent-independent"==n?s?e.get("value"):e.j("sunburst_visibleLeavesSum"):e.get("value")),t.N("parent-independent"==n?a?i.get("value"):i.j("sunburst_visibleLeavesSum"):i.get("value"))-s},s=function(t,e){return-n.call(this,t,e)},a=function(t){for(var e=0;e<t.ba.length;e++){var i=t.ba[e];i&&i.j("labelIndex",void 0)}},o=function(e,i){if(!e)return t.Xl;var n=i+"|"+e+"|true",s=T[n];if(!s){switch(i){case 2:s=t.Zl;break;case 3:s=t.$l;break;default:s=t.am}T[n]=s=t.qa(r,e,s,3==i,!0)}return s},r=function(e,i,n,s,a,o,r,l){var h=a.$();if(o!=t.gm&&s){var c=a.sc(e,o,h.f,i,!1,void 0,r);if(n&&!0===c&&(c=i(a.Eh())),t.p(c)){if(!t.D(c))return c;if(n)return n=a.Yi(r),i(c.call(n,n))}}return e=a.sc(e,0,h.f,i,!1,void 0,r),l=t.p(l)?l:e,n&&!0===e&&(e=i(a.Eh())),t.D(e)&&((n=n?a.Yi(r):a.Ge(l,r)).sourceColor=i(n.sourceColor),e=i(e.call(n,n))),c&&(n=a.Ge(e,r),e=i(c.call(n,n))),i=e,t.C(i)&&i.hasOwnProperty("mode")&&i.hasOwnProperty("cx")&&null===e.mode&&(e.mode=a.lf?a.lf:null),e},l=function(t,e){var i=o("stroke",2)(t,e,!1,null);return e||t.$().f.j("stroke",i),i},h=function(e,i){var n=e.$(),s=n.j("path"),a=o("fill",1)(e,i,!1,null);i||e.$().f.j("fill",a);var r=l(e,i),h=o("hatchFill",3)(e,i,!1,null);i||e.$().f.j("hatchFill",h),h=h||null,t.p(s)&&(s.fill(a),s.stroke(r),a=n.j("hatchPath"),h||a)&&(a||(a=t.eC(e.o),n.j("hatchPath",a)),a.clear().pe(t.yg(s)),a.stroke(null).fill(h))},c=function(t,e){t.Ba=e;var i=Math.min(t.na.width/t.Ba.width,t.na.height/t.Ba.height);(0,window.isFinite)(i)||(i=0),t.f.ak.oc(i,0,0,i,t.na.left-t.Ba.left*i+(t.na.width-i*t.Ba.width)/2,t.na.top-t.Ba.top*i+(t.na.height-i*t.Ba.height)/2)},u=function(t){var e,i=t.P;for(t.Ka=window.NaN,t.sb=[],e=0;e<=t.fb;e++){var n=t.ec[e],s=t.Sb[t.fb-e],a=i[e]?i[e]:i[e]={},o=!0,r=window.NaN;if(n){var l=n.g("enabled");o=null!=l?!!l:o,r=null!=(n=n.g("thickness"))?n:r}s&&(o=null!=(l=s.g("enabled"))?!!l:o,r=null!=(n=s.g("thickness"))?n:r),a.display=o,a.dla=r,o&&t.sb.push(e)}},d=function(e){if(e.sb.length!=e.fb+1){var i=e.vw().g("enabled");i=null==i||i;for(var n=0;n<e.fb;n++){var s=e.P[n];if(s){var a=t.xa(e.sb,(function(t){return t>n})),o=e.P[e.sb[a]];t.Dc(s.LB,(function(e,s){for(var a=o&&o.LB?o.LB[s]:null,r=0;r<e.hf.length;r++){var l=e.hf[r],h=l.Sl(),c=[];if(a)for(var u=a.hf,d=0;d<u.length;d++){var p=u[d];(!p.j("isLeaf")||i)&&(p=p.j("pathFromRoot")[n+1])&&t.Aa(h,p)&&!t.Aa(c,p)&&c.push(p)}l.j("attendingOnNextVisLevel",c)}}))}}}},p=function(e,i,n){var s,a=0,o=i.bc();if(t.J(i,t.au)||t.J(i,t.Yt))for(s=0;s<o;s++){var r=i.xd(s);r.j("pathFromRoot",[r]),r=p(e,r,n),a=Math.max(a,r)}else{if(s=e.fh++,i.j("index",s).j("depth",n).j("isLeaf",!o),(r=i.getParent())&&((r=t.Ha(r.j("pathFromRoot"))).push(i),i.j("pathFromRoot",r)),e.ba[s]=i,e.Uc[s]=i,o){for(s=0;s<o;s++)r=i.xd(s),r=p(e,r,n+1),a=Math.max(a,r);a+=1}i.j("nodeMaxDepth",a)}return a},g=function(e,i){var n,s=0,a=0,o=0,r=0,l=i.bc();if(t.J(i,t.au)||t.J(i,t.Yt))for(n=0;n<l;n++){var h=i.xd(n),c=g(e,h);s+=c.WD,a+=c.N6,o+=c.dG}else{if(l){var u=0;for(n=0;n<l;n++)h=i.xd(n),s+=(c=g(e,h)).WD,a+=c.N6,o+=c.dG,r+=c.Dla,h.j("isLeaf")&&u++;c=t.N(i.get("value")),h=5,i.j("sunburst_leavesCount",a),i.j("sunburst_childrenLeavesCount",u)}else s=i.j("depth"),a=t.Aa(e.sb,s),s=c=t.N(i.get("value"))||0,h=0,a?(a=1,r=c,i.j("sunburst_leavesCount",1)):(r=a=0,i.j("sunburst_leavesCount",0)),i.j("sunburst_childrenLeavesCount",1);i.j("sunburst_value",c),i.j("sunburst_leavesSum",s),i.j("sunburst_childSum",o),i.j("sunburst_visibleLeavesSum",r),i.j("sunburst_type",h),l=e.P,o=t.N(i.get("value"));var d=i.j("depth");u=i.j("pathFromRoot")[0],n=(0,t.za)(e.i,u),u=!i.bc(),h=null==(h=e.vw().g("enabled"))||!!h,(l=l[d]?l[d]:l[d]={}).IJ=(l.IJ||0)+(u?h?o:0:o),l.Py=(l.Py||0)+1,l.oI=(l.oI||0)+(u&&h?1:0),l.Rz=(l.Rz||0)+(u?0:1),l.lv||(l.lv=[]),-1!=(0,t.za)(l.lv,n)||0==l.Rz&&!h||l.lv.push(n),(n=(l=l.LB?l.LB:l.LB={})[n]?l[n]:l[n]={}).IJ=(n.IJ||0)+(u?h?o:0:o),n.Py=(n.Py||0)+1,n.oI=(n.oI||0)+(u&&h?1:0),n.Rz=(n.Rz||0)+(u&&h?0:1),n.dG=(n.dG||0)+i.j("sunburst_childSum"),n.WD=(n.WD||0)+i.j("sunburst_leavesSum"),n.hf=n.hf?n.hf:n.hf=[],n.hf.push(i),o=c}return{dG:o,WD:s,N6:a,Dla:r}},f=function(e,i,n,s,a,o){if(i.j("sunburst_missing"))return 0;var r=i.j("depth"),c=s,u=i.j("index"),d=e.$();d.select(u);var p=e.$().f,g=null,b=null;if(e.aa){var v=e.aa.Jj;if(v){var m=e.aa.mL;if(m)for(var y=e.aa.state,S=0;S<m.length;S++){var w=(0,m[S])(p,y);w&&w in v&&(g=v[w],b=w)}}}p.j("statefulFill",g),p.j("statefulName",b),p=t.nx(e.state,u),u=i.bc(),b=(g=e.P[r]).display,g=g.Ef,i.j("isLeaf")&&(b=null!=(v=(m=e.vw()).g("enabled"))?b&&v:b,g=null!=(m=m.g("thickness"))?m:g),m=b,y=e.g("calculationMode"),S=i.bc(),w=i.j("depth"),v=-1!=(0,t.za)(e.D,i)?null:i.getParent();var x=i.j("depth"),C=(0,t.za)(e.i,i.j("pathFromRoot")[0]);if(x=e.P[x].LB[C],"parent-independent"==y){var D=(0,window.parseFloat)(i.j("sunburst_leavesSum"));n=D/n,!(0,window.isNaN)(n)&&m||(v?m?n=D/x.WD:(n=i.j("sunburst_visibleLeavesSum"),m=v.j("sunburst_visibleLeavesSum"),v=(v=v.j("attendingOnNextVisLevel"))&&v.length,n=(y=(y=i.j("attendingOnNextVisLevel"))&&y.length)&&v?n/m:0):(D=window.NaN,n=(n=e.P[e.Ka])?1/n.lv.length:0))}else"parent-dependent"==y?(m?(D=(0,window.parseFloat)(i.j("sunburst_value")),(0,window.isNaN)(D)&&(D=(0,window.parseFloat)(i.j("sunburst_leavesSum"))),n=(0,window.isNaN)(n)&&v?D/x.IJ:v?D/n:(n=e.P[e.Ka])?1/n.lv.length:0):n=S?w>=e.Ka?(D=(0,window.parseFloat)(i.j("sunburst_value")))/n:(n=e.P[w+1])&&n.display?1/n.lv.length:1:0,(0,window.isNaN)(n)&&(n=1)):"ordinal-from-root"==y?(y=null==(y=e.vw().g("enabled"))||y,n=e.P[e.Ka],S=v&&v.j("sunburst_childrenLeavesCount"),v?m?n=1/(v.bc()-(y?0:S)):(v=(v=v.j("attendingOnNextVisLevel"))&&v.length,n=(y=(y=i.j("attendingOnNextVisLevel"))&&y.length)&&v?1/v:0):n=n?1/n.lv.length:0):v?(n=i.j("sunburst_leavesCount"),n=(v=v.j("sunburst_leavesCount"))?n/v:0):n=(n=e.P[e.Ka])?1/n.lv.length:0;if(n=(D=[n,D])[0],D=D[1],a*=(0,window.isNaN)(n)?1:n,n=o,b?(b=l(e,0),b=t.dp(b),b=Math.floor(b/2),g=t.L(g,e.ud),(0,window.isNaN)(g)&&(g=e.Od),n=o+g,g=t.eC(e.ue),t.wi(g,e.Dc,e.uc,o+b,n-b,s,a),d.j("path",g),d.j("start",s),d.j("sweep",a),d.j("innerRadius",o),d.j("outerRadius",n),d.j("halfStrokeThickness",b),e.qC(g),e.ke(p),b=(o=e.$()).j("statefulFill"),(g=o.j("statefulName"))in e.me&&(g=e.me[g],v=l(e,p),g.fill(b),g.stroke(v),b=o.j("innerRadius"),v=o.j("outerRadius"),m=o.j("halfStrokeThickness"),y=o.j("start"),o=o.j("sweep"),t.wi(g,e.Dc,e.uc,b+m,v-m,y,o))):d.j("path",void 0),d.j("hatchPath",void 0),h(e,p),u)for(d=i.Sl(),e.qc&&t.Pa(d,e.qc),i=0;i<u;i++)c=t.ab(f(e,d[i],D,c,a,n));return r>=e.Ka?s+a:c},b=function(t,e){var i=e.j("pathFromRoot");return 1==t.i.length&&e!=t.i[0]?i[1]:i[0]},v=function(t,e,i){if(!e)return t.i;var n=e.j("depth"),s=e.j("nodeMaxDepth");if(s=n+s,i)if(n<t.sb[0])e=t.i;else{for(i=t.P[n].display;!i&&0<n;)--n,i=t.P[n].display,e=e.getParent();e=[e]}else for(e=[e];n<=s&&!(i=t.P[n].display);n++){i=[];for(var a=0;a<e.length;a++)i.push(e[a].Sl());e=i}return e},m=function(e,i){var n=t.ka(i);if(t.J(i,t.du)||t.J(i,t.$t))return e.ce(i.j("index"));if("array"==n){n=[];for(var s=0;s<i.length;s++)s in i&&(n[s]=m(e,i[s]))}else{if("object"!=n)return i;for(s in n={},i)if(i.hasOwnProperty(s)){var a=i[s];s in D&&(s=D[s]),n[s]=m(e,a)}}return n},y=function(e,n){var s=new i(e,n);return s.ga(!0,t.nm("sunburst")),s};t.H(e,t.V),t.Gq(e,["labels"],"normal"),e.prototype.ra=9;var S,w=(S={},t.rq(S,0,"thickness",(function(e){return null===e?e:t.yo(e)})),t.rq(S,0,"enabled",t.Zq),S);t.U(e,w),t.g=e.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.oha=function(t){this.ca.labels().I(4294967295),this.target.Kn(t)},t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){t.Iq(this,w,e),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.F=function(){var e={};return t.Tq(this,w,e,"Sunburst level"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.R=function(){t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,e.u.R.call(this)};var x=e.prototype;x.normal=x.Qa,x.hovered=x.lb,x.selected=x.selected,t.H(i,t.bD),t.Gq(i,["fill","stroke","hatchFill","labels"],"normal"),i.prototype.sa=40960|t.bD.prototype.sa;var C=function(){var e={};return t.sq(e,[[0,"sort",function(e){return t.D(e)?e:t.Mk(e)}],[0,"calculationMode",t.Cq],[0,"radius",function(e){return t.yo(e,"100%")}],[0,"innerRadius",function(e){return t.D(e)?e:t.yo(e)}],t.Z.zz]),e}();t.U(i,C);var D={IJ:"sum",Py:"nodesCount",oI:"leavesCount",Rz:"branchesCount",dG:"childSum",WD:"leavesSum",hf:"nodes",lv:"attendingRoots",display:"display",Ef:"thickness",LB:"statsByRoot"};t.g=i.prototype,t.g.Ma=function(){return"sunburst"},t.g.Vga=function(){if(!this.md){var e=this.O();(e=e?e.Ja():null)&&this.dg()?(e=e.Tl(),t.DE||(t.DE=t.Me("textarea"),t.DE.setAttribute("readonly","readonly"),t.uf(t.DE,{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",left:0,top:0,width:"1px"}),window.document.body.appendChild(t.DE),t.Ld(t.DE,["focus","focusin","select"],(function(t){t.preventDefault()}))),this.Ag=new t.SC(t.DE),this.Ag.K=!0,this.Ag.P=!0,this.Ag.G=!0,this.Ag.aa=!0,this.Ag.Al("drill_up",8),this.Ag.Al("drill_up",27),this.Ag.wa("shortcut",(function(e){t.DE.ya&&t.DE.ya!=this||"drill_up"==e.identifier&&this.OF(this.D[0].getParent())}),!1,this),this.yo=function(e){if(this.O()&&this.O().Ja()){var i=t.Zj(this.O().Ja()),n=this.ob();if(n&&e.clientX>=n.left+i.x&&e.clientX<=n.left+i.x+n.width&&e.clientY>=n.top+i.y&&e.clientY<=n.top+i.y+n.height){var s=t.Fe(t.ye(t.DE).b),a=s.scrollLeft,o=s.scrollTop;if(t.DE.select(),t.DE.ya=this,t.gd){var r=s.scrollLeft,l=s.scrollTop;(0,window.setTimeout)((function(){s.scrollLeft==r&&s.scrollTop==l&&t.ll.scrollTo(a,o)}),0)}else t.ll.scrollTo(a,o)}}},t.Ld(e,"mouseup",this.yo,!1,this)):(0,window.setTimeout)(this.Dk,100)}},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget).index;if(!t.p(i)&&t.mx(this.state,t.vo)){var n=t.sx(this.state,t.vo);n.length&&(i=n[0])}return i=t.N(i),(0,window.isNaN)(i)||(e.pointIndex=i),e},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}return"pointIndex"in e?i=e.pointIndex:"labelIndex"in e&&(i=e.labelIndex),i=t.N(i),e.pointIndex=i,{type:n,actualTarget:e.target,series:this,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo,!0)},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.Gu=function(){this.state.Lh(t.wo,!0)},t.g.ie=function(e){t.p(e)?this.state.Vh(t.wo,e):this.state.Vh(t.wo,!0)},t.g.pk=function(t){h(this,t),this.ke(t)},t.g.IE=function(e){e&&(this.D.length=0,t.A(e)?Array.prototype.push.apply(this.D,e):this.D.push(e),this.B(33300,1))},t.g.ay=function(){if(this.St(),this.D.length&&(this.D.length!=this.i.length||-1==(0,t.za)(this.i,this.D[0]))){var e=v(this,this.D[0].getParent(),!0);this.IE(e)}},t.g.Eq=function(e){if("drill-down"==this.gd().g("selectionMode")){if(e.button==t.Ri){var n,s=t.so(e.domTarget);if(t.J(e.target,t.Pu)){var a=e.target.Zi();a.aj&&a.aj()&&(n=a)}else n=s&&s.X,s=t.ea(s.index)?s.index:e.pointIndex;n&&!n.md&&n.enabled()&&t.D(n.Tg)?((n=this.$()).select(s),n=n.f,a=(s=-1!=(0,t.za)(this.i,n))&&1<this.i.length&&1==this.D.length,-1!=(0,t.za)(this.D,n)&&!s||a?this.OF(n.getParent()):n.j("isLeaf")?i.u.Eq.call(this,e):this.OF(n)):i.u.Eq.call(this,e)}}else i.u.Eq.call(this,e)},t.g.OF=function(e,i){if(i=i||{target:this},e){var n=e.j("depth")<this.D[0].j("depth");n=v(this,e,n)}else n=this.i;var s=t.cD(this,e);s={type:"drillchange",path:s,current:s[s.length-1]},this.Md(),this.ie(),this.hm&&(this.dispatchEvent(this.bl("selected",i,this.hm,!0)),this.hm=null),this.dispatchEvent(s)&&this.IE(n)},t.g.uA=function(){return this.St(),this.i?t.cD(this,this.D[0]):null},t.g.Rk=function(){return this.Ic()},t.g.Uu=function(){return!0},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)};var T={};t.g=i.prototype,t.g.sc=function(e,i,n,s,a,o,r){var l=!!(i&t.vo),h=!!(i&t.wo);return o=h?this.Ea:l?this.za:this.ca,a=e.split("."),o=(0,t.Gg)(a,(function(t,e){return t[e]()}),o),r?e=o:(r=n.get(h?"selected":l?"hovered":"normal"),r=t.p(r)?(0,t.Gg)(a,(function(t,e){return t?t[e]:t}),r):void 0,e=t.Zo(r,n.get(t.hm(i,e)),o)),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){var e,n=this.$().f,s=n.j("pathFromRoot"),a=1<s.length?s[s.length-2]:null,o=n.j("depth");if(1<this.i.length)0>(n=(0,t.za)(this.i,n))&&(n=(0,t.za)(this.i,s[0]));else{var r=this.i[0];r==n?n=0:(n=r.Sl(),n=(0,t.za)(n,s[1])+1)}return s=this.ve().nc(n),e=a?a.j("hatchFill"):s,(a?1<this.i.length?a.j("hatchFill"):1==o?s:e:s)||i.b},t.g.Yi=function(e){var n,s=this.$(),a=s.f,o=a.j("index"),r=this.ve(),l=a.j("depth");e||(n=a.get("hatchFill"));var h,c,u,d=1<(e=a.j("pathFromRoot")).length?e[e.length-2]:null,p=b(this,a);if(1<this.i.length){var g=(0,t.za)(this.i,a);0>g&&(g=(0,t.za)(this.i,e[0]))}else(g=this.i[0])==a?g=0:(g=g.Sl(),g=(0,t.za)(g,e[1])+1);return r=r.nc(g),h=p!=a?p.j("hatchFill"):r,c=d?d.j("hatchFill"):r,u=d?1<this.i.length?d.j("hatchFill"):1==l?r:c:r,{index:s.ma(),level:a.j("depth"),isLeaf:0==a.bc(),parent:d,point:this.ce(o),path:e,mainColor:h,autoColor:r,parentColor:c,sourceHatchFill:n||u||i.b,iterator:s,series:this,chart:this}},t.g.Ge=function(e,i){var n,s=this.$(),a=s.f,o=a.j("index"),r=this.cc(),l=a.j("depth");i||(n=a.get("fill"));var h,c,u,d=a.j("pathFromRoot"),p=1<d.length?d[d.length-2]:null,g=b(this,a);if(1<this.i.length){var f=(0,t.za)(this.i,a);0>f&&(f=(0,t.za)(this.i,d[0]))}else(f=this.i[0])==a?f=0:(f=f.Sl(),f=(0,t.za)(f,d[1])+1);return f=r.nc(f),h=g!=a?g.j("fill"):e||f,c=p?p.j("fill"):e||f,u=p?1<this.i.length?p.j("fill"):1==l?f:c:f,{index:s.ma(),level:a.j("depth"),isLeaf:0==a.bc(),parent:p,point:this.ce(o),path:d,mainColor:h,autoColor:f,parentColor:c,sourceColor:e||n||u||r.nc(0),iterator:s,series:this,chart:this}},t.g.xca=function(){return this.aa||(this.aa=new t.Dx,this.aa.wa("statechange",(function(){this.B(16,1)}),void 0,this)),this.aa},t.g.Tp=function(e){return this.f||(this.f=new t.cC(this),t.K(this.f,this.Fda,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.Fda=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=8196,n|=1),this.B(i,n)},t.g.kK=function(){var e=this.f.gi.rb();t.nb(e,this.Ba)||c(this,e)},t.g.kL=function(){this.B(4,1)},t.g.Kn=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=20,n|=9),this.B(i,n)},t.g.ek=function(e){this.Za||(this.Za=[]);var i=e.ma();return this.Za[i]||(this.Za[i]=t.mn(this.ca.labels().yl(e))),this.Za[i]},t.g.level=function(i,n){if(t.p(i)){if(i=t.N(i),(0,window.isNaN)(i))return this;if(0<=i)var s=this.ec;else s=this.Sb,i=Math.abs(i)-1;var a=s[i];return a||((a=s[i]=new e(this)).ga(!0,t.nm("sunburst.level")),t.K(a,this.H3,this)),t.p(n)?(a.N(n),this):a}return this},t.g.vw=function(i){return this.$a||(this.$a=new e(this),this.$a.ga(!0,t.nm("sunburst.level")),t.K(this.$a,this.H3,this)),t.p(i)?(this.$a.N(i),this):this.$a},t.g.H3=function(){this.B(32788,1)},t.g.Mm=function(e){this.bg=Math.min(e.width,e.height),this.nf=e.clone(),this.Ap=this.b=Math.min(this.bg/2,Math.max(t.L(this.g("radius"),this.bg),0)),this.Dc=this.nf.left+this.nf.width/2,this.uc=this.nf.top+this.nf.height/2,e=this.g("innerRadius"),this.G=Math.max(Math.floor(t.D(e)?e(this.b):t.L(e,this.b)),0),e=this.G/Math.pow(2,.5)*2,this.na=t.kn(this.Dc-e/2,this.uc-e/2,e,e),this.lf=new t.I(this.Dc-this.b,this.uc-this.b,2*this.b,2*this.b),this.ud=this.b-this.G,this.dn=0,this.bj=this.ud;var i=(e=this.vw()).g("enabled");i=null==i||i,e=e.g("thickness"),e=t.L(e,this.ud);for(var n,s,a=-1,o=this.ea,r=this.Hd+o,l=o;l<=r;l++){s=(n=this.P[l]).oI,n.Ef=Math.min(t.L(n.dla,this.ud),this.ud);var h=0==n.Rz&&!i;n.display&&!h&&(0<s&&(a=l),(0,window.isNaN)(n.Ef)&&this.dn++),n.display&&!(0,window.isNaN)(n.Ef)&&(this.bj-=n.Ef)}if(this.Od=Math.floor(this.bj/this.dn),0!=i&&!(0,window.isNaN)(e)){for(s=i=0,l=o;l<=a;l++)(n=this.P[l]).display&&(l==a?i+=Math.max(e,n.Rz&&l!=r?(0,window.isNaN)(n.Ef)?this.Od:n.Ef:0):(0,window.isNaN)(n.Ef)?(s++,i+=this.Od):i+=n.Ef);s&&(this.Od-=(i-this.ud)/s)}(e=this.ca.labels()).ka(),e.Dc(this.Dc),e.uc(this.uc),e.Ty(this.b),e.UE(this.Vl()),e.fz(360),e.ja(this.lf),e.da(!1),this.lb().labels().ja(this.lf)},t.g.St=function(){if(this.J(4096)){a(this),this.fh=0,this.ba=[],this.Uc=[],this.D.length=0;var e=this.data();e&&(this.P={},this.Ec(),this.i=e.Sl(),this.D=t.Ja(this.i,0),this.fb=p(this,e,0),this.D.length?this.Hd=(this.ea=this.D[0].j("depth"))||1==this.D.length?this.D[0].j("nodeMaxDepth"):this.fb:this.Hd=this.ea=0,u(this),this.Ka=this.sb[0],g(this,e),d(this),this.La("treeMaxDepth",this.fb),e=m(this,this.P),this.La("levels",e),this.La("currentMaxDepth",this.Hd),this.La("currentRootDepth",this.ea)),this.B(20),this.I(36864)}},t.g.pb=function(){if(this.St(),this.J(32768)){if(this.D.length){this.Hd=(this.ea=this.D[0].j("depth"))||1==this.D.length?this.D[0].j("nodeMaxDepth"):this.fb,this.P={},u(this),this.Ka=t.ya(this.sb,(function(t){return t>=this.ea}),this),(0,t.Pe)(this.D,(function(t){g(this,t)}),this),d(this);var e=m(this,this.P);this.La("levels",e),this.La("currentMaxDepth",this.Hd),this.La("currentRootDepth",this.ea)}this.I(32768)}},t.g.Qh=function(e){if(!this.pf()){if(this.pb(),function(e){e.ue||(e.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.ue.zIndex(30),e.ue.parent(e.Na),e.Dk(),e.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.o.zIndex(31),e.o.parent(e.Na),e.o.Dd(!0),e.yg=e.Na.Bd(),e.yg.zIndex(32),e.yg.Dd(!0))}(this),this.J(8192)&&(this.f.ak&&(this.f.eG(),this.f.ak.parent(this.Na),this.f.ak.zIndex(25),this.f.ak&&(t.J(this.f.gi,t.ig)?this.f.ak.Ja().wa("renderfinish",this.kK,!1,this):t.J(this.f.gi,t.Y)&&this.f.ak.wa("chartdraw",this.kL,!1,this))),this.I(8192)),this.J(4)&&(this.Mm(e),this.ue.clip(this.lf),this.o.clip(this.lf),this.yg.clip(this.lf),this.B(16)),this.J(16)){this.ue.clear(),this.o.clear(),function(t){if(t.aa){var e=t.aa.Jj;if(e&&t.aa.mL)for(var i in e)i in t.me||((e=t.yg.path()).stroke(null),t.me[i]=e),t.me[i].clear()}}(this),(e=this.ca.labels()).clear(),this.ca.labels().O()||(e.O(this.Na),e.zIndex(32)),a(this);var i,o=this.Vl(),r=this.G;if(this.ca.labels().ka(),i="desc"==(e=this.g("sort"))?n:"asc"==e?s:t.D(e)?e:null,this.qc=i?(0,t.pa)(i,this):null,i=this.D.slice(),this.qc&&t.Pa(i,this.qc),(0,t.Pe)(i,(function(e){o=t.ab(f(this,e,window.NaN,o,360,r))}),this),this.ca.labels().da(!1),this.ca.labels().W(),this.G){i=this.f.g("fill"),e=this.f.g("stroke"),this.Ha||(this.Ha=t.nk());var l=this.G-t.$b(e)/2;this.Ha.parent(this.Na).zIndex(20).stroke(e).fill(i).Eb(l)}else this.Ha&&this.Ha.parent(null);this.I(16)}this.J(4)&&(e=this.f.gi,i=this.f.ak,t.J(e,t.ig)?(e=e.rb(),c(this,e),i.clip(null)):t.J(e,t.Y)&&(e.ja(this.na),e.da(!1),e.W(),i.oc(1,0,0,1,0,0),i.clip(t.nk(this.Dc,this.uc,this.G+2))),this.Ha&&this.G&&this.Ha.To(this.Dc).Uo(this.uc))}},t.g.ke=function(e){var i=(e=t.em(e))==t.vo,n=e==t.wo,s=this.$(),a=s.j("sweep"),o=s.j("innerRadius"),r=s.j("outerRadius");if(e=(r+o)/2*Math.sin(t.bb(a/2)),(180>=a?5<=e:10<=r)&&20<=r-o){var l=s.f;e=this.ca.labels();var h=n?this.Ea.labels():i?this.za.labels():null,c=l.get("normal");c=t.p(c)?c.label:void 0,c=t.Zo(c,l.get("label"));var u=n?l.get("selected"):i?l.get("hovered"):void 0;u=t.p(u)?u.label:void 0,u=n?t.Zo(u,l.get("selectLabel")):i?t.Zo(u,l.get("hoverLabel")):null;var d=s.ma();(s=e.be(d))||(s=e.add(null,null,d));var p=l.j("depth");if(d=this.ec[p],p=this.Sb[this.fb-p],d)var g=d.Qa().labels(),f=n?d.selected().labels():i?d.lb().labels():null;if(p)var b=p.Qa().labels(),v=n?p.selected().labels():i?p.lb().labels():null;if(l.j("isLeaf")){var m=this.vw(),y=m.Qa().labels();m=n?m.selected().labels():i?m.lb().labels():null}s.Hi(),t.bv(s,t.no([u,0,m,t.jo,v,t.jo,f,t.jo,h,t.jo,c,0,y,t.jo,b,t.jo,g,t.jo,e,t.jo,s,t.jo,m,t.ko,f,t.ko,v,t.ko,h,t.ko,y,t.ko,b,t.ko,g,t.ko,e,t.ko])),(i=s.ic("enabled"))&&(n=y=null,g=this.Bh(),f=this.Ic(!0),s.Hf(f),s.height(n).width(y),m=s.ic("position"),f=(new t.Hu).N(s.ic("padding")),r-=o,v=g.value.angle,b=g.value.radius,"circular"==m||"radial"==m&&360==a?360!=a||o?(o=s,y=this.$(),v=t.p(b)?b:o.jc().value.radius,m=y.j("sweep"),n=y.j("start"),n=360==m?-90:n,h=(new t.Hu).N(o.ic("padding")),c=2*Math.PI*v/360,y=n,n+=m,u=Math.abs(n-y),l=this.g("stroke"),c=(u-(h.Ng(u*c)-t.$b(l))/c)/2,t.qd(h),y+=c,n-=c,h=m,c=t.ab(y+h/2),(0,window.isNaN)(h)&&(h=m),360==h&&(c=(-90+h)/2),0<c&&180>c&&(m=y,y=n,n=m,"top"==(m=o.ic("vAlign"))?o.ta("vAlign","bottom"):"bottom"==m&&o.ta("vAlign","top")),h=t.bb(y),m=t.hn(h,v,this.Dc),h=t.jn(h,v,this.uc),(c=o.Rh().path())?c.clear():(c=t.qk(),t.rd(this,c)),n!=y&&c.moveTo(m,h).MR(v,v,y,n-y),o.Rh().path(c),o=c,s.Rh().path(o),a=Math.PI*b*a/180,y=f.Ng(a),n=f.Yh(r)-15):((o=(a=s.Rh()).path())&&a.path(null),y=n=2*r,y=f.Ng(y),n=f.Yh(n)):"radial"==m&&(o=s,h=(u=this.$()).f,n=t.p(v)?v:o.jc().value.angle,c=u.j("start"),m=u.j("sweep"),y=u.j("innerRadius"),v=u.j("outerRadius"),(h=h.getParent())&&360==h.j("sweep")?h=n:(h=t.ab(c+m/2),360==m&&(h=(-90+m)/2),(0,window.isNaN)(h)&&(h=n)),m=v-y,c=o.ic("padding"),v-=t.L(c.left,m),y+=t.L(c.right,m),90<h&&270>h&&(m=y,y=v,v=m,"start"==(m=o.ic("hAlign"))||"left"==m?o.ta("hAlign","end"):("end"==m||"right"==m)&&o.ta("hAlign","start")),h=t.bb(n),n=t.hn(h,y,this.Dc),y=t.jn(h,y,this.uc),m=t.hn(h,v,this.Dc),v=t.jn(h,v,this.uc),(o=o.Rh().path())?o.clear():(o=t.qk(),t.rd(this,o)),o.moveTo(n,y).lineTo(m,v),s.Rh().path(o),a=Math.PI*b*a/180,n=f.Yh(a),y=f.Ng(r)),t.qd(f),s.width(y).height(n).jc(g)),i?s.W():e.clear(s.ma())}},t.g.Ic=function(e){var i=this.$(),n=i.f;return this.oe&&!e||(this.oe=new t.Fw),this.oe.lg(i).Li([this.ce(i.ma()),this]),e=this.g("calculationMode"),i=!!n.j("isLeaf"),n={value:{value:t.N("parent-independent"==e?i?n.get("value"):n.j("sunburst_visibleLeavesSum"):n.get("value")),type:"number"},name:{value:n.get("name"),type:"string"},index:{value:n.j("index"),type:"number"},chart:{value:this,type:""},item:{value:n,type:""},depth:{value:n.j("depth"),type:"number"}},t.ov(this.oe,n)},t.g.Bh=function(){var e=this.$(),i=e.j("start"),n=e.j("sweep"),s=e.j("innerRadius");return e=e.j("outerRadius"),{value:{angle:i=t.ab(i+n/2),radius:n=360!=n||s?s+(e-s)/2:0,x:t.hn(t.bb(i),n,this.Dc),y:t.jn(t.bb(i),n,this.uc)}}},t.g.Vl=function(){return this.g("startAngle")+-90},t.g.yj=function(){return this.St(),!this.i.length},t.g.ZT=function(){return[this.Dc,this.uc]},t.g.L1=function(){return this.na},t.g.jx=function(e,i){var n=t.so(i.event.domTarget);if(t.J(i.target,t.Pu)){var s=this.$();s.select(n),n=s.f}else n=n.node;return s={},!n||!n.bc()||-1!=(0,t.za)(this.D,n)&&1==this.D.length||(s["drill-down-to"]={index:7,text:"Drill down",eventType:"anychart.drillTo",action:(0,t.pa)(this.OF,this,n)}),(0!=this.ea||-1!=(0,t.za)(this.i,this.D[0])&&1<this.i.length&&1==this.D.length)&&(s["drill-down-up"]={index:7,text:"Drill up",eventType:"anychart.drillUp",action:(0,t.pa)(this.OF,this,this.D[0].getParent())}),t.Jc(s)||(s["drill-down-separator"]={index:7.1}),t.Sc(s,e),s},t.g.F=function(){var e=i.u.F.call(this);if(t.Tq(this,C,e,"Sunburst"),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),e.center=this.Tp().F(),this.ec.length||this.Sb.length){var n=[];(0,t.Pe)(this.ec,(function(t,e){n.push({index:e,level:t.F()})})),(0,t.Pe)(this.Sb,(function(t,e){n.push({index:-(e+1),level:t.F()})})),e.levels=n}return this.$a&&(e.leaves=this.vw().F()),{chart:e}},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.f,this.Fa,this.fd,this.ec,this.Sb,this.$a,this.Ag),this.Ag=this.$a=this.Sb=this.ec=this.fd=this.Fa=this.Ea=this.za=this.ca=null,i.u.R.call(this)},t.g.U=function(e,n){i.u.U.call(this,e,n),t.Iq(this,C,e),this.cc(e.palette),this.ve(e.hatchFillPalette),this.Tp().ga(!!n,e.center),t.A(e.levels)&&(0,t.Pe)(e.levels,(function(t){this.level(t.index,t.level)}),this),this.vw().ga(!!n,e.leaves),"drillTo"in e&&this.jr(e.drillTo)};var k=i.prototype;k.getType=k.Ma,k.data=k.data,k.level=k.level,k.leaves=k.vw,k.center=k.Tp,k.normal=k.Qa,k.hovered=k.lb,k.selected=k.selected,k.drillTo=k.jr,k.drillUp=k.ay,k.getDrilldownPath=k.uA,k.palette=k.cc,k.hatchFillPalette=k.ve,k.toCsv=k.Zj,k.statefulColoring=k.xca,t.Tp.sunburst=y,t.E("anychart.sunburst",y)}.call(this,$)),_.annotations||(_.annotations=1,function(t){var e=function(t,e,i,n,s){var a,o,r=s.left+s.width,l=s.top+s.height,h=(n-e)/(i-t),c=!1;if((0,window.isNaN)(h))if(t<s.left||t>r||e<s.top||e>l)c=!0;else var u=a=t,d=o=e;else if(h)if((0,window.isFinite)(h)){var p=e-t*h,g=h*s.left+p,f=h*r+p;g<s.top&&f<s.top||g>l&&f>l?c=!0:(a=(s.top-p)/h,h=(l-p)/h,g<s.top?(u=a,d=s.top):g>l?(u=h,d=l):(u=s.left,d=g),f<s.top?o=s.top:f>l?(a=h,o=l):(a=r,o=f))}else t<s.left||t>r?c=!0:(u=a=t,d=s.top,o=l);else e<s.top||e>l?c=!0:(u=s.left,a=r,d=o=e);return c?null:((t>i||t==i&&e>n)&&(t=u,u=a,a=t,t=d,d=o,o=t),[u,d,a,o])},i=function(t,i,n,s,a){if(a=e(t,i,n,s,a)){if(n-=t){s=a[0]-t;var o=a[2]-t}else{if(!(n=s-i))return a;s=a[1]-i,o=a[3]-i}0>o*n?a=null:0>n*s&&(a[0]=t,a[1]=i)}return a},n=function(t,i,n,s,a){if(a=e(t,i,n,s,a)){var o;if(o=n-t)var r=a[0]-t,l=a[2]-t,h=a[0]-n,c=a[2]-n;else{if(!(o=s-i))return a;r=a[1]-i,l=a[3]-i,h=a[1]-s,c=a[3]-s}0>l*o||0<h*o?a=null:(0>r*o&&(a[0]=t,a[1]=i),0<c*o&&(a[2]=n,a[3]=s))}return a},s=function(e){function i(){return new t.dy(!0,!0,!0)}t.Y.call(this),this.Ga("chart.defaultAnnotationSettings.base"),this.sb=e,this.Aa=this.P=null,this.state=t.gm,this.Ba=0,this.ba=1&this.Ee?"xAnchor":null,this.ea=2&this.Ee?"valueAnchor":null,this.Za=7<=this.Ee,this.Oe=!1,this.coords={},this.coords.xAnchor=window.NaN,this.coords.valueAnchor=window.NaN,this.coords.secondXAnchor=window.NaN,this.coords.secondValueAnchor=window.NaN,this.coords.thirdXAnchor=window.NaN,this.coords.thirdValueAnchor=window.NaN,this.na=null,this.fa=new t.I(0,0,0,0),this.ec=!0,t.T(this.ua,Q),e={},t.T(e,this.ng()),this.ca=new t.my(this,e,t.gm),this.ca.ta("markersFactoryConstructor",(function(){return new t.dy(!0,!0)})),this.ca.ta("markersAfterInitCallback",t.ty),e={},t.T(e,this.ng()),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("markersFactoryConstructor",i),e={},t.T(e,this.ng()),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("markersFactoryConstructor",i)},a=function(t){t.pb(),t.ba&&(t.Pa[t.ba]=t.Ra().Mc((t.D-t.fa.left)/t.fa.width)),t.ea&&(t.Pa[t.ea]=t.bb().Mc((t.fa.Va()-t.G)/t.fa.height)),t.D=t.G=window.NaN,t.Ka=!1,t.B(64)},o=function(t,e,i,n,s){e&&(t.coords[e]=t.na[e]+n,t.Pa[e]=t.Ra().Mc((t.coords[e]-t.fa.left)/t.fa.width)),i&&(t.coords[i]=t.na[i]+s,t.Pa[i]=t.bb().Mc((t.fa.Va()-t.coords[i])/t.fa.height))},r=function(t){return t.pb(),!t.ba&&!t.ea},l=function(t,e){return t.fa.left+e*t.fa.width},h=function(t,e){return t.fa.Va()-e*t.fa.height},c=function(e,i){if(!e)return d;var n=i+"|"+e+"|true",s=yt[n];if(!s){switch(i){case 2:s=t.Zl;break;case 3:s=t.$l;break;default:s=t.am}yt[n]=s=t.qa(u,e,s,3==i,!0)}return s},u=function(e,i,n,s,a,o,r){if(o=t.em(o),s&&o!=t.gm){var l=a.sc(e,o,i);if(n&&!0===l&&(l=i(a.Eh())),t.p(l)){if(!t.D(l))return l;if(n)return n=a.Yi(),i(l.call(n,n))}}return e=a.sc(e,0,i),n&&!0===e&&(e=i(a.Eh())),t.D(e)&&(n=n?a.Yi():a.Ge(void 0,r),e=i(e.call(n,n))),l&&(n=a.Ge(e,r),e=i(l.call(n,n))),e},d=function(){return"none"},p=function(e){t.V.call(this),this.pa=e,this.i=this.b=null,this.o=!1,this.f=[],this.gv(!1)},g=function(e,i){if(e.o!=i){e.o=i,e.pa.ka();for(var n=0;n<e.f.length;n++){var s=e.f[n],a=i;s.aa!=a&&(s.aa=a,!a&&s.f&&(s.f.gc("mouseout",s.TU,!1,s),s.f.gc("mousedown",s.RU,!1,s),t.Yd(t.ll,"mouseup",s.UU,!1,s),t.Yd(t.ll,"mousemove",s.SU,!1,s)),s.B(128,1))}e.pa.da(!0)}},f=function(e,i){if(t.z(i))var n=i,s=void 0;else t.C(i)&&(n=i.type,s=i);return n=t.zk(X,n,"line"),(n=new J[n](e)).Ga("chart.defaultAnnotationSettings."+t.pm(n.Ma())),n.AB(),n.N(s),n},b=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},v=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},m=function(e){s.call(this,e),this.f=this.b=null,this.K=[],this.$a=c("stroke",2),this.qc=c("trend",2),this.fb=!1,t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),this.ca.ta("labelsAfterInitCallback",t.sy)},y=function(t,e){var i=t.nC().dg();return i=1-(e-i.top)/i.height,t.bb().Mc(i)},S=function(t,e){var i=t.nC().dg();return i=(e-i.left)/i.width,t.Ra().Mc(i)},w=function(t){m.call(this,t)},x=function(t){m.call(this,t),this.Ha=[],this.o=null,this.Sb=c("grid",2)},C=function(t){m.call(this,t)},D=function(t){m.call(this,t)},T=function(e){s.call(this,e),this.b=!1,this.Ca=null,this.K=c("stroke",2),this.f=c("fill",1),this.o=c("hatchFill",3),t.tq(this.ua,"channelWidth",320,1),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},k=function(t){var e=t.bb().Mc(.5),i=t.g("channelWidth");return(.5-t.bb().transform(e+i))*t.fa.height},$=function(t,e){var i=t.bb().Mc(.5),n=.5+e/t.fa.height;return i-(n=t.bb().Mc(n))},O=function(t){for(var e=0;e<t.Ca.length;e++)t.Ca[e].clear()},P=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,nt)},L=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},G=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},F=function(e){s.call(this,e),this.Ga("defaultFontSettings"),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,ut),t.Eq(this.ua,256,16,1,1),delete this.ua.fontFamily,delete this.ua.fontStyle,delete this.ua.fontVariant,delete this.ua.fontWeight,delete this.ua.fontSize,delete this.ua.fontColor,delete this.ua.fontOpacity},I=function(t){return"left-top"==t||"left-center"==t||"left-bottom"==t},E=function(t){return"right-top"==t||"right-center"==t||"right-bottom"==t},A=function(t){return"left-top"==t||"center-top"==t||"right-top"==t},U=function(t){return"left-bottom"==t||"center-bottom"==t||"right-bottom"==t},_=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},j=function(e){s.call(this,e),this.ec=!1,this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,ht)},M=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},N=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},B=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},R=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},H=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et)},z=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},V=function(e,i){t.Y.call(this),this.ib=e,e.f&&e.f.push(this),this.Ba=i,this.Sf=[],this.f=this.b=null,this.aa=!1,this.D=this.i=window.NaN,this.o=this.mf=null},q=function(e,i){var n=t.Zj(e.O().Ja());e.i=i.clientX-n.x,e.D=i.clientY-n.y},W=function(e,i,n){var s=!n||i!=e.o;n?(e.Sf.push(i),e.o=null,e.b&&i.O(e.b)):e.o=i;var a=i.P!=e;i.Ka=!n,i.P=e,a&&i.B(64),i.kb(e),t.K(i,e.VZ,e),s&&e.B(64,1)},K=function(e,i){if(t.p(i)){if(t.sd(e.Sf),e.Sf.length=0,t.A(i))for(var n=0;n<i.length;n++)W(e,f(e.ib,i[n]),!0);return e}return(0,t.Wa)(e.Sf,(function(t){return t.F()}))},Y=function(e){this.ib=e,this.b=null,this.i=window.NaN,t.ag.call(this,e.b.ia()),this.wa("start",this.qga,!1,this),this.wa("end",this.oga,!1,this)},X={pra:"ray",tt:"line",gpa:"infinite-line",Ssa:"vertical-line",epa:"horizontal-line",q9:"rectangle",j8:"ellipse",Csa:"triangle",Bsa:"trend-channel",Noa:"finite-trend-channel",fma:"andrews-pitchfork",Koa:"fibonacci-fan",Joa:"fibonacci-arc",Loa:"fibonacci-retracement",Moa:"fibonacci-timezones",av:"marker",opa:"label",fpa:"horizontal-range",Tsa:"vertical-range"},J={},Z={};t.rq(Z,0,"color",t.Sq),t.rq(Z,0,"allowEdit",t.Dq),t.rq(Z,0,"hoverGap",(function(e){return t.P(e,window.NaN,!0)}));var Q=[["color",16,1],["allowEdit",1024,1],["hoverGap",256,1]],tt={};t.rq(tt,0,"xAnchor",t.Cq);var et=[["xAnchor",192,1]],it={};t.rq(it,0,"valueAnchor",t.Cq);var nt=[["valueAnchor",192,1]],st={};t.rq(st,0,"secondXAnchor",t.Cq),t.rq(st,0,"secondValueAnchor",t.Cq);var at=[["secondXAnchor",192,1],["secondValueAnchor",192,1]],ot={};t.rq(ot,0,"thirdXAnchor",t.Cq),t.rq(ot,0,"thirdValueAnchor",t.Cq);var rt=[["thirdXAnchor",192,1],["thirdValueAnchor",192,1]],lt={};t.rq(lt,0,"markerType",t.Ok),t.rq(lt,0,"anchor",t.Dk),t.rq(lt,0,"offsetX",t.Bq),t.rq(lt,0,"offsetY",t.Bq);var ht=[["markerType",256,1],["anchor",256,1],["offsetX",256,1],["offsetY",256,1]],ct=t.vq();delete ct.fontFamily,delete ct.fontStyle,delete ct.fontVariant,delete ct.fontWeight,delete ct.fontSize,delete ct.fontColor,delete ct.fontOpacity,t.sq(ct,[[0,"text",t.zq],[0,"anchor",t.Dk],[0,"offsetX",t.Bq],[0,"offsetY",t.Bq],[0,"width",t.xq],[0,"height",t.xq]]);var ut=[["text",256,1],["anchor",256,1],["offsetX",256,1],["offsetY",256,1],["width",256,1],["height",256,1]],dt=[["stroke",272,1]],pt=[["grid",16,1]],gt=[["size",256,1]],ft=[["fontFamily",256,1],["fontStyle",256,1],["fontVariant",256,1],["fontWeight",256,1],["fontSize",256,1],["fontColor",16,1],["fontOpacity",16,1],["fontDecoration",256,1]],bt=t.Ga([["fill",16,1],["hatchFill",16,1]],dt),vt=t.Ga(dt,[["trend",16,1]]),mt=[["labels",0,0]];t.H(s,t.wu),t.Gq(s,["markers"],"normal"),t.U(s,Z),t.g=s.prototype,t.g.ng=function(){return[["markers",0,0]]},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.sc=function(t,e){return(0==e?this.ca:1==e?this.za:this.Ea).g(t)},t.g.sa=2e3|t.wu.prototype.sa,t.g.ra=t.wu.prototype.ra,t.g.Ee=0;var yt={};t.g=s.prototype,t.g.Fc=null,t.g.eb=null,t.g.Ma=function(){return this.type},t.g.xc=function(){return this.sb.xc()},t.g.nC=function(){return this.P&&this.P.Ba},t.g.bb=function(e){if(t.p(e)){var i=t.jt(this.Fc,e,null,15,null,this.YO,this);return(i||null===e)&&(e=this.Fc==i,i||t.kr(this.Fc,this.YO,this),(this.Fc=i)&&i.da(e),e||this.B(64,1)),this}return(this.Fc?this.Fc:this.nC()&&this.nC().bb())||null},t.g.Ra=function(e){if(t.p(e)){var i=e&&t.D(e.Ma)&&e.Ma(),n=(i="stock-scatter-date-time"==i||"stock-ordinal-date-time"==i)?e:t.jt(this.eb,e,null,15,null,this.YO,this);return(n||null===e)&&(e=this.eb==n,n||t.kr(this.eb,this.YO,this),(this.eb=n)&&!i&&n.da(e),e||this.B(64,1)),this}return this.eb||this.xc().Ra()},t.g.UB=function(t,e){this.D=t,this.G=e,this.B(128)},t.g.mJ=function(){this.na=this.coords,this.coords=t.Qc(this.coords)},t.g.KI=function(t,e,i){switch(t){case-1:3&this.Ee&&(o(this,1&this.Ee?"xAnchor":null,2&this.Ee?"valueAnchor":null,e,i),7&this.Ee&&(o(this,"secondXAnchor","secondValueAnchor",e,i),15&this.Ee&&o(this,"thirdXAnchor","thirdValueAnchor",e,i)));break;case 0:o(this,1&this.Ee?"xAnchor":null,2&this.Ee?"valueAnchor":null,e,i);break;case 1:o(this,"secondXAnchor","secondValueAnchor",e,i);break;case 2:o(this,"thirdXAnchor","thirdValueAnchor",e,i)}return this.B(768),this.W(),this},t.g.wt=function(t){this.state=t,this.B(528)},t.g.pb=function(){if(this.J(64)){var t,e,i,n,s,a=this.Ra(),o=this.bb();if(!a||!o)return!1;var r=t=e=i=n=s=window.NaN,c=0,u=0;1&this.Ee&&(r=l(this,a.transform(this.nd("xAnchor"),.5)),(0,window.isNaN)(r)?u|=1:c|=1),2&this.Ee&&(t=h(this,o.transform(this.nd("valueAnchor"),.5)),(0,window.isNaN)(t)?u|=2:c|=2),4&this.Ee&&(e=l(this,a.transform(this.nd("secondXAnchor"),.5)),i=h(this,o.transform(this.nd("secondValueAnchor"),.5)),(0,window.isNaN)(e)||(0,window.isNaN)(i)?u|=4:c|=4),8&this.Ee&&(n=l(this,a.transform(this.nd("thirdXAnchor"),.5)),s=h(this,o.transform(this.nd("thirdValueAnchor"),.5)),(0,window.isNaN)(n)||(0,window.isNaN)(s)?u|=8:c|=8),a=!1;var d=o=null;3&u?(o=1&this.Ee?"xAnchor":null,d=2&this.Ee?"valueAnchor":null,a=3<this.Ee,this.aa=3&this.Ee):4&u?(o="secondXAnchor",d="secondValueAnchor",a=7<this.Ee,this.aa=4):8&u?(o="thirdXAnchor",d="thirdValueAnchor",this.aa=8):this.aa=0,this.coords.xAnchor=r,this.coords.valueAnchor=t,this.coords.secondXAnchor=e,this.coords.secondValueAnchor=i,this.coords.thirdXAnchor=n,this.coords.thirdValueAnchor=s,this.Ba=c,this.ba=o,this.ea=d,this.Za=a,this.Oe=this.Qk(),(0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)||this.B(128),this.B(768),this.I(64)}return this.J(128)&&((0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)?this.i=this.Ba:(this.ba&&(this.coords[this.ba]=this.D),this.ea&&(this.coords[this.ea]=this.G),this.i=this.Ba|this.aa),this.B(768),this.I(128)),this.Oe||!(0,window.isNaN)(this.D)&&!(0,window.isNaN)(this.G)},t.g.Qk=function(){var t=this.fa;if(2==this.Ee){var e=this.coords.valueAnchor;return e>=t.top&&e<=t.Va()}(e=[]).push(this.coords.xAnchor),e.push(this.coords.secondXAnchor),e.push(this.coords.thirdXAnchor);for(var i=!0,n=!0,s=0;s<e.length;s++)(0,window.isNaN)(e[s])||(i=i&&e[s]<t.left,n=n&&e[s]>t.cb());return!i&&!n},t.g.W=function(){if(!this.zc())return this;this.ka(),this.J(4)&&(this.fa=this.ob(),this.B(64),this.I(4)),this.Fg();var t=this.pb();if(this.PO(),this.J(16)&&(this.wg(this.state),this.I(16)),this.J(256)){if(!t)return this.remove(),this.B(2),this.da(!1),this;15==this.Ee&&15==this.i?this.bM(this.coords.xAnchor,this.coords.valueAnchor,this.coords.secondXAnchor,this.coords.secondValueAnchor,this.coords.thirdXAnchor,this.coords.thirdValueAnchor):7<=this.Ee&&7<=this.i?this.cp(this.coords.xAnchor,this.coords.valueAnchor,this.coords.secondXAnchor,this.coords.secondValueAnchor):(3<=this.Ee&&3<=this.i||this.i==this.Ee)&&this.tm(this.coords.xAnchor,this.coords.valueAnchor),this.I(256)}if(this.J(1024)&&(this.Aa.Dd(!this.g("allowEdit")),this.I(1024)),this.J(512)){if(this.ec){t=this.Qa().Db();var e=this.lb().Db().enabled()||this.selected().Db().enabled();t.ka(),!1!==t.enabled()||e?(t.O(this.Aa),t.clear(),t.ja(this.fa),t.zh=5,this.YL(this.state)):(t.clear(),t.O(null)),t.W(),t.da(!1)}this.I(512)}return this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.da(!1),this},t.g.PO=function(){},t.g.zc=function(){var t=s.u.zc.call(this);return!t||this.P&&this.Ra()&&this.bb()||(this.remove(),this.B(2),t=!1),t},t.g.remove=function(){this.Aa&&this.Aa.remove();var t=this.Qa().Db();t.remove(),t.B(2)},t.g.Fg=function(){this.Aa||(this.Aa=t.ok(),this.Aa.cursor("move"),this.Aa.tag=this)},t.g.tm=function(){},t.g.cp=function(t,e){this.tm(t,e)},t.g.bM=function(t,e,i,n){this.cp(t,e,i,n)},t.g.wg=function(){},t.g.Ge=function(t){return{sourceColor:t||this.g("color")||"blue"}},t.g.Yi=function(){return{sourceHatchFill:this.Eh()}},t.g.Eh=function(){return t.Yb("diagonal-brick")},t.g.YO=function(e){t.X(e,2)&&this.B(64,1)},t.g.Mn=function(e){t.X(e,1)&&this.B(512,1)},t.g.qJ=t.ia,t.g.YL=function(e){var i=this.Qa().Db();switch(e=t.em(e)){case t.vo:e=this.lb().Db();break;case t.wo:e=this.selected().Db();break;default:e=null}if(e&&null!==e.enabled()?e.enabled():i.enabled())for(var n=this.SC(),s=0;s<n.length;s++){var a=n[s],o=i.jp(s);o?o.jc(a):o=i.add(a,s),o.Hi(),t.gy(o,e||i),o.td(),o.W(),this.qJ(o,s)}else i.clear()},t.g.SC=function(){var e=[];if(1==this.Ee){var i=this.coords.xAnchor;(0,window.isNaN)(i)||e.push({x:i,y:this.fa.top+this.fa.height/2})}else 2==this.Ee?(i=this.coords.valueAnchor,(0,window.isNaN)(i)||e.push({x:this.fa.left+this.fa.width/2,y:i})):this.Ee&this.i&3&&(e.push({x:this.coords.xAnchor,y:this.coords.valueAnchor}),this.Ee&this.i&4&&(e.push({x:this.coords.secondXAnchor,y:this.coords.secondValueAnchor}),this.Ee&this.i&8&&e.push({x:this.coords.thirdXAnchor,y:this.coords.thirdValueAnchor})));return(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.select=function(){this.P.ib.select(this)},t.g.ie=function(){this.P.ib.ie()},t.g.ph=function(t){return null!=this.Pa[t]},t.g.AB=function(){"label"==t.pm(this.Ma())&&this.ca.Ga("defaultFontSettings"),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.F=function(){var e=s.u.F.call(this);return e.type=this.Ma(),t.Tq(this,Z,e,"Annotation"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.U=function(e,i){s.u.U.call(this,e,i),t.Iq(this,Z,e),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.R=function(){t.qd(this.Aa),this.Aa=null,delete this.sb,this.Fc=this.eb=this.P=null,delete this.Pa,delete this.oa,s.u.R.call(this)};var St=s.prototype;St.getType=St.Ma,St.getChart=St.xc,St.getPlot=St.nC,St.yScale=St.bb,St.xScale=St.Ra,St.select=St.select,St.normal=St.Qa,St.hovered=St.lb,St.selected=St.selected,t.H(p,t.V),t.g=p.prototype,t.g.xc=function(){return this.pa},t.g.Tj=function(e){this.b!=e&&this.i!=e&&(this.Md(),e.wt(t.vo),this.gv()&&e.W()),this.i=e},t.g.Md=function(){this.i&&(this.i!=this.b&&(this.i.wt(t.gm),this.gv()&&this.i.W()),this.i=null)},t.g.select=function(e){if(this.b!=e){if(this.ie(),this.b)return this;this.pa.dispatchEvent({type:"annotationSelect",annotation:e})&&(this.b=e,e.wt(t.wo),this.gv()&&r(e)?e.W():g(this,!0))}return this},t.g.ie=function(){return this.b&&this.pa.dispatchEvent({type:"annotationUnselect",annotation:this.b})&&(this.b.wt(this.i==this.b?t.vo:t.gm),this.gv()&&this.b.W(),this.b=null,g(this,!1)),this},t.g.iaa=function(){return this.b},t.g.gv=function(e){return t.p(e)?(this.D=!!e,this):this.D},t.g.jaa=function(){for(var t=0;t<this.f.length;t++)this.f[t].WZ();return this},t.g.kaa=function(e){var i=e.P;return this.b==e&&(this.b=null,g(this,!1)),i?i.cR(e):t.qd(e),this},t.g.Gd=function(e){return this.gv()?(this.bR(),e=f(this,e),this.select(e),this.b||(t.qd(e),e=null),e):null},t.g.bR=function(){if(this.pa.ka(),this.b&&!r(this.b)){var e=this.b.P;e?e.cR(this.b):t.qd(this.b),this.b=null}g(this,!1),this.pa.da(!0)},t.g.R=function(){t.sd(this.f),this.f=null,p.u.R.call(this)};var wt=p.prototype;wt.startDrawing=wt.Gd,wt.cancelDrawing=wt.bR,wt.getSelectedAnnotation=wt.iaa,wt.removeAnnotation=wt.kaa,wt.removeAllAnnotations=wt.jaa,wt.select=wt.select,wt.unselect=wt.ie,t.E("anychart.annotations.ChartController",p),t.H(b,s),t.Gq(b,["stroke"],"normal"),t.U(b,tt),t.U(b,it),t.U(b,st),t.U(b,ot),J["andrews-pitchfork"]=b,t.g=b.prototype,t.g.type="andrews-pitchfork",t.g.Ee=15,t.g.ng=function(){var e=b.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){b.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(t,e,i,n){for(var s=0;s<this.Ca.length;s++){var a=this.Ca[s];a.clear(),a.moveTo(t,e).lineTo(t,e),a.moveTo(i,n).lineTo(i,n)}},t.g.bM=function(t,e,s,a,o,r){var l=(s+o)/2-t,h=(a+r)/2-e;for(l||h||(l=10),t=i(t,e,t+l,e+h,this.fa),e=i(s,a,s+l,a+h,this.fa),l=i(o,r,o+l,r+h,this.fa),s=n(s,a,o,r,this.fa),a=0;a<this.Ca.length;a++)(o=this.Ca[a]).clear(),r=!1,e&&(o.moveTo(e[2],e[3]).lineTo(e[0],e[1]),r=!0),s?(r?o.lineTo(s[0],s[1]):o.moveTo(s[0],s[1]),o.lineTo(s[2],s[3]),r=!0):r=!1,l&&(r?o.lineTo(l[0],l[1]):o.moveTo(l[0],l[1]),o.lineTo(l[2],l[3])),t&&o.moveTo(t[0],t[1]).lineTo(t[2],t[3])},t.g.wg=function(e){b.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){var t=b.u.Qk.call(this);if(!t){t=this.coords.xAnchor;var e=(this.coords.secondXAnchor+this.coords.thirdXAnchor)/2-t;t=!(0,window.isNaN)(e)&&!(t<this.fa.left&&0>=e||t>this.fa.cb()&&0<=e)}return t},t.g.F=function(){var e=b.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),t.Tq(this,ot,e,"Annotation"),e},t.g.U=function(e,i){t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e),t.Iq(this,ot,e),b.u.U.call(this,e,i)},t.g.R=function(){b.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(v,s),t.Gq(v,["fill","hatchFill","stroke"],"normal"),t.U(v,tt),t.U(v,it),t.U(v,st),t.U(v,ot),J.ellipse=v,t.g=v.prototype,t.g.type="ellipse",t.g.Ee=7,t.g.ng=function(){var e=v.u.ng.call(this);return t.Ga(e,bt)},t.g.Fg=function(){v.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(t,e,i,n){var s=(e+n)/2;for(i=(t-i)/2,e=(e-n)/2,n=0;n<this.Ca.length;n++){var a=this.Ca[n];a.clear(),a.moveTo(t,s),a.arcTo(i,e,0,360)}},t.g.wg=function(e){v.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=v.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){v.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){v.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(m,s),t.Gq(m,["stroke","trend","labels"],"normal"),t.U(m,tt),t.U(m,it),t.U(m,st),t.g=m.prototype,t.g.sa=6144|s.prototype.sa,t.g.Ee=7,t.g.pK=function(e){if(t.p(e)){if(t.A(e)){for(var i=this.K.length=0;i<e.length;i++){var n=t.N(e[i]);(0,window.isNaN)(n)||this.K.push(n)}this.B(6400,1)}return this}return t.Ja(this.K,0)},t.g.ng=function(){var e=m.u.ng.call(this);return t.Ga(e,mt,vt,mt)},t.g.wt=function(t){m.u.wt.call(this,t),this.B(2048)},t.g.Fg=function(){m.u.Fg.call(this),this.b||(this.b=[this.Aa.path(),this.Aa.path()],this.b[0].zIndex(2),this.b[1].zIndex(3))},t.g.PO=function(){if(this.J(4096)){var e;for(this.f||(this.f=[]),e=this.f.length;e<this.K.length;e++)this.f.push(this.Aa.path().zIndex(0));for(e=this.K.length;e<this.f.length;e++)t.qd(this.f[e]);this.f.length=this.K.length,this.B(2304),this.I(4096)}if(this.J(256)&&this.B(2048),this.J(2048)){this.fb=!1,e=this.Qa().labels();var i=this.lb().labels().enabled()||this.selected().labels().enabled();e.ka(),7!=this.i||!1===e.enabled()&&!i?(e.clear(),e.O(null)):(e.O(this.Aa),e.clear(),e.ja(this.fa),e.zh=4,this.fb=!0,this.B(256)),e.W(),(i=e.sl())&&i.Dd(!0),e.da(!1),this.I(2048)}},t.g.tm=function(t,e){for(var i=0;i<this.b.length;i++){var n=this.b[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,i,n,s){for(var a=0;a<this.b.length;a++){var o=this.b[a];o.clear(),o.moveTo(e,i).lineTo(n,s)}for(a=0;a<this.f.length;a++)this.f[a].clear();var r;e=this.Qa().labels(),r=this.state&t.wo?this.selected().labels():this.state&t.vo?this.lb().labels():null,i=!this.fb||r&&null!==r.enabled()?r.enabled():e.enabled(),e.ka(),this.mT(e,r,i),i||e.clear(),e.W(),e.da(!1)},t.g.mT=function(e,i,n){for(var s=0;s<this.K.length;s++){var a=this.f[s],o=a.stroke();this.JG(s,this.K[s],a,this.b[1],e,i,n,t.dp(o))}},t.g.JG=function(){},t.g.wg=function(e){m.u.wg.call(this,e);var i=this.qc(this,e);for(t.p(i)||(i=this.$a(this,e)),this.b[0].fill(null).stroke(i),this.b[1].fill(t.bm).stroke(t.bm,2*this.hoverGap()),i=0;i<this.f.length;i++)this.f[i].fill(null).stroke(this.$a(this,e,i))},t.g.Ge=function(e,i){var n=m.u.Ge.call(this,e,i);return t.p(i)&&(n.level=this.K[i]),n},t.g.de=function(e){t.X(e,1)&&this.B(2048,1)},t.g.Ic=function(e,i,n){return this.oe||(this.oe=new t.Fw),t.ov(this.oe,{annotation:{value:this,type:""},level:{value:e,type:"number"},levelValue:{value:n?i:this.bb().CE(i,2),type:n?"date-time":"number"},rawLevelValue:{value:i,type:n?"date-time":"number"}}),this.oe},t.g.tf=function(e,i,n,s,a,o){if(s&&a){var r=i.be(e);if(r?(r.Hf(s),r.jc(a)):r=i.add(s,a,e),r.Hi(),t.$u(r,n),o&&r.qk(o),r.W(),(e=i.yl(r))&&e.length){for((i=this.b[1]).moveTo(e[0],e[1]),n=2;n<e.length;n+=2)i.lineTo(e[n],e[n+1]);i.close()}}else i.clear(e)},t.g.AB=function(t){m.u.AB.call(this,t),this.pK(this.g("levels"))},t.g.F=function(){var e=m.u.F.call(this);return e.levels=this.pK(),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){m.u.U.call(this,e,i),this.pK(e.levels),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){m.u.R.call(this),t.sd(this.b),t.sd(this.f),this.f=this.b=null,delete this.$a,delete this.qc};var xt=m.prototype;xt.levels=xt.pK,t.H(w,m),J["fibonacci-arc"]=w,w.prototype.type="fibonacci-arc",w.prototype.JG=function(e,i,n,s,a,o,r){var l=this.coords.valueAnchor,h=this.coords.secondXAnchor,c=this.coords.secondValueAnchor,u=c+i*(l-c),d=t.gn(h+i*(this.coords.xAnchor-h),u,h,c);u<c?(n.Fe(h,c,d,d,180,180),s.Fe(h,c,d,d,180,180)):(n.Fe(h,c,d,d,0,180),s.Fe(h,c,d,d,0,180)),r&&(l<c?(s=c-d,n="center-bottom"):(s=c+d,n="center-top"),h={x:h,y:s},this.tf(e,a,o,this.Ic(i,y(this,s),!1),{value:h},n))},w.prototype.Qk=function(){var e=w.u.Qk.call(this);if(!e){var i=this.coords.xAnchor,n=this.coords.valueAnchor;e=this.coords.secondXAnchor;var s=this.coords.secondValueAnchor,a=Math.max.apply(Math,this.K);i=t.gn(e+a*(i-e),s+a*(n-s),e,s),e=!(0,window.isNaN)(i)&&!(e+i<this.fa.left||e-i>this.fa.cb())}return e},t.H(x,m),t.Gq(x,["grid"],"normal"),J["fibonacci-fan"]=x,t.g=x.prototype,t.g.type="fibonacci-fan",t.g.LP=function(e){if(t.p(e)){if(t.A(e)){for(var i=this.Ha.length=0;i<e.length;i++){var n=t.N(e[i]);(0,window.isNaN)(n)||this.Ha.push(n)}this.B(6400,1)}return this}return t.Ja(this.Ha,0)},t.g.ng=function(){var e=x.u.ng.call(this);return t.Ga(e,pt)},t.g.mT=function(e,s,a){var o,r;for(o=0;o<this.o.length;o++)this.o[o].clear();for(x.u.mT.call(this,e,s,a),o=0,r=this.K.length;o<this.Ha.length;o++,r++){var l=this.f[r],h=l.stroke(),c=r,u=this.Ha[o],d=l,p=this.b[1];l=e;var g=s,f=a,b=t.dp(h),v=this.coords.xAnchor;h=this.coords.valueAnchor;var m=this.coords.secondXAnchor,y=this.coords.secondValueAnchor,w=v+(m-v)*u,C=this.o[c],D=C.stroke();v==(m=w)&&(m=v=t.R(v,b)),w=t.R(w,t.dp(D)),b=i(v,h,m,y,this.fa),v=n(w,h,w,y,this.fa),b&&(d.moveTo(b[0],b[1]).lineTo(b[2],b[3]),p.moveTo(b[0],b[1]).lineTo(b[2],b[3])),v&&(C.moveTo(v[0],v[1]).lineTo(v[2],v[3]),p.moveTo(v[0],v[1]).lineTo(v[2],v[3])),f&&this.fa.left<=w&&w<=this.fa.cb()&&(d={value:{x:w,y:h}},this.tf(c,l,g,this.Ic(u,S(this,w),!0),d,h<y?"center-bottom":"center-top"))}},t.g.JG=function(e,s,a,o,r,l,h,c){var u=this.coords.xAnchor,d=this.coords.valueAnchor,p=this.coords.secondXAnchor,g=this.coords.secondValueAnchor,f=d+(g-d)*s,b=this.o[e],v=b.stroke();d==(g=f)&&(g=d=t.R(d,c)),f=t.R(f,t.dp(v)),c=i(u,d,p,g,this.fa),d=n(u,f,p,f,this.fa),c&&(a.moveTo(c[0],c[1]).lineTo(c[2],c[3]),o.moveTo(c[0],c[1]).lineTo(c[2],c[3])),d&&(b.moveTo(d[0],d[1]).lineTo(d[2],d[3]),o.moveTo(d[0],d[1]).lineTo(d[2],d[3])),h&&this.fa.left<=u&&u<=this.fa.cb()&&(a={value:{x:u,y:f}},this.tf(e,r,l,this.Ic(s,y(this,f),!1),a,u<p?"right-center":"left-center"))},t.g.Qk=function(){var t=x.u.Qk.call(this);if(!t){t=this.coords.xAnchor;var e=this.coords.secondXAnchor-t;t=!(0,window.isNaN)(e)&&!(t<this.fa.left&&0>=e||t>this.fa.cb()&&0<=e)}return t},t.g.wg=function(e){x.u.wg.call(this,e);for(var i=0;i<this.o.length;i++){var n=this.Sb(this,e,i);t.p(n)||(n=this.$a(this,e,i)),this.o[i].fill(null).stroke(n)}},t.g.Ge=function(e,i){var n={sourceColor:e||this.g("color")||"blue"};if(t.p(i)){n.isTimeLevel=i>=this.K.length;var s=n.isTimeLevel?this.Ha[i-this.K.length]:this.K[i];n.levelRatio=s,n.isTimeLevel?n.timeLevel=s:n.level=s}return n},t.g.Ic=function(e,i,n){return this.oe||(this.oe=new t.Fw),(e={annotation:{value:this,type:""},level:{value:e,type:"number"},levelRatio:{value:e,type:"number"},levelValue:{value:n?i:this.bb().CE(i,2),type:n?"date-time":"number"},rawLevelValue:{value:i,type:n?"date-time":"number"}}).isTimeLevel={value:n,type:""},t.ov(this.oe,e),this.oe},t.g.PO=function(){if(this.J(4096)){this.f||(this.f=[]),this.o||(this.o=[]);var e,i=this.K.length+this.Ha.length;for(e=this.f.length;e<i;e++)this.f.push(this.Aa.path().zIndex(0));for(e=i;e<this.f.length;e++)t.qd(this.f[e]);for(this.f.length=i,e=this.o.length;e<i;e++)this.o.push(this.Aa.path().zIndex(0));for(e=i;e<this.o.length;e++)t.qd(this.o[e]);this.o.length=i,this.B(2304),this.I(4096)}x.u.PO.call(this)},t.g.AB=function(t){x.u.AB.call(this,t),this.LP(this.g("timeLevels"))},t.g.F=function(){var t=x.u.F.call(this);return t.timeLevels=this.LP(),t},t.g.U=function(t,e){x.u.U.call(this,t,e),this.LP(t.timeLevels)},t.g.R=function(){x.u.R.call(this),t.sd(this.o),this.o=null,delete this.Sb};var Ct=x.prototype;Ct.timeLevels=Ct.LP,t.H(C,m),J["fibonacci-retracement"]=C,C.prototype.type="fibonacci-retracement",C.prototype.JG=function(e,n,s,a,o,r,l,h){var c=this.coords.secondValueAnchor,u=Math.min(this.coords.xAnchor,this.coords.secondXAnchor);h=t.R(c+(this.coords.valueAnchor-c)*n,h),(c=i(u,h,u+10,h,this.fa))&&(s.moveTo(c[0],c[1]).lineTo(c[2],c[3]),a.moveTo(c[0],c[1]).lineTo(c[2],c[3])),l&&(s={value:{x:u,y:h}},this.tf(e,o,r,this.Ic(n,y(this,h),!1),s))},C.prototype.Qk=function(){var t=C.u.Qk.call(this);return t||(t=Math.min(this.coords.xAnchor,this.coords.secondXAnchor),t=!(0,window.isNaN)(t)&&t<=this.fa.cb()),t},t.H(D,m),J["fibonacci-timezones"]=D,D.prototype.type="fibonacci-timezones",D.prototype.JG=function(e,i,n,s,a,o,r,l){var h=this.coords.secondXAnchor;if(l=t.R(h+Math.abs(this.coords.xAnchor-h)*i,l),this.fa.left<=l&&l<=this.fa.cb()){h=this.fa.top;var c=this.fa.Va();n.moveTo(l,h).lineTo(l,c),s.moveTo(l,h).lineTo(l,c),r&&(n={value:{x:l,y:c}},this.tf(e,a,o,this.Ic(i,S(this,l),!0),n,"left-bottom"))}},D.prototype.Qk=function(){var t=D.u.Qk.call(this);return t||(t=Math.min(this.coords.xAnchor,this.coords.secondXAnchor),t=!(0,window.isNaN)(t)&&t<=this.fa.cb()),t},t.H(T,s),J["finite-trend-channel"]=T,t.Gq(T,["fill","hatchFill","stroke"],"normal"),t.U(T,tt),t.U(T,it),t.U(T,st),T.prototype.Ee=7;var Dt={};t.rq(Dt,0,"channelWidth",t.Bq),t.U(T,Dt),t.g=T.prototype,t.g.type="finite-trend-channel",t.g.tm=function(t,e){O(this),this.Ca[0].moveTo(t,e).lineTo(t,e)},t.g.cp=function(t,e,i,n){r(this)&&this.b&&(this.ta("channelWidth",$(this,(n-e)/2)),this.b=!1),O(this);var s=this.Ca[0],a=k(this);for(s.moveTo(t,e).lineTo(i,n),s.moveTo(t,e+a).lineTo(i,n+a),s=1;s<this.Ca.length;s++){var o=this.Ca[s];o.moveTo(t,e),o.lineTo.apply(o,[i,n,i,n+a,t,e+a]),o.close()}},t.g.wg=function(e){T.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.K(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].stroke(null).fill(this.o(this,e)),this.Ca[3].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.mJ=function(){T.u.mJ.call(this),this.Ha=k(this)},t.g.KI=function(t,e,i){return 2>t?T.u.KI.call(this,t,e,i):(this.ta("channelWidth",$(this,this.Ha+i)),this.B(768),this.W(),this)},t.g.Fg=function(){T.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.SC=function(){var t=T.u.SC.call(this);if(!(0,window.isNaN)(this.coords.secondXAnchor)){var e=k(this);e={x:(e={x:(this.coords.xAnchor+this.coords.secondXAnchor)/2,y:(this.coords.valueAnchor+this.coords.secondValueAnchor)/2+e}).x,y:e.y},t.push({value:e})}return t},t.g.ng=function(){var e=T.u.ng.call(this);return t.Ga(e,bt)},t.g.U=function(e,i){T.u.U.call(this,e,i),t.Iq(this,Dt,e),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.F=function(){var e=T.u.F.call(this);return t.Tq(this,Dt,e,"Annotation"),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.R=function(){T.u.R.call(this),t.sd(this.Ca),delete this.K,delete this.f,delete this.o},t.g.UB=function(t,e){this.b=!0,T.u.UB.call(this,t,e)},t.H(P,s),t.Gq(P,["stroke"],"normal"),t.U(P,it),J["horizontal-line"]=P,t.g=P.prototype,t.g.type="horizontal-line",t.g.Ee=2,t.g.ng=function(){var e=P.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){P.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(e,i){i=t.R(i,t.dp(this.Ca[0].stroke()));for(var n=0;n<this.Ca.length;n++){var s=this.Ca[n];s.clear(),s.moveTo(this.fa.left,i).lineTo(this.fa.cb(),i)}},t.g.wg=function(e){P.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=P.u.F.call(this);return t.Tq(this,it,e,"Annotation"),e},t.g.U=function(e,i){P.u.U.call(this,e,i),t.Iq(this,it,e)},t.g.R=function(){P.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(L,s),t.Gq(L,["fill","hatchFill","stroke"],"normal"),t.U(L,tt),t.U(L,it),t.U(L,st),J["horizontal-range"]=L,t.g=L.prototype,t.g.type="horizontal-range",t.g.Ee=7,t.g.ng=function(){var e=L.u.ng.call(this);return t.Ga(e,bt)},t.g.pb=function(){if(this.J(64)){var t=this.Ra(),e=this.bb();if(!t||!e)return!1;var i=0,n=0;t=h(this,e.transform(this.nd("valueAnchor"),.5)),(0,window.isNaN)(t)?n|=3:i|=3,e=h(this,e.transform(this.nd("secondValueAnchor"),.5)),(0,window.isNaN)(e)?n|=4:i|=4;var s=!1,a=null;3&n?(a="valueAnchor",s=!0,this.aa=3):4&n?(a="secondValueAnchor",s=!1,this.aa=7):this.aa=0,this.coords.valueAnchor=t,this.coords.secondValueAnchor=e,this.Ba=i,this.ba=null,this.ea=a,this.Za=s,this.Oe=this.Qk(),(0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)||this.B(128),this.B(768),this.I(64)}return this.J(128)&&((0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)?this.i=this.Ba:(this.ba&&(this.coords[this.ba]=this.D),this.ea&&(this.coords[this.ea]=this.G),this.i=this.Ba|this.aa),this.I(128),this.B(768),this.I(128)),this.Oe||!(0,window.isNaN)(this.D)&&!(0,window.isNaN)(this.G)},t.g.SC=function(){var e=[],i=this.fa.left+this.fa.width/2;return this.Ee&this.i&3&&(e.push({x:i,y:this.coords.valueAnchor}),this.Ee&this.i&4&&e.push({x:i,y:this.coords.secondValueAnchor})),(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.Qk=function(){var t=[];t.push(this.coords.valueAnchor),t.push(this.coords.secondValueAnchor);for(var e=this.fa,i=!0,n=!0,s=0;s<t.length;s++)(0,window.isNaN)(t[s])||(i=i&&t[s]<e.top,n=n&&t[s]>e.Va());return!i&&!n},t.g.Fg=function(){L.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.qJ=function(t){t.Vd().cursor("ns-resize")},t.g.tm=function(e,i){i=t.R(i,t.dp(this.Ca[0].stroke())),this.Ca[0].clear(),this.Ca[0].moveTo(this.fa.left,i).lineTo(this.fa.cb(),i)},t.g.cp=function(e,i,n,s){e=t.dp(this.Ca[0].stroke()),i=t.R(i,e),s=t.R(s,e),e=this.fa.left,n=this.fa.cb();var a=this.Ca[0];a.clear().moveTo(e,i).lineTo(n,i).moveTo(e,s).lineTo(n,s);for(var o=1;o<this.Ca.length;o++)(a=this.Ca[o]).clear().moveTo(e,i).lineTo(n,i).lineTo(n,s).lineTo(e,s).close()},t.g.wg=function(e){L.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)).fill(null),this.Ca[1].stroke(null).fill(this.b(this,e)),this.Ca[2].stroke(null).fill(this.f(this,e)),this.Ca[3].stroke(t.bm,2*this.hoverGap()).fill(t.bm)},t.g.F=function(){var e=L.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){L.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){L.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(G,s),t.Gq(G,["stroke"],"normal"),t.U(G,tt),t.U(G,it),t.U(G,st),J["infinite-line"]=G,t.g=G.prototype,t.g.type="infinite-line",t.g.Ee=7,t.g.ng=function(){var e=G.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){G.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(i,n,s,a){var o=t.dp(this.Ca[0].stroke());for(i==s&&(i=s=t.R(i,o)),n==a&&(n=a=t.R(n,o)),i=e(i,n,s,a,this.fa),n=0;n<this.Ca.length;n++)(s=this.Ca[n]).clear(),i&&s.moveTo(i[0],i[1]).lineTo(i[2],i[3])},t.g.wg=function(e){G.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){return!0},t.g.F=function(){var e=G.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){G.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){G.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(F,s),t.U(F,tt),t.U(F,it),t.U(F,ct),t.Gq(F,"fontFamily fontStyle fontVariant fontWeight fontSize fontColor fontOpacity fontDecoration textShadow".split(" "),"normal"),J.label=F,t.g=F.prototype,t.g.type="label",t.g.Ee=3,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.K(this.Ia,this.vg,this),t.W(this,"background",this.Ia)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.K(this.Wa,this.fm,this),t.W(this,"padding",this.Wa)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.fm=function(e){t.X(e,2)&&this.B(256,1)},t.g.vg=function(e){t.X(e,1)&&this.B(256,1)},t.g.ng=function(){var e=F.u.ng.call(this);return t.Ga(e,ft)},t.g.wt=function(t){F.u.wt.call(this,t),this.B(256)},t.g.sc=function(t,e){var i=0==e?this.Qa():1==e?this.lb():this.selected(),n=this.Qa().g(t);return(e?i.g(t):n)||n},t.g.SC=function(){var e=[];return e.push({x:this.coords.xAnchor||0,y:this.coords.valueAnchor||0},{x:this.Ll.left||0,y:this.Ll.top||0},{x:this.Ll.cb()||0,y:this.Ll.top||0},{x:this.Ll.cb()||0,y:this.Ll.Va()||0},{x:this.Ll.left||0,y:this.Ll.Va()||0}),(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.Qk=function(){this.Fg(),this.J(256)&&(this.bi(this.state),this.Mm(0,0));var t=this.fa,e=Math.abs(this.Ll.width),i=this.coords.xAnchor,n=this.g("anchor");return I(n)?(n=i,e=i+e):"center-top"==n||"center"==n||"center-bottom"==n?(n=i-e/2,e=i+e/2):(n=i-e,e=i),!((0,window.isNaN)(e)||(0,window.isNaN)(n)||e<t.left||n>t.cb())},t.g.qJ=function(t,e){if(1>e)F.u.qJ.call(this,t,e);else{var i=0>this.Ll.width*this.Ll.height,n=i?"nesw-resize":"nwse-resize";i=i?"nwse-resize":"nesw-resize",t.Vd().cursor(e%2?n:i)}},t.g.mJ=function(){F.u.mJ.call(this),this.b=this.Ll.clone()},t.g.KI=function(t,e,i){if(1>t)return F.u.KI.call(this,t,e,i);var n=this.g("anchor");switch(t){case 1:this.Pa.width=this.b.width-e,this.Pa.height=this.b.height-i,I(n)&&(this.coords.xAnchor=this.na.xAnchor+e),A(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i);break;case 2:this.Pa.width=this.b.width+e,this.Pa.height=this.b.height-i,E(n)&&(this.coords.xAnchor=this.na.xAnchor+e),A(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i);break;case 3:this.Pa.width=this.b.width+e,this.Pa.height=this.b.height+i,E(n)&&(this.coords.xAnchor=this.na.xAnchor+e),U(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i);break;case 4:this.Pa.width=this.b.width-e,this.Pa.height=this.b.height+i,I(n)&&(this.coords.xAnchor=this.na.xAnchor+e),U(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i)}return this.Pa.xAnchor=this.Ra().Mc((this.coords.xAnchor-this.fa.left)/this.fa.width),this.Pa.valueAnchor=this.bb().Mc((this.fa.Va()-this.coords.valueAnchor)/this.fa.height),this.B(768),this.W(),this},t.g.bi=function(e){var i=this.g("text"),n=this.g("useHtml");t.p(i)&&(n?this.ad.htmlText(i):this.ad.text(i)),this.ad.fontFamily(this.sc("fontFamily",e,null)),this.ad.fontStyle(this.sc("fontStyle",e,null)),this.ad.fontVariant(this.sc("fontVariant",e,null)),this.ad.fontWeight(this.sc("fontWeight",e,null)),this.ad.fontSize(this.sc("fontSize",e,null)),this.ad.er(this.sc("fontDecoration",e,null)),this.ad.textShadow(this.sc("textShadow",e,null)),this.ad.direction(this.g("textDirection")),this.ad.Xu(this.g("wordBreak")),this.ad.wordWrap(this.g("wordWrap")),this.ad.letterSpacing(this.g("letterSpacing")),this.ad.lineHeight(this.g("lineHeight")),this.ad.textIndent(this.g("textIndent")),this.ad.vAlign(this.g("vAlign")),this.ad.Bm(this.g("hAlign")),this.ad.textOverflow(this.g("textOverflow")),this.ad.Hm(this.g("selectable")),this.ad.Dd(this.g("disablePointerEvents"))},t.g.Fg=function(){F.u.Fg.call(this),this.ad||(this.ad=this.Aa.text(),this.ad.zIndex(2)),this.fu||(this.fu=this.Aa.rect(),this.fu.fill(t.bm).zIndex(3)),this.background().O(this.Aa).zIndex(0)},t.g.Mm=function(e,i){var n=this.ja(),s=this.g("width"),a=this.g("height"),o=0,r=0;if(n){var l=n.width;n=n.height,null!=s?(this.Oi=s=t.L(s,l),o=Math.abs(s),l=!1):(s=0,l=!0),null!=a?(this.Ni=a=t.L(a,n),r=Math.abs(a),n=!1):(a=0,n=!0)}else t.Do(s)?(l=!0,s=0):(l=!1,this.Oi=s=t.N(s),o=Math.abs(s)),t.Do(a)?(n=!0,a=0):(n=!1,this.Ni=a=t.N(a),r=Math.abs(a));var h=this.padding();this.ad.width(null),this.ad.height(null),l?(this.nn=s+=this.ad.rb().width,this.Oi=h.Lk(s)):this.nn=h.Ng(o),this.ad.width(this.nn),n?(this.ln=a+=this.ad.rb().height,this.Ni=h.$j(a)):this.ln=h.Yh(r),this.ad.height(this.ln),this.Lg=t.L(h.g("left"),this.Oi),this.Mg=t.L(h.g("top"),this.Ni),l=this.g("anchor"),a={x:e,y:i},s=t.Eo(t.kn(0,0,this.Oi,this.Ni),l),a.x-=s.x,a.y-=s.y,t.Yo(a,l,this.g("offsetX")||0,this.g("offsetY")||0),this.Lg+=a.x-(0>this.Oi?o:0),this.Mg+=a.y-(0>this.Ni?r:0),this.Ll=new t.I(a.x,a.y,this.Oi,this.Ni)},t.g.tm=function(e,i){this.bi(this.state),this.Mm(e,i),this.ad.x(this.Lg),this.ad.y(this.Mg),this.ad.clip(this.Ll),this.fu.stroke(t.bm,2*this.hoverGap()).Qf(this.Ll),this.background().ka().ja(this.Ll).W().da(!1),this.B(512)},t.g.wg=function(t){F.u.wg.call(this,t),this.ad.color(this.sc("fontColor",t,null)),this.ad.textShadow(this.sc("textShadow",t,null)),this.ad.opacity(this.sc("fontOpacity",t,null))},t.g.F=function(){var e=F.u.F.call(this);return t.Tq(this,ct,e,"Annotation"),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),e.background=this.background().F(),e.padding=this.padding().F(),e},t.g.AB=function(t){F.u.AB.call(this,t)},t.g.U=function(e,i){F.u.U.call(this,e,i),this.background().ga(!!i,e.background),this.padding().ga(!!i,e.padding),i?t.Hq(this.oa,ct,e):t.Iq(this,ct,e),t.Iq(this,tt,e),t.Iq(this,it,e)},t.g.R=function(){t.sd(this.ad,this.fu,this.Ia,this.Wa),F.u.R.call(this)},t.H(_,s),t.Gq(_,["stroke"],"normal"),t.U(_,tt),t.U(_,it),t.U(_,st),J.line=_,t.g=_.prototype,t.g.type="line",t.g.Ee=7,t.g.ng=function(){var e=_.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){_.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,i,s,a){var o=t.dp(this.Ca[0].stroke());for(e==s&&(e=s=t.R(e,o)),i==a&&(i=a=t.R(i,o)),e=n(e,i,s,a,this.fa),i=0;i<this.Ca.length;i++)(s=this.Ca[i]).clear(),e&&s.moveTo(e[0],e[1]).lineTo(e[2],e[3])},t.g.wg=function(e){_.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=_.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){_.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){_.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(j,s),t.Gq(j,["stroke","fill","hatchFill","size"],"normal"),t.U(j,tt),t.U(j,it),t.U(j,lt),J.marker=j,t.g=j.prototype,t.g.type="marker",t.g.Ee=3,t.g.ng=function(){return t.Ga(bt,gt)},t.g.wt=function(t){j.u.wt.call(this,t),this.B(256)},t.g.Fg=function(){j.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(e,i){var n;this.state&t.wo?n=this.Ea.g("size"):this.state&t.vo&&(n=this.za.g("size")),n=(0,window.isNaN)(n)?this.ca.g("size"):n;var s=t.zp(this.g("markerType")),a=this.g("anchor"),o={x:e,y:i};t.Yo(o,a,this.g("offsetX"),this.g("offsetY"));var r=n/2;switch(a){case"left-top":case"center-top":case"right-top":o.y+=r;break;case"left-bottom":case"center-bottom":case"right-bottom":o.y-=r}switch(a){case"left-top":case"left-center":case"left-bottom":o.x+=r;break;case"right-top":case"right-center":case"right-bottom":o.x-=r}for(a=t.dp(this.Ca[0].stroke()),r=0;r<this.Ca.length;r++){var l=this.Ca[r];l.clear(),s(l,o.x,o.y,n,a)}},t.g.wg=function(e){j.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=j.u.F.call(this);return t.Tq(this,lt,e,"Annotation"),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),e},t.g.U=function(e,i){j.u.U.call(this,e,i),t.Iq(this,lt,e),t.Iq(this,tt,e),t.Iq(this,it,e)},t.g.R=function(){j.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(M,s),t.Gq(M,["stroke"],"normal"),t.U(M,tt),t.U(M,it),t.U(M,st),J.ray=M,t.g=M.prototype,t.g.type="ray",t.g.Ee=7,t.g.ng=function(){var e=M.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){M.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,n,s,a){var o=t.dp(this.Ca[0].stroke());for(e==s&&(e=s=t.R(e,o)),n==a&&(n=a=t.R(n,o)),e=i(e,n,s,a,this.fa),n=0;n<this.Ca.length;n++)(s=this.Ca[n]).clear(),e&&s.moveTo(e[0],e[1]).lineTo(e[2],e[3])},t.g.wg=function(e){M.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){var t=M.u.Qk.call(this);if(!t){t=this.coords.xAnchor;var e=this.coords.secondXAnchor-t;t=!(0,window.isNaN)(e)&&!(t<this.fa.left&&0>=e||t>this.fa.cb()&&0<=e)}return t},t.g.F=function(){var e=M.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){M.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){M.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(N,s),t.Gq(N,["fill","hatchFill","stroke"],"normal"),t.U(N,tt),t.U(N,it),t.U(N,st),J.rectangle=N,t.g=N.prototype,t.g.type="rectangle",t.g.Ee=7,t.g.ng=function(){var e=N.u.ng.call(this);return t.Ga(e,bt)},t.g.Fg=function(){N.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,i,n,s){var a=t.dp(this.Ca[0].stroke());for(e=t.R(e,a),i=t.R(i,a),n=t.R(n,a),s=t.R(s,a),a=0;a<this.Ca.length;a++){var o=this.Ca[a];o.clear(),o.moveTo(e,i).lineTo(n,i).lineTo(n,s).lineTo(e,s).close()}},t.g.wg=function(e){N.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=N.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){N.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){N.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(B,s),t.Gq(B,["fill","hatchFill","stroke"],"normal"),t.U(B,tt),t.U(B,it),t.U(B,st),t.U(B,ot),J["trend-channel"]=B,t.g=B.prototype,t.g.type="trend-channel",t.g.Ee=15,t.g.ng=function(){var e=B.u.ng.call(this);return t.Ga(e,bt)},t.g.Fg=function(){B.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++)this.Ca[i].clear();this.Ca[0].moveTo(t,e).lineTo(t,e),this.Ca[3].moveTo(t,e).lineTo(t,e)},t.g.cp=function(t,e,n,s){for(t=i(t,e,n,s,this.fa),e=0;e<this.Ca.length;e++)this.Ca[e].clear();t&&(this.Ca[0].moveTo(t[0],t[1]).lineTo(t[2],t[3]),this.Ca[3].moveTo(t[0],t[1]).lineTo(t[2],t[3]))},t.g.bM=function(t,i,s,a,o,r){var l=this.fa.left,h=this.fa.cb(),c=this.fa.top,u=this.fa.Va();if(s==t)a=a-i||1,t<l&&o<l||t>h&&o>h?s=r=a=c=null:(s=e(t,i,t,i+a,this.fa),r=e(o,r,o,r+a,this.fa),a=[i=Math.max(Math.min(t,o),l),c],c=[t=Math.min(Math.max(t,o),h),c,t,u,i,u,i,c]);else{var d=r-(a=(a-i)/(s-t))*o;(i-=a*t)>d&&(r=i,i=d,d=r),t=s>t?Math.min(t,o):Math.max(t,o),(o=s)>t&&t>h||o<t&&t<l?s=r=a=c=null:(o>t?(t=Math.max(t,l),o=h):(o=Math.min(t,h),t=l),s=a*t+i,l=a*o+i,h=a*o+d,(r=a*t+d)<c&&h<c||s>u&&l>u?s=r=a=c=null:(s=n(t,s,o,l,this.fa),r=n(t,r,o,h,this.fa),0>a?(h=Math.max(t,(u-i)/a),i=Math.min(o,(c-d)/a),s?(a=[s[0],s[1]],c=[s[2],s[3],i,s[3]]):(a=[t,c],c=[i,c]),r?c.push(i,r[3],r[0],r[1],h,r[1]):c.push(i,u,h,u)):0<a?(h=Math.max(t,(c-d)/a),i=Math.min(o,(u-i)/a),s?(a=[s[2],s[3]],c=[s[0],s[1],h,s[1]]):(a=[o,c],c=[h,c]),r?c.push(h,r[1],r[2],r[3],i,r[3]):c.push(h,u,i,u)):(a=[t,c=s?s[1]:c],c=[o,c,o,u=r?r[1]:u,t,u])))}for(u=0;u<this.Ca.length;u++)this.Ca[u].clear();if(u=this.Ca[0],s&&u.moveTo(s[0],s[1]).lineTo(s[2],s[3]),r&&u.moveTo(r[0],r[1]).lineTo(r[2],r[3]),a&&c)for(u=1;u<this.Ca.length;u++)(s=this.Ca[u]).moveTo(a[0],a[1]),s.lineTo.apply(s,c),s.close()},t.g.wg=function(e){B.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.o(this,e)),this.Ca[1].stroke(null).fill(this.b(this,e)),this.Ca[2].stroke(null).fill(this.f(this,e)),this.Ca[3].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){if(15==this.Ba){var t=B.u.Qk.call(this),e=this.coords.secondXAnchor!=this.coords.xAnchor;return t||e}return!1},t.g.F=function(){var e=B.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),t.Tq(this,ot,e,"Annotation"),e},t.g.U=function(e,i){B.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e),t.Iq(this,ot,e)},t.g.R=function(){B.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(R,s),t.Gq(R,["fill","hatchFill","stroke"],"normal"),t.U(R,tt),t.U(R,it),t.U(R,st),t.U(R,ot),J.triangle=R,t.g=R.prototype,t.g.type="triangle",t.g.Ee=15,t.g.ng=function(){var e=R.u.ng.call(this);return t.Ga(e,bt)},t.g.Fg=function(){R.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(t,e,i,n){for(var s=0;s<this.Ca.length;s++){var a=this.Ca[s];a.clear(),a.moveTo(t,e).lineTo(i,n)}},t.g.bM=function(t,e,i,n,s,a){for(var o=0;o<this.Ca.length;o++){var r=this.Ca[o];r.clear(),r.moveTo(t,e).lineTo(i,n).lineTo(s,a).close()}},t.g.wg=function(e){R.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=R.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),t.Tq(this,ot,e,"Annotation"),e},t.g.U=function(e,i){R.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e),t.Iq(this,ot,e)},t.g.R=function(){R.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(H,s),t.Gq(H,["stroke"],"normal"),t.U(H,tt),J["vertical-line"]=H,t.g=H.prototype,t.g.type="vertical-line",t.g.Ee=1,t.g.ng=function(){var e=H.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){H.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(e){e=t.R(e,t.dp(this.Ca[0].stroke()));for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(e,this.fa.top).lineTo(e,this.fa.Va())}},t.g.wg=function(e){H.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=H.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),e},t.g.U=function(e,i){H.u.U.call(this,e,i),t.Iq(this,tt,e)},t.g.R=function(){H.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(z,s),t.Gq(z,["fill","hatchFill","stroke"],"normal"),t.U(z,tt),t.U(z,it),t.U(z,st),J["vertical-range"]=z,t.g=z.prototype,t.g.type="vertical-range",t.g.Ee=7,t.g.ng=function(){var e=z.u.ng.call(this);return t.Ga(e,bt)},t.g.pb=function(){if(this.J(64)){var t=this.Ra(),e=this.bb();if(!t||!e)return!1;var i=0,n=0;e=l(this,t.transform(this.nd("xAnchor"),.5)),(0,window.isNaN)(e)?n|=3:i|=3,t=l(this,t.transform(this.nd("secondXAnchor"),.5)),(0,window.isNaN)(t)?n|=4:i|=4;var s=!1,a=null;3&n?(a="xAnchor",s=!0,this.aa=3):4&n?(a="secondXAnchor",s=!1,this.aa=7):this.aa=0,this.coords.xAnchor=e,this.coords.secondXAnchor=t,this.Ba=i,this.ba=a,this.ea=null,this.Za=s,this.Oe=this.Qk(),(0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)||this.B(128),this.B(768),this.I(64)}return this.J(128)&&((0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)?this.i=this.Ba:(this.ba&&(this.coords[this.ba]=this.D),this.ea&&(this.coords[this.ea]=this.G),this.i=this.Ba|this.aa),this.I(128),this.B(768),this.I(128)),this.Oe||!(0,window.isNaN)(this.D)&&!(0,window.isNaN)(this.G)},t.g.SC=function(){var e=[],i=this.fa.top+this.fa.height/2;return this.Ee&this.i&3&&(e.push({x:this.coords.xAnchor,y:i}),this.Ee&this.i&4&&e.push({x:this.coords.secondXAnchor,y:i})),(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.Qk=function(){var t=[];t.push(this.coords.xAnchor),t.push(this.coords.secondXAnchor);for(var e=this.fa,i=!0,n=!0,s=0;s<t.length;s++)(0,window.isNaN)(t[s])||(i=i&&t[s]<e.left,n=n&&t[s]>e.cb());return!i&&!n},t.g.Fg=function(){z.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.qJ=function(t){t.Vd().cursor("ew-resize")},t.g.tm=function(e){e=t.R(e,t.dp(this.Ca[0].stroke())),this.Ca[0].clear(),this.Ca[0].moveTo(e,this.fa.top).lineTo(e,this.fa.Va())},t.g.cp=function(e,i,n){i=t.dp(this.Ca[0].stroke()),e=t.R(e,i),n=t.R(n,i),i=this.fa.top;var s=this.fa.Va(),a=this.Ca[0];a.clear().moveTo(e,i).lineTo(e,s).moveTo(n,i).lineTo(n,s);for(var o=1;o<this.Ca.length;o++)(a=this.Ca[o]).clear().moveTo(e,i).lineTo(n,i).lineTo(n,s).lineTo(e,s).close()},t.g.wg=function(e){z.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)).fill(null),this.Ca[1].stroke(null).fill(this.b(this,e)),this.Ca[2].stroke(null).fill(this.f(this,e)),this.Ca[3].stroke(t.bm,2*this.hoverGap()).fill(t.bm)},t.g.F=function(){var e=z.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){z.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){z.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(V,t.Y),t.g=V.prototype,t.g.sa=192|t.Y.prototype.sa,t.g.MA=function(){for(var t=0;t<this.Sf.length;t++)this.Sf[t].B(64);this.o&&this.o.B(64),this.B(64)},t.g.W=function(){if(this.zc()){if(this.ka(),this.b||(this.b=t.ok(),this.b.Ce("mouseover",this.wr,!1,this),this.b.Ce("touchstart",this.wr,!1,this),this.b.wa("mouseover",this.hga,!1,this),this.b.wa("mouseout",this.gga,!1,this),this.b.wa("mousemove",this.fga,!1,this),this.f=t.mk(0,0,0,0),this.f.cursor("crosshair"),this.f.fill(t.bm),this.f.stroke(null),this.f.wa("mouseover",this.rga,!1,this),this.G=t.mk(0,0,0,0),this.G.fill(t.bm),this.G.stroke(null),this.G.zIndex(1e3)),this.J(4)&&(this.K=this.ja(),this.b.clip(this.K),this.f.Qf(this.K),this.G.Qf(this.K),this.B(64),this.I(4)),this.J(64)){for(var e=0,i=this.Sf.length;e<i;e++){var n=this.Sf[e];n.ka(),n.ja(this.K),n.O(this.b),n.W(),n.da(!1)}this.o&&(this.o.ka(),this.o.ja(this.K),this.o.O(this.b),this.o.W(),this.o.da(!1)),this.I(64)}this.J(2)&&(this.b.parent(this.O()),this.B(128),this.I(2)),this.J(8)&&(e=this.zIndex(),this.b.zIndex(e),this.f.zIndex(e+100),this.I(8)),this.J(128)&&(this.aa?this.f.parent(this.O()):this.f.remove(),this.I(128)),this.da(!1)}},t.g.wr=function(t){this.mf||(this.mf=new Y(this),"touchstart"==t.type&&this.mf.lk(t.kf))},t.g.hga=function(e){e.stopPropagation(),e.Ju(),e.preventDefault(),e=e.target;for(var i;t.J(e,t.ig);){if(i=e.tag,t.J(i,s))return void this.ib.Tj(i);e=e.parent()}this.ib.Md()},t.g.gga=function(t){t.stopPropagation(),t.Ju(),t.preventDefault(),this.ib.Md()},t.g.fga=function(t){t.stopPropagation(),t.Ju(),t.preventDefault()},t.g.rga=function(e){var i=this.ib.b,n=i.P;n&&n!=this||(r(i)?g(this.ib,!1):(this.f.wa("mouseout",this.TU,!1,this),this.f.wa("mousedown",this.RU,!1,this),t.Ld(t.ll,"mousemove",this.SU,!1,this),e.stopPropagation(),e.Ju(),e.preventDefault(),q(this,e),this.na=!1,i.UB(this.i,this.D),i.nC()?i.W():W(this,i,!1)))},t.g.TU=function(e){if(this.f.gc("mouseout",this.TU,!1,this),this.f.gc("mousedown",this.RU,!1,this),e.stopPropagation(),e.Ju(),e.preventDefault(),q(this,e),this.na=!0,!this.P){if(t.Yd(t.ll,"mousemove",this.SU,!1,this),(e=this.ib.b).D=window.NaN,e.G=window.NaN,e.B(128),e.Ka){var i=null!=e.P;e.Ka=!0,e.P=null,i&&e.B(64),e.kb(null),t.kr(e,this.VZ,this),this.o=null,this.B(64,1)}e.W()}},t.g.RU=function(e){t.Ld(t.ll,"mouseup",this.UU,!1,this),e.stopPropagation(),e.Ju(),e.preventDefault(),q(this,e),this.ba=this.i,this.ea=this.D,this.P=!1,(e=this.ib.b).UB(this.i,this.D),e.W()},t.g.UU=function(e){t.Yd(t.ll,"mouseup",this.UU,!1,this),e.stopPropagation(),e.preventDefault(),q(this,e),this.ea=this.ba=window.NaN,this.P=!1,(e=this.ib.b).Ka&&W(this,e,!0),a(e);var i=!1;r(e)?i=!0:this.na||e.UB(this.i,this.D),e.W(),i&&(g(this.ib,!1),this.ib.xc().dispatchEvent({type:"annotationDrawingFinish",annotation:e}))},t.g.SU=function(t){t.stopPropagation(),t.preventDefault(),q(this,t),(t=this.ib.b).pb(),!t.Za||(0,window.isNaN)(this.ba)||(0,window.isNaN)(this.ea)||this.P?(t.UB(this.i,this.D),t.W()):16<=(this.ba-this.i)*(this.ba-this.i)+(this.ea-this.D)*(this.ea-this.D)&&(this.P=!0,t.Ka&&W(this,t,!0),a(t),t.UB(this.i,this.D),t.W())},t.g.remove=function(){this.b&&(this.b.remove(),this.f.remove())},t.g.select=function(t){return this.ib.select(t),this},t.g.ie=function(){return this.ib.ie(),this},t.g.maa=function(){return this.ib.b},t.g.xfa=function(t){return this.Sf[t]||null},t.g.yfa=function(){return this.Sf.length},t.g.cR=function(e){if(this.o==e)return this.o=null,t.qd(e),this;var i=this.ib;return i.b==e&&(i.b=null,g(i,!1)),this.i5((0,t.za)(this.Sf,e))},t.g.i5=function(e){var i=this.Sf[e];return i&&(t.Ca(this.Sf,e,1),t.qd(i),this.B(64,1)),this},t.g.WZ=function(){return this.Sf.length&&(t.sd(this.Sf),this.Sf.length=0,this.B(64,1)),this},t.g.Gd=function(e){return this.ib.gv()?(this.ib.xc().ka(),e=f(this.ib,e),W(this,e,!0),this.ib.select(e),this.ib.b||(t.qd(e),e=null),this.ib.xc().da(!0),e):null},t.g.add=function(t){return this.ib.xc().ka(),t=f(this.ib,t),W(this,t,!0),this.ib.xc().da(!0),t},t.g.laa=function(){this.ib.bR()},t.g.Tja=function(t){var e=f(this.ib,"ray");return e.N(t),W(this,e,!0),e},t.g.line=function(t){var e=f(this.ib,"line");return e.N(t),W(this,e,!0),e},t.g.Uga=function(t){var e=f(this.ib,"infinite-line");return e.N(t),W(this,e,!0),e},t.g.Bla=function(t){var e=f(this.ib,"vertical-line");return e.N(t),W(this,e,!0),e},t.g.Pga=function(t){var e=f(this.ib,"horizontal-line");return e.N(t),W(this,e,!0),e},t.g.Cla=function(t){var e=f(this.ib,"vertical-range");return e.N(t),W(this,e,!0),e},t.g.Qga=function(t){var e=f(this.ib,"horizontal-range");return e.N(t),W(this,e,!0),e},t.g.fJ=function(t){var e=f(this.ib,"rectangle");return e.N(t),W(this,e,!0),e},t.g.ellipse=function(t){var e=f(this.ib,"ellipse");return e.N(t),W(this,e,!0),e},t.g.rla=function(t){var e=f(this.ib,"triangle");return e.N(t),W(this,e,!0),e},t.g.qla=function(t){var e=f(this.ib,"trend-channel");return e.N(t),W(this,e,!0),e},t.g.jfa=function(t){var e=f(this.ib,"finite-trend-channel");return e.N(t),W(this,e,!0),e},t.g.haa=function(t){var e=f(this.ib,"andrews-pitchfork");return e.N(t),W(this,e,!0),e},t.g.efa=function(t){var e=f(this.ib,"fibonacci-fan");return e.N(t),W(this,e,!0),e},t.g.dfa=function(t){var e=f(this.ib,"fibonacci-arc");return e.N(t),W(this,e,!0),e},t.g.ffa=function(t){var e=f(this.ib,"fibonacci-retracement");return e.N(t),W(this,e,!0),e},t.g.gfa=function(t){var e=f(this.ib,"fibonacci-timezones");return e.N(t),W(this,e,!0),e},t.g.Br=function(t){var e=f(this.ib,"marker");return e.N(t),W(this,e,!0),e},t.g.label=function(t){var e=f(this.ib,"label");return e.N(t),W(this,e,!0),e},t.g.VZ=function(e){t.X(e,1)&&this.B(64,1)},t.g.F=function(){var t=V.u.F.call(this);return t.annotationsList=K(this),t},t.g.Ie=function(e,i){return!!t.A(i)&&(K(this,i),!0)},t.g.U=function(e,i){V.u.U.call(this,e,i);var n=e.annotationsList;t.A(n)&&K(this,n)},t.g.RB=function(e){var i=this.md?{}:{annotationsList:K(this)},n={defaultAnnotationSettings:this.ib.xc().PS()};return i=t.Bm(i,n)||{},e?t.ho(i):i},t.g.MP=function(e){var i=this.RB(!1);return t.qp(i,"annotations",e)},t.g.E1=function(e){var i;return t.z(e)?i=t.io(e):t.C(e)&&!t.D(e)&&(i=e),i=t.C(i)?i.annotationsList:i,K(this,i),this},t.g.vfa=function(e){return e=t.np(e),this.E1(e),this},t.g.R=function(){var e=this.ib;e.f&&t.Fa(e.f,this),t.sd(this.Sf,this.o,this.f,this.b,this.mf,this.G),this.Sf.length=0,this.G=this.mf=this.b=this.f=this.o=null,V.u.R.call(this)},t.H(Y,t.ag),t.g=Y.prototype,t.g.lk=function(e){var i;if(i=!this.lp)t:{i=t.Qi(e.target,this.ib.b.Ja());for(var n,a=window.NaN;t.J(i,t.ig);){if(n=i.tag,t.Do(n)){if(t.J(n,s)){this.b=n,(0,window.isNaN)(a)&&(a=-1),this.i=a,i=!0;break t}}else a=t.N(n);i=i.parent()}this.b=null,this.i=window.NaN,i=!1}i&&(r(this.b)?this.ib.ib.xc().dispatchEvent({type:"annotationChangeStart",annotation:this.b})?(Y.u.lk.call(this,e),this.lp&&e.stopPropagation()):(this.b=null,this.i=window.NaN,e.stopPropagation()):(this.ib.ib.select(this.b),this.b=null,this.i=window.NaN))},t.g.ar=function(){this.b.mJ(),this.deltaY=this.deltaX=0},t.g.ls=function(t,e){this.ib.ib.xc().dispatchEvent({type:"annotationChange",annotation:this.b})&&this.b.KI(this.i,t,e)},t.g.qga=function(){this.ib.ib.select(this.b);var t=this.ib;t.G.parent(t.b)},t.g.oga=function(){var t=this.b;this.b.B(64),this.b.W(),this.b=null,this.i=window.NaN,this.ib.G.remove(),this.ib.ib.xc().dispatchEvent({type:"annotationChangeFinish",annotation:t})};var Tt=V.prototype;Tt.add=Tt.add,Tt.startDrawing=Tt.Gd,Tt.cancelDrawing=Tt.laa,Tt.getAnnotationAt=Tt.xfa,Tt.getAnnotationsCount=Tt.yfa,Tt.removeAnnotation=Tt.cR,Tt.removeAnnotationAt=Tt.i5,Tt.removeAllAnnotations=Tt.WZ,Tt.getSelectedAnnotation=Tt.maa,Tt.select=Tt.select,Tt.unselect=Tt.ie,Tt.ray=Tt.Tja,Tt.line=Tt.line,Tt.infiniteLine=Tt.Uga,Tt.verticalLine=Tt.Bla,Tt.verticalRange=Tt.Cla,Tt.horizontalLine=Tt.Pga,Tt.horizontalRange=Tt.Qga,Tt.rectangle=Tt.fJ,Tt.ellipse=Tt.ellipse,Tt.triangle=Tt.rla,Tt.trendChannel=Tt.qla,Tt.finiteTrendChannel=Tt.jfa,Tt.andrewsPitchfork=Tt.haa,Tt.fibonacciFan=Tt.efa,Tt.fibonacciArc=Tt.dfa,Tt.fibonacciRetracement=Tt.ffa,Tt.fibonacciTimezones=Tt.gfa,Tt.marker=Tt.Br,Tt.label=Tt.label,Tt.fromJson=Tt.E1,Tt.toJson=Tt.RB,Tt.fromXml=Tt.vfa,Tt.toXml=Tt.MP,t.E("anychart.annotations.PlotController",V)}.call(this,$)),_.stock||(_.stock=1,function(t){var e=function(e,i){return t.zk(Ho,e,i||"line")},i=function(e,i){return t.zk(zo,e,i||"sma")},n=function(e,i,n){var s;if(t.ea(e))for(n=n?{}:[],s=0;s<e;s++)n[s]=i;else for(s in n={},e)n[s]=i;return n},s=function(e){var i=1;if(e=Math.floor(e)){for(var n=0;n<t.up.length;n++){var s=t.up[n],a=e/s.xe;if(1<=Math.floor(1.1*a)){var o=o||s;if(.15>a-Math.floor(a)){i=Math.floor(a);break}}}o!=s&&o.ds&&100<i&&(s=o,i=Math.round(20*e/s.xe)/20)}return{unit:s?s.Dg:"millisecond",count:i}},a=function(e,i){switch(e){case"log":return t.gt();case"linear":return t.ft();case"date-time":return t.ht();default:return i?null:t.ft()}},o=function(e){t.K(e,this.PC,this),e.kb(this)},r=function(e,i){switch(this.D=t.Zk(e),this.b=i||1,this.f=new Date(0),this.D){case"year":this.o=315576e5*this.b,this.i=this.daa,this.next=this.via;break;case"semester":this.o=315576e5*this.b/2,this.i=this.aaa,this.next=this.sia;break;case"quarter":this.o=315576e5*this.b/4,this.i=this.Z$,this.next=this.qia;break;case"month":this.o=315576e5*this.b/12,this.i=this.YQ,this.next=this.pia;break;case"third-of-month":this.o=315576e5*this.b/36,this.i=this.baa,this.next=this.tia;break;case"week":this.o=6048e5*this.b,this.i=this.caa,this.next=this.uia;break;default:this.o=864e5*this.b,this.i=this.V$,this.next=this.jia;break;case"hour":this.o=36e5*this.b,this.i=this.W$,this.next=this.lia;break;case"minute":this.o=6e4*this.b,this.i=this.Y$,this.next=this.oia;break;case"second":this.o=1e3*this.b,this.i=this.$$,this.next=this.ria;break;case"millisecond":this.o=this.b,this.i=this.X$,this.next=this.nia}},l=function(e,i,n){e.f.setTime(t.Oo(e.f.getTime(),i,n?n.getTime():Date.UTC(2e3,0))-i)},h=function(t){var e=t.getUTCDate();return 3*(12*t.getUTCFullYear()+t.getUTCMonth())+(10>=e?0:20>=e?1:2)},c=function(t,e){var i=t.sj()-e.sj();return i||e.b-t.b},u=function(){t.V.call(this),this.Ga("defaultGroupingSettings"),this.o=!0,this.D=!1,this.b=[],this.f=500,this.i=window.NaN,this.G={unit:"millisecond",count:1},this.K=!1},d=function(t){for(var e=[],i=0;i<t.b.length;i++)e.push(p(t.b[i]));return e},p=function(t){return{unit:t.D,count:t.b}},g=function(t,e){this.key=t,this.values=e,this.b=this.next=null,this.i=!1,this.o=Pr++},f=function(t,e){return t.key==e.key?t.o-e.o:t.key-e.key},b=function(t){return this-t.key},v=function(t){return this-t.key},m=function(t,e,i,n,s){this.Zc=t,this.ea=n,this.K=new g((0,window.isNaN)(e.Pw)?-1:e.Pw,[]),this.K.next=e.IT,this.aa=e.aJ,this.na=e.lastIndex-e.rj+1||0,this.ba=(this.i=s||null)?this.Nda:this.S$,this.Ba=this.i?this.zfa:this.Gfa,this.Ci=i,this.reset()},y=function(){this.f=[],this.i=!0,this.b=[],this.P=!0,this.D=[],this.o=0,this.K=[],this.G=0},S=function(e,i){return e.b.length?1<e.b.length?e.zi(t.Za(Math.round(e.Uf(i)),0,e.b.length-1)):e.b[0].key:window.NaN},w=function(t,e,i){i=Math.max(0,Math.floor(i));var n=t.b.length>i?t.b[i]:null;return e=Math.max(0,Math.ceil(e)),new T(e,t.b.length>e?t.b[e]:null,n,Math.min(i,t.b.length-1)-Math.min(e,t.b.length))},x=function(t){return t.b.length?t.b.length-1:window.NaN},C=function(e,i,n){var a,o,r,l,h=e.b.length,c={};if(h){for(l=0;l<e.K.length;l++){var u=e.K[(e.G-l-1+4)%4];if(u.ki==i&&u.Wi==n)return u}var d=e.Uf(i),p=e.Uf(n);if(u=Math.max(0,Math.ceil(d)),(0,window.isNaN)(u)||u>=h){var g=h-1;u=a=o=r=window.NaN}else if(a=Math.min(Math.floor(p),h-1),(0,window.isNaN)(a)||0>a)o=0,u=a=g=r=window.NaN;else if(u<=a){g=0<u?u-1:window.NaN,o=a<h-1?a+1:window.NaN,r=window.Infinity,l=(0,window.isNaN)(g)?u:g;for(var f=(0,window.isNaN)(o)?a:o,b=e.b[l];l<f;l++){var v=b;b=v.next,r=Math.min(r,b.key-v.key)}(0,window.isFinite)(r)||(r=window.NaN)}else g=a,o=u,u=a=window.NaN,r=(r=e.b[g]).next.key-r.key;f=D(e),b=t.Za(i,f[2],f[3]),v=t.Za(n,f[2],f[3]),l=e.Uf(b);for(var m,y,S=e.Uf(v);l<=S;l++)l<u?(m=t.Za(e.b[u].key,f[0],f[1]),y=t.Za(b,f[0],f[1]),l=u):l&&e.b[l]?(m=e.b[l].key,y=e.b[l-1].key):m=y=window.NaN,m-=y,(0,window.isNaN)(m)||0==m||(c[(y=s(m)).unit]?((y=c[y.unit]).count++,y.xe+=m):c[y.unit]={count:1,xe:m,Dg:y.unit});S>a&&(m=t.Za(v,f[0],f[1]),m-=y=t.Za(e.b[a].key,f[0],f[1]),(0,window.isNaN)(m)||0==m||(c[(y=s(m)).unit]?((y=c[y.unit]).count++,y.xe+=m):c[y.unit]={count:1,xe:m,Dg:y.Dg}))}else u=a=g=o=d=p=r=window.NaN;return u={Xm:c,ki:i,Wi:n,Cg:d,Nj:p,rj:u,Pw:g,lastIndex:a,kB:o,FI:r},h&&(e.K[e.G]=u,e.G=(e.G+1)%4),u},D=function(t){var e=t.b.length;if(e){var i=t.b[0].key;if(1==e)t=[i-1,i+1,i-1,i+1];else{var n=t.b[e-1].key;t=[i,n,i-(t.b[1].key-i)/2,n+(n-t.b[e-2].key)/2]}}else t=[window.NaN,window.NaN,window.NaN,window.NaN];return t},T=function(t,e,i,n){this.D={key:t-1,next:e},this.K=i?i.next:null,this.G=n,this.reset()},k=function(t){this.Zc=t,this.f=jt(t.Rd()),this.i=!0,this.b=ct(this.f),this.ib=null,this.D=!1,this.o=[],$(this)},$=function(t){for(var e=t.ib?t.ib.i.b.length:t.f.Hb();t.o.length<e;)t.o.push({})},O=function(t,e){var i=t.f.En(e);return i?new _(i,t.Zc,!t.i,e,t.o[e]):null},P=function(t,e,i,n){if(e>i){var s=e;e=i,i=s}return s=jt(t.Zc.Rd(),n),(t.D||s!=t.f||t.b.ki!=e||t.b.Wi!=i)&&(t.D=!1,t.f=s,t.i=!n,t.b=s.select(e,i),$(t)),t},L=function(t,e,i){return e?(i=t.ib?t.ib.Uf(e.key):i,new _(e,t.Zc,!t.i,i,t.o[i]||{})):null},G=function(t){return L(t,t.b.xO,t.b.Pw)},F=function(t){return L(t,t.b.aJ,t.b.kB)},I=function(e,i){var n=e.b.A3,s=e.b.lastIndex;if(t.p(i))for(var a=e.i?Ct(e.Zc,i):xt(e.Zc,i);n&&n!=e.b.xO&&(0,window.isNaN)(n.vj(a));)n=n.b,s--;return n==e.b.xO&&(n=null),L(e,n,s)},E=function(e,i,n){if("first-visible"==i){var s=e.b.IT,a=e.b.rj;if(t.p(n))for(n=e.i?Ct(e.Zc,n):xt(e.Zc,n);s&&s!=e.b.aJ&&(0,window.isNaN)(s.vj(n));)s=s.next,a++;s==e.b.aJ&&(s=null),e=L(e,s,a)}else if("last-visible"==i)e=I(e,n);else if("series-start"==i){if(a=jt(e.Zc.Rd()),t.p(n)){n=Ct(e.Zc,n),i=0;for(var o=a.Hb();i<o&&(s=a.En(i),(0,window.isNaN)(s.vj(n)));i++);}else s=a.En(0);e=s?new _(s,e.Zc,!1,0,null):null}else if("series-end"==i){if(s=jt(e.Zc.Rd()),t.p(n))for(n=Ct(e.Zc,n),i=s.Hb();i--&&(a=s.En(i),(0,window.isNaN)(a.vj(n))););else a=s.En(s.Hb()-1);e=a?new _(a,e.Zc,!1,0,null):null}else n=jt(e.Zc.Rd()),s=t.p(i)?ut(n,i,"exact"):0,e=(n=n.En(s))?new _(n,e.Zc,!1,s,null):null;return e},A=function(t,e){return t.i?Ct(t.Zc,e):xt(t.Zc,e)},U=function(t,e,i){return new m(t.Zc,t.b,t.o,!t.i,e&&t.ib?H(t.ib,!!i):null)},_=function(t,e,i,n,s){this.Af=t,this.Zc=e,this.b=i,this.Ad=n,this.Ci=s},j=function(){t.V.call(this),this.ea={},this.na={},this.Za={},this.aa={},this.Ba=this.i=this.f=new y,this.P={},this.b={Xm:{},ki:window.NaN,Wi:window.NaN,Cg:window.NaN,Nj:window.NaN,rj:window.NaN,Pw:window.NaN,lastIndex:window.NaN,kB:window.NaN,FI:window.NaN,Oka:window.NaN,Xea:window.NaN,Nka:window.NaN,Wea:window.NaN},this.ba={Xm:{},ki:window.NaN,Wi:window.NaN,Cg:window.NaN,Nj:window.NaN,rj:window.NaN,Pw:window.NaN,lastIndex:window.NaN,kB:window.NaN,FI:window.NaN,Oka:window.NaN,Xea:window.NaN,Nka:window.NaN,Wea:window.NaN},this.$a=this.D=this.o=this.sb=this.fb=window.NaN},M=function(e,i,n){var s=t.oa(i).toFixed(0);if(n=n?e.na:e.Za,!(s in e.ea)||!(s in n)){for(var a in e.ea[s]=i,n[s]=i,i.ib=e,i=i.pr().Rd(),(s=t.oa(i).toFixed(0))in e.aa||(e.aa[s]=i,t.K(i,e.t6,e)),e.f.i=!0,e.P)e.P[a].i=!0;e.B(16384,16)}},N=function(t){if(t.J(16384)){q(t);var e=D(t.f);if(t.o!=e[2]||t.D!=e[3])return t.fb=e[0],t.sb=e[1],t.o=e[2],t.D=e[3],!0}return!1},B=function(t,e,i,n,s){N(t),K(t,s),K(t,n);var a=t.o,o=t.D,r=t.J(16384);t.$a=e,e=0;var l=R(t,a,o,z(t),t.Za,t.Ba,t.ba,r);l&&(t.Ba=l[0],t.ba=l[1],e+=2),l=t.K.Cn(),eo(s,t.ba.ki,t.ba.Wi,l.unit,l.count,t.ba.Xm),l=t.b.ki;var h=t.b.Wi;return!r||i&&!J(t)&&!Z(t)||(0,window.isNaN)(t.Ka)||(0,window.isNaN)(t.Ha)||(0,window.isNaN)(a)||(0,window.isNaN)(o)||(l=s.Mc(t.Ka),h=s.Mc(t.Ha)),((0,window.isNaN)(l)||J(t)&&!(0,window.isNaN)(a)&&Z(t))&&(l=a),((0,window.isNaN)(h)||Z(t)&&!(0,window.isNaN)(o)&&J(t))&&(h=o),(0,window.isNaN)(l)||((i=R(t,l,h,t.G,t.na,t.i,t.b,r))&&(t.i=i[0],t.b=i[1],e+=1),W(t,n)),t.Ka=s.transform(t.b.ki),t.Ha=s.transform(t.b.Wi),t.I(16384),e},R=function(t,e,i,n,a,o,r,l){if(e>i){var h=e;e=i,i=h}1>i-e&&(i>t.o?e=i-1:i=e+1),r=e!=r.ki||i!=r.Wi;var c=t.$a,u=i-e,d=(h=C(t.f,e,i)).lastIndex-h.rj+1||0;h=h.FI,c=(0,window.isNaN)(n.f)?c/n.i:n.f;var g,f=-1;if(n.o&&0<n.b.length&&h&&(n.D||d>c)){for(d=0,f=n.b.length;d<f&&n.b[d].sj()<=h;)d++;u/=c,d=Math.max(d-1,0)||0,c=n.b.length,f=-1;for(var b=d;b<c;b++)if(n.b[b].sj()>=u){f=b;break}0>f&&d<c&&(f=c-1)}if(0>f?(u=null,n.G=h?s(h):{unit:"millisecond",count:1}):(u=n.b[f],n.G=p(u)),n.K=!!u,(n=u)?(h=n.D+n.b.toFixed(0))in t.P?g=t.P[h]:t.P[h]=g=new y:g=t.f,t=V(t,g,n)||l,r||g!=o||t){var v;if(o=C(g,e,i),g.P)for(v in a)t=a[v],l=e,r=i,h=o.Pw,u=o.kB,d=n,c=jt(t.Zc.Rd(),d),(t.D||c!=t.f||t.b.ki!=l||t.b.Wi!=r)&&(t.D=!1,t.f=c,t.i=!d,t.b=ht(c,l,r,h,u),$(t));else for(v in a)P(a[v],e,i,n);return[g,o]}return null},H=function(t,e,i,n){var s=e?t.Ba:t.i;return s.P&&!n?null:i?w(s,s.b.length?0:window.NaN,x(s)):(t=e?t.ba:t.b,w(s,t.rj,t.lastIndex))},z=function(e,i){return e.K||(e.K=new u,e.K.Ga("stock.scrollerGrouping"),e.K.U(e.K.oa,!0),t.K(e.K,e.B2,e)),t.p(i)?(e.K.N(i),e):e.K},V=function(t,e,i){if(e.yr()){for(var n in e.f.length=0,e.i=!0,t.aa){var s=jt(t.aa[n],i);e.f.push(s)}return e.update(),!0}return!1},q=function(t){V(t,t.f)},W=function(t,e){var i=t.Wm().Cn();eo(e,t.b.ki,t.b.Wi,i.unit,i.count,t.b.Xm)},K=function(t,e){var i=t.D,n=t.fb,s=t.sb;e.ea=t.o,e.ba=i,e.i=n,e.aa=s,e.va(256)},Y=function(t){return V(t,t.i),t.i.zi(t.b.rj)},X=function(t){return V(t,t.i),t.i.zi(t.b.lastIndex)},J=function(t){return(0,window.isNaN)(t.b.Pw)&&!(0,window.isNaN)(t.b.ki)},Z=function(t){return(0,window.isNaN)(t.b.kB)&&!(0,window.isNaN)(t.b.ki)},Q=function(e){t.hx.call(this,e),t.T(this.ua,[["scrollOnMouseWheel",0,0]])},tt=function(e,i){t.Y.call(this),this.Ga(t.ur.axis),this.b=e,this.Oa=this.Ia=this.rc=this.Da=null,this.f=!i,t.T(this.ua,[["height",4,9],["showHelperLabel",16,1],["overlapMode",16,1]])},et=function(){t.Y.call(this),this.D=this.G=this.o=this.K=null,t.T(this.ua,[["value",4,1],["valueField",4,1],["stroke",20,1],["fallingStroke",20,1],["risingStroke",20,1]])},it=function(e,i,n){i=t.p(i)?i:e.oa,e.o||(e.o=new t.Pu,t.K(e.o,e.AR,e),e.i=e.o.add(null,null,0),e.i.zIndex(1),e.o.I(4294967295)),e.G||(e.G=new t.Pu,t.K(e.G,e.AR,e),e.G.I(4294967295)),e.D||(e.D=new t.Pu,t.K(e.D,e.AR,e),e.D.I(4294967295)),e.o.ga(!!n,i.label),e.G.ga(!!n,i.risingLabel),e.D.ga(!!n,i.fallingLabel)},nt=function(){t.kz.call(this)},st=function(e){t.sD.call(this),this.b=e,this.P=null},at=function(t){this.pc=t,this.f=[],this.b=0},ot=function(t){this.b=[],this.P=t,this.Ha=[],this.na=0,this.Ba=[],this.ea=0,this.i=-1,this.G=null},rt=function(t){t.G=null,t.Ha.length=0,t.na=0,t.Ba.length=0,t.ea=0},lt=function(e,i,n,s,a,o,r){var l;if(t.ea(n)){var h=Math.min(i.values.length,n);for(l=0;l<h;l++)(n=t.N(i.values[l]))<s[l]&&(s[l]=n),n>a[l]&&(a[l]=n)}else for(l in n)(n=t.N(i.values[l]))<s[l]&&(s[l]=n),n>a[l]&&(a[l]=n);for(l=0;l<=e.i;l++)i.f&&((n=t.N(i.f[l]))<o[l]&&(o[l]=n),n>r[l]&&(r[l]=n))},ht=function(e,i,s,a,o){var r,l=e.b.length;if(l){for(r=0;r<e.Ha.length;r++){var h=e.Ha[(e.na-r-1+4)%4];if(h.ki==i&&h.Wi==s)return h}if((0,window.isNaN)(a))if((0,window.isNaN)(o))var c=0,u=l-1;else o?(c=0,u=o-1):c=u=window.NaN;else(0,window.isNaN)(o)?a==l-1?c=u=window.NaN:(c=a+1,u=l-1):1==o-a?c=u=window.NaN:(c=a+1,u=o-1);var d=e.b[a]||null;h=e.b[c]||null;var p=e.b[u]||null,g=e.b[o]||null}else h=p=d=g=null,c=u=a=o=window.NaN;var f,b,v,m,y=e.fU(),S=t.ea(y);if(d||h||g){var w=!d&&!g;if(w&&e.G)var x=f=e.G.UN,C=b=e.G.SN,D=v=e.G.fL,T=m=e.G.eL;else{for(x=n(y,window.Infinity,!0),C=n(y,-window.Infinity,!0),D=n(e.i+1,window.Infinity),T=n(e.i+1,-window.Infinity),f=d?d.next:h;f&&f!=g;)lt(e,f,y,x,C,D,T),f=f.next;if(f=t.Qc(x),b=t.Qc(C),v=t.Ja(D,0),m=t.Ja(T,0),d&&lt(e,d,y,f,b,v,m),g&&lt(e,g,y,f,b,v,m),S)for(r=0;r<y;r++)x[r]==Number.POSITIVE_INFINITY&&(x[r]=window.NaN),C[r]==Number.NEGATIVE_INFINITY&&(C[r]=window.NaN),f[r]==Number.POSITIVE_INFINITY&&(f[r]=window.NaN),b[r]==Number.NEGATIVE_INFINITY&&(b[r]=window.NaN);else for(r in y)x[r]==Number.POSITIVE_INFINITY&&(x[r]=window.NaN),C[r]==Number.NEGATIVE_INFINITY&&(C[r]=window.NaN),f[r]==Number.POSITIVE_INFINITY&&(f[r]=window.NaN),b[r]==Number.NEGATIVE_INFINITY&&(b[r]=window.NaN);for(r=0;r<=e.i;r++)D[r]==Number.POSITIVE_INFINITY&&(D[r]=window.NaN),T[r]==Number.NEGATIVE_INFINITY&&(T[r]=window.NaN),v[r]==Number.POSITIVE_INFINITY&&(v[r]=window.NaN),m[r]==Number.NEGATIVE_INFINITY&&(m[r]=window.NaN);w&&(e.G={UN:t.Qc(x),SN:t.Qc(C),fL:t.Ja(D,0),eL:t.Ja(T,0)})}}else x=C=f=b=n(y,window.NaN,!0),D=T=v=m=n(e.i,window.NaN);return h={ki:i,Wi:s,Pw:a,rj:c,lastIndex:u,kB:o,xO:d,IT:h,A3:p,aJ:g,UN:f,SN:b,eL:m,fL:v,d7:x,c7:C,Y6:T,Z6:D},l&&(e.Ha[e.na]=h,e.na=(e.na+1)%4),h},ct=function(t){var e=t.b.length;return e?ht(t,t.b[0].key,t.b[e-1].key,window.NaN,window.NaN):ht(t,window.NaN,window.NaN,window.NaN,window.NaN)},ut=function(e,i,n){n=n||"exact";for(var s=0;s<e.Ba.length;s++){var a=e.Ba[(e.ea-s-1+2)%2];if(a.key==i&&a.mode==n)return a.index}if(0>(s=t.Oa(e.b,b,i)))if(s=~s,"exact-or-next"==n)s=s<e.b.length?s:window.NaN;else if("exact-or-prev"==n)s=0<s?s-1:window.NaN;else{if("nearest"==n)return n=e.b.length,s?s<n?i-(e=e.b[s]).b.key<e.key-i?s-1:s:n?n-1:window.NaN:n?0:window.NaN;s=window.NaN}return e.Ba[e.ea]={key:i,mode:n,index:s},e.ea=(e.ea+1)%2,s},dt=function(t,e){ot.call(this,t),this.D=e||null,this.f=Rr,this.o=0},pt=function(e,i,n,s,a,o){var r;if(a=a?e.o:n.length,i=t.p(o)?i[0<=(o=t.Oa(i,b,o))?o:~o]:i[0])if(o=e.b[e.b.length-1]||null,s){s.f.setTime(i.key),s.i();var l=s.next();do{for(var h=s.next(),c=!1;i&&((0,window.isNaN)(h)||i.key<h);){for(c=!0,r=0;r<a;r++){var u=n[r];u.b(i.values[u.o],i.values[u.D],i.values)}i=i.next}if(c){for(u=Array(a),r=0;r<a;r++)u[r]=n[r].f();r=new g(l,u),o&&(o.next=r),r.b=o,e.b.push(r),o=r}l=h}while(i)}else do{for(r=0;r<a;r++)(u=n[r]).b(i.values[u.o],i.values[u.D],i.values);for(u=Array(a),r=0;r<a;r++)u[r]=n[r].f();r=new g(i.key,u),o&&(o.next=r),r.b=o,e.b.push(r),o=r,i=i.next}while(i)},gt=function(e,i,n,s,a,o){ot.call(this,e),this.f=[],this.o=this.Z4,this.K=0,this.aa=!1,this.sb=t.z(i)?i:t.P(i,0,!0),this.Za=n,this.$a=t.N(s)||0,this.Ka=t.ma(a)?a.getTime():t.N(a),this.fb=o||null,this.ba=0,this.D=null},ft=function(e,i){if(t.A(i))i=t.Ja(i,0);else if(t.C(i)){var n=i;for(var s in i={},n)i[s]=n[s]}else i=null;return n=t.ps(i[e.sb],e.Za,(0,window.isNaN)(e.Ka)?null:new Date(e.Ka),e.fb),(s=!(!i||!n))&&(e.$a&&n.setTime(n.getTime()+36e5*e.$a),e.o(new g(n.getTime(),i))),s},bt=function(t){return t.o==t.iX&&(t.f.sort(f),t.o=t.X4),t.o!=t.Y4},vt=function(e,i){var n,s=e.b.length-1;if(0<=s)var a=e.b[s],o=a.key;else a=null,o=window.NaN;for(;n=i.next();)if(!n.i){var r;if(n.key==o?(e.b[s]=n,n.b=a.b):(e.b.push(n),n.b=a,o=n.key,s++),n.b&&(n.b.next=n),a=n,t.A(n.values)){if(n=n.values.length,e.ba<n){if(e.D)for(r=e.ba;r<n;r++)e.D[r]=!0;e.ba=n}}else{if(!e.D)for(e.D={},r=0;r<e.ba;r++)e.D[r]=!0;for(r in n.values)e.D[r]=!0}}a&&(a.next=null)},mt=function(e,i,n,s,a){this.pc=e||[],this.o=i||[],s=t.N(s),a=t.N(a),(0,window.isNaN)(a)?this.next=this.wia:(this.next=this.Ida,this.D=a),e=(0,window.isNaN)(s)?0:t.Oa(this.pc,b,s),this.f=this.pc[0>e?~e:e],n?(this.i=this.iia,this.b=(0,window.isNaN)(s)?0:t.Oa(this.o,b,s),0>this.b&&(this.b=~this.b)):(this.i=this.kia,this.b=(0,window.isNaN)(s)?this.o.length-1:t.Oa(this.o,v,s),0>this.b&&(this.b=~this.b-1))},yt=function(e,i){t.od.call(this),this.Zc=e,this.Ad=i,this.f={},this.b=t.ll,this.i=this.o=t.ia},St=function(t,e,i,n){_.call(this,t,e.Zc,i,n,{}),this.o=e},wt=function(e,i){if(t.V.call(this),this.gz=e,this.fD={},t.C(i)){for(var n in this.gz.ka(),i){var s=i[n];t.C(s)?this.Td(n,s.column,s.type,s.context||s.weights):(t.ea(s)||t.z(s))&&this.Td(n,s)}this.gz.da(!0)}},xt=function(t,e){return e in t.fD?t.fD[e].p5:window.NaN},Ct=function(t,e){return e in t.fD?t.fD[e].g6:window.NaN},Dt=function(e,i){t.od.call(this),this.o=e,this.D=t.p(i)?i:window.NaN,this.clear()},Tt=function(t){Dt.call(this,t)},kt=function(t,e){this.i=e,Dt.call(this,t)},$t=function(t,e,i){this.G=e,this.i=i,Dt.call(this,t)},Ot=function(t){Dt.call(this,t)},Pt=function(t){Dt.call(this,t)},Lt=function(t){Dt.call(this,t)},Gt=function(t){Dt.call(this,t)},Ft=function(t){Dt.call(this,t)},It=function(t){Dt.call(this,t)},Et=function(t){Dt.call(this,t)},At=function(t){Dt.call(this,t)},Ut=function(t,e){Dt.call(this,t,e)},_t=function(e,i,n,s,a){t.V.call(this),this.pc=new gt(this,e,i,n,s,a),this.dv={},this.rS={},this.Wz={},this.kG=0,this.Xw=[],this.zF=[],this.Sx=[],this.lG=[]},jt=function(t,e){var i;if(e){var n=e.D+e.b.toFixed(0);n in t.dv?i=t.dv[n]:t.dv[n]=i=new dt(t,e)}else i=t.pc;return i.update(),i},Mt=function(e,i,n){for(var s in e.dv){var a=e.dv[s];(a.f|i)!=a.f?(a.f|=i,a=!0):a=!1,n=a||n}n&&(t.Pp++,e.va(16),t.Sp())},Nt=function(e,i,n,s){t.eB.call(this,e,i,n,s),this.f=this.D=this.aa=this.la=this.ba=null,this.K=!1,this.P=null,this.o0=!1},Bt=function(e){var i,n=e.bb();e.check(64)&&!e.gh()&&t.J(n,t.Mt)&&"none"!=n.Vz()&&(i=E(e.la,n.x0(),e.bf.El)),e.Rx=Number(i&&i.get(e.bf.El))||0},Rt=function(e){e.f=null,e.K=!1,Ht(e,t.gm),e.$().reset()},Ht=function(e,i){if(e.G&&e.enabled()){var n=e.$();if(n.Iu(e.G.Af,e.G.ma()),e.ya.vt){e.eh()&&e.Rf.Mo(i,n.j("shapes"));var s=n.j(t.J(e.Rf,t.WA)?"shapes":"shapeNames");e.Rf.VB(i,s),e.bf.aF(n,i)}e.check(4194304)&&e.gq(n,i,!0),i==t.gm&&(e.G=null)}},zt=function(e,i){return"number"==typeof i?t.Bs(i,e.ba||void 0):i},Vt=function(){this.la=[],this.f=(0,t.pa)(this.f,this)},qt=function(t,e){return t.key-e.key||t.index-e.index},Wt=function(t,e,i,n){this.la=t,this.P=e,this.G=i,this.K=n,this.reset()},Kt=function(e,i){var n,s=t.Na(e.la,i,(function(t,e){return t-e.index}));if(n=0<=s){var a=e.la[s];e.b=s,e.o=a.PG,e.D=a.items.length,e.i=0}else e.D=0,e.b=e.la.length,e.i=0,e.o=window.NaN;return n},Yt=function(t){return t.b<t.la.length?t.la[t.b].index:window.NaN},Xt=function(e,i){t.Y.call(this),this.jf=e,this.index=i,this.xG=new Vt,this.jm=new t.WA(this,[t.RH,$r],!1),this.ca=new t.my(this,el,t.gm,Xr),this.ca.ta("connectorAfterInitCallback",o),this.za=new t.my(this,nl,t.gm,Xr),this.Ea=new t.my(this,nl,t.gm,Xr),this.Da=new t.Pu,this.Da.kb(this),t.T(this.ua,Kr),this.hB=[],this.Vda=t.cm("stroke",2,!0,!0)},Jt=function(t,e,i,n){e.j("positionHash")==i&&(t.Da.be(e.ma()).Vd().translate(0,n),e.j("shapes").path.translate(0,n),e.j("shapes").overlay.translate(0,n),e.j("offset",Number(e.j("offset"))-n))},Zt=function(e,i){var n,s=e.jf.xc().Ra(),a=e.$(),o=(n=Number(a.j("state"))||t.gm)?1==n?30:20:e.zIndex()+3e-6*a.ma(),r=e.sc("type",n,a,t.Rk,!1),l=e.tZ[r],h=e.sc("position",0,a,t.Tk,!1,void 0,!0),c=window.NaN,u=e.sc("direction",n,a,t.Sk,!1,void 0,!0),d="",p="";if("axis"!=h){d=e.sc("seriesId",0,a,t.zq,!1,void 0,!0);var g,f=e.jf.ef(d)||e.jf.Ai(0);if(f&&(g=O(f.la,Yt(a)))&&!g.j("missing")){if("zero"==h){p="zero";var b=0}else p=e.sc("fieldName",0,a,t.zq,!1,void 0,!0),b=Number(g.get(p));"series-positive"==h&&0>b||"series-negative"==h&&0<b?(b=0,c=Number(g.j("zero")),(0,window.isNaN)(c)&&(c=f.Qe(f.bb().transform(0),!1)),h=(c=t.Za(c,e.fa.top,e.fa.top+e.fa.height))==e.fa.top+e.fa.height?"axis":"zero"):(c=Number(g.j(p)),(0,window.isNaN)(c)&&!(0,window.isNaN)(b)&&(c=f.Qe(f.bb().transform(b),!1)),c=t.Za(c,e.fa.top,e.fa.top+e.fa.height)),"auto"==u&&(u=0>b||!b&&"series-negative"==h?"down":"up")}}(0,window.isNaN)(c)&&(c=e.fa.top+e.fa.height,h="axis",u="up"),u="down"!=u,h+="axis"==h?"":d+p+(u?"U":"D"),a.j("positionHash",h),p=s.transform(a.Gh(),.5)*e.fa.width+e.fa.left,s=(i?i[h]:Number(a.j("offset")))||0,a.j("offset",s),d=0;var v=e.Vda(e,n);if(!s&&v&&(s+=d=t.L(e.sc("length",n,a,t.br,!0),e.fa.height)),c+=u?-s:s,f={group:e,index:a.ma()},i){var m=e.jm.ed(n,null,o);g=m.path,b=m.overlay,a.j("shapes",m)}else g=(m=a.j("shapes")).path,b=m.overlay,e.jm.Mo(n,m),e.jm.zt(o,m),g.parent(e.O()),g.clear(),g.oc(1,0,0,1,0,0),b.parent(e.O()),b.clear(),b.oc(1,0,0,1,0,0);return m=t.$b(g.stroke()),p=t.R(p,m),c=t.R(c,m),g.tag=f,b.tag=f,d&&v&&((v=e.jf.qj().Jt(p,c,c-(u?-d:d),v,i?void 0:a.j("connectorPath"))).tag=f,a.j("connectorPath",v)),l(g,p,c,m=Math.round(t.L(e.sc("width",n,a,t.br,!1),e.fa.width)),v=Math.round(t.L(e.sc("height",n,a,t.br,!1),e.fa.height)),u),e.ke(a,n,r,p,c,m,v,u,o+1e-6,!i).Vd().tag=f,(0,e.tZ["flag"==r?"flag":"rect"])(b,p,c,m,v,u),s+=v,n=v+d-Number(a.j("totalHeight")||0),a.j("totalHeight",v+d),[h,i?s:u?-n:n]},Qt=function(e,i,n){for(var s=0;s<e.length;s++){var a=e[s];if(t.C(a)&&null!=(a=a[i]))return n(a)}},te=function(e,i){t.Y.call(this),this.Ga("stock.eventMarkers"),t.K(i,this.y4,this),this.f=e,this.b=[],this.i={},this.o=[],this.ca=new t.my(this,el,t.gm,Xr),this.ca.ta("connectorAfterInitCallback",o),this.ca.Ga("defaultFontSettings","stock.eventMarkers.normal"),this.za=new t.my(this,nl,t.gm,Xr),t.W(this,"hovered",this.za),this.Ea=new t.my(this,nl,t.gm,Xr),t.W(this,"selected",this.Ea),t.T(this.ua,Kr),this.hB=[],t.su(this,this)},ee=function(e,i,n,s){var a=4*Math.min(i,t.wo)+2*n+!s,o=e.hB[a];if(!o){if(o=e.f.xc().qj(),i)if(1==i)var r=e.za,l=o.lb();else r=e.Ea,l=o.selected();else r=e.ca,l=o.Qa();s&&(r=r.Zf(),l=l.Zf()),o=n?[i||s?null:e.oa,i||s?null:o.oa,r.oa,l.oa]:[i||s?null:e.Pa,i||s?null:o.Pa,r.Pa,l.Pa],e.hB[a]=o}return o},ie=function(t){t.Qn||(t.Qn=[]);for(var e;e=t.o.pop();)e.clear(),e.parent(null),t.Qn.push(e)},ne=function(e,i,n,s,a){var o=i.$();if(o.select(n)){if(n=Number(o.j("state")||0),t.p(a)&&n!=a)return!1;if(n!=s){if(o.j("state",s),s=(a=Zt(i))[1]){for(a=a[0],n=Yt(o);o.advance()&&Yt(o)==n;)Jt(i,o,a,s);for(var r=i.index+1;r<e.b.length;r++)if((i=e.b[r])&&i.enabled()&&Kt(o=i.$(),n))do{Jt(i,o,a,s)}while(o.advance()&&Yt(o)==n)}return!0}}return!1},se=function(e){t.od.call(this),this.D=e[0],this.Zc=e[1],this.Sa={},this.pa=this.f=null},ae=function(t,i,n,s){t.Sa[i]={X:null,kk:e(n,s),ZD:!1,mapping:null,qV:!1}},oe=function(i,n,s){return(n=i.Sa[n])?t.p(s)?((s=e(s,n.kk))!=n.X.kk()&&(n.kk=s,n.ZD=!1,n.qV=!0,re(i)),i):n.X:t.p(s)?i:null},re=function(e){for(var i in e.pa||(e.pa=e.D.xc()),e.f||(e.f=e.Cc(e.Zc,e.pa)),e.pa.ka(),e.Sa){var n=e.Sa[i];n.X||(n.X=e.D.Ae(n.kk),n.X.ba=2,n.ZD=!1),n.X.ka(),n.qV&&(n.X.kk(n.kk),n.qV=!1),n.mapping||(n.mapping=e.Zc.Rd().Yd(),e.Xn(n.mapping,e.f,i)),n.ZD||(n.X.data(n.mapping),t.D(n.X.name)&&n.X.name(e.Gf(i)),n.ZD=!0),n.X.da(!0)}e.D.xc().da(!0)},le=function(e){for(var i in e.Sa){var n=e.Sa[i];n.ZD=!1,t.qd(n.mapping),n.mapping=null}t.qd(e.f),e.f=null,re(e)},he=function(e){this.i=t.P(e,256,!1),this.pc=[],this.b=this.f=0},ce=function(t){return new he(t)},ue=function(){return{wd:0,dispose:function(){}}},de=function(t){t.wd=0},pe=function(t,e,i,n,s){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e)||(0,window.isNaN)(s))return window.NaN;var a=i-n,o=t.wd;return a&&(o+=(e-n-(i-e))/a*s,t.wd=o),o},ge=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=pe(i,n,s,a,o),e.set("result",n)},fe=function(t){return(t=t.Rd().Cc(t)).Cf({wd:0,dispose:function(){}}),t.Df(de),t.Bf(ge),t.cd("result"),t},be=function(t){se.call(this,t),ae(this,"main",t[2]),re(this)},ve=function(e,i,n){if(e=t.P(e,20,!1),(i=t.P(i,2,!1))>(n=t.P(n,30,!1))){var s=i;i=n,n=s}return{Wb:ce(e+1),ub:e,ix:n,Nv:i,zu:window.NaN,wd:window.NaN,dispose:function(){this.Wb.clear()}}},me=function(t){t.Wb.clear(),t.wd=window.NaN},ye=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s,a=(0,window.isNaN)(n);if(a||(s=i.Wb.enqueue(n)),a||i.Wb.Jg()<=i.ub)n=window.NaN;else{var o=2/(i.ix+1),r=2/(i.Nv+1);n=i.Wb.get(-1);var l=i.Wb.get(0);if(a=i.Wb.get(-2),(0,window.isNaN)(i.wd)||(0,window.isNaN)(i.zu)){for(i.zu=0,s=1;s<=i.ub;s++)i.zu+=Math.abs(i.Wb.get(s)-i.Wb.get(s-1));s=i.zu?(s=Math.abs(n-l)/i.zu)*(r-o)+o:o,n=a+s*s*(n-a)}else i.zu+=Math.abs(n-a)-Math.abs(l-s),s=i.zu?(s=Math.abs(n-l)/i.zu)*(r-o)+o:o,n=i.wd+s*s*(n-i.wd);i.wd=n}e.set("result",n)},Se=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(ve(e,i,n)),t.Df(me),t.Bf(ye),t.cd("result"),t},we=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),this.o=t.P(e[4],30,!1),ae(this,"main",e[5]),re(this)},xe=function(e){return e=t.P(e,20,!1),{Wb:ce(e),ub:e,wd:window.NaN,dispose:function(){this.Wb.clear()}}},Ce=function(t){t.Wb.clear(),t.wd=window.NaN},De=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ke(i,n),e.set("result",n)},Te=function(t,e){var i=t.Rd().Cc(t);return i.Cf(xe(e)),i.Df(Ce),i.Bf(De),i.cd("result"),i},ke=function(t,e){if((0,window.isNaN)(e))return window.NaN;var i;if(t.Wb.enqueue(e),t.Wb.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.wd)){for(var n=i=0;n<t.ub;n++)i+=t.Wb.get(n);i/=t.ub}else i=t.Wb.get(-1),i=t.wd+2/(t.ub+1)*(i-t.wd);return t.wd=i},$e=function(e){return e=t.P(e,20,!1),{Wb:ce(e),ub:e,wd:window.NaN,BG:window.NaN,dispose:function(){this.Wb.clear()}}},Oe=function(t){t.Wb.clear(),t.wd=window.NaN,t.BG=window.NaN},Pe=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=Ge(i,n),e.set("result",n)},Le=function(t,e){var i=t.Rd().Cc(t);return i.Cf($e(e)),i.Df(Oe),i.Bf(Pe),i.cd("result"),i},Ge=function(t,e){if((0,window.isNaN)(e))return t.BG=window.NaN;var i=t.Wb.enqueue(e);if(t.BG=i,t.Wb.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.wd)){for(var n=i=0;n<t.ub;n++)i+=t.Wb.get(n);i/=t.ub}else n=t.Wb.get(-1),i=t.wd+(n-i)/t.ub;return t.wd=i},Fe=function(e,n,s){if(e=t.P(e,5,!1),n=t.P(n,34,!1),"sma"==(s=i(s,"sma")))var a=$e,o=Ge;else a=xe,o=ke;return{Mv:a(e),hx:a(n),vo:o,al:s,dispose:function(){this.Mv.dispose(),this.hx.dispose()}}},Ie=function(t){"sma"==t.al?(Oe(t.Mv),Oe(t.hx)):(Ce(t.Mv),Ce(t.hx))},Ee=function(t,e,i){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:(i=(e+i)/2,(e=t.vo(t.Mv,i))-(t=t.vo(t.hx,i)))},Ae=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Ee(i,n,s),e.set("result",n)},Ue=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Fe(e,i,n)),t.Df(Ie),t.Bf(Ae),t.cd("result"),t},_e=function(e){se.call(this,e),this.b=t.P(e[2],5,!1),this.i=t.P(e[3],34,!1),this.o=i(e[4],"sma"),ae(this,"main",e[5],"stick"),re(this);var n=new t.V;n.Ga("chart.defaultSeriesSettings.base.normal","stock.defaultPlotSettings.defaultSeriesSettings.base.normal","chart.defaultSeriesSettings.lineLike.normal","stock.defaultPlotSettings.defaultSeriesSettings.lineLike.normal","chart.defaultSeriesSettings.ohlc.normal","stock.defaultPlotSettings.defaultSeriesSettings.ohlc.normal"),e=n.oa.risingStroke,n=n.oa.fallingStroke,this.X().risingStroke(e),this.X().fallingStroke(n),this.X().risingFill(e),this.X().fallingFill(n)},je=function(e){return(e=$e(t.P(e,14,!1))).yO=window.NaN,e},Me=function(t){Oe(t),t.yO=window.NaN},Ne=function(t,e,i,n){return(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e)?window.NaN:(i=Ge(t,Math.max(i,t.yO)-Math.min(n,t.yO)),t.yO=e,i)},Be=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Ne(i,n,s,a),e.set("result",n)},Re=function(t,e){var i=t.Rd().Cc(t);return i.Cf(je(e)),i.Df(Me),i.Bf(Be),i.cd("result"),i},He=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),ae(this,"main",e[3]),re(this)},ze=function(e){return e=t.P(e,25,!1),{Ye:ce(e+1),Mf:ce(e+1),ub:e,dispose:function(){this.Ye.clear(),this.Mf.clear()}}},Ve=function(t){t.Ye.clear(),t.Mf.clear()},qe=function(t,e,i){var n=(0,window.isNaN)(e)||(0,window.isNaN)(i);if(n||(t.Ye.enqueue(e),t.Mf.enqueue(i)),e=t.Ye.Jg(),n||e<=t.ub)return[window.NaN,window.NaN];var s=0,a=t.Ye.get(0);for(n=1;n<e;n++)(i=t.Ye.get(n))>a&&(a=i,s=n);var o=100*s/t.ub;for(s=0,a=t.Mf.get(0),n=1;n<e;n++)(i=t.Mf.get(n))<a&&(a=i,s=n);return[o,100*s/t.ub]},We=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=qe(i,n,s),e.set("upResult",n[0]),e.set("downResult",n[1])},Ke=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ze(e)),i.Df(Ve),i.Bf(We),i.cd("upResult"),i.cd("downResult"),i},Ye=function(e){se.call(this,e),this.b=t.P(e[2],25,!1),this.o=e[3],this.i=e[4],ae(this,"range",e[5],"range-area"),re(this),this.DR().lowFill((function(){return t.Ul(t.Ql(this.sourceColor,.6),.65)})),this.DR().lowStroke((function(){return t.Ul(t.Ql(this.sourceColor),1)}))},Xe=function(e){return ze(t.P(e,25,!1))},Je=function(t){Ve(t)},Ze=function(t,e,i){return t=(e=qe(t,e,i))[0],e=e[1],(0,window.isNaN)(t)||(0,window.isNaN)(e)?window.NaN:t-e},Qe=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Ze(i,n,s),e.set("result",n)},ti=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Xe(e)),i.Df(Je),i.Bf(Qe),i.cd("result"),i},ei=function(e){se.call(this,e),this.b=t.P(e[2],25,!1),ae(this,"main",e[3],"area"),re(this)},ii=function(e,i){var n=$e(t.P(e,20,!1));return n.jo=t.P(i,2,!1),n.Qw=window.NaN,n},ni=function(t){Oe(t),t.Qw=window.NaN},si=function(t,e){var i=t.wd,n=Ge(t,e);if((0,window.isNaN)(n))return[window.NaN,window.NaN,window.NaN];var s,a=t.Wb,o=t.ub;if((0,window.isNaN)(i))for(i=s=0;i<o;i++){var r=a.get(i)-n;s+=r*r}else s=t.BG-i,r=a.get(-1)-n,a=i-n,s=t.Qw+o*a*a+a*(n+i)-2*t.BG*a+r*r-s*s;return 0>s&&(s=0),t.Qw=s,[n,n+(s=Math.sqrt(s/o)*t.jo),n-s]},ai=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s=(n=si(i,n))[1],a=n[2];e.set("middleResult",n[0]),e.set("upperResult",s),e.set("lowerResult",a)},oi=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(ii(e,i)),t.Df(ni),t.Bf(ai),t.cd("upperResult"),t.cd("lowerResult"),t.cd("middleResult"),t},ri=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),ae(this,"middle",e[4]),ae(this,"upper",e[5]),ae(this,"lower",e[6]),ae(this,"range",e[7],"range-area"),re(this)},li=function(e,i){var n=t.P(e,20,!1);return{Wb:ce(n),ub:n,jo:t.P(i,2,!1),wd:window.NaN,Qw:window.NaN,dispose:function(){this.Wb.clear()}}},hi=function(t){t.Wb.clear(),t.wd=window.NaN,t.Qw=window.NaN},ci=function(e,i){var n=i.Wb,s=i.ub,a=e.get("value");a=t.p(a)?a:e.get("close"),a=t.N(a);var o,r=(0,window.isNaN)(a);if(r||(o=n.enqueue(a)),a=0,r||n.Jg()<s)a=window.NaN;else{if((0,window.isNaN)(i.wd)){for(o=0;o<s;o++)a+=n.get(o);for(i.wd=a/s,o=a=0;o<s;o++)a+=(r=n.get(o)-i.wd)*r;0>a&&(a=0),i.Qw=Math.sqrt(a/s),a=i.Qw*i.jo}else{a=(n.get(-1)-o)/s;var l=i.wd;r=i.Qw,i.wd=l+a,a=r*r*s;var h=o-l;r=n.get(-1)-i.wd;var c=l-i.wd;0>(a=a+s*c*c+c*(i.wd+l)-2*o*c+r*r-h*h)&&(a=0),r=Math.sqrt(a/s),i.Qw=r,a=r*i.jo}s=i.wd+a,a=i.wd-a,a=(n.get(-1)-a)/(s-a)}e.set("result",a)},ui=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(li(e,i)),t.Df(hi),t.Bf(ci),t.cd("result"),t},di=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),ae(this,"main",e[4]),re(this)},pi=function(t){ni(t)},gi=function(t,e){var i=si(t,e);return(i[1]-i[2])/i[0]},fi=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),e.set("result",gi(i,n))},bi=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(ii(e,i)),t.Df(pi),t.Bf(fi),t.cd("result"),t},vi=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),ae(this,"main",e[4]),re(this)},mi=function(e){return $e(t.P(e,20,!1))},yi=function(t){Oe(t)},Si=function(t,e,i,n){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e))return window.NaN;i=Ge(t,e=(i+n+e)/3);for(var s=n=0;s<t.ub;s++)n+=Math.abs(t.Wb.get(s)-t.wd);return(e-i)/(n/t.ub*.015)},wi=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Si(i,n,s,a),e.set("result",n)},xi=function(t,e){var i=t.Rd().Cc(t);return i.Cf(mi(e)),i.Df(yi),i.Bf(wi),i.cd("result"),i},Ci=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},Di=function(e,n,s){if((e=t.P(e,3,!1))>(n=t.P(n,10,!1))){var a=e;e=n,n=a}if(a={wd:0,dispose:function(){}},"sma"==(s=i(s,"ema"))){e=$e(e),n=$e(n);var o=Ge}else e=xe(e),n=xe(n),o=ke;return{UQ:a,Mv:e,hx:n,vo:o,al:s,dispose:function(){this.UQ.dispose(),this.Mv.dispose(),this.hx.dispose()}}},Ti=function(t){de(t.UQ),"sma"==t.al?(Oe(t.Mv),Oe(t.hx)):(Ce(t.Mv),Ce(t.hx))},ki=function(t,e,i,n,s){return(0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s)?window.NaN:(i=pe(t.UQ,e,i,n,s),(e=t.vo(t.Mv,i))-(t=t.vo(t.hx,i)))},$i=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=ki(i,n,s,a,o),e.set("result",n)},Oi=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Di(e,i,n)),t.Df(Ti),t.Bf($i),t.cd("result"),t},Pi=function(e){se.call(this,e),this.b=t.P(e[2],3,!1),this.i=t.P(e[3],10,!1),this.o=i(e[4],"ema"),ae(this,"main",e[5]),re(this)},Li=function(e){return e=t.P(e,20,!1),{bE:ce(e),Wu:ce(e),ub:e,Wy:window.NaN,mB:window.NaN,dispose:function(){this.bE.clear(),this.Wu.clear()}}},Gi=function(t){t.bE.clear(),t.Wu.clear(),t.Wy=window.NaN,t.mB=window.NaN},Fi=function(t,e,i,n,s){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e)||(0,window.isNaN)(s))return window.NaN;if(e=t.bE.enqueue(i==n?0:(e-n-(i-e))*s/(i-n)),s=t.Wu.enqueue(s),t.bE.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.Wy))for(t.Wy=0,s=t.mB=0;s<t.ub;s++)t.Wy+=t.bE.get(s),t.mB+=t.Wu.get(s);else t.Wy+=t.bE.get(-1)-e,t.mB+=t.Wu.get(-1)-s;return t.Wy/t.mB},Ii=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=Fi(i,n,s,a,o),e.set("result",n)},Ei=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Li(e)),i.Df(Gi),i.Bf(Ii),i.cd("result"),i},Ai=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},Ui=function(e){return e=t.P(e,20,!1),{Wb:ce(e+1),ub:e,dispose:function(){this.Wb.clear()}}},_i=function(t){t.Wb.clear()},ji=function(t,e){var i=(0,window.isNaN)(e);return i||t.Wb.enqueue(e),i||t.Wb.Jg()<=t.ub?i=window.NaN:(i=t.Wb.get(0),i=100*(t.Wb.get(-1)-i)/i),i},Mi=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ji(i,n),e.set("result",n)},Ni=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Ui(e)),i.Df(_i),i.Bf(Mi),i.cd("result"),i},Bi=function(e){return e=t.P(e,9,!1),{Wb:ce(e),ub:e,dispose:function(){this.Wb.clear()}}},Ri=function(t){t.Wb.clear()},Hi=function(t,e){if((0,window.isNaN)(e))return window.NaN;if(t.Wb.enqueue(e),t.Wb.Jg()<t.ub)return window.NaN;for(var i=2/(t.ub*(t.ub+1)),n=0,s=0;s<t.ub;s++)n+=t.Wb.get(s)*(s+1);return i*n},zi=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=Hi(i,n),e.set("result",n)},Vi=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Bi(e)),i.Df(Ri),i.Bf(zi),i.cd("result"),i},qi=function(e,i,n){return{PY:Bi(t.P(e,10,!1)),HT:Ui(t.P(i,11,!1)),CX:Ui(t.P(n,14,!1)),dispose:function(){this.PY.dispose(),this.HT.dispose(),this.CX.dispose()}}},Wi=function(t){Ri(t.PY),_i(t.HT),_i(t.CX)},Ki=function(t,e){var i=ji(t.HT,e),n=ji(t.CX,e);return(0,window.isNaN)(i)||(0,window.isNaN)(n)?window.NaN:(i=Hi(t.PY,i+n),(0,window.isNaN)(i)?window.NaN:i)},Yi=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=Ki(i,n),e.set("result",n)},Xi=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(qi(e,i,n)),t.Df(Wi),t.Bf(Yi),t.cd("result"),t},Ji=function(e){se.call(this,e),this.o=t.P(e[2],10,!1),this.b=t.P(e[3],11,!1),this.i=t.P(e[4],14,!1),ae(this,"main",e[5]),re(this)},Zi=function(e,i,n){return e=t.P(e,14,!1),i=t.P(i,14,!1),{Ye:ce(e+1),Mf:ce(e+1),Vo:ce(e+1),VQ:ce(i),ub:e,kC:i,XP:!t.p(n)||!!n,alpha:2/(e+1),T$:2/(i+1),xu:window.NaN,Gw:window.NaN,cv:window.NaN,YI:window.NaN,LI:window.NaN,SB:window.NaN,dispose:function(){this.Ye.clear(),this.Mf.clear(),this.Vo.clear(),this.VQ.clear()}}},Qi=function(t){t.Ye.clear(),t.Mf.clear(),t.Vo.clear(),t.VQ.clear(),t.xu=window.NaN,t.Gw=window.NaN,t.cv=window.NaN},tn=function(t,e,i,n,s,a,o,r,l){0>(n=i-n)&&(n=0),0>(a-=s)&&(a=0),n>a?a=0:n<a?n=0:a=n=0,(e=Math.max(Math.abs(i-s),Math.abs(i-e),Math.abs(s-e)))?(t.xu+=t.alpha*(100*n/e-t.xu),t.Gw+=t.alpha*(100*a/e-t.Gw)):(t.xu-=t.alpha*t.xu,t.Gw-=t.alpha*t.Gw),t.YI=t.YI+n-o,t.LI=t.LI+a-r,t.SB=t.SB+e-l},en=function(t,e,i,n){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e))return[window.NaN,window.NaN,window.NaN];var s=t.Ye,a=t.Mf,o=t.Vo,r=t.VQ;if(s.enqueue(i),a.enqueue(n),o.enqueue(e),s.Jg()<t.ub+1)return[window.NaN,window.NaN,window.NaN];if((0,window.isNaN)(t.xu))for(t.xu=0,t.Gw=0,t.YI=0,t.LI=0,t.SB=0,i=s.get(0),n=a.get(0),e=1;e<t.ub+1;e++){var l=i,h=n;i=s.get(e),n=a.get(e);var c=o.get(e-1);tn(t,c,i,l,n,h,0,0,0)}else i=s.get(-1),l=s.get(-2),n=a.get(-1),h=a.get(-2),c=o.get(-2),tn(t,c,i,l,n,h,t.YI/t.ub,t.LI/t.ub,t.SB/t.ub);if(t.XP?s=t.SB?0<(o=100*t.YI/t.SB)+(a=100*t.LI/t.SB)?100*Math.abs(o-a)/(o+a):0:a=o=0:(o=t.xu,a=t.Gw,s=100*Math.abs(o-a)/(o+a)),s=(o=[o,a,s])[0],a=o[1],o=o[2],(0,window.isNaN)(o))return[s,a,window.NaN];if(r.enqueue(o),r.Jg()<t.kC)return[s,a,window.NaN];if((0,window.isNaN)(t.cv)){for(e=o=0;e<t.kC;e++)o+=r.get(e);o/=t.kC,t.cv=o}else r=r.get(-1),t.cv=t.XP?t.cv+(r-t.cv)/t.kC:t.cv+t.T$*(r-t.cv);return[s,a,t.cv]},nn=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=en(i,n,s,a),e.set("pdiResult",n[0]),e.set("ndiResult",n[1]),e.set("adxResult",n[2])},sn=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Zi(e,i,n)),t.Df(Qi),t.Bf(nn),t.cd("pdiResult"),t.cd("ndiResult"),t.cd("adxResult"),t},an=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),this.i=t.P(e[3],14,!1),this.o=!t.p(e[4])||!!e[4],ae(this,"pdi",e[5]),ae(this,"ndi",e[6]),ae(this,"adx",e[7]),re(this)},on=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},rn=function(e,n,s){if(e=t.P(e,20,!1),n=t.P(n,10,!1),"ema"==(s=i(s,"ema")))var a=xe,o=ke;else a=$e,o=Ge;return{ub:e,jo:n,al:s,wp:a(e),vo:o,dispose:function(){this.wp.dispose()}}},ln=function(t){"ema"==t.al?Ce(t.wp):Oe(t.wp)},hn=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN];var i=t.vo(t.wp,e);return[i*(1+t.jo/100),i*(1-t.jo/100)]},cn=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=hn(i,n),e.set("upperResult",n[0]),e.set("lowerResult",n[1])},un=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(rn(e,i,n)),t.Df(ln),t.Bf(cn),t.cd("upperResult"),t.cd("lowerResult"),t},dn=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.o=t.P(e[3],10,!1),this.b=i(e[4],"ema"),ae(this,"upper",e[5]),ae(this,"lower",e[6]),re(this)},pn=function(){return{VI:ce(1),Vo:ce(1),dispose:function(){this.VI.clear(),this.Vo.clear()}}},gn=function(){this.VI.clear(),this.Vo.clear()},fn=function(t,e,i,n,s){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s))return[window.NaN,window.NaN,window.NaN,window.NaN];if(t.VI.Jg()){var a=t.VI.get(0),o=t.Vo.get(0);a=(a+o)/2,e=(e+i+n+s)/4,o=Math.max(i,a,e);var r=Math.min(n,a,e)}else a=e,o=i,r=n,e=(e+i+n+s)/4;return t.VI.enqueue(a),t.Vo.enqueue(e),[a,o,r,e]},bn=function(e,i){var n=t.N(e.get("open")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("close"));n=fn(i,n,s,a,o),e.set("haOpen",n[0]),e.set("haHigh",n[1]),e.set("haLow",n[2]),e.set("haClose",n[3])},vn=function(t){return(t=t.Rd().Cc(t)).Cf(pn()),t.Df(gn),t.Bf(bn),t.cd("haOpen"),t.cd("haHigh"),t.cd("haLow"),t.cd("haClose"),t},mn=function(t){se.call(this,t),ae(this,"main",t[2],"candlestick"),re(this)},yn=function(e,i,n){e=t.P(e,9,!1),i=t.P(i,26,!1),n=t.P(n,52,!1);var s=Math.max(e,i,n);return{rL:e,YF:i,NN:n,Ye:ce(s),Mf:ce(s),WV:ce(i),XV:ce(i),dispose:function(){this.Ye.clear(),this.Mf.clear(),this.WV.clear(),this.XV.clear()}}},Sn=function(t){t.Ye.clear(),t.Mf.clear(),t.WV.clear(),t.XV.clear()},wn=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low")),a=e.ma();n=Cn(i,n,s,a,e),e.set("conversionResult",n[0]),e.set("baseResult",n[1]),e.set("spanAResult",n[2]),e.set("spanBResult",n[3]),e.set("laggingResult",n[4])},xn=function(t,e,i,n){return Dl=t=t.Rd().Cc(t),t.Cf(yn(e,i,n)),t.Df(Sn),t.Bf(wn),t.cd("conversionResult"),t.cd("baseResult"),t.cd("spanAResult"),t.cd("spanBResult"),t.cd("laggingResult"),t},Cn=function(e,i,n,s,a){var o,r=window.NaN,l=window.NaN,h=window.NaN,c=window.NaN,u=window.NaN,d=a.Af;for(o=0;o<e.YF;o++)d=d&&d.next?d.next:null;if(d&&(u=t.N(new St(d,Dl,a.b,s).get("close"))),!(0,window.isNaN)(i)||!(0,window.isNaN)(n)){if(e.Ye.enqueue(i),e.Mf.enqueue(n),(s=e.Ye.Jg())>=e.rL){for(i=[],n=[],o=s-e.rL;o<s;o++)i.push(e.Ye.get(o)),n.push(e.Mf.get(o));r=((i=Math.max.apply(null,i))+(n=Math.min.apply(null,n)))/2}if(s>=e.YF){for(i=[],n=[],o=s-e.YF;o<s;o++)i.push(e.Ye.get(o)),n.push(e.Mf.get(o));l=((i=Math.max.apply(null,i))+(n=Math.min.apply(null,n)))/2}if(s>=e.NN){for(i=[],n=[],o=s-e.NN;o<s;o++)i.push(e.Ye.get(o)),n.push(e.Mf.get(o));i=Math.max.apply(null,i),n=Math.min.apply(null,n),h=e.WV.enqueue((r+l)/2),c=e.XV.enqueue((i+n)/2)}}return[r,l,h,c,u]},Dn=function(e){se.call(this,e),this.i=t.P(e[2],9,!1),this.b=t.P(e[3],26,!1),this.o=t.P(e[4],52,!1),ae(this,"conversion",e[5]),ae(this,"base",e[6]),ae(this,"leading",e[7],"range-area"),ae(this,"lagging",e[8]),re(this),this.D3().fill((function(){var e=this.getData("low");return this.getData("high")>=e?{color:this.sourceColor,opacity:.2}:{color:t.Ql(this.sourceColor,.7),opacity:.2}}))},Tn=function(e,n,s,a,o){if(e=t.P(e,14,!1),a=i(a,"sma"),n=t.P(n,1,!1),o=i(o,"sma"),s=t.P(s,3,!1),"sma"==a)var r=$e,l=Ge;else r=xe,l=ke;if("sma"==o)var h=$e,c=Ge;else h=xe,c=ke;return{Ye:ce(e),Mf:ce(e),TD:e,gI:a,GN:r(n),kha:l,vG:o,DL:h(s),fea:c,dispose:function(){this.Ye.clear(),this.Mf.clear(),this.GN.dispose(),this.DL.dispose()}}},kn=function(t){t.Ye.clear(),t.Mf.clear(),"sma"===t.gI?Oe(t.GN):Ce(t.GN),"sma"===t.vG?Oe(t.DL):Ce(t.DL)},$n=function(t,e,i,n){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n))return[window.NaN,window.NaN];var s,a=t.Ye,o=t.Mf;if(a.enqueue(i),o.enqueue(n),a.Jg()<t.TD)e=window.NaN;else{for(i=Number.MAX_VALUE,n=-Number.MIN_VALUE,s=0;s<t.TD;s++){var r=a.get(s),l=o.get(s);n<r&&(n=r),i>l&&(i=l)}e=100*(e-i)/(n-i)}return[e=t.kha(t.GN,e),t=t.fea(t.DL,e)]},On=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));s=(n=$n(i,n,s,a))[1],e.set("kResult",n[0]),e.set("dResult",s)},Pn=function(t,e,i,n,s,a){return(t=t.Rd().Cc(t)).Cf(Tn(e,i,n,s,a)),t.Df(kn),t.Bf(On),t.cd("kResult"),t.cd("dResult"),t},Ln=function(e,n,s,a,o,r,l){e=t.P(e,14,!1),a=i(a,"ema"),n=t.P(n,5,!1),o=i(o,"ema"),s=t.P(s,5,!1);var h=t.N(r);return r=(0,window.isNaN)(h)?-2:h,h=t.N(l),l=(0,window.isNaN)(h)?3:h,(e=Tn(e,n,s,a,o)).LV=r,e.NS=l,e},Gn=function(t){kn(t)},Fn=function(t,e,i,n){return(0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)?[window.NaN,window.NaN,window.NaN]:((e=$n(t,e,i,n)).push(t.LV*e[0]+t.NS*e[1]),e)},In=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));s=(n=Fn(i,n,s,a))[1],a=n[2],e.set("kResult",n[0]),e.set("dResult",s),e.set("jResult",a)},En=function(t,e,i,n,s,a,o,r){return(t=t.Rd().Cc(t)).Cf(Ln(e,i,n,s,a,o,r)),t.Df(Gn),t.Bf(In),t.cd("kResult"),t.cd("dResult"),t.cd("jResult"),t},An=function(e){se.call(this,e),this.o=t.P(e[2],14,!1),this.b=t.P(e[3],5,!1),this.i=t.P(e[4],5,!1),this.K=i(e[5],"ema"),this.G=i(e[6],"ema");var n=t.N(e[7]);this.aa=(0,window.isNaN)(n)?-2:n,n=t.N(e[8]),this.P=(0,window.isNaN)(n)?3:n,ae(this,"kSeries",e[9]),ae(this,"dSeries",e[10]),ae(this,"jSeries",e[11]),re(this)},Un=function(e,n,s,a){if(e=t.P(e,20,!1),n=t.P(n,10,!1),a=t.P(a,2,!1),"sma"==(s=i(s,"ema")))var o=$e,r=Ge;else o=xe,r=ke;return{wp:o(e),vo:r,RR:je(n),$N:a,rI:e,Y_:n,al:s,dispose:function(){this.wp.dispose(),this.RR.dispose()}}},_n=function(t){"sma"==t.al?Oe(t.wp):Ce(t.wp),Me(t.RR)},jn=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Nn(i,n,s,a),e.set("maResult",n[0]),e.set("upperResult",n[1]),e.set("lowerResult",n[2])},Mn=function(t,e,i,n,s){return(t=t.Rd().Cc(t)).Cf(Un(e,i,n,s)),t.Df(_n),t.Bf(jn),t.cd("maResult"),t.cd("upperResult"),t.cd("lowerResult"),t},Nn=function(t,e,i,n){var s=t.vo(t.wp,(i+n+e)/3);return e=Ne(t.RR,e,i,n),[s,s+t.$N*e,s-t.$N*e]},Bn=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),this.o=t.P(e[3],10,!1),this.i=i(e[4],"ema"),this.G=t.P(e[5],2,!1),ae(this,"ma",e[6]),ae(this,"range",e[7],"range-area"),re(this),this.A_().fill((function(){return t.Ul(this.sourceColor,.1)}))},Rn=function(e,i,n){if((e=t.P(e,12,!1))>(i=t.P(i,26,!1))){var s=e;e=i,i=s}return{yT:xe(e),bY:xe(i),XX:xe(t.P(n,9,!1)),dispose:function(){this.yT.dispose(),this.bY.dispose(),this.XX.dispose()}}},Hn=function(t){Ce(t.yT),Ce(t.bY),Ce(t.XX)},zn=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s=(n=Vn(i,n))[1],a=n[2];e.set("macdResult",n[0]),e.set("signalResult",s),e.set("histogramResult",a)},Vn=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN,window.NaN];var i=ke(t.yT,e),n=ke(t.bY,e),s=ke(t.XX,i-n);if((0,window.isNaN)(s))var a=s=i=window.NaN;else a=i-n,i=i-n-s;return[a,s,i]},qn=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Rn(e,i,n)),t.Df(Hn),t.Bf(zn),t.cd("macdResult"),t.cd("signalResult"),t.cd("histogramResult"),t},Wn=function(e){se.call(this,e),this.b=t.P(e[2],12,!1),this.o=t.P(e[3],26,!1),this.i=t.P(e[4],9,!1),ae(this,"macd",e[5]),ae(this,"signal",e[6]),ae(this,"histogram",e[7],"column"),re(this)},Kn=function(e){return e=t.P(e,10,!1),{BO:ce(e),Wu:ce(e),ub:e,dispose:function(){this.BO.clear(),this.Wu.clear()}}},Yn=function(t){t.BO.clear(),t.Wu.clear(),t.wd=window.NaN},Xn=function(t,e,i,n,s){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s))return window.NaN;if(i=t.BO.enqueue(e+i+n),n=t.Wu.enqueue(s),s=t.BO,e=t.Wu,s.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.wd)){var a=i=0;n=s.get(0);for(var o=1;o<t.ub;o++){var r=s.get(o),l=r*e.get(o);r!=n&&(r>n?i+=l:a+=l,n=r)}t.SV=0,t.mE=i,t.RI=a,s=100*i/(i+a)}else n*=i,0<t.SV?t.mE-=n:0>t.SV&&(t.RI-=n),n=s.get(-2),l=(r=s.get(-1))*e.get(-1),r>n?t.mE+=l:r<n&&(t.RI+=l),t.SV=s.get(0)-i,s=100*t.mE/(t.mE+t.RI);return t.wd=s},Jn=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=Xn(i,n,s,a,o),e.set("result",n)},Zn=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Kn(e)),i.Df(Yn),i.Bf(Jn),i.cd("result"),i},Qn=function(e){se.call(this,e),this.b=t.P(e[2],10,!1),ae(this,"series",e[3]),re(this)},ts=function(e){return e=t.P(e,20,!1),{Wb:ce(e),ub:e,wd:window.NaN,dispose:function(){this.Wb.clear()}}},es=function(t){t.Wb.clear(),t.wd=window.NaN},is=function(e,i){var n=e.get("value");if(n=t.p(n)?n:e.get("close"),n=t.N(n),(0,window.isNaN)(n))var s=window.NaN;else{s=i.ub;var a=i.Wb,o=i.wd;if(a.enqueue(n),a.Jg()<s)o=window.NaN;else if((0,window.isNaN)(o)){for(n=o=0;n<s;n++)o+=a.get(n);o/=s}else o+=((a=a.get(-1))-o)/s;s=o,i.wd=s}e.set("result",s)},ns=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ts(e)),i.Df(es),i.Bf(is),i.cd("result"),i},ss=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},as=function(e){return e=t.P(e,14,!1),{Wb:ce(e+1),ub:e,dispose:function(){this.Wb.clear()}}},os=function(t){t.Wb.clear(),t.wd=window.NaN},rs=function(t,e){if((0,window.isNaN)(e))return window.NaN;var i=t.Wb;return i.enqueue(e),i.Jg()<t.ub+1?window.NaN:(i=100*e/i.get(0),t.wd=i)},ls=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=rs(i,n),e.set("result",n)},hs=function(t,e){var i=t.Rd().Cc(t);return i.Cf(as(e)),i.Df(os),i.Bf(ls),i.cd("result"),i},cs=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),ae(this,"series",e[3]),re(this)},us=function(){return{Xy:window.NaN,cJ:window.NaN,dispose:function(){}}},ds=function(t){t.Xy=window.NaN,t.cJ=window.NaN},ps=function(e,i){var n=e.get("close");n=t.p(n)?n:e.get("value");var s=e.get("volume");s=t.N(s),n=t.N(n),n=fs(i,n,s),e.set("result",n)},gs=function(t){return(t=t.Rd().Cc(t)).Cf(us()),t.Df(ds),t.Bf(ps),t.cd("result"),t},fs=function(t,e,i){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:((0,window.isNaN)(t.Xy)?(t.cJ=e,t.Xy=i):(e>t.cJ?t.Xy+=i:e<t.cJ&&(t.Xy-=i),t.cJ=e),t.Xy)},bs=function(t){se.call(this,t),ae(this,"main",t[2]),re(this)},vs=function(e,i,n){return{c6:e=t.P(e,12,!1),J3:i=t.P(i,26,!1),e6:n=t.P(n,9,!1),WX:xe(e),ZV:xe(i),cY:xe(n),dispose:function(){this.WX.dispose(),this.ZV.dispose(),this.cY.dispose()}}},ms=function(t){Ce(t.WX),Ce(t.ZV),Ce(t.cY)},ys=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN,window.NaN];var i=ke(t.WX,e),n=ke(t.ZV,e);return[i=(i-n)/n*100,n=ke(t.cY,i),i-n]},Ss=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ys(i,n),e.set("ppoResult",n[0]),e.set("signalResult",n[1]),e.set("histogramResult",n[2])},ws=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(vs(e,i,n)),t.Df(ms),t.Bf(Ss),t.cd("ppoResult"),t.cd("signalResult"),t.cd("histogramResult"),t},xs=function(e){se.call(this,e),this.i=t.P(e[2],12,!1),this.b=t.P(e[3],26,!1),this.o=t.P(e[4],9,!1),ae(this,"ppoSeries",e[5]),ae(this,"signalSeries",e[6]),ae(this,"histogramSeries",e[7],"column"),re(this)},Cs=function(e,i,n){return{Ye:ce(2),Mf:ce(2),ZQ:t.N(e)||.02,faa:t.N(i)||.02,TZ:t.N(n)||.2,dispose:function(){this.Ye.clear(),this.Mf.clear()}}},Ds=function(t){t.Ye.clear(),t.Mf.clear(),t.wd=window.NaN,t.$p=window.NaN,t.Yp=window.NaN,t.alpha=t.ZQ},Ts=function(t){t.alpha+=t.faa,t.alpha>t.TZ&&(t.alpha=t.TZ)},ks=function(t){var e=t.wd+t.alpha*(t.$p-t.wd);e>t.Mf.get(-2)?e=t.Mf.get(-2):!(0,window.isNaN)(t.aT)&&e>t.aT&&(e=t.aT),e>t.Mf.get(-1)&&(e=t.$p,t.$p=window.NaN,t.Yp=window.NaN,t.zN=!1,t.alpha=t.ZQ),t.wd=e},$s=function(t){var e=t.wd+t.alpha*(t.Yp-t.wd);e<t.Ye.get(-2)?e=t.Ye.get(-2):!(0,window.isNaN)(t.$S)&&e<t.$S&&(e=t.$S),e<t.Ye.get(-1)&&(e=t.Yp,t.$p=window.NaN,t.Yp=window.NaN,t.zN=!0,t.alpha=t.ZQ),t.wd=e},Os=function(t){var e=t.Ye.get(-2),i=t.Mf.get(-2);(0,window.isNaN)(t.$p)?t.$p=e:t.$p<e&&(t.$p=e,Ts(t)),((0,window.isNaN)(t.Yp)||t.Yp>i)&&(t.Yp=i)},Ps=function(t){var e=t.Ye.get(-2),i=t.Mf.get(-2);(0,window.isNaN)(t.Yp)?t.Yp=i:t.Yp>i&&(t.Yp=i,Ts(t)),((0,window.isNaN)(t.$p)||t.$p<e)&&(t.$p=e)},Ls=function(t,e,i){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:(e=t.$S=t.Ye.enqueue(e),t.aT=t.Mf.enqueue(i),2>t.Ye.Jg()?window.NaN:((0,window.isNaN)(t.wd)?(t.$p=window.NaN,t.Yp=window.NaN,t.zN=e<=t.Ye.get(0),t.zN?(Os(t),t.wd=t.$p,ks(t)):(Ps(t),t.wd=t.Yp,$s(t))):t.zN?(Os(t),ks(t)):(Ps(t),$s(t)),t.wd))},Gs=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Ls(i,n,s),e.set("result",n)},Fs=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Cs(e,i,n)),t.Df(Ds),t.Bf(Gs),t.cd("result"),t},Is=function(e){se.call(this,e),this.o=t.N(e[2])||.02,this.i=t.N(e[3])||.02,this.b=t.N(e[4])||.2,ae(this,"series",e[5],"marker"),re(this)},Es=function(e){return e=t.P(e,20,!1),{Wb:ce(e+1),ub:e,dispose:function(){this.Wb.clear()}}},As=function(t){t.Wb.clear()},Us=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=js(i,n),e.set("result",n)},_s=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Es(e)),i.Df(As),i.Bf(Us),i.cd("result"),i},js=function(t,e){if((0,window.isNaN)(e))return window.NaN;var i=window.NaN;if(t.Wb.enqueue(e),t.Wb.Jg()>=t.ub+1){i=t.Wb.get(0);for(var n=0,s=1;s<t.ub+1;s++){var a=t.Wb.get(s);a>i&&n++,i=a}i=n/t.ub*100}return i},Ms=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},Ns=function(e){return e=t.P(e,20,!1),{Ye:ce(e),Mf:ce(e),ub:e,dispose:function(){this.Ye.clear(),this.Mf.clear()}}},Bs=function(t){t.Ye.clear(),t.Mf.clear()},Rs=function(t,e,i){if((0,window.isNaN)(e)||(0,window.isNaN)(i))return[window.NaN,window.NaN,window.NaN];var n=window.NaN,s=window.NaN,a=window.NaN;if(t.Ye.Jg()>=t.ub){n=t.Ye.get(0),a=t.Mf.get(0);for(var o,r=1;r<t.ub;r++)(s=t.Ye.get(r))>n&&(n=s),(o=t.Mf.get(r))<a&&(a=o);s=(n+a)/2}return t.Ye.enqueue(e),t.Mf.enqueue(i),[n,s,a]},Hs=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Rs(i,n,s),e.set("upperResult",n[0]),e.set("middleResult",n[1]),e.set("lowerResult",n[2])},zs=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Ns(e)),i.Df(Bs),i.Bf(Hs),i.cd("upperResult"),i.cd("middleResult"),i.cd("lowerResult"),i},Vs=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"middle",e[3]),ae(this,"range",e[4],"range-area"),re(this),this.B_().fill((function(){return t.Ul(this.sourceColor,.1)}))},qs=function(e){return{XR:t.P(e,0,!1),WG:window.NaN,dispose:function(){this.WG=window.NaN}}},Ws=function(){this.WG=window.NaN},Ks=function(e,i){var n=e.get("priceA");n=t.N(n);var s=e.get("priceB");s=t.N(s),n=Xs(i,n,s,e.Af.key),e.set("result",n)},Ys=function(t,e){var i=t.Rd().Cc(t);return i.Cf(qs(e)),i.Df(Ws),i.Bf(Ks),i.cd("result"),i},Xs=function(t,e,i,n){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:((0,window.isNaN)(t.WG)&&n>=t.XR&&(t.WG=e/i),e/i/t.WG*100)},Js=function(e){se.call(this,e);var i=t.ps(e[2]);this.b=i?i.getTime():0,this.i=e[2]||0,ae(this,"main",e[3]),re(this)},Zs=function(e){return e=t.P(e,12,!1),{Wb:ce(e),ub:e,dispose:function(){this.Wb.clear()}}},Qs=function(t){t.Wb.clear()},ta=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ia(i,n),e.set("result",n)},ea=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Zs(e)),i.Df(Qs),i.Bf(ta),i.cd("result"),i},ia=function(t,e){if((0,window.isNaN)(e))return window.NaN;t.Wb.enqueue(e);var i=window.NaN;if(t.Wb.Jg()>=t.ub){i=0;for(var n=t.ub,s=0;s<n;s++){for(var a=n-s,o=t,r=n,l=o.Wb.get(s),h=1,c=0,u=0;u<r;u++){var d=o.Wb.get(u);l<d?h++:l==d&&c++}i+=Math.pow(a-(h+(c-1)/2),2)}i=100*(1-6*i/(t.ub*(Math.pow(t.ub,2)-1)))}return i},na=function(e){se.call(this,e),this.b=t.P(e[2],12,!1),ae(this,"main",e[3]),re(this)},sa=function(e){return e=t.P(e,14,!1),{Wb:ce(e+1),ub:e,lz:window.NaN,Xx:window.NaN,dispose:function(){this.Wb.clear()}}},aa=function(t){t.Wb.clear(),t.lz=window.NaN,t.Xx=window.NaN},oa=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s=(0,window.isNaN)(n);if(s||i.Wb.enqueue(n),s||i.Wb.Jg()<i.ub+1)n=window.NaN;else{if((0,window.isNaN)(i.lz)){var a=0,o=0;s=i.Wb.get(0);for(var r=1;r<i.ub+1;r++)n=s,(s=i.Wb.get(r))>n?a+=s-n:s<n&&(o+=n-s);i.lz=a,i.Xx=o}else s=i.Wb.get(-1),n=i.Wb.get(-2),a=(i.ub-1)/i.ub,i.lz*=a,i.Xx*=a,s>n?i.lz+=s-n:s<n&&(i.Xx+=n-s);n=i.Xx?100-100/(1+i.lz/i.Xx):100}e.set("result",n)},ra=function(t,e){var i=t.Rd().Cc(t);return i.Cf(sa(e)),i.Df(aa),i.Bf(oa),i.cd("result"),i},la=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),ae(this,"main",e[3]),re(this)},ha=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},ca=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},ua=function(e){se.call(this,e),this.o=t.P(e[2],14,!1),this.b=t.P(e[3],1,!1),this.i=t.P(e[4],3,!1),this.K=i(e[5],"sma"),this.G=i(e[6],"sma"),ae(this,"kSeries",e[7]),ae(this,"dSeries",e[8]),re(this)},da=function(e,i,n,s){if(e=t.P(e,15,!1),i=t.P(i,9,!1),"ema"===n){var a=Ce;n=ke;var o=xe}else a=Oe,n=Ge,o=$e;if("ema"===s){var r=Ce;s=ke;var l=xe}else r=Oe,s=Ge,l=$e;return{ub:e,mP:i,wd:window.NaN,GT:o(e),BX:o(e),KP:o(e),YX:l(i),vo:n,wha:s,xha:r,cW:a,dispose:function(){this.GT.dispose(),this.BX.dispose(),this.KP.dispose(),this.YX.dispose()}}},pa=function(t){t.wd=window.NaN,t.cW(t.GT),t.cW(t.BX),t.cW(t.KP),t.xha(t.YX)},ga=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ba(i,n),e.set("trix",n[0]),e.set("signal",n[1])},fa=function(t,e,i,n,s){return(t=t.Rd().Cc(t)).Cf(da(e,i,n,s)),t.Df(pa),t.Bf(ga),t.cd("trix"),t.cd("signal"),t},ba=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN];t.wd=t.KP.wd;var i=t.vo(t.GT,e);return i=t.vo(t.BX,i),[i=(t.vo(t.KP,i)-t.wd)/t.wd*100,t.wha(t.YX,i)]},va=function(e){se.call(this,e),this.b=t.P(e[2],15,!1),this.i=t.P(e[3],9,!1),this.G=i(e[4],"ema"),this.o=i(e[5],"ema"),ae(this,"trix",e[6]),ae(this,"signal",e[7]),re(this)},ma=function(t){return{rG:0,qG:0,cL:window.NaN,ya:t,eaa:["hour","millisecond","minute","second"],dispose:function(){this.qG=this.rG=0}}},ya=function(t){t.rG=0,t.qG=0,t.cL=window.NaN},Sa=function(t,e,i,n,s){return(0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s)?window.NaN:(t.rG+=s,t.qG+=(e+i+n)*s/3,t.qG/t.rG)},wa=function(e,i){var n=t.N(e.Gh());if(((0,window.isNaN)(i.cL)||864e5<=n-i.cL)&&(n=new Date(n),i.cL=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),0,0,0),i.dispose()),n=i.ya.Wm().Cn().unit,-1===i.eaa.indexOf(n))e.set("vwapValue",window.NaN);else{n=t.N(e.get("high"));var s=t.N(e.get("low")),a=t.N(e.get("close")),o=t.N(e.get("volume"));n=Sa(i,n,s,a,o),e.set("vwapValue",n)}},xa=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ma(e)),i.Df(ya),i.Bf(wa),i.cd("vwapValue"),i},Ca=function(t){se.call(this,t),ae(this,"vwapSeries",t[2]),re(this)},Da=function(e,n){var s=t.P(e,20,!1),a=i(n,"sma");if("ema"==a)var o=xe,r=ke;else o=$e,r=Ge;return{rI:s,al:a,wp:o(s),vo:r,dispose:function(){this.wp.dispose()}}},Ta=function(t){"ema"==t.al?Ce(t.wp):Oe(t.wp)},ka=function(t,e){return(0,window.isNaN)(e)?[window.NaN,window.NaN]:[e,t.vo(t.wp,e)]},$a=function(e,i){var n=t.N(e.get("volume"));n=ka(i,n),e.set("volumeResult",n[0]),e.set("maResult",n[1])},Oa=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(Da(e,i)),t.Df(Ta),t.Bf($a),t.cd("volumeResult"),t.cd("maResult"),t},Pa=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),this.i=i(e[3],"sma"),ae(this,"volumeSeries",e[4],"stick"),ae(this,"maSeries",e[5]),re(this)},La=function(e){se.call(this,e),this.b=t.P(e[2],9,!1),ae(this,"main",e[3]),re(this)},Ga=function(e){return e=t.P(e,10,!1),{Vo:ce(e),Ye:ce(e),Mf:ce(e),ub:e,dispose:function(){this.Vo.clear(),this.Ye.clear(),this.Mf.clear()}}},Fa=function(t){t.Vo.clear(),t.Ye.clear(),t.Mf.clear(),t.wd=window.NaN},Ia=function(t,e,i,n){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n))return window.NaN;if(t.Vo.enqueue(e),t.Ye.enqueue(i),t.Mf.enqueue(n),t.Vo.Jg()<t.ub)return window.NaN;for(i=Number.MAX_VALUE,e=-Number.MIN_VALUE,n=0;n<t.ub;n++){var s=t.Ye.get(n),a=t.Mf.get(n);e<s&&(e=s),i>a&&(i=a)}return e=-100*(e-t.Vo.get(-1))/(e-i),t.wd=e},Ea=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Ia(i,n,s,a),e.set("result",n)},Aa=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Ga(e)),i.Df(Fa),i.Bf(Ea),i.cd("result"),i},Ua=function(e){se.call(this,e),this.b=t.P(e[2],10,!1),ae(this,"series",e[3]),re(this)},_a=function(e){function i(t){return function(e){for(var i=[this],n=0;n<arguments.length;n++)i[n+1]=arguments[n];return i=new Yl[t](i),this.ID.push(i),i}}for(var n in e=e.prototype,Yl)e[t.pm(n)]=i(n)},ja=function(e){t.Y.call(this),this.Ga("chart"),this.pa=e,this.$f=this.Ia=this.jb=null,this.Sa=[],this.ID=[],this.Fc=null,this.qf=[],this.Au=[],this.mc=null,this.og=[],this.rg=[],this.tg=[],this.Yg=[],this.Zg=[],this.jh=[],this.kh=[],this.Ql=this.Sf=this.Oj=null,this.kn={},this.j3=this.cI=this.l3=!1,this.Qj=void 0,this.rs=(0,t.pa)((function(){if(this.Qj=void 0,(0,window.isNaN)(this.wM))this.pa.BY();else{var t=this.pa,e=this.wM,i=this.RT,n=this.ofa,s=this.pfa;t.P=e,t.fb=i,t.Za=n,t.$a=s,t.Uc=this,Ao(t,e,i,n,s,this)}}),this),this.Tla=(0,t.pa)((function(){this.i7=void 0;var e=this.nQ.anchor,i=this.nQ.mo,n=this.nQ.eea;this.nQ=null;var s=this.pa,a=s.Ra();n=Math.min(n,1.9),t.J(a,ao)?(i*=a=e.lastIndex-e.rj,a=a*(1-n)/2,n=s.zi(e.rj-i-a),i=s.zi(e.lastIndex-i+a)):(i*=a=e.uw-e.qs,a=a*(1-n)/2,n=e.qs-i-a,i=e.uw-i+a),n==s.b.b.ki&&i==s.b.b.Wi||Mo(s,n,i,e,void 0)}),this),this.ax=null,this.cq("line"),t.T(this.ua,[["pointWidth",128,1,0,this.Ey],["maxPointWidth",128,1,0,this.Ey],["minPointLength",128,1,0,this.rB],["baseline",128,1,0,this.Zja],["weight",4,9]])},Ma=function(e,i,n,s){var a=window.Infinity,o=0;if(n&&i){var r=i.bb();n=i.check(t.UG)?t.$o(n.get("close"),n.get("high"),n.get("low"),n.get("open")):i.check(t.fm)?n.get("high"):n.get("value"),n=t.N(n),(0,window.isNaN)(n)||(e=e.hh,a=i.ob(),i=1-r.transform(r.Lz(n,i.Rx)),o=(a.top+a.height*i-e.top)/e.height,a=Math.abs(o-s))}return{ratio:o,Tf:a}},Na=function(t,e){t.wc.wa(e,["touchstart","mousedown"],t.Mha)},Ba=function(e){var i;if(e.Kv(),e.J(128))for(i=0;i<e.Sa.length;i++){var n=e.Sa[i];n&&(n.P=I(n.la))}if(e.J(133124)){var s;n=e.ob(),(i=t.wr(e,"background"))&&i.ja(n),(i=t.wr(e,"title"))&&i.enabled()&&(i.ja(n),n=i.yd()),e.mc&&e.mc.enabled()&&(e.mc.ka(),e.mc.ja(n),e.mc.da(!1),n=e.mc.yd(),e.B(512)),s=e.J(2048)?(0,window.isNaN)(e.gN)?X(e.pa.b):e.gN:window.NaN;var a=e.eg();"outside"==a.g("positionMode")&&(Ra(e,n,s),e.va(64,!0),n=e.eg().yd());var o=0,r=0,l=!a.g("enabled"),h="left"==a.g("position"),c="right"==a.g("position");for(i=0;i<e.qf.length;i++){var u=e.qf[i];if(u){u.ka();var d=u.width();"left"==u.g("orientation")?l||!h?(u.ja(n.left-d-o,n.top,0,n.height),o+=d):(u.ja(n),n=u.yd()):"right"==u.g("orientation")&&(l||!c?(r+=d,u.ja(n.left,n.top,n.width+r,n.height)):(u.ja(n),n=u.yd())),u.da(!1)}}0>n.width&&(n.width=1),0>n.height&&(n.top+=n.height,n.height=-n.height),e.mc&&e.mc.enabled()&&(e.mc.ka(),e.mc.ja(n.left,n.top,n.width,n.height+e.mc.height()),e.mc.da(!1),n=e.mc.yd()),"inside"==a.g("positionMode")&&(Ra(e,n,s),e.va(64,!0)),e.hh=n,e.Oj.Qf(e.hh),e.mh().ja(n),e.Dy(!0,!0),e.I(2052)}},Ra=function(e,i,n,s,a){var o=e.eg();o.ka(),o.O(e.Oa),i&&o.ja(i),null===(i=a?"":e.d2(o.g("titleFormat"),n,s))||t.ew(o.title(),i),a?(t.Zw(o),o.RA(null)):o.RA()||o.RA(e),o.B(1040),o.W(),o.da(!1)},Ha=function(e,i){return(0,t.Wa)(e.Sa,(function(t){return{series:t,point:t&&t.enabled()&&t.la.search(i,"exact")||null}}))},za=function(t){return t.originalEvent.kf.kf.touches},Va=function(e,i){return t.p(i)?(e.l3=i,e):e.l3},qa=function(e,i){return t.p(i)?(e.cI=i,e):e.cI},Wa=function(e,i,n,s,a,o){var r,l,h,c=[];for(r=0;r<i.length;r++)if(h=i[r]){var u=h.F();if(l=h.scale()){var d=t.oa(l);a[d]?u.scale=(0,t.za)(s,a[d]):(a[d]=l.F(),s.push(a[d]),u.scale=s.length-1)}(d=h.axis())&&(l=t.oa(d),0>(l=(0,t.za)(o,l))?(l=d.scale(),"layout"in u||(h=!1,t.J(d,t.Sy)&&(h="left"==(d=d.g("orientation"))||"right"==d),u.layout=h?"horizontal":"vertical"),"scale"in u||(a[d=t.oa(l)]?u.scale=(0,t.za)(s,a[d]):(a[d]=l.F(),s.push(a[d]),u.scale=s.length-1))):u.axis=l),c.push(u)}c.length&&(n[e]=c)},Ka=function(e,i){t.ag.call(this,i.ia()),this.b=e,this.Qj=void 0,this.rs=(0,t.pa)((function(){this.Qj=void 0;var t=this.b.pa,e=this.ba,i=No(t,this.ea,e);i&&Mo(t,i[0],i[1],e,void 0)}),this),t.bg(this),this.wa("start",this.Uba,!1,this),this.wa("beforedrag",this.zda,!1,this),this.wa("end",this.Tba,!1,this)},Ya=function(t,e,i){this.b=this.i=this.o=this.ea=null,Nt.call(this,t,t,e,i)},Xa=function(){},Ja=function(){},Za=function(e){t.V.call(this),this.cl=1e3,this.K=6,this.b=e,this.Cw=this.Ps=this.xp=this.On=this.aa=this.i=this.ba=this.ea=window.NaN,this.Xm={},this.Kc=!1,this.o=this.P=null,this.jd=[],this.D=this.G=null,this.Ba=Qa(this,null),this.na=Qa(this,null),this.Xa(Zl)},Qa=function(e,i){var n=e.b.Wm().Cn();return n={unitType:n.unit,unitCount:n.count,intervalsCount:0},"object"==t.ka(i)&&(null!=i.unitType&&(n.unitType=t.Zk(i.unitType)),0<i.unitCount&&(n.unitCount=+i.unitCount),i.intervalsCount&&(n.intervalsCount=Math.max(0,i.intervalsCount))),n},to=function(t,e){return!!(t.G&&e<t.G.max||t.D&&e>t.D.min)},eo=function(e,i,n,s,a,o){i=t.Za(i,e.ea,e.ba),n=t.Za(n,e.ea,e.ba);var r=e.b.Uf(i),l=e.b.Uf(n);(0,window.isNaN)(r)||(0,window.isNaN)(l)?(e.On=window.NaN,e.xp=window.NaN):(e.On=i,e.xp=n),e.Ps=r,e.Cw=l,e.Dg=s,e.count=a,e.Kc=!1,e.Xm=o,e.va(512)},io=function(e){var i=null;if(t.z(e)){i=t.Zk(e,null);var n=1}else t.C(e)&&(i=t.Zk(e.unit,null),n=t.P(e.count));return i?[i,n]:null},no=function(t){this.qa=t,this.K=!0},so=function(e,i,n){e=(e=e.qa).b.zi(Math.ceil(e.b.Uf(i.getTime())));var s=i.getTime();return i.add(n),i.getTime()<=e&&(s=t.So(e,n,s),i.setTime(s),i.add(n)),s},ao=function(t){Za.call(this,t)},oo=function(e){t.GB.call(this),this.pa=e,this.Sa=[],this.ID=[],this.fd=this.Fa=this.wB=this.yB=this.mc=this.Fc=null,this.cq("line")},ro=function(t){for(var e=0;e<t.Sa.length;e++){var i=t.Sa[e];i&&i.B(1024)}t.mc&&t.mc.B(16),t.B(1536)},lo=function(){_t.call(this)},ho=function(e,i,n,s){for(var a=new r(n.unitType,n.unitCount).sj(),o=[],l=s?1:-1,h=1;h<=n.intervalsCount;h++){var c=[i+h*l*a];s?o.push(c):t.Da(o,c,0)}return e.Yr(o),o},co=function(e){t.V.call(this),this.Ga("stock.eventMarkers"),this.pa=e,this.ca=new t.my(this,el,t.gm,Xr),this.ca.ta("connectorAfterInitCallback",o),this.ca.Ga("defaultFontSettings","stock.eventMarkers.normal"),this.za=new t.my(this,nl,t.gm,Xr),t.W(this,"hovered",this.za),this.Ea=new t.my(this,nl,t.gm,Xr),t.W(this,"selected",this.Ea),t.T(this.ua,Kr),e.wa("eventmarkermouseover",this.z_,!1,this),e.wa("eventmarkermousemove",this.z_,!1,this),e.wa("eventmarkermouseout",this.Zba,!1,this),e.wa("eventmarkerclick",this.Yba,!1,this)},uo=function(e,i,n,s,a,o){return{type:n?"eventmarkersselect":"eventmarkershover",status:(0,t.Wa)(s,(function(t){return t.group.jp(t.index)})),eventMarker:a.jp(o),actualTarget:a,target:e,originalEvent:i}},po=function(e,i){t.ag.call(this,e.ia()),this.hC=e,this.LY=i,this.b=null,this.i=0},go=function(e,i){t.qf.call(this),this.o=[],this.b=[],this.pa=i,this.i=[],this.Jc=e,this.Ad=0,this.G=[],this.aa=[],this.K=[],this.D={},this.P=e.path().stroke("none"),this.f=0},fo=function(e){t.V.call(this),this.ya=e,this.wb=this.ya.Na.Bd(),this.wb.Cd("data-name","stock-splitters-layer"),this.wb.zIndex(1e5),this.o=new go(this.wb,this.ya),this.o.wa("dragStart",(function(){this.b=!0}),void 0,this),this.o.wa("dragEnd",(function(){this.b=!1}),void 0,this),this.b=!1},bo=function(){t.V.call(this),t.T(this.ua,[["fill",0,0]])},vo=function(){t.V.call(this),t.T(this.ua,[["stroke",0,0]])},mo=function(){t.V.call(this),t.T(this.ua,[["stroke",0,1]])},yo=function(){t.V.call(this),this.za=this.ca=this.fi=null,t.T(this.ua,[["enabled",0,1]])},So=function(e){t.ux.call(this),this.Ga("stock"),this.f=[],this.i=null,this.b=new j,t.K(this.b,this.gea,this),this.na=!1,this.eb=null,this.Ka=this.sb=!1,this.G=this.$a=this.Za=this.fb=this.P=window.NaN,this.Ql=this.Sf=null,this.D=t.eq.annotations,this.Sb={},this.aa=null,this.ud=(0,t.pa)(this.qea,this),this.Hd=(0,t.pa)(this.rea,this),this.Ha=window.Infinity,this.qc=-1;var i=this.vt=!!e;e={};var n=4194304|t.QG;n|=i&&1048576,i=i?2:1,e.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e.candlestick={Fb:5,Kb:i,Lb:[t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e.column={Fb:6,Kb:i,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e["jump-line"]={Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.stick={Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.marker={Fb:9,Kb:i,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.ohlc={Fb:10,Kb:i,Lb:[t.BH,t.GH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-area"]={Fb:11,Kb:1,Lb:[t.nH,t.QH,t.MH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-column"]={Fb:12,Kb:i,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-spline-area"]={Fb:13,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-step-area"]={Fb:14,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e.spline={Fb:15,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e["spline-area"]={Fb:16,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e["step-area"]={Fb:17,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e["step-line"]={Fb:18,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.hilo={Fb:31,Kb:2,Lb:[t.oH,t.MH,t.QH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},this.fj=e,this.K=null,t.T(this.ua,[["plotsManualBounds",4100,9],["zoomMarqueeFill",0,0],["zoomMarqueeStroke",0,0]]),this.I(65536)},wo=function(e,i,n,s){var a=t.N(i);if((0,window.isNaN)(a)?a=0:(a=i,i=n),!(n=e.f[a])){var o=xo(e),r=0;if(o.length)for(n=0;n<o.length;n++){var l=o[n].g("weight");l&&(r+=l)}(n=new ja(e)).Ga("stock.defaultPlotSettings",e.W0()),n.mh().parent(e.mh()),n.Kg(!0),n.kb(e),r&&n.ta("weight",r/o.length),e.f[a]=n,t.K(n,e.Fja,e),a>e.qc&&((o=e.f[e.qc])&&qa(o,!1),qa(n,!0),e.qc=a),a<e.Ha&&((o=e.f[e.Ha])&&Va(o,!1),Va(n,!0),e.Ha=a),e.B(4100,9)}return t.p(i)?(n.ga(!!s,i),e):n},xo=function(t){for(var e=[],i=0;i<t.f.length;i++){var n=t.f[i];n&&n.enabled()&&!n.md&&e.push(n)}return e},Co=function(e,i){for(var n=(0,t.za)(e.f,i)-1;-1<n;n--){var s=e.f[n];if(s&&s.enabled())return s}return null},Do=function(e,i,n){if(i!==n&&null!==i&&null!==n){var s=(0,t.za)(e.f,n);e.f[(0,t.za)(e.f,i)]=n,e.f[s]=i,qa(i)?(qa(i,!1),qa(n,!0)):qa(n)&&(qa(i,!0),qa(n,!1)),Va(i)?(Va(i,!1),Va(n,!0)):Va(n)&&(Va(i,!0),Va(n,!1)),e.B(4100,9)}},To=function(t,e,i){t.ka();var n=t.Ra(),s=t.tC().Ra();N(t.b)&&(K(t.b,n),K(t.b,s)),t.b.select(e,i,s)&&(W(t.b,n),t.Dy()),t.da(!0)},ko=function(e,i,n,s,a){return t.p(s)?e.dispatchEvent({type:i,source:n,firstSelected:s,lastSelected:a,firstKey:e.b.o,lastKey:e.b.D}):(s=e.Wm(),e.dispatchEvent({type:i,source:n,firstSelected:e.b.b.ki,lastSelected:e.b.b.Wi,firstVisible:Y(e.b),lastVisible:X(e.b),firstKey:e.b.o,lastKey:e.b.D,dataIntervalUnit:s.Cn().unit,dataIntervalUnitCount:s.Cn().count,dataIsGrouped:s.OD()}))},$o=function(e,i,n){var s=i.bb(),a=t.oa(s),o=i.Ec(),r=A(i.la,"value"),l=n[a];if(!l)for(l=n[a]=[],a=o.Hb(),n=0;n<a+2;n++)l.push({Sw:0,Cp:0,Iw:0,Rw:0,zp:0,Hw:0,pE:!1,cE:!1,Rs:!1});var h=(a="percent"==s.jn())?e.E4:e.Ala,c=l[n=0],u=G(i.la);if(u)if(u.j("stackedMissing",c.Rs),c.Rs=u.j("missing"))var d=window.NaN;else{var p=Number(u.lr(r));h.call(e,s,u,c,p,null,window.NaN),d=p}else d=window.NaN;for(o.reset();o.advance();){var g=c;c=l[++n],o.j("stackedMissing",c.Rs),(c.Rs=o.j("missing"))?(g.cE=!0,d=window.NaN):(p=Number(o.lr(r)),h.call(e,s,o,c,p,g,d),d=p)}return(u=F(i.la))&&(c=l[++n],u.j("stackedMissing",c.Rs),(c.Rs=u.j("missing"))||(p=Number(u.lr(r)),h.call(e,s,u,c,p,g,d))),a},Oo=function(t,e,i){t.j("missing")?(t.j("stackedPositiveZero",Number(t.j("stackedPositiveZero"))/i.Cp*100||0),t.j("stackedNegativeZero",Number(t.j("stackedNegativeZero"))/i.zp*100||0)):(0<=Number(t.j("stackedValue"))?(i=i.Cp,e.Xc(100)):(i=-i.zp,e.Xc(-100)),t.j("stackedZero",Number(t.j("stackedZero"))/i*100||0),t.j("stackedValue",Number(t.j("stackedValue"))/i*100||0))},Po=function(e,i,n){var s=t.oa(i),a=e.$();n=n[s],i.Xc(0);var o=G(e.la);o&&(s=n[0],Oo(o,i,s));var r=1;for(a.reset();a.advance();)s=n[r++],Oo(a,i,s);(o=F(e.la))&&(s=n[r],Oo(o,i,s))},Lo=function(e,i,n,s){var a=0,o=[],r=[],l=[],h=0,c=!1,u=n-i;for(n=0;n<e.length;n++){var d=e[n];d.ka();var p=t.L(d.minHeight(),s),g=t.L(d.maxHeight(),s),f=t.L(d.height(),s);(0,window.isNaN)(f)?(h++,(0,window.isNaN)(p)||(r[n]=p,c=!0),(0,window.isNaN)(g)||(l[n]=g,c=!0)):((0,window.isNaN)(p)||(f=Math.max(f,p)),(0,window.isNaN)(g)||(f=Math.min(f,g)),a+=f,o[n]=f)}if(c&&0<h){var b=[];d=h*h;do{for(c=!1,s=Math.max(3,(u-a)/h),n=0;n<e.length;n++)if(!(n in o))if(n in b){if(b[n]==r[n]&&r[n]<s){a-=r[n],h++,delete b[n],c=!0;break}if(b[n]==l[n]&&l[n]>s){a-=l[n],h++,delete b[n],c=!0;break}}else{if(n in r&&r[n]>s){a+=b[n]=r[n],h--,c=!0;break}if(n in l&&l[n]<s){a+=b[n]=l[n],h--,c=!0;break}}}while(c&&0<h&&d--)}for(s=Math.max(3,(u-a)/h),n=0;n<e.length;n++)d=e[n],f=n in o?o[n]:b&&n in b?b[n]:s,f=Math.round(f),h=(a=d).Kx!=i,a.Kx=i,h&&a.va(2),d.zB(f),d.da(!0),i+=f},Go=function(e,i){for(var n=!1,s=0;s<e.f.length;s++){var a=e.f[s];if(a&&!a.md){a=a.Ue();for(var o=0;o<a.length;o++)if(a[o].la==i){n=!0;break}}}if(!n&&(n=e.b,(s=t.oa(i).toFixed(0))in n.ea)){for(s in i.ib=null,delete n.ea[s],delete n.na[s],delete n.Za[s],a={},n.ea){o=n.ea[s].pr().Rd();var r=t.oa(o).toFixed(0);r in a||(a[r]=o)}for(s in n.aa)if(!(s in a)){t.kr(n.aa[s],n.t6,n);break}for(var l in n.aa=a,n.f.i=!0,n.P)n.P[l].i=!0;n.B(16384,16)}},Fo=function(t){t.Ka=!0,_o(t)},Io=function(t){t.Ka=!1,Eo(t)},Eo=function(t){(0,window.isNaN)(t.P)||Ao(t,t.P,t.fb,t.Za,t.$a,t.Uc)},Ao=function(e,i,n,s,a,o){if(!(e.Ka||0>i||1<i)){var r=e.Ra().Mc(i),l=S(e.b.i,r);if(!(0,window.isNaN)(l)){var h;for((i=o&&o.enabled()?Ha(o,l):null)&&(h=Uo(i,n)),n=0;n<e.f.length;n++)e.f[n]&&(i=e.f[n]).ro(l,r,o,a,i==o?h:void 0,i===o);if(e.sb=!0,n=e.Wm(),o={hoveredDate:{value:l,type:"date-time"},rawHoveredDate:{value:r,type:"date-time"},dataIntervalUnit:{value:n.Cn().unit,type:"string"},dataIntervalUnitCount:{value:n.Cn().count,type:"number"},isGrouped:{value:n.OD()}},i=e.Ua(),to(e.eb,r))i.Lc();else if("union"==i.g("displayMode")&&"point"!=i.g("positionMode")){for(h=[],e=(0,t.Wa)(e.f,(function(t){return{plot:t,infoBySeries:t&&t.enabled()?Ha(t,l):null}})),n=0;n<e.length;n++)if(e[n]&&(r=e[n].infoBySeries))for(var c=0;c<r.length;c++){var u=r[c].series;u&&h.push({series:u})}t.Nw(i,h,s,a,null,!1,o)}else"single"==i.g("displayMode")&&(h&&.03>h.distance?(e=h.series,t.Nw(i,[{series:e}],s,a,e,!1,o)):i.Lc())}}},Uo=function(t,e){for(var i,n=null,s=-1,a=window.Infinity,o=0;o<t.length;o++){var r=t[o],l=(r=Ma(r.series.jf,r.series,r.point,e)).Tf;a>l&&(a=l,i=r.ratio,s=o)}return 0<=s&&((n=t[s]).distance=a,n.pointYRatio=i),n},_o=function(t){if(t.sb){t.sb=!1;for(var e=0;e<t.f.length;e++){var i=t.f[e];i&&i.BY()}t.Ua().Lc()}},jo=function(t){switch(t){case"thumb-drag":return"scroller-thumb-drag";case"selected-range-drag":return"scroller-drag";default:return"scroller-click"}},Mo=function(t,e,i,n,s){ko(t,"selectedrangebeforechange",s||"plot-drag",e,i)&&(To(t,e,i),n.rj=t.Uf(n.qs),n.lastIndex=t.Uf(n.uw),n.Ps=t.Uf(n.On),n.Cw=t.Uf(n.xp),ko(t,"selectedrangechange",s||"plot-drag"))},No=function(e,i,n){var s=e.Ra();return t.J(s,ao)?(s=n.lastIndex-n.rj,s*=i,i=e.zi(n.rj-s),n=e.zi(n.lastIndex-s)):(s=n.uw-n.qs,s*=i,i=n.qs-s,n=n.uw-s),i>n&&(s=i,i=n,n=s),i!=e.b.b.ki||n!=e.b.b.Wi?[i,n]:null},Bo=function(e,i,n){if(e=e.Ra(),t.J(e,ao)){var s=n.lastIndex-n.rj;e=(n.Ps-n.rj)/s,n=(n.Cw-n.rj)/s}else s=n.uw-n.qs,e=(n.On-n.qs)/s,n=(n.xp-n.qs)/s;return-t.Za(-i,e,n-1)},Ro={j9:"no-overlap",cma:"allow-minor-overlap",bma:"allow-major-overlap",k7:"allow-overlap"},Ho={bC:"area",aZ:"candlestick",lF:"column",tt:"line",av:"marker",lZ:"ohlc",pZ:"range-area",FQ:"range-column",rZ:"range-spline-area",sZ:"range-step-area",vZ:"spline",wZ:"spline-area",CZ:"step-area",DZ:"step-line",Q8:"jump-line",k$:"stick",O8:"hilo"},zo={bsa:"sma",xoa:"ema",bta:"wma"},Vo={Eoa:"exact-or-prev",Coa:"exact",Doa:"exact-or-next",NEAREST:"nearest"},qo={name:"fill",Qb:"path",Yb:"fill",Zb:null,ac:!1,Ib:!1,zIndex:0},Wo={name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!1,Ib:!1,zIndex:2e-6},Ko={name:"hatchFill",Qb:"path",Yb:"hatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},Yo={name:"negativeHatchFill",Qb:"path",Yb:"negativeHatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},Xo={name:"negative",Qb:"path",Yb:"negativeFill",Zb:"negativeStroke",ac:!1,Ib:!1,zIndex:0},Jo={name:"rising",Qb:"path",Yb:"risingFill",Zb:"risingStroke",ac:!1,Ib:!1,zIndex:0},Zo={name:"risingHatchFill",Qb:"path",Yb:"risingHatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},Qo={name:"falling",Qb:"path",Yb:"fallingFill",Zb:"fallingStroke",ac:!1,Ib:!1,zIndex:0},tr={name:"fallingHatchFill",Qb:"path",Yb:"fallingHatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},er={name:"highFill",Qb:"path",Yb:"highFill",Zb:null,ac:!1,Ib:!1,zIndex:0},ir={name:"lowFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!1,Ib:!1,zIndex:0},nr={name:"highFill",Qb:"path",Yb:"highFill",Zb:null,ac:!1,Ib:!1,zIndex:0},sr={name:"lowFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!1,Ik:!0,Ib:!1,zIndex:0},ar={name:"highHatchFill",Qb:"path",Yb:"highHatchFill",Zb:null,ac:!1,Ib:!1,zIndex:0},or={name:"lowHatchFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!1,Ib:!1,zIndex:0},rr={name:"highHatchFill",Qb:"path",Yb:"highHatchFill",Zb:null,ac:!1,Ib:!1,zIndex:0},lr={name:"lowHatchFill",Qb:"path",Yb:"lowHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!1,zIndex:0},hr={name:"highStroke",Qb:"path",Yb:null,Zb:"highStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},cr={name:"lowStroke",Qb:"path",Yb:null,Zb:"lowStroke",ac:!1,Ib:!1,zIndex:2e-6},ur={name:"path",Qb:"path",Yb:"fill",Zb:"stroke",ac:!1,Ib:!1,zIndex:0},dr={name:"fill",Qb:"path",Yb:"fill",Zb:null,ac:!1,Ik:!0,Ib:!1,zIndex:0},pr={name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},gr={name:"hatchFill",Qb:"path",Yb:"hatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},fr={name:"negativeHatchFill",Qb:"path",Yb:"negativeHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},br={name:"negative",Qb:"path",Yb:"negativeFill",Zb:"negativeStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},vr={name:"rising",Qb:"path",Yb:"risingFill",Zb:"risingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},mr={name:"rising",Qb:"path",Yb:null,Zb:"risingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},yr={name:"negative",Qb:"path",Yb:null,Zb:"negativeStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},Sr={name:"risingHatchFill",Qb:"path",Yb:"risingHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},wr={name:"falling",Qb:"path",Yb:"fallingFill",Zb:"fallingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},xr={name:"falling",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},Cr={name:"fallingHatchFill",Qb:"path",Yb:"fallingHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},Dr={name:"highStroke",Qb:"path",Yb:null,Zb:"highStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},Tr={name:"lowStroke",Qb:"path",Yb:null,Zb:"lowStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},kr={name:"path",Qb:"path",Yb:"fill",Zb:"stroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},$r={name:"overlay",Qb:"path",Yb:!0,Zb:!0,ac:!1,Ib:!1,zIndex:2e-6};t.g=r.prototype,t.g.daa=function(e){this.f.setTime(Date.UTC(t.Oo(this.f.getUTCFullYear(),this.b,e?e.getUTCFullYear():2e3)-this.b,0))},t.g.aaa=function(t){var e=this.b;this.b*=6,this.YQ(t),this.b=e},t.g.Z$=function(t){var e=this.b;this.b*=3,this.YQ(t),this.b=e},t.g.YQ=function(e){var i=t.Oo(this.f.getUTCMonth()+12*this.f.getUTCFullYear(),this.b,e?e.getUTCMonth()+12*e.getUTCFullYear():24e3)-this.b;e=Math.floor(i/12),0>(i%=12)&&(i+=12),this.f.setTime(Date.UTC(e,i))},t.g.baa=function(e){e=t.Oo(h(this.f),this.b,e?h(e):72e3)-this.b;var i=Math.floor(e/36);e%=36;var n=Math.floor(e/3);0>n&&(n+=12),0>(e%=3)&&(e+=3),this.f.setTime(Date.UTC(i,n,1+10*e))},t.g.caa=function(t){l(this,6048e5*this.b,t||new Date(Date.UTC(2e3,0,2)))},t.g.V$=function(t){l(this,864e5*this.b,t)},t.g.W$=function(t){l(this,36e5*this.b,t)},t.g.Y$=function(t){l(this,6e4*this.b,t)},t.g.$$=function(t){l(this,1e3*this.b,t)},t.g.X$=function(t){l(this,this.b,t)},t.g.via=function(){return this.f.setUTCFullYear(this.f.getUTCFullYear()+this.b),this.f.getTime()},t.g.sia=function(){var t=this.f.getUTCMonth()+6*this.b,e=this.f.getUTCFullYear()+Math.floor(t/12);return 0>(t%=12)&&(t+=12),this.f.setUTCFullYear(e),this.f.setUTCMonth(t),this.f.getTime()},t.g.qia=function(){var t=this.f.getUTCMonth()+3*this.b,e=this.f.getUTCFullYear()+Math.floor(t/12);return 0>(t%=12)&&(t+=12),this.f.setUTCFullYear(e),this.f.setUTCMonth(t),this.f.getTime()},t.g.pia=function(){var t=this.f.getUTCMonth()+this.b,e=this.f.getUTCFullYear()+Math.floor(t/12);return 0>(t%=12)&&(t+=12),this.f.setUTCFullYear(e),this.f.setUTCMonth(t),this.f.getTime()},t.g.tia=function(){var t=this.f.getUTCDate(),e=3*(12*this.f.getUTCFullYear()+this.f.getUTCMonth())+(10>=t?0:20>=t?1:2)+this.b;t=Math.floor(e/36),e%=36;var i=Math.floor(e/3);return 0>i&&(i+=12),0>(e%=3)&&(e+=3),this.f.setTime(Date.UTC(t,i,1+10*e)),this.f.getTime()},t.g.uia=function(){var t=this.f.getTime()+6048e5*this.b;return this.f.setTime(t),t},t.g.jia=function(){var t=this.f.getTime()+864e5*this.b;return this.f.setTime(t),t},t.g.lia=function(){var t=this.f.getTime()+36e5*this.b;return this.f.setTime(t),t},t.g.oia=function(){var t=this.f.getTime()+6e4*this.b;return this.f.setTime(t),t},t.g.ria=function(){var t=this.f.getTime()+1e3*this.b;return this.f.setTime(t),t},t.g.nia=function(){var t=this.f.getTime()+this.b;return this.f.setTime(t),t},t.g.sj=function(){return this.o},t.H(u,t.V),t.g=u.prototype,t.g.ra=2,t.g.enabled=function(e){return t.p(e)?(e=!!e,this.o!=e&&(this.o=e,this.va(2)),this):this.o},t.g.D1=function(e){return t.p(e)?(e=!!e,this.D!=e&&(this.D=e,this.va(2)),this):this.D},t.g.CR=function(e){if(t.p(e)){if(this.b.length=0,t.A(e)){for(var i={},n=0;n<e.length;n++){var s=e[n];if(t.z(s))var a=s,o=1;else t.C(s)&&(a=String(s.unit),o=t.P(s.count,1,!1));if(a){var l=(s=new r(a,o)).D+s.b.toFixed(0);l in i||(i[l]=!0,this.b.push(s))}}t.Pa(this.b,c)}return this.va(2),this}return d(this)},t.g.U3=function(e){return t.p(e)?(e=Math.max(2,t.N(e)),(0,window.isNaN)(e)||this.f==e||(this.f=e,this.i=window.NaN,this.va(2)),this):this.f},t.g.Z3=function(e){return t.p(e)?(e=Math.max(.1,t.N(e)),(0,window.isNaN)(e)||this.i==e||(this.i=e,this.f=window.NaN,this.va(2)),this):this.i},t.g.Cn=function(){return this.G},t.g.OD=function(){return this.K},t.g.R=function(){u.u.R.call(this)},t.g.F=function(){var t=u.u.F.call(this);return t.enabled=this.o,t.forced=this.D,t.levels=d(this),t.maxVisiblePoints=(0,window.isNaN)(this.f)?null:this.f,t.minPixPerPoint=(0,window.isNaN)(this.i)?null:this.i,t},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:t.A(e)?{enabled:!0,levels:e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.enabled(i.enabled),"levels"in i&&this.CR(i.levels),!0)},t.g.U=function(t,e){u.u.U.call(this,t,e),this.enabled(t.enabled),this.D1(t.forced),this.CR(t.levels),this.U3(t.maxVisiblePoints),this.Z3(t.minPixPerPoint)};var Or=u.prototype;Or.enabled=Or.enabled,Or.forced=Or.D1,Or.levels=Or.CR,Or.maxVisiblePoints=Or.U3,Or.minPixPerPoint=Or.Z3,Or.getCurrentDataInterval=Or.Cn,Or.isGrouped=Or.OD,g.prototype.f=null;var Pr=0;g.prototype.vj=function(e){var i;return t.ea(e)&&0>e?this.f&&(i=this.f[~e]):i=this.values[e],i},t.g=m.prototype,t.g.reset=function(){return this.i&&this.i.reset(),this.b=this.K,this.o=this.i?this.i.i():this.K.key,this.G=!1,this.D=window.NaN,this.P=!0,this},t.g.advance=function(){return this.ba()},t.g.current=function(){return this.b},t.g.Iu=function(e,i){if(t.p(e))if(this.i)for(this.reset();this.advance()&&e!=this.current(););else this.b=e,this.G=!0,t.p(i)&&(this.o=i)},t.g.get=function(t){return this.lr(this.ea?xt(this.Zc,t):Ct(this.Zc,t))},t.g.j=function(t,e){var i=this.Ci[this.ma()];return i||(i=this.Ci[this.ma()]={}),1<arguments.length?(i[t]=e,this):i[t]},t.g.lr=function(e){var i;return this.G&&(t.ea(e)&&0>e?this.b.f&&(i=this.b.f[~e]):i=this.b.values[e]),i},t.g.Gh=function(){return this.D},t.g.ma=function(){return this.Ba()},t.g.Hb=function(){return this.na},t.g.Vba=function(){return this.D},t.g.Gfa=function(){return this.o},t.g.zfa=function(){return this.i.i()},t.g.S$=function(){if(this.b){if(this.o++,(this.b=this.b.next)&&this.b!=this.aa)return this.G=!0,this.D=this.b.key,!0;this.b=null,this.G=!1,this.o=this.D=window.NaN}return!1},t.g.Nda=function(){return this.i.advance()?(this.P&&(this.b=this.b.next),(this.P=!(!this.b||this.b.key!=this.i.f||this.b==this.aa))?(this.G=!0,this.D=this.b.key):(this.G=!1,this.D=this.i.f),!0):(this.b=null,this.D=window.NaN,this.G=!1)};var Lr=m.prototype;Lr.reset=Lr.reset,Lr.advance=Lr.advance,Lr.get=Lr.get,Lr.getKey=Lr.Vba,Lr.getIndex=Lr.ma,Lr.meta=Lr.j,t.g=y.prototype,t.g.zi=function(t){var e=this.b.length;if(2<=e&&!(0,window.isNaN)(t)){for(var i=0;i<this.D.length;i++){var n=this.D[(this.o-i-1+2)%2];if(n.index==t)return n.key}i=Math.floor(t),0>=(n=Math.ceil(t))?n=1+(i=0):i>=e-1&&(i=(n=e-1)-1),i==n?e=this.b[i].key:(e=this.b[i].key,n=this.b[i+1].key,e=Math.round((n-e)*(t-i)+e)),this.D[this.o]={key:e,index:t},this.o=(this.o+1)%2}else 1==e?(e=this.b[0].key,e=Math.round(t+e)):e=window.NaN;return e},t.g.Uf=function(e){var i=this.b.length;if(2<=i&&!(0,window.isNaN)(e)){for(var n=0;n<this.D.length;n++){var s=this.D[(this.o-n-1+2)%2];if(s.key==e)return s.index}0>(n=t.Oa(this.b,b,e))?(0>(n=~n-1)?n=0:n>=i-1&&(n=i-2),i=(e-(i=this.b[n].key))/(this.b[n+1].key-i)+n):i=n,this.D[this.o]={key:e,index:i},this.o=(this.o+1)%2}else i=1==i?e-(i=this.b[0].key):window.NaN;return i},t.g.$=function(t,e){return w(this,this.Uf(t),this.Uf(e))},t.g.yr=function(){return this.i},t.g.update=function(){if(this.i){if(this.o=this.D.length=0,this.G=this.K.length=0,this.f.length)if(1==this.f.length)this.b=this.f[0].b;else{var t,e={key:window.NaN,next:null},i=[],n=this.f[0].b,s=n.length?n[0]:null,a=(n=this.f[1].b).length?n[0]:null;for(n=e;s&&a;){var o=s.key<=a.key,r=s.key>=a.key;t={key:o?s.key:a.key,next:null},i.push(t),n=n.next=t,o&&(s=s.next),r&&(a=a.next)}for(s=s||a;s;)t={key:s.key,next:null},i.push(t),n=n.next=t,s=s.next;for(s=2;s<this.f.length;s++){for(a=(n=this.f[s].b).length?n[0]:null,i=i.length?i[0]:null,n=e,o=[];i&&a;)r=i.key>=a.key,i.key<=a.key?(t=i,i=i.next):t={key:a.key,next:null},o.push(t),n=n.next=t,r&&(a=a.next);for(n.next=i;i;)o.push(i),i=i.next;for(;a;)t={key:a.key,next:null},o.push(t),n=n.next=t,a=a.next;i=o}this.b=i}else this.b=[];for(this.i=!1,this.P=!0,s=0;s<this.f.length;s++)if(this.f[s].Hb()!=this.b.length){this.P=!1;break}}},T.prototype.reset=function(){this.b=this.D,this.f=window.NaN,this.o=this.D.key},T.prototype.advance=function(){if(this.b){if(this.o++,(this.b=this.b.next)&&this.b!=this.K)return this.f=this.b.key,!0;this.b=null,this.o=this.f=window.NaN}return!1},T.prototype.i=function(){return this.o},T.prototype.Hb=function(){return this.G},t.g=k.prototype,t.g.search=function(e,i){return O(this,ut(this.f,t.Xk(e),t.zk(Vo,i,"exact")))},t.g.select=function(e,i,n,s){return P(this,t.Xk(e),t.Xk(i),t.p(n)?new r(n,t.N(s)):void 0)},t.g.Xba=function(e,i){var n=t.p(e)?new r(e,t.N(i)):void 0,s=jt(this.Zc.Rd(),n);return this.f=s,this.i=!n,this.b=ct(s),$(this),this},t.g.$=function(){return U(this,!0)},t.g.pr=function(){return this.Zc},t.g=_.prototype,t.g.get=function(t){return this.lr(this.b?xt(this.Zc,t):Ct(this.Zc,t))},t.g.lr=function(t){return this.Af.vj(t)},t.g.ma=function(){return this.Ad},t.g.Gh=function(){return this.Af.key},t.g.j=function(t,e){return 1<arguments.length?(this.Ci&&(this.Ci[t]=e),this):this.Ci?this.Ci[t]:void 0},t.g.Wba=function(){return this.Af.key};var Gr=k.prototype;Gr.search=Gr.search,Gr.select=Gr.select,Gr.selectAll=Gr.Xba,Gr.getIterator=Gr.$,(Gr=_.prototype).meta=Gr.j,Gr.get=Gr.get,Gr.getKey=Gr.Wba,Gr.getColumn=Gr.lr,Gr.getIndex=Gr.ma,t.H(j,t.V),t.g=j.prototype,t.g.sa=16384,t.g.ra=16,t.g.select=function(t,e,i){return(0,window.isNaN)(t)&&(t=this.b.ki),(0,window.isNaN)(e)&&(e=this.b.Wi),!(0,window.isNaN)(t)&&!(0,window.isNaN)(e)&&(q(this),(t=R(this,t,e,this.Wm(),this.na,this.i,this.b,!1))&&(this.i=t[0],this.b=t[1],this.Ka=i.transform(this.b.ki),this.Ha=i.transform(this.b.Wi)),!!t)},t.g.Wm=function(e){return this.G||(this.G=new u,this.G.Ga("stock.grouping"),this.G.U(this.G.oa,!0),t.K(this.G,this.B2,this)),t.p(e)?(this.G.N(e),this):this.G},t.g.B2=function(){this.va(16)},t.g.t6=function(e){if(t.X(e,16)){for(var i in this.f.i=!0,this.P)this.P[i].i=!0;for(i in this.na)this.na[i].D=!0;this.B(16384,16)}},t.g.R=function(){t.sd(this.G,this.K),this.K=this.G=null,j.u.R.call(this)},t.g.zi=function(t){return q(this),this.i.zi(t)},t.g.Uf=function(t){return q(this),this.i.Uf(t)},t.g.EM=function(){return this.b.FI},t.H(Q,t.hx);var Fr={};t.sq(Fr,[[0,"allowPlotDrag",t.Dq],[0,"scrollOnMouseWheel",t.Dq]]),t.U(Q,Fr),Q.prototype.F=function(){var e=Q.u.F.call(this);return t.Tq(this,Fr,e),e},Q.prototype.U=function(e,i){Q.u.U.call(this,e,i),t.Iq(this,Fr,e)},t.H(tt,t.Y);var Ir=tt.prototype,Er={};t.sq(Er,[[0,"height",t.Bq],[0,"showHelperLabel",t.Dq],[0,"overlapMode",function(e,i){return t.zk(Ro,e,i||"no-overlap")}]]),Ir.zR=Er,t.U(tt,tt.prototype.zR),t.g=tt.prototype,t.g.sa=80|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(64,1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.de=function(e){var i=0,n=0;t.X(e,1)&&(i=16,n=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Xa=function(e){return this.mb||(this.mb=new t.Qy,this.mb.orientation("top"),this.mb.Ie(!0,!1),this.mb.kb(this),t.W(this,"ticks",this.mb),t.K(this.mb,this.y_,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.yb=function(e){return this.Rc||(this.Rc=new t.Qy,this.Rc.orientation("top"),this.Rc.Ie(!0,!1),this.Rc.kb(this),t.W(this,"minorTicks",this.Rc),t.K(this.Rc,this.y_,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.y_=function(){this.B(16,1)},t.g.scale=function(e){return t.p(e)?(this.qa!=e&&(this.qa&&t.kr(this.qa,this.ii,this),(this.qa=e)&&t.K(this.qa,this.ii,this),this.B(16,1)),this):this.qa},t.g.ii=function(e){t.X(e,512)&&this.B(16,1)},t.g.orientation=function(e){return t.p(e)?this:"bottom"},t.g.ob=function(){var e=this.ja();return e?(this.enabled()&&(e.top=e.top+e.height-this.g("height")+1),e):new t.I(0,0,0,0)},t.g.yd=function(){var e=this.ja();return e?(this.enabled()&&(e.height-=this.g("height")),e):new t.I(0,0,0,0)},t.g.Kt=function(e,i){var n,s=this.qa.Aha,a=this.qa.zha,o=this.qa.Yha,r=this.qa.Xha,l=null,h=[],c=null,u=[],d=[],p=[],g=[],f=[],b=[],v=[],m=this.mb&&this.mb.enabled()?t.Ry(this.mb):null,y=this.Rc&&this.Rc.enabled()?t.Ry(this.Rc):null,S=!(!this.Da||!this.Da.enabled()),w=!(!this.rc||!this.rc.enabled()),x=1,C=0;for(i.reset();i.advance();){var D=i.current;if((n=S&&i.o)&&m?m.call(this.mb,this.qa.NP(D),e,e,0,.5):y&&y.call(this.Rc,this.qa.NP(D),e,e,0,.5),"allow-overlap"==this.g("overlapMode"))n?(g.push(D),b.push(x),l||(l=this.rd(D,n,e,s,o,r,0))):w&&(f.push(D),v.push(C),h.push(this.rd(D,n,e,s,o,r,0)));else{var T=this.rd(D,n,e,s,o,r,n?x:C);if(n){if("allow-major-overlap"==this.g("overlapMode")||!c||!c.so(T)){for(c=d.length;c--&&T.so(d[c]);)u.pop(),d.pop(),p.pop();g.push(D),b.push(x),f.push.apply(f,u),v.push.apply(v,p),h.push.apply(h,d),c=T,l||(l=T)}u.length=d.length=p.length=0}else!w||c&&c.so(T)||"allow-minor-overlap"!=this.g("overlapMode")&&d.length&&d[d.length-1].so(T)||(u.push(D),p.push(C),d.push(T))}n?x++:C++}if(u.length&&(f.push.apply(f,u),v.push.apply(v,p),h.push.apply(h,d)),t.Yu(this.labels()),t.Yu(this.qb()),D=i.f,this.g("showHelperLabel")&&!(0,window.isNaN)(D)&&(T=this.rd(D,!0,e,s,o,r,0))&&(!l||!T.so(l))){if("allow-overlap"!=this.g("overlapMode")){for(c=0;c<h.length&&T.so(h[c]);c++);c&&(t.Ca(h,0,c),t.Ca(f,0,c),t.Ca(v,0,c))}this.ke(D,!0,e,s,a,o,r,0)}for(c=0;c<g.length;c++)this.ke(g[c],!0,e,s,a,o,r,b[c]);for(c=0;c<f.length;c++)this.ke(f[c],!1,e,s,a,o,r,v[c])},t.g.ke=function(e,i,n,s,a,o,r,l){i=i?this.labels():this.qb();var h=this.qa.Uf(e);"stock-ordinal-date-time"==this.qa.Ma()&&(h=Math.ceil(h)),a=this.qa.zi(h),h=this.qa.Kr(a,h),h=Math.round(n.left+h*n.width);var c=n.top;e=this.Am(e,a,s,o,r),s={value:{x:h,y:c}},o=i.measure(e,s,void 0,l),(0,window.isNaN)(o.left)||(0<(n=n.left-o.left)&&(s.value.x+=n),l=i.add(e,s,l),t.bv(l,[l.Pa,i.Pa,l.Nd,i.oa]),t.J(this.b,oo)||(n=i.g("position"),n=t.Ho(n),l.qk(0>n?"center-bottom":0<n?"center-top":"center")))},t.g.rd=function(t,e,i,n,s,a,o){if(!(e=e?this.labels():this.qb()).enabled())return null;var r=this.qa.Uf(t);"stock-ordinal-date-time"==this.qa.Ma()&&(r=Math.ceil(r));var l=this.qa.zi(r);r=this.qa.Kr(l,r),r=Math.round(i.left+r*i.width);var h=i.top;return t=this.Am(t,l,n,s,a),(o=e.measure(t,{value:{x:r,y:h}},void 0,o)).left=Math.max(o.left,i.left),o},t.g.Am=function(e,i,n,s,a){var o=t.vs(e),r=this.b.Wm();return e={dataIntervalUnit:{value:r.Cn().unit,type:"string"},dataIntervalUnitCount:{value:r.Cn().count,type:"number"},dataIsGrouped:{value:r.OD(),type:"string"},majorIntervalUnit:{value:n,type:"string"},majorIntervalUnitCount:{value:a,type:"number"},minorIntervalUnit:{value:s,type:"string"},minorIntervalUnitCount:{value:a,type:"number"},value:{value:o,type:"string"},tickValue:{value:e,type:"number"},dataValue:{value:i,type:"number"},max:{value:this.qa.iU(),type:"number"},min:{value:this.qa.jU(),type:"number"},scale:{value:this.qa,type:""}},(e=new t.Fw(e)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(e)},t.g.remove=function(){this.Oa&&this.Oa.remove()},t.g.W=function(){if(!this.zc())return this;this.Oa||(this.Oa=t.ok(),this.f||this.Oa.Dd(!0));var e=t.wr(this,"background"),i=t.wr(this,"labels"),n=t.wr(this,"minorLabels"),s=t.wr(this,"ticks"),a=t.wr(this,"minorTicks");if(e&&e.ka(),i&&i.ka(),n&&n.ka(),this.J(4)){if(e){var o=this.ja().clone().round();o.top=o.top+o.height-this.g("height"),o.height=this.g("height"),o.width=Math.ceil(t.R(o.cb(),1))-o.left,e.ja(o)}this.B(80),this.I(4)}return this.J(64)&&(e&&(e.O(this.Oa),e.W()),this.I(64)),this.J(16)&&(this.qa&&(e?o=e.yd():((o=this.ja()).top=o.top+o.height-this.g("height"),o.height=this.g("height")),i&&(i.clear(),t.Yu(i)),n&&(n.clear(),t.Yu(n)),s&&(s.O(this.Oa),s.W()),a&&(a.O(this.Oa),a.W()),s=i&&i.enabled(),a=n&&n.enabled(),(s||a)&&this.Kt(o,this.qa.Fn()),this.ti||(this.ti=t.tk()),this.ti.shape(o),i&&(i.O(this.Oa),i.W(),(o=i.sl())&&o.clip("outside"==i.g("position")?this.ti:null)),n&&(n.O(this.Oa),n.W(),(o=n.sl())&&o.clip("outside"==n.g("position")?this.ti:null))),this.I(16)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),e&&e.da(!1),i&&i.da(!1),n&&n.da(!1),this},t.g.Nb=function(){return!0},t.g.Iy=function(){return!0},t.g.R=function(){t.sd(this.Da,this.rc,this.mb,this.Rc,this.Ia,this.Oa,this.qa),this.qa=this.Oa=this.Ia=this.Rc=this.mb=this.rc=this.Da=null,tt.u.R.call(this)},t.g.F=function(){var e=tt.u.F.call(this);return t.Tq(this,this.zR,e),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e.background=this.background().F(),e},t.g.U=function(e,i){tt.u.U.call(this,e,i),t.Iq(this,this.zR,e,i),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Xa(e.ticks),this.yb(e.minorTicks),this.background(e.background)};var Ar=tt.prototype;Ar.labels=Ar.labels,Ar.minorLabels=Ar.qb,Ar.ticks=Ar.Xa,Ar.minorTicks=Ar.yb,Ar.background=Ar.background,t.H(et,t.Y),et.prototype.sa=208|t.Y.prototype.sa,et.prototype.ra=t.Y.prototype.ra;var Ur=et.prototype,_r={};t.rq(_r,0,"value",t.Yk),t.rq(_r,0,"valueField",t.Cq),t.rq(_r,1,"stroke",t.Pq),t.rq(_r,1,"risingStroke",t.Pq),t.rq(_r,1,"fallingStroke",t.Pq),Ur.LK=_r,t.U(et,et.prototype.LK),t.g=et.prototype,t.g.bI=function(t){return"left-top"==(t=t.g("anchor"))||"left-center"==t||"left-bottom"==t},t.g.nq=function(e,i,n){if(!i)return null;var s=i.scale(),a=s.Ma();n=s.Mc(n);var o="number";switch(a){case"linear":case"log":var r=n;break;case"ordinal":r=String(n),o="string";break;case"stock-scatter-date-time":case"stock-ordinal-date-time":case"date-time":r=t.vs(n),o="string"}return i={series:{value:e,type:""},axis:{value:i,type:""},value:{value:r,type:o},tickValue:{value:n,type:"number"},scale:{value:s,type:""}},e=t.vB(e,new t.Fw,this.f),t.ov(e,t.Sc(t.nv(e),i))},t.g.label=function(e){return t.p(e)?(this.o.N(e),this):this.o},t.g.cfa=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.fka=function(e){return t.p(e)?(this.G.N(e),this):this.G},t.g.AR=function(){this.B(68,1)},t.g.X=function(e){if(t.p(e)){var i=e;return t.ea(e)?e=this.K.Ai(e):t.z(e)&&(e=this.K.ef(e)),this.Sa!==e&&(this.ba=i,this.Sa=e,this.B(134,1)),this}return this.Sa},t.g.axis=function(e){if(t.p(e)){var i=+e;return t.ea(e)&&(e=this.K.ij(e)),this.b!==e&&(this.aa=i,this.b=e,this.B(4,1)),this}return this.b},t.g.remove=function(){this.Aa.parent(null),this.B(2)},t.g.W=function(){if(!this.zc())return this;this.Aa||(this.Aa=t.ok());var e=this.Sa||this.K.Ai(0);if(e&&!e.md)var i=this.g("valueField")||e.bf.El,n=!!(e.bf.flags&t.UG),s=(this.f=E(e.la,this.g("value"),i))?this.f.get(i):null;if(this.I(128),!s)return this.remove(),this;i=this.line?this.line:this.line=t.qk().zIndex(0).parent(this.Aa);var a=this.g("stroke"),o=this.b||this.K.ij(0);s=o.scale().transform(s);var r=this.K.dg();if(n){var l=this.g("risingStroke"),h=this.g("fallingStroke"),c=this.f.get("open");this.f.get("close")>c?(a=l||a,l=this.G):(a=h||a,l=this.D)}if(h=t.$b(a)||1,this.J(2)&&(c=this.O(),this.Aa.parent(c),this.I(2)),this.J(8)&&(c=this.zIndex(),this.Aa.zIndex(c),this.I(8)),this.J(4)){if(c=r.Va()-s*r.height,c=t.R(c,h),i.clear(),i.moveTo(r.left,c).lineTo(r.cb(),c),i.clip(this.K.dg()),i.parent(this.Aa),this.i.ic("enabled")){r=c,h=this.K.dg();var u=o.ob(),d=o.enabled();switch(c=d?u.tb():h.cb(),u=d?u.cb():h.tb(),o.g("orientation")){case"left":var p=(this.bI(this.i),u);break;case"right":this.bI(this.i),p=c}r>=h.Vb()&&r<=h.Va()||(p=r=window.NaN),r={value:{x:p,y:r}},(0,window.isNaN)(r.value.x)?(this.P=!0,this.i.clear()):((this.P||n)&&(this.B(64),this.P=!1),p=this.nq(e,o,s),this.i.Hf(p),t.Yu(this.o),this.i.jc(r),this.i.qk("left"==o.g("orientation")?"right-center":"left-center"))}else this.i.clear(),this.P=!0;this.I(4)}return this.J(64)&&(this.i.ic("enabled")?(p=this.nq(e,o,s),this.i.Hf(p),t.Yu(this.o),this.i.qk("left"==o.g("orientation")?"right-center":"left-center"),e=[],n?e.push(l.Pa,this.o.Pa,this.i.Nd,this.o.Nd,l.oa,this.o.oa):e.push(this.o.Pa,this.i.Nd,this.o.Nd,this.o.oa),t.bv(this.i,e)):(this.i.clear(),this.P=!0),this.I(64)),this.J(16)&&(i.stroke(a),this.I(16)),this.P||(this.i.O(this.Aa),this.i.W()),this.o.I(4294967295),this.G.I(4294967295),this.D.I(4294967295),this},t.g.F=function(){var e=et.u.F.call(this);return t.Tq(this,this.LK,e,"Current price indicator"),(t.z(this.ba)||t.ea(this.ba))&&(e.series=this.ba),(0,window.isNaN)(this.aa)||(e.axis=this.aa),e.mainLabel=this.o.F(),e.risingLabel=t.TN(this.G),e.fallingLabel=t.TN(this.D),e},t.g.U=function(e,i){i?t.Hq(this.oa,this.LK,e):t.Iq(this,this.LK,e),this.X(e.series),this.axis(e.axis),it(this,e,i),et.u.U.call(this,e,i)},t.g.R=function(){this.Sa=this.b=this.K=null,this.remove(),this.line&&this.line.ld(),this.o.clear(),t.sd(this.o,this.G,this.D),this.D=this.G=this.o=null,et.u.R.call(this)};var jr=et.prototype;jr.label=jr.label,jr.fallingLabel=jr.cfa,jr.risingLabel=jr.fka,jr.axis=jr.axis,jr.series=jr.X,t.H(nt,t.kz),t.g=nt.prototype,t.g.zg=function(e){t.X(e,2)&&this.B(80,1)},t.g.KG=function(e){var i=this.ja().round()||t.kn(0,0,0,0);e=i.Va()-e*i.height,e=t.R(e,this.Uh().gl()),this.o.moveTo(t.R(i.tb(),1)-.5,e),this.o.lineTo(t.R(i.cb(),1)+.5,e)},t.g.LG=function(e){var i=this.ja().round()||t.kn(0,0,0,0);e=i.tb()+e*i.width,e=t.R(e,this.Uh().gl()),this.o.moveTo(e,t.R(i.Va(),1)-.5),this.o.lineTo(e,t.R(i.Vb(),1)+.5)},t.g.HG=function(e,i,n){if(!(0,window.isNaN)(i)){var s=this.ja().round()||t.kn(0,0,0,0),a=this.Uh().gl();i=s.Va()-i*s.height,i=t.R(i,a),e=s.Va()-e*s.height,e=t.R(e,a),n.moveTo(s.tb(),i),n.lineTo(s.cb(),i),n.lineTo(s.cb(),e),n.lineTo(s.tb(),e),n.close()}},t.g.IG=function(e,i,n){if(!(0,window.isNaN)(i)){var s=this.ja().round()||t.kn(0,0,0,0),a=this.Uh().gl();i=s.tb()+i*s.width,i=t.R(i,a),e=s.tb()+e*s.width,e=t.R(e,a),n.moveTo(i,s.Vb()),n.lineTo(e,s.Vb()),n.lineTo(e,s.Va()),n.lineTo(i,s.Va()),n.close()}},t.g.Lj=function(){var e=this.scale(),i=window.NaN,n=t.J(e,t.Qt),s=t.J(e,Za),a=this.g("isMinor");s?(a=e.Fn().ea(!a),a=t.Ga(window.NaN,a,window.NaN)):a=n?e.Xa().get():a?e.yb().get():e.Xa().get();var o=this.Nb()?[this.KG,this.HG]:[this.LG,this.IG];this.Sz(),this.Uh().clear();var r=(this.ja()||t.kn(0,0,0,0)).clone().round(),l=r.Va(),h=r.cb();l=Math.ceil(t.R(l,1)),h=Math.ceil(t.R(h,1)),r.width=h-r.left,r.height=l-r.top,this.Uh().clip(r),r=o[1],h=o[0];for(var c=1==t.$b(this.g("stroke"))%2,u=0,d=a.length;u<d;u++){var p=a[u];t.A(p)&&(p=p[0]),l=s?u?u==d-1?1:e.NP(p):0:e.transform(p),u&&(o=t.oz(this,u-1))&&r.call(this,l,i,o,c),u?u==d-1?(this.g("drawLastLine")||n)&&h.call(this,l,c):h.call(this,l,c):this.g("drawFirstLine")&&h.call(this,l,c),i=l}n&&t.p(p)&&(l=e.Ne()?0:1,this.g("drawLastLine")&&h.call(this,l,c),(o=t.oz(this,u-1))&&r.call(this,l,i,o,c))};var Mr=nt.prototype;Mr.isHorizontal=Mr.Nb,Mr.scale=Mr.scale,Mr.axis=Mr.axis,t.H(st,t.sD);var Nr={up:{tooltip:"Move plot up",icon:"ac ac-caret-up",fallbackSymbol:"▲",model:{type:"up"}},down:{tooltip:"Move plot down",icon:"ac ac-caret-down",fallbackSymbol:"▼",model:{type:"down"}},zoom:{tooltip:"Expand/Collapse plot",icon:"ac ac-enlarge",fallbackSymbol:"⛶",toggle:!0,model:{type:"zoom"}}},Br={single:[Nr.zoom],top:[Nr.down,Nr.zoom],center:[Nr.up,Nr.down,Nr.zoom],bottom:[Nr.up,Nr.zoom]};t.g=st.prototype,t.g.Ac=function(){st.u.Ac.call(this);var e=this.Ya();t.Qj(e,"anychart-plot-controls")},t.g.update=function(){if(this.xf){this.Gi(!0);var e=this.b.dg();t.uf(this.Ya(),{right:this.b.xc().padding().right()+"px",top:e.top+"px"}),e=Br[this.P];for(var i,n,s=this.b.aI(),a=0;a<e.length;a++)i=e[a],n=new t.LD,t.vD(n,"anychart-button-standard"),t.JD(n,i.tooltip),t.ND(n,i.icon),n.P=i.fallbackSymbol,n.dh=i.model,i.toggle&&(s?t.ND(n,"ac ac-dot-square-o"):t.ND(n,"ac ac-enlarge")),1!=e.length&&(a?a==e.length-1?t.KD(n,2):t.KD(n,3):t.KD(n,1)),this.hc(n,!0)}},t.g.Gg=function(){st.u.Gg.call(this),this.update();var e=t.Dy(this);e.wa(this,"enter",(function(){this.aa=!0})),e.wa(this,"leave",(function(){this.aa=!1,this.Lc()})),e.wa(this,"action",this.Sba)},t.g.Sba=function(e){if(e=e.target,t.J(e,t.LD)){var i=e.dh.type,n=this.b;"up"==i?n.i4():"down"==i?n.h4():"zoom"==i&&(n.L6(),n.aI()?t.ND(e,"ac ac-dot-square-o"):t.ND(e,"ac ac-enlarge")),this.aa=!1}},t.g.show=function(){t.Sj(this.Ya(),"anychart-plot-controls-hidden")},t.g.Lc=function(){this.aa||t.Qj(this.Ya(),"anychart-plot-controls-hidden")},t.g.Rba=function(){this.Sd()},t.g.Sd=function(){var e,i=this.b.xc();(e=(i=i.container()?i.container().getStage():null)&&i.container()?i.container():null)?st.u.Sd.call(this,e):(e=(0,t.pa)(this.Rba,this),this.b.xc().Ce("chartdraw",e,!1,this))},t.g=at.prototype,t.g.Tw=function(){ft(this.pc,this.f),this.f.length=0},t.g.fX=function(t,e){this.f.push(e),this.b++},t.g.start=function(){this.b=this.f.length=0},t.g.Kd=t.ia,t.g.AK=function(){this.f.length&&this.Tw()},t.g=ot.prototype,t.g.update=function(){var e=this.P.kG-1;if(this.i<e)if(this.b.length){for(var i=this.P.Sx,n=t.J(this,dt),s=0;s<i.length;s++)if(this.i<=this.P.lG[s]){var a=i[s];a.o.call(a.b,a.b);for(var o=0,r=this.b[0];r;){for(r.f||(r.f=[]);r.f.length<e;)r.f.push(void 0);a.i.call(a.b,new St(r,a,n,o),a.b),r=r.next,o++}}this.i=e,rt(this)}else this.i=e},t.g.select=function(t,e){var i=this.b.length;if(i){var n=(0,window.isNaN)(t)?0:ut(this,t,"exact-or-next");if((0,window.isNaN)(n)){var s=i-1;n=window.NaN}else{var a=(0,window.isNaN)(e)?i-1:ut(this,e,"exact-or-prev");(0,window.isNaN)(a)?(s=window.NaN,n=0):n<=a?(s=0<n?n-1:window.NaN,n=a<i-1?a+1:window.NaN):s=a}}else s=n=window.NaN;return ht(this,t,e,s,n)},t.g.search=function(t,e){return this.En(ut(this,t,e))},t.g.wO=function(e,i){var n,s=this.fU();if(t.ea(s))for(n=0;n<s;n++)n in e||(e[n]=i++);else for(n in s)n in e||(e[n]=i++);return i},t.g.En=function(t){return 0<=t&&t<this.b.length?this.b[t]:null},t.g.Hb=function(){return this.b.length},t.H(dt,ot);var Rr=8;dt.prototype.fU=function(){return this.o},dt.prototype.update=function(){if(0!=this.f){var e=jt(this.P).b,i=this.P.zF;if(this.f>=Rr)this.i=-1,this.b.length=0,pt(this,e,i,this.D,!1);else{if(2&this.f){this.i=-1;var n=e.length?e[0]:null;if(n){var s=this.b.length?this.b[0]:null,a=n.key;if(s&&!(s.key>=a)){for(var o,r=0;(o=s.next)&&o.key<a;)r++,s=o;if(o&&o.key==a)r++;else{for(a=n;a&&(!o||a.key<o.key);){for(n=0;n<this.o;n++){var l=i[n];l.b(a.values[l.o],a.values[l.D],a.values)}a=a.next}for(n=0;n<this.o;n++)s.values[n]=i[n].f()}0<r&&(t.Ca(this.b,0,r),this.b.length&&(this.b[0].b=null))}}else this.b.length=0}if(1&this.f&&(this.i=-1,s=this.D,(r=this.b[this.b.length-1])?(this.b.pop(),r.b&&(r.b.next=null),r=r.key):r=void 0,pt(this,e,i,s,!0,r)),4&this.f&&(e=e[0],a=this.b[0],e&&a)){s=this.o,r=i.length-1;do{for(n=a.next;e&&(!n||e.key<n.key);){for(o=s;o<=r;o++)(l=i[o]).b(e.values[l.o],e.values[l.D],e.values);e=e.next}for(a=a.values,o=s;o<=r;o++)a[o]=i[o].f();a=n}while(e)}}this.f=0,this.o=i.length,rt(this)}dt.u.update.call(this)},t.H(gt,ot),t.g=gt.prototype,t.g.kY=function(){this.aa&&t.kl(101),this.aa=!0},t.g.iG=function(){if(this.aa=!1,this.f.length||this.K){var e=bt(this),i=this.f.length,n=this.b.length,s=this.f[e?0:i-1];if(n=!i||!n||0<f(s,this.b[n-1]),i=0,n&&2>this.K){if(n&&(i|=1),this.K){i|=2;var a=0;for(n=(s=new mt(this.b,null,!0)).next();n&&n.i;)a++,n=s.next();t.Ca(this.b,0,a),(n=this.b[0])&&(n.b=null)}vt(this,new mt(null,this.f,e))}else s=new mt(this.b,this.f,e),this.b=[],vt(this,s),i=Rr;this.f.length=0,this.o=this.Z4,this.i=-1,this.K=0,rt(this),Mt(this.P,i,!0)}},t.g.Yr=function(e,i,n){var s=!this.aa;if(s&&this.kY(),t.z(e)){var a=new at(this),o=new t.Lm;t.C(n)&&(o.lJ(n.rowsSeparator),o.hG(n.columnsSeparator),o.OH(n.ignoreTrailingSpaces),o.MH(n.ignoreFirstRow)),o.pC(e,a),!0===i&&(i=a.b)}else if(t.A(e)){for(a=n=0;a<e.length;a++)ft(this,e[a])&&n++;!0===i&&(i=n)}return i=t.N(i),(0,window.isNaN)(i)||this.MO(i),s&&this.iG(),this},t.g.remove=function(t,e){for(var i,n=new mt(this.b,this.f,bt(this),t,e);i=n.next();)i.i=!0;return this.K=2,this.aa||this.iG(),this},t.g.MO=function(e){e=t.P(e);for(var i,n=new mt(this.b,this.f,bt(this)),s=window.NaN;(i=n.next())&&0<e;)i.i||(i.key!=s&&e--,i.i=!0,s=i.key);return this.K||(this.K=1),this.aa||this.iG(),this},t.g.fU=function(){return this.D||this.ba},t.g.Z4=function(t){this.f.push(t),this.o=this.X4},t.g.X4=function(t){var e=this.f.length,i=this.f[e-1];i.key<t.key?this.f.push(t):i.key>t.key?(this.o=1==e?this.Y4:this.iX,this.f.push(t)):this.f[e-1]=t},t.g.Y4=function(t){var e=this.f.length,i=this.f[e-1];i.key>t.key?this.f.push(t):i.key<t.key?(this.o=this.iX,this.f.push(t)):i.key==t.key&&(this.f[e-1]=t)},t.g.iX=function(t){this.f.push(t)},t.g=mt.prototype,t.g.dE=function(){return null},t.g.iia=function(){var t=this.f,e=this.o[this.b];return t?e?0>f(t,e)?(this.f=this.f.next,t):(this.b++,e):(this.f=this.f.next,this.i=this.o4,t):e?(this.b++,this.i=this.gia,e):(this.next=this.dE,null)},t.g.kia=function(){var t=this.f,e=this.o[this.b];return t?e?0>f(t,e)?(this.f=this.f.next,t):(this.b--,e):(this.f=this.f.next,this.i=this.o4,t):e?(this.b--,this.i=this.hia,e):(this.next=this.dE,null)},t.g.o4=function(){var t=this.f;return t?(this.f=this.f.next,t):(this.next=this.dE,null)},t.g.gia=function(){var t=this.o[this.b++];return t||(this.next=this.dE,null)},t.g.hia=function(){var t=this.o[this.b--];return t||(this.next=this.dE,null)},t.g.Ida=function(){var t=this.i();return null===t||t.key>this.D?(this.next=this.dE,null):t},t.g.wia=function(){return this.i()},t.H(yt,t.od),t.g=yt.prototype,t.g.ma=function(){return this.Ad},t.g.HE=function(t){this.Ad=t},t.g.Rd=function(){return this.Zc.Rd()},t.g.cd=function(e,i){if(e in this.f)return t.il(202,void 0,[e]),window.NaN;t:{var n=this.Rd();if(this.Rd()!=n)n=window.NaN;else{var s=n.Xw.length,a=s?~n.Xw[0]:~n.kG;if(t.z(i)){if(i in n.Wz){t.il(201,void 0,[i]),n=window.NaN;break t}n.Wz[i]=a}n.lG[this.ma()]=Math.max(n.lG[this.ma()],~a),s?n.Xw.shift():n.kG++,n=a}}return(0,window.isNaN)(n)?window.NaN:this.f[e]=n},t.g.Ke=function(t){return t in this.f?this.f[t]:window.NaN},t.g.Cf=function(t){this.b=t},t.g.Df=function(e){this.o=t.D(e)?e:t.ia},t.g.Bf=function(e){this.i=t.D(e)?e:t.ia},t.g.R=function(){var e,i=this.Rd(),n=this.ma();for(i.Sx.splice(n,1),e=n;e<i.Sx.length;e++)i.Sx[e].HE(e);for(var s in i.lG.splice(n,1),n=[],this.f)n.push(this.f[s]);if(n.length){t.Pa(i.Xw),s=[];var a=Number.POSITIVE_INFINITY;for(e=0;e<n.length;e++){var o=~n[e];for(var r in a=Math.min(a,o),i.Xw.push(o),i.Wz)if(i.Wz[r]==n[e]){s.push(r);break}}for(t.Pa(i.Xw),e=i.Xw.length;e--&&i.Xw[e]==i.kG-1;)i.kG--,i.Xw.pop();for(e=0;e<s.length;e++)delete i.Wz[s[e]];for(var l in a--,i.pc.i=Math.min(i.pc.i,a),i.dv)i.dv[l].i=Math.min(i.dv[l].i,a)}t.C(this.b)&&t.D(this.b.dispose)&&this.b.dispose(),delete this.b,delete this.i,delete this.o,delete this.Zc,delete this.f,yt.u.R.call(this)},t.H(St,_),St.prototype.set=function(t,e){return this.i(this.o.Ke(t),e)},St.prototype.i=function(t,e){var i=!(0,window.isNaN)(t);return i&&(this.Af.f[~t]=e),i};var Hr=yt.prototype;Hr.addOutputField=Hr.cd,Hr.getFieldIndex=Hr.Ke,Hr.setContext=Hr.Cf,Hr.setStartFunction=Hr.Df,Hr.setCalculationFunction=Hr.Bf,Hr.dispose=Hr.ld,(Hr=St.prototype).set=Hr.set,Hr.setColumn=Hr.i,t.H(wt,t.V),wt.prototype.wL=function(){return new k(this)},wt.prototype.Td=function(e,i,n,s){if(t.ea(i))var a=Math.round(t.N(i));else{if(!t.z(i))return this;a=this.gz.Wz[i]||window.NaN,(0,window.isNaN)(a)&&(a=i)}if(t.ea(a)&&0>a)this.fD[e]={g6:a,p5:a};else if(t.z(a)||!(0,window.isNaN)(a)){if((i=t.C(n))&&!t.D(n)&&!("reset"in n&&"considerItem"in n&&"getResult"in n))return this;var o=i?n:function(t){switch(t=String(t).toLowerCase()){case"first":case"open":return"first";case"last":case"close":default:return"last";case"max":case"high":case"maximum":case"highest":return"max";case"min":case"low":case"minimum":case"lowest":return"min";case"average":case"avg":return"average";case"weightedaverage":case"weightedavg":case"wavg":case"weights":case"weighted":return"weighted-average";case"firstvalue":case"firstval":case"openvalue":case"openval":return"first-value";case"lastvalue":case"lastval":case"closevalue":case"closeval":case"fill":case"hoverfill":case"risingfill":case"hoverrisingfill":case"fallingfill":case"hoverfallingfill":case"stroke":case"hoverstroke":case"lowstroke":case"hoverlowstroke":case"highstroke":case"hoverhighstroke":case"risingstroke":case"hoverrisingstroke":case"fallingstroke":case"hoverfallingstroke":case"hatchfill":case"hoverhatchfill":case"risinghatchfill":case"hoverrisinghatchfill":case"fallinghatchfill":case"hoverfallinghatchfill":case"marker":case"hovermarker":return"last-value";case"sum":case"add":return"sum";case"list":case"group":case"array":return"list"}}(t.p(n)?n:e);i=s,"weighted-average"==o&&(t.ea(s)?i=Math.round(s):t.z(s)?(i=this.gz.Wz[s]||window.NaN,(0,window.isNaN)(i)&&(i=s)):i=window.NaN,t.ea(i)&&(0,window.isNaN)(i)&&(o="average")),this.gz.ka(),s=this.gz;var r=i;i=function(e,i,n){if(t.ea(i)&&(i=i.toFixed(0)),t.C(e))return t.oa(e)+"|"+i+"|"+t.qo(n);switch(e){case"average":return"a"+i;case"first":return"f"+i;case"first-value":return"o"+i;case"last-value":return"c"+i;case"list":return"g"+i;case"max":return"x"+i;case"min":return"n"+i;case"sum":return"s"+i;case"weighted-average":return t.ea(n)&&(n=n.toFixed(0)),"w"+i+":"+String(n);default:return"l"+i}}(o,n=a,r),i in s.rS?i=s.rS[i]:(n=function(e,i,n){if(t.D(e))return new $t(i,e,n);if(t.C(e))return new kt(i,e);switch(e){case"average":return new Tt(i);case"first":return new Ot(i);case"first-value":return new Pt(i);case"last-value":return new Gt(i);case"list":return new Ft(i);case"max":return new It(i);case"min":return new Et(i);case"sum":return new At(i);case"weighted-average":return new Ut(i,n);default:return new Lt(i)}}(o,n,r),s.rS[i]=i=s.zF.length,s.zF.push(n),Mt(s,4,!1)),this.fD[e]={g6:a,p5:i},this.gz.da(!0)}return this},wt.prototype.Rd=function(){return this.gz};var zr=wt.prototype;zr.addField=zr.Td,zr.createSelectable=zr.wL,t.H(Dt,t.od),Dt.prototype.clear=function(){this.value=void 0},Dt.prototype.f=function(){var t=this.value;return this.clear(),t},Dt.prototype.R=function(){delete this.value,Dt.u.R.call(this)},t.H(Tt,Dt),Tt.prototype.clear=function(){this.value=this.i=0},Tt.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||(this.value+=e,this.i++)},Tt.prototype.f=function(){var t=this.i?this.value/this.i:window.NaN;return this.clear(),t},t.H(kt,Dt),kt.prototype.clear=function(){this.i.reset()},kt.prototype.b=function(t,e,i){this.i.considerItem(t,i)},kt.prototype.f=function(){var t=this.i.getResult();return this.clear(),t},kt.prototype.R=function(){delete this.i,kt.u.R.call(this)},t.H($t,Dt),$t.prototype.clear=function(){this.value=[],this.rows=[]},$t.prototype.b=function(t,e,i){this.value.push(t),this.rows.push(i)},$t.prototype.f=function(){var t=this.G.call(this.i,this.value,this.rows);return this.clear(),t},$t.prototype.R=function(){delete this.G,delete this.i,$t.u.R.call(this)},t.H(Ot,Dt),Ot.prototype.clear=function(){this.value=window.NaN},Ot.prototype.b=function(e){(0,window.isNaN)(this.value)&&(this.value=t.N(e))},t.H(Pt,Dt),Pt.prototype.b=function(e){t.p(this.value)||(this.value=e)},t.H(Lt,Dt),Lt.prototype.clear=function(){this.value=window.NaN},Lt.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||(this.value=e)},t.H(Gt,Dt),Gt.prototype.b=function(e){t.p(e)&&(this.value=e)},t.H(Ft,Dt),Ft.prototype.clear=function(){this.value=[]},Ft.prototype.b=function(e){t.p(e)&&this.value.push(e)},t.H(It,Dt),It.prototype.clear=function(){this.value=window.NaN},It.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||this.value>=e||(this.value=e)},t.H(Et,Dt),Et.prototype.clear=function(){this.value=window.NaN},Et.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||this.value<=e||(this.value=e)},t.H(At,Dt),At.prototype.clear=function(){this.value=0},At.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||(this.value+=e)},t.H(Ut,Dt),Ut.prototype.clear=function(){this.value=this.i=0},Ut.prototype.b=function(e,i){e=t.N(e),i=t.N(i)||0,(0,window.isNaN)(e)||(this.value+=e*i,this.i+=i)},Ut.prototype.f=function(){var t=this.i?this.value/this.i:window.NaN;return this.clear(),t},t.H(_t,t.V),t.g=_t.prototype,t.g.ra=16,t.g.kY=function(){this.pc.kY()},t.g.iG=function(){this.pc.iG()},t.g.Yr=function(t,e,i){return this.pc.Yr(t,e,i),this},t.g.remove=function(e,i){return this.pc.remove(t.Xk(e),t.Xk(i)),this},t.g.MO=function(t){return this.pc.MO(t),this},t.g.Yd=function(e){return e=new wt(this,e),t.rd(this,e),e},t.g.Cc=function(e){if(t.J(e,wt)){if(e.Rd()!=this)return t.il(200),null}else e=this.Yd(e);return e=new yt(e,this.Sx.length),this.Sx.push(e),this.lG.push(-1),e},t.g.R=function(){this.ka(),delete this.pc,t.sd(this.zF,this.Sx),this.zF.length=0,this.dv={},this.Sx.length=0,this.da(!1),_t.u.R.call(this)};var Vr=_t.prototype;t.E("anychart.data.table",(function(t,e,i,n,s){return new _t(t,e,i,n,s)})),Vr.addData=Vr.Yr,Vr.remove=Vr.remove,Vr.removeFirst=Vr.MO,Vr.mapAs=Vr.Yd,Vr.createComputer=Vr.Cc,t.H(Nt,t.eB),t.g=Nt.prototype,t.g.my=function(){var e=this.tl();return t.J(e,ao)?this.fa.width/(e.Cw-e.Ps):this.ya.EM()/(e.iU()-e.jU())*this.fa.width},t.g.ce=function(){return null},t.g.k2=function(){},t.g.LM=function(){var t=G(this.la);return t&&this.$().Iu(t.Af),t},t.g.KM=function(){var t=F(this.la);return t&&this.$().Iu(t.Af),t},t.g.gH=function(){return this.ya},t.g.jL=function(){return!1},t.g.data=function(e,i,n){if(t.p(e)){var s=this.gH();if(s.ka(),this.la){var a=this.la;this.la=null,Go(s,a)}return this.D&&(t.qd(this.D),this.D=null),this.aa=e,t.J(e,_t)||t.J(e,wt)||(a=new _t,e&&a.Yr(e,!1,n),this.D=e=a),t.J(e,_t)&&(e=e.Yd(i),i||(e.Td("value",1,"average"),e.Td("size",2,"sum"),e.Td("open",1,"first"),e.Td("high",2,"max"),e.Td("low",3,"min"),e.Td("close",4,"last"),e.Td("volume",5,"sum")),this.D||(this.D=e)),t.J(e,wt)?(this.la=e.wL(),this.g5()):this.aa=null,s.da(!0),this}return this.aa},t.g.g5=function(){M(this.gH().b,this.la,!0)},t.g.cg=function(){return this.la.$()},t.g.z0=function(){return!0},t.g.Ge=function(e,i,n){var s,a=t.lB(this),o=i?this.cg():this.$(),r=o.ma();a.lg(o).Li([this.ce(r),this]),e=e||this.g("color")||"blue";var l=o.Gh();i=o.get("value");var h=t.p(o.get("name"))?o.get("name"):l;return o={x:{value:l,type:"date-time"},value:{value:i,type:"number"},index:{value:r,type:"number"},iterator:{value:o,type:""},autoColor:{value:e,type:""},chart:{value:this.ya,type:""},plot:{value:this.jf,type:""},series:{value:this,type:""},name:{value:h,type:"string"},isIntersection:{value:!!o.j("isIntersection"),type:"string"}},n=t.p(n)&&n,(r=this.kd())&&!n&&(t.p(i)&&(s=r.Qq(i)),o.scaledColor={value:s,type:""},o.colorScale={value:r,type:""}),o.sourceColor={value:s||e,type:""},t.ov(a,o)},t.g.Yi=function(e){var i=t.lB(this),n=(e=e?this.cg():this.$()).ma();i.lg(e).Li([this.ce(n),this]);var s=this.Eh(),a=e.Gh(),o=e.get("value"),r=t.p(e.get("name"))?e.get("name"):a;return t.ov(i,{x:{value:a,type:"date-time"},value:{value:o,type:"number"},index:{value:n,type:"number"},iterator:{value:e,type:""},sourceHatchFill:{value:s,type:""},plot:{value:this.jf,type:""},chart:{value:this.ya,type:""},series:{value:this,type:""},name:{value:r,type:"string"}})},t.g.uX=function(){if(!this.la)return null;for(var e=this.Be(),i=[],n=0;n<e.length;n++){var s=A(this.la,e[n]);if(!t.z(s)&&(0,window.isNaN)(s))return t.kl(201,void 0,[this.kk(),e[n]]),null;i.push(s)}return i},t.g.oH=function(e){var i=this.uX(),n=[];if(i){var s,a=this.bb(),o=i.length;for(s=0;s<o;s++){var r=i[s],l=this.la;l=t.ea(r)&&0>r?e?l.b.Z6[~r]:l.b.fL[~r]:e?l.b.d7[r]:l.b.UN[r],n.push(a.Lz(t.p(l)?l:window.NaN,this.Rx)),l=this.la,r=t.ea(r)&&0>r?e?l.b.Y6[~r]:l.b.eL[~r]:e?l.b.c7[r]:l.b.SN[r],n.push(a.Lz(t.p(r)?r:window.NaN,this.Rx))}}return n},t.g.kE=function(){var e=A(this.la,"label"),i=A(this.la,"minLabel"),n=A(this.la,"maxLabel");return t.z(e)||!(0,window.isNaN)(e)||t.z(i)||!(0,window.isNaN)(i)||t.z(n)||!(0,window.isNaN)(n)},t.g.vO=function(){var e=A(this.la,"marker");return t.z(e)||!(0,window.isNaN)(e)},t.g.gh=function(){return this.EP()&&"none"!=this.bb().jn()},t.g.ro=function(e,i){this.f=this.la.search(e,"exact"),this.K=!0,Ht(this,t.gm),this.G=this.f?this.f:this.la.search(i,"exact"),Ht(this,t.vo)},t.g.fk=function(){return this.Gc},t.g.Zk=function(){this.Gc&t.vo||(this.Gc=t.vo,this.B(2176,1))},t.g.Md=function(){return this.Gc!=t.gm&&(this.Gc=t.gm,this.B(2176,1)),this},t.g.rr=function(){return this.fk()},t.g.Rk=function(){return this.Qu||(this.Qu=new t.Fw),t.vB(this,this.Qu,this.K?this.f:this.P)},t.g.RC=function(e){if(this.qu||(this.qu=new t.Fw),this.qu=t.vB(this,this.qu,this.K?this.f:this.P),e){for(var i=t.nv(this.qu),n=0;n<e.length;n++)t.ra(i,e[n]);t.ov(this.qu)}return this.qu},t.g.ym=function(t,e){var i=this.ya.Wm(),n=Nt.u.ym.call(this,t,e);return n.defaultDecimalDigitsCount={value:this.ba,type:"number"},n.dataIntervalUnit={value:i.Cn().unit,type:"string"},n.dataIntervalUnitCount={value:i.Cn().count,type:"number"},n.isGrouped={value:i.OD(),type:""},n},t.g.p2=function(){return"date-time"},t.g.eH=function(e,i,n,s){if(!e&&this.check(t.UG)){if(e=s.open<s.close,2==i)e=e?"risingStroke":"fallingStroke";else if(3==i){if(this.check(8))return null;e=e?"risingHatchFill":"fallingHatchFill"}else this.check(8)?(e=e?"risingStroke":"fallingStroke",i=2):e=e?"risingFill":"fallingFill";return t.cm(e,i,!1)(this,t.gm,!0)}return Nt.u.eH.call(this,e,i,n,s)},t.g.pD=function(e,i){return"rising-falling"==String(e).toLowerCase()&&this.check(t.UG)?i.open<i.close?"triangle-up":"triangle-down":Nt.u.pD.call(this,e,i)},t.g.e2=function(e){if(this.check(t.UG)){var i=(0,window.isNaN)(e.high)||(0,window.isNaN)(e.low)||(0,window.isNaN)(e.open)||(0,window.isNaN)(e.close);e=": (O: "+zt(this,e.open)+"; H: "+zt(this,e.high)+"; L: "+zt(this,e.low)+"; C: "+zt(this,e.close)+")"}else this.check(t.fm)?(i=(0,window.isNaN)(e.high)||(0,window.isNaN)(e.low),e=": (H: "+zt(this,e.high)+"; L: "+zt(this,e.low)+")"):(i=(0,window.isNaN)(e.value),e=": "+zt(this,e.value));return this.name()+(i?"":e)},t.g.SZ=function(e){var i=this.Ma();return null!==(i=lh[i])?t.p(e)?this:i:(i=!!this.ya.wfa&&this.ya.vt,t.p(e)?(e=!!e,t.p(this.vt)||(this.vt=i),this.vt!=e&&(this.vt=e,e=this.ya.Vv(this.Ma())[1],this.Mz(e,!1),this.B(5664,this.ra)),this):t.p(this.vt)?this.vt:i)},t.g.Mz=function(e,i){var n=t.Qc(e),s=!t.J(this,Ya)&&this.SZ();n.Cb|=s&&1048576,n.Kb=s?2:1,Nt.u.Mz.call(this,n,i)},t.g.F=function(){return Nt.u.F.call(this)},t.g.U=function(t,e){Nt.u.U.call(this,t,e)},t.g.R=function(){if(this.la){var t=this.la;this.la=null,Go(this.gH(),t)}this.P=this.f=null,Nt.u.R.call(this)};var qr=Nt.prototype;qr.data=qr.data,qr.allowPointSettings=qr.SZ,Vt.prototype.getData=function(){return(0,t.Wa)(this.la||[],(function(t){return t.data}))},Vt.prototype.$=function(e,i,n,s){var a,o=(0,window.isNaN)(i)||(0,window.isNaN)(n);if(o)var r=0,l=this.la.length;else r=~t.Na(this.la,{key:i,index:-1},qt),l=~t.Na(this.la,{key:n,index:-window.Infinity},qt);if(this.b&&this.b.FJ==s&&this.b.rfa==r&&this.b.jla==l&&this.b.Hja==e.Hb())var h=this.b.data,c=this.b.vha,u=this.b.rj||0,d=this.b.count||0;else{if(h=[],c=[],d=0,s){u=window.NaN,n=r;var p=window.NaN,g=window.NaN,f=[];for(e.reset();e.advance()&&n<l;){for(var b;n<l&&(b=this.la[n]).key<e.f;)f.push(b),n++;if(f.length)if((0,window.isNaN)(p)&&!o)f.length=0;else{for(h.length||(u=n-f.length),a=0;a<f.length;a++)c.push(h.length);h.push({key:p,index:g,items:f,PG:n-f.length}),d+=f.length,f=[]}p=e.f,g=e.i()}if(!(0,window.isNaN)(p)||o){for(;n<l;)f.push(b),n++;if(f.length){for(h.length||(u=n-f.length),a=0;a<f.length;a++)c.push(h.length);h.push({key:p,index:g,items:f,PG:n-f.length}),d+=f.length}}e=e.Hb()}else{for(u=0,o=[],e.reset();e.advance();)o[e.i()]=e.f;e.reset(),g=b=window.NaN,f=0;var v=window.NaN;i=(0,window.isNaN)(i)?-window.Infinity:i;for(var m,y=(0,window.isNaN)(n)?window.Infinity:n;e.advance();){a=e.f,p=e.i(),(0,window.isNaN)(v)&&(v=p);var S=(o[p]-o[g])/2;for(n=0;n<this.la.length;n++){m=this.la[n].key<=y&&this.la[n].key>=i;var w=g==v&&this.la[n].key<b+S,x=o[p]+(o[p+1]-o[p])/2,C=o[p]-(o[p]-o[p-1])/2;x=(0,window.isNaN)(x)?y:x,C=this.la[n].key<=x&&this.la[n].key>=C,m&&(w||C)&&(h.push({key:this.la[n].key,index:C?p:g,items:[this.la[n]],PG:f}),c.push(f),f++,d++)}b=a,g=p}if(b==a&&g==v||(0,window.isNaN)(a))for(n=0;n<this.la.length;n++)(m=this.la[n].key<=y&&this.la[n].key>=i)&&(h.push({key:this.la[n].key,index:p||f,items:[this.la[n]],PG:f}),c.push(f),f++,d++);e=d}this.b={rfa:r,jla:l,data:h,vha:c,rj:u,count:d,Hja:e,FJ:s}}return new Wt(h,c,u,d)},Vt.prototype.f=function(e,i,n){var s=t.ps(i instanceof Date||!t.C(i)?i:i.date,this.o,(0,window.isNaN)(this.i)?null:new Date(this.i),this.D);return s&&e.push({index:n,key:+s,data:i,j:{}}),e},t.g=Wt.prototype,t.g.select=function(t){var e;if(e=this.G<=t&&t<this.G+this.K){this.o=t,this.b=this.P[t-this.G];var i=this.la[this.b];this.D=i.items.length,this.i=t-i.PG}else this.D=0,this.b=this.la.length,this.i=0,this.o=window.NaN;return e},t.g.Iu=function(t){this.select(t)},t.g.current=function(){return this.la[this.b].items[this.i].data},t.g.reset=function(){return this.o=this.G-1,this.b=-1,this.i=this.D=0,this},t.g.advance=function(){return++this.i>=this.D&&(this.i=0,this.b++,this.D=this.b<this.la.length?this.la[this.b].items.length:0),this.o++,this.i<this.D},t.g.Hb=function(){return this.K},t.g.ma=function(){return this.b<this.la.length?this.o:window.NaN},t.g.Gh=function(){return this.b<this.la.length?this.la[this.b].key:window.NaN},t.g.get=function(e){var i=this.la[this.b].items[this.i].data;return t.C(i)?i[e]:void 0},t.g.lr=function(){},t.g.j=function(e,i){var n=this.la[this.b].items[this.i].j;return t.p(i)?(n[e]=i,this):n[e]},t.H(Xt,t.Y);var Wr={};t.sq(Wr,[t.Z.dZ,t.Z.n8,t.Z.G9,t.Z.t8,t.Z.l$]),t.U(Xt,Wr);var Kr=[["direction",64,1],["position",64,1],["seriesId",64,1],["fieldName",64,1],["stickToLeft",64,1]],Yr=t.uq();Yr.push.apply(Yr,[t.Z.o8,t.Z.jK,t.Z.hK,t.Z.H8,t.Z.cC,t.Z.qF,t.Z.B8]);var Xr=Yr,Jr={};t.sq(Jr,Xr);var Zr,Qr=["connector"];for(Zr in Jr)Qr.push(Zr);t.Gq(Xt,Qr,"normal");var tl={};t.T(tl,[["type",64,1],["width",64,1],["height",64,1],["fill",64,1],["stroke",64,1],["format",64,1],["fontPadding",64,1],["connector",64,1]]),t.Eq(tl,64,64,1,1);var el=tl,il={};t.T(il,[["type",0,0],["width",0,0],["height",0,0],["fill",0,0],["stroke",0,0],["format",0,0],["fontPadding",0,0],["connector",0,0]]),t.Eq(il,0,0,0,0);var nl=il;t.g=Xt.prototype,t.g.sa=80|t.Y.prototype.sa,t.g.ra=1|t.Y.prototype.ra,t.g.PC=function(){this.B(80,1)},t.g.iH=function(t){var e=this.jf.qj();return t?1==t?e.lb():e.selected():e.Qa()},t.g.data=function(e){if(t.p(e)){if(t.C(e)&&!t.A(e)){var i=e.dateTimePattern,n=e.baseDate,s=e.locale;e=e.data}t.A(e)||(e=[]);var a=this.xG;return a.o=i,a.i=t.ma(n)?n.getTime():t.N(n),a.D=s||null,a.b=null,a.la=(0,t.Gg)(e,a.f,[]),a.la.sort(qt),this.B(64,1),this}return this.xG.getData()},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.W=function(){if(!this.zc())return this;if(this.ka(),this.Da.ka(),this.J(4)&&(this.fa=this.ja(),this.Mx=this.$g?this.$g.Ej(this.fa):this.fa,this.B(64),this.I(4)),this.J(16)&&(this.hB.length=0,this.B(64),this.I(16)),this.J(64)&&(this.sd=null,this.jm.uv(),this.Da.clear()),this.J(2)){var e=this.O();t.RA(this.jm,e),this.I(2)}if(this.J(64)){var i={};e=this.jf.qj();var n=this.$();for(n.reset();n.advance();){if(!n.i){i=Yt(n);var s=e.i[i];s||(s=e.i[i]={}),i=s}i[(s=Zt(this,i))[0]]=s[1]}this.I(72)}return this.J(8)&&this.I(8),this.ca.Zf().I(4294967295),this.Da.da(!1),this.da(!1),this},t.g.remove=function(){this.jm.uv(),this.B(64)},t.g.ke=function(e,i,n,s,a,o,r,l,h,c){i=this.bh(e,i,!1,!1);var u=e.ma();e.j("symbol",Qt(i,"format",t.zq).charAt(0)),e=new t.Fw(this.ym(e),e),t.ov(e);var d=a,p=r;return a={},l&&(p=-p),"flag"==n&&(s+=o/2),"pin"==n?(d+=3*p/5,a.height=Math.abs(4*p/5)):d+=p/2,a.value={x:s,y:d},c?((n=this.Da.be(u)).Hf(e),n.jc(a)):n=this.Da.add(e,a,u),n.zIndex(h),h=Qt(i,"fontPadding",t.br),r=a.height||r,o=t.Ga({positionFormatter:t.ep,anchor:"center",rotation:0,width:o-2*t.L(h,o/2),height:r-2*t.L(h,r/2)},i),t.bv(n,o),n.O(this.O()),n.W(),n},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="eventmarkermouseout";break;case"mouseover":n="eventmarkermouseover";break;case"mousemove":n="eventmarkermousemove";break;case"mousedown":n="eventmarkermousedown";break;case"mouseup":n="eventmarkermouseup";break;case"click":case"touchstart":n="eventmarkerclick";break;case"dblclick":n="eventmarkerdblclick";break;default:return null}return"eventMarkerIndex"in e?i=e.eventMarkerIndex:"labelIndex"in e&&(i=e.labelIndex+this.$().G),e.eventMarkerIndex=i=t.N(i),{type:n,target:this,group:this,index:i,originalEvent:e,eventMarker:this.jp(i)}},t.g.eh=function(){return!0},t.g.kt=function(){return!0},t.g.Ge=function(t){t=t||this.g("fill")||"#ccc";var e=this.$();return{index:e.ma(),sourceColor:t,iterator:e,group:this,chart:this.jf.xc(),plot:this.jf}},t.g.Eh=function(){return null},t.g.$=function(){return this.sd||(this.sd=this.cg()),this.sd},t.g.cg=function(e){var i=Qt(this.bh(null,0,!0,!1),"stickToLeft",t.Dq),n=this.jf.xc();return(e=[H(n.b,!1,!1,!0),e?window.NaN:n.b.b.ki,e?window.NaN:n.b.b.Wi]).push(i),this.xG.$.apply(this.xG,e)},t.g.Yi=function(){return null},t.g.bh=function(e,i,n,s,a){n?n=e=null:(n=e.get("normal"),t.p(n)||!s&&!a||((n={})[a=s?"connector":a||""]=e.get(a)),e=i?1==i?e.get("hovered"):e.get("selected"):null),a=2*(i=Math.min(i,t.wo))+s,s&&(t.C(n)&&(n=n.connector),t.C(e)&&(e=e.connector));var o=this.hB[a];if(o)i?(o[0]=e,o[6]=n):o[0]=n;else{var r=this.jf.qj();o=ee(r,t.gm,!0,s);var l=ee(r,t.gm,!1,s),h=s?this.ca.Zf():this.ca;if(i){var c=ee(r,i,!0,s);r=ee(r,i,!1,s),i=i==t.vo?this.za:this.Ea,i=s?i.Zf():i,o=t.Ga([e],i.Pa,r,[n],h.Pa,s?null:this.Pa,l,i.oa,c,h.oa,s?null:this.oa,o)}else o=t.Ga([n],h.Pa,s?null:this.Pa,l,h.oa,s?null:this.oa,o);this.hB[a]=o}return o},t.g.sc=function(t,e,i,n,s,a,o){return e=this.bh(i,e,!!o,s,t),Qt(e,t,n)},t.g.tZ=function(){function t(t,e,i,n,s,a){n/=2,t.moveTo(e,i).lineTo(e-n,i+a,e-n,i+s,e+n,i+s,e+n,i+a).close()}return{circle:function(t,e,i,n,s,a){s/=2,t.Fe(e,i+(a?-s:s),n/2,s,0,360)},rect:function(e,i,n,s,a,o){o&&(a=-a),t(e,i,n,s,a,0)},pin:function(e,i,n,s,a,o){o&&(a=-a),t(e,i,n,s,a,a/4)},flag:function(e,i,n,s,a,o){o&&(a=-a),t(e,i+s/2,n,s,a,0)}}}(),t.g.$T=function(e){var i,n=this.$();return n.select(e)?i=this.ym(n):n=null,e=new t.Fw(i,n),t.ov(e),e},t.g.ym=function(t){var e=this.jf.xc().Wm().Cn();return{date:{value:t.b<t.la.length?t.la[t.b].items[t.i].key:window.NaN,type:"date-time"},groupedDate:{value:t.Gh(),type:"date-time"},group:{value:this,type:""},index:{value:t.ma(),type:"number"},plot:{value:this.jf,type:""},chart:{value:this.jf.xc(),type:""},title:{value:t.get("title")||"",type:"string"},description:{value:t.get("description")||"",type:"string"},symbol:{value:t.j("symbol"),type:"string"},dataIntervalUnit:{value:e.unit,type:"string"},dataIntervalUnitCount:{value:e.count,type:"number"}}},t.g.jp=function(e){var i=this.cg(!0);return i.select(e)?(e=new t.Fw(this.ym(i),i),t.ov(e)):e=null,e},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df().parent(this.jf.qj().Ua()),this.gb.Ri().position("leftTop"),t.Aw(this.gb,this.jf)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e=Xt.u.F.call(this);return t.Tq(this,Wr,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F(),e.data=this.xG.getData(),e},t.g.Ie=function(e,i){return!!t.A(i)&&(this.data(i),!0)},t.g.U=function(e,i){Xt.u.U.call(this,e,i),t.p(e.data)&&this.data(e.data),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.Ua().ga(!!i,e.tooltip),t.Iq(this,Wr,e)},t.g.R=function(){t.sd(this.jm,this.ca,this.za,this.Ea,this.gb,this.Da),this.ca=this.za=this.Ea=this.jm=this.jf=this.gb=this.Da=null,Xt.u.R.call(this)};var sl=Xt.prototype;sl.data=sl.data,sl.tooltip=sl.Ua,sl.getMarker=sl.jp,sl.normal=sl.Qa,sl.hovered=sl.lb,sl.selected=sl.selected,t.H(te,t.Y),t.U(te,Wr),t.Gq(te,Qr,"normal"),t.g=te.prototype,t.g.sa=64|t.Y.prototype.sa,t.g.PC=function(){this.B(64,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.group=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.b[n];return a||((a=new Xt(this.f,n)).kb(this),a.zh=10+.01*this.b.length,this.b[n]=a,t.K(a,this.y4,this),this.B(64,1)),t.p(s)&&a.N(s),a},t.g.data=function(e){var i=this.group().data(e);return t.p(e)?this:i},t.g.W=function(){if(!this.zc())return this;this.Oa||(this.Oa=t.ok(),t.ru(this,this.Oa));var e=this.O();if(this.J(4)){this.fa=this.ja();var i=e.Ja();i=i?i.width():this.fa.width,this.Oa.clip(new t.I(0,this.fa.top,i,this.fa.height)),this.B(64),this.I(4)}if(this.J(64)){for(this.hB.length=0,this.i={},ie(this),i=0;i<this.b.length;i++){var n=this.b[i];n.ka(),n.ja(this.fa),n.O(this.Oa),n.B(64),n.W(),n.da(!1)}this.ca.Zf().I(4294967295),this.I(64)}return this.J(2)&&(this.Oa.parent(e),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this},t.g.y4=function(){this.B(64,1)},t.g.Jt=function(e,i,n,s,a){var o=a?a.clear():this.Qn.length?this.Qn.pop():t.qk();return t.C(s)&&"keys"in s&&!t.C(s.mode)&&((s=t.Sl(s)).mode=this.fa),o.stroke(s),o.fill(null),o.zIndex(0),a||(this.Oa.hc(o),this.o.push(o)),o.moveTo(e,i).lineTo(e,n),o},t.g.Ih=function(e){var i,n=t.so(e.domTarget);t.J(e.target,t.Pu)?(n=e.target.Zi(),t.J(n,Xt)&&(i=n)):t.C(n)&&!t.J(n,te)&&(i=n.group,e.eventMarkerIndex=n.index),i&&!i.md&&i.enabled()&&(e=i.Tg(e))&&i.dispatchEvent(e)},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df().parent(this.f.xc().qj().Ua())),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e=te.u.F.call(this);t.Tq(this,Wr,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F();for(var i=[],n=0;n<this.b.length;n++){var s=this.b[n];i.push(s?s.F():null)}return e.groups=i,e},t.g.U=function(e,i){var n,s;if(te.u.U.call(this,e,i),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.Ua().ga(!!i,e.tooltip),t.Iq(this,Wr,e),t.p(n=e.groups)){if(t.sd(this.b),this.b.length=0,ie(this),t.A(n))for(s=0;s<n.length;s++){var a=n[s];null!=a&&this.group(s,a)}}else t.p(s=e.data)&&this.data(s)},t.g.R=function(){t.sd(this.b,this.Oa,this.ca,this.za,this.Ea,this.gb),delete this.b,this.ca=this.za=this.Ea=this.Oa=this.f=this.gb=null,te.u.R.call(this)};var al=te.prototype;al.group=al.group,al.data=al.data,al.tooltip=al.Ua,al.normal=al.Qa,al.hovered=al.lb,al.selected=al.selected,t.H(se,t.od),se.prototype.Xn=function(t,e){t.Td("value",e.Ke("result"))},se.prototype.R=function(){for(var e in this.Sa){var i=this.Sa[e];i.X&&this.D.Ao(i.X.id()),t.qd(i.X),i.ZD=!1,t.qd(i.mapping),i.mapping=null}delete this.Sa,t.qd(this.f),this.f=null,delete this.D,delete this.Zc,delete this.pa,se.u.R.call(this)};var ol=se.prototype;ol.dispose=ol.ld,t.g=he.prototype,t.g.enqueue=function(t){var e=void 0;if(this.pc.length<this.i)this.pc.push(t),this.b++;else{var i=(this.f+this.b)%this.i;this.b<this.i?this.b++:(e=this.pc[i],this.f=(this.f+1)%this.pc.length),this.pc[i]=t}return e},t.g.mea=function(){if(this.b){var t=this.pc[this.f];this.f=(this.f+1)%this.pc.length,this.b--}return t},t.g.get=function(e){return e=(t.$a(+e,this.b)+this.f)%this.pc.length,(0,window.isNaN)(e)?void 0:this.pc[e]},t.g.Jg=function(){return this.b},t.g.clear=function(e){this.f=this.b=this.pc.length=0,this.i=t.P(e,this.i,!1)};var rl=he.prototype;t.E("anychart.math.cycledQueue",ce),t.E("anychart.calculations.cycledQueue",ce),rl.enqueue=rl.enqueue,rl.dequeue=rl.mea,rl.get=rl.get,rl.getLength=rl.Jg,rl.clear=rl.clear,t.E("anychart.math.adl.initContext",ue),t.E("anychart.math.adl.startFunction",de),t.E("anychart.math.adl.calculate",pe),t.E("anychart.math.adl.calculationFunction",ge),t.E("anychart.math.adl.createComputer",fe),t.H(be,se),be.prototype.Cc=function(t){return fe(t)},be.prototype.Gf=function(){return"ADL"},be.prototype.X=function(t){return oe(this,"main",t)};var ll=be.prototype;ll.series=ll.X,t.E("anychart.math.ama.initContext",ve),t.E("anychart.math.ama.startFunction",me),t.E("anychart.math.ama.calculationFunction",ye),t.E("anychart.math.ama.createComputer",Se),t.H(we,se),t.g=we.prototype,t.g.Cc=function(t){return Se(t,this.i,this.b,this.o)},t.g.Gf=function(){return"AMA("+this.i+","+this.b+","+this.o+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var hl=we.prototype;hl.series=hl.X,hl.period=hl.ub,hl.fastPeriod=hl.Nv,hl.slowPeriod=hl.ix,t.E("anychart.math.ema.initContext",xe),t.E("anychart.math.ema.startFunction",Ce),t.E("anychart.math.ema.calculate",ke),t.E("anychart.math.ema.calculationFunction",De),t.E("anychart.math.ema.createComputer",Te),t.E("anychart.math.sma.initContext",$e),t.E("anychart.math.sma.startFunction",Oe),t.E("anychart.math.sma.calculate",Ge),t.E("anychart.math.sma.calculationFunction",Pe),t.E("anychart.math.sma.createComputer",Le),t.E("anychart.math.ao.initContext",Fe),t.E("anychart.math.ao.startFunction",Ie),t.E("anychart.math.ao.calculate",Ee),t.E("anychart.math.ao.calculationFunction",Ae),t.E("anychart.math.ao.createComputer",Ue),t.H(_e,se),t.g=_e.prototype,t.g.Cc=function(t){return Ue(t,this.b,this.i,this.o)},t.g.Gf=function(){return"AO("+this.b+", "+this.i+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.al=function(e){return t.p(e)?((e=i(e,this.o))!=this.o&&(this.o=e,le(this)),this):this.o};var cl=_e.prototype;cl.series=cl.X,cl.fastPeriod=cl.Nv,cl.slowPeriod=cl.ix,cl.maType=cl.al,t.E("anychart.math.atr.initContext",je),t.E("anychart.math.atr.startFunction",Me),t.E("anychart.math.atr.calculate",Ne),t.E("anychart.math.atr.calculationFunction",Be),t.E("anychart.math.atr.createComputer",Re),t.H(He,se),He.prototype.Cc=function(t){return Re(t,this.b)},He.prototype.Gf=function(){return"ATR("+this.b+")"},He.prototype.X=function(t){return oe(this,"main",t)},He.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var ul=He.prototype;ul.series=ul.X,ul.period=ul.ub,t.E("anychart.math.aroon.initContext",ze),t.E("anychart.math.aroon.startFunction",Ve),t.E("anychart.math.aroon.calculate",qe),t.E("anychart.math.aroon.calculationFunction",We),t.E("anychart.math.aroon.createComputer",Ke),t.H(Ye,se),t.g=Ye.prototype,t.g.Cc=function(t){return Ke(t,this.b)},t.g.Gf=function(t){switch(t){case"upAroon":return"Aroon up";case"downAroon":return"Aroon down";case"range":return"Aroon"}return""},t.g.Xn=function(t,e,i){switch(i){case"upAroon":t.Td("value",e.Ke("upResult"));break;case"downAroon":t.Td("value",e.Ke("downResult"));break;case"range":t.Td("high",e.Ke("upResult")),t.Td("low",e.Ke("downResult"))}},t.g.ula=function(t){return null===oe(this,"upAroon")&&(ae(this,"upAroon",this.o),re(this)),oe(this,"upAroon",t)},t.g.sea=function(t){return null===oe(this,"downAroon")&&(ae(this,"downAroon",this.i),re(this)),oe(this,"downAroon",t)},t.g.DR=function(t){return oe(this,"range",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var dl=Ye.prototype;dl.period=dl.ub,dl.upSeries=dl.ula,dl.downSeries=dl.sea,dl.rangeSeries=dl.DR,t.E("anychart.math.aroonOscillator.initContext",Xe),t.E("anychart.math.aroonOscillator.startFunction",Je),t.E("anychart.math.aroonOscillator.calculate",Ze),t.E("anychart.math.aroonOscillator.calculationFunction",Qe),t.E("anychart.math.aroonOscillator.createComputer",ti),t.H(ei,se),ei.prototype.Cc=function(t){return ti(t,this.b)},ei.prototype.Gf=function(){return"Aroon Oscillator("+this.b+")"},ei.prototype.X=function(t){return oe(this,"main",t)},ei.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var pl=ei.prototype;pl.period=pl.ub,pl.series=pl.X,t.E("anychart.math.bbands.initContext",ii),t.E("anychart.math.bbands.startFunction",ni),t.E("anychart.math.bbands.calculate",si),t.E("anychart.math.bbands.calculationFunction",ai),t.E("anychart.math.bbands.createComputer",oi),t.H(ri,se),t.g=ri.prototype,t.g.Cc=function(t){return oi(t,this.i,this.b)},t.g.Gf=function(t){switch(t){case"upper":return"BBands U";case"lower":return"BBands L";case"middle":return"BBands M";case"range":return"BBands"}return""},t.g.Xn=function(t,e,i){switch(i){case"upper":t.Td("value",e.Ke("upperResult"));break;case"lower":t.Td("value",e.Ke("lowerResult"));break;case"middle":t.Td("value",e.Ke("middleResult"));break;case"range":t.Td("high",e.Ke("upperResult")),t.Td("low",e.Ke("lowerResult"))}},t.g.cca=function(t){return oe(this,"upper",t)},t.g.$ba=function(t){return oe(this,"lower",t)},t.g.aca=function(t){return oe(this,"middle",t)},t.g.bca=function(t){return oe(this,"range",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.jo=function(e){return t.p(e)?(e=t.P(e,this.b,!1),this.b!=e&&(this.b=e,le(this)),this):this.b};var gl=ri.prototype;gl.period=gl.ub,gl.deviation=gl.jo,gl.upperSeries=gl.cca,gl.lowerSeries=gl.$ba,gl.middleSeries=gl.aca,gl.rangeSeries=gl.bca,t.E("anychart.math.bbandsB.initContext",li),t.E("anychart.math.bbandsB.startFunction",hi),t.E("anychart.math.bbandsB.calculationFunction",ci),t.E("anychart.math.bbandsB.createComputer",ui),t.H(di,se),t.g=di.prototype,t.g.Cc=function(t){return ui(t,this.i,this.b)},t.g.Gf=function(){return"BBands %B("+this.i+","+this.b+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.jo=function(e){return t.p(e)?(e=t.P(e,this.b,!1),this.b!=e&&(this.b=e,le(this)),this):this.b};var fl=di.prototype;fl.period=fl.ub,fl.deviation=fl.jo,fl.series=fl.X,t.E("anychart.math.bbandsWidth.initContext",(function(t,e){return ii(t,e)})),t.E("anychart.math.bbandsWidth.startFunction",pi),t.E("anychart.math.bbandsWidth.calculate",gi),t.E("anychart.math.bbandsWidth.calculationFunction",fi),t.E("anychart.math.bbandsWidth.createComputer",bi),t.H(vi,se),t.g=vi.prototype,t.g.Cc=function(t){return bi(t,this.i,this.b)},t.g.Gf=function(){return"BBands Width("+this.i+","+this.b+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.jo=function(e){return t.p(e)?(e=t.P(e,this.b,!1),this.b!=e&&(this.b=e,le(this)),this):this.b};var bl=vi.prototype;bl.period=bl.ub,bl.deviation=bl.jo,bl.series=bl.X,t.E("anychart.math.cci.initContext",mi),t.E("anychart.math.cci.startFunction",yi),t.E("anychart.math.cci.calculate",Si),t.E("anychart.math.cci.calculationFunction",wi),t.E("anychart.math.cci.createComputer",xi),t.H(Ci,se),Ci.prototype.Cc=function(t){return xi(t,this.b)},Ci.prototype.Gf=function(){return"CCI("+this.b+")"},Ci.prototype.X=function(t){return oe(this,"main",t)},Ci.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var vl=Ci.prototype;vl.series=vl.X,vl.period=vl.ub,t.E("anychart.math.cho.initContext",Di),t.E("anychart.math.cho.startFunction",Ti),t.E("anychart.math.cho.calculate",ki),t.E("anychart.math.cho.calculationFunction",$i),t.E("anychart.math.cho.createComputer",Oi),t.H(Pi,se),t.g=Pi.prototype,t.g.Cc=function(t){return Oi(t,this.b,this.i,this.o)},t.g.Gf=function(){return"CHO("+this.b+","+this.i+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.al=function(e){return t.p(e)?((e=i(e,this.o))!=this.o&&(this.o=e,le(this)),this):this.o};var ml=Pi.prototype;ml.series=ml.X,ml.fastPeriod=ml.Nv,ml.slowPeriod=ml.ix,ml.maType=ml.al,t.E("anychart.math.cmf.initContext",Li),t.E("anychart.math.cmf.startFunction",Gi),t.E("anychart.math.cmf.calculate",Fi),t.E("anychart.math.cmf.calculationFunction",Ii),t.E("anychart.math.cmf.createComputer",Ei),t.H(Ai,se),Ai.prototype.Cc=function(t){return Ei(t,this.b)},Ai.prototype.Gf=function(){return"CMF("+this.b+")"},Ai.prototype.X=function(t){return oe(this,"main",t)},Ai.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var yl=Ai.prototype;yl.series=yl.X,yl.period=yl.ub,t.E("anychart.math.roc.initContext",Ui),t.E("anychart.math.roc.startFunction",_i),t.E("anychart.math.roc.calculationFunction",Mi),t.E("anychart.math.roc.calculate",ji),t.E("anychart.math.roc.createComputer",Ni),t.E("anychart.math.wma.initContext",Bi),t.E("anychart.math.wma.startFunction",Ri),t.E("anychart.math.wma.calculate",Hi),t.E("anychart.math.wma.calculationFunction",zi),t.E("anychart.math.wma.createComputer",Vi),t.E("anychart.math.coppockCurve.initContext",qi),t.E("anychart.math.coppockCurve.startFunction",Wi),t.E("anychart.math.coppockCurve.calculate",Ki),t.E("anychart.math.coppockCurve.calculationFunction",Yi),t.E("anychart.math.coppockCurve.createComputer",Xi),t.H(Ji,se),t.g=Ji.prototype,t.g.Cc=function(t){return Xi(t,this.o,this.b,this.i)},t.g.Gf=function(){return"Coppock Curve ("+this.o+", "+this.b+", "+this.i+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.Hla=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.kfa=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.qka=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i};var Sl=Ji.prototype;Sl.series=Sl.X,Sl.wmaPeriod=Sl.Hla,Sl.firstRocPeriod=Sl.kfa,Sl.secondRocPeriod=Sl.qka,t.E("anychart.math.dmi.initContext",Zi),t.E("anychart.math.dmi.startFunction",Qi),t.E("anychart.math.dmi.calculate",en),t.E("anychart.math.dmi.calculationFunction",nn),t.E("anychart.math.dmi.createComputer",sn),t.H(an,se),t.g=an.prototype,t.g.Cc=function(t){return sn(t,this.b,this.i,this.o)},t.g.Gf=function(t){switch(t){case"pdi":return"+DI("+this.b+")";case"ndi":return"-DI("+this.b+")";case"adx":return"ADX("+this.i+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"pdi":t.Td("value",e.Ke("pdiResult"));break;case"ndi":t.Td("value",e.Ke("ndiResult"));break;case"adx":t.Td("value",e.Ke("adxResult"))}},t.g.xja=function(t){return oe(this,"pdi",t)},t.g.fia=function(t){return oe(this,"ndi",t)},t.g.U$=function(t){return oe(this,"adx",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.kC=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.XP=function(e){return t.p(e)?((e=!!e)!=this.o&&(this.o=e,le(this)),this):this.o};var wl=an.prototype;wl.pdiSeries=wl.xja,wl.ndiSeries=wl.fia,wl.adxSeries=wl.U$,wl.period=wl.ub,wl.adxPeriod=wl.kC,wl.useWildersSmoothing=wl.XP,t.H(on,se),on.prototype.Cc=function(t){return Te(t,this.b)},on.prototype.Gf=function(){return"EMA("+this.b+")"},on.prototype.X=function(t){return oe(this,"main",t)},on.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var xl=on.prototype;xl.series=xl.X,xl.period=xl.ub,t.E("anychart.math.env.initContext",rn),t.E("anychart.math.env.startFunction",ln),t.E("anychart.math.env.calculate",hn),t.E("anychart.math.env.calculationFunction",cn),t.E("anychart.math.env.createComputer",un),t.H(dn,se),t.g=dn.prototype,t.g.Cc=function(t){return un(t,this.i,this.o,this.b)},t.g.Gf=function(t){switch(t){case"upper":return"ENV upper";case"lower":return"ENV lower"}return""},t.g.Xn=function(t,e,i){switch(i){case"upper":t.Td("value",e.Ke("upperResult"));break;case"lower":t.Td("value",e.Ke("lowerResult"))}},t.g.eca=function(t){return oe(this,"upper",t)},t.g.dca=function(t){return oe(this,"lower",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.al=function(e){return t.p(e)?((e=i(e,this.b))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.jo=function(e){return t.p(e)?(e=t.N(e),(0,window.isNaN)(e)||e==this.o||(this.o=e,le(this)),this):this.o};var Cl=dn.prototype;Cl.upperSeries=Cl.eca,Cl.lowerSeries=Cl.dca,Cl.period=Cl.ub,Cl.maType=Cl.al,Cl.deviation=Cl.jo,t.E("anychart.math.ha.initContext",pn),t.E("anychart.math.ha.startFunction",gn),t.E("anychart.math.ha.calculate",fn),t.E("anychart.math.ha.calculationFunction",bn),t.E("anychart.math.ha.createComputer",vn),t.H(mn,se),mn.prototype.Cc=function(t){return vn(t)},mn.prototype.Gf=function(){return"HA"},mn.prototype.Xn=function(t,e){t.Td("open",e.Ke("haOpen")),t.Td("high",e.Ke("haHigh")),t.Td("low",e.Ke("haLow")),t.Td("close",e.Ke("haClose"))},mn.prototype.X=function(t){return oe(this,"main",t)};var Dl,Tl=mn.prototype;Tl.series=Tl.X,t.E("anychart.math.ikh.initContext",yn),t.E("anychart.math.ikh.startFunction",Sn),t.E("anychart.math.ikh.calculate",Cn),t.E("anychart.math.ikh.calculationFunction",wn),t.E("anychart.math.ikh.createComputer",xn),t.H(Dn,se),t.g=Dn.prototype,t.g.Cc=function(t){return xn(t,this.i,this.b,this.o)},t.g.Gf=function(t){switch(t){case"conversion":return"Conversion Line("+this.i+")";case"base":return"Base Line("+this.b+")";case"leading":return"Leading Span("+this.o+")";case"lagging":return"Lagging Span("+this.b+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"conversion":t.Td("value",e.Ke("conversionResult"));break;case"base":t.Td("value",e.Ke("baseResult"));break;case"leading":t.Td("high",e.Ke("spanAResult")),t.Td("low",e.Ke("spanBResult"));break;case"lagging":t.Td("value",e.Ke("laggingResult"))}},t.g.aea=function(t){return oe(this,"conversion",t)},t.g.yda=function(t){return oe(this,"base",t)},t.g.D3=function(t){return oe(this,"leading",t)},t.g.pha=function(t){return oe(this,"lagging",t)},t.g.rL=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.YF=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.NN=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var kl=Dn.prototype;kl.conversionSeries=kl.aea,kl.baseSeries=kl.yda,kl.leadingSeries=kl.D3,kl.laggingSeries=kl.pha,kl.conversionPeriod=kl.rL,kl.basePeriod=kl.YF,kl.leadingPeriod=kl.NN,t.E("anychart.math.stochastic.initContext",Tn),t.E("anychart.math.stochastic.startFunction",kn),t.E("anychart.math.stochastic.calculate",$n),t.E("anychart.math.stochastic.calculationFunction",On),t.E("anychart.math.stochastic.createComputer",Pn),t.E("anychart.math.kdj.initContext",Ln),t.E("anychart.math.kdj.startFunction",Gn),t.E("anychart.math.kdj.calculate",Fn),t.E("anychart.math.kdj.calculationFunction",In),t.E("anychart.math.kdj.createComputer",En),t.H(An,se),t.g=An.prototype,t.g.Cc=function(t){return En(t,this.o,this.b,this.i,this.K,this.G,this.aa,this.P)},t.g.Gf=function(t){switch(t){case"kSeries":return"%K("+this.o+(1!=this.b?", "+this.b:"")+")";case"dSeries":return"%D("+this.i+")";case"jSeries":return"%J"}return""},t.g.Xn=function(t,e,i){switch(i){case"kSeries":t.Td("value",e.Ke("kResult"));break;case"dSeries":t.Td("value",e.Ke("dResult"));break;case"jSeries":t.Td("value",e.Ke("jResult"))}},t.g.ica=function(t){return oe(this,"kSeries",t)},t.g.gca=function(t){return oe(this,"dSeries",t)},t.g.jha=function(t){return oe(this,"jSeries",t)},t.g.TD=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.gI=function(e){return t.p(e)?((e=i(e,this.K))!=this.K&&(this.K=e,le(this)),this):this.K},t.g.hca=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.vG=function(e){return t.p(e)?((e=i(e,this.G))!=this.G&&(this.G=e,le(this)),this):this.G},t.g.fca=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.LV=function(e){return t.p(e)?(e=t.N(e),(0,window.isNaN)(e)||e==this.aa||(this.aa=e,le(this)),this):this.aa},t.g.NS=function(e){return t.p(e)?(e=t.N(e),(0,window.isNaN)(e)||e==this.P||(this.P=e,le(this)),this):this.P};var $l=An.prototype;$l.kPeriod=$l.TD,$l.kMAType=$l.gI,$l.kMAPeriod=$l.hca,$l.dMAType=$l.vG,$l.dPeriod=$l.fca,$l.kMultiplier=$l.LV,$l.dMultiplier=$l.NS,$l.kSeries=$l.ica,$l.dSeries=$l.gca,$l.jSeries=$l.jha,t.E("anychart.math.keltnerChannels.initContext",Un),t.E("anychart.math.keltnerChannels.startFunction",_n),t.E("anychart.math.keltnerChannels.calculate",Nn),t.E("anychart.math.keltnerChannels.calculationFunction",jn),t.E("anychart.math.keltnerChannels.createComputer",Mn),t.H(Bn,se),t.g=Bn.prototype,t.g.Cc=function(t){return Mn(t,this.b,this.o,this.i,this.G)},t.g.Gf=function(t){switch(t){case"ma":return this.i.toUpperCase()+"("+this.b+")";case"range":return"KeltnerChannels"}return""},t.g.Xn=function(t,e,i){switch(i){case"ma":t.Td("value",e.Ke("maResult"));break;case"range":t.Td("high",e.Ke("upperResult")),t.Td("low",e.Ke("lowerResult"))}},t.g.jca=function(t){return oe(this,"ma",t)},t.g.A_=function(t){return oe(this,"range",t)},t.g.rI=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.al=function(e){return t.p(e)?((e=i(e,this.i))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.$N=function(e){return t.p(e)?((e=t.P(e,this.G,!1))!=this.G&&(this.G=e,le(this)),this):this.G},t.g.Y_=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var Ol=Bn.prototype;Ol.maPeriod=Ol.rI,Ol.maType=Ol.al,Ol.atrPeriod=Ol.Y_,Ol.multiplier=Ol.$N,Ol.rangeSeries=Ol.A_,Ol.maSeries=Ol.jca,t.E("anychart.math.macd.initContext",Rn),t.E("anychart.math.macd.startFunction",Hn),t.E("anychart.math.macd.calculate",Vn),t.E("anychart.math.macd.calculationFunction",zn),t.E("anychart.math.macd.createComputer",qn),t.H(Wn,se),t.g=Wn.prototype,t.g.Cc=function(t){return qn(t,this.b,this.o,this.i)},t.g.Gf=function(t){switch(t){case"macd":return"MACD("+this.b+","+this.o+","+this.i+")";case"signal":return"Signal";case"histogram":return"Histogram"}return""},t.g.Xn=function(t,e,i){switch(i){case"macd":t.Td("value",e.Ke("macdResult"));break;case"signal":t.Td("value",e.Ke("signalResult"));break;case"histogram":t.Td("value",e.Ke("histogramResult"))}},t.g.yha=function(t){return oe(this,"macd",t)},t.g.lca=function(t){return oe(this,"signal",t)},t.g.kca=function(t){return oe(this,"histogram",t)},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.mP=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i};var Pl=Wn.prototype;Pl.macdSeries=Pl.yha,Pl.signalSeries=Pl.lca,Pl.histogramSeries=Pl.kca,Pl.fastPeriod=Pl.Nv,Pl.slowPeriod=Pl.ix,Pl.signalPeriod=Pl.mP,t.E("anychart.math.mfi.initContext",Kn),t.E("anychart.math.mfi.startFunction",Yn),t.E("anychart.math.mfi.calculate",Xn),t.E("anychart.math.mfi.calculationFunction",Jn),t.E("anychart.math.mfi.createComputer",Zn),t.H(Qn,se),Qn.prototype.Cc=function(t){return Zn(t,this.b)},Qn.prototype.Gf=function(){return"MFI("+this.b+")"},Qn.prototype.X=function(t){return oe(this,"series",t)},Qn.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Ll=Qn.prototype;Ll.period=Ll.ub,Ll.series=Ll.X,t.E("anychart.math.mma.initContext",ts),t.E("anychart.math.mma.startFunction",es),t.E("anychart.math.mma.calculationFunction",is),t.E("anychart.math.mma.createComputer",ns),t.H(ss,se),ss.prototype.Cc=function(t){return ns(t,this.b)},ss.prototype.Gf=function(){return"MMA("+this.b+")"},ss.prototype.X=function(t){return oe(this,"main",t)},ss.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Gl=ss.prototype;Gl.series=Gl.X,Gl.period=Gl.ub,t.E("anychart.math.momentum.initContext",as),t.E("anychart.math.momentum.startFunction",os),t.E("anychart.math.momentum.calculate",rs),t.E("anychart.math.momentum.calculationFunction",ls),t.E("anychart.math.momentum.createComputer",hs),t.H(cs,se),cs.prototype.Cc=function(t){return hs(t,this.b)},cs.prototype.Gf=function(){return"Momentum("+this.b+")"},cs.prototype.X=function(t){return oe(this,"series",t)},cs.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Fl=cs.prototype;Fl.period=Fl.ub,Fl.series=Fl.X,t.E("anychart.math.obv.initContext",us),t.E("anychart.math.obv.startFunction",ds),t.E("anychart.math.obv.calculate",fs),t.E("anychart.math.obv.calculationFunction",ps),t.E("anychart.math.obv.createComputer",gs),t.H(bs,se),bs.prototype.Cc=function(t){return gs(t)},bs.prototype.Gf=function(){return"OBV"},bs.prototype.X=function(t){return oe(this,"main",t)};var Il=bs.prototype;Il.series=Il.X,t.E("anychart.math.ppo.initContext",vs),t.E("anychart.math.ppo.startFunction",ms),t.E("anychart.math.ppo.calculate",ys),t.E("anychart.math.ppo.calculationFunction",Ss),t.E("anychart.math.ppo.createComputer",ws),t.H(xs,se),t.g=xs.prototype,t.g.Cc=function(t){return ws(t,this.i,this.b,this.o)},t.g.Gf=function(t){switch(t){case"ppoSeries":return"PPO("+this.i+","+this.b+","+this.o+")";case"signalSeries":return"Signal";case"histogramSeries":return"PPO Histogram"}return""},t.g.Xn=function(t,e,i){switch(i){case"ppoSeries":t.Td("value",e.Ke("ppoResult"));break;case"signalSeries":t.Td("value",e.Ke("signalResult"));break;case"histogramSeries":t.Td("value",e.Ke("histogramResult"))}},t.g.Ija=function(t){return oe(this,"ppoSeries",t)},t.g.nca=function(t){return oe(this,"signalSeries",t)},t.g.mca=function(t){return oe(this,"histogramSeries",t)},t.g.c6=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.J3=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.e6=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var El=xs.prototype;El.ppoSeries=El.Ija,El.signalSeries=El.nca,El.histogramSeries=El.mca,El.shortPeriod=El.c6,El.longPeriod=El.J3,El.smoothingPeriod=El.e6,t.E("anychart.math.psar.initContext",Cs),t.E("anychart.math.psar.startFunction",Ds),t.E("anychart.math.psar.calculate",Ls),t.E("anychart.math.psar.calculationFunction",Gs),t.E("anychart.math.psar.createComputer",Fs),t.H(Is,se),t.g=Is.prototype,t.g.Cc=function(t){return Fs(t,this.o,this.i,this.b)},t.g.Gf=function(){return"PSAR("+this.o+", "+this.i+", "+this.b+")"},t.g.X=function(t){return oe(this,"series",t)},t.g.K$=function(e){return t.p(e)?((e=t.N(e)||this.b)!=this.o&&(this.o=e,le(this)),this):this.o},t.g.J$=function(e){return t.p(e)?((e=t.N(e)||this.b)!=this.b&&(this.b=e,le(this)),this):this.b},t.g.I$=function(e){return t.p(e)?((e=t.N(e)||this.i)!=this.i&&(this.i=e,le(this)),this):this.i};var Al=Is.prototype;Al.accelerationFactorStart=Al.K$,Al.accelerationFactorMaximum=Al.J$,Al.accelerationFactorIncrement=Al.I$,Al.series=Al.X,t.E("anychart.math.psy.initContext",Es),t.E("anychart.math.psy.startFunction",As),t.E("anychart.math.psy.calculate",js),t.E("anychart.math.psy.calculationFunction",Us),t.E("anychart.math.psy.createComputer",_s),t.H(Ms,se),Ms.prototype.Cc=function(t){return _s(t,this.b)},Ms.prototype.Gf=function(){return"PSY("+this.b+")"},Ms.prototype.X=function(t){return oe(this,"main",t)},Ms.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Ul=Ms.prototype;Ul.series=Ul.X,Ul.period=Ul.ub,t.E("anychart.math.priceChannels.initContext",Ns),t.E("anychart.math.priceChannels.startFunction",Bs),t.E("anychart.math.priceChannels.calculate",Rs),t.E("anychart.math.priceChannels.calculationFunction",Hs),t.E("anychart.math.priceChannels.createComputer",zs),t.H(Vs,se),t.g=Vs.prototype,t.g.Cc=function(t){return zs(t,this.b)},t.g.Gf=function(t){switch(t){case"range":return"PriceChannels";case"middle":return"PriceChannels M"}return""},t.g.Xn=function(t,e,i){switch(i){case"range":t.Td("high",e.Ke("upperResult")),t.Td("low",e.Ke("lowerResult"));break;case"middle":t.Td("value",e.Ke("middleResult"))}},t.g.oca=function(t){return oe(this,"middle",t)},t.g.B_=function(t){return oe(this,"range",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var _l=Vs.prototype;_l.period=_l.ub,_l.middleSeries=_l.oca,_l.rangeSeries=_l.B_,t.E("anychart.math.rat.initContext",qs),t.E("anychart.math.rat.startFunction",Ws),t.E("anychart.math.rat.calculate",Xs),t.E("anychart.math.rat.calculationFunction",Ks),t.E("anychart.math.rat.createComputer",Ys),t.H(Js,se),Js.prototype.Cc=function(t){return Ys(t,this.b)},Js.prototype.Gf=function(){return"RAT"},Js.prototype.X=function(t){return oe(this,"main",t)},Js.prototype.XR=function(e){if(t.p(e)){var i=t.ps(e);return(i=i?i.getTime():0)!=this.b&&(this.b=i,this.i=e,le(this)),this}return this.b?this.i:0};var jl=Js.prototype;jl.series=jl.X,jl.baseDate=jl.XR,t.E("anychart.math.rci.initContext",Zs),t.E("anychart.math.rci.startFunction",Qs),t.E("anychart.math.rci.calculate",ia),t.E("anychart.math.rci.calculationFunction",ta),t.E("anychart.math.rci.createComputer",ea),t.H(na,se),na.prototype.Cc=function(t){return ea(t,this.b)},na.prototype.Gf=function(){return"RCI("+this.b+")"},na.prototype.X=function(t){return oe(this,"main",t)},na.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Ml=na.prototype;Ml.series=Ml.X,Ml.period=Ml.ub,t.E("anychart.math.rsi.initContext",sa),t.E("anychart.math.rsi.startFunction",aa),t.E("anychart.math.rsi.calculationFunction",oa),t.E("anychart.math.rsi.createComputer",ra),t.H(la,se),la.prototype.Cc=function(t){return ra(t,this.b)},la.prototype.Gf=function(){return"RSI("+this.b+")"},la.prototype.X=function(t){return oe(this,"main",t)},la.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Nl=la.prototype;Nl.series=Nl.X,Nl.period=Nl.ub,t.H(ha,se),ha.prototype.Cc=function(t){return Ni(t,this.b)},ha.prototype.Gf=function(){return"RoC("+this.b+")"},ha.prototype.X=function(t){return oe(this,"main",t)},ha.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Bl=ha.prototype;Bl.series=Bl.X,Bl.period=Bl.ub,t.H(ca,se),ca.prototype.Cc=function(t){return Le(t,this.b)},ca.prototype.Gf=function(){return"SMA("+this.b+")"},ca.prototype.X=function(t){return oe(this,"main",t)},ca.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Rl=ca.prototype;Rl.series=Rl.X,Rl.period=Rl.ub,t.H(ua,se),t.g=ua.prototype,t.g.Cc=function(t){return Pn(t,this.o,this.b,this.i,this.K,this.G)},t.g.Gf=function(t){switch(t){case"kSeries":return"%K("+this.o+(1!=this.b?", "+this.b:"")+")";case"dSeries":return"%D("+this.i+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"kSeries":t.Td("value",e.Ke("kResult"));break;case"dSeries":t.Td("value",e.Ke("dResult"))}},t.g.sca=function(t){return oe(this,"kSeries",t)},t.g.qca=function(t){return oe(this,"dSeries",t)},t.g.TD=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.gI=function(e){return t.p(e)?((e=i(e,this.K))!=this.K&&(this.K=e,le(this)),this):this.K},t.g.rca=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.vG=function(e){return t.p(e)?((e=i(e,this.G))!=this.G&&(this.G=e,le(this)),this):this.G},t.g.pca=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i};var Hl=ua.prototype;Hl.kPeriod=Hl.TD,Hl.kMAType=Hl.gI,Hl.kMAPeriod=Hl.rca,Hl.dMAType=Hl.vG,Hl.dPeriod=Hl.pca,Hl.kSeries=Hl.sca,Hl.dSeries=Hl.qca,t.E("anychart.math.trix.initContext",da),t.E("anychart.math.trix.startFunction",pa),t.E("anychart.math.trix.calculate",ba),t.E("anychart.math.trix.calculationFunction",ga),t.E("anychart.math.trix.createComputer",fa),t.H(va,se),t.g=va.prototype,t.g.Cc=function(t){return fa(t,this.b,this.i,this.G,this.o)},t.g.Gf=function(t){switch(t){case"trix":return"TRIX("+this.b+")";case"signal":return this.o.toUpperCase()+"("+this.i+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"trix":t.Td("value",e.Ke("trix"));break;case"signal":t.Td("value",e.Ke("signal"))}},t.g.sla=function(t){return oe(this,"trix",t)},t.g.tca=function(t){return oe(this,"signal",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.mP=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.Bka=function(e){return t.p(e)?((e=i(e,this.o))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.al=function(e){return t.p(e)?((e=i(e,this.G))!=this.G&&(this.G=e,le(this)),this):this.G};var zl=va.prototype;zl.trixSeries=zl.sla,zl.signalSeries=zl.tca,zl.period=zl.ub,zl.signalPeriod=zl.mP,zl.signalMaType=zl.Bka,zl.maType=zl.al,t.E("anychart.math.vwap.initContext",ma),t.E("anychart.math.vwap.startFunction",ya),t.E("anychart.math.vwap.calculate",Sa),t.E("anychart.math.vwap.calculationFunction",wa),t.E("anychart.math.vwap.createComputer",xa),t.H(Ca,se),Ca.prototype.Cc=function(t,e){return xa(t,e)},Ca.prototype.Gf=function(){return"VWAP"},Ca.prototype.Xn=function(t,e){t.Td("value",e.Ke("vwapValue"))},Ca.prototype.X=function(t){return oe(this,"vwapSeries",t)};var Vl=Ca.prototype;Vl.series=Vl.X,t.E("anychart.math.volumeMA.initContext",Da),t.E("anychart.math.volumeMA.startFunction",Ta),t.E("anychart.math.volumeMA.calculate",ka),t.E("anychart.math.volumeMA.calculationFunction",$a),t.E("anychart.math.volumeMA.createComputer",Oa),t.H(Pa,se),t.g=Pa.prototype,t.g.Cc=function(t){return Oa(t,this.b,this.i)},t.g.Gf=function(t){switch(t){case"volumeSeries":return"Volume";case"maSeries":return this.i.toUpperCase()+"("+this.b+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"volumeSeries":t.Td("value",e.Ke("volumeResult"));break;case"maSeries":t.Td("value",e.Ke("maResult"))}},t.g.Ela=function(t){return oe(this,"volumeSeries",t)},t.g.uca=function(t){return oe(this,"maSeries",t)},t.g.rI=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.al=function(e){return t.p(e)?((e=i(e,this.i))!=this.i&&(this.i=e,le(this)),this):this.i};var ql=Pa.prototype;ql.maPeriod=ql.rI,ql.maType=ql.al,ql.maSeries=ql.uca,ql.volumeSeries=ql.Ela,t.H(La,se),La.prototype.Cc=function(t){return Vi(t,this.b)},La.prototype.Gf=function(){return"WMA("+this.b+")"},La.prototype.X=function(t){return oe(this,"main",t)},La.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Wl=La.prototype;Wl.series=Wl.X,Wl.period=Wl.ub,t.E("anychart.math.williamsR.initContext",Ga),t.E("anychart.math.williamsR.startFunction",Fa),t.E("anychart.math.williamsR.calculate",Ia),t.E("anychart.math.williamsR.calculationFunction",Ea),t.E("anychart.math.williamsR.createComputer",Aa),t.H(Ua,se),Ua.prototype.Cc=function(t){return Aa(t,this.b)},Ua.prototype.Gf=function(){return"Williams %R("+this.b+")"},Ua.prototype.X=function(t){return oe(this,"series",t)},Ua.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Kl=Ua.prototype;Kl.period=Kl.ub,Kl.series=Kl.X;var Yl={};Yl.adl=be,Yl.ama=we,Yl.ao=_e,Yl.aroon=Ye,Yl["aroon-oscillator"]=ei,Yl.atr=He,Yl.bbands=ri,Yl["bbands-b"]=di,Yl["bbands-width"]=vi,Yl.cci=Ci,Yl.cho=Pi,Yl.cmf=Ai,Yl["coppock-curve"]=Ji,Yl.dmi=an,Yl.ema=on,Yl.env=dn,Yl.ha=mn,Yl.ikh=Dn,Yl.kdj=An,Yl["keltner-channels"]=Bn,Yl.macd=Wn,Yl.mfi=Qn,Yl.mma=ss,Yl.momentum=cs,Yl.obv=bs,Yl.ppo=xs,Yl["price-channels"]=Vs,Yl.psar=Is,Yl.psy=Ms,Yl.rat=Js,Yl.rci=na,Yl.roc=ha,Yl.rsi=la,Yl.sma=ca,Yl.stochastic=ua,Yl.trix=va,Yl.vwap=Ca,Yl["volume-ma"]=Pa,Yl["williams-r"]=Ua,Yl.wma=La,t.H(ja,t.wu),t.Jz(ja,"plot","dataarea"),ja.prototype.wM=window.NaN,ja.prototype.RT=window.NaN,ja.prototype.ra=68|t.wu.prototype.ra,ja.prototype.sa=17301440|t.wu.prototype.sa;var Xl={};t.sq(Xl,[[0,"pointWidth",t.yo],[0,"maxPointWidth",t.yo],[0,"minPointLength",t.yo],[0,"baseline",t.Bq],[0,"weight",t.Bq]]),t.U(ja,Xl),t.g=ja.prototype,t.g.co=function(){var t=this.La("chartElements")||{axes:{},grids:{}};t.series=this.Sa.length,t.axes.x=1,t.axes.y=0,t.grids.x=0,t.grids.y=0,t.grids.xMinor=0,t.grids.yMinor=0;for(var e=Math.max(this.qf.length,this.Yg.length,this.Zg.length,this.jh.length,this.kh.length);e--;)this.qf[e]&&t.axes.y++,this.Yg[e]&&t.grids.x++,this.Zg[e]&&t.grids.y++,this.jh[e]&&t.grids.xMinor++,this.kh[e]&&t.grids.yMinor++;this.La("chartElements",t)},t.g.La=function(e,i){return t.p(e)?t.p(i)?(this.kn[e.toLowerCase()]=i,this):this.kn[e.toLowerCase()]:this.kn},t.g.hJ=function(){this.kn={}},t.g.Rg=function(t){return this.co(),this.La(t)},t.g.zC=function(t,e,i){return this.Ae("area",t,e,i)},t.g.hS=function(t,e,i){return this.Ae("candlestick",t,e,i)},t.g.KC=function(t,e,i){return this.Ae("column",t,e,i)},t.g.KV=function(t,e,i){return this.Ae("jump-line",t,e,i)},t.g.FJ=function(t,e,i){return this.Ae("stick",t,e,i)},t.g.line=function(t,e,i){return this.Ae("line",t,e,i)},t.g.Br=function(t,e,i){return this.Ae("marker",t,e,i)},t.g.IW=function(t,e,i){return this.Ae("ohlc",t,e,i)},t.g.kX=function(t,e,i){return this.Ae("range-area",t,e,i)},t.g.lX=function(t,e,i){return this.Ae("range-column",t,e,i)},t.g.mX=function(t,e,i){return this.Ae("range-spline-area",t,e,i)},t.g.nX=function(t,e,i){return this.Ae("range-step-area",t,e,i)},t.g.fY=function(t,e,i){return this.Ae("spline",t,e,i)},t.g.gY=function(t,e,i){return this.Ae("spline-area",t,e,i)},t.g.pY=function(t,e,i){return this.Ae("step-area",t,e,i)},t.g.qY=function(t,e,i){return this.Ae("step-line",t,e,i)},t.g.cV=function(t,e,i){return this.Ae("hilo",t,e,i)},t.g.kl=function(t){var e=[],i=this.cq(),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.Ae(i,arguments[s]));else e.push(this.Ae(i,null));return this.da(!0),e},t.g.ty=function(e){return t.xa(this.Sa,(function(t){return t.id()==e}))},t.g.ef=function(t){return this.Ai(this.ty(t))},t.g.Ai=function(t){return this.Sa[t]||null},t.g.tj=function(){return this.Sa.length},t.g.Ao=function(t){return this.Rn(this.ty(t))},t.g.Rn=function(e){var i=this.Sa[e];return i&&(t.Pp++,t.Ca(this.Sa,e,1),t.qd(i),this.B(34944,1),t.Sp()),this},t.g.Dp=function(){if(this.Sa.length){t.Pp++;var e=this.Sa;this.Sa=[],t.sd(e),this.B(34944,1),t.Sp()}return this},t.g.Ue=function(){return this.Sa},t.g.ms=function(e){return this.Ti||(this.Ti=new t.Kz,t.W(this,"defaultSeriesSettings",this.Ti)),t.p(e)?(this.Ti.oa=e,this):this.Ti},t.g.zM=function(t){return t.check(32768)?31:30},t.g.Ae=function(e,i,n,s){var a=this.pa.Vv(e);return a?(e=new Nt(this.pa,this,e,a[1]),a=(a=this.Sa[this.Sa.length-1])?a.yh()+1:0,this.Sa.push(e),e.yh(a),t.fB(e),e.data(i||null,n,s),e.clip(!0),e.Kq(this.cc().nc(a)),t.kB(e,this.Nf().nc(a)),e.dx(this.ve().nc(a)),e.kb(this),t.K(e,this.nJ,this),this.B(2176,1)):e=null,e},_a(ja),t.g=ja.prototype,t.g.cq=function(i){return t.p(i)?(this.US=i=e(i),this):this.US},t.g.xc=function(){return this.pa},t.g.fA=function(e){return t.p(e)?(this.aq=e,this):(this.aq||(this.aq=t.zm("stock.defaultPlotSettings.defaultGridSettings")),this.aq)},t.g.gA=function(e){return t.p(e)?(this.bq=e,this):(this.bq||(this.bq=t.zm("stock.defaultPlotSettings.defaultMinorGridSettings")),this.bq)},t.g.X0=function(e){return t.p(e)?(this.SS=e,this):(this.SS||(this.SS=t.zm("stock.defaultPlotSettings.defaultPriceIndicatorSettings")),this.SS)},t.g.Ey=function(){for(var t=this.Sa.length;t--;)this.Sa[t].sp()&&this.Sa[t].B(1024)},t.g.Zja=function(t){for(var e=0;e<this.Sa.length;e++){var i=this.Sa[e];i&&i.yE(),t||i.B(1024)}},t.g.rB=function(t){for(var e=0;e<this.Sa.length;e++){var i=this.Sa[e];i&&i.yE()}t||this.Ey()},t.g.Dy=function(e,i){var n,s=1024;for(e&&(s|=4),n=0;n<this.Sa.length;n++)this.Sa[n]&&this.Sa[n].B(s);for(this.Ql&&this.Ql.B(64),this.pa.D&&this.Nk().MA(),n=0;n<this.qf.length;n++)(s=this.qf[n])&&(s.ka(),s.uo(),s.da(!1));var a=t.Ga(this.Yg,this.Zg,this.jh,this.kh);for(n=0;n<a.length;n++)(s=a[n])&&s.B(64);for(a=t.Ga(this.og,this.rg,this.tg),n=0;n<a.length;n++)(s=a[n])&&s.B(20);for(s=16,e&&(s|=4),this.mc&&this.mc.B(s),!i&&this.Bi&&this.Bi.enabled()&&this.Bi.B(s),n=0;n<this.Au.length;n++)(s=this.Au[n])&&s.B(20);this.B(388992),t.nr(this,"plot","dataarea")},t.g.dg=function(){return Ba(this),this.hh},t.g.mr=function(){return 32781},t.g.yv=function(e){return this.tn||(this.tn=new t.Lz,t.W(this,"dataArea",this.tn),t.K(this.tn,this.OS,this)),t.p(e)?(this.tn.N(e),this):this.tn},t.g.OS=function(e){t.X(e,1)&&t.nr(this,"plot","dataarea",1)},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.enabled(!1),this.Ia.zIndex(1),t.W(this,"background",this.Ia),this.Ia.Wj(!0),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.eg=function(e){return this.Bi||(this.Bi=new t.Ww,t.K(this.Bi,this.Via,this),this.Bi.wa("dragstart",(function(){Fo(this.pa)}),!1,this),this.Bi.wa("dragend",(function(){Io(this.pa)}),!1,this),this.Bi.kb(this),t.W(this,"legend",this.Bi)),t.p(e)?(this.Bi.N(e),this):this.Bi},t.g.bb=function(e){if(t.p(e)){if(e=t.jt(this.Fc,e,null,3,["Stock plot Y scale","scatter","linear, log"],this.Yu,this)){var i=this.Fc==e;this.Fc=e,this.Fc.da(i),i||(this.Dy(!1),this.pa.B(32768),this.va(1))}return this}return this.Fc||(this.Fc=t.ft(),t.K(this.Fc,this.Yu,this)),this.Fc},t.g.Yu=function(e){for(var i=0,n=0;n<this.Sa.length;n++){var s=this.Sa[n];s&&s.enabled()&&s.bb()==this.Fc&&(i|=s.B(1024))}i&&(i=1,t.X(e,4)&&(i|=4),this.B(128,i))},t.g.ij=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.qf[n];return a||(a=new t.Sy,this.qf[n]=a,a.Ga("stock.defaultPlotSettings.defaultYAxisSettings",this.zG),a.kb(this),t.K(a,this.Ola,this),this.B(260,1)),t.p(s)?(a.N(s),this):a},t.g.Q4=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Au[n];return a||((a=new et).Ga("stock.defaultPlotSettings.defaultPriceIndicatorSettings",this.X0()),it(a),this.Au[n]=a,a.zIndex(150),a.K=this,a.kb(this),t.K(a,this.Nja,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.$h=function(e){return this.mc||(this.mc=new tt(this.pa),this.mc.kb(this),this.mc.Ie(!0,!1),this.mc.zIndex(35),t.W(this,"xAxis",this.mc),t.K(this.mc,this.RY,this),this.B(516,1)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.ZG=function(t){return t?this.qf[t-1]:this.mc},t.g.uy=function(){return this.mc},t.g.wy=function(t){return this.qf[t]},t.g.ip=function(t){return t.oa.zIndex+.001*(this.Yg.length+this.Zg.length+this.jh.length+this.kh.length)},t.g.lm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Yg[n];return a||((a=new nt).Xj=this,t.mz(a,"vertical"),a.Ga("stock.defaultPlotSettings.defaultGridSettings",this.fA()),a.zIndex(this.ip(a)),this.Yg[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.nm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Zg[n];return a||((a=new nt).Xj=this,t.mz(a,"horizontal"),a.Ga("stock.defaultPlotSettings.defaultGridSettings",this.fA()),a.zIndex(this.ip(a)),this.Zg[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.Qr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jh[n];return a||((a=new nt).Ga("defaultMinorGridSettings","stock.defaultPlotSettings.defaultMinorGridSettings",this.gA()),a.Xj=this,t.mz(a,"vertical"),a.zIndex(this.ip(a)),this.jh[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.Tr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.kh[n];return a||((a=new nt).Xj=this,t.mz(a,"horizontal"),a.Ga("defaultMinorGridSettings","stock.defaultPlotSettings.defaultMinorGridSettings",this.gA()),a.zIndex(this.ip(a)),this.kh[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.title=function(e){if(!this.jb){this.jb=new t.aw,this.jb.kb(this);var i=this.jb;t.p(!0)&&(i.r3=!0),t.W(this,"title",this.jb),this.jb.Wj(!0),t.K(this.jb,this.gB,this)}return t.p(e)?(this.jb.N(e),this):this.jb},t.g.gB=function(e){var i=131072,n=0;t.X(e,1)&&(n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.IL=function(e){return t.p(e)?(this.RS=e,this):this.RS||{}},t.g.NL=function(e){return t.p(e)?(this.VS=e,this):this.VS||{}},t.g.JL=function(e){return t.p(e)?(this.TS=e,this):this.TS||{}},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.og[n];return a||((a=new t.$z).pa=this,a.Ga("stock.defaultPlotSettings.defaultLineMarkerSettings",this.IL()),t.aA(a,"horizontal"),this.og[n]=a,a.kb(this),Na(this,a),t.K(a,this.Kw,this),this.B(262144,1)),t.p(s)?(a.N(s),this):a},t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.rg[n];return a||((a=new t.cA).pa=this,a.Ga("stock.defaultPlotSettings.defaultRangeMarkerSettings",this.JL()),t.dA(a,"horizontal"),this.rg[n]=a,a.kb(this),Na(this,a),t.K(a,this.Kw,this),this.B(262144,1)),t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.tg[n];return a||((a=new t.fA).pa=this,a.Ga("stock.defaultPlotSettings.defaultTextMarkerSettings",this.NL()),t.$y(a,"horizontal"),this.tg[n]=a,a.kb(this),Na(this,a),t.K(a,this.Kw,this),this.B(262144,1)),t.p(s)?(a.N(s),this):a},t.g.Kw=function(e){t.X(e,4)&&this.pa.B(32768),this.B(262144,1)},t.g.remove=function(){this.Oa&&this.Oa.remove()},t.g.W=function(){if(!this.zc())return this;this.ka();var e=this.Gm().label(),i=this.yj();if(e.visible()!==i&&this.Oa&&(i=this.dispatchEvent({type:"datachanged",chart:this,hasData:!i})&&i),e.visible(i),this.Kv(),this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(4096)){var n=this.cc(),s=this.Nf(),a=this.ve();for(i=0;i<this.Sa.length;i++){var o=this.Sa[i],r=o.yh();o.Kq(n.nc(r)),t.kB(o,s.nc(r)),o.dx(a.nc(r))}this.Dy(!1),this.I(4096)}if(this.J(256))for(i=0;i<this.qf.length;i++)(o=this.qf[i])&&(o.ka(),o.scale()||o.scale(this.bb()),o.da(!1));if(this.J(512)&&this.mc&&(this.mc.ka(),this.mc.scale(this.pa.Ra()),this.mc.da(!1)),Ba(this),this.J(256)){for(i=0;i<this.qf.length;i++)(o=this.qf[i])&&(o.ka(),t.Yu(o.labels()),t.Yu(o.qb()),o.O(this.Oa),o.W(),o.da(!1));this.I(256)}if(this.J(512)&&(this.mc&&(this.mc.ka(),this.mc.O(this.Oa),this.mc.W(),this.mc.da(!1)),this.I(512)),this.J(1024)){for(o=t.Ga(this.Yg,this.Zg,this.jh,this.kh),i=0;i<o.length;i++)(n=o[i])&&(n.ka(),n.scale()||(n.Nb()?n.scale(this.bb()):n.scale(this.pa.Ra())),n.ja(this.hh),n.O(this.Oa),n.W(),n.da(!1));this.I(1024)}if(this.J(131072)&&((i=t.wr(this,"title"))&&(i.Wj(!1),i.ka(),i.O(this.Oa),i.W(),i.da(!1)),this.I(131072)),this.J(262144)){for(o=t.Ga(this.og,this.rg,this.tg),i=0;i<o.length;i++)(n=o[i])&&(n.ka(),n.scale()||n.WK(n.Nb()?this.bb():this.pa.Ra()),n.ja(this.hh),n.O(this.Oa),n.W(),n.da(!1));this.I(262144)}if(this.J(64)&&((i=t.wr(this,"background"))&&(i.Wj(!1),i.ka(),i.O(this.Oa),i.W(),i.da(!1)),this.I(64)),this.J(128)){for(n="direct"==this.bb().kx(),i=0;i<this.Sa.length;i++)(o=this.Sa[n?this.Sa.length-i-1:i])&&(o.ka(),o.ja(this.hh),o.O(this.Oa),o.W(),o.da(!1));this.rB(!0),this.I(128)}if(this.J(8192)&&(this.pa.D&&((i=this.Nk()).ka(),i.ja(this.hh),i.O(this.Oa),i.W(),i.da(!1)),this.I(8192)),this.J(65536)&&((i=this.qj()).ka(),i.ja(this.hh),i.O(this.Oa),i.zh=200,i.W(),i.da(!1),this.I(65536)),this.J(16384)){for(i=0;i<this.Au.length;i++)(o=this.Au[i])&&(o.ka(),o.ja(this.hh),o.O(this.Oa),o.W(),o.da(!1));this.I(16384)}for(this.J(16777216)&&((i=this.mh()).ka(),i.ja(this.dg()),i.O(this.Oa),i.$h(this.mc),i.W(),i.da(!1),this.I(16777216)),this.J(32768)&&(e.ka(),e.O(this.Oa),e.ja(this.hh),e.W(),e.da(!1),this.I(32768)),t.rr(this,"plot","dataarea")&&((e=this.yv()).ka(),e.O()||e.O(this.Oa),e.ja(this.hh),e.da(!1),e.W(),t.pr(this,"plot","dataarea")),this.da(!1),e=this.pa,o=i=0;o<e.f.length;o++)e.f[o]&&e.f[o].enabled()&&i++;return e=1==i?"single":Va(this)?"top":qa(this)?"bottom":"center",this.Vy||((i=this.Vy=new st(this)).P!=e&&(i.P=e),this.Vy.Sd(),this.Vy.Lc()),(i=this.Vy).P!=e&&(i.P=e),this.Vy.update(),this},t.g.oq=function(t){var e=t.offsetY,i=(t.offsetX-this.hh.left)/this.hh.width;t=(t.offsetY-this.hh.top)/this.hh.height,i=this.pa.Ra().Mc(i),i=S(this.pa.b.i,i);var n=[];(i=Ha(this,i)).sort((function(t,e){return e.series.zIndex()-t.series.zIndex()}));for(var s=0;s<i.length;s++){var a=i[s],o=a.point;if(a=a.series,o){var r=o.j("value"),l=o.j("zero"),h=o.j("high"),c=o.j("low"),u=!a.check(32768);h=e>=Math.min(h,c)&&e<=Math.max(h,c),r=e>=Math.min(r,l)&&e<=Math.max(r,l)&&u||h?0:Ma(this,a,o,t).Tf*this.hh.height,n.push({series:a,nearestPointToCursor:{distance:r,index:o.ma()}})}}return n},t.g.ig=function(t){return(t=ja.u.ig.call(this,t)).seriesStatus=this.oq(t),t},t.g.Kv=function(){this.Oa||(this.Oa=t.ok(),t.ru(this,this.Oa),this.Oj=this.Oa.rect(),this.Oj.zIndex(199),this.Oj.fill(t.bm),this.Oj.stroke(null),this.wc.Ce(this,"mousedown",this.wr),this.wc.Ce(this,"touchstart",this.wr),this.wc.wa(this,"touchstart",this.Hga),this.wc.wa(this,"touchend",this.Gga),this.wc.wa(this,"mouseover",this.I2),this.wc.wa(this,"mousemove",this.I2),this.wc.wa(this,"mouseout",this.Dga),this.wc.wa(this,"mousedown",this.Cga))},t.g.Mha=function(e){var i=e.gE;!t.p(this.mf)||"mousedown"!==e.type&&"touchstart"!==e.type||this.mf.lk(i)},t.g.d2=function(e,i,n){var s;return i=i||((0,window.isNaN)(this.gN)?X(this.pa.b):this.gN),!(0,window.isNaN)(i)&&(s=e)&&(t.z(s)&&(s=t.Nu(t.Lu.Id(),s)),t.D(s))?(i={value:{value:i,type:"date-time"},rawValue:{value:n,type:"date-time"},hoveredDate:{value:i,type:"date-time"},dataIntervalUnit:{value:(e=this.pa.Wm()).Cn().unit,type:"string"},dataIntervalUnitCount:{value:e.Cn().count,type:"number"},isGrouped:{value:e.OD(),type:""}},i=t.ov(new t.Fw(i)),s.call(i,i)):null},t.g.Via=function(e){var i=0,n=1;t.X(e,1)&&(i|=2048),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Ol=function(e,i){for(var n=[],s=0;s<this.Sa.length;s++){var a=this.Sa[s];if(a){var o=a.qD(i);o.sourceUid=t.oa(this),o.sourceKey=a.id(),n.push(o)}}return n},t.g.Ms=function(t){return"default"==t},t.g.zr=function(t){t=t.Ki(),(t=this.ef(t))&&(t.enabled(!t.enabled()),t.enabled()?t.Zk():t.Md())},t.g.wq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Zk()},t.g.vq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Md()},t.g.NI=function(){return!0},t.g.ro=function(e,i,n,s,a,o){if(this.Oa&&this.hh&&this.enabled()){var r="sticky"==this.mh().g("displayMode"),l=r?e:i,h=this.pa.Ra().transform(l),c=t.$b(this.mh().g("yStroke")),u=this.hh.left+h*this.hh.width;for(u=t.R(u,c),r&&a&&(s=a.pointYRatio,a=t.Zj(this.O().Ja()),s=s*this.hh.height+this.hh.top+a.y),a=this.mh(),r=this.cI,t.p(r)&&(a.SY=r),a=this.mh(),r=this.cI,c=n!=this,n=s,a.enabled()&&(c?a.aV():t.p(n)&&(n-=(s=t.Zj(a.O().Ja())).y,s=t.kA(a),a.Kt(s,!1,u,n)),a.Zx(a.mc,!0,u,n||0),s=t.jA(a),a.Kt(s,!0,u,n||0,h,r)),h=0;h<this.Sa.length;h++)(n=this.Sa[h])&&(Rt(n),n.ro(l,e));this.Bi&&this.Bi.enabled()&&(l=to(this.pa.Ra(),l),Ra(this,null,e,i,l)),this.va(64),o&&this.Vy.show()}},t.g.BY=function(){if(this.enabled()){this.gN=window.NaN;for(var t=0;t<this.Sa.length;t++){var e=this.Sa[t];e&&Rt(e)}this.mh().Lc(),this.Bi&&this.Bi.enabled()&&Ra(this,null,X(this.pa.b)),this.va(64),this.Vy.Lc()}},t.g.sE=function(){this.mf&&this.mf.lp&&this.mf.sE(),this.wz&&this.pa.sE(this.wz.anchor)},t.g.wr=function(t){t=t.gE.kf,this.mf=new Ka(this,this.Oj),this.mf.lk(t)},t.g.Hga=function(e){var i=e.kf,n=za(e);if(n&&1<n.length&&(this.mf.ey(i),2==n.length)){i=[];for(var s={},a=0;2>a;a++){var o=n[a];i[a+a]=void 0!==o.clientX?o.clientX:o.pageX,i[a+a+1]=void 0!==o.clientY?o.clientY:o.pageY,s[o.identifier]=!0}this.wz={anchor:this.pa.cH(),x:(i[0]+i[2])/2,y:(i[1]+i[3])/2,Tf:t.gn.apply(null,i),Sga:s},t.Ld(t.Lp,"touchmove",this.K2,{capture:!0,passive:!1},this),e.preventDefault()}},t.g.K2=function(e){var i=za(e);if(this.wz&&i&&1<i.length){for(var n=[],s=0;s<i.length;s++){var a=i[s];a.identifier in this.wz.Sga&&(n[s+s]=void 0!==a.clientX?a.clientX:a.pageX,n[s+s+1]=void 0!==a.clientY?a.clientY:a.pageY)}i=(n[0]+n[2])/2,s=t.gn.apply(null,n),this.nQ={anchor:this.wz.anchor,x:i,y:(n[1]+n[3])/2,Tf:s,mo:(i-this.wz.x)/this.hh.width,eea:s/this.wz.Tf},t.p(this.i7)||(this.i7=t.ll.requestAnimationFrame(this.Tla)),e.preventDefault()}},t.g.Gga=function(e){var i=za(e);1==i.length&&(t.Yd(t.Lp,"touchmove",this.K2,{capture:!0,passive:!1},this),i=i[0],(e=new t.Bd(e.kf.kf)).clientX=void 0!==i.clientX?i.clientX:i.pageX,e.clientY=void 0!==i.clientY?i.clientY:i.pageY,e.screenX=i.screenX||0,e.screenY=i.screenY||0,this.wz=null,this.mf.lk(e))},t.g.I2=function(e){var i=this.Sf&&this.Sf.aa;if(this.hh&&!i){var n=t.Zj(this.O().Ja());if(i=e.clientX-n.x-this.hh.left,n=e.clientY-n.y-this.hh.top,0<=i&&i<=this.hh.width&&0<=n&&n<=this.hh.height){n=this.hh;var s=t.Zj(this.O().Ja());i=(e.clientX-s.x-n.left)/n.width,n=(e.clientY-s.y-n.top)/n.height,s=e.clientX,e=e.clientY,this.wM=i,this.RT=n,this.ofa=s,this.pfa=e,e=this.mh(),i=this.cI,t.p(i)&&(e.SY=i),t.p(this.Qj)||(this.Qj=t.ll.requestAnimationFrame(this.rs))}}},t.g.Dga=function(){this.RT=this.wM=window.NaN,t.p(this.Qj)||(this.Qj=t.ll.requestAnimationFrame(this.rs))},t.g.Cga=function(){this.pa.D&&this.Nk().ie()},t.g.aI=function(){return this.j3},t.g.i4=function(){var t=Co(this.pa,this);return Do(this.pa,this,t),this},t.g.h4=function(){t:{for(var e=this.pa,i=(0,t.za)(e.f,this)+1;i<e.f.length;i++){var n=e.f[i];if(n&&n.enabled()){e=n;break t}}e=null}return Do(this.pa,this,e),this},t.g.L6=function(){var e=this.pa,i=!this.aI();t.p(i)&&(this.j3=i),e.ka();for(var n=0;n<e.f.length;n++){var s=e.f[n];s!==this&&s.enabled(!i)}return e.da(!0),this},t.g.mh=function(e){return this.$f||(this.$f=new t.iA,this.$f.Yl=this,t.W(this,"crosshair",this.$f),t.K(this.$f,this.fB,this),this.B(16777216,1)),t.p(e)?(this.$f.N(e),this):this.$f},t.g.fB=function(){this.B(16777216,1)},t.g.Nk=function(e){return this.pa.D?this.Sf||(this.Sf=new this.pa.D.PlotController(this.pa.Nk(),this),t.K(this.Sf,this.aR,this),this.Sf.kb(this),this.Sf.N(this.oa.annotations)):t.il(4,null,["Annotations"]),t.p(e)?(this.Sf&&this.Sf.N(e),this):this.Sf||null},t.g.qj=function(e){return this.Ql||(this.Ql=new te(this,this.pa.qj()),t.K(this.Ql,this.afa,this),this.Ql.kb(this.pa.qj())),t.p(e)?(this.Ql.N(e),this):this.Ql},t.g.afa=function(){this.B(65536,1)},t.g.aR=function(){this.B(8192,1)},t.g.vg=function(){this.B(64,1)},t.g.nJ=function(e){var i=1,n=128;t.X(e,64)&&(n|=2048),t.X(e,4)&&(i|=4),this.B(n,i)},t.g.Ola=function(e){var i=256;t.X(e,8)&&(i|=4),this.B(i,1)},t.g.Nja=function(){this.B(16384,1)},t.g.RY=function(e){var i=512;t.X(e,8)&&(i|=4),this.B(i,1)},t.g.Qy=function(){this.B(1024,1)},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.Pf,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(4608,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(4096,1)},t.g.tL=function(){return new t.xv},t.g.FW=function(e){t.X(e,1)&&this.B(32768,1)},t.g.Gm=function(e){return this.Dq||(this.Dq=new t.pv(this),t.K(this.Dq,this.FW,this)),t.p(e)?(this.Dq.N(e),this):this.Dq},t.g.xN=function(t){var e=t.la;return e=e?e.f.Hb():0,!(!t.enabled()||!e)},t.g.yj=function(){for(var t=0,e=this.Sa.length,i=0;i<e&&!this.xN(this.Sa[i]);i++)t++;return t==e},t.g.R=function(){t.sd(this.Sf,this.jb,this.Ql,this.Ia,this.mc,this.qf,this.Dq,this.Oa,this.$f,this.Ti,this.aq,this.bq,this.zG,this.Bi,this.Yg,this.Zg,this.jh,this.kh,this.Sa,this.tn,this.ID,this.Au,this.og,this.rg,this.tg,this.Fa,this.He,this.fd),this.fd=this.He=this.Fa=this.tn=this.Bi=this.zG=this.bq=this.aq=this.Ti=this.$f=this.Oa=this.Dq=this.mc=this.Ia=this.Ql=this.jb=this.Sf=null,this.ID.length=0,this.Sa.length=0,this.qf.length=0,this.Yg.length=0,this.Zg.length=0,this.jh.length=0,this.kh.length=0,this.og.length=0,this.rg.length=0,this.tg.length=0,this.Au.length=0,ja.u.R.call(this);var e=this.pa;t.Fa(e.f,this)&&e.B(4100,9),delete this.pa},t.g.F=function(){var e,i,n=ja.u.F.call(this),s={},a=[],o=[];t.Tq(this,Xl,n),s[t.oa(this.bb())]=this.bb().F(),a.push(s[t.oa(this.bb())]),n.yScale=a.length-1,n.defaultSeriesType=this.cq(),n.background=this.background().F(),n.title=this.title().F(),n.noDataLabel=this.Gm().label().F(),n.dataArea=this.yv().F(),o.push(t.oa(this.$h())),n.xAxis=this.$h().F(),n.palette=this.cc().F(),n.markerPalette=this.Nf().F(),n.hatchFillPalette=this.ve().F(),n.crosshair=this.mh().F();var r=[];for(i=0;i<this.qf.length;i++){var l=this.qf[i],h=l.F();if(e=l.scale()){var c=t.oa(e);s[c]?h.scale=(0,t.za)(a,s[c]):(s[c]=e.F(),a.push(s[c]),h.scale=a.length-1)}o.push(t.oa(l)),r.push(h)}for(r.length&&(n.yAxes=r),h=[],i=0;i<this.Au.length;i++)(e=this.Au[i])&&(h[i]=e.F());for(h.length&&(n.priceIndicators=h),Wa("xGrids",this.Yg,n,a,s,o),Wa("yGrids",this.Zg,n,a,s,o),Wa("xMinorGrids",this.jh,n,a,s,o),Wa("yMinorGrids",this.kh,n,a,s,o),o=[],i=0;i<this.Sa.length;i++)h=(e=this.Sa[i]).F(),(e=e.bb())&&(s[c=t.oa(e)]?h.yScale=(0,t.za)(a,s[c]):(s[c]=e.F(),a.push(s[c]),h.yScale=a.length-1)),o.push(h);return o.length&&(n.series=o),a.length&&(n.scales=a),n},t.g.U=function(e,i){ja.u.U.call(this,e,i),t.Iq(this,Xl,e,i),"defaultGridSettings"in e&&this.fA(e.defaultGridSettings),"defaultPriceIndicatorSettings"in e&&this.X0(e.defaultPriceIndicatorSettings),"defaultLineMarkerSettings"in e&&this.IL(e.defaultLineMarkerSettings),"defaultRangeMarkerSettings"in e&&this.JL(e.defaultRangeMarkerSettings),"defaultTextMarkerSettings"in e&&this.NL(e.defaultTextMarkerSettings),"defaultMinorGridSettings"in e&&this.gA(e.defaultMinorGridSettings),"defaultYAxisSettings"in e&&(this.zG=e.defaultYAxisSettings),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings),this.Kg(i,e),this.yv(e.dataArea),this.cq(e.defaultSeriesType),this.cc(e.palette),this.Nf(e.markerPalette),this.ve(e.hatchFillPalette),this.Gm().label(e.noDataLabel),this.background(e.background),"title"in e&&this.title().ga(!!i,e.title),this.eg(e.legend);var n,s,a=e.priceIndicators;if(t.A(a))for(n=0;n<a.length;n++)(s=a[n])&&this.Q4(n,s);if(this.pa.D&&this.Nk(e.annotations),"crosshair"in e&&this.mh(e.crosshair),this.im(e.xGrids,this.lm),this.im(e.yGrids,this.nm),this.im(e.xMinorGrids,this.Qr),this.im(e.yMinorGrids,this.Tr),a=e.series,t.A(a))for(n=0;n<a.length;n++){var o=((s=a[n]).seriesType||this.cq()).toLowerCase();(o=this.Ae(o,s.data))&&(o.N(s),t.C(s)&&"yScale"in s&&1<s.yScale&&o.bb(this.ax[s.yScale]))}},t.g.KE=function(e){var i,n,s=t.Sl(this.vf("scales"));if(e&&e.scales){for(n=0;n<s.length;n++)e.scales[n]&&t.ra(s[n],e.scales[n]);e.scales.length>s.length&&(s=t.Ga(s,t.Ja(e.scales,s.length)))}var o={};if(t.A(s))for(i=0;i<s.length;i++){var r=s[i];t.z(r)&&(r={type:r}),(n=a(r.type,!1)).N(r),o[i]=n}else if(t.C(s))for(i in s)s.hasOwnProperty(i)&&(r=s[i],t.z(r)&&(r={type:r}),(n=a(r.type,!1)).N(r),o[i]=n);r=t.Sl(this.vf("yScale")),e&&t.p(e.yScale)&&("object"==t.ka(e.yScale)&&"object"==t.ka(r)?t.ra(r,e.yScale):r=e.yScale),t.ea(r)?n=o[r]:t.z(r)?(n=a(r,!0))||(n=o[r]):t.C(r)?(n=a(r.type,!1)).N(r):n=null,n&&this.bb(n),this.ax=o},t.g.Kg=function(t,e){this.KE(e),this.$h(),this.im((e||this.oa).yAxes,this.ij)},t.g.im=function(e,i,n){if(t.A(e))for(var s=0;s<e.length;s++){var a=e[s],o=i.call(this,s);t.Jc(a)||(n?o.N(a):o.Ga(a),0<(a=t.C(a)&&"scale"in a?a.scale:o.vf("scale"))&&o.scale(this.ax[a]))}},t.H(Ka,t.ag),t.g=Ka.prototype,t.g.Uba=function(){var e=this.b.pa,i=!e.jN()&&!!e.gd().g("allowPlotDrag")&&ko(e,"selectedrangechangestart","plot-drag");return i&&(e.ec=!0,Fo(e),t.uf(window.document.body,"cursor","ew-resize")),i},t.g.Tba=function(){t.p(this.Qj)&&(t.ll.cancelAnimationFrame(this.Qj),this.rs(0));var e=this.b.pa;e.ec=!1,t.uf(window.document.body,"cursor",""),ko(e,"selectedrangechangefinish","plot-drag"),Io(e)},t.g.zda=function(t){return!!No(this.b.pa,t.left/this.b.hh.width,this.i)},t.g.sE=function(){this.b.pa.sE(this.i)},t.g.ar=function(){this.i=this.b.pa.cH(),this.deltaY=this.deltaX=0},t.g.ls=function(e){this.ea=e/this.b.hh.width,this.ba=this.i,t.p(this.Qj)||(this.Qj=t.ll.requestAnimationFrame(this.rs))},t.g.VA=function(t){var e=this.b.hh.width;return Bo(this.b.pa,t/e,this.i)*e},t.g.xw=function(){return 0};var Jl=ja.prototype;Jl.crosshair=Jl.mh,Jl.background=Jl.background,Jl.title=Jl.title,Jl.legend=Jl.eg,Jl.area=Jl.zC,Jl.candlestick=Jl.hS,Jl.column=Jl.KC,Jl.jumpLine=Jl.KV,Jl.stick=Jl.FJ,Jl.line=Jl.line,Jl.marker=Jl.Br,Jl.ohlc=Jl.IW,Jl.rangeArea=Jl.kX,Jl.rangeColumn=Jl.lX,Jl.rangeSplineArea=Jl.mX,Jl.rangeStepArea=Jl.nX,Jl.spline=Jl.fY,Jl.splineArea=Jl.gY,Jl.stepArea=Jl.pY,Jl.stepLine=Jl.qY,Jl.hilo=Jl.cV,Jl.getSeries=Jl.ef,Jl.yScale=Jl.bb,Jl.yAxis=Jl.ij,Jl.xAxis=Jl.$h,Jl.xGrid=Jl.lm,Jl.yGrid=Jl.nm,Jl.xMinorGrid=Jl.Qr,Jl.yMinorGrid=Jl.Tr,Jl.defaultSeriesType=Jl.cq,Jl.addSeries=Jl.kl,Jl.getSeriesAt=Jl.Ai,Jl.getSeriesCount=Jl.tj,Jl.removeSeries=Jl.Ao,Jl.removeSeriesAt=Jl.Rn,Jl.removeAllSeries=Jl.Dp,Jl.palette=Jl.cc,Jl.markerPalette=Jl.Nf,Jl.hatchFillPalette=Jl.ve,Jl.annotations=Jl.Nk,Jl.eventMarkers=Jl.qj,Jl.priceIndicator=Jl.Q4,Jl.lineMarker=Jl.Ym,Jl.rangeMarker=Jl.gn,Jl.textMarker=Jl.mn,Jl.noData=Jl.Gm,Jl.getStat=Jl.Rg,Jl.dataArea=Jl.yv,Jl.moveUp=Jl.i4,Jl.moveDown=Jl.h4,Jl.toggleExpandedState=Jl.L6,Jl.isExpanded=Jl.aI,t.H(Ya,Nt),t.g=Ya.prototype,t.g.Mz=function(e,i){if(null===e.Ob||4&e.Cb)throw Error("Wrong config for scroller series");t.qd(this.i),t.qd(this.o),this.i=new t.PG[e.Fb](this),this.o=new(2==e.Kb?t.WA:t.XA)(this,e.Ob,!!(524288&e.Cb),"secondaryShapes",e.Jb),Ya.u.Mz.call(this,e,i)},t.g.g5=function(){M(this.gH().b,this.la,!1)},t.g.LM=function(){return null},t.g.KM=function(){return null},t.g.gH=function(){return this.ya.xc()},t.g.cg=function(){return U(this.la,!0,!0)},t.g.rr=function(){return t.gm},t.g.remove=function(){this.b&&this.b.remove(),Ya.u.remove.call(this)},t.g.Gd=function(){Ya.u.Gd.call(this),this.i.Gd(this.o)},t.g.wn=function(t,e){Ya.u.wn.call(this,t,e),this.i.wn(t,e)},t.g.Rl=function(){Ya.u.Rl.call(this),this.i.Rl()},t.g.cX=function(){Ya.u.cX.call(this),this.b||(this.b=t.ok()),this.b.zIndex(this.zIndex()),this.b.parent(this.ea),this.J(1024)&&this.o.uv(),t.RA(this.o,this.b)},t.g.xC=function(){var t=this.zIndex();this.Aa.zIndex(t),this.b.zIndex(t)},t.g.R=function(){this.remove(),t.sd(this.i,this.o),this.o=this.i=null,Ya.u.R.call(this)},Xa.prototype.N=function(e){this.yb=[],this.f=[],(0,t.Pe)(e,(function(e){t.ea(e)?this.f.push(e):t.C(e)&&(e.yta?this.yb:this.f).push(t.N(e.value))}),this),this.b=t.Ga(this.yb,this.f),t.Ka(this.b),t.Pa(this.b)},Xa.prototype.reset=function(){this.i=-1},Xa.prototype.advance=function(){return this.i++,this.current=this.b[this.i],this.o=t.Aa(this.f,this.current),this.K=t.Aa(this.yb,this.current),!!this.current},Xa.prototype.ea=function(){return this.b.slice()},Ja.prototype.N=function(t,e,i,n,s){this.start=t,this.P=s,this.end=e,this.D=i,this.G=n,this.ba=this.aa=null,this.reset()},Ja.prototype.reset=function(){var e=t.So(this.start,this.D,this.P),i=t.So(this.start,this.G,this.P);for(this.b=new t.On(new Date(e)),this.f=window.NaN,this.b.getTime()<this.start&&(this.f=this.b.getTime(),this.f>this.end&&(this.f=window.NaN),this.b.add(this.D)),this.i=new t.On(new Date(i));this.i.getTime()<this.start;)this.i.add(this.G)},Ja.prototype.advance=function(){var t=this.b.getTime(),e=this.i.getTime();return this.current=Math.min(t,e),this.o=t==this.current,this.K=e==this.current,(t=this.current<=this.end)&&(this.o&&this.b.add(this.D),this.K&&this.i.add(this.G)),t},Ja.prototype.ea=function(t){if(t){if(this.aa)return this.aa}else if(this.ba)return this.ba;var e=[];for(this.reset();this.advance();)(t&&this.o||!t&&this.K)&&e.push(this.current);return t?this.aa=e:this.ba=e,e},t.H(Za,t.V),t.g=Za.prototype,t.g.ra=784,t.g.Ma=function(){return"stock-scatter-date-time"},t.g.an=function(e){return t.p(e)?(e=t.P(e,1e3,!1),this.cl!=e&&(this.cl=e,this.Kc=!1,this.va(512)),this):this.cl},t.g.fla=function(e){return t.p(e)?(e=t.P(e,this.K,!1),this.K!=e&&(this.K=e,this.Kc=!1,this.va(512)),this):this.K},t.g.Qs=function(e){return t.p(e)&&(e=Qa(this,e),!t.Pc(this.Ba,e))?(this.Ba=e,this.va(16),this):this.Ba},t.g.Os=function(e){return t.p(e)&&(e=Qa(this,e),!t.Pc(this.na,e))?(this.na=e,this.va(16),this):this.na},t.g.Y1=function(){return this.ea},t.g.X1=function(){return this.ba},t.g.jU=function(){return this.On},t.g.iU=function(){return this.xp},t.g.zk=function(e){return(0,window.isNaN)(t.Xk(e))},t.g.transform=function(t){return this.Kr(t,window.NaN)},t.g.Mc=function(t){return Math.round(t*(this.xp-this.On)+this.On)},t.g.Px=function(){return!1},t.g.Fn=function(){return this.pb(),this.f?this.o:this.P},t.g.pb=function(){if(!this.Kc){if(this.u1(),this.xp<=this.i||this.On>=this.aa)var e=this.On,i=this.xp;else e=t.Za(this.On,this.i,this.aa),i=t.Za(this.xp,this.i,this.aa);var n=.25*(this.Cw-this.Ps+1),s=[];t.Dc(this.Xm,(function(t){t.count>n&&s.push(t)}));var a=(0,t.Gg)(s,(function(e,i){var n=t.tp(e.Dg,1),s=t.tp(i.Dg,1);if(n>=s){var a=e,o=i,r=n;n=s}else a=i,o=e,r=s;return 60<r/n?a:o}),s[0]);if(a){var o=a.xe,r=t.tp(a.Dg,1);t.Dc(this.Xm,(function(t){t!=a&&(o+=t.count*r)}))}else o=Math.abs(i-e);for(var l,h=Math.abs(o)/this.K,c=this.jd.length-1,u=0;u<c;u++)if(h<=this.jd[u].xe){l=this.jd[u];break}l||(l=this.jd[c]),this.f?(e={fullMin:this.i,fullMax:this.aa,min:e,max:i,ticksCount:this.K,scale:this},e=this.f.call(e,e),this.o.N(e)):this.P.N(e,i,t.Vo(l.tI,l.sI),t.Vo(l.JI,l.II),this.i),this.Aha=l.tI,this.zha=l.sI,this.Yha=l.JI,this.Xha=l.II,this.Kc=!0}},t.g.u1=function(){this.P||(this.P=new Ja),!this.o&&this.f&&(this.o=new Xa)},t.g.Kr=function(e){return(t.Xk(e)-this.On)/(this.xp-this.On)},t.g.NP=function(t){return this.transform(t)},t.g.li=function(e){t.X(e,2)&&(this.Kc=!1,this.va(512))},t.g.Xa=function(e){if(t.p(e)){if(t.D(e))this.f=e,this.Kc=!1,this.va(512);else{e=function(e){var i=[];if(t.A(e)){for(var n=0;n<e.length;n++){var s=e[n];if(t.C(s)){var a=io(s.minor);s=io(s.major),a&&s&&i.push({xe:t.tp(a[0],a[1]),JI:a[0],II:a[1],tI:s[0],sI:s[1]})}}i.sort((function(t,e){return t.xe-e.xe}))}return i}(e);for(var i=e.length,n=i&&i==this.jd.length,s=0;n&&s<i;s++){n=e[s];var a=this.jd[s];n=n.xe==a.xe&&n.JI==a.JI&&n.II==a.II&&n.tI==a.tI&&n.sI==a.sI}n||(this.jd=e,this.f=null,this.Kc=!1,this.va(512))}return this}return this.f?this.f:(0,t.Wa)(this.jd,(function(t){return{minor:{unit:t.JI,count:t.II},major:{unit:t.tI,count:t.sI}}}))},t.g.zi=function(t){return this.b.zi(t)},t.g.Uf=function(t){return this.b.Uf(t)};var Zl=[{minor:{unit:"millisecond",count:1},major:{unit:"millisecond",count:5}},{minor:{unit:"millisecond",count:5},major:{unit:"millisecond",count:20}},{minor:{unit:"millisecond",count:20},major:{unit:"millisecond",count:100}},{minor:{unit:"millisecond",count:100},major:{unit:"millisecond",count:500}},{minor:{unit:"millisecond",count:500},major:{unit:"second",count:2}},{minor:{unit:"second",count:2},major:{unit:"second",count:10}},{minor:{unit:"second",count:10},major:{unit:"second",count:30}},{minor:{unit:"second",count:30},major:{unit:"minute",count:2}},{minor:{unit:"minute",count:2},major:{unit:"minute",count:10}},{minor:{unit:"minute",count:10},major:{unit:"minute",count:30}},{minor:{unit:"minute",count:30},major:{unit:"hour",count:1}},{minor:{unit:"hour",count:1},major:{unit:"hour",count:3}},{minor:{unit:"hour",count:3},major:{unit:"hour",count:12}},{minor:{unit:"hour",count:12},major:{unit:"day",count:1}},{minor:{unit:"day",count:1},major:{unit:"week",count:1}},{minor:{unit:"day",count:2},major:{unit:"week",count:1}},{minor:{unit:"week",count:1},major:{unit:"month",count:1}},{minor:{unit:"month",count:1},major:{unit:"quarter",count:1}},{minor:{unit:"quarter",count:1},major:{unit:"semester",count:1}},{minor:{unit:"semester",count:1},major:{unit:"year",count:1}},{minor:{unit:"year",count:1},major:{unit:"year",count:2}},{minor:{unit:"year",count:2},major:{unit:"year",count:4}},{minor:{unit:"year",count:3},major:{unit:"year",count:6}},{minor:{unit:"year",count:4},major:{unit:"year",count:8}},{minor:{unit:"year",count:5},major:{unit:"year",count:10}},{minor:{unit:"year",count:6},major:{unit:"year",count:12}},{minor:{unit:"year",count:7},major:{unit:"year",count:14}},{minor:{unit:"year",count:8},major:{unit:"year",count:16}},{minor:{unit:"year",count:9},major:{unit:"year",count:18}},{minor:{unit:"year",count:10},major:{unit:"year",count:20}},{minor:{unit:"year",count:20},major:{unit:"year",count:40}},{minor:{unit:"year",count:25},major:{unit:"year",count:100}},{minor:{unit:"year",count:100},major:{unit:"year",count:500}}],Ql=Za.prototype;Ql.ticks=Ql.Xa,Ql.ticksCount=Ql.fla,Ql.getFullMinimum=Ql.Y1,Ql.getFullMaximum=Ql.X1,Ql.getMinimum=Ql.jU,Ql.getMaximum=Ql.iU,Ql.transform=Ql.transform,Ql.inverseTransform=Ql.Mc,Ql.minimumGap=Ql.Qs,Ql.maximumGap=Ql.Os,t.H(no,Ja),no.prototype.reset=function(){var e=t.So(this.start,this.D,this.P),i=t.So(this.start,this.G,this.P);for(this.b=new t.On(new Date(e)),this.f=window.NaN,this.b.getTime()<this.start&&(this.f=so(this,this.b,this.D),this.f>this.end&&(this.f=window.NaN)),this.i=new t.On(new Date(i));this.i.getTime()<this.start;)this.i.add(this.G)},no.prototype.advance=function(){var t=this.b.getTime(),e=so(this,this.i,this.G);return this.current=e,this.o=t<=e,(t=this.current<=this.end)&&this.o&&so(this,this.b,this.D),t},t.H(ao,Za),t.g=ao.prototype,t.g.Ma=function(){return"stock-ordinal-date-time"},t.g.transform=function(e){return this.Kr(e,this.b.Uf(t.Xk(e)))},t.g.Mc=function(t){return Math.round(this.b.zi(t*(this.Cw-this.Ps)+this.Ps))},t.g.Kr=function(t,e){return(e-this.Ps)/(this.Cw-this.Ps)},t.g.NP=function(e){return this.Kr(e,Math.ceil(this.b.Uf(t.Xk(e))))},t.g.u1=function(){this.P||(this.P=new no(this)),!this.o&&this.f&&(this.o=new Xa)};var th=ao.prototype;th.transform=th.transform,th.inverseTransform=th.Mc,t.H(oo,t.GB),t.g=oo.prototype,t.g.ra=4|t.GB.prototype.ra,t.g.sa=1536|t.GB.prototype.sa,t.g.r6=function(){return!1},t.g.fj={area:{Fb:1,Kb:1,Lb:[qo,Wo,Ko],Ob:[dr,pr,gr],Jb:null,Cb:0,Ab:"value",zb:"zero"},candlestick:{Fb:5,Kb:1,Lb:[Jo,Zo,Qo,tr],Ob:[vr,Sr,wr,Cr],Jb:null,Cb:0,Ab:"high",zb:"low"},column:{Fb:6,Kb:1,Lb:[ur,Ko,Xo,Yo,Jo,Zo,Qo,tr],Ob:[kr,gr,br,fr,vr,Sr,wr,Cr],Jb:null,Cb:0,Ab:"value",zb:"zero"},"jump-line":{Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,xr,mr,yr],Jb:null,Cb:0,Ab:"value",zb:"value"},hilo:{Fb:31,Kb:2,Lb:[t.oH,t.MH,t.QH],Ob:[pr,Tr,Dr],Jb:null,Cb:0,Ab:"high",zb:"low"},stick:{Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,xr,mr,yr],Jb:null,Cb:0,Ab:"value",zb:"zero"},line:{Fb:8,Kb:1,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,xr,mr,yr],Jb:null,Cb:0,Ab:"value",zb:"value"},marker:{Fb:9,Kb:1,Lb:[ur,Ko,Zo,tr,Yo,Jo,Qo,Xo],Ob:[kr,gr,Sr,Cr,fr,vr,wr,br],Jb:null,Cb:0,Ab:"value",zb:"value"},ohlc:{Fb:10,Kb:1,Lb:[{name:"rising",Qb:"path",Yb:null,Zb:"risingStroke",ac:!1,Ib:!1,zIndex:0},{name:"falling",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!1,Ib:!1,zIndex:0}],Ob:[mr,xr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-area":{Fb:11,Kb:1,Lb:[qo,cr,hr,Ko,er,ir,ar,or],Ob:[dr,Tr,Dr,gr,nr,sr,rr,lr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-column":{Fb:12,Kb:1,Lb:[ur,Ko,{name:"high",Qb:"path",Yb:"highFill",Zb:"highStroke",ac:!1,Ib:!1,zIndex:0},{name:"low",Qb:"path",Yb:"lowFill",Zb:"lowStroke",ac:!1,Ib:!1,zIndex:0},ar,or],Ob:[kr,gr,{name:"high",Qb:"path",Yb:"highFill",Zb:"highStroke",ac:!1,Ib:!1,zIndex:0},{name:"low",Qb:"path",Yb:"lowFill",Zb:"lowStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},rr,lr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-spline-area":{Fb:13,Kb:1,Lb:[qo,cr,hr,Ko,er,ir,ar,or],Ob:[dr,Tr,Dr,gr,nr,sr,rr,lr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-step-area":{Fb:14,Kb:1,Lb:[qo,hr,cr,Ko],Ob:[dr,Dr,Tr,gr],Jb:null,Cb:0,Ab:"high",zb:"low"},spline:{Fb:15,Kb:1,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,xr,mr,yr],Jb:null,Cb:0,Ab:"value",zb:"value"},"spline-area":{Fb:16,Kb:1,Lb:[qo,Wo,Ko],Ob:[dr,pr,gr],Jb:null,Cb:0,Ab:"value",zb:"zero"},"step-area":{Fb:17,Kb:1,Lb:[qo,Wo,Ko],Ob:[dr,pr,gr],Jb:null,Cb:0,Ab:"value",zb:"zero"},"step-line":{Fb:18,Kb:1,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,xr,mr,yr],Jb:null,Cb:0,Ab:"value",zb:"value"}},t.g.cq=function(i){return t.p(i)?(this.US=i=e(i),this):this.US},t.g.zC=function(t,e,i){return this.Ae("area",t,e,i)},t.g.hS=function(t,e,i){return this.Ae("candlestick",t,e,i)},t.g.KC=function(t,e,i){return this.Ae("column",t,e,i)},t.g.KV=function(t,e,i){return this.Ae("jump-line",t,e,i)},t.g.cV=function(t,e,i){return this.Ae("hilo",t,e,i)},t.g.FJ=function(t,e,i){return this.Ae("stick",t,e,i)},t.g.line=function(t,e,i){return this.Ae("line",t,e,i)},t.g.Br=function(t,e,i){return this.Ae("marker",t,e,i)},t.g.IW=function(t,e,i){return this.Ae("ohlc",t,e,i)},t.g.kX=function(t,e,i){return this.Ae("range-area",t,e,i)},t.g.lX=function(t,e,i){return this.Ae("range-column",t,e,i)},t.g.mX=function(t,e,i){return this.Ae("range-spline-area",t,e,i)},t.g.nX=function(t,e,i){return this.Ae("range-step-area",t,e,i)},t.g.fY=function(t,e,i){return this.Ae("spline",t,e,i)},t.g.gY=function(t,e,i){return this.Ae("spline-area",t,e,i)},t.g.pY=function(t,e,i){return this.Ae("step-area",t,e,i)},t.g.qY=function(t,e,i){return this.Ae("step-line",t,e,i)},t.g.kl=function(t){var e=[],i=this.cq(),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.Ae(i,arguments[s]));else e.push(this.Ae(i,null));return this.da(!0),e},t.g.ty=function(e){return t.xa(this.Sa,(function(t){return t.id()==e}))},t.g.ef=function(t){return this.Ai(this.ty(t))},t.g.Ai=function(t){return this.Sa[t]||null},t.g.tj=function(){return this.Sa.length},t.g.Ao=function(t){return this.Rn(this.ty(t))},t.g.Rn=function(e){var i=this.Sa[e];return i&&(t.Pp++,t.Ca(this.Sa,e,1),t.qd(i),this.B(512,1),t.Sp()),this},t.g.Dp=function(){if(this.Sa.length){var e=this.Sa;t.Pp++,this.Sa=[],t.sd(e),this.B(512,1),t.Sp()}return this},t.g.Ue=function(){return this.Sa},t.g.ms=function(e){return this.Ti||(this.Ti=new t.Kz,this.Ti.Ga("chart.defaultSeriesSettings","stock.scroller.defaultSeriesSettings")),t.p(e)?(this.Ti.oa=e,this):this.Ti},t.g.Vv=function(i){i=e(i);var n=this.fj[i];return n&&n.Fb in t.PG?i=[i,n]:(t.il(4,null,[i+" series"]),i=null),i},t.g.pb=t.ia,t.g.Jv=t.ia,t.g.zM=function(t){return t.check(32768)?31:30},t.g.Ae=function(e,i,n,s){var a=this.Vv(e);return a?(e=new Ya(this,e,a[1]),a=(a=this.Sa[this.Sa.length-1])?a.yh()+1:0,this.Sa.push(e),e.yh(a),e.data(i||null,n,s),t.fB(e),e.clip(!0),t.iB(e,.9),e.Kq(this.cc().nc(a)),e.dx(this.ve().nc(a)),e.kb(this),t.K(e,this.nJ,this),this.B(512,1)):e=null,e},t.g.nJ=function(e){var i=1;t.X(e,4)&&(i|=4),this.B(512,i)},t.g.rB=function(){for(var t=0;t<this.Sa.length;t++){var e=this.Sa[t];e&&e.yE()}},t.g.ow=function(){for(var t=0;t<this.Sa.length;t++)this.Sa[t].B(2116)},_a(oo),t.g=oo.prototype,t.g.xc=function(){return this.pa},t.g.ob=function(){return this.fa},t.g.dg=function(){return this.ob()},t.g.Ra=function(e){return t.p(e)?(this.eb=e,ro(this),this):(this.eb||(this.eb=new ao(this)),this.eb)},t.g.VP=function(){oo.u.VP.call(this),ro(this)},t.g.EM=function(){return this.pa.b.ba.FI},t.g.Wm=function(){return this.pa.KK()},t.g.xa=function(){return!1},t.g.bb=function(e){if(t.p(e)){if(e=t.jt(this.Fc,e,null,3,["Scroller Y scale","scatter","linear, log"],this.Yu,this)){var i=this.Fc==e;if(this.Fc=e,this.Fc.da(i),!i){for(e=0;e<this.Sa.length;e++)(i=this.Sa[e])&&i.enabled()&&i.bb()==this.Fc&&(i.B(1024),this.B(512));this.va(1)}}return this}return this.Fc||(this.Fc=t.ft(),t.K(this.Fc,this.Yu,this)),this.Fc},t.g.Yu=function(e){for(var i=0,n=0;n<this.Sa.length;n++){var s=this.Sa[n];s&&s.enabled()&&s.bb()==this.Fc&&(i|=s.B(1024))}i&&(i=1,t.X(e,4)&&(i|=4),this.B(512,i))},t.g.$h=function(e){return this.mc||(this.mc=new tt(this,!0),this.mc.kb(this),this.mc.zIndex(52),t.W(this,"xAxis",this.mc),t.K(this.mc,this.RY,this),this.B(1024,1)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.RY=function(){this.B(1024,1)},t.g.uy=function(){return this.mc},t.g.wy=function(){return null},t.g.W=function(){if(oo.u.W.call(this),!this.zc())return this;if(this.yB||(this.yB=this.Aa.Bd(),this.yB.zIndex(1),this.yB.clip(this.dO),this.wB=this.Aa.Bd(),this.wB.Dd(!0),this.wB.zIndex(51),this.wB.clip(this.vB)),this.J(512)){for(var e=0;e<this.Sa.length;e++){var i=this.Sa[e];if(i){i.ka(),i.ja(this.fa),i.O(this.yB);var n=i,s=this.wB;t.p(s)&&n.ea!=s&&(n.ea=s,n.B(2,1)),i.Kq(this.cc().nc(e)),i.dx(this.ve().nc(e)),i.W(),i.da(!1)}}this.rB(),this.I(512)}return this.J(1024)&&(this.mc&&(this.mc.ka(),this.mc.scale(this.Ra()),this.mc.O(this.Aa),this.mc.ja(this.fa),this.mc.height(this.fa.height),this.mc.W(),this.mc.da(!1)),this.I(1024)),this},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(this.ow(),t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(512,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this.ow(),this.B(512,1),this):this.fd},t.g.Pf=function(e){t.X(e,2)&&this.B(512,1)},t.g.zi=function(t){var e=this.pa.b;return q(e),e.Ba.zi(t)},t.g.Uf=function(t){var e=this.pa.b;return q(e),e.Ba.Uf(t)},t.g.N3=function(t,e,i,n){return{type:t,startRatio:e,endRatio:i,startKey:this.Ra().Mc(e),endKey:this.Ra().Mc(i),source:n}},t.g.R=function(){t.sd(this.Fa,this.fd,this.yB,this.wB,this.mc,this.eb,this.Fc,this.Sa,this.ID,this.Ti),this.Ti=this.Fc=this.eb=this.mc=this.wB=this.yB=this.fd=this.Fa=null,this.Sa.length=0,this.ID.length=0,delete this.pa,oo.u.R.call(this)},t.g.F=function(){var t=oo.u.F.call(this);return t.defaultSeriesType=this.cq(),t.palette=this.cc().F(),t.hatchFillPalette=this.ve().F(),t},t.g.U=function(e,i){oo.u.U.call(this,e,i),this.Kg(!1,e),"xAxis"in e&&this.$h(e.xAxis),this.cc(e.palette),this.ve(e.hatchFillPalette),this.cq(e.defaultSeriesType),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings);var n=e.series;if(t.A(n))for(var s=0;s<n.length;s++){var a=n[s],o=(a.seriesType||this.cq()).toLowerCase();(o=this.Ae(o,a.data))&&(o.N(a),t.C(a)&&"yScale"in a&&1<a.yScale&&o.bb(this.ax[a.yScale]))}},t.g.KE=function(e){var i,n,s=t.Sl(this.vf("scales"));if(e&&e.scales){for(n=0;n<s.length;n++)e.scales[n]&&t.ra(s[n],e.scales[n]);e.scales.length>s.length&&(s=t.Ga(s,t.Ja(e.scales,s.length)))}var o={};if(t.A(s))for(i=0;i<s.length;i++){n=s[i],t.z(n)&&(n={type:n});var r=a(n.type,!1);r.N(n),o[i]=r}else if(t.C(s))for(i in s)s.hasOwnProperty(i)&&(n=s[i],t.z(n)&&(n={type:n}),(r=a(n.type,!1)).N(n),o[i]=r);n=t.Sl(this.vf("yScale")),e&&t.p(e.yScale)&&("object"==t.ka(e.yScale)&&"object"==t.ka(n)?t.ra(n,e.yScale):n=e.yScale),t.ea(n)?r=o[n]:t.z(n)?(r=a(n,!0))||(r=o[n]):t.C(n)?(r=a(n.type,!1)).N(n):r=null,r&&this.bb(r),this.ax=o},t.g.Kg=function(t,e){this.KE(e),this.$h()};var eh=oo.prototype;eh.area=eh.zC,eh.candlestick=eh.hS,eh.column=eh.KC,eh.stick=eh.FJ,eh.jumpLine=eh.KV,eh.hilo=eh.cV,eh.line=eh.line,eh.marker=eh.Br,eh.ohlc=eh.IW,eh.rangeArea=eh.kX,eh.rangeColumn=eh.lX,eh.rangeSplineArea=eh.mX,eh.rangeStepArea=eh.nX,eh.spline=eh.fY,eh.splineArea=eh.gY,eh.stepArea=eh.pY,eh.stepLine=eh.qY,eh.getSeries=eh.ef,eh.yScale=eh.bb,eh.xAxis=eh.$h,eh.defaultSeriesType=eh.cq,eh.addSeries=eh.kl,eh.getSeriesAt=eh.Ai,eh.getSeriesCount=eh.tj,eh.removeSeries=eh.Ao,eh.removeSeriesAt=eh.Rn,eh.removeAllSeries=eh.Dp,eh.palette=eh.cc,eh.hatchFillPalette=eh.ve,t.H(lo,_t),t.H(co,t.V),t.U(co,Wr),t.Gq(co,Qr,"normal"),t.g=co.prototype,t.g.sa=64,t.g.ra=1,t.g.PC=function(){this.B(64,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.group=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;return this.pa.jf().qj().group(n,s)},t.g.data=function(e){var i=this.pa.jf().qj().group().data(e);return t.p(e)?this:i},t.g.z_=function(e){var i=e.group;if(i){var n=e.index;e=e.originalEvent,this.i==i&&this.o==n||(this.dispatchEvent(uo(this,e,!1,[{group:i,index:n}],i,n))&&ne(i.jf.qj(),i,n,t.vo,t.gm)?(this.i=i,this.o=n):(this.i=null,this.o=window.NaN)),t.Ow(i.Ua(),e.clientX,e.clientY,i.$T(n))}},t.g.Zba=function(e){var i=e.group;if(i){var n=e.index;this.dispatchEvent(uo(this,e.originalEvent,!1,[],i,n)),ne(i.jf.qj(),i,n,t.gm,t.vo),i.Ua().Lc(!0),this.i=null,this.o=window.NaN}},t.g.Yba=function(e){var i=e.group;if(i){var n=e.index;e=e.originalEvent;var s=this.b==i&&this.f==n;this.b&&this.dispatchEvent(uo(this,e,!0,[],this.b,this.f))&&ne(this.b.jf.qj(),this.b,this.f,s?t.vo:t.gm,t.wo),!s&&this.dispatchEvent(uo(this,e,!0,[{group:i,index:n}],i,n))&&ne(i.jf.qj(),i,n,t.wo)?(this.b=i,this.f=n):(this.b=null,this.f=window.NaN)}},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),t.W(this,"tooltip",this.gb)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e=co.u.F.call(this);return t.Tq(this,Wr,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F(),e},t.g.U=function(e,i){var n;if(co.u.U.call(this,e,i),this.Ua().ga(!!i,e.tooltip),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),t.Iq(this,Wr,e),t.p(n=e.groups)){var s=this.pa.jf().qj();if(t.sd(s.b),s.b.length=0,t.A(n))for(s=0;s<n.length;s++){var a=n[s];null!=a&&this.group(s,a)}}else t.p(s=e.data)&&this.data(s)},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.gb),this.ca=this.za=this.Ea=this.pa=this.gb=null,co.u.R.call(this)};var ih=co.prototype;ih.group=ih.group,ih.data=ih.data,ih.tooltip=ih.Ua,ih.normal=ih.Qa,ih.hovered=ih.lb,ih.selected=ih.selected,t.H(po,t.ag),po.prototype.ar=function(){this.deltaY=this.deltaX=0},po.prototype.ls=function(t,e){this.hC.oc(1,0,0,1,0,e),this.LY.oc(1,0,0,1,0,e)},po.prototype.VA=function(){return 0},po.prototype.xw=function(e){var i=this.b.top+this.b.height,n=this.b.top,s=Number(this.hC.Cd("ac-top"));return e=t.Za(e,n-s,i-s),this.i=e+s,e},t.H(go,t.qf),t.g=go.prototype,t.g.wr=function(t){var e=t.target,i=e.tag;(e=new po(e,this.b[i])).b=this.G[i],e.wa("start",this.wca,!1,this),e.wa("drag",this.uea,!1,this),e.wa("end",this.vca,!1,this),this.i[i]=e,e.lk(t.kf)},t.g.wca=function(){this.dispatchEvent("dragStart")},t.g.uea=function(t){t=t.f;var e=Number(t.hC.Cd("ac-top")),i=t.b.left,n=t.b.left+t.b.width;this.f=t.i,this.P.fill(this.pa.SE().Ei().fill()).clear().moveTo(i,e).lineTo(n,e).lineTo(n,this.f).lineTo(i,this.f).close()},t.g.vca=function(t){this.P.clear(),this.dispatchEvent("dragEnd");var e=t.f;t=Number(e.hC.tag),e=e.b;var i=this.aa[t];e=(this.f-e.top+i)/(e.height+i+this.K[t]),i=(t=this.D[t]).V6.g("weight"),i+=t.K3.g("weight"),i-=e*=i,this.pa.Oz(!1),t.V6.weight(e),t.K3.weight(i),this.pa.Oz(!0)},t.g.reset=function(){for(var t=this.Ad=0;t<this.o.length;t++){var e=this.o[t];e.clear(),e.oc(1,0,0,1,0,0),(e=this.b[t]).clear(),e.oc(1,0,0,1,0,0)}},t.g.add=function(){var e=this.o[this.Ad],i=this.b[this.Ad];return e||((i=this.Jc.path()).zIndex(0),this.b.push(i),(e=this.Jc.path()).zIndex(1),e.stroke(t.bm,10),e.cursor("ns-resize"),this.o.push(e),e.tag=this.Ad,e.Ce("mousedown",this.wr,!1,this),e.wa("mousemove",this.Ika,!1,this),e.wa("mouseout",this.Jka,!1,this)),this.Ad++,i.stroke(this.pa.SE().Qa().stroke()),{hC:e,LY:i}},t.g.Ika=function(t){this.b[Number(t.target.tag)].stroke(this.pa.SE().lb().stroke())},t.g.Jka=function(t){this.b[Number(t.target.tag)].stroke(this.pa.SE().Qa().stroke())},t.g.R=function(){this.Jc=null,t.sd(this.o,this.i,this.b),this.o.length=0,this.b.length=0,this.i.length=0,this.D=null,go.u.R.call(this)},t.H(fo,t.V),fo.prototype.sync=function(){if(this.o.reset(),!this.ya.g("plotsManualBounds")&&!this.b){var e,i=xo(this.ya),n=!1;for(e=0;e<i.length;e++){var s=i[e];if(s.aI()){n=!0;break}}if(!n&&this.ya.SE().enabled()){for(e=0;e<i.length;e++)if(s=i[e],!Va(s)){n=s.ob();var a=Co(this.ya,s),o=a.ob(),r=this.o.add();r.hC.moveTo(n.left,n.top).lineTo(n.left+n.width,n.top).Cd("ac-top",n.top),r.LY.moveTo(n.left,n.top+.5).lineTo(n.left+n.width,n.top+.5),(r=this.o).D[r.Ad-1]={V6:a,K3:s},r=s.dg(),s=a.dg(),s=o.height-s.height+20,a=n.height-r.height+20,o&&n?(o=new t.I(o.left,o.top,o.width,o.height),t.pb(o,n)):o=null,o.top+=s,o.height-=s+a,r=(n=this.o).Ad-1;var l=n.i[r];l?l.b=o:n.G[r]=o,n.aa[r]=s,n.K[r]=a}for(e=(i=this.o).Ad;e<i.o.length;e++)i.o[e].clear(),i.b[e].clear()}}},fo.prototype.R=function(){this.ya=null,t.sd(this.wb,this.o),this.o=this.wb=null,fo.u.R.call(this)},t.H(bo,t.V);var nh={};t.sq(nh,[[1,"fill",t.Qq]]),t.U(bo,nh),bo.prototype.U=function(e,i){bo.u.U.call(this,e,i),t.Iq(this,nh,e,i)},bo.prototype.F=function(){var e=bo.u.F.call(this);return t.Tq(this,nh,e,void 0,void 0,!0),e},t.H(vo,t.V);var sh={};t.sq(sh,[[1,"stroke",t.Pq]]),t.U(vo,sh),vo.prototype.U=function(e,i){vo.u.U.call(this,e,i),t.Iq(this,sh,e,i)},vo.prototype.F=function(){var e=vo.u.F.call(this);return t.Tq(this,sh,e,void 0,void 0,!0),e},t.H(mo,t.V),mo.prototype.ra=1;var ah={};t.sq(ah,[[1,"stroke",t.Pq]]),t.U(mo,ah),mo.prototype.U=function(e,i){mo.u.U.call(this,e,i),t.Iq(this,ah,e,i)},mo.prototype.F=function(){var e=mo.u.F.call(this);return t.Tq(this,ah,e,void 0,void 0,!0),e},t.H(yo,t.V),t.Gq(yo,["stroke"],"normal"),yo.prototype.ra=1;var oh={};t.sq(oh,[[0,"enabled",t.Dq]]),t.U(yo,oh),t.g=yo.prototype,t.g.Ei=function(e){return this.fi||(this.fi=new bo,t.K(this.fi,this.e5,this),t.W(this,"preview",this.fi)),t.p(e)?(this.fi.N(e),this):this.fi},t.g.e5=function(){this.va(1)},t.g.Qa=function(e){return this.ca||(this.ca=new mo,this.ca.Ga(this.oa),t.W(this,"normal",this.ca),t.K(this.ca,this.e5,this)),t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return this.za||(this.za=new vo,t.W(this,"hovered",this.za)),t.p(e)?(this.za.N(e),this):this.za},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){yo.u.U.call(this,e,i),t.Iq(this,oh,e,i),"normal"in e&&this.Qa().ga(!!i,e.normal),"hovered"in e&&this.lb().ga(!!i,e.hovered),"preview"in e&&this.Ei().ga(!!i,e.normal)},t.g.F=function(){var e=yo.u.F.call(this);return t.Tq(this,oh,e,void 0,void 0,!0),this.ca&&(e.normal=this.ca.F()),this.za&&(e.hovered=this.za.F()),this.fi&&(e.preview=this.fi.F()),e},t.g.R=function(){t.sd(this.ca,this.za,this.fi),this.fi=this.za=this.ca=null,yo.u.R.call(this)};var rh=yo.prototype;rh.normal=rh.Qa,rh.hovered=rh.lb,rh.preview=rh.Ei,t.H(So,t.ux),So.prototype.ra=t.ux.prototype.ra,So.prototype.sa=258048|t.ux.prototype.sa;var lh={area:!1,candlestick:null,column:null,"jump-line":!0,stick:!0,line:!1,marker:null,ohlc:null,"range-area":!1,"range-column":null,"range-spline-area":!1,"range-step-area":!1,spline:!1,"spline-area":!1,"step-area":!1,"step-line":!1,hilo:!0};t.g=So.prototype,t.g.DP=function(){return!1},t.g.Ma=function(){return"stock"},t.g.Ue=function(){for(var t=[],e=0;e<this.f.length;e++){var i=this.f[e];i&&t.push.apply(t,i.Ue())}return t},t.g.Vv=function(i){i=e(i);var n=this.fj[i];return n&&n.Fb in t.PG?i=[i,n]:(t.il(4,null,[i+" series"]),i=null),i},t.g.xa=function(){return!1},t.g.pb=t.ia,t.g.eg=function(e){return t.il(51),t.p(e)?this:null},t.g.jf=function(e,i){return wo(this,e,i,!t.p(i))},t.g.tC=function(e){return this.i||(this.i=new oo(this),this.i.kb(this),t.W(this,"scroller",this.i),this.i.Kg(!0),t.K(this.i,this.Qba,this),this.wc.wa(this.i,"scrollerchangestart",this.pka),this.wc.wa(this.i,"scrollerchange",this.oka),this.wc.wa(this.i,"scrollerchangefinish",this.nka),this.B(8196,1)),t.p(e)?(this.i.N(e),this):this.i},t.g.G5=function(e,i,n,s){var a=this.b.D,o=window.NaN,r=t.zk(t.FE,e,t.p(null)?null:"max");if("points"==r){e=Math.max(+i||0,10);var l=t.fl(n);if(r=-1,"last-visible-date"==l){a=this.b;var h=X(this.b);q(a),a=a.f.Uf(h)}else"first-visible-date"==l?(a=this.b,r=Y(this.b),q(a),a=a.f.Uf(r),r=1):"first-date"==l?(a=this.b.f.b.length?0:window.NaN,r=1):a=x(this.b.f);e=a+r*(e-1)+r/2,h=this.b,a-=r/2,q(h),a=h.f.zi(a),r=this.b,e=t.Za(e,this.b.f.b.length?0:window.NaN,x(this.b.f)),q(r),o=r.f.zi(e)}else if(r&&"unit"!=r)switch(l=new Date(a),r){case"ytd":o=Date.UTC(l.getUTCFullYear(),0);break;case"qtd":o=Date.UTC(l.getUTCFullYear(),3*Math.floor((l.getUTCMonth()+3)/3)-3,1);break;case"mtd":o=Date.UTC(l.getUTCFullYear(),l.getUTCMonth());break;case"max":o=this.b.o}else if(o=t.Zk(e,null)){e=i||1,r=-1,"last-visible-date"==(l=t.fl(n))?a=X(this.b):"first-visible-date"==l?(a=Y(this.b),r=1):"first-date"==l&&(a=this.b.o,r=1),l=new Date(a);var c=new Date(a);if("year"==o)c.setUTCFullYear(l.getUTCFullYear()+r*e),o=c.getTime();else if("semester"==o||"quarter"==o||"month"==o){switch(o){case"semester":h=6*e;break;case"quarter":h=3*e;break;case"month":h=e}e=l.getUTCMonth()+r*h,r=l.getUTCFullYear()+Math.floor(e/12),0>(e%=12)&&(e+=12),c.setUTCFullYear(r),c.setUTCMonth(e),o=c.getTime()}else if("third-of-month"==o)h=l.getUTCDate(),h=3*(12*l.getUTCFullYear()+l.getUTCMonth())+(10>=h?0:20>=h?1:2)+r*e,r=Math.floor(h/36),h%=36,0>(e=Math.floor(h/3))&&(e+=12),0>(h%=3)&&(h+=3),o=Date.UTC(r,e,1+10*h);else{switch(o){case"week":h=6048e5*e;break;case"day":h=864e5*e;break;case"hour":h=36e5*e;break;case"minute":h=6e4*e;break;case"second":h=1e3*e;break;case"millisecond":h=e}o=a+r*h}}else a=t.Xk(e),o=t.Xk(i);return this.B(16384),To(this,a,o),(t.da(i)&&i||t.da(n)&&n||s)&&ko(this,"selectedrangechange","select-range"),this},t.g.Lfa=function(){return{firstSelected:this.b.b.ki,lastSelected:this.b.b.Wi,firstVisible:Y(this.b),lastVisible:X(this.b)}},t.g.Ra=function(e){if(t.p(e)){var i;t.z(e)?i=e:t.C(e)&&(i=e.type),e="stock-scatter-date-time"==(i=String(i).toLowerCase())||"scatter"==i,i=this.eb&&!t.J(this.eb,ao);var n=t.wr(this,"scroller");return n&&t.kr(n,this.TY,this),e!=i&&(e?(this.eb=new Za(this),n&&n.Ra(new Za(n))):(this.eb=new ao(this),n&&n.Ra(new ao(n))),t.W(this,"xScale",this.eb),this.eb.N(this.eb.oa),t.K(this.eb,this.TY,this),this.Dy()),this}return this.eb||(this.eb=new ao(this),t.W(this,"xScale",this.eb),this.eb.N(this.eb.oa),t.K(this.eb,this.TY,this)),this.eb},t.g.TY=function(e){t.X(e,16)&&(this.K&&this.K.remove(),this.B(81920,1))},t.g.Wm=function(e){return t.p(e)?(this.b.Wm(e),this):this.b.Wm()},t.g.KK=function(e){return t.p(e)?(z(this.b,e),this):z(this.b)},t.g.Kja=function(e){return t.p(e)?(this.na=!!e,this):this.na},t.g.W0=function(e){return t.p(e)?(this.bg=!!e,this):this.bg||{}},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.EM=function(){return this.b.EM()},t.g.Kfa=function(){for(var t=0,e=0;e<this.f.length;e++)this.f[e]&&t++;return t},t.g.q6=function(){return!1},t.g.wfa=function(){return this.vt},t.g.Qh=function(e){var i;if(this.D&&this.Nk().gv(!0),this.Ba||(this.Ba=new fo(this)),this.J(4)){if((i=t.wr(this,"scroller"))&&(i.ja(e),e=i.yd()),this.g("plotsManualBounds")){var n;i=0;for(var s=window.NaN,a=[],o=0;o<this.f.length;o++)if((n=this.f[o])&&n.enabled()){n.ja(e);var r=!1;null!==(n=n.Ta()).top()?s=t.L(n.top(),e.height):null!==n.bottom()&&(r=!0,a.push(n),s=t.L(n.bottom(),e.height,!0)),(0,window.isNaN)(s)||(a.length&&Lo(a,i,s,e.height),i=s,s=window.NaN,a.length=0),r||a.push(n)}a.length&&Lo(a,i,e.height,e.height)}else{var l=this.yg=e;i=xo(this),r=0;var h=[];if(s=l.height,a=i.length){var c=s/a,u=0;for(e=0;e<a;e++){(n=i[e]).ja(l);var d=window.NaN;o=n.Ta();var p=t.L(o.minHeight(),s),g=t.L(o.height(),s),f=t.L(o.maxHeight(),s);(0,window.isNaN)(p)||(d=Math.max(p,c),n.ta("weight",null)),(0,window.isNaN)(g)||(d=(0,window.isNaN)(d)?g:Math.max(g,d),n.ta("weight",null)),(0,window.isNaN)(f)||(d=(0,window.isNaN)(d)?Math.min(f,c):Math.min(f,d),n.ta("weight",null)),(0,window.isNaN)(d)?u+=1:r+=d,h.push(d),o.ka(),o.top(null).bottom(null).height(null).minHeight(null).maxHeight(null),o.da(!1)}for(o=r>s,l=0,d=[],e=0;e<a;e++)n=i[e],g=h[e],null!=(p=n.g("weight"))||(p=o?(0,window.isNaN)(g)?c:g:(0,window.isNaN)(g)?(s-r)/u:g),d.push(p),l+=p;for(e=r=0;e<a;e++)(o=(n=i[e]).Ta()).ka(),p=d[e],n.ta("weight",p),n=Math.round(p/l*s),c=(h=o).Kx!=r,h.Kx=r,c&&h.va(2),o.zB(n),r+=n,o.da(!0)}}for(this.G=window.Infinity,e=0;e<this.f.length;e++)(i=this.f[e])&&i.enabled()&&(Ba(i),i=i.hh.width,this.G>i&&(this.G=i));(0,window.isFinite)(this.G)||(this.G=window.NaN),this.B(16384)}if(this.J(16384)||this.J(32768)){if(e=this.Ra(),i=this.tC().Ra(),s=B(this.b,this.G,this.ec||this.na,e,i),this.J(65536)&&(this.K||(this.K=new lo,M(this.b,this.K.Yd().wL(),!1)),s=this.K,o=(a=this.Ra()).X1(),n=a.Y1(),h=a.Qs(),r=a.Os(),s.ka(),h.intervalsCount?(h=(h=ho(s,n,h))[0][0],t.ea(h)?a.G={min:h,max:n}:a.G=null):t.ea(null)?a.G={min:null,max:void 0}:a.G=null,r.intervalsCount?(h=ho(s,o,r,!0),t.ea(o)?a.D={min:o,max:h[h.length-1][0]}:a.D=null):t.ea(null)?a.D={min:null,max:void 0}:a.D=null,s.da(!0),this.I(65536),s=B(this.b,this.G,this.ec||this.na,e,i)),1&s)for(this.Dy(),e=0;e<this.f.length;e++)(i=this.f[e])&&i.sE();2&s&&(ro(this.i),this.B(8192),ko(this,"selectedrangechange","data-update")),this.I(16384)}if(this.J(32768)){for(e=[],i=0;i<this.f.length;i++)if((a=this.f[i])&&a.enabled()){for(r="direct"==a.bb().kx(),s=t.Ga(a.og,a.rg,a.tg),o=a.Ue(),c={},u=!1,a=0;a<o.length;a++)h=o[r?o.length-a-1:a],Bt(h),(n=h.bb()).Of()&&(n.Bg(),e.push(n)),h.enabled()&&(h.gh()?u=$o(this,h,c)||u:h.enabled()&&n.Xc.apply(n,h.oH()));if(u)for(a=0;a<o.length;a++)(h=o[a]).enabled()&&"percent"==(n=h.bb()).jn()&&Po(h,n,c);for(a=0;a<o.length;a++)if((h=o[a]).enabled())for(n=h.bb(),r=0;r<s.length;r++)c=(h=s[r]).Nb()?n:this.Ra(),c=h.scale()||c,h&&h.enabled()&&n==c&&"consider"==h.g("scaleRangeMode")&&n.Xc.apply(n,h.xs())}if((i=t.wr(this,"scroller"))&&i.Oe()){for(o=i.Ue(),c={},u=!1,a=0;a<o.length;a++)h=o[a],Bt(h),(n=h.bb()).Of()&&(n.Bg(),e.push(n)),h.enabled()&&(h.gh()?u=$o(this,h,c)||u:h.enabled()&&n.Xc.apply(n,h.oH()));if(u)for(a=0;a<o.length;a++)(h=o[a]).enabled()&&"percent"==(n=h.bb()).jn()&&Po(h,n,c)}for(i=0;i<e.length;i++)e[i].Hg();this.I(32768)}if(this.J(8192)&&(e=this.tC(),i=this.b.b.ki,s=this.b.b.Wi,i=e.Ra().transform(i),i=(0,window.isNaN)(i)?0:t.Za(i,0,1),s=e.Ra().transform(s),s=(0,window.isNaN)(s)?1:t.Za(s,0,1),t.IB(e,i,s),e.O(this.Na).W(),this.I(8192)),this.J(4096)){for(s=!1,e=0;e<this.f.length;e++)(i=this.f[e])&&(i.enabled()&&(Va(i,!s),s=!0),i.O(this.Na).W());this.I(4096)}Eo(this),this.J(131072)&&this.I(131072),this.Ba.sync(),this.aa||(this.aa=new t.Ex(this.O().Ja().Tl(),!1),this.aa.wa("mousewheel",this.Pba,!1,this)),this.qj().I(4294967295),this.qj().Qa().Zf().I(4294967295)},t.g.Ala=function(t,e,i,n,s,a){this.E4(t,e,i,n,s,a);var o=0<=n;i.PE=i.PE||{jB:window.NaN,dB:window.NaN},e.j("shared")||e.j("shared",i.PE),i.pE?o?(e.j("stackedZeroPrev",i.Sw),e.j("stackedValuePrev",i.Sw+n)):(e.j("stackedZeroPrev",i.Rw),e.j("stackedValuePrev",i.Rw+n)):(e.j("stackedZeroPrev",window.NaN),e.j("stackedValuePrev",window.NaN)),i.cE?o?(e.j("stackedZeroNext",i.Iw),e.j("stackedValueNext",i.Iw+n)):(e.j("stackedZeroNext",i.Hw),e.j("stackedValueNext",i.Hw+n)):(e.j("stackedZeroNext",window.NaN),e.j("stackedValueNext",window.NaN)),t.Xc(e.j("stackedValuePrev")),t.Xc(e.j("stackedValue")),t.Xc(e.j("stackedValueNext")),s&&(s.Rs?i.pE=!0:o?i.Sw+=n:i.Rw+=n,(0,window.isNaN)(a)||(0<=a?s.Iw+=a:s.Hw+=a))},t.g.E4=function(t,e,i,n){0<=n?(e.j("stackedZero",i.Cp),i.Cp+=n,e.j("stackedValue",i.Cp)):(e.j("stackedZero",i.zp),i.zp+=n,e.j("stackedValue",i.zp))},t.g.Fja=function(e){if(!t.X(e,64)){var i=4096;t.X(e,8)&&(i|=4),t.X(e,4)&&(i|=32768),this.B(i,1)}},t.g.Qba=function(e){var i=8192,n=1;t.X(e,8)&&(i|=32772,n|=8),t.X(e,4)&&(i|=32768),this.B(i,n)},t.g.gea=function(e){t.X(e,16)&&this.B(16384,1)},t.g.Dy=function(){for(var t=0;t<this.f.length;t++){var e=this.f[t];e&&e.Dy(!1)}this.B(45056,1)},t.g.zi=function(t){return this.b.zi(t)},t.g.Uf=function(t){return this.b.Uf(t)},t.g.Nk=function(e){return this.D?this.Sf||(this.Sf=new this.D.ChartController(this)):t.il(4,null,["Annotations"]),t.p(e)?(this.Sf&&this.Sf.N(e),this):this.Sf},t.g.PS=function(e){return t.p(e)?(this.Sb=e,this):this.Sb},t.g.qj=function(e){return this.Ql||(this.Ql=new co(this),this.Ql.kb(this),t.K(this.Ql,this.$ea,this)),t.p(e)?(this.Ql.N(e),this):this.Ql},t.g.$ea=function(){this.ka();for(var t=0;t<this.f.length;t++)this.f[t].qj().B(64,1);this.da(!0)},t.g.kO=t.ia,t.g.BY=function(){this.$a=this.Za=this.fb=this.P=window.NaN,this.Uc=null,_o(this)},t.g.ES=function(){return new Q(this)},t.g.mh=function(e){return this.$f||(this.$f=new t.iA,this.$f.Wj(!0),t.W(this,"crosshair",this.$f),t.K(this.$f,this.fB,this),this.B(16777216,1)),t.p(e)?(this.$f.N(e),this):this.$f},t.g.fB=function(){this.B(16777216,1)},t.g.MM=function(){for(var t=[],e=0;e<this.f.length;e++){var i=this.f[e];t.push(i&&i.enabled()?i.dg():null)}return t},t.g.aA=function(t,e,i,n,s,a,o){t=So.u.aA.call(this,t,e,i,n,s,a,o),n=(i=this.f[e]).dg(),s=(t.left-n.left)/n.width,a=(t.left+t.width-n.left)/n.width,o=(t.top-n.top)/n.height;var r=(t.top+t.height-n.top)/n.height,l=this.Ra(),h=i.bb();return t.plot=i,t.plotIndex=e,t.plotBounds={left:n.left,top:n.top,width:n.width,height:n.height},t.leftX=l.Mc(s),t.rightX=l.Mc(a),t.maxValue=h.Mc(o),t.minValue=h.Mc(r),h.Ne()&&(e=t.minValue,t.minValue=t.maxValue,t.maxValue=e),t};var hh={};t.rq(hh,0,"plotsManualBounds",t.Dq),t.rq(hh,1,"zoomMarqueeFill",t.Qq),t.rq(hh,1,"zoomMarqueeStroke",t.Pq),t.U(So,hh),t.g=So.prototype,t.g.o6=function(e,i){return t.xx(this,this.sja,null,this.rja,this.MM(),"crosshair",e,this.g("zoomMarqueeStroke"),this.g("zoomMarqueeFill"),!i),this},t.g.sja=function(){return Fo(this),!0},t.g.rja=function(t,e,i,n){if(5<Math.abs(n)){var s=this.f[t].dg();t=this.Ra(),(i=(e-s.left)/s.width)>(e=(e+n-s.left)/s.width)&&(n=i,i=e,e=n),.05>e-i&&(i=(e=(i+e)/2)-.025,e+=.025),i=t.Mc(i),t=t.Mc(e),e=this.b.Uf(i),1>(n=this.b.Uf(t))-e&&(i=this.b.zi(Math.floor(e)),t=this.b.zi(Math.ceil(n))),(0,window.isNaN)(i)||(0,window.isNaN)(t)||i==this.b.b.ki&&t==this.b.b.Wi||!ko(this,"selectedrangechangestart","marquee")||!ko(this,"selectedrangebeforechange","marquee",i,t)||(To(this,i,t),ko(this,"selectedrangechange","marquee"),ko(this,"selectedrangechangefinish","marquee"))}return Io(this),!0},t.g.SE=function(e){return this.o||(this.o=new yo,t.W(this,"splitters",this.o),t.K(this.o,this.Kka,this)),t.p(e)?(this.o.N(e),this):this.o},t.g.Kka=function(){this.B(131072,1)},t.g.Pba=function(e){var i=this.MM(),n=t.Zj(this.O().Ja()),s=e.clientX-n.x;n=e.clientY-n.y;var a,o=!1;if(i&&i.length)for(var r=0;r<i.length;r++)if((a=i[r])&&a.left<=s&&s<=a.left+a.width&&a.top<=n&&n<=a.top+a.height){o=!0;break}i=t.wr(this,"scroller"),!o&&i&&i.Oe()&&(o=(a=i.ob())&&a.left<=s&&s<=a.left+a.width&&a.top<=n&&n<=a.top+a.height),o&&(Math.abs(e.deltaY)>Math.abs(e.deltaX)?(i=!(e.shiftKey||e.ctrlKey||e.metaKey),s=e.deltaY):(i=!1,s=e.deltaX),s=t.fb(s)*Math.min(Math.abs(s),21),n=this.gd(),i?!n.g("zoomOnMouseWheel")||(r=t.J(this.Ra(),ao),o=this.b.o,a=this.b.D,r?(o=this.b.Uf(o),a=this.b.Uf(a),i=this.b.b.Cg,n=this.b.b.Nj):(i=this.b.b.ki,n=this.b.b.Wi),(0,window.isNaN)(i)||(0,window.isNaN)(n)||((n+=s=.0125*s*(n-i))-(i-=s)>a-o?(i=o,n=a):(i<o&&(n+=o-i,i=o),n>a&&(i+=a-n,n=a)),r?(1>n-i&&(n=(i=Math.round(i))+1),i=this.b.zi(i),n=this.b.zi(n)):(s=this.b.Uf(i),1>(o=this.b.Uf(n))-s&&(o=(s=Math.round(s))+1,i=this.b.zi(s),n=this.b.zi(o))),i==this.b.b.ki&&n==this.b.b.Wi))||(e.preventDefault(),this.me=i,this.Od=n,t.p(this.ba)&&(t.ll.cancelAnimationFrame(this.ba),this.ud()),t.p(this.ea)||(this.ea=t.ll.requestAnimationFrame(this.Hd))):n.g("scrollOnMouseWheel")&&(i=this.cH(),!(0,window.isNaN)(i.rj)&&!(0,window.isNaN)(i.lastIndex)&&(s=Bo(this,.025*-s,i)))&&(e.preventDefault(),this.fh=s,this.nf=i,t.p(this.ea)&&(t.ll.cancelAnimationFrame(this.ea),this.Hd()),t.p(this.ba)||(this.ba=t.ll.requestAnimationFrame(this.ud))))},t.g.rea=function(){this.ea=void 0,ko(this,"selectedrangechangestart","mouse-wheel")&&ko(this,"selectedrangebeforechange","mouse-wheel",this.me,this.Od)&&(To(this,this.me,this.Od),ko(this,"selectedrangechange","mouse-wheel"),ko(this,"selectedrangechangefinish","mouse-wheel"))},t.g.qea=function(){if(this.ba=void 0,ko(this,"selectedrangechangestart","mouse-wheel")){var t=this.nf,e=No(this,this.fh,t);e&&Mo(this,e[0],e[1],t,"mouse-wheel"),ko(this,"selectedrangechangefinish","mouse-wheel")}};var ch={"zoom-marquee-start":{index:8,text:"Start zoom marquee",eventType:"anychart.startZoomMarquee",action:function(t){t.menuParent.o6(!1)}},"stock-specific-separator":{index:9.4}};t.g=So.prototype,t.g.jx=function(e){return t.Sc(e,t.Sl(ch)),e},t.g.pka=function(t){return(t=ko(this,"selectedrangechangestart",jo(t.source)))&&Fo(this),t},t.g.oka=function(t){t.preventDefault();var e=t.startKey,i=t.endKey;t=jo(t.source),ko(this,"selectedrangebeforechange",t,Math.min(e,i),Math.max(e,i))&&(To(this,e,i),ko(this,"selectedrangechange",t))},t.g.nka=function(t){t.preventDefault(),ko(this,"selectedrangechangefinish",jo(t.source)),Io(this)},t.g.cH=function(){var t=this.b,e=t.o,i=t.D,n=this.Uf(e),s=this.Uf(i);return{qs:t.b.ki,uw:t.b.Wi,rj:t.b.Cg,lastIndex:t.b.Nj,On:e,xp:i,Ps:n,Cw:s}},t.g.sE=function(t){var e=this.b,i=e.o,n=e.D,s=this.Uf(i),a=this.Uf(n),o=e.b.Wi,r=e.b.Cg,l=e.b.Nj;t.qs=e.b.ki,t.uw=o,t.rj=r,t.lastIndex=l,t.On=i,t.xp=n,t.Ps=s,t.Cw=a},t.g.R=function(){t.sd(this.f,this.i,this.b,this.Sf,this.Ql,this.aa,this.$f,this.o,this.Ba),this.Ba=this.o=this.$f=this.aa=this.Ql=this.Sf=this.i=this.f=null,delete this.b,delete this.Sb,So.u.R.call(this)},t.g.F=function(){var e=So.u.F.call(this);return delete e.noDataLabel,e.grouping=this.Wm().F(),e.scrollerGrouping=this.KK().F(),e.xScale=this.Ra().F(),e.scroller=this.tC().F(),e.plots=(0,t.Wa)(this.f,(function(t){return t?t.F():null})),e.crosshair=this.mh().F(),e.eventMarkers=this.qj().F(),t.Tq(this,hh,e),e.interactivity=this.gd().F(),e},t.g.U=function(e,i){var n;So.u.U.call(this,e,i),"xScale"in e&&this.Ra(e.xScale),this.Kg(i,e),this.mh(e.crosshair),"defaultPlotSettings"in e&&this.W0(e.defaultPlotSettings),this.tC(e.scroller),this.Wm(e.grouping),this.KK(e.scrollerGrouping),"defaultAnnotationSettings"in e&&this.PS(e.defaultAnnotationSettings),(n=e.eventMarkers)&&this.qj().ga(!!i,n),n=e.selectedRange,t.C(n)&&this.G5(n.start,n.end),t.Iq(this,hh,e),this.gd(e.interactivity)},t.g.Kg=function(e,i){var n=(i||this.oa).plots;if(t.A(n))for(var s=0;s<n.length;s++)wo(this,s,n[s],e)},t.g.m2=function(){var t,e=this.b.aa,i=[];for(t in e)i.push(jt(e[t]));return i},t.g.sA=function(){return["_","x"]},t.g.nD=function(e,i,n,s){var a=t.qo(e);return a in s?s=s[a]:(s=s[a]=n.length,n.push([e,i])),n[s]},t.g.VW=function(t,e,i){So.u.VW.call(this,t,e.values,i)},t.g.tA=function(t){return t.Gh()},t.g.rA=function(e,i){var n=i.la.pr().Rd().pc.Za||"yyyy-MM-ddTHH:mm:ss.SSS";return t.us(e.Gh(),n)},t.g.O1=function(t,e){switch(e){case"selected":var i=t.cg();break;case"grouped":var n=(i=t.la).ib?H(i.ib,!1,!0):null,s=i.f.b;if(s.length){var a=0,o=s.length-1,r=s[a];s=s[o]}else a=o=window.NaN,r=s=null;i=new m(i.Zc,{ki:window.NaN,Wi:window.NaN,Pw:window.NaN,rj:a,lastIndex:o,kB:window.NaN,xO:null,IT:r,A3:s,aJ:null,UN:{},SN:{},eL:[],fL:[],d7:{},c7:{},Z6:[],Y6:[]},i.o,!i.i,n);break;default:i=U(t.la.pr().wL(),!1)}return i},t.g.W2=function(){return""},t.g.DM=function(e){return(e=So.u.DM.call(this,e)).headers.shift(),e.data.sort((function(t,e){return t[0]-e[0]})),(0,t.Pe)(e.data,(function(t){t.shift()})),e};var uh=So.prototype;t.E("anychart.stock",(function(t){return(t=new So(t)).Kg(!0),t})),uh.plot=uh.jf,uh.crosshair=uh.mh,uh.scroller=uh.tC,uh.splitters=uh.SE,uh.xScale=uh.Ra,uh.selectRange=uh.G5,uh.getSelectedRange=uh.Lfa,uh.getType=uh.Ma,uh.legend=uh.eg,uh.grouping=uh.Wm,uh.scrollerGrouping=uh.KK,uh.annotations=uh.Nk,uh.eventMarkers=uh.qj,uh.getPlotsCount=uh.Kfa,uh.startZoomMarquee=uh.o6,uh.interactivity=uh.gd,uh.preserveSelectedRangeOnDataUpdate=uh.Kja}.call(this,$)),_.wordtree||(_.wordtree=1,function(t){var e=function(){t.V.call(this),t.T(this.ua,p)},i=function(e,i){t.ux.call(this),t.su(this,this,this.If,this.hg,this.Ds,this.If,null,null),this.Ir=null,this.Ou=[],this.Jh=[],this.ZO=this.dM=null,this.Xf=[],this.nt=[],t.T(this.ua,[["minFontSize",4,1],["maxFontSize",4,1],["postfix",4,1],["fontFamily",4,1],["fontStyle",16,1],["fontWeight",4,1],["fontColor",16,1],["fontOpacity",16,1],["fontDecoration",16,1]]),this.data(e,i)},n=function(t,e){var i=e.getParent();if(i){for(var s=0;s<i.bc();s++){var a=i.xd(s);a!=e&&a.j("hidden",!0)}n(t,i)}},s=function(t){for(var e=0;e<t.Jh.length;e++)t.Jh[e].j("hidden",!1)},a=function(t,e,i){if(i.length){for(var n=e.Sl(),s=!1,o=0;o<e.bc();o++)if(n[o].get("value")==i[0]){s=!0;break}return s?(i.shift(),e=n[o]):(e=e.hc({value:i[0]}),i.shift()),a(t,e,i)}return e},o=function(e){return e=e.split(/([!?,;:.&"-]+|\S*[A-Z]\.|\S*(?:[^!?,;:.\s&-]))/),(0,t.Ye)(e,(function(t){return t.length&&" "!=t}))},r=function(e,i){null!=e.la&&(t.kr(e.la,e.dd,e),e.la.ld()),e.la=i,t.K(e.la,e.dd,e),e.B(4100,1)},l=function(e,i,n){if(i){var s=i.get("fontSize");if(null==s){if((s=i.getParent())&&(1==s.bc()||n))return s=l(e,s,n),i.j("fontSize",s),s;n=e.g("maxFontSize"),e=e.g("minFontSize"),s=i.j("height")/1.5,s=t.Za(s,e,n),i.j("fontSize",s)}return s}return 0},h=function(t,e){if(e){var i=e.bc(),n=0;if(i)for(var s=0;s<i;s++)n+=h(t,e.xd(s));else n=e.get("weight")||1;return e.j("leafCount",n).j("weight",n),n}return 0},c=function(t,e,i,n,s,a){if(e){e.j("connectorInXPosition",i[0]).j("connectorInYPosition",i[1]).j("connectorOutXPosition",i[0]+t.HW(e)).j("connectorOutYPosition",i[1]);var o=t.kg.cb();if(n<o){i=t.nj();var r=e.bc(),l=i.g("length"),h=i.g("offset");i=i.g("curveFactor");var u=t.g("minFontSize");if(r){if(1<r){var d=u/10;s+=d,a-=d}d=s;for(var p,g=!1,f=0;f<r;f++)if((p=e.xd(f)).j("hidden")){g=!0;break}if((a-s)/r<1.5*u&&1<r){r="+"+e.j("leafCount")+" "+t.g("postfix");var b=(a+s)/2;h=n,b-=(n=t.$x(h,b,r,e.j("fontSize")||u,t.g("fontFamily"),t.g("fontWeight"))).rH()/2,n.y(b),n.tag.node=e,n.tag.o3=!0,h+(r=n.vU())>=o&&n.visible(!1),t.Jt(e.j("connectorOutXPosition"),e.j("connectorOutYPosition"),e.j("connectorOutXPosition")+20,(a+s)/2,i)}else for(g&&(n-=l+h),f=0;f<r;f++)if(!(p=e.xd(f)).j("hidden")){h=p.j("leafCount"),o=e.j("leafCount");var v=0;d=(u=d)+(o=g?a-s:(a-s)*Math.max(1,h)/Math.max(1,o));var m=[h=n,b=u+o/2];p.j("height",o).j("nodePositionX",h).j("nodePositionY",b),t.ZL(p,g),b=e.j("textHeight")/2,m[1]-=b,1!=p.bc()&&(v+=l),h=t.HW(p),b=[m[0],m[1]+b],v+=m[0]+h,c(t,p,b,v,u,u+o),1<e.bc()&&!g&&t.Jt(e.j("connectorOutXPosition"),e.j("connectorOutYPosition"),p.j("connectorInXPosition"),p.j("connectorInYPosition"),i)}}}}},u=function(t,e){var n=new i(t,e);return n.Ga("wordtree"),n};t.H(e,t.V);var d={};t.sq(d,[[0,"curveFactor",t.er],[0,"offset",t.br],[0,"length",t.br],[1,"stroke",t.Pq]]),t.U(e,d),e.prototype.ra=8201;var p=[["curveFactor",0,8],["offset",0,8],["length",0,8],["stroke",0,8192]];e.prototype.F=function(){var i=e.u.F.call(this);return t.Tq(this,d,i),i},e.prototype.U=function(i,n){e.u.U.call(this,i,n),t.Iq(this,d,i,n)},t.H(i,t.ux),i.prototype.ra=t.ux.prototype.ra,i.prototype.sa=4112|t.ux.prototype.sa;var g,f=(g={},t.sq(g,[[0,"minFontSize",t.br],[0,"maxFontSize",t.br],[0,"fontFamily",t.zq],[0,"fontStyle",t.cl],[0,"fontWeight",t.wq],[0,"fontColor",t.Aq],[0,"fontOpacity",t.Bq],[0,"fontDecoration",t.bl],[0,"postfix",function(e){if(t.p(e))return null===e&&(e=this.vf("postfix")),String(e)}]]),g);t.U(i,f),t.g=i.prototype,t.g.Ma=function(){return"wordtree"},t.g.yj=function(){return!(this.la&&(!this.la||this.la.bc()))},t.g.Ue=function(){return[]},t.g.ts=function(){return[this]},t.g.sV=function(t,e){return function(i){return t*(1-i)+e*i}},t.g.Zj=function(e,i){return t.qu(this.data(),i)},t.g.nj=function(i){return this.Kj||(this.Kj=new e,t.W(this,"connectors",this.Kj),t.K(this.Kj,this.Lia,this)),i?(this.Kj.N(i),this):this.Kj},t.g.Ux=function(e){this.Si||(this.Si=new t.Fw);var i={};return e&&(i.value={value:e.get("value"),type:"string"},i.weight={value:e.j("weight"),type:"number"}),this.Si.lg(e),t.ov(this.Si,i)},t.g.jr=function(e){if(e){if("array"==t.ka(e)&&(e=e[0]),!t.J(e,t.du)&&!(e=this.data().Eo("value",e)[0]))return;this.dM=e,n(this,e),this.B(20,1)}},t.g.ay=function(){return s(this),this.dM&&this.dM.getParent()&&this.jr(this.dM.getParent()),this},t.g.Lia=function(e){var i=0;t.X(e,8192)&&(i|=16),t.X(e,8)&&(i|=4),this.B(i,1)},t.g.dd=function(e){t.X(e,16)&&this.B(4100,9)},t.g.Ds=function(e){e.button==t.Ri&&(e=e.domTarget.tag)&&e.node&&(s(this),this.jr(e.node))},t.g.If=function(e){var i=e.domTarget.tag;if(i&&i.node&&!i.o3){var n=i.node;i=this.Ua(),t.Ow(i,e.clientX,e.clientY,this.Ux(n))}else this.Ua().Lc()},t.g.hg=function(){this.Ua().Lc()},t.g.QY=function(e){if("implicit"==this.re){if(t.p(e)){if(this.ZO!=e||this.C1){this.C1=!1,(null===e||/^[\s\xa0]*$/.test(e))&&(e=this.nw[0][0]),this.ZO=e;for(var i=[],n=0;n<this.nw.length;n++){var s=(0,t.za)(this.nw[n],e);-1!=s&&i.push(t.Ja(this.nw[n],s))}for(i.length||(i[0]=[e]),e=i[0][0],this.data().ka(),this.data().bc()&&this.data().Cj(0),n={value:e},n=this.data().Eg(n,0),s=0;s<i.length;s++){var o=i[s];o[0]==e&&(o.shift(),a(this,n,o))}this.data().da(!0)}return this}return this.ZO}return this},t.g.data=function(e,i){if(t.p(e)){if(t.J(e,t.au)||t.J(e,t.Yt))this.la!=e&&(this.la&&t.kr(this.la,this.dd,this),this.la=e,t.K(this.la,this.dd,this),this.re="explicit",this.B(4100,1));else if("array"==t.ka(e)&&"object"==t.ka(e[0]))this.data(t.ou(e,i));else if(null===e)this.la&&(t.kr(this.la,this.dd),this.la.ld()),this.la=null,this.B(4100,1);else{if(this.re="implicit",this.Xf=e,"array"==t.ka(e)&&e.length){if(this.nw=[],"array"==t.ka(e[0]))for(var n=0;n<e.length;n++)this.nw.push(o(e[n][0]));else if("string"==t.ka(e[0]))for(n=0;n<e.length;n++)this.nw.push(o(e[n]))}else if("string"==t.ka(e)){n=function(e){return e=e.split(/\s*(.+?(?:[?!]+|$|\.(?=\s+[A-Z]|$)))\s*/),(0,t.Ye)(e,(function(t){return!!t.length}))}(e);for(var s=[],a=0;a<n.length;a++)s.push(o(n[a]));this.nw=s}else this.nw=[[e.toString()]];this.la||r(this,t.ou()),this.C1=!0,this.QY(this.nw[0][0])}return this}return this.la},t.g.Rh=function(){return 0<this.nt.length?this.nt.pop():new t.Qh},t.g.HW=function(t){if(t){var e=t.j("textWidth"),i=this.nj().g("offset"),n=t.getParent();return n&&1<n.bc()&&(e+=i),1<t.bc()&&(e+=i),e}return 0},t.g.depth=function(t){if(t){var e=t.bc(),i=0,n=t.getParent();for(n&&(i=n.j("depth")+1),t.j("depth",i),i=0;i<e;i++)this.depth(t.xd(i))}},t.g.$x=function(t,e,i,n,s,a){var o=this.Rh();return o.tag||(o.tag={}),o.text(i),o.y(e),o.x(t),o.fontSize(n),o.fontFamily(s),o.fontWeight(a),o.width(null),o.visible(!0),this.Ou.push(o),o},t.g.Jt=function(t,e,i,n,s){var a=this.OC,o=this.sV(t,i),r=o(s);s=o(1-s),a.moveTo(t,e).Sk(r,e,s,n,i,n)},t.g.ZL=function(t,e){var i=0,n=t.getParent();n&&1<n.bc()&&(i+=this.nj().g("offset"));var s=t.get("value");1==t.bc()&&(s+=" "),i=t.j("nodePositionX")+i,n=t.j("nodePositionY");var a=t.get("fontFamily")||this.g("fontFamily"),o=t.get("fontWeight")||this.g("fontWeight"),r=l(this,t,e);(a=this.$x(i,n,s,r,a,o)).tag={node:t,type:"node",o3:!1},o=a.rH(),s=a.vU(),t.j("textHeight",o).j("textWidth",s),n-=o/2,(o=i+s)>(r=this.kg.cb())&&a.width(s-(o-r)-.05*s),a.x(i).y(n)},t.g.Qh=function(e){if(!this.pf())if(this.Aa||(this.Aa=this.Na.Bd(),this.OC=new t.Ag,this.Aa.zIndex(30)),this.yj())this.Aa.Gi();else{var i=this.Ir=this.la.xd(0);if(this.J(4096)&&(h(this,this.Ir),this.depth(this.Ir),this.Jh.length=0,this.Jh=this.data().aw().uC(),this.I(4096)),this.J(4)){this.Aa.Gi();var n=e.left,s=e.top;e=e.height;for(var a=this.nj(),o=a.g("offset"),r=0;r<this.Ou.length;r++){var l=this.Ou[r];this.nt.push(l)}for(this.Ou.length=0,this.OC.clear(),this.Aa.suspend(),l=[n+o,s+e/2],i.j("nodePositionX",l[0]).j("nodePositionY",l[1]).j("height",e),this.ZL(i,!1),n=n+o+this.HW(i)+(1<i.bc()?a.g("length"):0),c(this,i,l,n,s,s+e),this.OC.parent(this.Aa),this.I(4),r=0;r<this.Ou.length;r++)this.Ou[r].parent(this.Aa);this.Aa.resume(),this.B(16)}if(this.J(16)){for(this.Aa.suspend(),this.OC.stroke(this.nj().g("stroke")),s=this.g("fontColor"),n=this.g("fontDecoration"),e=this.g("fontStyle"),a=this.g("fontOpacity"),o=0;o<this.Ou.length;o++){if((i=this.Ou[o]).tag&&i.tag.node){var u=i.tag.node,d=u.get("fontColor")||s,p=u.get("fontDecoration")||n,g=u.get("fontStyle")||e;u=u.get("fontOpacity")||a}i.color(d),i.er(p),i.fontStyle(g),i.opacity(u),i.Hm(!1)}this.Aa.resume(),this.I(16)}}},t.g.F=function(){var e=i.u.F.call(this);return t.Tq(this,f,e),"implicit"==this.re&&(e.wordTreeRawData=JSON.stringify(this.Xf),e.word=this.ZO),e.treeData=this.data().xB(["hidden"]),e.connectors=this.nj().F(),{chart:e}},t.g.U=function(e,n){i.u.U.call(this,e,n),t.Iq(this,f,e,n),"wordTreeRawData"in e?(this.data(JSON.parse(e.wordTreeRawData)),"word"in e&&this.QY(e.word),"treeData"in e&&r(this,t.cu(e.treeData))):"treeData"in e&&this.data(t.cu(e.treeData)),"connectors"in e&&this.nj().ga(!!n,e.connectors)},t.g.R=function(){i.u.R.call(this),t.sd(this.Kj,this.OC,this.Ou,this.nt,this.la,this.Aa),this.la=this.OC=this.Kj=null,this.Ou.length=0,this.nt.length=0,this.Aa=null};var b=i.prototype;b.connectors=b.nj,b.word=b.QY,b.getType=b.Ma,b.drillTo=b.jr,b.drillUp=b.ay,b.toCsv=b.Zj,b.noData=b.Gm,t.Tp.wordtree=u,t.E("anychart.wordtree",u)}.call(this,$)),_.radar_polar_base||(_.radar_polar_base=1,function(t){var e,i,n,s,a,o;t.c4=function(){t.Qy.call(this)},e=function(){this.ka(),t.Y.call(this),this.Ga(t.ur.axis),this.ci=[],this.Fk=[],this.Pc=t.qk(),t.ru(this,this.Pc),this.sf=916,this.da(!1),t.T(this.ua,[["drawFirstLabel",this.sf,9],["drawLastLabel",this.sf,9],["overlapMode",this.sf,9],["stroke",this.sf,9],["startAngle",this.sf,9,0,function(){this.pj()}],["innerRadius",this.sf,9]])},i=function(e,i,n){if(t.p(i)){if(i=t.jt(e.qa,i,null,15,null,e.ii,e)){var s=e.qa==i;e.qa=i,e.qa.sN=!!n,e.qa.da(s),s||(e.pj(),e.B(e.sf,9))}return e}return e.qa},n=function(e,i,n){var s=t.ab(e.g("startAngle")-90),a=t.bb(s),o=(n=n?e.Xa():e.yb()).g("length"),r=n.g("stroke"),l=n.g("position"),h=t.Ho(l),c=r.thickness?(0,window.parseFloat)(r.thickness):1,u=t.dp(e.g("stroke"));r=l=0,s?90==s?r=0==c%2?0:-.5:180==s?l=0==c%2?0:.5:270==s&&(r=0==c%2?0:.5):l=0==c%2?0:-.5,i||(l*=-1,r*=-1),c=e.b+(e.UA-e.b)*i,i=e.tc+c*Math.cos(a),e=e.vc+c*Math.sin(a),180==s?(i=Math.floor(i),e=Math.floor(e)):(i=Math.ceil(i),e=Math.ceil(e)),s=t.bb(t.ab(90-s-270)),a=0>h?Math.ceil(u/2):Math.floor(u/2),a=h?h*a:-o/2,h=h?h*o:o,l=i+(o=a*Math.sin(s))+l,r=e+(a*=Math.cos(s))+r,o=h*Math.sin(s),a=h*Math.cos(s),n.hq(l,r,l+o,r+a)},s=function(){e.call(this)},t.g4=function(e){t.Qz.call(this,e),this.Yg=[],this.Zg=[],this.jh=[],this.kh=[],t.T(this.ua,[["startAngle",4,1],["innerRadius",32772,1,0,function(){for(var t=0;t<this.hb.length;t++)this.hb[t].B(1024)}]])},t.h4=function(e,i){var n=e.bu(),s=t.p(i)?i:e.oa,a=t.p(i);e.im(s.xGrids,e.lm,n,a),e.im(s.yGrids,e.nm,n,a),e.im(s.xMinorGrids,e.Qr,n,a),e.im(s.yMinorGrids,e.Tr,n,a)},a=function(e,i,n,s){var a=e.F();return t.Zz(a,"scale",e.scale(),i,n),s.push(t.oa(e)),a},t.i4=function(){t.kz.call(this),this.HL="circuit",t.T(this.ua,[["startAngle",4,9],["innerRadius",4,9]])},t.j4=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a)},t.Ipa=function(t,e,i,n,s){switch(t){case"left-center":case"center":case"right-center":t=(e+n)/2,i=(i+s)/2;break;case"left-bottom":case"center-bottom":case"right-bottom":t=n,i=s;break;default:t=e}return{x:t,y:i}},o={mra:"radial",ona:"circuit"},t.H(t.c4,t.Qy),t.c4.prototype.hq=function(t,e,i,n){this.path.moveTo(t,e),this.path.lineTo(i,n)},t.H(e,t.Y);var r,l=(r={},t.sq(r,[t.Z.zz,t.Z.dC,t.Z.Yn,t.Z.tQ,t.Z.uQ,[0,"innerRadius",function(e){return t.yo(e,this.g("innerRadius"))}]]),r);t.U(e,l),t.g=e.prototype,t.g.sa=912|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Pc=null,t.g.Er="axis",t.g.Da=null,t.g.rc=null,t.g.mb=null,t.g.Rc=null,t.g.qa=null,t.g.UA=window.NaN,t.g.ci=null,t.g.Fk=null,t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.Aba,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.Aba=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.Xa=function(e){return this.mb||(this.mb=new t.c4,t.W(this,"ticks",this.mb),this.mb.kb(this),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=276,n=1),this.pj(),this.B(i,n)},t.g.yb=function(e){return this.Rc||(this.Rc=new t.c4,t.W(this,"minorTicks",this.Rc),this.Rc.kb(this),t.K(this.Rc,this.Wha,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.Wha=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=256,n=1),this.pj(),this.B(i,n)},t.g.scale=function(t){return i(this,t)},t.g.ii=function(e){t.X(e,2)&&(this.pj(),this.B(this.sf,9))},t.g.uo=function(){this.B(this.sf,9)},t.g.pj=function(){this.o&&(this.o.length=0),this.ci.length=0,this.Fk.length=0,this.ik=null},t.g.sy=function(){if(!this.ik||this.J(512)){if("allow-overlap"==this.g("overlapMode"))return!1;var e=this.scale(),i=[],n=[];if(e){var s,a,o,r=-1,l=-1,h=-1,c=e.Xa().get(),u=c.length,d=this.labels().enabled(),p=this.g("drawFirstLabel"),g=this.g("drawLastLabel");if(t.J(e,t.kt)){for(var f,b=e.yb().get(),v=s=0,m=b.length,y=this.qb().enabled();s<u||v<m;){var S=c[s],w=b[v],x=e.transform(S);if(f=e.transform(w),w=S=a=null,-1==l&&d)for(o=s;-1==l&&o<u;){var C=this.rd(o,!0);-1!=r&&(w=this.rd(r,!0)),o!=u-1&&g&&(S=this.rd(u-1,!0)),t.bn(C,w)||t.bn(C,S)||(0>=(C=e.transform(c[o]))&&p||1<=C&&g||0<C&&1>C)&&(l=o),o++}x<=f&&s<u||v==m?(d&&s==l&&this.labels().enabled()?(r=s,l=-1,i.push(!0)):i.push(!1),s++,x==f&&(this.labels().enabled()||this.Xa().enabled())&&(n.push(!1),v++)):(y?(C=this.rd(v,!1),-1!=r&&(w=this.rd(r,!0)),-1!=l&&(S=this.rd(l,!0)),-1!=h&&(a=this.rd(h,!1)),x=!(x=this.qb().be(v))||!t.p(x.enabled())||x.enabled(),t.bn(C,w)||t.bn(C,S)||t.bn(C,a)||!x?n.push(!1):0>=(C=e.transform(b[v]))&&p||1<=C&&g||0<C&&1>C?(h=v,n.push(!0)):n.push(!1)):n.push(!1),v++)}y||(n=!1)}else if(t.J(e,t.Qt))for(s=0;s<u;s++)d?(C=this.rd(s,!0),-1!=r&&(w=this.rd(r,!0)),S=s!=u-1&&g?this.rd(u-1,!0):null,s?s==u-1?g?(r=s,i.push(!0)):i.push(!1):t.bn(C,w)||t.bn(C,S)?i.push(!1):(r=s,i.push(!0)):p?(r=s,i.push(!0)):i.push(!1)):i.push(!1)}d||(i=!1),this.ik={labels:i,qb:n},this.I(512)}return this.ik},t.g.rd=function(e,i){var n=i?this.ci:this.Fk;if(t.p(n[e]))return n[e];var s=i?this.Xa():this.yb(),a=s.g("position");a=t.Ho(a);var o=t.dp(this.g("stroke")),r=0>a?Math.ceil(o/2):Math.floor(o/2);o=(a=i?this.labels():this.qb()).g("position"),o=t.Ho(o);var l=this.scale(),h=(i?l.Xa():l.yb()).get()[e];if(t.A(h)){var c=(l.transform(h[0],0)+l.transform(h[1],1))/2;h=h[0]}else c=l.transform(h,.5);h=this.Am(e,h),l={value:{x:0,y:0}};var u=a.measure(h,l,void 0,e),d=this.b+(this.UA-this.b)*c,p=t.ab(this.g("startAngle")-90),g=t.bb(p);c=this.tc+d*Math.cos(g),d=this.vc+d*Math.sin(g);var f=t.bb(t.ab(90-p-270));s=(g=t.Io(s,o))*Math.sin(f),g*=Math.cos(f);var b=o*r*Math.sin(f);r=o*r*Math.cos(f),p=t.ab(p+90),f=u.width,u=u.height;var v=this.scale(),m=0,y=0;return t.J(v,t.kt)?p?0<p&&90>p?(m-=f/2,y-=u/2):90==p?y-=u/2:90<p&&180>p?(y-=u/2,m+=f/2):180==p?m+=f/2:180<p&&270>p?(y+=u/2,m+=f/2):270==p?y+=u/2:270<p&&(y+=u/2,m-=f/2):m-=f/2:t.J(v,t.Qt)&&(p?0<p&&45>p?m-=f/2:45==p?(m-=f/2,y-=u/2):45<p&&90>p||90==p||90<p&&135>p?y-=u/2:135==p?(y-=u/2,m+=f/2):135<p&&180>p||180==p||180<p&&225>p?m+=f/2:225==p?(y+=u/2,m+=f/2):225<p&&270>p||270==p||270<p&&315>p?y+=u/2:315==p?(y+=u/2,m-=f/2):315<p&&(m-=f/2):m-=f/2),l.value.x=c+m*o+s+b,l.value.y=d+y*o+g+r,n[e]=a.yl(h,l,void 0,e)},t.g.Am=function(e,i){var n=this.scale(),s=!0;if(t.J(n,t.Qt)){var a=n.Xa().names()[e],o=i;s=!1}else t.J(n,t.nt)?(a=t.vs(i),o=i):(a=(0,window.parseFloat)(i),o=(0,window.parseFloat)(i));return a={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:a,type:"number"},tickValue:{value:o,type:"number"},scale:{value:n,type:""}},s&&(a.max={value:t.p(n.max)?n.max:null,type:"number"},a.min={value:t.p(n.min)?n.min:null,type:"number"}),(n=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(n)},t.g.Zx=function(){var e=t.ab(this.g("startAngle")-90),i=t.bb(e),n=0,s=0,a=t.dp(this.g("stroke"));e?90==e?n=0==a%2?0:-.5:180==e?s=0==a%2?0:.5:270==e&&(n=0==a%2?0:.5):s=0==a%2?0:-.5,e=Math.round(this.tc+this.UA*Math.cos(i)),a=Math.round(this.vc+this.UA*Math.sin(i)),this.Pc.moveTo(Math.round(this.tc+this.b*Math.cos(i))+n,Math.round(this.vc+this.b*Math.sin(i))+s).lineTo(e+n,a+s)},t.g.ke=function(e,i){var n=this.scale();if(i){var s=n.Xa();n=this.labels()}else s=n.yb(),n=this.qb();s=s.get(),s=this.Am(e,s[e]);var a=t.mn(this.rd(e,i));n.add(s,{value:{x:a.left+a.width/2,y:a.top+a.height/2}},e)},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.Xa().B(2),this.yb().B(2),this.labels().B(2),this.qb().B(2),this.B(450)),!1))},t.g.Iy=function(){return!1},t.g.W=function(){var e=this.scale();if(!e)return t.il(2),this;if(!this.zc())return this;if(this.J(4)){this.pj();var i=this.ja();this.UA=Math.min(i.width,i.height)/2,this.b=t.L(this.g("innerRadius"),this.UA),this.b==this.UA&&this.b--,this.tc=Math.round(i.left+i.width/2),this.vc=Math.round(i.top+i.height/2)}if(this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka(),this.J(16)){this.Pc.clear(),this.Pc.stroke(this.g("stroke"));var s=this.Zx;this.I(16)}if(this.J(8)&&(i=this.zIndex(),this.Pc.zIndex(i),this.Xa().zIndex(i),this.yb().zIndex(i),this.labels().zIndex(i),this.qb().zIndex(i),this.I(8)),this.J(2)&&(i=this.O(),this.Pc.parent(i),this.Xa().O(i),this.yb().O(i),this.labels().O(i),this.qb().O(i),this.I(2)),this.J(256)){var a=this.Xa();a.W(),a=a.hq;var o=this.yb();o.W(),o=o.hq,this.I(256)}if(this.J(128)){var r=this.labels();r.O()||r.O(this.O()),r.ja(this.ja()),r.clear(),r=this.ke;var l=this.qb();l.O()||l.O(this.O()),l.ja(this.ja()),l.clear(),l=this.ke,this.I(128)}if(s&&s.call(this),i=(s=e.Xa().get()).length,t.J(e,t.kt)){if(a||r||o||l){var h=this.sy(void 0);if(t.C(h))var c=h.labels,u=h.qb;else c=!h,u=!h;for(var d,p,g=e.yb().get(),f=h=0,b=g.length;h<i||f<b;){var v=s[h],m=g[f];(v=e.transform(v))<=(d=e.transform(m))&&h<i||f==b?(m=t.A(c)?c[h]:c,(t.A(c)&&c[h]||t.da(c))&&a&&n(this,v,!0),m&&r.call(this,h,!0),p=v,h++):(m=t.A(u)?u[f]:u,(t.A(u)&&u[f]||t.da(u))&&o&&p!=d&&n(this,d,!1),m&&l&&p!=d&&r.call(this,f,!1),f++)}l&&this.qb().W()}}else if(t.J(e,t.Qt)&&(a||r))for(p=this.sy(void 0),c=t.C(p)?p.labels:!h,h=0;h<i;h++)v=s[h],f=t.A(v)?v[0]:v,v=e.transform(f,0),a&&(n(this,v,!0),h==i-1&&(v=e.transform(f,1),n(this,v,!0)),m=t.A(c)?c[h]:c,r&&m&&r.call(this,h,!0));return r&&this.labels().W(),this.labels().da(!1),this.qb().da(!1),this.Xa().da(!1),this.yb().da(!1),this},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.Xa().remove(),this.yb().remove(),this.Da&&this.Da.remove(),this.rc&&this.rc.remove()},t.g.F=function(){var i=e.u.F.call(this);return t.Tq(this,l,i),i.labels=this.labels().F(),i.minorLabels=this.qb().F(),i.ticks=this.Xa().F(),i.minorTicks=this.yb().F(),i},t.g.U=function(i,n){e.u.U.call(this,i,n),t.Iq(this,l,i,n),this.labels().ga(!!n,i.labels),this.qb().ga(!!n,i.minorLabels),this.Xa(i.ticks),this.yb(i.minorTicks)},t.g.R=function(){t.sd(this.Pc,this.Da,this.rc,this.mb,this.Rc),delete this.qa,this.rc=this.Da=this.Rc=this.mb=this.Pc=this.Fk=this.ci=null,e.u.R.call(this)},t.H(s,e),t.xu(s,e);var h=e.prototype;h.labels=h.labels,h.minorLabels=h.qb,h.ticks=h.Xa,h.minorTicks=h.yb,h.scale=h.scale,h=s.prototype,t.E("anychart.standalones.axes.radial",(function(){var t=new s;return t.Ga("standalones.radialAxis"),t})),h.draw=h.W,h.parentBounds=h.ja,h.container=h.O,t.H(t.g4,t.Qz),t.g4.prototype.sa=10485760|t.Qz.prototype.sa,t.g4.prototype.co=function(){t.g4.u.co.call(this);var e=this.La("chartElements");e.axes={x:1,y:1},e.grids={x:0,y:0,xMinor:0,yMinor:0};for(var i=Math.max(this.Yg.length,this.Zg.length,this.jh.length,this.kh.length);i--;)this.Yg[i]&&e.grids.x++,this.Zg[i]&&e.grids.y++,this.jh[i]&&e.grids.xMinor++,this.kh[i]&&e.grids.yMinor++;this.La("chartElements",e)};var c=function(){var e={};return t.rq(e,0,"startAngle",(function(e){return t.ab(t.N(e)||0)})),t.rq(e,0,"innerRadius",(function(e){return t.yo(e,this.g("innerRadius"))})),e}();t.U(t.g4,c),t.g=t.g4.prototype,t.g.dg=function(){return this.fc},t.g.ip=function(e){return(e?this.fA():this.gA()).zIndex+.001*t.Ga(this.Yg,this.Zg,this.jh,this.kh).length},t.g.lm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Yg[n];return a||((a=this.IF()).Xj=this,t.mz(a,"radial"),a.zIndex(this.ip(!0)),this.Yg[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.nm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Zg[n];return a||((a=this.IF()).Xj=this,t.mz(a,"circuit"),a.zIndex(this.ip(!0)),this.Zg[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.Qr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jh[n];return a||((a=this.IF()).Xj=this,t.mz(a,"radial"),a.Ga("defaultMinorGridSettings"),a.zIndex(this.ip(!1)),this.jh[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.Tr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.kh[n];return a||((a=this.IF()).Xj=this,t.mz(a,"circuit"),a.Ga("defaultMinorGridSettings"),a.zIndex(this.ip(!1)),this.kh[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.wu=function(){this.B(8388608,1)},t.g.fA=function(e){return this.aq||(this.aq=t.zm("defaultGridSettings")),t.p(e)?(this.aq=e,this):this.aq||{}},t.g.gA=function(e){return this.bq||(this.bq=t.zm("defaultMinorGridSettings")),t.p(e)?(this.bq=e,this):this.bq||{}},t.g.$h=function(e){return this.mc||(this.mc=this.R0(),t.W(this,"xAxis",this.mc),this.mc.kb(this),t.K(this.mc,this.xo,this),this.B(2097156)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.ij=function(i){return this.hl||(this.hl=new e,t.W(this,"yAxis",this.hl),this.hl.kb(this),t.K(this.hl,this.xo,this),this.B(2097156)),t.p(i)?(this.hl.N(i),this):this.hl},t.g.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=2097152,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.ZG=function(t){switch(t){case 0:return this.mc;case 1:return this.hl}},t.g.uy=function(){return this.mc},t.g.wy=function(){return this.hl},t.g.Z5=function(t){var e=this.g("startAngle");t.nd("startAngle")!=e&&(t.ta("startAngle",e),t.B(1024))},t.g.aL=function(){this.eT()},t.g.Qh=function(e){if(this.pb(),!this.pf()){var n=this.$h(),s=this.ij();t.xr(n,s);var a=!1,o=this.g("startAngle");if(this.J(2097156)){a=this.Ra();var r=this.bb();n.scale()&&!n.scale().sN||n.FK(a,!0),n.p_(),s.scale()&&!s.scale().sN||i(s,r,!0),s.Da&&t.Yu(s.Da),s.rc&&t.Yu(s.rc),a=e.clone().round(),n.startAngle(o),n.ja(a),a=n.yd().round(),e=this.J(4),t.nb(a,this.fc)&&!e||(this.fc=a,this.B(10518528)),a=!0}var l=this.g("innerRadius");if(this.J(8388608)){var h=t.Ga(this.Yg,this.Zg,this.jh,this.kh);for(e=0,r=h.length;e<r;e++){var c=h[e];c&&(c.ka(),a&&c.B(64),c.ja(this.fc),c.innerRadius(l),c.O(this.Na),c.startAngle(o),c.W(),c.da(!1))}this.I(8388608)}this.J(2097152)&&(n.O(this.Na),n.W(),s.O(this.Na),s.startAngle(o),s.innerRadius(l),s.ja(this.fc.clone()),s.W(),this.I(2097152)),t.Pz(this,0,0,0,0),t.zr(n,s)}},t.g.oq=function(e){var i=e.clientX;e=e.clientY;var n,s=t.Zj(this.O().Ja());i-=s.x,e-=s.y;var a=Math.round(this.fc.left+this.fc.width/2),o=Math.round(this.fc.top+this.fc.height/2);if(t.gn(a,o,i,e)>Math.min(this.fc.width,this.fc.height)/2)return null;s=[];var r=this.gd();if("by-spot"==r.g("hoverMode")){var l=r.g("spotRadius");for(a=0,o=this.hb.length;a<o;a++)if((r=this.hb[a]).enabled()){var h=[],c=window.Infinity,u=r.Be();for(n=r.cg();n.advance();)for(var d=n.j("x"),p=0;p<u.length;p++){var g=n.j(u[p]),f=t.gn(d,g,i,e);if(f<=l&&(g=n.ma(),h.push(g),f<c)){c=f;var b=g}}h.length&&s.push({X:r,vd:h,Ln:h[h.length-1],De:{index:b,Tf:c}})}}else if("by-x"==this.gd().g("hoverMode"))for(a=Math.PI/2+Math.atan2(e-o,-(i-a))+t.bb(this.g("startAngle")),l=1-(a=t.$a(a,2*Math.PI))/(2*Math.PI),a=0,o=this.hb.length;a<o;a++)if(n=(r=this.hb[a]).Ra().Mc(l),g=this.So?0<=(n=t.Wz(r,n))?[n]:[]:t.Er(r.data(),t.N(n),t.J(r.Ra(),t.Qt)),n=r.cg(),c=window.Infinity,g.length){for(h=[],p=0;p<g.length;p++)n.select(g[p])&&(f=n.j("x"),u=n.j("value"),(f=t.gn(f,u,i,e))<c&&(c=f,b=g[p]),h.push(g[p]));s.push({X:r,vd:h,Ln:h[g.length-1],De:{index:b,Tf:c}})}return s},t.g.nH=function(){return 10485760|t.g4.u.nH.call(this)},t.g.F=function(){return{chart:t.g4.u.F.call(this)}},t.g.ht=function(e,i,n){t.g4.u.ht.call(this,e,i,n),t.Iq(this,c,e);var s=e.xAxis;this.$h().ga(!!n,s),t.C(s)&&"scale"in s&&1<s.scale&&this.$h().scale(i[s.scale]),s=e.yAxis,this.ij().ga(!!n,s),t.C(s)&&"scale"in s&&1<s.scale&&this.ij().scale(i[s.scale]),t.h4(this,e)},t.g.ft=function(e,i,n){t.g4.u.ft.call(this,e,i,n);var s=[];t.Tq(this,c,e),e.xAxis=a(this.$h(),i,n,s),e.yAxis=a(this.ij(),i,n,s),t.Yz(this,e,"xGrids",this.Yg,this.HK,i,n,s),t.Yz(this,e,"yGrids",this.Zg,this.HK,i,n,s),t.Yz(this,e,"xMinorGrids",this.jh,this.HK,i,n,s),t.Yz(this,e,"yMinorGrids",this.kh,this.HK,i,n,s)},t.g.HK=function(i,n,s,a){var o=i.F();return t.Zz(o,"scale",i.Ra(),n,s),t.Zz(o,"scale",i.bb(),n,s),(i=i.axis())&&(0>(a=(0,t.za)(a,t.oa(i)))?("layout"in o||(o.layout=t.J(i,e)?"circuit":"radial"),"scale"in o||t.Zz(o,"scale",i.scale(),n,s)):o.axis=a),o},t.g.R=function(){t.sd(this.mc,this.hl,this.Yg,this.Zg,this.jh,this.kh),this.kh=this.jh=this.Zg=this.Yg=this.hl=this.mc=null,t.g4.u.R.call(this)};var u=t.g4.prototype;u.xScale=u.Ra,u.yScale=u.bb,u.xGrid=u.lm,u.yGrid=u.nm,u.xMinorGrid=u.Qr,u.yMinorGrid=u.Tr,u.xAxis=u.$h,u.yAxis=u.ij,u.getSeries=u.ef,u.palette=u.cc,u.markerPalette=u.Nf,u.hatchFillPalette=u.ve,u.addSeries=u.kl,u.getSeriesAt=u.Ai,u.getSeriesCount=u.tj,u.removeSeries=u.Ao,u.removeSeriesAt=u.Rn,u.removeAllSeries=u.Dp,u.getPlotBounds=u.dg,u.getXScales=u.vy,u.getYScales=u.xy,t.H(t.i4,t.kz);var d=function(){var e={};return t.sq(e,[t.Z.zz,[0,"innerRadius",function(e){return t.yo(e,this.g("innerRadius"))}]]),e}();t.U(t.i4,d),t.g=t.i4.prototype,t.g.q4=function(e){return t.zk(o,e,"circuit")},t.g.c2=function(i){return t.J(i,e)?"circuit":"radial"},t.g.bb=function(e){if(t.p(e)){if(e=t.jt(this.Fc,e,null,15,null,this.Pla,this)){var i=this.Fc==e;this.Fc=e,this.Fc.da(i),i||this.B(68,9)}return this}return this.Fc?this.Fc:this.Xj?this.Xj.bb():null},t.g.Pla=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(20,8|i)},t.g.Ra=function(e){if(t.p(e)){if(e=t.jt(this.eb,e,null,t.bt,null,this.Lla,this)){var i=this.eb==e;this.eb=e,this.eb.da(i),i||this.B(68,9)}return this}return this.eb?this.eb:this.Xj?this.Xj.Ra():null},t.g.Lla=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(84,8|i)},t.g.vN=function(){return"radial"==this.we()},t.g.u0=function(){var e=this.Ra(),i=this.bb();return!(!e||!this.vN()&&!i)||(t.il(2),!1)};var p=t.i4.prototype;p.isRadial=p.vN,p.yScale=p.bb,p.xScale=p.Ra,p.axis=p.axis,t.H(t.j4,t.xB),t.g=t.j4.prototype,t.g.L2=function(){return this.eh()&&!!this.f||this.gh()},t.g.T1=function(e){var i=this.g("startAngle");return i=i-90+360*this.$().j("xRatio"),e||(i+=180),this.bb().Ne()&&(i+=180),t.ab(i)},t.g.t0=function(e,i){var n=e.measure(i),s=i.qk();s=t.Jo(s,180);var a=t.Eo(n,s);n=a.x,a=a.y,(n-this.Dc)*(n-this.Dc)+(a-this.uc)*(a-this.uc)>this.Eb*this.Eb&&i.qk(s)},t.g.oG=function(e){var i=this.$(),n=i.j(this.Ah.Ab),s=i.j(this.Ah.Ab+"X"),a=i.j(this.Ah.zb);return i=i.j(this.Ah.zb+"X"),t.Ipa(e,s,n,i,a)},t.g.N0=function(e){var i=this.$(),n=i.j(e),s=i.j(e+"X");if(!t.p(n)||!t.p(s))if(s=i.j("x"),n=i.get(e),t.p(n)){this.gh()&&(n+=i.j("stackedZero"));var a=this.q_(s,n)}else s=n=window.NaN;return a||(a={x:s,y:n}),a},t.g.nE=function(){var e=this.fa,i=this.ya;this.Eb=Math.min(e.width,e.height)/2,this.f=t.L(i.g("innerRadius"),this.Eb),this.Dc=Math.round(e.left+e.width/2),this.uc=Math.round(e.top+e.height/2),t.j4.u.nE.call(this)},t.g.bJ=function(e,i){if(t.j4.u.bJ.call(this,e,i),this.Vj.push(this.Lha),t.PA(this)&&!this.f){var n=this.Zs(0,[0]);this.b=n[0],this.Mi=n[1]}},t.g.uI=function(e,i){t.j4.u.uI.call(this,e,i,window.NaN)},t.g.YD=function(t,e,i,n,s){return this.f?(e=this.Zs(s,[this.YY]),t.j("zeroX",e[0]),t.j("zero",e[1])):(t.j("zeroX",this.b),t.j("zero",this.Mi)),t.j("zeroMissing",!1),n},t.g.Lha=function(e,i,n,s,a){return e.j("xRatio",t.$a(a,1)),s},t.g.YA=function(e,i,n){for(var s in t.j4.u.YA.call(this,e,i,n),i)e.j(s+"Ratio",i[s])},t.g.Zs=function(e,i){for(var n=[],s=this.g("startAngle"),a=0;a<i.length;a++){var o=i[a],r=t.$a(s-90+360*e,360),l=t.Tm(t.bb(r),4),h=0;90==(r=Math.round(r))?h=-.5:270==r&&(h=.5),o=this.f+(this.Eb-this.f)*o,n.push(this.Dc+o*Math.cos(l)+h,this.uc+o*Math.sin(l))}return n},t.g.yU=function(){return 0},t.g.f6=function(){return!0},t.g.ig=function(e){var i=t.Y.prototype.ig.call(this,e);if(this.eh())i.pointIndex=t.N(t.so(i.domTarget).index);else if(this.f6()){var n=e.clientX;e=e.clientY;var s=t.Zj(this.O().Ja());n=Math.PI/2+Math.atan2(e-s.y-Math.round(this.fa.top+this.fa.height/2),-(n-s.x-Math.round(this.fa.left+this.fa.width/2)))+t.bb(this.g("startAngle")),n=1-(n=t.$a(n,2*Math.PI))/(2*Math.PI),n=this.Ra().Mc(n),0>(n=t.Wz(this,n))&&(n=window.NaN),i.pointIndex=n}return i},t.g.q_=function(t,e,i){var n=this.Ra(),s=this.bb();return{x:(t=this.Zs(n.transform(t,i||0),[s.transform(e,.5)]))[0],y:t[1]}};var g=t.j4.prototype;g.transformXY=g.q_}.call(this,$)),_.theme_sankey||(_.theme_sankey=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{sankey:{nodePadding:8,nodeWidth:24,curveFactor:.33,tooltip:{titleFormat:"{%name}",format:"{%Value}"},node:{normal:{fill:t.zN,stroke:"none",labels:{enabled:!0,format:"{%name}",fontColor:"black",fontSize:10,disablePointerEvents:!0}},hovered:{fill:t.zN},tooltip:{titleFormat:"{%name} ({%value})",format:function(){var t,e=[],i=this.income,n=this.outcome,s=this.dropoff;if(i.length)for(e.push("Income:"),t=0;t<i.length;t++){var a=i[t];e.push("- "+a.name+": "+a.value)}if(n.length)for(e.push("Outcome:"),t=0;t<n.length;t++)a=n[t],e.push("- "+a.name+": "+a.value);return s&&e.push("Dropoff: "+s),e.join("\n")}}},flow:{normal:{fill:"grey 0.3",stroke:"none",labels:{enabled:!1,disablePointerEvents:!0,fontColor:"#000",padding:0}},hovered:{fill:t.EN,labels:{enabled:!0}}},dropoff:{normal:{fill:{angle:-90,keys:[{color:"red",offset:0},{color:"white",offset:1}]},stroke:"none",labels:{enabled:!1,disablePointerEvents:!0,fontColor:"#000",padding:0}},hovered:{labels:{enabled:!0}}}}})}.call(this,$)),_.theme_mekko||(_.theme_mekko=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{mekko:{defaultSeriesType:"mekko",isVertical:!1,normal:{labels:{enabled:!0}},defaultSeriesSettings:{base:{normal:{fill:t.DN,stroke:t.IN,labels:{format:"{%Value}{decimalsCount:2}",position:"center",offsetY:0,fontColor:"#ffffff"},markers:{position:"center",anchor:"center"}},hovered:{fill:t.BN,stroke:function(){return t.Wl(t.Pl(this.sourceColor),1)}},legendItem:{iconStroke:"none"},isVertical:!1,tooltip:{anchor:"left-top"}},mekko:{}},defaultXAxisSettings:{orientation:"bottom",title:{text:"X-Axis",padding:{top:5,right:0,bottom:0,left:0}},labels:{format:"{%Value}"},scale:0},defaultYAxisSettings:{orientation:"left",title:{text:"Y-Axis",padding:{top:0,right:0,bottom:5,left:0}},labels:{format:"{%Value}%"},scale:1},xAxes:[{}],yAxes:[{}],scales:[{type:"ordinal"},{type:"linear",stackMode:"percent",stackDirection:"direct",minimumGap:0,maximumGap:0},{type:"ordinal"},{type:"ordinal"}],crosshair:{enabled:!1,displayMode:"float",xStroke:"#969EA5",yStroke:"#969EA5",zIndex:41,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},xScale:0,yScale:1,firstCategoriesScale:2,lastCategoriesScale:3,defaultAnnotationSettings:{},annotations:{annotationsList:[],zIndex:2e3},pointsPadding:0,barsPadding:0,barGroupsPadding:0},mosaic:{pointsPadding:5,defaultXAxisSettings:{stroke:0,ticks:{enabled:!1}},defaultYAxisSettings:{stroke:0,ticks:{enabled:!1},labels:{format:"{%Value}"}}},barmekko:{scales:[{type:"ordinal"},{type:"linear",stackMode:"value",softMinimum:0},{type:"ordinal"},{type:"ordinal"}],defaultSeriesSettings:{mekko:{normal:{fill:function(){var e=1<this.chart.getSeriesCount()?this.sourceColor:this.chart.palette().itemAt(this.iterator.ma());return e=e||this.sourceColor,t.Ul(e,.85,!0)},stroke:function(){var e=1<this.chart.getSeriesCount()?this.sourceColor:this.chart.palette().itemAt(this.iterator.ma());return e=e||this.sourceColor,t.Wl(e,1)},labels:{format:"{%Value}{decimalsCount:2}",anchor:"auto",position:"value",fontColor:"#7c868e"},markers:{position:"value",positionFormatter:t.wN}},hovered:{fill:function(){var e=1<this.chart.getSeriesCount()?this.sourceColor:this.chart.palette().itemAt(this.iterator.ma());return e=e||this.sourceColor,t.Ul(e,.65,!0)}}}},defaultYAxisSettings:{labels:{format:"{%Value}"}},normal:{labels:{enabled:!1}}}})}.call(this,$)),_.timeline||(_.timeline=1,function(t){var e=function(){t.Y.call(this),this.path=t.qk(),t.T(this.ua,[["stroke",0,1]])},i=function(){t.Y.call(this),this.G=0,this.ye=[],this.o=0,this.i=new t.Fw,t.T(this.ua,[["stroke",16,1],["fill",16,1],["height",276,5]])},n=function(){this.jd=[]},s=function(){t.V.call(this),t.T(this.ua,[["length",0,1],["stroke",0,1]])},a=function(e){t.JA.call(this,e)},o=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),this.f="up",t.T(this.ua,[["direction",2048,1,4294967295]])},r=function(e,i){return t.p(i)?(e.f=i,e):e.f},l=function(t){var e=t.g("direction");return"auto"==e||"odd-even"==e?t.f:e},h=function(t,e,i,n,s){o.call(this,t,e,i,n,s)},c=function(e){t.JA.call(this,e)},u=function(e,i,n,s,a){o.call(this,e,i,n,s,a),t.T(this.ua,[["height",0,0]])},d=function(){t.Mz.call(this),this.Ga("timeline"),this.eb=new t.st,t.W(this,"scale",this.eb),this.eb.vz([[{unit:"minute",count:10},{unit:"hour",count:1},{unit:"day",count:1}],[{unit:"hour",count:4},{unit:"hour",count:12},{unit:"day",count:1}],[{unit:"day",count:1},{unit:"day",count:2},{unit:"week",count:1}],[{unit:"day",count:2},{unit:"week",count:1},{unit:"month",count:1}],[{unit:"month",count:1},{unit:"quarter",count:1},{unit:"year",count:1}],[{unit:"quarter",count:1},{unit:"year",count:1},{unit:"year",count:10}],[{unit:"year",count:1},{unit:"year",count:10},{unit:"year",count:50}],[{unit:"year",count:10},{unit:"year",count:50},{unit:"year",count:200}]]),this.axis().scale(this.eb),t.K(this.eb,this.ii,this),this.og=[],this.tg=[],this.rg=[],this.wj=this.D=0,this.P={CC:0,GE:0},this.Za=this.$a=0,this.ea=[],this.fb=[]},p=function(t){t.scale().reset(),t.Ha=window.Infinity,t.Ka=-window.Infinity,t.f={dj:0,Mj:t.fc.width,sg:-t.fc.height/2,mg:t.fc.height/2},t.axis().B(400),b(t,0,0)},g=function(e){for(var i=e.length-1;0<=i;i--){var n=e[i];t.p(n)&&n.md&&t.Ca(e,i,1)}},f=function(t){return t.axis().enabled()?t.axis().g("height"):0},b=function(e,i,n){!t.p(i)||i==e.$a&&n==e.Za||(e.$a=i,e.Za=n,t.nr(e,"timelinechart","scroll",1))},v=function(t,e){var i=t.dj-e.dj;return 0==i?e.Mj-t.Mj:i},m=function(t,e){var i=t.dj-e.dj;return 0==i?t.Mj-e.Mj:i},y=function(t,e){t.f.dj=Math.min(t.f.dj,e.dj),t.f.Mj=Math.max(t.f.Mj,e.Mj),t.f.sg=Math.min(t.f.sg,e.sg),t.f.mg=Math.max(t.f.mg,e.mg)},S=function(t){var e=new d;e.Ga("timeline"),e.ta("defaultSeriesType","moment");for(var i=0,n=arguments.length;i<n;i++)e.moment(arguments[i]);return e};t.H(e,t.Y);var w={};t.sq(w,[t.Z.Yn]),t.U(e,w),e.prototype.W=function(){return this.path.clear(),this.path.stroke(this.g("stroke")),this.zc()?(this.J(8)&&(this.path.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.path.parent(this.O()),this.I(2)),this):this},e.prototype.hq=function(e,i){if(0!=i.height){var n=t.dp(this.g("stroke"));n=t.R(i.left+e*i.width,n);var s=Math.floor(t.R(i.top,1));this.path.moveTo(n,Math.ceil(t.R(i.Va(),1))).lineTo(n,s)}},e.prototype.remove=function(){this.path&&this.path.parent(null)},e.prototype.R=function(){t.sd(this.path),this.path=null,e.u.R.call(this)},t.H(i,t.Y);var x={};t.sq(x,[t.Z.Yn,t.Z.yz,[0,"height",t.Bq]]),t.U(i,x),t.g=i.prototype,t.g.sa=464|t.Y.prototype.sa,t.g.ra=4|t.Y.prototype.ra,t.g.offset=function(e){return t.p(e)?(this.o!=e&&(this.o=e,this.B(400)),this):this.o},t.g.scale=function(e){return t.p(e)?(e!=this.qa&&(this.qa&&t.kr(this.qa,this.ii,this),this.qa=e,t.K(this.qa,this.ii,this)),this):this.qa},t.g.ii=function(){this.B(400,0)},t.g.Xa=function(i){return this.mb||(this.mb=new e,t.W(this,"ticks",this.mb),t.K(this.mb,this.li,this)),t.p(i)?(this.mb.N(i),this):this.mb},t.g.li=function(){this.B(256,1)},t.g.labels=function(e){return this.zj||(this.zj=new t.Hx,t.K(this.zj,this.lI,this),t.W(this,"labels",this.zj)),t.p(e)?(this.zj.N(e),this):this.zj},t.g.lI=function(){this.B(128,1)},t.g.W=function(){var e=this.scale();if(this.Uw(),!e)return t.il(2),this;if(!this.zc())return this;if(this.Na||(this.Na=this.O().Bd(),this.f||(this.f=this.Na.path(),this.D=this.Na.path(),this.D.zIndex(37)),this.Na.hc(this.gU())),this.b||(this.b=new t.bz,this.b.labels(this.labels()),t.dz(this.b),t.wl(this.b),this.b.va(t.KE|t.LE)),this.J(2)&&(this.Na.parent(this.O()),this.I(2)),this.J(8)&&(this.Na.zIndex(this.zIndex()),this.I(8)),this.J(4)){var i=this.ja();this.G=i.top+i.height/2;var n=(i=this.ja()).left,s=this.g("height");this.K=new t.I(n,this.G-s/2,i.width,s),this.B(400),this.I(4)}if(this.J(16)){var a=this.ja(),o=this.G,r=(i=this.g("height"))/2;this.f.clear(),this.D.clear(),n=this.g("stroke"),s=this.g("fill");var l=t.dp(n),h=this.scale().uj(),c=this.scale().transform(h.min);h=this.scale().transform(h.max+this.o),c*=a.width,h*=a.width,c+=a.left,a=h+a.left,c=t.R(c,l),a=t.R(a,l),h=t.R(o-r,l),o=t.R(o+r,l),this.Na.clip(new t.I(Math.floor(c),Math.floor(h),Math.ceil(a)-Math.floor(c),Math.ceil(o)-Math.floor(h))),0!=i&&(this.f.moveTo(c,h).lineTo(a,h).lineTo(a,o).lineTo(c,o).close(),this.D.moveTo(c,h).lineTo(a,h).lineTo(a,o).lineTo(c,o).close(),this.D.stroke(n),this.f.fill(s),this.f.stroke("none")),this.I(16)}if(this.J(256)){if(i=t.wr(this,"ticks"))for(i.O(this.Na),i.W(),n=this.Fn(),s=this.scale().uj(),e.Uj()&&(n.length=1),e=0;e<n.length;e++)o=n[e],r=this.scale().transform(o.start),o.start>=s.min&&i.hq(r,this.K);this.I(256)}return this.J(64)&&this.I(64),this.J(128)&&(this.labels().enabled()?(this.Lf.parent(this.Na),this.wi()):this.Lf.parent(null),this.I(128)),this},t.g.Fn=function(){var e,i=this.scale(),n=t.Ht(i),s=i.sj();for(e=0;e<n.length;e++){var a=i.Fn(void 0,void 0,n[e].unit,n[e].count,s);if(10>=a.length){4>a.length&&0<e&&(i.Fn(void 0,void 0,n[e-1].unit,n[e-1].count,s),e--);break}}return e==n.length&&e--,a=n[e].unit,e=n[e].count,this.P={unit:a,count:e},s.min+=this.o,s.max+=this.o,i.Fn(void 0,void 0,a,e,s)},t.g.gU=function(){return this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.Lf},t.g.wi=function(){var e=this.Fn(),i=this.scale(),n=this.ja(),s=this.g("height"),a=i.uj(),o=this.labels(),r=this.P.unit,l=i.Uj();l&&(e.length=1),t.vl.measure(),t.ez(this.b);for(var h=0;h<e.length;h++){var c=this.ye[h];c.text(x),c.style(o.flatten()),c.Ij(),h<e.length-1&&t.Rx(this.ye[h+1]);var u=e[h];if(u.start<a.min)t.Px(c,null);else{switch(r){case"minute":var d="hour";break;case"hour":d="day";break;case"day":d="month";break;default:d="year"}l&&(r="day",d="year"),x=t.ts(t.rs(r,d,"timeline")),d=n.left+n.width*i.transform(u.start);for(var p,g=l?n.left+n.width:n.left+n.width*i.transform(u.end),f=this.labels().padding().Ng(g-d),b=!1,v=window.Infinity,m="yyyy/MM/dd'T'HH:mm:ss.SSS",y=0;y<x.length;y++){var S=x[y],w=this.b.pA;if(S in w){if((w=Math.ceil(w[S].width))<=f){p=S,b=!0;break}w<=v&&(v=w,m=S)}}b||(p=m),f={autoFormat:{value:p,type:"string"},value:{value:t.us(u.start,p),type:"string"},tickValue:{value:u.start,type:"number"}},f=t.ov(this.i,f);var x=this.labels().tk(f);c.text(x),c.style(o.flatten()),t.Mx(c),c.Ij(),f=i.transform(u.start),i.transform(Math.min(u.end,a.max+this.o)),0!=s?t.Px(c,this.xl):t.Px(c,null),u=this.labels().padding(),b=t.R(n.left+n.width*f,1),v=Math.floor(this.G-s/2),m=s,f=g-d,d=u.Ej(new t.I(b,v,f,m)),t.Wx(c,d,this.Na.Ja()),t.Qx(c)}}for(h=e.length;h<this.ye.length;h++)t.Px(this.ye[h],null)},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.B(450)),!1))},t.g.remove=function(){this.Na&&this.Na.parent(null)},t.g.Uw=function(){var e=this.Fn();if(!this.ye.length)for(var i=0;i<e.length;i++){var n=new t.Ix;this.ye.push(n)}if(this.ye.length<e.length)for(i=this.ye.length;i<e.length;i++)this.ye.push(new t.Ix);return this.ye},t.g.R=function(){t.sd(this.mb,this.f,this.D,this.zj,this.ye),this.zj=this.D=this.f=this.mb=null,this.ye.length=0,i.u.R.call(this)};var C=i.prototype;C.ticks=C.Xa,C.labels=C.labels,n.prototype.b=function(t,e){var i=t.dj-e.dj;return 0==i?0==(i=t.Mj-e.Mj)?-1:i:t.dj-e.dj},n.prototype.f=function(t,e){return 0==t.sg-e.sg?t.mg-e.mg:t.sg-e.sg},n.prototype.add=function(e,i){var n=e.mg-e.sg;e.sg=0,e.mg=n,t.Ua(this.jd,e,this.b);var s,a=[],o=!0;for(s=0;s<this.jd.length;s++){var r=this.jd[s];r!=e?(r.Mj>e.dj&&o||r.dj<e.Mj&&!o)&&t.Ua(a,r,this.f):o=!1}for(s=0;s<a.length;s++)r=a[s],(e.sg<=r.mg&&e.sg>=r.sg||e.mg<=r.mg&&e.mg>=r.sg||r.sg<=e.mg&&r.sg>=e.sg||r.mg<=e.mg&&r.mg>=e.sg)&&(i?e.mg=r.mg+n:(e.sg=r.mg,e.mg=e.sg+n))},t.H(s,t.V),s.prototype.ra=1|t.V.prototype.ra;var D={};t.sq(D,[t.Z.Yn,t.Z.iK]),t.U(s,D),t.H(a,t.JA),t.PG[34]=a,a.prototype.type=34,a.prototype.flags=521,a.prototype.ug=function(e,i){var n=this.bd,s=e.get(this.X.Be()[0]),a={};a[(s=this.nh(s,this.prevValue)).stroke]=!0,e.j("names",s),n=n.ed(i,a)[s.stroke],s=e.j("x"),a=e.j("zero");var o=e.j("minLength"),r=t.dp(n.stroke()),l=e.j("axisHeight"),h="up"==(e.get("direction")||e.j("direction"));a+=h?-l/2:l/2,s=t.R(s,r),t.HA(n,this.xa,s,a),t.IA(n,this.xa,s,h?a-o:a+o)},t.H(o,t.xB),o.prototype.sa=t.xB.prototype.sa;var T={};t.sq(T,[t.Z.dZ]),t.U(o,T),t.g=o.prototype,t.g.my=function(){return 0},t.g.aO=function(){return!1},t.g.RD=function(e){e=t.Xk(e.Gh());var i=this.ya.Ra().sj();return e>=i.min||e<=i.max},t.g.gh=function(){return!1},t.g.jX=t.ia,t.g.bU=function(e,i,n){var s=this.data();return s.$(),this.jX(e,i,n),this.B(512),this.pd={data:e,X:this,cO:0,N2:this.check(t.QG)&&(s.hd("normal")||s.hd("hovered")||s.hd("selected")||s.hd("label")||s.hd("hoverLabel")||s.hd("selectLabel")||s.hd("minLabel")||s.hd("hoverMinLabel")||s.hd("selectMinLabel")||s.hd("maxLabel")||s.hd("hoverMaxLabel")||s.hd("selectMaxLabel")),O2:this.check(4194304)&&(s.hd("normal")||s.hd("hovered")||s.hd("selected")||s.hd("marker")||s.hd("hoverMarker")||s.hd("selectMarker")),P2:this.check(256)&&(s.hd("outliers")||s.hd("normal")||s.hd("hovered")||s.hd("selected")||s.hd("outlierMarker")||s.hd("hoverOutlierMarker")||s.hd("selectOutlierMarker")),XU:!1,Q2:!1,M2:!1}},t.g.vI=function(t){var e=this.g("direction");"auto"!=e&&"odd-even"!=e||(e=r(this)),t.j("direction",e),e=this.ja(),t.j("zero",e.top+e.height/2)},t.g.bJ=function(){this.Vj.push(this.vI)},t.g.F=function(){var e=o.u.F.call(this);return t.Tq(this,T,e),e},t.g.U=function(e,i){o.u.U.call(this,e,i),t.Iq(this,T,e,i)},t.H(h,o),t.g=h.prototype,t.g.vI=function(e,i,n,s,a){h.u.vI.call(this,e,i,n,s,a),i=this.ja(),n=this.Zf().g("length"),e.j("length",t.L(n,i.height)),e.j("x",i.left+i.width*a)},t.g.XA=function(t,e,i){var n=this.tl().transform(t.Gh());t.j("xRatio",n);for(var s=0;s<this.Vj.length;s++)this.Vj[s].call(this,t,e,i,0,n)},t.g.Zf=function(e){return this.b||(this.b=new s,this.b.kb(this),t.K(this.b,this.PC,this),t.W(this,"connector",this.b)),t.p(e)?(this.b.N(e),this):this.b},t.g.PC=function(){this.B(2048,1)},t.g.jX=function(t,e,i){for(var n=this.data().$();n.advance();){var s=i(n.get("x")),a={},o={};a.x=s,o.rawIndex=n.ma(),e(t,{data:a,j:o})}},t.g.Jp=function(){var t=this.$(),e=t.j("minLength"),i=this.ja();i=i.top+i.height/2;var n="up"==(t.get("direction")||l(this));return t=t.j("axisHeight")/2,n?i-e-t:i+e+t},t.g.AE=function(){return"up"==(this.$().get("direction")||l(this))?"center-bottom":"center-top"},t.g.ym=function(e,i){var n=h.u.ym.call(this,e,i);return n.date={value:t.ps(i.get("x")),type:"date-time"},n},t.g.R=function(){this.b&&(t.kr(this.b,this.PC,this),t.sd(this.b),this.b=null),h.u.R.call(this)},t.H(c,t.JA),t.PG[35]=c,c.prototype.type=35,c.prototype.flags=1537,c.prototype.ug=function(e,i){var n=this.bd,s=e.get(this.X.Be()[0]),a={};a[(s=this.nh(s,this.prevValue)).path]=!0,e.j("names",s),n=n.ed(i,a)[s.path],s=e.j("startX"),a=e.j("endX");var o=e.j("zero"),r=e.j("axisHeight");e.j("stackLevel");var l=e.get("direction")||e.j("direction"),h=e.j("startY"),c=e.j("endY");r="up"==l?(o-=r/2)-h-c:(o+=r/2)+h+c,l=t.dp(n.stroke()),s=t.R(s,l),a=t.R(a,l),n.moveTo(s,o).lineTo(s,r).lineTo(a,r).lineTo(a,o).close()},t.H(u,o);var k={};t.sq(k,[t.Z.hK]),t.U(u,k),t.g=u.prototype,t.g.XA=function(t,e,i){var n=this.tl(),s=n.transform(t.get("start"));for(n=n.transform(t.get("end")),t.j("startXRatio",s),t.j("endXRatio",n),s=0;s<this.Vj.length;s++)this.Vj[s].call(this,t,e,i,0)},t.g.vI=function(e,i,n,s,a){u.u.vI.call(this,e,i,n,s,a),i=this.ja(),n=e.j("startXRatio"),n=i.left+i.width*n,s=e.j("endXRatio"),t.ea(s)&&!(0,window.isNaN)(s)||(a=(s=this.tl()).uj().max,s=s.transform(a)),s=i.left+i.width*s,e.j("startX",n),e.j("endX",s),i=t.L(this.g("height"),i.height),e.j("height",i)},t.g.jX=function(t,e,i){for(var n=this.data().$();n.advance();){var s=i(n.get("start")),a=i(n.get("end")),o={},r={};o.start=s,o.end=a,r.rawIndex=n.ma(),e(t,{data:o,j:r})}},t.g.Bh=function(){var t=this.$(),e=t.j("height"),i=t.j("zero"),n=t.j("axisHeight"),s=t.j("startX");return n/=2,e=t.j("endY")-e/2,i=i+((t="up"==(t.get("direction")||l(this)))?-n:n)+(t?-e:e),(t=this.ya.fc.clone().left+this.ya.wj)>s&&(s=t),{value:{x:s||0,y:i||0}}},t.g.ym=function(e,i){var n=u.u.ym.call(this,e,i);return n.start={value:t.ps(i.get("start")),type:"date-time"},n.end={value:t.ps(i.get("end")),type:"date-time"},n},t.g.O_=function(t,e){var i=this.cg();i.select(e);var n=i.j("startX"),s=this.ya.fc.clone().left+this.ya.wj;s>n&&(n=s),s=i.j("endX"),i=i.j("height"),t.width(s-n),t.height(i)},t.H(d,t.Mz);var $={},O=1572864|t.QG;$.moment={Fb:34,Kb:2,Lb:[t.oH],Ob:null,Jb:null,Cb:4194304|O,zb:"zero"},$.range={Fb:35,Kb:2,Lb:[t.RH],Ob:null,Jb:null,Cb:O,zb:"zero"},d.prototype.fj=$,t.Nz(d,d.prototype.fj),d.prototype.sa=543227904|t.Mz.prototype.sa,d.prototype.ra=t.Bx.prototype.ra,t.Jz(d,"timelinechart",["scroll"]),t.g=d.prototype,t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.rg[n];if(!a){a=new t.cA,t.p(!0)&&(a.i=!0);var o=t.tr(t.sr(this),"defaultRangeMarkerSettings");a.Ga(o),a.pa=this,t.dA(a,"vertical"),this.rg[n]=a,a.kb(this),t.K(a,this.NK,this),t.pd(a,this.QN,this),this.B(4194304,1)}return t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.tg[n];if(!a){var o=a=new t.fA;t.p(!0)&&(o.G=!0),o=t.tr(t.sr(this),"defaultTextMarkerSettings"),a.Ga(o),a.pa=this,t.$y(a,"vertical"),this.tg[n]=a,a.kb(this),t.K(a,this.NK,this),t.pd(a,this.QN,this),this.B(4194304,1)}return t.p(s)?(a.N(s),this):a},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.og[n];if(!a){a=new t.$z,t.p(!0)&&(a.i=!0);var o=t.tr(t.sr(this),"defaultLineMarkerSettings");a.Ga(o),a.pa=this,t.aA(a,"vertical"),this.og[n]=a,a.kb(this),t.K(a,this.NK,this),t.pd(a,this.QN,this),this.B(4194304,1)}return t.p(s)?(a.N(s),this):a},t.g.NK=function(e){var i=4194304;t.X(e,4)&&(i|=65536),this.B(i,1)},t.g.QN=function(){this.B(65536,1)},t.g.K6=function(e){if(!this.o){this.o=new t.$z,t.p(!0)&&(this.o.i=!0);var i=t.tr(t.sr(this),"defaultLineMarkerSettings");this.o.Ga(i),t.W(this,"todayMarker",this.o),this.o.pa=this,t.aA(this.o,"vertical"),this.o.kb(this),t.K(this.o,this.NK,this),t.pd(this.o,this.QN,this),i=new Date,this.o.value(Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDay())),this.B(4259840,1)}return t.p(e)?(this.o.N(e),this):this.o},t.g.Qh=function(e){if(!this.pf()){this.G||(this.G=this.Na.Bd(),this.G.zIndex(1),this.wc.Ce(this,"chartdraw",this.Wga)),this.K||(this.K=this.Na.Bd(),this.K.zIndex(.5)),this.ba||(this.ba=this.Na.Bd(),this.ba.zIndex(1)),this.J(4)&&(this.fc=e.clone(),this.B(543195136),t.nr(this,"timelinechart","scroll"),this.I(4)),this.Re=[],this.Sb=[],this.sb=[];var i=f(this);if(0==this.tj())p(this),this.fb.length=0,this.ea.length=0;else if(this.J(98304)){this.fb=[],this.ea=[];for(var s=window.Infinity,a=-window.Infinity,o=0,h=0,c=["up","down"],u=0;u<this.hb.length;u++){var d=this.hb[u],S=d.kk();switch(d.g("direction")){case"odd-even":"range"==S?(r(d,c[1&o]),o++):"moment"==S&&(r(d,c[1&h]),h++);break;case"auto":("range"==S||"moment"==S)&&r(d,"up")}switch(S){case"moment":this.fb.push(d);break;case"range":this.ea.push(d)}var w=t.yB(d,!1,!0),x=d,C=window.Infinity,D=-window.Infinity,T=x.Ec(),k=x.kk();if("moment"==k)for(;T.advance();){var $=t.Xk(T.get("x"));C=Math.min(C,$),D=Math.max(D,$)}else if("range"==k)for(;T.advance();){var O=t.Xk(T.get("start")),P=t.Xk(T.get("end"));(0,window.isNaN)(O)||((0,window.isNaN)(P)||(C=Math.min(C,P),D=Math.max(D,P)),C=Math.min(C,O),D=Math.max(D,O))}var L=C,G=D;s=Math.min(s,L),a=Math.max(a,G),this.Re.push(w),"range"==S?this.Sb.push(w):this.sb.push(w)}var F=s,I=a;if(-window.Infinity===I&&window.Infinity===F)p(this);else{g(this.og),g(this.rg),g(this.tg),this.o&&this.o.md&&(this.o=void 0);for(var E=t.Ga(this.og,this.rg,this.tg,[this.o]),A=[],U=0;U<E.length;U++){var _=E[U];if(_&&_.enabled()&&"consider"==_.g("scaleRangeMode"))for(var j=_.xs(),M=0;M<j.length;M++)A.push(t.ps(j[M]).getTime())}var N=Math.min.apply(null,A),B=Math.max.apply(null,A);if((F=Math.min(F,N))==(I=Math.max(I,B))){var R=t.tp("day",1);F-=R/2,I+=R/2}this.Ka==F&&this.Ha==I||(this.Ka=F,this.Ha=I,t.ut(this.scale(),this.Ka,this.Ha),this.eb.QI?(this.eb.kj.apply(this.eb,this.eb.MI),this.eb.QI=!1,this.eb.MI=null):(this.scale().ka(),this.scale().Qm(),this.scale().da(!1)));for(var H,z,V,q,W=this.Re,K=[],Y=[],X=[],J=[],Z=[],Q=[],tt=[],et=0;et<W.length;et++){var it=(q=W[et]).X.kk();if("range"==it){for(var nt,st,at,ot=q,rt=ot.X,lt=ot.data,ht=[],ct=[],ut=[],dt=f(this),pt=this.scale().uj().max,gt=rt.Ec(),ft=0;ft<lt.length;ft++){gt.select(ft);var bt=lt[ft],vt=gt.get("start"),mt=gt.get("name")||gt.get("x");if(null==vt||(0,window.isNaN)(vt)||null==mt)gt.j("missing",!0);else{at=this.scale().transform(bt.data.start)*this.fc.width,st=(0,window.isNaN)(bt.data.end)?this.scale().transform(pt)*this.fc.width:this.scale().transform(bt.data.end)*this.fc.width,nt=t.L(rt.g("height"),this.fc.height);var yt=gt.get("direction")||l(rt),St={dj:at,Mj:st,sg:0,mg:nt,direction:yt,X:rt,ZI:ft,pd:ot};ht.push(St),"up"==yt?ct.push(St):ut.push(St),bt.j.axisHeight=dt}}H=ht,z=ct,V=ut,K=t.Ga(K,H),Y=t.Ga(Y,H),X=t.Ga(X,z),J=t.Ga(J,V)}else if("moment"==it){var wt=q,xt=wt.X,Ct=wt.data,Dt=[],Tt=[],kt=[],$t=f(this),Ot=xt.labels();t.Yu(Ot);for(var Pt=xt.Db(),Lt=Pt.enabled()?Pt.g("size"):0,Gt=xt.$(),Ft=0;Ft<Ct.length;Ft++)if(Gt.select(Ft),null!=Gt.get("value")&&null!=Gt.get("x")){var It=Ot.be(Ft),Et=t.vB(xt,new t.Fw);null===It?It=Ot.add(Et,{value:{x:0,y:0}},Ft):It.Hf(Et),It.b=null;var At=Ot.measure(It),Ut=Ot.g("offsetX")||0,_t=Ct[Ft],jt=this.scale().transform(_t.data.x)*this.fc.width-Lt,Mt=jt+At.width+Ut+Lt,Nt=50-At.height/2,Bt=50+At.height/2,Rt=Gt.get("direction")||l(xt),Ht={dj:jt,Mj:Mt,sg:Nt,mg:Bt,direction:Rt,X:xt,ZI:Ft,pd:wt};Dt.push(Ht),"up"==Rt?Tt.push(Ht):kt.push(Ht),_t.j.axisHeight=$t}else Gt.j("missing",!0);H=Dt,z=Tt,V=kt,K=t.Ga(K,H),Z=t.Ga(Z,H),Q=t.Ga(Q,z),tt=t.Ga(tt,V)}}var zt=X,Vt=J,qt=Q,Wt=tt;t.Pa(zt,v),t.Pa(Vt,v),t.Pa(qt,m),t.Pa(Wt,m);var Kt=this.scale().uj();this.f={dj:window.Infinity,Mj:-window.Infinity,sg:window.Infinity,mg:-window.Infinity},this.f.dj=Math.min(this.f.dj,this.scale().transform(Kt.min)*this.fc.width),this.f.Mj=Math.max(this.f.Mj,this.scale().transform(Kt.max)*this.fc.width);var Yt,Xt,Jt=[],Zt=new n;for(Xt=0;Xt<zt.length;Xt++){(Yt=zt[Xt])&&-1==Jt.indexOf(Yt.X)&&(Yt.X.zIndex(34-Jt.length/100),Jt.push(Yt.X));var Qt=Yt.ZI,te=Yt.pd.data[Qt];Zt.add(Yt,!0),y(this,Yt),te.j.startY=Yt.sg,te.j.endY=Yt.mg,te.j.stateZIndex=1-Yt.mg/1e6}for(Xt=qt.length-1;0<=Xt;Xt--)Qt=(Yt=qt[Xt]).ZI,Zt.add(Yt),y(this,Yt),(te=Yt.pd.data[Qt]).j.minLength=Yt.sg+(Yt.mg-Yt.sg)/2;var ee=new n;for(Jt=[],Xt=0;Xt<Vt.length;Xt++)(Yt=Vt[Xt])&&-1==Jt.indexOf(Yt.X)&&(Yt.X.zIndex(34-Jt.length/100),Jt.push(Yt.X)),Qt=Yt.ZI,te=Yt.pd.data[Qt],ee.add(Yt,!0),te.j.startY=Yt.sg,te.j.endY=Yt.mg,te.j.stateZIndex=1-Yt.mg/1e6,y(this,{dj:Yt.dj,Mj:Yt.Mj,sg:-Yt.mg,mg:-Yt.sg});for(Xt=Wt.length-1;0<=Xt;Xt--)Qt=(Yt=Wt[Xt]).ZI,ee.add(Yt),(te=Yt.pd.data[Qt]).j.minLength=Yt.sg+(Yt.mg-Yt.sg)/2,y(this,{dj:Yt.dj,Mj:Yt.Mj,sg:-Yt.mg,mg:-Yt.sg});var ie=i/2;this.f.sg-=ie,this.f.mg+=ie;var ne=t.wr(this,"scroller"),se=0,ae=0;if(ne&&ne.enabled()){var oe=ne.g("orientation"),re=ne.g("height");switch(oe){case"top":se=re;break;case"bottom":ae=re}}var le=this.fc.height/2,he=le-Math.abs(this.f.sg)-ae,ce=this.f.mg-le-se;if(this.f.mg-this.f.sg<=this.fc.height){var ue=qt.length+zt.length,de=Wt.length+Vt.length;ue&&!de?b(this,he,he):!ue&&de?b(this,ce,ce):ue&&de&&b(this,0,0)}else b(this,he,ce)}}var pe=t.wr(this,"scroller"),ge=t.wr(this,"axis");if(this.J(536870912)&&(pe&&(pe.O(this.Na),pe.ja(this.fc),pe.W()),this.I(536870912)),t.rr(this,"timelinechart","scroll")){var fe=this.G.kp(),be=this.P,ve=be.CC,me=be.GE,ye=ve*(this.fc.height-this.axis().height());.5==Math.abs(ve)&&(ye+=me),this.D=ye,this.f&&this.wj+this.fc.cb()>this.f.Mj+this.fc.left?this.wj=this.f.Mj-this.fc.cb()+this.fc.left:this.f&&this.wj+this.fc.tb()<this.f.dj+this.fc.left&&(this.wj=this.f.dj-this.fc.tb()+this.fc.left),this.D=t.Za(this.D,this.$a,this.Za),fe[4]=-this.wj,fe[5]=this.D,this.G.oc.apply(this.G,fe);var Se=this.fc.clone();Se.left+=this.wj,Se.top-=this.D,this.G.clip(Se),fe[5]=0,this.K.oc.apply(this.K,fe),Se.top=this.fc.top,this.K.clip(Se);var we=this.D,xe=0;ge&&(xe=ge.g("height")/2);var Ce=0,De=0;if(pe&&pe.enabled()){var Te=pe.g("height"),ke=pe.g("orientation");"top"==ke?Ce=Te:"bottom"==ke&&(De=Te)}(Se=this.fc.clone()).left+=this.wj,this.D>this.fc.height/2-xe-De?we=this.fc.height/2-xe-De:this.D<-this.fc.height/2+xe+Ce&&(we=-this.fc.height/2+xe+Ce),fe[5]=we,this.ba.oc.apply(this.ba,fe),this.ba.clip(Se);for(var $e=0;$e<this.ea.length;$e++){var Oe=this.ea[$e];Oe.B(256),Oe.ja(this.fc),Oe.O(this.G),Oe.W()}t.pr(this,"timelinechart","scroll")}if(this.J(65536)&&(this.B(6324224),this.I(65536)),this.J(32768)){for($e=0;$e<this.hb.length;$e++)(Oe=this.hb[$e]).ja(this.fc),Oe.O(this.G),Oe.W();this.I(32768)}if(this.J(2097152)&&(ge&&(ge.ja(this.fc),ge.O(this.ba),ge.W()),this.I(2097152)),this.J(4194304)){var Pe=t.Ga(this.og,this.rg,this.tg,[this.o]);for($e=0;$e<Pe.length;$e++){var Le=Pe[$e];Le&&(Le.B(4),Le.ka(),Le.scale()||Le.WK(this.eb),Le.ja(this.fc),Le.O(this.K),Le.W(),Le.da(!1))}this.I(4194304)}}},t.g.J_=function(e){var i=this.scale().sj(),n=this.scale().uj(),s=e.deltaY;if(t.RC&&(s*=15),!e.shiftKey&&this.gd().g("zoomOnMouseWheel")){e.preventDefault();var a=0>e.deltaY;if(i.min<=n.min&&i.max>=n.max&&!a)return;i=e.clientX,this.scale().Mc((i+this.wj)/this.fc.width),this.scale().Mc(this.wj/this.fc.width),this.scale().Mc((this.wj+this.fc.width)/this.fc.width),this.ka(),n=t.Zj(this.O().Ja()),i=(i-this.fc.left-n.x)/this.fc.width,a?this.Vr(1.2,i):this.Wr(1.2,i),this.da(!0)}this.gd().g("scrollOnMouseWheel")&&(e.preventDefault(),this.move(0,s))},t.g.move=function(t,e){this.moveTo(this.wj+t,this.D-e)},t.g.moveTo=function(e,i){var n=this.scale().sj(),s=this.scale().uj(),a=e-this.wj,o=i-this.D;if(this.G){this.wj=e,this.D=i,0!=a&&(this.wj+this.fc.cb()>this.f.Mj+this.fc.left?this.wj=this.f.Mj-this.fc.cb()+this.fc.left:this.wj+this.fc.tb()<this.f.dj+this.fc.left&&(this.wj=this.f.dj-this.fc.tb()+this.fc.left)),0!=o&&(this.D=t.Za(i,this.$a,this.Za)),a=this.fc.height-f(this),o=this.D/a;var r=t.Za(o,-.5,.5);this.P.CC=r,this.P.GE=(o-r)*a,a=this.scale().Mc(this.wj/this.fc.width),o=this.scale().Mc((this.wj+this.fc.width)/this.fc.width),n=a-n.min,r=s.max-s.min,t.IB(this.K_(),(a-s.min)/r,(o-s.min)/r),this.ka(),this.B(2097152),this.axis().offset(n),t.nr(this,"timelinechart","scroll",1),this.da(!0)}},t.g.Wga=function(){this.aa||(this.aa=new t.Ex(this.O().Ja().Tl(),!1),this.aa.wa("mousewheel",this.J_,!1,this)),this.Na.wa("mousedown",this.e4,!0,this)},t.g.e4=function(e){var i=this.fc,n=t.wr(this,"scroller");n&&n.enabled()&&(i=n.yd()),n=t.Zj(this.O().Ja()),i&&e.clientX>=i.left+n.x&&e.clientX<=i.left+n.x+i.width&&e.clientY>=i.top+n.y&&e.clientY<=i.top+n.y+i.height&&(this.na=e.clientX,this.Ba=e.clientY,this.Na.wa("mousemove",this.bB,!0,this),t.Ld(t.Lp,"mouseup",this.cB,!0,this))},t.g.bB=function(t){this.move(this.na-t.clientX,this.Ba-t.clientY),this.na=t.clientX,this.Ba=t.clientY},t.g.cB=function(){this.Na.gc("mousemove",this.bB,!0,this),t.Yd(window.document,"mouseup",this.cB,!0,this)},t.g.axis=function(e){return this.b||(this.b=new i,t.K(this.b,this.I_,this),t.wl(this.b),t.W(this,"axis",this.b)),t.p(e)?(this.b.N(e),this):this.b},t.g.Ra=function(){return this.scale()},t.g.I_=function(e){var i=2097152;t.X(e,32772)&&(i|=32772),this.B(i,1)},t.g.scale=function(e){return t.p(e)?(this.eb.N(e),this):this.eb},t.g.ii=function(e){t.X(e,4)&&((e=this.scale()).uj(),e.sj(),this.moveTo(0,this.D),this.B(2162688,1))},t.g.Gt=function(t,e){return"moment"==t?new h(this,this,t,e,!0):new u(this,this,t,e,!0)},t.g.wy=function(){return null},t.g.uy=function(){return null},t.g.bb=function(){return this.Fc||(this.Fc=new t.Mt),this.Fc},t.g.xa=function(){return!1},t.g.kj=function(e,i){this.ka();var n=t.Xk(e),s=t.Xk(i);this.scale().kj(n,s);var a=t.wr(this,"scroller");if(a){var o=this.scale().uj(),r=o.max-o.min;t.IB(a,(n-o.min)/r,(s-o.min)/r)}return this.da(!0),this},t.g.Qm=function(){return this.ka(),this.scroll(0),this.scale().Qm(),this.B(65536,1),this.da(!0),this},t.g.scroll=function(e){return t.p(e)&&(e=+e,this.D!=e)?(this.moveTo(this.wj,e),this):this.D},t.g.KY=function(e){if(t.p(e)){var i=t.p(e.CC)?t.Za(e.CC,-.5,.5):0;return e=t.p(e.GE)&&.5==Math.abs(i)?e.GE:0,this.P.CC===i&&this.P.GE===e||(this.P={CC:i,GE:e},t.nr(this,"timelinechart","scroll")),this}return this.P},t.g.Ma=function(){return"timeline"},t.g.K_=function(e){return this.i||(this.i=new t.TB,this.i.kb(this),t.K(this.i,this.Yca,this),this.wc.wa(this.i,"scrollerchange",this.L_),this.wc.wa(this.i,"scrollerchangefinish",this.L_),t.W(this,"scroller",this.i),this.B(536870916,1)),t.p(e)?(this.i.N(e),this):this.i},t.g.Yca=function(e){var i=536870912,n=1;t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.L_=function(t){var e=this.scale().uj(),i=e.max-e.min;this.kj(e.min+t.startRatio*i,e.min+t.endRatio*i)},t.g.Fh=function(){return this},t.g.Vr=function(e,i){var n=this.scale(),s=n.sj(),a=t.p(i)?i:.5,o=n.uj().max-n.uj().min,r=n.Mc(this.wj/this.fc.width);return 2e-4>(r=(s={min:r,max:r+(s.max-s.min)}).max-s.min)/o||(r=Math.round(r*((e?1/e:.625)-1)),o=s.min-r*a,r=s.max+r*(1-a),6e4>=Math.abs(o-r)&&(o=(s=(s.min+s.max)/2)-6e4*a,r=s+6e4*(1-a)),n.kj(o,r)),this},t.g.Wr=function(e,i){e=e||1.6;var n=this.scale(),s=n.sj(),a=t.p(i)?i:.5,o=n.Mc(this.wj/this.fc.width);return s={min:o,max:o+(s.max-s.min)},o=Math.round((s.max-s.min)*(e-1)),n.kj(s.min-o*a,s.max+o*(1-a)),this},t.g.U=function(t,e){d.u.U.call(this,t,e),t.scale&&(this.scale(t.scale),this.Ka=t.scale.dataMinimum,this.Ha=t.scale.dataMaximum),t.axis&&this.axis(t.axis),this.KY(t.verticalRelativeOffset),this.Kg(t.lineAxesMarkers,this.Ym),this.Kg(t.textAxesMarkers,this.mn),this.Kg(t.rangeAxesMarkers,this.gn),t.todayMarker&&this.K6(t.todayMarker),this.kP(t)},t.g.kP=function(e){var i=e.series;if(t.A(i))for(var n=0;n<i.length;n++){var s=(e=i[n]).seriesType||this.g("defaultSeriesType");(s=this.Ae(s,e))&&s.N(e)}},t.g.Kg=function(t,e){for(var i=0;i<t.length;i++)e.call(this,i).N(t[i])},t.g.F=function(){var e,i=d.u.F.call(this);for(i.scale=this.scale().F(),i.axis=this.axis().F(),i.lineAxesMarkers=[],e=0;e<this.og.length;e++)i.lineAxesMarkers.push(this.og[e].F());for(i.textAxesMarkers=[],e=0;e<this.tg.length;e++)i.textAxesMarkers.push(this.tg[e].F());for(i.rangeAxesMarkers=[],e=0;e<this.rg.length;e++)i.rangeAxesMarkers.push(this.rg[e].F());return t.p(this.o)&&(i.todayMarker=this.o.F()),this.eP(i),i.type=this.Ma(),i.verticalRelativeOffset=this.KY(),{chart:i}},t.g.eP=function(t){var e,i=[];for(e=0;e<this.hb.length;e++){var n=this.hb[e].F();i.push(n)}i.length&&(t.series=i)},t.g.nfa=function(){var t=this.o2();return this.scale().Jr(t.min,t.max),this},t.g.o2=function(){var t=this.scale(),e=t.sj();return{min:t=t.Mc(this.wj/this.fc.width),max:t+(e.max-e.min)}},t.g.R=function(){t.kr(this.eb,this.ii,this),t.kr(this.b,this.I_,this),this.Na.gc("mousedown",this.e4,!0,this),this.Na.gc("mousemove",this.bB,!0,this),t.Yd(t.Lp,"mouseup",this.cB,!0,this),this.aa.gc("mousewheel",this.J_,!1,this),t.sd(this.b,this.eb,this.Fc,this.og,this.tg,this.rg,this.G,this.o,this.K),this.Fc=this.eb=this.b=null,this.og.length=0,this.tg.length=0,this.rg.length=0,this.K=this.G=this.o=null,d.u.R.call(this)};var P=d.prototype;P.axis=P.axis,P.scale=P.scale,P.fitAll=P.Qm,P.fit=P.Qm,P.zoomTo=P.kj,P.getType=P.Ma,P.getCurrentScene=P.Fh,P.zoomIn=P.Vr,P.zoomOut=P.Wr,P.getSeries=P.ef,P.addSeries=P.kl,P.getSeriesAt=P.Ai,P.getSeriesCount=P.tj,P.removeSeries=P.Ao,P.removeSeriesAt=P.Rn,P.removeAllSeries=P.Dp,P.scroll=P.scroll,P.lineMarker=P.Ym,P.textMarker=P.mn,P.rangeMarker=P.gn,P.todayMarker=P.K6,P.scroller=P.K_,P.forceScaleUpdate=P.nfa,P.getVisibleRange=P.o2,P.verticalRelativeOffset=P.KY,t.Tp.timeline=S,t.E("anychart.timeline",S)}.call(this,$)),_.theme_resource||(_.theme_resource=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{resource:{calendar:{},conflicts:{labels:{enabled:!0,anchor:"left-top",hAlign:"center",fontSize:"8pt",padding:0,fontColor:"#F4F4F4",format:"{%hours}{decimalsCount:1}h ({%percent}{decimalsCount:2}%)"},fill:"#dd2c00",stroke:"none",hatchFill:null,height:15,zIndex:100},overlay:{enabled:!1},activities:{normal:{labels:{enabled:!0,anchor:"left-top",fontColor:"#F4F4F4",format:"{%name} ({%hoursPerDayRounded}{decimalsCount:1}h)",position:"left-top"},fill:"#1976d2",stroke:null,hatchFill:!1},hovered:{labels:{enabled:null},fill:t.FN,stroke:t.zN,hatchFill:null},selected:{labels:{enabled:null},fill:"#333",stroke:t.zN,hatchFill:null}},resourceList:{oddFill:"none",evenFill:"none",enabled:!0,width:"100%",height:"100%",background:{enabled:!0,fill:"#F3F7FA",stroke:"none",cornerType:"none",corners:0},images:{borderRadius:10,opacity:1,align:"none",fittingMode:"meet",size:"25%",margin:{top:5,right:0,bottom:5,left:5}},baseSettings:{margin:{top:2,right:0,bottom:3,left:5},fontSize:15,textOverflow:"...",fontFamily:'"Helvetica Neue","Helvetica",sans-serif'},names:{margin:{top:5,right:0,bottom:3,left:5},fontSize:17,fontWeight:"bold",fontColor:"#000"},types:{fontSize:10,fontColor:"#212121"},descriptions:{fontSize:12,fontColor:"#959CA0",fontWeight:"bold"},tags:{fontSize:9,fontColor:"#212121",background:{enabled:!0,fill:"#eee",stroke:"#ccc",cornerType:"round",corners:4},padding:5,margin:{top:2,right:0,bottom:3,left:5}},drawTopLine:!1,drawRightLine:!1,drawBottomLine:!0,drawLeftLine:!1,stroke:"#ccc",zIndex:2,overlay:!0},logo:{enabled:!0,fill:"#E7ECF0",stroke:"none",bottomStroke:"#ccc",zIndex:2,overlay:!1},timeLine:{enabled:!0,background:{enabled:!1},overlay:{enabled:!1},zIndex:2,vAlign:"middle",hAlign:"center",textOverflow:"",fill:"none",stroke:"#ccc",padding:[2,10,2,10],fontSize:11,fontWeight:"bold",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',drawTopLine:!1,drawRightLine:!1,drawBottomLine:!0,drawLeftLine:!1},grid:{overlay:{enabled:!1},background:{enabled:!1,fill:"#F3F7FA"},oddFill:"#fff",evenFill:"#fff",oddHolidayFill:"#F4F4F4 .7",evenHolidayFill:"#F4F4F4 .7",oddHatchFill:null,evenHatchFill:null,oddHolidayHatchFill:null,evenHolidayHatchFill:null,horizontalStroke:"#ccc",verticalStroke:"#ccc",drawTopLine:!1,drawRightLine:!1,drawBottomLine:!0,drawLeftLine:!1,zIndex:2},xScale:{minimumGap:.01,maximumGap:.01},horizontalScrollBar:{enabled:!0,allowRangeChange:!1,autoHide:!0,orientation:"bottom",thumbs:!1,fill:null,zIndex:1010},verticalScrollBar:{enabled:!0,allowRangeChange:!1,autoHide:!0,orientation:"right",thumbs:!1,fill:null,zIndex:1010,inverted:!0},zoomLevels:[{id:"days",levels:[{unit:"day",count:1,formats:["MMM\ndd  EEEE"],format:function(){return this.value.toUpperCase()},hAlign:"left"}],unit:"day",count:1,unitPixSize:220},{id:"weeks",levels:[{unit:"day",count:1,formats:["dd EEE","dd"],hAlign:"left",fill:"#fff",fontColor:"#ABB6BC",format:function(){return this.value.toUpperCase()},height:30},{unit:"week",count:1,formats:["w MMM"],fill:"#F0F5F8",format:function(){return this.value.toUpperCase()}}],unit:"day",count:1,unitPixSize:100},{id:"months",levels:[{unit:"day",count:1,formats:["d EEE","d"],hAlign:"center",padding:[2,5,2,5],fill:"#fff",format:function(){return this.value.toUpperCase()},height:30},{unit:"week",count:1,formats:["w MMM"],fill:"#F0F5F8",format:function(){return this.value.toUpperCase()}}],unit:"day",count:1,unitPixSize:25}],zoomLevel:0,padding:0,margin:20,resourceListWidth:260,timeLineHeight:52,cellPadding:[2,2,2,2],minRowHeight:50,pixPerHour:25,defaultMinutesPerDay:60,splitterStroke:"#ccc",timeTrackingMode:"activity-per-resource",background:{enabled:!0,stroke:"#ccc"},tooltip:{allowLeaveScreen:!1,allowLeaveChart:!0,displayMode:"single",positionMode:"float",title:{enabled:!0,fontSize:13},separator:{enabled:!0},titleFormat:"{%name}",format:function(){return"Starts: "+t.vs(this.start)+"\nEnds: "+t.vs(this.end)}}}}),t.ra(t.fa.anychart.themes.defaultTheme.standalones,{resourceList:{width:"33%",height:"100%",background:{enabled:!0,fill:"#ccc",stroke:"#ccc",cornerType:"none",corners:0},rowHeight:null,minRowHeight:"20%",maxRowHeight:"50%",images:{borderRadius:10,opacity:1,align:"none",fittingMode:"meet",size:"25%",margin:{top:5,right:0,bottom:5,left:5}},baseSettings:{margin:{top:2,right:0,bottom:3,left:5},fontSize:15,textOverflow:"..."},names:{margin:{top:5,right:0,bottom:3,left:5}},types:{fontSize:10,fontColor:"#212121"},descriptions:{fontSize:12,fontColor:"#545f69",fontStyle:"oblique"},tags:{fontSize:9,fontColor:"#212121",background:{enabled:!0,fill:"#eee",stroke:"#ccc",cornerType:"round",corners:4},padding:5,margin:{top:2,right:0,bottom:3,left:5}}}})}.call(this,$)),_.theme_polar||(_.theme_polar=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{polar:{defaultSeriesType:"marker",defaultSeriesSettings:{base:{closed:!0,clip:!1},area:{},line:{},marker:{},column:{},rangeColumn:{}},xAxis:{scale:0,zIndex:25,fill:"none",labels:{position:"outside",vAlign:"middle",hAlign:"middle",anchor:"auto",zIndex:25},minorLabels:{anchor:"auto",zIndex:25},ticks:{zIndex:25},minorTicks:{zIndex:25}},yAxis:{scale:1},startAngle:0,spreadValues:"none",innerRadius:0,sortPointsByX:!1,xGrids:[{}],yGrids:[{}],minorGrids:[],scales:[{type:"linear"},{type:"linear"}],xScale:0,yScale:1,barsPadding:0,barGroupsPadding:0,a11y:{titleFormat:t.QN}}})}.call(this,$)),_.theme_surface||(_.theme_surface=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{surface:{rotationZ:17,rotationY:35,box:null,stroke:{color:""},colorScale:{type:"linear-color"},colorRange:{marker:{enabled:!1,type:"triangle-down"},labels:{useHtml:!0}},markers:{enabled:!1,type:"circle",size:4,fill:t.zN,stroke:t.EN,tooltip:{enabled:!0,format:"x: {%x}\ny: {%y}\nz: {%z}",titleFormat:"Marker: {%index}",separator:{enabled:!1},title:{enabled:!1}},droplines:{enabled:!1,stroke:"#CECECE"}},xAxis:{enabled:!0,orientation:"right",stroke:"red",labels:{useHtml:!0},ticks:{stroke:"red"},minorLabels:{useHtml:!0},minorTicks:{stroke:t.Pl("red")}},yAxis:{enabled:!0,orientation:"bottom",stroke:"green",labels:{useHtml:!0},minorLabels:{useHtml:!0},ticks:{stroke:"green"},minorTicks:{stroke:t.Pl("green")}},zAxis:{enabled:!0,orientation:"left",stroke:"blue",labels:{useHtml:!0},minorLabels:{useHtml:!0},ticks:{stroke:"blue"},minorTicks:{stroke:t.Pl("blue")}},xGrid:{zIndex:35,enabled:!0},yGrid:{zIndex:35,enabled:!0},zGrid:{zIndex:35,enabled:!0}}})}.call(this,$)),_.theme_wordtree||(_.theme_wordtree=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{wordtree:{maxFontSize:36,minFontSize:7,fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontColor:"#7c868e",fontDecoration:"none",fontOpacity:1,fontStyle:"normal",fontWeight:400,postfix:"more",connectors:{stroke:"2 #888888",curveFactor:.5,length:30,offset:5},tooltip:{titleFormat:"{%Value}",format:"Weight: {%weight}"}}})}.call(this,$)),_.theme_cartesian||(_.theme_cartesian=1,function(t){var e=function(){return t.vs(this.x)},i=function(){return t.vs(this.tickValue)};t.ra(t.fa.anychart.themes.defaultTheme,{cartesian:{defaultSeriesType:"line",defaultSeriesSettings:{base:{xMode:"ordinal"}}},area:{defaultSeriesType:"area",tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"}},bar:{isVertical:!0,defaultSeriesType:"bar",defaultXAxisSettings:{orientation:"left"},defaultYAxisSettings:{orientation:"bottom"},scales:[{type:"ordinal",inverted:!0},{type:"linear",stackDirection:"reverse"}],tooltip:{displayMode:"single",position:"right-center",anchor:"left-center"},xScroller:{orientation:"left",inverted:!0},yScroller:{orientation:"bottom",inverted:!1}},column:{defaultSeriesType:"column",tooltip:{displayMode:"single",position:"center-top",anchor:"center-bottom",offsetX:0,offsetY:10},scales:[{type:"ordinal"},{type:"linear",softMinimum:0}]},line:{defaultSeriesType:"line",tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"}},box:{defaultSeriesType:"box"},financial:{defaultSeriesType:"candlestick",defaultSeriesSettings:{candlestick:{tooltip:{titleFormat:e},normal:{labels:{format:e}}},ohlc:{tooltip:{titleFormat:e},normal:{labels:{format:e}}}},xAxes:[{labels:{format:i},minorLabels:{format:i}}],scales:[{type:"date-time"},{type:"linear"}]},candlestick:{defaultSeriesType:"candlestick"},ohlc:{defaultSeriesType:"ohlc"},verticalLine:{isVertical:!0,defaultSeriesType:"line",defaultXAxisSettings:{orientation:"left"},defaultYAxisSettings:{orientation:"bottom"},scales:[{type:"ordinal",inverted:!0},{type:"linear"}],tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"},xScroller:{orientation:"left",inverted:!0},yScroller:{orientation:"bottom",inverted:!1}},verticalArea:{isVertical:!0,defaultSeriesType:"area",defaultXAxisSettings:{orientation:"left"},defaultYAxisSettings:{orientation:"bottom"},scales:[{type:"ordinal",inverted:!0},{type:"linear"}],tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"},xScroller:{orientation:"left",inverted:!0},yScroller:{orientation:"bottom",inverted:!1}}})}.call(this,$)),_.polar_part||(_.polar_part=1,function(t){var e=function(e,i,n,s,a,o,r,l,h,c,u,d,p,g){n=t.Tm(p+n*Math.PI*2,4),p=((r=t.Tm(p+r*Math.PI*2,4))-n)/3,n=t.Tm(n+p,4),r=t.Tm(r-p,4),s=d+(s+(p=(l-s)/3))*(u-d),u=d+(l-p)*(u-d),l=t.hn(n,s,h),d=t.jn(n,s,c),h=t.hn(r,u,h),c=t.jn(r,u,c),g.push((-5*e+18*l-9*h+2*a)/6,(-5*i+18*d-9*c+2*o)/6,(2*e-9*l+18*h-5*a)/6,(2*i-9*d+18*c-5*o)/6,a,o)},i=function(i,n,s,a,o,r,l,h,c,u,d,p,g,f){f?(s<l&&(s+=1),f=-.25):(l<s&&(l+=1),f=.25);var b=Math.ceil(s/f)*f,v=Math.floor(l/f)*f;s==b&&(b+=f),l==v&&(v-=f);for(var m=(l-s)/(h-a),y=[];0>=(b-v)*f;b+=f){var S=t.Tm(g+b*Math.PI*2,4),w=(b-s)/m+a,x=p+(d-p)*w,C=t.hn(S,x,c);S=t.jn(S,x,u),y.push(0==s%1?1:0),e(i,n,s,a,C,S,b,w,c,u,d,p,g,y),i=C,n=S,s=b,a=w}return y.push(0==s%1?1:0),e(i,n,s,a,o,r,l,h,c,u,d,p,g,y),y},n=function(i,n,s,a,o,r,l,h,c,u,d,p,g,f){f?(s<l&&(s+=1),f=-.25):(l<s&&(l+=1),f=.25);for(var b=(l-s)/(h-a),v=[],m=s+f;0>(m-l)*f;m+=f){var y=t.Tm(g+m*Math.PI*2,4),S=(m-s)/b+a,w=p+(d-p)*S,x=t.hn(y,w,c);y=t.jn(y,w,u),e(i,n,s,a,x,y,m,S,c,u,d,p,g,v),i=x,n=y,s=m,a=S}return e(i,n,s,a,o,r,l,h,c,u,d,p,g,v),v},s=function(){function e(){this.pj()}this.ka(),t.Y.call(this),this.Ga(t.ur.axis),this.ci=[],this.Fk=[],this.$n=t.qk(),this.Pc=t.qk(),t.ru(this,this.$n),t.ru(this,this.Pc),this.sf=404,this.da(!1),t.T(this.ua,[["overlapMode",this.sf,9,0,e],["fill",16,1],["stroke",this.sf,9,0,e],["startAngle",this.sf,9,0,e]])},a=function(e){if(e.J(4)){e.pj();var i=e.scale(),n=e.ja()||t.kn(0,0,0,0);e.Oc=Math.max(Math.round(Math.min(n.width,n.height)/2),0),e.tc=Math.round(n.left+n.width/2),e.vc=Math.round(n.top+n.height/2);var s=e.labels(),a=s.g("position"),h="normal"==a?1:t.Ho(a),c=e.qb(),u=s.g("position"),d="normal"==u?1:t.Ho(u);if(s.clear().ja(n),c.clear().ja(n),e.I(4),i&&e.Oc&&e.enabled()){var p=e.Xa(),g=t.J(i,t.Qt),f=s.enabled(),b=c.enabled(),v=t.dp(e.g("stroke")),m=t.Io(p);if(t.uo(m)){var y=!0;m=(0,window.parseFloat)(m)}var S=(0,window.parseFloat)(t.Io(p,h)),w=e.yb(),x=g?0:t.Io(w);t.uo(x)&&(x=(0,window.parseFloat)(x));var C=g?0:(0,window.parseFloat)(t.Io(w,d)),D=m||f?i.Xa().get():[],T=g||!x&&!b?[]:i.yb().get();g||l(0,D,i,0)||(1==l(T.length-1,T,i,1)&&T.pop(),1==l(D.length-1,D,i,1)&&D.pop());var k,$,O=[],P=[],L=[],G=v/2,F="none"!=e.g("fill"),I=F?e.Hda:e.Gda,E=g?e.g("overlapMode"):"no-overlap",A=window.NaN,U=0;do{var _=!1,j=k=0,M=l(j,D,i,.5);for($=l(k,T,i,.5);!(0,window.isNaN)(M)||!(0,window.isNaN)($);){if((0,window.isNaN)($)||M<=$)var N=M,B=!0,R=j,H=f,z=S,V=m,q=D,W=e.ci,K=s,Y=P,X=y;else N=$,B=!1,R=k,H=b,z=C,V=x,q=T,W=e.Fk,K=c,Y=L,X=!1;var J=g?e.Oc:e.Oc+z,Z=B?R:~R,Q=t.Tm(t.ab(e.g("startAngle")-90+360*N),4),tt=t.bb(Q),et=t.hn(tt,1),it=t.jn(tt,1);if(H){var nt=void 0,st=e,at=K,ot=R,rt=q,lt=Q,ht=J,ct=G,ut=rt[ot],dt="none"!=st.g("fill"),pt=st.Am(ot,ut),gt=at.be(ot);gt?(gt.ka(),gt.Hf(pt),gt.state("pointState",null),gt.state("seriesState",null)):(gt=at.add(pt,null,ot)).ka(),gt.height(null);var ft={};if("normal"!=gt.ic("position")){var bt=gt.ic("padding"),vt=gt.ic("vAlign");if(0<lt&&180>lt&&("top"==gt.ic("vAlign")?gt.state("seriesState",{vAlign:"bottom"}):"bottom"==gt.ic("vAlign")&&gt.state("seriesState",{vAlign:"top"})),dt)ft.adjustFontSize=!1,nt=-("middle"==vt?ct/2:"bottom"==vt?ct-bt.bottom:bt.top);else{at.yl(gt),r(st,gt,ot,rt,ht,lt);var mt=gt.Rh().rH();nt=("middle"==vt?mt/2+bt.bottom:"bottom"==vt?bt.top:mt+bt.bottom)-ct}ht+=nt}else gt.Rh().path(null);gt.jc({value:{angle:lt,radius:ht,x:t.hn(t.bb(lt),ht,st.tc),y:t.jn(t.bb(lt),ht,st.vc)}}),"auto"==gt.ic("anchor")&&(ft.anchor=t.Go(lt-gt.ic("rotation"))),gt.state("pointState",ft),gt.da(!0);var yt=K.be(R);if("normal"==yt.ic("position")||10<U){var St=K.yl(yt);W[R]=St,G=Math.max(I.call(e,Q,et,it,St),G)}else{var wt=(new t.Hu).N(yt.ic("padding"));K.yl(yt),r(e,yt,j,q);var xt=G;if(F)G=Math.min(Math.max(wt.$j(yt.Rh().rH()),G),J/1.25);else{var Ct=wt.NY(yt.Rh().rb());G+=Math.max(n.left-Ct.left,n.top-Ct.top,Ct.cb()-n.cb(),Ct.Va()-n.Va(),0)}t.qd(wt),wt=null;var Dt=G>xt;if(Dt)A=Z;else if(A==Z)break;_=_||Dt}U||O.push(Z)}if(V){if(g){var Tt=l(R,q,i,0),kt=t.Tm(t.ab(e.g("startAngle")-90+360*Tt),4);tt=t.bb(kt);var $t=t.hn(tt,1),Ot=t.jn(tt,1)}else kt=Q,$t=et,Ot=it;if(U||Y.push(kt),!X){var Pt=e.Oc+V+v/2,Lt=$t*Pt+e.tc,Gt=Ot*Pt+e.vc;xt=G;var Ft=I.call(e,kt,$t,Ot,[Lt,Gt]);G=Math.max(Ft,G),(Dt=(G=Math.min(G,e.Oc))>xt)&&(A=window.NaN),_=_||Dt}}B&&M!=$||($=l(++k,T,i,.5)),B&&(M=l(++j,D,i,.5))}10<++U&&(_=!1)}while(_);e.b=e.Oc,e.Oc=Math.max(0,Math.floor(e.Oc-G)),e.f=P,e.i=L,G=Math.min(G,e.b);var It=yt&&"normal"!=yt.ic("position")&&F;if(G){var Et=G;for(j=0;j<O.length;j++){0>(R=O[j])?(R=~R,K=c,W=e.Fk):(K=s,W=e.ci);var At=(yt=K.be(R)).jc();if(Q=At.value.angle,"normal"==yt.ic("position")){if(St=W[R],tt=t.bb(Q),et=t.hn(tt,1),it=t.jn(tt,1),F){var Ut=t.Ja(St,0);t:{var _t=void 0,jt=void 0,Mt=void 0,Nt=Ut,Bt=et,Rt=it,Ht=e.tc,zt=e.vc;if(Bt&&Rt){var Vt=Bt/Rt,qt=Rt/Bt,Wt=((zt+Rt)*Ht-zt*(Ht+Bt))/Bt;for(Mt=0;Mt<Nt.length;Mt+=2)Nt[Mt]=jt=(Nt[Mt+1]+Nt[Mt]*Vt+Wt)/(Vt+qt),Nt[Mt+1]=jt*qt-Wt}else{if(Bt)jt=zt,_t=1;else{if(!Rt)break t;jt=Ht,_t=0}for(Mt=0;Mt<Nt.length;Mt+=2)Nt[Mt+_t]=jt}}var Kt=t.mn(Ut);Et=G-(G-t.gn(0,0,Kt.width,Kt.height))/2}for(et*=Et,it*=Et,k=0;k<St.length;k+=2)St[k]-=et,St[k+1]-=it;At.value.radius-=Et,et=t.hn(t.bb(Q),At.value.radius,e.tc),it=t.jn(t.bb(Q),At.value.radius,e.vc),At.value.x=et,At.value.y=it,yt.jc(null),yt.jc(At)}else yt.height(G)}}if("no-overlap"==E&&O.length&&!It){var Yt=[O[0]],Xt=0>O[0]?window.NaN:0,Jt=Xt,Zt=(0,window.isNaN)(Xt)?null:o(e,Xt),Qt=o(e,O[0]);for(j=1;j<O.length;j++){var te=O[j],ee=o(e,te),ie=!1;if(0>te)K=c,R=~te,ie=t.bn(ee,Qt)||t.bn(ee,o(e,Yt[Yt.length-1]));else if(K=s,R=te,!(ie=!(0,window.isNaN)(Xt)&&(t.bn(ee,Zt)||t.bn(ee,o(e,Yt[Xt]))))){for(k=Yt.length;k--;){var ne=Yt[k];if(!(0>ne&&t.bn(ee,o(e,Yt[k]))))break;c.be(~ne).enabled(!1),Yt.pop()}for(k=0;k<Jt&&0>(ne=Yt[k])&&t.bn(ee,o(e,Yt[k]));k++)c.be(~ne).enabled(!1);0<k&&Yt.splice(0,k)}ie?K.be(R).enabled(!1):(Yt.push(te),0<=te&&(Xt=Yt.length-1,Zt||(Jt=Xt,Zt=ee)))}}}else e.b=e.Oc,e.f=[],e.i=[]}},o=function(e,i){if(0>i){i=~i;var n=e.Fk,s=e.qb()}else n=e.ci,s=e.labels();if(n[i])s=n[i];else{var a=s.be(i);if(s=s.yl(a),"normal"!=a.ic("position"))if(s=a.Rh().rb(),a=a.ic("rotation")||0){var o=t.Eo(s,"center");a=t.Kb(t.bb(a),o.x,o.y),s=t.ln(s)||[],a.transform(s,0,s,0,4)}else s=t.ln(s)||[];n[i]=s}return s},r=function(e,i,n,s,a,o){var r=e.scale();a=t.p(a)?a:i.jc().value.radius;var h=t.p(o)?o:i.jc().value.angle,c=(new t.Hu).N(i.ic("padding")),u=2*Math.PI*a/360;t.J(r,t.Qt)?(o=e.g("startAngle")-90+360*l(n,s,r,0),n=e.g("startAngle")-90+360*l(n,s,r,1),s=e.Xa().g("stroke"),o+=u=((r=Math.abs(n-o))-(c.Ng(r*u)-t.$b(s))/u)/2,n-=u):(o=h-(n=360/s.length),n=h+n),t.qd(c),0<h&&180>h&&(h=o,o=n,n=h),c=t.bb(o),h=t.hn(c,a,e.tc),c=t.jn(c,a,e.vc),(u=i.Rh().path())?u.clear():(u=t.qk(),t.rd(e,u)),u.moveTo(h,c).MR(a,a,o,n-o),i.Rh().path(u)},l=function(t,e,i,n){return t<e.length?i.transform(e[t],n):window.NaN},h=function(e,i,n,s,a,o){var r=i.g("position"),l=t.Ho(r),h=t.bb(n);r=Math.sin(h),h=Math.cos(h);var c=0,u=0;s=0<=l?Math.floor(s/2):Math.ceil(s/2),a%2&&!(n%90)&&(u=-Math.round(h)/2,c=-Math.round(r)/2),n=e.Oc,a=l?l*s:-o/2,o=l?l*o:o,l=Math.round(e.tc+n*h+a*h)+c,e=Math.round(e.vc+n*r+a*r)+u,i.hq(l,e,l+o*h,e+o*r)},c=function(){s.call(this)},u=function(){t.i4.call(this)},d=function(t,e){var i=t.i+(t.Oc-t.i)*e;t.o.Fe(t.tc,t.vc,i,i,0,360)},p=function(e,i,n,s){if(!(0,window.isNaN)(n)){var a=e.i+(e.Oc-e.i)*i,o=t.bb(0);i=Math.round(e.tc+a*Math.cos(o)),o=Math.round(e.vc+a*Math.sin(o)),s.moveTo(i,o),s.Fe(e.tc,e.vc,a,a,0,360),a=e.i+(e.Oc-e.i)*n,o=t.bb(360),i=Math.round(e.tc+a*Math.cos(o)),o=Math.round(e.vc+a*Math.sin(o)),s.lineTo(i,o),s.Fe(e.tc,e.vc,a,a,360,-360),s.close()}},g=function(e,i,n,s,a,o){(0,window.isNaN)(s)&&(0,window.isNaN)(a)||(n=e.Ra().Ne()?n:-n,o.Fe(e.tc,e.vc,e.Oc,e.Oc,i,n),e.i?(i+=n,o.lineTo(e.tc+t.db(i,e.i),e.vc+t.eb(i,e.i)),o.Fe(e.tc,e.vc,e.i,e.i,i,-n)):o.lineTo(e.tc,e.vc),o.close())},f=function(t,e){var i=t.g("isMinor"),n="ordinal"===e.Ma();return(i&&!n?e.yb():e.Xa()).get()},b=function(){t.i4.call(this)},v=function(e){t.JA.call(this,e)},m=function(t,e,i,n){var s=e.fill,a=e.hatchFill;e.stroke.moveTo(i,n),s.moveTo(t.Dc,t.uc).lineTo(i,n),a.moveTo(t.Dc,t.uc).lineTo(i,n)},y=function(t,e,n,s,a){var o=t.bd.ed(t.Gc),r=o.stroke,l=o.fill,h=o.hatchFill,c=i(t.i,t.D,t.Ka,t.Za,e,n,s,a,t.Dc,t.uc,t.Eb,t.f,t.fb,t.na);t.$a&&c.length&&(c[0]=0),t.$a=!1;for(var u=t.i,d=t.D,p=0;p<c.length;p+=7)c[p]&&(S(t,o),r=(o=t.bd.yF(t.Gc)).stroke,l=o.fill,h=o.hatchFill,m(t,o,u,d)),r.Sk(c[p+1],c[p+2],c[p+3],c[p+4],c[p+5],c[p+6]),l.Sk(c[p+1],c[p+2],c[p+3],c[p+4],c[p+5],c[p+6]),h.Sk(c[p+1],c[p+2],c[p+3],c[p+4],c[p+5],c[p+6]),u=c[p+5],d=c[p+6];t.i=e,t.D=n,t.Ka=s,t.Za=a},S=function(t,e){var i=e.hatchFill;e.fill.lineTo(t.Dc,t.uc),i.lineTo(t.Dc,t.uc)},w=function(e){t.JA.call(this,e)},x=function(e){t.JA.call(this,e)},C=function(t,e,n,s,a){var o=t.bd.ed(t.Gc);o=o.stroke;var r=i(t.i,t.D,t.Ka,t.Za,e,n,s,a,t.Dc,t.uc,t.Eb,t.f,t.bg,t.me);t.$a&&r.length&&(r[0]=0),t.$a=!1;for(var l=t.i,h=t.D,c=0;c<r.length;c+=7)r[c]&&(o=(o=t.bd.yF(t.Gc)).stroke).moveTo(l,h),o.Sk(r[c+1],r[c+2],r[c+3],r[c+4],l=r[c+5],h=r[c+6]);t.i=e,t.D=n,t.Ka=s,t.Za=a},D=function(e){t.JA.call(this,e)},T=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),t.T(this.ua,[["closed",1024,1,4294967295]])},k=function(){t.g4.call(this,!1),t.tq(this.ua,"spreadValues",32768,1,void 0,(function(){(0,t.Pe)(this.hb,(function(t){"marker"==t.Ma()&&t.B(4294967295)}))}),this),this.Ga("polar")},$=function(e){var i=new k;return i.$c(),t.h4(i),arguments.length&&i.kl.apply(i,arguments),i};t.QA.prototype.yF=t.ca(27,(function(t){return this.ed(t,void 0,void 0)})),t.XA.prototype.yF=t.ca(26,(function(e){return e=t.UA(this,e,void 0,void 0),this.b.gx.push(e),e})),t.It.prototype.eF=t.ca(9,(function(e){var i=this.dk();if(i.length){var n=Math.min.apply(null,i),s=Math.max.apply(null,i);if((n=t.Za(e,n,s))!=e)return n;for(s=0;s<i.length-1;s++){n=i[s];var a=i[s+1];if(e>=n-(a=(a-n)/2)&&e<n+a)return n}}return e})),t.Ot.prototype.eF=t.ca(8,(function(t){return t}));var O={NONE:"none",Psa:"valueEqual",Osa:"value50"},P={bC:"area",tt:"line",av:"marker",hra:"polygon",ira:"polyline",lF:"column",FQ:"range-column"};t.H(s,t.Y);var L={};t.sq(L,[t.Z.dC,t.Z.yz,t.Z.Yn,t.Z.zz]),t.U(s,L),t.g=s.prototype,t.g.sa=400|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Pc=null,t.g.$n=null,t.g.Er="axis",t.g.Da=null,t.g.mb=null,t.g.rc=null,t.g.Rc=null,t.g.qa=null,t.g.Oc=window.NaN,t.g.tc=window.NaN,t.g.vc=window.NaN,t.g.ci=null,t.g.Fk=null,t.g.p_=function(){this.Da&&t.Yu(this.Da),this.rc&&t.Yu(this.rc)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.yb=function(e){return this.Rc||(this.Rc=new t.c4,t.W(this,"minorTicks",this.Rc),this.Rc.kb(this),t.K(this.Rc,this.li,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.Xa=function(e){return this.mb||(this.mb=new t.c4,t.W(this,"ticks",this.mb),this.mb.kb(this),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0,n=0;t.X(e,8)&&(i=this.sf,n=9),t.X(e,1)&&(i|=276,n|=1),this.pj(),this.B(i,n)},t.g.FK=function(e,i){if(t.p(e)){var n=t.jt(this.qa,e,null,15,null,this.ii,this);if(n){var s=this.qa==n;this.qa=n,this.qa.sN=!!i,this.qa.da(s),s||(this.pj(),this.B(this.sf,9))}return this}return this.qa},t.g.scale=function(t){return this.FK(t)},t.g.ii=function(e){t.X(e,2)&&(this.pj(),this.B(this.sf,9))},t.g.uo=function(){this.B(this.sf,9)},t.g.pj=function(){this.ci.length=0,this.Fk.length=0,this.ik=null},t.g.Hda=function(e,i,n,s){for(i=e=0;i<s.length;i+=2)e=Math.max(e,t.gn(this.tc,this.vc,s[i],s[i+1])-this.Oc);return e},t.g.Gda=function(e,i,n,s){var a=this.ja(),o=t.mn(s),r=o.left;s=o.top;var l=r+o.width;o=s+o.height;var h=0;return 90<e&&270>e?r<a.left&&(h=(a.left-r)/-i):l>(r=a.left+a.width)&&(h=(l-r)/i),0<e&&180>e?o>(e=a.top+a.height)&&(h=Math.max(h,(o-e)/n)):s<a.top&&(h=Math.max(h,(a.top-s)/-n)),h},t.g.yd=function(){var e=this.ja();return e?this.enabled()?(a(this),e=t.$b(this.g("stroke")),e=Math.floor(e/2),new t.I(this.tc-this.Oc+e,this.vc-this.Oc+e,2*(this.Oc-e),2*(this.Oc-e))):e:new t.I(0,0,0,0)},t.g.Am=function(e,i){var n=this.scale(),s=!0;if(t.J(n,t.Qt)){var a=n.Xa().names()[e],o=i;s=!1}else t.J(n,t.nt)?(a=t.vs(i),o=i):(a=(0,window.parseFloat)(i),o=(0,window.parseFloat)(i));return a={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:a,type:"number"},tickValue:{value:o,type:"number"},scale:{value:n,type:""}},s&&(a.min={value:t.p(n.min)?n.min:null,type:"number"},a.max={value:t.p(n.max)?n.max:null,type:"number"}),(n=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(n)},t.g.Iy=function(){return!1},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.Xa().B(2),this.labels().B(2),this.B(386)),!1))},t.g.W=function(){if(!this.scale())return t.il(2),this;if(!this.zc())return this;a(this),this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka();var e=this.g("stroke");if(this.J(16)&&(this.Pc.stroke(e),this.Pc.fill("none"),this.Pc.clear(),this.Pc.moveTo(this.tc+this.Oc,this.vc),this.Pc.Fe(this.tc,this.vc,this.Oc,this.Oc,0,360),this.$n.stroke("none"),this.$n.fill(this.g("fill")),this.$n.clear(),this.$n.moveTo(this.tc+this.Oc,this.vc),this.$n.Fe(this.tc,this.vc,this.Oc,this.Oc,0,360),this.$n.moveTo(this.tc+this.b,this.vc),this.$n.Fe(this.tc,this.vc,this.b,this.b,0,-360),this.I(16)),this.J(8)){var i=this.zIndex();this.$n.zIndex(i),this.Pc.zIndex(i),this.Xa().zIndex(i),this.yb().zIndex(i),this.labels().zIndex(i),this.qb().zIndex(i),this.I(8)}if(i=this.O(),this.J(2)&&(this.$n.parent(i),this.Pc.parent(i),this.Xa().O(i),this.labels().O(i),this.yb().O(i),this.qb().O(i),this.I(2)),this.J(256)){i=t.J(this.scale(),t.Qt),e=t.$b(e);var n=this.Xa();n.W();var s=t.$b(n.g("stroke")),o=n.g("length");for(t.uo(o)&&(o=i?t.L(o,this.b-this.Oc):(0,window.parseFloat)(o)),i=0;i<this.f.length;i++)h(this,n,this.f[i],e,s,o);for((n=this.yb()).W(),s=t.$b(n.g("stroke")),o=n.g("length"),t.uo(o)&&(o=(0,window.parseFloat)(o)),i=0;i<this.i.length;i++)h(this,n,this.i[i],e,s,o);this.I(256)}return this.J(128)&&(this.labels().W(),this.qb().W(),this.I(128)),this.labels().da(!1),this.Xa().da(!1),this.qb().da(!1),this.yb().da(!1),this},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.$n&&this.$n.parent(null),this.Xa().remove(),this.yb().remove(),this.Da&&this.Da.remove(),this.rc&&this.rc.remove()},t.g.F=function(){var e=s.u.F.call(this);return t.Tq(this,L,e),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e},t.g.U=function(e,i){s.u.U.call(this,e,i),t.Iq(this,L,e,i),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Xa(e.ticks),this.yb(e.minorTicks)},t.g.R=function(){t.sd(this.rc,this.Da,this.Rc,this.mb,this.Pc,this.$n),delete this.qa,this.ci=this.Pc=this.$n=this.mb=this.Rc=this.Da=this.rc=null,s.u.R.call(this)},t.H(c,s),t.xu(c,s);var G=s.prototype;G.labels=G.labels,G.minorLabels=G.qb,G.ticks=G.Xa,G.minorTicks=G.yb,G.scale=G.scale,G.getRemainingBounds=G.yd,G=c.prototype,t.E("anychart.standalones.axes.polar",(function(){var t=new c;return t.Ga("standalones.polarAxis"),t})),G.draw=G.W,G.parentBounds=G.ja,G.container=G.O,t.H(u,t.i4),u.prototype.Lj=function(){var e=this.Ra(),i=this.bb();this.Sz(),this.Uh().clear();var n=this.ja();this.Oc=Math.min(n.width,n.height)/2,this.i=t.L(this.g("innerRadius"),this.Oc),this.i==this.Oc&&this.i--,this.tc=Math.round(n.left+n.width/2),this.vc=Math.round(n.top+n.height/2),this.Uh().clip(n);var s=this.g("startAngle")-90;if(this.vN()){var a=n=f(this,e),o="ordinal"==(i=this.Ra()).Ma(),r=a.length;o?i=r:(o=i.transform(a[0]),a=i.transform(a[r-1]),i=0==o&&1==a||1==o&&0==a?r-1:r),o=360/i;var l=window.NaN,h=window.NaN,c=(r=this.g("stroke")).thickness?r.thickness:1;for(r=0;r<i;r++){a=e.transform(n[r]);var u=t.ab(s+360*a);a=t.bb(u);var b=0,v=0;u?90==u?b=0==c%2?0:-.5:180==u?v=0==c%2?0:.5:270==u&&(b=0==c%2?0:.5):v=0==c%2?0:-.5;var m=Math.round(this.tc+this.Oc*Math.cos(a)),y=Math.round(this.vc+this.Oc*Math.sin(a));if(this.i)var S=Math.round(this.tc+this.i*Math.cos(a)),w=Math.round(this.vc+this.i*Math.sin(a));else S=this.tc,w=this.vc;r&&(a=t.oz(this,r-1),g(this,u,o,l,h,a)),(r||this.g("drawLastLine"))&&(a=S,l=w,h=b,this.o.moveTo(m+h,y+v),this.o.lineTo(a+h,l+v)),l=m,h=y}a=t.oz(this,r-1),u=t.ab(s),g(this,u,o,l,h,a)}else for(e=(n=f(this,i)).length,s="ordinal"==i.Ma(),o=window.NaN,r=0;r<e;r++)m=n[r],t.A(m)?(c=m[0],m=m[1]):c=m,c=i.transform(c),0!=r&&(a=t.oz(this,r-1)),r==e-1?s?(p(this,c,o,a),a=t.oz(this,r),p(this,i.transform(m,1),c,a),d(this,c),this.g("drawLastLine")&&d(this,i.transform(m,1))):(p(this,c,o,a),this.g("drawLastLine")&&d(this,c)):(p(this,c,o,a),(r||this.i)&&d(this,c)),o=c},t.H(b,u),t.xu(b,u);var F=b.prototype;t.E("anychart.standalones.grids.polar",(function(){var t=new b;return t.Ga("standalones.polarGrid"),t})),F.layout=F.we,F.draw=F.W,F.parentBounds=F.ja,F.container=F.O,t.H(v,t.JA),t.PG[26]=v,t.g=v.prototype,t.g.type=26,t.g.flags=193|t.dB,t.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},t.g.Gd=function(e){v.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.fb=t.bb(t.$a(e.g("startAngle")-90,360)),this.na=e.iB(),this.ea=!!e.g("closed"),this.K=!1,this.Sb=this.sb=this.P=this.b=window.NaN},t.g.jA=function(t,e){(0,window.isNaN)(this.b)&&(this.K=!0),v.u.jA.call(this,t,e)},t.g.Qo=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("value"),s=t.j("xRatio");t=t.j("valueRatio"),m(this,e,i,n),(0,window.isNaN)(this.b)&&(this.b=i,this.P=n,this.sb=s,this.Sb=t),this.i=i,this.D=n,this.Ka=s,this.Za=t,this.$a=!0},t.g.ug=function(t){var e=t.j("x"),i=t.j("value"),n=t.j("xRatio");t=t.j("valueRatio"),y(this,e,i,n,t)},t.g.Km=function(){this.G&&S(this,this.bd.ed(this.Gc))},t.g.Rl=function(){this.ea&&!(0,window.isNaN)(this.b)&&(this.Ba||this.G&&!this.K)&&y(this,this.b,this.P,this.sb,this.Sb),v.u.Rl.call(this)},t.H(w,t.lC),t.PG[27]=w,w.prototype.type=27,w.prototype.Gd=function(e){w.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.i=t.bb(t.$a(e.g("startAngle")-90,360)),this.b=this.o/720},w.prototype.EF=function(e,i,s){var a=e.j("zeroRatio"),o=e.j("xRatio");e=e.j("valueRatio");var r=o-this.b;o+=this.b;var l=this.X.Zs(r,[a,e]),h=this.X.Zs(o,[a,e]);i.moveTo(l[2],l[3]),i.Sk.apply(i,n(l[2],l[3],r,e,h[2],h[3],o,e,this.Dc,this.uc,this.Eb,this.f,this.i,!1)),i.lineTo(h[0],h[1]),i.Sk.apply(i,n(h[0],h[1],o,a,l[0],l[1],r,a,this.Dc,this.uc,this.Eb,this.f,this.i,!0)),i.close(),s.pe(t.yg(i))},t.H(x,t.oC),t.PG[25]=x,t.g=x.prototype,t.g.type=25,t.g.Gd=function(e){x.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.bg=t.bb(t.$a(e.g("startAngle")-90,360)),this.me=this.X.iB()},t.g.Qo=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("value"),s=t.j("xRatio");t=t.j("valueRatio"),e.stroke.moveTo(i,n),(0,window.isNaN)(this.ea)&&(this.ea=i,this.fb=n,this.sb=s,this.Sb=t),this.i=i,this.D=n,this.Ka=s,this.Za=t,this.$a=!0},t.g.ug=function(t){var e=t.j("x"),i=t.j("value"),n=t.j("xRatio");t=t.j("valueRatio"),C(this,e,i,n,t)},t.g.QZ=function(){this.ud&&!(0,window.isNaN)(this.ea)&&(this.Ba||this.G&&!this.ec)&&C(this,this.ea,this.fb,this.sb,this.Sb)},t.H(D,t.tC),t.PG[28]=D,D.prototype.type=28,D.prototype.Gd=function(e){D.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.i=t.bb(t.$a(e.g("startAngle")-90,360)),this.b=this.o/720},D.prototype.ug=function(e,i){var s=this.X.Be(),a=e.get(s[1]);s=e.get(s[0]),a=this.nh(a,s),(s={})[a.path]=!0,s[a.qe]=!0,e.j("name",a.path),s=this.bd.ed(i,s);var o=e.j("lowRatio"),r=e.j("xRatio"),l=e.j("highRatio"),h=r-this.b;r+=this.b;var c=this.X.Zs(h,[o,l]),u=this.X.Zs(r,[o,l]),d=s[a.path];d.moveTo(c[2],c[3]),d.Sk.apply(d,n(c[2],c[3],h,l,u[2],u[3],r,l,this.Dc,this.uc,this.Eb,this.f,this.i,!1)),d.lineTo(u[0],u[1]),d.Sk.apply(d,n(u[0],u[1],r,o,c[0],c[1],h,o,this.Dc,this.uc,this.Eb,this.f,this.i,!0)),d.close(),s[a.qe].pe(t.yg(d))},t.H(T,t.j4);var I={};t.rq(I,0,"closed",t.Dq),t.U(T,I),t.g=T.prototype,t.g.my=function(e){return 360*((t.p(e)&&t.J(this.Ra(),t.Qt)?t.St(this.Ra())[e]:this.Ra().sD())||this.Ra().vH()/this.$().Hb())},t.g.n5=function(e){if("center"==e)return"center";var i=this.g("startAngle"),n=this.$().j("xRatio");return i=i-90+360*n,this.sp()&&(t.Mo(e)?i-=this.yu/2:t.No(e)&&(i+=this.yu/2)),i=t.Go(i),0<=(n=(0,t.za)(t.Fo,i))&&0<=(e=(0,t.za)(t.Fo,e))&&(i=t.Fo[(n+e)%8]),i},t.g.oG=function(e){var i=this.$();if(this.sp()&&"auto"!=e&&"center-top"!=e&&"center"!=e&&"center-bottom"!=e){var n=this.yu/720,s=i.j("xRatio"),a=i.j(this.Ah.Ab+"Ratio");i=i.j(this.Ah.zb+"Ratio"),s=t.Mo(e)?s-n:s+n,s=(a=this.Zs(s,[a,i]))[0],n=a[1],i=a[2],a=a[3]}else n=i.j(this.Ah.Ab),s=i.j(this.Ah.Ab+"X"),a=i.j(this.Ah.zb),i=i.j(this.Ah.zb+"X");return t.Ipa(e,s,n,i,a)},t.g.f6=function(){return this.ya.qP()},t.g.yU=function(){return this.g("xPointPosition")},t.g.YD=function(t,e,i,n,s){return t.j("zeroRatio",this.YY),T.u.YD.call(this,t,e,i,n,s)},t.g.F=function(){var e=T.u.F.call(this);return t.Tq(this,I,e),e},t.g.U=function(e,i){t.Iq(this,I,e),T.u.U.call(this,e,i)},t.g.YA=function(t,e,i){if("ordinal"==this.Ra().Ma()){var n=t.get("x"),s=t.get("value"),a=this.ya,o=s,r=this.Ma(),l=this.Ra(),h=this.bb();l=l.Ma();var c=a.g("spreadValues");"none"==c||"marker"!=r||"ordinal"!=l?a=1:(o="value50"===c?h.Xa().eF(o):o,a=a.b[n]&&++a.b[n][o].gaa),o=this.ya,r=this.Ma(),l=this.Ra(),h=this.bb(),l=l.Ma(),"none"==(c=o.g("spreadValues"))||"marker"!=r||"ordinal"!=l?s=1:(s="value50"===c?h.Xa().eF(s):s,s=o.b[n]&&o.b[n][s].count),n=a,a=s,i=(s=i-1/(2*(s=this.Ra().values().length)))+1/(a+1)*(i-s)*2*n}T.u.YA.call(this,t,e,i),t.j("xRatio",i)},t.H(k,t.g4);var E={};t.rq(E,0,"spreadValues",(function(e,i){return t.zk(O,e,i||"none")})),t.U(k,E);var A={},U=5767168|t.QG;A.area={Fb:26,Kb:1,Lb:[t.nH,t.oH,t.qH],Ob:null,Jb:null,Cb:U,Ab:"value",zb:"zero"},A.column={Fb:27,Kb:2,Lb:[t.RH,t.qH],Ob:null,Jb:null,Cb:U,Ab:"value",zb:"zero"},A.line={Fb:25,Kb:1,Lb:[t.oH],Ob:null,Jb:null,Cb:U,Ab:"value",zb:"value"},A.polygon={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:U,Ab:"value",zb:"zero"},A.polyline={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:U,Ab:"value",zb:"value"},A["range-column"]={Fb:28,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:U,Ab:"high",zb:"low"},A.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:1572864|t.QG,Ab:"value",zb:"value"},k.prototype.fj=A,t.Nz(k,k.prototype.fj),t.g=k.prototype,t.g.qP=function(e){return t.p(e)?(e=!!e,this.So!=e&&(this.So=e,this.B(327680),t.Rz(this,this.Ra())),this):this.So},t.g.Ma=function(){return"polar"},t.g.Ss=function(e){return t.zk(P,e,"line")},t.g.IF=function(){return new u},t.g.R0=function(){return new s},t.g.ev=function(){return!1},t.g.zU=function(){return"linear"},t.g.Gt=function(t,e){return new T(this,this,t,e,!1)},t.g.pb=function(){k.u.pb.call(this),function(e){e.b={};var i=e.g("spreadValues");"none"!=i&&(0,t.Pe)(e.hb,(function(t){if(t.enabled()&&"marker"==t.Ma())for(var e=t.Ec(),n="value50"==i;e.advance();){var s=e.get("x"),a=e.get("value");a=n?t.bb().Xa().eF(a):a;var o=this.b[s]&&this.b[s][a];o||(this.b[s]||(this.b[s]={}),o=this.b[s][a]={count:0,gaa:0}),o.count++}}),e)}(this)},t.g.ht=function(t,e,i){k.u.ht.call(this,t,e,i),this.qP(t.sortPointsByX)},t.g.ft=function(t,e,i){k.u.ft.call(this,t,e,i),t.sortPointsByX=this.qP()};var _=k.prototype;_.getType=_.Ma,_.sortPointsByX=_.qP,t.Tp.polar=$,t.E("anychart.polar",$)}.call(this,$)),_.waterfall||(_.waterfall=1,function(t){var e=function(e,i){t.mr(e,i)&&(e.Nl[i]|=e.js[i].Ku)},i=function(t,e){e in t.Nl&&(t.Nl[e]=0)},n=function(){t.V.call(this),t.T(this.ua,[["stroke",0,8192]])},s=function(e){function i(){t.or(this,dt,[ct,ut])}t.Y.call(this),this.Ga("waterfall.arrow"),this.ib=e,t.T(this.ua,[["from",0,4,void 0,i,this],["to",0,4,void 0,i,this]]),this.b=new n,this.b.Ga("waterfall.arrow.connector"),t.K(this.b,this.Tda,this),this.o=!0},a=function(e,i){return t.p(i)&&(e.D=i),e.D},o=function(e,i){return t.p(i)?(e.o=i,e):e.o},r=function(t){return t.i||(t.i=t.O().path()),t.i},l=function(e){return t.p(e.f)||(e.f=e.O().path()),e.f},h=function(e){t.Y.call(this),this.pa=e,this.b=[],this.K=null,this.f=[],t.wl(this)},c=function(t){return t.xa()===t.pa.bb().Ne()},u=function(t,e){return t.pa.Ra().Yv(e)},d=function(t){return t.g("from")},p=function(t){return t.g("to")},g=function(t,e){var i=d(e);return i=u(t,i),0<=X(t.pa,i,"diff")},f=function(e,i,n){var s=n.Zf().g("stroke");s=t.dp(s)/2+2;var a=i.Ip.x>i.kq.x;return i=new t.I(a?i.kq.x:i.Ip.x,i.ur-s,a?i.Ip.x-i.kq.x:i.kq.x-i.Ip.x,2*s),s=n.tk().rb(),n=s.width,s=s.height,e=e.xa()?n:s,i.top-=e,i.height+=e,i},b=function(e,i){var n=W(e.pa,i);0>n.qd()&&(n=new t.I(n.tb(),n.Vb()+n.qd(),n.zd(),-n.qd()));var s=function(e,i){var n=et(e.pa,i);return n=(0,t.Ye)(n,(function(t){return!t.jc().connectorPoint})),(0,t.Wa)(n,(function(e){return e=this.ek(e),this.xa()?new t.I(e.Vb(),e.tb(),e.qd(),e.zd()):e}),e)}(e,i);return(0,t.Pe)(s,(function(e){t.pb(n,e)})),n},v=function(t){t.i=[];for(var e=0;e<Y(t.pa);e++)t.i.push(b(t,e))},m=function(e){return t.p(e.i)||v(e),e.i},y=function(e){var i=[];(0,t.Pe)(e.b,(function(e){var n=d(e),s=p(e),a=u(this,n),r=u(this,s);n=!(0,window.isNaN)(a)&&!(0,window.isNaN)(r)&&n!==s,s=function(e,i,n){return null===t.ya(i,(function(t){return d(n)===d(t)&&p(n)===p(t)}),e)}(this,i,e),o(e,n&&s),i.push(e)}),e)},S=function(e,i,n){var s=t.Ha(m(e));n=(0,t.Wa)(n,(function(t){return f(this,a(t),t)}),e),function(e,i,n){var s=g(e,i),o=c(e),r=a(i),l={kq:r.kq,Ip:r.Ip,ur:r.ur,JV:r.JV},h=f(e,l,i);t.Pa(n,(function(t,e){return s===o?e.Va()-t.Va():t.Vb()-e.Vb()})),(0,t.Pe)(n,(function(t){var e=h;(t=t.so(e)?s===c(this)?t.Vb()-e.Va():t.Va()-e.Vb():0)&&(l.ur+=t,h=f(this,l,i))}),e),a(i,l)}(e,i,s=t.Ga(n,s))},w=function(t,e,i){var n=d(e);return e=p(e),n=u(t,n),t=u(t,e),Math.min(n,t,i)===i},x=function(e,i,n){var s=W(e.pa,n),o=s.zd()/(i.length+1);t.Pa(i,function(e,i){return(0,t.pa)((function(t,e){var n=w(this,t,i),s=w(this,e,i),o=g(this,t);return n!==s?n===(this.xa()!==this.pa.Ra().Ne())?-1:1:o===c(this)?a(t).ur-a(e).ur:a(e).ur-a(t).ur}),e)}(e,n)),(0,t.Pe)(i,(function(t,e){var i=d(t);i=u(this,i);var r=s.tb()+(e+1)*o;i===n?a(t).kq.x=r:a(t).Ip.x=r}),e)},C=function(e){v(e),e.f.length=0;var i=[];(0,t.Pe)(e.b,(function(e){if(e.enabled()&&o(e)){var i=d(e),n=p(e);i=u(this,i);var s=u(this,n),r=m(this);n=r[i],s=r[s],i=0<=X(this.pa,i,"diff"),r=c(this),n=new t.on(n.tb()+n.zd()/2,i===r?n.Vb():n.Va()),s=new t.on(s.tb()+s.zd()/2,i===r?s.Vb():s.Va()),r=i&&c(this)?Math.min(n.y,s.y)-15:Math.max(n.y,s.y)+15,a(e,{kq:n,Ip:s,ur:r,JV:i}),n=d(e),i=p(e),n=u(this,n),i=u(this,i),this.f[n]=this.f[n]||[],this.f[i]=this.f[i]||[],r=d(e),s=p(e),r=u(this,r),u(this,s)>r?(this.f[n].push(e),this.f[i].unshift(e)):(this.f[n].unshift(e),this.f[i].push(e))}}),e),function(e){(0,t.Pe)(e.f,(function(e,i){if(e&&1<e.length){var n=(0,t.Ye)(e,(function(t){return g(this,t)}),this),s=(0,t.Ye)(e,(function(t){return!g(this,t)}),this);x(this,n,i),x(this,s,i)}}),e)}(e),(0,t.Pe)(e.b,(function(t){t.enabled()&&o(t)&&(S(this,t,i),i.push(t))}),e)},D=function(e,i){var n=e.b[i];return!!t.p(n)&&(t.kr(n,e.W_,e),t.Ca(e.b,i,1),t.qd(n),!0)},T=function(e,i){var n=new s(e);return t.p(i)&&(n.N(i),t.K(n,e.W_,e)),e.b.push(n),t.or(e,"arrowsController",["appearance","recalculation"],1),n},k=function(e){return e.K||(e.K=t.ok(),e.K.zIndex(gt)),e.K},$=function(){t.V.call(this),t.T(this.ua,[["stroke",0,8192]])},O=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a)},P=function(t,e){var i=!!t.ya.xa(),n=e.value,s=i?-1:1,a=(i?n.y:n.x)+t.yu/2*s;return{value:i?{x:n.x,y:a+3*s}:{x:a+3*s,y:n.y},connectorPoint:{value:i?{x:n.x,y:a-2*s}:{x:a-2*s,y:n.y}}}},L=function(e,i,n,s){t.my.call(this,e,i,n,s)},G=function(e,i){t.xB.call(this,i,i,mt,{Fb:6,Kb:2,Lb:[t.RH,t.qH],Cb:1572864|t.QG,Ab:"value",zb:"zero"},!1),this.ib=e,t.T(this.ua,[["x",512,16,1048576]])},F=function(t){var e=[];if(t=t.data())for(t=t.$();t.advance();)e.push(t.get("x"));return e},I=function(e){t.Y.call(this),this.pa=e,this.wb=t.ok(),this.wb.zIndex(wt),this.b=[]},E=function(e,i){var n=e.b[i];return!!t.p(n)&&(e.b.splice(i,1),e.pa.ka(),t.qd(n),e.pa.da(!1),e.B(512,1),!0)},A=function(e,i){if(function(e,i){var n=i.name;return t.p(i.x)&&t.p(n)&&!(0,t.Qw)(e.b,(function(t){return t.name()===n}))}(e,i)){e.pa.ka();var n=new G(e,e.pa);return n.ka(),n.N(i),n.kb(e.pa),t.K(n,e.nla,e),n.da(!1),e.b.push(n),e.pa.da(!1),e.B(512,1),n}return null},U=function(t){for(var e=[],i=0;i<t.b.length;i++)e.push(t.b[i]);return e},_=function(){function i(){var t=st(this);e(this,"waterfall"),t.B(t.sa)}t.WB.call(this),this.Ga("waterfall"),this.re="waterfall",this.fh=[],this.nf=[],this.me=[],this.Od=[],t.T(this.ua,[["dataMode",360448,1,void 0,i],["drawTotalsAsAbsolute",360448,1,void 0,i]])},j=function(e){for(var i=[],n=0;n<e.hb.length;n++){var s=e.hb[n];if(s&&s.enabled()&&(s=s.data()))for(s=s.$();s.advance();){var a=s.get("x");t.Aa(i,a)||i.push(a)}}return i},M=function(t,e,i){return i/=2,e+(t.xa()^(t=t.Ra().Ne())?-i:i)},N=function(e,i,n){if(J(e,i)&&J(e,n)){var s=W(e,i);n=W(e,n);for(var a,o=e.Re.length-1;0<=o&&(a=e.Re[o].data[i].j.connectorValue,!t.p(a));o--);return i=M(e,t.sb(s).x,new t.lb(s.width,s.height).width),a=e.bb().transform(a),o=e.fc,e.xa()?(s=o.left,o=o.width):(s=o.Va(),o=-o.height),{from:{x:i,y:a=s+a*o},Je:{x:e=M(e,t.sb(n).x,-new t.lb(n.width,n.height).width),y:a}}}},B=function(t){var e=t.labels().g("position");return 1<t.tj()&&("auto"===e||"outside"===e)},R=function(t,e,i,n){for(t=!!t.xa();0<=i;i--){var s=e[i],a=s.Ta,o=t?a.left:a.top;if(a=t?a.width:a.height,(0,window.isNaN)(n))n=o+a;else{var r=a/2;o=(s=s.label).jc();var l=t?o.value.x:o.value.y;l-r<n?(r=n+r,n+=a,s.jc({value:t?{x:r,y:o.value.y}:{x:o.value.x,y:r},connectorPoint:o.connectorPoint}),s.W()):n=l+r}}},H=function(t,e,i,n){for(t=!!t.xa();i<e.length;i++){var s=e[i],a=s.Ta,o=(a=t?a.width:a.height)/2,r=(s=s.label).jc(),l=t?r.value.x:r.value.y;l+o>n?(o=n-o,n-=a,s.jc({value:t?{x:o,y:r.value.y}:{x:r.value.x,y:o},connectorPoint:r.connectorPoint}),s.W()):n=l-o}},z=function(e,i){var n=e.em[i],s=!!e.xa(),a=!!e.bb().Ne();if(n){var o=n.Uda,r=n.Lka;if(n=n.labels)if(o){o=s?o.mi:o.Pe;var l=s?r.left:r.top;r=s?r.width:r.height,t.Wm(o,l,1)?s^a?H(e,n,0,o):R(e,n,n.length-1,o):t.Wm(o,l+r,1)?s^a?R(e,n,n.length-1,o):H(e,n,0,o):(a=function(e,i,n){var s=!!e.xa();return t.Na(i,n,(function(t,e){var i=s?e.Ta.left:e.Ta.top,n=i+(s?e.Ta.width:e.Ta.height);return i>t?1:n<t?-1:0}))}(e,n,o),0<=a?(r=n[a],.5<=(o-(l=s?r.Ta.left:r.Ta.top))/(s?r.Ta.width:r.Ta.height)?(R(e,n,a-1,o),H(e,n,a,o)):(R(e,n,a,o),H(e,n,a+1,o))):(r=n[0],(l=s?r.Ta.left:r.Ta.top)>o?R(e,n,n.length-1,window.NaN):H(e,n,0,window.NaN)))}else R(e,n,n.length-1,window.NaN)}},V=function(e){var i=e.nf.pop()||new t.Fw;return e.me.push(i),i},q=function(e){var i=e.J(4)||t.rr(e,"waterfall","stackLabels"),n=e.yJ();i&&(n.clear(),(0,t.Gg)(e.hb,(function(t,e){return e.enabled()?t+1:t}),0)&&n.g("enabled")&&function(e){e.qc||(e.qc=e.Na.Bd(),e.qc.zIndex(40),e.i.O(e.qc)),e.qc.clip(e.fc);for(var i=e.i.anchor(),n=e.i.position(),s=0;s<e.Re[0].data.length;s++){for(var a=e,o=s,r=!1,l=0;l<a.Re.length;l++){var h=a.Re[l],c=h.X.Ma()===mt;r=r||c&&!h.data[o].j.missing}!r&&J(e,s)&&(a=e,r=s,"auto"===(o=n)&&(l=a.xa(),h=a.bb().Ne(),o=0<=X(a,r,"diff")?"center-top":"center-bottom",o=t.Jo(o,h?180:0),o=t.Jo(o,l?-90:0)),a="auto"===i?t.Jo(o,180):i,r=K(e,s),o={value:{x:(o=t.Eo(r,o)).x,y:o.y}},l=s,h=V(r=e),c=X(r,l,"absolute"),r=t.ov(h,{index:{value:l,type:"number"},value:{value:c,type:"number"},total:{value:c,type:"number"},stack:{value:X(r,l,"diff",!0),type:"number"}}),(l=(l=e.i.be(s))?l:e.i.add(null,null,s)).Hf(r),l.jc(o),l.anchor(a))}e.i.W()}(e)),n.I(n.sa)},W=function(e,i){var n=(0,t.Gg)(e.Re,(function(t,e){return Math.max(e.X.yu,t)}),-window.Infinity),s=e.Re[0].data[i].j.valueX-n/2,a=Q(e,i),o=tt(e,i),r=a;return a=Math.min(a,o),o=Math.max(r,o),t.kn(s,a,n,o-a)},K=function(e,i){for(var n,s=0;s<e.Re.length;s++){var a=e.Re[s].data[i].j;a.missing||(a=t.Ic(a.shapes,(function(t){return!!t.parent()})).rb(),(0,window.isNaN)(a.left)||(0,window.isNaN)(a.top)||(0,window.isNaN)(a.width)||(0,window.isNaN)(a.height)||(n=n||a.clone(),t.pb(n,a)))}return n},Y=function(t){return t.Re.length?t.Re[0].data.length:0},X=function(e,i,n,s){for(var a=0,o=0;o<e.Re.length;o++){var r=e.Re[o].data[i];r.j.missing||(a+=s?e.mU(r):t.p(r.j[n])?r.j[n]:r.data.value)}return a},J=function(e,i){return(0,t.Gg)(e.Re,(function(t,e){return t||!(e.data[i].j.missing||e.data[i].j.skipDrawing)}),!1)},Z=function(e,i){return(0,t.Gg)(e.Re,(function(t,e){return t||e.data[i].j.isTotal||e.data[i].j.isSplit}),!1)&&!!i},Q=function(t,e){for(var i=-window.Infinity,n=0;n<t.Re.length;n++){var s=t.Re[n].data[e].j;s.missing||(i=Math.max(i,s.zero,s.value))}return i},tt=function(t,e){for(var i=window.Infinity,n=0;n<t.Re.length;n++){var s=t.Re[n].data[e].j;s.missing||(i=Math.min(i,s.zero,s.value))}return i},et=function(t,e){for(var i=[],n=0;n<t.Re.length;n++){var s=t.Re[n].data[e].j.label;s&&s.ic("enabled")&&i.push(s)}return(n=t.yJ()).enabled()&&(n=n.be(e))&&i.push(n),i},it=function(e){t.nr(e,"waterfall","totals"),st(e).B(512)},nt=function(e){return t.p(e.o)||(e.o=new h(e),t.K(e.o,e.vda,e)),e.o},st=function(e){return e.Hd||(e.Hd=new I(e),t.K(e.Hd,e.ola,e)),e.Hd},at=function(e){t.JA.call(this,e)},ot=function(t){var e=new _;e.Wg(),e.$c();for(var i=0,n=arguments.length;i<n;i++)e.waterfall(arguments[i]);return e},rt={Vla:"absolute",aoa:"diff"};t.H(n,t.V);var lt={};t.sq(lt,[[1,"stroke",t.Pq]]),t.U(n,lt),n.prototype.ra=8192,n.prototype.F=function(){var e=n.u.F.call(this);return t.Tq(this,lt,e),e},n.prototype.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,lt,e,i)},t.H(s,t.Y);var ht={};t.sq(ht,[[0,"from",t.Cq],[0,"to",t.Cq]]),t.U(s,ht);var ct="labels",ut="appearance",dt="waterfallArrow";t.Jz(s,dt,[ct,ut]),t.g=s.prototype,t.g.ra=40964,t.g.W=function(){if(this.zc()){if(this.J(4)&&(t.or(this,dt,[ct,ut]),this.I(4)),t.rr(this,dt,ut)&&o(this)){this.Jt(),l(this).clear();var e=this.Zf().g("stroke"),n=t.dp(e),s=a(this);n=new t.on(t.R(s.Ip.x,n),t.R(s.Ip.y,n));var r=l(this);s=s.JV===c(this.ib)?-10:10;var h=this.ib.xa();t.HA(r,h,n.x,n.y),t.IA(r,h,n.x-5,n.y+s),t.IA(r,h,n.x+5,n.y+s),t.IA(r,h,n.x,n.y),r.fill(e),r.stroke("none")}t.rr(this,dt,ct)&&o(this)&&this.tf(),o(this)||this.remove(),i(this,dt)}},t.g.Jt=function(){r(this).clear();var e=a(this),i=r(this);i.zIndex(gt);var n=this.Zf().g("stroke"),s=t.dp(n),o=new t.on(t.R(e.kq.x,s),t.R(e.kq.y,s)),l=new t.on(t.R(e.Ip.x,s),t.R(e.Ip.y,s));e=t.R(e.ur,s),i.stroke(n),n=this.ib.xa(),t.HA(i,n,o.x,o.y),t.IA(i,n,o.x,e),t.IA(i,n,l.x,e),t.IA(i,n,l.x,l.y)},t.g.tf=function(){var e=this.tk();if(this.label().enabled()){t.Px(e,this.ib.xl);var i=a(this);i=this.ib.xa()?new t.I(i.ur,i.kq.x,0,i.Ip.x-i.kq.x):new t.I(Math.min(i.kq.x,i.Ip.x),i.ur,Math.abs(i.Ip.x-i.kq.x),0),t.Wx(e,i),t.Qx(e)}else t.Px(e,null)},t.g.remove=function(){t.Px(this.tk(),null),r(this).clear(),l(this).clear()},t.g.label=function(e){return this.zj||(this.zj=new t.Hx,this.zj.Ga("defaultFontSettings","waterfall.arrow.label"),t.K(this.zj,this.lI,this)),t.p(e)?(this.zj.N(e),this):this.zj},t.g.lI=function(){t.or(this,dt,[ut,ct],4)},t.g.tk=function(){return t.p(this.kc)||(this.kc=new t.Ix),this.kc},t.g.Zf=function(){return this.b},t.g.Tda=function(){t.nr(this,dt,ut,8192)},t.g.U=function(e,i){s.u.U.call(this,e,i),this.label().ga(!!i,e.label),this.Zf().ga(!!i,e.connector),t.Iq(this,ht,e,i)},t.g.F=function(){var e=s.u.F.call(this);return t.Tq(this,ht,e,void 0,void 0,!0),e.label=this.label().F(),e.connector=this.Zf().F(),e},t.g.R=function(){this.ib=null,t.sd(this.i,this.f,this.kc,this.b),s.u.R.call(this)};var pt=s.prototype;pt.connector=pt.Zf,pt.label=pt.label,t.H(h,t.Y),h.prototype.ra=1|t.Y.prototype.ra|t.KE|t.LE,t.Jz(h,"arrowsController",["recalculation","appearance"]);var gt=41;t.g=h.prototype,t.g.xa=function(){return this.pa.xa()},t.g.ek=function(t){return t.Rh().rb()},t.g.Hx=function(){(0,t.Pe)(this.b,(function(e){if(o(e)){var i=e.label();i.Ug(),i=i.flatten();var n=e.label().g("anchor"),s=this.xa();i.anchor="auto"===n?s?"right-center":"center-top":n,n=e.label().g("position"),s=this.xa(),i.position="auto"===n?s?"left-center":"center":n,n=e.tk();var a=d(e);s=p(e),a=u(this,a);var r=u(this,s),l=this.pa;(s=V(l)).Li([l]),a=X(l,a,"absolute"),r=X(l,r,"absolute")-a,s=t.ov(s,{value:{value:r,type:"number"},absolute:{value:r,type:"number"},percent:{value:0==a?"-":r/Math.abs(a),type:0==a?"string":"percent"}}),e=e.label().tk(s),n.text(e),n.style(i),t.Mx(n),n.Ij()}}),this)},t.g.W=function(){if(this.b.length){if(function(e){e.Lf||(e.xl=t.mg().Wo(),e.Lf=t.uk(e.xl),e.Lf.zIndex(42));var i=e.Lf,n=k(e),s=e.sl();e.O().hc(s),s.hc(n).hc(i),s.clip(e.pa.dg())}(this),this.J(4)&&((0,t.Pe)(this.b,(function(t){t.ka(),t.B(4),t.da(!1)}),this),t.or(this,"arrowsController",["recalculation","appearance"]),this.I(4)),t.rr(this,"arrowsController","recalculation")&&(y(this),this.Hx(),this.va(t.LE|t.KE),t.vl.measure(),C(this),t.pr(this,"arrowsController","recalculation")),t.rr(this,"arrowsController","appearance")){var e=k(this);(0,t.Pe)(this.b,(function(i){i.O(e),t.jr(i),i.W()}),this)}i(this,"arrowsController")}else i(this,"arrowsController"),this.I(4294967295)},t.g.W_=function(i){var n=["appearance"];(t.X(i,4)||t.X(i,32768))&&(n.push("recalculation"),(0,t.Pe)(this.b,(function(t){t.ka(),e(t,"arrowsController"),t.da(!1)}),this)),t.or(this,"arrowsController",n,1)},t.g.sl=function(){return this.Oa||(this.Oa=t.ok(),this.Oa.zIndex(gt)),this.Oa},t.g.U=function(e,i){h.u.U.call(this,e,i),(0,t.Pe)(e,(function(t){T(this,t)}),this)},t.g.F=function(){var e=[];return(0,t.Pe)(this.b,(function(t){e.push(t.F())}),this),e},t.g.R=function(){t.sd(this.b,this.K,this.Lf),h.u.R.call(this)},t.g.Uw=function(){return(0,t.Wa)(this.b,(function(t){return t.tk()}),this)},t.H($,t.V);var ft={};t.sq(ft,[[1,"stroke",t.Pq]]),t.U($,ft),t.g=$.prototype,t.g.ra=12288,t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(){this.va(4096)},t.g.F=function(){var e=$.u.F.call(this);return t.Tq(this,ft,e),e.labels=this.labels().F(),e},t.g.U=function(e,i){$.u.U.call(this,e,i),this.labels().ga(!!i,e.labels),t.Iq(this,ft,e,i)},t.g.R=function(){t.qd(this.Da),$.u.R.call(this)};var bt=$.prototype;bt.labels=bt.labels,t.H(O,t.xB),t.g=O.prototype,t.g.sF={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x","%Diff":"diff","%Absolute":"absolute","%IsTotal":"isTotal"},t.g.AE=function(t,e){if("inside"==t||"outside"==t)return"center";if("auto"==t){if(1<this.ya.tj())return"center";t="value"}return O.u.AE.call(this,t,e)},t.g.Bh=function(t,e){return!B(this.ya)||"inside"!=t&&"outside"!=t||(t="center"),"auto"==t&&(t=1<this.ya.tj()?"center":"value"),O.u.Bh.call(this,t,e)},t.g.mha=function(t,e){return t&&e&&0<e.Ta.top-t.Ta.top?1:-1},t.g.nha=function(t,e){return t&&e&&0<e.Ta.left-t.Ta.left?1:-1},t.g.iA=function(e,i,n,s,a,o,r,l){return(e=O.u.iA.call(this,e,i,n,s,a,o,r,l,!0))&&a&&(n=(a=this.ya.ek(e)).width,s=a.height,i=t.oa(e),o=r.j("value"),l=r.j("zero"),o=Math.abs(o-l),o=(i={uid:i,fha:n=this.ya.xa()?n>o:s>o,label:e,Ta:a}).fha,l=e.ic("position"),n=e.jc(),a=(s=!!this.ya.xa())?"center-bottom":"left-center","outside"==l?(i=P(this,n),e.jc(i),e.qk(a)):"inside"==l?e.enabled(!o):o&&B(this.ya)&&(r=r.get("x"),this.ya.em[r]=this.ya.em[r]||{},this.ya.em[r].labels=this.ya.em[r].labels||[],this.ya.em[r].AY=this.ya.em[r].AY||{},(o=i.uid)in this.ya.em[r].AY||(this.ya.em[r].AY[o]=i,t.Ua(this.ya.em[r].labels,i,s?this.nha:this.mha)),i=P(this,n),e.jc(i),e.qk(a),this.ya.em.YH&&z(this.ya,r)),e.W()),e},t.g.ym=function(t,e){var i=O.u.ym.call(this,t,e);return i.diff={value:e.j("diff"),type:"number"},i.absolute={value:e.j("absolute"),type:"number"},i.isTotal={value:e.j("isTotal"),type:""},i},t.g.oV=function(){return{prevValue:0,C2:!1,Zha:"absolute"==this.ya.g("dataMode")}},t.g.XW=function(e,i,n){var s=-1<(0,t.za)(this.vm||[],i.j.rawIndex),a=e.get("isTotal"),o=!!i.j.missing||s;if(a=(s=!(n.C2||o))||(t.p(a)?!!a:o),!o||!s&&a){var r=this.ya.g("drawTotalsAsAbsolute");r=a&&r&&!o;var l=+i.data.value;o=n.Zha?o?n.prevValue:l:n.prevValue+(o?0:l),r&&(o=l),i.j.absolute=o,i.j.diff=r&&!s?0:o-n.prevValue,i.j.isTotal=a,i.j.missing=0,e=e.get("drawConnector"),i.j.drawConnector=!t.p(e)||e,n.C2=!0,n.prevValue=r&&!s?n.prevValue:o}else i.j.missing=1},t.g.jS=function(t){return"value"==t?0<=(Number(this.$().j("diff"))||0):O.u.jS.call(this,t)},t.g.kH=function(t){return t.j("isTotal")?t.get("value"):t.j("diff")},t.H(L,t.my),L.prototype.label=function(t){return this.labels(t)},L.prototype.U=function(t,e){L.u.U.call(this,t,e),"label"in t&&this.label(t.label)};var vt=L.prototype;vt.label=vt.label,t.H(G,t.xB);var mt="total",yt={};t.sq(yt,[[0,"x",t.zq]]),t.U(G,yt),t.Gq(G,["label"],"normal"),t.g=G.prototype,t.g.getData=function(){var e=[],i=j(this.ya),n=this.g("x"),s=this.name();if(function(e){var i=e.name();return!(0,t.Qw)(U(e.ib),(function(t){return!(t===e||!t.g("enabled")||i!==t.name())}))&&!(0,t.Qw)(j(e.ya),(function(t){return i===t}))}(this)){for(var a=this.ya,o=a.Ra().values(),r="diff"===a.g("dataMode"),l=!!a.g("drawTotalsAsAbsolute"),h=0,c=0;c<a.hb.length;c++){var u=a.hb[c];if(u&&u.enabled()){var d=u.data();if(d){d=d.$(),u=u.vm||[];for(var p=0,g=0;d.advance();){var f=d.ma();if((-1!==(0,t.za)(o,d.get("x"))||!o.length)&&-1===(0,t.za)(u,f)){if(f=d.get("value"),t.ea(f)){var b=d.get("isTotal");b=l&&b&&0<d.ma(),r?p+=b?0:f:g=b?g:f}if(n===d.get("x"))break}}h+=r?p:g}}}for(a=h,e.push({x:this.name(),name:s,isTotal:!0,value:a}),s=this.ya.hY(),i=i[i.length-1],o=j(this.ya),l=U(this.ib),r=0;r<l.length;r++)o.push(l[r].name());if(t.A(s)){for(l=!0,r=0;r<s.length;r++)c=(h=s[r]).value,h=h.name,c=t.ea(c)&&(0<=a&&0<=c||0>a&&0>c),d=t.p(h)&&-1===(0,t.za)(o,h),o.push(h),l=l&&d&&c;o=l}else o=!1;if(o&&i===n){for(n=[],o=i=0;o<s.length;o++)(r=s[o]).isSplit=!0,r.x=r.name,i+=r.value,n.push(r);for(n.length&&(Math.abs(i)>Math.abs(a)?n=[]:Math.abs(i)<Math.abs(a)&&((s={name:"Other",x:"Other",isSplit:!0}).value=-(i-a),n.push(s))),i=0;i<n.length;i++)e.push(n[i])}}return e},t.g.nN=function(t,e,i){return new L(t,e,i,void 0)},t.g.EP=function(){return!1},t.g.aO=function(){return!1},t.g.Ii=function(){return this},t.g.AE=function(e,i){return"auto"==e&&(e=0<=this.$().get("value")?"center-top":"center-bottom",e=t.Jo(e,this.g("isVertical")?-90:0),e=t.Jo(e,this.bb().Ne()?-180:0)),G.u.AE.call(this,e,i)},t.g.Bh=function(e,i){return"auto"===e&&(e=0<=this.$().get("value")?"center-top":"center-bottom",e=t.Jo(e,this.g("isVertical")?-90:0),e=t.Jo(e,this.bb().Ne()?-180:0)),G.u.Bh.call(this,e,i)},t.g.wU=function(){var t=G.u.wU.call(this);return t.push("waterfall.total"),t},t.g.oV=function(){return{$P:0}},t.g.XW=function(t,e,i){t=!!e.j.rawIndex,e.j.isSplit=t,e.j.isTotal=!t,t?(t=i.$P-e.data.value,e.j.valueOfPreviousPoint=t,i.$P=t):i.$P=e.data.value,e.j.connectorValue=i.$P},t.g.kH=function(t){return t.get("value")+(t.j("valueOfPreviousPoint")||0)},t.g.O3=function(t,e,i,n,s){i=this.bb();var a={};return a[e[0]]=i.transform(i.Lz(this.kH(t),this.Rx),.5),this.YA(t,a,s),n},t.g.YD=function(e,i,n,s,a){return G.u.YD.call(this,e,i,n,s,a),e.j("isSplit")&&(i=e.j("valueOfPreviousPoint"),i=t.Za(this.bb().transform(i,.5),0,1),e.j("zero",this.Zs(a,[i])[1])),s},t.g.ym=function(e,i){if(i.j("isSplit")){var n=i.get("value"),s=i.ma(),a=this.Ra().names();n={name:{value:t.p(a[s])?a[s]:i.get("name"),type:"string"},value:{value:n,type:"number"},index:{value:i.ma()-1,type:"number"},isSplit:{value:!0,type:""}}}else{n=U(this.ib),s=i.get("value"),a=i.ma();var o=this.Ra().names();n={name:{value:t.p(o[a])?o[a]:i.get("name"),type:"string"},value:{value:s,type:"number"},index:{value:(0,t.za)(n,this),type:"number"},x:{value:this.g("x"),type:"string"},isTotal:{value:!0,type:""}}}return n},t.g.vC=function(t,e,i,n){G.u.vC.call(this,t,e,i,n),this.name(t.name)},t.g.j4=function(){this.B(512,16)},t.g.F=function(){var e=G.u.F.call(this);return t.Tq(this,yt,e),e.normal=this.Qa().F(),e.hovered=this.lb().F(),e},t.g.R=function(){this.ib=null,G.u.R.call(this)},t.g.U=function(e,i){G.u.U.call(this,e,i),t.Iq(this,yt,e,i),this.Qa().U(e),"normal"in e&&this.Qa().U(e.normal,i),"hovered"in e&&this.lb().U(e.hovered,i)};var St=G.prototype;St.x=St.x,St.label=St.label,t.H(I,t.wu);var wt=30;t.g=I.prototype,t.g.ra=1,t.g.sa=516,t.g.W=function(){if(this.zc()){if(this.wb.parent()||this.wb.parent(this.O()),this.wb.clip(this.ja()),"ordinal"==this.pa.Ra().Ma()){t.xr(this.b);for(var e=this.pa.Ra().values(),i=0;i<this.b.length;i++){var n=this.b[i];n.ta("isVertical",this.pa.xa()),n.O(0<=(0,t.za)(e,n.g("x"))?this.wb:null),n.ja(this.ja())}for(t.zr(this.b),e=0;e<this.b.length;e++)this.b[e].W()}this.I(512)}},t.g.pb=function(){if(this.J(512)){for(var t=0;t<this.b.length;t++){var e=this.b[t];e.g("enabled")&&(e.ka(),e.data(e.getData()),e.da(!1))}this.I(512)}},t.g.nla=function(e){t.X(e,16)&&this.B(512),this.dispatchEvent(e)},t.g.R=function(){t.sd(this.wb,this.b),this.wb=null,this.b.length=0,I.u.R.call(this)},t.g.U=function(t,e){I.u.U.call(this,t,e);for(var i=0;i<t.length;i++)A(this,t[i])},t.g.F=function(){for(var t=I.u.F.call(this),e=[],i=0;i<this.b.length;i++)e.push(this.b[i].F());return t.totals=e,t},t.H(_,t.WB),t.Jz(_,"waterfall",["arrows","connectorsLabels","stackLabels","totals"]);var xt={};xt.waterfall={Fb:32,Kb:2,Lb:[t.AH,t.EH,t.FH,t.JH,t.RH,t.qH],Ob:null,Jb:null,Cb:5767168|t.QG,Ab:"value",zb:"zero"},_.prototype.fj=xt,t.Nz(_,_.prototype.fj),t.g=_.prototype,t.g.Ss=function(){return"waterfall"},t.g.uH=function(){return"value"},t.g.ps=function(){},t.g.mU=function(t){return+t.j[t.j.isTotal?"absolute":"diff"]},t.g.P4=function(t,e,i,n){var s,a=0,o=[];for(s=0;s<t.length;s++){var r=t[s];r.X.Ma()!==mt&&o.push(r)}if(t=o,e)for(s=0;s<t.length;s++){var l=t[s].data[e-1];a+=Number(l.j.diff)||0}for(this.bj=[],s=e;s<=i;s++){for(o=e=0;o<t.length;o++)(l=t[o].data[s]).j.isTotal||(l.j.stackedZero+=a,l.j.stackedValue+=a,l.j.stackedZeroPrev+=a,l.j.stackedValuePrev+=a,l.j.stackedZeroNext+=a,l.j.stackedValueNext+=a),n.Xc(l.j.stackedValue),n.Xc(l.j.stackedValuePrev),n.Xc(l.j.stackedValueNext),e+=l.j.missing?0:Number(l.j.diff)||0;a+=e,l.j.connectorValue=a,this.bj.push(a)}},t.g.pb=function(){st(this).pb(),_.u.pb.call(this)},t.g.Qh=function(e){_.u.Qh.call(this,e),(t.rr(this,"waterfall","totals")||this.J(4))&&((e=st(this)).O(this.Na),e.ja(this.fc),e.W(),t.pr(this,"waterfall","totals")),this.Jt(),this.wi(),e=nt(this),this.K||(this.K=this.Na.Bd(),this.K.zIndex(gt),e.O(this.K));var i=t.rr(this,"waterfall","arrows"),n=this.J(4);if(n&&e.B(4),(i||n)&&(e.W(),t.pr(this,"waterfall","arrows")),B(this)&&(e=this.Ra(),e=this.xn[String(t.oa(e))][0]))for(this.em.YH=!0,e=e.qt,i=0;i<e.length;i++)z(this,e[i])},t.g.aL=function(){_.u.aL.call(this),(0,t.Qw)(this.hb,(function(t){return!(!t||t.md||!t.zc())}))&&(this.em={YH:!1})},t.g.Jt=function(){this.P?this.P.clear():this.P=t.qk();var e=this.Ra();if((e=this.xn[String(t.oa(e))])&&e.length){e=this.nj().g("stroke"),this.P.stroke(e),e=t.$b(e),this.P.parent(this.O()),this.P.zIndex(1e3),this.P.clip(this.dg());for(var i,n=this.xa(),s=0;s<this.Re[0].data.length;s++)if(J(this,s)){if(t.p(i)){var a=this.Re[0].data[i].j.drawConnector;if(a=!t.p(a)||a){var o=N(this,i,s);a=this.Re[0].data[i].data.x;var r=o.from.x,l=o.from.y,h=o.Je.x;o=o.Je.y,t.HA(this.P,n,r,t.R(l,e)),t.IA(this.P,n,h,t.R(o,e)),r=n?{mi:l,Pe:r,Kla:o,Nla:h}:{mi:r,Pe:l,Kla:h,Nla:o},this.fh.push(r),this.em[a]=this.em[a]||{},this.em[a].Uda=r,this.em[a].Lka=W(this,i)}}i=s}}},t.g.Gt=function(t,e){return new O(this,this,t,e,!0)};var Ct={};t.rq(Ct,0,"dataMode",(function(e,i){return t.zk(rt,e,i||"absolute")})),t.rq(Ct,0,"drawTotalsAsAbsolute",t.Dq),t.U(_,Ct),t.g=_.prototype,t.g.CS=function(){var e=_.u.CS.call(this),i=this.PM();if(!t.Jc(i)){var n=t.oa(this.Ra()),s=st(this),a=i[n].Lp;n=i[n].qt,i=[];for(var o=0;o<s.b.length;o++){var r=s.b[o];r.g("enabled")&&-1!==(0,t.za)(n,r.name())&&i.push(t.AB(r,a,n,!1))}for(s=0;s<i.length;s++)e.push(i[s])}return e},t.g.PM=function(){var e=_.u.PM.call(this);if(!t.Jc(e)){var i=t.oa(this.Ra()),n=e[i].qt;i=e[i].Lp;for(var s=this.IR(),a={},o=0;o<s.length;o++){var r=s[o];if(r.g("enabled")){var l=r.g("x");a[l]||(a[l]=[]),a[l].push.apply(a[l],F(r))}}for(var h in a)o=a[h],-1!==(s=t.xa(n,(function(t){return h==t})))&&t.qa(t.Ca,n,s+1,0).apply(null,o);for(o=0;o<n.length;o++)i[a=t.qo(n[o])]=o}return e},t.g.ek=function(e){var i=e.Rh().rb();return e=e.ic("padding"),t.Ku(i,e)},t.g.wi=function(){!function(e){(0,t.Pe)(e.me,(function(t){this.nf.push(t)}),e),e.me.length=0}(this),q(this);var e=this.J(4)||t.rr(this,"waterfall","connectorsLabels"),i=this.nj().labels();if(e){if(this.nj().ka(),i.clear(),i.g("enabled")&&this.tj()){e=this.nj().labels(),this.sb||(this.sb=this.Na.Bd(),this.sb.zIndex(31),e.O(this.sb)),this.sb.clip(this.fc);for(var n,s,a=e.g("anchor"),o=e.g("position"),r=0;r<this.Re[0].data.length;r++)if(J(this,r)){if(n=r,t.p(s)&&!Z(this,n)){var l=X(this,r,"diff"),h=this.Re[0].qt[r],c=a,u=o,d=l;"auto"===c&&("auto"===u?(c=this.xa()?["left-center","right-center"]:["center-bottom","center-top"],c=0<=d?c[0]:c[1]):c="center"===u?"center":t.Jo(u,180)),d=c,"auto"===(c=o)?(c=this.xa()?["right-center","left-center"]:["center-top","center-bottom"],l=0<=l?c[0]:c[1]):l=c;var p=N(this,s,n);c=Math.min(p.from.x,p.Je.x),u=Math.min(p.from.y,p.Je.y);var g=Math.max(p.from.x,p.Je.x);p=Math.max(p.from.y,p.Je.y),c=this.xa()?t.kn(u,c,p-u,g-c):t.kn(c,u,g-c,p-u),l={value:t.Eo(c,l)},g=s,c=n,(s=V(this)).Li([this]),u=(c=X(this,c,"diff"))/Math.abs(X(this,g,"diff")),g=c/Math.abs(X(this,g,"absolute")),p=(0,window.isFinite)(u);var f=(0,window.isFinite)(g);s=t.ov(s,{value:{value:c,type:"number"},stack:{value:p?u:"-",type:p?"percent":"string"},total:{value:f?g:"-",type:f?"percent":"string"}}),(s=e.add(s,l,r)).ta("anchor",d),this.em[h]=this.em[h]||{},this.em[h].ota=s}s=n}e.W()}this.nj().da(!1)}i.I(i.sa),t.pr(this,"waterfall","connectorsLabels"),t.qr(this,"waterfall",["stackLabels","connectorsLabels"])},t.g.Kn=function(e){t.X(e,1)&&(t.jr(nt(this)),t.nr(this,"waterfall","arrows")),_.u.Kn.call(this,e)},t.g.Mka=function(){t.jr(nt(this)),t.or(this,"waterfall",["stackLabels","arrows"],1)},t.g.yJ=function(e){return this.i||(this.i=new t.Pu,t.W(this,"stackLabels",this.i),this.i.I(this.i.sa),t.K(this.i,this.Mka,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.i.N(e),this):this.i},t.g.Ms=function(){return!0},t.g.Ol=function(e,i){var n=[];if("categories"==e){this.ba={};for(var s,a,o,r=this.Ue(),l={},h=0,c=0;c<r.length;c++)s=r[c],a=(a=t.cm("risingFill",1,!1))(s,t.gm,!0,!0),(o=t.qo(a))in l?this.ba[l[o]].X.push(s):(l[o]=h,this.ba[h]={X:[s],type:"rising"},n.push({text:"Increase",categoryType:"increase",iconEnabled:!0,iconFill:a,sourceUid:t.oa(this),sourceKey:h++})),a=(a=t.cm("fallingFill",1,!1))(s,t.gm,!0,!0),(o=t.qo(a))in l?this.ba[l[o]].X.push(s):(l[o]=h,this.ba[h]={X:[s],type:"falling"},n.push({text:"Decrease",categoryType:"decrease",iconEnabled:!0,iconFill:a,sourceUid:t.oa(this),sourceKey:h++})),a=(a=t.cm("fill",1,!1))(s,t.gm,!0,!0),(o=t.qo(a))in l?this.ba[l[o]].X.push(s):(l[o]=h,this.ba[h]={X:[s],type:"total"},n.push({text:"Total",categoryType:"total",iconEnabled:!0,iconFill:a,sourceUid:t.oa(this),sourceKey:h++}))}else n=_.u.Ol.call(this,e,i);return n},t.g.wq=function(t,e){if("categories"!=this.eg().g("itemsSourceMode"))return _.u.wq.call(this,t,e);var i=t.Ki();if("total"===this.ba[i].type)for(var n=U(st(this)),s=0;s<n.length;s++)n[s].Tj();i=(n=this.ba[i]).X,n=n.type;for(var a,o,r,l,h,c=0;c<i.length;c++){for(a=(s=i[c]).cg(),h=[];a.advance();){var u=a.ma();a.j("missing")||(o=a.j("isTotal"),r=0<=a.j("diff")&&!o,l=0>a.j("diff")&&!o,(o=o&&"total"==n||r&&"rising"==n||l&&"falling"==n)&&h.push(u))}s.Tj(h)}},t.g.vq=function(t,e){if("categories"!=this.eg().g("itemsSourceMode"))return _.u.vq.call(this,t,e);this.Md()},t.g.zr=function(t,e){if("default"==this.eg().g("itemsSourceMode"))return _.u.zr.call(this,t,e)},t.g.FE=function(e){t.or(this,"waterfall",["arrows","stackLabels","totals"]),t.X(e,32788)&&st(this).B(512),_.u.FE.call(this,e)},t.g.uV=function(){_.u.uV.call(this),t.or(this,"waterfall",["stackLabels","connectorsLabels"])},t.g.kda=function(e,i,n,s,a){t.kl(405,null,["chart.connectorStroke()","chart.connectors().stroke()"],!0);var o=this.nj();return arguments.length?o.stroke.apply(o,arguments)&&this:o.stroke()},t.g.nj=function(e){return this.Kj||(this.Kj=new $,t.W(this,"connectors",this.Kj),t.K(this.Kj,this.Wda,this)),t.p(e)?(this.Kj.N(e),this):this.Kj},t.g.Wda=function(e){t.X(e,8192)&&this.B(32768,1),t.X(e,4096)&&t.nr(this,"waterfall","connectorsLabels",1)},t.g.jda=function(e){return t.C(e)?A(st(this),e):null},t.g.qda=function(e){var i=st(this);return E(i,(0,t.za)(i.b,e))},t.g.rda=function(t){return E(st(this),t)},t.g.nda=function(t){return st(this).b[t]||null},t.g.IR=function(){return U(st(this))},t.g.hY=function(i){return t.p(i)?(this.Od=i,e(this,"waterfall"),st(this).B(st(this).sa),this.B(this.sa,1),this):this.Od},t.g.ola=function(){e(this,"waterfall"),this.B(2589200,1)},t.g.iQ=function(t){it(this),_.u.iQ.call(this,t)},t.g.Yu=function(t){it(this),_.u.Yu.call(this,t)},t.g.Md=function(t){_.u.Md.call(this,t),t=U(st(this));for(var e=0;e<t.length;e++)t[e].Md()},t.g.oU=function(t,e,i){return t&&t.Ma()===mt?[{series:t,points:[e]}]:_.u.oU.call(this,t,e,i)},t.g.qU=function(){var t=_.u.qU.call(this),e=[];return e.push.apply(e,t),e.push.apply(e,this.IR()),e},t.g.Kw=function(t){it(this),_.u.Kw.call(this,t)},t.g.vda=function(){t.nr(this,"waterfall","arrows",1)},t.g.ida=function(t){return T(nt(this),t)},t.g.mda=function(t){return nt(this).b[t]||null},t.g.pda=function(t){return D(nt(this),t)},t.g.oda=function(e){var i=nt(this);return 0<=(e=(0,t.za)(i.b,e))&&D(i,e)},t.g.lda=function(){return t.Ha(nt(this).b)},t.g.F=function(){var e=_.u.F.call(this);return t.Tq(this,Ct,e.chart),e.chart.stackLabels=this.yJ().F(),e.chart.connectors=this.nj().F(),e.chart.totals=st(this).F(),e.chart.arrows=nt(this).F(),e.chart.totalSplits=this.Od,e},t.g.U=function(e,i){_.u.U.call(this,e,i);var n=e.stackLabels;n&&this.yJ().ga(!!i,n),e.arrows&&nt(this).ga(!!i,e.arrows),e.totals&&st(this).ga(!!i,e.totals),e.totalSplits&&this.hY(e.totalSplits),((n=e.connectors)||e.connectorStroke)&&((n=n||{}).stroke=n.stroke||e.connectorStroke,this.nj().ga(!!i,n)),t.Iq(this,Ct,e)},t.g.R=function(){t.sd(this.i,this.qc,this.P,this.sb,this.Kj,this.o,this.Hd),_.u.R.call(this)};var Dt=_.prototype;Dt.addTotal=Dt.jda,Dt.removeTotal=Dt.qda,Dt.removeTotalAt=Dt.rda,Dt.getTotalAt=Dt.nda,Dt.getAllTotals=Dt.IR,Dt.splitTotal=Dt.hY,Dt.stackLabels=Dt.yJ,Dt.xScale=Dt.Ra,Dt.yScale=Dt.bb,Dt.crosshair=Dt.mh,Dt.xGrid=Dt.lm,Dt.yGrid=Dt.nm,Dt.xMinorGrid=Dt.Qr,Dt.yMinorGrid=Dt.Tr,Dt.xAxis=Dt.$h,Dt.getXAxesCount=Dt.wD,Dt.yAxis=Dt.ij,Dt.getYAxesCount=Dt.yD,Dt.getSeries=Dt.ef,Dt.lineMarker=Dt.Ym,Dt.rangeMarker=Dt.gn,Dt.textMarker=Dt.mn,Dt.palette=Dt.cc,Dt.markerPalette=Dt.Nf,Dt.hatchFillPalette=Dt.ve,Dt.getType=Dt.Ma,Dt.addSeries=Dt.kl,Dt.getSeriesAt=Dt.Ai,Dt.getSeriesCount=Dt.tj,Dt.removeSeries=Dt.Ao,Dt.removeSeriesAt=Dt.Rn,Dt.removeAllSeries=Dt.Dp,Dt.getPlotBounds=Dt.dg,Dt.xZoom=Dt.Tq,Dt.yZoom=Dt.Uq,Dt.xScroller=Dt.Mp,Dt.yScroller=Dt.Ur,Dt.getStat=Dt.Rg,Dt.annotations=Dt.Nk,Dt.getXScales=Dt.vy,Dt.getYScales=Dt.xy,Dt.data=Dt.data,Dt.connectors=Dt.nj,Dt.addArrow=Dt.ida,Dt.getArrow=Dt.mda,Dt.removeArrowAt=Dt.pda,Dt.removeArrow=Dt.oda,Dt.getAllArrows=Dt.lda,Dt.connectorStroke=Dt.kda,t.H(at,t.lC),t.PG[32]=at,t.g=at.prototype,t.g.type=32,t.g.flags=263713,t.g.Kh={rising:"path",risingHatchFill:"path",falling:"path",fallingHatchFill:"path",path:"path",hatchFill:"path"},t.g.yt=function(t){var e=t.j("shapes");for(i in e)e[i].clear();var i=0<=t.j("diff");if(t.j("isTotal")){i="path";var n="hatchFill"}else i?(i="rising",n="risingHatchFill"):(i="falling",n="fallingHatchFill");this.EF(t,e[i],e[n])},t.g.ug=function(t,e){var i=0<=t.j("diff");if(t.j("isTotal")){i="path";var n="hatchFill"}else i?(i="rising",n="risingHatchFill"):(i="falling",n="fallingHatchFill");var s={};s[i]=s[n]=!0,s=this.bd.ed(e,s),this.EF(t,s[i],s[n])},t.Tp.waterfall=ot,t.E("anychart.waterfall",ot)}.call(this,$)),_.surface||(_.surface=1,function(t){var e=function(t,e){t*=Math.PI/180,e*=Math.PI/180;var i=Math.sin(t),n=Math.cos(t),s=Math.sin(e),a=Math.cos(e);return[n*a,-i*a,s,i,n,0,-s*n,i*s,a]},i=function(t,e){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[0]*t[3]+e[1]*t[4]+e[2]*t[5],e[0]*t[6]+e[1]*t[7]+e[2]*t[8]]},n=function(t,n){for(var s=i(e(0,t),[-1,0,0]),a=s[0],o=s[1],r=a*a+o*o+(s=s[2])*s,l=0,h=0;h<n.length;h++){var c=n[h];l+=Math.abs(a*c[0]+o*c[1]+s*c[2]-r)/Math.sqrt(r)}return l/n.length},s=function(t,e){var i=t[0],n=t[1],s=t[2],a=i*i+n*n+s*s;return Math.abs(i*e[0]+n*e[1]+s*e[2]-a)/Math.sqrt(a)},a=function(t,e){return(t=t.slice())[1]=e.left+t[1]*e.width/1.48+e.width/2,t[2]=e.top+t[2]*e.height/1.75+e.height/2,t},o=function(t,e){t=t.slice();for(var i=0;i<t.length;i++)t[i]=a(t[i],e);return t},r=function(){t.kz.call(this),this.G=null,this.P={FY:[],ST:[]},this.ba=!1},l=function(e){if(0==e.P.ST.length){var i=t.qk();return i.parent(e.O()).zIndex(e.zIndex()),i.stroke("none"),e.P.FY.push(i),i}return i=e.P.ST.pop(),e.P.FY.push(i),i.parent(e.O()),i},h=function(e,i){return t.p(i)?(e.ba=!!i,e):e.ba},c=function(e){return e.G=e.G?e.G:t.qk(),e.G},u=function(t,s){var a=t.ja(),r=e(t.K,t.i),l=[];if(l[0]=i(r,s[0]),l[1]=i(r,s[1]),n(t.i,[l[0]])>n(t.i,[l[1]])){var h=s[1];s[1]=s[0],s[0]=h,h=l[1],l[1]=l[0],l[0]=h}s[2]=[s[1][0],s[1][1],-.5],l[2]=i(r,s[2]),a=o(l,a),t.o.moveTo(a[0][1],a[0][2]),t.o.lineTo(a[1][1],a[1][2]),t.G.moveTo(a[1][1],a[1][2]),t.G.lineTo(a[2][1],a[2][2])},d=function(){t.Qy.call(this),this.D=[],this.P=[]},p=function(e,i,n){var s=e.D.slice(),a=e.P.slice(),o=e.g("length"),r=e.g("stroke"),l=t.dp(r),h=s[0]*(1-i)+i*a[0];i=s[1]*(1-i)+i*a[1]+n/2,i=t.R(i,1)-.5,h=t.R(h,l),e.path.moveTo(h,i),e.path.lineTo(h,i+o),e.path.stroke(r)},g=function(){t.Sy.call(this),this.b=[[-.5,-.5,.5],[-.5,.5,.5],[.5,.5,.5],[.5,-.5,.5]],this.f=[]},f=function(t){t.f=e(t.K,t.i)},b=function(t){f(t);for(var e=[],n=[0,0,0],s=[0,0,0],a=0;a<t.b.length;a++){var o=t.b[a];e.push(i(t.f,o)),e[a][1]<s[1]&&(n=o,s=e[a])}return n},v=function(e,s,a,r){s=i(e.f,s),a=i(e.f,a),e.D=s.slice(),e.P=a.slice();var l=o([s,a],r),h=l[0][1],c=l[0][2];r=l[1][1],l=l[1][2],s=e.zIndex()+2-n(e.i,[s,a]),(a=e.Bz()).clear(),a.moveTo(h,c).lineTo(r,l),a=e.Xa(),e=e.yb(),t.xr(a,e);var u=[h,c],d=[r,l];t.p(u)&&t.p(d)&&(a.D=u,a.P=d,a.va(1)),a.zIndex(s),h=[h,c],r=[r,l],t.p(h)&&t.p(r)&&(e.D=h,e.P=r,e.va(1)),e.zIndex(s),t.yr(a,e)},m=function(){g.call(this)},y=function(t,e,n){var s=t.ja(),a=t.Vt()?t.b[0]:t.TG(),r=[-.5==a[0]?.5:-.5,a[1],a[2]];if(-.5==r[0]){var l=a;a=r,r=l}return a=i(t.f,a),r=i(t.f,r),{x:(t=o([a,r],s))[0][1]*(1-e)+e*t[1][1],y:t[0][2]*(1-e)+e*t[1][2]+n}},S=function(){g.call(this)},w=function(t,e,n){var s=t.ja(),a=t.Vt()?t.b[0]:t.TG(),r=[a[0],-.5==a[1]?.5:-.5,a[2]];if(-.5==r[1]){var l=a;a=r,r=l}return a=i(t.f,a),r=i(t.f,r),{x:(t=o([a,r],s))[0][1]*(1-e)+e*t[1][1],y:t[0][2]*(1-e)+e*t[1][2]+n}},x=function(){g.call(this)},C=function(t,e,n){var s=t.ja(),a=t.Vt()?t.b[0]:b(t),r=[a[0],a[1],-.5];return a=i(t.f,a),r=i(t.f,r),s=(t=o([a,r],s))[0][2],a=t[1][2],r=Math.abs(s-a),{x:t[0][1]+n,y:Math.min(s,a)+r-r*e}},D=function(e,i){t.Y.call(this),this.ib=e,this.f=i,this.Oa=t.ok(),this.Sc=t.qk(),this.Sc.zIndex(2),this.f.O(this.Oa),this.Sc.parent(this.Oa),this.Sc.wa("mousemove",this.sq,!1,this),this.Sc.wa("mouseout",this.sq,!1,this),this.Sc.wa("mouseover",this.sq,!1,this)},T=function(e){t.Y.call(this),this.ib=e,this.Sc=t.qk(),this.Sc.zIndex(1)},k=function(){t.V.call(this),this.ua={},t.T(this.ua,[["enabled",0,32768],["stroke",0,8192]])},$=function(e){t.Y.call(this),this.pa=e,this.Bc=[],this.Zc={x:[0,"x"],y:[1,"y"],z:[2,"z"]},this.Oa=t.ok(),t.T(this.ua,[["enabled",0,1],["size",0,1],["fill",0,1],["stroke",0,1],["type",0,1]])},O=function(t,e,n){var o=e.data(),r=i(t.pa.Xg,E(t.pa,o)),l=a(r,n);l&&(e.b=l),e.zIndex(s(t.pa.n0,r)),o=i(t.pa.Xg,E(t.pa,[o[0],o[1],t.pa.$u().uh()])),n=a(o,n),t.eM(),e.f.b={from:l,Je:n}},P=function(t){if(!t.Bc.length&&t.la)for(var e=t.la.$();e.advance();){var i=+e.get("x"),n=+e.get("y"),s=+e.get("z");(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s)||(i=t.jp({index:e.ma(),data:[i,n,s]}),t.Bc.push(i))}return t.Bc},L=function(t){var e=t.index();t=t.data();var i={};return i.index={type:"number",value:e},i.x={type:"number",value:t[0]},i.y={type:"number",value:t[1]},i.z={type:"number",value:t[2]},i},G=function(e,i,n){e.Si||(e.Si=new t.Fw),i=i.index();var s=e.$();return s.select(i),e.Si.lg(s),t.ov(e.Si,n)},F=function(e,i){function n(){var e=this.g("rotationZ"),i=this.g("rotationY"),n=t.wr(this,"xGrid"),s=t.wr(this,"yGrid"),a=t.wr(this,"zGrid"),o=t.wr(this,"xAxis"),r=t.wr(this,"yAxis"),l=t.wr(this,"zAxis");t.xr(o,r,l,n,s,a),n&&n.Do(e).Jq(i),s&&s.Do(e).Jq(i),a&&a.Do(e).Jq(i),l&&l.Do(e).Jq(i),o&&o.Do(e).Jq(i),r&&r.Do(e).Jq(i),t.zr(o,r,l,n,s,a)}t.Bx.call(this),this.Ga("surface"),this.Hr=["z","value"],this.HY=[],this.nz=[],this.IY=[],this.Ca=[],this.Qz=[],this.data(e||null,i),t.T(this.ua,[["rotationZ",10485776,1,null,n],["rotationY",10485776,1,null,n],["box",16,1],["stroke",16,1]])},I=function(e){function i(e){return e.length&&(0,t.lD)(e,(function(t){return null!==t&&""!==t}))}var n=[],s=[],a=(0,t.Qw)(e[0],(function(t){return(0,window.isNaN)(+t)}));return(0,t.Pe)(e,(function(t){n.push(t.slice(0,3)),s.push(t.slice(3,6))})),n=(0,t.Ye)(n,i),e=!(s=(0,t.Ye)(s,i)).length&&a&&(0,t.Qw)(n[0],(function(t){return-1!=t.indexOf("marker")})),a&&(n.splice(0,1),s.splice(0,1)),e?{s6:[],iW:n}:{s6:n,iW:s}},E=function(t,e){return[t.Ra().transform(e[0])-.5,t.bb().transform(e[1])-.5,1-t.$u().transform(e[2])-.5]},A=function(t,e){for(var i=0,n=0;n<e.length;n++)i+=s(t.n0,e[n]);return 2-(i/=e.length)},U=function(t){for(var e=0,i=0,n=0,s=0,a=-window.Infinity,o=0,r=window.Infinity,l=0,h=0;h<t.length;h++){t[h][1]<e&&(e=t[h][1],i=h),t[h][1]>n&&(n=t[h][1],s=h);var c=t[h][0];a<c&&(a=t[h][0],o=h),r>c&&(r=t[h][0],l=h)}return{left:t[i],right:t[s],sta:t[o],k4:t[l]}},_=function(e,i,n,s){var a=t.oa(i.scale());t.Aa(e,a)||(s[n].scale=i.scale().F())},j=function(t,e,i){i in e&&(t[i](e[i]),"scale"in e[i]&&t[i]().scale(e[i].scale))},M=function(t,e){var i=new F(t,e);return i.kd(i.vf("colorScale")),i};t.H(r,t.kz),t.g=r.prototype,t.g.Sz=function(){r.u.Sz.call(this);for(var t;t=this.P.FY.pop();)t.clear(),this.P.ST.push(t)},t.g.sK=function(){r.u.sK.call(this),c(this).stroke(this.g("stroke"))},t.g.TK=function(){r.u.TK.call(this);var t=this.O();c(this).parent(t)},t.g.xC=function(){var e=this.zIndex()-1,i=0>=this.i?e+2:e;this.Uh().zIndex(i),c(this).zIndex(e),t.Dc(this.D,(function(t){t.zIndex(i)}))},t.g.remove=function(){r.u.remove.call(this),c(this).parent(null)},t.g.Lj=function(){c(this).clear(),r.u.Lj.call(this)},t.g.KG=function(t){if(t-=.5,this.ba){var s=[[-.5,-.5,t=-t],[-.5,.5,t],[.5,.5,t],[.5,-.5,t]];t=e(this.K,this.i);for(var a=[],r=-window.Infinity,l=0,h=0;h<s.length;h++){a[h]=i(t,s[h]);var c=n(this.i,[a[h]]);c>r&&(r=c,l=h)}for(a=[[-(a=s[l])[0],a[1],a[2]],[a[0],a[1],a[2]],[a[0],-a[1],a[2]]],h=0;h<a.length;h++)a[h]=i(t,a[h]);t=this.ja(),t=o(a,t),this.G.moveTo(t[0][1],t[0][2]),this.G.lineTo(t[1][1],t[1][2]),this.G.lineTo(t[2][1],t[2][2])}else u(this,t=[[t,-.5,.5],[t,.5,.5]])},t.g.LG=function(t){u(this,[[-.5,t-=.5,.5],[.5,t,.5]])},t.g.HG=function(t,s,a){if(h(this)){var r=l(this),c=-(t-.5);t=-(s-.5);var u=[[-.5,-.5,c],[-.5,.5,c],[.5,.5,c],[.5,-.5,c]];c=e(this.K,this.i),s=[];for(var d=-window.Infinity,p=0,g=0;g<u.length;g++){s[g]=i(c,u[g]);var f=n(this.i,[s[g]]);f>d&&(d=f,p=g)}for(s=[[-(g=u[p])[0],g[1],g[2]],[g[0],g[1],g[2]],[g[0],-g[1],g[2]]],t=[[-g[0],g[1],t],[g[0],g[1],t],[g[0],-g[1],t]],g=0;g<s.length;g++)s[g]=i(c,s[g]),t[g]=i(c,t[g]);c=this.ja(),s=o(s,c),t=o(t,c),r.moveTo(s[0][1],s[0][2]),r.lineTo(s[1][1],s[1][2]),r.lineTo(s[2][1],s[2][2]),r.lineTo(t[2][1],t[2][2]),r.lineTo(t[1][1],t[1][2]),r.lineTo(t[0][1],t[0][2]),r.close(),r.fill(a.fill()),r.zIndex(20)}else{for(r=e(this.K,this.i),(t=[[t-=.5,-.5,.5],[t,.5,.5]]).push([s-=.5,.5,.5]),t.push([s,-.5,.5]),u=[],d=0;d<t.length;d++)u.push(i(r,t[d]));for(c=this.ja(),g=o(u,c),a.moveTo(g[0][1],g[0][2]),a.lineTo(g[1][1],g[1][2]),a.lineTo(g[2][1],g[2][2]),a.lineTo(g[3][1],g[3][2]),a.close(),g=l(this),p=[],u[0][0]>u[1][0]?p.push(t[0]):p.push(t[1]),p.push([p[0][0],p[0][1],-.5]),p.push([s,p[0][1],-.5]),p.push([s,p[0][1],.5]),s=[],d=0;d<t.length;d++)s.push(i(r,p[d]));r=o(s,c),g.moveTo(r[0][1],r[0][2]),g.lineTo(r[1][1],r[1][2]),g.lineTo(r[2][1],r[2][2]),g.lineTo(r[3][1],r[3][2]),g.close(),g.fill(a.fill()),g.zIndex(20)}},t.g.IG=function(t,n,s){var a=e(this.K,this.i);(t=[[-.5,t-=.5,.5],[.5,t,.5]]).push([.5,n-=.5,.5]),t.push([-.5,n,.5]);for(var r=[],h=0;h<t.length;h++)r.push(i(a,t[h]));var c=this.ja(),u=o(r,c);s.moveTo(u[0][1],u[0][2]),s.lineTo(u[1][1],u[1][2]),s.lineTo(u[2][1],u[2][2]),s.lineTo(u[3][1],u[3][2]),s.close(),(u=l(this)).clear();var d=[];for(r[0][0]>r[1][0]?d.push(t[0]):d.push(t[1]),d.push([d[0][0],d[0][1],-.5]),d.push([d[0][0],n,-.5]),d.push([d[0][0],n,.5]),n=[],h=0;h<t.length;h++)n.push(i(a,d[h]));a=o(n,c),u.moveTo(a[0][1],a[0][2]),u.lineTo(a[1][1],a[1][2]),u.lineTo(a[2][1],a[2][2]),u.lineTo(a[3][1],a[3][2]),u.close(),u.fill(s.fill()),u.zIndex(20)},t.g.Do=function(e){return t.p(e)?(this.K=+e,this.B(28,1),this):this.K},t.g.Jq=function(e){t.p(e)&&(this.i=+e,this.B(28,1))},t.g.R=function(){t.qd(this.G),this.G=null,r.u.R.call(this)},t.H(d,t.Qy),t.g=d.prototype,t.g.ra=t.Qy.prototype.ra,t.g.sa=16|t.Qy.prototype.sa,t.g.lT=function(e,i,n,s){i=this.g("length"),n=this.D.slice();var a=this.D[1],o=this.P[1],r=Math.abs(a-o);n[1]=Math.min(a,o)+r-r*e,e=this.g("stroke"),a=t.dp(e),s=n[0]-s/2,s=t.R(s,1)+.5,n=n[1],n=t.R(n,a),this.path.moveTo(s,n),this.path.lineTo(s-i,n),this.path.stroke(e)},t.g.hT=function(t,e,i,n){p(this,t,n)},t.g.nT=function(t,e,i,n){p(this,t,n)},t.H(g,t.Sy),t.g=g.prototype,t.g.TG=function(){f(this);for(var t=window.Infinity,e=0,s=0;s<this.b.length;s++){var a=n(this.i,[i(this.f,this.b[s])]);a<t&&(t=a,e=s)}return this.b[e]},t.g.iR=function(){g.u.iR.call(this);var t=this.zIndex()+2-n(this.i,[this.D,this.P]);this.line.zIndex(t),this.Xa().zIndex(t),this.yb().zIndex(t)},t.g.ol=function(){return new d},t.g.Jq=function(e){t.p(e)&&(e=Number(e),this.i!=e&&(this.i=e,this.B(16|this.se,9),this.ae()))},t.g.Do=function(e){return t.p(e)?(e=Number(e),this.K!=e&&(this.K=e,this.B(16|this.se,9),this.ae()),this):this.K},t.g.Vt=function(){return!1},t.H(m,g),t.g=m.prototype,t.g.cM=function(){var e=t.wr(this,"title");if(e){var i=this.Bz().rb().clone(),n=this.ja();t.dw(e,"bottom"),i.height=n.Va()-i.top,e.ja(i),e.W()}},t.g.lo=function(){f(this);var t=this.Vt()?this.b[0].slice():this.TG(),e=[-.5==t[0]?.5:-.5,t[1],t[2]];if(-.5==e[0]){var i=e;e=t,t=i}v(this,t,e,this.ja()),this.line.stroke(this.g("stroke"))},t.g.GM=function(t,e,i,n,s,a,o){return i=o?this.labels():this.qb(),s=this.zIndex()+(0>this.i?2:-2),i.zIndex(s),y(this,t,n+e.height/2)},t.g.BE=function(e,i,n){if(n=m.u.BE.call(this,e,i,n)){var s,a=this.Do();return n=0!=Math.floor(2*a/360)%2,a=t.ab(a),45>(a=n^this.scale().Ne()?a-180:a)&&(s=n?i.length-1:0),135<a&&(s=n?0:i.length-1),e!==s}return n},t.g.HM=function(t,e,i,n){return y(this,e,n)},t.g.Vt=function(){return!1},t.H(S,g),t.g=S.prototype,t.g.TG=function(){f(this);for(var t=window.Infinity,e=0,s=0;s<this.b.length;s++){var a=n(this.i,[i(this.f,this.b[s])]);a<t&&(t=a,e=s)}return this.b[e]},t.g.cM=function(){var e=t.wr(this,"title");if(e){var i=this.Bz().rb().clone(),n=this.ja();t.dw(e,"bottom"),i.height=n.Va()-i.top,e.ja(i),e.W()}},t.g.lo=function(){f(this);var t=this.Vt()?this.b[0]:this.TG(),e=[t[0],-.5==t[1]?.5:-.5,t[2]];if(-.5==e[1]){var i=e;e=t,t=i}v(this,t,e,this.ja()),this.line.stroke(this.g("stroke"))},t.g.BE=function(e,i,n){if(n=S.u.BE.call(this,e,i,n)){var s=this.Do();if(n=0!=Math.floor(2*s/360)%2,s=t.ab(s),45<=(s=n^this.scale().Ne()?s-180:s)&&90>=s||90<s&&135>s)var a=n?0:i.length-1;return e!==a}return n},t.g.GM=function(t,e,i,n,s,a,o){return i=o?this.labels():this.qb(),s=this.zIndex()+(0>this.i?2:-2),i.zIndex(s),w(this,t,n+e.height/2)},t.g.HM=function(t,e,i,n){return w(this,e,n)},t.H(x,g),x.prototype.cM=function(){var e=t.wr(this,"title");if(e){var i=this.Bz().rb().clone();t.dw(e,"left"),e.ja(i),e.W()}},x.prototype.lo=function(){f(this);var t=this.Vt()?this.b[0]:b(this);v(this,t,[t[0],t[1],-.5],this.ja()),this.line.stroke(this.g("stroke"))},x.prototype.GM=function(t,e,i,n,s,a,o){return i=o?this.labels():this.qb(),s=this.zIndex()+2,i.zIndex(s),C(this,t,-n-e.width/2)},x.prototype.HM=function(t,e,i,n){return C(this,e,-n)},t.H(D,t.Y),t.g=D.prototype,t.g.W=function(){if(this.ib.g("enabled")){this.Oa.parent(this.O()),this.f.W();var e=t.zp(this.ib.sc(this,"type")),i=this.ib.sc(this,"size");this.Sc.clear(),e(this.Sc,this.b[1],this.b[2],i,i),this.Sc.fill(this.ib.sc(this,"fill")),this.Sc.stroke(this.ib.sc(this,"stroke"))}else this.Oa.parent(null)},t.g.sq=function(e){var i=this.ib;"mousemove"===e.type||"mouseover"===e.type?t.Ow(i.Ua(),e.clientX,e.clientY,G(i,this,L(this))):"mouseout"===e.type&&i.Ua().Lc()},t.g.data=function(t){return t?(this.la=t,this):this.la},t.g.index=function(e){return t.p(e)?(this.Ad=e,this):this.Ad},t.g.R=function(){t.sd(this.Oa,this.Sc,this.f),this.Sc=this.Oa=this.f=null,D.u.R.call(this)},t.H(T,t.Y),T.prototype.Zx=function(){this.Sc.moveTo(this.b.from[1],this.b.from[2]),this.Sc.lineTo(this.b.Je[1],this.b.Je[2])},T.prototype.W=function(){this.ib.g("enabled")?(this.Sc.clear(),this.Sc.parent(this.O()),this.Zx(),this.Sc.stroke(this.ib.Fp(this))):this.Sc.parent(null)},T.prototype.R=function(){t.qd(this.Sc),this.Sc=null,T.u.R.call(this)},t.H(k,t.V),k.prototype.ra=40960;var N={};t.sq(N,[[0,"enabled",t.Dq],[1,"stroke",t.Pq]]),t.U(k,N),k.prototype.Fp=function(){return this.g("stroke")},k.prototype.F=function(){var e={};return t.Tq(this,N,e),e},k.prototype.U=function(e,i){t.Iq(this,N,e,i)},t.H($,t.Y),$.prototype.ra=17;var B={};t.sq(B,[[0,"enabled",t.Dq],[0,"type",t.cr],[0,"size",function(e){return t.D(e)?e:Number(e)}],[1,"fill",t.Nq],[1,"stroke",t.Jq]]),t.U($,B),t.g=$.prototype,t.g.$ga=function(){this.va(1)},t.g.eM=function(e){return this.b||(this.b=new k,t.W(this,"droplines",this.b),t.K(this.b,this.$ga,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.jp=function(t){var e=new D(this,new T(this.eM()));return e.data(t.data),e.index(t.index),e},t.g.W=function(t){this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.Oa.Gi();for(var e,i=P(this),n=0;n<i.length;n++)e=i[n],O(this,e,t);for(i.sort((function(t,e){return e.zIndex()-t.zIndex()})),n=0;n<i.length;n++)(e=i[n]).O(this.Oa),e.W()},t.g.$=function(){return this.la.$()},t.g.dd=function(){t.sd(this.Bc),this.Bc.length=0,this.va(16)},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,this.la&&t.kr(this.la,this.dd,this),t.sd(this.la,this.Yc),t.J(e,t.Cr)?this.la=e.Ui():this.la=t.J(e,t.Mr)?e.Yd(this.Zc):(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(this.Zc),t.K(this.la,this.dd,this),this.dd()),this):this.la},t.g.sc=function(e,i){var n=this.$();if(n.select(e.index()),n=n.get(i)||this.g(i),t.D(n)){var s=L(e);return s.sourceColor={type:"",value:this.pa.Fp(e.data()[2])},s=G(this,e,s),n.call(s,s)}return n},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df(),t.W(this,"tooltip",this.gb),this.gb.parent(this.pa.Ua()),this.gb.ya(this.pa)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e={};t.Tq(this,B,e);var i=this.data();return i&&(e.data=i.F()),this.b&&(e.droplines=this.b.F()),e},t.g.U=function(e,i){t.Iq(this,B,e,i);var n=e.data;n&&this.data(n),(n=e.droplines)&&this.eM(n)},t.g.R=function(){t.sd(this.Bc,this.b,this.Oa),this.Bc.length=0,this.pa=null};var R=$.prototype;R.droplines=R.eM,R.tooltip=R.Ua,t.H(F,t.Bx);var H,z=(H={},t.sq(H,[[0,"rotationZ",t.Bq],[0,"rotationY",function(e){return e=Number(e),t.Za(e,-90,90)}],[1,"box",t.Pq],[1,"stroke",t.Pq]]),H);t.U(F,z),t.g=F.prototype,t.g.ra=t.Bx.prototype.ra,t.g.sa=10580496|t.Bx.prototype.sa,t.g.VY=function(e){return this.Zu||(this.Zu=new x,t.K(this.Zu,this.xo,this),this.Zu.Do(this.g("rotationZ")),this.Zu.Jq(this.g("rotationY")),t.W(this,"zAxis",this.Zu)),t.p(e)?(this.Zu.N(e),this):this.Zu},t.g.$h=function(e){return this.mc||(this.mc=new m,t.K(this.mc,this.xo,this),this.mc.Do(this.g("rotationZ")),this.mc.Jq(this.g("rotationY")),t.W(this,"xAxis",this.mc)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.ij=function(e){return this.hl||(this.hl=new S,t.K(this.hl,this.xo,this),this.hl.Do(this.g("rotationZ")),this.hl.Jq(this.g("rotationY")),t.W(this,"yAxis",this.hl)),t.p(e)?(this.hl.N(e),this):this.hl},t.g.xo=function(){this.B(2097152,1)},t.g.cg=function(){return this.la.$()},t.g.Ec=function(){return this.sd=this.la.$()},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.yj=function(){return!this.la.$().Hb()},t.g.data=function(e,i){if(t.p(e)){if(this.Xf!==e){if(this.Xf=e,this.la&&t.kr(this.la,this.dd,this),t.qd(this.la),t.qd(this.Yc),t.J(e,t.Cr))this.la=e.Ui();else if(t.J(e,t.Mr))this.la=e.Yd();else{var n=null;t.z(e)?n=I(t.Sr(e,i)):t.A(e)&&(n=I(e)),n&&n.iW.length&&(this.Db().enabled(!0),this.Db().data(n.iW)),this.la=(this.Yc=new t.Mr(n?n.s6:n)).Yd()}t.K(this.la,this.dd,this),this.B(4608,1)}return this}return this.la},t.g.dd=function(){this.B(4352,1)},t.g.CT=function(e,i,n){return(0,t.za)(n,e)===i},t.g.pb=function(){if(this.J(4096)){this.B(16384);var e=this.data().$();e.reset();for(var i=[],n=[],s=[];e.advance();){var a=t.N(e.get("x")),o=t.N(e.get("y")),r=t.N(e.get("z"));i.push(a),n.push(o),s.push(r)}i=(0,t.Ye)(i,this.CT),n=(0,t.Ye)(n,this.CT),s=(0,t.Ye)(s,this.CT),this.HY=i,this.nz=n,this.IY=s,3e3<(e=e.Hb())&&t.kl(800,null,[e],!0),(i.length*n.length!=e||4>e)&&0!=e?(t.il(400),this.S4=!0):this.S4=!1,this.I(4096)}n=this.Ra(),e=this.bb(),s=this.$u(),i=!1,n.Of()&&n.Bg(),e.Of()&&e.Bg(),s.Of()&&s.Bg(),a=[],o=[],r=[];var l=t.wr(this,"markers");if(l){l=P(l);for(var h=0;h<l.length;h++){var c=l[h].data();a.push(c[0]),o.push(c[1]),r.push(c[2])}}n.Xc.apply(n,t.Ga(this.HY,a)),e.Xc.apply(e,t.Ga(this.nz,o)),s.Xc.apply(s,t.Ga(this.IY,r)),n.Of()&&(i|=n.Hg()),e.Of()&&(i|=e.Hg()),s.Of()&&(i|=s.Hg()),this.J(16384)&&this.vb&&(n=t.Ga(this.IY,r),this.vb.Of()?(this.vb.Bg(),this.vb.Xc.apply(this.vb,n),this.vb.Hg()):(this.vb.Co(),this.vb.Xc.apply(this.vb,n)),t.J(this.vb,t.iz)&&t.Pt(this.vb.Xa()),this.B(16),this.I(16384)),i&&this.B(65536)},t.g.Ol=function(){this.pb();for(var e=this.$u().Xa().get(),i=[],n=0;n<e.length;n++){var s=this.Fp(e[n]);s={index:0,text:e[n],iconEnabled:!0,iconType:"square",iconStroke:t.Wl(s,1),iconFill:s,disabled:!this.enabled()},i.push(s)}return i},t.g.Ue=function(){return[]},t.g.Ra=function(e){return t.p(e)?((e=t.jt(this.eb,e,null,15))&&(this.eb=e,this.eb.da(!1),this.B(16,1)),t.K(this.eb,this.fE,this),this):(this.eb||(this.eb=t.ft(),t.K(this.eb,this.fE,this)),this.eb)},t.g.bb=function(e){return t.p(e)?((e=t.jt(this.Fc,e,null,15))&&(this.Fc=e,this.Fc.da(!1),this.B(16,1)),t.K(this.Fc,this.fE,this),this):(this.Fc||(this.Fc=t.ft(),t.K(this.Fc,this.fE,this)),this.Fc)},t.g.$u=function(e){return t.p(e)?((e=t.jt(this.sz,e,null,15))&&(this.sz=e,this.sz.da(!1),this.B(16,1)),t.K(this.sz,this.fE,this),this):(this.sz||(this.sz=t.ft(),t.K(this.sz,this.fE,this)),this.sz)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(16400,1);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||this.B(16400,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(16896,1)},t.g.fE=function(){this.B(16,1)},t.g.Fp=function(t){var e=this.kd();return e?e.Qq(t):this.cc().nc(0)},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),this.Mb.ga(!0,this.Mb.oa),this.Mb.Br().Ga("defaultMarkerFactory","surface.colorRange.marker"),this.Mb.Br().ga(!0,this.Mb.Br().oa),this.Mb.kb(this),this.Mb.O(this.Na),t.K(this.Mb,this.Tz,this),this.B(8196,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=8208,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Eq=function(e){e.button==t.Ri&&(this.g4=!0,this.Pka=e.clientX,this.Qka=e.clientY,this.Ska=this.g("rotationY"),this.Tka=this.g("rotationZ"))},t.g.Ih=function(t){"mouseup"==t.type&&(this.g4=!1)},t.g.If=function(t){if(this.g4){this.ka();var e=this.ob();this.rotationY(this.Ska-(this.Qka-t.clientY)/e.height*110),this.rotationZ(this.Tka+(this.Pka-t.clientX)/e.width*110),this.da(!0)}},t.g.Qh=function(n){if(!this.pf()){var s=this.g("rotationZ"),a=this.g("rotationY"),r=[-1,0,0];this.n0=r=i(e(0,a),r),s*=Math.PI/180,a*=Math.PI/180,r=Math.sin(s),s=Math.cos(s);var l=Math.sin(a);a=Math.cos(a),this.Xg=[s*a,-r*a,l,r,s,0,-l*s,r*l,a],a=t.wr(this,"xGrid"),r=t.wr(this,"yGrid"),s=t.wr(this,"zGrid"),l=t.wr(this,"xAxis");var h=t.wr(this,"yAxis"),c=t.wr(this,"zAxis");this.Oa||(this.Oa=this.Na.Bd(),this.Oa.zIndex(36),this.XE=this.Oa.Bd(),this.XE.zIndex(36));var u=t.wr(this,"colorRange");this.pb(),this.J(65536)&&(c&&!c.scale()&&c.scale(this.$u()),l&&!l.scale()&&l.scale(this.Ra()),h&&!h.scale()&&h.scale(this.bb()),a&&a.scale(this.Ra()),r&&r.scale(this.bb()),s&&s.scale(this.$u()),this.I(65536)),this.J(8192)&&u&&(u.ka(),u.scale(this.kd()),u.target(this),u.da(!1),this.B(4)),this.J(4)&&(u?(u.ja(n.clone()),this.lf=u.yd()):this.lf=n.clone(),this.lf.left+=10,this.lf.width-=10,c&&c.ja(this.lf),h&&h.ja(this.lf),l&&l.ja(this.lf),a&&a.ja(this.lf),r&&r.ja(this.lf),s&&s.ja(this.lf),this.B(512),this.I(4)),this.J(8192)&&(u&&(u.ka(),u.O(this.Na),u.W(),u.da(!1)),this.I(8192)),n=this.lf;var d=[[-.5,-.5,.5],[-.5,.5,.5],[.5,.5,.5],[.5,-.5,.5]];if(c=[[-.5,-.5,-.5],[-.5,.5,-.5],[.5,.5,-.5],[.5,-.5,-.5]],0==this.Qz.length)for(h=0;12>h;h++)this.Qz[h]=this.Oa.path();else for(h=0;h<this.Qz.length;h++)this.Qz[h].clear();l=this.g("box");var p=[],g=[];for(h=0;h<d.length;h++)p[h]=i(this.Xg,d[h]),g[h]=i(this.Xg,c[h]);c=(h=U(p)).k4,u=U(g).k4;var f=h.left,b=[];for(h=0;h<p.length;h++){var v=h==p.length-1?0:h+1,m=p[v],y=p[h],S=Math.abs(d[h][0]-d[v][0]),w=Math.abs(d[h][1]-d[v][1]),x=t.wr(this,"xAxis"),C=t.wr(this,"yAxis");v=t.wr(this,"zAxis"),x&&x.enabled()&&x.Vt()&&h==p.length-1||C&&C.enabled()&&C.Vt()&&0==h||x&&x.enabled()&&S>w&&0<=[y,m].indexOf(c)||C&&C.enabled()&&w>S&&0<=[y,m].indexOf(c)||b.push([p[h],m])}for(h=0;h<g.length;h++)m=h==g.length-1?g[0]:g[h+1],b.push([g[h],m]);for(h=0;h<p.length;h++)v&&v.enabled()&&(v.Vt()&&0==h||p[h]==f)||b.push([p[h],g[h]]);for(h=0;h<b.length;h++)v=b[h][0],d=b[h][1],p=Math.min(A(this,[v]),A(this,[d])),v!=c&&d!=c&&v!=u&&d!=u||(p=100),this.lo(this.Qz[h],o(b[h],n),p,l);if(this.J(8388608)&&(a&&(a.O(this.Na),a.W()),r&&(r.O(this.Na),r.W()),s&&(s.O(this.Na),s.W()),this.I(8388608)),this.J(16)){if(v=this.lf,(a=this.data().$()).reset(),r=this.g("stroke"),this.XE.Gi(),!this.S4){for(this.Oa.suspend(),s=0;s<this.HY.length-1;s++)for(n=0;n<this.nz.length-1;n++){for(h=s*(this.nz.length-1)+n,(l=this.Ca[h])?(l.parent(this.XE),l.clear()):(l=this.Ca[h]=this.XE.path()).stroke(null),a.select(s*this.nz.length+n),h=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))],a.select((s+1)*this.nz.length+n),c=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))],a.select((s+1)*this.nz.length+n+1),u=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))],a.select(s*this.nz.length+n+1),d=[h,c,u,b=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))]],p=(g=this.$u()).uh(),g=g.di(),f=(m=this.bb()).uh(),m=m.di(),y=(S=this.Ra()).uh(),S=S.di(),w=0,x=[],C=0;C<d.length;C++){var D=d[C];D[2]>=p&&D[2]<=g&&D[1]<=m&&D[1]>=f&&D[0]>=y&&D[0]<=S||(w++,(D[2]<p||D[2]>g)&&(D[2]=Math.max(Math.min(D[2],g),p)),(D[1]<m||D[1]>f)&&(D[1]=Math.max(Math.min(D[1],m),f)),(D[0]>y||D[0]<S)&&(D[0]=Math.max(Math.min(D[0],S),y))),x.push(D)}(d=w==d.length?null:x)&&(p=i(this.Xg,E(this,d[0])),g=i(this.Xg,E(this,d[1])),f=i(this.Xg,E(this,d[2])),m=i(this.Xg,E(this,d[3])),d=36+A(this,[p,g,f,m]),p=o([p,g,f,m],v),h=this.Fp((h[2]+c[2]+u[2]+b[2])/4),this.lo(l,p,d,r),l.close(),l.fill(h||"white"))}this.Oa.resume()}(v=t.wr(this,"markers"))&&(v.O(this.Oa),v.W(this.lf)),this.I(16)}this.J(2097152)&&(this.WL(),this.I(2097152))}},t.g.WL=function(){var e=t.wr(this,"xAxis"),i=t.wr(this,"yAxis"),n=t.wr(this,"zAxis");e&&e.O(this.Na).W(),i&&i.O(this.Na).W(),n&&n.O(this.Na).W()},t.g.lo=function(t,e,i,n){t.clear(),t.moveTo(e[0][1],e[0][2]);for(var s=1;s<e.length;s++)t.lineTo(e[s][1],e[s][2]);t.zIndex(i),t.stroke(n)},t.g.lm=function(e){return this.rt||(this.rt=new r,this.rt.Xj=this,t.K(this.rt,this.Qy,this),this.rt.Do(this.g("rotationZ")),this.rt.Jq(this.g("rotationY")),t.W(this,"xGrid",this.rt),this.B(8388608,1)),t.p(e)?(this.rt.N(e),this):this.rt},t.g.nm=function(e){return this.Rr||(this.Rr=new r,this.Rr.Xj=this,t.K(this.Rr,this.Qy,this),this.Rr.Do(this.g("rotationZ")),this.Rr.Jq(this.g("rotationY")),t.mz(this.Rr,"vertical"),t.W(this,"yGrid",this.Rr),this.B(8388608,1)),t.p(e)?(this.Rr.N(e),this):this.Rr},t.g.aK=function(e){return this.Vq||(this.Vq=new r,this.Vq.Xj=this,t.K(this.Vq,this.Qy,this),this.Vq.Do(this.g("rotationZ")),this.Vq.Jq(this.g("rotationY")),t.mz(this.Vq,"horizontal"),h(this.Vq,!0),t.W(this,"zGrid",this.Vq),this.B(8388608,1)),t.p(e)?(this.Vq.N(e),this):this.Vq},t.g.Qy=function(){this.B(8388624,1)},t.g.Mn=function(e){var i=8388624;t.X(e,16)&&(i|=65536),this.lm().B(this.lm().sa),this.nm().B(this.nm().sa),this.aK().B(this.aK().sa),this.B(i,1)},t.g.Db=function(e){return this.Bc||(this.Bc=new $(this),t.W(this,"markers",this.Bc),t.K(this.Bc,this.Mn,this)),t.p(e)?(this.Bc.N(e),this):this.Bc},t.g.xc=function(){return this},t.g.ce=function(){return null},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(16,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(16,1)},t.g.Ma=function(){return"surface"},t.g.F=function(){var e=F.u.F.call(this);this.la&&(e.data=this.data().F());var i=[];return this.eb&&(e.xScale=this.Ra().F(),i.push(t.oa(this.Ra()))),this.Fc&&(e.yScale=this.bb().F(),i.push(t.oa(this.bb()))),this.sz&&(e.zScale=this.$u().F(),i.push(t.oa(this.$u()))),this.mc&&(e.xAxis=this.$h().F(),_(i,this.$h(),"xAxis",e)),this.hl&&(e.yAxis=this.ij().F(),_(i,this.ij(),"yAxis",e)),this.Zu&&(e.zAxis=this.VY().F(),_(i,this.VY(),"zAxis",e)),this.rt&&(e.xGrid=this.lm().F(),_(i,this.lm(),"xGrid",e)),this.Rr&&(e.yGrid=this.nm().F(),_(i,this.nm(),"yGrid",e)),this.Vq&&(e.zGrid=this.aK().F(),_(i,this.aK(),"zGrid",e)),e.colorScale=this.vb?this.kd().F():null,this.Mb&&(e.colorRange=this.Qi().F()),(i=t.wr(this,"markers"))&&(e.markers=i.F()),t.Tq(this,z,e),{chart:e}},t.g.U=function(e,i){F.u.U.call(this,e,i),"data"in e&&this.data(e.data),j(this,e,"xScale"),j(this,e,"yScale"),j(this,e,"zScale"),j(this,e,"xAxis"),j(this,e,"yAxis"),j(this,e,"zAxis"),j(this,e,"xGrid"),j(this,e,"yGrid"),j(this,e,"zGrid"),"colorScale"in e&&this.kd(e.colorScale),"colorRange"in e&&this.Qi(e.colorRange),"markers"in e&&this.Db(e.markers),t.Iq(this,z,e,i)},t.g.R=function(){t.sd(this.Bc,this.mc,this.hl,this.Zu,this.Ca,this.rt,this.Rr,this.Vq,this.Qz,this.XE,this.Oa,this.Mb,this.Fa,this.la,this.Yc),this.Qz.length=0,this.Ca.length=0,this.Vq=this.Rr=this.rt=this.Zu=this.hl=this.mc=this.Yc=this.la=this.Fa=this.Mb=this.Oa=this.XE=null,F.u.R.call(this)},t.g.ts=function(){var t=[];return this.data().Hb()&&t.push(this),this.Bc&&this.Bc.data()&&this.Bc.data().Hb()&&t.push(this.Bc),t},t.g.nD=function(t,e,i){return t=[],i.push(t),t},t.g.M4=function(t,e,i,n){for(var s=0;s<i.length;s++)t.push(this.$W(i[s],e[n],n+1,i.length))},t.g.$W=function(e,i){return t.J(i,F)?e:"marker "+e},t.g.qA=function(){return["x","y","z"]};var V=F.prototype;V.colorScale=V.kd,V.colorRange=V.Qi,V.xGrid=V.lm,V.yGrid=V.nm,V.zGrid=V.aK,V.xAxis=V.$h,V.yAxis=V.ij,V.zAxis=V.VY,V.xScale=V.Ra,V.yScale=V.bb,V.zScale=V.$u,V.getType=V.Ma,V.palette=V.cc,V.markers=V.Db,t.Tp.surface=M,t.E("anychart.surface",M)}.call(this,$)),_.theme_pareto||(_.theme_pareto=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{pareto:{defaultSeriesType:"column",tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"},yAxes:[{orientation:"left"},{orientation:"right",labels:{format:"{%Value}%"}}]}})}.call(this,$)),_.theme_annotations||(_.theme_annotations=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme.chart,{defaultAnnotationSettings:{base:{enabled:!0,normal:{fill:t.CN,stroke:t.zN,hatchFill:null,markers:{enabled:!1,size:5,type:"square",fill:"#ffff66",stroke:"#333333"},labels:{enabled:!0,position:"center-top",anchor:"center-top",format:function(){return this.level}}},hovered:{fill:t.AN,stroke:t.EN,markers:{enabled:null},labels:{enabled:null}},selected:{fill:t.AN,stroke:t.EN,markers:{enabled:!0},labels:{enabled:null}},color:"#e06666",allowEdit:!0,hoverGap:5},ray:{},line:{},infiniteLine:{},verticalLine:{},horizontalLine:{},rectangle:{},ellipse:{},triangle:{},trendChannel:{},finiteTrendChannel:{channelWidth:0},andrewsPitchfork:{},fibonacciFan:{levels:[0,.382,.5,.618,1],timeLevels:[0,.382,.5,.618,1],labels:{anchor:null}},fibonacciArc:{levels:[.236,.382,.5,.618,.764,1],labels:{anchor:null}},fibonacciRetracement:{levels:[0,.236,.382,.5,.618,.764,1,1.236,1.382,1.5,1.618,1.764,2.618,4.236],normal:{labels:{position:"left-center",anchor:"right-center"}}},fibonacciTimezones:{levels:[0,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169],labels:{anchor:"left-bottom"}},marker:{markerType:"arrow-up",normal:{size:20},anchor:"center-top",offsetX:0,offsetY:0},label:{text:"Label",offsetX:0,offsetY:0,anchor:"left-top",hAlign:"start",vAlign:"top",width:null,height:null,background:{enabled:!0,fill:"#eee 0.4",stroke:t.Ql("#eee")},padding:5,normal:{markers:{size:3}}},horizontalRange:{},verticalRange:{}}})}.call(this,$)),_.radar_part||(_.radar_part=1,function(t){var e=function(){this.ka(),t.Y.call(this),this.Ga(t.ur.axis),this.ci=[],this.Pc=t.qk(),t.ru(this,this.Pc),this.sf=404,this.da(!1),t.T(this.ua,[["stroke",this.sf,9],["startAngle",this.sf,9]])},i=function(e){if(!e.$b||e.J(4)){var i=e.ja();if(i){e.Oc=Math.round(Math.min(i.width,i.height)/2),e.tc=Math.round(i.left+i.width/2),e.vc=Math.round(i.top+i.height/2);var n=e.scale(),s=e.labels(),a=e.Xa();if(n){var o=0;if(e.enabled()){var r,l=n.Xa().get(),h=l.length,c=t.ab(e.g("startAngle")-90),u=o=window.NaN,d=window.NaN,p=window.NaN,g=window.NaN,f=window.NaN,b=window.NaN,v=window.NaN,m=window.NaN,y=window.NaN,S=window.NaN,w=window.NaN;for(e.pj(),e.rC=window.NaN,r=0;r<h;r++){var x=l[r];x=n.transform(x);var C=(x=t.ab(c+360*x))*Math.PI/180,D=s.g("position");D=t.Ho(D);var T=t.Io(a);if(s.enabled()&&0<=D){var k=e.rd(r);D=k.tb();var $=k.Vb(),O=k.cb();if(k=k.Va(),a.enabled()&&T){var P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1;a.enabled()&&a.g("length"),T=e.Oc+T+P/2,P=Math.round(e.tc+T*Math.cos(C)),C=Math.round(e.vc+T*Math.sin(C)),D=Math.min(D,P),O=Math.max(O,P),$=Math.min($,C),k=Math.max(k,C)}}else a.enabled()&&T?(P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1,a.enabled()&&a.g("length"),T=e.Oc+T+P/2):(P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1,T=e.Oc+P/2),D=O=Math.round(e.tc+T*Math.cos(C)),$=k=Math.round(e.vc+T*Math.sin(C));((0,window.isNaN)(o)||D<o)&&(o=D,g=r,m=x),((0,window.isNaN)(u)||$<u)&&(u=$,f=r,y=x),((0,window.isNaN)(d)||O>d)&&(d=O,b=r,S=x),((0,window.isNaN)(p)||k>p)&&(p=k,v=r,w=x)}if(r=a=s=n=0,o=Math.round(o),u=Math.round(u),d=Math.round(d),p=Math.round(p),o<i.tb()&&(m=180>m?Math.sin((m-90)*Math.PI/180):Math.cos((m-180)*Math.PI/180),n=Math.round((i.tb()-o)/m)),u<i.Vb()&&(m=270>y?Math.sin((y-180)*Math.PI/180):Math.cos((y-270)*Math.PI/180),s=Math.round((i.Vb()-u)/m)),d>i.cb()&&(m=360>S?Math.sin((S-270)*Math.PI/180):Math.cos(S*Math.PI/180),a=Math.round((d-i.cb())/m)),p>i.Va()&&(m=90>w?Math.sin(w*Math.PI/180):Math.cos((w-90)*Math.PI/180),r=Math.round((p-i.Va())/m)),0<(o=Math.max(n,s,a,r))){if(e.Oc-=o,0>e.Oc){if(u=e.Oc=0,e.labels().enabled()){if(u=window.NaN,o==n){u=g;var L=!0}else o==s?(u=f,L=!1):o==a?(u=b,L=!0):o==r&&(u=v,L=!1);g=e.rd(u),u=L?g.width:g.height}P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1,e.rC=Math.min(i.width,i.height)/2-u-P}e.pj()}}L=2*(i=e.Oc+o),e.$b=new t.tu(e.tc-i,e.vc-i,L,L)}else e.$b=new t.tu(e.tc-e.Oc,e.vc-e.Oc,2*e.Oc,2*e.Oc)}else e.$b=new t.tu(0,0,0,0);e.I(4)}},n=function(t,e){var i=e.width,n=e.height,s={x:0,y:0};return t?0<t&&90>t?(s.x+=i/2,s.y+=n/2):90==t?s.y+=n/2:90<t&&180>t?(s.y+=n/2,s.x-=i/2):180==t?s.x-=i/2:180<t&&270>t?(s.y-=n/2,s.x-=i/2):270==t?s.y-=n/2:270<t&&(s.y-=n/2,s.x+=i/2):s.x+=i/2,s},s=function(t,e){var i=t.Xa().g("stroke"),n=0,s=0;return i=0==(i.thickness?(0,window.parseFloat)(i.thickness):1)%2?0:.5,e?90==e?n=-i:180==e?s=i:270==e&&(n=i):s=-i,[n,s]},a=function(){e.call(this)},o=function(){t.i4.call(this)},r=function(e,i){var n=e.Ra().Xa().get(),s=n.length;if(0!=s){for(var a,o,r=e.i+(e.Oc-e.i)*i,l=e.g("startAngle")-90,h=0;h<s;h++)a=e.Ra().transform(n[h]),a=t.ab(l+360*a),o=t.bb(a),a=Math.round(e.tc+r*Math.cos(o)),o=Math.round(e.vc+r*Math.sin(o)),h?e.o.lineTo(a,o):e.o.moveTo(a,o);a=t.ab(l),o=t.bb(a),a=Math.round(e.tc+r*Math.cos(o)),o=Math.round(e.vc+r*Math.sin(o)),e.o.lineTo(a,o)}},l=function(e,i,n,s){if(!(0,window.isNaN)(n)){var a=e.Ra().Xa().get(),o=a.length;if(0!=o){var r=e.g("startAngle")-90,l=e.i+(e.Oc-e.i)*i;for(i=0;i<o;i++){var h=e.Ra().transform(a[i]);h=t.ab(r+360*h);var c=t.bb(h);h=Math.round(e.tc+l*Math.cos(c));var u=Math.round(e.vc+l*Math.sin(c));i?s.lineTo(h,u):s.moveTo(h,u)}for(h=t.ab(r),c=t.bb(h),h=Math.round(e.tc+l*Math.cos(c)),u=Math.round(e.vc+l*Math.sin(c)),s.lineTo(h,u),l=e.i+(e.Oc-e.i)*n,h=Math.round(e.tc+l*Math.cos(c)),u=Math.round(e.vc+l*Math.sin(c)),s.lineTo(h,u),i=o-1;0<=i;i--)h=e.Ra().transform(a[i]),h=t.ab(r+360*h),c=t.bb(h),h=Math.round(e.tc+l*Math.cos(c)),u=Math.round(e.vc+l*Math.sin(c)),s.lineTo(h,u);s.close()}}},h=function(){t.i4.call(this)},c=function(){t.g4.call(this,!0),this.Ga("radar")},u=function(e){var i=new c;return i.$c(),t.h4(i),arguments.length&&i.kl.apply(i,arguments),i},d={bC:"area",tt:"line",av:"marker"};t.H(e,t.Y);var p={};t.sq(p,[t.Z.Yn,t.Z.zz]),t.U(e,p),t.g=e.prototype,t.g.sa=400|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Pc=null,t.g.Er="axis",t.g.Da=null,t.g.mb=null,t.g.qa=null,t.g.$b=null,t.g.Oc=window.NaN,t.g.rC=window.NaN,t.g.tc=window.NaN,t.g.vc=window.NaN,t.g.ci=null,t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.Xa=function(e){return this.mb||(this.mb=new t.c4,t.W(this,"ticks",this.mb),this.mb.kb(this),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=276,n=1),this.B(i,n)},t.g.FK=function(e,i){if(t.p(e)){var n=t.jt(this.qa,e,null,15,null,this.ii,this);if(n){var s=this.qa==n;this.qa=n,this.qa.sN=!!i,this.qa.da(s),s||(this.pj(),this.B(this.sf,9))}return this}return this.qa},t.g.scale=function(t){return this.FK(t)},t.g.ii=function(e){t.X(e,2)&&(this.pj(),this.B(this.sf,9))},t.g.uo=function(){this.B(this.sf,9)},t.g.pj=function(){this.o&&(this.o.length=0),this.ci.length=0,this.ik=null},t.g.yd=function(){var e=this.ja();return e?this.enabled()?(i(this),e=this.Pc.stroke().thickness?this.Pc.stroke().thickness:1,e=Math.floor(e/2),new t.I(this.tc-this.Oc+e,this.vc-this.Oc+e,2*(this.Oc-e),2*(this.Oc-e))):e:new t.I(0,0,0,0)},t.g.zba=function(e,i,n){var a=this.Xa(),o=a.g("position");o=t.Ho(o);var r=t.bb(e),l=Math.sin(r);r=Math.cos(r);var h=s(this,e);e=h[0],h=h[1];var c=this.Oc+(o?0:-n/2),u=Math.round(this.tc+c*r)+e,d=Math.round(this.vc+c*l)+h;c=this.Oc+(o?o*(n+i):n/2),a.hq(u,d,Math.round(this.tc+c*r)+e,Math.round(this.vc+c*l)+h)},t.g.Zx=function(e,i){var n=t.bb(i),s=Math.round(this.tc+this.Oc*Math.cos(n));n=Math.round(this.vc+this.Oc*Math.sin(n)),e?this.Pc.lineTo(s,n):this.Pc.moveTo(s,n)},t.g.ke=function(e,i,a){var o=this.labels(),r=o.g("position");r=t.Ho(r);var l=this.Xa(),h=t.Io(l,r),c=n(i,this.rd(e));l=c.x*r,c=c.y*r;var u=t.bb(i);i=s(this,i),r=this.Oc+h+r*a,a=Math.round(this.tc+r*Math.cos(u))+i[0]+l,i=Math.round(this.vc+r*Math.sin(u))+i[1]+c,r=this.scale().Xa().get(),r=this.Am(e,r[e]),o.add(r,{value:{x:a,y:i}},e)},t.g.Iy=function(){return!1},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.Xa().B(2),this.labels().B(2),this.B(386)),!1))},t.g.W=function(){var e=this.scale();if(!e)return t.il(2),this;if(!this.zc())return this;var n=this.Xa(),s=this.labels();if(s.ka(),n.ka(),this.J(16)){this.Pc.clear(),this.Pc.stroke(this.g("stroke"));var a=this.Zx;this.I(16)}if(this.J(8)){var o=this.zIndex();this.Pc.zIndex(o),n.zIndex(o),s.zIndex(o),this.I(8)}if(this.J(2)&&(o=this.O(),this.Pc.parent(o),n.O(o),s.O(o),this.I(2)),this.J(256)){n.W();var r=this.zba;this.I(256)}if(this.J(128)){s.O()||s.O(this.O()),s.ja(this.ja()),s.clear();var l=this.ke;this.I(128)}if(t.p(r)||t.p(a)||t.p(l)){i(this);var h=(o=e.Xa().get()).length,c=t.ab(this.g("startAngle")-90),u=n.enabled()?(0,window.isNaN)(this.rC)?n.g("length"):this.rC:0,d=this.Pc.stroke().thickness?this.Pc.stroke().thickness:1,p=Math.floor(d/2);for(d=0;d<h;d++){var g=o[d];g=e.transform(g),g=t.ab(c+360*g),a&&a.call(this,d,g),r&&r.call(this,g,p,u),l&&l.call(this,d,g,p,u)}0!=d&&this.Pc.close(),s.W()}return s.da(!1),n.da(!1),this},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.Xa().remove(),this.Da&&this.Da.remove()},t.g.rd=function(e){var i=this.ci;if(t.p(i[e]))return i[e];var s=this.Pc.stroke().thickness?this.Pc.stroke().thickness:1,a=this.Xa(),o=this.labels(),r=this.scale(),l=r.Xa().get()[e],h=r.transform(l);r=o.g("position"),r=t.Ho(r);var c=t.Io(a,r),u=(h=t.ab(this.g("startAngle")-90+360*h))*Math.PI/180;return a=a.enabled()?(0,window.isNaN)(this.rC)?c:this.rC:0,a=this.Oc+a+s/2,s=Math.round(this.tc+a*Math.cos(u)),a=Math.round(this.vc+a*Math.sin(u)),l=this.Am(e,l),o=o.measure(l,{value:{x:s,y:a}},void 0,e),h=(l=n(h,o)).y*r,o.left+=l.x*r,o.top+=h,i[e]=o},t.g.Am=function(e,i){var n=this.scale(),s=!0;if(t.J(n,t.Qt)){var a=n.Xa().names()[e],o=i;s=!1}else t.J(n,t.nt)?(a=t.vs(i),o=i):(a=(0,window.parseFloat)(i),o=(0,window.parseFloat)(i));return a={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:a,type:"number"},tickValue:{value:o,type:"number"},scale:{value:n,type:""}},s&&(a.min={value:t.p(n.min)?n.min:null,type:"number"},a.max={value:t.p(n.max)?n.max:null,type:"number"}),(n=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(n)},t.g.p_=function(){this.Da&&t.Yu(this.Da)},t.g.F=function(){var i=e.u.F.call(this);return t.Tq(this,p,i),i.labels=this.labels().F(),i.ticks=this.Xa().F(),i},t.g.U=function(i,n){e.u.U.call(this,i,n),t.Iq(this,p,i,n),this.labels().ga(!!n,i.labels),this.Xa(i.ticks)},t.g.R=function(){delete this.qa,this.ci.length=0,t.sd(this.Pc,this.mb,this.Da,this.$b),this.Da=this.$b=this.mb=this.Pc=null,e.u.R.call(this)},t.H(a,e),t.xu(a,e);var g=e.prototype;g.labels=g.labels,g.ticks=g.Xa,g.scale=g.scale,g.getRemainingBounds=g.yd,g=a.prototype,t.E("anychart.standalones.axes.radar",(function(){var t=new a;return t.Ga("standalones.radarAxis"),t})),g.draw=g.W,g.parentBounds=g.ja,g.container=g.O,t.H(o,t.i4),o.prototype.Lj=function(){var e=this.Ra(),i=this.bb();this.Sz(),this.Uh().clear();var n=this.ja();this.Oc=Math.min(n.width,n.height)/2,this.i=t.L(this.g("innerRadius"),this.Oc),this.i==this.Oc&&this.i--,this.tc=Math.round(n.left+n.width/2),this.vc=Math.round(n.top+n.height/2),this.Uh().clip(n);var s,a=this.g("startAngle")-90;if(this.vN()){var o,h=(n=(n=e.Xa()).get()).length,c=window.NaN,u=window.NaN,d=this.g("stroke"),p=d.thickness?d.thickness:1;for(s=0;s<h;s++){var g=e.transform(n[s]),f=(i=t.ab(a+360*g))*Math.PI/180,b=o=0;if(i?90==i?o=0==p%2?0:-.5:180==i?b=0==p%2?0:.5:270==i&&(o=0==p%2?0:.5):b=0==p%2?0:-.5,i=Math.round(this.tc+this.Oc*Math.cos(f)),g=Math.round(this.vc+this.Oc*Math.sin(f)),this.i){var v=Math.round(this.tc+this.i*Math.cos(f));f=Math.round(this.vc+this.i*Math.sin(f))}else v=this.tc,f=this.vc;if(s){d=t.oz(this,s-1);var m=v,y=f;(0,window.isNaN)(c)&&(0,window.isNaN)(u)||(d.moveTo(i,g),d.lineTo(m,y),d.lineTo(c,u),d.close())}(s||this.g("drawLastLine"))&&(d=v,u=f,this.o.moveTo(i+o,g+b),this.o.lineTo(d,u)),c=i,u=g}d=t.oz(this,s-1),f=(i=t.ab(a))*Math.PI/180,i=Math.round(this.tc+this.Oc*Math.cos(f)),g=Math.round(this.vc+this.Oc*Math.sin(f)),this.i?(v=Math.round(this.tc+this.i*Math.cos(f)),f=Math.round(this.vc+this.i*Math.sin(f))):(v=this.tc,f=this.vc),n=v,h=f,s=c,e=u,(0,window.isNaN)(s)&&(0,window.isNaN)(e)||(d.moveTo(i,g),d.lineTo(n,h),d.lineTo(s,e),d.close())}else for(h=(n=(n=(e=t.J(i,t.Qt))?i.Xa():this.g("isMinor")?i.yb():i.Xa()).get()).length,a=window.NaN,s=0;s<h;s++)u=n[s],t.A(u)?(g=u[0],u=u[1]):g=u,g=i.transform(g),s&&(d=t.oz(this,s-1)),s==h-1?e?(l(this,g,a,d),d=t.oz(this,s),l(this,i.transform(u,1),g,d),r(this,g),this.g("drawLastLine")&&r(this,i.transform(u,1))):(l(this,g,a,d),this.g("drawLastLine")&&r(this,g)):(l(this,g,a,d),(s||this.i)&&r(this,g)),a=g},t.H(h,o),t.xu(h,o);var f=h.prototype;t.E("anychart.standalones.grids.radar",(function(){var t=new h;return t.Ga("standalones.radarGrid"),t})),f.layout=f.we,f.draw=f.W,f.parentBounds=f.ja,f.container=f.O,t.H(c,t.g4);var b={},v=5767168|t.QG;b.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:v,Ab:"value",zb:"zero"},b.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:v,Ab:"value",zb:"value"},b.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:1572864|t.QG,Ab:"value",zb:"value"},c.prototype.fj=b,t.Nz(c,c.prototype.fj),t.g=c.prototype,t.g.Ma=function(){return"radar"},t.g.Ss=function(e){return t.zk(d,e,"line")},t.g.IF=function(){return new o},t.g.R0=function(){return new e},t.g.CA=function(){return t.bt},t.g.xD=function(){return["Radar chart X scale","ordinal"]},t.g.tH=function(){return"linear"},t.g.sH=function(){return 15},t.g.SM=function(){return["Chart scale","ordinal, linear, log, date-time"]},t.g.Gt=function(e,i){var n=new t.j4(this,this,e,i,!0);return n.ta("closed",!0),n};var m=c.prototype;m.getType=m.Ma,t.Tp.radar=u,t.E("anychart.radar",u)}.call(this,$)),_.resource||(_.resource=1,function(t){var e=function(t,e){return(0,window.isNaN)(t)?(0,window.isNaN)(e)?0:1:(0,window.isNaN)(e)?-1:e-t},i=function(e){t.V.call(this),this.pa=e,this.i=this.f=this.o=this.b=null,e={},t.T(e,[["fill",16,1],["stroke",16,1],["hatchFill",16,1],["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),e={},t.T(e,[["fill",0,0],["stroke",0,0],["hatchFill",0,0],["labels",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),t.T(this.ua,[["color",16,1]])},n=function(e,i){if(!e)return a;var n=i+"|"+e+"|true",o=Y[n];if(!o){switch(i){case 2:o=t.Zl;break;case 3:o=t.$l;break;default:o=t.am}Y[n]=o=t.qa(s,e,o,3==i,!0)}return o},s=function(e,i,n,s,a,o,r,l){if((l=t.em(l))!=t.gm&&s){var h=a.sc(e,l,o,i);if(n&&!0===h&&(h=W),t.p(h)){if(!t.D(h))return h;if(n)return n=a.Yi(r,o),i(h.call(n,n))}}return e=a.sc(e,0,o,i),n&&!0===e&&(e=W),t.D(e)&&(n=n?a.Yi(r,o):a.Ge(r,o),e=i(e.call(n,n))),h&&(n=a.Ge(r,o,e),e=i(h.call(n,n))),e},a=function(){return"none"},o=function(e){this.D=!0,this.f=this.o=this.b=this.i=this.K=null;var i=e.isWorking;switch(this.D=!t.p(i)||i,i=t.zk(V,e.each,"none")){case"year":var n=e.on,s=e.from,a=e.to;this.P=this.sda,(n=t.ps(n,J,Z))?(this.G=this.mW,this.b=new t.On(2e3,n.getUTCMonth(),n.getUTCDate()),a=l(s,a),this.o=a[0],this.f=a[1]):(this.G=this.m5,this.b=null,n=(n=t.ps(s,J,Z))?new t.On(n):Q,this.o=new t.On(2e3,n.getUTCMonth(),n.getUTCDate()),n=(n=t.ps(a,J,Z))?new t.On(n):tt,this.f=new t.On(2e3,n.getUTCMonth(),n.getUTCDate()),this.f.add(et));break;case"week":r(this,e.on,e.from,e.to);break;case"day":r(this,window.NaN,e.from,e.to);break;default:n=e.on,s=e.from,a=e.to,this.P=this.OY,(n=t.ps(n))?(this.G=this.mW,this.b=new t.On(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),a=l(s,a),this.o=a[0],this.f=a[1]):(this.G=this.m5,this.b=null,n=(n=t.ps(s))?new t.On(n):Q,this.o=new t.On(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),n=(n=t.ps(a))?new t.On(n):tt,this.f=new t.On(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),this.f.add(et))}"none"==i?this.b?(this.K=this.b.clone(),this.i=this.b.clone(),this.i.add(et)):(this.K=this.o.clone(),this.i=this.f.clone()):(this.K=(i=t.ps(e.starts))?new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()):Q,(i=t.ps(e.ends))?(this.i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),this.i.add(et)):this.i=tt)},r=function(e,i,n,s){e.P=e.tda,e.G=e.mW,i=Math.min(t.P(i,window.NaN,!0),6),e.b=(0,window.isNaN)(i)?null:i,i=l(n,s),e.o=i[0],e.f=i[1]},l=function(e,i){if(t.z(e))var n=e.split(":",2),s=[Math.min(t.P(n[0],0,!0),23),2==n.length?Math.min(t.P(n[1],0,!0),59):0];else s=t.ea(e)?[Math.max(0,Math.min(23,Math.floor(e))),0]:null;if(t.z(i)){n=i.split(":",2);var a=[Math.min(t.P(n[0],23,!0),23),2==n.length?Math.min(t.P(n[1],0,!0),59):0]}else a=t.ea(i)&&!(0,window.isNaN)(i)?[Math.max(0,Math.min(23,Math.floor(i))),0]:null;return s&&a?[s,a]:[[0,0],[23,59]]},h=function(e){t.V.call(this),this.f=[],this.i=[],this.Y=e||null,this.o=0,this.D={},this.b=null,this.P=!0,this.Y?t.K(this.Y,this.H2,this):(e=t.Qo(t.Ro()),this.b=t.Ha(e.weekendRange))},c=function(e,i,n){for(i=new Date(i),i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate());i.getTime()<n;){if(g(e,i).length)return!0;i.add(et)}return!1},u=function(e,i,n,s,a){if((0,window.isNaN)(i)||(0,window.isNaN)(n))return[];i=new Date(i);for(var o=(i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate())).getTime(),r=[];o<n;){i.add(s);var l=i.getTime(),h=e,c=l,u=new Date(o);u=new t.On(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate());for(var d=[];u.getTime()<c;){for(var p=g(h,u),f=0;f<p.length;f++){var b=p[f];d.push([b[0]-6e4*h.o,b[1]-6e4*h.o])}u.add(et)}h=d,a&&!h.length||r.push({start:o,end:l,workingTime:h}),o=l}return r},d=function(e,i,n){if(i=new Date(i),i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),!e.K){var s=Q.getTime();if(!e.b||0==e.b[0]&&6==e.b[1])for(var a=0;a<e.f.length;a++){var o=e.f[a];o.HA||(s=Math.max(s,o.i.getTime()))}else s=tt.getTime();e.K=s}for(s=5e3,a=i.getTime();a<=e.K&&--s;){if(i.add(n),o=i.getTime(),c(e,a,o))return a;a=o}return s&&e.Y?d(e.Y,i.getTime(),n):window.NaN},p=function(e,i,n){if(i=new Date(i),i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),!e.G){var s=tt.getTime();if(!e.b||0==e.b[0]&&6==e.b[1])for(var a=0;a<e.f.length;a++){var o=e.f[a];o.HA||(s=Math.min(s,o.K.getTime()))}else s=Q.getTime();e.G=s}for(s=5e3,a=i.getTime();a>=e.G&&--s;){if(i.add(n),o=i.getTime(),c(e,o,a))return o;a=o}return s&&e.Y?p(e.Y,i.getTime(),n):window.NaN},g=function(e,i){var n=t.Mn.prototype.NJ.call(i),s=e.D[n];if(t.p(s))return s;s=null;for(var a=0;a<e.f.length;a++){var o=e.f[a],r=i;s=o.P(r)?o.G(s||[],r):s}return!s&&e.b&&(s=[],((a=(i.UM()+6)%7)<e.b[0]||a>e.b[1])&&s.push([i.getTime(),i.getTime()+864e5-6e4])),!s&&e.Y&&(s=g(e.Y,i)),s||(s=[]),e.D[n]=s},f=function(t){t.D={},t.K=null,t.G=null},b=function(e){t.Y.call(this),this.pa=e,this.f=new t.dC((function(){return t.mk()})),this.o=new t.dC((function(){return t.mk()})),this.D=t.ok(),this.gg=t.tk(),this.Oa=t.ok(),this.f.parent(this.Oa),this.o.parent(this.Oa),this.D.parent(this.Oa),this.Oa.clip(this.gg),this.G=[],this.i=null,t.T(this.ua,[["fill",16,1],["stroke",16,1],["hatchFill",16,1],["height",0,2]])},v=function(e,i,n,s,a){if(n&&n.lC>n.mz){var o=e.Ic(i,n,s),r=t.Wu(e.Da,e.Da.g("format"),o,++e.P);if(e.b){if(e.b.text==r)return;m(e,i)}e.b={index:e.P,text:r,start:i,FO:o,lta:n,Jta:s,top:a}}else m(e,i)},m=function(t,e){t.b&&(t.b.end=e,t.G.push(t.b),t.b=null)},y=function(e,i){var n=i.start,s=i.end,a=e.g("stroke"),o=e.pa.Ra(),r=t.$b(a),l=t.$b(e.pa.r_().g("verticalStroke")),h=l/2+r/2;n=t.Za(t.R(o.un(n)+e.K.left,l)+h,e.K.left,e.K.cb()),s=t.Za(t.R(o.un(s)+e.K.left,l)-h,e.K.left,e.K.cb()),o=t.R(i.top+r/2,r),l=t.R(i.top+e.g("height")-r/2,r),(h=t.eC(e.f)).Ho(n).Io(o).Go(s-n).Fo(l-o).fill(e.g("fill")).stroke(a),(a=e.g("hatchFill"))&&(h=t.eC(e.f)).Ho(n+r/2).Io(o+r/2).Go(s-n-r).Fo(l-o-r).fill(a).stroke(null),e.tf(i.index,i.FO,new t.I(n,o,s-n,l-o))},S=function(){t.Y.call(this),this.ab=this.G=this.D=this.ba=this.Ba=this.aa=this.na=this.ea=this.Ha=this.K=this.P=this.b=this.f=null,this.Ia=new t.yu,t.K(this.Ia,this.Gba,this),this.o=new t.mI,t.K(this.o,this.Iba,this),this.eb=null,this.i=[],this.Ka=0,t.T(this.ua,[["horizontalStroke",16],["verticalStroke",16],["oddFill",16],["evenFill",16],["oddHolidayFill",16],["evenHolidayFill",16],["oddHatchFill",16],["evenHatchFill",16],["oddHolidayHatchFill",16],["evenHolidayHatchFill",16],["drawTopLine",128],["drawRightLine",128],["drawBottomLine",128],["drawLeftLine",128]])},w=function(){t.yu.call(this),this.o=new t.mI,t.K(this.o,this.Kba,this)},x=function(e,i){t.V.call(this),this.pa=e,this.Ad=i,this.je=null,this.b=[],this.i={},this.f=0,this.o=!1,this.Bb=null,this.B(4294967295)},C=function(t,e,i,n,s){if(e=t.b[e])for(var a=0;a<e.Xm.length;a++){var o=e.Xm[a];(0,window.isNaN)(o.bQ)||T(t,e,o,i,n,s)}},D=function(t){return t.pb(),t.f},T=function(e,i,s,a,o,r){var l=e.pa.Az(),h=s.shape,c=s.ZU,u=i.data;l.b||(l.b=n("fill",1));var d=l.b(l,u,s,a);u=i.data,l.o||(l.o=n("stroke",2));var p=l.o(l,u,s,a);u=i.data,l.f||(l.f=n("hatchFill",3));var g=l.f(l,u,s,a),f=t.$b(p);h?u=t.$b(h.stroke())==f:(h=s.shape=t.eC(o),u=!0),h.fill(d),h.stroke(p),d=!1,g?(c||((c=s.ZU=t.eC(o)).Dd(!0),d=!0),c.fill(g),c.stroke("none")):c&&c.fill("none"),o=e.Bb,g=e.pa.Ra(),e.pa.Od?((p=e.pa).pb(),p=p.dn):p=e.f;var b=p,v=t.p(s.top)?s.top:i.top,m=r/2+f/2;p=t.R(g.un(s.start)+o.left,r)+m,r=t.R(g.un(s.end+864e5)+o.left,r)-m,g=t.R(v/b*o.height+o.top+f/2,f),v&&g++,f=t.R((v+s.Ny)/b*o.height+o.top-f/2,f),u&&(h.clear().moveTo(p,g).lineTo(r,g).lineTo(r,f).lineTo(p,f).close(),h.tag={X:e.pa,index:s.TM}),d&&c.clear().moveTo(p,g).lineTo(r,g).lineTo(r,f).lineTo(p,f).close(),l.tf(s.bQ,a,l.Ic(s,i.data),new t.I(p,g,r-p,f-g),i.data)},k=function(){t.V.call(this)},$=function(){t.V.call(this),t.T(this.ua,[["size",0,1],["borderRadius",0,1],["opacity",0,1],["align",0,1],["fittingMode",0,1]])},O=function(e){t.Y.call(this),this.P=e,this.i=this.D=this.K=this.G=this.o=this.Aa=null,this.coords={wk:{x:0,y:0,height:0},name:{x:0,y:0,height:0},type:{x:0,y:0,height:0},description:{x:0,y:0,height:0}},this.aa={fontColor:"color",fontOpacity:"opacity",fontDecoration:"decoration",textDirection:"direction"},this.index=window.NaN,t.T(this.ua,[["width",0,0],["imageSrc",0,0],["name",0,0],["type",0,0],["description",0,1],["tags",0,1]])},P=function(e,i,n){var s=e.g(i);for(e=e.vf(i),t.A(n)||(n=[n]),i=0;i<n.length;i++)s=s?s[n[i]]:void 0,e=e?e[n[i]]:void 0;if(!t.p(e))return s;if(!t.p(s))return e;if(null===s||(0,window.isNaN)(s)&&!t.C(s))return s;if(t.ka(s)!=t.ka(e))return s;if(t.A(s)){n=[];var a=Math.max(e.length,s.length);for(i=0;i<a;i++)n[i]=t.p(s[i])?s[i]:e[i]}else n={},t.ra(n,e),t.ra(n,s);return n},L=function(e,i,n,s,a,o){e=e.g("width");var r=t.L(a.top,o)||0,l=t.L(a.right,e)||0;o=t.L(a.bottom,o)||0,n.x=s+(t.L(a.left,e)||0),n.y+=r,i.width(e-n.x-l),n.height=i.qd()+o},G=function(){t.V.call(this),t.T(this.ua,[["fontSize",0,1],["fontFamily",0,1],["fontColor",0,1],["fontOpacity",0,1],["fontDecoration",0,1],["fontStyle",0,1],["fontVariant",0,1],["fontWeight",0,1],["letterSpacing",0,1],["textDirection",0,1],["lineHeight",0,1],["textIndent",0,1],["vAlign",0,1],["hAlign",0,1],["wordWrap",0,1],["wordBreak",0,1],["textOverflow",0,1],["textShadow",0,1],["selectable",0,1],["useHtml",0,1],["disablePointerEvents",0,1]])},F=function(){G.call(this)},I=function(){t.Y.call(this),this.G=new t.mI,t.K(this.G,this.Lba,this),this.f=this.Aa=null,this.o=[],this.Ub=[],this.Ka=this.Ha=0,t.T(this.ua,[["stroke",16],["oddFill",16],["evenFill",16],["drawTopLine",256],["drawRightLine",256],["drawBottomLine",256],["drawLeftLine",256]])},E=function(e,i,n){var s,a={};if(e.length)for(s in i){var o=i[s].hX,r=o.charAt(0).toUpperCase()+o.substr(1);r=e+r,r=n.get(r),t.p(r)&&(a[o]=r)}else for(s in i)o=i[s].hX,r=n.get(o),t.p(r)&&(a[o]=r);return a},A=function(t,e,i){for(var n=0;n<t.Ub.length;n++)t.Ub[n].oa[e]=i},U=function(){I.call(this),this.data(null),t.T(this.ua,[["rowHeight",0],["minRowHeight",0],["maxRowHeight",0]])},_=function(){t.kt.call(this),this.je=null,this.o=!1,this.G=60,this.f="day",this.b=1,this.K=Date.UTC(2e3,0),this.D={},this.i=null,this.P=0},j=function(t){if(t.J(1)){var e=t.f+t.b.toFixed(0);t.i=t.D[e],t.i||(t.D[e]=t.i=new M(t)),t.B(2),t.I(1)}t.J(2)&&(t.P=N(t.i,t.K),t.I(2))},M=function(e){this.je=e.calendar(),this.Hz=e.aY();var i=e.Dg(),n=e.count();e=e.zP(),this.Dv=vt[i]*n||window.NaN,!this.Hz&&this.Dv?this.b=t.Uo(e,i,n,2e3):(this.Dv=window.NaN,this.LF=this.zn=t.Vo(i,n),this.Yq=this.zn.b(-1),this.Hz?(e=t.So(e,this.zn,2e3),this.b=d(this.je,e,this.zn),(0,window.isNaN)(this.b)&&(this.b=p(this.je,e,this.Yq),this.zn=null),(0,window.isNaN)(this.b)?(this.xm=this.Bk=null,i=window.NaN):(this.Bk=new t.On(new Date(this.b)),this.Bk.add(this.LF),this.xm=[this.b,this.Bk.getTime()],i=p(this.je,this.b,this.Yq)),(0,window.isNaN)(i)?this.Yq=this.$k=this.rm=null:((n=new t.On(new Date(i))).add(this.LF),this.rm=[n.getTime(),i],this.$k=new t.On(new Date(i)))):(this.b=t.Uo(e,i,n,2e3),this.Bk=new t.On(new Date(this.b)),this.Bk.add(this.zn),this.xm=[this.b,this.Bk.getTime()],this.$k=new t.On(new Date(this.b)),this.$k.add(this.Yq),this.rm=[this.b,this.$k.getTime()]))},N=function(i,n){if(i.Dv)return(n-i.b)/i.Dv;var s;if(i.xm&&!i.Dv)if(n>=i.b){if(i.zn&&i.Bk.getTime()<n)if(i.Hz){var a=u(i.je,i.Bk.getTime(),n,i.zn,!0);for(s=0;s<a.length;s++){var o=a[s];i.xm.push(o.start,o.end)}a.length&&i.Bk.setTime(a[a.length-1].end),i.Bk.getTime()<n&&(i.zn=null)}else{s=i.Bk.getTime();do{a=s,i.Bk.add(i.zn),s=i.Bk.getTime(),i.xm.push(a,s)}while(s<n)}}else if(i.rm&&i.Yq&&i.$k.getTime()>n)if(i.Hz){for(s=(a=u(i.je,n,i.$k.getTime()-1,i.LF,!0)).length;s--;)o=a[s],i.rm.push(o.end,o.start);a.length&&i.$k.setTime(a[0].start),i.$k.getTime()>n&&(i.Yq=null)}else{s=i.$k.getTime();do{a=s,i.$k.add(i.Yq),s=i.$k.getTime(),i.rm.push(a,s)}while(s>n)}return i.xm?n==i.b?0:n>i.b?i.Bk.getTime()<=n?i.xm.length/2:0<=(a=t.Na(i.xm,n))?Math.round(a/2):1&(a=~a)?(a>>1)+(n-i.xm[a-1])/(i.xm[a]-i.xm[a-1]):a>>1:i.rm?i.$k.getTime()>=n?-i.rm.length/2:0<=(a=t.Na(i.rm,n,e))?-Math.round(a/2)||0:1&(a=~a)?-((a>>1)+(n-i.rm[a-1])/(i.rm[a]-i.rm[a-1])):-(a>>1)||0:0:window.NaN},B=function(e,n){t.ux.call(this),this.Ga("resource"),this.gd().hoverMode("single").selectionMode("multi-select"),this.state=new t.ix(this),this.Sb=new t.I(0,0,0,0),this.G=new I,this.G.target(this),t.K(this.G,this.Ega,this),this.qc=new t.I(0,0,0,0),this.ea=new t.oI,t.K(this.ea,this.Fga,this),this.ud=new t.I(0,0,0,0),this.fb=new w,t.K(this.fb,this.xga,this),this.Ka=new t.mI,t.K(this.Ka,this.Fba,this),this.f=new S,t.K(this.f,this.uga,this),this.yg=new t.I(0,0,0,0),this.D=new t.GB(!0),t.W(this,"horizontalScrollBar",this.D),this.D.wa("scrollerchange",this.Jga,!1,this),t.K(this.D,this.Kga,this),this.bj=new t.I(0,0,0,0),this.o=new t.GB(!0),t.W(this,"verticalScrollBar",this.o),this.o.ta("inverted",!0),this.o.wa("scrollerchange",this.Lga,!1,this),t.K(this.o,this.Mga,this),this.je=new h,this.eb=new _,this.eb.calendar(this.je),t.K(this.eb,this.Dba,this),this.ta("currentStartDate",window.NaN),this.sb=this.$a=window.NaN,this.Ap=this.i=null,this.Ba=this.b=0,this.mf=this.Oj=null,this.Dk=0,this.ba=[],this.P=[],this.bg=[],this.ec=null,this.dn=0,this.Hd=this.Od=!1,this.nf=null,this.Za=new t.Hu,t.K(this.Za,this.jga,this),this.Uc=new i(this),t.K(this.Uc,this.dga,this),this.na=new b(this),t.K(this.na,this.lga,this),this.data(e||null,n),t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj),t.T(this.ua,[["pixPerHour",524288,1],["minRowHeight",524288,1],["resourceListWidth",4,9],["timeLineHeight",4,9],["defaultMinutesPerDay",524288,1],["currentStartDate",262144,1],["splitterStroke",16777216,1]])},R=function(e,i,n){t.ag.call(this,i.ia()),this.b=n,this.pa=e,this.Qj=void 0,this.rs=(0,t.pa)((function(){this.Qj=void 0;var t=this.pa,e=this.Ha,i=t.eb.Ow(this.ea-t.sb);e/=t.b,t.ka(),i!=t.g("currentStartDate")&&(t.ta("currentStartDate",i),t.B(262144,1)),e!=t.Ba&&(t.Ba=e,t.B(1048576,1)),t.da(!0)}),this),t.bg(this),this.wa("start",this.ba,!1,this),this.wa("end",this.i,!1,this)},H=function(t){this.pa=t,this.reset()},z=function(e,i){var n=new B(e,i);return n.ga(!0,t.nm("resource")),n};t.Mn.prototype.NJ=t.ca(6,(function(e){return[this.getUTCFullYear(),t.uc(this.getUTCMonth()+1,2),t.uc(this.getUTCDate(),2)].join(e?"-":"")})),t.Nn.prototype.NJ=t.ca(5,(function(e){var i=t.Mn.prototype.NJ.call(this,e);return e?i+" "+t.uc(this.getUTCHours(),2)+":"+t.uc(this.getUTCMinutes(),2)+":"+t.uc(this.BU(),2):i+"T"+t.uc(this.getUTCHours(),2)+t.uc(this.getUTCMinutes(),2)+t.uc(this.BU(),2)}));var V={gta:"year",Zsa:"week",Tna:"day",NONE:"none"},q={tma:"availability-per-chart",uma:"availability-per-resource",Xla:"activity-per-chart",Yla:"activity-per-resource"};t.H(i,t.V),t.Gq(i,["fill","stroke","hatchFill","labels"],"normal"),t.g=i.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.sa=16,t.g.ra=1;var W=t.Yb("diagonal-brick");t.g=i.prototype,t.g.de=function(e){t.X(e,1)&&this.B(16,1)},t.g.Ic=function(e,i){return this.i||(this.i=new t.Fw),t.ov(this.i,{start:{value:e.start,type:"date-time"},end:{value:e.end,type:"date-time"},minutesPerDay:{value:e.Ny,type:"number"},hoursPerDay:{value:e.Ny/60,type:"number"},hoursPerDayRounded:{value:Math.ceil(e.Ny/30)/2,type:"number"},name:{value:i.name||"Unnamed Activity",type:"string"},activityName:{value:i.name,type:"string"},activityInfo:{value:i,type:""}})},t.g.tf=function(e,i,n,s,a){var o=this.ca.labels(),r=0==i?"normal":1==i?"hovered":"selected",l=a.normal?a.normal.label:void 0,h=l||a.label;l=void 0,i!=t.gm&&(l=(l=a[r]?a[r].label:void 0)||a[i==t.vo?"hoverLabel":"selectLabel"]),a=h&&t.p(h.enabled)?h.enabled:null,r=l&&t.p(l.enabled)?l.enabled:null,i=i==t.wo?this.selected().labels():i==t.vo?this.lb().labels():null,(null===r?i&&null!==i.enabled()&&t.p(i.enabled())?i.enabled():null===a?o.enabled():a:r)?(a=l&&l.position||i&&i.g("position")||h&&h.position||o.g("position"),a={value:t.Eo(s,a)},(r=o.be(e))?(r.Hf(n),r.jc(a)):r=o.add(n,a,e),r.Hi(),t.$u(r,i),r.td(h,l),r.width(s.width),r.height(s.height),r.clip(s),r.W()):o.clear(e)},t.g.oE=function(e,i){var n=this.ca.labels();n.ka(),this.D||(this.D=t.ok(),this.D.zIndex(4).parent(e),this.gg=t.tk(),this.D.clip(this.gg)),n.O(this.D),n.clear(),n.ja(i),n.zh=0,this.gg.shape(i)},t.g.wi=function(){var t=this.ca.labels();t.W();var e=t.sl();e&&e.Dd(!0),t.da(!1),this.I(16)};var K={};t.rq(K,0,"color",t.Sq),t.U(i,K);var Y={};t.g=i.prototype,t.g.Ge=function(t,e,i){return{sourceColor:i||this.g("color")||"blue",start:t.start,end:t.end,minutesPerDay:t.Ny,activityName:e.name,activityInfo:e}},t.g.Yi=function(t,e){return{sourceHatchFill:W,start:t.start,end:t.end,minutesPerDay:t.Ny,activityName:e.name,activityInfo:e}},t.g.ph=function(t){return null!=this.Pa[t]},t.g.sc=function(e,i,n,s){var a=0==i?this.ca:1==i?this.za:this.Ea,o=n[0==i?"normal":1==i?"hovered":"selected"];return i=(o?o[e]:void 0)||n[t.hm(i,e)],t.p(i)?i=s(i):null==(i=a.nd(e))&&(i=a.vf(e),t.p(i)&&(i=s(i))),i},t.g.F=function(){var e=i.u.F.call(this);return t.Tq(this,K,e,"Activities"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.U=function(e,n){i.u.U.call(this,e),t.Iq(this,K,e),this.ca.ga(!!n,e),this.ca.ga(!!n,e.normal),this.za.ga(!!n,e.hovered),this.Ea.ga(!!n,e.selected)},t.g.R=function(){this.o=this.b=this.f=null,t.sd(this.ca,this.za,this.Ea,this.gg),this.gg=this.Ea=this.za=this.ca=null,i.u.R.call(this)};var X=i.prototype;X.normal=X.Qa,X.hovered=X.lb,X.selected=X.selected,t.g=o.prototype,t.g.OY=function(t){return t.getTime()>=this.K.getTime()&&t.getTime()<=this.i.getTime()},t.g.tda=function(t){return this.OY(t)&&(null===this.b||(t.UM()+6)%7==this.b)},t.g.sda=function(t){if(!this.OY(t))return!1;if(this.b)return t.getUTCMonth()==this.b.getUTCMonth()&&t.getUTCDate()==this.b.getUTCDate();var e=t.getUTCFullYear();t=t.getTime();var i=this.o.clone();i.CU(e);var n=this.f.clone();return n.CU(e),t>=i.getTime()&&t<=n.getTime()},t.g.mW=function(t,e){var i=this.o,n=e.getTime()+36e5*i[0]+6e4*i[1];i=this.f;for(var s=e.getTime()+36e5*i[0]+6e4*i[1],a=[],o=0;(i=t[o])&&i[1]<n;)a.push(i),o++;if(o<t.length){if(i[0]>s)this.D&&a.push([n,s]);else{for(this.D?n=Math.min(n,i[0]):(i[0]<n&&a.push([i[0],n]),n=s);i&&i[1]<=s;)i=t[++o];o<t.length&&i[0]<=s&&(a.push([n,i[1]]),o++)}for(;o<t.length;o++)a.push(t[o])}else this.D&&a.push([n,s]);return a},t.g.m5=function(t,e){return t.length=0,this.D&&t.push([e.getTime(),e.getTime()+864e5-6e4]),t},t.H(h,t.V),h.prototype.sa=0,h.prototype.ra=2;var J="dd.MM",Z=new Date(Date.UTC(2e3,0)),Q=new t.On(0,0,1),tt=new t.On(9999,11,31),et=new t.En(0,0,1);t.g=h.prototype,t.g.g7=function(e){if(t.p(e)){var i;if(t.A(e)){var n=t.P(e[0],window.NaN,!0);n=t.Za(n,0,6),e=t.P(e[1],window.NaN,!0),e=t.Za(e,0,6),(0,window.isNaN)(n)?i=(0,window.isNaN)(e)?null:[e,e]:(0,window.isNaN)(e)?i=[n,n]:(n>e&&(i=n,n=e,e=i),i=[n,e])}else i=null;return this.P=!1,this.b=i,f(this),this.va(2),this}return this.b},t.g.E6=function(e){return t.p(e)?(this.o=t.N(e),f(this),this.va(2),this):this.o},t.g.$_=function(e){if(t.p(e)){for(this.i=t.A(e)?e.slice():[],e=this.f.length=0;e<this.i.length;e++)this.f.push(new o(this.i[e]));return f(this),this.va(2),this}return this.i},t.g.vD=function(e,i,n,s){return u(this,t.Xk(e),t.Xk(i),t.Vo(t.Zk(n,"day",!0),t.P(s)))},t.g.H2=function(e){t.X(e,2)&&!this.b&&f(this)},t.g.F=function(){var t=h.u.F.call(this);return this.P||(t.weekendRange=this.b?[this.b[0],this.b[1]]:null),t.timezoneOffset=this.o,t.availabilities=this.i.slice(),t},t.g.U=function(t){h.u.U.call(this,t),this.g7(t.weekendRange),this.E6(t.timezoneOffset),this.$_(t.availabilities)},t.g.R=function(){this.i=null,this.Y&&t.kr(this.Y,this.H2,this),this.Y=null,h.u.R.call(this)};var it=h.prototype;t.E("anychart.scales.calendar",(function(t){return new h(t)})),it.weekendRange=it.g7,it.timezoneOffset=it.E6,it.availabilities=it.$_,it.getWorkingSchedule=it.vD,t.H(b,t.Y),t.g=b.prototype,t.g.sa=208|t.Y.prototype.sa,t.g.ra=2|t.Y.prototype.ra,t.g.clear=function(){this.f.clear(),this.o.clear(),this.labels().clear(),this.G.length=0,this.b=null,this.P=-1,this.B(192)},t.g.W=function(){if(this.zc()){if(this.J(4)&&(this.K=this.ja(),this.gg.shape(this.K),this.I(4)),this.J(128)){for(var t=0;t<this.G.length;t++)y(this,this.G[t]);this.I(144)}if(this.J(64)){(t=this.labels()).ka(),t.O(this.D),t.ja(this.K),t.zh=0,this.gg.shape(this.K),t.W();var e=t.sl();e&&e.Dd(!0),t.da(!1),this.I(64)}if(this.J(16)){var i=this.g("fill"),n=this.g("stroke");this.f.Pj((function(t){t.fill(i),t.stroke(n)}));var s=this.g("hatchFill");this.o.Pj((function(t){t.fill(s),t.stroke(null)})),this.I(16)}this.J(2)&&(t=this.O(),this.Oa.parent(t),this.I(2)),this.J(8)&&(t=this.zIndex(),this.Oa.zIndex(t),this.I(8))}},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){t.X(e,1)&&this.B(16,1)},t.g.Ic=function(e,i,n){return this.i||(this.i=new t.Fw),i={minutes:{value:e=i.lC-i.mz,type:"number"},hours:{value:e/60,type:"number"},hoursRounded:{value:Math.ceil(e/30)/2,type:"number"},percent:{value:e/i.mz*100,type:"number"},allocated:{value:i.lC,type:"number"},vacant:{value:i.mz,type:"number"},activities:{value:(0,t.Wa)(i.Az,(function(t){return(t=n.b[t]||null)?t.data:null})),type:""}},t.ov(this.i,i)},t.g.tf=function(t,e,i,n){var s=this.labels();if(e){var a=s.be(t),o={value:{x:i.left,y:i.top}};a?(a.Hf(e),a.jc(o)):a=s.add(e,o,t),a.Hi(),a.td(n),a.width(i.width),a.height(i.height),a.clip(i),a.W()}else s.clear(t)};var nt={};t.rq(nt,1,"fill",t.Qq),t.rq(nt,1,"stroke",t.Pq),t.rq(nt,1,"hatchFill",t.Rq),t.rq(nt,0,"height",t.Bq),t.U(b,nt),t.g=b.prototype,t.g.ph=function(t){return null!=this.Pa[t]},t.g.sc=function(e,i,n){return i=i[e],t.p(i)?i=n(i):null==(i=this.Pa[e])&&(i=this.oa[e],t.p(i)&&(i=n(i))),i},t.g.F=function(){var e=b.u.F.call(this);return t.Tq(this,nt,e,"Resource Conflicts"),e},t.g.U=function(e,i){b.u.U.call(this,e),t.Iq(this,nt,e),this.labels().ga(!!i,e.labels)},t.g.R=function(){t.sd(this.f,this.o,this.gg),this.f=this.o=this.gg=null,b.u.R.call(this)};var st=b.prototype;st.labels=st.labels,t.H(S,t.wu),S.prototype.sa=976|t.wu.prototype.sa,S.prototype.ra=t.wu.prototype.ra;var at={};t.rq(at,1,"horizontalStroke",t.Pq),t.rq(at,1,"verticalStroke",t.Pq),t.rq(at,1,"oddFill",t.Qq),t.rq(at,1,"evenFill",t.Qq),t.rq(at,1,"oddHolidayFill",t.Qq),t.rq(at,1,"evenHolidayFill",t.Qq),t.rq(at,1,"oddHatchFill",t.Rq),t.rq(at,1,"evenHatchFill",t.Rq),t.rq(at,1,"oddHolidayHatchFill",t.Rq),t.rq(at,1,"evenHolidayHatchFill",t.Rq),t.rq(at,0,"drawTopLine",t.Dq),t.rq(at,0,"drawRightLine",t.Dq),t.rq(at,0,"drawBottomLine",t.Dq),t.rq(at,0,"drawLeftLine",t.Dq),t.U(S,at),t.g=S.prototype,t.g.background=function(e){return t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.Hba=function(e){return t.p(e)?(this.o.N(e),this.B(512,1),this):this.o},t.g.Ra=function(e){return t.p(e)?(this.eb!=e&&(this.eb&&t.kr(this.eb,this.t_,this),(this.eb=e)&&t.K(this.eb,this.t_,this),this.B(128,1)),this):this.eb},t.g.t_=function(){this.B(128,1)},t.g.Gba=function(){this.B(64,1)},t.g.Iba=function(){this.B(512,1)},t.g.W=function(){if(this.zc()){if(this.f||(this.f=t.ok(),this.b=this.f.Bd(),this.gg=t.tk(),this.f.clip(this.gg),this.P=this.b.path(),this.P.stroke(null),this.K=this.b.path(),this.K.stroke(null),this.Ha=this.b.path(),this.Ha.stroke(null),this.ea=this.b.path(),this.ea.stroke(null),this.na=this.b.path(),this.na.stroke(null),this.aa=this.b.path(),this.aa.stroke(null),this.Ba=this.b.path(),this.Ba.stroke(null),this.ba=this.b.path(),this.ba.stroke(null),this.D=this.b.path(),this.D.fill(null),this.D.eq(!0),this.G=this.b.path(),this.G.fill(null),this.G.eq(!0)),this.J(4)&&(this.ab=this.ob(),t.Xo(this.ab,0),this.gg.shape(this.ab),this.B(960),this.I(4)),this.J(64)&&(this.b.zIndex(this.Ia.zIndex()+1),this.Ia.ja(this.ab),this.Ia.O(this.f),this.Ia.W(),this.I(64)),this.J(16)&&(this.P.fill(this.g("oddFill")),this.K.fill(this.g("evenFill")),this.Ha.fill(this.g("oddHolidayFill")),this.ea.fill(this.g("evenHolidayFill")),this.na.fill(this.g("oddHatchFill")),this.aa.fill(this.g("evenHatchFill")),this.Ba.fill(this.g("oddHolidayHatchFill")),this.ba.fill(this.g("evenHolidayHatchFill")),this.D.stroke(this.g("horizontalStroke")),this.G.stroke(this.g("verticalStroke")),this.I(16)),this.J(128)){if(this.P.clear(),this.K.clear(),this.Ha.clear(),this.ea.clear(),this.na.clear(),this.aa.clear(),this.Ba.clear(),this.ba.clear(),this.D.clear(),this.G.clear(),this.eb){for(var e=this.eb.Fn(0,this.ab.width),i=this.i.length-1,n=e.length-1,s=t.$b(this.D.stroke()),a=t.$b(this.G.stroke()),o=t.R(0,s),r=0,l=!!this.g("drawTopLine"),h=!!this.g("drawRightLine"),c=!!this.g("drawBottomLine"),u=!!this.g("drawLeftLine"),d=0;d<=i;d++){var p=d==i;r=t.R(o+this.i[d]-(p?s:0),s);for(var g=0;g<=n;g++){var f=g==n,b=e[g],v=t.R(this.eb.un(b.start)+this.ab.left,a),m=t.R(this.eb.un(b.end)+this.ab.left-(f?a:0),a);if(b=b.holiday,1&d)if(b){b=this.ea;var y=this.ba}else b=this.K,y=this.aa;else b?(b=this.Ha,y=this.Ba):(b=this.P,y=this.na);var S=u&&!g?Math.ceil(v):Math.floor(v),w=h||!f?Math.floor(m):Math.ceil(m),x=l&&!d?Math.ceil(o):Math.floor(o),C=c||!p?Math.floor(r):Math.ceil(r);b.moveTo(S,x).lineTo(w,x).lineTo(w,C).lineTo(S,C).close(),y.moveTo(S,x).lineTo(w,x).lineTo(w,C).lineTo(S,C).close(),u&&!g&&this.G.moveTo(v,x).lineTo(v,C),!h&&f||this.G.moveTo(m,x).lineTo(m,C),l&&!d&&this.D.moveTo(S,o).lineTo(w,o),!c&&p||this.D.moveTo(S,r).lineTo(w,r)}o=r}this.Za=r}else this.Za=!1;this.I(128)}this.J(256)&&(this.b.oc(1,0,0,1,0,Math.round(this.ab.top-this.Ka*this.Za)),this.I(256)),this.J(512)&&(this.o.target(this.O().Ja().Tl()),this.o.Qf(this.ob()),this.o.W(),this.I(512)),this.J(2)&&(this.f.parent(this.O()),this.I(2)),this.J(8)&&(this.f.zIndex(this.zIndex()),this.I(8))}},t.g.remove=function(){this.f&&this.f.parent(null)},t.g.ph=function(t){return null!=this.Pa[t]},t.g.ys=function(){return 1},t.g.F=function(){var e=S.u.F.call(this);return t.Tq(this,at,e,"Resource Grid"),e.background=this.Ia.F(),e.overlay=this.o.F(),e},t.g.U=function(e,i){S.u.U.call(this,e,i),t.Iq(this,at,e),t.p(this.Ia)&&this.Ia.ga(!!i,e.background),this.o.ga(!!i,e.overlay)},t.g.R=function(){t.qd(this.Ia),this.Ia=null,t.qd(this.f),this.G=this.D=this.ba=this.Ba=this.aa=this.na=this.ea=this.Ha=this.K=this.P=this.b=this.f=null,t.qd(this.o),this.o=null,S.u.R.call(this)};var ot=S.prototype;ot.background=ot.background,ot.overlay=ot.Hba,t.H(w,t.yu),t.g=w.prototype,t.g.sa=128|t.yu.prototype.sa,t.g.ra=t.yu.prototype.ra,t.g.Jba=function(e){return t.p(e)?(this.o.N(e),this.B(128,1),this):this.o},t.g.Kba=function(){this.B(128,1)},t.g.W=function(){return this.J(4)&&this.B(128),w.u.W.call(this),this.J(128)&&(this.o.target(this.O().Ja().Tl()),this.o.Qf(this.ob()),this.o.W(),this.I(128)),this},t.g.F=function(){var t=w.u.F.call(this);return t.overlay=this.o.F(),t},t.g.U=function(t,e){w.u.U.call(this,t,e),this.o.ga(!!e,t.overlay)},t.g.R=function(){w.u.R.call(this),t.qd(this.o),this.o=null};var rt=w.prototype;rt.overlay=rt.Jba,t.H(x,t.V),t.g=x.prototype,t.g.sa=3,t.g.ra=0,t.g.calendar=function(e){return t.p(e)?(this.je||(this.je=new h(this.pa.calendar())),this.je.N(e),this):this.je||this.pa.calendar()},t.g.W=function(e,i,n,s,a,o){if(this.pb(),this.o){for(var r=Math.floor(i/864e5),l=Math.floor(n/864e5),h=this.pa.uS();r<=l;r++)v(h,864e5*r,this.i[r],this,a.top);v(h,864e5*r,null,this,a.top),l=h.g("height")+1,a.top+=l,a.height-=l}for(this.Bb=a,a=0;a<this.b.length;a++){l=this.b[a],h=i,r=n;for(var c=s,u=o,d=e.TM++,p=0;p<l.Xm.length;p++){var g=l.Xm[p];g.shape=null,g.ZU=null,g.TM=d,g.end+864e5<h||g.start>r?g.bQ=window.NaN:(g.bQ=e.h5.length,e.h5.push(d),T(this,l,g,t.nx(this.pa.state,e.TM),c,u))}}return e},t.g.pb=function(){if(this.J(1)){this.b.length=0;var e,i=this.pa.la.$();if(!i.select(this.Ad)||!(e=i.get("activities"))||!t.A(e))return;for(i=0;i<e.length;i++){var n=e[i];if(t.C(n)){var s=n.intervals;t.A(s)||(s=[n]);for(var a=this.pa.g("defaultMinutesPerDay"),o=[],r=0;r<s.length;r++){var l=s[r];if(l){var h=t.ps(l.start),c=t.ps(l.end);if(h&&c){if(h.getTime()>c.getTime()){var u=h;h=c,c=u}h=Date.UTC(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),c=Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u=t.P(l.totalMinutes,window.NaN,!1),o.push({start:h,end:c,Ny:(0,window.isNaN)(u)?t.P(l.minutesPerDay,a,!1):u/((c-h)/864e5+1),shape:null,ZU:null,bQ:window.NaN})}}}n=o.length?{data:n,top:0,Xm:o}:null}else n=null;n&&this.b.push(n)}this.B(2),this.I(1)}if(this.J(2)){for(this.i={},this.f=0,this.o=!1,e=this.pa.Hd,i=0;i<this.b.length;i++)for(n=(n=this.b[i]).Xm,s=0;s<n.length;s++){for(l=n[s],a=Math.floor(l.start/864e5),o=Math.floor(l.end/864e5),c=l.Ny,h=0,r=a;r<=o;r++){var d=this.i[r];if(!d){u=r,d=this.calendar(),u=new Date(u),u=new t.On(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d=g(d,u);for(var p=u=0;p<d.length;p++){var f=d[p];u+=f[1]-f[0]}d=u/6e4,this.i[r]=d={mz:d,lC:0,Az:d?[]:null,bottom:0}}d.mz&&(d.Az[d.Az.length-1]!=i&&d.Az.push(i),d.lC+=c,d.lC>d.mz&&(this.o=!0),d.bottom>h&&(h=d.bottom))}for(l.top=h,l=h+c,r=a;r<=o;r++)this.i[r].bottom=l,e&&this.f<d.mz&&(this.f=d.mz),this.f<d.bottom&&(this.f=d.bottom)}this.I(2)}},t.g.F=function(){return x.u.F.call(this)},t.g.U=function(t){x.u.U.call(this,t)},t.g.R=function(){t.sd(this.je),this.i=this.je=this.pa=this.b=null,x.u.R.call(this)},t.H(k,t.V),t.g=k.prototype,t.g.margin=function(e,i,n,s){return this.Qc||(this.Qc=new t.Mv,t.K(this.Qc,this.$A,this)),t.p(e)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},t.g.$A=function(){this.va(1)},t.g.ra=1,t.g.U=function(t,e){k.u.U.call(this,t,e),this.margin().ga(!!e,t.margin)},t.g.F=function(){var t=k.u.F.call(this);return t.margin=this.margin().F(),t},t.g.R=function(){t.qd(this.Qc),k.u.R.call(this)};var lt=k.prototype;lt.margin=lt.margin,t.H($,k);var ht={};t.sq(ht,[[0,"size",t.br],[1,"borderRadius",t.fr],[0,"opacity",t.er],[0,"align",t.zq],[0,"fittingMode",t.zq]]),t.U($,ht),$.prototype.U=function(e,i){$.u.U.call(this,e,i),t.Iq(this,ht,e,i)},$.prototype.F=function(){var e=$.u.F.call(this);return t.Tq(this,ht,e),e},t.H(O,t.Y),O.prototype.ra=t.Y.prototype.ra,O.prototype.sa=t.Y.prototype.sa;var ct={};t.sq(ct,[[0,"width",t.br],[0,"imageSrc",t.zq],[0,"name",t.zq],[0,"type",t.zq],[0,"description",t.zq],[1,"tags",t.fr]]),t.U(O,ct),t.g=O.prototype,t.g.Ij=function(t,e){var i;for(i in e){var n=e[i];i in this.aa&&(i=this.aa[i]),t[i]&&t[i](n)}},t.g.offsetY=function(e){return t.p(e)?(this.fO!=e&&(this.fO=e),this):this.fO},t.g.w_=function(e){var i={};if(e){var n=e.target,s=(0,t.za)(this.i,n);return i.type=e.type,i.target=n,i.index=s,i.text=n.text(),this.dispatchEvent(i)}return!1},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.W=function(){if(!this.zc())return this;var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),this.Aa||(this.Aa=t.ok()),this.o||(this.o=this.Aa.wk(),this.o.zIndex(1)),this.G||(this.G=this.Aa.text(),this.G.zIndex(1)),this.K||(this.K=this.Aa.text(),this.K.zIndex(1)),this.D||(this.D=this.Aa.text(),this.D.zIndex(1)),this.i||(this.i=[]),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(e),this.I(2));var s,a=this.g("imageSrc");if(this.o.src(a),this.Ij(this.o,P(this,"imageSettings",[])),e=this.g("name"),P(this,"nameSettings","useHtml")?this.G.htmlText(e):this.G.text(e),this.Ij(this.G,P(this,"nameSettings",[])),e=this.g("type"),P(this,"typeSettings","useHtml")?this.K.htmlText(e):this.K.text(e),this.Ij(this.K,P(this,"typeSettings",[])),e=this.g("description"),P(this,"descriptionSettings","useHtml")?this.D.htmlText(e):this.D.text(e),this.Ij(this.D,P(this,"descriptionSettings",[])),e=this.g("tags"),this.i.length){for(s=0;s<this.i.length;s++){var o=this.i[s];this.wc.gc(o,"click",this.w_),t.qd(o)}this.i=[]}var r=P(this,"tagSettings",[]);for(r.background=P(this,"tagSettings","background"),r.padding=P(this,"tagSettings","padding"),s=0;s<e.length;s++)o=new t.xv,this.wc.wa(o,"click",this.w_),o.N(r),o.sl().cursor("pointer"),o.O(this.Aa),o.zIndex(1),o.text(e[s]),this.i.push(o);if(this.J(4)){var l=this.g("height");e=this.P.u_(this,l),r=this.P.g2(l);var h=this.P.f2(l);l=this.g("width"),(0,window.isNaN)(e)||((0,window.isNaN)(h)||(e=Math.min(e,h)),(0,window.isNaN)(r)||(e=Math.max(e,r))),o=P(this,"imageSettings","margin"),this.coords.wk.x=t.L(o.left,l)||0;var c=t.L(o.right,l)||0;this.coords.wk.y=t.L(o.top,e)||0,s=t.L(P(this,"imageSettings","size"),l)||0,this.o.width(s),this.o.height(s);var u=0,d=0;""!=a&&(this.o.clip(function(e){var i=e.o.width();e.b||(e.b=t.mk(0,0)),e.b.Go(i).Fo(i);var n=0,s=0,a=0,o=0,r=P(e,"imageSettings","borderRadius");if(t.A(r)||(r=[r]),r&&r.length){for(var l=0;l<r.length;l++)r[l]=Math.min(r[l],i/2);1==r.length?(n=r[0],s=r[0],a=r[0],o=r[0]):2==r.length?(n=r[0],s=r[1],a=r[0],o=r[1]):3==r.length?(n=r[0],s=r[1],a=r[2],o=r[1]):4==r.length&&(n=r[0],s=r[1],a=r[2],o=r[3])}return e.b.round(n,s,a,o),e.b}(this)),u=this.coords.wk.x+s+c,d=this.coords.wk.y+s+t.L(o.bottom,e)||0),this.coords.name.x=0,this.coords.name.y=0,this.coords.name.height=0,null!=this.g("name")&&(o=P(this,"nameSettings","margin"),L(this,this.G,this.coords.name,u,o,e)),this.coords.type.y=this.coords.name.y+this.coords.name.height,null!=this.g("type")&&(o=P(this,"typeSettings","margin"),L(this,this.K,this.coords.type,u,o,e)),this.coords.description.y=this.coords.type.y+this.coords.type.height,null!=this.g("description")&&(o=P(this,"descriptionSettings","margin"),L(this,this.D,this.coords.description,u,o,e)),a=l-u;var p=this.coords.description.y+this.coords.description.height;if(o=p,this.i.length){o=P(this,"tagSettings","margin");var g=t.L(o.left,l);c=t.L(o.right,l);var f=t.L(o.bottom,e)||0,b=t.L(o.top,e)||0,v=u+g;p+=b;var m=!1;for(s=0;s<this.i.length;s++){var y=(o=this.i[s]).yi();m&&v+y.width+c-u>a&&(v=u+g,p=p+y.height+f+b),o.offsetX(v),o.offsetY(p),o.W(),m=!0,v+=y.width+c+g}o=p+y.height+f}(0,window.isNaN)(e)?(this.f=Math.max(d,o),(0,window.isNaN)(h)||(this.f=Math.min(this.f,h)),(0,window.isNaN)(r)||(this.f=Math.max(this.f,r))):this.f=e,this.Bb=t.kn(0,0,l,this.f),this.o.oc(1,0,0,1,this.coords.wk.x,this.coords.wk.y),this.G.oc(1,0,0,1,this.coords.name.x,this.coords.name.y),this.K.oc(1,0,0,1,this.coords.type.x,this.coords.type.y),this.D.oc(1,0,0,1,this.coords.description.x,this.coords.description.y),this.Aa.clip(this.Bb),this.I(4)}return this.Aa.oc(1,0,0,1,0,this.fO),n&&i.resume(),this},t.g.F=function(){return O.u.F.call(this)},t.g.U=function(t,e){O.u.U.call(this,t,e)},t.g.R=function(){this.P=null,t.sd(this.i),this.i=null,t.qd(this.D),this.D=null,t.qd(this.K),this.K=null,t.qd(this.G),this.G=null,t.qd(this.o),this.o=null,t.qd(this.Aa),this.Aa=null,O.u.R.call(this)},t.H(G,k);var ut={};t.sq(ut,[[0,"fontSize",t.zq],[0,"fontFamily",t.zq],[0,"fontColor",t.zq],[0,"fontOpacity",t.er],[0,"fontDecoration",t.bl],[0,"fontStyle",t.cl],[0,"fontVariant",t.dl],[0,"fontWeight",t.wq],[0,"letterSpacing",t.wq],[0,"textDirection",t.el],[0,"lineHeight",t.wq],[0,"textIndent",t.Bq],[0,"vAlign",t.al],[0,"hAlign",t.$k],[0,"wordWrap",t.Cq],[0,"wordBreak",t.Cq],[0,"textOverflow",t.zq],[0,"textShadow",t.Zb],[0,"selectable",t.Dq],[0,"useHtml",t.Dq],[0,"disablePointerEvents",t.Dq]]),t.U(G,ut),G.prototype.U=function(e,i){G.u.U.call(this,e,i),t.Iq(this,ut,e,i)},G.prototype.F=function(){var e=G.u.F.call(this);return t.Tq(this,ut,e),e},t.H(F,G),t.g=F.prototype,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.P=!1,t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(){this.va(1)},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.K(this.Wa,this.fm,this)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.fm=function(){this.va(1)},t.g.U=function(t,e){F.u.U.call(this,t,e),this.padding().ga(!!e,t.padding),this.background().ga(!!e,t.background)},t.g.F=function(){var t=F.u.F.call(this);return t.padding=this.padding().F(),t.background=this.background().F(),t.position="left-top",t.anchor="left-top",t.rotation="0",t},t.g.R=function(){t.sd(this.Wa,this.Ia),F.u.R.call(this)};var dt=F.prototype;dt.background=dt.background,dt.padding=dt.padding,t.H(I,t.wu),I.prototype.ra=t.Y.prototype.ra,I.prototype.sa=65488|t.Y.prototype.sa;var pt={};t.sq(pt,[[1,"stroke",t.Pq],[1,"oddFill",t.Qq],[1,"evenFill",t.Qq],[0,"drawTopLine",t.Dq],[0,"drawRightLine",t.Dq],[0,"drawBottomLine",t.Dq],[0,"drawLeftLine",t.Dq]]),t.U(I,pt),t.g=I.prototype,t.g.ph=function(t){return null!=this.Pa[t]},t.g.ys=function(){return 1},t.g.target=function(e){return t.p(e)?(this.b!=e&&(this.b=e,this.B(512,1)),this):this.b},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(64,1)},t.g.Tga=function(){this.B(1024,1)},t.g.JF=function(e){return this.P||(this.P=new $,t.K(this.P,this.Tga,this)),t.p(e)?(this.P.N(e),this):this.P},t.g.eia=function(){this.B(2048,1)},t.g.names=function(e){return this.aa||(this.aa=new G,t.K(this.aa,this.eia,this)),t.p(e)?(this.aa.N(e),this):this.aa},t.g.tla=function(){this.B(4096,1)},t.g.KF=function(e){return this.ea||(this.ea=new G,t.K(this.ea,this.tla,this)),t.p(e)?(this.ea.N(e),this):this.ea},t.g.nea=function(){this.B(8192,1)},t.g.CG=function(e){return this.K||(this.K=new G,t.K(this.K,this.nea,this)),t.p(e)?(this.K.N(e),this):this.K},t.g.Uka=function(){this.B(16384,1)},t.g.hz=function(e){return this.ba||(this.ba=new F,t.K(this.ba,this.Uka,this)),t.p(e)?(this.ba.N(e),this):this.ba},t.g.v_=function(e){return t.p(e)?(e=t.Za(t.N(e),0,1),this.Ha!=e&&(this.Ha=e,this.B(128,1)),this):this.Ha},t.g.xR=function(e){return t.p(e)?(this.G.N(e),this.B(32768,1),this):this.G},t.g.Lba=function(){this.B(32768,1)},t.g.$=function(){return this.b?this.b.la.$():null},t.g.u_=function(t){return this.i[t.index]},t.g.g2=function(){return window.NaN},t.g.f2=function(){return window.NaN},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.W=function(){if(!this.zc())return this;var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();if(n&&i.suspend(),this.Aa||(this.Aa=t.ok(),this.f=this.Aa.Bd(),this.f.zIndex(1),this.Ba=this.f.path(),this.Ba.stroke(null),this.Ba.zIndex(0),this.na=this.f.path(),this.na.stroke(null),this.na.zIndex(0),this.D=this.f.path(),this.D.fill(null),this.D.zIndex(1)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(e),this.I(2)),this.J(4)&&(this.nl=this.ob(),this.Aa.clip(this.nl),this.B(33216),this.I(4)),this.J(16)&&(this.D.stroke(this.g("stroke")),this.na.fill(this.g("evenFill")),this.Ba.fill(this.g("oddFill")),this.I(16)),this.J(64)&&((e=this.background()).ka(),e.zIndex(0),e.ja(this.nl.clone()),this.enabled()&&e.O(this.Aa),e.da(!1),e.W(),this.I(64)),this.J(32768)&&(this.G.target(this.O().Ja().Tl()),this.G.Qf(this.ob()),this.G.W(),this.I(32768)),this.J(512)){var s=this.$();for(s.Hb()>this.Ub.length&&this.B(31744),s.reset();s.advance();){var a=s.ma();this.Ub[a]?e=this.Ub[a]:((e=this.o.pop())||(e=new O(this)),this.Ub.push(e),e.index=a);var o=E("image",ht,a=s),r=a.get("imageMargin");t.p(r)&&(o.margin=t.Gm(r)),e.ta("imageSettings",o),o=E("name",ut,a),r=a.get("nameMargin"),t.p(r)&&(o.margin=t.Gm(r)),e.ta("nameSettings",o),o=E("type",ut,a),r=a.get("typeMargin"),t.p(r)&&(o.margin=t.Gm(r)),e.ta("typeSettings",o),o=E("description",ut,a),r=a.get("descriptionMargin"),t.p(r)&&(o.margin=t.Gm(r)),e.ta("descriptionSettings",o),o=E("tags",ut,a),r=a.get("tagsMargin"),t.p(r)&&(o.margin=t.Gm(r)),r=a.get("tagsPadding"),t.p(r)&&(o.padding=t.Gm(r)),r=a.get("tagsBackground"),t.p(r)&&(o.background=r),e.ta("tagSettings",o),e.ta("width",this.nl.width),e.ta("height",this.nl.height),e.ta("imageSrc",a.get("image")||""),e.ta("name",a.get("name")||null),e.ta("type",a.get("type")||null),e.ta("description",a.get("description")||null),r=(r=a.get("tags"))?t.A(r)?r.slice():[r]:[],e.ta("tags",r),a=a.get("enabled"),a=!(t.p(a)&&!(0,window.isNaN)(a)&&!a),e.enabled(a).kb(this.hz())}for(e=(e=s.Hb())||0;this.Ub.length!=e;)(s=this.Ub.pop()).ka().enabled(!1).da(!1).W(),this.o.push(s);this.B(256),this.I(512)}if(this.J(31744)){this.hz().background().I(4294967295),a=this.JF().F(),r=this.names().F(),o=this.KF().F();var l=this.CG().F(),h=this.hz().F();for(s=0;s<this.Ub.length;s++)(e=this.Ub[s]).oa.itemSettings=void 0,e.oa.imageSettings=a,e.oa.nameSettings=r,e.oa.typeSettings=o,e.oa.descriptionSettings=l,e.oa.tagSettings=h;this.B(256),this.I(31744)}if(this.J(1024)&&(A(this,"imageSettings",this.JF().F()),this.B(256),this.I(1024)),this.J(2048)&&(A(this,"nameSettings",this.names().F()),this.B(256),this.I(2048)),this.J(4096)&&(A(this,"typeSettings",this.KF().F()),this.B(256),this.I(4096)),this.J(8192)&&(A(this,"descriptionSettings",this.CG().F()),this.B(256),this.I(8192)),this.J(16384)&&(this.hz().background().I(4294967295),A(this,"tagSettings",this.hz().F()),this.B(256),this.I(16384)),this.J(256)){s=t.$b(this.D.stroke()),a=t.R(0,s),r=t.R(this.nl.width-s,s),h=0;var c=!!this.g("drawTopLine"),u=!!this.g("drawRightLine"),d=!!this.g("drawBottomLine"),p=!!this.g("drawLeftLine");o=t.R(h,s);var g=this.Ub.length,f=g-1;for(this.D.clear(),this.na.clear(),this.Ba.clear(),l=0;l<g;l++){var b=l==f;(e=this.Ub[l]).ta("width",this.nl.width),e.ta("height",this.nl.height),e.B(4);var v=h;e.ka().O(this.f).offsetY(v).da(!1).W(),v=e.enabled()?e.f:0,e=t.R(o+v-(l==g-1?s:0),s);var m=p?Math.ceil(a):Math.floor(a),y=u?Math.floor(r):Math.ceil(r),S=c&&!l?Math.ceil(o):Math.floor(o),w=d||!b?Math.floor(e):Math.ceil(e);(1&l?this.na:this.Ba).moveTo(m,S).lineTo(y,S).lineTo(y,w).lineTo(m,w).close(),p&&this.D.moveTo(a,S).lineTo(a,w),u&&this.D.moveTo(r,S).lineTo(r,w),c&&!l&&this.D.moveTo(m,o).lineTo(y,o),!d&&b||this.D.moveTo(m,e).lineTo(y,e),h+=v,o=e}this.Ka=h,this.I(256)}return this.J(128)&&(this.f.oc(1,0,0,1,this.nl.left,Math.round(this.nl.top-this.Ka*this.Ha)),this.I(128)),n&&i.resume(),this},t.g.F=function(){var e=I.u.F.call(this);return t.Tq(this,pt,e,"Resource list"),e.background=this.background().F(),e.images=this.JF().F(),e.names=this.names().F(),e.types=this.KF().F(),e.descriptions=this.CG().F(),e.tags=this.hz().F(),e.overlay=this.xR().F(),e},t.g.U=function(e,i){I.u.U.call(this,e,i),t.Iq(this,pt,e,i),this.background().ga(!!i,e.background),this.JF().ga(!!i,e.images),this.names().ga(!!i,e.names),this.KF().ga(!!i,e.types),this.CG().ga(!!i,e.descriptions),this.hz().ga(!!i,e.tags),this.xR().ga(!!i,e.overlay)},t.g.R=function(){t.sd(this.o),t.sd(this.Ub),t.qd(this.f),this.f=null,t.qd(this.Ia),this.Ia=null,t.qd(this.Aa),this.Aa=null,t.qd(this.Za),this.Za=null,t.qd(this.P),this.P=null,t.qd(this.aa),this.aa=null,t.qd(this.ea),this.ea=null,t.qd(this.K),this.K=null,t.qd(this.ba),this.ba=null,t.qd(this.G),this.G=null,I.u.R.call(this)},t.H(U,I),t.xu(U,I);var gt={};t.rq(gt,0,"rowHeight",t.br),t.rq(gt,0,"minRowHeight",t.br),t.rq(gt,0,"maxRowHeight",t.br),t.U(U,gt),t.g=U.prototype,t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():this.la=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(524288,1)),this):this.la},t.g.dd=function(e){t.X(e,16)&&this.B(512,1)},t.g.$=function(){return this.la?this.la.$():null},t.g.u_=function(e,i){var n=this.g("rowHeight");return t.L(n,i)},t.g.g2=function(e){var i=this.g("minRowHeight");return t.L(i,e)},t.g.f2=function(e){var i=this.g("maxRowHeight");return t.L(i,e)},t.g.F=function(){var t=U.u.F.call(this);return t.data=this.la?this.la.F():null,t},t.g.U=function(t,e){U.u.U.call(this,t,e),this.data(e?t.data:null)},t.g.R=function(){t.qd(this.Yc),this.Yc=null,delete this.la,this.Xf=null,U.u.R.call(this)};var ft=I.prototype;ft.target=ft.target,ft.background=ft.background,ft.images=ft.JF,ft.names=ft.names,ft.types=ft.KF,ft.descriptions=ft.CG,ft.tags=ft.hz,ft.overlay=ft.xR,ft=U.prototype,t.E("anychart.standalones.resourceList",(function(e){var i=new U;return i.U(t.nm("standalones.resourceList"),!0),i.data(e),i})),ft.data=ft.data,ft.draw=ft.W,ft.parentBounds=ft.ja,ft.container=ft.O,ft.verticalScrollBarPosition=ft.v_,t.H(_,t.kt),t.g=_.prototype,t.g.sa=3,t.g.ra=6,t.g.calendar=function(e){return t.p(e)?(this.je!=e&&(this.je&&t.kr(this.je,this.FA,this),(this.je=e)&&t.K(this.je,this.FA,this),this.D={},this.i=null,this.B(1,6)),this):(this.je||(this.je=new h,t.K(this.je,this.FA,this)),this.je)},t.g.aY=function(e){return t.p(e)?(e=!!e,this.o!=e&&(this.o=e,this.D={},this.i=null,this.B(1,6)),this):this.o},t.g.U6=function(e){return t.p(e)?(e=t.Bo(e),this.G!=e&&(this.G=e,this.B(2,6)),this):this.G},t.g.Dg=function(e){return t.p(e)?(e=t.Zk(e,"day",!0),this.f!=e&&(this.f=e,this.B(1,6)),this):this.f},t.g.count=function(e){return t.p(e)?(e=t.P(e),this.b!=e&&(this.b=e,this.B(1,6)),this):this.b},t.g.zP=function(e){return t.p(e)?(e=t.Xk(e),this.K!=e&&(this.K=e,this.B(2,2)),this):this.K},t.g.Ma=function(){return"date-time-with-calendar"},t.g.un=function(e){return j(this),(N(this.i,t.Xk(e))-this.P)*this.G},t.g.Ow=function(t){j(this);var e=this.i;if(t=t/this.G+this.P,e.Dv)e=Math.floor(t*e.Dv+e.b);else{var i,n=t;if(e.xm&&!e.Dv)if(0<=n){if(n=2*Math.ceil(n)+2,e.zn)if(e.Hz)for(;e.xm.length<n;){var s=d(e.je,e.Bk.getTime(),e.zn);if((0,window.isNaN)(s)){e.zn=null;break}e.Bk.setTime(s),e.Bk.add(e.zn),e.xm.push(s,e.Bk.getTime())}else for(i=e.Bk.getTime();e.xm.length<n;)s=i,e.Bk.add(e.zn),i=e.Bk.getTime(),e.xm.push(s,i)}else if(e.rm&&e.Yq)if(n=2*Math.ceil(-n)+2,e.Hz)for(;e.rm.length<n;){if(s=p(e.je,e.$k.getTime()-1,e.Yq),(0,window.isNaN)(s)){e.Yq=null;break}e.$k.setTime(s),e.$k.add(e.LF),e.rm.push(e.$k.getTime(),s),e.$k.setTime(s)}else for(i=e.$k.getTime();e.rm.length<n;)s=i,e.$k.add(e.Yq),i=e.$k.getTime(),e.rm.push(s,i);0>t?(t=-t,n=e.rm):n=e.xm,t-=s=Math.floor(t),s*=2,e=n?n.length>s?Math.floor(n[s]+(t&&(n[s+1]-n[s])*t)):n[n.length-1]:e.b}return e},t.g.Fn=function(e,i,n,s){j(this);var a=[];for(e=t.Uo(this.Ow(e),n||this.f,s||this.b,2e3),i=this.Ow(i),e=new t.On(new Date(e)),n=t.Vo(n||this.f,s||this.b),s=e.getTime();s<i;){var o=s;e.add(n),s=e.getTime();var r=c(this.je,o,s);this.o&&!r||a.push({start:o,end:s,holiday:!r})}return a},t.g.transform=function(){return window.NaN},t.g.Mc=function(){return window.NaN},t.g.sJ=function(){if(this.Pn&&(this.min=t.Uo(this.min,this.f,this.b,2e3)),this.Nn){this.max=t.Uo(this.max,this.f,this.b,2e3);var e=new t.On(new Date(this.max));e.add(t.Vo(this.f,this.b)),this.max=e.getTime()}},t.g.Xc=function(e){for(var i=0;i<arguments.length;i++)_.u.Xc.call(this,t.ps(arguments[i]));return this},t.g.FA=function(e){t.X(e,2)&&(this.D={},this.i=null,this.B(1,2))},t.g.F=function(){var t=_.u.F.call(this);return t.skipHolidays=this.o,t},t.g.U=function(t){_.u.U.call(this,t),this.aY(t.skipHolidays)},t.g.R=function(){t.qd(this.je),this.je=null,_.u.R.call(this)};var bt={millisecond:1};bt.second=1e3*bt.millisecond,bt.minute=60*bt.second,bt.hour=60*bt.minute,bt.day=24*bt.hour,bt.week=7*bt.day;var vt=bt;t.g=M.prototype,t.g.je=null,t.g.Hz=!1,t.g.Bk=null,t.g.$k=null,t.g.Dv=window.NaN,t.g.zn=null,t.g.LF=null,t.g.Yq=null,t.g.xm=null,t.g.rm=null;var mt=_.prototype;mt.dateToPix=mt.un,mt.pixToDate=mt.Ow,mt.calendar=mt.calendar,mt.skipHolidays=mt.aY,mt.unitPixSize=mt.U6,mt.unit=mt.Dg,mt.count=mt.count,mt.startDate=mt.zP,mt.getTicks=mt.Fn,mt.softMinimum=mt.KB,mt.softMaximum=mt.JB,mt.minimumGap=mt.Qs,mt.maximumGap=mt.Os,mt.minimum=mt.uh,mt.maximum=mt.di,t.H(B,t.ux),B.prototype.sa=67104768|t.ux.prototype.sa,B.prototype.Ma=function(){return"resource"},B.prototype.Ue=function(){return[]};var yt,St=(yt={},t.rq(yt,0,"pixPerHour",(function(e){return e=t.N(e),(0,window.isNaN)(e)?this.g("pixPerHour"):e})),t.rq(yt,0,"minRowHeight",(function(e){return e=t.N(e),(0,window.isNaN)(e)?this.g("minRowHeight"):e})),t.rq(yt,0,"resourceListWidth",(function(e){return null===(e=t.yo(e))?this.g("resourceListWidth"):e})),t.rq(yt,0,"timeLineHeight",(function(e){return null===(e=t.yo(e))?this.g("timeLineHeight"):e})),t.rq(yt,0,"defaultMinutesPerDay",(function(e){return t.P(e,60)})),t.rq(yt,0,"currentStartDate",(function(e){return(e=t.ps(e))?e.getTime():this.g("currentStartDate")})),t.rq(yt,1,"splitterStroke",t.Pq),yt);t.U(B,St),t.g=B.prototype,t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():this.la=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(524544,1)),this):this.la},t.g.Ra=function(e){return t.p(e)?(this.eb.N(e),this):this.eb},t.g.vY=function(e){if(t.p(e)){var i=t.zk(q,e,"activity-per-resource");return e="availability-per-chart"==i||"activity-per-chart"==i,i="availability-per-chart"==i||"availability-per-resource"==i,this.Od==e&&this.Hd==i||(this.Od=e,this.Hd=i,this.B(524288,1)),this}return this.Od?this.Hd?"availability-per-chart":"activity-per-chart":this.Hd?"availability-per-resource":"activity-per-resource"},t.g.Bba=function(e,i,n,s){return t.p(e)?(this.Za.N.apply(this.Za,arguments),this):this.Za},t.g.Az=function(e){return t.p(e)?(this.Uc.N(e),this):this.Uc},t.g.uS=function(e){return t.p(e)?(this.na.N(e),this):this.na},t.g.calendar=function(e){return t.p(e)?(this.je.N(e),this):this.je},t.g.gla=function(e){return t.p(e)?(this.ea.N(e),this):this.ea},t.g.uha=function(e){return t.p(e)?(this.fb.N(e),this):this.fb},t.g.r_=function(e){return t.p(e)?(this.f.N(e),this):this.f},t.g.tq=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.vx=function(e){return t.p(e)?(this.o.N(e),this):this.o},t.g.vz=function(e){if(t.p(e)){if(t.A(e)){for(var i=[],n=0;n<e.length;n++){var s=e[n],a=s.levels;if(t.A(a)&&a.length){for(var o=[],r=0;r<a.length;r++){var l=t.Qc(a[r]);l.unit=t.Zk(l.unit,"day",!0),l.count=t.P(l.count),o.push(l)}s={id:s.id?String(s.id):void 0,unit:t.Zk(s.unit,o[0].unit,!0),count:t.P(s.count,o[0].count,!1),unitPixSize:t.N(s.unitPixSize)||50,levels:o}}else s=null;s&&i.push(s)}i.length&&(this.me=i,this.bK(this.bK()))}return this}return t.Sl(this.me)},t.g.bK=function(e){if(t.p(e)){var i=window.NaN;if(t.z(e))for(var n=0;n<this.me.length;n++){var s=this.me[n];if(s.id==e){i=n;break}}return(0,window.isNaN)(i)&&(i=t.P(e,0,!0)),(s=this.me[i])&&(this.Dk=i,e=s,this.ka(),this.eb.Dg(e.unit),this.eb.count(e.count),this.eb.U6(e.unitPixSize),this.ea.MX(e.levels),this.da(!0)),this}return(s=this.me[this.Dk])&&s.id?s.id:this.Dk},t.g.Eba=function(e){return t.p(e)?(this.Ka.N(e),this.B(8388608,1),this):this.Ka},t.g.aka=function(e){return t.p(e)?(this.G.N(e),this.B(8388608,1),this):this.G},t.g.dd=function(e){t.X(e,16)&&this.B(256,1)},t.g.Dba=function(e){var i=0;t.X(e,4)&&(i|=393216),t.X(e,2)&&(i|=90112),this.B(i,1)},t.g.Ega=function(){this.B(4096,1)},t.g.Fga=function(){this.B(8192,1)},t.g.xga=function(){this.B(4194304,1)},t.g.uga=function(){this.B(65536,1)},t.g.Kga=function(){this.B(16384,1)},t.g.Mga=function(){this.B(32768,1)},t.g.Fba=function(){this.B(8388608,1)},t.g.jga=function(){this.B(524288,1)},t.g.dga=function(){this.B(2097152,1)},t.g.lga=function(e){var i=33554432;t.X(e,2)&&(i|=4),this.B(i,1)},t.g.Jga=function(t){return this.ta("currentStartDate",this.eb.Ow(t.startRatio*this.$a-this.sb)),this.B(262144,1),!1},t.g.Lga=function(t){return this.Ba=t.startRatio,this.B(1048576,1),!1},t.g.Cba=function(e){var i=e.deltaX,n=e.deltaY,s=!1;t.RC?(i*=15,n*=15):i&&(s=!0),i=-this.sb-i,n=-this.Ba*this.b-n,i=-t.Za(i,-this.$a+this.kg.width,0),n=-t.Za(n,-this.b+this.kg.height,0),i=this.eb.Ow(i-this.sb),n/=this.b,this.ka(),i!=this.g("currentStartDate")&&(this.ta("currentStartDate",i),this.B(262144,1)),n!=this.Ba&&(s=!0,this.Ba=n,this.B(1048576,1)),s&&e.preventDefault(),this.da(!0)},t.g.wr=function(t){this.mf=new R(this,this.Ha,this.Oj),this.mf.lk(t.kf)},t.g.s_=function(){if(!this.bz){var e,i=this.O();i&&(e=i.Ja())?(this.bz=!0,this.aa=new t.Ex(e.Tl()),this.wc.wa(this.aa,"mousewheel",this.Cba)):this.yo||(this.yo=(0,t.pa)(this.s_,this),(0,window.setTimeout)(this.yo,0))}},t.g.$=function(){return this.Ys||(this.Ys=new H(this)),this.Ys},t.g.Ec=function(){return this.$().reset()},t.g.pb=function(){if(this.J(524288)){this.eb.Bg();var e=this.la.$();e.reset();for(var i,n=0,s=0;e.advance();){(i=this.ba[n])?i.B(1):this.ba[n]=i=new x(this,n);var a=i,o=this.eb;a.pb();for(var r=0;r<a.b.length;r++)for(var l=a.b[r].Xm,h=0;h<l.length;h++){var c=l[h];o.Xc(c.start,c.end)}s=Math.max(s,D(i)),n++}for(n=e.Hb();n<this.ba.length;n++)t.qd(this.ba[n]);for(this.ba.length=e.Hb(),this.eb.Hg(),this.dn=s,this.i=[],this.Ap=[],this.b=0,e=this.P.length=0,a=this.na.g("height"),n=0;n<this.ba.length;n++)i=this.ba[n],o=this.Od?s:D(i),o=Math.max(this.g("pixPerHour")*o/60,this.g("minRowHeight")),o=this.Za.$j(o),i.o&&(o+=a+1),this.b+=o,this.i.push(o),this.Ap.push(this.b),e+=i.b.length,this.P.push(e);this.G.i=this.i,this.G.B(512),this.B(1179648),this.I(524288)}},t.g.aG=function(e){e=B.u.aG.call(this,e),e=t.Xo(e,0);var i=this.g("splitterStroke");i=i?t.$b(i):0;var n=t.L(this.g("timeLineHeight"),e.height),s=t.L(this.g("resourceListWidth"),e.width),a=t.R(e.top+n,0),o=t.R(e.left+s+i,0);return n=a-e.top,s=o-e.left-i,this.qc.top=e.top,this.qc.left=o,this.qc.width=e.left+e.width-o,this.qc.height=n,this.Sb.left=e.left,this.Sb.top=a,this.Sb.width=s,this.Sb.height=e.top+e.height-a,this.ud.top=e.top,this.ud.left=e.left,this.ud.width=s,this.ud.height=n,e.left=o,e.top=a,e.width=this.qc.width,e.height=this.Sb.height,e},t.g.Qh=function(e){if(this.pb(),!this.pf()){if(t.xr(this.D,this.o,this.ea,this.G,this.f,this.na),this.Ha||(this.Ha=this.Na.Bd(),this.Ha.zIndex(3),this.wc.Ce(this.Ha,"mousedown",this.wr),this.wc.Ce(this.Ha,"touchstart",this.wr),this.nf=t.tk(),this.Ha.clip(this.nf),this.Oj=this.Ha.rect(),this.Oj.zIndex(-1),this.Oj.fill(t.bm),this.Oj.stroke(null),this.ec=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ec.parent(this.Ha),this.ec.zIndex(3),this.Bu=this.Na.path(),this.Bu.zIndex(3)),this.s_(),this.J(393220)&&(this.nf.shape(e),this.Oj.Qf(e),this.B(66449408)),this.J(131072)){(0,window.isNaN)(this.g("currentStartDate"))&&(this.ta("currentStartDate",this.eb.uh()),this.eb.zP(this.g("currentStartDate")));var i=this.eb.un(this.eb.uh()),n=this.eb.un(this.eb.di());this.$a=n-i;var s=this.eb.un(this.g("currentStartDate"));(0,window.isNaN)(s)&&(s=i);var a=s+e.width;a>n&&(e.width<this.$a?s=n-e.width:(s=i,a=i+this.$a)),this.ta("currentStartDate",this.eb.Ow(s)),this.I(131072)}if(this.J(262144)&&(this.eb.zP(this.g("currentStartDate")),this.sb=-this.eb.un(this.eb.uh()),t.IB(this.D,this.sb/this.$a,(this.sb+e.width)/this.$a)),this.J(1048576)&&((a=(s=this.Ba*this.b)+e.height)>this.b&&(e.height<this.b?s=(a=this.b)-e.height:(s=0,a=this.b)),this.Ba=s/this.b||0,this.G.v_(this.Ba),function(e,i){t.p(i)&&(e.Ka=i,e.B(256,1))}(this.f,this.Ba),t.IB(this.o,this.Ba,a/this.b||0),this.B(35753984)),this.J(1310720)&&(this.D.ja(e),this.o.ja(this.D.yd()),s=this.o.yd(),this.yg=s.clone(),this.yg.height=e.height,this.bj=s.clone(),this.bj.width=e.width,this.I(1310720)),this.J(16384)&&(this.D.O(this.Na),this.D.ja(this.yg),this.D.W(),this.I(16384)),this.J(32768)&&(this.o.O(this.Na),this.o.ja(this.bj),this.o.W(),this.I(32768)),this.J(4194304)&&(this.fb.O(this.Na),this.fb.ja(this.ud),this.fb.W(),this.I(4194304)),this.J(8192)&&(this.ea.Ra(this.Ra()),this.ea.O(this.Na),this.ea.ja(this.qc),this.ea.W(),this.I(8192)),this.J(16777216)&&(a=(s=this.g("splitterStroke"))?t.$b(s):0,a=t.R(this.Sb.cb()+a/2,a),this.Bu.clear().moveTo(a,this.qc.top).lineTo(a,e.Va()).stroke(s),this.I(16777216)),this.J(8388608)&&(this.Ka.target(this.O().Ja().Tl()),this.Ka.Qf(this.ob()),this.Ka.W(),this.I(8388608)),this.J(4096)&&(this.G.ja(this.Sb),this.G.O(this.Na),this.G.W(),this.I(4096)),this.J(65536)&&(this.f.Ra(this.Ra()),this.f.O(this.Ha),this.f.ja(e),function(e,i){t.p(i)&&(e.i=i,e.B(128,1))}(this.f,this.i),this.f.W(),this.I(65536)),this.J(35651584)){s=t.$b(this.f.g("horizontalStroke")),a=e.clone(),i=this.eb.Ow(0),n=this.eb.Ow(e.width);var o=t.R(Math.round(e.top-this.Ba*this.b),s);this.ec.clear(),this.na.clear(),this.Uc.oE(this.Ha,e),this.bg.length=0;for(var r={TM:0,h5:this.bg},l=t.$b(this.f.g("verticalStroke")),h=0;h<this.ba.length;h++){var c=this.i[h],u=o;o=t.R(o+c,s);var d=t.L(this.Za.g("top"),c);c=t.L(this.Za.g("bottom"),c),a.top=u+s/2+d,a.height=o-s/2-c-a.top,r=this.ba[h].W(r,i,n,this.ec,a.clone(),l)}this.Uc.wi(),this.na.O(this.Ha),this.na.ja(e),this.na.W(),this.I(35651584)}t.zr(this.D,this.o,this.ea,this.G,this.f,this.na)}},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.ej=function(e){return t.p(e)?((e=t.Bk(e))!=this.fh&&(this.fh=e),this):this.fh},t.g.aj=function(){return!0},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.ce=function(){return null},t.g.ml=function(e){var i=this.$(),n=+i.b;i=i.o;var s=t.$b(this.f.g("verticalStroke"));C(this.ba[n],i,e,this.ec,s)},t.g.pk=function(e,i){var n=this.$(),s=+n.b;n=n.o;var a=t.$b(this.f.g("verticalStroke"));return C(this.ba[s],n,e,this.ec,a),i},t.g.wm=t.ia,t.g.pq=t.ia,t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget);return i=t.N(i.index),(0,window.isNaN)(i)||(e.pointIndex=i),e},t.g.Tg=function(e){var i=e.type;switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":i="pointmousemove";break;case"mousedown":i="pointmousedown";break;case"mouseup":i="pointmouseup";break;case"click":case"touchstart":i="pointclick";break;case"dblclick":i="pointdblclick";break;default:return null}var n=window.NaN;"pointIndex"in e?n=t.N(e.pointIndex):("labelIndex"in e?n=e.labelIndex:"markerIndex"in e&&(n=e.markerIndex),n=this.bg[t.N(n)]),e.pointIndex=n;var s=this.$();if(s.select(n)){var a=+s.b;s=s.o;var o=this.ba[a].b[s]||null}else a=s=window.NaN,o=null;return{type:i,actualTarget:e.target,target:this,originalEvent:e,resourceIndex:a,activityIndex:s,pointIndex:n,data:o.data,chart:this}},t.g.Tj=function(t,e){return this.$i((this.P[t-1]||0)+e),this},t.g.$i=function(e){return this.Md(),t.qx(this.state,e),this},t.g.Md=function(e,i){this.state.Vh(t.vo,t.p(e)?(this.P[+e-1]||0)+ +i:window.NaN)},t.g.select=function(t,e){return this.Ii((this.P[t-1]||0)+e),this},t.g.Ii=function(e,i){return this.state.Lh(t.wo,e,i&&i.shiftKey?void 0:t.vo),this},t.g.ie=function(e,i){this.state.Vh(t.wo,t.p(e)?(this.P[+e-1]||0)+ +i:window.NaN)},t.g.Uu=function(){return!0},t.g.Rk=function(){this.Qu||(this.Qu=new t.Fw);var e=this.$(),i=+e.b,n=e.o,s=(this.ba[i]||null).b[n]||null;(e=this.la.$()).select(i);for(var a=window.Infinity,o=-window.Infinity,r=[],l=0;l<s.Xm.length;l++){var h=s.Xm[l];a=Math.min(a,h.start),o=Math.max(o,h.end),r.push({start:h.start,end:h.end,minutesPerDay:h.Ny})}return i={chart:{value:this,type:""},resourceIndex:{value:i,type:"number"},activityIndex:{value:n,type:"number"},activity:{value:s.data,type:""},name:{value:s.data.name,type:"string"},intervals:{value:r,type:""},start:{value:a,type:"number"},end:{value:o,type:"number"},minutesPerDay:{value:1==r.length?r[0].minutesPerDay:window.NaN,type:"number"}},a={"%start":{value:new Date(a),type:"date-time"},"%end":{value:new Date(o),type:"date-time"}},this.Qu.Li([this]).lg(e).Dl(a),t.ov(this.Qu,i)},t.g.yj=function(){return!this.la.$().Hb()},t.g.F=function(){var e=B.u.F.call(this);return e.data=this.la?this.la.F():null,e.zoomLevels=this.vz(),e.zoomLevel=this.bK(),e.timeLine=this.ea.F(),e.calendar=this.je.F(),e.xScale=this.eb.F(),e.resourceList=this.G.F(),e.horizontalScrollBar=this.D.F(),e.verticalScrollBar=this.o.F(),e.grid=this.f.F(),e.timeTrackingMode=this.vY(),e.overlay=this.Ka.F(),e.cellPadding=this.Za.F(),e.conflicts=this.na.F(),t.Tq(this,St,e),{chart:e}},t.g.U=function(e,i){B.u.U.call(this,e),"cellPadding"in e&&this.Za.N(e.cellPadding),this.Uc.ga(!!i,e.activities),this.data(e.data),this.fb.ga(!!i,e.logo),this.Ka.ga(!!i,e.overlay),this.ea.ga(!!i,e.timeLine),this.je.N(e.calendar),this.eb.N(e.xScale),this.G.N(e.resourceList),this.D.N(e.horizontalScrollBar),this.o.N(e.verticalScrollBar),this.f.N(e.grid),this.vz(e.zoomLevels),this.bK(e.zoomLevel),this.vY(e.timeTrackingMode),this.uS(e.conflicts),t.Iq(this,St,e)},t.g.R=function(){t.sd(this.mf,this.Oj,this.Yc,this.ea,this.fb,this.G,this.D,this.o,this.f,this.ba,this.je,this.eb,this.Ka,this.na),delete this.la,this.mf=this.Oj=this.Yc=this.Xf=this.ea=this.fb=this.G=this.D=this.o=this.f=this.ba=this.je=this.eb=this.Ka=this.na=null,B.u.R.call(this)},t.H(R,t.ag),R.prototype.ba=function(){return!0},R.prototype.i=function(){t.p(this.Qj)&&(t.ll.cancelAnimationFrame(this.Qj),this.rs(0))},R.prototype.ar=function(){var t=this.b.zd();this.deltaX=-this.pa.sb,this.f.left=-this.pa.$a+t,this.f.width=this.pa.$a-t,t=this.b.qd(),this.deltaY=-this.pa.Ba*this.pa.b,this.f.top=-this.pa.b+t,this.f.height=this.pa.b-t},R.prototype.ls=function(e,i){this.ea=-e,this.Ha=-i,t.p(this.Qj)&&t.ll.cancelAnimationFrame(this.Qj),this.Qj=t.ll.requestAnimationFrame(this.rs)},t.H(H,t.Br),t.g=H.prototype,t.g.reset=function(){return this.b=0,this.o=this.i=-1,this},t.g.select=function(e){this.i=e;var i=t.Na(this.pa.P,e);if(0>i)this.b=~i;else{for(;this.pa.P[++i]==e;);this.b=i}return this.o=this.i-(this.pa.P[this.b-1]||0),this.b<this.pa.P.length},t.g.advance=function(){this.i++;for(var t,e=this.pa.P.length,i=window.NaN;this.b<e&&this.i>=(t=this.pa.P[this.b]);)i=t,this.b++;return(0,window.isNaN)(i)&&(i=this.pa.P[this.b-1]||0),this.o=this.i-i,this.b<e},t.g.ma=function(){return this.i},t.g.Hb=function(){return this.pa.P[this.pa.P.length-1]||0},t.g.get=function(){throw"Cannot use get on ActivityIterator"},t.g.j=function(){throw"Cannot use meta on ActivityIterator"},B.prototype.ts=function(){return[this]},B.prototype.Zj=function(e,i){var n=t.Ax(this);return t.kp(n.headers,n.data,i)};var wt=B.prototype;wt.getType=wt.Ma,wt.data=wt.data,wt.timeTrackingMode=wt.vY,wt.cellPadding=wt.Bba,wt.zoomLevels=wt.vz,wt.zoomLevel=wt.bK,wt.xScale=wt.Ra,wt.horizontalScrollBar=wt.tq,wt.verticalScrollBar=wt.vx,wt.grid=wt.r_,wt.logo=wt.uha,wt.timeLine=wt.gla,wt.calendar=wt.calendar,wt.overlay=wt.Eba,wt.activities=wt.Az,wt.conflicts=wt.uS,wt.resourceList=wt.aka,wt.hover=wt.Tj,wt.hoverPoint=wt.$i,wt.unhover=wt.Md,wt.select=wt.select,wt.selectPoint=wt.Ii,wt.unselect=wt.ie,wt.noData=wt.Gm,t.Tp.resource=z,t.E("anychart.resource",z)}.call(this,$)),_.bullet||(_.bullet=1,function(t){var e=function(e,i){return t.zk(t.Pk,e,i||"bar")},i=function(){t.Y.call(this),this.Ga("defaultRangeMarkerSettings"),this.b=null,t.T(this.ua,[["type",4,9],["value",4,9],["layout",4,9],["fill",16,1],["stroke",16,1]])},n=function(i,n){t.p(n)&&(n=e(n,i.vf("type")),i.vf("type")!=n&&(i.oa.type=n,t.p(i.nd("type"))||i.B(4,9)))},s=function(e,i){t.ux.call(this),this.Ga("bullet"),this.jd=[],this.Bc=[],this.Ax=!0,this.data(e||null,i),t.tq(this.ua,"layout",114820,9)},a=function(e,s){var a=s.ma(),o=new i;o.Ga(e.vf("defaultMarkerSettings")),o.ka(),e.Bc[a]=o,o.scale(e.scale()),o.O(e.Na),n(o,e.Nf().nc(a)),o.value(s.get("value")),o.type(s.get("type")),o.mq(s.get("gap")),o.fill(s.get("fill")),o.stroke(s.get("stroke")),o.da(!1),t.K(o,e.naa,e)},o=function(t,e){return new s(t,e)};t.H(i,t.Y);var r={};t.sq(r,[[0,"type",e],[0,"value",t.N],[0,"layout",t.Gk],[1,"fill",t.Qq],[1,"stroke",t.Pq]]),t.U(i,r);var l={x:"30%",line:"30%",ellipse:"30%",bar:"50%"};t.g=i.prototype,t.g.ra=t.Y.prototype.ra,t.g.sa=20|t.Y.prototype.sa,t.g.mq=function(e){return t.p(e)?(this.b!=e&&(this.b=e,this.B(4,9)),this):null===this.b?l[this.g("type")]:this.b},t.g.Nb=function(){return"horizontal"==this.g("layout")},t.g.scale=function(e){if(t.p(e)){if(e=t.jt(this.qa,e,null,3,null,this.dja,this)){var i=this.qa==e;this.qa=e,e.da(i),i||this.B(4,9)}return this}return this.qa},t.g.dja=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(4,8|i)},t.g.W=function(){if(!this.scale())return t.il(2),this;if(!this.zc())return this;var e=this.O()?this.O().Ja():null,i=e&&!e.yf();if(i&&e.suspend(),this.Sc||(this.Sc=t.qk()),this.J(8)){var n=this.zIndex();this.Sc.zIndex(n),this.I(8)}return this.J(2)&&(n=this.O(),this.Sc.parent(n),this.I(2)),this.J(16)&&(this.Sc.stroke(this.g("stroke")),this.Sc.fill(this.g("fill")),this.I(16)),this.J(4)&&(n=this.g("value"),n=this.scale().transform(n,0),this.Sc.clear(),(0,window.isNaN)(n)||(n=t.Za(n,0,1),function(e,i){if("horizontal"==e)switch(i){default:case"bar":return function(e,i){var n=this.scale().transform(0);n=(0,window.isNaN)(n)?0:t.Za(n,0,1);var s=this.ja(),a=this.mq(),o=t.uo(a)?t.L(a,s.height):s.height*a;a=s.left+n*s.width;var r=s.top+o/2;n=(i-n)*s.width,s=s.height-o,e.clear().moveTo(a,r).lineTo(a+n,r).lineTo(a+n,r+s).lineTo(a,r+s).close()};case"line":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width*i),o=Math.round(n.top+n.height/2);n=n.height-(t.uo(s)?t.L(s,n.height):n.height*s),e.clear().moveTo(a-1,o-n/2).lineTo(a-1,o+n/2).lineTo(a+1,o+n/2).lineTo(a+1,o-n/2).close()};case"ellipse":return function(e,i){var n=this.ja(),s=this.mq(),a=n.left+n.width*i,o=n.top+n.height/2;s=(n=(n.height-(t.uo(s)?t.L(s,n.height):n.height*s))/2)/4,e.clear(),e.Fe(a,o,s,n,0,360).close()};case"x":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width*i),o=Math.round(n.top+n.height/2);s=(n=(n.height-(t.uo(s)?t.L(s,n.height):n.height*s))/2)/1.5,e.clear().moveTo(a-s-1,o-n).lineTo(a+s-1,o+n).lineTo(a+s+1,o+n).lineTo(a-s+1,o-n).moveTo(a+s-1,o-n).lineTo(a-s-1,o+n).lineTo(a-s+1,o+n).lineTo(a+s+1,o-n).close()}}else switch(i){default:case"bar":return function(e,i){var n=this.scale().transform(0);n=(0,window.isNaN)(n)?0:t.Za(n,0,1);var s=this.ja(),a=this.mq(),o=t.uo(a)?t.L(a,s.width):s.width*a;a=s.left+o/2;var r=s.Va()-s.height*i;o=s.width-o,n=(i-n)*s.height,e.clear().moveTo(a-.25,r-.5).lineTo(a+o+.25,r-.5).lineTo(a+o+.25,r+n-.5).lineTo(a-.25,r+n-.5).close()};case"line":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width/2),o=Math.round(n.Va()-n.height*i);n=n.width-(t.uo(s)?t.L(s,n.width):n.width*s),e.clear().moveTo(a-n/2,o-1).lineTo(a+n/2,o-1).lineTo(a+n/2,o+1).lineTo(a-n/2,o+1).close()};case"ellipse":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width/2),o=Math.round(n.Va()-n.height*i);s=(n=(n.width-(t.uo(s)?t.L(s,n.width):n.width*s))/2)/4,e.clear(),e.Fe(a,o,n,s,0,360).close()};case"x":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width/2),o=Math.round(n.Va()-n.height*i);s=(n=(n.width-(t.uo(s)?t.L(s,n.width):n.width*s))/2)/1.5,e.clear().moveTo(a-n-1,o-s).lineTo(a+n-1,o+s).lineTo(a+n+1,o+s).lineTo(a-n+1,o-s).moveTo(a+n-1,o-s).lineTo(a-n-1,o+s).lineTo(a-n+1,o+s).lineTo(a+n+1,o-s).close()}}}(this.g("layout"),this.g("type")).call(this,this.Sc,n)),this.I(4)),i&&e.resume(),this},t.g.remove=function(){this.Sc&&this.Sc.parent(null)},t.g.R=function(){t.qd(this.Sc),this.Sc=null,i.u.R.call(this)},t.H(s,t.ux),s.prototype.sa=126976|t.ux.prototype.sa,s.prototype.Ma=function(){return"bullet"},s.prototype.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.J(e,t.Cr)?this.la=e.Ui():t.J(e,t.Mr)?this.la=e.Yd():(e=t.A(e)||t.z(e)?e:null,this.la=new t.Mr(e,i).Yd()),t.K(this.la,this.dd,this),this.B(127232,1)),this):this.la},s.prototype.dd=function(e){t.X(e,16)&&this.B(127232,1)};var h={};t.rq(h,0,"layout",t.Gk),t.U(s,h),t.g=s.prototype,t.g.Nb=function(){return"horizontal"==this.g("layout")},t.g.scale=function(e){if(!this.qa&&!t.p(e)){var i=this.vf("scale");this.qa=t.jt(this.qa,i,"linear",3),this.qa.da(!1)}return t.p(e)?((e=t.jt(this.qa,e,"linear",3))&&(this.qa=e,e.da(!1),this.B(122880,1)),this):this.qa},t.g.axis=function(e){return this.b||(this.b=new t.Sy,this.b.kb(this),t.K(this.b,this.xo,this),t.W(this,"axis",this.b),this.B(114692,9)),t.p(e)?(this.b.N(e),this):this.b},t.g.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=16384,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.xe=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jd[n];return a||((a=new t.cA).Ga(this.vf("defaultRangeMarkerSettings")),this.jd[n]=a,t.K(a,this.aja,this),this.B(32768,1)),t.p(s)?(a.N(s),this):a},t.g.aja=function(){this.B(32768,1)},t.g.IO=function(e){return this.f||(this.f=new t.Gs,t.K(this.f,this.$ia,this),t.W(this,"rangePalette",this.f),this.f.Gp(!1)),t.p(e)?(this.f.N(e),this):this.f},t.g.$ia=function(e){t.X(e,2)&&this.B(32768,1)},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.K(this.He,this.Zia,this),t.W(this,"markerPalette",this.He)),t.p(e)?(this.He.N(e),this):this.He},t.g.Zia=function(e){t.X(e,2)&&this.B(65536,1)},t.g.pb=function(){var t,e=this.scale();e.Of()&&e.Bg();var i=0;for(t=this.Bc.length;i<t;i++){var n=this.Bc[i];null!=n&&(n.scale(e),"bar"==n.g("type")&&e.Xc(0),e.Xc(n.g("value")))}for(i=0,t=this.jd.length;i<t;i++)null!=(n=this.jd[i])&&(n.scale(e),e.Xc(n.g("from")),e.Xc(n.g("to"))),e.Of()&&e.Hg();this.axis().scale(this.scale())},t.g.Lj=function(){var e=this.Nb(),i=this.title(),n=this.axis();return e?(t.Ty(n,"bottom"),t.dw(i,"left")):(t.Ty(n,"left"),t.dw(i,"bottom")),s.u.Lj.call(this)},t.g.Qh=function(e){if(this.zc()){this.J(4096)&&(function(e){(0,t.Pe)(e.Bc,(function(e){t.qd(e)})),e.Bc.length=0;var i=e.la.$().reset();for(i.Hb();i.advance();)a(e,i)}(this),this.I(4096)),this.J(8192)&&(this.pb(),this.I(8192));var i=this.axis();this.J(16388)&&(i.ka(),!i.O()&&i.enabled()&&i.O(this.Na),i.ja(e),i.padding(0),i.da(!1),i.W(),this.I(16384));var s=i.enabled()?i.yd():e;if(this.J(32772)){for(e=0,i=this.jd.length;e<i;e++){var o=this.jd[e];if(o){o.ka(),t.dA(o,this.Nb()?"vertical":"horizontal");var r=o,l=this.IO().nc(e);(l=t.Ub(l))!=r.vf("fill")&&(t.Hq(r.oa,t.ZG,{fill:l}),r.B(16,1)),o.ja(s),o.O(this.Na),o.Qp(0),o.W(),o.da(!1)}}this.I(32768)}if(this.J(65540)){for(e=0,i=this.Bc.length;e<i;e++)(o=this.Bc[e]).ka(),o.ja(s),n(o,this.Nf().nc(e)),r=o,l=this.g("layout"),t.p(l)&&(l=t.Gk(l,r.vf("layout")),r.vf("layout")!=l&&(r.oa.layout=l,t.p(r.nd("layout"))||r.B(4,9))),o.W(),o.da(!1);this.I(65536)}}},t.g.naa=function(){this.B(65536,1)},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,pie:this,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e}},t.g.Ii=function(){return this},t.g.$i=function(){return this},t.g.Ue=function(){return[this]},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.yj=function(){for(var t=this.la?this.la.$().Hb():0,e=0,i=this.Bc.length,n=0;n<i;n++){var s=this.Bc[n];if(!s||s.enabled())break;e++}return!t||!i||e==i},t.g.F=function(){var e=s.u.F.call(this);t.Tq(this,h,e),e.data=this.data().F(),e.rangePalette=this.IO().F(),e.markerPalette=this.Nf().F(),e.scale=this.scale().F(),e.axis=this.axis().F();for(var i=[],n=0;n<this.jd.length;n++)i.push(this.jd[n].F());return e.ranges=i,{chart:e}},t.g.U=function(e,i){s.u.U.call(this,e,i),this.data(e.data),t.Iq(this,h,e),this.IO().ga(!!i,e.rangePalette),this.Nf().ga(!!i,e.markerPalette);var n=e.scale;if(t.z(n))var a=t.dt(n,null);else t.C(n)?(a=t.dt(n.type,!1)).N(n):a=null;if(a&&this.scale(a),this.axis(e.axis),n=e.ranges,t.A(n))for(a=0;a<n.length;a++)this.xe(a,n[a])},t.g.R=function(){t.sd(this.jd,this.Bc,this.b,this.f,this.He),this.jd.length=0,this.Bc.length=0,this.He=this.f=this.b=null,s.u.R.call(this)};var c=s.prototype;c.data=c.data,c.rangePalette=c.IO,c.markerPalette=c.Nf,c.scale=c.scale,c.axis=c.axis,c.range=c.xe,c.isHorizontal=c.Nb,c.getType=c.Ma,c.noData=c.Gm,t.Tp.bullet=o,t.E("anychart.bullet",o)}.call(this,$)),_.tag_cloud_part||(_.tag_cloud_part=1,function(t){var e=function(e){var i=new t.uh;return i.parent(e),i},i=function(t,e){t.bo=e,t.bo.push("#000"),t.eW=!!e,t.reset()},n=function(e,i){t.Bx.call(this),this.Ga("tagCloud"),this.Hr=["x","value"],this.ea="category",this.Ka=this.P=window.NaN;var n=[t.Z.u8,t.Z.m$],s={};t.T(s,[["fill",16,1],["stroke",16,1],["fontFamily",16388,1],["fontStyle",16388,1],["fontVariant",16388,1],["fontWeight",16388,1],["fontSize",16388,1]]);var a={};t.T(a,[["fill",0,0],["stroke",0,0],["fontFamily",0,0],["fontStyle",0,0],["fontVariant",0,0],["fontWeight",0,0],["fontSize",0,0]]),this.ca=new t.my(this,s,t.gm,n),this.za=new t.my(this,a,t.vo,n),this.Ea=new t.my(this,a,t.wo,n),this.ca.Ga(this.oa),t.W(this,"normal",this.ca),t.W(this,"hovered",this.za),t.W(this,"selected",this.Ea),this.state=new t.ix(this),this.data(e||null,i),t.T(this.ua,[["mode",4,1],["fromAngle",8192,1],["toAngle",8192,1],["anglesCount",8192,1],["textSpacing",4,1]]),this.Ua()},s=function(e,i){t.z(i)?(e.Cd("fill",i),e.Cd("fill-opacity",1)):(e.Cd("fill",i.color),e.Cd("fill-opacity",i.opacity))},a=function(e,i){t.z(i)?(e.Cd("stroke",i),e.Cd("stroke-opacity",1),e.Cd("stroke-width",1)):(e.Cd("stroke",i.color),e.Cd("stroke-opacity",i.opacity||1),e.Cd("stroke-width",i.thickness||1))},o=function(e,i,n){if(n!=t.gm){var s=n==t.vo?e.za:e.Ea;s=s.g(i);var a=t.uo(s);if(null!=s&&!t.D(s)&&!a)return s}var o=e.$().j("item");n=e.ca.g(i);var r=t.uo(n);if(null==n||r){switch(i){case"fontFamily":var l=o.font;break;case"fill":l=o.fill;break;case"stroke":l=o.stroke;break;case"fontStyle":l=o.style;break;case"fontVariant":l=o.variant;break;case"fontWeight":l=o.weight;break;case"fontSize":l=o.size}n=l}else t.D(n)&&("fill"==i||"stroke"==i?l=e.Ge():(l=e.Ic()).sourceValue=n,n=n.call(l,l));return s?a?n*(0,window.parseFloat)(s)/100:("fill"==i||"stroke"==i?l=e.Ge(n):(l=e.Ic()).sourceValue=n,s.call(l,l)):n},r=function(e,i,n,s,a){if(!n.TE){var o=i.context,r=i.ratio;o.clearRect(0,0,2048/r,2048/r);var l=i=0,h=0,c=s.length;--a;for(var u=e.g("textSpacing");++a<c;){n=s[a],o.save(),e="","normal"!=n.style&&(e+=n.style+" "),"normal"!=n.weight&&(e+=n.weight+" "),"normal"!=n.variant&&(e+=n.variant+" "),o.font=e+~~((n.size+1)/r)+"px "+n.font,e=o.measureText(n.text).width*r;var d=n.size<<1;if(n.rotate){var p=Math.sin(t.bb(n.rotate)),g=Math.cos(t.bb(n.rotate)),f=e*g,b=e*p;g*=d,e=d*p,e=Math.max(Math.abs(f+e),Math.abs(f-e))+31>>5<<5,d=~~Math.max(Math.abs(b+g),Math.abs(b-g))}else e=e+31>>5<<5;if(d>h&&(h=d),2048<=i+e&&(i=0,l+=h,h=0),2048<=l+d)break;o.translate((i+(e>>1))/r,(l+(d>>1))/r),n.rotate&&o.rotate(t.bb(n.rotate)),o.fillText(n.text,0,0),u&&(o.lineWidth=2*u,o.strokeText(n.text,0,0)),o.restore(),n.width=e,n.height=d,n.Mla=i,n.Qla=l,n.mi=e>>1,n.Pe=d>>1,n.Hj=-n.mi,n.ze=-n.Pe,n.R2=!0,i+=e}for(o=o.getImageData(0,0,2048/r,2048/r).data,r=[];0<=--a;)if((n=s[a]).R2){for(h=(e=n.width)>>5,d=n.Pe-n.ze,c=0;c<d*h;c++)r[c]=0;if(null==(i=n.Mla))break;for(l=n.Qla,u=0,f=-1,b=0;b<d;b++){for(c=0;c<e;c++)p=o[2048*(l+b)+(i+c)<<2]?1<<31-c%32:0,r[h*b+(c>>5)]|=p,u|=p;u?f=b:(n.ze++,d--,b--,l++)}n.Pe=n.ze+f,n.TE=r.slice(0,(n.Pe-n.ze)*h)}}},l=function(t,e){var i=t[0],n=t[1];e.x+e.Hj<i.x&&(i.x=e.x+e.Hj),e.y+e.ze<i.y&&(i.y=e.y+e.ze),e.x+e.mi>n.x&&(n.x=e.x+e.mi),e.y+e.Pe>n.y&&(n.y=e.y+e.Pe)},h=function(t,e,i,n,s){for(var a,o,r=i.x,l=i.y,h=0;(a=t.$a(h))&&(h+=1,o=~~a[0],a=~~a[1],!(Math.min(Math.abs(o),Math.abs(a))>=s));){if(i.x=r+o,i.y=l+a,!(o=0>i.x+i.Hj||0>i.y+i.ze||i.x+i.mi>t.f||i.y+i.Pe>t.i)&&(o=n))t:{o=t.f,o>>=5,a=i.TE;for(var c=i.width>>5,u=i.x-(c<<4),d=127&u,p=32-d,g=i.Pe-i.ze,f=(i.y+i.ze)*o+(u>>5),b=0;b<g;b++){for(var v=u=0;v<=c;v++)if((u<<p|(v<c?(u=a[b*c+v])>>>d:0))&e[f+v]){o=!0;break t}f+=o}o=!1}if(!o&&(!n||i.x+i.mi>n[0].x&&i.x+i.Hj<n[1].x&&i.y+i.Pe>n[0].y&&i.y+i.ze<n[1].y)){for(n=i.TE,s=i.width>>5,t=t.f>>5,l=32-(r=127&(o=i.x-(s<<4))),h=i.Pe-i.ze,o=(i.y+i.ze)*t+(o>>5),c=0;c<h;c++){for(d=a=0;d<=s;d++)e[o+d]=e[o+d]|a<<l|(d<s?(a=n[c*s+d])>>>r:0);o+=t}return delete i.TE,!0}}return!1},c=function(e){var i=e.$(),n=e.Bn(),s=e.qa,a=e.bo,r=(0,window.parseFloat)(i.get("value")),l=i.get("category"),h=i.ma();if(t.J(n,t.iz)&&t.p(l)){var c=l;i.j("category",l),i=e.ca.g("fill"),t.D(i)&&(e={sourceColor:e.cc().nc(h),category:l},i=i.call(e,e)),a.push(t.Ub(i))}else e.vb?c=r:(i.j("category",void 0),c=t.Ub(o(e,"fill",0)),a.push(c),c=t.C(c)?c.color:c,i.j("category",c));n.Xc(c),s.Xc(r)},u=function(t,e){var i=new n(t,e);return i.KE(i.oa),i},d={hsa:"spiral",p9:"rect"};t.H(n,t.Bx),t.Gq(n,"fill stroke fontFamily fontStyle fontVariant fontWeight fontSize".split(" "),"normal"),n.prototype.sa=258064|t.Bx.prototype.sa;var p={};t.sq(p,[[0,"mode",function(e,i){return t.zk(d,e,i||"spiral")}],[0,"fromAngle",t.Bq],[0,"toAngle",t.Bq],[0,"anglesCount",t.Bq],[0,"textSpacing",t.Bq]]),t.U(n,p),t.g=n.prototype,t.g.Ma=function(){return"tag-cloud"},t.g.xc=function(){return this},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.Ue=function(){return[this]},t.g.ce=function(e){var i=new t.EA(this,e);return this.$().select(e)&&i.iy()&&(e=i.get("value")/this.Rg("sum"),i.La("yPercentOfTotal",t.Tm(100*e,2)),i.La("percentValue",e)),i},t.g.oq=function(){return null},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.Ec=function(){return this.sd=this.la.$()},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(512,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(65536,129)},t.g.Ge=function(e){var i=this.$(),n=i.ma();e=e||this.cc().nc(n)||"blue",n={};var s=this.Bn(),a=i.get("value");if(i=i.j("category"),n.value=a,n.category=i,s){if(a=t.J(s,t.iz)&&t.p(i)?i:a,this.vb||t.p(i))var o=s.Qq(a);t.Sc(n,{scaledColor:o,colorScale:this.vb})}return n.sourceColor=e,n},t.g.Bn=function(){return this.vb||this.Za||(this.Za=t.jz())},t.g.Ic=function(){var e=this.$();return this.oe||(this.oe=new t.Fw),this.oe.lg(e).Li([this.ce(e.ma()),this]),e={x:{value:e.get("x"),type:"string"},value:{value:e.get("value"),type:"number"},name:{value:e.get("name"),type:"string"},index:{value:e.ma(),type:"number"},chart:{value:this,type:""}},t.ov(this.oe,e),this.oe},t.g.Rk=function(){return this.Ic()},t.g.Bh=function(){var t=this.$().j("item");return{value:{x:this.na+t.x*this.Ha,y:this.Ba+t.y*this.Ha}}},t.g.ml=function(){},t.g.pk=function(e,i){var n=this.$().j("item");if(n&&n.bD){var r=t.em(e),l=t.Ub(o(this,"fill",r)),h=t.Wb(o(this,"stroke",r)),c=o(this,"fontFamily",r),u=o(this,"fontStyle",r),d=o(this,"fontVariant",r),p=o(this,"fontWeight",r),g=o(this,"fontSize",r),f=this.O()?this.O().Ja():null,b=f&&!f.yf();return b&&f.suspend(),s(n.Xh,l),a(n.Xh,h),n.Xh.Cd("font-family",c),n.Xh.Cd("font-style",u),n.Xh.Cd("font-variant",d),n.Xh.Cd("font-weight",p),n.Xh.Cd("font-size",g),n.Xh.zIndex(r==t.gm?0:1e-6),b&&f.resume(),i}},t.g.pq=t.ia,t.g.TL=function(e){var i=this.Qi();if(e=t.A(e)?e.length?e[0]:window.NaN:e,i&&i.target()&&!(0,window.isNaN)(e)){var n=i.target().$();n.select(e),e=this.Bn(),n=t.J(e,t.iz)?n.j("category"):n.get(this.Hr[1]),t.aO(i,n)}},t.g.hA=function(){var e=this.Qi();e&&e.enabled()&&t.bO(e)},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}return"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i,{type:n,actualTarget:e.target,series:this,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget).index;if(!t.p(i)&&t.mx(this.state,t.vo)){var n=t.sx(this.state,t.vo);n.length&&(i=n[0])}return i=t.N(i),(0,window.isNaN)(i)||(e.pointIndex=i),e},t.g.wm=function(){},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.ej=function(e){return t.p(e)?(this.gd().selectionMode(e),this):this.gd().g("selectionMode")},t.g.Ii=function(e,i){if(!this.enabled())return this;var n=this.O()?this.O().Ja():null,s=n&&!n.yf();s&&n.suspend();var a=!(i&&i.shiftKey);return t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,a?t.vo:void 0)):t.ea(e)&&this.state.Lh(t.wo,e,a?t.vo:void 0),s&&n.resume(),this},t.g.ie=function(e){if(this.enabled()){var i,n=this.O()?this.O().Ja():null,s=n&&!n.yf();s&&n.suspend(),i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i),s&&n.resume()}},t.g.$i=function(e){if(!this.enabled())return this;var i=this.O()?this.O().Ja():null,n=i&&!i.yf();if(n&&i.suspend(),t.A(e)){for(var s=t.sx(this.state,t.vo),a=0;a<s.length;a++)t.Aa(e,s[a])||this.state.Vh(t.vo,s[a]);t.qx(this.state,e)}else t.ea(e)&&(this.Md(),t.qx(this.state,e));return n&&i.resume(),this},t.g.Md=function(e){var i;if((i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()){var n,s=(i=this.O()?this.O().Ja():null)&&!i.yf();s&&i.suspend(),n=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.vo,n),s&&i.resume()}},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():t.J(e,t.Mr)?this.la=this.Yc=e.Yd():this.la=(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(4352,1)),this}return this.la},t.g.dd=function(){this.B(4352,1)},t.g.UZ=function(e){return t.p(e)?(e=t.A(e)?t.Ha(e):null,this.D!=e&&(this.D=e,this.B(16388,1)),this):this.D},t.g.scale=function(e){if(t.p(e)){if(e=t.jt(this.qa,e,null,3,null,this.zg,this)){var i=this.qa==e;this.qa=e,this.qa.da(i),i||this.B(131072,1)}return this}return this.qa},t.g.zg=function(){this.B(131072,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(65536,129);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||(t.XN(this.Qi()),this.B(65536,129))}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(65536,129)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),t.K(this.Mb,this.Tz,this),this.B(32772,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=32772,n|=1),t.X(e,8)&&(i|=4,n|=8),t.X(e,2)&&(i|=32768,n|=8),this.B(i,n)},t.g.$q=function(e){return t.to(this.Qi(),e)},t.g.Ol=function(e){var i,n,s=[];if("categories"==e&&(n=t.J(this.Bn(),t.iz)?this.Bn():void 0)){var a=n.sr();for(e=0,i=a.length;e<i;e++){var o=a[e];"default"!==o.name&&s.push({text:o.name,iconEnabled:!0,iconType:"square",iconFill:o.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:e,meta:{X:this,scale:n,xe:o}})}}return s},t.g.Ms=function(t){return"categories"==t},t.g.zr=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){var o=[];n=n.xe;for(var r=s.Ec();r.advance();){var l=r.get("value"),h=r.j("category");n==a.Dn(t.p(h)?h:l)&&o.push(r.ma())}"single"==this.gd().g("hoverMode")?i.fg={X:s,vd:o}:i.fg=[{X:s,vd:o,Ln:o[o.length-1],De:{index:o[o.length-1],Tf:0}}]}}},t.g.wq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){n=n.xe;for(var o=s.Ec(),r=[];o.advance();){var l=o.get("value"),h=o.j("category");n==a.Dn(t.p(h)?h:l)&&r.push(o.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:r}:a.fg=[{X:s,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]),(s=t.wr(this,"colorRange"))&&s.enabled()&&s.target()&&t.aO(s,t.p(n.gp)?n.gp:(n.start+n.end)/2)}}},t.g.vq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){if("single"==this.gd().g("hoverMode")){var s=t.so(i.domTarget);s&&(s.X=n.X)}(n=t.wr(this,"colorRange"))&&n.enabled()&&n.target()&&t.bO(n)}},t.g.uda=function(t){return[this.f/this.i*(t*=.1)*Math.cos(t),t*Math.sin(t)]},t.g.getContext=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);return t.width=2048/e,t.height=2048/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}},t.g.pb=function(){var e=this.qa;if(e){var n,s=this.Bn();if(this.J(8192)){var a=this.g("anglesCount"),r=this.g("fromAngle"),l=this.g("toAngle");for(l-=r,this.ba=[],n=0;n<a;n++)this.ba.push(r+l/(1==a?a:a-1)*n);this.D||this.B(16388),this.I(8192)}if(this.J(4096)){var h=this.Ec();for(this.aa=[],this.b&&this.b.forEach((function(t,e){t.Xh.parent(null),t.ql.parent(null),t.ql.Bl(),this.aa[e]=t}),this),this.b=[],this.bo=[],e.Bg(),s.Bg();h.advance();){n=String(h.get("x")).toLowerCase(),r=(0,window.parseFloat)(h.get("value")),l=h.get("category");var u=h.ma(),d=this.aa[u]?this.aa[u]:{};d.rowIndex=u,d.text=n,d.value=r,d.bD=!1,d.nta=l,this.b.push(d),h.j("item",d),c(this)}e.Hg(),s.Hg(),this.vb||(t.Ka(this.bo,void 0,(function(e){return t.C(e)?e.color+" "+e.opacity:e})),i(s,this.bo)),t.Ra(this.b,(function(t,e){return e.value-t.value})),this.B(16388),this.I(200704)}if(this.J(196608)){for(this.bo=[],h=this.Ec(),e.Bg(),s.Bg();h.advance();)c(this);s.Hg(),this.vb||(t.Ka(this.bo,void 0,(function(e){return t.C(e)?e.color+" "+e.opacity:e})),i(s,this.bo)),this.J(65536)&&this.B(49680),this.J(131072)&&this.B(49156),this.I(196608)}if(this.J(16384)){var p=this.D?this.D:this.ba,g=Math.max((0,t.za)(p,0),0);a=p.length,e=this.b.length?this.b[0].value:window.NaN,h=this.$(),s=this.b.length;var f=0;this.b.forEach((function(e,i){var n=t.em(t.nx(this.state,e.rowIndex));h.select(e.rowIndex);var s=o(this,"fontFamily",n),r=o(this,"fontStyle",n),l=o(this,"fontVariant",n),c=o(this,"fontWeight",n),u=t.Ub(o(this,"fill",n));n=t.Wb(o(this,"stroke",n)),e.font=s,e.style=r,e.variant=l,e.weight=c,e.fill=u,e.stroke=n,e.rotate=p[(i+g+a)%a],f+=e.value}),this),this.La("sum",f),this.La("max",e),this.La("min",this.b.length?this.b[s-1].value:window.NaN),this.La("average",f/s),this.La("pointsCount",s),this.I(16384)}}},t.g.pv=function(){this.pb()},t.g.Qh=function(i){var n=this.scale(),c=t.wr(this,"colorRange");if(this.J(32768)&&c&&(c.ka(),c.scale(this.Bn()),c.target(this),c.kb(this),c.da(!1),c.enabled()&&this.B(4)),this.J(4)){c&&c.enabled()?(c.ja(i.clone().round()),this.o=c.yd()):this.o=i.clone(),this.f=this.o.width,this.i=this.o.height,this.$a="spiral"==this.g("mode")?this.uda:function(t){var e=4*t.f/t.i,i=0,n=0;return function(t){var s=0>t?-1:1;switch(Math.sqrt(1+4*s*t)-s&3){case 0:i+=e;break;case 1:n+=4;break;case 2:i-=e;break;default:n-=4}return[i,n]}}(this),i=this.b.length;var u=this.b[0],d=-1,p=null,g=this.getContext(this.canvas?this.canvas:this.canvas=window.document.createElement("canvas")),f=function(t){for(var e=[],i=-1;++i<t;)e[i]=0;return e}((this.f>>5)*this.i),b=Math.sqrt(this.f*this.f+this.i*this.i);for(function(e,i){if(i){var n=e.f/3,s=e.i/3,a=e.i/50,o=t.Va(a,1+~~s),r=t.Oa(o,(function(e){e=t.mg().measure(i.text,{fontStyle:i.style,fontFamily:i.font,fontSize:e,fontWeight:i.weight,fontVariant:i.variant});var a=t.Eo(e,"center");return a=t.Kb(t.bb(i.rotate),a.x,a.y),e=t.ln(e)||[],a.transform(e,0,e,0,4),a=(e=t.mn(e)).width,e=e.height,a>n||e>s?-1:a==n||e==s?0:1}));0>r&&(r=~r-1),e.P=a,e.Ka=o[t.Za(r,0,o.length)]}}(this,u),this.b.forEach((function(e){this.$().select(e.rowIndex),delete e.size,delete e.TE;var i=t.em(t.nx(this.state,e.rowIndex));i=o(this,"fontSize",i);var s=t.Za(n.transform(e.value),0,1);s=~~(this.P+s*(this.Ka-this.P)),e.size=null!=i?t.uo(i)?s*(0,window.parseFloat)(i)/100:i:s}),this);++d<i;)(u=this.b[d]).x=this.f>>1,u.y=this.i>>1,r(this,g,u,this.b,d),u.R2&&h(this,f,u,p,b)&&(p?l(p,u):p=[{x:u.x+u.Hj,y:u.y+u.ze},{x:u.x+u.mi,y:u.y+u.Pe}],u.x-=this.f>>1,u.y-=this.i>>1);i=p?Math.min(this.f/Math.abs(p[1].x-this.f/2),this.f/Math.abs(p[0].x-this.f/2),this.i/Math.abs(p[1].y-this.i/2),this.i/Math.abs(p[0].y-this.i/2))/2:1,this.wb||(this.wb=this.Na.Bd()),(d=t.wr(this,"background"))&&this.wb.zIndex((d.zIndex()||0)+1),this.G||(this.G=this.wb.Bd(),t.ru(this,this.G)),this.ye||(this.ye=this.wb.Bd()),this.na=this.o.left+(this.f>>1),this.Ba=this.o.top+(this.i>>1),this.Ha=i,this.wb.oc(i,0,0,i,this.na,this.Ba);var v=this.wb.Pd;this.b.forEach((function(i){var n=[i.x,i.y];if(v.transform(n,0,n,0,1),n[0]+i.Hj<this.o.left||n[0]+i.mi>this.o.cb()||n[1]+i.ze<this.o.top||n[1]+i.Pe>this.o.Va())i.bD&&(i.Xh.parent(null),i.ql.parent(null)),i.bD=!1;else{i.bD||(i.Xh=i.Xh?i.Xh.parent(this.ye):e(this.ye),i.Xh.Cd("text-anchor","middle"),i.Xh.Dd(!0),i.Xh.text(i.text.toLowerCase()),i.Xh.cursor("default"),i.ql=i.ql?i.ql.parent(this.G):e(this.G),i.ql&&(i.ql.tag={X:this,index:i.rowIndex}),i.ql.Cd("fill","#fff"),i.ql.Cd("opacity",1e-6),i.ql.Cd("text-anchor","middle"),i.ql.text(i.text.toLowerCase()),i.ql.cursor("default"),i.bD=!0);var r=t.em(t.nx(this.state,i.rowIndex));this.$().select(i.rowIndex),n=t.Ub(o(this,"fill",r));var l=t.Wb(o(this,"stroke",r)),h=o(this,"fontFamily",r),c=o(this,"fontStyle",r),u=o(this,"fontVariant",r),d=o(this,"fontWeight",r);r=o(this,"fontSize",r),s(i.Xh,n),a(i.Xh,l),i.Xh.Cd("font-family",h),i.Xh.Cd("font-style",c),i.Xh.Cd("font-variant",u),i.Xh.Cd("font-weight",d),i.Xh.Cd("font-size",r),i.Xh.Cd("transform","translate("+[i.x,i.y]+")rotate("+i.rotate+")"),i.Xh.zIndex(0),i.ql.Cd("font-family",h),i.ql.Cd("font-style",c),i.ql.Cd("font-variant",u),i.ql.Cd("font-weight",d),i.ql.Cd("font-size",r),i.ql.Cd("transform","translate("+[i.x,i.y]+")rotate("+i.rotate+")"),i.ql.zIndex(0)}}),this),this.I(16),this.I(4)}if(this.J(32768)&&(c&&(c.ka(),c.O(this.Na),c.W(),c.da(!1)),this.I(32768)),this.J(16)){var m=this.Ec();this.b.forEach((function(e){var i=t.em(t.nx(this.state,e.rowIndex));m.select(e.rowIndex),e.bD&&e.Xh&&(s(e.Xh,t.Ub(o(this,"fill",i))),a(e.Xh,t.Wb(o(this,"stroke",i))))}),this),this.I(16)}},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.qA=function(){return this.data().hd("category")?["value","category"]:["value"]},t.g.yj=function(){return!this.$().Hb()},t.g.$v=function(e){var i;return t.z(e)?(i=t.dt(e,null))||(i=null):t.C(e)?(i=t.dt(e.type,!0)).N(e):i=null,i},t.g.KE=function(t){var e=t.scale;(e=this.$v(e))&&this.scale(e),e=t.colorScale,(e=this.$v(e))&&this.kd(e)},t.g.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,p,e,i),this.KE(e),this.data(e.data),this.UZ(e.angles),this.cc(e.palette),this.Qi().ga(!!i,e.colorRange),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.F=function(){var e=n.u.F.call(this);return t.Tq(this,p,e),e.data=this.data().F(),t.p(this.D)&&(e.angles=this.D),e.scale=this.scale().F(),this.kd()&&(e.colorScale=this.kd().F()),e.colorRange=this.Qi().F(),e.palette=this.cc().F(),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),{chart:e}},t.g.R=function(){for(var e=0;e<this.b.length;e++){var i=this.b[e];t.qd(i.Xh),t.qd(i.ql),t.qd(i.TE)}t.sd(this.ye,this.G,this.wb,this.ca,this.za,this.Ea,this.Mb,this.state,this.Fa,this.la,this.Yc),this.Fa=this.state=this.qa=this.vb=this.Mb=this.Ea=this.za=this.ca=this.wb=this.G=this.ye=null,delete this.la,this.Yc=null,n.u.R.call(this)};var g=n.prototype;g.getType=g.Ma,g.data=g.data,g.angles=g.UZ,g.scale=g.scale,g.colorScale=g.kd,g.colorRange=g.Qi,g.palette=g.cc,g.normal=g.Qa,g.hovered=g.lb,g.selected=g.selected,g.hover=g.$i,g.unhover=g.Md,g.select=g.Ii,g.unselect=g.ie,g.getPoint=g.ce,t.Tp["tag-cloud"]=u,t.E("anychart.tagCloud",u)}.call(this,$)),_.theme_sparkline||(_.theme_sparkline=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{sparkline:{background:{enabled:!0},title:{enabled:!1,padding:0,margin:0,orientation:"right",rotation:0},margin:0,padding:0,hatchFill:null,markers:{},interactivity:{hoverMode:"by-x"},firstMarkers:{fill:"#64b5f6"},lastMarkers:{fill:"#64b5f6"},negativeMarkers:{fill:"#ef6c00"},minMarkers:{fill:"#455a64"},maxMarkers:{fill:"#dd2c00"},labels:{},firstLabels:{},lastLabels:{},negativeLabels:{},minLabels:{fontSize:9,padding:{top:3,right:0,bottom:3,left:0},fontColor:"#303f46"},maxLabels:{fontSize:9,padding:{top:3,right:0,bottom:3,left:0},fontColor:"#9b1f00"},lineAxesMarkers:[],rangeAxesMarkers:[],textAxesMarkers:[],scales:[{type:"ordinal"},{type:"linear"}],xScale:0,yScale:1,clip:!0,seriesType:"line",connectMissingPoints:!1,pointWidth:"95%",tooltip:{title:!1,separator:!1,titleFormat:function(){return this.x},format:function(){return"x: "+this.x+"\ny: "+t.vN(this.value)},allowLeaveChart:!0},defaultSeriesSettings:{base:{markers:{enabled:!1,position:"center",anchor:"center",type:"circle",size:1.8,stroke:"none"},hoverMarkers:{enabled:!0},labels:{enabled:!1,fontSize:8,background:{enabled:!1},position:"center",anchor:"center-bottom"},minLabels:{position:"center-bottom",anchor:"center-bottom"},maxLabels:{position:"center-top",anchor:"center-top"},color:"#64b5f6"},area:{stroke:"#64b5f6",fill:"#64b5f6 0.5"},column:{markers:{position:"center-top"},labels:{position:"center-top",anchor:"center-bottom"},negativeMarkers:{position:"center-bottom"},negativeLabels:{position:"center-bottom",anchor:"center-top"},fill:"#64b5f6",negativeFill:"#ef6c00"},line:{stroke:"#64b5f6"},winLoss:{markers:{position:"center-top",anchor:"center-top"},labels:{position:"center-top",anchor:"center-top"},negativeMarkers:{position:"center-bottom",anchor:"center-bottom"},negativeLabels:{position:"center-bottom",anchor:"center-bottom"},fill:"#64b5f6",negativeFill:"#ef6c00"}}}})}.call(this,$)),_.theme_linear_gauge||(_.theme_linear_gauge=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{linearGauge:{padding:10,markerPalette:{items:"circle diamond square triangle-down triangle-up triangle-left triangle-right diagonal-cross pentagon cross v-line star5 star4 trapezium star7 star6 star10".split(" ")},globalOffset:"0%",layout:"vertical",tooltip:{titleFormat:function(){return this.name},format:function(){return this.high?t.KN.call(this):"Value: "+t.vN(this.value)}},scales:[{type:"linear"}],defaultAxisSettings:{enabled:!0,width:"10%",offset:"0%"},defaultScaleBarSettings:{enabled:!0,width:"10%",offset:"0%",from:"min",to:"max",colorScale:{type:"ordinal-color",inverted:!1,ticks:{maxCount:100}},points:[{height:0,left:0,right:0},{height:1,left:0,right:0}]},defaultPointerSettings:{base:{enabled:!0,selectionMode:"single",width:"10%",offset:"0%",legendItem:{enabled:!0},normal:{stroke:t.HN,fill:t.zN,hatchFill:null,labels:{zIndex:0,position:"center-top"}},hovered:{stroke:t.JN,fill:t.FN,labels:{enabled:null}},selected:{stroke:t.EN,fill:t.EN,labels:{enabled:null}}},bar:{},rangeBar:{normal:{labels:{format:function(){return t.vN(this.high)}}}},marker:{width:"3%"},tank:{normal:{emptyFill:"#fff 0.3",emptyHatchFill:null},hovered:{emptyFill:t.zN},selected:{emptyFill:t.zN}},thermometer:{normal:{fill:function(){var e=this.sourceColor,i=t.Ql(e);return{angle:this.isVertical?0:90,keys:[{color:i},{color:e},{color:i}]}}},width:"3%",bulbRadius:"120%",bulbPadding:"3%"},led:{dimmer:function(e){return t.Ql(e)},gap:"1%",size:"2%",count:null,colorScale:{type:"ordinal-color",inverted:!1,ticks:{maxCount:100}}}}},thermometer:{},tank:{},led:{}})}.call(this,$)),_.treemap_part||(_.treemap_part=1,function(t){var e=function(e,i){function n(t){t.enabled(null)}t.bD.call(this,e,i),this.Ga("treeMap"),this.b=null,this.P=[],this.i=[],this.state=new t.ix(this),this.D={},this.G={},this.data(e,i);var s={};t.T(s,[["fill",16,65],["stroke",16,65],["hatchFill",16,65],["labels",0,0],["markers",0,0],["headers",0,0]]),this.ca=new t.my(this,s,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),this.ca.ta("markersFactoryConstructor",t.ry),this.ca.ta("markersAfterInitCallback",(function(e){e.kb(this),e.WF="star5",t.K(e,this.Mn,this)})),s={},t.T(s,[["fill",16,65],["stroke",16,65],["hatchFill",16,65],["labels",0,0],["markers",0,0]]),this.Ea=new t.my(this,s,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",n),this.za=new t.my(this,s,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.Jk("headers",[0,0]),this.za.ta("labelsAfterInitCallback",n),t.T(this.ua,[["maxDepth",16912,129],["hintDepth",16400,1],["hintOpacity",65536,1],["maxHeadersHeight",16,1],["sort",16,1],["headersDisplayMode",16,1],["labelsDisplayMode",16,1]])},i=function(t,e){var i=t.j(v);return e.j(v)-i},n=function(t,e){return-i(t,e)},s=function(t){for(var e=0;e<t.ba.length;e++){var i=t.ba[e];i&&(i.j("labelIndex",void 0),i.j("markerIndex",void 0))}t.D={},t.G={}},a=function(e,i,n){i.j("index",e.fh++).j("depth",n),e.ba.push(i);var s=i.bc();if(s){for(var o,r=0,l=0,h=0;h<s;h++)r+=(o=a(e,i.xd(h),n+1))[0],l+=o[1];n=r,e.zk(l)&&i.j(S,!0)}else n=i.get("value"),l=i.get("size"),n=t.N(n),l=t.N(l)||n,e.zk(l)&&(i.j(S,!0),l=n=0);return i.j(v,l),i.j(m,n),[n,l]},o=function(t,e,i,n,s,a){var o,r=0;for(o=n;o<=s;o++)r+=t[o].GY;for(a?(e=i/r,i=r/i):(i=e/r,e=r/e),o=n;o<=s;o++)n=t[o],a?(n.IH=e*n.GY,n.ZJ=i):(n.ZJ=i*n.GY,n.IH=e);return n=t[s],Math.max(n.IH/n.ZJ,n.ZJ/n.IH)},r=function(e){return t.J(e,t.$t)&&(e=e.Tk),e==e.Pq().xd(0)},l=function(e,i){var n=e.$().f,s=n.j("treemap_pointBounds"),a=n.j(y);if(0==a||2==a){var o=!!(i&t.wo);a=!o&&!!(i&t.vo);var r=e.Qa().Db(),l=e.lb().Db(),h=e.selected().Db(),c=o?h:a?l:r,u=n.get("normal");u=t.p(u)?u.marker:void 0;var d=n.get("hovered");d=t.p(d)?d.marker:void 0;var p=n.get("selected");p=t.p(p)?p.marker:void 0,u=t.Zo(u,n.get("marker")),d=t.Zo(d,n.get("hoverMarker")),p=t.Zo(p,n.get("selectMarker"));var g=n.j("markerIndex");g=t.p(g)?r.jp(g):null;var f=u&&t.p(u.enabled)?u.enabled:null,b=d&&t.p(d.enabled)?d.enabled:null,v=p&&t.p(p.enabled)?p.enabled:null;(a||o?a?null===b?l&&null===l.enabled()?null===f?r.enabled():f:l.enabled():b:null===v?h&&null===h.enabled()?null===f?r.enabled():f:h.enabled():v:null===f?r.enabled():f)?(h=e.$().f,l=!(o=!!(i&t.wo))&&!!(i&t.vo),b=h.get("normal"),b=t.p(b)?b.marker:void 0,v=h.get("hovered"),v=t.p(v)?v.marker:void 0,f=h.get("selected"),f=t.p(f)?f.marker:void 0,b=t.Zo(b,h.get("marker"),null),v=t.Zo(v,h.get("hoverMarker"),null),h=t.Zo(f,h.get("selectMarker"),null),f=b&&b.position?b.position:null,b=v&&v.position?v.position:null,h=h&&h.position?h.position:null,o=l&&(b||e.lb().Db().g("position"))||o&&(h||e.selected().Db().g("position"))||f||e.Qa().Db().g("position"),o=t.Dk(o),s={value:t.Eo(s,o)},g?g.jc(s):(g=r.add(s),n.j("markerIndex",g.ma()),e.G[g.ma()]=n.j("index")),g.Hi(),t.gy(g,c),g.td(u,a?d:p),g.W()):g&&(r.clear(g.ma()),n.j("markerIndex",void 0))}},h=function(e,i){var n=null===e||e&&t.p(e.enabled)&&!e.enabled||t.da(e)&&!e,s=!i.enabled();return n||s},c=function(e,i){var n=e.$().f,s=n.j(w);if(s){var a=n.j(y),o=n.j(m);n=t.cm("fill",1,!0)(e,i,!1),2==a?n=t.Ul(n,e.g("hintOpacity"),!0):4==a&&(n=e.f?e.f.Qq(o):n),a=t.cm("stroke",2,!0)(e,i,!1),s.stroke(a),s.fill(n)}},u=function(e,i){var n=e.$().f.j("treemap_hatchShape");if(null!=n){var s=t.cm("hatchFill",3,!0)(e,i,!1);n.stroke(null).fill(s)}},d=function(e,i,n,s){if(!(i.j(S)||(n=n.clone(),1>n.width||1>n.height))){var a=i.bc(),r=i.Sl(),p=null,g=i.j(y);if(0==g||4==g)p=n.clone(),i.j("treemap_pointBounds",p);else{if(1==g){p=n;var f=i.j("index"),b=i.get("header"),m=e.Qa().headers();if(h(b,m))p=t.kn(p.left,p.top,p.width,0);else{(b=b||{}).width||(b.width=p.width),e.$().select(f);var x=e.Ic();f=t.L(e.g("maxHeadersHeight"),p.height),(b=m.measure(x,void 0,b)).height>f&&(b.height=f),p=t.kn(p.left,p.top,p.width,b.height)}b=t.kn(n.left,n.top+p.height,n.width,n.height-p.height),i.j("treemap_pointBounds",p),i.j("treemap_contentBounds",b)}for(2!=g&&3!=g||(p=n.clone(),i.j("treemap_pointBounds",p),i.j("treemap_contentBounds",p)),function(e,i,n){"none"!=e.g("sort")&&i.sort(e.qc),e=Array(i.length);var s=n.left,a=n.top,r=n.width,l=n.height,h=r,c=l,u=(0,t.Gg)(i,(function(t,e){return t+e.j(v)}),0);n=e.length;var d=r*l/u;for(u=0;u<n;u++)e[u]||(e[u]={}),e[u].GY=t.Tm(i[u].j(v)*d,4);var p=d=0,g=h>c;u=Number.MAX_VALUE;for(var f,b,m=0,y=0;p<n;)if((f=o(e,h,c,d,p,g))>u){for(c=h=0,u=d;u<p;u++)(b=e[u]).x=s+m+h,b.y=a+y+c,g?c+=b.height:h+=b.width;g?m+=e[d].width:y+=e[d].height,g=(h=r-m)>(c=l-y),p=d=p,u=Number.MAX_VALUE}else{for(u=d;u<=p;u++)(b=e[u]).width=1>b.ZJ?1:t.Tm(b.ZJ,4),b.height=1>b.IH?1:t.Tm(b.IH,4);u=f,p++}for(l=r=0,u=d;u<p;u++)(b=e[u]).x=s+m+r,b.y=a+y+l,g?l+=b.height:r+=b.width;for(u=0;u<n;u++)b=e[u],i[u].j("treemap_pointBounds",t.kn(b.x,b.y,b.width,b.height))}(e,r,b||p),n=0;n<a;n++)p=(r=i.xd(n)).j("treemap_pointBounds"),d(e,r,p,s+1)}if(i=i.j("index"),e.$().select(i),i=t.nx(e.state,i),3!=g)if(1==g)e.ke(i);else{r=(s=e.$().f).j("treemap_pointBounds"),a=s.j(y),n=t.eC(e.ue),s.j(w,n),c(e,i),r=t.kn(t.Tm(r.left,4),t.Tm(r.top,4),t.Tm(r.width,4),t.Tm(r.height,4));var C=0;(p=n.stroke())&&(C=t.$b(p)),r.left+=C/2,r.width-=C,r.top+=C/2,r.height-=C,b=(p=t.R(r.left,C))-r.left,f=(m=t.R(r.width,C))-r.width;var D=(x=t.R(r.top,C))-r.top,T=(C=t.R(r.height,C))-r.height;r.left=p,r.width=m-b-f,r.top=x,r.height=C-D-T,n.Qf(r),(e.ca.g("hatchFill")||e.za.g("hatchFill")||e.Ea.g("hatchFill"))&&((r=t.eC(e.o)).pe(n.F()),s.j("treemap_hatchShape",r),u(e,i)),4!=a&&e.qC(n),4!=g&&(e.ke(i),l(e,i))}}},p=function(t,e,i){var n=t.g("maxDepth"),s=t.g("hintDepth");if(!(i>n+s)){var a;n=e.bc(),s=t.g("maxDepth");var o=t.g("hintDepth");if(n?i<s?a=1:i==s?a=o?2:0:i>s&&(a=i==s+o?4:3):a=i<=s?0:4,e.j(y,a),t.Uc[e.j("index")]=e,n=e.bc())for(s=0;s<n;s++)p(t,e.xd(s),i+1);e=e.j(m),0==a||2==a?t.P.push(e):4==a&&t.i.push(e)}},g=function(i,n){var s=new e(i,n);return s.ga(!0,t.nm("treeMap")),s};t.H(e,t.bD),t.Gq(e,"fill stroke hatchFill labels markers headers".split(" "),"normal"),e.prototype.ra=128|t.bD.prototype.ra,e.prototype.sa=122880|t.bD.prototype.sa;var f,b=(f={},t.sq(f,[[0,"maxDepth",function(e){return t.P(e,1,!1)}],[0,"hintDepth",function(e){return t.P(e,0,!1)}],[0,"hintOpacity",t.er],[0,"maxHeadersHeight",t.Cq],[0,"sort",function(e){return t.Mk(e,"desc")}],[0,"headersDisplayMode",t.UN],[0,"labelsDisplayMode",t.UN]]),f);t.U(e,b),t.g=e.prototype,t.g.Ma=function(){return"tree-map"},t.g.pk=function(e,i){var n=this.$().f;if(t.p(n)&&!n.j(S)){if(1!=n.j(y))return n.j(w)&&(c(this,e),u(this,e)),this.ke(e),l(this,e),i;this.ke(e)}},t.g.Tg=function(e){var i=e.type;switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":i="pointmousemove";break;case"mousedown":i="pointmousedown";break;case"mouseup":i="pointmouseup";break;case"click":i="pointclick";break;case"dblclick":i="pointdblclick";break;default:return null}if("pointIndex"in e)var n=e.pointIndex;else if("labelIndex"in e){n=e.labelIndex;var s=e.target===this.Qa().headers();n=t.p(n)&&this.D?this.D[(s?"h":"l")+n]:null}else"markerIndex"in e&&(n=e.markerIndex,n=t.p(n)&&this.G?this.G[n]:null);return n=t.N(n),e.pointIndex=n,{type:i,actualTarget:e.target,series:this,pointIndex:n,target:this,originalEvent:e,point:this.ce(n)}},t.g.TL=function(e,i){if(e=t.A(e)&&e.length?e[0]:e,this.Mb&&this.Mb.target()){var n=this.Mb.target();n==i&&((n=n.$()).select(e),n=n.j(m),t.aO(this.Mb,n))}},t.g.hA=function(){this.Mb&&this.Mb.enabled()&&t.bO(this.Mb)},t.g.$q=function(e){return t.J(e,t.WN)},t.g.OK=function(e,i){i=i||{target:this};var n=t.cD(this,e);n={type:"drillchange",path:n,current:n[n.length-1]},this.ie(),this.hm&&(this.dispatchEvent(this.bl("selected",i,this.hm,!0)),this.hm=null),this.dispatchEvent(n)&&this.IE(e)},t.g.Sj=function(i){if(i.button==t.Ri&&!t.J(i.target,t.Ww)&&!this.$q(i.target)){var n,s=t.so(i.domTarget),a=t.J(i.target,t.Pu),o=t.J(i.target,t.dy);if(a||o){var l=i.target.Zi();if(l.aj&&l.aj()&&(n=l),a){var h=i.target===this.Qa().headers();h=this.D[(h?"h":"l")+s]}else o&&(h=this.G[s])}else n=s&&s.X,h=t.ea(s.index)?s.index:i.pointIndex;n&&!n.md&&n.enabled()&&t.D(n.Tg)&&((s=this.$()).select(h),(s=s.f)==this.b?r(s)||this.OK(s.getParent()):s.bc()?this.OK(s):e.u.Sj.call(this,i))}},t.g.uA=function(){return this.St(),this.b?t.cD(this,this.b):null},t.g.ie=function(e){var i;this.enabled()&&(i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i))},t.g.Uu=function(){return!0},t.g.ay=function(){this.St(),this.b&&!r(this.b)&&this.IE(this.b.getParent())},t.g.Ms=function(t){return"categories"==t},t.g.wq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){n=n.xe;for(var o=s.Ec(),r=[];o.advance();){var l=o.get(m);n==a.Dn(l)&&r.push(o.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:r}:a.fg=[{X:s,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]),this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.aO(this.Mb,(n.start+n.end)/2)}}},t.g.vq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){if("single"==this.gd().g("hoverMode")){var s=t.so(i.domTarget);s&&(s.X=n.X)}this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.bO(this.Mb)}},t.g.Ol=function(e){var i,n=[];if(this.pb(),"categories"==e){var s=this.kd();if(s&&t.J(s,t.iz)){var a=s.sr();for(e=0,i=a.length;e<i;e++){var o=a[e];"default"!==o.name&&n.push({text:o.name,iconEnabled:!0,iconType:"square",iconFill:o.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:e,meta:{X:this,scale:s,xe:o}})}}}return n},t.g.xc=function(){return this};var v="treemap_size",m="treemap_value",y="treemap_type",S="treemap_missing",w="treemap_shape";t.g=e.prototype,t.g.zk=function(t){return(0,window.isNaN)(t)||0>=t},t.g.IE=function(t){this.b=t,this.B(16912,129)},t.g.Nga=function(e){t.X(e,1)&&this.B(16,1)},t.g.de=function(e){t.X(e,1)&&this.B(16,1)},t.g.Mn=function(e){t.X(e,1)&&this.B(16,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(8704,1);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,t.qd(this.f),this.vb?this.f=t.dt(this.vb.Ma(),null):this.f=null,this.vb.da(i),i||this.B(8704,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(8704,1)},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,this.Mb.df(),this.Mb.kb(this),t.K(this.Mb,this.Tz,this),this.B(32772,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=32784,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Ic=function(e){this.oe&&!e||(this.oe=new t.Fw);var i=this.$();return e=i.f,i={chart:{value:this,type:""},index:{value:i.ma(),type:"number"},name:{value:e.get("name"),type:"string"},value:{value:e.j(m),type:"number"},size:{value:e.j(v),type:"number"}},this.oe.lg(e).Li([this]),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.Bh=function(e){var i=this.$().j("treemap_pointBounds");return e=t.Ek(e),{value:t.Eo(i,e)}},t.g.ke=function(e){var i,n=this.$().f,s=n.j("treemap_pointBounds"),a=n.j(y);if(0==a||2==a)a=!1;else{if(1!=a)return;a=!0}i=a?this.Qa().headers():this.Qa().labels();var o,r=a?this.g("headersDisplayMode"):this.g("labelsDisplayMode"),l=a,c=this.$().f,u=c.j("index"),d="label",p="hoverLabel",g="selectLabel";if(l){var f=this.Qa().headers(),b=this.lb().headers(),v=null;d="header",p="hoverHeader",g=null}else f=this.Qa().labels(),b=this.lb().labels(),v=this.selected().labels();var m=!!(e&t.wo),S=!m&&!!(e&t.vo),w=c.j("labelIndex");w=t.p(w)?f.be(w):null;var x,C=null;m?C=x=v:S?C=x=b:x=f;var D=c.get("normal");D=t.p(D)?D[d]:void 0;var T=c.get("hovered");T=t.p(T)?T[d]:void 0;var k,$=c.get("selected");if($=t.p($)?l?void 0:$[d]:void 0,d=t.Zo(D,c.get(d)),p=S?t.Zo(T,c.get(p)):null,g=m?t.Zo($,c.get(g)):null,$=d&&t.p(d.enabled)?d.enabled:null,T=g&&t.p(g.enabled)?g.enabled:null,D=p&&t.p(p.enabled)?p.enabled:null,k=l?!h(S?p:d,x):S||m?S?null===D?null===b.enabled()?null===$?f.enabled():$:b.enabled():D:null===T?null===v.enabled()?null===$?f.enabled():$:v.enabled():T:null===$?f.enabled():$){m=this.$().f;var O="label";T="hoverLabel",$="selectLabel",l?(x=this.Qa().headers(),k=this.lb().headers(),b=null,O="header",T="hoverHeader",$=null):(x=this.Qa().labels(),k=this.lb().labels(),b=this.selected().labels()),e=!(v=!!(e&t.wo))&&!!(e&t.vo);var P=m.get("normal");P=t.p(P)?P[O]:void 0;var L=m.get("hovered");L=t.p(L)?L[O]:void 0,D=m.get("selected"),D=t.p(D)?l?void 0:D[O]:void 0,O=t.Zo(P,m.get(O)),T=e?t.Zo(L,m.get(T)):null,m=v?t.Zo(D,m.get($)):null,$=O&&O.position?O.position:null,T=T&&T.position?T.position:null,m=m&&m.position?m.position:null,e=e||v?e?T||(k.g("position")?k.g("position"):$||x.g("position")):m||(b.g("position")?b.g("position"):$||x.g("position")):$||x.g("position"),e=this.Bh(e),x=this.Ic(),w?(t.Yu(f,u),w.Hf(x),w.jc(e)):(w=f.add(x,e,u),c.j("labelIndex",w.ma()),this.D[(l?"h":"l")+w.ma()]=c.j("index")),w.Hi(),t.$u(w,C),w.td(d,S?p:g),l=w}else w&&(f.clear(w.ma()),c.j("labelIndex",void 0)),l=null;l&&((u=(c=t.Uu(l)).adjustByHeight||c.adjustByHeight)&&"same"==t.Ou(i)&&(o=t.iv(l,s.width,s.height,c.minFontSize,c.maxFontSize,c.adjustByWidth,c.adjustByHeight)),u?t.SN(i,o):t.SN(i,null),c.width=null,c.height=null,(c.adjustByWidth||c.adjustByHeight)&&(c.fontSize=t.Zu(l).Nd.fontSize),o=i.measure(l.Hf(),l.jc(),c),o=!(s.left<=o.left&&s.cb()>=o.cb()&&s.top<=o.top&&s.Va()>=o.Va()),a&&(l.width(s.width),l.height(s.height)),o&&"drop"==r&&(i.clear(l.ma()),n.j("labelIndex",void 0),l=null),l&&("always-show"!=r?(l.width(s.width),l.height(s.height),l.clip(s)):(a||(l.width(null),l.height(null)),l.clip(null)),l.W()))},t.g.Eh=function(){return t.Yb(t.nm("hatchFillPalette.items.0"))},t.g.Yi=function(){var t=this.$(),e=this.Eh();return{index:t.ma(),sourceHatchFill:e}},t.g.Ge=function(e){var i=this.$().f;return e=e||t.nm("palette.items.0"),{value:i.j(m),sourceColor:e,colorScale:this.kd()}},t.g.sc=function(e,i,n,s,a,o,r){return a=(0==i?this.ca:1==i?this.za:this.Ea).g(e),r?e=a:(r=(n=n.f).get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),a)),t.p(e)&&(e=s(e)),e},t.g.St=function(){if(this.J(4096)){s(this),this.fh=0,this.ba=[],this.Uc=[],this.P=[],this.i=[],this.b=null,this.I(4096);var e=this.data();if(e){var i=e.bc();if(1<i)t.kl(18);else if(!i)return;e=e.xd(0),this.b||(this.b=e),a(this,e,0),this.B(24592)}}},t.g.pb=function(){this.St(),this.b&&(this.J(16384)&&(this.P=[],this.i=[],this.Uc=[],p(this,this.b,0),this.Ec(),this.I(16384),this.B(8192)),this.J(8192)&&(this.vb&&(this.vb.Of()?(this.vb.Bg(),this.vb.Xc.apply(this.vb,this.P),this.vb.Hg()):(this.vb.Co(),this.vb.Xc.apply(this.vb,this.P)),t.J(this.vb,t.iz)&&t.Pt(this.vb.Xa()),this.f.N(this.vb.F())),this.f&&(this.f.Of()?(this.f.Bg(),this.f.Xc.apply(this.f,this.i),this.f.Hg()):(this.f.Co(),this.f.Xc.apply(this.f,this.i))),this.B(16),this.I(8192)))},t.g.Qh=function(e){if(!this.pf()&&(this.pb(),this.b)){this.J(32768)&&this.Mb&&(this.Mb.ka(),this.Mb.scale(this.kd()),this.Mb.target(this),this.Mb.da(!1),this.B(4));var a=this.Qa();if(this.J(4)&&(this.Mb?(this.Mb.ja(e.clone().round()),this.lf=this.Mb.yd()):this.lf=e.clone(),this.ue&&this.ue.clip(this.lf),a.headers()&&a.headers().clip(this.lf)),this.J(32768)&&(this.Mb&&(this.Mb.ka(),this.Mb.O(this.Na),this.Mb.zIndex(50),this.Mb.W(),this.Mb.da(!1)),this.I(32768)),this.J(16)&&(this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.mk()}),t.ia),this.ue.clip(this.lf),this.ue.zIndex(30),this.ue.parent(this.Na),a.headers().O(this.Na).zIndex(41),a.headers().clip(this.lf),a.labels().O(this.Na).zIndex(40),a.Db().O(this.Na).zIndex(40)),this.o?this.o.clear():(this.o=new t.dC((function(){return t.mk()}),t.ia),this.o.zIndex(31),this.o.parent(this.Na),this.o.Dd(!0)),a.headers().clear(),a.labels().clear(),a.Db().clear(),s(this),"desc"==(e=this.g("sort"))?this.qc=i:"asc"==e&&(this.qc=n),d(this,this.b,this.lf,0),a.headers().W(),a.labels().W(),a.Db().W(),this.I(65552)),this.J(65536)){for((a=this.$()).reset();a.advance();)if(2==a.j(y)&&(e=a.j(w))){var o=t.cm("fill",1,!1)(this,t.gm,!1);o=t.Ul(o,this.g("hintOpacity"),!0),e.fill(o)}this.I(65536)}}},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.jx=function(e,i){var n,s=t.so(i.event.domTarget);n=t.J(i.target,t.Pu)||t.J(i.target,t.dy)?this.ba[s]:s.node,s={};var a=1==n.j(y);return!n.bc()||a&&n==this.b||(s["drill-down-to"]={index:7,text:"Drill down",eventType:"anychart.drillTo",action:(0,t.pa)(this.OK,this,n)}),r(this.b)||(s["drill-down-up"]={index:7,text:"Drill up",eventType:"anychart.drillUp",action:(0,t.pa)(this.OK,this,this.b.getParent())}),t.Jc(s)||(s["drill-down-separator"]={index:7.1}),t.Sc(s,t.Sl(t.mG["select-marquee"]),e),s},t.g.yj=function(){if(this.St(),this.b){var t=this.b.j(v),e=this.b.j(m);return this.b.j(S)||!t&&!e}return!0},t.g.U=function(i,n){if(e.u.U.call(this,i,n),"colorScale"in i){var s=i.colorScale,a=null;t.z(s)?a=t.dt(s,null):t.C(s)&&(a=t.dt(s.type,null))&&a.N(s),a&&this.kd(a)}t.Iq(this,b,i),this.Xl(i.hoverMode),this.ej(i.selectionMode),"colorRange"in i&&this.Qi(i.colorRange)},t.g.F=function(){var i=e.u.F.call(this);return this.kd()&&(i.colorScale=this.kd().F()),i.colorRange=this.Qi().F(),t.Tq(this,b,i,"TreeMap"),{chart:i}},t.g.R=function(){t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,e.u.R.call(this)};var x=e.prototype;x.getType=x.Ma,x.data=x.data,x.selectionMode=x.ej,x.hoverMode=x.Xl,x.normal=x.Qa,x.hovered=x.lb,x.selected=x.selected,x.colorScale=x.kd,x.colorRange=x.Qi,x.drillTo=x.jr,x.drillUp=x.ay,x.getDrilldownPath=x.uA,x.toCsv=x.Zj,t.Tp["tree-map"]=g,t.E("anychart.treeMap",g)}.call(this,$)),_.theme_pyramid_funnel||(_.theme_pyramid_funnel=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{funnel:{title:{text:"Funnel Chart"},neckWidth:"30%",neckHeight:"25%",reversed:!0,normal:{labels:{position:"outside-left-in-column"}}},pyramid:{title:{text:"Pyramid Chart"},legend:{inverted:!0},normal:{labels:{position:"outside-left-in-column"}},reversed:!1}})}.call(this,$)),_.theme_gantt||(_.theme_gantt=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{ganttDefaultSimpleLabelsSettings:{fontSize:11,vAlign:"middle",height:"100%",padding:{left:4,top:0,right:4,bottom:0}},defaultLevelsLabelsSettings:{fontSize:10,format:function(){return this.value},textOverflow:!0},defaultGanttHeader:{stroke:"#cecece",background:{fill:"#f7f7f7",enabled:!0}},defaultLevelSettings:{height:null},defaultDataGrid:{isStandalone:!0,headerHeight:25,fixedColumns:!1,backgroundFill:"none",columnStroke:"#cecece",rowHoverFill:t.zN,rowSelectedFill:t.zN,rowStroke:"#cecece",rowOddFill:"none",rowEvenFill:"none",rowFill:"none",onEditStart:function(){return 1>this.columnIndex?{cancelEdit:!0}:{value:this.value}},onEditEnd:function(){return 1==this.columnIndex?{itemMap:{name:this.value}}:{cancelEdit:!0}},buttons:{padding:[0,0,0,0],width:15,height:15,cursor:"pointer",normal:{hAlign:"center",vAlign:"middle",fontColor:"#7c868e",fontSize:12,content:"▸",background:{fill:"#fff 0.00001",stroke:"none"}},hovered:{},selected:{content:"▾"}},zIndex:5,headerFill:"#f7f7f7",tooltip:{padding:5,title:{enabled:!0,fontSize:"14px",fontWeight:"normal",fontColor:"#e5e5e5"},separator:{enabled:!0},format:"{%name}"},defaultColumnSettings:{width:90,buttonCursor:"pointer",depthPaddingMultiplier:0,collapseExpandButtons:!1,title:{text:"Column",enabled:!0,margin:0,vAlign:"middle",hAlign:"center",background:{enabled:!1},wordWrap:"normal",wordBreak:"normal"}},columns:[{width:50,title:{text:"#"}},{width:170,collapseExpandButtons:!0,depthPaddingMultiplier:15,title:{text:"Name"}}]},defaultTimeline:{isStandalone:!0,columnStroke:"#cecece",backgroundFill:"none",rowHoverFill:t.zN,rowSelectedFill:t.zN,rowStroke:"#cecece",rowOddFill:"none",rowEvenFill:"none",rowFill:"none",workingFill:"none",notWorkingFill:"lightblue 0.5",holidaysFill:"#cecece 0.5",weekendsFill:"#cecece 0.5",zIndex:5,headerHeight:70,elements:{enabled:!0,anchor:"auto",position:"left-center",offset:0,height:"70%",normal:{fill:t.zN,stroke:t.zN},selected:{fill:t.zN,stroke:t.zN},labels:{enabled:null},rendering:{drawer:function(){t.dF.vector.primitives.roundedRect(this.shapes.path,this.predictedBounds,0)},shapes:[{name:"path",shapeType:"path",zIndex:10,disablePointerEvents:!1}]},edit:{thumbs:{fill:"#eaeaea",stroke:"#545f69",size:3,enabled:!0},connectorThumbs:{fill:"#eaeaea",stroke:"#545f69",size:10,type:"circle",verticalOffset:0,horizontalOffset:0,enabled:!0},fill:{color:"#fff",opacity:1e-5},stroke:{color:"#aaa",dash:"3 3"}},tooltip:{padding:5,title:{enabled:!0,fontSize:"14px",fontWeight:"normal",fontColor:"#e5e5e5"},separator:{enabled:!0}},startMarker:{enabled:!1,anchor:"center",size:6,offsetX:0,offsetY:0,rotation:0,position:"left-center",type:"triangle-right"},endMarker:{enabled:!1,anchor:"center",size:6,offsetX:0,offsetY:0,rotation:0,position:"right-center",type:"triangle-left"}},tasks:{progress:{height:"100%",anchor:"left-center",drawOverEnd:!0,rendering:{shapes:[{name:"path",shapeType:"path",zIndex:11,disablePointerEvents:!0}]},edit:{fill:"#eaeaea",stroke:"#545f69"}}},groupingTasks:{progress:{height:"100%",anchor:"left-center",rendering:{shapes:[{name:"path",shapeType:"path",zIndex:11,disablePointerEvents:!0}]},edit:{fill:"#eaeaea",stroke:"#545f69"}},rendering:{drawer:function(){var t=this.predictedBounds,e=t.left+t.width,i=t.top+t.height,n=t.top+1.4*t.height;this.shapes.path.moveTo(t.left,t.top).lineTo(e,t.top).lineTo(e,n).lineTo(e-1,n).lineTo(e-1,i).lineTo(t.left+1,i).lineTo(t.left+1,n).lineTo(t.left,n).close()}}},milestones:{rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)}},preview:{enabled:!1,rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)},shapes:[{name:"path",shapeType:"path",zIndex:12,disablePointerEvents:!1}]},labels:{enabled:!1,format:"{%Name}",background:{enabled:!0,fill:"white 0.7"}},depth:null,drawOnCollapsedOnly:!1,position:"left-center",markerType:"diamond"},markerType:"diamond"},baselineMilestones:{rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)}},preview:{enabled:!1,rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)},shapes:[{name:"path",shapeType:"path",zIndex:12,disablePointerEvents:!1}]},labels:{enabled:!1,format:"{%Name}",background:{enabled:!0,fill:"white 0.7"}},depth:null,drawOnCollapsedOnly:!1,position:"left-center",markerType:"diamond"},markerType:"diamond"},baselines:{above:!1,disableWithRelatedTask:!1,progress:{height:"50%",anchor:"left-bottom",position:"left-bottom",drawOverEnd:!0,rendering:{shapes:[{name:"path",shapeType:"path",zIndex:11,disablePointerEvents:!0}]},labels:{format:"{%baselineProgress}"},edit:{fill:"#eaeaea",stroke:"#545f69"}}},allowConnectorCaps:!0,connectors:{previewStroke:{color:"#545f69",dash:"3 3"},normal:{fill:t.zN,stroke:t.zN},selected:{fill:t.zN,stroke:t.zN}},tooltip:{padding:5,title:{enabled:!0,fontSize:"14px",fontWeight:"normal",fontColor:"#e5e5e5"},separator:{enabled:!0},zIndex:100},labels:{enabled:!0,anchor:"left-center",position:"right-center",padding:{top:3,right:5,bottom:3,left:5},vAlign:"middle",background:null,fontSize:11,zIndex:40,disablePointerEvents:!0},markers:{anchor:"center",zIndex:50,type:"star5",fill:"#ff0",stroke:"2 red"},defaultLineMarkerSettings:{layout:"vertical",zIndex:1.5},defaultRangeMarkerSettings:{layout:"vertical",zIndex:1},defaultTextMarkerSettings:{layout:"vertical",zIndex:2},zoomOnMouseWheel:!1,connectBy:""},ganttBase:{defaultRowHoverFill:"#f8fafb",defaultRowSelectedFill:"#ebf1f4",splitterPosition:"30%",headerHeight:70,rowStroke:"#cecece",rowFill:"none",rowHoverFill:t.zN,rowSelectedFill:t.zN,edit:{fill:{color:"#4285F4",opacity:.2},stroke:{color:"#4285F4",thickness:2},placementStroke:{color:"#4285F4",dash:"4 4"},enabled:!1},title:{enabled:!1},legend:{enabled:!1},background:{fill:"#fff"},margin:0,padding:0,dataGrid:{isStandalone:!1,backgroundFill:"none",tooltip:{zIndex:100}},timeline:{isStandalone:!1,cropLabels:!1,labels:{padding:[0,4,0,4]}}},ganttResource:{dataGrid:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}"}},timeline:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}"},labels:{format:"{%Name}",position:"center",anchor:"center",enabled:!1},milestones:{labels:{anchor:"left-center",position:"right-center",enabled:null},tooltip:{format:"{%start}"}},baselines:{labels:{position:"right-center",anchor:"left-center",format:"Baseline Label",enabled:!1},tooltip:{format:"Start Date: {%start}\nEnd Date: {%end}\nBaseline Start: {%baselineStart}\nBaseline End: {%baselineEnd}"}}}},ganttProject:{dataGrid:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}\nComplete: {%progress}"}},timeline:{elements:{labels:{format:"{%Progress}",position:"right-center",anchor:"left-center",enabled:null},tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}\nComplete: {%progress}"}},tasks:{progress:{labels:{format:"{%Progress}",enabled:!1}}},groupingTasks:{progress:{labels:{format:"{%Progress}",enabled:!1}}},baselines:{labels:{position:"right-center",anchor:"left-center",format:"Baseline Label",enabled:!1},tooltip:{format:"Start Date: {%start}\nEnd Date: {%end}\nBaseline Start: {%baselineStart}\nBaseline End: {%baselineEnd}\nComplete: {%progress}\nBaseline Progress: {%baselineProgress}"}},milestones:{labels:{format:"{%Name}",anchor:"left-center",position:"right-center",enabled:null},tooltip:{format:"{%start}"}},baselineMilestones:{labels:{format:"{%Name}",anchor:"left-center",position:"right-center",enabled:null},tooltip:{titleFormat:"{%Name}",format:"{%baselineStart}"}}}}}),t.ra(t.fa.anychart.themes.defaultTheme.standalones,{projectTimeline:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%start}\nComplete: {%progress}"}},resourceTimeline:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}"}},dataGrid:{enabled:!0,zIndex:0}})}.call(this,$)),_.theme_circle_packing||(_.theme_circle_packing=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{circlePacking:{normal:{fill:t.zN,stroke:t.EN,labels:{format:"{%name}",enabled:!0,hAlign:"center",vAlign:"middle",anchor:"center-top",position:"center-top",fontSize:14,fontColor:"#fff",textShadow:"2px 2px 0px black",disablePointerEvents:!0,width:null,height:null}},labelsMode:"roots",hovered:{fill:t.FN,stroke:t.HN},selected:{fill:"#333 0.85",stroke:"#fff"},tooltip:{titleFormat:"{%name}",format:"Value: {%value}"}}})}.call(this,$)),_.ui||(_.ui=1,function(t){var e=function(e,i){e.Y&&e.Y.D&&(t.Lc(e.Y.D,e.he),t.Mc(e.Y.D,i,e)),e.he=i},i=function(t,e){t.dh=e},n=function(t,e){t.i.ew(t.Ya(),e),t.Qd=e},s=function(e,i){return new t.gb(e.x-i.x,e.y-i.y)},a=function(e){if(t.hd&&!t.dd(8))return e.offsetParent;var i=t.te(e),n=t.Af(e,"position"),s="fixed"==n||"absolute"==n;for(e=e.parentNode;e&&e!=i;e=e.parentNode)if(11==e.nodeType&&e.host&&(e=e.host),n=t.Af(e,"position"),!(s=s&&"static"==n&&e!=i.documentElement&&e!=i.body)&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight||"fixed"==n||"absolute"==n||"relative"==n))return e;return null},o=function(e){for(var i=new t.kb(0,window.Infinity,window.Infinity,0),n=t.ye(e),s=n.b.body,o=n.b.documentElement,r=t.Fe(n.b);e=a(e);)if(!(t.hd&&0==e.clientWidth||t.xd&&0==e.clientHeight&&e==s)&&e!=s&&e!=o&&"visible"!=t.Af(e,"overflow")){var l=t.Ff(e),h=new t.gb(e.clientLeft,e.clientTop);l.x+=h.x,l.y+=h.y,i.top=Math.max(i.top,l.y),i.right=Math.min(i.right,l.x+e.clientWidth),i.bottom=Math.min(i.bottom,l.y+e.clientHeight),i.left=Math.max(i.left,l.x)}return s=r.scrollLeft,r=r.scrollTop,i.left=Math.max(i.left,s),i.top=Math.max(i.top,r),n=t.Ee(t.Ge(n.b)||window),i.right=Math.min(i.right,s+n.width),i.bottom=Math.min(i.bottom,r+n.height),0<=i.top&&0<=i.left&&i.bottom>i.top&&i.right>i.left?i:null},r=function(e,i){var n=i||t.Fe(window.document),s=n||t.Fe(window.document),a=t.Ff(e),o=t.Ff(s),r=t.Vf(s);if(s==t.Fe(window.document)){var l=a.x-s.scrollLeft;a=a.y-s.scrollTop,t.hd&&!t.dd(10)&&(l+=r.left,a+=r.top)}else l=a.x-o.x-r.left,a=a.y-o.y-r.top;r=t.Jf(e),o=s.clientHeight-r.height;var h=s.scrollLeft,c=s.scrollTop;h+=Math.min(l,Math.max(l-(s.clientWidth-r.width),0)),c+=Math.min(a,Math.max(a-o,0)),s=new t.gb(h,c),n.scrollLeft=s.x,n.scrollTop=s.y},l=function(e,i){t.qf.call(this),this.f=e||1,this.b=i||t.Cj,this.i=(0,t.pa)(this.ela,this),this.o=(0,t.Ln)()},h=function(e,i){var n="";i&&(n=i.id),t.zy(e,"activedescendant",n)},c=function(){this.f=[]},u=function(t,e){var i=t.f[e];if(!i){switch(e){case 0:i=t.Hh()+"-highlight";break;case 1:i=t.Hh()+"-checkbox";break;case 2:i=t.Hh()+"-content"}t.f[e]=i}return i},d=function(t,e,i){return t=u(t,2),i.Ac("DIV",t,e)},p=function(e,i){var n=e.Gn(i);if(n){n=n.firstChild;var s=u(e,1);return!!n&&t.af(n)&&t.Lj(n,s)}return!1},g=function(e,i,n,s){t.gD(e,n,i.lH()),t.jD(e,i,n),s!=p(e,n)&&(s?t.Qj(n,"anychart-option"):t.Sj(n,"anychart-option"),n=e.Gn(n),s?(e=u(e,1),n.insertBefore(i.f.Ac("DIV",e),n.firstChild||null)):n.removeChild(n.firstChild))},f=function(e,i,n,s){t.sD.call(this,e,s||c.Id(),n),this.dh=i},b=function(t,e,i,n){f.call(this,t,e,i,n),this.P=!1},v=function(t){this.b=t},m=function(t,e){t&&(t.tabIndex=e?0:-1)},y=function(e,i,n){if(n)for(var s,a=n.firstChild;a&&a.parentNode==n;){if(s=a.nextSibling,1==a.nodeType){var o=e.bH(a);o&&(o.Ed=a,i.isEnabled()||o.Dj(!1),i.hc(o),o.Bs(a))}else a.nodeValue&&""!=(0,t.vc)(a.nodeValue)||n.removeChild(a);a=s}},S=function(e,i,n){t.By.call(this,n),this.dw=i||v.Id(),this.vh=e||this.dw.R1()},w=function(t){return t.NV||t.Ya()},x=function(e,i){var n=t.Dy(e),s=w(e);i?n.wa(s,"focus",e.YM).wa(s,"blur",e.XM).wa(e.Zl||(e.Zl=new t.Jp(w(e))),"key",e.oo):n.gc(s,"focus",e.YM).gc(s,"blur",e.XM).gc(e.Zl||(e.Zl=new t.Jp(w(e))),"key",e.oo)},C=function(t,e){var i=e.Ya();i=i.id||(i.id=e.oy()),t.tv||(t.tv={}),t.tv[i]=e},D=function(t,e){if(t.Ya())throw Error("Component already rendered");t.vh=e},T=function(t,e){e!=t.kD&&t.xf&&x(t,e),t.kD=e,t.DA&&t.hj&&m(w(t),e)},k=function(t){return t.xd(t.ul)},$=function(e){L(e,(function(t,e){return(t+1)%e}),t.Fy(e)-1)},O=function(t){L(t,(function(t,e){return(t+1)%e}),t.ul)},P=function(t){L(t,(function(t,e){return 0>--t?e-1:t}),t.ul)},L=function(e,i,n){n=0>n?e.Kf(e.dm):n;var s=t.Fy(e);n=i.call(e,n,s);for(var a=0;a<=s;){var o=e.xd(n);if(o&&e.p0(o)){e.Wn(n);break}a++,n=i.call(e,n,s)}},G=function(){},F=function(e,i,n){t.sD.call(this,e,n||G.Id(),i),this.hn(1,!1),this.hn(2,!1),this.hn(4,!1),this.hn(32,!1),this.dc=1},I=function(){},E=function(e,i){t.sD.call(this,null,e||I.Id(),i),this.hn(1,!1),this.hn(2,!1),this.hn(4,!1),this.hn(32,!1),this.dc=1},A=function(t){this.b=t||"menu"},U=function(t){E.call(this,I.Id(),t)},_=function(t,e){S.call(this,ge,e||A.Id(),t),T(this,!1)},j=function(t,e){(t.CF=e)&&T(t,!0)},M=function(t,e){_.call(this,t,e),this.P=null},N=function(e,i,n,a,r,l,h,c,u){var d=B(n),p=t.Of(e),g=o(e);if(g){var f=new t.I(g.left,g.top,g.right-g.left,g.bottom-g.top);g=Math.max(p.left,f.left);var b=Math.min(p.left+p.width,f.left+f.width);if(g<=b){var v=Math.max(p.top,f.top);v<=(f=Math.min(p.top+p.height,f.top+f.height))&&(p.left=g,p.top=v,p.width=b-g,p.height=f-v)}}if(g=t.ye(e),v=t.ye(n),g.b!=v.b){b=g.b.body,v=t.Ge(v.b),f=new t.gb(0,0);var m=(m=t.te(b))?t.Ge(m):window;if(t.Zc(m,"parent")){var y=b;do{var S=m==v?t.Ff(y):t.Gf(y);f.x+=S.x,f.y+=S.y}while(m&&m!=v&&m!=m.parent&&(y=m.frameElement)&&(m=m.parent))}b=s(f,t.Ff(b)),!t.hd||t.dd(9)||t.De(g.b)||(b=s(b,t.He(g.b))),p.left+=b.x,p.top+=b.y}if(e=H(e,i),i=p.left,4&e?i+=p.width:2&e&&(i+=p.width/2),p=new t.gb(i,p.top+(1&e?p.height:0)),p=s(p,d),r&&(p.x+=(4&e?-1:1)*r.x,p.y+=(1&e?-1:1)*r.y),h)if(u)var w=u;else(w=o(n))&&(w.top-=d.y,w.right-=d.x,w.bottom-=d.y,w.left-=d.x);return R(p,n,a,l,w,h,c)},B=function(e){if(e=e.offsetParent){var i="HTML"==e.tagName||"BODY"==e.tagName;if(!i||"static"!=t.Af(e,"position")){var n=t.Ff(e);if(!i){var a;if(a=i=t.Qf(e)){a=t.bE&&0<=t.xc(t.tda,10);var o=t.lda&&0<=t.xc(t.pda,10);a=t.gd||a||o}i=a?-e.scrollLeft:!i||t.gda&&t.bd("8")||"visible"==t.Af(e,"overflowX")?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft,n=s(n,new t.gb(i,e.scrollTop))}}}return n||new t.gb},R=function(e,i,n,s,a,o,r){e=e.clone();var l=H(i,n);n=t.Lf(i),r=r?r.clone():n.clone(),e=e.clone(),r=r.clone();var h=0;if((s||0!=l)&&(4&l?e.x-=r.width+(s?s.right:0):2&l?e.x-=r.width/2:s&&(e.x+=s.left),1&l?e.y-=r.height+(s?s.bottom:0):s&&(e.y+=s.top)),o){if(a){if(s=e,l=r,h=0,65==(65&o)&&(s.x<a.left||s.x>=a.right)&&(o&=-2),132==(132&o)&&(s.y<a.top||s.y>=a.bottom)&&(o&=-5),s.x<a.left&&1&o&&(s.x=a.left,h|=1),16&o){var c=s.x;s.x<a.left&&(s.x=a.left,h|=4),s.x+l.width>a.right&&(l.width=Math.min(a.right-s.x,c+l.width-a.left),l.width=Math.max(l.width,0),h|=4)}s.x+l.width>a.right&&1&o&&(s.x=Math.max(a.right-l.width,a.left),h|=1),2&o&&(h|=(s.x<a.left?16:0)|(s.x+l.width>a.right?32:0)),s.y<a.top&&4&o&&(s.y=a.top,h|=2),32&o&&(c=s.y,s.y<a.top&&(s.y=a.top,h|=8),s.y+l.height>a.bottom&&(l.height=Math.min(a.bottom-s.y,c+l.height-a.top),l.height=Math.max(l.height,0),h|=8)),s.y+l.height>a.bottom&&4&o&&(s.y=Math.max(a.bottom-l.height,a.top),h|=2),8&o&&(h|=(s.y<a.top?64:0)|(s.y+l.height>a.bottom?128:0)),a=h}else a=256;h=a}return(o=new t.I(0,0,0,0)).left=e.x,o.top=e.y,o.width=r.width,o.height=r.height,496&(a=h)||(t.Cf(i,new t.gb(o.left,o.top)),r=new t.lb(o.width,o.height),t.mb(n,r)||(n=r,e=t.De(t.ye(t.te(i)).b),!t.hd||t.bd("10")||e&&t.bd("8")?(i=i.style,t.gd?i.MozBoxSizing="border-box":t.xd?i.WebkitBoxSizing="border-box":i.boxSizing="border-box",i.width=Math.max(n.width,0)+"px",i.height=Math.max(n.height,0)+"px"):(r=i.style,e?(e=t.Uf(i,"padding"),i=t.Vf(i),r.pixelWidth=n.width-i.left-e.left-e.right-i.right,r.pixelHeight=n.height-i.top-e.top-e.bottom-i.bottom):(r.pixelWidth=n.width,r.pixelHeight=n.height)))),a},H=function(e,i){return-9&(8&i&&t.Qf(e)?4^i:i)},z=function(){},V=function(t,e,i){this.element=t,this.i=e,this.K=i},q=function(t,e,i,n){V.call(this,t,e),this.o=i?5:0,this.D=n||void 0},W=function(t,e){return 48&t&&(e^=4),192&t&&(e^=1),e},K=function(){this.f=[]},Y=function(t,e,i){var n=e.f.Ac("SPAN");n.className="anychart-submenu-arrow",X(e,n),t.Gn(i).appendChild(n)},X=function(e,i){t.Ey(e)?(t.Qj(i,"anychart-submenu-arrow-rtl"),t.df(i,"◄")):(t.Sj(i,"anychart-submenu-arrow-rtl"),t.df(i,"►"))},J=function(t,e,i,n){f.call(this,t,e,i,n||K.Id())},Z=function(t){t.getParent().Pj((function(t){t!=this&&"function"==typeof t.Pl&&(t.Pl(),t.Vp())}),t)},Q=function(e,i){!i&&et(e)&&et(e).Wn(-1),e.dispatchEvent(t.Cy(64,i));var n=et(e);if(i!=e.MU){var s=e.Ya();i?t.Qj(s,"anychart-submenu-open"):t.Sj(s,"anychart-submenu-open")}if(i!=n.Oe()&&(i&&(n.xf||n.Sd(),n.Wn(-1)),n.Ji(i),i)){n=new q(e.Ya(),12,!1);var a=(s=et(e)).Ya();s.Oe()||(a.style.visibility="hidden",t.Pf(a,!0)),n.b(a,8),s.Oe()||(t.Pf(a,!1),a.style.visibility="visible")}e.MU=i},tt=function(e,i,n){var s=t.Dy(e);(n?s.wa:s.gc).call(s,i,"enter",e.aga)},et=function(t){return t.Wl?t.$M&&t.Wl.getParent()!=t&&t.Wl.fl(t):it(t,new _(t.f)),t.Wl.Ya()||t.Wl.Ac(),t.Wl},it=function(t,e){var i=t.Wl;e!=i&&(i&&(t.Pl(),t.xf&&tt(t,i,!1)),t.Wl=e,t.$M=!1,e&&(e.fl(t),e.Ji(!1,!0),j(e,!1),T(e,!1),t.xf&&tt(t,e,!0)))},nt=function(){this.f=[]},st=function(t,e,i){(e=e.f.Ac("span")).className="anychart-submenu-arrow",e.innerHTML="&nbsp;",t.Gn(i).appendChild(e)},at=function(t,e,i){f.call(this,t,void 0,void 0,nt.Id()),this.P=i||!1,this.b=e||null},ot=function(t){t.getParent().Pj((function(t){t!=this&&"function"==typeof t.Pl&&(t.Pl(),t.Vp())}),t)},rt=function(e,i){!i&&ht(e)&&ht(e).Wn(-1),e.dispatchEvent(t.Cy(64,i));var n=ht(e);if(i!=e.FR){var s=e.Ya();i?t.Qj(s,"anychart-submenu-open"):t.Sj(s,"anychart-submenu-open")}if(i!=n.Oe()&&(i&&(n.xf||n.Sd(e.b),n.Wn(-1)),n.Ji(i),i)){n=new q(e.Ya(),12,!1);var a=ht(e),o=a.Ya();a.Oe()||(o.style.visibility="hidden",t.Pf(o,!0)),n.b(o,8),a.Oe()||(t.Pf(o,!1),o.style.visibility="visible"),n=t.Ee(window),s=t.Of(o),o=t.Hf(o),a=a.P;var r=t.Of(a);a.style.maxHeight=n.height-o.y-(s.height-r.height)-15+"px"}e.FR=i},lt=function(e,i,n){var s=t.Dy(e);(n?s.wa:s.gc).call(s,i,"enter",e.hda)},ht=function(t){if(t.Kl)t.RK&&t.Kl.getParent()!=t&&t.Kl.fl(t);else{var e=t.P?wt.Id():void 0;e=new M(t.f,e);var i=t.Kl;e!=i&&(i&&(t.Pl(),t.xf&&lt(t,i,!1)),t.Kl=e,t.RK=!1,e&&(e.fl(t),e.Ji(!1,!0),j(e,!1),T(e,!1),t.xf&&lt(t,e,!0)))}return t.Kl.Ya()||t.Kl.Ac(),t.Kl},ct=function(e,i){this.i=e instanceof t.gb?e:new t.gb(e,i)},ut=function(t,e){ct.call(this,t,e)},dt=function(t,e,i,n){q.call(this,t,e,i||n),(i||n)&&this.f(65|(n?32:132))},pt=function(e,i){_.call(this,e,i),j(this,!0),this.Ji(!1,!0),this.i=new t.ZB},gt=function(e,i,n,s){var a=e.Oe();e.Oe()||(0,t.Ln)(),e.dispatchEvent("beforeshow")&&(n=void 0!==n?n:8,a||(e.Ya().style.visibility="hidden"),t.Pf(e.Ya(),!0),i.b(e.Ya(),n,s),a||(e.Ya().style.visibility="visible"),e.Wn(-1),e.Ji(!0))},ft=function(e,i){for(var n=e.i.Yt(),s=0;s<n.length;s++){var a=e.i.get(n[s]);if(a.Ed==i.currentTarget){n=e,(s=t.p(a.v6)?new q(a.Ed,a.v6,!0):new ut(i.clientX,i.clientY)).f&&s.f(5),gt(n,s,a.Qha,a.Qc),i.preventDefault(),i.stopPropagation();break}}},bt=function(){pt.call(this),this.K=!1,this.b=this.Aj=this.qL=null,this.na=!1,this.ba=t.Me("div",{id:"anychart-menu-wrapper"}),this.aa=function(t){return t},this.ea=function(){return{}},i(this,{}),this.Ha=(0,t.pa)(this.show,this),this.wa("action",(function(e){var i=e.target.dh;e={type:i.eventType||"action",event:e,target:this.qL,item:i},this.Aj&&(e.menuParent=this.Aj,t.D(this.Aj.getSelectedPoints)&&(e.selectedPoints=this.Aj.getSelectedPoints()||[])),t.D(i.action)&&i.action.call(e,e),i.eventType&&this.dispatchEvent(e)}))},vt=function(e,i,n){if(i={event:i,target:n,menu:e},e.Aj){if(null===(n=e.Aj.container()?e.Aj.container().getStage():null)||"none"==t.zf(n.domElement(),"border-style"))return!1;i.menuParent=e.Aj,i.chart=e.Aj,t.D(e.Aj.getSelectedPoints)&&(i.selectedPoints=e.Aj.getSelectedPoints()||[]),i=e.Aj.uO(i)}return n=t.Sl(e.ea.call(i,i)),i=e.aa.call(n,n,i),e.dh=i,e.na=!0,!t.Jc(i)},mt=function(e,i,n){var s,a=[];for(s in n){var o=n[s];n.hasOwnProperty(s)&&t.Ua(a,o,e.iha)}for(s=0;s<a.length;s++){if(null!=(n=a[s]))var r=t.z(n.classNames)?n.classNames.split(" "):n.classNames||[];o=t.qs(n.text)||"",n.text?n.subMenu?(o=new at(o,e.ba),r.length&&t.vD(o,r.join(" ")),t.da(n.enabled)&&o.Dj(n.enabled),mt(e,o,n.subMenu),yt(i,o),t.p(n.iconClass)&&St(o,n.iconClass)):(n.href&&(o=t.Me("A",{href:n.href,target:n.target||"_blank"},o),r.unshift("anychart-menuitem-link")),o=new b(o,n),r.length&&t.vD(o,r.join(" ")),t.da(n.enabled)&&o.Dj(n.enabled),t.da(n.scrollable)&&o.b(n.scrollable),yt(i,o),t.p(n.iconClass)&&St(o,n.iconClass)):yt(i,new U)}},yt=function(e,i){t.J(e,at)?e.QK(i):e.hc(i,!0)},St=function(e,i){var n=e.Ya();if(n){var s=t.Ae(window.document,"I",null,n)[0];i?s?(s.className=i,t.Pf(s,!0)):(s=t.Me("I",i),t.zy(s,"hidden",!0),t.We(n,s,0)):s&&t.Pf(s,!1)}},wt=function(t){A.call(this,t)},xt=function(){},Ct=function(e,i){if(e)for(var n,s=i?e.firstChild:e.lastChild;s&&s.parentNode==e&&(n=i?s.nextSibling:s.previousSibling,3==s.nodeType);){var a=s.nodeValue;if(""!=(0,t.vc)(a)){s.nodeValue=i?t.nc(a):a.replace(/[\s\xa0]+$/,"");break}e.removeChild(s),s=n}},Dt=function(){},Tt=function(){},kt=function(){},$t=function(e,i,n,s,a){t.ID.call(this,e,n||Dt.Id(),s),this.hn(64,!0),this.aa=new dt(null,9),i&&Ot(this,i),this.P=new l(500),!t.$D&&!t.aE||t.bd("533.17.9")||(this.tN=!0),this.Ha=a||A.Id()},Ot=function(e,i){var n=e.b;i!=n&&(n&&(e.Cl(!1),e.xf&&Lt(e,n,!1),delete e.b),e.xf&&t.zy(e.Ed,"haspopup",!!i),i&&(e.b=i,i.fl(e),i.Ji(!1),j(i,e.tN),e.xf&&Lt(e,i,!0)))},Pt=function(e){if(e.b.xf){var i=e.Ka||e.Ya(),n=e.aa;e.aa.element=i,i=e.b.Ya(),e.b.Oe()||(i.style.visibility="hidden",t.Pf(i,!0)),!e.ba&&e.aa.G&&32&e.aa.o&&(e.ba=t.Lf(i)),n.b(i,1^n.i,null,e.ba),e.b.Oe()||(t.Pf(i,!1),i.style.visibility="visible")}},Lt=function(e,i,n){var s=t.Dy(e);(n=n?s.wa:s.gc).call(s,i,"action",e.yga),n.call(s,i,"close",e.Yfa),n.call(s,i,"highlight",e.Zfa),n.call(s,i,"unhighlight",e.$fa)},Gt=function(e,i){var n=t.Dy(e);(i?n.wa:n.gc).call(n,e.Ya(),"keydown",e.vga)},Ft=function(e,i){var n=e.Ya(),s=i.getAttribute("aria-activedescendant");if(!(s=t.te(i).getElementById(null==s||null==s?"":String(s))||i).id){var a=t.Ay.Id();s.id=":"+(a.b++).toString(36)}h(n,s),t.zy(n,"owns",s.id)},It=function(t,e,i,n){$t.call(this,t,e,i||Tt.Id(),n)},Et=function(t,e,i,n){It.call(this,t,e,i||kt.Id(),n)},At=function(){},Ut=function(){},_t=function(t,e){E.call(this,t||Ut.Id(),e)},jt=function(){this.b="toolbar"},Mt=function(t,e,i){S.call(this,e,t||jt.Id(),i)},Nt=function(){Mt.call(this)},Bt=function(){},Rt=function(e,i,n){t.ID.call(this,e,i||Bt.Id(),n)},Ht=function(){Mt.call(this),this.ea="us-letter a0 a1 a2 a3 a4 a5 a6".split(" "),this.K="all",this.b=[],this.i=[],Vt(this),this.hc(new _t,!0),this.P=new M(void 0,wt.Id());var e=new b("SVG");t.vD(e,"anychart-toolbar-saveAsSvg"),e.dh={Wt:"saveAsSvg",icon:"ac-file-code-o",text:"SVG"},this.P.hc(e,!0),Wt(e,!0,!0),this.i.push(e),e=new b("PNG"),t.vD(e,"anychart-toolbar-saveAsPng"),e.dh={Wt:"saveAsPng",icon:"ac-file-image-o",text:"PNG"},this.P.hc(e,!0),Wt(e,!0,!0),this.i.push(e),e=new b("JPG"),t.vD(e,"anychart-toolbar-saveAsJpg"),e.dh={Wt:"saveAsJpg",icon:"ac-file-image-o",text:"JPG"},this.P.hc(e,!0),Wt(e,!0,!0),this.i.push(e),e=new at("PDF",void 0,!0),t.vD(e,"anychart-toolbar-saveAsPdf");for(var i=1;i<this.ea.length;i++){var n=this.ea[i],s=new b(n.toUpperCase());s.dh={Wt:"saveAsPdf",V_:[n]},t.vD(s,"anychart-toolbar-saveAsPdf"),e.QK(s)}this.P.hc(e,!0),e.dh={icon:"ac-file-pdf-o",text:"PDF"},Wt(e,!0,!0),this.i.push(e),e=Kt("saveAs"),i=new Et(e,this.P),t.vD(i,"anychart-toolbar-saveAs"),i.dh={id:"saveAs",text:e,icon:"ac-save"},this.hc(i,!0),this.b.push(i),this.hc(new _t,!0),e=Kt("zoomIn"),i=new Rt(e),t.vD(i,"anychart-toolbar-zoomIn"),i.dh={id:"zoomIn",Wt:"zoomIn",text:e,icon:"ac-zoom-in"},this.hc(i,!0),this.b.push(i),e=Kt("zoomOut"),i=new Rt(e),t.vD(i,"anychart-toolbar-zoomOut"),i.dh={id:"zoomOut",Wt:"zoomOut",text:e,icon:"ac-zoom-out"},this.hc(i,!0),this.b.push(i),e=Kt("fitAll"),i=new Rt(e),t.vD(i,"anychart-toolbar-fitAll"),i.dh={id:"fitAll",Wt:"fitAll",text:e,icon:"ac-dot-square-o"},this.hc(i,!0),this.b.push(i),this.hc(new _t,!0),e=Kt("expandAll"),i=new Rt(e),t.vD(i,"anychart-toolbar-expandAll"),i.dh={id:"expandAll",Wt:"expandAll",text:e,icon:"ac-expand"},this.hc(i,!0),this.b.push(i),e=Kt("collapseAll"),i=new Rt(e),t.vD(i,"anychart-toolbar-collapseAll"),i.dh={id:"collapseAll",Wt:"collapseAll",text:e,icon:"ac-collapse"},this.hc(i,!0),this.b.push(i),this.CO={xe:me,we:ve},this.aa=null,this.wa("action",this.cga)},zt=function(e,i,n,s,a){i=new at(i,void 0,!0);var o=(0,t.Wa)(n,(function(t){var e=t.value;return(t=new b(t.caption)).dh=e,t.hn(8,!0),t.rJ(e==a),t}));return(0,t.Pe)(o,i.QK,i),i.wa("action",(function(e){var i=e.target,n=i.vj();(0,t.Pe)(o,(function(t){t.rJ(t==i)})),s.call(this,n),e.stopPropagation()}),void 0,e),i},Vt=function(e){e.Xs=new M(void 0,wt.Id());var n=zt(e,Kt("changeLayout"),[{caption:Kt("landscape"),value:ve},{caption:Kt("portrait"),value:"portrait"}],(function(t){this.CO.we=t,this.Xs.Ji(!0,!0)}),ve),s=zt(e,Kt("changeRange"),[{caption:Kt("allDates"),value:"full"},{caption:Kt("visibleDates"),value:me}],(function(t){this.CO.xe=t,this.Xs.Ji(!0,!0)}),me);e.Xs.hc(n,!0),e.Xs.hc(s,!0),e.Xs.hc(new U,!0),n=Kt("print"),e.ba=new Et(n,e.Xs),t.vD(e.ba,"anychart-toolbar-print"),i(e.ba,{id:"print",text:n,icon:"ac-print"}),e.hc(e.ba,!0),e.b.push(e.ba)},qt=function(t){for(var e,i=0;i<t.b.length;i++)switch(e=t.b[i],t.K){case"all":Wt(e,!0,!0);break;case"icon":Wt(e,!0,!1);break;case"text":Wt(e,!1,!0)}for(i=0;i<t.i.length;i++)switch(e=t.i[i],t.K){case"text":Wt(e,!1,!0);break;case"all":case"icon":Wt(e,!0,!0)}},Wt=function(e,i,s){var a=e.Ya(),o=e.dh,r=o.icon,l=o.text,h=t.J(e,Et)||t.J(e,Rt);if(a){o=t.Ae(window.document,"I","anychart-toolbar-item-icon",a)[0];var c=t.Ae(window.document,"SPAN","anychart-toolbar-item-text",a)[0];o&&c||(o||(o=t.Me("I",["anychart-toolbar-item-icon",r]),t.zy(o,"hidden",!0)),c||(c=t.Me("SPAN","anychart-toolbar-item-text"),t.df(c,l||"")),h?(a=t.Me("DIV"),t.We(a,o,0),t.We(a,c,1),n(e,a)):(n(e,c),t.We(a,o,0))),t.da(s)&&t.Pf(c,s),t.da(i)&&t.Pf(o,i)}},Kt=function(e){return t.qs(be[e])},Yt=function(){t.By.call(this)},Xt=function(e,i){var n=e.f,s=i||e.Ya();t.Qj(s,"anychart-loader"),n=n.Ac("DIV","anychart-loader-rotating-cover",n.Ac("DIV","anychart-loader-rotating-plane",n.Ac("DIV","anychart-loader-chart-row",n.Ac("DIV",["anychart-loader-chart-col","anychart-loader-green"]),n.Ac("DIV",["anychart-loader-chart-col","anychart-loader-orange"]),n.Ac("DIV",["anychart-loader-chart-col","anychart-loader-red"])))),e.hj=!1,t.Pf(e.Ya(),e.hj),s.appendChild(n)},Jt=function(t){try{return"number"==typeof t.selectionStart}catch(e){return!1}},Zt=function(){t.By.call(this),this.b=null,this.QT="yyyy MMM dd",this.ba=null,this.na="From:",this.P=null,this.Ha="To:",this.Za=!1,this.Ka=this.Ba=window.NaN},Qt=function(e){e.i&&t.My(e.i,t.eq.format.dateTime(e.Ba,e.format())),e.K&&t.My(e.K,t.eq.format.dateTime(e.Ka,e.format()))},te=function(e){var i=e.f,n=e.Ya();t.Qj(n,"anychart-range-picker"),e.Za&&t.Qj(n,"anychart-range-picker-inside"),e.ba=i.Ac("LABEL",["anychart-inline-block","anychart-input-label"],t.eq.format.getMessage(e.na)),n.appendChild(e.ba),e.i=new t.Hy,e.hc(e.i,!0),t.Rj(e.i.Ya(),["anychart-label-input"]),e.P=i.Ac("LABEL",["anychart-inline-block","anychart-input-label"],t.eq.format.getMessage(e.Ha)),n.appendChild(e.P),e.K=new t.Hy,e.hc(e.K,!0),t.Rj(e.K.Ya(),["anychart-label-input"]),e.b&&e.ER(e.b.getSelectedRange())},ee=function(e){return e&&t.D(e.getType)&&"stock"==e.getType()},ie=function(e,i,n){t.LD.call(this,e,i,n),t.vD(this,"anychart-inline-block"),t.vD(this,"anychart-button-standard"),t.vD(this,xe),this.hn(16,!0),this.mv&=-17},ne=function(e){t.qf.call(this),this.Ub=[],se(this,e)},se=function(e,i){i&&((0,t.Pe)(i,(function(t){oe(this,t,!1)}),e),t.Ia(e.Ub,i))},ae=function(t,e){e!=t.CH&&(oe(t,t.CH,!1),t.CH=e,oe(t,e,!0)),t.dispatchEvent("select")},oe=function(t,e,i){e&&("function"==typeof t.LU?t.LU(e,i):"function"==typeof e.rJ&&e.rJ(i))},re=function(){t.By.call(this),this.b=null,this.aa=!1,this.K=null,this.P="Zoom:",this.jd=[],this.Yy([{type:"unit",unit:"Day",count:10,text:"10D"},{type:"unit",unit:"Month",count:1,text:"1M"},{type:"unit",unit:"Month",count:3,text:"3M"},{type:"ytd",text:"YTD"},{type:"unit",unit:"Year",count:1,text:"1Y"},{type:"unit",unit:"Year",count:2,text:"2Y"},{type:"unit",unit:"Year",count:5,text:"5Y"},{type:"max",text:"MAX"}]),this.i=new ne,this.i.LU=this.eda},le=function(e){var i=e.Ya();t.Qj(i,"anychart-range-selector"),e.aa&&t.Qj(i,"anychart-range-selector-inside"),e.K=t.Me("LABEL",["anychart-inline-block","anychart-input-label"],t.eq.format.getMessage(e.P)),i.appendChild(e.K)},he=function(e){return e&&t.D(e.getType)&&"stock"==e.getType()},ce=function(){t.By.call(this),this.b=null},ue=function(e){var i=e.Ya();t.Qj(i,"anychart-zoom"),e.i=new t.LD,e.i.dh={type:"fitAll"},t.JD(e.i,"Fit All"),t.vD(e.i,"anychart-zoom-zoomFitAll"),t.ND(e.i,"ac ac-dot-square-o disable-selection"),e.hc(e.i,!0),e.K=new t.LD,e.K.dh={type:"zoomIn"},t.JD(e.K,"Zoom In"),t.vD(e.K,"anychart-zoom-zoomIn"),t.ND(e.K,"ac ac-plus disable-selection"),e.hc(e.K,!0),e.P=new t.LD,e.P.dh={type:"zoomOut"},t.JD(e.P,"Zoom Out"),t.vD(e.P,"anychart-zoom-zoomOut"),t.ND(e.P,"ac ac-minus disable-selection"),e.hc(e.P,!0)},de=function(e){return e&&t.D(e.getType)&&"map"==e.getType()};t.dD.prototype.ew=t.ca(36,(function(e,i){var n=this.Gn(e);if(n&&(t.Ve(n),i))if(t.z(i))t.df(n,i);else{var s=function(e){if(e){var i=t.te(n);n.appendChild(t.z(e)?i.createTextNode(e):e)}};t.A(i)?(0,t.Pe)(i,s):!t.la(i)||"nodeType"in i?s(i):(0,t.Pe)(t.Ha(i),s)}})),t.dD.prototype.qH=t.ca(35,(function(e){if(!this.i){this.b||t.mD(this);var i,n=this.b,s={};for(i in n)s[n[i]]=i;this.i=s}return e=(0,window.parseInt)(this.i[e],10),(0,window.isNaN)(e)?0:e})),t.dD.prototype.Xk=t.ca(34,(function(i,n){n.id&&e(i,n.id);var s=this.Gn(n);s&&s.firstChild?function(t,e){t.Qd=e}(i,s.firstChild.nextSibling?t.Ha(s.childNodes):s.firstChild):i.Qd=null;var a=0,o=this.Hh(),r=this.Hh(),l=!1,h=!1,c=!1,u=t.Ha(t.Kj(n));(0,t.Pe)(u,(function(e){l||e!=o?h||e!=r?a|=this.qH(e):h=!0:(l=!0,r==o&&(h=!0)),1==this.qH(e)&&t.gf(s)&&t.jf(s)&&t.ff(s,!1)}),this),i.dc=a,l||(u.push(o),r==o&&(h=!0)),h||u.push(r);var d=i.Cs;if(d&&u.push.apply(u,d),t.hd&&!t.bd("7")){var p=t.eD(u);0<p.length&&(u.push.apply(u,p),c=!0)}return l&&h&&!d&&!c||(n.className=u.join(" ")),n})),t.nD.prototype.Xk=t.ca(33,(function(e,i){return i=t.nD.u.Xk.call(this,e,i),e.SX(this.vj(i)),e.gb=i.title,t.hD(e,16)&&this.Tu(i,16,t.iD(e,16)),i})),t.HD.prototype.Xk=t.ca(32,(function(e,i){if(t.uD(e,!1),e.mv&=-256,e.hn(32,!1),i.disabled){var n=this.$G(1);t.Qj(i,n)}return t.HD.u.Xk.call(this,e,i)})),t.dD.prototype.yH=t.ca(31,(function(){return!0})),t.HD.prototype.yH=t.ca(30,(function(t){return"BUTTON"==t.tagName||"INPUT"==t.tagName&&("button"==t.type||"submit"==t.type||"reset"==t.type)})),t.By.prototype.pl=t.ca(22,(function(t){this.Ed=t})),t.Hy.prototype.pl=t.ca(21,(function(e){t.Hy.u.pl.call(this,e),this.i||(this.i=e.getAttribute("label")||"");var i=t.te(e);try{var n=i&&i.activeElement,s=n&&n.nodeName?n:null}catch(a){s=null}s==e&&(this.GH=!0,e=this.Ya(),t.Sj(e,"label-input-label")),t.Jy()&&(this.Ya().placeholder=this.i),e=this.Ya(),t.zy(e,"label",this.i)})),t.sD.prototype.pl=t.ca(20,(function(e){this.Ed=e=this.i.Xk(this,e),t.gD(this.i,e,this.lH()),this.i.GU(e,!1),this.hj="none"!=e.style.display})),t.By.prototype.xH=t.ca(19,(function(){return!0})),t.sD.prototype.xH=t.ca(18,(function(t){return this.i.yH(t)})),t.By.prototype.Bs=t.ca(17,(function(e){if(this.xf)throw Error("Component already rendered");if(!e||!this.xH(e))throw Error("Invalid element to decorate");this.fb=!0;var i=t.te(e);this.f&&this.f.b==i||(this.f=t.ye(e)),this.pl(e),this.Gg()})),t.ux.prototype.uO=t.ca(16,(function(t){return t})),t.H(l,t.qf),t.g=l.prototype,t.g.enabled=!1,t.g.bw=null,t.g.ela=function(){if(this.enabled){var e=(0,t.Ln)()-this.o;0<e&&e<.8*this.f?this.bw=this.b.setTimeout(this.i,this.f-e):(this.bw&&(this.b.clearTimeout(this.bw),this.bw=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}},t.g.start=function(){this.enabled=!0,this.bw||(this.bw=this.b.setTimeout(this.i,this.f),this.o=(0,t.Ln)())},t.g.stop=function(){this.enabled=!1,this.bw&&(this.b.clearTimeout(this.bw),this.bw=null)},t.g.R=function(){l.u.R.call(this),this.stop(),delete this.b},t.H(c,t.dD),t.ja(c),t.g=c.prototype,t.g.zH=function(){return"menuitem"},t.g.Ac=function(e){var i=e.f.Ac("DIV",t.kD(this,e).join(" "),d(this,e.Qd,e.f));return g(this,e,i,t.hD(e,8)||t.hD(e,16)),i},t.g.Gn=function(t){return t&&t.firstChild},t.g.Xk=function(e,i){var n=t.$e(i),s=u(this,2);return n&&t.Lj(n,s)||i.appendChild(d(this,i.childNodes,e.f)),t.Lj(i,"anychart-option")&&(e.hn(16,!0),e&&i&&g(this,e,i,!0)),c.u.Xk.call(this,e,i)},t.g.ew=function(t,e){var i=this.Gn(t),n=p(this,t)?i.firstChild:null;c.u.ew.call(this,t,e),n&&!p(this,t)&&i.insertBefore(n,i.firstChild||null)},t.g.$G=function(t){switch(t){case 2:return u(this,0);case 16:case 8:return"anychart-option-selected";default:return c.u.$G.call(this,t)}},t.g.qH=function(t){var e=u(this,0);switch(t){case"anychart-option-selected":return 16;case e:return 2;default:return c.u.qH.call(this,t)}},t.g.Hh=function(){return"anychart-menuitem"},t.H(f,t.sD),t.g=f.prototype,t.g.vj=function(){var t=this.dh;return null!=t?t:this.AM()},t.g.hn=function(e,i){switch(f.u.hn.call(this,e,i),e){case 8:t.iD(this,16)&&!i&&t.CD(this,!1);var n=this.Ya();n&&this&&n&&g(this.i,this,n,i);break;case 16:(n=this.Ya())&&this&&n&&g(this.i,this,n,i)}},t.g.AM=function(){var e=this.Qd;return t.A(e)?(e=(0,t.Wa)(e,(function(e){return t.af(e)&&(t.Lj(e,"anychart-menuitem-accel")||t.Lj(e,"anychart-menuitem-mnemonic-separator"))?"":t.lf(e)})).join(""),t.lc(e)):f.u.AM.call(this)},t.g.tr=function(e){var i=this.getParent();if(i){var n=i.Ba;if(i.Ba=null,n&&t.ea(e.clientX)&&t.ib(n,new t.gb(e.clientX,e.clientY)))return}f.u.tr.call(this,e)},t.g.EA=function(t){return!(t.keyCode!=this.VN||!this.Vs(t))||f.u.EA.call(this,t)},t.g.Hfa=function(){return this.VN},t.qD("anychart-menuitem",(function(){return new f(null)})),f.prototype.lH=function(){return t.hD(this,16)?"menuitemcheckbox":t.hD(this,8)?"menuitemradio":f.u.lH.call(this)},f.prototype.getParent=function(){return t.sD.prototype.getParent.call(this)},f.prototype.Zi=function(){return t.sD.prototype.Zi.call(this)},t.H(b,f),b.prototype.b=function(e){return t.p(e)?(this.P=e,this):this.P},b.prototype.vE=function(e,i){this.b()&&t.p(this.getParent().Ka)?b.u.vE.call(this,this.getParent().P,i):b.u.vE.call(this,e,i)},t.ja(v),t.g=v.prototype,t.g.Ac=function(t){return t.f.Ac("DIV",function(t,e){var i=t.BD(),n=[i,e.vh==pe?i+"-horizontal":i+"-vertical"];return e.isEnabled()||n.push(i+"-disabled"),n}(this,t).join(" "))},t.g.DU=function(t){return"DIV"==t.tagName},t.g.bH=function(e){t:{for(var i=0,n=(e=t.Kj(e)).length;i<n;i++){var s=e[i];if(s=s in t.pD?t.pD[s]():null){e=s;break t}}e=null}return e},t.g.EU=function(e){e=e.Ya(),t.Sf(e,!0,t.gd),t.hd&&(e.hideFocus=!0);var i=this.b;i&&t.xy(e,i)},t.g.BD=function(){return"anychart-container"},t.g.R1=function(){return ge},t.H(S,t.By);var pe="horizontal",ge="vertical";t.g=S.prototype,t.g.NV=null,t.g.Zl=null,t.g.dw=null,t.g.vh=null,t.g.hj=!0,t.g.DA=!0,t.g.kD=!0,t.g.ul=-1,t.g.dm=null,t.g.vu=!1,t.g.tv=null,t.g.Ac=function(){this.Ed=this.dw.Ac(this)},t.g.AD=function(){return this.Ya()},t.g.xH=function(t){return this.dw.DU(t)},t.g.pl=function(i){this.Ed=function(i,n,s){s.id&&e(n,s.id);var a=i.BD(),o=!1,r=t.Kj(s);return r&&(0,t.Pe)(r,(function(t){t==a?o=!0:t&&(t==a+"-disabled"?n.Dj(!1):t==a+"-horizontal"?D(n,pe):t==a+"-vertical"&&D(n,ge))}),i),o||t.Qj(s,a),y(i,n,s),s}(this.dw,this,i),"none"==i.style.display&&(this.hj=!1)},t.g.Gg=function(){S.u.Gg.call(this),this.Pj((function(t){t.xf&&C(this,t)}),this);var e=this.Ya();this.dw.EU(this),this.Ji(this.hj,!0),t.Dy(this).wa(this,"enter",this.FH).wa(this,"highlight",this.Vfa).wa(this,"unhighlight",this.Wfa).wa(this,"open",this.Bga).wa(this,"close",this.Ufa).wa(e,t.xD.oF,this.Sj).wa(t.te(e),[t.xD.pF,t.xD.nF],this.nga).wa(e,[t.xD.oF,t.xD.pF,t.xD.nF,"mouseover","mouseout","contextmenu"],this.kga),this.kD&&x(this,!0)},t.g.Dh=function(){this.Wn(-1),this.dm&&this.dm.Cl(!1),this.vu=!1,S.u.Dh.call(this)},t.g.R=function(){S.u.R.call(this),this.Zl&&(this.Zl.ld(),this.Zl=null),this.dw=this.dm=this.tv=this.NV=null},t.g.FH=function(){return!0},t.g.Vfa=function(e){var i=this.Kf(e.target);if(-1<i&&i!=this.ul){var n=k(this);n&&n.rq(!1),this.ul=i,n=k(this),this.vu&&t.BD(n,!0),this.dm&&n!=this.dm&&(t.hD(n,64)?n.Cl(!0):this.dm.Cl(!1))}i=this.Ya(),null!=e.target.Ya()&&t.zy(i,"activedescendant",e.target.Ya().id)},t.g.Wfa=function(t){t.target==k(this)&&(this.ul=-1),this.Ya().removeAttribute("aria-activedescendant")},t.g.Bga=function(t){(t=t.target)&&t!=this.dm&&t.getParent()==this&&(this.dm&&this.dm.Cl(!1),this.dm=t)},t.g.Ufa=function(e){e.target==this.dm&&(this.dm=null);var i=this.Ya(),n=e.target.Ya();i&&t.iD(e.target,2)&&n&&h(i,n)},t.g.Sj=function(e){this.DA&&(this.vu=!0);var i=w(this);i&&t.gf(i)&&t.jf(i)?i.focus():e.preventDefault()},t.g.nga=function(){this.vu=!1},t.g.kga=function(e){t:{var i=e.target;if(this.tv)for(var n=this.Ya();i&&i!==n;){var s=i.id;if(s in this.tv){i=this.tv[s];break t}i=i.parentNode}i=null}if(i)switch(e.type){case t.xD.oF:i.Sj(e);break;case t.xD.pF:case t.xD.nF:i.tr(e);break;case"mouseover":i.po(e);break;case"mouseout":i.hg(e);break;case"contextmenu":i.BH(e)}},t.g.YM=function(){},t.g.XM=function(){this.Wn(-1),this.vu=!1,this.dm&&this.dm.Cl(!1)},t.g.oo=function(e){return!(!this.isEnabled()||!this.Oe()||0==t.Fy(this)&&!this.NV||!this.FU(e)||(e.preventDefault(),e.stopPropagation(),0))},t.g.FU=function(e){var i=k(this);if(i&&"function"==typeof i.oo&&i.oo(e)||this.dm&&this.dm!=i&&"function"==typeof this.dm.oo&&this.dm.oo(e))return!0;if(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)return!1;switch(e.keyCode){case 27:if(!this.kD)return!1;w(this).blur();break;case 36:$(this);break;case 35:!function(t){L(t,(function(t,e){return 0>--t?e-1:t}),0)}(this);break;case 38:if(this.vh!=ge)return!1;P(this);break;case 37:if(this.vh!=pe)return!1;t.Ey(this)?O(this):P(this);break;case 40:if(this.vh!=ge)return!1;O(this);break;case 39:if(this.vh!=pe)return!1;t.Ey(this)?P(this):O(this);break;default:return!1}return!0},t.g.hc=function(t,e){S.u.hc.call(this,t,e)},t.g.Eg=function(e,i,n){e.EJ|=2,e.EJ|=64,e.hn(32,!1),t.uD(e,!1);var s=e.getParent()==this?this.Kf(e):-1;S.u.Eg.call(this,e,i,n),e.xf&&this.xf&&C(this,e),-1==(e=s)&&(e=t.Fy(this)),e==this.ul?this.ul=Math.min(t.Fy(this)-1,i):e>this.ul&&i<=this.ul?this.ul++:e<this.ul&&i>this.ul&&this.ul--},t.g.removeChild=function(e,i){if(e=t.z(e)?t.Gy(this,e):e){var n=this.Kf(e);-1!=n&&(n==this.ul?(e.rq(!1),this.ul=-1):n<this.ul&&this.ul--),(n=e.Ya())&&n.id&&this.tv&&t.Lc(this.tv,n.id)}return e=S.u.removeChild.call(this,e,i),t.uD(e,!0),e},t.g.Oe=function(){return this.hj},t.g.Ji=function(e,i){if(i||this.hj!=e&&this.dispatchEvent(e?"show":"hide")){this.hj=e;var n=this.Ya();return n&&(t.Pf(n,e),this.kD&&m(w(this),this.DA&&this.hj),i||this.dispatchEvent(this.hj?"aftershow":"afterhide")),!0}return!1},t.g.isEnabled=function(){return this.DA},t.g.Dj=function(t){this.DA!=t&&this.dispatchEvent(t?"enable":"disable")&&(t?(this.DA=!0,this.Pj((function(t){t.e7?delete t.e7:t.Dj(!0)}))):(this.Pj((function(t){t.isEnabled()?t.Dj(!1):t.e7=!0})),this.vu=this.DA=!1),this.kD&&m(w(this),t&&this.hj))},t.g.Wn=function(t){(t=this.xd(t))?t.rq(!0):-1<this.ul&&k(this).rq(!1)},t.g.p0=function(e){return e.Oe()&&e.isEnabled()&&t.hD(e,2)},t.H(G,t.dD),t.ja(G),G.prototype.Hh=function(){return"anychart-menuheader"},t.H(F,t.sD),t.qD("anychart-menuheader",(function(){return new F(null)})),t.H(I,t.dD),t.ja(I),I.prototype.Ac=function(t){return t.f.Ac("DIV",this.Hh())},I.prototype.Xk=function(i,n){if(n.id&&e(i,n.id),"HR"==n.tagName){var s=n;n=this.Ac(i),s.parentNode&&s.parentNode.insertBefore(n,s),t.Xe(s)}else t.Qj(n,this.Hh());return n},I.prototype.ew=function(){},I.prototype.Hh=function(){return"anychart-menuseparator"},t.H(E,t.sD),E.prototype.Gg=function(){E.u.Gg.call(this);var e=this.Ya();t.xy(e,"separator")},t.qD("anychart-menuseparator",(function(){return new E})),t.H(A,v),t.ja(A),t.g=A.prototype,t.g.DU=function(t){return"UL"==t.tagName||A.u.DU.call(this,t)},t.g.bH=function(t){return"HR"==t.tagName?new E:A.u.bH.call(this,t)},t.g.cr=function(e,i){return t.cf(e.Ya(),i)},t.g.BD=function(){return"anychart-menu"},t.g.EU=function(e){A.u.EU.call(this,e),e=e.Ya(),t.zy(e,"haspopup","true")},t.H(U,E),t.qD("anychart-menuseparator",(function(){return new E})),t.H(_,S),t.g=_.prototype,t.g.CF=!0,t.g.cr=function(e){if(this.dw.cr(this,e))return!0;for(var i=0,n=t.Fy(this);i<n;i++){var s=this.xd(i);if("function"==typeof s.cr&&s.cr(e))return!0}return!1},t.g.QK=function(t){this.hc(t,!0)},t.g.py=function(t){return this.xd(t)},t.g.zm=function(){var t=[];return this.Pj((function(e){t.push(e)})),t},t.g.setPosition=function(e,i){var n=this.Oe();n||t.Pf(this.Ya(),!0);var s=this.Ya(),a=e,o=i,r=t.Ff(s);a instanceof t.gb&&(o=a.y,a=a.x),t.Cf(s,s.offsetLeft+(a-r.x),s.offsetTop+(Number(o)-r.y)),n||t.Pf(this.Ya(),!1)},t.g.Ji=function(e,i,n){return(i=_.u.Ji.call(this,e,i))&&e&&this.xf&&this.CF&&w(this).focus(),e&&n&&t.ea(n.clientX)?this.Ba=new t.gb(n.clientX,n.clientY):this.Ba=null,i},t.g.FH=function(t){return this.CF&&w(this).focus(),_.u.FH.call(this,t)},t.g.p0=function(e){return e.isEnabled()&&e.Oe()&&t.hD(e,2)},t.g.pl=function(e){for(var i=this.dw,n=t.Ae(this.f.b,"DIV",i.BD()+"-content",e),s=n.length,a=0;a<s;a++)y(i,this,n[a]);_.u.pl.call(this,e)},t.g.FU=function(t){var e=_.u.FU.call(this,t);return e||this.Pj((function(i){!e&&i.Hfa&&i.VN==t.keyCode&&(this.isEnabled()&&this.Wn(this.Kf(i)),e=i.oo(t))}),this),e},t.g.Wn=function(t){_.u.Wn.call(this,t),(t=this.xd(t))&&r(t.Ya(),this.Ya())},t.H(M,_),M.prototype.FH=function(){if(this.CF){var t=w(this);0!=t.offsetWidth&&t.focus()}return!0},M.prototype.Ka=function(){return this.P},M.prototype.Ac=function(){M.u.Ac.call(this),this.P=this.f.Ac("DIV","anychart-menu-scrollable"),t.We(this.Ya(),this.P,0)},M.prototype.Wn=function(t){M.u.Wn.call(this,t),(t=this.xd(t))&&r(t.Ya(),this.P)},z.prototype.b=function(){},t.H(V,z),V.prototype.b=function(t,e,i){N(this.element,this.i,t,e,void 0,i,this.K)},t.H(q,V),q.prototype.G=function(){return this.o},q.prototype.f=function(t){this.o=t},q.prototype.b=function(t,e,i,n){var s=N(this.element,this.i,t,e,null,i,10,n,this.D);if(496&s){var a=W(s,this.i);e=W(s,e),496&(s=N(this.element,a,t,e,null,i,10,n,this.D))&&(a=W(s,a),e=W(s,e),N(this.element,a,t,e,null,i,this.o,n,this.D))}},t.H(K,c),t.ja(K),K.prototype.Ac=function(e){var i=K.u.Ac.call(this,e);return t.Qj(i,"anychart-submenu"),Y(this,e,i),i},K.prototype.Xk=function(e,i){i=K.u.Xk.call(this,e,i),t.Qj(i,"anychart-submenu"),Y(this,e,i);var n=t.Ae(window.document,"DIV","anychart-menu",i);if(n.length){var s=new _(e.f);n=n[0],t.Pf(n,!1),e.f.b.body.appendChild(n),s.Bs(n),it(e,s)}return i},K.prototype.ew=function(e,i){var n=this.Gn(e),s=n&&n.lastChild;K.u.ew.call(this,e,i),s&&n.lastChild!=s&&t.Lj(s,"anychart-submenu-arrow")&&n.appendChild(s)},K.prototype.CD=function(e){K.u.CD.call(this,e);var i=e.AD(),n=t.Ae(e.f.b,"SPAN","anychart-submenu-arrow",i)[0];X(e,n),n!=i.lastChild&&i.appendChild(n),e=e.Ya(),t.zy(e,"haspopup","true")},t.H(J,f),t.g=J.prototype,t.g.DH=null,t.g.OU=null,t.g.MU=!1,t.g.Wl=null,t.g.$M=!1,t.g.Gg=function(){J.u.Gg.call(this),t.Dy(this).wa(this.getParent(),"hide",this.A2),this.Wl&&tt(this,this.Wl,!0)},t.g.Dh=function(){t.Dy(this).gc(this.getParent(),"hide",this.A2),this.Wl&&(tt(this,this.Wl,!1),this.$M||(this.Wl.Dh(),t.Xe(this.Wl.Ya()))),J.u.Dh.call(this)},t.g.R=function(){this.Wl&&!this.$M&&this.Wl.ld(),this.Wl=null,J.u.R.call(this)},t.g.rq=function(e){J.u.rq.call(this,e),e||(this.DH&&t.Ej(this.DH),this.DH=t.Dj(this.Pl,218,this))},t.g.NU=function(){var t=this.getParent();t&&k(t)==this&&(Q(this,!0),Z(this))},t.g.Pl=function(){var t=this.Wl;t&&t.getParent()==this&&(Q(this,!1),t.Pj((function(t){"function"==typeof t.Pl&&t.Pl()})))},t.g.Vp=function(){this.DH&&t.Ej(this.DH),this.OU&&t.Ej(this.OU)},t.g.Ji=function(t,e){var i=J.u.Ji.call(this,t,e);return i&&!this.Oe()&&this.Pl(),i},t.g.oo=function(e){var i=e.keyCode,n=t.Ey(this)?37:39,s=t.Ey(this)?39:37;if(this.MU){if(!et(this).oo(e)){if(i!=s)return!1;this.Pl()}}else{if(!this.isEnabled()||i!=n&&i!=this.VN)return!1;this.NU(),$(et(this)),this.Vp()}return e.preventDefault(),!0},t.g.aga=function(){if(this.Wl.getParent()==this){this.Vp();var t=this.Zi();t.Wn(t.Kf(this)),Z(this)}},t.g.A2=function(t){t.target==this.Zi()&&(this.Pl(),this.Vp())},t.g.po=function(e){this.isEnabled()&&(this.Vp(),this.OU=t.Dj(this.NU,218,this)),J.u.po.call(this,e)},t.g.Vs=function(e){return this.Vp(),t.hD(this,8)||t.hD(this,16)?J.u.Vs.call(this,e):(this.NU(),!0)},t.g.py=function(t){return et(this).xd(t)},t.g.zm=function(){return et(this).zm()},t.g.cr=function(t){return et(this).cr(t)},t.qD("anychart-submenu",(function(){return new J(null)})),t.H(nt,c),t.ja(nt),t.g=nt.prototype,t.g.Ac=function(e){var i=nt.u.Ac.call(this,e);return t.Qj(i,"anychart-submenu"),st(this,e,i),i},t.g.Xk=function(e,i){i=nt.u.Xk.call(this,e,i),t.Qj(i,"anychart-submenu"),st(this,e,i);var n=t.Ae(window.document,"div","anychart-menu",i);if(n.length){var s=new M(e.f);n=n[0],t.Pf(n,!1),e.f.b.body.appendChild(n),s.Bs(n),it(e,s)}return i},t.g.ew=function(e,i){var n=this.Gn(e),s=n&&n.lastChild;nt.u.ew.call(this,e,i),s&&n.lastChild!=s&&t.Lj(s,"anychart-submenu-arrow")&&n.appendChild(s)},t.g.CD=function(e){nt.u.CD.call(this,e);var i=e.AD(),n=t.Ae(e.f.b,"span","anychart-submenu-arrow",i)[0];n.innerHTML="&nbsp;",n!=i.lastChild&&i.appendChild(n),e=e.Ya(),t.zy(e,"haspopup","true")},t.g.Gn=function(t){return"I"==(t=t&&t.firstChild).tagName?t.nextSibling:t},t.H(at,f),t.g=at.prototype,t.g.QF=null,t.g.HR=null,t.g.FR=!1,t.g.Kl=null,t.g.RK=!1,t.g.Gg=function(){at.u.Gg.call(this),t.Dy(this).wa(this.getParent(),"hide",this.N_),this.Kl&&lt(this,this.Kl,!0)},t.g.Dh=function(){t.Dy(this).gc(this.getParent(),"hide",this.N_),this.Kl&&(lt(this,this.Kl,!1),this.RK||(this.Kl.Dh(),t.Xe(this.Kl.Ya()))),at.u.Dh.call(this)},t.g.R=function(){this.b=null,this.Kl&&!this.RK&&this.Kl.ld(),this.Kl=null,at.u.R.call(this)},t.g.rq=function(e){at.u.rq.call(this,e),e||(this.QF&&t.Ej(this.QF),this.QF=t.Dj(this.Pl,218,this))},t.g.GR=function(){var t=this.getParent();t&&k(t)==this&&(rt(this,!0),ot(this))},t.g.Pl=function(){var t=this.Kl;t&&t.getParent()==this&&(rt(this,!1),t.Pj((function(t){"function"==typeof t.Pl&&t.Pl()})))},t.g.Vp=function(){this.QF&&t.Ej(this.QF),this.HR&&t.Ej(this.HR)},t.g.Ji=function(t,e){var i=at.u.Ji.call(this,t,e);return i&&!this.Oe()&&this.Pl(),i},t.g.oo=function(e){var i=e.keyCode,n=t.Ey(this)?37:39,s=t.Ey(this)?39:37;if(this.FR){if(!ht(this).oo(e)){if(i!=s)return!1;this.Pl()}}else{if(!this.isEnabled()||i!=n&&i!=this.VN)return!1;this.GR(),$(ht(this)),this.Vp()}return e.preventDefault(),!0},t.g.hda=function(){if(this.Kl.getParent()==this){this.Vp();var t=this.Zi();t.Wn(t.Kf(this)),ot(this)}},t.g.N_=function(t){t.target==this.Zi()&&(this.Pl(),this.Vp())},t.g.po=function(e){this.isEnabled()&&(this.Vp(),this.HR=t.Dj(this.GR,218,this)),at.u.po.call(this,e)},t.g.Vs=function(e){return this.Vp(),t.hD(this,8)||t.hD(this,16)?at.u.Vs.call(this,e):(this.GR(),!0)},t.g.QK=function(t){ht(this).hc(t,!0)},t.g.py=function(t){return ht(this).xd(t)},t.g.cr=function(t){return ht(this).cr(t)},t.H(ct,z),ct.prototype.b=function(e,i,n,s){var a=t.te(e),o=a.body;a=a.documentElement,a=new t.gb(o.scrollLeft||a.scrollLeft,o.scrollTop||a.scrollTop),o=this.i.x+a.x,a=this.i.y+a.y;var r=B(e);o-=r.x,a-=r.y,R(new t.gb(o,a),e,i,n,null,null,s)},t.H(ut,ct),ut.prototype.o=0,ut.prototype.f=function(t){this.o=t},ut.prototype.b=function(e,i,n,s){var a=t.Df(e);a=o(a);var r=t.Fe(t.ye(e).b);r=new t.gb(this.i.x+r.scrollLeft,this.i.y+r.scrollTop);var l=i,h=R(r,e,l,n,a,10,s);0!=(496&h)&&((16&h||32&h)&&(l^=4),(64&h||128&h)&&(l^=1),0!=(496&(h=R(r,e,l,n,a,10,s)))&&R(r,e,i,n,a,this.o,s))},t.H(dt,q),t.H(pt,_),t.g=pt.prototype,t.g.pl=function(t){pt.u.pl.call(this,t),(t=t.getAttribute("for")||t.htmlFor)&&this.JU(this.f.Ya(t),1)},t.g.Gg=function(){pt.u.Gg.call(this),this.i.forEach(this.Z_,this);var e=t.Dy(this);e.wa(this,"action",this.Dia),e.wa(this.f.b,"mousedown",this.Qia,!0)},t.g.JU=function(e,i,n,s,a){var o;(o=!e)||(o=t.oa(e),o=!t.$B(this.i.f,o)),o&&(e?(i={Ed:e,v6:i,Qha:n,xT:s?"contextmenu":"mousedown",Qc:a},this.i.set(t.oa(e),i)):i=null,this.xf&&this.Z_(i),e=t.qa(this.Wia,e),this.Ya()&&t.Dy(this).wa(this.Ya(),"keydown",e))},t.g.Wia=function(e,i){if(27==i.keyCode)e.focus();else{var n=this.xd(this.ul);if(n){n=n.Ya();var s=new t.Bd(i.kf,n);s.target=n,32!=i.keyCode&&13!=i.keyCode||(t.Ed(n)?t.sf(n,"keydown",!1,s):t.ee(n,"keydown",!1,s)),32==i.keyCode&&this.Lc()}}},t.g.Z_=function(e){t.Dy(this).wa(e.Ed,e.xT,this.z4),"contextmenu"!=e.xT&&t.Dy(this).wa(e.Ed,"keydown",this.mja)},t.g.KU=function(e){var i;if((i=!e)||(i=t.oa(e),i=!t.$B(this.i.f,i)),i)throw Error("Menu not attached to provided element, unable to detach.");e=t.oa(e),this.xf&&(i=this.i.get(e),t.Dy(this).gc(i.Ed,i.xT,this.z4)),this.i.remove(e)},t.g.Lc=function(){this.Oe()&&(this.Ji(!1),this.Oe()||(0,t.Ln)())},t.g.Dia=function(){this.Lc()},t.g.z4=function(t){ft(this,t)},t.g.mja=function(t){32!=t.keyCode&&13!=t.keyCode&&40!=t.keyCode||ft(this,t),40==t.keyCode&&$(this)},t.g.Qia=function(t){this.Oe()&&!this.cr(t.target)&&this.Lc()},t.g.XM=function(t){pt.u.XM.call(this,t),this.Lc()},t.g.R=function(){pt.u.R.call(this),this.i&&(this.i.clear(),delete this.i)},t.H(bt,pt),t.g=bt.prototype,t.g.FH=function(){if(this.CF){var t=w(this);0!=t.offsetWidth&&t.focus()}return!0},t.g.mM=!0,t.g.enabled=function(e){return t.p(e)?(this.mM!=e&&(this.mM=e),this):this.mM},t.g.M_=function(e){e&&(this.b?t.Aa(this.b,e)||this.b.push(e):this.b=[e]),this.Ya()&&this.b&&this.b.length&&t.Rj(this.Ya(),this.b)},t.g.ada=function(e){e&&this.b&&t.Fa(this.b,e)&&(this.Ya()&&t.Sj(this.Ya(),e),this.b.length||(this.b=null))},t.g.items=function(t){return null!=t?(this.s3((function(){return t})),t.length||this.Lc(),this.dh=t,this):this.dh},t.g.s3=function(e){return t.D(e)?(this.ea!=e&&(this.ea=e,this.na=!1),this):this.ea},t.g.$ca=function(e){return t.p(e)?(this.aa!=e&&(this.aa=e),this):this.aa},t.g.EH=function(e){this.mM&&(this.pa&&this.pa.Ua().Lc(),this.qL=e.target,vt(this,e,this.qL),t.C(this.items())&&!t.Jc(this.items())&&(t.D(e.getOriginalEvent)?e.getOriginalEvent().preventDefault():e.preventDefault(),this.Aj&&t.D(this.Aj.getType)&&"map"==this.Aj.getType()?(0,window.setTimeout)(this.Ha,0,e.clientX,e.clientY):this.show(e.clientX,e.clientY)))},t.g.Sd=function(e){bt.u.Sd.call(this,e),this.b&&this.b.length&&t.Rj(this.Ya(),this.b)},t.g.JU=function(e,i){return e&&!this.K&&(this.K=!0,t.C(e)&&t.D(e.listen)?(this.Aj=e,this.Aj.listen("contextmenu",this.EH,i,this)):t.Dy(this).wa(e,"contextmenu",this.EH,i)),this},t.g.KU=function(e,i){return this.K&&(null!=this.Aj&&t.D(this.Aj.unlisten)?this.K=!this.Aj.unlisten("contextmenu",this.EH,i,this):t.be(e,"contextmenu",this.EH,i,this)&&(t.Dy(this).gc(e,"contextmenu",this.EH,i),this.K=!1),this.K||this.Lc()),this},t.g.show=function(e,i){if(this.na&&!t.Jc(this.items())||vt(this,null,this.Aj)){var n=this.Aj?this.Aj.O().Ja():null;for(n=n&&n.fullScreen()?n.Tl():t.Lp.body,this.ba.parentNode!=n&&n.appendChild(this.ba),this.xf||this.Sd(this.ba);this.o&&0!=this.o.length;)n=this.xd(0),this.removeChild(n),n.ld();mt(this,this,this.items()),(n=new ut(e,i)).f(197),gt(this,n)}},t.g.iha=function(e,i){return t.ea(e.index)?t.ea(i.index)?e.index-i.index||1:-1:1},t.g.R=function(){null!=this.Aj&&this.KU(),this.ba=this.b=this.Aj=this.qL=null,bt.u.R.call(this)},t.g.F=function(){var e={};return e.enabled=this.enabled(),this.b&&(e.extraClassNames=t.Ha(this.b)),e},t.g.N=function(e){return t.p(e)&&!this.Ie(e)&&t.C(e)&&this.U(e),this},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t){return!!(t=this.Zd(t))&&(this.enabled(t.enabled),!0)},t.g.U=function(t){if(this.enabled(!("enabled"in t)||t.enabled),t=t.extraClassNames)for(var e=0,i=t.length;e<i;e++)this.M_(t[e])};var fe=bt.prototype;t.E("anychart.ui.contextMenu",(function(){return new bt})),fe.serialize=fe.F,fe.setup=fe.N,fe.enabled=fe.enabled,fe.addClassName=fe.M_,fe.removeClassName=fe.ada,fe.attach=fe.JU,fe.detach=fe.KU,fe.listen=fe.wa,fe.unlisten=fe.gc,fe.show=fe.show,fe.hide=fe.Lc,fe.items=fe.items,fe.itemsProvider=fe.s3,fe.itemsFormatter=fe.$ca,t.H(wt,A),t.ja(wt),wt.prototype.BD=function(){return"anychart-toolbar-menu"},t.H(xt,t.nD),t.ja(xt),t.g=xt.prototype,t.g.Ac=function(e){var i=t.kD(this,e);return i=e.f.Ac("DIV","anychart-inline-block "+i.join(" "),this.sL(e.Qd,e.f)),t.oD(i,e.gb),i},t.g.zH=function(){return"button"},t.g.Gn=function(t){return t&&t.firstChild&&t.firstChild.firstChild},t.g.sL=function(t,e){return e.Ac("DIV","anychart-inline-block "+this.Hh()+"-outer-box",e.Ac("DIV","anychart-inline-block "+this.Hh()+"-inner-box",t))},t.g.yH=function(t){return"DIV"==t.tagName},t.g.Xk=function(e,i){Ct(i,!0),Ct(i,!1);var n=e.f.W1(i),s=this.Hh()+"-outer-box";return(n=!!(n&&t.Lj(n,s)&&(n=e.f.W1(n),s=this.Hh()+"-inner-box",n&&t.Lj(n,s))))||i.appendChild(this.sL(i.childNodes,e.f)),t.Rj(i,["anychart-inline-block",this.Hh()]),xt.u.Xk.call(this,e,i)},t.g.Hh=function(){return"anychart-custom-button"},t.H(Dt,xt),t.ja(Dt),t.g=Dt.prototype,t.g.Gn=function(t){return Dt.u.Gn.call(this,t&&t.firstChild)},t.g.Xk=function(e,i){var n=t.Ae(window.document,"*","anychart-menu",i)[0];if(n){t.Pf(n,!1),t.te(n).body.appendChild(n);var s=new _;s.Bs(n),Ot(e,s)}return Dt.u.Xk.call(this,e,i)},t.g.sL=function(t,e){return Dt.u.sL.call(this,[e.Ac("DIV","anychart-inline-block "+this.Hh()+"-caption",t),this.G0(e)],e)},t.g.G0=function(t){return t.Ac("DIV","anychart-inline-block "+this.Hh()+"-dropdown"," ")},t.g.Hh=function(){return"anychart-menu-button"},t.H(Tt,Dt),t.ja(Tt),Tt.prototype.Hh=function(){return"anychart-toolbar-menu-button"},t.H(kt,Tt),t.ja(kt),kt.prototype.G0=function(t){return(t=t.Ac("DIV","anychart-inline-block "+this.Hh()+"-dropdown")).innerHTML="&nbsp;",t},t.H($t,t.ID),t.g=$t.prototype,t.g.tN=!1,t.g.Gg=function(){$t.u.Gg.call(this),Gt(this,!0),this.b&&Lt(this,this.b,!0),t.zy(this.Ed,"haspopup",!!this.b)},t.g.Dh=function(){if($t.u.Dh.call(this),Gt(this,!1),this.b){this.Cl(!1),this.b.Dh(),Lt(this,this.b,!1);var e=this.b.Ya();e&&t.Xe(e)}},t.g.R=function(){$t.u.R.call(this),this.b&&(this.b.ld(),delete this.b),delete this.Ka,this.P.ld()},t.g.Sj=function(e){$t.u.Sj.call(this,e),this.uq()&&(this.Cl(!t.iD(this,64),e),this.b&&(this.b.vu=t.iD(this,64)))},t.g.tr=function(t){$t.u.tr.call(this,t),this.b&&!this.uq()&&(this.b.vu=!1)},t.g.Vs=function(){return t.BD(this,!1),!0},t.g.mga=function(t){this.b&&this.b.Oe()&&!this.cr(t.target)&&this.Cl(!1)},t.g.cr=function(e){return e&&t.cf(this.Ya(),e)||this.b&&this.b.cr(e)||!1},t.g.EA=function(t){if(32==t.keyCode){if(t.preventDefault(),"keyup"!=t.type)return!0}else if("key"!=t.type)return!1;if(this.b&&this.b.Oe()){var e=13==t.keyCode||32==t.keyCode,i=this.b.oo(t);return 27==t.keyCode||e?(this.Cl(!1),!0):i}return(40==t.keyCode||38==t.keyCode||32==t.keyCode||13==t.keyCode)&&(this.Cl(!0,t),!0)},t.g.yga=function(){this.Cl(!1)},t.g.zga=function(){this.uq()||this.Cl(!1)},t.g.ZM=function(t){this.tN||this.Cl(!1),$t.u.ZM.call(this,t)},t.g.py=function(t){return this.b?this.b.xd(t):null},t.g.Ji=function(t,e){var i=$t.u.Ji.call(this,t,e);return i&&!this.Oe()&&this.Cl(!1),i},t.g.Dj=function(t){$t.u.Dj.call(this,t),this.isEnabled()||this.Cl(!1)},t.g.Cl=function(e,i){if($t.u.Cl.call(this,e),this.b&&t.iD(this,64)==e){if(e)this.b.xf||this.b.Sd(),this.Ba=o(this.Ya()),this.ea=t.Of(this.Ya()),Pt(this),!i||40!=i.keyCode&&38!=i.keyCode?this.b.Wn(-1):$(this.b);else{t.BD(this,!1),this.b.vu=!1;var n=this.Ya();n&&(t.zy(n,"activedescendant",""),t.zy(n,"owns","")),null!=this.ba&&(this.ba=void 0,(n=this.b.Ya())&&t.If(n,"",""))}if(this.b.Ji(e,!1,i),!this.md){n=t.Dy(this);var s=e?n.wa:n.gc;s.call(n,this.f.b,"mousedown",this.mga,!0),this.tN&&s.call(n,this.b,"blur",this.zga),s.call(n,this.P,"tick",this.nja),e?this.P.start():this.P.stop()}}this.b&&this.b.Ya()&&this.b.Ed.removeAttribute("aria-hidden")},t.g.nja=function(){var e,i=t.Of(this.Ya()),n=o(this.Ya());(e=!t.nb(this.ea,i))||(e=!((e=this.Ba)==n||e&&n&&e.top==n.top&&e.right==n.right&&e.bottom==n.bottom&&e.left==n.left)),e&&(this.ea=i,this.Ba=n,Pt(this))},t.g.Zfa=function(t){(t=t.target.Ya())&&Ft(this,t)},t.g.vga=function(e){t.hD(this,32)&&this.Ya()&&this.b&&this.b.Oe()&&e.stopPropagation()},t.g.$fa=function(){if(!k(this.b)){var e=this.Ya();t.zy(e,"activedescendant",""),t.zy(e,"owns","")}},t.g.Yfa=function(e){if(t.iD(this,64)&&e.target instanceof f){var i=(e=e.target).Ya();e.Oe()&&t.iD(e,2)&&null!=i&&Ft(this,i)}},t.qD("anychart-menu-button",(function(){return new $t(null)})),t.H(It,$t),t.qD("anychart-toolbar-menu-button",(function(){return new It(null)})),t.H(Et,It),Et.prototype.EA=function(t){if(32==t.keyCode){if(t.preventDefault(),"keyup"!=t.type)return!0}else if("key"!=t.type)return!1;var e;return this.b||Ot(this,new _(this.f,this.Ha)),(e=this.b||null)&&e.Oe()?e.oo(t):(40==t.keyCode||38==t.keyCode||32==t.keyCode||13==t.keyCode)&&(this.Cl(!0,t),!0)},t.H(At,I),t.ja(At),At.prototype.Ac=function(e){return e.f.Ac("DIV",t.kD(this,e).join(" ")+" anychart-inline-block"," ")},At.prototype.Xk=function(e,i){return i=At.u.Xk.call(this,e,i),t.Qj(i,"anychart-inline-block"),i},At.prototype.Hh=function(){return"anychart-toolbar-separator"},t.H(Ut,At),t.ja(Ut),Ut.prototype.Ac=function(e){return(e=e.f.Ac("DIV",t.kD(this,e).join(" ")+" anychart-inline-block")).innerHTML="&nbsp;",e},t.H(_t,E),t.H(jt,v),t.ja(jt),jt.prototype.bH=function(t){return"HR"==t.tagName?new E(At.Id()):jt.u.bH.call(this,t)},jt.prototype.BD=function(){return"anychart-toolbar"},jt.prototype.R1=function(){return pe},t.H(Mt,S),Mt.prototype.YM=function(t){Mt.u.YM.call(this,t),this.vu||$(this)},t.H(Nt,Mt),Nt.prototype.O=function(e){return t.p(e)?(e=t.ze(window.document,e),this.Jc!=e&&(this.Dh(),this.Jc=e,this.W()),this):this.Jc},Nt.prototype.target=function(e){return t.p(e)?(this.na=e,this):this.na},Nt.prototype.W=function(){if(this.Jc)if(this.Jc.firstChild){var e=this.Jc.firstChild;this.vE(e.parentNode,e)}else this.Sd(this.Jc);else t.kl(13);return this},t.H(Bt,xt),t.ja(Bt),Bt.prototype.Hh=function(){return"anychart-toolbar-button"},t.H(Rt,t.ID),t.qD("anychart-toolbar-button",(function(){return new Rt(null)})),t.H(Ht,Nt);var be={print:"Print",changeLayout:"Layout",changeRange:"Range",allDates:"All dates",visibleDates:"Visible dates",portrait:"Portrait",landscape:"Landscape",saveAs:"Save As",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitAll:"Fit All",expandAll:"Expand All",collapseAll:"Collapse All"},ve="landscape",me="visible";t.g=Ht.prototype,t.g.Cda=function(e){return t.p(e)?(e!=this.K&&(this.K=e,qt(this)),this):this.K},t.g.cga=function(e){var i=(e=e.target.dh).Wt,n=e&&e.V_||[];if(e=this.target(),"print"==i)if(i=this.CO.xe,n=[n[0],"landscape"==this.CO.we],t.D(this.aa))n.push(i),this.aa.apply(null,t.Ga([e],n));else if(e){var s=e.print;if(t.D(s)){var a=e.wf().scale().sj();"full"==i&&e.Qm(),s.apply(e,n),e.kj(a.min,a.max)}else t.kl(14,null,["print"])}else t.kl(15);else e?(s=e[i],t.D(s)?s.apply(e,n):t.kl(14,null,[i])):t.kl(15)},t.g.R4=function(e){if(t.p(e)){for(this.ea=e;3<t.Fy(this.Xs);)this.Xs.Cj(3,!0);return this.Dh(),this.W(),this}return this.ea},t.g.W=function(){if(qt(this),!this.xf){for(var e=this.R4(),i=0;i<e.length;i++){var n=e[i],s=new b("us-letter"==n?"US Letter":t.zc(n));s.dh={Wt:"print",V_:[n]},t.vD(s,"anychart-toolbar-print-"+n),this.Xs.hc(s,!0)}return Ht.u.W.call(this)}return this},t.g.Oja=function(e){return t.p(e)?(this.aa=e,this):this.aa},t.g.vla=function(){for(var t=this.b,e=0;e<t.length;e++){var i=t[e],s=i.dh,a=Kt(s.id);a&&(n(i,a),s.text=a)}return i=this.Xs.xd(0),t=this.Xs.xd(1),n(i,Kt("changeLayout")),n(t,Kt("changeRange")),e=i.py(0),i=i.py(1),n(e,Kt("landscape")),n(i,Kt("portrait")),e=t.py(0),t=t.py(1),n(e,Kt("allDates")),n(t,Kt("visibleDates")),qt(this),this},t.E("anychart.ui.ganttToolbar",(function(){return new Ht}));var ye=Ht.prototype;ye.draw=ye.W,ye.printPaperSizes=ye.R4,ye.container=ye.O,ye.target=ye.target,ye.buttonsMode=ye.Cda,ye.printFunction=ye.Oja,ye.updateLocalizedCaptions=ye.vla,t.H(Yt,t.By),t.g=Yt.prototype,t.g.hj=!1,t.g.visible=function(e){return t.p(e)?(e==this.hj||(e?(this.xf||this.Sd(),this.hj=!0):this.hj=!1,t.Pf(this.Ya(),this.hj)),this):this.hj},t.g.Ac=function(){Yt.u.Ac.call(this),Xt(this)},t.g.pl=function(t){Yt.u.pl.call(this,t),Xt(this,t)},t.g.Gg=function(){Yt.u.Gg.call(this)},t.g.Dh=function(){Yt.u.Dh.call(this)},t.g.R=function(){Yt.u.R.call(this)};var Se=Yt.prototype;t.E("anychart.ui.preloader",(function(){return new Yt})),Se.render=Se.Sd,Se.decorate=Se.Bs,Se.visible=Se.visible,t.H(Zt,t.By),t.g=Zt.prototype,t.g.target=function(t){this.b=t},t.g.ER=function(t){this.Ba=t.firstVisible,this.Ka=t.lastVisible,Qt(this)},t.g.format=function(e){return t.p(e)&&(this.QT=e,Qt(this)),this.QT||t.eq.format.outputDateTimeFormat()},t.g.Ac=function(){Zt.u.Ac.call(this),te(this)},t.g.bda=function(t){this.Sd(t)},t.g.pl=function(t){ee(t)?this.Sd(t):(Zt.u.pl.call(this,t),te(this))},t.g.ufa=function(e){return t.p(e)?(this.na!=e&&(this.na=e,this.ba&&t.df(this.ba,t.eq.format.getMessage(this.na))),this):this.na},t.g.mla=function(e){return t.p(e)?(this.Ha!=e&&(this.Ha=e,this.P&&t.df(this.P,t.eq.format.getMessage(this.Ha))),this):this.Ha},t.g.Sd=function(e){if(e=e||this.b,ee(e)){this.target(e),this.Za=!0;var i=this.b.container()?this.b.container().getStage():null;e=i&&i.container()?i.container():null}i=!!this.b&&!(0,window.isNaN)(this.b.getSelectedRange().firstSelected),e&&i?Zt.u.Sd.call(this,e):(e=(0,t.pa)(this.bda,this,e||this.b),this.b.Ce("chartdraw",e,!1,this))},t.g.Gg=function(){if(Zt.u.Gg.call(this),this.b){if(this.Za){var e=(t.Wf(this.Ya()).height||21)+15,i=this.b.padding().bottom();e>i&&this.b.padding().bottom(i+e)}this.b.listen("selectedrangechange",this.ER,!1,this),(e=t.Dy(this)).wa(this.i.Ya(),"blur",this.MW),e.wa(this.K.Ya(),"blur",this.MW),this.aa||(this.aa=new t.Jp(this.i.Ya()),e.wa(this.aa,"key",this.lO)),this.ea||(this.ea=new t.Jp(this.K.Ya()),e.wa(this.ea,"key",this.lO))}},t.g.MW=function(){var e=this.i.vj(),i=this.K.vj(),n=this.format();if(e=t.eq.format.parseDateTime(e,n),i=t.eq.format.parseDateTime(i,n),e&&i){n=e.getTime();var s=i.getTime();if(n>s&&(e=[i,i=e][0],n=[s,s=n][0]),n!=this.Ba||s!=this.Ka)return this.Ba=n,this.Ka=s,void this.b.selectRange(e,i,!0)}t.My(this.i,t.eq.format.dateTime(this.Ba,this.format())),t.My(this.K,t.eq.format.dateTime(this.Ka,this.format()))},t.g.lO=function(e){if(13==e.keyCode){var i;e=e.target.u3.Ya();t:{var n=i=0;if(Jt(e))i=e.selectionStart,n=-1;else if(t.hd&&!t.bd("9")){var s=e.ownerDocument||e.document,a=s.selection.createRange();if("textarea"==e.type?(s=s.body.createTextRange()).moveToElementText(e):s=e.createTextRange(),a=(s=[s,a])[0],s=s[1],a.inRange(s)){if(a.setEndPoint("EndToStart",s),"textarea"==e.type){for(s.duplicate(),n=i=a.text,s=!1;!s;)0==a.compareEndPoints("StartToEnd",a)?s=!0:(a.moveEnd("character",-1),a.text==i?n+="\r\n":s=!0);i=[n.length,-1];break t}i=a.text.length,n=-1}}i=[i,n]}i=i[0],this.MW(),Jt(e)?(e.selectionStart=i,e.selectionEnd=i):t.hd&&!t.bd("9")&&("textarea"==e.type&&(i=t.hc(e.value.substring(0,i)).length),(e=e.createTextRange()).collapse(!0),e.move("character",i),e.select())}},t.g.Dh=function(){Zt.u.Dh.call(this)},t.g.R=function(){this.b.unlisten("selectedrangechange",this.ER,!1,this),this.b=null,this.P&&(t.Xe(this.ba),this.ba=null),this.P&&(t.Xe(this.P),this.P=null),this.aa&&(t.Dy(this).gc(this.aa,"key",this.lO),this.aa.ld(),this.aa=null),this.ea&&(t.Dy(this).gc(this.ea,"key",this.lO),this.ea.ld(),this.ea=null),Zt.u.R.call(this)};var we=Zt.prototype;t.E("anychart.ui.rangePicker",(function(){return new Zt})),we.render=we.Sd,we.decorate=we.Bs,we.target=we.target,we.format=we.format,we.dispose=we.ld,we.getElement=we.Ya,we.toLabelText=we.mla,we.fromLabelText=we.ufa,t.H(ie,t.LD);var xe="anychart-button-toggle";t.H(ne,t.qf),t.g=ne.prototype,t.g.CH=null,t.g.LU=null,t.g.py=function(t){return this.Ub[t]||null},t.g.zm=function(){return t.Ha(this.Ub)},t.g.clear=function(){var e=this.Ub;if(!t.A(e))for(var i=e.length-1;0<=i;i--)delete e[i];e.length=0,this.CH=null},t.g.R=function(){ne.u.R.call(this),delete this.Ub,this.CH=null},t.H(re,t.By),t.g=re.prototype,t.g.target=function(t){this.b=t},t.g.PK=function(e){e.firstSelected==e.firstKey&&e.lastSelected==e.lastKey&&(e=t.Gy(this,"max"))?ae(this.i,e):ae(this.i,null)},t.g.eda=function(e,i){e&&t.CD(e,i)},t.g.Yy=function(e){return t.p(e)&&t.A(e)&&(this.jd=(0,t.Gg)(e,(function(e,i){i=t.Qc(i);var n=t.p(i.startDate)&&t.p(i.endDate);return"unit"==i.type||"points"==i.type?(i.count=i.count||1,i.anchor=t.fl(i.anchor),e.push(i)):n?(i.type="range",e.push(i)):"range"!=i.type&&e.push(i),e}),[]),this.update()),this.jd},t.g.Ac=function(){re.u.Ac.call(this),le(this)},t.g.pl=function(t){he(t)?this.Sd(t):(re.u.pl.call(this,t),le(this))},t.g.update=function(){this.xf&&(this.Gi(!0),this.i.clear(),(0,t.Pe)(this.jd,(function(i,n){var s=new ie(i.text);s.dh=i,"max"==i.type&&e(s,"max"),s.mv&=-17;var a=this.i,o=a.Ub.length;s&&(oe(a,s,!1),t.Da(a.Ub,s,o)),n?n==this.jd.length-1?t.KD(s,1):t.KD(s,3):t.KD(s,2),this.hc(s,!0)}),this))},t.g.Rla=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.K&&t.df(this.K,t.eq.format.getMessage(this.P))),this):this.P},t.g.cda=function(t){this.Sd(t)},t.g.Sd=function(e){if(e=e||this.b,he(e)){this.target(e),this.aa=!0;var i=this.b.container()?this.b.container().getStage():null;e=i&&i.container()?i.container():null}i=!!this.b&&!(0,window.isNaN)(this.b.getSelectedRange().firstSelected),e&&i?(re.u.Sd.call(this,e),(e=this.b?this.b.cH():null)&&this.PK({firstKey:e.On,lastKey:e.xp,firstSelected:e.qs,lastSelected:e.uw})):(e=(0,t.pa)(this.cda,this,e||this.b),this.b.Ce("chartdraw",e,!1,this))},t.g.Bs=function(t){re.u.Bs.call(this,t),this.b&&(t=this.b?this.b.cH():null)&&this.PK({firstKey:t.On,lastKey:t.xp,firstSelected:t.qs,lastSelected:t.uw})},t.g.Gg=function(){if(re.u.Gg.call(this),this.b){if(this.update(),this.aa){var e=(t.Wf(this.Ya()).height||21)+15,i=this.b.padding().bottom();e>i&&this.b.padding().bottom(i+e)}this.b.listen("selectedrangechange",this.PK,!1,this),t.Dy(this).wa(this,"action",this.dda)}},t.g.dda=function(e){var i=e.target.dh,n=t.zk(t.FE,i.type,t.p(null)?null:"max");"unit"==n?this.b.selectRange(i.unit,i.count,i.anchor,!0):"points"==n?this.b.selectRange("points",i.count,i.anchor,!0):"ytd"==n||"qtd"==n||"mtd"==n||"max"==n?this.b.selectRange(n,!0):(n=t.eq.format.parseDateTime(i.startDate),i=t.eq.format.parseDateTime(i.endDate),n&&i&&this.b.selectRange(n,i,!0)),ae(this.i,e.target)},t.g.Dh=function(){re.u.Dh.call(this)},t.g.R=function(){this.b.unlisten("selectedrangechange",this.PK,!1,this),this.b=null,this.i.clear(),this.K&&(t.Xe(this.K),this.K=null),re.u.R.call(this)};var Ce=re.prototype;t.E("anychart.ui.rangeSelector",(function(){return new re})),Ce.render=Ce.Sd,Ce.decorate=Ce.Bs,Ce.target=Ce.target,Ce.ranges=Ce.Yy,Ce.dispose=Ce.ld,Ce.getElement=Ce.Ya,Ce.zoomLabelText=Ce.Rla,t.H(ce,t.By),t.g=ce.prototype,t.g.target=function(t){this.b=t},t.g.Ac=function(){ce.u.Ac.call(this),ue(this)},t.g.pl=function(t){de(t)?this.Sd(t):(ce.u.pl.call(this,t),ue(this))},t.g.fda=function(t){this.Sd(t)},t.g.Sd=function(e){var i;e=e||this.b,(i=de(e))||(i=(i=e)&&t.D(i.getType)&&"timeline"==i.getType()),i||(i=(i=e)&&t.D(i.getType)&&"graph"==i.getType()),i&&(this.target(e),e=(i=this.b.container()?this.b.container().getStage():null)&&i.container()?i.container():null),e?ce.u.Sd.call(this,e):(e=(0,t.pa)(this.fda,this,e||this.b),this.b.listenOnce("chartdraw",e,!1,this))},t.g.Gg=function(){ce.u.Gg.call(this),this.b&&t.Dy(this).wa(this,"action",this.gda)},t.g.gda=function(t){t=t.target.dh,this.b.Fl=100;var e=this.b.getCurrentScene();switch(t.type){case"fitAll":e.fitAll();break;case"zoomIn":e.zoomIn();break;case"zoomOut":e.zoomOut()}},t.g.Dh=function(){ce.u.Dh.call(this)},t.g.R=function(){this.b=null,this.i.ld(),this.i=null,this.K.ld(),this.K=null,this.P.ld(),this.P=null,ce.u.R.call(this)};var De=ce.prototype;t.E("anychart.ui.zoom",(function(){return new ce})),De.render=De.Sd,De.decorate=De.Bs,De.target=De.target,De.dispose=De.ld}.call(this,$)),_.theme_circular_gauge||(_.theme_circular_gauge=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{circularGauge:{defaultPointerType:"needle",title:{enabled:!1},defaultAxisSettings:{startAngle:null,labels:{position:"inside",adjustFontSize:!0,offsetY:0},minorLabels:{position:"inside",adjustFontSize:!0,offsetY:0},fill:"#CECECE",ticks:{hatchFill:!1,type:"line",position:"center",length:null,fill:"#545f69",stroke:"none"},minorTicks:{hatchFill:!1,type:"line",position:"center",length:null,fill:"#545f69",stroke:"none"},zIndex:10,cornersRounding:"0%"},defaultPointerSettings:{base:{enabled:!0,fill:"#545f69",stroke:"#545f69",hatchFill:!1,axisIndex:0},bar:{position:"center",barDrawer:function(){this.path.clear(),this.path.circularArc(this.centerX,this.centerY,this.radius-this.width/2,this.radius-this.width/2,this.startAngle,this.sweepAngle),this.path.circularArc(this.centerX,this.centerY,this.radius+this.width/2,this.radius+this.width/2,this.startAngle+this.sweepAngle,-this.sweepAngle,!0),this.path.close()}},marker:{size:"4%",hoverSize:6,selectSize:6,position:"inside",type:"triangle-up"},knob:{fill:"#CECECE",stroke:"#c1c1c1",verticesCount:6,verticesCurvature:.5,topRatio:.5,bottomRatio:.5},needle:{startRadius:"-20%",startWidth:"3%",middleWidth:"1%"}},defaultRangeSettings:{enabled:!0,axisIndex:0,fill:"#7c868e 0.7",position:"center",startSize:0,endSize:"10%",cornersRounding:"0%"},fill:"#f5f5f5",stroke:"#EAEAEA",startAngle:0,sweepAngle:360,cap:{enabled:!1,fill:"#EAEAEA",stroke:"#CECECE",hatchFill:!1,radius:"15%",zIndex:50},circularPadding:"10%",encloseWithStraightLine:!1,axes:[{}],bars:[],markers:[],needles:[],knobs:[],ranges:[],tooltip:{title:{enabled:!1},separator:{enabled:!1},titleFormat:function(){return this.index},format:function(){return"Value: "+t.vN(this.value)}}}})}.call(this,$)),_.cartesian_3d||(_.cartesian_3d=1,function(t){var e=function(t,e,i){(t=t.f[e])&&(t.zIndex=i)},i=function(e){return t.oa(e.tl())+"_"+t.oa(e.bb())},n=function(){t.kz.call(this)},s=function(){t.kz.call(this)},a=function(){t.$z.call(this)},o=function(){t.cA.call(this)},r=function(){t.fA.call(this)},l=function(e){t.JA.call(this,e)},h=function(e){t.JA.call(this,e)},c=function(t,e,i){if(!e.j("skipDrawing")){var n=e.j("x"),s=e.j("zero"),a=e.j("value");t.xa||(n+=t.f,s-=t.b,a-=t.b),e=i.bottom;var o=i.back,r=i.left,l=i.right,h=i.front,c=i.top,u=i.rightHatch,d=i.frontHatch;i=i.topHatch;var p=t.i,g=t.D,f=h.stroke().thickness%2/2||0;if(t.xa){var b=t.o,v=Math.min(s,a)+t.f;n=n-b/2-t.b,t=Math.abs(s-a),s=f,a=0}else v=n-(t=t.o)/2,n=Math.min(s,a),b=Math.abs(s-a),a=s=-f;e.moveTo(v+f,n+b).lineTo(v+t,n+b).lineTo(v+t+p-f,n+b-g+f).lineTo(v+p,n+b-g).close(),o.moveTo(v+p,n-g).lineTo(v+p+t,n-g).lineTo(v+p+t,n-g+b).lineTo(v+p,n-g+b).close(),r.moveTo(v,n).lineTo(v+p+s,n-g+f).lineTo(v+p,n+b-g).lineTo(v,n+b-f).close(),l.moveTo(v+t,n).lineTo(v+t+p+a,n-g+f).lineTo(v+t+p,n+b-g).lineTo(v+t,n+b-f).close(),u.moveTo(v+t,n).lineTo(v+t+p+a,n-g+f).lineTo(v+t+p,n+b-g).lineTo(v+t,n+b-f).close(),h.moveTo(v,n).lineTo(v+t,n).lineTo(v+t,n+b).lineTo(v,n+b).close(),d.moveTo(v,n).lineTo(v+t,n).lineTo(v+t,n+b).lineTo(v,n+b).close(),c.moveTo(v+f,n).lineTo(v+t,n).lineTo(v+t+p-f,n-g+f).lineTo(v+p,n-g).close(),i.moveTo(v+f,n).lineTo(v+t,n).lineTo(v+t+p-f,n-g+f).lineTo(v+p,n-g).close()}},u=function(e){t.JA.call(this,e)},d=function(){t.WB.call(this),this.Ga("cartesian","cartesian3dBase","cartesian3d"),this.K=0,this.re="cartesian-3d"},p=function(e){var i=t.so(e.domTarget);if(i&&i.X&&i.X.check(4)){var n=t.so(e.relatedDomTarget);n&&n.X&&n.X==i.X&&n.index==i.index||(i=i.X)&&!i.md&&i.enabled()&&(n=i.Zi(),i.kb(null),i.oh(e.gE),i.kb(n))}},g=function(e,i,n){var s,a,o,r=t.cm("fill",1,!0)(e,n);n=t.C(r)?r.opacity:1;var l=t.C(r)?r.color:r;if(null===(r=t.Ll(l)))e=l=s=a=o=r="none";else{l=r.vk;var h=t.Cl(l);a=t.Il(h,.2),r=t.Il(h,.25),o=t.Hl([255,255,255],h,.1),s=t.Tb(t.Hl(h,a,.7)),o=t.Tb(t.Hl(a,o,.1)),h=t.Tb(t.Hl(h,a,.1)),e={angle:e.g("isVertical")?0:90,opacity:n,keys:[t.Pl(s,.2),t.Pl(l,.3)]},l=t.Pl(h,.2),s=t.Pl(s,.2),a=t.Tb(a),r=t.Tb(r)}i.bottom.fill({color:a,opacity:n}),i.back.fill({color:o,opacity:n}),i.left.fill({color:r,opacity:n}),i.right.fill({color:l,opacity:n}),i.top.fill({color:s,opacity:n}),i.front.fill(e)},f=function(){var e=new d;return e.ta("defaultSeriesType","column"),e.$c(),t.BA(e),e.Wg(),e},b=function(t,e){var i=m(t),n=t.i,s=t.oi;return!e&&t.g("zDistribution")&&(s=(s-n*(i-1))/i),s},v=function(t,e){var i=m(t),n=t.o,s=t.Mh;return!e&&t.g("zDistribution")&&(s=(s-n*(i-1))/i),s},m=function(e){return function(e,i){var n=0;return(0,t.Pe)(e,(function(t,e,s){i.call(void 0,t,e,s)&&++n}),void 0),n}(e.hb,(function(e){return!!(e&&e.enabled()&&e.check(t.tB))}))},y=function(e,i){for(var n=0,s=0,a=Math.min(e.hb.length-1,i);s<=a;s++){var o=e.hb[s];o&&o.enabled()&&o.check(t.tB)&&n++}return n-1},S=function(e){var i=new d;return i.Ga("area3d"),i.re="area-3d",i.ta("defaultSeriesType","area"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},w=function(e){var i=new d;return i.Ga("bar","bar3d"),i.re="bar-3d",i.ta("defaultSeriesType","bar"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},x=function(e){var i=new d;return i.Ga("column","column3d"),i.re="column-3d",i.ta("defaultSeriesType","column"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},C=function(e){var i=new d;return i.Ga("line3d"),i.re="line-3d",i.ta("defaultSeriesType","line"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},D={bC:"area",kF:"bar",lF:"column",tt:"line",spa:"line-2d"},T={name:"top",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:3e-6},k={name:"bottom",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:2e-6},$={name:"left",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:1e-6},O={name:"right",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:4e-6},P={name:"back",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:0},L={name:"frontHatch",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:8e-6},G={name:"rightHatch",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:7e-6},F={name:"topHatch",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:6e-6};t.H(n,t.kz),t.g=n.prototype,t.g.zg=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(20,8|i)},t.g.KG=function(e){var i=this.ja()||t.kn(0,0,0,0);e=Math.round(i.Va()-e*i.height);var n=this.Uh().stroke();n=t.dp(n),e=t.R(e,n),n=i.tb()+this.oi;var s=e-this.Mh;this.o.moveTo(i.tb(),e).lineTo(n,s).lineTo(i.cb()+this.oi,s)},t.g.LG=function(e){var i=this.ja()||t.kn(0,0,0,0);e=Math.round(i.tb()+e*i.width);var n=this.Uh().stroke();n=t.dp(n),n=(e=t.R(e,n))+this.oi;var s=Math.ceil(t.R(i.Va()-this.Mh,1));this.o.moveTo(e,Math.ceil(t.R(i.Va(),1))).lineTo(n,s).lineTo(n,i.Vb()-this.Mh)},t.g.HG=function(e,i,n,s){if(!(0,window.isNaN)(i)){var a=this.ja()||t.kn(0,0,0,0),o=Math.round(a.Va()-i*a.height),r=Math.round(a.Va()-e*a.height);1==e?r-=s:r+=s,1==i?o-=s:o+=s,n.moveTo(a.tb(),o).lineTo(a.tb()+this.oi,o-this.Mh).lineTo(a.cb()+this.oi,o-this.Mh).lineTo(a.cb()+this.oi,r-this.Mh).lineTo(a.tb()+this.oi,r-this.Mh).lineTo(a.tb(),r).close()}},t.g.IG=function(e,i,n,s){if(!(0,window.isNaN)(i)){var a=this.ja()||t.kn(0,0,0,0),o=Math.round(a.tb()+i*a.width),r=Math.round(a.tb()+e*a.width);1==e?r+=s:r-=s,1==i?o+=s:o-=s,n.moveTo(o+this.oi,a.Vb()-this.Mh).lineTo(r+this.oi,a.Vb()-this.Mh).lineTo(r+this.oi,a.Va()-this.Mh).lineTo(r,a.Va()).lineTo(o,a.Va()).lineTo(o+this.oi,a.Va()-this.Mh).close()}},t.H(s,n),t.xu(s,n);var I=n.prototype;I.isHorizontal=I.Nb,I.scale=I.scale,I.axis=I.axis,I=s.prototype,t.E("anychart.standalones.grids.linear3d",(function(){var e=new s;return e.N(t.nm("standalones.linearGrid")),e})),I.layout=I.we,I.draw=I.W,I.parentBounds=I.ja,I.container=I.O,t.H(a,t.$z),a.prototype.fs=function(){var e=t.Za(this.scale().transform(this.value(),.5),0,1);if(!(0,window.isNaN)(e)){var i=0==t.Oy(this).gl()%2?0:-.5,n=this.ja(),s=this.Qp();t.Oy(this).clear();var a=this.xc().oi,o=this.xc().Mh;if("horizontal"==this.we()){var r=Math.round(n.Vb()+n.height-e*n.height);1==e?r-=i:r+=i,t.Oy(this).moveTo(n.tb(),r).lineTo(n.tb()+a,r-o).lineTo(n.cb()+a,r-o)}else"vertical"==this.we()&&(r=Math.round(n.tb()+e*n.width),1==e?r+=i:r-=i,t.Oy(this).moveTo(r+a,n.Vb()-o).lineTo(r+a,n.Va()-o).lineTo(r,n.Va()));n.top-=o,n.height+=o,n.width+=a,t.Oy(this).clip(s.Ej(n))}},t.H(o,t.cA),o.prototype.fs=function(){var e=this.we(),i=this.g("from"),n=this.g("to");this.g("from")>this.g("to")&&(i=this.g("to"),n=this.g("from"));var s=t.Za(this.scale().transform(i,0),0,1),a=t.Za(this.scale().transform(n,1),0,1);if(!(0,window.isNaN)(s)&&!(0,window.isNaN)(a)){n=this.ja(),i=this.Qp(),t.Oy(this).clear();var o=this.xc().oi,r=this.xc().Mh;if("horizontal"==e){a=Math.floor(n.Va()-n.height*a),s=Math.ceil(n.Va()-n.height*s),e=n.tb();var l=n.cb();t.Oy(this).moveTo(e,a).lineTo(e+o,a-r).lineTo(l+o,a-r).lineTo(l+o,s-r).lineTo(e+o,s-r).lineTo(e,s).close()}else"vertical"==e&&(e=n.Va(),l=n.Vb(),s=Math.floor(n.tb()+n.width*s),a=Math.ceil(n.tb()+n.width*a),t.Oy(this).moveTo(s,e).lineTo(s+o,e-r).lineTo(s+o,l-r).lineTo(a+o,l-r).lineTo(a+o,e-r).lineTo(a,e).close());n.top-=r,n.height+=r,n.width+=o,t.Oy(this).clip(i.Ej(n))}},t.H(r,t.fA),r.prototype.ja=function(e,i,n,s){return i=r.u.ja.call(this,e,i,n,s),t.p(e)||(e=this.xc().oi,n=this.xc().Mh,i.top-=n,i.height+=n,i.width+=e),i},t.H(l,t.JA),t.PG[2]=l,t.g=l.prototype,t.g.type=2,t.g.flags=33|t.dB|t.tB|0,t.g.Kh={top:"path",bottom:"path",left:"path",right:"path",back:"path",front:"path",cap:"path",frontHatch:"path"},t.g.uK=function(){for(var t=this.X.cg();t.advance();){var e=t.j("shapes");if(e){var i=t.j("zIndex");this.bd.zt(i+1e-8*t.ma(),e)}}},t.g.Gd=function(t){l.u.Gd.call(this,t),this.ea=!0,t=this.X.ya;var n=this.X.ma(),s=this.X.gh(),a=i(this.X);this.Za=!s||n==t.z3[a],this.Ka=t.QM(n,s),this.P=t.RM(n,s),this.b=b(t,s),this.i=v(t,s),t.Ra().Ne()?(e(this.bd,"left",4e-6),e(this.bd,"right",1e-6)):(e(this.bd,"left",1e-6),e(this.bd,"right",4e-6)),t.bb().Ne()?(e(this.bd,"top",2e-6),e(this.bd,"bottom",3e-6)):(e(this.bd,"top",3e-6),e(this.bd,"bottom",2e-6))},t.g.Qo=function(t){var e=this.bd.ed(this.Gc,null,this.X.zIndex()),i=t.j("x")+this.Ka,n=t.j("zero")-this.P,s=t.j("zeroMissing");t=t.j("value")-this.P,e.front.moveTo(i,n).lineTo(i,t),e.frontHatch.moveTo(i,n).lineTo(i,t),this.X.gh()?this.f=[i,n,s]:(e.back.moveTo(i+this.b,n-this.i).lineTo(i+this.b,t-this.i),e.bottom.moveTo(i,n).lineTo(i+this.b,n-this.i),"none"==this.X.bb().jn()&&t>=n&&e.cap.moveTo(i,n).lineTo(i+this.b,n-this.i),e.left.moveTo(i,n).lineTo(i,t).lineTo(i+this.b,t-this.i).lineTo(i+this.b,n-this.i).close()),this.D=i,this.K=t,this.Mi=this.na=n},t.g.ug=function(t){var e=this.bd.ed(this.Gc),i=t.j("x")+this.Ka,n=t.j("zero")-this.P,s=t.j("zeroMissing");if(t=t.j("value")-this.P,this.X.gh()?this.f.push(i,n,s):(e.bottom.lineTo(i+this.b,n-this.i),e.back.lineTo(i+this.b,t-this.i)),s=e.front.HZ(),this.Za&&(this.ea?e.top.moveTo(s.x,s.y).lineTo(s.x+this.b,s.y-this.i).lineTo(i+this.b,t-this.i).lineTo(i,t).close():e.top.moveTo(s.x,s.y).lineTo(i,t).lineTo(i+this.b,t-this.i).lineTo(s.x+this.b,s.y-this.i).close(),this.ea=!this.ea),"none"==this.X.bb().jn()){var a=(n-s.y)*(i-s.x)/(t-s.y)+s.x;0<t-s.y&&s.y<=n&&t>n?e.cap.moveTo(a,n).lineTo(a+this.b,n-this.i):0>t-s.y&&s.y>n&&t<=n&&e.cap.lineTo(a+this.b,n-this.i).lineTo(a,n).close()}e.front.lineTo(i,t),e.frontHatch.lineTo(i,t),this.D=i,this.K=t,this.na=n},t.g.Km=function(){if(this.G){var t=this.bd.ed(this.Gc),e=t.front,i=t.frontHatch;if(this.f){for(var n=window.NaN,s=window.NaN,a=!1,o=this.f.length-1;0<=o;o-=3){var r=this.f[o-2],l=this.f[o-1],h=this.f[o];h&&!(0,window.isNaN)(n)?(e.lineTo(n,l),i.lineTo(n,l)):a&&!(0,window.isNaN)(s)&&(e.lineTo(r,s),i.lineTo(r,s)),e.lineTo(r,l),i.lineTo(r,l),n=r,s=l,a=h}e.close(),i.close(),this.f=null}else(0,window.isNaN)(this.D)||(e.lineTo(this.D,this.Mi).close(),i.lineTo(this.D,this.Mi).close(),t.back.lineTo(this.D+this.b,this.Mi-this.i).close(),t.bottom.lineTo(this.D,this.Mi).close(),"none"==this.X.bb().jn()&&this.K>=this.X.Mi&&t.cap.lineTo(this.D+this.b,this.Mi-this.i).lineTo(this.D,this.Mi).close());(0,window.isNaN)(this.D)||t.right.moveTo(this.D,this.na).lineTo(this.D,this.K).lineTo(this.D+this.b,this.K-this.i).lineTo(this.D+this.b,this.na-this.i).close()}},t.H(h,t.JA),t.PG[7]=h,t.g=h.prototype,t.g.type=7,t.g.flags=263717|t.tB,t.g.Kh={top:"path",bottom:"path",left:"path",right:"path",back:"path",front:"path",frontHatch:"path",rightHatch:"path",topHatch:"path"},t.g.Gd=function(t){h.u.Gd.call(this,t),t=this.X.ya;var e=this.X.ma(),i=this.X.gh();this.f=t.QM(e,i),this.b=t.RM(e,i),this.i=b(t,i),this.D=v(t,i)},t.g.uK=function(t){for(var e=this.X.cg();e.advance();){var i=e.j("shapes");i&&(t=e.j("zIndex"),this.bd.zt(t+1e-8*e.ma(),i))}},t.g.ug=function(t,e){var i=t.j("zIndex")+1e-8*(t.j("directIndex")+t.ma());i=this.bd.ed(e,null,i),c(this,t,i)},t.g.yt=function(t){var e,i=t.j("shapes");for(e in i)i[e].clear();c(this,t,i)},t.H(u,t.JA),t.PG[33]=u,t.g=u.prototype,t.g.type=33,t.g.flags=64|t.dB|t.tB|32768,t.g.Kh={path:"path"},t.g.uK=function(){for(var t=this.X.cg();t.advance();){var e=t.j("shapes");if(e){var i=t.j("zIndex");this.bd.zt(i+1e-8*t.ma(),e)}}},t.g.Gd=function(t){u.u.Gd.call(this,t),this.K=!0,t=this.X.ya;var e=this.X.ma();this.P=t.QM(e,!1),this.ea=t.RM(e,!1),this.i=b(t,!1),this.D=v(t,!1)},t.g.Qo=function(t){this.b=t.j("x")+this.P,this.f=t.j("value")-this.ea},t.g.ug=function(t){var e=this.bd.ed(this.Gc),i=t.j("x")+this.P;t=t.j("value")-this.ea,this.K?e.path.moveTo(this.b,this.f).lineTo(this.b+this.i,this.f-this.D).lineTo(i+this.i,t-this.D).lineTo(i,t).close():e.path.moveTo(this.b,this.f).lineTo(i,t).lineTo(i+this.i,t-this.D).lineTo(this.b+this.i,this.f-this.D).close(),this.K=!this.K,this.b=i,this.f=t},t.H(d,t.WB),d.prototype.If=function(t){p(t),d.u.If.call(this,t)},d.prototype.hg=function(t){p(t),d.u.hg.call(this,t)},d.prototype.Sj=function(t){p(t),d.u.Sj.call(this,t)},d.prototype.Ih=function(t){p(t),d.u.Ih.call(this,t)};var E={},A=5767168|t.QG;E.area={Fb:2,Kb:1,Lb:[{name:"top",Qb:"path",Yb:null,Zb:null,ac:!1,Ib:!1,zIndex:3e-6},k,$,O,P,t.SH,{name:"cap",Qb:"path",Yb:null,Zb:null,ac:!1,Ib:!1,zIndex:35e-7},L],Ob:null,Jb:function(e,i,n){var s,a,o,r;n=t.cm("fill",1,!0)(e,n),e=t.C(n)?n.opacity:1;var l=t.C(n)?n.color:n;if(null===(n=t.Ll(l)))l=s=a=o=r=n="none";else{l=n.vk,o=t.Cl(l);var h=t.Il(o,.2);a=t.Il(o,.3),n=t.Il(o,.25),r=t.Hl([255,255,255],o,.1),s=t.Tb(t.Hl(o,h,.7)),a=t.Tb(t.Hl(o,a,.7)),r=t.Tb(t.Hl(h,r,.1)),o=t.Tb(t.Hl(o,h,.1)),l={angle:90,opacity:e,keys:[t.Pl(s,.2),t.Pl(l,.3)]},s=t.Pl(a,.2),a=o=t.Pl(o,.2),n=t.Tb(n)}i.bottom.fill({color:o,opacity:e}),i.back.fill({color:r,opacity:e}),i.left.fill({color:n,opacity:e}),i.right.fill({color:a,opacity:e}),i.top.fill({color:s,opacity:e}),i.cap.fill({color:o,opacity:e}),i.front.fill(l),i.top.stroke({color:s,thickness:.8})},Cb:A,Ab:"value",zb:"zero"},E.bar={Fb:7,Kb:2,Lb:[T,k,$,O,P,t.SH,L,G,F],Ob:null,Jb:g,Cb:A,Ab:"value",zb:"zero"},E.column={Fb:7,Kb:2,Lb:[T,k,$,O,P,t.SH,L,G,F],Ob:null,Jb:g,Cb:A,Ab:"value",zb:"zero"},E.line={Fb:33,Kb:1,Lb:[{name:"path",Qb:"path",Yb:null,Zb:null,ac:!1,Ib:!1,zIndex:0}],Ob:null,Jb:function(e,i,n){n=t.cm("fill",1,!0)(e,n),e=t.C(n)?n.opacity:1,n=t.C(n)?n.color:n,null===(n=t.Ll(n))?n="none":(n=n.vk,n=t.Cl(n),n=t.Tb(t.Hl(n,t.Il(n,.3),.7)),n=t.Pl(n,.2)),i.path.fill({color:n,opacity:e}).stroke({color:n,thickness:.8})},Cb:A,Ab:"value",zb:"value"},E["line-2d"]={Fb:8,Kb:1,Lb:[{name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:9e-6}],Ob:null,Jb:null,Cb:2097152|A,Ab:"value",zb:"value"},d.prototype.fj=E,t.Nz(d,d.prototype.fj),t.Tp["cartesian-3d"]=f,t.g=d.prototype,t.g.Ss=function(e){return t.zk(D,e,"column")},t.g.uN=function(){return!0},t.g.QM=function(t,e){if(e||!this.g("zDistribution"))var i=0;else i=(i=m(this))-(t=y(this,t))-1,i*=b(this,e)+this.i;return i},t.g.RM=function(t,e){if(e||!this.g("zDistribution"))var i=0;else i=(i=m(this))-(t=y(this,t))-1,i*=v(this,e)+this.o;return i},t.g.DF=function(){return new n},t.g.a_=function(){var t=new a;return t.pa=this,t},t.g.b_=function(){var t=new o;return t.pa=this,t},t.g.c_=function(){var t=new r;return t.pa=this,t},t.g.aX=function(){this.z3={};for(var e,n=this.Ue(),s="none"!=this.bb().jn(),a="direct"==this.bb().kx(),o=[30],r=!0,l=1;l<n.length;l++)n[l].Ma()==n[l-1].Ma()?o.push(o[l-1]):(o.push(1-1/(l+1)+30),r=!1);for(l=0;l<n.length;l++){var h=1-1/(l+1)+30;e=n.length-l-1;var c=s&&a?e:l;if((e=n[c])&&e.enabled())if(e.check(t.tB)){if(e.eh())for(c=e.Ec();c.advance();){var u=e,d=l,p=n.length,g=o[l],f=r,b=u.$(),v=t.N(b.get("value")),m=b.ma();d+=1;var y=.01,S="none"!=this.bb().jn(),w=this.Ra().Ne();m=w?b.Hb()-m:m+1,g=this.g("zDistribution")?1-1/d+30:f?30:g,this.bb().Ne()^0>v&&(d=-d),u.g("isVertical")?S||this.g("zDistribution")?(u=m,m=d,d=u,u=1-1/Math.abs(m),g=0<m?g+y*(d+u):g-y*(p-d+u)):(w&&(d=p-Math.abs(d)+1),g+=y*=m=m*p-p+Math.abs(d),this.bb().Ne()&&(v=-v),0>v&&(y=-y),g+=y):(S||this.g("zDistribution")||(w&&(d=p-Math.abs(d)+1),m=m*p-p+Math.abs(d)),g+=y*=m),b.j("zIndex",g),b.j("directIndex",m*d),h<(p=g)&&(h=p)}else e.zIndex()!=e.zh&&e.zIndex()!=h&&(h=e.zIndex()),e.EP()&&(this.z3[i(e)]=c);e.zIndex(h)}else h=1e-5*e.yh()+32,e.zh=h}},t.g.M1=function(e){e=e.clone().round();var i=this.mD(e),n=m(this),s=this.g("zAngle"),a=this.g("zAspect"),o=this.g("zPadding"),r=this.g("zDistribution"),l=t.bb(s);if(s=t.bb(90-s),t.uo(a)){var h=(0,window.parseFloat)(a)/100;a=h*Math.sin(s);for(var c,u=h*Math.sin(l),d=h=0,p=this.Ue(),g=0;g<p.length;g++)if((c=p[g])&&c.enabled()&&c.check(t.tB)){var f=c.Ra();f=1/("ordinal"==f.Ma()?f.values().length:c.$().Hb());var b=this.g("barsPadding"),v=this.g("barGroupsPadding");f*=b=c.gh()||r?1/(1+v):1/(n+(n-1)*b+v),!c.gh()&&r?(h+=f*a,d+=f*u):h||(h=f*a,d=f*u)}this.i=Math.round(o*Math.sin(s)),this.o=Math.round(o*Math.sin(l)),o=this.Ks?i.height/(1+h):i.width/(1+h),this.oi=o*h,this.Mh=o*d,!this.FD&&r&&(this.oi+=this.i*(n-1),this.Mh+=this.o*(n-1)),this.oi=Math.round(this.oi),this.Mh=Math.round(this.Mh)}else this.K=!this.FD&&r?a*n+o*(n-1):t.N(a),this.oi=Math.round(this.K*Math.sin(s)),this.Mh=Math.round(this.K*Math.sin(l)),o*(r=n-1)>=this.K&&(o=(this.K-n)/r),this.i=Math.round(o*Math.sin(s)),this.o=Math.round(o*Math.sin(l));return this.oi=Math.max(this.oi,0)||0,this.Mh=Math.max(this.Mh,0)||0,this.i=Math.max(this.i,0)||0,this.o=Math.max(this.o,0)||0,e.top+=this.Mh,e.height-=this.Mh,e.width-=this.oi,e},t.g.SL=function(e,i,n){if(!this.FD&&this.g("zDistribution")){if(0<e)for(var s=1/(e=1+this.g("barGroupsPadding")),a=0;a<i.length;a++)(e=i[a].X).check(262144)&&n^e.g("isVertical")&&(t.jB(e,.5),t.iB(e,s))}else d.u.SL.call(this,e,i,n)},t.g.ig=function(e){var i=t.so(e.target);return(i=i&&i.X)&&!i.md&&i.enabled()?i.ig(e):d.u.ig.call(this,e)},t.g.U=function(t,e){d.u.U.call(this,t,e)};var U=d.prototype;t.E("anychart.cartesian3d",f),U.xScale=U.Ra,U.yScale=U.bb,U.crosshair=U.mh,U.xGrid=U.lm,U.yGrid=U.nm,U.xMinorGrid=U.Qr,U.yMinorGrid=U.Tr,U.xAxis=U.$h,U.getXAxesCount=U.wD,U.yAxis=U.ij,U.getYAxesCount=U.yD,U.getSeries=U.ef,U.zIndex=U.zIndex,U.lineMarker=U.Ym,U.rangeMarker=U.gn,U.textMarker=U.mn,U.palette=U.cc,U.markerPalette=U.Nf,U.hatchFillPalette=U.ve,U.getType=U.Ma,U.addSeries=U.kl,U.getSeriesAt=U.Ai,U.getSeriesCount=U.tj,U.removeSeries=U.Ao,U.removeSeriesAt=U.Rn,U.removeAllSeries=U.Dp,U.getPlotBounds=U.dg,U.xZoom=U.Tq,U.yZoom=U.Uq,U.xScroller=U.Mp,U.yScroller=U.Ur,U.getStat=U.Rg,U.getXScales=U.vy,U.getYScales=U.xy,t.Tp["area-3d"]=S,t.Tp["bar-3d"]=w,t.Tp["column-3d"]=x,t.Tp["line-3d"]=C,t.E("anychart.area3d",S),t.E("anychart.bar3d",w),t.E("anychart.column3d",x),t.E("anychart.line3d",C)}.call(this,$)),_.theme_timeline||(_.theme_timeline=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{timeline:{interactivity:{zoomOnMouseWheel:!0,scrollOnMouseWheel:!0},defaultRangeMarkerSettings:{zIndex:30.1,scaleRangeMode:"consider"},defaultLineMarkerSettings:{zIndex:30.2,scaleRangeMode:"consider"},defaultTextMarkerSettings:{zIndex:30.3,scaleRangeMode:"consider",align:"top"},legend:{enabled:!1},axis:{enabled:!0,zIndex:35,height:32,stroke:"#004e72",fill:"#004e72",ticks:{enabled:!0,stroke:"2 #60899b",zIndex:36},labels:{padding:7.5,fontSize:12,fontColor:"#d6f8ff",textOverflow:!0,format:"{%Value}",selectable:!1}},defaultSeriesSettings:{base:{direction:"auto",clip:!1},moment:{direction:"odd-even",connector:{length:"4%"},normal:{stroke:function(){return{color:t.Pl(this.sourceColor),thickness:1,dash:"2 2"}},markers:{enabled:!0},labels:{fontColor:"#212121",padding:5,enabled:!0,anchor:"left-center",width:120,background:{enabled:!0,fill:"#f2f8ff .7",corners:2,stroke:"#CECECE"},fontSize:11,offsetX:5}},zIndex:33,tooltip:{titleFormat:function(){return t.vs(this.x)}}},range:{direction:"up",zIndex:34,height:25,normal:{labels:{enabled:!0,anchor:"left-center",format:"{%x}",fontColor:"#000"},fill:function(){return this.sourceColor+" 0.3"}},tooltip:{format:"Start: {%start}{type:date}\nEnd: {%end}{type:date}"}}}}})}.call(this,$)),_.theme_stock||(_.theme_stock=1,function(t){var e=function(){var e=this.defaultDecimalDigitsCount||void 0;return this.seriesName+":\n  Open: "+t.vN(this.open,e)+"\n  High: "+t.vN(this.high,e)+"\n  Low: "+t.vN(this.low,e)+"\n  Close: "+t.vN(this.close,e)},i=function(){return t.us(this.x,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")))},n=function(){return t.us(this.hoveredDate,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")))};t.ra(t.fa.anychart.themes.defaultTheme,{defaultGroupingSettings:{enabled:!0,forced:!1,levels:[{unit:"millisecond",count:1},{unit:"millisecond",count:5},{unit:"millisecond",count:10},{unit:"millisecond",count:25},{unit:"millisecond",count:50},{unit:"millisecond",count:100},{unit:"millisecond",count:250},{unit:"millisecond",count:500},{unit:"second",count:1},{unit:"second",count:5},{unit:"second",count:10},{unit:"second",count:20},{unit:"second",count:30},{unit:"minute",count:1},{unit:"minute",count:5},{unit:"minute",count:15},{unit:"minute",count:30},{unit:"hour",count:1},{unit:"hour",count:2},{unit:"hour",count:6},{unit:"hour",count:12},{unit:"day",count:1},{unit:"week",count:1},{unit:"month",count:1},{unit:"month",count:3},{unit:"month",count:6},{unit:"year",count:1}],maxVisiblePoints:500,minPixPerPoint:window.NaN},stock:{grouping:{},scrollerGrouping:{levels:[{unit:"millisecond",count:1},{unit:"millisecond",count:2},{unit:"millisecond",count:5},{unit:"millisecond",count:10},{unit:"millisecond",count:25},{unit:"millisecond",count:50},{unit:"millisecond",count:100},{unit:"millisecond",count:250},{unit:"millisecond",count:500},{unit:"second",count:1},{unit:"second",count:2},{unit:"second",count:5},{unit:"second",count:10},{unit:"second",count:20},{unit:"second",count:30},{unit:"minute",count:1},{unit:"minute",count:2},{unit:"minute",count:5},{unit:"minute",count:10},{unit:"minute",count:20},{unit:"minute",count:30},{unit:"hour",count:1},{unit:"hour",count:2},{unit:"hour",count:3},{unit:"hour",count:4},{unit:"hour",count:6},{unit:"hour",count:12},{unit:"day",count:1},{unit:"day",count:2},{unit:"day",count:4},{unit:"week",count:1},{unit:"week",count:2},{unit:"month",count:1},{unit:"month",count:2},{unit:"month",count:3},{unit:"month",count:6},{unit:"year",count:1}],maxVisiblePoints:window.NaN,minPixPerPoint:1},defaultAnnotationSettings:{},defaultPlotSettings:{defaultLineMarkerSettings:{zIndex:200.2},defaultTextMarkerSettings:{zIndex:200.3},annotations:{annotationsList:[],zIndex:2e3},background:{enabled:!1},title:{text:"Plot Title",padding:[5,5,2,5],fontSize:12},defaultSeriesSettings:{base:{pointWidth:"75%",tooltip:{format:function(){var e=t.vN(this.value,this.defaultDecimalDigitsCount||void 0);return this.seriesName+": "+this.valuePrefix+e+this.valuePostfix},titleFormat:n},legendItem:{iconStroke:"none"},normal:{labels:{offsetY:10}}},areaLike:{normal:{labels:{format:i}},hovered:{markers:{enabled:null}},selected:{markers:{enabled:null}}},lineLike:{normal:{labels:{format:i}},hovered:{markers:{enabled:null}},selected:{markers:{enabled:null}}},rangeLike:{normal:{labels:{format:i}},tooltip:{format:function(){var e=this.defaultDecimalDigitsCount||void 0;return this.seriesName+":\n  High: "+t.vN(this.high,e)+"\n  Low: "+t.vN(this.low,e)}}},candlestick:{normal:{labels:{format:i}},tooltip:{format:e}},column:{normal:{labels:{format:i},stroke:"none"}},rangeColumn:{normal:{labels:{format:i},stroke:"none"}},ohlc:{normal:{labels:{format:i}},tooltip:{format:e}}},defaultGridSettings:{scale:0},defaultMinorGridSettings:{scale:0},defaultYAxisSettings:{enabled:!0,orientation:"left",title:{enabled:!1,text:"Y-Axis"},staggerMode:!1,staggerLines:null,ticks:{enabled:!0},width:50,labels:{fontSize:"11px",padding:{top:0,right:5,bottom:0,left:5}},minorLabels:{fontSize:"11px",padding:{top:0,right:5,bottom:0,left:5}},scale:0},defaultPriceIndicatorSettings:{label:{enabled:!0,background:{enabled:!0,fill:"#000"},fontColor:"#fff",padding:[2,9],hAlign:"center",fontSize:"11px"},stroke:"black"},xAxis:{enabled:!0,orientation:"bottom",background:{stroke:"#cecece",fill:"#F7F7F7"},height:25,showHelperLabel:!0,scale:0,ticks:{enabled:!1,position:"inside",length:"20%"},labels:{enabled:!0,fontSize:"11px",padding:5,anchor:"center-top",format:function(){return t.us(this.dataValue,t.ss(t.rs(this.majorIntervalUnit)))}},minorLabels:{enabled:!0,anchor:"center-top",fontSize:"11px",padding:{top:5,right:0,bottom:5,left:0},format:function(){return t.us(this.dataValue,t.ss(t.rs(this.minorIntervalUnit,this.majorIntervalUnit)))}}},dateTimeHighlighter:"#B9B9B9",legend:{enabled:!0,vAlign:"bottom",iconSize:13,position:"top",titleFormat:function(){return t.us(this.value,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")))},align:"left",padding:10,title:{enabled:!0,fontSize:12,text:"",background:{enabled:!1,fill:{keys:["#fff","#f3f3f3","#fff"],angle:"90"},stroke:{keys:["#ddd","#d0d0d0"],angle:"90"}},margin:{top:0,right:15,bottom:0,left:0},padding:0,orientation:"left",align:"left",hAlign:"left",rotation:0,wordBreak:"break-all"},titleSeparator:{enabled:!1,width:"100%",height:1,margin:{top:3,right:0,bottom:3,left:0},orientation:"top",fill:["#000 0","#000","#000 0"],stroke:"none"}},scales:[{type:"linear"}],yScale:0,zIndex:10,yAxes:[{}],crosshair:{zIndex:201,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},dataArea:{zIndex:10,background:{fill:"none"}},baseline:0,weight:null},padding:[20,30,20,60],plots:[{}],eventMarkers:{stickToLeft:!0,normal:{type:"circle",width:22,height:22,fill:"#515151",stroke:"#515151",fontColor:"#fff",adjustFontSize:!0,minFontSize:6,maxFontSize:20,fontSize:null,format:"A",hAlign:"center",vAlign:"middle",fontPadding:2,connector:{length:5,stroke:"#455a64"}},hovered:{fill:t.FN},selected:{fill:"#dd2c00"},tooltip:{title:{fontColor:"#fff",enabled:!0},titleFormat:function(){var e=t.us(this.date,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")));return this.title?this.title+" ("+e+")":e},format:function(){return this.description||this.symbol},fontColor:"#fff",separator:!0},direction:"auto",position:"axis",seriesId:"0",fieldName:"value"},scroller:{defaultSeriesSettings:{base:{enabled:!0,normal:{fill:"#999 0.6",stroke:"#999 0.6",lowStroke:"#999 0.6",highStroke:"#999 0.6"},selected:{fill:t.zN,stroke:t.zN,lowStroke:t.zN,highStroke:t.zN},pointWidth:"75%"},marker:{normal:{fill:"#999 0.6",stroke:"#999 0.6"},selected:{fill:t.zN,stroke:t.zN}},areaLike:{normal:{fill:"#999 0.6"}},barLike:{normal:{fill:"#999 0.6"}},candlestick:{normal:{risingFill:"#999 0.6",risingStroke:"#999 0.6",fallingFill:"#999 0.6",fallingStroke:"#999 0.6"},selected:{risingFill:"#64b5f6",risingStroke:"#64b5f6",fallingFill:"#ef6c00",fallingStroke:"#ef6c00"}},ohlc:{normal:{risingStroke:"#999 0.6",fallingStroke:"#999 0.6"},selected:{risingStroke:"#64b5f6",fallingStroke:"#ef6c00"}},stick:{normal:{stroke:"#999 0.6"},selected:{stroke:t.IN}},jumpLine:{normal:{stroke:"#999 0.6"},selected:{stroke:t.IN}}},enabled:!0,fill:"none",selectedFill:"#1976d2 0.2",outlineStroke:"#cecece",height:40,minHeight:null,maxHeight:null,zIndex:40,xAxis:{background:{enabled:!1},labels:{enabled:!0,fontSize:"11px",padding:5,anchor:"left-top",format:function(){return t.us(this.dataValue,t.ss(t.rs(this.majorIntervalUnit)))}},minorLabels:{enabled:!0,anchor:"left-top",fontSize:"11px",padding:5,format:function(){return t.us(this.dataValue,t.ss(t.rs(this.minorIntervalUnit,this.majorIntervalUnit)))}},ticks:{position:"center",length:"100%"},minorTicks:{enabled:!0,stroke:"#cecece",position:"center",length:"100%"},zIndex:75,showHelperLabel:!0}},splitters:{enabled:!0,normal:{stroke:"1 #ddd 0.5"},hovered:{stroke:"1 #ddd 0.8"},preview:{fill:"#000 0.1"}},plotsManualBounds:!1,tooltip:{allowLeaveScreen:!0,displayMode:"union",title:{fontSize:13},titleFormat:n},a11y:{titleFormat:t.NN},zoomMarqueeFill:"#d3d3d3 0.4",zoomMarqueeStroke:"#d3d3d3",interactivity:{allowPlotDrag:!0,zoomOnMouseWheel:!1,scrollOnMouseWheel:!1},crosshair:{enabled:!0,displayMode:"sticky",xLabels:[{enabled:null}],yLabels:[{enabled:null}],xStroke:"#969EA5",yStroke:"#969EA5"}}})}.call(this,$)),_.theme_treemap||(_.theme_treemap=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{treeMap:{sort:"desc",labelsDisplayMode:"clip",headersDisplayMode:"always-show",colorRange:{zIndex:50},colorScale:{type:"ordinal-color"},tooltip:{enabled:!0,titleFormat:t.xN,format:t.wN},legend:{itemsSourceMode:"categories"},maxDepth:1,hintDepth:0,hintOpacity:.4,maxHeadersHeight:"25",normal:{fill:function(){return this.colorScale?this.colorScale.valueToColor(this.value):t.Ul(this.sourceColor,.85,!0)},stroke:"#e0e0e0",hatchFill:!1,labels:{enabled:!0,hAlign:"center",vAlign:"middle",position:"center",anchor:"center",fontColor:"#212121",format:function(){return(this.name||this.getData("id"))+"\n"+t.vN(this.value)}},markers:{enabled:!1,position:"center",size:6,fill:"#dd2c00",type:"circle"},headers:{enabled:!0,hAlign:"center",vAlign:"middle",position:"center",anchor:"center",background:{enabled:!0,fill:"#F7F7F7",stroke:"#e0e0e0"},format:t.xN}},hovered:{fill:t.FN,stroke:t.EN,hatchFill:!1,labels:{enabled:null,fontWeight:"bold"},markers:{enabled:null,size:8},headers:{enabled:!0,fontColor:"#333 0.85",background:{fill:"#e0e0e0",stroke:"#e0e0e0"}}},selected:{fill:"#333 0.85",stroke:"1.5 #212121",hatchFill:!1,labels:{enabled:null,fontColor:"#fafafa"},markers:{enabled:null,size:8,fill:"#333 0.85",stroke:"1.5 #212121"}}}})}.call(this,$)),_.linear_gauge_part||(_.linear_gauge_part=1,function(t){var e=function(e,i){return t.zk(F,e,i||"bar")},i=function(e){t.ix.call(this,e)},n=function(){t.Sy.call(this),t.T(this.ua,[["width",this.se,9],["offset",16,9]])},s=function(e,i){t.EA.call(this,e,i)},a=function(e){t.Y.call(this),this.Wk=e,t.T(this.ua,[["width",16,9],["offset",16,9],["from",20,9],["to",20,9],["points",16,1],["fill",16,1],["stroke",16,1]])},o=function(t,e){return t.height-e.height},r=function(t,e,i,n){var s=t.xa();if(s){e=t.Qe(e,n,!s);var a=t.Qe(i,n,s)}else a=t.Qe(e,n,!s),e=t.Qe(i,n,s);return[e,a]},l=function(){t.Y.call(this),this.Hr=["value"],this.state=new i(this),this.o=t.kn(0,0,0,0),this.b=this.path=null,this.qc=8208,t.T(this.ua,[["name",0,64],["width",16,9],["offset",16,9]]);var e={};t.T(e,[["fill",16,65],["stroke",16,65],["hatchFill",16,65],["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),e={},t.T(e,[["fill",0,0],["stroke",0,0],["hatchFill",0,0],["labels",0,0]]),this.za=new t.my(this,e,t.vo),this.Ea=new t.my(this,e,t.wo),this.Uc=t.cm("fill",1,!0),this.ud=t.cm("stroke",2,!0),this.ec=t.cm("hatchFill",3,!0),this.data(null)},h=function(){l.call(this)},c=function(){function e(t){return function(){g(this,t)}}function i(t,e){return e!=t&&e}l.call(this),this.D={},this.qc|=1048576,this.K="",t.T(this.ua,[["dimmer",16,1,0],["gap",16,1,0,e("g"),this,i],["size",16,1,0,e("s"),this,i],["count",16,1,0,e("c"),this,function(t,e){return e!=t&&!(0,window.isNaN)(e)}]])},u=function(e){for(var i in e.D)t.qd(e.D[i][0]);e.D={}},d=function(t,e){var i=t.ja();if(t.xa()){var n=i.Va();i=-i.height}else n=i.left,i=i.width;return(e-n)/i},p=function(e){var i=e.g("gap"),n=e.g("size"),s=e.g("count");t.p(i)&&null!==i&&g(e,"g"),t.p(n)&&null!==n&&g(e,"s"),t.p(s)&&null!==s&&g(e,"c")},g=function(t,e){var i=t.K;if(2>i.length)t.K+=e;else if(i.charAt(1)!=e){var n=i.charAt(0);if(i=(i+e).slice(1),t.K=i,n!=e)switch(n){case"g":t.ta("gap",null);break;case"s":t.ta("size",null);break;case"c":t.ta("count",null)}}},f=function(){l.call(this)},b=function(e,i){return t.p(i)?(e.WF=i,e):e.WF},v=function(){l.call(this),this.Hr=["high","low"]},m=function(){l.call(this),this.ea=this.fb=this.$a=this.sb=this.ba=this.Ha=this.Ba=this.na=this.Ka=this.aa=this.G=this.D=null,t.uy(this.ca,[["emptyFill",16,65],["emptyHatchFill",16,65]]);var e=[["emptyFill",0,0],["emptyHatchFill",0,0]];t.uy(this.za,e),t.uy(this.Ea,e),this.Od=t.cm("emptyFill",1,!0),this.me=t.cm("emptyHatchFill",3,!0)},y=function(t){return 0>=t?0:t*Math.round(1e15*Math.sin(90*Math.PI/180))/1e15},S=function(t,e,i){if(t.xa()){t=i.width/2;var n=.1488095238*i.width,s=i.left+i.width,a=i.top+i.height;e.moveTo(i.left,i.top).Ff(s,i.top,t,n,!1,!0).lineTo(s,a).Ff(i.left,a,t,n,!1,!0)}else t=.1488095238*i.height,n=i.height/2,s=i.top+i.height/2+y(n),e.moveTo(i.left+(0>=t?0:t*Math.round(1e15*Math.cos(90*Math.PI/180))/1e15),s).Ff(i.left,i.top,t,n,!0,!0).lineTo(i.left+i.width,i.top).Ff(i.left+i.width,s,t,n,!1,!0)},w=function(t,e,i){if(t.xa()){t=i.width/2;var n=.1488095238*i.width;e.moveTo(i.left,i.top),e.Ff(i.left,i.top-.1,t,n,!0,!1)}else{t=.1488095238*i.height,n=i.height/2;var s=i.top+i.height/2+y(n);e.moveTo(i.left+i.width+1.5,i.top+1),e.Ff(i.left+i.width+1.5,s,t,n,!0,!1)}},x=function(t,e,i){if(t.xa())e.moveTo(i.left,i.top),e.Ff(i.left,i.top-.1,i.width/2,.1488095238*i.width,!0,!1);else{t=.1488095238*i.height;var n=i.height/2;e.moveTo(i.left+i.width-1,i.top),e.Ff(i.left+i.width-1+.1,i.top,t,n,!0,!1)}},C=function(){l.call(this),t.T(this.ua,[["bulbRadius",16,9],["bulbPadding",16,9]])},D=function(e,i){t.Bx.call(this),this.Ga("linearGauge"),this.f=[],this.b=[],this.o=[],this.D=0,this.data(e||null,i),t.T(this.ua,[["globalOffset",4,1],["layout",4,1],["defaultPointerType",0,0]]),t.wr(this,"tooltip")},T=function(e,i){return t.xa(e.b,(function(t){return t.id()==i}))},k=function(t){for(var e=t.b.length;e--;)t.b[e].B(1056784)},$=function(t,e){return new s(t,e)},O=function(t,e){var i=new D;return i.data(t,e),i.ta("defaultPointerType","bar"),i.re="linear-gauge",i},P=function(t,e){var i=new D;return i.Ga("thermometer"),i.data(t,e),i.ta("defaultPointerType","thermometer"),i.re="thermometer",i},L=function(t,e){var i=new D;return i.Ga("tank"),i.data(t,e),i.ta("defaultPointerType","tank"),i.re="tank",i},G=function(t,e){var i=new D;return i.Ga("led"),i.data(t,e),i.ta("defaultPointerType","led"),i.re="led",i},F={kF:"bar",qZ:"range-bar",av:"marker",usa:"thermometer",ssa:"tank",rpa:"led"};t.H(i,t.ix),i.prototype.Lh=function(e,i,n){var s;if(t.p(i)){var a=this.target.$().Hb(),o=!0;if(t.A(i))for(t.Pa(i),s=i.length;s--;){var r=+i[s];r<a&&(t.lx(this,e,r,n),o=!1)}else+i<a&&(t.lx(this,e,+i,n),o=!1);o||this.target.wm()}else if(!(this.Gc&e)){for(i=t.gm,e==t.gm||e==t.vo?i=t.vo:e==t.wo&&(i=t.wo|t.vo),s=this.b.length;s--;)t.px(this,i,s)&&(this.target.$().select(this.f[s])&&this.target.pk(t.gm),t.Ca(this.b,s,1),t.Ca(this.f,s,1));this.target.wm(),t.kx(this)&&(this.target.pf()&&t.kx(this,0)&&this.target.ml(e),this.Gc=e)}},i.prototype.Vh=function(e,i){var n;if(t.p(i)){if(t.A(i))for(t.Pa(i),n=i.length;n--;)t.rx(this,e,+i[n]);else if((0,window.isNaN)(i))for(n=this.f.length;n--;)t.jx(this,e,n);else t.rx(this,e,+i);this.target.wm(),this.target.eh()||"single"!=this.target.Xl()||this.target.ml(t.mx(this,t.wo)?t.wo:t.mx(this,t.vo)?t.vo:t.gm)}else{for(n=this.b.length;n--;)t.px(this,e,n)&&(this.target.$().select(this.f[n])&&this.target.pk(t.gm),t.Ca(this.f,n,1),t.Ca(this.b,n,1));this.target.wm(),this.Gc&=~e,this.target.pf()&&t.kx(this,0)&&this.target.ml(this.Gc)}},t.H(n,t.Sy),n.prototype.bG=function(t){return t},n.prototype.WT=function(){return 7};var I={};t.sq(I,[[0,"width",t.zo],[0,"offset",t.zo]]),t.U(n,I),n.prototype.F=function(){var e=n.u.F.call(this);return t.Tq(this,I,e,"Axis"),e},n.prototype.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,I,e,i)},t.H(s,t.EA),s.prototype.lb=function(e){var i=this.xc().nU(this.index),n=t.tx(i.state,t.vo,0);return t.p(e)&&n!=e?(e?i.$i():i.Md(),this):n},s.prototype.selected=function(e){var i=this.xc().nU(this.index),n=t.tx(i.state,t.wo,0);return t.p(e)&&n!=e?(e?i.Ii():i.ie(),this):n};var E=s.prototype;E.hovered=E.lb,E.selected=E.selected,t.H(a,t.Y),a.prototype.sa=16|t.Y.prototype.sa;var A={};t.sq(A,[[0,"width",t.zo],[0,"offset",t.zo],[0,"from",t.Cq],[0,"to",t.Cq],[0,"points",t.Cq],[1,"fill",t.Qq],[1,"stroke",t.Pq]]),t.U(a,A),t.g=a.prototype,t.g.scale=function(e){return t.p(e)?t.J(e,t.kt)?(this.qa!=e&&(this.qa&&t.kr(this.qa,this.ii,this),(this.qa=e)&&t.K(this.qa,this.ii,this),this.B(16,5)),this):(t.il(5,void 0,["ScaleBar scale","scatter","linear, log"]),this):(this.qa||(this.qa=this.Wk.scale(),t.K(this.qa,this.ii,this)),this.qa)},t.g.ii=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)?i|=1:this.va(i),this.B(16,i)},t.g.kd=function(e){if(t.p(e)){if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||this.B(16,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(16,1)},t.g.uo=function(){this.B(20)},t.g.we=function(e){return t.p(e)?(this.f=e,this):this.f},t.g.xa=function(){return"vertical"==this.f},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.vj=function(e,i){var n=this.scale();return t.z(e)?"min"==(e=e.toLowerCase())?n.transform(n.uh()):"max"==e?n.transform(n.di()):(0,window.parseFloat)(t.zo(e))/100:t.ea(e)?(e=n.transform(e),t.Za(e,0,1)):i},t.g.Qe=function(e,i,n){return i=t.p(i)?i:this.ja(),(t.p(n)?n:this.xa())?(n=i.Va(),i=-i.height):(n=i.left,i=i.width),n+e*i},t.g.W=function(){if(!this.zc())return this;var e,i=this.O();this.Aa||(this.Aa=t.ok());var n=this.g("points");if(n||(n=[],this.ta("points",n)),t.Pa(n,o),n[0]&&0==n[0].height||n.unshift({height:0,left:0,right:0}),n[n.length-1]&&1==n[n.length-1].height||n.push({height:1,left:0,right:0}),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(i),this.I(2)),this.J(4)){if((i=this.vj(this.g("from"),0))>(n=this.vj(this.g("to"),1))){var s=i;i=n,n=s}this.o=this.Qe(i),this.D=this.Qe(n),this.I(4)}var a=this.kd();if(this.J(16)){if(this.i?this.i.clear():this.i=t.qk(),this.b)for(e=0;e<this.b.length;e++)this.b[e].clear();else this.b=[];var l,h=this.ja(),c=this.xa();if(c){s=(i=h.left)+(e=h.width),n=this.D,h=this.o;var u=Math.abs(h-n)}else i=this.o,s=this.D,e=Math.abs(i-s),h=(n=h.top)+(u=h.height);!function(t,e){var i,n=t.scale().Ne(),s=t.g("points"),a=n?1-s[0].left:s[0].left,o=n?1-s[0].height:s[0].height;for(o=r(t,a,o,e),t.i.moveTo(o[0],o[1]),i=1;i<s.length;i++)a=n?1-s[i].left:s[i].left,o=n?1-s[i].height:s[i].height,o=r(t,a,o,e),t.i.lineTo(o[0],o[1]);for(i=s.length;i--;)a=n?s[i].right:1-s[i].right,o=n?1-s[i].height:s[i].height,o=r(t,a,o,e),t.i.lineTo(o[0],o[1]);t.i.close()}(this,t.kn(i,n,e,u)),a&&(l=a.Jj());var d=this.scale().Ne();if(e=this.g("fill"),u=this.g("stroke"),null!=e||null!=u)(a=this.b[0]?this.b[0]:this.b[0]=this.Aa.path()).moveTo(i,n).lineTo(s,n).lineTo(s,h).lineTo(i,h).lineTo(i,n).close(),a.fill(e||null),a.stroke(u||null),a.clip(this.i);else if(t.J(a,t.fz)){var p=(0,t.Wa)(l,(function(t){return t.offset}));l=d?a.Jj().reverse():a.Jj(),d&&(l=(0,t.Wa)(l,(function(t,e){var i={};return i.color=t.color,i.offset=p[e],i.opacity=t.opacity,i}))),(e=t.Ub(l)).angle=c?90:0,(a=this.b[0]?this.b[0]:this.b[0]=this.Aa.path()).moveTo(i,n).lineTo(s,n).lineTo(s,h).lineTo(i,h).lineTo(i,n).close(),a.fill(e).stroke("none"),a.clip(this.i)}else if(t.J(a,t.iz)){a.Of()&&a.Bg().Xc(0,1).Hg(),u=a.sr(),d=this.scale();var g=u.length-1;for(e=0;e<g;e++){var f=u[e],b=f.color||l[f.sourceIndex]||l[l.length-1];(a=this.b[e]?this.b[e]:this.b[e]=this.Aa.path()).clear();var v=t.p(f.start)?f.start:d.uh();f=t.p(f.end)?f.end:d.di(),v=this.Qe(d.transform(v)),f=this.Qe(d.transform(f)),(0,window.isNaN)(v)||(0,window.isNaN)(f)||(c?a.moveTo(i,v).lineTo(i,f+.5).lineTo(s,f+.5).lineTo(s,v).close():a.moveTo(v,n).lineTo(f+.5,n).lineTo(f+.5,h).lineTo(v,h).close(),a.fill(b).stroke("none"))}this.Aa.clip(this.i)}this.I(16)}return this},t.g.F=function(){var e=a.u.F.call(this);return t.Tq(this,A,e,"ScaleBar"),this.kd()&&(e.colorScale=this.kd().F()),e},t.g.U=function(e,i){if(a.u.U.call(this,e,i),t.Iq(this,A,e,i),"colorScale"in e){var n=e.colorScale,s=null;t.z(n)?s=t.dt(n,null):t.C(n)&&(s=t.dt(n.type,null))&&s.N(n),s&&this.kd(s)}},t.g.R=function(){this.b&&(t.sd(this.b),this.b=null),t.qd(this.vb),this.vb=null,t.qd(this.i),this.i=null,this.qa&&t.kr(this.qa,this.ii,this),this.qa=null,a.u.R.call(this)};var U=a.prototype;U.scale=U.scale,U.colorScale=U.kd,t.H(l,t.Y),t.Gq(l,["fill","stroke","hatchFill","labels"],"normal"),t.g=l.prototype,t.g.ra=68|t.Y.prototype.ra,t.g.sa=8208|t.Y.prototype.sa,t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.gm),this.sd=null,t.J(e,t.Cr)?this.i=this.gm=e.Ui():t.J(e,t.Mr)?this.i=this.gm=e.Yd():this.i=null===e?null:(this.gm=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.i&&t.K(this.i,this.dd,this),this.B(1048592,5)),this):this.i},t.g.dd=function(e){t.X(e,16)&&this.B(16,1)},t.g.xs=function(){var t=this.$(),e=[];if(t.select(this.Ch()))for(var i=0;i<this.Hr.length;i++)e.push(t.get(this.Hr[i]));return e},t.g.ma=function(){return this.md?-1:(0,t.za)(this.Te.Ue(),this)},t.g.yh=function(e){return t.p(e)?(this.Wq=e,this):this.Wq},t.g.id=function(e){return t.p(e)?(this.he=e,this):this.he||String(this.Wq)},t.g.Ch=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.B(16,1)),this):null!=this.P?this.P:this.i?0:this.yh()},t.g.Ffa=function(){return this.Wk()},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.$=function(){return this.i?this.sd||(this.sd=this.i.$()):this.Te.$()},t.g.Ec=function(){return this.i?this.sd=this.i.$():this.Te.Ec()},t.g.we=function(e){return t.p(e)?(this.f=e,this):this.f},t.g.scale=function(e){return t.p(e)?t.J(e,t.kt)?(this.qa!=e&&(this.qa&&t.kr(this.qa,this.zg,this),(this.qa=e)&&t.K(this.qa,this.zg,this),this.B(16,1)),this):(t.il(5,void 0,["Pointer scale","scatter","linear, log"]),this):(this.qa||this.scale(this.Te.scale()),this.qa)},t.g.zg=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)?i|=1:this.va(i),this.B(16,i)},t.g.xa=function(){return"vertical"==this.f},t.g.zk=function(){var t=this.$().get("value");return(0,window.isNaN)(this.scale().transform(t))},t.g.vR=function(){var t=this.scale(),e=t.uh();return t.transform(e)},t.g.iv=function(){var e=this.$();return e.select(this.Ch()),e=e.get("value"),t.Za(this.scale().transform(e),0,1)},t.g.de=function(e){t.X(e,1)&&this.B(8192,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.sc=function(e,i,n,s,a,o,r){return a=(0==i?this.ca:1==i?this.za:this.Ea).g(e),r?e=a:(r=n.get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),a)),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){return this.VF||t.Yb("diagonal-brick")},t.g.Yi=function(){return{index:this.$().ma(),isVertical:this.xa(),sourceHatchFill:this.Eh()}},t.g.Ge=function(t){return{index:this.$().ma(),isVertical:this.xa(),sourceColor:t=t||this.color()}},t.g.color=function(e,i,n,s,a,o,r){if(t.p(e)){var l=null===e?null:t.Ub.apply(null,arguments);return this.Sb!=l&&(this.Sb=l,this.B(16,65)),this}return this.Sb||this.Hd||"blue"},t.g.Kq=function(t){this.Hd=t},t.g.dx=function(e){this.VF=t.Yb(e)},t.g.uo=function(){this.B(this.qc)},t.g.Qe=function(t){var e=this.ja();if(this.xa()){var i=e.Va();e=-e.height}else i=e.left,e=e.width;return i+t*e},t.g.pU=function(){return[0,0,0,0]},t.g.qD=function(e){var i=this.Ls();i.I(i.sa);var n=i.F(),s={sourceColor:this.color()};if(t.D(i.Gs())&&(n.iconFill=i.Gs().call(s,s)),t.D(i.Is())&&(n.iconStroke=i.Is().call(s,s)),t.D(i.Hs())&&(s.sourceColor=this.VF,n.iconHatchFill=i.Hs().call(s,s)),t.D(e)){i=this.RC();var a=e.call(i,i)}return t.z(a)||(a=t.p(this.g("name"))?this.g("name"):"Pointer: "+this.yh()),n.iconType=this.pD(n.iconType),e={meta:{},text:a,iconEnabled:!0,iconStroke:this.ud(this,t.gm,!0),iconFill:this.Uc(this,t.gm,!0),iconHatchFill:this.ec(this,t.gm,!0),disabled:!this.enabled()},t.Sc(e,n),e},t.g.pD=function(e){return t.Vk(e)},t.g.RC=function(){return this.qu||(this.qu=new t.Fw(void 0,void 0,[this])),this.qu},t.g.Ls=function(e){return this.vp||(this.vp=new t.cB,t.W(this,"legendItem",this.vp),t.K(this.vp,this.NW,this)),t.p(e)?(this.vp.N(e),this):this.vp},t.g.NW=function(e){var i=64,n=!1;t.X(e,8)&&(i|=8,n=!0),this.va(i,n)},t.g.remove=function(){this.Aa&&this.Aa.parent(null),this.Qa().labels()&&this.Qa().labels().remove()},t.g.Lt=t.ia,t.g.aD=t.ia,t.g.fG=function(t){var e=this.Uc(this,t,!1),i=this.ud(this,t,!1);t=this.ec(this,t,!1),this.path.fill(e),this.path.stroke(i),this.b.fill(t),this.b.stroke("none")},t.g.FS=function(){this.path?this.path.clear():(this.path=this.Aa.path(),this.qC(this.path)),this.b?this.b.clear():(this.b=this.Aa.path(),this.b.Dd(!0))},t.g.tf=function(e){var i,n=this.$(),s=!!(e&t.wo),a=!s&&!!(e&t.vo),o=this.Qa().labels(),r=this.lb().labels(),l=this.selected().labels();i=s?l:a?r:null;var h=this.Qa().labels().be(0),c=n.get("normal");c=t.p(c)?c.label:void 0;var u=n.get("hovered");u=t.p(u)?u.label:void 0;var d=n.get("selected");d=t.p(d)?d.label:void 0,c=t.Zo(c,n.get("label")),u=a?t.Zo(u,n.get("hoverLabel")):null,n=s?t.Zo(d,n.get("selectLabel")):null,d=c&&t.p(c.enabled)?c.enabled:null;var p=n&&t.p(n.enabled)?n.enabled:null,g=u&&t.p(u.enabled)?u.enabled:null;if(a||s?a?null===g?null===r.enabled()?null===d?o.enabled():d:r.enabled():g:null===p?null===l.enabled()?null===d?o.enabled():d:l.enabled():p:null===d?o.enabled():d){e=!(s=!!(e&t.wo))&&!!(e&t.vo),d=(r=this.$()).get("normal"),d=t.p(d)?d.label:void 0,p=r.get("hovered"),p=t.p(p)?p.label:void 0,l=r.get("selected"),l=t.p(l)?l.label:void 0,d=t.Zo(d,r.get("label")),p=e?t.Zo(p,r.get("hoverLabel")):null,g=s?t.Zo(l,r.get("selectLabel")):null,r=d&&d.position?d.position:null,l=p&&p.position?p.position:null,d=g&&g.position?g.position:null,p=this.Qa().labels(),g=this.lb().labels();var f=this.selected().labels();s=e||s?e?l||(g.g("position")?g.g("position"):r||p.g("position")):d||(f.g("position")?f.g("position"):r||p.g("position")):r||p.g("position"),s=function(t,e){var i=t.scale().Ne();if(t.xa()){if(!i)return e;switch(e){case"left-top":return"left-bottom";case"left-center":return"left-center";case"left-bottom":return"left-top";case"center-top":return"center-bottom";case"center":return"center";case"center-bottom":return"center-top";case"right-top":return"right-bottom";case"right-center":return"right-center";case"right-bottom":return"right-top"}}switch(e){case"left-top":return i?"left-top":"right-top";case"left-center":return"center-top";case"left-bottom":return i?"right-top":"left-top";case"center-top":return i?"left-center":"right-center";case"center":return"center";case"center-bottom":return i?"right-center":"left-center";case"right-top":return i?"left-bottom":"right-bottom";case"right-center":return"center-bottom";case"right-bottom":return i?"right-bottom":"left-bottom"}return e}(this,t.Ek(s)),s={value:t.Eo(this.o,s)},e=this.Ic(),h?(t.Yu(o,0),h.Hf(e),h.jc(s)):h=o.add(e,s,0),h.Hi(),t.$u(h,i),h.td(c,a?u:n),h.W()}else h&&o.clear(h.ma())},t.g.W=function(){if(!this.zc())return this;var e=this.O();this.Aa||(this.Aa=t.ok(),t.ru(this,this.Aa));var i=this.Qa().labels();return this.J(8)&&(this.Aa.zIndex(this.zIndex()),i&&i.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(e),i&&i.O(e),this.I(2)),this.J(4)&&this.I(4),e=this.$(),this.J(16)&&(this.FS(),e.select(this.Ch())&&!this.zk()&&(this.xa()?this.Lt():this.aD(),this.fG(t.nx(this.state,0))),this.I(16)),this.J(8192)&&(e.select(this.Ch())?(this.tf(t.nx(this.state,0)),i.W()):i.clear(),this.I(8192)),this},t.g.Xl=function(e){return t.p(e)?this:this.Te.gd().g("hoverMode")},t.g.ej=function(e){return t.p(e)?((e=null===e?null:t.Bk(e))!=this.et&&(this.et=e),this):this.et},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.ml=function(t){this.fG(t)},t.g.pk=function(t,e){return this.fG(t),this.tf(t),e},t.g.pq=t.ia,t.g.wm=t.ia,t.g.aj=function(){return!0},t.g.qC=function(t){t&&(t.tag={X:this,index:0})},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(t){var e=t.type;switch(e){case"mouseout":e="pointmouseout";break;case"mouseover":e="pointmouseover";break;case"mousemove":e="pointmousemove";break;case"mousedown":e="pointmousedown";break;case"mouseup":e="pointmouseup";break;case"click":case"touchstart":e="pointclick";break;case"dblclick":e="pointdblclick";break;default:return null}t.pointIndex=0;var i=this.Ec();return i.select(this.Ch())||i.reset(),{type:e,actualTarget:t.target,series:this,iterator:i,pointIndex:0,target:this,originalEvent:t}},t.g.Ic=function(e){this.$().select(this.Ch()),this.oe&&!e||(this.oe=new t.Fw);var i={pointer:{value:this,type:""},index:{value:(e=this.$()).ma(),type:"number"},value:{value:e.get("value"),type:"number"},name:{value:this.g("name")||"Pointer "+this.yh(),type:"string"},high:{value:e.get("high"),type:"number"},low:{value:e.get("low"),type:"number"}};return this.oe.lg(e),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.Md=function(){var e;return(e=!t.mx(this.state,t.vo))&&(e=!(this.state.fk()&t.vo)),e||!this.enabled()||this.state.Vh(t.vo,this.state.Gc==t.gm?window.NaN:void 0),this},t.g.$i=function(e){return this.enabled()?(null!=e||(e=0),t.ea(e)&&(this.Md(),t.qx(this.state,0)),this):this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo)},t.g.ie=function(){return this.enabled()?(this.state.Vh(t.wo,this.state.Gc==t.gm?window.NaN:void 0),this):this},t.g.Ii=function(e,i){return this.enabled()?(null!=e||(e=0),t.p(i)&&(n=!(i&&i.shiftKey)),t.ea(e)&&this.state.Lh(t.wo,0,n?t.vo:void 0),this):this;var n},t.g.Gu=function(){this.enabled()&&this.state.Lh(t.wo)};var _={};t.sq(_,[[0,"name",t.Cq],[0,"width",t.zo],[0,"offset",t.zo]]),t.U(l,_),l.prototype.F=function(){var e=l.u.F.call(this);return t.Tq(this,_,e,"Pointer"),e.pointerType=this.Ma(),this.i&&(e.data=this.data().F()),t.p(this.P)&&(e.dataIndex=this.P),e.legendItem=this.Ls().F(),this.he&&(e.id=this.id()),this.Wq!=this.ma()&&(e.autoIndex=this.yh()),this.Sb&&(e.color=t.Rl(this.Sb)),e.normal=this.Qa().F(),e.hovered=this.lb().F(),e.selected=this.selected().F(),e},l.prototype.U=function(e,i){l.u.U.call(this,e,i),this.id(e.id),this.yh(e.autoIndex),this.Ch(e.dataIndex),"data"in e&&this.data(e.data||null),this.Ls().N(e.legendItem),t.Iq(this,_,e,i),this.color(e.color),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},l.prototype.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},l.prototype.R=function(){t.sd(this.path,this.b),this.b=this.path=null,t.qd(this.Aa),this.Aa=null,this.qa&&t.kr(this.qa,this.zg,this),this.qa=null,t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,t.qd(this.vp),this.vp=null,l.u.R.call(this)};var j=l.prototype;j.scale=j.scale,j.legendItem=j.Ls,j.id=j.id,j.dataIndex=j.Ch,j.getGauge=j.Ffa,j.color=j.color,j.data=j.data,j.normal=j.Qa,j.hovered=j.lb,j.selected=j.selected,j.hover=j.$i,j.unhover=j.Md,j.select=j.Ii,j.unselect=j.ie,t.H(h,l),h.prototype.Ma=function(){return"bar"},h.prototype.xs=function(){var t=h.u.xs.call(this);return t.push(0),t},h.prototype.Lt=function(){var t=this.ja(),e=this.xa(),i=this.scale().Ne();if(e){var n=(e=t.left)+t.width,s=this.Qe(this.iv());t=this.Qe(this.vR()),this.o.left=e,this.o.top=i?t:s}else e=this.Qe(this.vR()),n=this.Qe(this.iv()),t=(s=t.top)+t.height,this.o.left=i?n:e,this.o.top=s;this.o.width=Math.abs(n-e),this.o.height=Math.abs(s-t),this.path.clear().moveTo(e,s).lineTo(n,s).lineTo(n,t).lineTo(e,t).lineTo(e,s).close(),this.b.pe(this.path.F())},h.prototype.aD=h.prototype.Lt,t.H(c,l),t.g=c.prototype,t.g.sa=1048576|l.prototype.sa,t.g.FS=function(){u(this),this.b?this.b.clear():this.b=this.Aa.path().zIndex(99),this.G||(this.G=this.Aa.rect().zIndex(100).stroke("none").fill(t.bm)),this.qC(this.G)},t.g.Lt=function(){u(this),this.J(1048576)&&(this.vb&&(this.vb.Of()?(this.vb.Bg(),this.vb.Xc(this.scale().uh(),this.scale().di()),this.vb.Hg()):(this.vb.Co(),this.vb.Xc(this.scale().uh(),this.scale().di()))),this.I(1048576));var e=this.ja();this.o=e,this.G.Qf(e);var i=this.xa(),n=i?e.height:e.width,s=t.L(this.g("gap"),n),a=t.L(this.g("size"),n),o=t.L(this.g("count"),n);if((0,window.isNaN)(s)||(0,window.isNaN)(a))(0,window.isNaN)(s)||(0,window.isNaN)(o)?(0,window.isNaN)(a)||(0,window.isNaN)(o)||(s=(n-o*a)/(o-1)):a=(n-(o-1)*s)/o;else{var r=n/(n-(n-((o=Math.floor((n+s)/(a+s)))*(a+s)-s)));a*=r,s*=r}var l=null;if(i){n=e.left;var h=e.left+e.width,c=e.top+e.height-a;e=c+a}else h=(n=e.left)+a,c=e.top,e=e.top+e.height;for(var p=this.iv(),g=0;g<o;g++){var f=t.Tm(t.Za(d(this,i?e:n),0,1),7);r=t.Tm(t.Za(d(this,i?c:h),0,1),7);var b=this.qa.Mc(r);b=this.vb.Qq(b),(r=this.qa.Ne()?r<=p:f>=p)&&(f=this.g("dimmer"),b=t.D(f)?f.call({color:b},b):f),f=t.Tl(b),null===b&&(b="none"),null!==l&&b==l||(l=b,f in this.D?this.D[f][0].clear():this.D[f]=[this.Aa.path(),b]),(b=this.D[f][0]).moveTo(n,c).lineTo(h,c).lineTo(h,e).lineTo(n,e).lineTo(n,c),r||this.b.moveTo(n,c).lineTo(h,c).lineTo(h,e).lineTo(n,e).lineTo(n,c),i?c=(e=c-s)-a:h=(n=h+s)+a}},t.g.aD=c.prototype.Lt,t.g.fG=function(t){var e;for(e in this.D){var i=this.D[e];i[0].stroke("none").fill(i[1])}t=this.ec(this,t,!1),this.b.stroke("none").fill(t)},t.g.Ma=function(){return"led"};var M=function(){function e(e){return t.zo(e,!0)}var i={};return t.sq(i,[[0,"dimmer",t.am],[0,"gap",e],[0,"size",e],[0,"count",function(e){return t.P(e,window.NaN)}]]),i}();t.U(c,M),t.g=c.prototype,t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(1048592,1);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,t.W(this,"colorScale",this.vb),this.vb.da(i),i||this.B(1048592,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(1048592,1)},t.g.F=function(){var e=c.u.F.call(this);return e.colorScale=this.kd().F(),t.Tq(this,M,e,"Led pointer"),e},t.g.U=function(e,i){if(c.u.U.call(this,e,i),t.Iq(this,M,e,i),p(this),"colorScale"in e){var n=e.colorScale,s=null;t.z(n)?s=t.dt(n,null):t.C(n)&&(s=t.dt(n.type,null))&&s.N(n),s&&this.kd(s)}},t.g.R=function(){t.qd(this.G),this.G=null,u(this),c.u.R.call(this)};var N=c.prototype;N.colorScale=N.kd,t.H(f,l),t.g=f.prototype,t.g.Lt=function(){var e=this.ja(),i=t.zp(this.type()),n=this.xa();if(n)var s=e.left+e.width/2,a=this.Qe(this.iv());else s=this.Qe(this.iv()),a=e.top+e.height/2;e=n?e.width:e.height,this.o.left=s-e/2,this.o.top=a-e/2,this.o.width=e,this.o.height=e,this.path.clear(),i.call(null,this.path,s,a,e/2),this.b.pe(this.path.F())},t.g.aD=f.prototype.Lt,t.g.Ma=function(){return"marker"},t.g.type=function(e){return t.p(e)?(this.re!=e&&(null===e||(e=t.Ok(e,"star5")),this.re=e,this.B(16,1)),this):this.re||this.WF},t.g.U=function(t,e){f.u.U.call(this,t,e),this.type(t.type)},t.g.F=function(){var t=f.u.F.call(this);return this.re&&(t.type=this.type()),t};var B=f.prototype;B.type=B.type,t.H(v,h),t.g=v.prototype,t.g.Ma=function(){return"range-bar"},t.g.zk=function(){var t=this.$(),e=this.scale();return(0,window.isNaN)(e.transform(t.get("high")))||(0,window.isNaN)(e.transform(t.get("low")))},t.g.vR=function(){var e=this.$();return e.select(this.Ch()),e=e.get("low"),t.Za(this.scale().transform(e),0,1)},t.g.iv=function(){var e=this.$();return e.select(this.Ch()),e=e.get("high"),t.Za(this.scale().transform(e),0,1)},t.g.xs=function(){var t=v.u.xs.call(this);return t.pop(),t},t.H(m,l),t.Gq(m,["emptyFill","emptyHatchFill"],"normal"),t.g=m.prototype,t.g.Ma=function(){return"tank"},t.g.pU=function(e){var i,n,s;e=.1488095238*t.L(this.g("width"),e);var a=i=n=s=0;return this.xa()?i=s=e:a=n=e,[a,i,n,s]},t.g.Mm=function(){var e=this.xa(),i=this.ja(),n=this.scale(),s=n.Ne(),a=this.Qe(this.iv()),o=this.Qe(n.transform(n.uh()));n=this.Qe(n.transform(n.di())),e?s?(this.K=t.kn(i.left,o,i.width,a-o),this.Za=t.kn(i.left,a,i.width,n-a)):(this.K=t.kn(i.left,a,i.width,o-a),this.Za=t.kn(i.left,n,i.width,a-n)):s?(this.K=t.kn(a,i.top,o-a,i.height),this.Za=t.kn(n,i.top,a-n,i.height)):(this.K=t.kn(o,i.top,a-o,i.height),this.Za=t.kn(a,i.top,n-a,i.height)),this.o=this.K},t.g.FS=function(){this.D||(this.D=this.Aa.Bd()),this.G||(this.G=this.Aa.Bd()),this.scale().Ne()?(this.G.zIndex(0),this.D.zIndex(1)):(this.D.zIndex(0),this.G.zIndex(1)),this.aa?this.aa.clear():this.aa=this.D.path().zIndex(0),this.Ka?this.Ka.clear():this.Ka=this.D.path().zIndex(1),this.na?this.na.clear():this.na=this.D.path().zIndex(2),this.Ba?this.Ba.clear():this.Ba=this.D.path().zIndex(3),this.Ha?this.Ha.clear():this.Ha=this.D.path().zIndex(4),this.ba?this.ba.clear():this.ba=this.G.path().zIndex(0),this.sb?this.sb.clear():this.sb=this.G.path().zIndex(1),this.$a?this.$a.clear():this.$a=this.G.path().zIndex(2),this.fb?this.fb.clear():this.fb=this.G.path().zIndex(3),this.b?this.b.clear():this.b=this.Aa.path(),this.ea?this.ea.clear():this.ea=this.G.path(),this.qC(this.Aa)},t.g.Lt=function(){this.Mm(),S(this,this.aa,this.K),w(this,this.Ka,this.K);var t=this.na,e=this.K;if(this.xa()){var i=e.width/2,n=.1488095238*e.width,s=e.left+e.width,a=e.top+e.height;t.moveTo(e.left,a-1),t.Ff(s,a,i,n,!1,!1)}else i=.1488095238*e.height,n=e.height/2,s=e.top+e.height/2+y(n),t.moveTo(e.left+1,e.top),t.Ff(e.left,s,i,n,!1,!1);S(this,this.Ba,this.K),x(this,this.Ha,this.K),S(this,this.ba,this.Za),w(this,this.sb,this.Za),S(this,this.$a,this.Za),x(this,this.fb,this.Za),this.b.pe(this.aa.F()),this.ea.pe(this.ba.F())},t.g.aD=m.prototype.Lt;var R={thickness:1,opacity:.3,color:"#FFFFFF"},H={angle:0,keys:[{color:"#FFFFFF",offset:"0",opacity:0},{color:"#FFFFFF",offset:"0.2",opacity:Number(160/255)},{color:"#FFFFFF",offset:"0.25",opacity:Number(140/255)},{color:"#FFFFFF",offset:"0.3",opacity:Number(30/255)},{color:"#FFFFFF",offset:"0.35",opacity:0},{color:"#FFFFFF",offset:"1",opacity:0}]},z={angle:0,keys:[{color:"#FFFFFF",offset:"0",opacity:0},{color:"#FFFFFF",offset:"0.2",opacity:.3*Number(160/255)},{color:"#FFFFFF",offset:"0.25",opacity:.3*Number(140/255)},{color:"#FFFFFF",offset:"0.3",opacity:.3*Number(30/255)},{color:"#FFFFFF",offset:"0.35",opacity:0},{color:"#FFFFFF",offset:"1",opacity:0}]};m.prototype.fG=function(e){var i=this.xa(),n=i?0:90,s=this.Uc(this,e,!1),a=t.Vl(s),o=t.Ql(s);o=t.z(o)?o:o.color,s=t.Pl(s),s={angle:n,keys:[{color:o,offset:"0",opacity:a},{color:o,offset:"0.05",opacity:a},{color:s=t.z(s)?s:s.color,offset:"0.85",opacity:a},{color:s,offset:"0.85",opacity:a},{color:o,offset:"1",opacity:a}]},this.aa.fill(s),this.aa.stroke("none"),this.Ka.fill("none"),this.Ka.stroke(R),H.angle=n,this.Ba.fill(H),this.Ba.stroke("none"),s={angle:i?50:140,keys:[{color:"#FFFFFF",offset:"0",opacity:.1},{color:o,offset:"1",opacity:1}]},this.Ha.fill(s),this.Ha.stroke("none"),this.na.fill("none"),this.na.stroke(R),a=this.Od(this,e,!1),o=t.Ql(a),o=t.z(o)?o:o.color,s=t.Pl(a),s=t.z(s)?s:s.color,s={angle:-n,keys:[{color:o,offset:"0",opacity:a=t.Vl(a)},{color:o,offset:"0.05",opacity:a},{color:s,offset:"0.85",opacity:a},{color:s,offset:"0.85",opacity:a},{color:o,offset:"1",opacity:a}]},this.ba.fill(s),this.ba.stroke("none"),this.sb.fill("none"),this.sb.stroke(R),z.angle=n,this.$a.fill(z),this.$a.stroke("none"),s={angle:i?50:140,keys:[{color:"#FFFFFF",offset:"0",opacity:.1*a},{color:o,offset:"1",opacity:a}]},this.fb.fill(s),this.fb.stroke("none"),i=this.ec(this,e,!1),this.b.fill(i),this.b.stroke("none"),i=this.me(this,e,!1),this.ea.fill(i),this.ea.stroke("none")},m.prototype.R=function(){this.fb=this.$a=this.sb=this.ba=this.Ha=this.Ba=this.na=this.Ka=this.aa=null,t.sd(this.D,this.G,this.ea),this.ea=this.G=this.D=null,m.u.R.call(this)},t.H(C,l),C.prototype.Lt=function(){var t=this.ja(),e=this.scale().Ne(),i=t.left,n=t.left+t.width,s=this.Qe(this.iv());t=e?t.top-this.D:t.top+t.height+this.D,this.o.left=i,this.o.top=e?t:s,this.o.width=Math.abs(n-i),this.o.height=Math.abs(t-s),this.path.clear().moveTo(i,s).lineTo(n,s).lineTo(n,t).Ff(i,t,this.Gq,this.Gq,!0,!e).lineTo(i,s).close(),this.b.pe(this.path.F())},C.prototype.aD=function(){var t=this.ja(),e=this.scale().Ne(),i=t.top,n=t.top+t.height,s=this.Qe(this.iv());t=e?t.left+t.width+this.D:t.left-this.D,this.o.left=e?s:t,this.o.top=i,this.o.width=Math.abs(t-s),this.o.height=Math.abs(n-i),this.path.clear().moveTo(s,i).lineTo(s,n).lineTo(t,n).Ff(t,i,this.Gq,this.Gq,!0,!e).lineTo(s,i).close(),this.b.pe(this.path.F())},C.prototype.Ma=function(){return"thermometer"},C.prototype.pU=function(e,i){var n,s,a=t.L(this.g("width"),e),o=t.L(this.g("bulbRadius"),a),r=t.L(this.g("bulbPadding"),i);o<a/2&&(o=a/2),this.Gq=o,this.D=r,a=o+Math.sqrt(3)*o/2+r,o=r=n=s=0;var l=this.scale().Ne();return this.xa()?l?r=a:s=a:l?n=a:o=a,[o,r,n,s]};var V={};t.sq(V,[[0,"bulbRadius",t.zo],[0,"bulbPadding",t.zo]]),t.U(C,V),C.prototype.U=function(e,i){C.u.U.call(this,e,i),t.Iq(this,V,e,i)},C.prototype.F=function(){var e=C.u.F.call(this);return t.Tq(this,V,e,"Thermometer"),e},t.H(D,t.Bx),D.prototype.ra=t.Bx.prototype.ra,D.prototype.sa=15503360|t.Bx.prototype.sa;var q={};q.bar=h,q.led=c,q.marker=f,q["range-bar"]=v,q.tank=m,q.thermometer=C;var W={};t.sq(W,[[0,"globalOffset",t.zo],[0,"layout",t.Gk],[0,"defaultPointerType",e]]),t.U(D,W),t.g=D.prototype,t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.yI,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.yI=function(e){t.X(e,2)&&this.B(524800,1)},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(2097664,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(2097664,1)},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.HH,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.HH=function(e){t.X(e,2)&&this.B(4194816,1)},t.g.xa=function(e){return t.p(e)?(this.ta("layout",e?"vertical":"horizontal"),this):"vertical"==this.g("layout")},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.Ue=function(){return this.b},t.g.ts=function(){return[this]},t.g.$z=function(i,n,s){i=e(i);var a=q[i];return a?(a=new a,t.ea(n)?a.Ch(n):a.data(n,s),n=(n=this.b[this.b.length-1])?n.yh()+1:0,this.b.push(a),a.zh=t.Tm(1e-5*n,5),a.yh(n),a.Kq(this.cc().nc(n)),t.J(a,f)&&b(a,this.Nf().nc(this.D++)),a.dx(this.ve().nc(n)),a.Wk(this),a.kb(this),n=this.vf("defaultPointerSettings"),a.Ga(n.base),a.Ga(n[t.pm(i)]),t.D(a.kd)&&(a.kd(a.vf("colorScale")),p(a)),a.$c(),t.K(a,this.Gja,this),this.B(266756,1)):a=null,a},t.g.jba=function(t){var e=[],i=this.g("defaultPointerType"),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.$z(i,arguments[s]));return this.da(!0),e},t.g.mba=function(t){return this.o_(T(this,t))},t.g.o_=function(e){var i=this.b[e];return i&&(t.Pp++,t.Ca(this.b,e,1),t.qd(i),this.B(266752,1),t.Sp()),this},t.g.lba=function(){if(this.b.length){t.Pp++;var e=this.b;this.b=[],this.D=0,t.sd(e),this.B(266752,1),t.Sp()}return this},t.g.CK=function(t){return this.n_(T(this,t))},t.g.n_=function(t){return this.b[t]||null},t.g.nU=function(e){return t.ya(this.b,(function(t){return t.yh()==e}))},t.g.kba=function(){return this.b.length},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),this.sd=null,t.J(e,t.Cr)?this.i=this.Yc=e.Ui():this.i=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.la=this.i,t.K(this.la,this.dd,this),k(this),this.B(266496,5)),this):this.la},t.g.dd=function(e){t.X(e,16)&&(k(this),this.B(266496,1))},t.g.$=function(){return this.sd||this.Ec()},t.g.Ec=function(){return this.sd=this.la.$()},t.g.Ol=function(e,i){var n,s=[],a=0;for(n=this.b.length;a<n;a++){var o=this.b[a],r=o.qD(i);r.sourceUid=t.oa(this),r.sourceKey=o.id(),s.push(r)}return s},t.g.zr=function(t){t=t.Ki(),(t=this.CK(t))&&(t.enabled(!t.enabled()),t.enabled()?t.Zk():t.Md())},t.g.wq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.CK(e))&&t.Zk()},t.g.vq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.CK(e))&&t.Md()},t.g.NM=function(){for(var e,i=[],n=this.Ue(),s=0;s<n.length;s++)(e=n[s])&&e.state&&e.enabled()&&t.sx(e.state,t.wo).length&&i.push($(this,e.yh()));return i},t.g.XD=function(e,i,n){if(e.length){var s=e[e.length-1],a=s.X,o=a.yh();s=t.Aa(s.vd,0)}return(a={index:o,series:a})[i]=n?!s:s,a},t.g.bl=function(t,e,i,n,s){var a=this.XD(i,t,n),o=$(this,a.index),r=[];if(!n)for(var l=0,h=i.length;l<h;l++){var c=i[l].X;r.push($(this,c.yh()))}return t={type:"hovered"==t?"pointshover":"pointsselect",seriesStatus:this.mG(i,n),currentPoint:a,actualTarget:e.target,target:this,point:o,points:r,originalEvent:e},s&&(t.PT=!0),t},t.g.Uu=function(){return!0},t.g.axis=function(e,i){var s=t.N(e);if((0,window.isNaN)(s)){s=0;var a=e}else s=e,a=i;var o=this.f[s];return o||((o=new n).Ga(this.vf("defaultAxisSettings")),o.kb(this),this.f[s]=o,t.K(o,this.xo,this),this.B(32772,1)),t.p(a)?(o.N(a),this):o},t.g.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=32768,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.scale=function(e){return t.p(e)?((e=t.jt(this.qa,e,"linear",7,["Linear gauge scale","scatter","linear, log, date-time"]))&&(this.qa=e,this.qa.da(!1),this.B(262144,1)),this):(this.qa||(this.qa=t.ft()),this.qa)},t.g.xX=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var o=this.o[n];if(!o){o=new a(this);var r=this.vf("defaultScaleBarSettings");o.Ga(r),o.kd(r.colorScale),o.kb(this),this.o[n]=o,t.K(o,this.cja,this),this.B(8388612,1)}return t.p(s)?(o.N(s),this):o},t.g.cja=function(e){var i=0,n=0;t.X(e,1)&&(i|=8388608,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.pb=function(){var e,i,n=this.b.length;if(this.J(262144)){var s=!1;if((0,t.Pe)(this.b,(function(t){(t=t.scale()).Bg(),s=s||t.Of()})),s)for(i=0;i<n;i++)if((e=this.b[i])&&e.enabled()){var a=e.scale();a.Xc.apply(a,e.xs())}(0,t.Pe)(this.b,(function(t){t.scale().Hg()})),this.B(32772),this.I(262144)}},t.g.co=function(){D.u.co.call(this);for(var t=this.La("chartElements")||{},e=0,i=this.f.length;i--;)this.f[i]&&e++;t.axes=e,this.La("chartElements",t)},t.g.pv=function(){if(!this.pf()){var e,i=0,n=this.xa();if(this.J(6815744)){for(t.xr(this.b),e=0;e<this.b.length;e++){var s=this.b[e],a=s.yh();s.Kq(this.cc().nc(a)),s.dx(this.ve().nc(a)),t.J(s,f)&&b(s,this.Nf().nc(i++))}this.B(4096),k(this),this.I(6815744),t.zr(this.b),this.D=i}for(s=n?"left":"top",e=0;e<this.f.length;e++)(i=this.f[e])&&(t.Ty(i,s),i.scale()||i.scale(this.scale()));for(s=this.g("layout"),e=0;e<this.b.length;e++)(i=this.b[e]).we(s),i.scale()||i.scale(this.scale()),t.J(i,f)&&-1!=String(b(i)).toLowerCase().indexOf("triangle")&&b(i,n?"triangle-left":"triangle-up");for(e=0;e<this.o.length;e++)(i=this.o[e])&&(i.we(s),i.scale()||i.scale(this.scale()))}},t.g.Qh=function(e){if(!this.pf()){var i,n=this.b.length;if(this.pb(),t.xr(this.f,this.b,this.o),this.J(32772)){var s,a=0;for(i=this.f.length;a<i;a++)(s=this.f[a])&&(t.Yu(s.labels()),t.Yu(s.qb()))}if(this.Aa||(this.Aa=this.Na.Bd().zIndex(2)),this.J(4)){var o,r,l,h=r=l=o=0;if(i=this.xa()){var c=e.width;s=e.height}else c=e.height,s=e.width;for(a=0;a<n;a++){var u=this.b[a];u=u.pU(c,s),o=Math.max(o,u[0]),h=Math.max(h,u[1]),r=Math.max(r,u[2]),l=Math.max(l,u[3])}for((e=e.clone()).top+=h,e.height-=h+l,e.left+=o,e.width-=o+r,e=e.round(),h=t.kn(i?0:e.left,i?e.top:0,i?0:e.width,i?e.height:0),c=i?e.width:e.height,s=i?e.height:e.width,r=t.L("100%",s),l=t.Ga(this.f,this.b,this.o),a=0;a<l.length;a++)(s=l[a])&&s.enabled()&&(o=t.L(t.zo(s.g("width")),c),u=t.L(t.zo(s.g("offset")),c),o=i?t.kn(u,e.top,o,r):t.kn(e.left,u,r,o),t.pb(h,o),s.ja(o));i?(a=e.left+(e.width-h.width)/2-h.left,e=t.L(this.g("globalOffset"),e.width)):(a=e.top+(e.height-h.height)/2-h.top,e=t.L(this.g("globalOffset"),e.height)),a+=e,this.Aa.oc(1,0,0,1,i?a:0,i?0:a),this.B(8425472)}if(this.J(32768)){for(a=0,i=this.f.length;a<i;a++)(e=this.f[a])&&(e.O(this.Aa),e.W());this.I(32768)}if(this.J(4096)){for(a=0;a<n;a++)(u=this.b[a])&&(u.O(this.Aa),u.W());this.I(4096)}if(this.J(8388608)){for(a=0;a<this.o.length;a++)(n=this.o[a])&&(n.O(this.Aa),n.W());this.I(8388608)}t.zr(this.f,this.b,this.o)}},t.g.yj=function(){for(var t=this.$().Hb(),e=0,i=this.b.length,n=0;n<i;n++){var s=this.b[n];if(!s||s.enabled())break;e++}return!t||!i||e==i},t.g.F=function(){var e=D.u.F.call(this);e.palette=this.cc().F(),e.markerPalette=this.Nf().F(),e.hatchFillPalette=this.ve().F(),t.Tq(this,W,e),e.data=this.data().F();var i={},n=[],s=this.scale(),a=t.oa(s);i[a]=s.F(),n.push(i[a]),e.scale=n.length-1;var o,r=[];for(o=0;o<this.f.length;o++)if(s=this.f[o]){var l=s.F();(s=s.scale())&&(i[a=t.oa(s)]?l.scale=(0,t.za)(n,i[a]):(i[a]=s.F(),n.push(i[a]),l.scale=n.length-1)),r.push(l)}for(r.length&&(e.axes=r),r=[],o=0;o<this.b.length;o++)l=(s=this.b[o]).F(),(s=s.scale())&&(i[a=t.oa(s)]?l.scale=(0,t.za)(n,i[a]):(i[a]=s.F(),n.push(i[a]),l.scale=n.length-1)),r.push(l);for(r.length&&(e.pointers=r),r=[],o=0;o<this.o.length;o++)l=(s=this.o[o]).F(),(s=s.scale())&&(i[a=t.oa(s)]?l.scale=(0,t.za)(n,i[a]):(i[a]=s.F(),n.push(i[a]),l.scale=n.length-1)),r.push(l);return r.length&&(e.scaleBars=r),n.length&&(e.scales=n),{gauge:e}},t.g.U=function(e,i){D.u.U.call(this,e,i),t.Iq(this,W,e),this.data(e.data),"palette"in e&&this.cc(e.palette),"markerPalette"in e&&this.Nf(e.markerPalette),"hatchFillPalette"in e&&this.ve(e.hatchFillPalette);var n,s=e.axes,a=e.pointers,o=e.scaleBars,r=e.scales,l=this.Ma(),h={};if(t.A(r))for(n=0;n<r.length;n++){var c=r[n];t.z(c)&&(c={type:c}),c=t.qm(c,n,l);var u=t.dt(c.type,!1);u.N(c),h[n]=u}else if(t.C(r))for(n in r)r.hasOwnProperty(n)&&(c=r[n],t.z(c)&&(c={type:c}),c=t.qm(c,n,l),(u=t.dt(c.type,!1)).N(c),h[n]=u);if(c=e.scale,t.ea(c)?u=h[c]:t.z(c)?(u=t.dt(c,null))||(u=h[c]):t.C(c)?(u=t.dt(c.type,!1)).N(c):u=null,u&&this.scale(u),t.A(s))for(n=0;n<s.length;n++)c=s[n],this.axis(n,c),t.C(c)&&"scale"in c&&0<c.scale&&this.axis(n).scale(h[c.scale]);if(t.A(a))for(n=0;n<a.length;n++)s=(c=a[n]).pointerType||this.g("defaultPointerType"),u=c.data||null,(s=this.$z(s,c.dataIndex))&&(s.data(u),s.N(c),t.C(c)&&"scale"in c&&0<c.scale&&s.scale(h[c.scale]));if(t.A(o))for(n=0;n<o.length;n++)c=o[n],this.xX(n,c),t.C(c)&&"scale"in c&&0<c.scale&&this.xX(n).scale(h[c.scale])},t.g.R=function(){t.sd(this.Yc,this.i,this.la,this.b,this.f,this.o,this.Fa,this.He,this.fd),this.sd=this.la=this.i=this.Yc=null,this.b.length=0,this.f.length=0,this.o.length=0,this.fd=this.He=this.Fa=null,D.u.R.call(this)},t.g.Gja=function(e){var i=4096,n=1;t.X(e,8)&&(i|=4,n|=8),t.X(e,64)&&(i|=512),t.X(e,4)&&(i|=262144),this.B(i,n)},function(){function e(t){return function(e,i){return this.$z(t,e,i)}}var i,n=D.prototype;for(i in F)n[t.pm(F[i])]=e(F[i])}();var K=D.prototype;K.getType=K.Ma,K.palette=K.cc,K.markerPalette=K.Nf,K.hatchFillPalette=K.ve,K.isVertical=K.xa,K.addPointer=K.jba,K.removePointer=K.mba,K.removePointerAt=K.o_,K.removeAllPointers=K.lba,K.getPointer=K.CK,K.getPointerAt=K.n_,K.getPointersCount=K.kba,K.getSelectedPoints=K.NM,K.data=K.data,K.axis=K.axis,K.scaleBar=K.xX,K.scale=K.scale,t.Up["linear-gauge"]=O,t.Up.bullet=function(t,e){var i=new D;return i.Ga("bullet"),i.data(t,e),i.ta("defaultPointerType","bar"),i.re="bullet",i},t.Up.thermometer=P,t.Up.tank=L,t.Up.led=G,t.E("anychart.gauges.linear",O),t.E("anychart.gauges.thermometer",P),t.E("anychart.gauges.tank",L),t.E("anychart.gauges.led",G)}.call(this,$)),_.scatter||(_.scatter=1,function(t){var e=function(){t.wA.call(this,!1),this.Ga("scatter"),this.ta("defaultSeriesType","marker"),this.re="scatter"},i=function(t){var i=new e;i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.marker(arguments[n]);return i},n=function(t){var i=new e;i.Ga("marker"),i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.marker(arguments[n]);return i},s=function(t){var i=new e;i.Ga("bubble"),i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.bubble(arguments[n]);return i},a=function(t){var i=new e;i.Ga("quadrant"),i.re="quadrant",i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.marker(arguments[n]);return i},o={qQ:"bubble",tt:"line",av:"marker"};t.H(e,t.wA);var r={},l=7864320|t.QG;r.bubble={Fb:4,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:l,Ab:"value",zb:"value"},r.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:l,Ab:"value",zb:"value"},r.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:3670016|t.QG,Ab:"value",zb:"value"},e.prototype.fj=r,t.Nz(e,e.prototype.fj),e.prototype.ev=function(){return!1},e.prototype.Gt=function(e,i){return new t.xB(this,this,e,i,!1)},e.prototype.Ss=function(e){return t.zk(o,e,"line")},e.prototype.F=function(){return{chart:e.u.F.call(this)}};var h=e.prototype;h.crosshair=h.mh,h.xScale=h.Ra,h.yScale=h.bb,h.xGrid=h.lm,h.yGrid=h.nm,h.xMinorGrid=h.Qr,h.yMinorGrid=h.Tr,h.xAxis=h.$h,h.yAxis=h.ij,h.getSeries=h.ef,h.lineMarker=h.Ym,h.rangeMarker=h.gn,h.textMarker=h.mn,h.palette=h.cc,h.markerPalette=h.Nf,h.hatchFillPalette=h.ve,h.getType=h.Ma,h.addSeries=h.kl,h.getSeriesAt=h.Ai,h.getSeriesCount=h.tj,h.removeSeries=h.Ao,h.removeSeriesAt=h.Rn,h.removeAllSeries=h.Dp,h.getPlotBounds=h.dg,h.annotations=h.Nk,h.getXScales=h.vy,h.getYScales=h.xy,h.quarters=h.HO,h.crossing=h.zL,t.Tp.bubble=s,t.Tp.marker=n,t.Tp.quadrant=a,t.Tp.scatter=i,t.E("anychart.bubble",s),t.E("anychart.scatter",i),t.E("anychart.marker",n),t.E("anychart.quadrant",a),t.E("anychart.scatterChart",i)}.call(this,$)),_.circle_packing_part||(_.circle_packing_part=1,function(t){var e=function(t,e){return t&&e&&0<e.value-t.value?1:-1},i=function(e){var n={left:0,right:0,top:0,bottom:0,Eb:0};if(e&&e.length){var s,a=e[0];a.Kp=0,a.Rq=0,n.left=-a.weight,n.right=a.weight,n.top=-a.weight,n.bottom=a.weight,n.Eb=a.weight;var o=e[1];for(o&&(o.Kp=a.Kp+a.weight+o.weight,o.Rq=a.Rq,n.right=o.Kp+o.weight,n.Eb=n.right),a=[{kS:a,lS:o,$I:1}],s=e[o=2];s;){var r=a[0],l=r.kS,h=r.lS,c=r.$I,u=s.weight,d=l.weight+h.weight,p=u+l.weight;for(u=(p*p+d*d-(u+=h.weight)*u)/(2*p*d),u=t.Za(u,-1,1),u=Math.acos(u),d=(h.Kp-l.Kp)/d,d=t.Za(d,-1,1),d=u+c*(0<=(h.Rq-l.Rq)/(l.weight+h.weight)?1:-1)*Math.acos(d),s.Kp=l.Kp+p*Math.cos(d),s.Rq=l.Rq+c*p*Math.sin(d),d=!1,p=0;p<e.length;p++){var g;if(g=(u=e[p])!==s){g=Math.abs(u.Kp-s.Kp);var f=Math.abs(u.Rq-s.Rq);g=-1e-6>Math.sqrt(g*g+f*f)-Math.abs(u.weight+s.weight)}if(g){d=!0;break}}d?1===c?r.$I=-1:(r.$I=1,s=a.shift(),a.push(s)):(r={kS:l,lS:s,$I:1},h={kS:s,lS:h,$I:1},n.top=Math.min(n.top,s.Rq-s.weight),n.bottom=Math.max(n.bottom,s.Rq+s.weight),n.left=Math.min(n.left,s.Kp-s.weight),n.right=Math.max(n.right,s.Kp+s.weight),n.Eb=Math.max(n.Eb,Math.sqrt(s.Kp*s.Kp+s.Rq*s.Rq)+s.weight),a.push(r,h),o+=1),s=e[o]}for(p=0;p<e.length;p++)(s=e[p]).h7=i(s.children)}return n},n=function(i,s){var a,o=[],r=window.NaN,l=window.NaN;for(a=0;a<i.length;a++){var h=i[a],c=s,u=Number(h.get("value")),d=(0,window.isNaN)(u)||0>u;c={index:0,HV:!1,Ly:!1,weight:0,name:String(h.get("name")),value:u,item:h,parent:c,depth:c.depth+1},h.bc()?(h=h.Uv(),n(h,c),d||(c.value=u)):c.Ly=!0,(u=c.Ly&&!d||!c.Ly&&c.children&&c.children.length&&!(0,window.isNaN)(Number(c.value))?c:null)&&(t.Ua(o,u,e),r=(0,window.isNaN)(r)?0:r,l=(0,window.isNaN)(l)?0:l,r+=u.value,l+=Math.sqrt(u.value/Math.PI))}for(a=0;a<o.length;a++)(u=o[a]).weight=1===o.length?.9:Math.sqrt(u.value/Math.PI)/l,u.index=a;s.value=r,s.children=o},s=function(e,i,n){if(e&&e.length){var a=i&&i.HV,o=n;if(o.width!==o.height){n=o.left+o.width/2;var r=o.top+o.height/2,l=Math.min(o.width,o.height);(o=o.clone()).width=l,o.height=l,o.left=n-l/2,o.top=r-l/2,n=o}else n=o;for(i.Ta=n,l=(i=i.h7).right+Math.abs(i.left),o=i.bottom+Math.abs(i.top),r=Math.abs(l-o)/2,l>o?(i.top-=r,i.bottom+=r):(i.left-=r,i.right+=r),r=Math.max(l,o),r+=2*(a=Math.min(l/r,o/r)*(a?0:Math.min(i.Eb,r/2))*(2-Math.sqrt(2))/2),i.top-=a,i.bottom+=a,i.left-=a,i.right+=a,a=n.width/r,l=0;l<e.length;l++){(o=e[l]).Dc=n.left+n.width/r*(o.Kp+Math.abs(i.left)),o.uc=n.top+n.height/r*(o.Rq+Math.abs(i.top)),o.Eb=o.weight*a;var h=new t.I(o.Dc-o.Eb,o.uc-o.Eb,2*o.Eb,2*o.Eb);o.Ta=h,s(o.children,o,h)}}},a=function(e,i){function n(t){t.enabled(null)}t.Bx.call(this),t.su(this,this,this.If,this.hg,this.Ds,this.If,this.uaa,null),this.Ga("circlePacking"),this.f=this.Fa=null,this.o=[],this.b=[],this.data(e,i),t.T(this.ua,[["labelsMode",256,1]]);var s={};t.T(s,[["fill",16,65],["stroke",16,65],["labels",0,0]]),this.ca=new t.my(this,s,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),s={},t.T(s,[["fill",16,65],["stroke",16,65],["labels",256,65]]),this.Ea=new t.my(this,s,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",n),this.za=new t.my(this,s,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",n)},o=function(t,e,i){if(e){var n=d(t,e,"fill",i);t=d(t,e,"stroke",i),(e=e.c1).fill(n),e.stroke(t)}},r=function(e){var i=e.O();if(i){i.suspend();for(var n=0;n<e.b.length;n++)o(e,e.b[n],t.gm);e.b.length=0,i.resume()}},l=function(e,i){if(i&&i.length)for(var n=0;n<i.length;n++){var s=i[n],a=t.eC(e.ue);s.c1=a,a.To(s.Dc),a.Uo(s.uc),a.Eb(s.Eb),a.zIndex(31),a.tag={WN:s},l(e,s.children)}},h=function(e,i){if(i&&i.length)for(var n=0;n<i.length;n++){var s=i[n],a=d(e,s,"fill",t.gm),o=d(e,s,"stroke",t.gm),r=s.c1;r.fill(a),r.stroke(o),h(e,s.children)}},c=function(t,e){for(var i=[],n=0;n<e.length;n++){var s=e[n];s.Ly?i.push(s):(s=c(t,s.children),i=i.concat(i,s))}return i},u=function(e,i){return i.parent.HV?e.cc().nc(i.index):t.Pl(u(e,i.parent))},d=function(e,i,n,s){return n=e[s===t.gm?"normal":s===t.vo?"hovered":"selected"]().g(n),t.D(n)?(e={sourceColor:u(e,i),item:i.item,value:i.value,name:i.name,depth:i.depth,index:i.index,weight:i.weight,isLeaf:i.Ly},n.call(e,e)):n},p=function(t){for(var e=t.f,i=0;i<t.o.length;i++)e=e.children[t.o[i]];return e},g=function(t,e){var i=new a(t,e);return i.$c(),i},f={yra:"roots",qpa:"leaves"};t.H(a,t.Bx),t.Gq(a,["fill","stroke","labels"],"normal");var b={};t.sq(b,[[0,"labelsMode",function(e,i){return t.zk(f,e,i||"roots")}]]),t.U(a,b),t.g=a.prototype,t.g.ra=16|t.Bx.prototype.ra,t.g.sa=4368|t.Bx.prototype.sa,t.g.data=function(e,i){return t.p(e)?(t.J(e,t.au)||t.J(e,t.Yt)?e!=this.la&&(this.la&&t.kr(this.la,this.dd,this),this.la=e,t.K(this.la,this.dd,this)):(this.la&&t.kr(this.la,this.dd,this),this.la=new t.au(e,i),t.K(this.la,this.dd,this)),r(this),this.B(4352,1),this):this.la},t.g.dd=function(e){t.X(e,16)&&this.B(4352,1)},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(16,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(16,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.labels=function(e){return t.p(e)?(this.ca.labels(e),this):this.ca.labels()},t.g.de=function(e){t.X(e,1)&&this.B(256,1)},t.g.Ue=function(){return[]},t.g.rl=function(t){var e=t.domTarget;e=e&&e.tag&&e.tag.WN;var i=t.type;if(e){switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":case"touchmove":i="pointmousemove";break;case"mousedown":case"touchstart":i="pointmousedown";break;case"mouseup":case"touchend":i="pointmouseup";break;case"click":i="pointclick";break;case"dblclick":i="pointdblclick"}return(t={type:i,actualTarget:t.target,target:this,originalEvent:t}).index=e.index,t.isLeaf=e.Ly,t.weight=e.weight,t.name=e.name,t.value=e.value,t.point=e.item,t.cx=e.Dc,t.cy=e.uc,t.radius=e.Eb,t.bounds=e.Ta,t.depth=e.depth,t}return null},t.g.If=function(e){var i=this.rl(e);if(i&&this.dispatchEvent(i)){var n=(i=e.domTarget)&&i.tag&&i.tag.WN;n&&(t.Aa(this.b,n)||o(this,n,t.vo),i=this.Ua(),n=this.Ic(n),t.Ow(i,e.originalEvent.clientX,e.originalEvent.clientY,n))}},t.g.hg=function(e){var i=this.rl(e);i&&this.dispatchEvent(i)&&((e=(e=e.domTarget)&&e.tag&&e.tag.WN)&&!t.Aa(this.b,e)&&o(this,e,t.gm),this.Ua().Lc())},t.g.uaa=function(t){(t=this.rl(t))&&this.dispatchEvent(t)},t.g.Ds=function(e){var i=this.rl(e);for(i&&this.dispatchEvent(i)&&(i=(i=e.domTarget)&&i.tag&&i.tag.WN)?!t.Ad&&e.ctrlKey||t.Ad&&e.metaKey?t.Aa(this.b,i)?(t.Fa(this.b,i),o(this,i,t.gm)):(this.b.push(i),o(this,i,t.wo)):(r(this),this.b.push(i),o(this,i,t.wo)):r(this),e={type:"pointsselect",points:[]},i=0;i<this.b.length;i++)e.points.push(this.b[i].item);this.dispatchEvent(e)},t.g.pb=function(){if(this.J(4096)){var t=this.data(),e={index:0,Ly:!1,HV:!0,parent:null,depth:-1};n(t.Uv(),e),e.h7=i(e.children),this.f=e,this.B(4)}},t.g.Ic=function(e){this.i||(this.i=new t.Fw);var i={item:{value:e.item,type:""},value:{value:e.value,type:"number"},name:{value:e.name,type:"string"},depth:{value:e.depth,type:"number"},index:{value:e.index,type:"number"},weight:{value:e.weight,type:"number"},isLeaf:{value:e.Ly,type:"string"}};return this.i.lg(e.item),t.ov(this.i,i)},t.g.Kt=function(e){var i=this.labels();if(i.clear(),i.ka(),i.enabled()&&e){var n=i.$d().adjustFontSize;e=n.width,n=n.height;var s=i.g("width"),a=i.g("height"),o=i.xA("anchor"),r=i.xA("position"),l="leaves"===this.g("labelsMode"),h=p(this).children;"leaves"===this.g("labelsMode")&&(h=c(this,h));for(var u=0;u<h.length;u++){var d=h[u],g=this.Ic(d);if(g=i.add(g,null),l){var f=g.xA("anchor")||o||"center",b=g.xA("position")||r||"center";g.anchor(f),g.position(b)}s=s||(e?"70%":s),a=a||(n?"70%":a),f=t.L(a,d.Ta.height),g.width(t.L(s,d.Ta.width)),g.height(f),f=t.Dk(g.ic("position")),d={value:t.Eo(d.Ta,f)},g.jc(d),g.W()}}i.da(!0),i.W()},t.g.Qh=function(e){if(!this.pf()){!function(e){e.ue||(e.ue=new t.dC((function(){return t.nk()}),t.ia),e.ue.zIndex(30),e.ue.parent(e.Na),e.Lf=e.Na.Bd(),e.Lf.zIndex(32),e.Qa().labels().O(e.Lf))}(this),this.pb();var i=p(this);this.J(4)&&(s(i.children,i,e),this.ue.clear(),l(this,this.f.children)),this.J(16)&&(h(this,this.f.children),this.I(16)),this.J(256)&&(this.Kt(i),this.I(256))}},t.g.F=function(){var t=a.u.F.call(this);return t.data=this.data().F(),t.tooltip=this.Ua().F(),t.palette=this.cc().F(),t.normal=this.Qa().F(),t.hovered=this.lb().F(),t.selected=this.selected().F(),t},t.g.U=function(t,e){a.u.U.call(this,t,e),"data"in t&&this.data(t.data),"tooltip"in t&&this.Ua().ga(!!e,t.tooltip),"normal"in t&&this.Qa().ga(!!e,t.normal),"hovered"in t&&this.lb().ga(!!e,t.hovered),"selected"in t&&this.selected().ga(!!e,t.selected),"palette"in t&&this.cc(t.palette)},t.g.Zj=function(e,i){return t.qu(this.data(),i)};var v=a.prototype;v.data=v.data,v.labels=v.labels,v.palette=v.cc,v.tooltip=v.Ua,v.getType=v.Ma,v.toCsv=v.Zj,v.normal=v.Qa,v.hovered=v.lb,v.selected=v.selected,t.Tp["circle-packing"]=g,t.E("anychart.circlePacking",g)}.call(this,$)),$_=window.anychart,$_.$=$,$_._=_},wrapper=function(t){if(!t.document)throw Error("AnyChart requires a window with a document");factory.call(t,t,t.document);try{t.acgraph.isNodeJS="[object process]"==Object.prototype.toString.call(global.process)}catch(e){}return t.anychart},module.exports=global.document?wrapper(global):wrapper})(anychartBundle_min);var anychart=anychartBundle_min.exports,AnyChartDial_vue_vue_type_style_index_0_lang="";const _sfc_main$l=defineComponent({name:"DialChart",props:{options:{type:Object,default:()=>null}},setup(t){const e=ref$1(null),i=ref$1(null),n=computed((()=>t.options));function s(){if(!e.value&&t.options){var n=[t.options.value];e.value=anychart.gauges.linear(),e.value.background().fill(!1),e.value.data(n),e.value.layout("vertical");var s=anychart.scales.ordinalColor().ranges(t.options.colors||[{from:0,to:30,color:["#14BE64"]},{from:30,to:70,color:["#FFB100"]},{from:70,to:100,color:["#fd666d"]}]),a=e.value.scaleBar(0);a.width("60%"),a.offset("32.5%"),a.colorScale(s);var o=e.value.marker(0);o.offset("86%"),o.type("triangle-left"),o.width("20%"),o.zIndex(10);var r=e.value.scale();r.minimum(t.options.min),r.maximum(t.options.max);const h=t.options.max+-1*t.options.min;r.ticks().interval(h/t.options.ticks||5),r.minorTicks().interval(h/t.options.ticks/t.options.minorTicks||2);var l=e.value.axis();l.minorTicks(!0),l.minorTicks().stroke("#cecece").length(5).stroke(t.options.textColor||"#000000"),l.width(34),l.padding([1,0]),l.orientation("left"),l.stroke(null),l.ticks().length(10).stroke(t.options.textColor||"#000000"),l.labels().format((function(){return Math.round(this.value)})),l.labels().fontColor(t.options.textColor||"#000000"),e.value.padding([10,2,10,20]),e.value.container(i.value),e.value.draw()}}return onMounted((()=>{!e.value&&t.options&&s()})),onUnmounted((()=>{e.value&&(e.value.dispose(),e.value=null)})),watch(n,(async(t,i)=>{!e.value&&t||(e.value.dispose(),e.value=null),s()})),{gaugeElement:i}}}),_hoisted_1$e={class:"dial-chart",style:{height:"100%","max-width":"170px"},ref:"gaugeElement"};function _sfc_render$k(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$e,null,512)}var AnyChartDial=_export_sfc(_sfc_main$l,[["render",_sfc_render$k]]),Led_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$k=defineComponent({name:"LedEl",props:{item:{type:Object},active:{type:Boolean,default:!1},blink:{type:Boolean,default:!1},blinkInterval:{type:Number,default:700},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"toggle_off"},textAlign:{type:String,default:"left"},label:{type:String,default:""},brightness:{type:Number,default:1}},setup(t){const e=ref$1(!1),i=ref$1(null);function n(){!1===e.value?e.value=!0:e.value=!1}watchEffect((()=>{t.blink?(i.value&&clearInterval(i.value),i.value=setInterval(n,t.blinkInterval)):!t.blink&&i.value&&clearInterval(i.value)})),onUnmounted((()=>{i.value&&clearInterval(i.value)}));return{opacity:computed((()=>t.brightness?.3+.7*t.brightness:0)),blinkVal:e}}}),_hoisted_1$d={class:"led-container"},_hoisted_2$5={width:"100%",height:"100%",version:"1.2",viewBox:"-10 -5 35.456 39.618",xmlns:"http://www.w3.org/2000/svg"},_hoisted_3$3=["fill"],_hoisted_4$2=["fill"],_hoisted_5$1={class:"led-label"};function _sfc_render$j(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$d,[(openBlock(),createElementBlock("svg",_hoisted_2$5,[e[1]||(e[1]=createStaticVNode('<filter id="light1" x="-0.8" y="-0.8" height="2.2" width="2.8" data-v-0bb94d3f><feGaussianBlur stdDeviation="2" data-v-0bb94d3f></feGaussianBlur></filter><filter id="light2" x="-0.8" y="-0.8" height="2.2" width="2.8" data-v-0bb94d3f><feGaussianBlur stdDeviation="4" data-v-0bb94d3f></feGaussianBlur></filter><rect x="2.5099" y="20.382" width="2.1514" height="9.8273" fill="#8c8c8c" data-v-0bb94d3f></rect><path d="m12.977 30.269c0-1.1736-0.86844-2.5132-1.8916-3.4024-0.41616-0.3672-1.1995-1.0015-1.1995-1.4249v-5.4706h-2.1614v5.7802c0 1.0584 0.94752 1.8785 1.9462 2.7482 0.44424 0.37584 1.3486 1.2496 1.3486 1.7694" fill="#8c8c8c" data-v-0bb94d3f></path><path d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z" opacity=".3" data-v-0bb94d3f></path><path d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z" fill="#e6e6e6" opacity=".5" data-v-0bb94d3f></path><path d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z" fill="#d1d1d1" opacity=".9" data-v-0bb94d3f></path><g data-v-0bb94d3f><path d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z" opacity=".7" data-v-0bb94d3f></path><path d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v3.1054c1.4738 1.6502 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586-7.4e-4 -1.1412-0.47444-2.2025-1.283-3.1047z" opacity=".25" data-v-0bb94d3f></path><ellipse cx="7.0877" cy="16.106" rx="7.087" ry="4.9608" opacity=".25" data-v-0bb94d3f></ellipse></g><polygon points="2.2032 16.107 3.1961 16.107 3.1961 13.095 6.0156 13.095 10.012 8.8049 3.407 8.8049 2.2032 9.648" fill="#666666" data-v-0bb94d3f></polygon><polygon points="11.215 9.0338 7.4117 13.095 11.06 13.095 11.06 16.107 11.974 16.107 11.974 8.5241 10.778 8.5241" fill="#666666" data-v-0bb94d3f></polygon>',10)),createBaseVNode("path",{d:"m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z",fill:!t.blink&&t.active||t.blink&&t.blinkVal?t.onColor:t.offColor,opacity:".65"},null,8,_hoisted_3$3),e[2]||(e[2]=createBaseVNode("g",{fill:"#ffffff"},[createBaseVNode("path",{d:"m10.388 3.7541 1.4364-0.2736c-0.84168-1.1318-2.0822-1.9577-3.5417-2.2385l0.25416 1.0807c0.76388 0.27072 1.4068 0.78048 1.8511 1.4314z",opacity:".5"}),createBaseVNode("path",{d:"m0.76824 19.926v1.5199c0.64872 0.5292 1.4335 0.97632 2.3076 1.3169v-1.525c-0.8784-0.33624-1.6567-0.78194-2.3076-1.3118z",opacity:".5"}),createBaseVNode("path",{d:"m11.073 20.21c-0.2556 0.1224-0.52992 0.22968-0.80568 0.32976-0.05832 0.01944-0.11736 0.04032-0.17784 0.05832-0.56376 0.17928-1.1614 0.31896-1.795 0.39456-0.07488 0.0094-0.1512 0.01872-0.22464 0.01944-0.3204 0.03024-0.64368 0.05832-0.97056 0.05832-0.14832 0-0.30744-0.01512-0.4716-0.02376-1.2002-0.05688-2.3306-0.31464-3.2976-0.73944l-2e-5 -8.3895v-4.8254c0-1.471 0.84816-2.7295 2.0736-3.3494l-0.02232-0.05328-1.2478-1.512c-1.6697 1.003-2.79 2.8224-2.79 4.9118v11.905c-0.04968-0.04968-0.30816-0.30888-0.48024-0.52992l-0.30744 0.6876c1.4011 1.4818 3.8088 2.4617 6.5426 2.4617 1.6798 0 3.2371-0.37368 4.5115-1.0022l-0.52704-0.40896-0.01006 0.0072z",opacity:".5"})],-1)),createBaseVNode("g",{class:"light",style:normalizeStyle("display: "+(!t.blink&&t.active||t.blink&&t.blinkVal?"":"none"))},[createBaseVNode("ellipse",{cx:"8",cy:"10",rx:"10",ry:"10",fill:t.onColor,filter:"url(#light2)",style:normalizeStyle(`opacity: ${t.opacity}`)},null,12,_hoisted_4$2),e[0]||(e[0]=createBaseVNode("ellipse",{cx:"8",cy:"10",rx:"2",ry:"2",fill:"white",filter:"url(#light1)"},null,-1)),createBaseVNode("ellipse",{cx:"8",cy:"10",rx:"3",ry:"3",fill:"white",filter:"url(#light1)",style:normalizeStyle(`opacity: ${t.opacity}`)},null,4)],4)])),createBaseVNode("span",_hoisted_5$1,toDisplayString(t.label),1)])}var LedEl=_export_sfc(_sfc_main$k,[["render",_sfc_render$j],["__scopeId","data-v-0bb94d3f"]]),Boiler_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$i=defineComponent({name:"BoilerEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$i=()=>{useCssVars((t=>({"613c4bf1":t.fillColor})))},__setup__$i=__default__$i.setup;__default__$i.setup=__setup__$i?(t,e)=>(__injectCSSVars__$i(),__setup__$i(t,e)):__injectCSSVars__$i;const _sfc_main$j=__default__$i;function _sfc_render$i(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",height:"100%",width:"100%",version:"1.1",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createBaseVNode("path",{style:{fill:"currentColor","fill-opacity":"1","fill-rule":"nonzero",stroke:"#000000","stroke-width":"1","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},d:"m 2,15 8,-7 0,-7 12,0 0,7 8,7 0,16 -28,0 z"},null,-1)])],2)}var Boiler=_export_sfc(_sfc_main$j,[["render",_sfc_render$i],["__scopeId","data-v-c039f062"]]),Enthalpy_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$h=defineComponent({name:"EnthalpyEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$h=()=>{useCssVars((t=>({"23b84290":t.fillColor})))},__setup__$h=__default__$h.setup;__default__$h.setup=__setup__$h?(t,e)=>(__injectCSSVars__$h(),__setup__$h(t,e)):__injectCSSVars__$h;const _sfc_main$i=__default__$h,_hoisted_1$c={height:"100%",width:"100%",version:"1.1",viewBox:"0 0 10.221108 22.472175","xmlns:xlink":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",class:"object-svg"};function _sfc_render$h(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$c,[e[0]||(e[0]=createStaticVNode('<defs data-v-4b0b68d4><linearGradient id="linearGradient4194" data-v-4b0b68d4><stop style="stop-color:#ffff00;stop-opacity:1;" offset="0" id="stop4196" data-v-4b0b68d4></stop><stop id="stop4148" offset="0.3598454" style="stop-color:#ffff00;stop-opacity:1;" data-v-4b0b68d4></stop><stop id="stop4144" offset="0.59441435" style="stop-color:#00ffff;stop-opacity:1;" data-v-4b0b68d4></stop><stop style="stop-color:#00ffff;stop-opacity:1;" offset="1" id="stop4198" data-v-4b0b68d4></stop></linearGradient><linearGradient xlink:href="#linearGradient4194" id="linearGradient4219" x1="15.955305" y1="9.504283" x2="16.127491" y2="24.826317" gradientUnits="userSpaceOnUse" gradientTransform="translate(-10.896808,-9.4127998)" data-v-4b0b68d4></linearGradient></defs><rect style="fill:url(#linearGradient4219);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1px;" x="3.660192" y="0.5" width="2.901" height="14.505" id="rect3012" data-v-4b0b68d4></rect>',2)),createBaseVNode("path",{style:normalizeStyle(`fill: ${t.fillColor}; stroke: #000000; stroke-width: 0.889176px`),d:"m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z"},null,4),e[1]||(e[1]=createStaticVNode('<g transform="translate(-10.733726,-9.4127998)" data-v-4b0b68d4><g transform="translate(8.1630559,0.95878887)" data-v-4b0b68d4><circle style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" id="path4137" cx="6.4061227" cy="28.129852" r="0.77312505" data-v-4b0b68d4></circle><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" d="M 6.4061205,27.157211 V 23.65349" data-v-4b0b68d4></path></g><path style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" d="m 17.270488,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" data-v-4b0b68d4></path><path style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" d="m 17.270488,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" data-v-4b0b68d4></path></g>',1))])}var Enthalpy=_export_sfc(_sfc_main$i,[["render",_sfc_render$h],["__scopeId","data-v-4b0b68d4"]]),Flow_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$g=defineComponent({name:"EnthalpyEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$g=()=>{useCssVars((t=>({"32258bbc":t.fillColor})))},__setup__$g=__default__$g.setup;__default__$g.setup=__setup__$g?(t,e)=>(__injectCSSVars__$g(),__setup__$g(t,e)):__injectCSSVars__$g;const _sfc_main$h=__default__$g,_hoisted_1$b={version:"1.1",height:"100%",width:"100%",viewBox:"0 0 10.221108 21.334512","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:osb":"http://www.openswatchbook.org/uri/2009/osb",class:"object-svg"};function _sfc_render$g(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$b,[...e[0]||(e[0]=[createBaseVNode("defs",null,[createBaseVNode("linearGradient",{id:"linearGradient4194","osb:paint":"gradient"},[createBaseVNode("stop",{style:{"stop-color":"#ffff00","stop-opacity":"1"},offset:"0"}),createBaseVNode("stop",{style:{"stop-color":"currentColor","stop-opacity":"1"},offset:"1"})])],-1),createStaticVNode('<path style="fill:currentColor;stroke:#000000;stroke-width:0.889176px;" d="m 9.7077419,16.908637 -2.298594,3.981286 H 2.8119599 L 0.51336587,16.908637 2.8119599,12.927351 h 4.597188 z" data-v-7edff08f></path><g transform="matrix(0.83920236,0,0,0.83920236,-8.3130944,-6.3365267)" data-v-7edff08f><path id="path4146" d="m 14.917284,30.513877 v -5.217284 h 2.569115" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.824475px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" data-v-7edff08f></path><path d="m 14.956808,27.549512 h 2.529591" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.824475px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" data-v-7edff08f></path></g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" d="M 5.1629049,12.964256 V 0.5 H 0.56071887" data-v-7edff08f></path><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" d="m 5.0190869,8.889403 h 2.205215 v 4.122792" data-v-7edff08f></path>',4)])])}var Flow=_export_sfc(_sfc_main$h,[["render",_sfc_render$g],["__scopeId","data-v-7edff08f"]]),Heatpump_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$f=defineComponent({name:" HeatpumpEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$f=()=>{useCssVars((t=>({"1b9e9bca":t.fillColor})))},__setup__$f=__default__$f.setup;__default__$f.setup=__setup__$f?(t,e)=>(__injectCSSVars__$f(),__setup__$f(t,e)):__injectCSSVars__$f;const _sfc_main$g=__default__$f;function _sfc_render$f(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{"xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#",xmlns:"http://www.w3.org/2000/svg","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",viewBox:"0 0 32 32",height:"100%",width:"100%",version:"1.1",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g class="heat-pump" stroke-linejoin="round" stroke="#000" transform="translate(39 -2.3842e-7)" fill="currentColor" data-v-5fdd6bad><rect class="inner" height="27.718" width="27.718" y="2.141" x="-36.859" stroke-width="1.0868" data-v-5fdd6bad></rect><g transform="matrix(1.0276 0 0 1.0276 -39.441 -.44130)" stroke-linecap="round" stroke-miterlimit="1" stroke-width="1.3509" data-v-5fdd6bad><path d="m16.234 16.944 8.6837-6.894-8.6837-6.894v3.447h-13.152v6.894h13.152z" fill="#ce2824" data-v-5fdd6bad></path><path d="m15.766 28.844-8.6837-6.894 8.6837-6.894v3.447h13.152v6.894h-13.152z" fill="#3238db" data-v-5fdd6bad></path></g></g>',1)])],2)}var Heatpump=_export_sfc(_sfc_main$g,[["render",_sfc_render$f],["__scopeId","data-v-5fdd6bad"]]),Pump_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$e=defineComponent({name:" PumpEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$e=()=>{useCssVars((t=>({68955766:t.fillColor})))},__setup__$e=__default__$e.setup;__default__$e.setup=__setup__$e?(t,e)=>(__injectCSSVars__$e(),__setup__$e(t,e)):__injectCSSVars__$e;const _sfc_main$f=__default__$e;function _sfc_render$e(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 20.921802 20.921802",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g fill="currentColor" transform="translate(-5.4940996,-5.5390997)" data-v-80a95d64><g class="pump" data-v-80a95d64><circle stroke="#000000" cy="16" cx="15.955" r="9.9609003" class="pump-background" data-v-80a95d64></circle><g transform="translate(16,16)" data-v-80a95d64><path d="M -5,8.1369 V -8.1191 L 9.078,0.0091 Z" class="rotating-middle" stroke="#000000" stroke-width="0.96719" data-v-80a95d64></path></g></g></g>',1)])],2)}var Pump=_export_sfc(_sfc_main$f,[["render",_sfc_render$e],["__scopeId","data-v-80a95d64"]]),ValveThreeWay_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$d=defineComponent({name:"ValveThreeWay",props:{inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$d=()=>{useCssVars((t=>({"2fa316a0":t.fillColor})))},__setup__$d=__default__$d.setup;__default__$d.setup=__setup__$d?(t,e)=>(__injectCSSVars__$d(),__setup__$d(t,e)):__injectCSSVars__$d;const _sfc_main$e=__default__$d;function _sfc_render$d(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{"xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#",xmlns:"http://www.w3.org/2000/svg","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",viewBox:"0 0 23.197666 18.43317",version:"1.1",height:"100%",width:"100%",class:normalizeClass(["object-svg",{"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g transform="matrix(1,0,0,-1,-4.3773334,22.894063)" data-v-1b537420><g stroke-linejoin="round" stroke="#000000" class="twv" fill="currentColor" data-v-1b537420><g stroke-linecap="round" data-v-1b537420><path d="M 16,16 4.925,22.3941 V 9.6061 Z" data-v-1b537420></path><path d="m 16,16 11.075,6.3941 V 9.6061 Z" data-v-1b537420></path><path d="M 16,16 9.606,4.925 h 12.788 z" data-v-1b537420></path></g><g class="blocker-wrapper" data-v-1b537420><g class="blocker" fill="#000000" data-v-1b537420><path stroke-width="0.80716" d="m 0,-9.6108 a 8.8788,8.8788 0 0 0 -6.0273,2.375 l 1.6172,2.8008 A 5.7576,5.7576 0 0 1 0,-6.4897 5.7576,5.7576 0 0 1 4.4062,-4.4292 L 6.0293,-7.2397 A 8.8788,8.8788 0 0 0 0,-9.6108 Z" data-v-1b537420></path></g></g></g><path d="M 6.7797,10.576 V 21.084" stroke="#000000" stroke-width="1px" fill="none" data-v-1b537420></path></g>',1)])],2)}var ValveThreeWay=_export_sfc(_sfc_main$e,[["render",_sfc_render$d],["__scopeId","data-v-1b537420"]]),ValveTwoWay_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$c=defineComponent({name:"ValveTwoWay",props:{fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$c=()=>{useCssVars((t=>({"071396af":t.fillColor})))},__setup__$c=__default__$c.setup;__default__$c.setup=__setup__$c?(t,e)=>(__injectCSSVars__$c(),__setup__$c(t,e)):__injectCSSVars__$c;const _sfc_main$d=__default__$c,_hoisted_1$a={viewBox:"0 0 22.956221 13.906571",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$c(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$a,[...e[0]||(e[0]=[createBaseVNode("g",{"stroke-linejoin":"round","fill-rule":"nonzero",transform:"translate(-3.8922957,-7.3951286)",stroke:"#000000","stroke-linecap":"round","stroke-dasharray":"none","stroke-miterlimit":"4","stroke-width":"1",fill:"currentColor"},[createBaseVNode("path",{d:"M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z",transform:"translate(5.3992957,6.473236)"}),createBaseVNode("path",{d:"M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z",transform:"matrix(-1,0,0,1,25.341517,6.354592)"})],-1)])])}var ValveTwoWay=_export_sfc(_sfc_main$d,[["render",_sfc_render$c],["__scopeId","data-v-483aa192"]]),Humidity_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$b=defineComponent({name:"ValveTwoWay",props:{fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$b=()=>{useCssVars((t=>({"13e4fd76":t.fillColor})))},__setup__$b=__default__$b.setup;__default__$b.setup=__setup__$b?(t,e)=>(__injectCSSVars__$b(),__setup__$b(t,e)):__injectCSSVars__$b;const _sfc_main$c=__default__$b,_hoisted_1$9={version:"1.1",viewBox:"0 0 10.221108 22.472175","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$b(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$9,[...e[0]||(e[0]=[createBaseVNode("defs",null,[createBaseVNode("linearGradient",{"inkscape:swatch":"gradient"},[createBaseVNode("stop",{style:{"stop-color":"#ffff00","stop-opacity":"1"},offset:"0"}),createBaseVNode("stop",{style:{"stop-color":"currentColor","stop-opacity":"1"},offset:"1"})])],-1),createStaticVNode('<rect style="fill:#00d1ff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1px;" x="3.660192" y="0.5" width="2.901" height="14.505" data-v-25a74087></rect><path style="fill:#659dc5;stroke:#000000;stroke-width:0.889176px;" d="m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z" data-v-25a74087></path><g transform="translate(-10.962785,-9.3157224)" data-v-25a74087><g data-v-25a74087><path d="m 17.43357,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-25a74087></path><path d="m 17.43357,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-25a74087></path></g><g transform="translate(0,0.107786)" data-v-25a74087><path d="m 14.710621,24.560747 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-25a74087></path><path d="m 14.710621,27.770688 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-25a74087></path></g></g>',3)])])}var Humidity=_export_sfc(_sfc_main$c,[["render",_sfc_render$b],["__scopeId","data-v-25a74087"]]),Pressure_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$a=defineComponent({name:"PressureEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$a=()=>{useCssVars((t=>({"22ea2e37":t.fillColor})))},__setup__$a=__default__$a.setup;__default__$a.setup=__setup__$a?(t,e)=>(__injectCSSVars__$a(),__setup__$a(t,e)):__injectCSSVars__$a;const _sfc_main$b=__default__$a,_hoisted_1$8={version:"1.1",viewBox:"0 0 28.852817 27.05043","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$a(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$8,[...e[0]||(e[0]=[createStaticVNode('<path style="fill:currentColor;stroke:#000000;stroke-width:1.29098px;" d="M 21.101011,20.624556 17.76371,26.404938 H 11.089107 L 7.7518058,20.624556 11.089107,14.844174 h 6.674603 z" data-v-3fcb3422></path><g transform="matrix(0.39332133,0,0,0.5366036,8.3312906,37.286552)" data-v-3fcb3422><g transform="translate(0,0.03745956)" data-v-3fcb3422><path style="fill:none;stroke:#000000;stroke-width:1.30927;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;" d="m 16.929663,-31.088307 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" data-v-3fcb3422></path><path style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;" d="M 27.541431,-31.088307 H 18.912663" data-v-3fcb3422></path></g><path d="m 15.532379,-39.152447 v 16.2032" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;" data-v-3fcb3422></path><g transform="matrix(-1,0,0,1,-1.8983044,-0.27118644)" data-v-3fcb3422><path style="fill:none;stroke:#000000;stroke-width:1.30927;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;" d="m -15.961713,-30.779661 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" data-v-3fcb3422></path><path style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;" d="M -5.3499446,-30.779661 H -13.978713" data-v-3fcb3422></path></g></g><g transform="translate(-1.5131572,-0.15657804)" data-v-3fcb3422><path d="M 2.0131572,0.15657804 V 6.9638416 H 14.573291 v 8.3199894" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-3fcb3422></path><path d="M 29.865974,0.15657812 V 6.9638416 H 17.305841 v 8.3199894" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-3fcb3422></path></g>',3)])])}var Pressure=_export_sfc(_sfc_main$b,[["render",_sfc_render$a],["__scopeId","data-v-3fcb3422"]]),ThermalWheel_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$9=defineComponent({name:" ThermalWheel",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$9=()=>{useCssVars((t=>({"3eaf08a4":t.fillColor})))},__setup__$9=__default__$9.setup;__default__$9.setup=__setup__$9?(t,e)=>(__injectCSSVars__$9(),__setup__$9(t,e)):__injectCSSVars__$9;const _sfc_main$a=__default__$9;function _sfc_render$9(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 26.777448 31.905044",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g stroke="#000000" fill="currentColor" transform="translate(-2.370089)" data-v-6e60e4ae><rect class="thermal-wheel-background" height="40" width="25.5" y="-4" x="3" fill="inherit" stroke-width="1" data-v-6e60e4ae></rect><g class="thermal-wheel" stroke-width="1" data-v-6e60e4ae><line x1="3" x2="28.5" y1="-4" y2="-4" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="0" y2="0" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="4" y2="4" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="8" y2="8" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="12" y2="12" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="16" y2="16" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="20" y2="20" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="24" y2="24" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="28" y2="28" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="32" y2="32" data-v-6e60e4ae></line><line x1="3" x2="28.5" y1="36" y2="36" data-v-6e60e4ae></line></g></g>',1)])],2)}var ThermalWheel=_export_sfc(_sfc_main$a,[["render",_sfc_render$9],["__scopeId","data-v-6e60e4ae"]]),RoomHumidity_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$8=defineComponent({name:"RoomHumidity",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$8=()=>{useCssVars((t=>({ee01a458:t.fillColor})))},__setup__$8=__default__$8.setup;__default__$8.setup=__setup__$8?(t,e)=>(__injectCSSVars__$8(),__setup__$8(t,e)):__injectCSSVars__$8;const _sfc_main$9=__default__$8,_hoisted_1$7={version:"1.1",viewBox:"0 0 18.016948 18.016948","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$8(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$7,[...e[0]||(e[0]=[createBaseVNode("g",{transform:"translate(-6.9915256,-6.9915256)"},[createBaseVNode("circle",{r:"8.6263752",cy:"16",cx:"16",style:{opacity:"1",fill:"currentColor","fill-opacity":"1","fill-rule":"nonzero",stroke:"#000000","stroke-width":"0.764198","stroke-linecap":"butt","stroke-linejoin":"round","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),createBaseVNode("g",{transform:"matrix(0.29971746,0,0,0.29971746,20.655088,20.220855)",style:{"font-style":"normal","font-weight":"normal","font-size":"51.4601px","line-height":"125%","font-family":"Sans","letter-spacing":"0px","word-spacing":"0px",fill:"#000000","fill-opacity":"1",stroke:"none","stroke-width":"1px","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-opacity":"1"}},[createBaseVNode("path",{d:"m -29.828843,-32.840076 h 5.075651 v 15.377717 h 18.4432096 v -15.377717 h 5.0756516 V 4.6745172 H -6.3099824 V -13.190771 H -24.753192 V 4.6745172 h -5.075651 z"})])],-1)])])}var RoomHumidity=_export_sfc(_sfc_main$9,[["render",_sfc_render$8],["__scopeId","data-v-24b9fe86"]]),RoomTemperature_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$7=defineComponent({name:"RoomTemperature",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$7=()=>{useCssVars((t=>({"4917c445":t.fillColor})))},__setup__$7=__default__$7.setup;__default__$7.setup=__setup__$7?(t,e)=>(__injectCSSVars__$7(),__setup__$7(t,e)):__injectCSSVars__$7;const _sfc_main$8=__default__$7,_hoisted_1$6={version:"1.1",viewBox:"0 0 18.016949 18.016949","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$7(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$6,[...e[0]||(e[0]=[createBaseVNode("g",{transform:"matrix(0.76419842,0,0,0.76419842,-3.2187002,-3.2187002)"},[createBaseVNode("circle",{r:"11.288136",cy:"16",cx:"16",style:{opacity:"1",fill:"currentColor","fill-opacity":"1","fill-rule":"nonzero",stroke:"#000000","stroke-width":"1","stroke-linecap":"butt","stroke-linejoin":"round","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),createBaseVNode("g",{transform:"translate(32.100664,13.086915)",style:{"font-style":"normal","font-weight":"normal","font-size":"20.2897px","line-height":"125%","font-family":"Sans","letter-spacing":"0px","word-spacing":"0px",fill:"#000000","fill-opacity":"1",stroke:"none","stroke-width":"1px","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-opacity":"1"}},[createBaseVNode("path",{d:"m -22.356997,-4.4825641 h 12.5126658 v 1.6842067 H -15.095093 V 10.308734 h -2.011141 V -2.7983574 h -5.250763 z"})])],-1)])])}var RoomTemperature=_export_sfc(_sfc_main$8,[["render",_sfc_render$7],["__scopeId","data-v-8497303a"]]),Wall_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$6=defineComponent({name:"WallEl",props:{bgColor:{type:String,default:"#666666"}},setup:()=>({})}),__injectCSSVars__$6=()=>{useCssVars((t=>({"4d301767":t.bgColor})))},__setup__$6=__default__$6.setup;__default__$6.setup=__setup__$6?(t,e)=>(__injectCSSVars__$6(),__setup__$6(t,e)):__injectCSSVars__$6;const _sfc_main$7=__default__$6,_hoisted_1$5={class:"wall-element"};function _sfc_render$6(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$5)}var Wall=_export_sfc(_sfc_main$7,[["render",_sfc_render$6],["__scopeId","data-v-70a2d803"]]),WeldType_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$5=defineComponent({name:"WeldType",components:{Duct:DuctEl,Fan:FanEl,CoolingCoil:CoolingCoil,HeatingCoil:HeatingCoil,FilterEl:FilterEl,Humidifier:HumidifierEl,Damper:Damper,TextEl:TextEl,BoxEl:BoxEl,IconBasic:IconBasic,IconValue:IconValue,IconSwitch:IconSwitch,ValueEl:ValueEl,Temperature:Temperature,GaugeChart:GaugeChart,DialChart:AnyChartDial,LedEl:LedEl,Boiler:Boiler,Enthalpy:Enthalpy,Flow:Flow,Heatpump:Heatpump,Pump:Pump,ValveThreeWay:ValveThreeWay,ValveTwoWay:ValveTwoWay,Humidity:Humidity,Pressure:Pressure,ThermalWheel:ThermalWheel,RoomHumidity:RoomHumidity,RoomTemperature:RoomTemperature,Wall:Wall},props:{item:{type:Object,required:!0},showArrows:{type:Boolean,default:!1}},emits:["autoManualToggle","objectClicked","changeValue"],setup(t,{emit:e}){const i=computed((()=>{var e;return IdxUtils.getEntryRange(null==(e=null==t?void 0:t.item)?void 0:e.t3Entry)})),n=computed((()=>{var e,i,n,s,a,o,r,l,h,c,u,d,p,g,f,b,v,m,y,S,w,x,C,D,T,k;if(!(null==(e=null==t?void 0:t.item)?void 0:e.t3Entry))return"";const $=IdxUtils.getEntryRange(null==(i=null==t?void 0:t.item)?void 0:i.t3Entry);if("value"===(null==(s=null==(n=null==t?void 0:t.item)?void 0:n.settings)?void 0:s.t3EntryDisplayField)||"control"===(null==(o=null==(a=null==t?void 0:t.item)?void 0:a.settings)?void 0:o.t3EntryDisplayField)){if(void 0!==(null==(l=null==(r=null==t?void 0:t.item)?void 0:r.t3Entry)?void 0:l.value)&&(null==(c=null==(h=null==t?void 0:t.item)?void 0:h.t3Entry)?void 0:c.range)>100){const e=null==(u=null==$?void 0:$.options)?void 0:u.find((e=>{var i,n;return 1e3*(null==e?void 0:e.value)===(null==(n=null==(i=null==t?void 0:t.item)?void 0:i.t3Entry)?void 0:n.value)}));return null==e?void 0:e.name}if(void 0!==(null==(p=null==(d=null==t?void 0:t.item)?void 0:d.t3Entry)?void 0:p.value)&&1===(null==(f=null==(g=null==t?void 0:t.item)?void 0:g.t3Entry)?void 0:f.digital_analog))return(null==(v=null==(b=null==t?void 0:t.item)?void 0:b.t3Entry)?void 0:v.value)/1e3+" "+$.unit;if(void 0!==(null==(y=null==(m=null==t?void 0:t.item)?void 0:m.t3Entry)?void 0:y.control)&&0===(null==(w=null==(S=null==t?void 0:t.item)?void 0:S.t3Entry)?void 0:w.digital_analog))return(null==(C=null==(x=null==t?void 0:t.item)?void 0:x.t3Entry)?void 0:C.control)?$.on:$.off}return(null==(k=null==t?void 0:t.item)?void 0:k.t3Entry[null==(T=null==(D=null==t?void 0:t.item)?void 0:D.settings)?void 0:T.t3EntryDisplayField])||""})),s=computed((()=>{var e,i,n,s;const a=null==t?void 0:t.item;return["Gauge","Dial"].includes(a.type)?"Gauge"===a.type?null==(i=null==(e=null==a?void 0:a.settings)?void 0:e.colors)?void 0:i.map((t=>[t.offset/100,t.color])):null==(s=null==(n=null==a?void 0:a.settings)?void 0:n.colors)?void 0:s.map(((t,e)=>{var i;return{from:e?null==(i=null==a?void 0:a.settings)?void 0:i.colors[e-1].offset:0,to:t.offset,color:[t.color]}})):null}));const a=ref$1(null);return{range:i,dispalyText:n,processedColors:s,changeValue:function(i){var n,s,a,o,r,l,h,c,u,d,p,g,f,b,v,m,y,S,w,x,C,D,T,k,$,O;if(0===(null==(s=null==(n=null==t?void 0:t.item)?void 0:n.t3Entry)?void 0:s.auto_manual))return;let P=!1,L=null==(o=null==(a=null==t?void 0:t.item)?void 0:a.t3Entry)?void 0:o.value;const G=IdxUtils.getEntryRange(null==(r=null==t?void 0:t.item)?void 0:r.t3Entry);if(void 0!==(null==(h=null==(l=null==t?void 0:t.item)?void 0:l.t3Entry)?void 0:h.value)&&(null==(u=null==(c=null==t?void 0:t.item)?void 0:c.t3Entry)?void 0:u.range)>100){const e=null==(d=null==G?void 0:G.options)?void 0:d.filter((t=>1===t.status)),n=e.findIndex((e=>{var i,n;return 1e3*e.value===(null==(n=null==(i=null==t?void 0:t.item)?void 0:i.t3Entry)?void 0:n.value)}));if("decrease"===i&&n<(null==e?void 0:e.length)-1)L=1e3*e[n+1].value;else{if(!("increase"===i&&n>0))return;L=1e3*e[n-1].value}}else if(void 0!==(null==(g=null==(p=null==t?void 0:t.item)?void 0:p.t3Entry)?void 0:g.value)&&1===(null==(b=null==(f=null==t?void 0:t.item)?void 0:f.t3Entry)?void 0:b.digital_analog))L="increase"===i?(null==(m=null==(v=null==t?void 0:t.item)?void 0:v.t3Entry)?void 0:m.value)+1e3:(null==(S=null==(y=null==t?void 0:t.item)?void 0:y.t3Entry)?void 0:S.value)-1e3;else if(void 0!==(null==(x=null==(w=null==t?void 0:t.item)?void 0:w.t3Entry)?void 0:x.control)&&0===(null==(D=null==(C=null==t?void 0:t.item)?void 0:C.t3Entry)?void 0:D.digital_analog))if(P=!0,"decrease"===i&&0===(null==(k=null==(T=null==t?void 0:t.item)?void 0:T.t3Entry)?void 0:k.control))L=1;else{if("increase"!==i||1!==(null==(O=null==($=null==t?void 0:t.item)?void 0:$.t3Entry)?void 0:O.control))return;L=0}e("changeValue",null==t?void 0:t.item,L,P)},refresh:function(){var e,i;a.value&&"Duct"===(null==(e=null==t?void 0:t.item)?void 0:e.type)&&(null==(i=null==a?void 0:a.value)||i.refresh())},objectRef:a}}}),__injectCSSVars__$5=()=>{useCssVars((t=>{var e,i,n,s,a,o,r,l,h,c;return{"42f405e1":null==(i=null==(e=t.item)?void 0:e.settings)?void 0:i.titleColor,"3e33d030":null==(s=null==(n=t.item)?void 0:n.settings)?void 0:s.bgColor,52843500:null==(o=null==(a=t.item)?void 0:a.settings)?void 0:o.textColor,"0da43167":(null==(l=null==(r=t.item)?void 0:r.settings)?void 0:l.fontSize)+"px",b9b4b282:null==(c=null==(h=t.item)?void 0:h.settings)?void 0:c.justifyContent}}))},__setup__$5=__default__$5.setup;__default__$5.setup=__setup__$5?(t,e)=>(__injectCSSVars__$5(),__setup__$5(t,e)):__injectCSSVars__$5;const _sfc_main$6=__default__$5,_hoisted_1$4={class:"relative"},_hoisted_2$4={key:26,class:"flex flex-col flex-nowrap justify-center"},_hoisted_3$2={class:"text-center font-bold pl-8 pb-2"},_hoisted_4$1=["src"];function _sfc_render$5(t,e,i,n,s,a){var o,r,l,h,c,u,d,p,g,f,b,v,m,y,S,w,x,C,D,T,k,$,O,P,L,G,F,I,E,A,U,_,j,M,N,B,R,H,z,V,q,W,K,Y,X,J,Z,Q,tt,et,it,nt,st,at,ot,rt,lt,ht,ct,ut,dt,pt,gt,ft,bt,vt,mt,yt,St,wt,xt,Ct,Dt,Tt,kt,$t,Ot,Pt,Lt,Gt,Ft,It,Et,At,Ut,_t,jt,Mt,Nt,Bt,Rt,Ht,zt,Vt,qt,Wt,Kt,Yt,Xt;const Jt=resolveComponent("fan"),Zt=resolveComponent("duct"),Qt=resolveComponent("cooling-coil"),te=resolveComponent("heating-coil"),ee=resolveComponent("filter-el"),ie=resolveComponent("humidifier"),ne=resolveComponent("humidity"),se=resolveComponent("Pressure"),ae=resolveComponent("ThermalWheel"),oe=resolveComponent("damper"),re=resolveComponent("boiler"),le=resolveComponent("heatpump"),he=resolveComponent("pump"),ce=resolveComponent("ValveThreeWay"),ue=resolveComponent("ValveTwoWay"),de=resolveComponent("enthalpy"),pe=resolveComponent("flow"),ge=resolveComponent("text-el"),fe=resolveComponent("box-el"),be=resolveComponent("icon-value"),ve=resolveComponent("icon-basic"),me=resolveComponent("icon-switch"),ye=resolveComponent("led-el"),Se=resolveComponent("value-el"),we=resolveComponent("temperature"),xe=resolveComponent("gauge-chart"),Ce=resolveComponent("dial-chart"),De=resolveComponent("RoomHumidity"),Te=resolveComponent("RoomTemperature"),ke=resolveComponent("Wall");return openBlock(),createElementBlock("div",{class:normalizeClass(["moveable-item",{"flex flex-col flex-nowrap":!["Dial","Gauge","Value"].includes(t.item.type),"overflow-hidden":"Text"===(null==(o=t.item)?void 0:o.type),[t.item.type]:null==(r=t.item)?void 0:r.type,"with-bg":null==(h=null==(l=t.item)?void 0:l.settings)?void 0:h.bgColor,"with-title":(null==(u=null==(c=t.item)?void 0:c.settings)?void 0:u.title)||(null==(d=t.item)?void 0:d.t3Entry)&&"none"!==(null==(g=null==(p=t.item)?void 0:p.settings)?void 0:g.t3EntryDisplayField)}])},[(null==(b=null==(f=t.item)?void 0:f.settings)?void 0:b.title)?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null==(v=t.item)?void 0:v.type)}]),onClick:e[0]||(e[0]=e=>t.$emit("objectClicked"))},toDisplayString(null==(y=null==(m=t.item)?void 0:m.settings)?void 0:y.title),3)):(null==(S=t.item)?void 0:S.t3Entry)&&"none"!==(null==(x=null==(w=t.item)?void 0:w.settings)?void 0:x.t3EntryDisplayField)?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null==(C=t.item)?void 0:C.type)}])},[createBaseVNode("div",_hoisted_1$4,[t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(null==(T=null==(D=t.item)?void 0:D.settings)?void 0:T.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==($=null==(k=t.item)?void 0:k.t3Entry)?void 0:$.auto_manual),onClick:e[1]||(e[1]=e=>t.changeValue("increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",null,[createBaseVNode("span",{onClick:e[2]||(e[2]=e=>t.$emit("objectClicked"))},toDisplayString(t.dispalyText||(null==(P=null==(O=t.item)?void 0:O.t3Entry)?void 0:P.id)),1),void 0!==(null==(G=null==(L=t.item)?void 0:L.t3Entry)?void 0:G.auto_manual)?(openBlock(),createElementBlock("span",{key:0,class:"mode-icon ml-2 text-lg",onClick:e[3]||(e[3]=e=>t.$emit("autoManualToggle"))},[(null==(I=null==(F=t.item)?void 0:F.t3Entry)?void 0:I.auto_manual)?(openBlock(),createBlock(QIcon,{key:1,name:"swipe_up"},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[7]||(e[7]=[createTextVNode(" In manual mode ",-1)])])),_:1})])),_:1})):(openBlock(),createBlock(QIcon,{key:0,name:"motion_photos_auto"},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[6]||(e[6]=[createTextVNode(" In auto mode ",-1)])])),_:1})])),_:1}))])):createCommentVNode("",!0)]),t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(null==(A=null==(E=t.item)?void 0:E.settings)?void 0:A.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(U=t.item.t3Entry)?void 0:U.auto_manual),onClick:e[4]||(e[4]=e=>t.changeValue("decrease"))},null,8,["disable"])):createCommentVNode("",!0)])],2)):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass(["flex justify-center object-container relative",{grow:!["Icon","Switch"].includes(null==(_=t.item)?void 0:_.type)}]),onClick:e[5]||(e[5]=e=>t.$emit("objectClicked"))},["Fan"===(null==(j=t.item)?void 0:j.type)?(openBlock(),createBlock(Jt,mergeProps({key:0,class:"fan"},null==(M=t.item)?void 0:M.settings),null,16)):"Duct"===(null==(N=t.item)?void 0:N.type)?(openBlock(),createBlock(Zt,mergeProps({key:1,class:"duct"},null==(B=t.item)?void 0:B.settings,{ref:"objectRef"}),null,16)):"CoolingCoil"===(null==(R=t.item)?void 0:R.type)?(openBlock(),createBlock(Qt,mergeProps({key:2,class:"cooling-coil"},null==(H=t.item)?void 0:H.settings),null,16)):"HeatingCoil"===(null==(z=t.item)?void 0:z.type)?(openBlock(),createBlock(te,mergeProps({key:3,class:"heating-coil"},null==(V=t.item)?void 0:V.settings),null,16)):"Filter"===(null==(q=t.item)?void 0:q.type)?(openBlock(),createBlock(ee,mergeProps({key:4,class:"filter"},null==(W=t.item)?void 0:W.settings),null,16)):"Humidifier"===(null==(K=t.item)?void 0:K.type)?(openBlock(),createBlock(ie,mergeProps({key:5,class:"humidifier"},null==(Y=t.item)?void 0:Y.settings),null,16)):"Humidity"===(null==(X=t.item)?void 0:X.type)?(openBlock(),createBlock(ne,mergeProps({key:6,class:"humidity"},null==(J=t.item)?void 0:J.settings),null,16)):"Pressure"===(null==(Z=t.item)?void 0:Z.type)?(openBlock(),createBlock(se,mergeProps({key:7,class:"pressure"},null==(Q=t.item)?void 0:Q.settings),null,16)):"ThermalWheel"===(null==(tt=t.item)?void 0:tt.type)?(openBlock(),createBlock(ae,mergeProps({key:8,class:"thermal-wheel"},null==(et=t.item)?void 0:et.settings),null,16)):"Damper"===(null==(it=t.item)?void 0:it.type)?(openBlock(),createBlock(oe,mergeProps({key:9,class:"damper",item:t.item},null==(nt=t.item)?void 0:nt.settings),null,16,["item"])):"Boiler"===(null==(st=t.item)?void 0:st.type)?(openBlock(),createBlock(re,mergeProps({key:10,class:"boiler"},null==(at=t.item)?void 0:at.settings),null,16)):"Heatpump"===(null==(ot=t.item)?void 0:ot.type)?(openBlock(),createBlock(le,mergeProps({key:11,class:"heatpump"},null==(rt=t.item)?void 0:rt.settings),null,16)):"Pump"===(null==(lt=t.item)?void 0:lt.type)?(openBlock(),createBlock(he,mergeProps({key:12,class:"heatpump"},null==(ht=t.item)?void 0:ht.settings),null,16)):"ValveThreeWay"===(null==(ct=t.item)?void 0:ct.type)?(openBlock(),createBlock(ce,mergeProps({key:13,class:"valve-threeway"},null==(ut=t.item)?void 0:ut.settings),null,16)):"ValveTwoWay"===(null==(dt=t.item)?void 0:dt.type)?(openBlock(),createBlock(ue,mergeProps({key:14,class:"valve-threeway"},null==(pt=t.item)?void 0:pt.settings),null,16)):"Enthalpy"===(null==(gt=t.item)?void 0:gt.type)?(openBlock(),createBlock(de,mergeProps({key:15,class:"enthalpy"},null==(ft=t.item)?void 0:ft.settings),null,16)):"Flow"===(null==(bt=t.item)?void 0:bt.type)?(openBlock(),createBlock(pe,mergeProps({key:16,class:"flow"},null==(vt=t.item)?void 0:vt.settings),null,16)):"Text"===(null==(mt=t.item)?void 0:mt.type)?(openBlock(),createBlock(ge,mergeProps({key:17,class:"text"},null==(yt=t.item)?void 0:yt.settings),null,16)):"Box"===(null==(St=t.item)?void 0:St.type)?(openBlock(),createBlock(fe,mergeProps({key:18,class:"box"},null==(wt=t.item)?void 0:wt.settings),null,16)):"Icon"===(null==(xt=t.item)?void 0:xt.type)?(openBlock(),createBlock(be,mergeProps({key:19,class:"icon-value",item:t.item,"show-arrows":t.showArrows},null==(Ct=t.item)?void 0:Ct.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"IconBasic"===(null==(Dt=t.item)?void 0:Dt.type)?(openBlock(),createBlock(ve,mergeProps({key:20,class:"icon-basic",item:t.item},null==(Tt=t.item)?void 0:Tt.settings),null,16,["item"])):"Switch"===(null==(kt=t.item)?void 0:kt.type)?(openBlock(),createBlock(me,mergeProps({key:21,class:"icon-switch",item:t.item,"show-arrows":t.showArrows},null==($t=t.item)?void 0:$t.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"LED"===(null==(Ot=t.item)?void 0:Ot.type)?(openBlock(),createBlock(ye,mergeProps({key:22,class:"led-el",item:t.item},null==(Pt=t.item)?void 0:Pt.settings),null,16,["item"])):"Value"===(null==(Lt=t.item)?void 0:Lt.type)?(openBlock(),createBlock(Se,mergeProps({key:23,class:"value",item:t.item,"show-arrows":t.showArrows},null==(Gt=t.item)?void 0:Gt.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"Temperature"===(null==(Ft=t.item)?void 0:Ft.type)?(openBlock(),createBlock(we,mergeProps({key:24,class:"temperature"},null==(It=t.item)?void 0:It.settings),null,16)):"Gauge"===(null==(Et=t.item)?void 0:Et.type)?(openBlock(),createBlock(xe,mergeProps({key:25,class:"gauge-object gauge"},null==(At=t.item)?void 0:At.settings,{unit:null==(Ut=t.range)?void 0:Ut.unit,colors:t.processedColors,value:(null==(_t=t.item.t3Entry)?void 0:_t.value)/1e3||0}),null,16,["unit","colors","value"])):"Dial"===(null==(jt=t.item)?void 0:jt.type)?(openBlock(),createElementBlock("div",_hoisted_2$4,[createVNode(Ce,{class:"gauge-object dial",options:{value:(null==(Mt=t.item.t3Entry)?void 0:Mt.value)/1e3||0,unit:t.range.unit,...t.item.settings,colors:t.processedColors}},null,8,["options"]),createBaseVNode("div",_hoisted_3$2,toDisplayString((null==(Nt=t.item.t3Entry)?void 0:Nt.value)/1e3||0)+" "+toDisplayString(t.range.unit),1)])):"RoomHumidity"===(null==(Bt=t.item)?void 0:Bt.type)?(openBlock(),createBlock(De,mergeProps({key:27,class:"room-humidity"},null==(Rt=t.item)?void 0:Rt.settings),null,16)):"RoomTemperature"===(null==(Ht=t.item)?void 0:Ht.type)?(openBlock(),createBlock(Te,mergeProps({key:28,class:"room-temperature"},null==(zt=t.item)?void 0:zt.settings),null,16)):"Wall"===(null==(Vt=t.item)?void 0:Vt.type)?(openBlock(),createBlock(ke,mergeProps({key:29,class:"room-temperature"},null==(qt=t.item)?void 0:qt.settings),null,16)):(null==(Kt=null==(Wt=t.item)?void 0:Wt.type)?void 0:Kt.startsWith("IMG-"))?(openBlock(),createElementBlock("img",{key:30,class:"img-object",src:null==(Xt=null==(Yt=t.item)?void 0:Yt.image)?void 0:Xt.path},null,8,_hoisted_4$1)):createCommentVNode("",!0)],2)],2)}var WeldType=_export_sfc(_sfc_main$6,[["render",_sfc_render$5],["__scopeId","data-v-86df7cee"]]),Weld_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$4=defineComponent({name:"WeldEl",components:{WeldType:WeldType},props:{weldModel:{type:Object,default:()=>{}}},emits:["updateWeldModel"],setup(t,{emit:e}){const i=computed((()=>t.weldModel));let n=i.value.width,s=i.value.height;const a=i.value.settings.fillColor,o=i.value.settings.weldItems,r=()=>{if(0===o.length)return o;var t={widthScale:i.value.width/n,heightScale:i.value.height/s,tranXScale:i.value.translate[0]/n,tranYScale:i.value.translate[1]/s};const e=o[0],r=e.translate[0],l=e.translate[1];return o.map(((e,n)=>(0===n?(e.width=e.width*t.widthScale,e.height=e.height*t.heightScale,e.translate[0]=0,e.translate[1]=0):(e.width=e.width*t.widthScale,e.height=e.height*t.heightScale,e.translate[0]*=t.widthScale,e.translate[1]*=t.heightScale,e.translate[0]-=r*t.widthScale,e.translate[1]-=l*t.heightScale),i.value.settings.fillColor!==a&&("Duct"===e.type?e.settings.bgColor=i.value.settings.fillColor:e.settings.fillColor=i.value.settings.fillColor),e)))},l=computed((()=>{var t=r();return e("updateWeldModel",i.value,t),n=i.value.width,s=i.value.height,t}));return onMounted((()=>{})),{itemList:l,weldData:i}}}),__injectCSSVars__$4=()=>{useCssVars((t=>{var e,i,n;return{"1c4b56ee":null==(e=t.settings)?void 0:e.bgColor,"7b957de1":null==(i=t.settings)?void 0:i.textColor,"33a63d08":(null==(n=t.settings)?void 0:n.fontSize)+"px"}}))},__setup__$4=__default__$4.setup;__default__$4.setup=__setup__$4?(t,e)=>(__injectCSSVars__$4(),__setup__$4(t,e)):__injectCSSVars__$4;const _sfc_main$5=__default__$4,_hoisted_1$3={class:"weld-element flex justify-center object-container"},_hoisted_2$3=["id"];function _sfc_render$4(t,e,i,n,s,a){const o=resolveComponent("weld-type");return openBlock(),createElementBlock("div",_hoisted_1$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(t.itemList,((t,e)=>(openBlock(),createElementBlock("div",{key:t.id,style:normalizeStyle(`position: absolute; transform: translate(${t.translate[0]}px, ${t.translate[1]}px) rotate(${t.rotate}deg) scaleX(${t.scaleX}) scaleY(${t.scaleY}); width: ${t.width}px; height: ${t.height}px; z-index: ${t.zindex};`),class:normalizeClass(`weld-item-index-${e}`),id:`weld-item-${t.id}`},[(openBlock(),createBlock(o,{ref_for:!0,ref:"objectsRef",item:t,key:t.id+t.type},null,8,["item"]))],14,_hoisted_2$3)))),128))])}var Weld=_export_sfc(_sfc_main$5,[["render",_sfc_render$4],["__scopeId","data-v-17104fb8"]]),Circle_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$3=defineComponent({name:"CircleEl",props:{bgColor:{type:String,default:"black"},fillColor:{type:String,default:"#659dc5"}},setup:()=>({})}),__injectCSSVars__$3=()=>{useCssVars((t=>({e60ce388:t.fillColor})))},__setup__$3=__default__$3.setup;__default__$3.setup=__setup__$3?(t,e)=>(__injectCSSVars__$3(),__setup__$3(t,e)):__injectCSSVars__$3;const _sfc_main$4=__default__$3;function _sfc_render$3(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 20.921802 20.921802",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createBaseVNode("g",{fill:"currentColor",transform:"translate(-5.4940996,-5.5390997)"},[createBaseVNode("g",{class:"circle"},[createBaseVNode("circle",{stroke:"#000000",cy:"16",cx:"15.955",r:"9.9609003"})])],-1)])],2)}var VueCircle=_export_sfc(_sfc_main$4,[["render",_sfc_render$3],["__scopeId","data-v-1880cec0"]]),Rectangle_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$2=defineComponent({name:"RectangleEl",props:{bgColor:{type:String,default:"black"},fillColor:{type:String,default:"#659dc5"}},setup:()=>({})}),__injectCSSVars__$2=()=>{useCssVars((t=>({"5b5ad64a":t.fillColor})))},__setup__$2=__default__$2.setup;__default__$2.setup=__setup__$2?(t,e)=>(__injectCSSVars__$2(),__setup__$2(t,e)):__injectCSSVars__$2;const _sfc_main$3=__default__$2;function _sfc_render$2(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 30 20",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createBaseVNode("g",{fill:"currentColor",transform:"translate(-5.4940996,-5.5390997)"},[createBaseVNode("g",{class:"rectangle"},[createBaseVNode("rect",{x:"7",y:"7",width:"27",height:"15",stroke:"#000000"})])],-1)])],2)}var RectangleEl=_export_sfc(_sfc_main$3,[["render",_sfc_render$2],["__scopeId","data-v-3b00bd7f"]]),Step_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$1=defineComponent({name:"StepEl",props:{bgColor:{type:String,default:"black"},fillColor:{type:String,default:"#659dc5"}},setup:()=>({})}),__injectCSSVars__$1=()=>{useCssVars((t=>({"89fb95b4":t.fillColor})))},__setup__$1=__default__$1.setup;__default__$1.setup=__setup__$1?(t,e)=>(__injectCSSVars__$1(),__setup__$1(t,e)):__injectCSSVars__$1;const _sfc_main$2=__default__$1,_hoisted_1$2={fill:"currentColor",transform:"translate(-1,-1)"},_hoisted_2$2={class:"step"},_hoisted_3$1=["fill"];function _sfc_render$1(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 32 32",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[createBaseVNode("g",_hoisted_1$2,[createBaseVNode("g",_hoisted_2$2,[createBaseVNode("path",{d:"M 1.6 5.4 L 25.6 5.4 L 30.4 15 L 25.6 24.6 L 1.6 24.6 L 6.4 15 Z",fill:t.fillColor,stroke:"#000000"},null,8,_hoisted_3$1)])])],2)}var StepEl=_export_sfc(_sfc_main$2,[["render",_sfc_render$1],["__scopeId","data-v-a4f139aa"]]),ObjectType_vue_vue_type_style_index_0_scoped_true_lang="";const __default__=defineComponent({name:"ObjectType",components:{Duct:DuctEl,Fan:FanEl,CoolingCoil:CoolingCoil,HeatingCoil:HeatingCoil,FilterEl:FilterEl,Humidifier:HumidifierEl,Damper:Damper,TextEl:TextEl,BoxEl:BoxEl,IconBasic:IconBasic,IconValue:IconValue,IconSwitch:IconSwitch,ValueEl:ValueEl,Temperature:Temperature,GaugeChart:GaugeChart,DialChart:AnyChartDial,LedEl:LedEl,Boiler:Boiler,Enthalpy:Enthalpy,Flow:Flow,Heatpump:Heatpump,Pump:Pump,ValveThreeWay:ValveThreeWay,ValveTwoWay:ValveTwoWay,Humidity:Humidity,Pressure:Pressure,ThermalWheel:ThermalWheel,RoomHumidity:RoomHumidity,RoomTemperature:RoomTemperature,Wall:Wall,Weld:Weld,CircleEl:VueCircle,RectangleEl:RectangleEl,StepEl:StepEl},props:{item:{type:Object,required:!0},showArrows:{type:Boolean,default:!1}},emits:["autoManualToggle","objectClicked","objectDoubleClicked","changeValue","updateWeldModel","click-right"],setup(t,{emit:e}){const i=computed((()=>{var e;return IdxUtils.getEntryRange(null==(e=t.item)?void 0:e.t3Entry)})),n=computed((()=>t.item.t3Entry?"description"===t.item.settings.t3EntryDisplayField?t.item.t3Entry.description||"":"label"===t.item.settings.t3EntryDisplayField?t.item.t3Entry.label||"":"value"===t.item.settings.t3EntryDisplayField||"control"===t.item.settings.t3EntryDisplayField?"":t.item.t3Entry[t.item.settings.t3EntryDisplayField]||"":"")),s=computed((()=>{if(!t.item.t3Entry)return"";const e=IdxUtils.getEntryRange(t.item.t3Entry),i=()=>{var i,n;if(t.item.t3Entry.range>100){const n=null==(i=e.options)?void 0:i.find((e=>e.value===t.item.t3Entry.value));return(null==n?void 0:n.name)||""}if(1===t.item.t3Entry.digital_analog){return(null!=(n=t.item.t3Entry.value)?n:"")+" "+((null==e?void 0:e.unit)||"")}return 0===t.item.t3Entry.digital_analog?t.item.t3Entry.control?(null==e?void 0:e.on)||"":(null==e?void 0:e.off)||"":""};return"description"===t.item.settings.t3EntryDisplayField||"label"===t.item.settings.t3EntryDisplayField||"value"===t.item.settings.t3EntryDisplayField||"control"===t.item.settings.t3EntryDisplayField?i():""})),a=computed((()=>{const t=n.value,e=s.value;return t&&e?t+" "+e:t||(e||"")})),o=computed((()=>{const e=t.item;return["Gauge","Dial"].includes(e.type)?"Gauge"===e.type?e.settings.colors.map((t=>[t.offset/100,t.color])):e.settings.colors.map(((t,i)=>({from:i?e.settings.colors[i-1].offset:0,to:t.offset,color:[t.color]}))):null}));const r=ref$1(null);return{range:i,displayDescription:n,displayValueText:s,dispalyText:a,processedColors:o,changeValue:function(i){var n,s;if(0===t.item.t3Entry.auto_manual)return;let a=!1,o=t.item.t3Entry.value;const r=IdxUtils.getEntryRange(null==(n=t.item)?void 0:n.t3Entry);if(void 0!==t.item.t3Entry.value&&t.item.t3Entry.range>100){const e=null==(s=r.options)?void 0:s.filter((t=>1===t.status)),n=e.findIndex((e=>e.value===t.item.t3Entry.value));if("decrease"===i&&n<e.length-1)o=e[n+1].value;else{if(!("increase"===i&&n>0))return;o=e[n-1].value}}else if(void 0!==t.item.t3Entry.value&&1===t.item.t3Entry.digital_analog)o="increase"===i?t.item.t3Entry.value+1:t.item.t3Entry.value-1;else if(void 0!==t.item.t3Entry.control&&0===t.item.t3Entry.digital_analog)if(a=!0,"decrease"===i&&0===t.item.t3Entry.control)o=1;else{if("increase"!==i||1!==t.item.t3Entry.control)return;o=0}e("changeValue",t.item,o,a)},refresh:function(){var e;r.value&&"Duct"===(null==(e=t.item)?void 0:e.type)&&r.value.refresh()},objectRef:r,updateWeldModel:(t,i)=>{e("updateWeldModel",t,i)},handleTitleRightClick:t=>{e("click-right",t)}}}}),__injectCSSVars__=()=>{useCssVars((t=>({"2db9b834":t.item.settings.bgColor,"78302c04":t.item.settings.textColor,d4e74136:t.item.settings.fontSize+"px","09eaddba":t.item.settings.titleColor,"0aa0c101":t.item.settings.justifyContent})))},__setup__=__default__.setup;__default__.setup=__setup__?(t,e)=>(__injectCSSVars__(),__setup__(t,e)):__injectCSSVars__;const _sfc_main$1=__default__,_hoisted_1$1={key:26,class:"flex flex-col flex-nowrap justify-center"},_hoisted_2$1={class:"text-center font-bold pl-8 pb-2"},_hoisted_3=["src"],_hoisted_4={class:"relative"},_hoisted_5={class:"content-with-icon"},_hoisted_6={key:0,class:"description-text"},_hoisted_7={key:1,class:"value-text"},_hoisted_8={key:2};function _sfc_render(t,e,i,n,s,a){var o,r,l,h,c,u,d,p,g,f,b,v,m,y,S,w,x,C,D,T,k,$,O,P,L,G,F,I,E,A,U,_,j,M,N,B,R,H,z,V,q,W,K,Y,X,J,Z,Q,tt,et,it,nt,st,at,ot,rt,lt,ht,ct,ut,dt,pt,gt,ft,bt,vt,mt,yt,St,wt,xt,Ct,Dt,Tt,kt,$t,Ot,Pt,Lt,Gt,Ft,It,Et,At,Ut,_t,jt,Mt,Nt,Bt;const Rt=resolveComponent("fan"),Ht=resolveComponent("duct"),zt=resolveComponent("cooling-coil"),Vt=resolveComponent("heating-coil"),qt=resolveComponent("filter-el"),Wt=resolveComponent("humidifier"),Kt=resolveComponent("humidity"),Yt=resolveComponent("Pressure"),Xt=resolveComponent("ThermalWheel"),Jt=resolveComponent("damper"),Zt=resolveComponent("boiler"),Qt=resolveComponent("heatpump"),te=resolveComponent("pump"),ee=resolveComponent("ValveThreeWay"),ie=resolveComponent("ValveTwoWay"),ne=resolveComponent("enthalpy"),se=resolveComponent("flow"),ae=resolveComponent("text-el"),oe=resolveComponent("box-el"),re=resolveComponent("icon-value"),le=resolveComponent("icon-basic"),he=resolveComponent("icon-switch"),ce=resolveComponent("led-el"),ue=resolveComponent("value-el"),de=resolveComponent("temperature"),pe=resolveComponent("gauge-chart"),ge=resolveComponent("dial-chart"),fe=resolveComponent("RoomHumidity"),be=resolveComponent("RoomTemperature"),ve=resolveComponent("Wall"),me=resolveComponent("Weld"),ye=resolveComponent("CircleEl"),Se=resolveComponent("RectangleEl"),we=resolveComponent("StepEl");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{class:normalizeClass(["moveable-item",{"overflow-hidden":"Text"===(null!=(r=null==(o=t.item)?void 0:o.type)?r:""),[t.item.type]:null!=(h=null==(l=t.item)?void 0:l.type)?h:"","with-bg":t.item.settings.bgColor,"with-title":t.item.settings.title||t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField}])},[createBaseVNode("div",{class:normalizeClass(["shape-container flex justify-center object-container relative",{grow:!["Icon","Switch"].includes(null!=(u=null==(c=t.item)?void 0:c.type)?u:"")}]),onClick:e[0]||(e[0]=e=>t.$emit("objectClicked")),onDblclick:e[1]||(e[1]=e=>t.$emit("objectDoubleClicked")),onContextmenu:e[2]||(e[2]=withModifiers(((...e)=>t.handleTitleRightClick&&t.handleTitleRightClick(...e)),["right"]))},["Fan"===(null!=(p=null==(d=t.item)?void 0:d.type)?p:"")?(openBlock(),createBlock(Rt,mergeProps({key:0,class:"fan"},t.item.settings),null,16)):"Duct"===(null!=(f=null==(g=t.item)?void 0:g.type)?f:"")?(openBlock(),createBlock(Ht,mergeProps({key:1,class:"duct"},t.item.settings,{ref:"objectRef"}),null,16)):"CoolingCoil"===(null!=(v=null==(b=t.item)?void 0:b.type)?v:"")?(openBlock(),createBlock(zt,mergeProps({key:2,class:"cooling-coil"},t.item.settings),null,16)):"HeatingCoil"===(null!=(y=null==(m=t.item)?void 0:m.type)?y:"")?(openBlock(),createBlock(Vt,mergeProps({key:3,class:"heating-coil"},t.item.settings),null,16)):"Filter"===(null!=(w=null==(S=t.item)?void 0:S.type)?w:"")?(openBlock(),createBlock(qt,mergeProps({key:4,class:"filter"},t.item.settings),null,16)):"Humidifier"===(null!=(C=null==(x=t.item)?void 0:x.type)?C:"")?(openBlock(),createBlock(Wt,mergeProps({key:5,class:"humidifier"},t.item.settings),null,16)):"Humidity"===(null!=(T=null==(D=t.item)?void 0:D.type)?T:"")?(openBlock(),createBlock(Kt,mergeProps({key:6,class:"humidity"},t.item.settings),null,16)):"Pressure"===(null!=($=null==(k=t.item)?void 0:k.type)?$:"")?(openBlock(),createBlock(Yt,mergeProps({key:7,class:"pressure"},t.item.settings),null,16)):"ThermalWheel"===(null!=(P=null==(O=t.item)?void 0:O.type)?P:"")?(openBlock(),createBlock(Xt,mergeProps({key:8,class:"thermal-wheel"},t.item.settings),null,16)):"Damper"===(null!=(G=null==(L=t.item)?void 0:L.type)?G:"")?(openBlock(),createBlock(Jt,mergeProps({key:9,class:"damper",item:t.item},t.item.settings),null,16,["item"])):"Boiler"===(null!=(I=null==(F=t.item)?void 0:F.type)?I:"")?(openBlock(),createBlock(Zt,mergeProps({key:10,class:"boiler"},t.item.settings),null,16)):"Heatpump"===(null!=(A=null==(E=t.item)?void 0:E.type)?A:"")?(openBlock(),createBlock(Qt,mergeProps({key:11,class:"heatpump"},t.item.settings),null,16)):"Pump"===(null!=(_=null==(U=t.item)?void 0:U.type)?_:"")?(openBlock(),createBlock(te,mergeProps({key:12,class:"heatpump"},t.item.settings),null,16)):"ValveThreeWay"===(null!=(M=null==(j=t.item)?void 0:j.type)?M:"")?(openBlock(),createBlock(ee,mergeProps({key:13,class:"valve-threeway"},t.item.settings),null,16)):"ValveTwoWay"===(null!=(B=null==(N=t.item)?void 0:N.type)?B:"")?(openBlock(),createBlock(ie,mergeProps({key:14,class:"valve-threeway"},t.item.settings),null,16)):"Enthalpy"===(null!=(H=null==(R=t.item)?void 0:R.type)?H:"")?(openBlock(),createBlock(ne,mergeProps({key:15,class:"enthalpy"},t.item.settings),null,16)):"Flow"===(null!=(V=null==(z=t.item)?void 0:z.type)?V:"")?(openBlock(),createBlock(se,mergeProps({key:16,class:"flow"},t.item.settings),null,16)):"Text"===(null!=(W=null==(q=t.item)?void 0:q.type)?W:"")?(openBlock(),createBlock(ae,mergeProps({key:17,class:"text"},t.item.settings),null,16)):"Box"===(null!=(Y=null==(K=t.item)?void 0:K.type)?Y:"")?(openBlock(),createBlock(oe,mergeProps({key:18,class:"box"},t.item.settings),null,16)):"Icon"===(null!=(J=null==(X=t.item)?void 0:X.type)?J:"")?(openBlock(),createBlock(re,mergeProps({key:19,class:"icon-value",item:t.item,"show-arrows":t.showArrows},t.item.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"IconBasic"===(null!=(Q=null==(Z=t.item)?void 0:Z.type)?Q:"")?(openBlock(),createBlock(le,mergeProps({key:20,class:"icon-basic",item:t.item},t.item.settings),null,16,["item"])):"Switch"===(null!=(et=null==(tt=t.item)?void 0:tt.type)?et:"")?(openBlock(),createBlock(he,mergeProps({key:21,class:"icon-switch",item:t.item,"show-arrows":t.showArrows},t.item.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"LED"===(null!=(nt=null==(it=t.item)?void 0:it.type)?nt:"")?(openBlock(),createBlock(ce,mergeProps({key:22,class:"led-el",item:t.item},t.item.settings),null,16,["item"])):"Value"===(null!=(at=null==(st=t.item)?void 0:st.type)?at:"")?(openBlock(),createBlock(ue,mergeProps({key:23,class:"value",item:t.item,"show-arrows":t.showArrows},t.item.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"Temperature"===(null!=(rt=null==(ot=t.item)?void 0:ot.type)?rt:"")?(openBlock(),createBlock(de,mergeProps({key:24,class:"temperature"},t.item.settings),null,16)):"Gauge"===(null!=(ht=null==(lt=t.item)?void 0:lt.type)?ht:"")?(openBlock(),createBlock(pe,mergeProps({key:25,class:"gauge-object gauge"},t.item.settings,{unit:t.range.unit,colors:t.processedColors,value:(null==(ct=t.item.t3Entry)?void 0:ct.value)||0}),null,16,["unit","colors","value"])):"Dial"===(null!=(dt=null==(ut=t.item)?void 0:ut.type)?dt:"")?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(ge,{class:"gauge-object dial",options:{value:(null==(pt=t.item.t3Entry)?void 0:pt.value)||0,unit:t.range.unit,...t.item.settings,colors:t.processedColors}},null,8,["options"]),createBaseVNode("div",_hoisted_2$1,toDisplayString((null==(gt=t.item.t3Entry)?void 0:gt.value)||0)+" "+toDisplayString(t.range.unit),1)])):"RoomHumidity"===(null!=(bt=null==(ft=t.item)?void 0:ft.type)?bt:"")?(openBlock(),createBlock(fe,mergeProps({key:27,class:"room-humidity"},t.item.settings),null,16)):"RoomTemperature"===(null!=(mt=null==(vt=t.item)?void 0:vt.type)?mt:"")?(openBlock(),createBlock(be,mergeProps({key:28,class:"room-temperature"},t.item.settings),null,16)):"Wall"===(null!=(St=null==(yt=t.item)?void 0:yt.type)?St:"")?(openBlock(),createBlock(ve,mergeProps({key:29,class:"room-temperature"},t.item.settings),null,16)):"Weld"===(null!=(xt=null==(wt=t.item)?void 0:wt.type)?xt:"")?(openBlock(),createBlock(me,{key:30,class:"weld",weldModel:t.item,onUpdateWeldModel:t.updateWeldModel},null,8,["weldModel","onUpdateWeldModel"])):"string"==typeof(null==(Ct=t.item)?void 0:Ct.type)&&t.item.type.startsWith("IMG-")?(openBlock(),createElementBlock("img",{key:31,class:"img-object",src:null==(Tt=null==(Dt=t.item)?void 0:Dt.image)?void 0:Tt.path},null,8,_hoisted_3)):"G_Circle"===(null!=($t=null==(kt=t.item)?void 0:kt.type)?$t:"")?(openBlock(),createBlock(ye,mergeProps({key:32,class:"circle"},t.item.settings),null,16)):"G_Rectangle"===(null!=(Pt=null==(Ot=t.item)?void 0:Ot.type)?Pt:"")?(openBlock(),createBlock(Se,mergeProps({key:33,class:"rectangle"},t.item.settings),null,16)):"G_Step"===(null!=(Gt=null==(Lt=t.item)?void 0:Lt.type)?Gt:"")?(openBlock(),createBlock(we,mergeProps({key:34,class:"step"},t.item.settings),null,16)):createCommentVNode("",!0)],34)],2),t.item.settings.title||t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField?(openBlock(),createElementBlock("div",{key:0,class:"title-overlay",onContextmenu:e[10]||(e[10]=withModifiers(((...e)=>t.handleTitleRightClick&&t.handleTitleRightClick(...e)),["right"]))},[t.item.settings.title?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null!=(It=null==(Ft=t.item)?void 0:Ft.type)?It:"")}]),onClick:e[3]||(e[3]=e=>t.$emit("objectClicked")),onDblclick:e[4]||(e[4]=e=>t.$emit("objectDoubleClicked"))},toDisplayString(t.item.settings.title),35)):t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null!=(At=null==(Et=t.item)?void 0:Et.type)?At:"")}])},[createBaseVNode("div",_hoisted_4,[t.showArrows&&"Switch"!==(null!=(_t=null==(Ut=t.item)?void 0:Ut.type)?_t:"")&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(jt=t.item.t3Entry)?void 0:jt.auto_manual),onClick:e[5]||(e[5]=e=>t.changeValue("increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_5,[void 0!==t.item.t3Entry.auto_manual?(openBlock(),createElementBlock("span",{key:0,class:"mode-icon-left",onClick:e[6]||(e[6]=e=>t.$emit("autoManualToggle"))},[t.item.t3Entry.auto_manual?(openBlock(),createBlock(QIcon,{key:1,name:"lock",style:{"font-size":"large",color:"#659dc5"}},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[12]||(e[12]=[createTextVNode(" In manual mode ",-1)])])),_:1})])),_:1})):(openBlock(),createBlock(QIcon,{key:0},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[11]||(e[11]=[createTextVNode(" In auto mode ",-1)])])),_:1})])),_:1}))])):createCommentVNode("",!0),createBaseVNode("div",{onClick:e[7]||(e[7]=e=>t.$emit("objectClicked")),onDblclick:e[8]||(e[8]=e=>t.$emit("objectDoubleClicked")),class:"text-display"},[t.displayDescription?(openBlock(),createElementBlock("span",_hoisted_6,toDisplayString(t.displayDescription),1)):createCommentVNode("",!0),t.displayValueText?(openBlock(),createElementBlock("span",_hoisted_7,toDisplayString(t.displayValueText),1)):createCommentVNode("",!0),t.displayDescription||t.displayValueText?createCommentVNode("",!0):(openBlock(),createElementBlock("span",_hoisted_8,toDisplayString(t.item.t3Entry.id),1))],32)])]),t.showArrows&&"Switch"!==(null!=(Nt=null==(Mt=t.item)?void 0:Mt.type)?Nt:"")&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(Bt=t.item.t3Entry)?void 0:Bt.auto_manual),onClick:e[9]||(e[9]=e=>t.changeValue("decrease"))},null,8,["disable"])):createCommentVNode("",!0)])],2)):createCommentVNode("",!0)],32)):createCommentVNode("",!0)],64)}var ObjectType=_export_sfc(_sfc_main$1,[["render",_sfc_render],["__scopeId","data-v-501a728d"]]);class PageMain{constructor(){__publicField(this,"ResetLeftPanel",(t=>{const e=document.getElementById(HvConstant.DocumentAreaModel.LEFT_PANEL_ID),i=t?0:HvConstant.DocumentAreaModel.LEFT_PANEL_WIDTH;e.setAttribute("style",`width: ${i}px`);const n=document.getElementById(HvConstant.DocumentAreaModel.WORK_AREA_ID),s=t?0:HvConstant.DocumentAreaModel.WORK_AREA_PADDING_LEFT;n.setAttribute("style",`padding-left: ${s}px`),LogUtil.Debug("ResetLeftPanel=>",`isLocked=${t}`,`newWidth=${i}`,`newPaddingLeft=${s}`)})),__publicField(this,"ResetZoom",(()=>{LogUtil.Debug("ResetZoom=>")})),__publicField(this,"UpdateExteriorWallStroke",((t,e,i)=>{if(!t)return;const n=this.GetExteriorWallStrokeWidth(i);t.value.items[e].settings.strokeWidth=n})),__publicField(this,"GetExteriorWallHeight",(t=>.5128205128205128*t)),__publicField(this,"GetExteriorWallStrokeWidth",(t=>1.95*t)),__publicField(this,"ClearItemsWithZeroWidth",(t=>{if(!t)return;const e=t.value.items.filter((t=>0!==t.width));t.value.items=lodash.exports.cloneDeep(e),null!=t.value.activeItemIndex&&(t.value.activeItemIndex=t.value.items.length-1)})),__publicField(this,"SetWallDimensionsVisible",((t,e,i,n)=>{if("all"==t&&i.value.items.forEach((t=>{"Int_Ext_Wall"===t.type&&(t.showDimensions=n)})),"select"===t){if(e)return;{const t=i.value.selectedTargets.map((t=>i.value.items.findIndex((e=>`moveable-item-${e.id}`===t.id&&"Int_Ext_Wall"===e.type))));i.value.items.forEach(((e,i)=>{"Int_Ext_Wall"===e.type&&(e.showDimensions=t.includes(i))}))}}})),__publicField(this,"GetPreviousItem",(t=>{let e=t.value.activeItemIndex-1;for(;e>=0&&0===t.value.items[e].width;)e--;return e>=0?e:-1})),__publicField(this,"StartAutoJoinWall",((t,e)=>{LogUtil.Debug("AutoJoinWall StartAutoJoinWall=>",t.value.items,t.value.activeItemIndex,e);const i=t.value.items[t.value.activeItemIndex],n=this.GetPreviousItem(t),s=t.value.items[n];LogUtil.Debug("AutoJoinWall StartAutoJoinWall Current item:",i),LogUtil.Debug("AutoJoinWall StartAutoJoinWall Previous item:",s),null!=s&&(s.joinWall?s.joinWall.push(lodash.exports.cloneDeep(i)):s.joinWall=[lodash.exports.cloneDeep(i)])})),__publicField(this,"AutoJoinWall",((t,e,i,n,s)=>{var a;LogUtil.Debug("AutoJoinWall=>",t.value.items,t.value.activeItemIndex,e,i,n,s);const o=this.GetPreviousItem(t),r=t.value.items[o];null!=r&&(null==(a=null==r?void 0:r.joinWall)||a.forEach((t=>{t.x=e,t.y=i,t.rotate=n,t.width=s})))}))}}class NvConstant{}__publicField(NvConstant,"TextElemLastOpt",{Init:-1,Char:0,BS:1,DEL:2,Style:3,Cut:4,Copy:5,Paste:6,Select:7,Timeout:8}),__publicField(NvConstant,"RulerUnit",{None:0,Inches:1,Feet:2,Mm:3,Cm:4,M:5}),__publicField(NvConstant,"Colors",{White:"#FFFFFF",Black:"#000000",Hilite:"#0099FF",Select:"#00FF00",Trans:4294967295,Gray:"#C0C0C0"}),__publicField(NvConstant,"FillTypes",{Transparent:0,Solid:1,Gradient:2,Texture:3,Image:4,RichGradient:5}),__publicField(NvConstant,"GraphType",{Unset:-1,Bar:0,StackedBar:1,Line:2,Pie:3,LineArpie:4,StackedLine:5}),__publicField(NvConstant,"GraphFlags",{SequenceByCategory:4}),__publicField(NvConstant,"AxisFlags",{DaxHideMinorTicks:4,DaxShowGridLineMajor:32}),__publicField(NvConstant,"LegendType",{DaxLegendFull:0,DaxLegendNone:1,DaxLegendNames:2,DaxLegendSwatches:3}),__publicField(NvConstant,"HopDimX",[6,8,10]),__publicField(NvConstant,"HopDimY",[4,5,6]),__publicField(NvConstant,"HopStyle",{Box:0,Arc:1}),__publicField(NvConstant,"DimensionFlags",{EndPts:1,AllSeg:2,Total:4,Select:8,Always:16,Area:32,AreaSel:64,Standoff:128,Exterior:256,ShowFractionalInches:512,RectWithAndHeight:1024,ShowLineAngles:2048,InteriorAngles:4096,HideHookedObjDimensions:8192,ShowFeetAsInches:16384}),__publicField(NvConstant,"TextGrowBehavior",{ProPortional:0,Horizontal:1,Vertical:2,FSize:3}),__publicField(NvConstant,"StyleDefaults",{Default:"Style1",DefThick:1,DefFont:"Arial"}),__publicField(NvConstant,"LayerFlags",{Visible:1,Active:2,NoAdd:4,AllowCellEdit:8,UseEdges:16}),__publicField(NvConstant,"LayerTypes",{None:0,WebPage:4,Background:7}),__publicField(NvConstant,"LayerMoveType",{Bottom:0,Before:1,After:2,Top:3}),__publicField(NvConstant,"ContainerListArrangements",{Row:0,Column:1}),__publicField(NvConstant,"ContainerListFlags",{AllowOnlyContainers:1,AllowOnlyNonContainers:2,Sparse:4,LeftChanged:8,TopChanged:16,Adjust:32}),__publicField(NvConstant,"EditState",{Default:1,Stamp:2,Text:3,FormatPaint:4,LinkConnect:5,LinkJoin:6,Edit:7,DragControl:8,DragShape:9,Grab:10}),__publicField(NvConstant,"Geometry",{PI:3.14159265358979}),__publicField(NvConstant,"ObjFlags",{Select:1,Hide:2,Erase:4,EraseOnGrow:8,Lock:16,Bounds:128,ImageOnly:256,TextOnly:512,Assoc:8192,Obj1:16384,ContConn:32768,UseConnect:131072,DropOnBorder:262144,DropOnTable:524288,LineHop:1048576,LineMod:2097152,NoTableLink:4194304,NoLinking:16777216,NotVisible:268435456,NoMaintainLink:536870912}),__publicField(NvConstant,"TextFlags",{AttachB:4,AttachA:8,None:16,AttachC:32,HorizText:128,OneClick:512,FormCR:2048,NoSpell:4096,Clickhere:8192,AttachD:16384,TitleBlock:32768}),__publicField(NvConstant,"SessionMoreFlags",{NoActionButton:16,HideLayerTabs:1024}),__publicField(NvConstant,"HookFlags",{LcShape:1,LcLine:2,LcHOnly:4,LcVOnly:8,LcCHook:16,LcArrayMod:32,LcMoveTarget:128,LcAttachToLine:256,LcNoSnaps:512,LcShapeOnLine:1024,LcAutoInsert:8192,LcForceEnd:16384,LcHookNoExtra:131072,LcHookReverse:262144,LcNoContinuous:524288,LcTableRows:1048576}),__publicField(NvConstant,"ListCodes",{CircTarg:1,MoveTarg:2,MoveHook:3,TargOnly:4,ChildrenOnly:5,TopOnly:6,LinesOnly:7,MoveTargAndLines:8}),__publicField(NvConstant,"FloatingPointDim",{Width:16,Height:32}),__publicField(NvConstant,"HitCodes",{Border:40,Inside:41,PLApp:73,InContainer:101}),__publicField(NvConstant,"GuideDistanceTypes",{Room:1,Horizontal_Wall:2,Vertical_Wall:3,PolyWall:4}),__publicField(NvConstant,"SegLDir",{Ktc:5,Kbc:6,Klc:7,Krc:8}),__publicField(NvConstant,"FNObjectTypes",{None:0,PictContainer:1,Frame:2,CauseEffectMain:9,FlWall:16,Annotation:32,UiElement:33,NgEvent:35,NgEventLabel:36,D3Symbol:37,Multiplicity:39,ShapeContainer:55,FrameContainer:75,ExtraTextLable:80,GanttBar:10}),__publicField(NvConstant,"ObjectSubTypes",{SubtMultiplicityFilpped:80}),__publicField(NvConstant,"ImageScales",{AlwaysFit:0,CropToFit:1,PropFit:2});class OptConstant{}__publicField(OptConstant,"CSType",{Rect:1,RRect:2,Oval:3,Line:4,Polyline:5,Polygon:6,Path:7,Text:8,Image:9,Group:10,Layer:11,Symbol:12,PolylineContainer:13,PolyPolyline:14,ShapeCopy:15,ShapeContainer:16,ForeignObject:17}),__publicField(OptConstant,"ShapeType",{Rect:"Rect",RRect:"RRect",Oval:"Oval",Polygon:"Polygon",VectorSymbol:"VectorSymbol",BitmapSymbol:"BitmapSymbol",GroupSymbol:"GroupSymbol",SvgSymbol:"SvgSymbol",D3Symbol:"D3Symbol",ForeignObject:"ForeignObject"}),__publicField(OptConstant,"EventBehavior",{Normal:"visiblePainted",Inside:"visibleFill",Outside:"visibleStroke",ALL:"visible",Hidden:"painted",HiddenIn:"fill",HiddenOut:"stroke",HiddenAll:"all",None:"none"}),__publicField(OptConstant,"ExportType",{None:0,PNG:2,SVG:3,JPEG:13}),__publicField(OptConstant,"LineTypes",{LsNone:0,LsComm:1,LsDigi:2,LsChord:3,LsWall:4,LsMeasuringTape:5}),__publicField(OptConstant,"SVGPathSeg",{PATHSEG_UNKNOWN:0,PATHSEG_CLOSEPATH:1,PATHSEG_MOVETO_ABS:2,PATHSEG_MOVETO_REL:3,PATHSEG_LINETO_ABS:4,PATHSEG_LINETO_REL:5,PATHSEG_CURVETO_CUBIC_ABS:6,PATHSEG_CURVETO_CUBIC_REL:7,PATHSEG_CURVETO_QUADRATIC_ABS:8,PATHSEG_CURVETO_QUADRATIC_REL:9,PATHSEG_ARC_ABS:10,PATHSEG_ARC_REL:11,PATHSEG_LINETO_HORIZONTAL_ABS:12,PATHSEG_LINETO_HORIZONTAL_REL:13,PATHSEG_LINETO_VERTICAL_ABS:14,PATHSEG_LINETO_VERTICAL_REL:15,PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:16,PATHSEG_CURVETO_CUBIC_SMOOTH_REL:17,PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:18,PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:19}),__publicField(OptConstant,"LineType",{LINE:1,ARCLINE:2,SEGLINE:3,ARCSEGLINE:4,POLYLINE:5,PARABOLA:6,FREEHAND:7,NURBS:501,NURBSSEG:502,ELLIPSE:503,ELLIPSEEND:504,QUADBEZ:505,QUADBEZCON:506,CUBEBEZ:507,CUBEBEZCON:508,SPLINE:509,SPLINECON:510,MOVETO:600,MOVETO_NEWPOLY:601}),__publicField(OptConstant,"ArcQuad",{PLA_TL:0,PLA_BL:1,PLA_BR:2,PLA_TR:3}),__publicField(OptConstant,"ObjMoreFlags",{FixedRR:64,Container:128,UseInfoNoteIcon:256,ContainerChild:512,AutoContainer:1024,FrameAllowNesting:2048,FrameGroup:4096}),__publicField(OptConstant,"Common",{EdgeSlop:5,DimMax:3e4,MetricConv:2.54,ConnPointDim:7,ConnPointLineDim:16,JoinPointLineDim:32,MinWidth:1,MaxPolyPoints:100,RoundFactor:.292893218,LongIntMax:2147483647,HorizOnly:1,VertOnly:2,SegMinLen:4,SegMinSeg:4,SegDefLen:25,Slop:7,SlopShapeExtra:10,ConnectorSlop:25,FlowConnectorSlop:75,FlowRadialSlop:150,FlowConnectorDisp:50,KnobSize:9,RKnobSize:7,CKnobSize:14,MinDim:4,Action:"act_",HitAreas:"hitareas_",GraphTextHit:"graph_texthit",EllipseAxes:"axes_",MaxPolySegs:500,MaxSteps:100,DimDefaultStandoff:25,DimDefaultNonStandoff:5,DimDefaultTextGap:3,DimLineColor:"#000000",CoordinateLineDefaultStandoff:-2.5,CoordinateLineDefaultNonStandoff:0,CoordinateLineDefaultTextGap:3,CoordinateLineColor:"blue",FindObjectMinHitSpot:5,DefTextMargin:2,TextBlockStyle:"Text Block",DefMargin:50,DNull:4294967295,DefRRect:.2,DefFixedRRect:.05,ShapeWidth:120,ShapeHeight:50,ShapeSquare:60,MaxHops:32,MaxWorkDimX:32e4,MaxWorkDimY:32e4,CITreeSpaceExtra:16,ConPlusPath:"plus.svg",ConMinusPath:"minus.svg",ConMoveVerticalPath:"move-vertical.svg",ConMoveHorizontalPath:"move-horizontal.svg",WallOpenId:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",ActionArrowSizeH:20,ActionArrowSizeV:13,BaseArrowSlop:7,ConnectorArrowSlop:25,MinSidePointLength:40,DefaultRulerMajor:100,AnnoHotDist:200,RRectFixedDim:100,MinLineDisDeterminOri:.2,IconShapeBottomOffset:2,iconShapeRightOffset:2,DefaultLayerName:"Layer-1",PenStylingDefault:{Line:{Thickness:1,Paint:{Opacity:1,Color:"#000000",FillType:1}}},HighlighterStylingDefault:{Line:{Thickness:5,Paint:{Opacity:.35,Color:"#FFE536",FillType:1}}},MaxTotalLayers:32,MaxLongDim:1e7,MinLineDrawGap:20}),__publicField(OptConstant,"ExtraFlags",{NoColor:1,FlipHoriz:8,FlipVert:16,NoRotate:32,SideKnobs:1048576,ConnToConn:2097152,NoDelete:8388608,CollapseConn:134217728,DeleteOnUnhook:2147483648}),__publicField(OptConstant,"DrawObjectBaseClass",{Shape:0,Line:1,Connector:3}),__publicField(OptConstant,"ActionArrow",{Up:1,Left:2,Down:3,Right:4,Slop:5,Custom:6,Enter:7,CoManger:8,Assistant:9,AddParents:10,AddDescendants:11}),__publicField(OptConstant,"SVGElementClass",{Shape:1,Slop:2,Hatch:3,Text:4,TextBackground:5,DimText:6,DimLine:7,BackgroundImage:8,Icon:9,NoteText:10,ActionArrow:11,DimTextNoEdit:12,AreaDimLine:13,CoordinateLine:21}),__publicField(OptConstant,"ContentType",{None:1,Text:2,Table:3}),__publicField(OptConstant,"GrowBehavior",{All:0,Horiz:1,Vertical:2,ProPortional:3}),__publicField(OptConstant,"LineOrientation",{None:1,Horizontal:2,Vertical:3,DiagonalTLRB:4,DiagonalTRBL:5}),__publicField(OptConstant,"HitAreaType",{ConnCollapse:1,ConnExpand:2,EditDimText:3}),__publicField(OptConstant,"ShapeIconType",{HyperLink:"HYPERLINK",Notes:"NOTES",Attachment:"ATTACHMENT",FieldData:"FIELDDATA",ExpandTable:"EXPANDTABLE",CollapseTable:"COLLAPSETABLE",DataAction:"DATAACTION",ExpandedView:"EXPANDEDVIEW",Comment:"COMMENT"}),__publicField(OptConstant,"ActionTriggerType",{TopLeft:1,TopCenter:2,TopRight:3,CenterRight:4,BottomRight:5,BottomCenter:6,BottomLeft:7,CenterLeft:8,Rotate:9,ModifyShape:10,LineStart:11,LineEnd:12,AttachPoint:13,SeglOne:14,SeglTwo:15,SeglThree:16,PolyNode:17,PolyAdj:18,PolyEnd:19,ConnectorHook:20,ConnectorRerp:21,ConnectorAdj:22,MovePolySeg:23,Flip:24,LineLength:31,SeglPreserve:32,LineThickness:33,DimLineAdj:34,UpdateLinks:35,ContainerAdj:36,TableSelect:27}),__publicField(OptConstant,"CollabSVGEventTypes",{ObjectMove:1,ShapeGrow:2,TableGrowColumn:3,TextEntry:4}),__publicField(OptConstant,"LineAngleDimensionDefs",{ArrowHeadSize:10,ArrowHeadWidth:4,PreferredArrowStemMin:4,PreferredBisectorLen:75}),__publicField(OptConstant,"ArrayFlags",{LeaveACl:1,LeaveACr:1}),__publicField(OptConstant,"AStyles",{StartLeft:1,BothSides:2,Stagger:4,PerpConn:8,Linear:16,Radial:32,ReverseCol:64,EndConn:128,MinZero:256,CoManager:512,FlowConn:1024,GenoConn:2048,MatchSize:4096,MinInvisible:8192,MinOne:16384,Timeline:32768}),__publicField(OptConstant,"ConnectorDefines",{DefaultHt:25,DefaultWd:25,ABk:0,ACl:1,ACr:2,NSkip:3,StubHookPt:-3,Normal:0,Above:-2,Below:-3,Parent:-4}),__publicField(OptConstant,"SessionFlags",{LLink:8,SLink:16,AttLink:256,FreeHand:1024,NoTreeOverlap:2048,AllowHops:4096,AutoFormat:524288,HideConnExpand:1048576,IsFlowChart:2097152,NoStepFormatting:1073741824}),__publicField(OptConstant,"HeaderFlags",{Pages:1024,NoAuto:4096,ShowRulers:65536,ShowGrid:131072,SnapToGridTL:262144,SnapToGridC:524288,SnapToShapesOff:1048576,ShowPageDividers:2097152,AutoGrowTopLeft:4194304}),__publicField(OptConstant,"HookPts",{KTL:1,KTR:2,KTC:5,KBC:6,KLC:7,KRC:8,LL:20,LR:21,LT:22,LB:23,KCTL:201,KCTR:202,KCBL:203,KCBR:204,KCT:205,KCB:206,KCL:207,KCR:208,KCC:209,KAT:220,KATD:221,AK:300,AKCT:305,AKCB:306,AKCL:307,AKCR:308,WTL:321,WTR:322,WBL:323,WBR:324,CustomBase:500}),__publicField(OptConstant,"LineSubclass",{LCH:0,LCD:1,LCV:2}),__publicField(OptConstant,"SeglTypes",{Line:0,Arc:1}),__publicField(OptConstant,"OptTypes",{None:0,Stamp:1,Draw:2,DragDrop:3,StampTextOnTap:4,AddCorner:5,DrawPolyline:6,FormatPainter:7,SplitWall:8});class RulerConfig{constructor(){__publicField(this,"useInches"),__publicField(this,"majorScale"),__publicField(this,"units"),__publicField(this,"nTics"),__publicField(this,"nMid"),__publicField(this,"nGrid"),__publicField(this,"originx"),__publicField(this,"originy"),__publicField(this,"major"),__publicField(this,"metricConv"),__publicField(this,"dp"),__publicField(this,"showpixels"),__publicField(this,"denom"),this.useInches=!0,this.majorScale=1,this.units=NvConstant.RulerUnit.Inches,this.nTics=12,this.nMid=1,this.nGrid=12,this.originx=0,this.originy=0,this.major=OptConstant.Common.DefaultRulerMajor,this.metricConv=OptConstant.Common.MetricConv,this.dp=2,this.showpixels=!1,this.denom=1}}class Point$1{constructor(t,e){__publicField(this,"x"),__publicField(this,"y"),this.x=t||0,this.y=e||0}}const _Style=class{constructor(t){__publicField(this,"element"),__publicField(this,"width"),__publicField(this,"height"),this.element=t,this.width=0,this.height=0}static DefineColor(t,e,i){return t=Math.min(255,Math.max(0,t)),e=Math.min(255,Math.max(0,e)),i=Math.min(255,Math.max(0,i)),"#"+t.toString(16).padStart(2,"0")+e.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")}static CalcImageSize(t,e,i,n){const s=T3Gv.docUtil?T3Gv.docUtil.svgDoc:null,a=_Style.GetCachedImageSize(t);if(a)return s&&s.ImageLoadAddRef(),void setTimeout((()=>{e(a.width,a.height,null,i),s&&s.ImageLoadDecRef()}),0);void 0===n&&(n="SVG"===t.slice(-3).toUpperCase()),_Style.imageSizeRequest=_Style.imageSizeRequest||{};const o=t.toUpperCase();_Style.imageSizeRequest[o]?_Style.imageSizeRequest[o].push({callback:e,data:i}):(_Style.imageSizeRequest[o]=[{callback:e,data:i}],n?_Style.GetSVGDimensions(t):_Style.GetBitmapDimensions(t,e,i))}static CacheImageSize(t,e,i){_Style.imageSizeCache=_Style.imageSizeCache||{},_Style.imageSizeCache[t.toUpperCase()]={width:e,height:i}}static GetCachedImageSize(t){return _Style.imageSizeCache&&_Style.imageSizeCache[t.toUpperCase()]||null}static ProcessImageSizeRequest(t,e,i,n){if(_Style.imageSizeRequest){const s=t.toUpperCase(),a=_Style.imageSizeRequest[s];if(a){delete _Style.imageSizeRequest[s];for(let t=0;t<a.length;t++){const s=a[t];s&&s.callback&&s.callback(e,i,n,s.data)}}}}static GetBitmapDimensions(t,e,i){const n=new Image,s=T3Gv.docUtil?T3Gv.docUtil.svgDoc:null;s&&s.ImageLoadAddRef(),n.onload=function(){this.width&&this.height?(_Style.CacheImageSize(t,this.width,this.height),_Style.ProcessImageSizeRequest(t,this.width,this.height,null),e&&e(this.width,this.height,null,i)):(s&&s.ImageLoadDecRef(),_Style.GetSVGDimensions(t,e,i)),s&&s.ImageLoadDecRef()},n.onerror=function(n){_Style.ProcessImageSizeRequest(t,0,0,{success:!1}),e&&e(0,0,{success:!1},i),s&&s.ImageLoadDecRef()},n.src=t}static GetSVGDimensions(t,e,i){const n=T3Gv.docUtil?T3Gv.docUtil.svgDoc:null;n&&n.ImageLoadAddRef(),$$1.ajax({type:"GET",url:t,async:!0,contentType:"image/svg",dataType:"text",success:function(s){const a=_Style.ExtractSVGSize(s);_Style.CacheImageSize(t,a.width,a.height),_Style.ProcessImageSizeRequest(t,a.width,a.height,null),e&&e(a.width,a.height,null,i),n&&n.ImageLoadDecRef()},error:function(s){_Style.ProcessImageSizeRequest(t,0,0,{success:!1}),e&&e(0,0,{success:!1},i),n&&n.ImageLoadDecRef()}})}static ExtractSVGSize(t){const e={width:100,height:100},i=t.match(/<svg([\s\S]*?)>/i);if(!i||!i[1])return e;const n=i[1];let s=0,a=0;function o(t,e){let i=0;if(!e||!t)return t;switch(e){case"in":i=100*t;break;case"mm":i=100*t/25.4;break;case"cm":i=100*t/2.54;break;case"pt":i=100*t/72;break;case"pc":i=100*t/6;break;default:i=t}return i}const r=n.match(/width=["'](\d*\.?\d+)(\w*)["']/i);r&&r[1]&&(s=o(parseFloat(r[1]),r[2]));const l=n.match(/height=["'](\d*\.?\d+)(\w*)["']/i);if(l&&l[1]&&(a=o(parseFloat(l[1]),l[2])),!s||!a){const t=n.match(/viewbox=["'](\d*\.?\d+)\s+(\d*\.?\d+)\s+(\d*\.?\d+)\s+(\d*\.?\d+)["']/i);t&&t[3]&&t[4]&&(s=parseFloat(t[3]),a=parseFloat(t[4]))}return s&&a?{width:s,height:a}:e}};let Style=_Style;__publicField(Style,"imageSizeRequest"),__publicField(Style,"imageSizeCache");class Utils2{static HasFlag(t,e){return"number"==typeof t&&"number"==typeof e&&(t&e)===e}static AddFlag(t,e){return"number"!=typeof t||"number"!=typeof e?t:t|e}static RemoveFlag(t,e){return"number"!=typeof t||"number"!=typeof e?t:t&~e}static SetFlag(t,e,i){let n=t;return i?n|=e:t&e&&(n&=~e),n}static CopyRect(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height}static pointInRect(t,e){return e.x>=t.x&&e.x<t.x+t.width&&e.y>=t.y&&e.y<t.y+t.height}static EqualPt(t,e){return this.IsEqual(t.x,e.x)&&this.IsEqual(t.y,e.y)}static TrimDP(t,e){const i=t.toFixed(e);return parseFloat(i)}static Pt2CPoint(t,e){const i={};return e?(i.h=t.y,i.v=t.x):(i.h=t.x,i.v=t.y),i}static Rect2CRect(t,e){const i={h:0,v:0,hdist:0,vdist:0};return e?(i.h=t.y,i.v=t.x,i.hdist=t.height,i.vdist=t.width):(i.h=t.x,i.hdist=t.width,i.v=t.y,i.vdist=t.height),i}static CRect2Rect(t,e){const i={x:0,y:0,width:0,height:0};return e?(i.x=t.v,i.y=t.h,i.width=t.vdist,i.height=t.hdist):(i.x=t.h,i.y=t.v,i.width=t.hdist,i.height=t.vdist),i}static Pt2Rect(t,e){const i={x:0,y:0,width:0,height:0};if(null==t||null==e)return null;i.x=t.x,i.y=t.y,e.x<i.x&&(i.x=e.x),e.y<i.y&&(i.y=e.y),i.width=t.x-i.x;const n=e.x-i.x;n>i.width&&(i.width=n),i.height=t.y-i.y;const s=e.y-i.y;return s>i.height&&(i.height=s),i}static Add2Rect(t,e){t.x-=e.left,t.width+=e.right+e.left,t.y-=e.top,t.height+=e.bottom+e.top}static SubRect(t,e){t.x+=e.left,t.width-=e.right+e.left,t.y+=e.top,t.height-=e.bottom+e.top}static GetPolyRect(t,e){const i=e.length;if(i){t.x=e[0].x,t.y=e[0].y;let n=t.x,s=t.y;t.width=0,t.height=0;for(let a=1;a<i;a++)e[a].x<t.x&&(t.x=e[a].x),e[a].x>n&&(n=e[a].x),e[a].y<t.y&&(t.y=e[a].y),e[a].y>s&&(s=e[a].y);t.width=n-t.x,t.height=s-t.y}}static GetPolyRectExt(t,e,i,n){t.x=0,t.y=0,t.width=0,t.height=0;const s=e.length;if(0!==s){void 0===i&&(i=0),void 0===n&&(n=s),t.x=e[i].x,t.y=e[i].y;for(let s=1+i;s<n;s++){let i;e[s].x<t.x?(i=t.x-e[s].x,t.x=e[s].x,t.width+=i):e[s].x>t.x+t.width&&(i=e[s].x-(t.x+t.width),t.width+=i),e[s].y<t.y?(i=t.y-e[s].y,t.y=e[s].y,t.height+=i):e[s].y>t.y+t.height&&(i=e[s].y-(t.y+t.height),t.height+=i)}}}static IsRectEmpty(t){return t.width<=0||t.height<=0}static InflateRect(t,e,i){t.x-=e,t.width+=2*e,t.y-=i,t.height+=2*i}static OffsetRect(t,e,i){t.x+=e,t.y+=i}static EqualRect(t,e,i=.001){return!(Math.abs(t.x-e.x)>i||Math.abs(t.y-e.y)>i||Math.abs(t.width-e.width)>i||Math.abs(t.height-e.height)>i)}static InflatePoint(t,e){const i=e/2,n={x:0,y:0,width:0,height:0};return n.x=t.x-i,n.width=2*i,n.y=t.y-i,n.height=2*i,n}static Sqrt(t){return t<1e-9?0:Math.sqrt(t)}static UnionRect(t,e,i){const n={x:0,y:0,width:0,height:0};n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y);const s=t.x+t.width,a=e.x+e.width;n.width=Math.max(s,a)-n.x;const o=t.y+t.height,r=e.y+e.height;return n.height=Math.max(o,r)-n.y,i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height,i}static IntersectRect(t,e){let i,n;t.y<=e.y?(i=t,n=e):(i=e,n=t);const s=i.x+i.width,a=n.x+n.width,o=i.y+i.height,r=n.y+n.height;if(n.y>=i.y&&n.y-o<-.01)if(i.x>=n.x){if(i.x-a<-.01)return{x:i.x,width:Math.min(s,a)-i.x,y:n.y,height:Math.min(o,r)-n.y}}else if(n.x-s<-.01)return{x:n.x,width:Math.min(s,a)-n.x,y:n.y,height:Math.min(o,r)-n.y};return null}static RectInsideRect(t,e){const i=t.x+t.width,n=e.x+e.width,s=t.y+t.height,a=e.y+e.height;return e.x>=t.x&&n<=i&&e.y>=t.y&&a<=s}static CNUnionRect(t,e,i){const n={h:0,v:0,hdist:0,vdist:0};n.h=Math.min(t.h,e.h),n.v=Math.min(t.v,e.v);const s=t.h+t.hdist,a=e.h+e.hdist;n.hdist=Math.max(s,a)-n.h;const o=t.v+t.vdist,r=e.v+e.vdist;return n.vdist=Math.max(o,r)-n.v,i.h=n.h,i.v=n.v,i.hdist=n.hdist,i.vdist=n.vdist,i}static SetRect(t,e,i,n){const s={x:0,y:0,width:0,height:0};return s.x=t,s.width=i-t,s.y=e,s.height=n-e,s}static PolyFromRect(t){const e=[];return e.push(new Point$1(t.x,t.y)),e.push(new Point$1(t.x+t.width,t.y)),e.push(new Point$1(t.x+t.width,t.y+t.height)),e.push(new Point$1(t.x,t.y+t.height)),e.push(new Point$1(t.x,t.y)),e}static GetRectFromDiagonal(t,e){let i,n,s;return this.IsEqual(t.height,0)?(n=e,s=0):this.IsEqual(t.width,0)?(n=0,s=e):(i=t.height/t.width,n=this.Sqrt(e*e/(1+i*i)),s=i*n),{width:n,height:s}}static IsPointInPoly(t,e){let i=!1;const n=t.length;for(let s=0,a=n-1;s<n;a=s++)(t[s].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[s].y)&&e.x<(t[a].x-t[s].x)*(e.y-t[s].y)/(t[a].y-t[s].y)+t[s].x&&(i=!i);return i}static IsFrameCornersInPoly(t,e){const i={x:0,y:0};return i.x=e.x,i.y=e.y,!!Utils2.IsPointInPoly(t,i)||(i.x+=e.width,!!Utils2.IsPointInPoly(t,i)||(i.y+=e.height,!!Utils2.IsPointInPoly(t,i)||(i.x-=e.width,Utils2.IsPointInPoly(t,i))))}static IsAllFrameCornersInPoly(t,e){const i={x:0,y:0};return i.x=e.x,i.y=e.y,!!Utils2.IsPointInPoly(t,i)&&(i.x+=e.width,!!Utils2.IsPointInPoly(t,i)&&(i.y+=e.height,!!Utils2.IsPointInPoly(t,i)&&(i.x-=e.width,Utils2.IsPointInPoly(t,i))))}static IsAllPolyPointsInPoly(t,e){const i=e.length;for(let n=0;n<i;n++)if(!Utils2.IsPointInPoly(t,e[n]))return!1;return!0}static StringtoCSV(t){const e=t.split('"'),i=e.length;if(i<2)return t;let n="";for(let s=0;s<i-1;s++)n=n+e[s]+'""';return n+=e[i-1],n}static IsEqual(t,e,i){const n=void 0!==i?i:.5;return Math.abs(t-e)<n}static SpliceArray(t,e,i,n){let s=[];const a=t.length;if(e>=a)s=t.concat(n);else{const o=t.slice(0,e),r=t.slice(e+i,a);s=o.concat(n).concat(r)}return s}static EqualDate(t,e){return t.year===e.year?t.month===e.month?t.day===e.day?0:t.day<e.day?-1:1:t.month<e.month?-1:1:t.year<e.year?-1:1}static ArrayToString(t){let e="";const i=t.length;for(let n=0;n<i;n++)e+=t[n];return e}static BrowserDetect(){}static PolyYCurve(t,e,i,n,s,a,o,r,l,h){let c,u,d,p,g,f,b,v={x:0,y:0};c=(e.bottom-e.top)/2,u=e.right-e.left,d=(2*c-a-o)/(i-1);for(let m=0;m<i;++m){p=d*m+a,n&&p<n&&(p=n),g=c-p,s&&g-s<-c&&(g=-(c-s)),v.y=e.top+(c-g),f=c?g/c:0,b=this.Sqrt(1-f*f)*u,v.x=r?e.right-b:e.left+b;const i=Utils1.DeepCopy(v);l&&(i.x/=l),h&&(i.y/=h),t.push(i)}return t}static ArrayBufferToBase64(t){let e="";const i=new Uint8Array(t),n=i.byteLength;for(let s=0;s<n;s++)e+=String.fromCharCode(i[s]);return window.btoa(e)}static UInt8ToString(t){const e=[];for(let i=0;i<t.length;i+=32768)e.push(String.fromCharCode.apply(null,t.subarray(i,i+32768)));return e.join("")}static RegExpEscape(t){const e=["$","*","^","?","+"];let i="";for(let n=0;n<t.length;n++)e.includes(t[n])?i+="\\"+t[n]:i+=t[n];return i}static StopPropagationAndDefaults(t){t.preventDefault(),t.stopPropagation(),t.gesture&&(t.gesture.preventDefault(),t.gesture.stopPropagation())}static UTF8ToB64(t){let e;try{e=window.btoa(unescape(encodeURIComponent(t)))}catch(i){throw e="",i}return e}static B64ToUTF8(t){let e;try{e=decodeURIComponent(escape(window.atob(t)))}catch(i){throw e="",i}return e}static ArrayBufferToString(t){const e=new Uint8Array(t),i=e.length;let n="";for(let s=0;s<i;s+=65535){const t=Math.min(65535,i-s);n+=String.fromCharCode.apply(null,e.subarray(s,s+t))}return n}static ParseSVGDimensions(t){const e=Utils2.UInt8ToString(t);return Style.ExtractSVGSize(e)}static ObjectDiff(t,e,i,n,s){if(t===e)return{changed:"equal",value:t};const a={};let o=!0;for(const r in t)if(void 0!==t[r])if(r in e)if(t[r]===e[r])i||(a[r]={changed:"equal",value:t[r]});else{const l=typeof t[r],h=typeof e[r];if(!t[r]||!e[r]||"object"!==l&&"function"!==l||"object"!==h&&"function"!==h){if(n&&i&&!isNaN(t[r])&&!isNaN(e[r])&&Math.round(t[r])===Math.round(e[r]))continue;o=!1,a[r]={changed:"primitive change",removed:t[r],added:e[r]}}else{const l=Utils2.ObjectDiff(t[r],e[r],i,n,s);"equal"===l.changed?i||(a[r]={changed:"equal",value:t[r]}):(o=!1,a[r]=l)}}else o=!1,a[r]={changed:"removed",value:t[r]};if(!i||!s)for(const r in e)void 0===e[r]||r in t||(o=!1,a[r]={changed:"added",value:e[r]});return o?{changed:"equal",value:t}:{changed:"object change",value:a}}static FlipDate(t){let e,i=0,n=0,s=null,a="";for(n=t.length,i=0;i<n;i++)if(isNaN(parseInt(t[i]))){s=t[i];break}if(!s)return null;const o=t.split(s);if(o.length<2)return null;e=o.splice(1,1),o.unshift(e[0]);for(let r=0;r<o.length;r++)a.length>0&&(a+=s),a+=o[r];return a}static QualifyURL(t){return t&&t.length>0&&"/#"!==t.substring(0,2)&&-1===t.indexOf("http://")&&-1===t.indexOf("https://")&&(t="http://"+t),t}static GetDistanceBetween2Points(t,e){const i=e.x-t.x,n=e.y-t.y;return this.Sqrt(i*i+n*n)}static IsRectangular(t){let e,i,n,s;e=t.length;for(let a=0;a<e-1;a++){if(n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(t[a],t[a+1]),a>0&&(s=n-i,s<0&&(s+=2*Math.PI),s>Math.PI&&(s-=Math.PI),!(s>=Math.PI/2-.052&&s<=Math.PI/2+.052)))return!1;i=n}return!0}static GetPathExtension(t){if(null==t)return null;const e=t.length;if(e>4){const i=t.lastIndexOf(".");if(i>=0){let n=t.slice(i,e);const s=n.indexOf("?");return s>=0&&(n=n.slice(0,s)),n.toLowerCase()}}return null}static RemoveExtension(t){if(null==t)return null;const e=t.lastIndexOf(".");return-1===e?t:t.slice(0,e)}static HtmlEncode(t){return $$1("<div>").text(t).html()}static IsRectangleFullyEnclosed(t,e){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}}const Instance={Basic:null,Shape:null};function initializeInstance(t,e){Instance.Basic=t,Instance.Shape=e}class RightClickMd{constructor(){__publicField(this,"targetId"),__publicField(this,"segment"),__publicField(this,"hitPoint"),__publicField(this,"locked"),__publicField(this,"context"),this.targetId=-1,this.segment=-1,this.hitPoint={x:0,y:0},this.locked=!1,this.context=0}}class T3Constant{}__publicField(T3Constant,"CursorDisplayMode",{None:0,Show:1,Hide:2}),__publicField(T3Constant,"DocContext",{CurrentTextAlignment:"center",SpacebarDown:!1,CanTypeInWorkArea:!0,CurrentWidth:"0",CurrentHeight:"0"}),__publicField(T3Constant,"ClipboardType",{None:0,Text:1,LM:2,Image:4}),__publicField(T3Constant,"GradientStyle",{GradMiddle:1,GradHoriz:4,GradVert:2,GradTlbr:8,GradTrbl:16,GradRev:32,GradShape:64,GradRadial:128}),__publicField(T3Constant,"DataSource",{FFI_SYNC:1,REALTIME:2,HISTORICAL:3,MANUAL:4}),__publicField(T3Constant,"CreatedBy",{FFI_SYNC_SERVICE:1,FRONTEND:2,BACKEND:3,API:4});class MouseUtil{static IsRightClick(t){LogUtil.Debug("= u.MouseUtil: IsRightClick - Input:",t);let e=!1;return t.gesture&&(t=t.gesture.srcEvent),t instanceof MouseEvent?e=3===t.which||t.ctrlKey&&t.metaKey:"onpointerdown"in window&&t instanceof PointerEvent&&(e=3===t.which),LogUtil.Debug("= u.MouseUtil: IsRightClick - Output:",e),e}}class DSConstant{}__publicField(DSConstant,"LinkFlags",{DeleteTarget:1,DeleteLink:2,Change:4,Break:8,Move:16,WasMoved:32}),__publicField(DSConstant,"Contexts",{None:-1,All:0,Text:1,Table:2,Automation:3,DimensionText:4,FloorPlan:5,Note:6,Navigation:7,AutomationNoCtrl:8,ReadOnly:9}),__publicField(DSConstant,"PolyListFlags",{FreeHand:1,OneStep:2,NoMiddleControlPoints:4,TimelineControlPoint:8,NoControl:16,WasExplict:32,HasMoveTo:64,HasPolyPoly:128}),__publicField(DSConstant,"PolySegFlags",{Select:1,Hide:2,Temp:4,TempSave:8,VA:16,NVA:32,NoLine:64,NoFill:128}),function(t,e){var i=function t(e,i){return new t.Instance(e,i||{})},n=!1,s={},a=i.DIRECTION_DOWN="down",o=i.DIRECTION_LEFT="left",r=i.DIRECTION_UP="up",l=i.DIRECTION_RIGHT="right",h=i.POINTER_MOUSE="mouse",c=i.POINTER_TOUCH="touch",u=i.POINTER_PEN="pen",d=i.EVENT_START="start",p=i.EVENT_MOVE="move",g=i.EVENT_END="end",f=i.EVENT_RELEASE="release",b=i.EVENT_TOUCH="touch";i.defaults={behavior:{userSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},i.DOCUMENT=document,i.CALCULATE_INTERVAL=25,i.READY=!1,i.gestures=i.gestures||{},i.classType="Hammer";var v,m,y=i.utils={classType:"Utils",extend:function(t,i,n){for(var s in i)i.hasOwnProperty(s)&&(t[s]===e||n)&&(t[s]=i[s]);return t},on:function(t,e,i){t.addEventListener(e,i,!1)},off:function(t,e,i){t.removeEventListener(e,i,!1)},each:function(t,i,n){var s,a;if("forEach"in t)t.forEach(i,n);else if(t.length!==e){for(s=0,a=t.length;s<a;s++)if(!1===i.call(n,t[s],s,t))return}else for(s in t)if(t.hasOwnProperty(s)&&!1===i.call(n,t[s],s,t))return},inStr:function(t,e){return t.indexOf(e)>-1},inArray:function(t,e){if(t.indexOf){var i=t.indexOf(e);return-1!==i&&i}for(var n=0,s=t.length;n<s;n++)if(t[n]===e)return n;return!1},inGestureArray:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i].gesture==e.gesture)return i;return!1},toArray:function(t){return Array.prototype.slice.call(t,0)},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){var e=[],i=[],n=[],s=[],a=Math.min,o=Math.max;return 1===t.length?{pageX:t[0].pageX,pageY:t[0].pageY,clientX:t[0].clientX,clientY:t[0].clientY}:(this.each(t,(function(t){e.push(t.pageX),i.push(t.pageY),n.push(t.clientX),s.push(t.clientY)})),{pageX:(a.apply(Math,e)+o.apply(Math,e))/2,pageY:(a.apply(Math,i)+o.apply(Math,i))/2,clientX:(a.apply(Math,n)+o.apply(Math,n))/2,clientY:(a.apply(Math,s)+o.apply(Math,s))/2})},getVelocity:function(t,e,i){return{x:Math.abs(e/t)||0,y:Math.abs(i/t)||0}},getAngle:function(t,e){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(t,e){return Math.abs(t.clientX-e.clientX)>=Math.abs(t.clientY-e.clientY)?t.clientX-e.clientX>0?o:l:t.clientY-e.clientY>0?r:a},getDistance:function(t,e){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(i*i+n*n)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==r||t==a},setPrefixedCss:function(t,i,n,s){var a=[""];i=this.toCamelCase(i);for(var o=0;o<a.length;o++){var r=i;if(a[o]&&(r=a[o]+i.charAt(0).toUpperCase()+i.slice(1)),r in t.style){t.style[r]=(s===e||s)&&n||"";break}}},toggleBehavior:function(t,e,i){if(e&&t&&t.style){this.each(e,(function(e,n){this.setPrefixedCss(t,n,e,i)}),this);var n=i&&function(t){var e=t.target||t.srcElement;return!(e&&"textarea"==e.localName)};"none"==e.userSelect&&(t.onselectstart=n),"none"==e.userDrag&&(t.ondragstart=n)}},toCamelCase:function(t){return t.replace(/[_-]([a-z])/g,(function(t){return t[1].toUpperCase()}))},inWksBar:function(t){if(!window.docUtil)return!1;var e=document.getElementById("svg-area"),i=e[0];if(t.currentTarget==i){var n=e.css("overflow-x"),s=e.css("overflow-y");if("scroll"===n){var a=t.clientY-e.offset().top;if(t.currentTarget.clientHeight-a<=0)return!0}if("scroll"===s){var o=t.clientX-e.offset().left;if(t.currentTarget.clientWidth-o<=0)return!0}}return!1}},S=i.event={classType:"Event",started:!1,shouldDetect:!1,on:function(t,e,i,n){var s=e.split(" ");y.each(s,(function(e){y.on(t,e,i),n&&n(e)}))},off:function(t,e,i,n){var s=e.split(" ");y.each(s,(function(e){y.off(t,e,i),n&&n(e)}))},onTouch:function(t,e,i){var n=this,a=function(s){var a;window.docUtil&&e==d&&y.inWksBar(s)||(e==d&&(n.shouldDetect=!0),e!=g&&n.shouldDetect&&w.updatePointer(e,s),n.shouldDetect&&(a=n.doDetect.call(n,s,e,t,i,0)),a==g&&(n.shouldDetect=!1,w.reset()),e==g&&w.updatePointer(e,s))};return this.on(t,s[e],a),a},doDetect:function(t,e,i,n,s){var a=this.getTouchList(t,e),o=a.length,r=e,l=a.trigger,h=o;e===d?l=b:e===g&&(l=f,h=a.length-(t.changedTouches?t.changedTouches.length:1)),h>0&&this.started&&(r=p),this.started=!0;var c=this.collectEventData(i,r,a,t);return e!==g&&n.call(x,c),l&&(c.changedLength=h,c.eventType=l,n.call(x,c),c.eventType=r,delete c.changedLength),r===g&&(n.call(x,c),this.started=!1),r},determineEventTypes:function(){var t=["pointerdown","pointermove","pointerup pointercancel lostpointercapture"];return s[d]=t[0],s[p]=t[1],s[g]=t[2],s},getTouchList:function(t,e){return w.getTouchList()},collectEventData:function(t,e,i,n){var s=c;return y.inStr(n.type,"mouse")||w.matchType(h,n)?s=h:w.matchType(u,n)&&(s=u),{center:y.getCenter(i),timeStamp:Date.now(),target:n.target,touches:i,eventType:e,pointerType:s,srcEvent:n,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return x.stopDetect()}}}},w=i.PointerEvent={classType:"PointerEvent",pointers:{},getTouchList:function(){var t=[];return y.each(this.pointers,(function(e){t.push(e)})),t},updatePointer:function(t,e){t==g?delete this.pointers[e.pointerId]:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e)},matchType:function(t,e){if(!e.pointerType)return!1;var i=e.pointerType,n={};return n[h]=i===h,n[c]=i===c,n[u]=i===u,n[t]},reset:function(){this.pointers={}}},x=i.detection={classType:"Detection",gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:y.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);var e=this.current.inst,i=e.options;return y.each(this.gestures,(function(n){!this.stopped&&e.enabled&&i[n.name]&&n.handler.call(n,t,e)}),this),this.current&&(this.current.lastEvent=t),t.eventType==g&&this.stopDetect(),t}},stopDetect:function(){this.previous=y.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,n,s,a){var o=this.current,r=!1,l=o.lastCalcEvent,h=o.lastCalcData;l&&t.timeStamp-l.timeStamp>i.CALCULATE_INTERVAL&&(e=l.center,n=t.timeStamp-l.timeStamp,s=t.center.clientX-l.center.clientX,a=t.center.clientY-l.center.clientY,r=!0),t.eventType!=b&&t.eventType!=f&&(o.futureCalcEvent=t),o.lastCalcEvent&&!r||(h.velocity=y.getVelocity(n,s,a),h.angle=y.getAngle(e,t.center),h.direction=y.getDirection(e,t.center),o.lastCalcEvent=o.futureCalcEvent||t,o.futureCalcEvent=t),t.velocityX=h.velocity.x,t.velocityY=h.velocity.y,t.interimAngle=h.angle,t.interimDirection=h.direction},extendEventData:function(t){var e=this.current,i=e.startEvent,n=e.lastEvent||i;t.eventType!=b&&t.eventType!=f&&(i.touches=[],y.each(t.touches,(function(t){i.touches.push({clientX:t.clientX,clientY:t.clientY})})));var s=t.timeStamp-i.timeStamp,a=t.center.clientX-i.center.clientX,o=t.center.clientY-i.center.clientY;return this.getCalculatedData(t,n.center,s,a,o),y.extend(t,{startEvent:i,deltaTime:s,deltaX:a,deltaY:o,distance:y.getDistance(i.center,t.center),angle:y.getAngle(i.center,t.center),direction:y.getDirection(i.center,t.center),scale:y.getScale(i.touches,t.touches),rotation:y.getRotation(i.touches,t.touches)}),t},register:function(t){var n=t.defaults||{};return n[t.name]===e&&(n[t.name]=!0),y.extend(i.defaults,n,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort((function(t,e){return t.index<e.index?-1:t.index>e.index?1:0})),this.gestures}};(i.Instance=function(t,e){var n=this;i.READY||(S.determineEventTypes(),y.each(i.gestures,(function(t){x.register(t)})),S.onTouch(i.DOCUMENT,p,x.detect),S.onTouch(i.DOCUMENT,g,x.detect),i.READY=!0),this.element=t,this.enabled=!0,y.each(e,(function(t,i){delete e[i],e[y.toCamelCase(i)]=t})),this.options=y.extend(y.extend({},i.defaults),e||{}),this.options.behavior&&y.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=S.onTouch(t,d,(function(t){n.enabled&&t.eventType==d?x.startDetect(n,t):t.eventType==b&&x.detect(t)})),this.eventHandlers=[]}).prototype={classType:"Hammer.Instance",on:function(t,e){var i,n=this,s=n.eventHandlers.length,a=null;for(i=0;i<s;++i)n.eventHandlers[i].gesture===t&&(a=n.eventHandlers[i].handler);return a&&this.off(t,a),S.on(n.element,t,e,(function(t){n.eventHandlers.push({gesture:t,handler:e})})),n},off:function(t,e){var i=this,n=t.split(" ");return y.each(n,(function(t){var e,n=i.eventHandlers.length,s=null;for(e=0;e<n;++e)if(i.eventHandlers[e].gesture===t){s=i.eventHandlers[e].handler;break}s&&S.off(i.element,t,s,(function(t){var e=y.inGestureArray(i.eventHandlers,{gesture:t});!1!==e&&i.eventHandlers.splice(e,1)}))})),i},trigger:function(t,e){e=e||{};var n=i.DOCUMENT.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e;var s=this.element;return y.hasParent(e.target,s)&&(s=e.target),s.dispatchEvent(n),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(y.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)y.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],S.off(this.element,s[d],this.eventStartHandler),null}},i.gestures.Drag={name:"drag",index:50,handler:function(t,e){var i=x.current;if(e.options.dragMaxTouches>0&&t.touches.length>e.options.dragMaxTouches)n=!1;else switch(t.eventType){case d:n||(e.trigger("dragstart",t),n=!0),e.trigger("drag",t),t.srcEvent.stopPropagation(),t.srcEvent.preventDefault();break;case p:if(t.srcEvent.stopPropagation(),t.srcEvent.preventDefault(),t.distance<e.options.dragMinDistance&&"drag"!=i.name)return void t.srcEvent.preventDefault();var s=i.startEvent.center;if("drag"!=i.name&&(i.name="drag",e.options.dragDistanceCorrection&&t.distance>0)){var a=Math.abs(e.options.dragMinDistance/t.distance);s.pageX+=t.deltaX*a,s.pageY+=t.deltaY*a,s.clientX+=t.deltaX*a,s.clientY+=t.deltaY*a,t=x.extendEventData(t)}e.trigger("drag",t);break;case f:n&&t.changedLength<=e.options.dragMaxTouches&&(e.trigger("dragend",t),n=!1)}},defaults:{dragMinDistance:1,dragDistanceCorrection:!0,dragMaxTouches:1}},v="hold",i.gestures.Hold={name:v,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:function(t,e){var i=e.options,n=x.current;switch(t.eventType){case d:clearTimeout(m),n.name=v,m=setTimeout((function(){!n||n.name!==v&&"drag"!==n.name||e.trigger(v,t)}),i.holdTimeout);break;case p:t.distance>i.holdThreshold&&clearTimeout(m);break;case f:clearTimeout(m)}}},function(t){var e=!1;i.gestures.Tap={name:t,index:100,handler:function(i,n){var s,a,o=n.options,r=x.current,l=x.previous;switch(i.eventType){case d:e=!1;break;case p:e=e||i.distance>o.tapMaxDistance;break;case g:!y.inStr(i.srcEvent.type,"cancel")&&i.deltaTime<o.tapMaxTime&&!e&&(s=l&&l.lastEvent&&i.timeStamp-l.lastEvent.timeStamp,a=!1,l&&l.name==t&&s&&s<o.doubleTapInterval&&i.distance<o.doubleTapDistance&&(n.trigger("doubletap",i),a=!0),a&&!o.tapAlways||(r.name=t,n.trigger(r.name,i)))}},defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!1,doubleTapDistance:20,doubleTapInterval:300}}}("tap"),function(t){var e=!1;i.gestures.Transform={name:t,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:function(i,n){switch(i.eventType){case d:e=!1;break;case p:if(i.touches.length<2)return;var s=Math.abs(1-i.scale),a=Math.abs(i.rotation);if(s<n.options.transformMinScale&&a<n.options.transformMinRotation)return;x.current.name=t,e||(n.trigger("transformstart",i),e=!0),n.trigger(t,i),a>n.options.transformMinRotation&&n.trigger("rotate",i),s>n.options.transformMinScale&&(n.trigger("pinch",i),n.trigger("pinch"+(i.scale<1?"in":"out"),i));break;case g:e&&i.changedLength<2&&(n.trigger("transformend",i),e=!1)}}}}("transform"),t.Hammer=i}(window);class TextureScale{constructor(){__publicField(this,"Units"),__publicField(this,"Scale"),__publicField(this,"RWidth"),__publicField(this,"AlignmentScalar"),__publicField(this,"Flags"),this.Units=0,this.Scale=0,this.RWidth=0,this.AlignmentScalar=0,this.Flags=0}}var __defProp$f=Object.defineProperty,__getOwnPropDesc$f=Object.getOwnPropertyDescriptor,__decorateClass$f=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$f(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$f(e,i,a),a};class PaintData{constructor(t){__publicField(this,"FillType"),__publicField(this,"Color"),__publicField(this,"EndColor"),__publicField(this,"GradientFlags"),__publicField(this,"Texture"),__publicField(this,"TextureScale"),__publicField(this,"Opacity"),__publicField(this,"EndOpacity"),this.FillType=NvConstant.FillTypes.Solid,this.Color=t,this.EndColor=NvConstant.Colors.White,this.GradientFlags=0,this.Texture=0,this.TextureScale=new TextureScale,this.Opacity=1,this.EndOpacity=1}}__decorateClass$f([Type((()=>TextureScale))],PaintData.prototype,"TextureScale",2);class OutsideEffectData{constructor(){__publicField(this,"OutsideType"),__publicField(this,"OutsideExtent_Right"),__publicField(this,"OutsideExtent_Left"),__publicField(this,"OutsideExtent_Top"),__publicField(this,"OutsideExtent_Bottom"),__publicField(this,"Color"),__publicField(this,"LParam"),__publicField(this,"WParam"),this.OutsideType=0,this.OutsideExtent_Right=0,this.OutsideExtent_Left=0,this.OutsideExtent_Top=0,this.OutsideExtent_Bottom=0,this.Color=NvConstant.Colors.Black,this.LParam=0,this.WParam=0}}var __defProp$e=Object.defineProperty,__getOwnPropDesc$e=Object.getOwnPropertyDescriptor,__decorateClass$e=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$e(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$e(e,i,a),a};class TextFmtData{constructor(){__publicField(this,"Paint"),__publicField(this,"FontName"),__publicField(this,"FontType"),__publicField(this,"FontId"),__publicField(this,"FontSize"),__publicField(this,"Face"),__publicField(this,"Effect"),__publicField(this,"SetPaint",(t=>(this.Paint=t,this))),this.Paint=new PaintData(NvConstant.Colors.Black),this.FontName="Arial",this.FontType="sanserif",this.FontId=1,this.FontSize=10,this.Face=0,this.Effect=new OutsideEffectData}}__decorateClass$e([Type((()=>PaintData))],TextFmtData.prototype,"Paint",2),__decorateClass$e([Type((()=>OutsideEffectData))],TextFmtData.prototype,"Effect",2);class StyleConstant{}__publicField(StyleConstant,"ColorFilters",{NCFill:1,NCTexture:2,NCLine:4,NCLineThick:8,NCLinePat:16,NCLineArrow:32,NCText:64,NCOutSide:128,NCEffect:256,NCStyle:512,NCAll:1023,NCResize:1024}),__publicField(StyleConstant,"FillEffect",{None:0,Gloss:1,Bevel:2,InShadow:3,InGlow:4}),__publicField(StyleConstant,"OutEffect",{None:0,Drop:1,Cast:2,Glow:3,Refl:4}),__publicField(StyleConstant,"ParaStyleCodes",{Just:100,Spacing:101,Leading:102,Tracking:103,Lindent:104,Rindent:105,Pindent:106,Bindent:107,Bullet:108,TabSpace:109,Hyphen:110}),__publicField(StyleConstant,"FormatPainterModes",{None:0,Object:1,Text:2,Table:3}),__publicField(StyleConstant,"ImageDir",{Meta:113,Jpg:124,Png:125,Svg:143,Store:123}),__publicField(StyleConstant,"RichGradientTypes",{Linear:0,BR:1,BL:2,RadialCenter:3,RadialBC:4,RadialTC:5,RadialTR:6,RadialTL:7,RectBR:8,RectBL:9,RectCenter:10,RectTR:11,RectTL:12,Shape:13});class RulerUtil{static GetLengthInRulerUnits(t,e,i,n){LogUtil.Debug("O.Opt GetLengthInRulerUnits - Input:",{lengthInUnits:t,skipFeetConversion:e,offset:i,displayFlags:n});const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let a="",o=0,r=0,l=0,h=0,c=0,u=0,d="",p=1;const g=!!n&&(n&NvConstant.DimensionFlags.ShowFractionalInches)>0,f=!!n&&(n&NvConstant.DimensionFlags.ShowFeetAsInches)>0;if(i&&(i*=100,T3Gv.docUtil.rulerConfig.useInches||(i/=OptConstant.Common.MetricConv),t-=i),T3Gv.docUtil.rulerConfig.showpixels)return a=String(Math.round(t)),LogUtil.Debug("O.Opt GetLengthInRulerUnits - Output:",a),a;if(h=this.GetLengthInUnits(t),T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet&&!e){if(h<0&&(p=-1,h=-h),o=Math.floor(h),r=12*(h-o),g&&(l=r-Math.floor(r),r=Math.floor(r)),"12"===Number(r).toFixed()&&(r=0,o++),f&&(r+=12*o,o=0),l>0&&(u=this.GetFractionStringGranularity(s),c=Math.round(l/u),c>=1&&(c=0,12!=++r||f||(o++,r=0)),c>0)){let t=c,e=Math.floor(1/u);for(;t%2==0&&e%2==0;)t/=2,e/=2;d=t+"/"+e}o*=p,0!==o&&(a=o+"'"),d.length>0?(a+=" "+Number(r).toFixed(),a+=" "+d,a+='"'):r>0&&(r=Math.round(r),a+=" "+r+'"')}else T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.Inches&&T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.M&&T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.Cm&&T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.Mm||(a=h.toFixed(T3Gv.docUtil.rulerConfig.dp));return LogUtil.Debug("O.Opt GetLengthInRulerUnits - Output:",a),a}static GetLengthInUnits(t){LogUtil.Debug("O.Opt GetLengthInUnits - Input:",{length:t});const e=t*this.GetToUnits();return LogUtil.Debug("O.Opt GetLengthInUnits - Output:",e),e}static GetToUnits(){LogUtil.Debug("O.Opt GetToUnits - Input");const t=T3Gv.docUtil.rulerConfig.major;let e=T3Gv.docUtil.rulerConfig.majorScale/t;return T3Gv.docUtil.rulerConfig.useInches||(e*=T3Gv.docUtil.rulerConfig.metricConv),LogUtil.Debug("O.Opt GetToUnits - Output:",e),e}static GetFractionStringGranularity(t){return T3Gv.docUtil.rulerConfig.denom>=1?1/T3Gv.docUtil.rulerConfig.denom:T3Gv.docUtil.rulerConfig.majorScale<=1?1/16:T3Gv.docUtil.rulerConfig.majorScale<=2?1/8:T3Gv.docUtil.rulerConfig.majorScale<=4?1/4:T3Gv.docUtil.rulerConfig.majorScale<=8?.5:1}static GetFractionDenominator(){let t;const e=T3Gv.docUtil.rulerConfig.majorScale;return t=e<=1?16:e<=2?8:e<=4?4:e<=8?2:1,t}}class CursorConstant{}__publicField(CursorConstant,"CursorType",{Default:"cur-default",Pointer:"cur-pointer",Cross:"cur-cross",Text:"cur-text",Move:"cur-move",ResizeT:"cur-n-resize",ResizeR:"cur-e-resize",ResizeB:"cur-s-resize",ResizeL:"cur-w-resize",ResizeTB:"cur-ns-resize",ResizeLR:"cur-ew-resize",ResizeRT:"cur-ne-resize",ResizeLT:"cur-nw-resize",ResizeRB:"cur-se-resize",ResizeLB:"cur-sw-resize",NeswResize:"cur-nesw-resize",NwseResize:"cur-nwse-resize",Anchor:"cur-anchor",Paint:"cur-paint",Rotate:"cur-rotate",Edit:"cur-pencil",EditClose:"cur-pencil-close",Add:"cur-add",Stamp:"cur-stamp",AddRight:"cur-add-right",AddLeft:"cur-add-left",AddUp:"cur-add-up",AddDown:"cur-add-down",AddPlus:"cur-add-plus",Grab:"cur-grab"}),__publicField(CursorConstant,"CursorTypes",{Default:"DEFAULT",Plus:"PLUS",Move:"MOVE",Grow:"GROW"}),__publicField(CursorConstant,"Knob",{Path:"assets/img/knob/",DiagonLeft:"diagon_left.svg",DiagonRight:"diagon_right.svg",ExpandHoriz:"expand_horiz.svg",ExpandVert:"expand_vert.svg"}),__publicField(CursorConstant,"CursorState",{None:0,EditOnly:1,EditLink:2,LinkOnly:3});class DynamicGuides{constructor(){__publicField(this,"above_left"),__publicField(this,"below_left"),__publicField(this,"above_right"),__publicField(this,"below_right"),__publicField(this,"left_top"),__publicField(this,"right_top"),__publicField(this,"left_bottom"),__publicField(this,"right_bottom"),__publicField(this,"above_center"),__publicField(this,"below_center"),__publicField(this,"left_center"),__publicField(this,"right_center"),__publicField(this,"wall_left"),__publicField(this,"wall_right"),__publicField(this,"wall_top"),__publicField(this,"wall_bottom"),this.above_left=null,this.below_left=null,this.above_right=null,this.below_right=null,this.left_top=null,this.right_top=null,this.left_bottom=null,this.right_bottom=null,this.above_center=null,this.below_center=null,this.left_center=null,this.right_center=null,this.wall_left=null,this.wall_right=null,this.wall_top=null,this.wall_bottom=null}}class SelectionAttr{constructor(){__publicField(this,"tselect"),__publicField(this,"nselect"),__publicField(this,"nlineselected"),__publicField(this,"nshapeselected"),__publicField(this,"nconnectorselected"),__publicField(this,"ngroupsselected"),__publicField(this,"nimageselected"),__publicField(this,"IsTargetTable"),__publicField(this,"paste"),__publicField(this,"undo"),__publicField(this,"redo"),__publicField(this,"allowalign"),__publicField(this,"width"),__publicField(this,"height"),__publicField(this,"left"),__publicField(this,"top"),__publicField(this,"widthstr"),__publicField(this,"heightstr"),__publicField(this,"leftstr"),__publicField(this,"topstr"),__publicField(this,"fontid"),__publicField(this,"fontsize"),__publicField(this,"bold"),__publicField(this,"italic"),__publicField(this,"underline"),__publicField(this,"superscript"),__publicField(this,"subscript"),__publicField(this,"TextDirection"),__publicField(this,"ncells_selected"),__publicField(this,"NTableRows"),__publicField(this,"NTableCols"),__publicField(this,"cell_notext"),__publicField(this,"celltype"),__publicField(this,"cellselected"),__publicField(this,"cellflags"),__publicField(this,"ntablesselected"),__publicField(this,"bInNoteEdit"),__publicField(this,"allowcopy"),__publicField(this,"selectionhastext"),__publicField(this,"subtype"),__publicField(this,"objecttype"),__publicField(this,"datasetElemID"),__publicField(this,"projectTableSelected"),__publicField(this,"lockedTableSelected"),__publicField(this,"fixedCornerRadius"),__publicField(this,"lineCornerRadius"),__publicField(this,"colorfilter"),__publicField(this,"SelectionBusinessManager"),__publicField(this,"WallThickness"),this.tselect=-1,this.nselect=0,this.nlineselected=0,this.nshapeselected=0,this.nconnectorselected=0,this.ngroupsselected=0,this.nimageselected=0,this.IsTargetTable=!1,this.paste=0,this.undo=!1,this.redo=!1,this.allowalign,this.width=0,this.height=0,this.left=0,this.top=0,this.widthstr="",this.heightstr="",this.leftstr="",this.topstr="",this.fontid=0,this.fontsize=12,this.bold=!1,this.italic=!1,this.underline=!1,this.superscript=!1,this.subscript=!1,this.TextDirection=!0,this.ncells_selected=0,this.NTableRows=4,this.NTableCols=3,this.cell_notext=!1,this.celltype=0,this.cellselected=!1,this.cellflags=0,this.ntablesselected=0,this.bInNoteEdit=!1,this.allowcopy=!1,this.selectionhastext=!1,this.subtype=0,this.objecttype=0,this.datasetElemID=-1,this.projectTableSelected=!1,this.lockedTableSelected=!1,this.fixedCornerRadius=0,this.lineCornerRadius=0,this.colorfilter=0,this.SelectionBusinessManager=null,this.WallThickness=0}}const _KeyboardConstant=class{};let KeyboardConstant=_KeyboardConstant;__publicField(KeyboardConstant,"Contexts",{None:-1,All:0,Text:1,Automation:3,DimensionText:4,WallOpt:5,Note:6,Navigation:7,AutomationNoCtrl:8,ReadOnly:9}),__publicField(KeyboardConstant,"ModifierKeys",{None:0,Ctrl:1,Shift:2,Alt:3,Ctrl_Alt:4,Ctrl_Shift:5,Shift_Alt:6}),__publicField(KeyboardConstant,"Keys",{Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Caps_Lock:20,Escape:27,Space:32,Page_Up:33,Page_Down:34,End:35,Home:36,Left_Arrow:37,Up_Arrow:38,Right_Arrow:39,Down_Arrow:40,Insert:45,Delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,Left_Window_Key:91,Right_Window_Key:92,Select_Key:93,Numpad_0:96,Numpad_1:97,Numpad_2:98,Numpad_3:99,Numpad_4:100,Numpad_5:101,Numpad_6:102,Numpad_7:103,Numpad_8:104,Numpad_9:105,Multiply:106,Add:107,Subtract:109,Decimal_Point:110,Divide:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Num_Lock:144,Scroll_Lock:145,Semi_Colon:186,Equal_Sign:187,Comma:188,Dash:189,Period:190,Forward_Slash:191,Grave_Accent:192,Open_Bracket:219,Back_Slash:220,Close_Bracket:221,Single_Quote:222}),__publicField(KeyboardConstant,"NonTextKeys",[_KeyboardConstant.Keys.Backspace,_KeyboardConstant.Keys.Tab,_KeyboardConstant.Keys.Enter,_KeyboardConstant.Keys.Left_Arrow,_KeyboardConstant.Keys.Up_Arrow,_KeyboardConstant.Keys.Right_Arrow,_KeyboardConstant.Keys.Down_Arrow,_KeyboardConstant.Keys.Delete,_KeyboardConstant.Keys.Escape]);var __defProp$d=Object.defineProperty,__getOwnPropDesc$d=Object.getOwnPropertyDescriptor,__decorateClass$d=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$d(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$d(e,i,a),a};class FillData{constructor(){__publicField(this,"Paint"),__publicField(this,"Hatch"),__publicField(this,"FillEffect"),__publicField(this,"EffectColor"),__publicField(this,"WParam"),__publicField(this,"LParam"),__publicField(this,"SetPaint",(t=>(this.Paint=t,this))),this.Paint=new PaintData(NvConstant.Colors.White),this.Hatch=0,this.FillEffect=0,this.EffectColor=null,this.WParam=0,this.LParam=0}}__decorateClass$d([Type((()=>PaintData))],FillData.prototype,"Paint",2);var __defProp$c=Object.defineProperty,__getOwnPropDesc$c=Object.getOwnPropertyDescriptor,__decorateClass$c=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$c(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$c(e,i,a),a};class LineData{constructor(){__publicField(this,"Paint"),__publicField(this,"Hatch"),__publicField(this,"LineEffect"),__publicField(this,"Thickness"),__publicField(this,"LinePattern"),__publicField(this,"BThick"),__publicField(this,"EdgeColor"),__publicField(this,"LParam"),__publicField(this,"WParam"),__publicField(this,"SetPaint",(t=>(this.Paint=t,this))),this.Paint=new PaintData(NvConstant.Colors.Black),this.Hatch=0,this.LineEffect=0,this.Thickness=NvConstant.StyleDefaults.DefThick,this.LinePattern=0,this.BThick=0,this.EdgeColor=null,this.LParam=0,this.WParam=0}}__decorateClass$c([Type((()=>PaintData))],LineData.prototype,"Paint",2);var __defProp$b=Object.defineProperty,__getOwnPropDesc$b=Object.getOwnPropertyDescriptor,__decorateClass$b=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$b(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$b(e,i,a),a};class QuickStyle{constructor(){__publicField(this,"Name"),__publicField(this,"Border"),__publicField(this,"Fill"),__publicField(this,"Line"),__publicField(this,"OutsideEffect"),__publicField(this,"Text"),__publicField(this,"StyleRecord"),this.Name="t3",this.Fill=new FillData,this.Border=new LineData,this.OutsideEffect=new OutsideEffectData,this.Text=new TextFmtData,this.Line=new LineData}}__decorateClass$b([Type((()=>LineData))],QuickStyle.prototype,"Border",2),__decorateClass$b([Type((()=>FillData))],QuickStyle.prototype,"Fill",2),__decorateClass$b([Type((()=>LineData))],QuickStyle.prototype,"Line",2),__decorateClass$b([Type((()=>OutsideEffectData))],QuickStyle.prototype,"OutsideEffect",2),__decorateClass$b([Type((()=>TextFmtData))],QuickStyle.prototype,"Text",2);class Utils3{static LineDStyleHit(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g,f,b,v,m=-1,y=0,S={x:0,y:0,width:0,height:0};c=i+12+n;const w=t.length;for(let x=0;x<w-1;x++)S=Utils2.Pt2Rect(t[x],t[x+1]),Utils2.InflateRect(S,c,c),Utils2.pointInRect(S,e)&&(t[x].x===t[x+1].x?(S=t[x].y<t[x+1].y?Utils2.SetRect(t[x].x-c,t[x].y,t[x].x+c,t[x+1].y):Utils2.SetRect(t[x].x-c,t[x+1].y,t[x].x+c,t[x].y),Utils2.pointInRect(S,e)&&(y=NvConstant.HitCodes.Border,m=x,b=t[x].x,v=e.y)):t[x].y===t[x+1].y?(S=t[x].x<t[x+1].x?Utils2.SetRect(t[x].x,t[x].y-c,t[x+1].x,t[x].y+c):Utils2.SetRect(t[x+1].x,t[x].y-c,t[x].x,t[x].y+c),Utils2.pointInRect(S,e)&&(y=NvConstant.HitCodes.Border,m=x,v=t[x].y,b=e.x)):(d=Math.abs(t[x].x-t[x+1].x),p=Math.abs(t[x].y-t[x+1].y),g=Utils2.Sqrt(p*p+d*d),f=e.x-t[x].x,p/d<1?(t[x].x<=t[x+1].x?(r=t[x].y,l=t[x+1].y):(l=t[x].y,r=t[x+1].y,f=e.x-t[x+1].x),o=r>l?r-p*f/d:r+p*f/d,u=(d?g/d:1)*c,e.y<=o+u&&e.y>=o-u&&(y=NvConstant.HitCodes.Border,m=x,v=o,b=e.x)):(t[x].x<=t[x+1].x?(r=t[x].y,l=t[x+1].y,h=t[x].x):(l=t[x].y,r=t[x+1].y,h=t[x+1].x),a=r>l?h+d*(r-e.y)/p:h+d*(e.y-r)/p,u=(p?g/p:1)*c,e.x<=a+u&&e.x>=a-u&&(y=NvConstant.HitCodes.Border,m=x,b=a,v=e.y))));return void 0!==b&&(e.x=b),void 0!==v&&(e.y=v),s&&(s.lpHit=m),y}static CloneToDoc(t,e){const i=document.createElementNS(t.namespaceURI,t.nodeName);for(let n=0,s=t.attributes.length;n<s;++n){const s=t.attributes[n];let a=s.nodeName;a.length&&(a[0]>="A"&&a[0]<="Z"&&(a=a.toLowerCase()),e?""!==s.nodeValue&&"xmlns"!==a&&i.setAttribute(a,s.nodeValue):""!==s.nodeValue&&i.setAttribute(a,s.nodeValue))}for(let n=0,s=t.childNodes.length;n<s;++n){const s=t.childNodes[n];1===s.nodeType?i.insertBefore(this.CloneToDoc(s,e),null):i.insertBefore(document.createTextNode(s.nodeValue),null)}return i}static XmlToStr(t){try{return(new XMLSerializer).serializeToString(t)}catch(e){try{return t.xml}catch(i){throw i}}}static StrEscapeRegExp(t){return t.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1")}static StrReplaceAll(t,e,i){return i.replace(new RegExp(this.StrEscapeRegExp(t),"g"),e)}static RotatePointsAboutPoint(t,e,i){if(0===e)return;const n=Math.sin(e),s=Math.cos(e),a=Math.abs(s)<1e-4?0:s,o=Math.abs(n)<1e-4?0:n;for(let r=0;r<i.length;r++){const e=i[r].x-t.x,n=i[r].y-t.y;i[r].x=e*a+n*o+t.x,i[r].y=-e*o+n*a+t.y}}static RotatePointsAboutCenter(t,e,i){if(0===e)return;const n={x:(t.x+t.x+t.width)/2,y:(t.y+t.y+t.height)/2};Utils3.RotatePointsAboutPoint(n,e,i)}static GetModifierKeys(t){let e=KeyboardConstant.ModifierKeys.None;return t.ctrlKey||t.metaKey?(e=KeyboardConstant.ModifierKeys.Ctrl,t.shiftKey?e=KeyboardConstant.ModifierKeys.Ctrl_Shift:t.altKey&&(e=KeyboardConstant.ModifierKeys.Ctrl_Alt)):t.shiftKey?(e=KeyboardConstant.ModifierKeys.Shift,t.altKey&&(e=KeyboardConstant.ModifierKeys.Shift_Alt)):t.altKey&&(e=KeyboardConstant.ModifierKeys.Alt),e}static FindStyle(t){return new QuickStyle}static MakeShortUniqueID(){return"aaaaaaaaaaaaaaaa".replace(/a/g,(()=>Math.floor(16*Math.random()).toString(16)))}static ConvertToFeet(t){let e="",i="",n="",s=0,a=0,o=[],r=1;if(o=t.trim().split(" "),o[o.length-1].indexOf("/")>=0){if(e=o[o.length-1],o.length>=2){let t=o[o.length-2];"'"===t.substr(t.length-1,1)&&(n=o[o.length-2],i="")}o.length>=3&&(n=o[o.length-3])}else 2===o.length?(n=o[0],i=o[1]):'"'===o[0].charAt(o[0].length-1)?i=o[0]:n=o[0];if("'"===n.charAt(n.length-1)&&(n=n.substring(0,n.length-1)),'"'===i.charAt(i.length-1)&&(i=i.substring(0,i.length-1)),'"'===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),n.length>0&&(s=parseFloat(n)),i.length>0&&(a=parseFloat(i)),s<0&&(s=-s,r=-1),e.length>0){let t=e.split("/");a+=parseInt(t[0],10)/parseInt(t[1],10)}return(s+a/12)*r}static NumberIsFloat(t,e){const i="9".charCodeAt(0),n="0".charCodeAt(0),s=".".charCodeAt(0),a="-".charCodeAt(0);t=t.trim();for(let o=0;o<t.length;o++){const r=t.charCodeAt(o),l=r===s,h=e&&r===a;if(!(r<=i&&r>=n||l||h))return!1}return!0}}class BConstant{}__publicField(BConstant,"GradientStyle",{Linear:"linear",Radial:"radial",Radialfill:"radialfill"}),__publicField(BConstant,"GradientPos",{LeftTop:"ltop",Top:"top",RightTop:"rtop",Right:"right",RightBottom:"rbottom",Bottom:"bottom",LeftBottom:"lbottom",Left:"left",Center:"center"}),__publicField(BConstant,"Placeholder",{FillColor:"##FillColor",EndColor:"##EndColor",FillTrans:"##FillTrans",LineColor:"##LineColor",LineTrans:"##LineTrans",LineThick:"##LineThick",SolidFill:"##SolidFill",StrokeColor:"##StrokeColor",Terminator:"##"}),__publicField(BConstant,"PlaceholderDefault",{"##FillColor":"#FFFFFF","##EndColor":"#FFFFFF","##FillTrans":1,"##LineColor":"#000000","##LineTrans":1,"##LineThick":1,"##SolidFill":"#000000","##StrokeColor":"#000000"}),__publicField(BConstant,"EffectType",{DROPSHADOW:{id:"SHD",outside:!0},CASTSHADOW:{id:"SHC",outside:!0},GLOW:{id:"GLW",outside:!0},REFLECT:{id:"REFL",outside:!0},BEVEL:{id:"BVL",inside:!0},GLOSS:{id:"GLOSS",inside:!0},INNERGLOW:{id:"IGLW",inside:!0},INNERSHADOW:{id:"ISHD",inside:!0},RECOLOR:{id:"RCLR",inside:!0}}),__publicField(BConstant,"FilterDirection",{LEFT:"L",LEFTTOP:"LT",TOP:"T",RIGHTTOP:"RT",RIGHT:"R",RIGHTBOTTOM:"RB",BOTTOM:"B",LEFTBOTTOM:"LB",CENTER:"C"}),__publicField(BConstant,"BevelType",{HARD:"H",SOFT:"S",BUMP:"B"}),__publicField(BConstant,"GlossType",{Hard:"H",Soft:"S"}),__publicField(BConstant,"EffectSize",{Default:{id:"D",percentage:.1},Small:{id:"S",percentage:.05},Medium:{id:"M",percentage:.25},Large:{id:"L",percentage:.1},Giant:{id:"G",percentage:.05}}),__publicField(BConstant,"WordState",{Wrong:0,Correct:1,NotProcessed:2}),__publicField(BConstant,"Globals",{MaxWordSize:100,MaxServerListSize:1400}),__publicField(BConstant,"DictMap",{en:"24941","en-gb":"25202","en-ca":"25441","pt-br":"28770",da:"25697",nl:"25717",fi:"26217",fr:"26226",de:"26469",it:"26996",legal:"27745",medical:"28001",no:"25442",pt:"28783",es:"29552",sv:"29559"}),__publicField(BConstant,"SpellFlags",{IgnoreInitCaps:1,IgnoreAllCaps:2,IgnoreMixedAlphaNum:4,IgnoreMixedCase:8});const _ErrorHandler=class{constructor(){__publicField(this,"errorQueue",[]),__publicField(this,"maxQueueSize",50),__publicField(this,"listeners",new Set)}static getInstance(){return _ErrorHandler.instance||(_ErrorHandler.instance=new _ErrorHandler),_ErrorHandler.instance}handleError(t,e,i="medium"){const n={error:t,context:e,severity:i,timestamp:Date.now(),stackTrace:t.stack,userAgent:navigator.userAgent};this.addToQueue(n),this.notifyListeners(n),this.logError(n),"critical"===i&&this.handleCriticalError(n)}addToQueue(t){this.errorQueue.push(t),this.errorQueue.length>this.maxQueueSize&&this.errorQueue.shift()}notifyListeners(t){this.listeners.forEach((e=>{try{e(t)}catch(i){}}))}logError(t){const e=`[${t.severity.toUpperCase()}] ${t.context.component}.${t.context.function}: ${t.error.message}`;switch(t.severity){case"low":LogUtil.Info(e);break;case"medium":LogUtil.Warn(e);break;case"high":case"critical":LogUtil.Error(e,t.error)}}handleCriticalError(t){LogUtil.Error("CRITICAL ERROR DETECTED:",t.error)}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}getErrorHistory(){return[...this.errorQueue]}clearHistory(){this.errorQueue=[]}static initializeGlobalHandling(){const t=_ErrorHandler.getInstance();window.addEventListener("unhandledrejection",(e=>{var i,n,s,a,o,r,l;const h=e.reason instanceof Error?e.reason:new Error(String(e.reason));if(h.message.includes("gesto")||h.message.includes("selecto")||h.message.includes('can\'t access property "unset"')||(null==(i=h.stack)?void 0:i.includes("SelectoManager"))||(null==(n=h.stack)?void 0:n.includes("Selecto.vue"))||(null==(s=h.stack)?void 0:s.includes("gesto")))return LogUtil.Debug("[ErrorHandler] Selecto/Gesto error detected and ignored:",h.message),void e.preventDefault();const c=h.message.includes("node is undefined")||h.message.includes("node is null")||h.message.includes("Cannot read propert")||(null==(a=h.stack)?void 0:a.includes(".node."))||(null==(o=h.stack)?void 0:o.includes("getBBox"))||(null==(r=h.stack)?void 0:r.includes("getBoundingClientRect")),u=h.message.includes("Async component timed out")||h.message.includes("component timed out")||h.message.includes("timeout")||(null==(l=h.stack)?void 0:l.includes("defineAsyncComponent"));let d="medium";(c||u)&&(d="high"),t.handleError(h,{component:"Global",function:"unhandledrejection",userAction:"Promise rejection not caught",nodeRelated:c,asyncComponentError:u},d),LogUtil.Error("Unhandled Promise Rejection Details:",{reason:e.reason,promise:e.promise,stack:h.stack,timestamp:(new Date).toISOString(),isNodeError:c,isAsyncComponentError:u,errorMessage:h.message}),e.preventDefault()})),window.addEventListener("error",(e=>{var i,n,s;const a=e.error||new Error(e.message);a.message.includes("gesto")||a.message.includes("selecto")||a.message.includes('can\'t access property "unset"')||(null==(i=a.stack)?void 0:i.includes("SelectoManager"))||(null==(n=a.stack)?void 0:n.includes("Selecto.vue"))||(null==(s=a.stack)?void 0:s.includes("gesto"))?e.preventDefault():t.handleError(a,{component:"Global",function:"globalError",userAction:`Error in ${e.filename}:${e.lineno}:${e.colno}`},"high")}))}handleNodeError(t,e,i){var n;const s={...i,nodeInfo:{nodeType:null==e?void 0:e.nodeType,nodeName:null==e?void 0:e.nodeName,id:null==e?void 0:e.id,className:null==e?void 0:e.className,isConnected:null==e?void 0:e.isConnected,parentNode:null==(n=null==e?void 0:e.parentNode)?void 0:n.nodeName,exists:!!e}};LogUtil.Error("Node-related error details:",s),this.handleError(t,s,"high")}handleAsyncComponentError(t,e,i){const n={...i,componentInfo:{name:(null==e?void 0:e.name)||"Unknown",path:(null==e?void 0:e.path)||"Unknown",timeout:(null==e?void 0:e.timeout)||"Unknown",retryCount:(null==e?void 0:e.retryCount)||0,loadTime:(null==e?void 0:e.loadTime)||0,isTimeout:t.message.includes("timed out"),isAsyncComponent:!0}};LogUtil.Error("Async component error details:",n),this.handleError(t,n,"high")}static safeNodeAccess(t,e,i){try{const e=t();if(null==e)throw new Error("Node is "+(void 0===e?"undefined":"null"));return e}catch(n){return _ErrorHandler.getInstance().handleNodeError(n,null,{component:e.component||"Unknown",function:e.function||"safeNodeAccess",userAction:"Accessing DOM node"}),i||null}}};let ErrorHandler=_ErrorHandler;__publicField(ErrorHandler,"instance");const safeNodeAccess=ErrorHandler.safeNodeAccess;var SVG={ns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",did:0,create:function(t){return document.createElementNS(this.ns,t)},extend:function(t,e){for(var i in e)t.prototype[i]=e[i]},svg:function(t){return new SVG.Doc(t)},Element:function(t){t&&(this.node=t,this.type=t.nodeName),this.attrs={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,fill:"#000",stroke:"#000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0},this.trans={x:0,y:0,scaleX:1,scaleY:1,rotation:0,skewX:0,skewY:0}}};SVG.extend(SVG.Element,{move:function(t,e){return this.attr({x:t,y:e})},center:function(t,e){var i=this.bbox();return this.move(t-i.width/2,e-i.height/2)},size:function(t,e){return this.attr({width:t,height:e})},clone:function(){var t;if(this instanceof SVG.Wrap)(t=this.parent[this.child.node.nodeName]()).attrs=this.attrs,t.child.trans=this.child.trans,t.child.attr(this.child.attrs).transform({}),t.plot&&t.plot(this.child.attrs[this.child instanceof SVG.Path?"d":"points"]);else{const e=safeNodeAccess((()=>this.node.nodeName),{component:"T3Svg",function:"clone"});if(!e)return null;(t="rect"==e?this.parent[e](this.attrs.width,this.attrs.height):"ellipse"==e?this.parent[e](2*this.attrs.rx,2*this.attrs.ry):"image"==e?this.parent[e](this.src):"text"==e?this.parent[e](this.content):"g"==e?this.parent.group():this.parent[e]()).attr(this.attrs)}return t.trans=this.trans,t.transform({}),t},remove:function(){return null!=this.parent?this.parent.remove(this):void 0},doc:function(){return this._parent(SVG.Doc)},nested:function(){return this._parent(SVG.Nested)},attr:function(t,e,i){if(arguments.length<2){if("object"!=typeof t)return this._isStyle(t)?"text"==t?this.content:"leading"==t?this[t]:this.style[t]:this.attrs[t];for(var n in t)this.attr(n,t[n])}else{if(this.attrs[t]=e,"x"==t&&this._isText())for(var s=this.lines.length-1;s>=0;s--)this.lines[s].attr(t,e);else{const n=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"attr"});n&&(null!=i?n.setAttributeNS(i,t,e):n.setAttribute(t,e))}this._isStyle(t)&&("text"==t?this.text(e):"leading"==t?this[t]=e:this.style[t]=e,this.text(this.content))}return this},transform:function(t){if("string"==typeof t)return this.trans[t];var e=[];for(var i in t)null!=t[i]&&(this.trans[i]=t[i]);if(0!=(t=this.trans).rotation){var n=this.bbox();e.push("rotate("+t.rotation+","+(null!=t.cx?t.cx:n.cx)+","+(null!=t.cy?t.cy:n.cy)+")")}return e.push("scale("+t.scaleX+","+t.scaleY+")"),0!=t.skewX&&e.push("skewX("+t.skewX+")"),0!=t.skewY&&e.push("skewY("+t.skewY+")"),e.push("translate("+t.x+","+t.y+")"),this.attr("transform",e.join(" "))},data:function(t,e){if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(i){return this.attr("data-"+t)}else{const i=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"data"});i&&(null===e?i.removeAttribute("data-"+t):this.attr("data-"+t,JSON.stringify(e)))}return this},bbox:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"bbox"});if(!t||"function"!=typeof t.getBBox)return{x:0,y:0,cx:0,cy:0,width:0,height:0};try{var e=t.getBBox();return{x:e.x+this.trans.x,y:e.y+this.trans.y,cx:e.x+this.trans.x+e.width/2,cy:e.y+this.trans.y+e.height/2,width:e.width,height:e.height}}catch(i){return ErrorHandler.getInstance().handleError(i,{component:"T3Svg",function:"bbox",userAction:"Getting bounding box"}),{x:0,y:0,cx:0,cy:0,width:0,height:0}}},rbox:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"rbox"});if(!t||"function"!=typeof t.getBoundingClientRect)return{x:0,y:0,width:0,height:0};try{var e=t.getBoundingClientRect();return{x:e.left,y:e.top,width:e.width,height:e.height}}catch(i){return ErrorHandler.getInstance().handleError(i,{component:"T3Svg",function:"rbox",userAction:"Getting client rectangle"}),{x:0,y:0,width:0,height:0}}},inside:function(t,e){var i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height},show:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"show"});return t&&t.style&&(t.style.display=""),this},hide:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"hide"});return t&&t.style&&(t.style.display="none"),this},visible:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"visible"});return!(!t||!t.style)&&"none"!=t.style.display},_parent:function(t){for(var e=this;null!=e&&!(e instanceof t);)e=e.parent;return e},_isStyle:function(t){return"string"==typeof t&&this._isText()&&/^font|text|leading/.test(t)},_isText:function(){return this instanceof SVG.Text}}),SVG.Container=function(t){this.constructor.call(this,t)},SVG.Container.prototype=new SVG.Element,SVG.extend(SVG.Container,{add:function(t,e){if(!this.has(t)){e=null==e?this.children().length:e,this.children().splice(e,0,t);const i=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"add"}),n=safeNodeAccess((()=>t.node),{component:"T3Svg",function:"add"});i&&n&&i.insertBefore(n,i.childNodes[e]||null),t.parent=this}return this},put:function(t,e){return this.add(t,e),t},has:function(t){return this.children().indexOf(t)>=0},children:function(){return this._children||(this._children=[])},each:function(t){var e,i=this.children();for(e=0,length=i.length;e<length;e++)i[e]instanceof SVG.Shape&&t.apply(i[e],[e,i]);return this},remove:function(t){return this.removeAt(this.children().indexOf(t))},removeAt:function(t){if(0<=t&&t<this.children().length){var e=this.children()[t];this.children().splice(t,1);const i=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"removeAt"}),n=safeNodeAccess((()=>e.node),{component:"T3Svg",function:"removeAt"});i&&n&&i.removeChild(n),e.parent=null}return this},defs:function(){return this._defs||(this._defs=this.put(new SVG.Defs,0))},level:function(){return this.remove(this.defs()).put(this.defs(),0)},group:function(){return this.put(new SVG.G)},rect:function(t,e){return this.put((new SVG.Rect).size(t,e))},circle:function(t){return this.ellipse(t)},ellipse:function(t,e){return this.put((new SVG.Ellipse).size(t,e))},polyline:function(t){return this.put(new SVG.Wrap(new SVG.Polyline)).plot(t)},polygon:function(t){return this.put(new SVG.Wrap(new SVG.Polygon)).plot(t)},path:function(t){return this.put(new SVG.Wrap(new SVG.Path)).plot(t)},image:function(t,e,i){return e=null!=e?e:100,this.put((new SVG.Image).load(t).size(e,null!=i?i:e))},text:function(t){return this.put((new SVG.Text).text(t))},nested:function(){return this.put(new SVG.Nested)},gradient:function(t,e){return this.defs().gradient(t,e)},pattern:function(t,e,i){return this.defs().pattern(t,e,i)},mask:function(){return this.defs().put(new SVG.Mask)},first:function(){return this.children()[0]instanceof SVG.Defs?this.children()[1]:this.children()[0]},last:function(){return this.children()[this.children().length-1]},clear:function(){this._children=[];const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"clear"});if(t)for(;t.hasChildNodes();){const e=safeNodeAccess((()=>t.lastChild),{component:"T3Svg",function:"clear"});if(!e)break;t.removeChild(e)}return this}}),SVG.FX=function(t){this.target=t},SVG.extend(SVG.FX,{animate:function(t,e){t=null==t?1e3:t,e=e||"<>";var i,n,s,a=this.target,o=this,r=(new Date).getTime(),l=r+t;return this.interval=setInterval((function(){var h,c=(new Date).getTime(),u=c>l?1:(c-r)/t;if(null==i)for(var d in i=[],o.attrs)i.push(d);if(null==n){for(var p in n=[],o.trans)n.push(p);s={}}h="<>"===e?-Math.cos(u*Math.PI)/2+.5:">"===e?Math.sin(u*Math.PI/2):"<"===e?1-Math.cos(u*Math.PI/2):"-"===e?u:"function"==typeof e?e(u):u,o._move?a.move(o._at(o._move.x,h),o._at(o._move.y,h)):o._center&&a.move(o._at(o._center.x,h),o._at(o._center.y,h)),o._size&&a.size(o._at(o._size.width,h),o._at(o._size.height,h));for(var g=i.length-1;g>=0;g--)a.attr(i[g],o._at(o.attrs[i[g]],h));if(n.length>0){for(g=n.length-1;g>=0;g--)s[n[g]]=o._at(o.trans[n[g]],h);a.transform(s)}c>l&&(clearInterval(o.interval),o._after?o._after.apply(a,[o]):o.stop())}),t>10?10:t),this},attr:function(t,e){if("object"==typeof t)for(var i in t)this.attr(i,t[i]);else this.attrs[t]={from:this.target.attr(t),to:e};return this},transform:function(t){for(var e in t)this.trans[e]={from:this.target.trans[e],to:t[e]};return this},move:function(t,e){var i=this.target.bbox();return this._move={x:{from:i.x,to:t},y:{from:i.y,to:e}},this},size:function(t,e){var i=this.target.bbox();return this._size={width:{from:i.width,to:t},height:{from:i.height,to:e}},this},center:function(t,e){var i=this.target.bbox();return this._move={x:{from:i.cx,to:t},y:{from:i.cy,to:e}},this},after:function(t){return this._after=t,this},stop:function(){return clearInterval(this.interval),this.attrs={},this.trans={},this._move=null,this._size=null,this._after=null,this},_at:function(t,e){return"number"==typeof t.from?t.from+(t.to-t.from)*e:t.to.r||/^#/.test(t.to)?this._color(t,e):e<1?t.from:t.to},_color:function(t,e){var i=this._h2r(t.from||"#000"),n=this._h2r(t.to);return this._r2h({r:~~(i.r+(n.r-i.r)*e),g:~~(i.g+(n.g-i.g)*e),b:~~(i.b+(n.b-i.b)*e)})},_h2r:function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(this._fh(t));return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:{r:0,g:0,b:0}},_r2h:function(t){return"#"+this._c2h(t.r)+this._c2h(t.g)+this._c2h(t.b)},_c2h:function(t){var e=t.toString(16);return 1==e.length?"0"+e:e},_fh:function(t){return 4==t.length?"#"+t.substring(1,2)+t.substring(1,2)+t.substring(2,3)+t.substring(2,3)+t.substring(3,4)+t.substring(3,4):t}}),SVG.extend(SVG.Element,{animate:function(t,e){return(this._fx||(this._fx=new SVG.FX(this))).stop().animate(t,e)},stop:function(){return this._fx.stop(),this}}),SVG.on=function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,i)},SVG.off=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)},SVG.extend(SVG.Element,{on:function(t,e){return SVG.on(this.node,t,e),this},off:function(t,e){return SVG.off(this.node,t,e),this}}),SVG.G=function(){this.constructor.call(this,SVG.create("g"))},SVG.G.prototype=new SVG.Container,SVG.extend(SVG.G,{defs:function(){return this.doc().defs()}}),SVG.extend(SVG.Element,{siblings:function(){return this.parent.children()},position:function(){return this.siblings().indexOf(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){return this.parent.remove(this).put(this,this.position()+1)},backward:function(){let t;return this.parent.level(),t=this.position(),t>1&&this.parent.remove(this).add(this,t-1),this},front:function(){return this.parent.remove(this).put(this)},back:function(){return this.parent.level(),this.position()>1&&this.parent.remove(this).add(this,0),this}}),SVG.Defs=function(){this.constructor.call(this,SVG.create("defs"))},SVG.Defs.prototype=new SVG.Container,SVG.Mask=function(){this.constructor.call(this,SVG.create("mask")),this.attr("id",this.id="svgjs_element_"+SVG.did++)},SVG.Mask.prototype=new SVG.Container,SVG.extend(SVG.Element,{maskWith:function(t){return this.mask=t instanceof SVG.Mask?t:this.parent.mask().add(t),this.attr("mask","url(#"+this.mask.id+")")}}),SVG.Pattern=function(){this.constructor.call(this,SVG.create("pattern")),this.attr("id",this.id="svgjs_element_"+SVG.did++)},SVG.Pattern.prototype=new SVG.Container,SVG.extend(SVG.Pattern,{fill:function(){return"url(#"+this.id+")"}}),SVG.extend(SVG.Defs,{pattern:function(t,e,i){var n=this.put(new SVG.Pattern);return i(n),n.attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"}),n}}),SVG.Gradient=function(t){this.constructor.call(this,SVG.create(t+"Gradient")),this.attr("id",this.id="svgjs_element_"+SVG.did++),this.type=t},SVG.Gradient.prototype=new SVG.Container,SVG.extend(SVG.Gradient,{from:function(t,e){return"radial"==this.type?this.attr({fx:t+"%",fy:e+"%"}):this.attr({x1:t+"%",y1:e+"%"})},to:function(t,e){return"radial"==this.type?this.attr({cx:t+"%",cy:e+"%"}):this.attr({x2:t+"%",y2:e+"%"})},radius:function(t){return"radial"==this.type?this.attr({r:t+"%"}):this},at:function(t){return this.put(new SVG.Stop(t))},update:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return t(this),this},fill:function(){return"url(#"+this.id+")"}}),SVG.extend(SVG.Defs,{gradient:function(t,e){var i=this.put(new SVG.Gradient(t));return e(i),i}}),SVG.Stop=function(t){this.constructor.call(this,SVG.create("stop")),this.update(t)},SVG.Stop.prototype=new SVG.Element,SVG.extend(SVG.Stop,{update:function(t){var e,i="",n=["opacity","color"];for(e=n.length-1;e>=0;e--)null!=t[n[e]]&&(i+="stop-"+n[e]+":"+t[n[e]]+";");return this.attr({offset:(null!=t.offset?t.offset:this.attrs.offset||0)+"%",style:i})}}),SVG.Doc=function(t){this.constructor.call(this,SVG.create("svg")),this.parent="string"==typeof t?document.getElementById(t):t,this.attr({xmlns:SVG.ns,version:"1.1",width:"100%",height:"100%"}).attr("xmlns:xlink",SVG.xlink).attr("xlink",SVG.xlink,SVG.ns).defs(),this.stage()},SVG.Doc.prototype=new SVG.Container,SVG.Doc.prototype.stage=function(){const t=this.parent,e=document.createElement("div");e.style.cssText="position:relative;height:100%;",t?t.appendChild(e):(this.parent=document.createElement("div"),this.parent.appendChild(e)),e.appendChild(this.node);const i=()=>{"complete"===document.readyState?(this.attr("style","position:absolute;overflow:hidden;"),setTimeout((()=>{this.attr("style","position:relative;overflow:hidden;");try{t.removeChild(this.node.parentNode),this.node.parentNode.removeChild(this.node),t.appendChild(this.node)}catch(e){}}),5)):setTimeout(i,10)};return i(),this},SVG.Shape=function(t){this.constructor.call(this,t)},SVG.Shape.prototype=new SVG.Element,SVG.Wrap=function(t){this.constructor.call(this,SVG.create("g")),this.node.insertBefore(t.node,null),this.child=t,this.type=t.node.nodeName},SVG.Wrap.prototype=new SVG.Shape,SVG.extend(SVG.Wrap,{move:function(t,e){return this.transform({x:t,y:e})},size:function(t,e){var i=t/this._b.width;return this.child.transform({scaleX:i,scaleY:null!=e?e/this._b.height:i}),this},center:function(t,e){return this.move(t+this._b.width*this.child.trans.scaleX/-2,e+this._b.height*this.child.trans.scaleY/-2)},attr:function(t,e,i){if("object"==typeof t)for(var n in t)this.attr(n,t[n]);else{if(arguments.length<2)return"transform"==t?this.attrs[t]:this.child.attrs[t];"transform"==t?(this.attrs[t]=e,null!=i?this.node.setAttributeNS(i,t,e):this.node.setAttribute(t,e)):this.child.attr(t,e,i)}return this},plot:function(t){return this.child.plot(t),this._b=this.child.bbox(),this.child.transform({x:-this._b.x,y:-this._b.y}),this}}),SVG.Rect=function(){this.constructor.call(this,SVG.create("rect"))},SVG.Rect.prototype=new SVG.Shape,SVG.extend(SVG.Rect,{move:function(t,e){return this.attr({x:t,y:e})},size:function(t,e){return this.attr({width:t,height:e})},center:function(t,e){return this.move(t-this.attr("width")/2,e-this.attr("height")/2)}}),SVG.Ellipse=function(){this.constructor.call(this,SVG.create("ellipse"))},SVG.Ellipse.prototype=new SVG.Shape,SVG.extend(SVG.Ellipse,{move:function(t,e){return this.attrs.x=t,this.attrs.y=e,this.center()},size:function(t,e){return this.attr({rx:t/2,ry:(null!=e?e:t)/2}).center()},center:function(t,e){return this.attr({cx:t||(this.attrs.x||0)+(this.attrs.rx||0),cy:e||(this.attrs.y||0)+(this.attrs.ry||0)})}}),SVG.Line=function(){this.constructor.call(this,SVG.create("line"))},SVG.Line.prototype=new SVG.Shape,SVG.extend(SVG.Line,{move:function(t,e){var i=this.bbox();return this.attr({x1:this.attr("x1")-i.x+t,y1:this.attr("y1")-i.y+e,x2:this.attr("x2")-i.x+t,y2:this.attr("y2")-i.y+e})},center:function(t,e){var i=this.bbox();return this.move(t-i.width/2,e-i.height/2)},size:function(t,e){var i=this.bbox();return this.attr(this.attr("x1")<this.attr("x2")?"x2":"x1",i.x+t),this.attr(this.attr("y1")<this.attr("y2")?"y2":"y1",i.y+e),this}}),SVG.extend(SVG.Container,{line:function(t,e,i,n){return this.put((new SVG.Line).attr({x1:t,y1:e,x2:i,y2:n}))}}),SVG.Poly={plot:function(t){return this.attr("points",t||"0,0"),this}},SVG.Polyline=function(){this.constructor.call(this,SVG.create("polyline"))},SVG.Polyline.prototype=new SVG.Shape,SVG.extend(SVG.Polyline,SVG.Poly),SVG.Polygon=function(){this.constructor.call(this,SVG.create("polygon"))},SVG.Polygon.prototype=new SVG.Shape,SVG.extend(SVG.Polygon,SVG.Poly),SVG.Path=function(){this.constructor.call(this,SVG.create("path"))},SVG.Path.prototype=new SVG.Shape,SVG.extend(SVG.Path,{move:function(t,e){this.transform({x:t,y:e})},plot:function(t){return this.attr("d",t||"M0,0")}}),SVG.Image=function(){this.constructor.call(this,SVG.create("image"))},SVG.Image.prototype=new SVG.Shape,SVG.extend(SVG.Image,{load:function(t){return this.src=t,t?this.attr("xlink:href",t,SVG.xlink):this}});var fontProperties=["size","family","weight","stretch","variant","style"];function SVGTSpan(){this.constructor.call(this,SVG.create("tspan"))}SVG.Text=function(){this.constructor.call(this,SVG.create("text")),this.style={"font-size":16,"font-family":"Helvetica","text-anchor":"start"},this.leading=1.2},SVG.Text.prototype=new SVG.Shape,SVG.extend(SVG.Text,{text:function(t){this.content=t=t||"text",this.lines=[];var e=this._style();this.doc();for(var i=t.split("\n"),n=this.style["font-size"];this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);for(var s=0,a=i.length;s<a;s++){var o=(new SVGTSpan).text(i[s]).attr({dy:n*this.leading-(0===s?.3*n:0),x:this.attrs.x||0,style:e});this.node.appendChild(o.node),this.lines.push(o)}return this.attr("style",e)},_style:function(){for(var t="",e=fontProperties.length-1;e>=0;e--){var i=fontProperties[e];null!=this.style["font-"+i]&&(t+="font-"+i+":"+this.style["font-"+i]+";")}return t+="text-anchor:"+this.style["text-anchor"]+";"}}),SVGTSpan.prototype=new SVG.Shape,SVG.extend(SVGTSpan,{text:function(t){return this.node.appendChild(document.createTextNode(t)),this}}),SVG.Nested=function(){this.constructor.call(this,SVG.create("svg")),this.attr("overflow","visible")},SVG.Nested.prototype=new SVG.Container,SVG._stroke=["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],SVG._fill=["color","opacity","rule"];var formatAttributeName=function(t,e){return"color"===e?t:t+"-"+e};["fill","stroke"].forEach((function(t){SVG.Shape.prototype[t]=function(e){var i;if("string"==typeof e)this.attr(t,e);else{var n=SVG["_"+t];for(i=n.length-1;i>=0;i--){var s=n[i];null!=e[s]&&this.attr(formatAttributeName(t,s),e[s])}}return this}})),[SVG.Element,SVG.FX].forEach((function(t){t&&SVG.extend(t,{rotate:function(t){return this.transform({rotation:t||0})},skew:function(t,e){return this.transform({skewX:t||0,skewY:e||0})},scale:function(t,e){return this.transform({scaleX:t,scaleY:null==e?t:e})},opacity:function(t){return this.attr("opacity",t)}})})),SVG.G&&SVG.extend(SVG.G,{move:function(t,e){return this.transform({x:t,y:e})}}),SVG.Text&&SVG.extend(SVG.Text,{font:function(t){var e,i={};for(e in t)"leading"===e?i[e]=t[e]:"anchor"===e?i["text-anchor"]=t[e]:fontProperties.indexOf(e)>-1&&(i["font-"+e]=t[e]);return this.attr(i).text(this.content)}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchend","touchmove","touchcancel"].forEach((function(t){SVG.Element.prototype[t]=function(e){const i=this;return this.node["on"+t]="function"==typeof e?function(){return e.apply(i,arguments)}:null,this}})),SVG.ForeignObject=function(){this.constructor.call(this,SVG.create("foreignObject"))},SVG.ForeignObject.prototype=new SVG.Container,SVG.extend(SVG.ForeignObject,{move:function(t,e){return this.attr({x:t,y:e})},size:function(t,e){return this.attr({width:t,height:e})},html:function(t){if("string"==typeof t){const e=document.createElement("div");e.textContent=t,this.node.innerHTML=e.innerHTML}else t instanceof HTMLElement&&(this.node.innerHTML="",this.node.appendChild(t));return this}}),SVG.extend(SVG.Container,{foreignObject:function(t,e){return this.put((new SVG.ForeignObject).size(t,e))}});const T3Svg=SVG;class BoundInfo{constructor(){__publicField(this,"x"),__publicField(this,"y"),__publicField(this,"width"),__publicField(this,"height"),this.x=0,this.y=0,this.width=0,this.height=0}}class Effects{constructor(t){__publicField(this,"element"),__publicField(this,"curBounds"),this.element=t,this.curBounds=new BoundInfo}SetEffects(t,e){let i=this.GetEffectsID(t,!1),n=[],s=BConstant.EffectSize.Default,a=BConstant.EffectSize.Default,o=!1,r=0,l=0;t&&(l=t.length||0),e=e||this.curBounds,this.curBounds=e,e&&(s=e.width<500?BConstant.EffectSize.Small:e.width<1500?BConstant.EffectSize.Medium:e.width<3e3?BConstant.EffectSize.Large:BConstant.EffectSize.Giant,a=e.height<500?BConstant.EffectSize.Small:e.height<1500?BConstant.EffectSize.Medium:e.height<3e3?BConstant.EffectSize.Large:BConstant.EffectSize.Giant);for(let h=0;h<l;h++)Effects.IsSecondaryEffect(t[h])?n.push(t[h]):r++;if(r&&!this.FilterLimitNeeded(e,s,a)||(this.element.svgObj.node.removeAttribute("filter"),this.element.svgObj.attr.filter&&delete this.element.svgObj.filter,o=!0),!n.length&&this.element.externalEffects){for(let t=0;t<this.element.externalEffects.length;t++)this.element.parent.RemoveElement(this.element.externalEffects[t],!0);this.element.externalEffects=null}if(!o||n.length){if(!o){if(i+=s.id+a.id,!this.element.doc.DefExists(i)){let e=new T3Svg.Container(T3Svg.create("filter")),n="SourceGraphic",o=[];e.attr("id",i),e.attr("x",-s.percentage),e.attr("y",-a.percentage),e.attr("width",1+2*s.percentage),e.attr("height",1+2*a.percentage);for(let i=0;i<l;i++)t[i].type.inside&&this.DefineEffect(e,t[i].type,t[i].params,n,"sourceEffect")&&(n="sourceEffect");for(let i=0;i<l;i++)if(t[i].type.outside)if(t[i].type.id==BConstant.EffectType.CASTSHADOW.id||t[i].type.id==BConstant.EffectType.REFLECT.id)t[i];else{let s="oEffect"+i;this.DefineEffect(e,t[i].type,t[i].params,n,s)&&o.push(s)}let r=new T3Svg.Container(T3Svg.create("feMerge")),h=o.length;for(let t=0;t<h;t++){let e=new T3Svg.Element(T3Svg.create("feMergeNode"));e.attr("in",o[t]),r.add(e)}let c=new T3Svg.Element(T3Svg.create("feMergeNode"));c.attr("in",n),r.add(c),e.add(r),this.element.doc.Defs().add(e)}this.element.SetEffect(i)}if(n.length){for(let t=0;t<n.length;t++){let e=n[t];e.effectID=this.GetEffectsID([e],!0)}if(this.element.externalEffects)for(let t=this.element.externalEffects.length-1;t>=0;t--){let e=this.element.externalEffects[t],i=e.GetID();for(let t=0;t<n.length;t++){let s=n[t];if(i==s.effectID){s.elem=e;break}}this.element.parent.RemoveElement(this.element.externalEffects[t],!0)}this.element.externalEffects=[];for(let t=0;t<n.length;t++){let i=n[t],o=i.elem;o||(o=this.CreateSecondaryEffectElement(i,e,s,a),o.SetID(i.effectID)),o&&(this.element.externalEffects.push(o),this.element.parent.AddElement(o,t,!0))}}}}CreateSecondaryEffectElement(t,e,i,n){let s;return Effects.IsSecondaryEffect(t)&&(s=this.element.doc.CreateShape(OptConstant.CSType.ShapeCopy),s&&(s.SetElementSource(this.element),s.Effects().SetSecondaryEffect(t,e,i,n),s.svgObj.attr("sfx",1))),s}SetSecondaryEffect(t,e,i,n){}ClearEffects(){this.SetEffects()}FilterLimitNeeded(t,e,i){if(!t)return!1;let n=this.element.doc.GetWorkArea(),s=1+2*e.pct,a=1+2*i.pct,o=t.width*n.docToScreenScale*s,r=t.height*n.docToScreenScale*a;return o>4096||r>4096}GetEffectsID(t,e){let i="T3",n=0,s=0,a=t&&t.length||0;if(!a)return i+"_NONE";e=e||!1;for(let o=0;o<a;o++)if(t[o].type.outside){if(Effects.IsSecondaryEffect(t[o])!==e)continue;i+="_"+t[o].type.id,void 0!==t[o].params.xOff&&(i+="."+t[o].params.xOff),void 0!==t[o].params.yOff&&(i+="."+t[o].params.yOff),void 0!==t[o].params.size&&(i+="."+t[o].params.size),void 0!==t[o].params.color&&(i+=t[o].params.color),n++}for(let o=0;o<a;o++)t[o].type.inside&&(i+="_"+t[o].type.id,void 0!==t[o].params.size&&(i+="."+t[o].params.size),void 0!==t[o].params.type&&(i+="."+t[o].params.type),void 0!==t[o].params.dir&&(i+="."+t[o].params.dir),void 0!==t[o].params.color&&(i+=t[o].params.color),s++);return n||s||(i+="_NONE"),i}DefineEffect(t,e,i,n,s){let a=!0;switch(e.id){case BConstant.EffectType.DROPSHADOW.id:this.DefineDropShadow(t,i,n,s);break;case BConstant.EffectType.CASTSHADOW.id:this.DefineCastShadow(t,i,n,s);break;case BConstant.EffectType.REFLECT.id:this.DefineReflect(t,i,n,s);break;case BConstant.EffectType.GLOW.id:this.DefineGlow(t,i,n,s);break;case BConstant.EffectType.BEVEL.id:this.DefineBevel(t,i,n,s);break;case BConstant.EffectType.GLOSS.id:this.DefineGloss(t,i,n,s);break;case BConstant.EffectType.INNERGLOW.id:this.DefineInnerGlow(t,i,n,s);break;case BConstant.EffectType.INNERSHADOW.id:this.DefineInnerShadow(t,i,n,s);break;case BConstant.EffectType.RECOLOR.id:this.DefineRecolor(t,i,n,s);break;default:a=!1}return a}DefineDropShadow(t,e,i,n){let s,a=e.xOff||0,o=e.yOff||0,r=e.color||"#000",l=e.size||2;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color",r),s.attr("flood-opacity",.3),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in","flood"),s.attr("in2","SourceAlpha"),s.attr("operator","in"),s.attr("result","mask"),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr("in","mask"),s.attr("stdDeviation",l),t.add(s),s=new T3Svg.Element(T3Svg.create("feOffset")),s.attr("dx",a),s.attr("dy",o),s.attr("result",n),t.add(s)}DefineCastShadow(t,e,i,n){let s,a=e.size||2;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color","#FFF"),s.attr("flood-opacity",.3),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in2","flood"),s.attr("in","SourceAlpha"),s.attr("operator","in"),s.attr("result","mask"),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr("in","mask"),s.attr("stdDeviation",a),t.add(s)}DefineReflect(t,e,i,n){let s;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color","#FFF"),s.attr("flood-opacity",.3),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in2","flood"),s.attr("in",i),s.attr("operator","in"),s.attr("result","mask"),n&&s.attr("result",n),t.add(s)}DefineGlow(t,e,i,n){let s,a=e.color||"#fff",o=e.size||2;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color",a),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in","flood"),s.attr("in2","SourceAlpha"),s.attr("operator","in"),s.attr("result","mask"),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr("in","mask"),s.attr("stdDeviation",o),s.attr("result",n),t.add(s)}DefineBevel(t,e,i,n){let s,a,o=e.size||1,r=6,l=0;switch(e.dir||BConstant.FilterDirection.LEFTTOP){case BConstant.FilterDirection.RIGHT:l=0;break;case BConstant.FilterDirection.RIGHTBOTTOM:l=45;break;case BConstant.FilterDirection.BOTTOM:l=90;break;case BConstant.FilterDirection.LEFTBOTTOM:l=135;break;case BConstant.FilterDirection.LEFT:l=180;break;case BConstant.FilterDirection.LEFTTOP:l=225;break;case BConstant.FilterDirection.TOP:l=270;break;case BConstant.FilterDirection.RIGHTTOP:l=315}e.type==BConstant.BevelType.HARD&&(r=20),e.type==BConstant.BevelType.BUMP?(s=new T3Svg.Element(T3Svg.create("feMorphology")),s.attr({in:"SourceAlpha",operator:"erode",radius:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({stdDeviation:o,result:"blur"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:"blur",in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"inner"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:"blur",in2:"inner",operator:"in"}),t.add(s)):(s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in"}),t.add(s)),s=new T3Svg.Container(T3Svg.create("feDiffuseLighting")),s.attr({surfaceScale:r,"lighting-color":"white",diffuseConstant:"1",result:"hilite"}),a=new T3Svg.Element(T3Svg.create("feDistantLight")),a.attr({azimuth:l,elevation:"40"}),s.add(a),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:i,in2:"hilite",k1:1.5,operator:"arithmetic",result:n}),t.add(s)}DefineGloss(t,e,i,n){let s,a,o=e.size||2,r=e.dir||BConstant.FilterDirection.LEFTTOP,l=e.type||BConstant.GlossType.Soft,h=e.color||"#ffffff",c=1,u=0;switch(r){case BConstant.FilterDirection.RIGHT:u=0;break;case BConstant.FilterDirection.RIGHTBOTTOM:u=45;break;case BConstant.FilterDirection.BOTTOM:u=90;break;case BConstant.FilterDirection.LEFTBOTTOM:u=135;break;case BConstant.FilterDirection.LEFT:u=180;break;case BConstant.FilterDirection.LEFTTOP:u=225;break;case BConstant.FilterDirection.TOP:u=270;break;case BConstant.FilterDirection.RIGHTTOP:u=315}l==BConstant.GlossType.Hard&&(c=1.2),o/=4,o=Math.max(Math.min(o,20),2),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in"}),t.add(s),s=new T3Svg.Container(T3Svg.create("feSpecularLighting")),s.attr({surfaceScale:20,"lighting-color":"white",specularConstant:c,specularExponent:2,result:"hilite"}),a=new T3Svg.Element(T3Svg.create("feDistantLight")),a.attr({azimuth:u,elevation:"40"}),s.add(a),t.add(s),s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":h,"flood-opacity":.7}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in",result:"flood"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:"hilite",in2:"flood",k1:1.5,operator:"arithmetic"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feBlend")),s.attr({in2:i,mode:"lighten",result:n}),t.add(s)}DefineInnerGlow(t,e,i,n){let s,a=e.color||"#fff",o=e.size||0;s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"shadowdiff"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":a,"flood-opacity":1}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"shadowdiff",operator:"in"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:i,operator:"over",result:n}),t.add(s)}DefineInnerShadow(t,e,i,n){let s,a=e.dir||BConstant.FilterDirection.LEFTTOP,o=e.size||0,r=0,l=0;switch(a){case BConstant.FilterDirection.RIGHT:r=-o,l=0;break;case BConstant.FilterDirection.RIGHTBOTTOM:r=-o,l=-o;break;case BConstant.FilterDirection.BOTTOM:r=0,l=-o;break;case BConstant.FilterDirection.LEFTBOTTOM:r=o,l=-o;break;case BConstant.FilterDirection.LEFT:r=o,l=0;break;case BConstant.FilterDirection.LEFTTOP:r=o,l=o;break;case BConstant.FilterDirection.TOP:r=0,l=o;break;case BConstant.FilterDirection.RIGHTTOP:r=-o,l=o}s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feOffset")),s.attr({dx:r,dy:l}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"shadowdiff"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":"black","flood-opacity":1}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"shadowdiff",operator:"in"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:i,operator:"over",result:n}),t.add(s)}DefineRecolor(t,e,i,n){let s,a=e.color||"#000000";s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":a,"flood-opacity":1}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in",result:n}),t.add(s)}static CalcSecondaryEffectOffset(t,e){let i=Math.abs(e),n=Math.max(-i,2*t);n=Math.min(n,i);let s=n/i*45;return i/Math.tan((90-s)*Math.PI/180)}static IsSecondaryEffect(t){return!(!t||!t.type)&&(t.params.asSecondary||t.type.id===BConstant.EffectType.CASTSHADOW.id||t.type.id===BConstant.EffectType.REFLECT.id)}}class BBoxModel{constructor(){__publicField(this,"x"),__publicField(this,"y"),__publicField(this,"width"),__publicField(this,"height"),this.x=0,this.y=0,this.width=-1,this.height=-1}}class TextConstant{}__publicField(TextConstant,"TextFace",{Bold:1,Italic:2,Underline:4,Superscript:16,Subscript:32,Strike:64}),__publicField(TextConstant,"TextFlags",{BadSpell:32}),__publicField(TextConstant,"TextStyleCodes",{Font:0,Size:1,Face:2,Flags:3,Color:4,StyleId:5,Extra:7,LinkId:10,DataId:11,PaintType:20,SizeFloat:25}),__publicField(TextConstant,"TextJust",{Left:0,Right:2,Center:6,Top:0,Bottom:8}),__publicField(TextConstant,"TextAlign",{Left:"left",Center:"center",Right:"right",TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"}),__publicField(TextConstant,"TextureAlign",{TopLeft:1,TopCenter:2,TopRight:3,CenterLeft:4,Center:5,CenterRight:6,BottomLeft:7,BottomCenter:8,BottomRight:9});class Element$1{constructor(){__publicField(this,"doc"),__publicField(this,"parent"),__publicField(this,"svgObj"),__publicField(this,"ID"),__publicField(this,"style"),__publicField(this,"effects"),__publicField(this,"userData"),__publicField(this,"cursor"),__publicField(this,"strokeWidth"),__publicField(this,"mirrored"),__publicField(this,"flipped"),__publicField(this,"geometryBBox"),__publicField(this,"fillPatternData"),__publicField(this,"strokePatternData"),__publicField(this,"internalID"),__publicField(this,"eventProxy"),__publicField(this,"fillGradientData"),__publicField(this,"strokeGradientData"),__publicField(this,"strokeDashArray"),this.doc=null,this.parent=null,this.svgObj=null}InitElement(t,e){this.doc=t,this.parent=e,this.svgObj.SDGObj=this,this.ID=null,this.style=null,this.effects=null,this.userData=null,this.cursor=null,this.strokeWidth=0,this.mirrored=!1,this.flipped=!1,this.geometryBBox=new BBoxModel,this.fillPatternData=null,this.strokePatternData=null,this.internalID=null}CreateElement(t,e){throw this.InitElement(t,e)}Document(){return this.doc}Parent(){return this.parent}DOMElement(){return this.svgObj?this.svgObj.node:null}InDocument(){if(!this.svgObj)return!1;let t=this.svgObj.parent;for(;t;){if("svg"===t.type)return!0;t=t.parent}return!1}SetID(t){this.ID=t}ExcludeFromExport(t){t?this.svgObj.node.setAttribute("no-export","1"):this.svgObj.node.removeAttribute("no-export")}SetCustomAttribute(t,e){e?this.svgObj.node.setAttribute(t,e):this.svgObj.node.removeAttribute(t)}GetCustomAttribute(t){return this.svgObj.node.getAttribute(t)}SetHyperlinkAttribute(t){}GetID(){return this.ID}GetInternalID(){return this.internalID||(this.internalID=Utils1.MakeGuid())}SetInternalID(){const t=this.GetInternalID();return this.svgObj.attr("id",t),t}SetUserData(t){this.userData=t}GetUserData(){return this.userData}SetEventProxy(t){this.eventProxy=t}GetEventProxy(){return this.eventProxy}SetSize(t,e){t=Utils1.RoundCoord(t),e=Utils1.RoundCoord(e),this.svgObj.size(t,e),this.UpdateTransform(),this.geometryBBox.width=t,this.geometryBBox.height=e,this.RefreshPaint()}SetPos(t,e){t=Utils1.RoundCoord(t),e=Utils1.RoundCoord(e),this.svgObj.transform({x:t,y:e}),this.GetRotation()&&this.SetRotation(this.GetRotation()),this.UpdateTransform(),this.RefreshPaint(!0)}GetPos(){return{x:this.svgObj.trans.x,y:this.svgObj.trans.y}}SetCenter(t,e){const i=this.CalcBBox(),n=t-i.width/2,s=e-i.height/2;this.SetPos(n,s)}SetRotation(t,e,i){let n;void 0===e&&(n=this.CalcBBox(),e=n.cx),void 0===i&&(n=n||this.CalcBBox(),i=n.cy),e=Utils1.RoundCoord(e),i=Utils1.RoundCoord(i),t=Utils1.RoundCoord(t),this.svgObj.transform({rotation:t,cx:e,cy:i}),this.UpdateTransform()}GetRotation(){const t=this.svgObj.trans.rotation;return"number"==typeof t?t:0}SetMirror(t){this.mirrored=t,this.UpdateTransform()}GetMirror(){return this.mirrored}SetFlip(t){this.flipped=t,this.UpdateTransform()}GetFlip(){return this.flipped}SetScale(t,e){this.GetScaleElement().transform({scaleX:t,scaleY:e}),this.UpdateTransform()}GetScale(){const t=this.GetScaleElement();return{scaleX:t.trans.scaleX||1,scaleY:t.trans.scaleY||1}}SetVisible(t){t?this.svgObj.show():this.svgObj.hide()}GetVisible(){return this.svgObj.visible()}GetBBox(){let t,e=null;return this.parent||(e=this.doc.GetFormattingLayer(),e.AddElement(this)),t=this.svgObj.bbox(),e&&e.RemoveElement(this),t}CalcBBox(){const t=this.CalcElementFrame(!0);return{...t,cx:t.x+t.width/2,cy:t.y+t.height/2}}GetRBox(){let t=null;this.parent||(t=this.doc.GetFormattingLayer(),t.AddElement(this));const e=this.svgObj.rbox();return t&&t.RemoveElement(this),e}UpdateTransform(){LogUtil.Debug("= B.Element: UpdateTransform - Starting transformation update for element",this.ID);let t=null;this.parent||(LogUtil.Debug("= B.Element: UpdateTransform - No parent found, using formatting layer"),t=this.doc.GetFormattingLayer(),t.AddElement(this));const e=this.GetScaleElement();if(e.transform({}),this.mirrored||this.flipped){let t;const i=this.CalcBBox(),n=e.trans.scaleX||1,s=e.trans.scaleY||1;LogUtil.Debug("= B.Element: UpdateTransform - Processing mirror/flip with scales",{horizontalScale:n,verticalScale:s}),t=e.node.transform.baseVal.consolidate().matrix,i.width/=n,i.height/=s,this.mirrored&&(LogUtil.Debug("= B.Element: UpdateTransform - Applying horizontal mirroring"),t=t.flipX().translate(-i.width,0)),this.flipped&&(LogUtil.Debug("= B.Element: UpdateTransform - Applying vertical flipping"),t=t.flipY().translate(0,-i.height));const a=`matrix(${Utils1.RoundCoord(t.a)} ${Utils1.RoundCoord(t.b)} ${Utils1.RoundCoord(t.c)} ${Utils1.RoundCoord(t.d)} ${Utils1.RoundCoord(t.e)} ${Utils1.RoundCoord(t.f)})`;e.attr("transform",a),LogUtil.Debug("= B.Element: UpdateTransform - Applied transformation matrix",a)}t&&(t.RemoveElement(this),LogUtil.Debug("= B.Element: UpdateTransform - Removed from temporary formatting layer")),LogUtil.Debug("= B.Element: UpdateTransform - Completed transformation update")}GetScaleElement(){return this.svgObj}CalcElementFrame(t){for(var e=this.GetGeometryBBox(),i={x:e.x,y:e.y,width:e.width,height:e.height},n=this.svgObj;n&&n!==this.doc.svgObj&&(i.x+=n.trans.x,i.y+=n.trans.y,n=n.parent,!t););return i}GetGeometryBBox(){if(this.geometryBBox.width<0||this.geometryBBox.height<0){const t=this.doc.GetFormattingLayer(),e={x:this.svgObj.trans.x,y:this.svgObj.trans.y},i=this.svgObj.trans.rotation,n=this.svgObj.parent;let s=0;n&&(s=this.svgObj.position(),n.remove(this.svgObj)),t.svgObj.add(this.svgObj),this.svgObj.transform({x:0,y:0,rotation:0});const a=this.svgObj.rbox();t.svgObj.remove(this.svgObj);const o=this.doc.ConvertWindowToDocCoords(a.x,a.y);this.geometryBBox.x=o.x,this.geometryBBox.y=o.y,this.geometryBBox.width=a.width,this.geometryBBox.height=a.height,this.svgObj.transform({x:e.x,y:e.y,rotation:i}),n&&n.add(this.svgObj,s),this.UpdateTransform()}return this.geometryBBox}GetArrowheadBounds(){return[]}SetTooltip(t){Element$1.SetTooltipOnElement(this.svgObj,t)}Style(){return this.style||(this.style=new Style(this)),this.style}SetFillColor(t){this.svgObj.attr("fill",t),this.ClearColorData(!0)}SetImageFill(t,e){if(e=e||{},this.ClearColorData(!0),this.fillPatternData={},this.fillPatternData.options={},this.fillPatternData.options.cropRect=e.cropRect||{x:0,y:0,width:0,height:0},this.fillPatternData.options.scaleType=e.scaleType||"PROPFILL",this.fillPatternData.url=t,this.fillPatternData.ID=Utils1.MakeGuid(),this.fillPatternData.imgWidth=e.imageWidth||0,this.fillPatternData.imgHeight=e.imageHeight||0,this.fillPatternData.patternElem=null,this.fillPatternData.imageElem=null,this.fillPatternData.isImage=!0,!this.fillPatternData.imgWidth||!this.fillPatternData.imgHeight){const e=Style.GetCachedImageSize(t);e?(this.fillPatternData.imgWidth=e.width,this.fillPatternData.imgHeight=e.height):Style.CalcImageSize(t,(function(t,e,i,n){i||n.elem&&n.elem.fillPatternData&&(n.elem.fillPatternData.imgWidth=t,n.elem.fillPatternData.imgHeight=e,n.elem.UpdatePattern(n.ID,n.fill))}),{ID:this.fillPatternData.ID,elem:this,fill:!0})}this.UpdatePattern(this.fillPatternData.ID,!0)}UpdateImageFill(t={}){this.fillPatternData&&this.fillPatternData.isImage&&(this.fillPatternData.options.cropRect=t.cropRect||this.fillPatternData.options.cropRect,this.fillPatternData.options.scaleType=t.scaleType||this.fillPatternData.options.scaleType,this.UpdatePattern(this.fillPatternData.ID,!0))}SetTextureFill(t){t&&t.url&&(this.ClearColorData(!0),this.fillPatternData={options:{scale:t.scale||1,alignment:t.alignment||0},url:t.url,ID:Utils1.MakeGuid(),imgWidth:t.dim.x,imgHeight:t.dim.y,patternElem:null,imageElem:null,isTexture:!0},this.UpdatePattern(this.fillPatternData.ID,!0))}SetGradientFill(t){if(t&&t.stops&&t.stops.length){this.ClearColorData(!0),this.fillGradientData={},this.fillGradientData.settings={},this.fillGradientData.settings.stops=[],this.fillGradientData.settings.type=t.type||BConstant.GradientStyle.Linear,this.fillGradientData.settings.startPos=t.startPos||BConstant.GradientPos.LeftTop,this.fillGradientData.settings.angle=t.angle;const e=t.stops;for(let t=0;t<e.length;t++)this.fillGradientData.settings.stops.push({offset:e[t].offset||0,color:e[t].color||"#fff",opacity:void 0!==e[t].opacity?e[t].opacity:1});this.fillGradientData.ID=Utils1.MakeGuid(),this.fillGradientData.gradientElem=null,this.UpdateGradient(this.fillGradientData.ID,!0)}}ClearColorData(t){let e,i;t?(e=this.fillPatternData,i=this.fillGradientData):(e=this.strokePatternData,i=this.strokeGradientData),e&&e.patternElem&&(this.svgObj.remove(e.patternElem),e.patternElem=null,e.imageElem=null),i&&i.gradientElem&&(this.svgObj.remove(i.gradientElem),i.gradientElem=null),t?(this.fillPatternData=null,this.fillGradientData=null):(this.strokePatternData=null,this.strokeGradientData=null)}UpdatePattern(t,e){const i=e?this.fillPatternData:this.strokePatternData;if(i&&i.ID===t){i.patternElem||(i.patternElem=new T3Svg.Pattern,i.imageElem=new T3Svg.Image,i.imageElem.load(i.url),i.patternElem.add(i.imageElem),i.patternElem.attr("id",i.ID),this.svgObj.add(i.patternElem,0)),i.isImage?this.UpdateImagePattern(i):i.isTexture&&this.UpdateTexturePattern(i);const t=e?"fill":"stroke";this.svgObj.attr(t,"url(#"+i.ID+")")}}UpdateImagePattern(t){const e=this.CalcElementFrame();if(t.patternElem&&t.imageElem&&t.isImage){const i=t.imgWidth||e.width,n=t.imgHeight||e.height,s={x:t.options.cropRect.x,y:t.options.cropRect.y,width:t.options.cropRect.width||i,height:t.options.cropRect.height||n};if(t.imgWidth||t.imgHeight||(s.x=0,s.y=0),s.x<i&&s.y<n){s.width=Math.min(s.width,i-s.x),s.height=Math.min(s.height,n-s.y);let a=e.width/s.width,o=e.height/s.height;"PROPFILL"===t.options.scaleType?a>o?o=a:a=o:"PROPFIT"===t.options.scaleType?a<o?o=a:a=o:"NONE"===t.options.scaleType&&(a=1,o=1),s.x*=a,s.y*=o,s.width*=a,s.height*=o;const r=(e.width-s.width)/2-s.x,l=(e.height-s.height)/2-s.y;let h=s.width-r,c=s.height-l;h<e.width&&(h=e.width),c<e.height&&(c=e.height);const u=Utils1.RoundCoord(r/a),d=Utils1.RoundCoord(l/o),p=Utils1.RoundCoord(h+1),g=Utils1.RoundCoord(c+1),f=Utils1.RoundCoord(a),b=Utils1.RoundCoord(o);t.patternElem.attr({x:0,y:0,width:p,height:g,patternUnits:"userSpaceOnUse",preserveAspectRatio:"none meet",viewBox:"0 0 "+p+" "+g}),t.patternElem.node.setAttribute("_isImage_",!0),t.imageElem.attr({x:0,y:0,width:i,height:n,transform:"scale("+f+","+b+") translate("+u+","+d+")",preserveAspectRatio:"none"})}}}UpdateTexturePattern(t){const e=this.CalcElementFrame();let i,n,s;if(t.patternElem&&t.imageElem&&t.isTexture&&t.imgWidth&&t.imgHeight){switch(i=t.options.scale,n={x:0,y:0,width:t.imgWidth*i,height:t.imgHeight*i},s={x:0,y:0,width:n.width,height:n.height},t.options.alignment){case TextConstant.TextureAlign.TopLeft:break;case TextConstant.TextureAlign.TopCenter:s.x+=e.width/2;break;case TextConstant.TextureAlign.TopRight:s.x=e.width-n.width;break;case TextConstant.TextureAlign.CenterLeft:s.y+=e.height/2;break;case TextConstant.TextureAlign.Center:s.x+=e.width/2,s.y+=e.height/2;break;case TextConstant.TextureAlign.CenterRight:s.x=e.width-n.width,s.y+=e.height/2;break;case TextConstant.TextureAlign.BottomLeft:s.y=e.height-n.height;break;case TextConstant.TextureAlign.BottomCenter:s.x+=e.width/2,s.y=e.height-n.height;break;case TextConstant.TextureAlign.BottomRight:s.x=e.width-n.width,s.y=e.height-n.height;break;default:s.x=-e.x,s.y=-e.y}t.imageElem.attr({x:0,y:0,width:n.width,height:n.height,preserveAspectRatio:"none"}),t.patternElem.attr({x:s.x,y:s.y,width:s.width,height:s.height,patternUnits:"userSpaceOnUse",preserveAspectRatio:"none meet",viewBox:"0 0 "+n.width+" "+n.height})}}UpdateGradient(t,e){const i=this.GetGeometryBBox();let n={x:0,y:0},s={x:0,y:0},a=Math.sqrt(i.width*i.width+i.height*i.height),o=!0;const r=e?this.fillGradientData:this.strokeGradientData;if(r&&r.ID===t){if(!r.gradientElem){let t;switch(r.settings.type){case BConstant.GradientStyle.Radialfill:case BConstant.GradientStyle.Radial:t="radial";break;default:t="linear"}r.gradientElem=new T3Svg.Gradient(t),r.gradientElem.attr("id",r.ID);for(let e=0;e<r.settings.stops.length;e++){const t=r.settings.stops[e];r.gradientElem.at({offset:t.offset,color:t.color,opacity:t.opacity})}this.svgObj.add(r.gradientElem,0)}switch(o=r.settings.type===BConstant.GradientStyle.Linear,n.x=i.x,n.y=i.y,s.x=n.x+i.width,s.y=n.y+i.height,r.settings.startPos){case BConstant.GradientPos.Top:n.x+=i.width/2,s.x=n.x,a=i.height;break;case BConstant.GradientPos.RightTop:n.x=s.x,s.x=i.x;break;case BConstant.GradientPos.Right:n.x=s.x,n.y+=i.height/2,s.x=i.x,s.y=n.y,a=i.width;break;case BConstant.GradientPos.RightBottom:n.x=s.x,n.y=s.y,s.x=i.x,s.y=i.y;break;case BConstant.GradientPos.Bottom:n.x+=i.width/2,n.y=s.y,s.x=n.x,s.y=i.y,a=i.height;break;case BConstant.GradientPos.LeftBottom:n.y=s.y,s.y=i.y;break;case BConstant.GradientPos.Left:n.y+=i.height/2,s.y=n.y,a=i.width;break;case BConstant.GradientPos.Center:o&&(n.x+=i.width/2,n.y+=i.height/2,s.x=n.x,s.y=n.y,a=Math.max(i.width,i.height)/2)}if(void 0!==r.settings.angle){let t=r.settings.angle/10;if(t%=360,t<0&&(t+=360),0===t)n.x=i.x,n.y=i.y+i.height/2,s.x=i.x+i.width,s.y=i.y+i.height/2;else if(180===t)n.x=i.x+i.width,n.y=i.y+i.height/2,s.x=i.x,s.y=i.y+i.height/2;else if(90===t)n.x=i.x+i.width/2,n.y=i.y,s.x=i.x+i.width/2,s.y=i.y+i.height;else if(270===t)n.x=i.x+i.width/2,n.y=i.y+i.height,s.x=i.x+i.width/2,s.y=i.y;else{let e,a,o,r;const l=Math.tan(t*Math.PI/180),h=Math.tan((t+90)*Math.PI/180),c=i.x+i.width/2,u=i.y+i.height/2-c*l;t<90?(e=i.x,a=i.y,o=i.x+i.width,r=i.y+i.height):t<180?(e=i.x+i.width,a=i.y,o=i.x,r=i.y+i.height):t<270?(e=i.x+i.width,a=i.y+i.height,o=i.x,r=i.y):(e=i.x,a=i.y+i.height,o=i.x+i.width,r=i.y);const d=a-e*h,p=r-o*h;n.x=(d-u)/(l-h),n.y=n.x*l+u,s.x=(p-u)/(l-h),s.y=s.x*l+u}}o?r.gradientElem.attr({x1:n.x,y1:n.y,x2:s.x,y2:s.y,gradientUnits:"userSpaceOnUse"}):r.gradientElem.attr({cx:n.x,cy:n.y,r:a,gradientUnits:"userSpaceOnUse"}),e?this.svgObj.attr("fill","url(#"+r.ID+")"):this.svgObj.attr("stroke","url(#"+r.ID+")")}}RefreshPaint(t){this.fillPatternData?this.UpdatePattern(this.fillPatternData.ID,!0):this.fillGradientData&&this.UpdateGradient(this.fillGradientData.ID,!0),this.strokePatternData?this.UpdatePattern(this.strokePatternData.ID,!1):this.strokeGradientData&&this.UpdateGradient(this.strokeGradientData.ID,!1)}GetImageFillSize(){let t={width:0,height:0};return this.fillPatternData&&this.fillPatternData.isImage&&(t.width=this.fillPatternData.imgWidth,t.height=this.fillPatternData.imgHeight),t}SetStrokeColor(t){this.svgObj.attr("stroke",t),this.ClearColorData(!1)}SetTextureStroke(t){t&&t.url&&(this.ClearColorData(!1),this.strokePatternData={},this.strokePatternData.options={},this.strokePatternData.options.scale=t.scale||1,this.strokePatternData.options.alignment=t.alignment||0,this.strokePatternData.url=t.url,this.strokePatternData.ID=Utils1.MakeGuid(),this.strokePatternData.imgWidth=t.dim.x,this.strokePatternData.imgHeight=t.dim.y,this.strokePatternData.patternElem=null,this.strokePatternData.imageElem=null,this.strokePatternData.isTexture=!0,this.UpdatePattern(this.strokePatternData.ID,!1))}SetGradientStroke(t){if(t&&t.stops&&t.stops.length){this.ClearColorData(!1),this.strokeGradientData={},this.strokeGradientData.settings={},this.strokeGradientData.settings.stops=[],this.strokeGradientData.settings.type=t.type||BConstant.GradientStyle.Linear,this.strokeGradientData.settings.startPos=t.startPos||BConstant.GradientPos.LeftTop,this.strokeGradientData.settings.angle=t.angle;for(let e=0;e<t.stops.length;e++){const i=t.stops[e];this.strokeGradientData.settings.stops.push({offset:i.offset||0,color:i.color||"#fff",opacity:void 0!==i.opacity?i.opacity:1})}this.strokeGradientData.ID=Utils1.MakeGuid(),this.strokeGradientData.gradientElem=null,this.UpdateGradient(this.strokeGradientData.ID,!1)}}SetStrokeWidth(t){this.svgObj.attr("stroke-width",t),isNaN(Number(t))&&(t=Instance.Basic.Symbol.ParsePlaceholder(t,BConstant.Placeholder.LineThick)),this.strokeWidth=Number(t),this.svgObj.attr("stroke-dasharray",this.GetStrokePatternForWidth())}SetStrokePattern(t){this.strokeDashArray=t;const e=this.GetStrokePatternForWidth();this.svgObj.attr("stroke-dasharray",e)}GetStrokePatternForWidth(){const t=this.strokeWidth;let e=[];if(this.strokeDashArray&&(e=this.strokeDashArray.split(",").map((t=>Number(t.trim())))),!e.length||!t)return"none";return e.map((e=>e*t)).join(",")}SetOpacity(t){this.svgObj.attr("opacity",t)}SetFillOpacity(t){this.svgObj.attr("fill-opacity",t)}SetStrokeOpacity(t){this.svgObj.attr("stroke-opacity",t)}SetFillRule(t){this.svgObj.attr("fill-rule",t)}SetDisplayVisibility(t){const e=t?"":"hidden";this.svgObj.attr("visibility",e)}Effects(){return this.effects||(this.effects=new Effects(this)),this.effects}SetEffect(t){this.svgObj.attr("filter",`url(#${t})`)}SetEventBehavior(t){this.svgObj.attr("pointer-events",t)}GetEventBehavior(){return this.svgObj.attr("pointer-events")}ClearEventBehavior(){this.svgObj.node.removeAttribute("pointer-events")}SetCursor(t){this.cursor=t,t?this.svgObj.node.setAttribute("class",t):this.svgObj.node.removeAttribute("class")}GetCursor(){return this.cursor}ClearAllCursors(){Element$1.RemoveCursorsOnSVGObj(this.svgObj)}static RemoveCursorsOnSVGObj(t){if(t.SDGObj&&(t.SDGObj.cursor=null),t.node&&t.node.removeAttribute("class"),t instanceof T3Svg.Container){const e=t.children();for(let t=0;t<e.length;t++)Element$1.RemoveCursorsOnSVGObj(e[t])}}static SetTooltipOnElement(t,e){if(t&&t instanceof T3Svg.Container){const i=new T3Svg.Element(T3Svg.create("title"));i.node.textContent=e,t.add(i)}}}class CRect{constructor(t,e,i,n){__publicField(this,"h"),__publicField(this,"v"),__publicField(this,"hdist"),__publicField(this,"vdist"),this.h=t||0,this.v=e||0,this.hdist=i||0,this.vdist=n||0}}class DefaultStyle{constructor(){__publicField(this,"font"),__publicField(this,"type"),__publicField(this,"size"),__publicField(this,"weight"),__publicField(this,"style"),__publicField(this,"baseOffset"),__publicField(this,"decoration"),__publicField(this,"color"),__publicField(this,"colorTrans"),__publicField(this,"spError"),__publicField(this,"dataField"),__publicField(this,"hyperlink"),this.font="Arial",this.type="sanserif",this.size=10,this.weight="normal",this.style="normal",this.baseOffset="none",this.decoration="none",this.color="#000",this.colorTrans=1,this.spError=!1,this.dataField=null,this.hyperlink=-1}}class ParagraphFormat{constructor(){__publicField(this,"just"),__publicField(this,"bullet"),__publicField(this,"spacing"),__publicField(this,"lindent"),__publicField(this,"rindent"),__publicField(this,"pindent"),__publicField(this,"tabspace"),__publicField(this,"vjust"),this.just="center",this.bullet="none",this.spacing=0,this.lindent=0,this.rindent=0,this.pindent=0,this.tabspace=0,this.vjust="middle"}}class PolySeg{constructor(t,e,i){__publicField(this,"LineType"),__publicField(this,"dataclass"),__publicField(this,"ShortRef"),__publicField(this,"param"),__publicField(this,"weight"),__publicField(this,"dimDeflection"),__publicField(this,"flags"),__publicField(this,"pt"),__publicField(this,"UserData"),__publicField(this,"dimTextAltPositioning"),this.LineType=t||OptConstant.LineType.LINE,this.dataclass=0,this.ShortRef=0,this.param=0,this.weight=0,this.dimDeflection=0,this.flags=0,this.pt={x:0,y:0},this.UserData=null,e&&(this.pt.x=e),i&&(this.pt.y=i),this.dimTextAltPositioning=!1}}var __defProp$a=Object.defineProperty,__getOwnPropDesc$a=Object.getOwnPropertyDescriptor,__decorateClass$a=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$a(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$a(e,i,a),a};class PolyList{constructor(){__publicField(this,"dim"),__publicField(this,"offset"),__publicField(this,"flags"),__publicField(this,"closed"),__publicField(this,"wasline"),__publicField(this,"Shape_Rotation"),__publicField(this,"Shape_DataID"),__publicField(this,"Shape_TableID"),__publicField(this,"segs"),this.dim={x:0,y:0},this.offset={x:0,y:0},this.flags=0,this.closed=0,this.wasline=!0,this.Shape_Rotation=0,this.Shape_DataID=-1,this.Shape_TableID=-1,this.segs=[]}}__decorateClass$a([Type((()=>PolySeg))],PolyList.prototype,"segs",2);class Rectangle{constructor(t,e,i,n){__publicField(this,"x"),__publicField(this,"y"),__publicField(this,"width"),__publicField(this,"height"),__publicField(this,"firstconnector_x"),__publicField(this,"h"),__publicField(this,"hdist"),__publicField(this,"v"),__publicField(this,"vdist"),this.x=t||0,this.y=e||0,this.width=i||0,this.height=n||0}}class TextObject{constructor(t){__publicField(this,"Type"),__publicField(this,"runtimeText"),__publicField(this,"selrange"),t=t||{},this.Type=StateConstant.StoredObjectType.TextObject,this.runtimeText=t.runtimeText||null,this.selrange=t.selrange||{start:0,end:0,line:0}}}const TextParams={minWidth:null,maxWidth:null,minHeight:null};class Layer$1{constructor(){__publicField(this,"name"),__publicField(this,"flags"),__publicField(this,"n"),__publicField(this,"index"),__publicField(this,"layertype"),__publicField(this,"zList"),this.name="",this.flags=NvConstant.LayerFlags.Visible,this.n=0,this.index=0,this.layertype=NvConstant.LayerTypes.None,this.zList=[]}}var __defProp$9=Object.defineProperty,__getOwnPropDesc$9=Object.getOwnPropertyDescriptor,__decorateClass$9=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$9(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$9(e,i,a),a};class LayersManager{constructor(){__publicField(this,"Type"),__publicField(this,"nlayers"),__publicField(this,"layers"),__publicField(this,"activelayer"),__publicField(this,"swimlanelist"),this.Type=StateConstant.StoredObjectType.LayersManagerObject,this.nlayers=0,this.layers=new Array,this.activelayer=0,this.swimlanelist=[]}}__decorateClass$9([Type((()=>Layer$1))],LayersManager.prototype,"layers",2);class Link{constructor(t,e,i){__publicField(this,"targetid"),__publicField(this,"hookid"),__publicField(this,"flags"),__publicField(this,"cellid"),this.targetid=t||0,this.hookid=e||0,this.flags=0,this.cellid=i}}class MarginModel{constructor(t,e,i,n){__publicField(this,"left"),__publicField(this,"top"),__publicField(this,"right"),__publicField(this,"bottom"),this.left=t,this.top=e,this.right=i,this.bottom=n}}var __defProp$8=Object.defineProperty,__getOwnPropDesc$8=Object.getOwnPropertyDescriptor,__decorateClass$8=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$8(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$8(e,i,a),a};class PageSetting{constructor(){__publicField(this,"papersize"),__publicField(this,"minsize"),__publicField(this,"margins");const t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.papersize=new Point$1(t,e),this.minsize=new Point$1(1e3,750),this.margins=new MarginModel(50,50,50,50)}}__decorateClass$8([Type((()=>Point$1))],PageSetting.prototype,"papersize",2),__decorateClass$8([Type((()=>Point$1))],PageSetting.prototype,"minsize",2),__decorateClass$8([Type((()=>MarginModel))],PageSetting.prototype,"margins",2);class FontRecord{constructor(){__publicField(this,"fontName"),__publicField(this,"fontType"),__publicField(this,"fontSize"),__publicField(this,"face"),this.fontName="Arial",this.fontType="sanserif",this.fontSize=10,this.face=0}}var __defProp$7=Object.defineProperty,__getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$7=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$7(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$7(e,i,a),a};class SDDefault{constructor(){__publicField(this,"style"),__publicField(this,"just"),__publicField(this,"vjust"),__publicField(this,"lf"),__publicField(this,"textflags"),__publicField(this,"textgrow"),__publicField(this,"fsize_min"),__publicField(this,"tmargins"),__publicField(this,"flags"),__publicField(this,"h_arraywidth"),__publicField(this,"v_arraywidth"),__publicField(this,"lastcommand"),__publicField(this,"arrayht"),__publicField(this,"arraywd"),__publicField(this,"wallThickness"),__publicField(this,"curveparam"),__publicField(this,"rrectparam"),__publicField(this,"pen"),__publicField(this,"highlighter"),this.style=new QuickStyle,this.just="center",this.vjust="center",this.lf=new FontRecord,this.textflags=0,this.textgrow=NvConstant.TextGrowBehavior.ProPortional,this.fsize_min=8,this.tmargins={left:OptConstant.Common.DefTextMargin,top:OptConstant.Common.DefTextMargin,right:OptConstant.Common.DefTextMargin,bottom:OptConstant.Common.DefTextMargin},this.flags=0,this.h_arraywidth=50,this.v_arraywidth=50,this.lastcommand=0,this.arrayht=25,this.arraywd=25,this.wallThickness=0,this.curveparam=0,this.rrectparam=OptConstant.Common.DefFixedRRect,this.pen={},this.highlighter={}}}__decorateClass$7([Type((()=>QuickStyle))],SDDefault.prototype,"style",2),__decorateClass$7([Type((()=>FontRecord))],SDDefault.prototype,"lf",2);var __defProp$6=Object.defineProperty,__getOwnPropDesc$6=Object.getOwnPropertyDescriptor,__decorateClass$6=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$6(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$6(e,i,a),a};class SDGraphDefault{constructor(){__publicField(this,"type"),__publicField(this,"flags"),__publicField(this,"pointflags"),__publicField(this,"catAxisflags"),__publicField(this,"magAxisflags"),__publicField(this,"legendType"),__publicField(this,"legendlayoutflags"),__publicField(this,"imagevaluerep"),__publicField(this,"quadrant"),__publicField(this,"style"),__publicField(this,"areaStyle"),__publicField(this,"gridStyle"),__publicField(this,"titleStyle"),__publicField(this,"legendStyle"),__publicField(this,"legendTitleStyle"),__publicField(this,"catAxisStyle"),__publicField(this,"catAxisTitleStyle"),__publicField(this,"magAxisStyle"),__publicField(this,"magAxisTitleStyle"),__publicField(this,"pointStyle"),__publicField(this,"pointLabelStyle"),this.type=NvConstant.GraphType.Bar,this.flags=NvConstant.GraphFlags.SequenceByCategory,this.pointflags=0,this.catAxisflags=NvConstant.AxisFlags.DaxShowGridLineMajor|NvConstant.AxisFlags.DaxHideMinorTicks,this.magAxisflags=NvConstant.AxisFlags.DaxShowGridLineMajor,this.legendType=NvConstant.LegendType.DaxLegendFull,this.legendlayoutflags=0,this.imagevaluerep=-1,this.quadrant=0,this.style=new QuickStyle,this.areaStyle=new QuickStyle,this.gridStyle=new QuickStyle,this.titleStyle=new QuickStyle,this.legendStyle=new QuickStyle,this.legendTitleStyle=new QuickStyle,this.catAxisStyle=new QuickStyle,this.catAxisTitleStyle=new QuickStyle,this.magAxisStyle=new QuickStyle,this.magAxisTitleStyle=new QuickStyle,this.pointStyle=new QuickStyle,this.pointLabelStyle=new QuickStyle}}__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"style",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"areaStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"gridStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"titleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"legendStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"legendTitleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"catAxisStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"catAxisTitleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"magAxisStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"magAxisTitleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"pointStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"pointLabelStyle",2);var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$5=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$5(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$5(e,i,a),a};class SDData{constructor(){__publicField(this,"Type"),__publicField(this,"dim"),__publicField(this,"flags"),__publicField(this,"tselect"),__publicField(this,"dupdisp"),__publicField(this,"def"),__publicField(this,"graphDef"),__publicField(this,"RefCon"),__publicField(this,"d_sarrow"),__publicField(this,"d_sarrowdisp"),__publicField(this,"d_earrow"),__publicField(this,"d_earrowdisp"),__publicField(this,"d_arrowsize"),__publicField(this,"centersnapalign"),__publicField(this,"hopdimindex"),__publicField(this,"hopdim"),__publicField(this,"hopstyle"),__publicField(this,"dimensions"),__publicField(this,"shapedimensions"),__publicField(this,"background"),__publicField(this,"bkdir"),__publicField(this,"bkid"),__publicField(this,"bkcroprect"),__publicField(this,"bkflags"),__publicField(this,"addCount"),__publicField(this,"sequencemask"),__publicField(this,"sequencestep"),__publicField(this,"nsequencesteps"),__publicField(this,"sequenceflags"),__publicField(this,"libSelectedRestore"),__publicField(this,"chartdirection"),__publicField(this,"copyPasteTrialVers"),__publicField(this,"taskmanagementflags"),__publicField(this,"taskdays"),__publicField(this,"forcedotted"),__publicField(this,"moreflags"),__publicField(this,"fieldmask"),__publicField(this,"CurrentTheme"),__publicField(this,"EnableSpellCheck"),__publicField(this,"rulerConfig"),__publicField(this,"Page"),__publicField(this,"commentListId"),__publicField(this,"commentId");const t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.dim={x:t,y:e},this.Type=StateConstant.StoredObjectType.SDDataObject,this.flags=OptConstant.SessionFlags.LLink|OptConstant.SessionFlags.FreeHand|OptConstant.SessionFlags.NoTreeOverlap,this.tselect=-1,this.dupdisp={x:0,y:0},this.def=new SDDefault,this.graphDef=new SDGraphDefault,this.RefCon=0,this.d_sarrow=0,this.d_sarrowdisp=!1,this.d_earrow=0,this.d_earrowdisp=!1,this.d_arrowsize=1,this.centersnapalign=!0,this.hopdimindex=1,this.hopdim={x:NvConstant.HopDimX[1],y:NvConstant.HopDimY[1]},this.hopstyle=NvConstant.HopStyle.Arc,this.dimensions=NvConstant.DimensionFlags.Total,this.shapedimensions=0,this.background=new FillData,this.background.Paint.FillType=NvConstant.FillTypes.Transparent,this.bkdir=0,this.bkid=-1,this.bkcroprect={left:0,top:0,right:0,bottom:0},this.bkflags=0,this.addCount=0,this.sequencemask=0,this.sequencestep=-1,this.nsequencesteps=0,this.sequenceflags=0,this.libSelectedRestore=void 0,this.chartdirection=0,this.copyPasteTrialVers=0,this.taskmanagementflags=0,this.taskdays=7,this.forcedotted=!1,this.moreflags=0,this.fieldmask=0,this.CurrentTheme="",this.EnableSpellCheck=!0,this.rulerConfig=new RulerConfig,this.Page=new PageSetting,this.commentListId=-1,this.commentId=-1}}__decorateClass$5([Type((()=>SDDefault))],SDData.prototype,"def",2),__decorateClass$5([Type((()=>SDGraphDefault))],SDData.prototype,"graphDef",2),__decorateClass$5([Type((()=>FillData))],SDData.prototype,"background",2),__decorateClass$5([Type((()=>RulerConfig))],SDData.prototype,"rulerConfig",2),__decorateClass$5([Type((()=>PageSetting))],SDData.prototype,"Page",2);class TextureList{constructor(){__publicField(this,"Textures"),__publicField(this,"Categories"),this.Textures=[],this.Categories=[]}}class WinSetting{constructor(){__publicField(this,"updated"),__publicField(this,"worigin"),__publicField(this,"wscale"),__publicField(this,"wscalemode"),__publicField(this,"leftpanelmode"),this.updated=0,this.worigin={x:0,y:0},this.wscale=0,this.wscalemode=0,this.leftpanelmode=0}}class WResult{constructor(){__publicField(this,"error"),__publicField(this,"coordScaleFactor"),__publicField(this,"sdp"),__publicField(this,"tLMB"),__publicField(this,"ctp"),__publicField(this,"WinSetting"),__publicField(this,"docDpi"),__publicField(this,"fontlist"),__publicField(this,"lpStyles"),__publicField(this,"UniqueMap"),__publicField(this,"zList"),__publicField(this,"links"),__publicField(this,"textlinks"),__publicField(this,"polyid"),__publicField(this,"nsegl"),__publicField(this,"arrayid"),__publicField(this,"GroupOffset"),__publicField(this,"rulerConfig"),__publicField(this,"WriteBlocks"),__publicField(this,"noTables"),__publicField(this,"WriteGroupBlock"),__publicField(this,"selectonly"),__publicField(this,"nblocks"),__publicField(this,"BlockAction"),__publicField(this,"state"),__publicField(this,"delta"),__publicField(this,"TextureList"),__publicField(this,"LibraryPathTarget"),__publicField(this,"richGradients"),__publicField(this,"KeepSegDir"),__publicField(this,"WriteWin32"),this.error=0,this.coordScaleFactor=1,this.sdp=null,this.tLMB=null,this.ctp=null,this.WinSetting=new WinSetting,this.docDpi=100,this.fontlist=[],this.lpStyles=[],this.UniqueMap=[],this.zList=[],this.links=[],this.textlinks=[],this.polyid=0,this.nsegl=0,this.arrayid=0,this.GroupOffset={x:0,y:0},this.rulerConfig=null,this.WriteBlocks=!1,this.noTables=!1,this.WriteGroupBlock=!1,this.selectonly=!1,this.nblocks=0,this.BlockAction=0,this.state=0,this.delta=0,this.TextureList=[],this.LibraryPathTarget="",this.richGradients=[],this.KeepSegDir=!1,this.WriteWin32=!1}}class BaseStateOpt{constructor(){__publicField(this,"currentStateId"),__publicField(this,"historyState"),__publicField(this,"droppedStates"),__publicField(this,"states"),this.currentStateId=-1,this.historyState=0,this.droppedStates=0,this.states=[]}PreserveState(){}SyncObjectsWithCreateStates(){}GetUndoState(){}ExceptionCleanup(){}RestorePrevState(){}RestoreNextState(){}RestoreDataStoreFromState(){}GetCurrentState(){return null}AddToCurrentState(t){}CurrentStateReplace(t,e){}CurrentStateDelete(t){}ReplaceInCurrentState(t,e){}ResetUndoStates(){this.currentStateId=-1,this.droppedStates=0,this.historyState=0,this.states=[]}ResetToSpecificState(t){}ClearFutureUndoStates(){}DumpStates(t){}}class StateBase{constructor(t,e,i,n){__publicField(this,"ID"),__publicField(this,"CreatedBy"),__publicField(this,"StateType"),__publicField(this,"IsOpen"),__publicField(this,"currentObjSeqId"),this.ID=null!=t?t:-1,this.CreatedBy=e||null,this.StateType=i||null,this.IsOpen=!1,this.currentObjSeqId=T3Gv.currentObjSeqId}}class State extends StateBase{constructor(t,e,i,n,s){super(t,e,n,s),__publicField(this,"storedObjects"),this.storedObjects=i||[]}AddStoredObject(t){if(null==t)throw new Error("Stored object is null");if(null==t.Type)throw new Error("Stored object type is null");this.storedObjects.push(Utils1.CloneBlock(t))}SetStoredObjects(t){if(null==t)throw new Error("Stored objects array is null");const e=t.map((t=>Utils1.CloneBlock(t)));this.storedObjects=e}GetStoredObjects(){return this.storedObjects.map((t=>Utils1.CloneBlock(t)))}}class StateOpt extends BaseStateOpt{constructor(){super(),__publicField(this,"maxUndo"),this.maxUndo=T3Gv.maxUndo}PreserveState(){this.SyncObjectsWithCreateStates(),this.states[this.currentStateId].IsOpen=!1}SyncObjectsWithCreateStates(){const t=StateConstant.StateOperationType,e=Utils1.CloneBlock,i=this.states[this.currentStateId],n=i.storedObjects.length;for(let s=0;s<n;++s){const n=i.storedObjects[s];if(n.stateOptTypeId===t.CREATE){const a=e(T3Gv.stdObj.GetObject(n.ID));a.stateOptTypeId=t.CREATE,i.storedObjects[s]=a}}}GetUndoState(){const t={undo:!1,redo:!1},e=this.states.length-1;return t.undo=this.currentStateId>0,t.redo=this.currentStateId<e,t}ExceptionCleanup(){this.currentStateId>0&&this.states[this.currentStateId].IsOpen&&(this.states[this.currentStateId].IsOpen=!1,T3Gv.currentObjSeqId=this.states[this.currentStateId].currentObjSeqId,this.RestoreDataStoreFromState(),this.currentStateId--,this.currentStateId<this.states.length-1&&(this.states=this.states.slice(0,this.currentStateId+1)))}RestorePrevState(){this.currentStateId>0&&(this.RestoreDataStoreFromState(),this.currentStateId--)}RestoreNextState(){this.currentStateId<this.states.length-1&&(this.currentStateId++,this.RestoreDataStoreFromState())}RestoreDataStoreFromState(){const t=StateConstant.StateOperationType,e=Utils1.CloneBlock;try{const i=this.states[this.currentStateId],n=i.storedObjects,s=n.length;for(let a=0;a<s;++a){const s=n[a];switch(s.stateOptTypeId){case t.CREATE:if(T3Gv.stdObj.GetObject(s.ID))T3Gv.stdObj.DeleteObject(s.ID,!1);else{const t=e(s);T3Gv.stdObj.SaveObject(t,!1)}break;case t.DELETE:if(T3Gv.stdObj.GetObject(s.ID))T3Gv.stdObj.DeleteObject(s.ID,!1);else{const i=e(s);i.stateOptTypeId=t.CREATE,T3Gv.stdObj.SaveObject(i,!1)}break;case t.UPDATE:const n=e(s),o=T3Gv.stdObj.GetObject(s.ID),r=e(o);o.stateOptTypeId===t.CREATE&&(r.stateOptTypeId=t.UPDATE),T3Gv.stdObj.SaveObject(n,!1),i.storedObjects[a]=r}}}catch(i){throw i}}GetCurrentState(){return this.states[this.currentStateId]}AddToCurrentState(t){const e=State,i=StateConstant.StateOperationType;let n=!0;const s=this.GetCurrentState();let a=null;if(void 0!==s&&!0===s.IsOpen){n=!1;let e=!1,a=null;if($$1.each(s.storedObjects,((i,n)=>{if(n.ID===t.ID)return e=!0,a=n,!1})),e)switch(a.stateOptTypeId){case i.CREATE:switch(t.stateOptTypeId){case i.CREATE:this.CurrentStateReplace(t,!1);break;case i.DELETE:this.CurrentStateDelete(t)}break;case i.DELETE:switch(t.stateOptTypeId){case i.CREATE:t.stateOptTypeId=i.UPDATE,this.CurrentStateReplace(t,!1);break;case i.DELETE:this.CurrentStateReplace(t,!1);break;case i.UPDATE:t.stateOptTypeId=i.UPDATE,this.CurrentStateReplace(t,!1)}break;case i.UPDATE:switch(t.stateOptTypeId){case i.CREATE:this.CurrentStateReplace(t,!1);break;case i.DELETE:this.CurrentStateReplace(t,!0)}}else s.AddStoredObject(t)}if(!0===n)if(this.currentStateId<this.states.length-1&&(this.states=this.states.slice(0,this.currentStateId+1)),this.maxUndo){a=new e(this.currentStateId+1,"T3"),a.AddStoredObject(t),this.states.push(a),this.currentStateId=a.ID;let i=this.states.length;if(i>this.maxUndo){this.states.shift(),this.currentStateId--,this.droppedStates++,i=this.states.length;for(let t=0;t<i;++t)this.states[t].ID--}}else 0===this.states.length&&(a=new e(T3Gv.state.currentStateId+1,"T3"),a.AddStoredObject(t),this.states.push(a),this.currentStateId=a.ID)}CurrentStateReplace(t,e){const i=t.ID,n=Utils1.CloneBlock;if(0!==this.states.length){const s=this.states[this.currentStateId],a=s.storedObjects.length;for(let o=0;o<a;o++)if(s.storedObjects[o].ID===i){if(e)s.storedObjects[o].stateOptTypeId=t.stateOptTypeId;else{const e=n(t);s.storedObjects[o]=e}return}}}CurrentStateDelete(t){if(0!==this.states.length){const e=this.states[this.currentStateId],i=e.storedObjects.length;for(let n=0;n<i;++n)if(e.storedObjects[n].ID===t.ID)return void e.storedObjects.splice(n,1)}}GetObjectFromState(t,e){if(this.states.length>t){const i=this.states[t],n=i.storedObjects.length;for(let t=0;t<n;t++)if(i.storedObjects[t].ID===e)return i.storedObjects[t]}}ReplaceInCurrentState(t,e){if(0===this.states.length)return;const i=this.states[this.currentStateId],n=i.storedObjects.length;for(let s=0;s<n;s++)if(i.storedObjects[s].ID===t){i.storedObjects[s].Data=Utils1.DeepCopy(e.Data);break}}ResetUndoStates(){this.currentStateId=-1,this.droppedStates=0,this.historyState=0,this.states=[]}ResetToSpecificState(t){this.currentStateId=t,this.droppedStates=0,this.historyState=0,this.states=[this.states[t]]}AddToHistoryState(){this.historyState++}ClearFutureUndoStates(){this.currentStateId<this.states.length-1&&(this.states=this.states.slice(0,this.currentStateId+1))}}class DataStore{constructor(){__publicField(this,"ID"),__publicField(this,"Type"),__publicField(this,"stateOptTypeId"),__publicField(this,"storedObjects"),__publicField(this,"Data"),__publicField(this,"Dirty"),__publicField(this,"IsPersisted"),__publicField(this,"Delete"),this.storedObjects=[]}SaveObject(t,e){if(null==t)throw new Error("storedObject is null");if(null==t.Type)throw new Error("storedObject type is null");let i=void 0===e||e;try{if(-1!==t.ID){const e=this.GetObject(t.ID);null!==e?(e.Type=t.Type,e.Data=t.Data,e.Dirty=!0,e.stateOptTypeId=t.stateOptTypeId,t=e):(t.Dirty=!0,this.storedObjects.push(t))}else t.ID=this.storedObjects.length>0?Utils1.GenerateObjectID():0,t.Data&&Utils1.IsObject(t.Data)&&(t.Data.BlockID=t.ID),this.storedObjects.push(t);return i&&T3Gv.state.AddToCurrentState(t),t.ID}catch(n){throw n}}GetObject(t){if(null==t)return null;for(let e=0;e<this.storedObjects.length;e++)if(this.storedObjects[e].ID===t)return this.storedObjects[e];return null}GetObjects(t){return null!=t?this.storedObjects.filter((e=>e.Type===t)):this.storedObjects}DeleteObject(t,e){if(null==t)throw new Error("Object ID is null");const i=void 0===e||e;let n=-1;try{if(this.storedObjects.forEach(((e,i)=>{if(e.ID===t)return n=i,!1})),n>=0){const e=this.GetObject(t);e.stateOptTypeId=StateConstant.StateOperationType.DELETE,i&&T3Gv.state.AddToCurrentState(e),this.storedObjects.splice(n,1)}}catch(s){throw s}}PreserveBlock(t){return new DataObj(t,null,null,null,null,!0)}CreateBlock(t,e){return new DataObj(-1,t,e,!0,!0,!0)}SetStoredObjects(t){if(null==t)throw new Error("Stored objects is null");if(!(t instanceof Array))throw new Error("Stored objects is not an array");this.storedObjects=t}}class DataStoreFactory{Create(t){let e=new DataStore;return Array.isArray(t)&&(e.storedObjects=t),{Set:function(t){if(null===t)throw new Error("Stored objects cannot be null");if(!Array.isArray(t))throw new Error("Stored objects is not an array");e.storedObjects=t},Get:function(){return e.storedObjects},Clear:function(){e.storedObjects=[]}}}}class TEData{constructor(){__publicField(this,"Type"),__publicField(this,"theActiveTextEditObjectID"),__publicField(this,"theTEWasResized"),__publicField(this,"theTEWasEdited"),__publicField(this,"theTELastOp"),__publicField(this,"theActiveTableObjectID"),__publicField(this,"theActiveTableObjectIndex"),__publicField(this,"theActiveOutlineObjectID"),__publicField(this,"theActiveGraphObjectID"),__publicField(this,"EditorID"),this.Type=StateConstant.StoredObjectType.TDataObject,this.theActiveTextEditObjectID=-1,this.theTEWasResized=!1,this.theTEWasEdited=!1,this.theTELastOp=NvConstant.TextElemLastOpt.Init,this.theActiveTableObjectID=-1,this.theActiveTableObjectIndex=-1,this.theActiveOutlineObjectID=-1,this.theActiveGraphObjectID=-1,this.EditorID=0}}class DataOpt{static InitStoredData(){this.InitClipboard(),this.InitState(),this.InitDataStore(),this.InitCurrentSequenceId()}static InitClipboard(){}static InitState(){const t=this.LoadData(this.STATE_KEY);if(null===t)return;const e=plainToInstance(StateOpt,t);for(let i=0;i<e.states.length;i++){const t=plainToInstance(State,e.states[i]);for(let e=0;e<t.storedObjects.length;e++){const i=this.ConvertStoredObject(t.storedObjects[e]);t.storedObjects[e]=i}e.states[i]=t}T3Gv.state=e}static InitDataStore(){const t=this.LoadData(this.OBJECT_STORE_KEY);if(null===t)return;const e=plainToInstance(DataStore,t);for(let i=0;i<e.storedObjects.length;i++){const t=this.ConvertStoredObject(e.storedObjects[i]);e.storedObjects[i]=t}T3Gv.stdObj=e}static InitCurrentSequenceId(){const t=this.LoadData(this.CURRENT_OBJECT_SEQ_ID_KEY);null!==t&&(T3Gv.currentObjSeqId=t)}static ConvertStoredObject(t){const e=plainToInstance(DataObj,t),i=e.Data;if("SDData"===i.Type){const t=plainToInstance(SDData,i);e.Data=t}if("LayersManager"===i.Type){const t=plainToInstance(LayersManager,i);e.Data=t}if("TEData"===i.Type){const t=plainToInstance(TEData,i);e.Data=t}if("BaseDrawObject"===i.Type){if(1===i.DrawingObjectBaseClass)if("PolyLineContainer"===(null==i?void 0:i.T3Type)){const t=plainToInstance(Instance.Shape.PolyLineContainer,i);e.Data=t}else{const t=i.LineType;if(t==OptConstant.LineType.LINE){const t=plainToInstance(Instance.Shape.Line,i);e.Data=t}if(t==OptConstant.LineType.ARCLINE){const t=plainToInstance(Instance.Shape.ArcLine,i);e.Data=t}if(t==OptConstant.LineType.SEGLINE){const t=plainToInstance(Instance.Shape.SegmentedLine,i);e.Data=t}if(t==OptConstant.LineType.ARCSEGLINE){const t=plainToInstance(Instance.Shape.ArcSegmentedLine,i);e.Data=t}if(t==OptConstant.LineType.POLYLINE){const t=plainToInstance(Instance.Shape.PolyLine,i);e.Data=t}if(t==OptConstant.LineType.FREEHAND){const t=plainToInstance(Instance.Shape.FreehandLine,i);e.Data=t}}if(0===i.DrawingObjectBaseClass){if("Oval"===i.ShapeType){const t=plainToInstance(Instance.Shape.Oval,i);e.Data=t}if("Rect"===i.ShapeType){const t=plainToInstance(Instance.Shape.Rect,i);e.Data=t}if("Polygon"===i.ShapeType){const t=plainToInstance(Instance.Shape.Polygon,i);e.Data=t}if("GroupSymbol"===i.ShapeType){const t=plainToInstance(Instance.Shape.GroupSymbol,i);e.Data=t}if("SvgSymbol"===i.ShapeType){const t=plainToInstance(Instance.Shape.SvgSymbol,i);e.Data=t}if("ForeignObject"===i.ShapeType){const t=plainToInstance(Instance.Shape.ForeignObject,i);e.Data=t}}if(3===i.DrawingObjectBaseClass){const t=plainToInstance(Instance.Shape.Connector,i);e.Data=t}}return e}static ConvertPlanObjectToShape(t){let e;if("BaseDrawObject"===t.Type){if(1===t.DrawingObjectBaseClass)if("PolyLineContainer"===(null==t?void 0:t.T3Type)){e=plainToInstance(Instance.Shape.PolyLineContainer,t)}else{const i=t.LineType;if(i==OptConstant.LineType.LINE){e=plainToInstance(Instance.Shape.Line,t)}if(i==OptConstant.LineType.ARCLINE){e=plainToInstance(Instance.Shape.ArcLine,t)}if(i==OptConstant.LineType.SEGLINE){e=plainToInstance(Instance.Shape.SegmentedLine,t)}if(i==OptConstant.LineType.ARCSEGLINE){e=plainToInstance(Instance.Shape.ArcSegmentedLine,t)}if(i==OptConstant.LineType.POLYLINE){e=plainToInstance(Instance.Shape.PolyLine,t)}if(i==OptConstant.LineType.FREEHAND){e=plainToInstance(Instance.Shape.FreehandLine,t)}}if(0===t.DrawingObjectBaseClass){if("Oval"===t.ShapeType){e=plainToInstance(Instance.Shape.Oval,t)}if("Rect"===t.ShapeType){e=plainToInstance(Instance.Shape.Rect,t)}if("Polygon"===t.ShapeType){e=plainToInstance(Instance.Shape.Polygon,t)}if("GroupSymbol"===t.ShapeType){e=plainToInstance(Instance.Shape.GroupSymbol,t)}if("SvgSymbol"===t.ShapeType){e=plainToInstance(Instance.Shape.SvgSymbol,t)}if("ForeignObject"===t.ShapeType){e=plainToInstance(Instance.Shape.ForeignObject,t)}}if(3===t.DrawingObjectBaseClass){e=plainToInstance(Instance.Shape.Connector,t)}}return e}static SaveToLocalStorage(){LayerUtil.VisibleZList(),this.SaveData(this.CLIPBOARD_KEY,T3Gv.clipboard),this.SaveData(this.STATE_KEY,T3Gv.state),this.SaveData(this.OBJECT_STORE_KEY,T3Gv.stdObj),this.SaveData(this.CURRENT_OBJECT_SEQ_ID_KEY,T3Gv.currentObjSeqId),this.SaveDocSettingData(),this.SaveAppStateV2()}static SaveDocSettingData(){const t={docConfig:T3Gv.docUtil.docConfig,rulerConfig:T3Gv.docUtil.rulerConfig,docInfo:T3Gv.docUtil.svgDoc.docInfo};this.SaveData(this.DOC_INFO_KEY,t)}static LoadDocSettingData(){return this.LoadData(this.DOC_INFO_KEY)}static PrepareSaveData(){const t=lodash.exports.cloneDeep(toRaw(appStateV2.value));return t.selectedTargets=[],t.elementGuidelines=[],t.rulersGridVisible=rulersGridVisible.value,t}static SaveToT3000(){const t=this.PrepareSaveData();if(isBuiltInEdge.value)Hvac.WebClient.SaveGraphicData(null,null,t);else{if(globalMsg.value.find((t=>"get_initial_data"===t.msgType)))return;const e=Hvac.DeviceOpt.getCurrentDevice(),i=null==e?void 0:e.deviceId,n=null==e?void 0:e.graphic;i&&n&&Hvac.WsClient.SaveGraphic(i,n,t)}}static LoadData(t){const e=localStorage.getItem(t);return e?JSON.parse(e):null}static SaveData(t,e){e&&localStorage.setItem(t,JSON.stringify(e))}static SaveDataWithoutStringify(t,e){e&&localStorage.setItem(t,e)}static InitStateAndStore(){T3Gv.state=new StateOpt,T3Gv.stdObj=new DataStore,T3Gv.currentObjSeqId=0,T3Gv.clipboard=(new DataStoreFactory).Create()}static SaveAppStateV2(){const t=appStateV2.value;this.SaveData(this.APP_STATE_V2,t)}static repairDuplicateIds(t){var e;if(!t||!Array.isArray(t.items)||0===t.items.length)return;const i=new Set;let n=t.items.reduce(((t,e)=>{var i;return Math.max(t,null!=(i=e.id)?i:0)}),0);for(const s of t.items)i.has(s.id)?(n++,s.id=n):i.add(s.id);n>(null!=(e=t.itemsCount)?e:0)&&(t.itemsCount=n)}static LoadAppStateV2(){const t=this.LoadData(this.APP_STATE_V2);t&&(this.repairDuplicateIds(t),appStateV2.value=t)}static ClearT3LocalStorage(){localStorage.removeItem(this.CLIPBOARD_KEY),localStorage.removeItem(this.STATE_KEY),localStorage.removeItem(this.OBJECT_STORE_KEY),localStorage.removeItem(this.CURRENT_OBJECT_SEQ_ID_KEY),localStorage.removeItem(this.APP_STATE_V2),localStorage.removeItem(this.DRAW_KEY),localStorage.removeItem(this.DOC_INFO_KEY)}static LoadT3Config(){return this.LoadData(this.GLOBAL_CONFIG_KEY)||{}}static SaveT3Config(t){this.SaveData(this.GLOBAL_CONFIG_KEY,t)}static LoadT3Library(){return this.LoadData(this.LIBRARY_KEY)||[]}static SaveT3Library(t){this.SaveDataWithoutStringify(this.LIBRARY_KEY,t)}static GetSDDataDimensions(){const t=this.LoadData(this.OBJECT_STORE_KEY);if(null===t)return{x:0,y:0};const e=[];if(t.storedObjects&&Array.isArray(t.storedObjects))for(let i=0;i<t.storedObjects.length;i++){const n=t.storedObjects[i];n.Data&&"SDData"===n.Data.Type&&n.Data.dim&&"number"==typeof n.Data.dim.x&&"number"==typeof n.Data.dim.y&&e.push({x:n.Data.dim.x,y:n.Data.dim.y})}return e.reduce(((t,e)=>({x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)})),{x:0,y:0})}static SaveGrpSwitch(t){let e=this.LoadData(this.GRP_SWITCH_KEY)||[];Array.isArray(e)||(e=[]),e.push(t),this.SaveData(this.GRP_SWITCH_KEY,e)}static LoadGrpSwitch(){const t=this.LoadData(this.GRP_SWITCH_KEY);return Array.isArray(t)&&t.length>0?t[t.length-1]:null}static RemoveLatestGrpSwitch(){let t=this.LoadData(this.GRP_SWITCH_KEY)||[];if(!Array.isArray(t)||0===t.length)return null;const e=t.pop();return this.SaveData(this.GRP_SWITCH_KEY,t),e}static ClearGrpSwitch(){localStorage.removeItem(this.GRP_SWITCH_KEY)}}__publicField(DataOpt,"CLIPBOARD_KEY","t3.clipboard"),__publicField(DataOpt,"STATE_KEY","t3.state"),__publicField(DataOpt,"OBJECT_STORE_KEY","t3.dataStore"),__publicField(DataOpt,"CURRENT_OBJECT_SEQ_ID_KEY","t3.currentObjSeqId"),__publicField(DataOpt,"APP_STATE_V2","t3.stateV2"),__publicField(DataOpt,"DRAW_KEY","t3.draw"),__publicField(DataOpt,"DOC_INFO_KEY","t3.doc"),__publicField(DataOpt,"GLOBAL_CONFIG_KEY","t3.config"),__publicField(DataOpt,"LIBRARY_KEY","t3.library"),__publicField(DataOpt,"GRP_SWITCH_KEY","t3.grpSwitch");class T3Util{static Log(t,...e){"prd"!==HvConstant.Default.Environment.toLowerCase()&&(null==e||e.length)}static Debug(t,...e){"prd"!==HvConstant.Default.Environment.toLowerCase()&&(null==e||e.length)}static Error(t,...e){null==e||e.length}}const _ShapeUtil=class{static LineIsReversed(t,e,i){if(null==t)return!1;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line)switch(t.LineType){case OptConstant.LineType.ARCLINE:case OptConstant.LineType.LINE:if(Math.abs(t.EndPoint.x-t.StartPoint.x)<.01)return t.EndPoint.y<t.StartPoint.y;const n=Utils2.Pt2Rect(t.EndPoint,t.StartPoint);if(Math.abs(t.EndPoint.x-n.x)<.01&&Math.abs(t.EndPoint.y-n.y)<.01||Math.abs(t.EndPoint.x-n.x)<.01&&Math.abs(t.EndPoint.y-(n.y+n.height))<.01)return!0;break;case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:if(i)break;if(e&&e.KeepSegDir)return!1;if(Math.abs(t.StartPoint.x-t.EndPoint.x)<=1){if(t.StartPoint.y>t.EndPoint.y)return!0}else if(t.StartPoint.x>t.EndPoint.x)return!0}return!1}static TextAlignToWin(t){const e={just:TextConstant.TextJust.Center,vjust:TextConstant.TextJust.Center};switch(t){case TextConstant.TextAlign.Left:e.just=TextConstant.TextJust.Left;break;case TextConstant.TextAlign.Right:e.just=TextConstant.TextJust.Right;break;case TextConstant.TextAlign.TopLeft:e.just=TextConstant.TextJust.Left,e.vjust=TextConstant.TextJust.Top;break;case TextConstant.TextAlign.TopCenter:e.vjust=TextConstant.TextJust.Top;break;case TextConstant.TextAlign.TopRight:e.just=TextConstant.TextJust.Right,e.vjust=TextConstant.TextJust.Top;break;case TextConstant.TextAlign.BottomLeft:e.just=TextConstant.TextJust.Left,e.vjust=TextConstant.TextJust.Bottom;break;case TextConstant.TextAlign.BottomCenter:e.vjust=TextConstant.TextJust.Bottom;break;case TextConstant.TextAlign.BottomRight:e.just=TextConstant.TextJust.Right,e.vjust=TextConstant.TextJust.Bottom}return e}static ToSDWinCoords(t,e){return e>1?Math.round(e*t):t}static GetLineText(t,e,i,n){let s,a,o=-1;for(a=t.lineswithtext.length,s=0;s<a;s++)if(e===t.lineswithtext[s].x&&(!i||i===t.lineswithtext[s].z))return o=t.lineswithtext[s].y,n&&(n.TextGrow=t.lineswithtext[s].TextGrow,n.TextWrapWidth=t.lineswithtext[s].TextWrapWidth,n.TextAlign=t.lineswithtext[s].TextAlign,n.just=t.lineswithtext[s].just,n.vjust=t.lineswithtext[s].vjust,n.Paint=t.lineswithtext[s].Paint),t.lineswithtext.splice(s,1),o;return-1}static ReadSymbolFromBuffer(t,e,i,n,s,a,o,r,l,h,c,u,d,p){let g,f,b,v,m,y,S,w,x,C=!1,D=new _ShapeUtil.Result,T=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),k=[];D.isTemplate=!1,D.IgnoreHeader=!0,D.sdp=new SDData,D.sdp.def.style=Utils1.DeepCopy(T.def.style),D.isSymbol=0!==p,D.tLMB=new LayersManager,D.AllowAddEMFHash=u,_ShapeUtil.FragmentLoad_RefCount=0,c&&(0==(c.ObjectAttributeFlags&DSConstant.LibraryFlags.SEDL_NoColor)&&(D.SetColorChanges=!0,D.ColorFilter=c.ColorFilter),C=!0),h&&(D.NoTextBlocks=!0),null!=e&&(D.SymbolPosition.x=e),null!=i&&(D.SymbolPosition.y=i);let $=_ShapeUtil.ReadBuffer(t,D,n,!1,_ShapeUtil.ReadSymbolFromBufferComplete);if($&&$!=_ShapeUtil.Errors.WaitingForCallBack)return s?D.error:$;if(D.WarnMeta){if(s)return _ShapeUtil.Errors.WarnMeta;LogUtil.Debug("Metafile not read")}if(d&&$!==_ShapeUtil.Errors.WaitingForCallBack&&(d.x=D.sdp.dim.x,d.y=D.sdp.dim.y),$!==_ShapeUtil.Errors.WaitingForCallBack){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0);for(g=D.zList.length,f=0;f<g;f++){let e;v=ObjectUtil$1.GetObjectPtr(D.zList[f],!1),e=t.layers[t.activelayer].zList,v.Layer=t.activelayer,e.push(D.zList[f]),ObjectUtil$1.AddToDirtyList(D.zList[f]),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&o.selectedList.push(D.zList[f]),null==D.STData&&(v.datasetTableID=-1,v.datasetElemID=-1,v.datasetID=-1,v.datasetType=-1,v.dataStyleOverride=null)}if(k.length&&ObjectUtil$1.DeleteObjects(k),D.STData&&T3Gv.opt.STData_Transfer&&T3Gv.opt.STData_Transfer(D.zList,D.STData,C),b=D.links.length,!l&&b>0){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);for(f=0;f<b;f++)t.push(D.links[f]);t.sort((function(t,e){return t.targetid-e.targetid}))}let n=0;for(f=0;f<g;f++)v=ObjectUtil$1.GetObjectPtr(D.zList[f],!1),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&(0===n?m=new Rectangle(v.r.x,v.r.y,v.r.width,v.r.height):Utils2.UnionRect(v.r,m,m),n++);if(m){if(r?T3Gv.opt.header.ClipboardType!==T3Constant.ClipboardType.LM?(y=m.x<0?-m.x:0,S=m.y<0?-m.y:0,y+=20,S+=20):(y=e-m.x,S=i-m.y):(y=0,S=0),LogUtil.Debug("= u.ShapeUtil: ReadSymbolFromBuffer/ offsetX:",y,"offsetY:",S,"PositionX:",e,"PositionY:",i,"clipboardType:",T3Gv.opt.header.ClipboardType),y||S)for(f=0;f<g;f++)v=ObjectUtil$1.GetObjectPtr(D.zList[f],!1),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&v.OffsetShape(y,S);if(r){m.x+=y,m.y+=S,y=0,S=0,w=0,x=0;const t={x:T.dim.x,y:T.dim.y};if(m.x+m.width>T.dim.x&&(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto?(y=m.x+m.width-T.dim.x,w=0):(w=m.x+m.width,T.dim.x=w)),m.y+m.height>T.dim.y&&(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto?S=m.y+m.height-T.dim.y:(x=m.y+m.height,T.dim.y=x)),w||x){const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.nlayers;let n=!1,s=!1;for(e.layers[e.activelayer].flags&NvConstant.LayerFlags.UseEdges&&(n=!0),f=0;f<i;f++)if(e.layers[f].flags&NvConstant.LayerFlags.UseEdges&&e.layers[f].flags&NvConstant.LayerFlags.Visible||n){s=!0;break}s&&T3Gv.opt.UpdateEdgeLayers([],t,T.dim),T3Gv.docUtil.ResizeDocument(T.dim.x,T.dim.y)}else if(y||S)for(f=0;f<g;f++)v=ObjectUtil$1.GetObjectPtr(D.zList[f],!1),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&v.OffsetShape(-y,-S)}}return!l&&r&&T3Gv.opt.UpdateLinks(),a?SvgUtil.RenderDirtySVGObjects():1===g&&T3Gv.opt.RenderDirtySVGObjectsNoSetMouse(),D.error}}static ReadBuffer(t,e,i,n,s){let a=null;try{if("string"==typeof t)if(t.startsWith("t3.draw")){const e=localStorage.getItem(t);e&&(a=JSON.parse(e))}else a=JSON.parse(t);else"object"==typeof t&&(a=t)}catch(o){return T3Util.Error("= u.ShapeUtil: ReadBuffer/ Error parsing JSON data:",o),e.error=_ShapeUtil.Errors.UnknownFile,e.error}return a&&a.signature&&a.signature===_ShapeUtil.Signature?(e.PVersion=a.version,e.FVersion=a.version,e.coordScaleFactor=1,e.updatetext=!0,a.rulerConfig&&(e.rulerConfig=a.rulerConfig),a.isBlockFormat&&(e.ReadBlocks=!0),s&&e.ValidateHashesAsync?_ShapeUtil.Errors.WaitingForCallBack:(_ShapeUtil.ReadSymbolFromBufferComplete(a,e,n),e.error)):(e.error=_ShapeUtil.Errors.UnknownFile,e.error)}static ReadSymbolFromBufferComplete(t,e,i){try{OptConstant.Common.DimMax;const n=OptConstant.ConnectorDefines.NSkip;let s,a,o,r,l,h,c,u;for(t.data&&t.data.header&&"fullDocument"===t.data.header.type&&(t.data.header.panelName&&(T3Gv.opt.header.panelName=t.data.header.panelName),t.data.header.importSourcePath&&(T3Gv.opt.header.importSourcePath=t.data.header.importSourcePath)),t.data&&t.data.structuredData&&(e.STData=t.data.structuredData),t.data&&t.data.drawing&&(t.data.drawing.styles&&t.data.drawing.styles.length>0&&(e.lpStyles=t.data.drawing.styles.map((t=>new QuickStyle(t)))),t.data.drawing.layers&&t.data.drawing.layers.length>0&&(e.tLMB.layers=t.data.drawing.layers,e.tLMB.nlayers=t.data.drawing.layers.length,e.tLMB.activelayer=t.data.drawing.activeLayer||0),t.data.drawing.objects&&t.data.drawing.objects.length>0&&t.data.drawing.objects.forEach((t=>{const i=DataOpt.ConvertPlanObjectToShape(t),n=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.BaseDrawObject,i);n.Data=Utils1.DeepCopy(n.Data),e.zList.push(n.ID),e.IDMap[t.UniqueID]=n.ID}))),0===e.error&&e.links&&e.links.length>0&&_ShapeUtil.ReMapLinks(e.IDMap,e.links,e,i),s=e.zList.length,a=0;a<s;a++){if(r=e.zList[a],l=ObjectUtil$1.GetObjectPtr(r,!1),!l)continue;l.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Texture&&void 0===l.StyleRecord.Fill.Paint.Texture&&(l.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent);let t=l.DrawingObjectBaseClass;switch(t===OptConstant.DrawObjectBaseClass.Line&&l.LineType===OptConstant.LineType.POLYLINE&&l.polylist&&l.polylist.closed&&(t=OptConstant.DrawObjectBaseClass.Shape),t){case OptConstant.DrawObjectBaseClass.Line:switch(l.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:const t={x:l.Frame.x,y:l.Frame.y};(t.x<0||t.y<0)&&l.SetShapeOrigin(3e4,3e4),l.SegLFormat(l.EndPoint,OptConstant.ActionTriggerType.SeglPreserve,0),l.CalcFrame(),(t.x<0||t.y<0)&&l.SetShapeOrigin(t.x,t.y)}break;case OptConstant.DrawObjectBaseClass.Connector:if(0===l.hooks.length&&l.arraylist&&l.arraylist.hook){if(h=l.arraylist.hook.length,c=h-n,c<0&&(c=0),h>=n)for(o=1;o<n;o++)l.arraylist.hook[o].id>=0&&c++;0===c&&e.DeleteList.push(r)}break;case OptConstant.DrawObjectBaseClass.Shape:if(l.StyleRecord.Line.BThick&&l.polylist&&l.polylist.closed&&l.polylist.segs&&l.polylist.segs.length){let t,e=[];const i=l.StyleRecord.Line.Thickness/2;if(l instanceof Instance.Shape.Polygon&&r.polylist){const e={Frame:l.Frame,inside:l.inside};t=new Instance.Shape.PolyLine(e),t.polylist=l.polylist,t.StartPoint=l.StartPoint,t.EndPoint=l.EndPoint}else t=l;const n=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,e);let s=[];if(e.length>0)for(s.push(new Point$1(n[0].x,n[0].y)),o=0;o<e.length;o++)s.push(new Point$1(n[e[o]].x,n[e[o]].y));else s=Utils1.DeepCopy(n);const a=T3Gv.opt.InflateLine(s,i,!0,!0);if(!a||0===a.length)break;l.StartPoint.x=a[0].x,l.StartPoint.y=a[0].y,l.EndPoint.x=a[a.length-1].x,l.EndPoint.y=a[a.length-1].y;const h=Utils1.DeepCopy(l.polylist.segs);for(l.polylist.segs=[],o=0;o<n.length;o++)l.polylist.segs.push(new PolySeg(1,a[o].x-l.StartPoint.x,a[o].y-l.StartPoint.y)),o<h.length&&(l.polylist.segs[o].LineType=h[o].LineType,l.polylist.segs[o].ShortRef=h[o].ShortRef,l.polylist.segs[o].dataclass=h[o].dataclass,l.polylist.segs[o].dimDeflection=h[o].dimDeflection,l.polylist.segs[o].flags=h[o].flags,l.polylist.segs[o].param=h[o].param,l.polylist.segs[o].weight=h[o].weight);if(l instanceof Instance.Shape.BaseLine)l.CalcFrame();else if(l instanceof Instance.Shape.Polygon&&l.polylist){const t=l.StyleRecord.Line.BThick;let e=l.Frame.width;e<=0&&(e=1);const i=(e+2*t)/e;let n=l.Frame.height;n<=0&&(n=1);const s=(n+2*t)/n,a=-(l.Frame.x*i-l.Frame.x+t),o=-(l.Frame.y*s-l.Frame.y+t);l.ScaleObject(a,o,null,0,i,s,!1),T3Gv.opt.CalcPolyVertices(l)}}else(e.AddEMFHash||e.isTemplate||e.isSymbol)&&l.UpdateFrame(l.Frame)}l.DataID>=0&&e.updatetext&&(SvgUtil.AddSVGObject(null,r,!0,!1),TextUtil.TextResizeCommon(r,!1,!0),u=T3Gv.opt.svgObjectLayer.GetElementById(r),u&&T3Gv.opt.svgObjectLayer.RemoveElement(u))}return e.error}catch(n){return T3Util.Error("= u.ShapeUtil: ReadSymbolFromBufferComplete/ Error processing JSON data:",n),e.error=_ShapeUtil.Errors.BadFormat,e.error}}static ReMapLinks(t,e,i,n){let s,a,o,r,l,h,c,u=[],d=DSConstant.LinkFlags.Move,p=OptConstant.ConnectorDefines.NSkip,g={};for(s=t.length,a=e.length-1;a>=0;a--)(t[e[a].hookid]<0||t[e[a].targetid]<0)&&e.splice(a,1);for(let f=0;f<s;f++)if(t[f]){if(r=t[f],o=ObjectUtil$1.GetObjectPtr(r,!1),o&&o.hooks)for(l=o.hooks.length,h=l-1;h>=0;h--)t[o.hooks[h].objid]&&t[o.hooks[h].objid]>0?(o.hooks[h].objid=t[o.hooks[h].objid],0!==e.length||n||(null==c&&(c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0)),T3Gv.opt.InsertLink(c,r,h,DSConstant.LinkFlags.Move))):(o.hooks.splice(h,1),o.moreflags=Utils2.SetFlag(o.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!1));if(o&&o.associd>=0&&(t[o.associd]&&t[o.associd]>0?o.associd=t[o.associd]:o.associd=-1),o&&o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&o.arraylist){l=o.arraylist.hook.length;let e=o.arraylist.styleflags&OptConstant.AStyles.Linear;if(p=OptConstant.ConnectorDefines.NSkip,e)for(h=l-1;h>p;h--)o.arraylist.hook[h].textid=o.arraylist.hook[h-1].textid,o.arraylist.hook[h-1].textid=-1;for(h=0;h<l;h++)65535===o.arraylist.hook[h].id?o.arraylist.hook[h].id=-1:o.arraylist.hook[h].id>=0&&(o.arraylist.hook[h].id=t[o.arraylist.hook[h].id]),o.arraylist.hook[h].textid>=0&&(i.ReadBlocks||i.ReadGroupBlock||(o.arraylist.hook[h].textid=_ShapeUtil.GetLineText(i,f,o.arraylist.hook[h].textid,g),g.Paint&&(o.StyleRecord.Fill.Paint=g.Paint)));n||(u.push(o),o.flags=Utils2.SetFlag(o.flags,NvConstant.ObjFlags.Obj1,!0))}if(o&&o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&o.ContainerList){l=o.ContainerList.List.length;const e=o.ContainerList.List;for(h=0;h<l;h++)null==e[h].id&&(e[h].id=-1),e[h].id>=0&&(e[h].id=t[e[h].id])}}for(a=0;a<e.length;a++)e[a].targetid=t[e[a].targetid],e[a].hookid=t[e[a].hookid],e[a].flags=d;if(e.sort((function(t,e){return t.targetid-e.targetid})),!n){const t=u.length;for(a=0;a<t;a++)o=u[a],l=o.arraylist.hook.length,l<p&&o.PrFormat(o.BlockID)}}static TextAlignToJust(t){var e={just:"center",vjust:"middle"};switch(t){case TextConstant.TextAlign.Left:e.just="left";break;case TextConstant.TextAlign.Right:e.just="right";break;case TextConstant.TextAlign.TopLeft:e.just="left",e.vjust="top";break;case TextConstant.TextAlign.TopCenter:e.vjust="top";break;case TextConstant.TextAlign.TopRight:e.just="right",e.vjust="top";break;case TextConstant.TextAlign.BottomLeft:e.just="left",e.vjust="bottom";break;case TextConstant.TextAlign.BottomCenter:e.vjust="bottom";break;case TextConstant.TextAlign.BottomRight:e.just="right",e.vjust="bottom"}return e}static WriteSelect(t,e,i,n,s){const a=new WResult;return a.sdp=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),a.tLMB=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),a.ctp=T3Gv.opt.header,a.selectonly=!0,n&&(a.KeepSegDir=!0),T3Gv.docUtil.svgDoc.GetWorkArea(),a.docDpi=T3Gv.docUtil.svgDoc.docInfo.docDpi,a.zList=t,a.noTables=e,a.richGradients=T3Gv.opt.richGradients,LayerUtil.UpdateObjectLayerIndices(a),LogUtil.Debug("= U.ShapeUtil WriteSelect result=",a),_ShapeUtil.WriteBuffer(a,!0,!0,s)}static WriteBuffer(t,e,i,n){try{const n={signature:_ShapeUtil.Signature,version:t.WriteWin32?_ShapeUtil.FVERSION2015:T3Gv.opt.FileVersion,platform:"JSON",timestamp:(new Date).getTime(),isSelectOnly:e,data:{}};t.coordScaleFactor=t.WriteWin32?_ShapeUtil.DRAWRES/T3Gv.docUtil.svgDoc.docInfo.docDpi:1,n.rulerConfig={...T3Gv.docUtil.rulerConfig,show:T3Gv.docUtil.docConfig.showRulers},t.rulerConfig=n.rulerConfig,n.data.header=e?{type:"selectOnly"}:{type:"fullDocument",panelName:T3Gv.opt.header.panelName,importSourcePath:T3Gv.opt.header.importSourcePath,BusinessModule:T3Gv.opt.header.BusinessModule,SymbolSearchString:T3Gv.opt.header.SymbolSearchString,orgcharttable:T3Gv.opt.header.orgcharttable,lpName:T3Gv.opt.header.lpName,ParentPageID:T3Gv.opt.header.ParentPageID};const s={objects:[],styles:[],layers:[]};_ShapeUtil.BuildStyleList(t),s.styles=t.lpStyles.map((t=>JSON.parse(JSON.stringify(t)))),t.tLMB&&t.tLMB.layers&&(s.layers=t.tLMB.layers.map((t=>({name:t.name,flags:t.flags,layertype:t.layertype,zList:t.zList?[...t.zList]:[]}))),s.activeLayer=t.tLMB.activelayer);const a=t.zList.length;for(let e=0;e<a;e++){const i=t.zList[e],n=ObjectUtil$1.GetObjectPtr(i,!1);if(n){const t=JSON.parse(JSON.stringify(n));if(n.DataID>0){const e=ObjectUtil$1.GetObjectPtr(n.DataID,!1);e&&(t.textContent=e.runtimeText||"")}s.objects.push(t)}}n.data.drawing=s;const o=JSON.stringify(n),r="t3.draw";return localStorage.setItem(r,o),e||i?o:r}catch(s){return T3Util.Error("= u.ShapeUtil: WriteBuffer/ Error serializing drawing to JSON:",s),null}}static BuildStyleList(t){let e,i,n,s,a,o,r,l;function h(e){let i,n,s;for(n=t.lpStyles.length,i=0;i<n;i++)if(e.Name===t.lpStyles[i].Name)return i;return s=Utils1.DeepCopy(e),t.lpStyles.push(s),n}e=t.zList.length;const c=new QuickStyle,u=Utils1.DeepCopy(c),d=Utils1.DeepCopy(c);for(null==c.Line&&(u.Line=Utils1.DeepCopy(c.Border),d.Line=Utils1.DeepCopy(c.Border)),u.Line.Thickness=0,u.Fill.Paint.FillType=NvConstant.FillTypes.Solid,u.Fill.Paint.Color=t.sdp.background.Paint.Color,a=0,s=0;s<e;s++){i=ObjectUtil$1.GetObjectPtr(t.zList[s],!1),i.tstyleindex=h(i.StyleRecord),t.UniqueMap.push(t.zList[s]),a++,(i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line||i.TextFlags&NvConstant.TextFlags.AttachB||i.TextFlags&NvConstant.TextFlags.AttachA)&&i.DataID>0&&(t.UniqueMap.push(-i.DataID),a++,null==t.TextStyleIndex&&(t.TextStyleIndex=h(u)),o=new Link(a-1,a,null),t.textlinks.push(o));const e=i.GetTextIDs();for(n=e.length,r=a,l=0;l<n;l++)t.UniqueMap.push(-e[l]),a++,null==t.TextStyleIndex&&(t.TextStyleIndex=h(u)),o=new Link(r,a,null),t.textlinks.push(o)}}static PointSizeToFontSize(t){return t*T3Gv.opt.svgDoc.GetWorkArea().docDpi/72}};let ShapeUtil=_ShapeUtil;__publicField(ShapeUtil,"Result",(function(){this.error=0,this.ConvertOnSave=!1,this.isTemplate=!1,this.isSymbol=!1,this.IgnoreHeader=!1,this.PVersion=0,this.FVersion=0,this.coordScaleFactor=1,this.sdp=null,this.GroupOffset={x:0,y:0},this.ReadingGroup=!1,this.WinSetting=new WinSetting,this.DefTStyle={},this.DefRun={},this.DefFSize=10,this.DefLine={},this.DefBorder={},this.DefFill={},this.fontlist=[],this.zList=[],this.lpStyles=[],this.links=[],this.IDMap=[],this.textids=[],this.usedtextids=[],this.noteids=[],this.usednoteids=[],this.nativeids=[],this.imageids=[],this.usedimageids=[],this.tableids=[],this.usedtableids=[],this.graphids=[],this.usedgraphids=[],this.expandedviewids=[],this.usedexpandedviewids=[],this.Threads=[],this.ThreadIDs=[],this.objectcount=0,this.textonline=-1,this.textonlineid=-1,this.lineswithtext=[],this.SymbolPosition={x:100,y:100},this.SetSymbolOrigin=!1,this.WarnMeta=!1,this.gHash=null,this.AddEMFHash=!1,this.AllowAddEMFHash=!1,this.ValidateHashesAsync=!1,this.shapetoolindex=null,this.linetoolindex=null,this.swimlaneformat=null,this.autocontainer=null,this.actascontainer=null,this.swimlanenlanes=null,this.swimlanenvlanes=null,this.swimlanerotate=null,this.swimlanetitle=null,this.collapsetools=null,this.TextureList=new TextureList,this.NoTextBlocks=!1,this.ReadBlocks=!1,this.ReadGroupBlock=!1,this.tLMB=null,this.BlockzList=[],this.DeleteList=[],this.richGradients=[],this.hasBlockDirectory=!1,this.updatetext=!1,this.LibraryPathTarget="",this.SetColorChanges=!1,this.ColorFilter=0,this.HashRecords=[],this.PaperType="letter",this.ReadTexture=-1,this.STData=null,this.FromWindows=!1,this.SearchLibs=[],this.CurrentSymbol=null,this.SearchResults=[],this.LoadBlockList=!1,this.PaletteStatus={}})),__publicField(ShapeUtil,"Errors",{WaitingForCallBack:-2,WarnMeta:9,BadFormat:3,UnknownFile:1,Version:2}),__publicField(ShapeUtil,"Signature","00000000");class ShapeConstant{}__publicField(ShapeConstant,"ObjectTypes",{Shape:0,LineD:1,SegL:2,Array:3,PolyL:4,Nurbs:501,NurbsSeg:502,Ellipse:503,EllipseEnd:504,Quadbez:505,QuadbezCon:506,Cubebez:507,CubebezCon:508,Spline:509,SplineCon:510,MoveTo:600,MoveToNewPoly:601,Freehand:7,NgEvent:35,NgEventLabel:36,NgTimeLine:34,ShapeContainer:55});class HitResult{constructor(t,e,i){__publicField(this,"objectid"),__publicField(this,"hitcode"),__publicField(this,"cellid"),__publicField(this,"segment"),__publicField(this,"pt"),this.objectid=t||0,this.hitcode=e||0,this.cellid=i||0,this.segment=-1,this.pt={x:0,y:0}}}class Hook{constructor(t,e,i,n,s){__publicField(this,"objid"),__publicField(this,"cellid"),__publicField(this,"cellindex"),__publicField(this,"hookpt"),__publicField(this,"connect"),this.objid=t||0,this.cellid=e||null,this.cellindex=i||0,this.hookpt=n||0,this.connect={x:0,y:0},s&&(this.connect.x=s.x||0,this.connect.y=s.y||0)}}class HookUtil{static UpdateHook(t,e,i,n,s,a){LogUtil.Debug("O.Opt UpdateHook - Input:",{objectId:t,hookIndex:e,targetObjectId:i,hookPointType:n,connectionPoint:s,cellId:a});let o,r,l,h=null,c=!1,u=!1;const d=ObjectUtil$1.GetObjectPtr(t,!0);if(null==d)return LogUtil.Debug("O.Opt UpdateHook - Output: Failed to get source object"),1;l=d.hooks.length,d.hooks.length>e&&e>=0&&(h=d.hooks[e].cellId);const p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);if(null==p)return LogUtil.Debug("O.Opt UpdateHook - Output: Failed to get links list"),1;if(i>=0){if(o=ObjectUtil$1.GetObjectPtr(i,!0),null==o)return LogUtil.Debug("O.Opt UpdateHook - Output: Failed to get target object"),1}else a=null;return e<0?d.hooks.length<d.maxhooks&&i>=0&&(e=d.hooks.length,c=!0):l>e&&(d.hooks[e].objid==i&&h==a||(r=ObjectUtil$1.GetObjectPtr(d.hooks[e].objid,!0),r&&r.ChangeTarget(d.hooks[e].objid,t,h,e,s,!1),l=d.hooks.length,this.DeleteLink(p,d.hooks[e].objid,t,h,0,!1),u=!0,l===d.hooks.length&&d.hooks.splice(e,1),e=d.hooks.length,c=!0)),i>=0&&e>=0?(e>=d.hooks.length&&d.hooks.length<d.maxhooks?d.hooks[d.hooks.length]=new Hook(i,a,-1,n,s):(d.hooks[e].connect.x=s.x,d.hooks[e].connect.y=s.y,d.hooks[e].hookpt=n,d.hooks[e].objid=i),d.ChangeHook(e,!0,s),c&&this.InsertLink(p,t,e,0),o.ChangeTarget(i,t,h,e,s,!0)):u&&(d.extraflags&OptConstant.ExtraFlags.DeleteOnUnhook&&ObjectUtil$1.DeleteObjects([d.BlockID]),d.objecttype===NvConstant.FNObjectTypes.NgEvent&&d&&d.datasetElemID>-1&&(TODO.STData.DeleteRow(d.datasetElemID),d.datasetElemID=-1)),2!==d.hooks.length&&2!==l||!d.Dimensions||ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("O.Opt UpdateHook - Output: Hook updated successfully"),0}static CNChangeHook(t,e,i,n){let s,a,o,r,l,h,c,u;LogUtil.Debug("O.Opt CNChangeHook - Input:",{sourceObjectId:t.BlockID,hookIndex:e,isAdding:i,hasHookData:!!n});let d={},p=[];if(i){if(t.hooks&&t.hooks[e]&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(o=OptAhUtil.GetParentConnector(t.BlockID,null),o>=0)){if(s=ObjectUtil$1.GetObjectPtr(o,!1),!s)return void LogUtil.Debug("O.Opt CNChangeHook - Output: Failed (no connector object)");if(s.IsFlowChartConnector())return void LogUtil.Debug("O.Opt CNChangeHook - Output: Skipped (flowchart connector)");if(l=s.arraylist.styleflags&OptConstant.AStyles.CoManager,l&&s.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip>=1)return void LogUtil.Debug("O.Opt CNChangeHook - Output: Skipped (co-manager limit reached)");if(s.IsAsstConnector())return void LogUtil.Debug("O.Opt CNChangeHook - Output: Skipped (assistant connector)");if(h=s.objecttype,c=s.subtype,a=T3Gv.opt.FindChildArray(t.BlockID,-1),a<0){if(r=OptAhUtil.GetChildConnectorStyle(t),a=OptAhUtil.AddConnector(100,100,r,t.BlockID),a>=0&&(u=ObjectUtil$1.GetObjectPtr(a,!0)),!u)return void LogUtil.Debug("O.Opt CNChangeHook - Output: Failed to create child connector");u.objecttype=h,u.subtype=c,l?(d.x=0,d.y=-OptConstant.AStyles.CoManager):d=r.connect,HookUtil.UpdateHook(a,-1,t.BlockID,r.hookpt,d,null),OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),u.PrFormat(a),ObjectUtil$1.AddToDirtyList(a)}}}else if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){const e={lindex:-1,id:-1,hookpt:0};for(;T3Gv.opt.FindChildArrayByIndex(t.BlockID,e)>=0;)a=e.id,a>=0&&0===T3Gv.opt.CN_GetNShapes(a)&&(p.push(a),ObjectUtil$1.DeleteObjects(p,!1))}LogUtil.Debug("O.Opt CNChangeHook - Output: Operation completed")}static RemoveHook(t,e,i){LogUtil.Debug("O.Opt RemoveHook - Input:",{objectId:t,targetObjectId:e,targetCellId:i});const n=ObjectUtil$1.GetObjectPtr(t,!0);if(null==n)return LogUtil.Debug("O.Opt RemoveHook - Output: Failed to get object (1)"),1;for(let s=0;s<n.hooks.length;s++)if(n.hooks[s].objid==e){if(null!==i&&i!==n.hooks[s].cellid)continue;n.ChangeHook(s,0,n.hooks[s].connect),n.hooks.splice(s,1);break}return LogUtil.Debug("O.Opt RemoveHook - Output: Hook removed successfully (0)"),0}static AddToHookList(t,e,i,n,s,a,o){let r,l,h,c,u,d;LogUtil.Debug("O.Opt AddToHookList - Input:",{linksListLength:t.length,hookListCount:e.length,startLinkIndex:i,targetId:n,listCode:s,recursionLevel:a,hasBoundingRect:!!o});let p={},g=!1;for(;i<t.length&&t[i].targetid==n;){if(r=t[i].hookid,d=ObjectUtil$1.GetObjectPtr(r,!1),d){switch(l=-1,s){case NvConstant.ListCodes.MoveHook:case NvConstant.ListCodes.MoveTarg:if(2==d.hooks.length&&(u=d.hooks[0].objid===n?d.hooks[1].objid:d.hooks[0].objid,g=!1,e.indexOf(u)<0))break;g=!0;break;case NvConstant.ListCodes.CircTarg:case NvConstant.ListCodes.TopOnly:case NvConstant.ListCodes.MoveTargAndLines:g=!0}if(e.indexOf(r)>=0&&(g=!1),g){if(l<0)for(h=0;h<d.hooks.length;h++)if(d.hooks[h].objid==n){l=h;break}if(l>=0&&d.hooks[l].objid==n){e.push(r);const i=d.GetListOfEnclosedObjects(!0);if(i.length&&this.JoinHookList(e,i),!o||d.flags&NvConstant.ObjFlags.NotVisible||(p=d.GetMoveRect(!0,!0),o=Utils2.UnionRect(o,p,o)),s!==NvConstant.ListCodes.TopOnly&&(c=OptCMUtil.FindLink(t,r,!0),c>=0&&(e=this.AddToHookList(t,e,c,r,s,a+1,o)),d.hooks.length>1&&s!==NvConstant.ListCodes.CircTarg&&(e=this.GetTargetList(r,t,e,o,s))),s===NvConstant.ListCodes.CircTarg&&0===a&&d.hooks.length>1)for(h=0;h<d.hooks.length;h++)if(h!==l){if(d.hooks[h].objid==d.hooks[l].objid)break;e.push(d.hooks[l].objid)}}}}i++}return LogUtil.Debug("O.Opt AddToHookList - Output: Updated hook list with",e.length,"items"),e}static HandleHookedObjectMoving(t,e){LogUtil.Debug("O.Opt HandleHookedObjectMoving - Input:",{drawingObjectId:t.BlockID,boundingBox:e});let i=0,n=0,s=null;if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0&&(s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1))&&s.HookedObjectMoving&&s.HookedObjectMoving({linkParams:T3Gv.opt.linkParams,movingShapeID:t.BlockID,movingShapeBBox:e}),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndexHistory.length>0)for(n=T3Gv.opt.linkParams.ConnectIndexHistory.length,i=0;i<n;i++)T3Gv.opt.linkParams.ConnectIndexHistory[i]!==T3Gv.opt.linkParams.ConnectIndex&&(s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndexHistory[i],!1),s&&s.HookedObjectMoving&&s.HookedObjectMoving({linkParams:T3Gv.opt.linkParams,movingShapeID:t.BlockID,movingShapeBBox:e}));LogUtil.Debug("O.Opt HandleHookedObjectMoving - Output: Notified connected objects")}static HiliteConnect(t,e,i,n,s,a){LogUtil.Debug("O.Opt HiliteConnect - Input:",{objectId:t,connectIndex:e,shouldHighlight:i,connectPoint:n,hookPointType:s,cellId:a});let o=t,r=null,l=null,h=null,c=null;if(r=ObjectUtil$1.GetObjectPtr(t,!1),null==r)return void LogUtil.Debug("O.Opt HiliteConnect - Output: No drawing object found");const u=!!(r.flags&NvConstant.ObjFlags.ContConn||null!=a);if(l=T3Gv.opt.svgObjectLayer.GetElementById(o),null!=l&&null!=l.GetElementById(OptConstant.SVGElementClass.Shape))if(c="hilite_"+o,h=T3Gv.opt.svgHighlightLayer.GetElementById(c),null==h&&i)if(h=r.CreateConnectHilites(T3Gv.opt.svgDoc,t,e,n,s,a),null!=h){T3Gv.opt.svgHighlightLayer.AddElement(h);try{u||h.SetRotation(r.RotationAngle)}catch(d){throw d}LogUtil.Debug("O.Opt HiliteConnect - Output: Highlight added")}else LogUtil.Debug("O.Opt HiliteConnect - Output: Failed to create highlight");else null==h||i?LogUtil.Debug("O.Opt HiliteConnect - Output: No change needed"):(T3Gv.opt.svgHighlightLayer.RemoveElement(h),LogUtil.Debug("O.Opt HiliteConnect - Output: Highlight removed"));else LogUtil.Debug("O.Opt HiliteConnect - Output: No SVG element found")}static MoveLinks(t,e,i,n){let s,a,o,r,l,h,c,u,d,p;LogUtil.Debug("O.Opt MoveLinks - Input:",{targetObjectId:t,sourceObjectId:e,linkIndices:i?i.length:"null",hasHookResults:!!n});let g=[],f={},b=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0);if(null==b)return LogUtil.Debug("O.Opt MoveLinks - Output: Failed (no links list)"),1;if(l=b.length,null==ObjectUtil$1.GetObjectPtr(e,!1))return LogUtil.Debug("O.Opt MoveLinks - Output: Failed (source object not found)"),1;if(null==(a=ObjectUtil$1.GetObjectPtr(t,!1)))return LogUtil.Debug("O.Opt MoveLinks - Output: Failed (target object not found)"),1;if(null==i&&(i=[],d=OptCMUtil.FindLink(b,e,!0),d>=0))for(;d<l&&b[d].targetid===e;)i.push(d),d++;if(i.length>=0){for(let s=0;s<i.length;s++)if(r=i[s],h=b[r].hookid,h>=0){if(c=ObjectUtil$1.GetObjectPtr(h,!0),null==c)continue;if(c.flags&NvConstant.ObjFlags.NoMaintainLink)continue;for(u=0;u<c.hooks.length;u++)if(c.hooks[u].objid===e){if(o=c.HookToPoint(c.hooks[u].hookpt,null),n){f={pt:o,obj:c,index:u},n.push(f);continue}c.objecttype!==NvConstant.FNObjectTypes.Multiplicity?(g=a.GetTargetPoints(o,NvConstant.HookFlags.LcNoSnaps,null),g&&g.length&&(c.hooks[u].connect.x=g[0].x,c.hooks[u].connect.y=g[0].y),c.hooks[u].objid=t,b[r].targetid=t):(b[r].flags=Utils2.SetFlag(b[r].flags,DSConstant.LinkFlags.Move,!0),c.hooks[u].objid=t,b[r].targetid=t)}}do{for(p=!1,u=0;u<l-1;u++)b[u].targetid>b[u+1].targetid&&(p=!0,s=b[u+1],b[u+1]=b[u],b[u]=s)}while(p)}return LogUtil.Debug("O.Opt MoveLinks - Output: Links moved successfully"),0}static InsertLink(t,e,i,n){LogUtil.Debug("O.Opt InsertLink - Input:",{linksList:null==t?void 0:t.length,hookObjectId:e,hookIndex:i,flagValue:n});const s=ObjectUtil$1.GetObjectPtr(e,!1);if(null==s)return LogUtil.Debug("O.Opt InsertLink - Output: Failed to get hook object (1)"),1;if(i<0||i>=s.hooks.length)return LogUtil.Debug("O.Opt InsertLink - Output: Invalid hook index (1)"),1;const a=s.hooks[i].objid;let o=OptCMUtil.FindLink(t,a,!1);if(o>=0){for(;o<t.length&&t[o].targetid===a;){if(t[o].hookid==e)return LogUtil.Debug("O.Opt InsertLink - Output: Link already exists (1)"),1;o++}const r=new Link(a,e,s.hooks[i].cellid);n&&(r.flags=n),t.splice(o,0,r)}return LogUtil.Debug("O.Opt InsertLink - Output: Link inserted successfully (0)"),0}static MoveConnectHilite(t,e,i){let n,s;LogUtil.Debug("O.Opt MoveConnectHilite - Input:",{objectId:t,connectionPoint:e,hookPointType:i});let a=null,o=null,r=null,l=[],h=T3Gv.opt.svgDoc.docInfo.docToScreenScale,c=0;n=t,T3Gv.opt.svgDoc.docInfo.docScale<=.5&&(h*=2),a=ObjectUtil$1.GetObjectPtr(t,!1),null!=a&&(c=a instanceof Instance.Shape.BaseLine?OptConstant.Common.ConnPointLineDim/h:OptConstant.Common.ConnPointDim/h,l.push(e),s=a.GetPerimPts(t,l,null,!1,i,-1),null!=T3Gv.opt.svgObjectLayer.GetElementById(n).GetElementById(OptConstant.SVGElementClass.Shape)&&(r="hilite_"+n,o=T3Gv.opt.svgHighlightLayer.GetElementById(r),o&&o.SetPos(s[0].x-c,s[0].y-c))),LogUtil.Debug("O.Opt MoveConnectHilite - Output: Highlight moved to",s?s[0]:"null")}static DeleteLink(t,e,i,n,s,a){LogUtil.Debug("O.Opt DeleteLink - Input:",{targetId:e,hookObjectId:i,cellId:n,hookPointType:s,skipHookRemoval:a});let o=OptCMUtil.FindLink(t,e,!0),r=!1,l=-1;if(void 0===e&&(i=-1),o>=0)for(;o<t.length&&t[o].targetid===e;)-1===i||t[o].hookid===i?(r=!0,l=t[o].hookid,null!=n&&(r=n===t[o].cellid),l>=0&&0!==s&&(r=this.IsHookType(l,e,s)),r?(l>=0&&!a&&this.RemoveHook(l,e,n),t.splice(o,1)):o++):o++;return LogUtil.Debug("O.Opt DeleteLink - Output: Links deleted successfully"),0}static HasExistingLink(t,e){function i(t,e){const i=ObjectUtil$1.GetObjectPtr(t,!1);for(let n=0;n<i.hooks.length;n++)if(i.hooks[n].objid==e)return!0;return!1}LogUtil.Debug("O.Opt HasExistingLink - Input:",{objectId1:t,objectId2:e});const n=!(!i(t,e)&&!i(e,t));return LogUtil.Debug("O.Opt HasExistingLink - Output:",n),n}static VerifyLink(t,e){LogUtil.Debug("O.Opt VerifyLink - Input:",{sourceObjectId:t.BlockID,linkData:e});const i=ObjectUtil$1.GetObjectPtr(e.targetid,!1),n=DSConstant.LinkFlags;if(null==i)return e.flags=Utils2.SetFlag(e.flags,n.DeleteLink,!0),LogUtil.Debug("O.Opt VerifyLink - Output: Target object doesn't exist (-1)"),-1;for(let s=0;s<t.hooks.length;s++)if(t.hooks[s].objid===e.targetid&&t.hooks[s].cellid===e.cellid)return null===t.hooks[s].cellid?(LogUtil.Debug("O.Opt VerifyLink - Output: Valid link found at index",s),s):(e.flags=Utils2.SetFlag(e.flags,n.DeleteLink,!0),LogUtil.Debug("O.Opt VerifyLink - Output: Cell doesn't exist (-1)"),-1);return LogUtil.Debug("O.Opt VerifyLink - Output: No matching hook found (-1)"),-1}static CleanupHooks(t,e){LogUtil.Debug("O.Opt CleanupHooks - Input:",{connectorId:t,shapeId:e});const i=ObjectUtil$1.GetObjectPtr(t,!1),n=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&!(i.arraylist.styleflags&OptConstant.AStyles.FlowConn)>0&&n&&n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){const i=T3Gv.opt.FindChildArray(e,t);if(i>=0&&0===T3Gv.opt.CN_GetNShapes(i)){const t=[];return t.push(i),ObjectUtil$1.DeleteObjects(t,!1),void LogUtil.Debug("O.Opt CleanupHooks - Output: Deleted orphaned connector",i)}}LogUtil.Debug("O.Opt CleanupHooks - Output: No cleanup needed")}static FindAllChildConnectors(t,e){LogUtil.Debug("O.Opt FindAllChildConnectors - Input:",{objectId:t,linksList:e});const i={lindex:-1,id:-1,hookpt:0},n=[];for(;T3Gv.opt.FindChildArrayByIndex(t,i,e)>0;)n.push(i.id);return LogUtil.Debug("O.Opt FindAllChildConnectors - Output:",n),n}static MaintainLink(t,e,i,n,s){let a,o;LogUtil.Debug("O.Opt MaintainLink - Input:",{targetId:t,drawingObject:e.BlockID,triggerType:n,maintainMode:s});let r=0,l={},h=[],c=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0);if(c&&e.AllowMaintainLink())if(a=OptCMUtil.FindLink(c,t,!0),a<0)LogUtil.Debug("O.Opt MaintainLink - Output: No links found for targetId",t);else{for(;a<c.length&&c[a].targetid===t;)if(o=ObjectUtil$1.GetObjectPtr(c[a].hookid,!1),o)if(o.associd===t&&o.flags&NvConstant.ObjFlags.Assoc)a++;else if(o.flags&NvConstant.ObjFlags.NoMaintainLink)a++;else{for(let u=0;u<o.hooks.length;u++)if(o.hooks[u].objid===t){let d=s;if(2===s&&(d=!(o.hooks[u].hookpt!==OptConstant.HookPts.KAT||o.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape||e instanceof Instance.Shape.PolyLineContainer)),l=o.HookToPoint(o.hooks[u].hookpt,null),!1===e.MaintainPoint(l,t,i,o,n)){a++;continue}if(d||(r=NvConstant.HookFlags.LcNoSnaps,r=Utils2.SetFlag(r,NvConstant.HookFlags.LcShapeOnLine,!(o instanceof Instance.Shape.BaseLine)),h=e.GetTargetPoints(l,r,null),h&&(o.hooks[u].connect.x=h[0].x,o.hooks[u].connect.y=h[0].y)),e.TextFlags&NvConstant.TextFlags.HorizText&&o instanceof Instance.Shape.BaseShape){let t=e.GetApparentAngle(l);t%=180;let i=o.RotationAngle,n=(t+180)%360;t=T3Gv.opt.GetAngleSmallestDiff(t,i)<T3Gv.opt.GetAngleSmallestDiff(n,i)?t:n,Math.abs(i-t)>2&&Math.abs(i-Math.abs(t-180))>2&&(T3Gv.stdObj.PreserveBlock(c[a].hookid),o.RotationAngle=t,ObjectUtil$1.AddToDirtyList(o.BlockID))}}a++}else a++;LogUtil.Debug("O.Opt MaintainLink - Output: Links maintained successfully")}else LogUtil.Debug("O.Opt MaintainLink - Output: No links or link maintenance not allowed")}static ResizeSetLinkFlag(t,e){LogUtil.Debug("O.Opt ResizeSetLinkFlag - Input:",{objectId:t,flagValue:e});const i=ObjectUtil$1.GetObjectPtr(t,!1);if(i&&i.hooks.length){const t=i.hooks[0].objid,e=ObjectUtil$1.GetObjectPtr(t,!1);e&&(e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||e instanceof Instance.Shape.ShapeContainer)&&OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move)}OptCMUtil.SetLinkFlag(t,e),LogUtil.Debug("O.Opt ResizeSetLinkFlag - Output: Link flags updated")}static MoveGetHookPoints(t,e,i,n){LogUtil.Debug("O.Opt MoveGetHookPoints - Input:",{objectId:t,drawingObject:e?e.BlockID:null,deltaX:i,deltaY:n});const s=[],a=[];let o=!1,r=!1,l=!1;const h=OptConstant.ExtraFlags,c=OptConstant.Common.DimMax;if(null==e)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (No drawing object)"),null;if(null==T3Gv.opt.linkParams)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (No link parameters)"),null;if(e.hooks&&2===e.hooks.length)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (Object already has 2 hooks)"),null;if(e.flags&NvConstant.ObjFlags.Assoc)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (Object is associated)"),null;if(e.PreventLink())return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (Object prevents linking)"),null;!e.AllowLink()&&T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ArraysOnly=!0);const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(u&&(o=u.flags&OptConstant.SessionFlags.AttLink&&e.hookflags&NvConstant.HookFlags.LcAttachToLine,r=u.flags&OptConstant.SessionFlags.FreeHand,l=DrawUtil.AllowAutoInsert()),o=!!(e.flags&NvConstant.ObjFlags.DropOnBorder||e.flags&NvConstant.ObjFlags.DropOnTable),o||l){if(o&&(T3Gv.opt.linkParams.DropOnLine=!0),s.push(new Point$1(e.attachpoint.x,e.attachpoint.y)),e.extraflags&(h.FlipHoriz|h.FlipVert)){const t=new Rectangle(0,0,c,c);T3Gv.opt.FlipPoints(t,e.extraflags,s)}T3Gv.opt.linkParams.cpt=e.GetPerimPts(t,s,OptConstant.HookPts.KAT,!1,null,-1),T3Gv.opt.linkParams.cpt&&T3Gv.opt.linkParams.cpt.length>0&&(T3Gv.opt.linkParams.cpt[0].id=OptConstant.HookPts.KAT,T3Gv.opt.linkParams.cpt[0].x+=i,T3Gv.opt.linkParams.cpt[0].y+=n)}e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(a.push(new Point$1(c/2,0)),T3Gv.opt.linkParams.ContainerPt=e.GetPerimPts(t,a,OptConstant.HookPts.KAT,!1,null,-1),T3Gv.opt.linkParams.ContainerPt&&T3Gv.opt.linkParams.ContainerPt.length>0&&(T3Gv.opt.linkParams.ContainerPt[0].id=OptConstant.HookPts.KAT,T3Gv.opt.linkParams.ContainerPt[0].x+=i,T3Gv.opt.linkParams.ContainerPt[0].y+=n)),T3Gv.opt.linkParams.AllowJoin=r&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line;const d=e.GetHookPoints(!0),p=e.GetPerimPts(t,d,0,!1,null,-1);for(let g=0;g<p.length;g++)p[g].x+=i,p[g].y+=n;return LogUtil.Debug("O.Opt MoveGetHookPoints - Output:",{pointCount:p.length,allowDropOnLine:T3Gv.opt.linkParams.DropOnLine,allowJoin:T3Gv.opt.linkParams.AllowJoin}),p}static HandleMultipleSelectionHooks(){LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);if(t.length<=1)return LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Output: false (Only one object selected)"),!1;let e,i,n,s,a,o,r,l=null,h=[],c=[];const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);if(T3Gv.opt.linkParams.ConnectIndex>=0){if(l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1),l&&l instanceof Instance.Shape.ShapeContainer){i=T3Gv.opt.linkParams.ConnectIndex,s=t.length;const d=l.ContainerList.flags&NvConstant.ContainerListFlags.Sparse;if(u.hooks.length&&u.hooks[0].objid===i){for(a=0;a<s;a++)if(n=t[a],n!==T3Gv.opt.dragTargetId&&(e=ObjectUtil$1.GetObjectPtr(n,!1),e.hooks.length&&e.hooks[0].objid===i))if(d){const t=T3Gv.opt.linkParams.ConnectPt.x-u.hooks[0].connect.x,i=T3Gv.opt.linkParams.ConnectPt.y-u.hooks[0].connect.y;(t||i)&&(h.push(n),o=e.hooks[0].connect.x+t,r=e.hooks[0].connect.y+i,o<0&&(o=0),c.push({x:o,y:r}))}else o=T3Gv.opt.linkParams.ConnectPt.x,o<0&&(o=0),h.push(n),c.push({x:o,y:T3Gv.opt.linkParams.ConnectPt.y+h.length})}else for(a=0;a<s;a++)n=t[a],n!==T3Gv.opt.dragTargetId&&(e=ObjectUtil$1.GetObjectPtr(n,!1),l.IsShapeContainer(e)&&(h.push(n),o=T3Gv.opt.linkParams.ConnectPt.x,o<0&&(o=0),c.push({x:o,y:T3Gv.opt.linkParams.ConnectPt.y+h.length})))}}else if(u.hooks.length>0&&(i=u.hooks[0].objid,l=ObjectUtil$1.GetObjectPtr(i,!1),l&&l instanceof Instance.Shape.ShapeContainer))for(s=t.length,a=0;a<s;a++)n=t[a],n!==T3Gv.opt.dragTargetId&&(e=ObjectUtil$1.GetObjectPtr(n,!1),e.hooks.length&&e.hooks[0].objid===i&&(h.push(n),c.push(e.hooks[0].connect)));const d=h.length;if(d>0){for(h.unshift(T3Gv.opt.dragTargetId),c.unshift(T3Gv.opt.linkParams.ConnectPt),a=0;a<d+1;a++)n=h[a],this.UpdateHook(n,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,c[a],T3Gv.opt.linkParams.ConnectInside),OptCMUtil.SetLinkFlag(T3Gv.opt.linkParams.ConnectIndex,DSConstant.LinkFlags.Move),this.CleanupHooks(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectIndex);return LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Output: true (Multiple hooks updated)"),!0}return LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Output: false (No matching objects found)"),!1}static JoinHookList(t,e){if(LogUtil.Debug("O.Opt JoinHookList - Input:",{targetList:t,sourceList:e}),null!=t&&null!=e)for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i]);LogUtil.Debug("O.Opt JoinHookList - Output: Lists joined")}static GetHookList(t,e,i,n,s,a){LogUtil.Debug("O.Opt GetHookList - Input:",{objectId:i,listCode:s,hookListLength:e?e.length:0,boundsRect:a});let o=!1,r=!1,l=-1,h={};switch(s===NvConstant.ListCodes.ChildrenOnly&&(r=!0,s=NvConstant.ListCodes.CircTarg),s===NvConstant.ListCodes.LinesOnly&&(r=!0,s=NvConstant.ListCodes.TopOnly),s){case NvConstant.ListCodes.MoveTarg:if((n.hooks.length>1||1===n.hooks.length&&n.flags&NvConstant.ObjFlags.Assoc)&&(s=NvConstant.ListCodes.MoveHook),e.indexOf(i)>=0)return LogUtil.Debug("O.Opt GetHookList - Output: Object already in list",e),e;break;case NvConstant.ListCodes.MoveHook:if(e.indexOf(i)>=0)return LogUtil.Debug("O.Opt GetHookList - Output: Object already in list",e),e;break;case NvConstant.ListCodes.MoveTargAndLines:case NvConstant.ListCodes.CircTarg:break;case NvConstant.ListCodes.TargOnly:o=!0,l=-1}if(o||(l=OptCMUtil.FindLink(t,i,!0)),e.indexOf(i)<0&&!r){e.push(i),!a||n.flags&NvConstant.ObjFlags.NotVisible||(h=n.GetMoveRect(!0,!0),1===e.length?Utils2.CopyRect(a,h):a=Utils2.UnionRect(a,h,a));const t=n.GetListOfEnclosedObjects(!0);t.length&&T3Gv.opt.JoinHookList(e,t)}return l>=0&&this.AddToHookList(t,e,l,i,s,0,a),s===NvConstant.ListCodes.MoveHook&&(n.hooks.length>=2||n.flags&NvConstant.ObjFlags.Assoc)&&this.GetTargetList(i,t,e,a,s),LogUtil.Debug("O.Opt GetHookList - Output: Hook list updated",{hookListLength:e.length,boundsRect:a}),e}static UpdateLineHops(t){LogUtil.Debug("O.Opt UpdateLineHops - Input:",{forceUpdate:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(e.flags&OptConstant.SessionFlags.AllowHops){this.HideHopTargets();const i=LayerUtil.VisibleZList(),n=i.length,s=[],a=[],o=e.hopdim.x;let r=0,l=0,h=-1,c=0;for(let e=0;e<n;e++){const n=i[e],o=ObjectUtil$1.GetObjectPtr(n,!1);o instanceof Instance.Shape.BaseLine&&!(o instanceof Instance.Shape.PolyLine)&&((o.flags&NvConstant.ObjFlags.LineMod||t)&&-1===h&&(h=-2),s.push(n),r++,o.flags&NvConstant.ObjFlags.LineHop&&(-2===h&&(c=l,h=-3),a.push(n),l++),o.flags=Utils2.SetFlag(o.flags,NvConstant.ObjFlags.LineMod,!1))}if(l&&-3===h)for(let t=c;t<l;t++){const e=a[t],i=ObjectUtil$1.GetObjectPtr(e,!1);i.hoplist.nhops=0,i.hoplist.hops=[];for(let t=0;t<r&&s[t]!==e;t++){let n=!1;for(let e of i.hooks)if(e.objid===s[t]){n=!0;break}if(!n){const i=ObjectUtil$1.GetObjectPtr(s[t],!1);for(let t of i.hooks)if(t.objid===e){n=!0;break}}if(!n){const e={},n={};Utils2.CopyRect(e,i.r),Utils2.CopyRect(n,ObjectUtil$1.GetObjectPtr(s[t],!1).r),0===e.width&&(e.width=1),0===e.height&&(e.height=1),0===n.width&&(n.width=1),0===n.height&&(n.height=1),Utils2.IntersectRect(e,n)&&i.CalcLineHops(ObjectUtil$1.GetObjectPtr(s[t],!1),0)}}if(i.hoplist.nhops>1){i.hoplist.hops.sort(this.Hop_Compare);for(let t=i.hoplist.nhops-1;t>0;t--){const e=i.hoplist.hops[t-1].pt.x-i.hoplist.hops[t].pt.x,n=i.hoplist.hops[t-1].pt.y-i.hoplist.hops[t].pt.y;Utils2.Sqrt(e*e+n*n)<3*o&&(i.hoplist.hops[t-1].cons=!0)}}if(i.hoplist.nhops||i.hoplist.hops.length){const t=Utils2.Pt2Rect(i.StartPoint,i.EndPoint);for(let e=0;e<i.hoplist.nhops;e++)i.hoplist.hops[e].pt.x-=t.x,i.hoplist.hops[e].pt.y-=t.y;ObjectUtil$1.AddToDirtyList(e)}}}LogUtil.Debug("O.Opt UpdateLineHops - Output: Completed updating line hops")}static FixAnyCircularHooks(t){LogUtil.Debug("O.Opt FixAnyCircularHooks - Input:",{initialLinkObject:t});const e=t?[t.BlockID]:(()=>{const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);let e=[];const i=t.length;for(let n=0;n<i;n++)e.includes(t[n].hookid)||e.push(t[n].hookid);return e})();let i=[];const n=e.length;for(let r=0;r<n;r++)s(i,e[r]);function s(t,e,i=[]){i.push(e);const n=ObjectUtil$1.GetObjectPtr(e,!1);if(!n)return;const r=n.hooks.length;for(let l=0;l<r;l++){const r=n.hooks[l].objid;i.indexOf(r)>=0?o(t,e,r):s(t,r,a(i))}}function a(t){let e=[];for(let i=0;i<t.length;i++)e[i]=t[i];return e}function o(t,e,i){t.some((t=>t.objectId===e&&t.hookObjectId===i))||t.push({objectId:e,hookObjectId:i})}!function(t){const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),i=t.length;for(let n=0;n<i;n++){const i=ObjectUtil$1.GetObjectPtr(t[n].objectId,!0),s=ObjectUtil$1.GetObjectPtr(t[n].hookObjectId);if(s instanceof Instance.Shape.Connector){ObjectUtil$1.DeleteObjects([s.BlockID],!1);continue}i.hooks=i.hooks.filter((e=>e.objid!=t[n].hookObjectId));const a=T3Gv.opt.FindExactLink(e,t[n].hookObjectId,t[n].objectId);a>=0&&(e[a].flags=Utils2.SetFlag(e[a].flags,DSConstant.LinkFlags.DeleteTarget,!0))}}(i),LogUtil.Debug("O.Opt FixAnyCircularHooks - Output: Circular hooks fixed",{circularHookPairs:i})}}class ToolAct2Util{static GroupSelectedShapes(t,e,i,n,s){let a,o=!1,r=[],l=LayerUtil.ActiveVisibleZList();i&&(l=LayerUtil.ZList());let h=l.length;if(0===h)return!1;if((e||T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data).length<=1)return!1;const c=e||SelectUtil.GetMoveList(-1,!0,!0,!1,{},!1),u=function(t){const e=[];for(let i=0,n=t.length;i<n;i++){const n=ObjectUtil$1.GetObjectPtr(t[i],!0);(n.Dimensions&NvConstant.DimensionFlags.Always||n.Dimensions&NvConstant.DimensionFlags.Select)&&(e.push({index:i,dimensions:n.Dimensions}),n.Dimensions=0,n.UpdateFrame())}return e}(c),d=T3Gv.opt.GetListSRect(c);!function(t,e){for(let i=0,n=e.length;i<n;i++){const n=ObjectUtil$1.GetObjectPtr(t[e[i].index],!0);n.Dimensions=e[i].dimensions,n.UpdateFrame()}}(c,u);const p=[];for(a=0;a<h;a++)-1!==c.indexOf(l[a])&&p.push(l[a]);const g=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);let f=null;const b=p.length;for(a=0;a<b;a++){f=ObjectUtil$1.GetObjectPtr(p[a],!0),f.commentId>=0&&r.push(f.commentId);const t=f.Frame;if(t.x-=d.x,t.y-=d.y,f.NoRotate()&&(o=!0),f.bInGroup=!0,(f instanceof Instance.Shape.BaseLine||f instanceof Instance.Shape.Connector||void 0!==f.StartPoint&&void 0!==f.EndPoint)&&(f.StartPoint.x-=d.x,f.StartPoint.y-=d.y,f.EndPoint.x-=d.x,f.EndPoint.y-=d.y),f.NativeID>=0&&f.ShapeType===OptConstant.ShapeType.GroupSymbol){const t=T3Gv.stdObj.PreserveBlock(f.NativeID);t&&t.Delete(),f.NativeID=-1}f.UpdateFrame(t)}const v={Frame:{x:d.x,y:d.y,width:d.width,height:d.height},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ShapesInGroup:p,InitialGroupBounds:{x:d.x,y:d.y,width:d.width,height:d.height}},m=new Instance.Shape.GroupSymbol(v);o&&(m.extraflags=Utils2.SetFlag(m.extraflags,OptConstant.ExtraFlags.NoRotate,!0)),LayerUtil.ZListPreserve();const y=DrawUtil.AddNewObject(m,!0,!1);for(m.StyleRecord&&(m.StyleRecord.Line&&(m.StyleRecord.Line.Thickness=0),m.StyleRecord.OutsideEffect&&(m.StyleRecord.OutsideEffect.OutsideType=0,m.StyleRecord.OutsideEffect.OutsideExtent_Bottom=0,m.StyleRecord.OutsideEffect.OutsideExtent_Left=0,m.StyleRecord.OutsideEffect.OutsideExtent_Right=0,m.StyleRecord.OutsideEffect.OutsideExtent_Top=0),m.UpdateFrame()),a=0;a<b;a++)LayerUtil.RemoveFromAllZLists(p[a]),HookUtil.DeleteLink(g,p[a],-1,null,0,!0);return r.length&&T3Gv.opt.CommentGroup(r),l=LayerUtil.ActiveVisibleZList(),h=l.length,m.ConvertToNative(T3Gv.opt.richGradients,i),DrawUtil.CompleteOperation([l[h-1]],t),n||i||SvgUtil.RenderAllSVGObjects(),T3Gv.opt.moveList=null,y}static UngroupShape(t,e){let i,n,s,a=[],o=null,r=null,l=[],h=OptConstant.ExtraFlags.FlipVert,c=OptConstant.ExtraFlags.FlipHoriz,u=ObjectUtil$1.GetObjectPtr(t,!0),d=[],p=u.Frame,g={x:p.x+p.width/2,y:p.y+p.height/2},f=u.ShapesInGroup,b=f.length;if(0===b)return;let v=null,m=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);LayerUtil.ZListPreserve();let y=p.x,S=p.y,w=p.width/u.InitialGroupBounds.width;isNaN(w)&&(w=1);let x=p.height/u.InitialGroupBounds.height;for(isNaN(x)&&(x=1),i=0;i<b;++i){if(v=ObjectUtil$1.GetObjectPtr(f[i],!0),v.commentId>=0&&a.push(v.commentId),v instanceof Instance.Shape.ShapeContainer&&d.push(v.BlockID),o=new Instance.Shape.BaseDrawObject(null),o=Utils1.DeepCopy(v),o.Frame.x+=y,o.Frame.y+=S,o.StartPoint&&(o.StartPoint.x+=y,o.StartPoint.y+=S),o.EndPoint&&(o.EndPoint.x+=y,o.EndPoint.y+=S),l.push(o),v instanceof Instance.Shape.GroupSymbol&&v.NativeID<0&&v.ConvertToNative(T3Gv.opt.richGradients,!1),v.ScaleObject(y,S,g,u.RotationAngle,w,x,!0),n=0,u.extraflags&h&&v.Flip(h),u.extraflags&c&&(n=u.Frame.width-(v.Frame.x+v.Frame.width-u.Frame.x)-v.Frame.x+u.Frame.x,v.Flip(c)),n&&v.OffsetShape(n,0),-1!==v.DataID&&1!==x){let t=ObjectUtil$1.GetObjectPtr(v.DataID,!0).runtimeText.styles,e=t.length;for(s=0;s<e;++s)t[s].size*=x}v.bInGroup=!1,ObjectUtil$1.AddToDirtyList(f[i]),T3Gv.opt.RebuildLinks(m,f[i])}for(LayerUtil.InsertObjectsIntoLayerAt(t,f),i=0;i<l.length;i++){T3Gv.opt.ob=l[i],r=ObjectUtil$1.GetObjectPtr(l[i].BlockID,!1);let t=!!e&&2;HookUtil.MaintainLink(l[i].BlockID,r,T3Gv.opt.ob,OptConstant.ActionTriggerType.Flip,t)}T3Gv.opt.ob={};let C=d.length;for(i=0;i<C;i++)OptCMUtil.SetLinkFlag(d[i],DSConstant.LinkFlags.Move);T3Gv.opt.UpdateLinks(),u.ShapesInGroup=[],ObjectUtil$1.DeleteObjects([t],!1),SvgUtil.RenderDirtySVGObjects()}static UngroupSelectedShapes(){let t,e;if(0===LayerUtil.ActiveVisibleZList().length)return!1;const i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,n=i.length;if(0===n)return!1;let s=!1,a=null;for(t=0;t<n;++t){if(a=ObjectUtil$1.GetObjectPtr(i[t],!1),a instanceof Instance.Shape.GroupSymbol){s=!0;break}if(a.NativeID>=0){s=!0;break}}if(s){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0).slice(0);let o=[];for(t=0;t<n;++t){a=ObjectUtil$1.GetObjectPtr(i[t],!1);const n=i[t];a instanceof Instance.Shape.GroupSymbol?(s=!0,o=o.concat(a.ShapesInGroup),this.UngroupShape(n)):a.NativeID>=0?(e=T3Gv.opt.UngroupNative(n,!1,!0),e&&(ObjectUtil$1.DeleteObjects([n],!1),o=o.concat(e),s=!0)):o.push(n)}s&&(SvgUtil.RenderAllSVGObjects(),SelectUtil.SelectObjects(o),DrawUtil.CompleteOperation(o))}}}const _T3Clipboard=class{static Init(t){if(this.isMobileDevice=/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),this.isSafariBrowser=navigator.appVersion.includes("Safari")&&!navigator.appVersion.includes("Chrome")&&!navigator.appVersion.includes("CrMo")&&!navigator.appVersion.includes("CriOS"),this.isMacOS=/(mac os x)/i.test(navigator.userAgent)&&!_T3Clipboard.isMobileDevice,this.isInternetExplorer=navigator.userAgent.toLowerCase().includes("msie")||navigator.userAgent.toLowerCase().includes("trident"),this.isFirefox=navigator.userAgent.toLowerCase().includes("firefox"),this.isIOSDevice=/ip(ad|hone|od)/i.test(navigator.userAgent),this.IEclipboardDiv=$$1("#_IEclipboardDiv"),this.clipboardInputElement=$$1("#_clipboardInput"),this.isMacOS&&this.isMobileDevice&&this.isSafariBrowser&&this.isIOSDevice){_T3Clipboard.clipboardInputElement.attr("readonly","readonly");const t=$$1("#_crossTabClipboardDiv");t.css("left","-100px"),t.css("top","-100px")}this.lastCutCopyTimestamp=-1,(this.isInternetExplorer||this.isFirefox)&&document.addEventListener("beforepaste",(()=>{_T3Clipboard.FocusOnIEclipboardDiv()})),this.clipboardInputElement[0].addEventListener("input",(t=>{this.clipboardInputElement.val(),this.isSafariBrowser?(this.clipboardInputElement.focus(),setTimeout(this.FocusOnClipboardInput,0)):this.FocusOnClipboardInput()})),["cut","copy","paste"].forEach((t=>{document.addEventListener(t,(e=>{if(T3Gv.docUtil.IsReadOnly())return;if(("cut"===t||"copy"===t)&&$$1("#_clipboardInput:focus,#_IEclipboardDiv:focus,#T3TouchProxy:focus").length<=0)return;if("paste"===t&&($$1("input:focus").length>0||$$1("textarea:focus").length>0)&&$$1("#_clipboardInput:focus,#_IEclipboardDiv:focus,#T3TouchProxy:focus").length<=0)return;let i;void 0!==e.clipboardData?i=e.clipboardData:void 0!==e.originalEvent.clipboardData?i=e.originalEvent.clipboardData:void 0!==window.clipboardData&&(i=window.clipboardData);const n=$$1("#T3TouchProxy:focus").length>0;if("cut"===t||"copy"===t){const n=!_T3Clipboard.GetCutCopyText(),s=_T3Clipboard.CanUseAsyncClipboard();s&&n?_T3Clipboard.GenerateImageInfo().then((n=>{_T3Clipboard.DoCutCopy(e,t,s,i,n)})):_T3Clipboard.DoCutCopy(e,t,s,i)}"paste"===t&&_T3Clipboard.PasteFromSystemEvent(i),n&&e.preventDefault()}))})),$$1(document).mouseup(_T3Clipboard.FocusOnClipboardInput),_T3Clipboard.FocusOnClipboardInput()}static CanUseAsyncClipboard(){return!(_T3Clipboard.isInternetExplorer||_T3Clipboard.isFirefox||_T3Clipboard.isSafariBrowser)}static DoCutCopy(t,e,i,n,s){if(T3Gv.opt.htmlClipboard=this.GetCutCopyHTML(),"cut"===e?ToolActUtil.CutObjects(!0):"copy"===e&&ToolActUtil.CopyObjects(),this.lastCutCopyTimestamp=(new Date).getTime(),i){if(!_T3Clipboard.ValidateAsyncClipboardApi())return;navigator&&navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"clipboard-write"}).then((()=>{}));const e=this.GetCutCopyText();if(e){const t={"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([this.GetCutCopyHTML()],{type:"text/html"})},i=new ClipboardItem(t);navigator.clipboard.write([i]),this.FocusOnClipboardInput()}else if(s){const t=`<img src="${s.base64ImageData}"/>`,e={"image/png":s.imageBlob,"text/html":new Blob([this.GetCutCopyHTML(t)],{type:"text/html"})},i=new ClipboardItem(e);navigator.clipboard.write([i])}t.preventDefault()}else{if(this.isInternetExplorer)return n.setData("Text",this.GetCutCopyText()),this.IEclipboardDiv.html(this.GetCutCopyHTML()),_T3Clipboard.FocusOnIEclipboardDiv(),void setTimeout((()=>{this.FocusOnClipboardInput(),this.IEclipboardDiv.empty()}),0);n.setData("text/plain",this.GetCutCopyText()),n.setData("text/html",this.GetCutCopyHTML()),t.preventDefault(),LogUtil.Debug("= T3Clipboard: DoCutCopy/ data copied to system clipboard and the data is: ",n)}}static GenerateImageInfo1(){const t={},e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);return e&&0!==e.length?(i=e,new Promise((t=>T3Gv.opt.GeneratePreviewPNG(i,1/0,1/0,{zList:i,fillBackground:!0})))).then((e=>(t.imageBlob=e,function(t){const e=new FileReader;return e.readAsDataURL(t),new Promise((t=>{e.onloadend=()=>t(e.result)}))}(e)))).then((e=>(t.base64ImageData=e,t))).catch((t=>{throw t})):Promise.resolve(null);var i}static GenerateImageInfo(){const t={},e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);return e&&0!==e.length?(i=e,new Promise((t=>T3Gv.opt.GeneratePreviewPNG(i,1/0,1/0,{zList:i,fillBackground:!0})))).then((e=>(t.imageBlob=e,function(t){const e=new FileReader;return e.readAsDataURL(t),new Promise((t=>{e.onloadend=()=>t(e.result)}))}(e)))).then((e=>(t.base64ImageData=e,t))).catch((t=>{})):Promise.resolve(null);var i}static ValidateAsyncClipboardApi(){return!!navigator.clipboard}static PlainTextToSDObj(t){return"string"!=typeof t||null===t||0===t.length?t:{text:t,charStyles:[],hyperlinks:[],paraInfo:[],styles:[],vAlign:"middle"}}static PasteFromSystemEvent(t){LogUtil.Debug("= T3Clipboard: PasteFromSystemEvent/ Pasting from system event: ",t);const e=[{matches:this.isInternetExplorer,handler:this.PasteIE},{matches:this.isFirefox,handler:this.PasteFF},{matches:this.isSafariBrowser,handler:this.PasteSafari},{matches:!0,handler:this.PasteChrome}];this.ClearInteralClipboard();const i=e.find((t=>t.matches));i&&i.handler.call(this,t)}static PasteFF(t){T3Gv.opt.textClipboard=_T3Clipboard.PlainTextToSDObj(t.getData("Text"));const e=t.getData("text/html");null!=e&&e.length>0&&(T3Gv.opt.htmlClipboard=e),_T3Clipboard.FocusOnIEclipboardDiv(),setTimeout((()=>{if(_T3Clipboard.IEclipboardDiv.html().match(/<img src=['"]data/gi)){const t=$$1(_T3Clipboard.IEclipboardDiv[0].childNodes[0]).attr("src"),[e,i]=t.split(","),n=e.split(":")[1].split(";")[0],s=atob(i),a=new ArrayBuffer(s.length),o=new Uint8Array(a);for(let r=0;r<s.length;r++)o[r]=s.charCodeAt(r);T3Gv.opt.imageClipboard=new Blob([o],{type:n})}_T3Clipboard.Paste(),_T3Clipboard.IEclipboardDiv.empty(),_T3Clipboard.FocusOnClipboardInput()}),0)}static PasteSafari(t){return this.PasteChrome(t)}static PasteIE(t){T3Gv.opt.textClipboard=_T3Clipboard.PlainTextToSDObj(t.getData("Text"));const e=t.files;for(let i=0;i<e.length;i++)0===e[i].type.indexOf("image")&&(T3Gv.opt.imageClipboard=e[i].slice(0,e[i].size-1));this.IEclipboardDiv.empty(),setTimeout((()=>{T3Gv.opt.htmlClipboard=this.IEclipboardDiv.html(),this.Paste(),this.IEclipboardDiv.empty(),this.FocusOnClipboardInput()}),0)}static PasteChrome(t){void 0!==t.types&&null!=t.types&&Array.prototype.forEach.call(t.types,((e,i)=>{e.match(/image.*/)||void 0!==t.items&&t.items[i].type.match(/image.*/)?T3Gv.opt.imageClipboard=t.items[i].getAsFile():e.match(/text\/plain/)||void 0!==t.items&&t.items[i].type.match(/text\/plain/)?t.items[i].getAsString((t=>{T3Gv.opt.textClipboard=_T3Clipboard.PlainTextToSDObj(t)})):(e.match(/text\/html/)||t.items[i].type.match(/text\/html/))&&t.items[i].getAsString((t=>{T3Gv.opt.htmlClipboard=t}))})),setTimeout(_T3Clipboard.Paste,10)}static ClearInteralClipboard(){T3Gv.opt.textClipboard=null,T3Gv.opt.htmlClipboard=null,T3Gv.opt.imageClipboard=null}static PasteFromUIaction(){this.isMobileDevice||this.IsSameSystemPaste()?ToolActUtil.PasteObjects():(this.ClearInteralClipboard(),this.PasteUsingAsynchClipboardAPI((()=>{}),(t=>{throw t})))}static PasteUsingAsynchClipboardAPI(t,e){if(this.isFirefox||this.isSafariBrowser){const t="Use ctrl+v to paste this information";return LogUtil.Debug(t),!1}return this.PasteUsingAsynchClipboardAPIDoPaste(t,e)}static PasteUsingAsynchClipboardAPIDoPaste(t,e){const i=[{typeRegex:/text\/html/,handler:t=>t.text().then((t=>(T3Gv.opt.htmlClipboard=t,!0)))},{typeRegex:/text\/plain/,handler:t=>t.text().then((t=>(T3Gv.opt.textClipboard=_T3Clipboard.PlainTextToSDObj(t),!0)))},{typeRegex:/image.*/,handler:t=>(T3Gv.opt.imageClipboard=t,!0)}];return!!_T3Clipboard.ValidateAsyncClipboardApi()&&navigator.clipboard.read().then((t=>{const n=[];for(const s of t)for(const t of s.types){const a=s.getType(t).then((n=>{const s=i.find((e=>t.match(e.typeRegex)));if(s)return s.handler(n);e(`Cannot process clipboard content type: ${t}`)})).catch((t=>e(t)));n.push(a)}return Promise.all(n)})).then((()=>{setTimeout(this.Paste,1),t(!0)})).catch((t=>e(t)))}static FocusOnClipboardInput(){const t=$$1("input:focus").length>0,e=$$1("select:focus").length>0,i=$$1("textarea:focus").length>0;t||e||i||(_T3Clipboard.clipboardInputElement.val(" "),_T3Clipboard.clipboardInputElement.focus().select())}static FocusOnIEclipboardDiv(){if(/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent)){_T3Clipboard.IEclipboardDiv.focus();const t=document.createRange();t.selectNodeContents(_T3Clipboard.IEclipboardDiv.get(0));const e=window.getSelection();e.removeAllRanges(),e.addRange(t)}}static OnIECBEvent(t,e){const i=window.clipboardData;if("cut"!==t&&"copy"!==t||(i.setData("Text",this.GetCutCopyText()),this.IEclipboardDiv.html(this.GetCutCopyHTML()),this.FocusOnIEclipboardDiv(),setTimeout((()=>{this.FocusOnClipboardInput(),this.IEclipboardDiv.empty()}),0)),"paste"===t){const t=i.getData("Text");this.IEclipboardDiv.empty(),setTimeout((()=>{const e=this.IEclipboardDiv.html();this.Paste(t,e,T3Gv.opt.imageClipboard),this.IEclipboardDiv.empty(),this.FocusOnClipboardInput()}),0)}}static OnCBEvent(t,e){const i=e.originalEvent.clipboardData;if("cut"!==t&&"copy"!==t||(i.setData("text/plain",this.GetCutCopyText()),i.setData("text/html",this.GetCutCopyHTML())),"paste"===t){const t=i.getData("text/plain"),e=i.getData("text/html");this.Paste(t,e,null)}}static Paste(){/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);const t=_T3Clipboard.GetHTMLAsObject(T3Gv.opt.htmlClipboard);let e=null;if(null!==t&&(e=_T3Clipboard.GetHeaderFromHTML(t)),null===t&&T3Gv.opt.htmlClipboard)return _T3Clipboard.lastCutCopyTimestamp=-1,T3Gv.opt.imageClipboard&&T3Gv.opt.imageClipboard.size>0?T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Image:T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Text,T3Gv.opt.header.ClipboardBuffer=null,T3Gv.opt.header.clipboardJson=null,void ToolActUtil.PasteObjects();null!==e&&ToolActUtil.PasteObjects()}static GetCutCopyText(){/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);const t=T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Text,e=T3Gv.opt.textClipboard;return t&&null!=e?e.text:""}static GetCutCopyHTML(t=""){/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);let e="";if(T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Text&&T3Gv.opt.textClipboard&&(e+=T3Gv.opt.textClipboard?T3Gv.opt.textClipboard.text:""),T3Gv.opt.header.ClipboardType,this.lastCutCopyTimestamp,t&&(e+=`<div>${t}</div>`),T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Text){const t=JSON.stringify(T3Gv.opt.textClipboard),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);e+=base64Js.fromByteArray(i)}if(T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.LM){const t=new Uint8Array(T3Gv.opt.header.ClipboardBuffer);e+=base64Js.fromByteArray(t)}return e+="'/>",e+="</div>",e}static GetHTMLAsObject(t){var e;const i=null==(e=null==t?void 0:t.replace("\x3c!--",""))?void 0:e.replace("--\x3e","");return $$1("<html><body>"+i+"</body></html>")}static GetHeaderFromHTML(t){return""}static IsSameSystemPaste(){return!0}};let T3Clipboard=_T3Clipboard;__publicField(T3Clipboard,"isMobileDevice"),__publicField(T3Clipboard,"isSafariBrowser"),__publicField(T3Clipboard,"isMacOS"),__publicField(T3Clipboard,"isInternetExplorer"),__publicField(T3Clipboard,"isFirefox"),__publicField(T3Clipboard,"isIOSDevice"),__publicField(T3Clipboard,"IEclipboardDiv"),__publicField(T3Clipboard,"clipboardInputElement"),__publicField(T3Clipboard,"lastCutCopyTimestamp");class ToolActUtil{static Undo(t,e){if(LogUtil.Debug("O.Opt Undo - Input:",{restoreSequence:t,cancelModalOperation:e}),e)OptCMUtil.CancelOperation();else if(T3Gv.opt.crtOpt!==OptConstant.OptTypes.None)return LogUtil.Debug("O.Opt Undo - Output:",!1),!1;if(null===T3Gv.state)throw new Error("state is null");if(T3Gv.opt.nudgeOpen&&T3Gv.opt.CloseOpenNudge(),T3Gv.state.currentStateId<=0)return LogUtil.Debug("O.Opt Undo - Output:",!1),!1;const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),n=(i.EnableSpellCheck,ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1));n.layers[n.activelayer].layertype;const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);-1!==s.theActiveTextEditObjectID&&s.theTELastOp!==NvConstant.TextElemLastOpt.Init&&s.theTELastOp!==NvConstant.TextElemLastOpt.Timeout&&s.theTELastOp!==NvConstant.TextElemLastOpt.Select&&(this.FlushTextToLMBlock(),ObjectUtil$1.PreserveUndoState(!1)),Utils1.IsStateOpen(),t&&(T3Gv.currentObjSeqId=T3Gv.state.states[T3Gv.state.currentStateId].currentObjSeqId),T3Gv.state.RestorePrevState(),t||T3Gv.state.AddToHistoryState();const a=T3Gv.state.currentStateId;OptCMUtil.RebuildURLs(a+1,!1),UIUtil.ResizeSVGDocument(),HookUtil.UpdateLineHops(!0);ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).EnableSpellCheck;const o=T3Gv.docUtil.rulerConfig;T3Gv.docUtil.RulersNotEqual(i.rulerConfig,o)&&T3Gv.docUtil.SetRulers(i.rulerConfig,!0),T3Gv.docUtil.PagesNotEqual(i.Page,T3Gv.opt.header.Page)&&(T3Gv.opt.header.Page=Utils1.DeepCopy(i.Page));const r=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==l.theActiveOutlineObjectID&&0===r.length){const t=[];t.push(l.theActiveOutlineObjectID),SelectUtil.SelectObjects(t,!1,!1)}TextUtil.TEUnregisterEvents(!0),T3Gv.opt.noUndo=!0,SvgUtil.RenderAllSVGObjects(),T3Gv.opt.noUndo=!1,-1!==l.theActiveTextEditObjectID&&this.ResetActiveTextEditAfterUndo();const h=SelectUtil.GetTargetSelect();if(h>=0){const t=ObjectUtil$1.GetObjectPtr(h,!1);let e=null;t&&(e=t.GetDimensionsForDisplay(),UIUtil.ShowFrame(!0)),UIUtil.UpdateDisplayCoordinates(e,null,null,t)}else UIUtil.ShowFrame(!1);return SelectUtil.UpdateSelectionAttributes(r),LogUtil.Debug("O.Opt Undo - Output:",!0),!0}static Redo(t){if(LogUtil.Debug("O.Opt Redo - Input:",{shouldCancelModalOperation:t}),null===T3Gv.state)throw new Error("state is null");if(t)OptCMUtil.CancelOperation();else if(T3Gv.state.currentStateId+1>=T3Gv.state.states.length)return LogUtil.Debug("O.Opt Redo - Output: false (already at last state)"),!1;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).EnableSpellCheck;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);-1!==e.theActiveTextEditObjectID&&e.theTELastOp!==NvConstant.TextElemLastOpt.Init&&e.theTELastOp!==NvConstant.TextElemLastOpt.Timeout&&e.theTELastOp!==NvConstant.TextElemLastOpt.Select&&(this.FlushTextToLMBlock(),ObjectUtil$1.PreserveUndoState(!1));const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);i.layers[i.activelayer].layertype,this.RedoDeleteURLs(),Utils1.IsStateOpen(),T3Gv.state.RestoreNextState(),T3Gv.state.AddToHistoryState(),T3Gv.state.currentStateId,OptCMUtil.RebuildURLs(T3Gv.state.currentStateId-1,!0),UIUtil.ResizeSVGDocument(),HookUtil.UpdateLineHops(!0);const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),s=T3Gv.docUtil.rulerConfig;T3Gv.docUtil.RulersNotEqual(n.rulerConfig,s)&&T3Gv.docUtil.SetRulers(n.rulerConfig,!0),T3Gv.docUtil.PagesNotEqual(n.Page,T3Gv.opt.header.Page)&&(T3Gv.opt.header.Page=Utils1.DeepCopy(n.Page));const a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==o.theActiveOutlineObjectID&&0===a.length){const t=[];t.push(o.theActiveOutlineObjectID),SelectUtil.SelectObjects(t,!1,!1)}TextUtil.TEUnregisterEvents(!0),T3Gv.opt.InUndo=!0,SvgUtil.RenderAllSVGObjects(),T3Gv.opt.InUndo=!1,ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),-1!==o.theActiveTextEditObjectID&&this.ResetActiveTextEditAfterUndo();const r=SelectUtil.GetTargetSelect();if(r>=0){const t=ObjectUtil$1.GetObjectPtr(r,!1);let e=null;t&&(e=t.GetDimensionsForDisplay(),UIUtil.ShowFrame(!0)),UIUtil.UpdateDisplayCoordinates(e,null,null,t)}else UIUtil.ShowFrame(!1);const l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);return l.layers[l.activelayer].layertype,SelectUtil.UpdateSelectionAttributes(a),LogUtil.Debug("O.Opt Redo - Output: true"),!0}static RedoDeleteURLs(){const t=T3Gv.state.currentStateId;if(t+1>=T3Gv.state.states.length)return;const e=T3Gv.state.states[t+1],i=e.storedObjects.length;for(let n=0;n<i;n++){const t=e.storedObjects[n];if(t.Type===StateConstant.StoredObjectType.BaseDrawObject)if(t.stateOptTypeId===StateConstant.StateOperationType.DELETE){const e=T3Gv.stdObj.GetObject(t.ID);if(e){const t=e.Data;OptCMUtil.IsBlobURL(t.ImageURL)&&OptCMUtil.DeleteURL(t.ImageURL)}}else{const e=T3Gv.stdObj.GetObject(t.ID);if(e){const i=e.Data;OptCMUtil.IsBlobURL(i.ImageURL)&&t.Data.ImageURL!==i.ImageURL&&OptCMUtil.DeleteURL(i.ImageURL)}}}}static MakeSameSize(t){LogUtil.Debug("O.Opt MakeSameSize - Input:",{sizeOption:t});const e=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,i=e.length;if(i<=1)return void LogUtil.Debug("O.Opt MakeSameSize - Output:","Not enough objects selected");const n=SelectUtil.GetTargetSelect();if(-1===n)return void LogUtil.Debug("O.Opt MakeSameSize - Output:","No target object selected");const s=ObjectUtil$1.GetObjectPtr(n,!1),a=Utils1.DeepCopy(s.Frame),o=a.height,r=a.width;for(let l=0;l<i;++l){const i=e[l];if(i===n)continue;const s=ObjectUtil$1.GetObjectPtr(i,!0),a=Utils1.DeepCopy(s.Frame);switch(t){case 1:s.SetSize(null,o,0);break;case 2:s.SetSize(r,null,0);break;case 3:s.SetSize(r,o,0)}if(T3Gv.docUtil.docConfig.centerSnap&&T3Gv.docUtil.docConfig.enableSnap||!1===T3Gv.docUtil.docConfig.enableSnap){const t=(s.Frame.width-a.width)/2,e=(s.Frame.height-a.height)/2;(t||e)&&this.OffsetShape(i,-t,-e,0)}s.rflags&&(s.rflags=Utils2.SetFlag(s.rflags,NvConstant.FloatingPointDim.Width,!1),s.rflags=Utils2.SetFlag(s.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(i,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(i)}DrawUtil.CompleteOperation(),LogUtil.Debug("O.Opt MakeSameSize - Output:","Completed")}static FlipShapes(t){LogUtil.Debug("O.Opt FlipShapes - Input:",{flipType:t});const e=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,i=e.length;if(0!==i){let s,a=0,o=null,r=!1;for(s=t===OptConstant.ExtraFlags.FlipVert?OptConstant.ExtraFlags.FlipHoriz:OptConstant.ExtraFlags.FlipVert,a=0;a<i;a++)if(o=ObjectUtil$1.GetObjectPtr(e[a],!1),o.NoFlip()){r=!0;break}if(r);else{for(a=0;a<i;a++)o=ObjectUtil$1.GetObjectPtr(e[a],!0),OptCMUtil.SetLinkFlag(e[a],DSConstant.LinkFlags.Move),o.hooks.length&&OptCMUtil.SetLinkFlag(o.hooks[0].objid,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(e[a]),n=o,!(Math.abs(n.RotationAngle%180)<20)&&Math.abs(n.RotationAngle%90)<20?o.Flip(s):o.Flip(t);DrawUtil.CompleteOperation()}}var n;LogUtil.Debug("O.Opt FlipShapes - Output: completed")}static FlipVertexArray(t,e){LogUtil.Debug("O.Opt FlipVertexArray - Input:",{vertices:t,flipFlags:e});const i=t.length;for(let n=0;n<i;n++)e&OptConstant.ExtraFlags.FlipHoriz&&(t[n].x=1-t[n].x),e&OptConstant.ExtraFlags.FlipVert&&(t[n].y=1-t[n].y);return LogUtil.Debug("O.Opt FlipVertexArray - Output:",t),t}static SendToBackOf(){LogUtil.Debug("O.Opt SendToBackOf - Input: no parameters");const t=LayerUtil.GetFrontBackLayersForSelected();t.result&&this.SendToBackOfSpecificLayer(t.backmostindex),LogUtil.Debug("O.Opt SendToBackOf - Output: completed")}static SendToBackOfSpecificLayer(t,e){LogUtil.Debug("O.Opt SendToBackOfSpecificLayer - Input:",{targetLayerIndex:t,updateSelectedBlock:e});let i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data;if(0!==i.length){const n=T3Gv.opt.AddAssoctoList(i,!0);let s=n.length;if(0!==s){const i=LayerUtil.VisibleZList();if(i.length>=1){const a=[];for(let t=0;t<s;t++){const e=n[t],s=$$1.inArray(e,i);a.push(s)}a.sort(((t,e)=>t-e));const o=LayerUtil.ZListPreserveForLayer(t),r=[];for(let t=0;t<s;t++){const e=i[a[t]];r.push(e)}for(let t=r.length-1;t>=0;t--){const e=r[t];LayerUtil.RemoveFromAllZLists(e),o.unshift(e)}if(HookUtil.UpdateLineHops(!0),null==e){T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId).Data=n}SvgUtil.RenderAllSVGObjects(),DrawUtil.CompleteOperation()}}}LogUtil.Debug("O.Opt SendToBackOfSpecificLayer - Output: completed")}static PasteObjects(t){LogUtil.Debug("O.Opt PasteObjects - Input:",t);try{let t;if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID||T3Gv.opt.bInNoteEdit){if(T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text){if(T3Clipboard.isInternetExplorer){const t=T3Gv.opt.textClipboard.text.length;t>=2&&"\r"===T3Gv.opt.textClipboard.text[t-2]&&"\n"===T3Gv.opt.textClipboard.text[t-1]&&(T3Gv.opt.textClipboard.text=T3Gv.opt.textClipboard.text.slice(0,-2))}t=T3Gv.opt.svgDoc.GetActiveEdit(),t&&(TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Paste),t.Paste(T3Gv.opt.textClipboard,!0),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout))}return void LogUtil.Debug("O.Opt PasteObjects - Output: Text pasted in text editor")}if(T3Gv.opt.bInDimensionEdit)return T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text&&(t=T3Gv.opt.svgDoc.GetActiveEdit(),t&&t.Paste(T3Gv.opt.textClipboard,!0)),void LogUtil.Debug("O.Opt PasteObjects - Output: Text pasted in dimension editor");if(T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text&&"\r\n"!==T3Gv.opt.textClipboard.text&&-1!==SelectUtil.GetTargetSelect())return TextUtil.TargetPasteText(),void LogUtil.Debug("O.Opt PasteObjects - Output: Text pasted to target");if(T3Gv.opt.imageClipboard&&T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Image)return T3Gv.opt.SetBackgroundImage(T3Gv.opt.imageClipboard,0),void LogUtil.Debug("O.Opt PasteObjects - Output: Image pasted as background");T3Gv.opt.CloseEdit(!1),T3Gv.opt.header.ClipboardBuffer&&T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.LM?(this.PasteLM(T3Gv.opt.header.ClipboardBuffer,T3Gv.opt.header.clipboardJson),LogUtil.Debug("O.Opt PasteObjects - Output: LM content pasted")):(this.PasteLM(T3Gv.opt.header.ClipboardBuffer,T3Gv.opt.header.clipboardJson),LogUtil.Debug("O.Opt PasteObjects - Output: No pasteable content found"))}catch(e){throw LogUtil.Debug("O.Opt PasteObjects - Error:",e),e}}static DeleteSelectedObjects(){this.DeleteSelectedObjectsCommon()}static DeleteSelectedObjectsCommon(t,e,i,n){LogUtil.Debug("O.Opt DeleteSelectedObjectsCommon - Input:",{objectIds:t,suppressCompleteOperation:e,preserveSelection:i,suppressCollabMessage:n});let s=0;if(t&&(s=t.length),SelectUtil.AreSelectedObjects()||0!==s){i||T3Gv.opt.CloseEdit();let n,s=OptAhUtil.GetNextSelect(),a=[];const o=T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId).Data,r=t||o;return n=T3Gv.opt.AddtoDelete(r,!1,null),n>=0&&(s=n),r.length,ObjectUtil$1.DeleteObjects(r,!1),i||(o.splice(0),s>=0?a.push(s):SelectUtil.SetTargetSelect(-1,!0)),e||DrawUtil.CompleteOperation(a),LogUtil.Debug("O.Opt DeleteSelectedObjectsCommon - Output:",!0),!0}}static AlignShapes(t){let e,i;LogUtil.Debug("O.Opt AlignShapes - Input:",{alignmentType:t});let n=!1;const s=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,a=s.length;if(0!==a){const o=SelectUtil.GetTargetSelect();let r=null,l=0;if(-1!==o){const h=ObjectUtil$1.GetObjectPtr(o,!1);let c,u;r=h.GetAlignRect(),l=h.StyleRecord.Line.Thickness;let d=null;for(let p=0;p<a;++p)if(s[p]!==o&&(u=null,d=ObjectUtil$1.GetObjectPtr(s[p],!1),!d.hooks.length)){switch(n=!0,d=ObjectUtil$1.GetObjectPtr(s[p],!0),d.FramezList&&d.FramezList.length&&(u=d.FramezList),OptCMUtil.SetLinkFlag(s[p],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(s[p],!0),c=d.GetAlignRect(),t){case"lefts":e=r.x-l/2-(c.x-d.StyleRecord.Line.Thickness/2),i=0;break;case"centers":e=r.x+r.width/2-c.width/2-c.x,i=0;break;case"rights":e=r.x+r.width+l/2-(c.x+c.width+d.StyleRecord.Line.Thickness/2),i=0;break;case"tops":i=r.y-l/2-(c.y-d.StyleRecord.Line.Thickness/2),e=0;break;case"middles":i=r.y+r.height/2-c.height/2-c.y,e=0;break;case"bottoms":i=r.y+r.height+l/2-(c.y+c.height+d.StyleRecord.Line.Thickness/2),e=0;break;default:e=0,i=0}d.OffsetShape(e,i,u),e=0,i=0,d.r.x<0&&(e=-d.r.x),d.r.y<0&&(i=-d.r.y),(e||i)&&d.OffsetShape(e,i)}n?DrawUtil.CompleteOperation():LogUtil.Debug("O.Opt AlignShapes - Output: AlignHooked & UnBlockMessages")}}LogUtil.Debug("O.Opt AlignShapes - Output:",{alignmentPerformed:n})}static RotateShapes(t,e){LogUtil.Debug("O.Opt RotateShapes - Input:",{angleDegrees:t,selectionOverride:e});let i,n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e&&(n=e);let a=n.length;if(0!==a){let o,r,l,h=0,c=0;for(h=0;h<a&&(i=ObjectUtil$1.GetObjectPtr(n[h],!1),!i.NoRotate());h++);if(i&&i.NoRotate())LogUtil.Debug("O.Opt RotateShapes - NoRotate");else{for(h=0;h<n.length;h++)if(i=ObjectUtil$1.GetObjectPtr(n[h],!1),i instanceof Instance.Shape.PolyLineContainer){let t=i.GetListOfEnclosedObjects(!1);t.length>0&&(DrawUtil.AllowGroup(t)||LogUtil.Debug("O.Opt RotateShapes - GroupNotAllowed"),T3Gv.opt.IsLinkedOutside(t)&&LogUtil.Debug("O.Opt RotateShapes - LinkedOutside"),T3Gv.opt.IsGroupNonDelete()&&LogUtil.Debug("O.Opt RotateShapes - GroupNonDelete"))}for(h=0;h<n.length;h++)if(i=ObjectUtil$1.GetObjectPtr(n[h],!0),i instanceof Instance.Shape.PolyLine&&i.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),i instanceof Instance.Shape.PolyLineContainer){if(OptCMUtil.SetLinkFlag(n[h],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(n[h]),r=i.RotateAllInContainer(i.BlockID,t),r&&r.length)for(c=n.length-1;c>=0;c--)r.indexOf(n[c])>=0&&n[c]!==i.BlockID&&n.splice(c,1);if(i instanceof Instance.Shape.PolyLineContainer||i.objecttype===NvConstant.FNObjectTypes.FlWall)for(c=n.length-1;c>=0;c--)l=ObjectUtil$1.GetObjectPtr(n[c],!1),l&&l.hooks.length&&l.hooks[0].objid===i.BlockID&&n.splice(c,1)}for(a=n.length,h=0;h<a;h++)if(i=ObjectUtil$1.GetObjectPtr(n[h],!0),!(i instanceof Instance.Shape.PolyLineContainer))if(OptCMUtil.SetLinkFlag(n[h],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(n[h]),i instanceof Instance.Shape.BaseLine)if(i instanceof Instance.Shape.PolyLine){let e={x:i.Frame.x+i.Frame.width/2,y:i.Frame.y+i.Frame.height/2};o=2*Math.PI*((360-t)/360);let n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils3.RotatePointsAboutPoint(e,o,n);let s=n.length;for(i.StartPoint.x=n[0].x,i.StartPoint.y=n[0].y,c=0;c<s;c++)i.polylist.segs[c].pt.x=n[c].x-i.StartPoint.x,i.polylist.segs[c].pt.y=n[c].y-i.StartPoint.y;i.EndPoint.x=n[s-1].x,i.EndPoint.y=n[s-1].y,i.CalcFrame()}else{T3Gv.opt.ob=Utils1.DeepCopy(i);let e=(i.StartPoint.x+i.EndPoint.x)/2,n=(i.StartPoint.y+i.EndPoint.y)/2,s=Math.sqrt(Math.pow(i.EndPoint.x-i.StartPoint.x,2)+Math.pow(i.EndPoint.y-i.StartPoint.y,2));o=2*Math.PI*(t/360),s/=2,i.StartPoint.x=e-Math.cos(o)*s,i.StartPoint.y=n-Math.sin(o)*s,i.EndPoint.x=e+Math.cos(o)*s,i.EndPoint.y=n+Math.sin(o)*s,i.AfterRotateShape(i.BlockID),T3Gv.opt.ob={}}else if(i.RotationAngle=t,i.UpdateFrame(i.Frame),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){let t=i.r.x+i.r.width,e=i.r.y+i.r.height,n=0,a=0;t>s.dim.x&&(n=s.dim.x-t),e>s.dim.y&&(a=s.dim.y-e),i.r.x<0&&(n=-i.r.x),i.r.y<0&&(a=-i.r.y),(n||a)&&i.OffsetShape(n,a)}null==e&&DrawUtil.CompleteOperation()}}LogUtil.Debug("O.Opt RotateShapes - Output: Rotation applied on selection, remaining count:",n.length)}static DuplicateObjects(t,e){LogUtil.Debug("O.Opt DuplicateObjects - Input:",{fromMove:t,editOverride:e});const i={selectedList:[]};if(T3Gv.opt.CloseEdit(),SelectUtil.AreSelectedObjects()){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!T3Gv.opt.lastOpDuplicate&&!e);t?(n.dupdisp.x=0,n.dupdisp.y=0):e?(n.dupdisp.x=e.Data.dupdisp.x,n.dupdisp.y=e.Data.dupdisp.y):T3Gv.opt.lastOpDuplicate||(n.dupdisp.x=50,n.dupdisp.y=50);const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);e||(Utils1.DeepCopy(n.dupdisp),Utils1.DeepCopy(s),Utils1.DeepCopy(n.tselect));const a=this.CopyObjectsCommon(!0);if(a&&a.buffer){const s=ObjectUtil$1.GetObjectPtr(a.zList[0],!1).Frame;ShapeUtil.ReadSymbolFromBuffer(a.buffer,s.x+n.dupdisp.x,s.y+n.dupdisp.y,0,!1,!0,i,!t,!1,!1,!1,!1),t||(DrawUtil.CompleteOperation(i.selectedList),e||(T3Gv.opt.lastOpDuplicate=!0))}}return LogUtil.Debug("O.Opt DuplicateObjects - Output:",i.selectedList),i.selectedList}static CopyObjects(){LogUtil.Debug("O.Opt CopyObjects - Input:");let t;if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID||T3Gv.opt.bInNoteEdit||T3Gv.opt.bInDimensionEdit){const e=T3Gv.opt.svgDoc.GetActiveEdit();if(e){const t=e.Copy(!0);t&&(T3Gv.opt.textClipboard=t),T3Gv.opt.header.ClipboardBuffer=null,T3Gv.opt.header.clipboardJson=null,T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Text}return t=T3Gv.opt.textClipboard,LogUtil.Debug("O.Opt CopyObjects - Output:",t),t}if(!SelectUtil.AreSelectedObjects())return void LogUtil.Debug("O.Opt CopyObjects - Output: No selected objects");T3Gv.opt.CloseEdit(),this.CopyObjectsCommon(!1),T3Gv.opt.textClipboard=null;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);return SelectUtil.UpdateSelectionAttributes(e),t=T3Gv.opt.header.ClipboardBuffer,t=T3Gv.opt.header.clipboardJson,LogUtil.Debug("O.Opt CopyObjects - Output:",t),t}static PasteLM(t,e){LogUtil.Debug("O.Opt PasteLM - Input:",t);const i={selectedList:[]},n=T3Gv.opt.PastePoint||this.GetPastePosition();return ShapeUtil.ReadSymbolFromBuffer(t,n.x,n.y,0,!1,!0,i,!0,!1,!1,!1,!1),T3Gv.opt.PastePoint=null,DrawUtil.CompleteOperation(i.selectedList),LogUtil.Debug("O.Opt PasteLM - Output:",i.selectedList),i.selectedList}static GetPastePosition(){LogUtil.Debug("= u.ToolActUtil: GetPastePosition/ - Input: no parameters");const t=100,e=T3Gv.docUtil.svgDoc.GetWorkArea();let i=T3Gv.docUtil.svgDoc.docInfo.docToScreenScale;null!=i&&0!==i||(i=1);let n={x:(e.scrollX+t)/i,y:(e.scrollY+t)/i};return e.scrollX===T3Gv.opt.topLeftPasteScrollPos.x&&e.scrollY===T3Gv.opt.topLeftPasteScrollPos.y?(n=T3Gv.opt.topLeftPastePos,n.x+=50,n.y+=50,T3Gv.opt.pasteCount++,T3Gv.opt.pasteCount>5&&(T3Gv.opt.pasteCount=0,n={x:(e.scrollX+t)/i,y:(e.scrollY+t)/i})):T3Gv.opt.pasteCount=0,T3Gv.opt.topLeftPastePos={x:n.x,y:n.y},T3Gv.opt.topLeftPasteScrollPos={x:e.scrollX,y:e.scrollY},LogUtil.Debug("O.Opt GetPastePosition - Output:",n),n}static CutObjects(t){LogUtil.Debug("O.Opt CutObjects - Input:",{isFromCutButton:t});try{if(T3Gv.opt.cutFromButton&&t)return T3Gv.opt.cutFromButton=!1,void LogUtil.Debug("O.Opt CutObjects - Output:","Cut cancelled due to active cut button state.");T3Gv.opt.cutFromButton=!t;if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID||T3Gv.opt.bInNoteEdit||T3Gv.opt.bInDimensionEdit){const t=T3Gv.opt.svgDoc.GetActiveEdit();return t&&(T3Gv.opt.textClipboard=t.Copy(!0),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Cut),t.Delete(),T3Gv.opt.header.ClipboardBuffer=null,T3Gv.opt.header.clipboardJson=null,T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Text,TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)),void LogUtil.Debug("O.Opt CutObjects - Output:","Text cut completed.")}if(!SelectUtil.AreSelectedObjects())return void LogUtil.Debug("O.Opt CutObjects - Output:","No selected objects to cut.");T3Gv.opt.CloseEdit(),this.CopyObjectsCommon(!1),this.DeleteSelectedObjectsCommon(),LogUtil.Debug("O.Opt CutObjects - Output:","Graphic objects cut completed.")}catch(e){throw T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("O.Opt CutObjects - Output:","Error occurred during cut operation."),e}}static CopyObjectsCommon(t){LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - Input:",{returnBuffer:t});const e=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data;T3Gv.opt.AddtoDelete(e,!0,{connectors:!1});const i=LayerUtil.ZList(),n=e.length;if(0!==n){const t=[];for(let o=0;o<n;o++){const n=e[o],s=$$1.inArray(n,i);t.push(s)}t.sort(((t,e)=>t-e));const s=[];for(let e=0;e<n;e++){const n=i[t[e]];s.push(n)}T3Gv.opt.header.ClipboardBuffer=ShapeUtil.WriteSelect(s,!1,!0,!1),LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - ClipboardType: ",T3Gv.opt.header.ClipboardType);const a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);for(let e=a.length-1;e>=0;e--){const t=ObjectUtil$1.GetObjectPtr(a[e],!1);t&&t.flags&NvConstant.ObjFlags.NotVisible&&a.splice(e,1)}LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - Output: Clipboard updated")}else LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - Output: No objects selected");return{buffer:T3Gv.opt.header.ClipboardBuffer,zList:i}}static UngroupShape(t,e){LogUtil.Debug("O.Opt UngroupShape - Input:",{groupId:t,maintainLinksFlag:e});let i,n,s,a=[],o=[],r=[],l=null,h=null,c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);const u=OptConstant.ExtraFlags.FlipVert,d=OptConstant.ExtraFlags.FlipHoriz,p=ObjectUtil$1.GetObjectPtr(t,!0),g=p.Frame,f={x:g.x+g.width/2,y:g.y+g.height/2},b=p.ShapesInGroup,v=b.length;if(0===v)return void LogUtil.Debug("O.Opt UngroupShape - Output: No shapes in group");const m=g.x,y=g.y;let S=g.width/p.InitialGroupBounds.width;isNaN(S)&&(S=1);let w=g.height/p.InitialGroupBounds.height;for(isNaN(w)&&(w=1),LayerUtil.ZListPreserve(),i=0;i<v;++i){const t=ObjectUtil$1.GetObjectPtr(b[i],!0);if(t.commentId>=0&&a.push(t.commentId),t instanceof Instance.Shape.ShapeContainer&&o.push(t.BlockID),l=new Instance.Shape.BaseDrawObject(null),l=Utils1.DeepCopy(t),l.Frame.x+=m,l.Frame.y+=y,t.StartPoint&&(l.StartPoint.x+=m,l.StartPoint.y+=y),t.EndPoint&&(l.EndPoint.x+=m,l.EndPoint.y+=y),r.push(l),t instanceof Instance.Shape.GroupSymbol&&t.NativeID<0&&t.ConvertToNative(T3Gv.opt.richGradients,!1),t.ScaleObject(m,y,f,p.RotationAngle,S,w,!0),n=0,p.extraflags&u&&t.Flip(u),p.extraflags&d&&(n=g.width-(t.Frame.x+t.Frame.width-g.x)-t.Frame.x+g.x,t.Flip(d)),n&&t.OffsetShape(n,0),-1!==t.DataID&&1!==w){const e=ObjectUtil$1.GetObjectPtr(t.DataID,!0).runtimeText.styles,i=e.length;for(s=0;s<i;++s)e[s].size*=w}t.bInGroup=!1,ObjectUtil$1.AddToDirtyList(b[i]),T3Gv.opt.RebuildLinks(c,b[i])}for(LayerUtil.InsertObjectsIntoLayerAt(t,b),i=0;i<r.length;i++){T3Gv.opt.ob=r[i],h=ObjectUtil$1.GetObjectPtr(r[i].BlockID,!1);const t=!!e&&2;HookUtil.MaintainLink(r[i].BlockID,h,T3Gv.opt.ob,OptConstant.ActionTriggerType.Flip,t)}T3Gv.opt.ob={};const x=o.length;for(i=0;i<x;i++)OptCMUtil.SetLinkFlag(o[i],DSConstant.LinkFlags.Move);T3Gv.opt.UpdateLinks(),p.ShapesInGroup=[],ObjectUtil$1.DeleteObjects([t],!1),a.length&&T3Gv.opt.CommentUngroup(a),SvgUtil.RenderDirtySVGObjects(),LogUtil.Debug("O.Opt UngroupShape - Output: Successfully ungrouped",v,"shapes")}static GroupSelected(t,e,i,n,s){ToolAct2Util.GroupSelectedShapes(t,e,i,n,s)}static UnGroupSelected(){ToolAct2Util.UngroupSelectedShapes()}static RotateRect(t,e,i){LogUtil.Debug("O.Opt RotateRect - Input:",{rectangle:t,centerPoint:e,angleDegrees:i});const n=[],s={x:0,y:0,width:0,height:0};if(n.push(new Point$1(t.x,t.y)),n.push(new Point$1(t.x+t.width,t.y)),n.push(new Point$1(t.x+t.width,t.y+t.height)),n.push(new Point$1(t.x,t.y+t.height)),n.push(new Point$1(t.x,t.y)),n&&n.length){if(i){const s=-2*Math.PI*(i/360);e.x=(t.x+t.x+t.width)/2,e.y=(t.y+t.y+t.height)/2,Utils3.RotatePointsAboutPoint(e,s,n)}Utils2.GetPolyRect(s,n)}return LogUtil.Debug("O.Opt RotateRect - Output:",s),s}static RotateRectAboutCenter(t,e,i){LogUtil.Debug("O.Opt RotateRectAboutCenter - Input:",{rectangle:t,centerPoint:e,angleDegrees:i});const n=[],s={x:0,y:0,width:0,height:0};if(n.push(new Point$1(t.x,t.y)),n.push(new Point$1(t.x+t.width,t.y)),n.push(new Point$1(t.x+t.width,t.y+t.height)),n.push(new Point$1(t.x,t.y+t.height)),n.push(new Point$1(t.x,t.y)),n&&n.length){if(i){const t=-2*Math.PI*(i/360);Utils3.RotatePointsAboutPoint(e,t,n)}Utils2.GetPolyRect(s,n)}return LogUtil.Debug("O.Opt RotateRectAboutCenter - Output:",s),s}static OffsetShape(t,e,i,n){LogUtil.Debug("O.Opt OffsetShape - Input:",{shapeId:t,offsetX:e,offsetY:i,hasAutoGrowSettings:!!n});let s={x:0,y:0},a=T3Gv.stdObj.PreserveBlock(t);DrawUtil.InitializeAutoGrowDrag(n);let o=a.Data;o.OffsetShape(e,i),s.x=o.r.x+o.r.width,s.y=o.r.y+o.r.height,DrawUtil.DoAutoGrowDrag(s),(e||i)&&(OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t,!0)),LogUtil.Debug("O.Opt OffsetShape - Output: Shape offset applied",s)}}__publicField(ToolActUtil,"rflags");class OptAhUtil{static GetGvSviOpt(t,e){return T3Gv.wallOpt}static FindTreeTop(t,e,i){if(!t)return i.foundtree;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line)return!1;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?(i.topconnector=t.BlockID,i.foundtree=!0,e&&OptCMUtil.SetLinkFlag(t.BlockID,e)):(i.topshape=t.BlockID,null!=i.level&&i.level++,e&&OptCMUtil.SetLinkFlag(t.BlockID,e)),t.hooks.length)if(t.hooks[0].objid===t.BlockID)t.hooks.splice(0,1);else{const n=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1);n&&this.FindTreeTop(n,e,i)}else if(i.foundtree){if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){const t=T3Gv.opt.FindChildArray(i.topshape,-1);t>=0&&(i.secondconnector=t)}}else{const n=T3Gv.opt.FindChildArray(t.BlockID,-1);n>=0&&(i.topconnector=n,i.foundtree=!0,e&&OptCMUtil.SetLinkFlag(n,e))}return i.foundtree}static SelectContainerParent(t){const e=ObjectUtil$1.GetObjectPtr(t,!1);return e&&e instanceof Instance.Shape.ShapeContainer&&e.hooks.length&&null!=e.hooks[0].cellid?e.hooks[0].objid:t}static ShapeCannotHaveActionButtons(t){return!0}static GetNextSelect(){const t=SelectUtil.GetTargetSelect(),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let i=-1;if(t>=0){const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.hooks.length){const s=n.hooks[0].objid,a=ObjectUtil$1.GetObjectPtr(s,!1);if(a&&a.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){if(a.IsFlowChartConnector())return-1;i=OptAhUtil.GetConnectorNextSelect(a,t,e)}else if(a&&a instanceof Instance.Shape.ShapeContainer){const e=a.ContainerList,n=e.List,s=e.flags&NvConstant.ContainerListFlags.Sparse,o=n.length;let r=-1;for(let i=0;i<o;i++)if(n[i].id===t){r=i;break}if(s){if(i>=0)return i;if(i<0){for(let t=r-1;t>=0;t--)if(n[t].id>=0)return n[t].id;for(let t=r+1;t<o;t++)if(n[t].id>=0)return n[t].id}}else r>=0&&(r>0?i=n[r-1].id:o>1&&(i=n[r+1].id))}return i}const s=T3Gv.opt.FindChildArray(t,-1);s>=0&&ObjectUtil$1.GetObjectPtr(s,!1)}return i}static GetParentConnector(t,e){let i=-1;const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.hooks.length){const t=n.hooks[0].objid;if(t>=0){const s=ObjectUtil$1.GetObjectPtr(t,!1);s&&s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(i=t,e&&(e.x=n.hooks[0].connect.x,e.y=n.hooks[0].connect.y))}}return i}static HasContainerParent(t){if(t&&t.hooks.length){const e=t.hooks[0].objid,i=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i instanceof Instance.Shape.ShapeContainer)return e}return!1}static ShiftConnectedShapes(t,e,i,n,s,a,o){let r,l,h,c,u=[],d=[],p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),g=OptConstant.ActionArrow;OptAhUtil.GetLineTree(e,i,u),r=OptAhUtil.FilterChartShapes(t,n,u,s);let f,b=0,v=0,m=ObjectUtil$1.GetObjectPtr(i,!1),y=ObjectUtil$1.GetObjectPtr(t,!1);if(s&&null!=a){let t=ObjectUtil$1.GetObjectPtr(a,!1);if(t)if(t.flags&NvConstant.ObjFlags.UseConnect&&t.ConnectPoints){let e=Utils1.DeepCopy(t);f=e.AdjustAutoInsertShape(e.Frame,n===g.Up||n===g.Down,!0)?{width:e.Frame.height,height:e.Frame.width}:t.Frame}else f=t.Frame}switch(null==f&&(f=y.Frame),n){case g.Right:null!=o?(b=o,c=20):(b=f.width+p.def.h_arraywidth,c=p.def.g_arraywidth),h=Math.abs(m.EndPoint.x-m.StartPoint.x),!s&&h-b<c&&(b=h-c);break;case g.Left:b=null!=o?o:f.width+p.def.h_arraywidth,h=Math.abs(m.EndPoint.x-m.StartPoint.x),!s&&h-b<p.def.h_arraywidth&&(b=h-p.def.h_arraywidth),b=-b;break;case g.Down:null!=o?(v=o,c=20):(v=f.height+p.def.v_arraywidth,c=p.def.v_arraywidth),h=Math.abs(m.EndPoint.y-m.StartPoint.y),!s&&h-v<c&&(v=h-c);break;case g.Up:v=null!=o?o:f.height+p.def.v_arraywidth,h=Math.abs(m.EndPoint.y-m.StartPoint.y),!s&&h-v<p.def.v_arraywidth&&(v=h-p.def.v_arraywidth),v=-v}if(!s&&(b=-b,v=-v,OptAhUtil.GetLineTree(e,-1,d),l=OptAhUtil.FilterChartShapes(t,n,d,s),l.remainframe&&r.shiftframe)){r.shiftframe.x+=b,r.shiftframe.y+=v;const t=20;switch(n){case g.Right:if(r.shiftframe.x<l.remainframe.x+l.remainframe.width+t)return-1;break;case g.Left:if(r.shiftframe.x+r.shiftframe.width+t>l.remainframe.x)return-1;break;case g.Down:if(r.shiftframe.y<l.remainframe.y+l.remainframe.height+t)return-1;break;case g.Up:if(r.shiftframe.y+r.shiftframe.height+t>l.remainframe.y)return-1}}let S=r.newlist,w=S.length;for(let x=0;x<w;x++)ToolActUtil.OffsetShape(S[x],b,v,0)}static GetLineTree(t,e,i){i.indexOf(t)<0&&i.push(t);const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.hooks.length&&i.indexOf(n.hooks[0].objid)<0){const e=ObjectUtil$1.GetObjectPtr(n.hooks[0].objid,!1);if(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)OptAhUtil.GetConnectorTree(e.BlockID,i,!0);else{let s=t;switch(e.objecttype){case ShapeConstant.ObjectTypes.NgTimeLine:s=n.hooks[0].objid;break;case ShapeConstant.ObjectTypes.NgEvent:e.hooks.length>0&&(s=e.hooks[0].objid)}i.indexOf(s)<0&&i.push(s)}}const s=HookUtil.FindAllChildConnectors(t);for(let r=0;r<s.length;r++)i.indexOf(s[r])<0&&OptAhUtil.GetConnectorTree(s[r],i,!0);let a;const o=T3Gv.opt.FindAllChildLines(t);for(let r=0;r<o.length;r++)if(o[r]!==e&&i.indexOf(o[r])<0){i.push(o[r]);const e=ObjectUtil$1.GetObjectPtr(o[r],!1);if(e&&2===e.hooks.length)for(let n=0;n<2;n++){const s=e.hooks[n].objid;if(s!==t){const t=ObjectUtil$1.GetObjectPtr(s,!1);t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&OptAhUtil.GetLineTree(s,o[r],i)}}else e.objecttype===ShapeConstant.ObjectTypes.NgEvent&&(a=e.associd,a>=0&&i.indexOf(a)<0&&i.push(a))}}static FilterChartShapes(t,e,i,n){let s,a,o=ObjectUtil$1.GetObjectPtr(t,!1),r=[],l=OptConstant.ActionArrow;if(o){let h,c,u,d,p=i.length,g=o.Frame.x+o.Frame.width,f=o.Frame.y+o.Frame.height;for(h=0;h<p;h++)if(u=i[h],u!==t&&(c=ObjectUtil$1.GetObjectPtr(u,!1),c&&c.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)){switch(d=!1,e){case l.Right:c.Frame.x>g&&(r.push(u),d=!0);break;case l.Left:c.Frame.x+c.Frame.width<o.Frame.x&&(r.push(u),d=!0);break;case l.Down:c.Frame.y>f&&(r.push(u),d=!0);break;case l.Up:c.Frame.y+c.Frame.height<o.Frame.y&&(r.push(u),d=!0);break;default:r.push(u),d=!0}n||(d?null==s?s=Utils1.DeepCopy(c.r):Utils2.UnionRect(s,c.r,s):null==a?a=Utils1.DeepCopy(c.r):Utils2.UnionRect(a,c.r,a))}}return{newlist:r,shiftframe:s,remainframe:a}}static GetConnectorTree(t,e,i){e.indexOf(t)<0&&e.push(t);const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.arraylist){const t=n.arraylist.hook.length;for(let s=1;s<t;s++){const t=n.arraylist.hook[s].id;if(t>=0){if(e.indexOf(t)<0){e.push(t);const i=ObjectUtil$1.GetObjectPtr(t,!1);i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&OptAhUtil.GetConnectorTree(t,e)}const n=HookUtil.FindAllChildConnectors(t),s=n.length;for(let t=0;t<s;t++)this.GetConnectorTree(n[t],e,i);if(i){const i=T3Gv.opt.FindAllChildLines(t),n=i.length;for(let s=0;s<n;s++)if(e.indexOf(i[s])<0){e.push(i[s]);const n=ObjectUtil$1.GetObjectPtr(i[s],!1);if(n&&2===n.hooks.length)for(let a=0;a<2;a++){const o=n.hooks[a].objid;if(o!==t){const t=ObjectUtil$1.GetObjectPtr(o,!1);t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&OptAhUtil.GetLineTree(o,i[s],e)}}}}}}}}}class SelectUtil{static SelectObjectFromClick(t,e,i){LogUtil.Debug("O.Opt SelectObjectFromClick - Input:",{event:t,svgElement:e,preserveSelection:i}),OptCMUtil.CancelOperation();if(0===LayerUtil.ActiveVisibleZList().length)return LogUtil.Debug("O.Opt SelectObjectFromClick - Output: false (no visible objects)"),!1;if(null===e)return LogUtil.Debug("O.Opt SelectObjectFromClick - Output: false (no SVG element)"),!1;const n=e.GetID(),s=ObjectUtil$1.GetObjectPtr(n,!1);if(!(s&&s instanceof Instance.Shape.BaseDrawObject))return LogUtil.Debug("O.Opt SelectObjectFromClick - Output: false (not a drawing object)"),!1;let a=t.gesture.srcEvent.shiftKey||t.gesture.srcEvent.ctrlKey||T3Constant.DocContext.SelectionToolMultiple;t.gesture.srcEvent.ctrlKey&&t.gesture.srcEvent.metaKey&&(a=!1);const o=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data.indexOf(n);let r=[];return r.push(n),-1==o?(this.SelectObjects(r,a,!1),LogUtil.Debug("O.Opt SelectObjectFromClick - Output: true (object selected)"),!0):!a||(this.SelectObjects(r,a,!1),!!i)}static SelectObjects(t,e,i){LogUtil.Debug("O.Opt SelectObjects - Input:",{objectsToSelect:t,isMultipleSelection:e,preserveSelectionState:i});let n=-1;if(t&&t.length>0){-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID&&TextUtil.DeactivateTextEdit(!1,!0);const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,i);if(n=SelectUtil.GetTargetSelect(),e||(T3Gv.opt.SetDimensionVisibility(s,!1),s.length=0),n>=0){const t=s.indexOf(n);e?t>=0&&(n=-1):t<0&&(n=-1)}for(let i=0;i<t.length;i++){let a=t[i];if(ObjectUtil$1.GetObjectPtr(a,!1)){const t=s.indexOf(a);if(-1===t)n<0&&(n=a),s.push(a);else if(e){const e=ObjectUtil$1.GetObjectPtr(a,!1);e&&e.ShowOrHideDimensions(!1),s.splice(t,1)}}}if(n>=0){s.indexOf(n)<0&&(n=-1)}n<0&&s.length>0&&(n=s[0]),SelectUtil.SetTargetSelect(n,i),T3Gv.opt.lastOpDuplicate=!1,this.UpdateSelectionAttributes(s),SvgUtil.HideAllSVGSelectionStates(),SvgUtil.RenderAllSVGSelectionStates()}return LogUtil.Debug("O.Opt SelectObjects - Output:",{selectedIndex:n,selectedCount:(null==t?void 0:t.length)||0}),n}static GetTargetSelect(){LogUtil.Debug("O.Opt GetTargetSelect - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let e=-1;if(t.tselect>=0){const i=ObjectUtil$1.GetObjectPtr(t.tselect,!1);i&&i instanceof Instance.Shape.BaseDrawObject&&(e=t.tselect)}return LogUtil.Debug("O.Opt GetTargetSelect - Output:",e),e}static SetTargetSelect(t,e){LogUtil.Debug("O.Opt SetTargetSelect - Input:",{targetId:t,preserveSession:e});let i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,e);i.tselect=t;let n=null;if(t>0){const e=ObjectUtil$1.GetObjectPtr(t,!1);e&&e instanceof Instance.Shape.BaseDrawObject?n=e.GetDimensionsForDisplay():(t=-1,i.tselect=t)}n?(UIUtil.ShowFrame(!0),UIUtil.UpdateDisplayCoordinates(n,null,null,null)):UIUtil.ShowFrame(!1),LogUtil.Debug("O.Opt SetTargetSelect - Output:",{targetId:i.tselect,dimensions:n})}static UpdateSelectionAttributes(t){if(LogUtil.Debug("O.Opt UpdateSelectionAttributes - Input:",t),!t)return void LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output: No selection objects provided, exiting early");let e,i,n,s,a=0;const o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);t&&(a=t.length)&&t[0],this.ResetSelectionState();const r=T3Gv.state.GetUndoState();let l=T3Gv.opt.selectionState;if(l.undo=r.undo,l.redo=r.redo,T3Gv.opt.bInDimensionEdit)return T3Gv.opt.HandleDimensionEditMode(o),void LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output: Dimension edit mode handled");if(0===a||T3Gv.opt.bInNoteEdit)return T3Gv.opt.HandleEmptySelectionOrNoteEditMode(o),void LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output: Empty selection or note edit mode handled");for(e=SelectUtil.GetTargetSelect(),l.nselect=a,e>=0&&(s=ObjectUtil$1.GetObjectPtr(e,!1),s&&s instanceof Instance.Shape.BaseDrawObject||(e=-1,o.tselect=-1)),e>=0&&T3Gv.opt.ProcessTargetObject(e,s),i=0;i<a;i++){const s=t[i];if(s!==e&&(l.allowalign=!0),n=ObjectUtil$1.GetObjectPtr(s,!1),!(n instanceof Instance.Shape.BaseDrawObject))continue;const a=n;T3Gv.opt.ProcessSelectedObject(n,a,i)}T3Gv.opt.moveList=null,l.allowcopy=l.nselect>0;const h=Object.assign(new SelectionAttr,Utils1.DeepCopy(l));T3Gv.docUtil.rulerConfig.showpixels&&h.fontsize>=0&&(h.fontsize=OptCMUtil.PixelstoPoints(h.fontsize)),LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output:",{nselect:l.nselect,nshapeselected:l.nshapeselected,nlineselected:l.nlineselected,nconnectorselected:l.nconnectorselected,hastext:l.selectionhastext})}static ResetSelectionState(){LogUtil.Debug("O.Opt ResetSelectionState - Input: No parameters");const t=T3Gv.opt.selectionState;t.nselect=0,t.nlineselected=0,t.nshapeselected=0,t.nconnectorselected=0,t.ngroupsselected=0,t.nimageselected=0,t.ntablesselected=0,t.npolylinecontainerselected=0,t.ncells_selected=0,t.nsegs=0,t.IsTargetTable=!1,t.allowalign=0,t.allowcopy=!1,t.selectionhastext=!1,t.cell_notext=!1,t.cellselected=!1,t.projectTableSelected=!1,t.lockedTableSelected=!1,t.polyclosed=!1,t.iswallselected=!1,t.bInNoteEdit=T3Gv.opt.bInNoteEdit,t.connectorCanHaveCurve=!1,t.isJiraCard=!1,t.width=0,t.widthstr="",t.height=0,t.heightstr="",t.left=0,t.leftstr="",t.top=0,t.topstr="",t.WallThickness=0,t.fixedCornerRadius=-2,t.lineCornerRadius=-2,t.TextDirection=0,t.dimensions=0,t.celltype=0,t.cellflags=0,t.subtype=0,t.objecttype=0,t.datasetElemID=-1,t.tselect=-1,t.paste=OptCMUtil.GetClipboardType(),t.csOptMng=T3Gv.wallOpt,LogUtil.Debug("O.Opt ResetSelectionState - Output: Selection state reset")}static RemoveFromSelectedList(t){LogUtil.Debug("O.Opt RemoveFromSelectedList - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1).indexOf(t);if(-1!==e){ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0).splice(e,1);if(t===ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).tselect){ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0).tselect=-1}}LogUtil.Debug("O.Opt RemoveFromSelectedList - Output: Object removed from selection")}static StartOptSltSelect(t){LogUtil.Debug("O.Opt StartOptSltSelect - Input event:",t);try{if(T3Gv.docUtil.IsReadOnly())return void LogUtil.Debug("O.Opt StartOptSltSelect - Document is read-only; aborting.");if(T3Gv.opt.crtOpt===OptConstant.OptTypes.FormatPainter){if(T3Gv.opt.formatPainterSticky)return void LogUtil.Debug("O.Opt StartOptSltSelect - formatPainterSticky active; aborting.");UIUtil.SetFormatPainter(!0,!1)}ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),T3Gv.opt.CloseEdit();const e=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Rect);e.SetStrokeColor("black"),e.SetFillColor("black"),e.SetFillOpacity(.03);const i=1/T3Gv.docUtil.GetZoomFactor();e.SetStrokeWidth(1*i);{const t=2*i+","+i;e.SetStrokePattern(t)}const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);T3Gv.opt.optSltStartX=n.x,T3Gv.opt.optSltStartY=n.y,e.SetSize(1,1),e.SetPos(n.x,n.y),T3Gv.opt.svgOverlayLayer.AddElement(e),LogUtil.Debug("O.Opt StartOptSltSelect - Opt Slt shape created:",e),T3Gv.opt.optSlt=e,T3Gv.opt.EndStampSession(),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_OptSltDrag),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_OptSltDragEnd),LogUtil.Debug("O.Opt StartOptSltSelect - Output opt slt set successfully:",T3Gv.opt.optSlt)}catch(e){throw LogUtil.Debug("O.Opt StartOptSltSelect - Error:",e),this.OptSltSelectExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),e}}static SelectAllInRect(t,e){LogUtil.Debug("O.Opt SelectAllInRect - Input:",{selectionRect:t,allowMultipleSelection:e});const i=LayerUtil.ActiveVisibleZList(),n=T3Gv.opt.RemoveNotVisible(i),s=n.length,a=NvConstant.FNObjectTypes.ShapeContainer;if(0!==s){const i={x:t.x,y:t.y,width:t.width,height:t.height},o=[];for(let t=0;t<s;++t){const e=T3Gv.stdObj.GetObject(n[t]);if(null!=e){const s=e.Data;if(s.objecttype!==a){let e=s.Frame;if(s.RotationAngle){const t={x:e.x+e.width/2,y:e.y+e.height/2};e=ToolActUtil.RotateRectAboutCenter(e,t,s.RotationAngle)}Utils2.IsRectangleFullyEnclosed(i,e)&&o.push(n[t])}}}0===o.length?(LogUtil.Debug("O.Opt SelectAllInRect - No objects found in selection rectangle"),this.ClearSelectionClick()):(LogUtil.Debug("O.Opt SelectAllInRect - Found objects:",o.length),SelectUtil.SelectObjects(o,e,!1))}else LogUtil.Debug("O.Opt SelectAllInRect - No visible objects to select");LogUtil.Debug("O.Opt SelectAllInRect - Output: Selection processing completed")}static OptSltSelectMoveCommon(t,e){if(LogUtil.Debug("O.Opt OptSltSelectMoveCommon - Input:",{mouseX:t,mouseY:e}),null===T3Gv.opt.optSlt)return;const i=t,n=e,s=T3Gv.opt.optSltStartX,a=T3Gv.opt.optSltStartY;i>=s&&n>=a?(T3Gv.opt.optSlt.SetSize(i-s,n-a),T3Gv.opt.optSltFrame={x:s,y:a,width:i-s,height:n-a}):n<a?i>=s?(T3Gv.opt.optSlt.SetSize(i-s,a-n),T3Gv.opt.optSlt.SetPos(s,n),T3Gv.opt.optSltFrame={x:s,y:n,width:i-s,height:a-n}):(T3Gv.opt.optSlt.SetSize(s-i,a-n),T3Gv.opt.optSlt.SetPos(i,n),T3Gv.opt.optSltFrame={x:i,y:n,width:s-i,height:a-n}):i<s&&(T3Gv.opt.optSlt.SetSize(s-i,n-a),T3Gv.opt.optSlt.SetPos(i,a),T3Gv.opt.optSltFrame={x:i,y:a,width:s-i,height:n-a}),LogUtil.Debug("O.Opt OptSltSelectMoveCommon - Output:",{optSltFrame:T3Gv.opt.optSltFrame})}static UnbindOptSltHammerEvents(){LogUtil.Debug("O.Opt UnbindOptSltHammerEvents - Input"),T3Gv.opt.WorkAreaHammer&&(T3Gv.opt.WorkAreaHammer.off("drag"),T3Gv.opt.WorkAreaHammer.off("dragend")),LogUtil.Debug("O.Opt UnbindOptSltHammerEvents - Output: done")}static OptSltSelectExceptionCleanup(t){LogUtil.Debug("O.Opt OptSltSelectExceptionCleanup - Input:",t);try{this.UnbindOptSltHammerEvents(),DrawUtil.ResetAutoScrollTimer(),T3Gv.opt.optSlt&&T3Gv.opt.svgOverlayLayer.RemoveElement(T3Gv.opt.optSlt),T3Gv.opt.optSlt=null,T3Gv.opt.optSltStartX=0,T3Gv.opt.optSltStartY=0,T3Gv.opt.optSltFrame={x:0,y:0,width:0,height:0},T3Gv.opt.noUndo=!1}catch(e){throw T3Util.Error("= u.SelectUtil: OptSltSelectExceptionCleanup/ - Cleanup Error:",e),e}throw LogUtil.Debug("O.Opt OptSltSelectExceptionCleanup - Output: Cleanup completed"),t}static ClearAnySelection(t){LogUtil.Debug("O.Opt ClearAnySelection - Input:",{preserveBlock:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,t);0!==e.length&&(SelectUtil.SetTargetSelect(-1,t),SvgUtil.HideAllSVGSelectionStates(),e.length=0),LogUtil.Debug("O.Opt ClearAnySelection - Output: selection cleared")}static ClearSelectionClick(){LogUtil.Debug("O.Opt ClearSelectionClick: input"),T3Gv.opt.CloseEdit(),this.ClearAnySelection(!1),SelectUtil.UpdateSelectionAttributes(null),LogUtil.Debug("O.Opt ClearSelectionClick: output")}static OptSltSelectCancel(t){LogUtil.Debug("O.Opt OptSltSelectCancel - Input:",t),T3Gv.opt.optSlt&&(T3Gv.opt.WorkAreaHammer.off("drag"),T3Gv.opt.WorkAreaHammer.off("dragend"),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),DrawUtil.ResetAutoScrollTimer(),T3Gv.opt.svgOverlayLayer.RemoveElement(T3Gv.opt.optSlt),T3Gv.opt.optSlt=null,T3Gv.opt.optSltStartX=0,T3Gv.opt.optSltStartY=0,T3Gv.opt.optSltFrame={x:0,y:0,width:0,height:0}),LogUtil.Debug("O.Opt OptSltSelectCancel - Output: Opt slt selection canceled")}static SelectAllObjects(t){let e,i;LogUtil.Debug("U.Util1 SelectAllObjects - Input:",{typeFilter:t});const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);let s,a=0;if(n.theActiveTextEditObjectID>=0){e=T3Gv.opt.svgObjectLayer.GetElementById(n.theActiveTextEditObjectID);const t=e.textElem;if(t&&(a=t.GetText().length,t.SetSelectedRange(0,a)),!(0===a&&n.theActiveTableObjectID>=0))return void LogUtil.Debug("U.Util1 SelectAllObjects - Output: All text selected");T3Gv.opt.CloseEdit(!0)}const o=[];let r=LayerUtil.ActiveVisibleZList();r=T3Gv.opt.RemoveNotVisible(r);const l=r.length;let h=0,c=!1;for(t&&(h=t.length),s=0;s<l;++s)i=ObjectUtil$1.GetObjectPtr(r[s],!1),h>0&&(c=!!(-1!==t.indexOf(OptConstant.DrawObjectBaseClass.Shape)&&i instanceof Instance.Shape.PolyLineContainer&&i.polylist&&i.polylist.closed),-1===t.indexOf(i.DrawingObjectBaseClass)&&!c)||(o.push(r[s]),SelectUtil.SelectObjects(o,!1,!1),LogUtil.Debug("U.Util1 SelectAllObjects - Output: Selected",o.length,"objects"))}static GetSelectionContext(){let t;LogUtil.Debug("O.Opt GetSelectionContext - Input:",{});let e=[];if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID)return t=OptAhUtil.GetGvSviOpt(),t?(e.push(DSConstant.Contexts.Text),e.push(T3Gv.opt.GetAutomationContext(t)),LogUtil.Debug("O.Opt GetSelectionContext - Output:",e),e):(LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.Text),DSConstant.Contexts.Text);const i=T3Gv.opt.svgDoc.GetActiveEdit();if(null!==i&&i.ID===OptConstant.SVGElementClass.DimText)return LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.DimensionText),DSConstant.Contexts.DimensionText;if(null!==i&&i.ID===OptConstant.SVGElementClass.NoteText)return LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.Note),DSConstant.Contexts.Note;let n=SelectUtil.GetTargetSelect();if(0===n&&(n=-1),-1!==n){t=OptAhUtil.GetGvSviOpt();const i=T3Gv.stdObj.GetObject(n).Data;if(t&&e.push(DSConstant.Contexts.Automation),i.AllowTextEdit())return e.length?(e.push(DSConstant.Contexts.Text),LogUtil.Debug("O.Opt GetSelectionContext - Output:",e),e):(LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.Text),DSConstant.Contexts.Text)}return LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.None),DSConstant.Contexts.None}static FindAllChildObjects(t,e,i){LogUtil.Debug("O.Opt FindAllChildObjects - Input:",{targetObjectId:t,filterDrawingBaseClass:e,filterObjectType:i});const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),s=OptCMUtil.FindLink(n,t,!0),a=[],o=n.length;if(s>=0)for(let r=s;r<o&&n[r].targetid===t;r++){const t=n[r].hookid,s=ObjectUtil$1.GetObjectPtr(t,!1);s&&(null!=e&&s.DrawingObjectBaseClass!==e||null!=i&&s.objecttype!==i||a.push(t))}return LogUtil.Debug("O.Opt FindAllChildObjects - Output:",{childObjectIds:a}),a}static AreSelectedObjects(){LogUtil.Debug("O.Opt AreSelectedObjects - Input: No parameters");const t=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId),e=null!==t&&0!==t.Data.length;return LogUtil.Debug("O.Opt AreSelectedObjects - Output:",e),e}static FindConnect(t,e,i,n,s,a,o){LogUtil.Debug("O.Opt FindConnect - Input:",{targetObjectId:t,drawingObject:e?e.BlockID:null,hookPointsCount:i?i.length:0,showVisuals:n,isAttachMode:s,allowJoin:a,eventPosition:o});let r,l,h,c,u,d,p=0,g=-1,f=!1,b={},v=[],m=[],y=1e30,S=0,w={x:0,y:0},x={x:0,y:0},C=[],D=[],T=null,k=0,$=NvConstant.HookFlags.LcHookNoExtra,O=OptConstant.HookPts,P=!1;const L=t=>{switch(t){case O.KTC:case O.KBC:case O.KRC:case O.KLC:return!0;default:if(t>=O.CustomBase&&t<O.CustomBase+100)return!0}return!1},G=e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line;if(null==i)return LogUtil.Debug("O.Opt FindConnect - Output: false (No hook points)"),!1;const F=T3Gv.opt.linkParams.lpCircList;if(null==F)return LogUtil.Debug("O.Opt FindConnect - Output: false (No circular list)"),!1;w.x=T3Gv.opt.linkParams.ConnectPt.x,w.y=T3Gv.opt.linkParams.ConnectPt.y,S=e.hookflags,S=Utils2.SetFlag(S,NvConstant.HookFlags.LcAttachToLine,!1);const I=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);I&&(k=I.flags),s?(C.push(OptConstant.DrawObjectBaseClass.Line),T=C):T3Gv.opt.linkParams.ArraysOnly&&(e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?(C.push(OptConstant.DrawObjectBaseClass.Shape),T=C):e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape?(C.push(OptConstant.DrawObjectBaseClass.Connector),k&OptConstant.SessionFlags.LLink&&C.push(OptConstant.DrawObjectBaseClass.Line),T=C):T=C),a&&D.push(OptConstant.DrawObjectBaseClass.Line),T3Gv.opt.fromOverlayLayer&&(C.push(OptConstant.DrawObjectBaseClass.Shape),T=C),T3Gv.opt.linkParams.JoinIndex=-1;for(let E=0;E<i.length;E++){if(p=0,(a||(b=new HitResult(-1,0,null),e.ClosePolygon(t,i,b)&&(a=!0)))&&a&&(b=new HitResult(-1,0,null),e.ClosePolygon(t,i,b)||(b=this.FindObject(i[E],F,D,!1,!0,null)),b&&b.hitcode===NvConstant.HitCodes.PLApp)){T3Gv.opt.linkParams.JoinIndex=b.objectid,T3Gv.opt.linkParams.JoinData=b.segment,T3Gv.opt.linkParams.JoinSourceData=i[E].id,r=b.pt.x-i[E].x,l=b.pt.y-i[E].y,T3Gv.opt.dragDeltaX=r,T3Gv.opt.dragDeltaY=l,T3Gv.opt.linkParams.JoinData===OptConstant.HookPts.KTL?(T3Gv.opt.linkParams.ConnectPt.x=0,T3Gv.opt.linkParams.ConnectPt.y=0):(T3Gv.opt.linkParams.ConnectPt.x=OptConstant.Common.DimMax,T3Gv.opt.linkParams.ConnectPt.y=OptConstant.Common.DimMax);break}if(T3Gv.opt.linkParams.PrevConnect>=0){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.PrevConnect,!1);if(t){const n=Utils1.DeepCopy(T3Gv.opt.linkParams.ContainerPt[0]);if(t.IsShapeContainer(e,n)){const i=t.GetHitTestFrame(e);Utils2.pointInRect(i,n)&&(b.objectid=T3Gv.opt.linkParams.PrevConnect,b.hitcode=NvConstant.HitCodes.InContainer,b.cellid=null)}else Utils2.pointInRect(t.r,i[E])&&(p=t.Hit(i[E],G,!1,null),p&&(null==b&&(b={cellid:null}),b.objectid=T3Gv.opt.linkParams.PrevConnect,b.hitcode=p,b.cellid=null))}}if(0===p&&(b=this.FindObject(i[E],F,T,G,!1,e)),b&&b.hitcode){if(u=ObjectUtil$1.GetObjectPtr(b.objectid,!1),null==u)return LogUtil.Debug("O.Opt FindConnect - Output: false (Target object not found)"),!1;if(b.hitcode===NvConstant.HitCodes.InContainer&&(P=!0,d=b.theContainerPt),!P)if(s){if(T3Gv.opt.linkParams.AutoInsert){if(e.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape)continue;let t=!1;for(let i=0;i<u.hooks.length;i++)if(u.hooks[i].objid==e.BlockID){t=!0;break}if(t)continue;if(u.LineType!==OptConstant.LineType.SEGLINE)continue}if(0==(u.targflags&NvConstant.HookFlags.LcAttachToLine))continue}else{let t=u.targflags;if(T3Gv.opt.linkParams.ArraysOnly||0!=(k&OptConstant.SessionFlags.SLink)?T3Gv.opt.linkParams.ArraysOnly&&u.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line&&(t=Utils2.SetFlag(t,NvConstant.HookFlags.LcShape,!0)):t=Utils2.SetFlag(t,NvConstant.HookFlags.LcShape,!1),0==(S&t))continue}if(S=Utils2.SetFlag(S,NvConstant.HookFlags.LcShapeOnLine,s),e.objecttype===NvConstant.FNObjectTypes.FlWall&&(S=Utils2.SetFlag(S,NvConstant.HookFlags.LcNoSnaps,!0)),m=u.GetTargetPoints(i[E],S|$,t),!m||0===m.length)return LogUtil.Debug("O.Opt FindConnect - Output: false (No target points)"),!1;v=u.GetPerimPts(b.objectid,m,null,!1,m[0].cellid,t);let n=i[E];P&&(x=n=d,c=d.id);for(let t=0;t<v.length;t++){const e=v[t].x-n.x,i=v[t].y-n.y;h=e*e+i*i,h<y&&(y=h,g=t)}if(u.polylist&&b.segment>=0){const t=this.FindObject(v[g],F,T,!1,!1,e);if(!t)return LogUtil.Debug("O.Opt FindConnect - Output: false (Segment check failed)"),!1;if(t.segment!=b.segment)return LogUtil.Debug("O.Opt FindConnect - Output: false (Segment mismatch)"),!1}if(P||(c=i[E].id,c=u.GetBestHook(t,i[E].id,m[g]),c!=i[E].id?(x=e.HookToPoint(c,null),x.x+=o.x-T3Gv.opt.dragStartX,x.y+=o.y-T3Gv.opt.dragStartY):x=i[E]),-1===g)return;const a=(r=v[g].x-x.x)*r+(l=v[g].y-x.y)*l;if(!u.AllowHook(i[E],t,a))continue;if(T3Gv.opt.dragDeltaX=r,T3Gv.opt.dragDeltaY=l,s&&T3Gv.opt.linkParams.AutoInsert){T3Gv.opt.linkParams.AutoPoints=[];let t=Utils1.DeepCopy(e.Frame);if(Math.floor((e.RotationAngle+45)/90)){const e=90/(180/NvConstant.Geometry.PI),i=[];i.push(new Point$1(t.x,t.y)),i.push(new Point$1(t.x+t.width,t.y+t.height)),Utils3.RotatePointsAboutCenter(t,e,i),t=Utils2.Pt2Rect(i[0],i[1])}if(t.x+=r,t.y+=l,!u.GetFrameIntersects(t,e,T3Gv.opt.linkParams.AutoPoints,T3Gv.opt.linkParams))continue}f=!0,T3Gv.opt.linkParams.ConnectIndex=b.objectid,T3Gv.opt.linkParams.ConnectIndex>=0&&T3Gv.opt.linkParams.ConnectIndexHistory.indexOf(T3Gv.opt.linkParams.ConnectIndex)<0&&T3Gv.opt.linkParams.ConnectIndexHistory.push(T3Gv.opt.linkParams.ConnectIndex),T3Gv.opt.linkParams.ConnectPt.x=m[g].x,T3Gv.opt.linkParams.ConnectPt.y=m[g].y,T3Gv.opt.linkParams.ConnectInside=m[g].cellid,T3Gv.opt.linkParams.HookIndex=c,T3Gv.opt.linkParams.AutoInsert&&s&&!T3Gv.opt.linkParams.AutoSinglePoint?T3Gv.opt.linkParams.ConnectHookFlag=NvConstant.HookFlags.LcAutoInsert:T3Gv.opt.linkParams.ArraysOnly&&u.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&L(c)?T3Gv.opt.linkParams.ConnectHookFlag=NvConstant.HookFlags.LcHookReverse:T3Gv.opt.linkParams.ConnectHookFlag=0;break}}if(f||(T3Gv.opt.linkParams.ConnectIndex>=0&&T3Gv.opt.linkParams.ConnectIndexHistory.indexOf(T3Gv.opt.linkParams.ConnectIndex)<0&&T3Gv.opt.linkParams.ConnectIndexHistory.push(T3Gv.opt.linkParams.ConnectIndex),T3Gv.opt.linkParams.ConnectIndex=-1),T3Gv.opt.linkParams.JoinIndex!=T3Gv.opt.linkParams.HiliteJoin&&n&&(T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,t,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.JoinIndex>=0&&T3Gv.opt.linkParams.HiliteJoin<0?OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkJoin&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!0):T3Gv.opt.linkParams.JoinIndex<0&&T3Gv.opt.linkParams.HiliteJoin>=0&&T3Gv.opt.UndoEditMode(),T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,t,null),T3Gv.opt.linkParams.HiliteJoin=-1,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.JoinIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.ConnectPt,!0,!0,t,null),T3Gv.opt.linkParams.HiliteJoin=T3Gv.opt.linkParams.JoinIndex,OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkJoin&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!0))),T3Gv.opt.linkParams.HiliteConnect==T3Gv.opt.linkParams.ConnectIndex&&T3Gv.opt.linkParams.HiliteInside==T3Gv.opt.linkParams.ConnectInside||!n)f&&n&&T3Gv.opt.linkParams.HiliteConnect===T3Gv.opt.linkParams.ConnectIndex&&T3Gv.opt.linkParams.HiliteInside===T3Gv.opt.linkParams.ConnectInside&&1===v.length&&(w.x==T3Gv.opt.linkParams.ConnectPt.x&&w.y==T3Gv.opt.linkParams.ConnectPt.y||HookUtil.MoveConnectHilite(T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside));else{if(T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,t,null),T3Gv.opt.linkParams.HiliteJoin=-1,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.ConnectIndex>=0&&T3Gv.opt.linkParams.HiliteConnect<0)OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkConnect&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkConnect,null,!0);else if(T3Gv.opt.linkParams.ConnectIndex<0&&T3Gv.opt.linkParams.HiliteConnect>=0){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.HiliteConnect,!1);e.OnDisconnect(t,i,T3Gv.opt.linkParams.HookIndex,v[g]),T3Gv.opt.UndoEditMode()}T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,t,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.ConnectIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.ConnectPt,!0,!1,t,T3Gv.opt.linkParams.ConnectInside),T3Gv.opt.linkParams.HiliteConnect=T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HiliteInside=T3Gv.opt.linkParams.ConnectInside,e.OnConnect(t,u,T3Gv.opt.linkParams.HookIndex,v[g],o),OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkConnect&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkConnect,null,!0))}return LogUtil.Debug("O.Opt FindConnect - Output:",f),f}static FindObject(t,e,i,n,s,a){let o,r;LogUtil.Debug("O.Opt FindObject - Input:",{point:t,objectIdFilter:e,classFilter:i,hitTestOptions:n,usePreciseHitTest:s,containerObject:a});const l=new HitResult(-1,0,null),h=LayerUtil.ActiveVisibleZList();if(null==h)return LogUtil.Debug("O.Opt FindObject - Output: no visible objects"),-1;for(let c=h.length-1;c>=0;c--)if(!(r=e&&-1!==e.indexOf(h[c]))){if(o=ObjectUtil$1.GetObjectPtr(h[c],!1),null!=o){if(a&&a instanceof Instance.Shape.ShapeContainer&&o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)continue;(o.flags&NvConstant.ObjFlags.Lock||o.flags&NvConstant.ObjFlags.NoLinking)&&(o=null)}if(null!=o){if(o.flags&NvConstant.ObjFlags.NotVisible)continue;if(o.extraflags&OptConstant.ExtraFlags.ConnToConn)continue;if(a&&a.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&T3Gv.opt.FindChildArray(h[c],-1)>=0)continue;i&&(r=-1===i.indexOf(o.DrawingObjectBaseClass));const e=o.GetHitTestFrame(a);if(e.width<OptConstant.Common.FindObjectMinHitSpot&&(e.width=OptConstant.Common.FindObjectMinHitSpot,e.x-=OptConstant.Common.FindObjectMinHitSpot/2),e.height<OptConstant.Common.FindObjectMinHitSpot&&(e.height=OptConstant.Common.FindObjectMinHitSpot,e.y-=OptConstant.Common.FindObjectMinHitSpot/2),o instanceof Instance.Shape.ShapeContainer){const t=Utils1.DeepCopy(T3Gv.opt.linkParams.ContainerPt[0]);if(o.IsShapeContainer(a,t)&&Utils2.pointInRect(e,t))return l.objectid=h[c],l.hitcode=NvConstant.HitCodes.InContainer,l.theContainerPt=t,LogUtil.Debug("O.Opt FindObject - Output:",l),l;continue}if(!r&&Utils2.pointInRect(e,t)&&(l.objectid=h[c],l.hitcode=o.Hit(t,n,s,l),l.hitcode))return LogUtil.Debug("O.Opt FindObject - Output:",l),l}}return LogUtil.Debug("O.Opt FindObject - Output: result null"),null}static GetMoveList(t,e,i,n,s,a){let o,r,l,h,c,u,d,p,g;LogUtil.Debug("O.Opt GetMoveList - Input:",{objectId:t,useSelectedList:e,includeEnclosedObjects:i,useVisibleList:n,boundsRect:s,targetOnlyMode:a}),T3Gv.opt.moveList=[];const f=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(null==f)return LogUtil.Debug("O.Opt GetMoveList - Output: No links found, returning empty list"),T3Gv.opt.moveList;if(c=a?NvConstant.ListCodes.TargOnly:NvConstant.ListCodes.MoveTarg,t>=0&&(r=ObjectUtil$1.GetObjectPtr(t,!1),r&&(h=r.GetHookFlags(),h&NvConstant.HookFlags.LcMoveTarget&&e&&r.hooks.length&&(t=this.GetTargetNode(r.hooks[0].objid)))),e||n)for(l=n?LayerUtil.ActiveVisibleZList().slice(0):ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1).slice(0),o=0;o<l.length;o++)if(r=ObjectUtil$1.GetObjectPtr(l[o],!1),r){if(r.objecttype===NvConstant.FNObjectTypes.NgEventLabel){-1===l.indexOf(r.associd)&&l.push(r.associd);continue}(0===r.hooks.length||i)&&(T3Gv.opt.moveList=HookUtil.GetHookList(f,T3Gv.opt.moveList,l[o],r,c,s))}if(t>=0&&(r=ObjectUtil$1.GetObjectPtr(t,!1),r&&(0===r.hooks.length||i)&&(T3Gv.opt.moveList=HookUtil.GetHookList(f,T3Gv.opt.moveList,t,r,c,s))),i)for(u=T3Gv.opt.moveList.length,o=0;o<u;o++)for(r=ObjectUtil$1.GetObjectPtr(T3Gv.opt.moveList[o],!1),d=r.GetListOfEnclosedObjects(!0),p=d.length,g=0;g<p;g++){const t=d[g];T3Gv.opt.moveList.indexOf(t)<0&&T3Gv.opt.moveList.push(t)}return LogUtil.Debug("O.Opt GetMoveList - Output:",{objectCount:T3Gv.opt.moveList.length,moveList:T3Gv.opt.moveList}),T3Gv.opt.moveList}static GetSelectedObject(){let t=SelectUtil.GetTargetSelect();return{selectedId:t,selectedObject:ObjectUtil$1.GetObjectPtr(t,!1)}}static GetSelectedObjectList(){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);LogUtil.Debug("O.Opt GetSelectedObjectList - Input: No parameters");const e=[];for(let i=0;i<t.length;i++){const n=t[i],s=ObjectUtil$1.GetObjectPtr(n,!1);s&&e.push(s)}return LogUtil.Debug("O.Opt GetSelectedObjectList - Output:",{selectedCount:t.length,objectCount:e.length}),{selectedList:t,selectedObjects:e}}}class PolygonConstant{}__publicField(PolygonConstant,"ShapeTypes",{PHOTO:-2,TABLE:-1,TEXT:0,IMAGE:1,DOCUMENT:7,RECTANGLE:2,ROUNDED_RECTANGLE:3,OVAL:4,CIRCLE:9,DIAMOND:6,TRIANGLE:14,TRIANGLE_BOTTOM:15,PARALLELOGRAM:5,TRAPEZOID:17,TRAPEZOID_BOTTOM:18,OCTAGON:19,HEXAGON:21,PENTAGON:22,PENTAGON_LEFT:23,POLYGON:26,TERMINAL:8,INPUT:16,STORAGE:20,DELAY:24,DISPLAY:25,ARROW_RIGHT:10,ARROW_LEFT:11,ARROW_TOP:12,ARROW_BOTTOM:13,MEASURE_AREA:27,LAST_SHAPE:27,ForeignObject:28});class PolyUtil{static ArcToPoly(t,e,i,n,s,a,o,r){LogUtil.Debug("O.Opt: ArcToPoly inputs:",{segments:t,center:{x:e.x,y:e.y},radius:i,startY:n,endY:s,targetX:a,flipArc:o,isComplexArc:r});let l,h,c,u=[];return r?(n>s?(c=e.y-i,h=e.y+i):(h=e.y-i,c=e.y+i),l=a<e.x,o=!1,this.ArcToPolySeg(u,t/2,e,i,n,h,a,o,!l),this.ArcToPolySeg(u,t,e,i,h,c,e.x,o,l),this.ArcToPolySeg(u,t/2,e,i,c,s,a,o,!l)):(l=a>=e.x,this.ArcToPolySeg(u,t,e,i,n,s,a,o,l)),LogUtil.Debug("O.Opt: ArcToPoly output points:",u.length),u}static ArcToPolySeg(t,e,i,n,s,a,o,r,l){LogUtil.Debug("O.Opt: ArcToPolySeg inputs:",{segments:e,center:{x:i.x,y:i.y},radius:n,startY:s,endY:a,targetX:o,flipArc:r,isRightSide:l});const h=n*n,c=(a-s)/e;for(let u=0;u<e;u++){const e=c*u,n=i.y-(s+e),a=Utils2.Sqrt(h-n*n),d=new Point$1(0,0);if(d.y=i.y-n,l){d.x=i.x+a;const t=d.x-o;r&&(d.x=o-t)}else{d.x=i.x-a;const t=o-d.x;r&&(d.x=o+t)}t.push(d)}return LogUtil.Debug("O.Opt: ArcToPolySeg output points count:",t.length),t}static PolyGetIntersect(t,e,i,n,s){LogUtil.Debug("O.Opt PolyGetIntersect - Input:",{pointCount:t.length,intersectValue:e,isHorizontal:s});let a,o,r,l,h,c,u,d,p,g=0,f=1,b=!1,v=0,m=t.length,y=0,S={x:0,y:0},w={x:0,y:0};for(;f<m+1;f++){let r=f;if(S=t[g],f===m?(w=t[0],r=0):w=t[f],!Utils2.IsEqual(w.x,S.x)||!Utils2.IsEqual(w.y,S.y))if(g=f,a=w.x-S.x,o=w.y-S.y,s){if(S.x<w.x?(l=S.x,h=w.x):(l=w.x,h=S.x),e<l||e>h)continue;if(0===a&&(a=1),u=o/a*(e-S.x)+S.y,S.y<w.y?(d=S.y,p=w.y):(p=S.y,d=w.y),u>=d&&u<=p){if(y>0)for(v=0;v<y;v++)b=Math.abs(u-i[v])>1;else b=!0;if(b){if(y>=2)return LogUtil.Debug("O.Opt PolyGetIntersect - Output: Too many intersections",y+1),y+1;i[y]=u,n&&(n[y]=r),y++}}}else{if(S.y<w.y?(l=S.y,h=w.y):(l=w.y,h=S.y),e<l||e>h)continue;if(0===o&&(o=1),c=a/o*(e-S.y)+S.x,S.x<w.x?(d=S.x,p=w.x):(p=S.x,d=w.x),c>=d&&c<=p){if(y>0)for(v=0;v<y;v++)b=Math.abs(c-i[v])>1;else b=!0;if(b){if(y>=2)return LogUtil.Debug("O.Opt PolyGetIntersect - Output: Too many intersections",y+1),y+1;i[y]=c,n&&(n[y]=r),y++}}}}return 2===y&&i[0]>i[1]&&(r=i[1],i[1]=i[0],i[0]=r,n&&(r=n[1],n[1]=n[0],n[0]=r)),LogUtil.Debug("O.Opt PolyGetIntersect - Output: Found",y,"intersections"),y}static ArcToChord(t,e,i,n,s){const a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},o=e.x-t.x,r=e.y-t.y,l=Math.sqrt(o*o+r*r),h=r/l,c=o/l,u=Math.abs(h)<1e-4?0:h,d=Math.abs(o)<1e-4?0:o,p=Math.asin(u),g=Math.acos(c);let f,b={x:0,y:0};f=d<0&&r<0?-g:p>0&&d<0?-p:p;const v=Math.sin(f),m=Math.cos(f);let y=t.x-a.x,S=t.y-a.y;b.x=y*m+S*v+a.x,b.y=-y*v+S*m+a.y,y=e.x-a.x,S=e.y-a.y;const w={x:s.StartPoint.x,y:s.StartPoint.y},x={x:s.EndPoint.x,y:s.EndPoint.y};y=w.x-a.x,S=w.y-a.y,w.x=y*m+S*v+a.x,w.y=-y*v+S*m+a.y,y=x.x-a.x,S=x.y-a.y,x.x=y*m+S*v+a.x,x.y=-y*v+S*m+a.y,y=i.x-a.x,S=i.y-a.y;const C={x:y*m+S*v+a.x,y:-y*v+S*m+a.y};let D={x:0,y:0},T=!1;n&&(y=n.center.x-a.x,S=n.center.y-a.y,D.x=y*m+S*v+a.x,D.y=-y*v+S*m+a.y,T=a.y<D.y?C.y<D.y:C.y>D.y,T&&(w.x<x.x?C.x>w.x&&C.x<x.x&&(x.x-C.x<C.x-w.x?C.x=x.x:C.x=w.x):C.x>x.x&&C.x<w.x&&(w.x-C.x<C.x-x.x?C.x=w.x:C.x=x.x))),C.y=a.y,y=C.x-a.x,S=C.y-a.y;const k=Math.sin(-f),$=Math.cos(-f);return C.x=y*$+S*k+a.x,C.y=-y*k+S*$+a.y,y=b.x-a.x,S=b.y-a.y,b.x=y*$+S*k+a.x,b.y=-y*k+S*$+a.y,n&&(C.x=2*Math.round((C.x+.5)/2),!0===T&&C.x--),C}static ChordToArc(t,e,i,n,s,a,o,r){const l=e.x-t.x,h=e.y-t.y,c=h/Math.sqrt(l*l+h*h),u=Math.abs(c)<1e-4?0:c;let d=Math.asin(u);(d>0&&l<0||d<0&&l<0&&h<0)&&(d=-d);let p=Math.sin(d),g=Math.cos(d),f={x:0,y:0},b={x:0,y:0},v=t.x-i.x,m=t.y-i.y;i.x,i.y,v=e.x-i.x,m=e.y-i.y,i.x,i.y,v=r.x-i.x,m=r.y-i.y,f.x=v*g+m*p+i.x,f.y=-v*p+m*g+i.y,v=t.x-i.x,m=t.y-i.y,b.x=v*g+m*p+i.x,b.y=-v*p+m*g+i.y;let y=b.y>i.y&&!o||b.y<=i.y&&o;a&&(y=!y),v=f.x-i.x,Math.abs(v)>n&&(v=n);const S=Utils2.Sqrt(n*n-v*v);if(y){if(f.y=i.y+S,s){const t=b.y-f.y;f.y=b.y+t}}else if(f.y=i.y-S,s){const t=b.y-f.y;f.y=b.y+t}v=f.x-i.x,m=f.y-i.y;const w=Math.sin(-d),x=Math.cos(-d);return f.x=v*x+m*w+i.x,f.y=-v*w+m*x+i.y,f}static ArcIntersect(t,e,i){t.EndPoint.x,t.StartPoint.x,t.EndPoint.y,t.StartPoint.y;let n=t.IsReversed?t.CalcRadiusAndCenter(t.EndPoint.x,t.EndPoint.y,t.StartPoint.x,t.StartPoint.y,t.CurveAdjust,t.IsReversed):t.CalcRadiusAndCenter(t.StartPoint.x,t.StartPoint.y,t.EndPoint.x,t.EndPoint.y,t.CurveAdjust,t.IsReversed),s=n.centerX,a=n.centerY,o=n.radius,r=e.EndPoint.x-e.StartPoint.x,l=e.EndPoint.y-e.StartPoint.y,h=0===r,c=h?1:l/r,u=e.StartPoint.x,d=e.StartPoint.y,p=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);if(0===c){let n=e.StartPoint.y-a,r=o*o-n*n;if(r<0)return!1;let l=Utils2.Sqrt(r),h=l+s;if(i.x=h,i.y=d,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i))return!0;let c=-l+s;return i.x=c,i.y=d,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i)}if(h){let n=e.StartPoint.x-s,r=o*o-n*n;if(r<0)return!1;let l=Utils2.Sqrt(r),h=l+a;if(i.x=u,i.y=h,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i))return!0;let c=-l+a;return i.x=u,i.y=c,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i)}{let e=c*c+1,n=d-c*u-a,r=2*c*n-2*s,l=r*r-4*e*(s*s+n*n-o*o);if(l<0)return!1;let h=Utils2.Sqrt(l),g=(-r+h)/(2*e),f=d+c*(g-u);if(i.x=g,i.y=f,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i))return!0;let b=(-r-h)/(2*e),v=d+c*(b-u);return i.x=b,i.y=v,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i)}}static LinesMaintainDist(t,e,i,n){let s,a,o,r,l,h,c,u,d,p={startpt:0,endpt:0},g={x:0,y:0},f={x:0,y:0};if(null===e&&(e=t),p=e.GetConnectLine(),p?(c=p.startpt,u=p.endpt):(c=e.StartPoint,u=e.EndPoint),s=u.x-c.x,a=u.y-c.y,g.x=n.x,g.y=n.y,e.LineType===OptConstant.LineType.ARCLINE&&(g=this.ArcToChord(c,u,g,p,e)),i===OptConstant.ActionTriggerType.LineStart?(s=g.x-u.x,a=g.y-u.y):(s=g.x-c.x,a=g.y-c.y),o=Math.sqrt(s*s+a*a),p=t.GetConnectLine(),p?(c=p.startpt,u=p.endpt):(c=t.StartPoint,u=t.EndPoint),i===OptConstant.ActionTriggerType.LineStart?(d=u,s=-(u.x-c.x),a=-(u.y-c.y)):(d=c,s=u.x-c.x,a=u.y-c.y),r=Math.sqrt(s*s+a*a),o>r&&(o=r),r<1?(n.x=c.x,n.y=c.y):(l=a/r,h=s/r,n.x=d.x+h*o,n.y=d.y+l*o),t.LineType===OptConstant.LineType.ARCLINE){const e=t.CalcRadiusAndCenter(t.StartPoint.x,t.StartPoint.y,t.EndPoint.x,t.EndPoint.y,t.CurveAdjust,t.IsReversed),i=!1,s=!p&&t.IsReversed;f.x=e.centerX,f.y=e.centerY,n=this.ChordToArc(c,u,f,e.radius,s,i,e.centerInside,n)}}static GetMaxDim(t){return t.x=OptConstant.Common.MaxLongDim,t.y=OptConstant.Common.MaxLongDim,!0}static LinesAddCurve(t,e,i,n,s,a){let o,r=[],l=[],h={x:0,y:0,width:0,height:0};if(t)if(e>0&&i>0)for(h.x=n,h.y=s,h.width=a,h.height=-2*a,Utils2.PolyYCurve(l,h,20,0,0,0,-a,!0),o=l.length-1;o>=0;o--)r.push(l[o]);else e<0&&i>0?(h.x=n,h.y=s+2*a,h.width=a,h.height=-2*a,Utils2.PolyYCurve(r,h,20,0,0,-a,0,!0)):e>0&&i<0?(h.x=n,h.y=s-2*a,h.width=-a,h.height=2*a,Utils2.PolyYCurve(r,h,20,0,0,a,0,!0)):e<0&&i<0&&(h.x=n,h.y=s+2*a,h.width=-a,h.height=-2*a,Utils2.PolyYCurve(r,h,20,0,0,-a,0,!0));else if(e>0&&i>0)h.x=n-a,h.y=s,h.width=a,h.height=2*a,Utils2.PolyYCurve(r,h,20,0,0,0,a,!1);else if(e<0&&i>0)h.x=n,h.y=s,h.width=a,h.height=2*a,Utils2.PolyYCurve(r,h,20,0,0,0,a,!0);else if(e>0&&i<0)h.x=n-a,h.y=s,h.width=a,h.height=-2*a,Utils2.PolyYCurve(r,h,20,0,0,0,-a,!1);else if(e<0&&i<0)for(h.x=n,h.y=s-2*a,h.width=a,h.height=2*a,Utils2.PolyYCurve(l,h,20,0,0,a,0,!0),o=l.length-1;o>=0;o--)r.push(l[o]);return r}static PolyLJoin(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g,f,b,v,m=null,y=null,S=null,w=null,x=[],C=[],D=!1,T=!1,k=OptConstant.ActionTriggerType.LineEnd,$={x:0,y:0};const O=OptConstant.Common.KnobSize;let P,L,G=-1,F=LayerUtil.ActiveVisibleZList();if(m=ObjectUtil$1.GetObjectPtr(t,!0),null==m)return-1;if(y=ObjectUtil$1.GetObjectPtr(i,!0),null==y)return-1;if(g=m.DataID,y.DataID>=0&&(g=y.DataID),f=m.NoteID,y.NoteID>=0&&(f=y.NoteID),b=m.commentId,y.commentId>=0&&(b=y.commentId),v=m.HyperlinkText,y.HyperlinkText&&(v=y.HyperlinkText),n!==OptConstant.HookPts.WTL&&n!==OptConstant.HookPts.WTR||(n=OptConstant.HookPts.KTL),t===i&&m.LineType===OptConstant.LineType.POLYLINE){D=m.polylist.closed,m.polylist.closed=!0,a=m.polylist.segs.length,m.polylist.segs[a-1].pt.x=m.polylist.segs[0].pt.x,m.polylist.segs[a-1].pt.y=m.polylist.segs[0].pt.y,m.EndPoint.x=m.StartPoint.x,m.EndPoint.y=m.StartPoint.y,m.objecttype!==NvConstant.FNObjectTypes.FlWall&&this.OpenShapeEdit(t);let e=-1;return m instanceof Instance.Shape.PolyLineContainer&&!D&&!0!==s&&(m.MaintainDimensionThroughPolygonOpennessChange(m.polylist.closed),e=-2),m.CalcFrame(),ObjectUtil$1.AddToDirtyList(m.BlockID),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),HookUtil.MaintainLink(t,m,null,k,!1),e}if(m.LineType===OptConstant.LineType.POLYLINE)S=m,w=y,x.push(i),c=t;else if(y.LineType===OptConstant.LineType.POLYLINE){S=y,w=m;let s=e;e=n,n=s,x.push(t),c=i}if(null==S){x.push(i),x.push(t),G=Math.min(F.indexOf(i),F.indexOf(t));let e={Frame:{x:m.Frame.x,y:m.Frame.x,width:m.Frame.width,height:m.Frame.height},inside:{x:m.inside.x,y:m.inside.x,width:m.inside.width,height:m.inside.height},StartPoint:{x:m.StartPoint.x,y:m.StartPoint.y},EndPoint:{x:m.EndPoint.x,y:m.EndPoint.y},flags:NvConstant.ObjFlags.Erase|NvConstant.ObjFlags.EraseOnGrow,extraflags:OptConstant.ExtraFlags.SideKnobs,StartArrowID:y.StartArrowID,EndArrowID:y.EndArrowID,StartArrowDisp:y.StartArrowDisp,EndArrowDisp:y.EndArrowDisp,ArrowSizeIndex:y.ArrowSizeIndex,TextFlags:m.TextFlags,objecttype:m.objecttype,Dimensions:m.Dimensions,dataclass:PolygonConstant.ShapeTypes.POLYGON,polylist:new PolyList};0===y.StartArrowID&&m.StartArrowID>0&&(e.StartArrowID=m.StartArrowID,e.StartArrowDisp=m.StartArrowDisp,e.ArrowSizeIndex=m.ArrowSizeIndex),0===y.EndArrowID&&m.EndArrowID>0&&(e.EndArrowID=m.EndArrowID,e.EndArrowDisp=m.EndArrowDisp,e.ArrowSizeIndex=m.ArrowSizeIndex),e.StyleRecord=Utils1.DeepCopy(m.StyleRecord),e.objecttype===NvConstant.FNObjectTypes.FlWall&&(e.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent),e.StyleRecord.Fill.Hatch=0;let n=m.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),s=n.length;for(let t=0;t<s;t++){let i=0===t||m.LineType===OptConstant.LineType.SEGLINE?OptConstant.LineType.LINE:m.LineType;if(e.polylist.segs.push(new PolySeg(i,n[t].x-m.StartPoint.x,n[t].y-m.StartPoint.y)),i===OptConstant.LineType.ARCLINE)e.polylist.segs[e.polylist.segs.length-1].param=m.IsReversed?m.CurveAdjust:-m.CurveAdjust;else if(i===OptConstant.LineType.ARCSEGLINE){let i=this.PolyLinePrPolyLGetArcQuadrant(n[t-1],n[t],0);e.polylist.segs[e.polylist.segs.length-1].param=i.param,e.polylist.segs[e.polylist.segs.length-1].ShortRef=i.ShortRef}}S=T3Gv.wallOpt.AddNewPolyLine(m.objecttype,e)||new Instance.Shape.PolyLine(e),w=y,T=!0}P=e===OptConstant.HookPts.KTL?{x:S.StartPoint.x,y:S.StartPoint.y}:{x:S.EndPoint.x,y:S.EndPoint.y},L=n===OptConstant.HookPts.KTL?{x:w.StartPoint.x,y:w.StartPoint.y}:{x:w.EndPoint.x,y:w.EndPoint.y},o=P.x-L.x,r=P.y-L.y,w.StartPoint.x+=o,w.StartPoint.y+=r,w.EndPoint.x+=o,w.EndPoint.y+=r;let I=w.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);h=I.length;let E=S.polylist.segs.length;if(h+E>OptConstant.Common.MaxPolySegs)return-1;if(e===OptConstant.HookPts.KTL){if(k=OptConstant.ActionTriggerType.LineStart,n===OptConstant.HookPts.KTL){o=S.StartPoint.x-I[h-1].x,r=S.StartPoint.y-I[h-1].y;for(let t=0;t<E;t++)S.polylist.segs[t].pt.x+=o,S.polylist.segs[t].pt.y+=r;S.StartPoint.x=I[h-1].x,S.StartPoint.y=I[h-1].y;for(let t=1;t<h;t++){switch(w.LineType){case OptConstant.LineType.POLYLINE:$.x=S.polylist.segs[0].pt.x,$.y=S.polylist.segs[0].pt.y,S.polylist.segs[0]=Utils1.DeepCopy(w.polylist.segs[t]),S.polylist.segs[0].pt.x=$.x,S.polylist.segs[0].pt.y=$.y,S.polylist.segs[0].param=-S.polylist.segs[0].param;break;case OptConstant.LineType.ARCLINE:S.polylist.segs[0].LineType=w.LineType,S.polylist.segs[0].param=w.IsReversed?-w.CurveAdjust:w.CurveAdjust;break;case OptConstant.LineType.ARCSEGLINE:S.polylist.segs[0].LineType=w.LineType,S.polylist.segs[0].param=0,u=S.PrPolyLGetArcQuadrant(I[t],I[t-1],0),S.polylist.segs[0].param=u.param,S.polylist.segs[0].ShortRef=u.ShortRef;break;default:S.polylist.segs[0].LineType=OptConstant.LineType.LINE}S.polylist.segs.unshift(new PolySeg(OptConstant.LineType.LINE,I[t].x-S.StartPoint.x,I[t].y-S.StartPoint.y))}}else{o=S.StartPoint.x-I[0].x,r=S.StartPoint.y-I[0].y;for(let t=0;t<E;t++)S.polylist.segs[t].pt.x+=o,S.polylist.segs[t].pt.y+=r;switch(S.StartPoint.x=I[0].x,S.StartPoint.y=I[0].y,w.LineType){case OptConstant.LineType.POLYLINE:$.x=S.polylist.segs[0].pt.x,$.y=S.polylist.segs[0].pt.y,S.polylist.segs[0]=Utils1.DeepCopy(w.polylist.segs[h-1]),S.polylist.segs[0].pt.x=$.x,S.polylist.segs[0].pt.y=$.y;break;case OptConstant.LineType.ARCLINE:S.polylist.segs[0].LineType=w.LineType,S.polylist.segs[0].param=w.IsReversed?w.CurveAdjust:-w.CurveAdjust;break;case OptConstant.LineType.ARCSEGLINE:S.polylist.segs[0].LineType=w.LineType,S.polylist.segs[0].param=0,u=S.PrPolyLGetArcQuadrant(I[h-2],I[h-1],0),S.polylist.segs[0].param=u.param,S.polylist.segs[0].ShortRef=u.ShortRef;break;default:S.polylist.segs[0].LineType=OptConstant.LineType.LINE}for(let t=h-2;t>=0;t--)if(S.polylist.segs.unshift(new PolySeg(OptConstant.LineType.LINE,I[t].x-S.StartPoint.x,I[t].y-S.StartPoint.y)),t>0)switch(w.LineType){case OptConstant.LineType.POLYLINE:$.x=S.polylist.segs[0].pt.x,$.y=S.polylist.segs[0].pt.y,S.polylist.segs[0]=Utils1.DeepCopy(w.polylist.segs[t]),S.polylist.segs[0].pt.x=$.x,S.polylist.segs[0].pt.y=$.y;break;case OptConstant.LineType.ARCSEGLINE:S.polylist.segs[0].LineType=w.LineType,I[t].x,S.StartPoint.x,I[t].y,S.StartPoint.y,S.polylist.segs[0].param=0,u=S.PrPolyLGetArcQuadrant(I[t-1],I[t],0),S.polylist.segs[0].param=u.param,S.polylist.segs[0].ShortRef=u.ShortRef}}p=Utils2.InflatePoint(S.polylist.segs[0].pt,O),!S.polylist.closed&&Utils2.pointInRect(p,S.polylist.segs[S.polylist.segs.length-1].pt)&&(S.polylist.closed=!0,S.polylist.segs[S.polylist.segs.length-1].pt.x=S.polylist.segs[0].pt.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=S.polylist.segs[0].pt.y,S.EndPoint.x=S.StartPoint.x,S.EndPoint.y=S.StartPoint.y,S instanceof Instance.Shape.PolyLine&&!0!==s&&S.MaintainDimensionThroughPolygonOpennessChange(S.polylist.closed),S.objecttype!==NvConstant.FNObjectTypes.FlWall&&this.OpenShapeEdit(S.BlockID),ObjectUtil$1.AddToDirtyList(S.BlockID))}else{if(n===OptConstant.HookPts.KTL){for(let t=1;t<h;t++){switch(w.LineType){case OptConstant.LineType.POLYLINE:l=w.polylist.segs[t].LineType;break;case OptConstant.LineType.ARCLINE:case OptConstant.LineType.ARCSEGLINE:l=w.LineType;break;default:l=OptConstant.LineType.LINE}switch(S.polylist.segs.push(new PolySeg(l,I[t].x-S.StartPoint.x,I[t].y-S.StartPoint.y)),w.LineType){case OptConstant.LineType.ARCLINE:S.polylist.segs[S.polylist.segs.length-1].param=w.IsReversed?w.CurveAdjust:-w.CurveAdjust;break;case OptConstant.LineType.POLYLINE:S.polylist.segs[S.polylist.segs.length-1]=Utils1.DeepCopy(w.polylist.segs[t]),S.polylist.segs[S.polylist.segs.length-1].pt.x=I[t].x-S.StartPoint.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=I[t].y-S.StartPoint.y;break;case OptConstant.LineType.ARCSEGLINE:I[t].x,S.StartPoint.x,I[t].y,S.StartPoint.y,d=S.polylist.segs.length,S.polylist.segs[d-1].param=0,u=S.PrPolyLGetArcQuadrant(I[t-1],I[t],0),S.polylist.segs[d-1].param=u.param,S.polylist.segs[d-1].ShortRef=u.ShortRef}}S.EndPoint.x=I[h-1].x,S.EndPoint.y=I[h-1].y}else{for(let t=h-2;t>=0;t--){switch(w.LineType){case OptConstant.LineType.POLYLINE:l=w.polylist.segs[t+1].LineType;break;case OptConstant.LineType.ARCLINE:case OptConstant.LineType.ARCSEGLINE:l=w.LineType;break;default:l=OptConstant.LineType.LINE}switch(S.polylist.segs.push(new PolySeg(l,I[t].x-S.StartPoint.x,I[t].y-S.StartPoint.y)),w.LineType){case OptConstant.LineType.ARCLINE:S.polylist.segs[S.polylist.segs.length-1].param=w.IsReversed?-w.CurveAdjust:w.CurveAdjust;break;case OptConstant.LineType.POLYLINE:S.polylist.segs[S.polylist.segs.length-1]=Utils1.DeepCopy(w.polylist.segs[t+1]),S.polylist.segs[S.polylist.segs.length-1].pt.x=I[t].x-S.StartPoint.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=I[t].y-S.StartPoint.y,S.polylist.segs[S.polylist.segs.length-1].param=-S.polylist.segs[S.polylist.segs.length-1].param;break;case OptConstant.LineType.ARCSEGLINE:d=S.polylist.segs.length,S.polylist.segs[d-1].param=0,u=S.PrPolyLGetArcQuadrant(I[t+1],I[t],0),S.polylist.segs[d-1].param=u.param,S.polylist.segs[d-1].ShortRef=u.ShortRef}}S.EndPoint.x=I[0].x,S.EndPoint.y=I[0].y}p=Utils2.InflatePoint(S.polylist.segs[S.polylist.segs.length-1].pt,O),Utils2.pointInRect(p,S.polylist.segs[0].pt)&&(S.polylist.closed=!0,S.polylist.segs[S.polylist.segs.length-1].pt.x=S.polylist.segs[0].pt.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=S.polylist.segs[0].pt.y,S.EndPoint.x=S.StartPoint.x,S.EndPoint.y=S.StartPoint.y,S.objecttype!==NvConstant.FNObjectTypes.FlWall&&this.OpenShapeEdit(S.BlockID),S instanceof Instance.Shape.PolyLine&&!0!==s&&S.MaintainDimensionThroughPolygonOpennessChange(S.polylist.closed),ObjectUtil$1.AddToDirtyList(S.BlockID))}if(S.CalcFrame(),T)c=DrawUtil.AddNewObject(S,!1,!0),T=!0,ObjectUtil$1.AddToDirtyList(c);else{let t=LayerUtil.VisibleZList().indexOf(c);t>=0&&SvgUtil.AddSVGObject(t,c,!0,!0)}S=ObjectUtil$1.GetObjectPtr(c,!1),S&&(S.DataID<0&&(S.DataID=g,m.DataID===g?(S.TextDirection=m.TextDirection,m.DataID=-1):y.DataID===g&&(S.TextDirection=y.TextDirection,y.DataID=-1),S.TextFlags=Utils2.SetFlag(S.TextFlags,NvConstant.TextFlags.HorizText,!S.TextDirection)),S&&S.NoteID<0&&(S.NoteID=f,m.NoteID===f?m.NoteID=-1:y.NoteID===f&&(y.NoteID=-1),S.TextFlags=Utils2.SetFlag(S.TextFlags,NvConstant.TextFlags.HorizText,!S.TextDirection)),S&&S.commentId<0&&(S.commentId=b,m.commentId===b?m.commentId=-1:y.commentId===b&&(y.commentId=-1),S.TextFlags=Utils2.SetFlag(S.TextFlags,NvConstant.TextFlags.HorizText,!S.TextDirection)),S&&!S.HyperlinkText&&(S.HyperlinkText=v));for(let A=0;A<x.length;A++)HookUtil.MoveLinks(c,x[A],null,null);if(ObjectUtil$1.DeleteObjects(x,!1),OptCMUtil.SetLinkFlag(c,DSConstant.LinkFlags.Move),HookUtil.MaintainLink(c,S,null,k,!1),T3Gv.opt.UpdateLinks(),C.push(c),SelectUtil.SelectObjects(C,!1,!0),T&&G>=0){let t=F.indexOf(c);F.splice(t,1),F.splice(G,0,c),T=!0,ObjectUtil$1.AddToDirtyList(c)}return S instanceof Instance.Shape.PolyLineContainer&&S.MoveBehindAllLinked()&&(T=!0),T&&(LayerUtil.IsTopMostVisibleLayer()?SvgUtil.RenderDirtySVGObjects():SvgUtil.RenderAllSVGObjects()),c}static PolyLinePrPolyLGetArcQuadrant(t,e,i){LogUtil.Debug("O.Opt PolyLinePrPolyLGetArcQuadrant - Input:",{startPoint:t,endPoint:e,arcAngle:i});const n={param:0,ShortRef:0};let s=[],a={x:0,y:0};if(s.push(new Point$1(t.x,t.y)),s.push(new Point$1(e.x,e.y)),a.x=t.x,a.y=t.y,Math.abs(i)>=.01){const t=Math.sin(i),e=Math.cos(i),n=Math.asin(t),o=e<0?-n:n;Utils3.RotatePointsAboutPoint(a,o,s)}const o=s[0],r=s[1];return r.x>o.x?r.y>o.y?(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_BL,e.notclockwise&&(n.param=0)):(n.ShortRef=OptConstant.ArcQuad.PLA_TL,e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_TR,n.param=NvConstant.Geometry.PI/2)):r.y>o.y?(n.ShortRef=OptConstant.ArcQuad.PLA_BR,e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_BL,n.param=NvConstant.Geometry.PI/2)):(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_TR,e.notclockwise&&(n.param=0)),LogUtil.Debug("O.Opt PolyLinePrPolyLGetArcQuadrant - Output:",n),n}static PolyYCurve(t,e,i,n,s,a,o,r){LogUtil.Debug("O.Opt PolyYCurve - Input:",{pointCount:t.length,rect:e,segmentCount:i,minOffset:n,maxOffset:s,startOffset:a,endOffset:o,isRightSide:r});const l=e.height/2;let h=e.width;i<2&&(i=2);const c=(2*l-a-o)/(i-1);let u=!1,d=!1;for(let p=0;p<i;p++){let i=c*p+a;if(n&&i<n){if(u)continue;i=n,u=!0}let o=l-i;if(s&&o-s<-l){if(d)break;o=-(l-s),d=!0}const g=new Point$1(0,0);g.y=e.y+(l-o);let f=0;l?f=o/l:h=0;const b=Utils2.Sqrt(1-f*f)*h;g.x=r?e.x+e.width-b:e.x+b,t.push(g)}return LogUtil.Debug("O.Opt PolyYCurve - Output: Generated points:",t.length),t}static PolyPtInPolygon(t,e){LogUtil.Debug("O.Opt PolyPtInPolygon - Input:",{polygonPointsCount:t.length,testPoint:e});const i=[{},{},{}];let n=0;i[0]=t[0];const s=t.length;for(let o=1;o<s-1;o++){let s=!0;i[1]=t[o],i[2]=t[o+1];for(let t=0;t<3;t++){const n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[t],e),a=t-1>=0?t-1:2,o=t+1<3?t+1:0,r=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[t],i[a]),l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[t],i[o]),h=r>l?r:l,c=NvConstant.Geometry.PI-h,u=T3Gv.opt.NormalizeAngle(r,c),d=T3Gv.opt.NormalizeAngle(l,c);let p=u,g=d;u>d&&(p=d,g=u);const f=T3Gv.opt.NormalizeAngle(n,c);if(f<p||f>g){s=!1;break}}s&&n++}const a=n%2!=0;return LogUtil.Debug("O.Opt PolyPtInPolygon - Output:",a),a}static PolyLIntersect(t,e,i,n){let s,a,o,r,l,h,c,u,d,p,g,f,b=null,v=-1,m=-1,y={x:0,y:0},S={x:0,y:0},w=0,x=Math.abs(e.x-t.x);if(Math.abs(e.y-t.y)<1&&x>=1){for(s=1;s<n;s++)if(i[s].y>i[s-1].y?(r=i[s-1].y,l=i[s].y):(r=i[s].y,l=i[s-1].y),e.y>=r&&e.y<l){v=s,S.y=e.y;break}if(v>=0)return w=v,i[v].x-i[v-1].x==0?(S.x=i[v].x,{bSuccess:!0,ipt:S,lpseg:w}):i[v].y-i[v-1].y==0?(i[v].x>i[v-1].x?(a=i[v-1].x,o=i[v].x):(a=i[v].x,o=i[v-1].x),S.x<a&&(S.x=a),S.x>o&&(S.x=o),{bSuccess:!0,ipt:S,lpseg:w}):(h=i[v].x-i[v-1].x,d=(i[v].y-i[v-1].y)/h,u=i[v].y-d*i[v].x,S.x=(S.y-u)/d,{bSuccess:!0,ipt:S,lpseg:w})}else if(x<1){for(s=1;s<n;s++)if(i[s].x>i[s-1].x?(a=i[s-1].x,o=i[s].x):(a=i[s].x,o=i[s-1].x),e.x>=a&&e.x<o){m=s,S.x=e.x;break}if(m>=0)return w=m,i[m].y-i[m-1].y==0?(S.y=i[m].y,{bSuccess:!0,ipt:S,lpseg:w}):i[m].x-i[m-1].x==0?(i[m].y>i[m-1].y?(r=i[m-1].y,l=i[m].y):(r=i[m].y,l=i[m-1].y),S.y<r&&(S.y=r),S.y>l&&(S.y=l),{bSuccess:!0,ipt:S,lpseg:w}):(h=i[m].x-i[m-1].x,d=(i[m].y-i[m-1].y)/h,u=i[m].y-d*i[m].x,S.y=d*S.x+u,{bSuccess:!0,ipt:S,lpseg:w})}else for(h=e.x-t.x,c=(e.y-t.y)/h,u=e.y-c*e.x,s=1;s<n;s++){if(i[s].x-i[s-1].x==0)y.x=i[s].x,y.y=c*y.x+u;else if(i[s].y-i[s-1].y==0)y.y=i[s].y,y.x=(y.y-u)/c;else{if(h=i[s].x-i[s-1].x,d=(i[s].y-i[s-1].y)/h,u=i[s].y-d*i[s].x,p=c-d,g=u-u,Math.abs(p)<.001)continue;f=g/p,y.x=f,y.y=c*f+u}if(b=Utils2.Pt2Rect(i[s],i[s-1]),b.y+b.height==b.y&&b.height++,b.x+b.width==b.x&&b.width++,Utils2.pointInRect(b,y))return{bSuccess:!0,ipt:y,lpseg:s}}return{bSuccess:!1,ipt:S,lpseg:w}}static EllipseToPoints(t,e,i,n,s,a,o){const r=Math.abs(n-i),l=Math.abs(a-s),h=l*l;let c,u;e<2&&(e=100);let d=1;a>s?n>i?o?(c=i,u=a):(c=n,u=s,d=-1):o?(c=n,u=s):(c=i,u=a,d=-1):n>i?o?(c=n,u=s,d=-1):(c=i,u=a):o?(c=i,u=a,d=-1):(c=n,u=s);const p=(a-s)/(e-1);for(let g=0;g<e;g++){const e=s+p*g,i=e-u,n=Utils2.Sqrt(1-i*i/h)*r,a=new Point$1(c+n*d,e);t.push(a)}return t}static GetClockwiseAngleBetween2PointsInRadians(t,e){const i=NvConstant.Geometry.PI,n=e.x-t.x,s=e.y-t.y;let a;return a=0===n?s>=0?i/2:-i/2:0===s?n>=0?0:i:Math.atan2(s,n),a<0&&(a+=2*i),a}}class TextUtil{static DeactivateTextEdit(t,e){let i;LogUtil.Debug("O.Opt DeactivateTextEdit - Input:",{preventCompleteOperation:t,shouldCloseTable:e});let n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),s=!1;if(null!=T3Gv.opt.textEntryTimer&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)),-1!=n.theActiveTextEditObjectID){let e;n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!0);let a=!1,o=!1,r=T3Gv.opt.svgDoc.GetActiveEdit(),l=null,h=n.theActiveTableObjectID<0,c=ObjectUtil$1.GetObjectPtr(n.theActiveTextEditObjectID,!0);if(c&&(c.TableID<0&&(h=!0),c.DataID,n.theTEWasResized&&(OptCMUtil.SetLinkFlag(n.theActiveTextEditObjectID,DSConstant.LinkFlags.Move),c.hooks.length&&OptCMUtil.SetLinkFlag(c.hooks[0].objid,DSConstant.LinkFlags.Move),n.theTEWasResized=!1,n.theTEWasEdited=!0,n.theActiveTableObjectID<0&&ObjectUtil$1.AddToDirtyList(n.theActiveTextEditObjectID)),c instanceof Instance.Shape.D3Symbol&&(h=!1)),r&&(l=r.GetRuntimeText())){e=r.GetSelectedRange(),a=r.HasDataFields()?0===r.GetTextMinDimensions().width:0===r.GetTextMinDimensions().width||" "===r.GetText();const t=r.formatter.GetFormatAtOffset(0);h&&this.TextStyleToText(c.StyleRecord.Text,t.style),o=!!(c.flags&NvConstant.ObjFlags.TextOnly);{let t=ObjectUtil$1.GetObjectPtr(i,!1);t&&(t.runtimeText=l,t.selrange=e,t=ObjectUtil$1.GetObjectPtr(i,!0),n.theActiveTableObjectID<0&&ObjectUtil$1.AddToDirtyList(n.theActiveTextEditObjectID))}}if(this.TEUnregisterEvents(),a)if(o){ObjectUtil$1.DeleteObjects([n.theActiveTextEditObjectID],!1),c=null;const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0),e=t.indexOf(n.theActiveTextEditObjectID);e>=0&&(t.splice(e,1),SelectUtil.GetTargetSelect()===n.theActiveTextEditObjectID&&SelectUtil.SetTargetSelect(-1,!0)),n.theTEWasEdited=!0}else{const t=T3Gv.stdObj.GetObject(i);c=ObjectUtil$1.GetObjectPtr(n.theActiveTextEditObjectID,!0),c&&c.SetTextObject(-1),t&&t.Delete(),n.theActiveTableObjectID<0&&ObjectUtil$1.AddToDirtyList(n.theActiveTextEditObjectID),n.theTEWasEdited=!0}n.theTEWasEdited&&(s=!0),n.theActiveTextEditObjectID=-1,n.theTEWasEdited=!1,n.theTEWasResized=!1,n.theTELastOp=NvConstant.TextElemLastOpt.Init,this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Init),s&&!t?DrawUtil.CompleteOperation():(ObjectUtil$1.PreserveUndoState(!1),SvgUtil.RenderDirtySVGObjects())}LogUtil.Debug("O.Opt DeactivateTextEdit - Output: Text edit deactivated")}static RegisterLastTEOp(t){if(LogUtil.Debug("O.Opt RegisterLastTEOp - Input:",{lastOp:t}),!T3Gv.opt.bInNoteEdit){const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),i=e.theTELastOp;null!=T3Gv.opt.textEntryTimer&&t!==NvConstant.TextElemLastOpt.Char&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)),e.theTELastOp=t,t!==NvConstant.TextElemLastOpt.Init&&(e.theTEWasEdited=!0);if((e=>{if(t!==NvConstant.TextElemLastOpt.Init)switch(t){case NvConstant.TextElemLastOpt.Char:if(e!==t)return!0;break;case NvConstant.TextElemLastOpt.Select:return!1;default:return!0}return!1})(i)){const i=T3Gv.opt.svgDoc.GetActiveEdit();let n=null,s=null;const a=ObjectUtil$1.GetObjectPtr(e.theActiveTextEditObjectID,!1);if(a&&a.DataID>=0&&i){const o=a.DataID;if(n=i.GetRuntimeText(),s=i.GetSelectedRange(),n){ObjectUtil$1.PreserveUndoState(!1);let a=ObjectUtil$1.GetObjectPtr(o,!1);if(a&&(a.runtimeText=n,a.selrange=s,t!==NvConstant.TextElemLastOpt.Timeout&&(TextParams.minWidth=i.formatter.limits.minWidth,TextParams.maxWidth=i.formatter.limits.maxWidth,TextParams.minHeight=i.minHeight,ObjectUtil$1.GetObjectPtr(e.theActiveTextEditObjectID,!0),a=ObjectUtil$1.GetObjectPtr(o,!0)),t===NvConstant.TextElemLastOpt.Timeout)){const t={};t.BlockID=e.theActiveTextEditObjectID;const i=ObjectUtil$1.GetObjectPtr(t.BlockID,!1);i&&i instanceof Instance.Shape.Connector&&(t.DataID=i.DataID),t.runtimeText=Utils1.DeepCopy(n),t.selrange=Utils1.DeepCopy(s),t.minWidth=TextParams.minWidth,t.maxWidth=TextParams.maxWidth,t.minHeight=TextParams.minHeight,TextParams.minWidth=null}}}}t===NvConstant.TextElemLastOpt.Char&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,T3Gv.opt.textEntryTimer=setTimeout(T3Gv.opt.TextEdit_PauseTyping,1e3))}LogUtil.Debug("O.Opt RegisterLastTEOp - Output: Completed")}static TextStyleToText(t,e){LogUtil.Debug("O.Opt TextStyleToText - Input:",{sdText:t,textStyle:e}),t.FontSize=Math.round(72*e.size/100),t.FontId=-1,t.FontName=e.font,t.Face=0,"bold"===e.weight&&(t.Face+=TextConstant.TextFace.Bold),"italic"===e.style&&(t.Face+=TextConstant.TextFace.Italic),"sub"===e.baseOffset?t.Face+=TextConstant.TextFace.Subscript:"super"===e.baseOffset&&(t.Face+=TextConstant.TextFace.Superscript),"underline"===e.decoration?t.Face+=TextConstant.TextFace.Underline:"line-through"===e.decoration&&(t.Face+=TextConstant.TextFace.Strike),t.Paint.Color=e.color,t.Paint.Opacity=e.colorTrans,LogUtil.Debug("O.Opt TextStyleToText - Output:",t)}static TEUnregisterEvents(t){LogUtil.Debug("O.Opt TEUnregisterEvents - Input:",t),T3Gv.opt.svgDoc.ClearActiveEdit(t),null!=T3Gv.opt.textEntryTimer&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null),T3Gv.opt.textHammer&&(T3Gv.opt.textHammer.off("dragstart"),T3Gv.opt.textHammer.dispose(),T3Gv.opt.textHammer=null),T3Gv.opt.clickAreaHammer&&(T3Gv.opt.clickAreaHammer.off("dragstart"),T3Gv.opt.clickAreaHammer.dispose(),T3Gv.opt.clickAreaHammer=null),T3Gv.opt.decAreaHammer&&(T3Gv.opt.decAreaHammer.off("dragstart"),T3Gv.opt.decAreaHammer.dispose(),T3Gv.opt.decAreaHammer=null),T3Gv.opt.TEWorkAreaHammer&&(T3Gv.opt.TEWorkAreaHammer.off("drag"),T3Gv.opt.TEWorkAreaHammer.off("dragend"),T3Gv.opt.TEWorkAreaHammer.dispose(),T3Gv.opt.TEWorkAreaHammer=null),LogUtil.Debug("O.Opt TEUnregisterEvents - Output: done")}static CalcDefaultInitialTextStyle(t){LogUtil.Debug("O.Opt CalcDefaultInitialTextStyle - Input:",t);const e=new DefaultStyle,i=TextConstant.TextFace;return e.font=t.FontName,e.size=ShapeUtil.PointSizeToFontSize(t.FontSize),e.type=t.FontType,e.color=t.Paint.Color,e.colorTrans=t.Paint.Opacity,e.weight=t.Face&i.Bold?"bold":"normal",e.style=t.Face&i.Italic?"italic":"normal",e.decoration=t.Face&i.Underline?"underline":"none",LogUtil.Debug("O.Opt CalcDefaultInitialTextStyle - Output:",e),e}static TextResizeCommon(t,e,i,n,s){var a;LogUtil.Debug("O.Opt: TextResizeCommon inputs:",{shapeId:t,constrainWidth:e,allowResize:i,svgElementType:(null==(a=null==n?void 0:n.constructor)?void 0:a.name)||"unknown",skipLinkFlagUpdate:s});const o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),r=ObjectUtil$1.GetObjectPtr(t,!1);if(r instanceof Instance.Shape.BaseShape){let e=n||T3Gv.opt.svgObjectLayer.GetElementById(t);if(e){const n=e.textElem;if(null!=n){let a=r.GetTextParams(!0),l=a.trect,h=r.sizedim.width,c=r.sizedim.height,u=a.tsizedim.width,d=a.tsizedim.height,p=n.GetTextMinDimensions(),g=p.width;g<u&&(g=u);let f=p.height;f<d&&(f=d);let b=new Rectangle(l.x,l.y,g,f);if(r.TextFlags&NvConstant.TextFlags.AttachA||r.TextFlags&NvConstant.TextFlags.AttachB){if(r.TextFlags&NvConstant.TextFlags.AttachA){switch(r.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,-p.height-r.TMargins.top);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(r.Frame.width-p.width,-p.height-r.TMargins.top);break;default:n.SetPos(r.Frame.width/2-p.width/2,-p.height-r.TMargins.top)}T3Gv.opt.SetShapeR(r)}else if(r.TextFlags&NvConstant.TextFlags.AttachB){switch(r.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,r.Frame.height);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(r.Frame.width-p.width,r.Frame.height);break;default:n.SetPos(r.Frame.width/2-p.width/2,r.Frame.height)}T3Gv.opt.SetShapeR(r)}}else{let u,p=Utils1.DeepCopy(r.Frame),v=null;r.GetGraph(!1);const m=!0===r.bInGroup;if(m&&(i=!0),r.TextGrow===NvConstant.TextGrowBehavior.Horizontal)if(!Utils2.IsEqual(g,l.width)||!Utils2.IsEqual(f,l.height)){v=Utils1.DeepCopy(r.Frame),r.TRectToFrame(b,!1);let g=r.Frame.width-v.width;Utils2.IsEqual(g,0)&&(g=0);let f=r.Frame.height-v.height;if(Utils2.IsEqual(f,0)&&(f=0),g)switch(r.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:v.width+=g;break;case TextConstant.TextAlign.TopCenter:case TextConstant.TextAlign.Center:case TextConstant.TextAlign.BottomCenter:u=v.x+v.width/2,v.width+=g,u-=v.width/2,m&&0===r.RotationAngle||(v.x=u);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:v.width+=g,m&&0===r.RotationAngle||(v.x-=g)}if(f&&(v.height+=f),i||this.TextPinFrame(v,d)){if(v.width<h&&(v.x=r.Frame.x+r.Frame.width/2-h/2,v.width=h),v.height<c&&(v.y=r.Frame.y+r.Frame.height/2-c/2,v.height=c),(g||f)&&(r.UpdateFrame(v),o.theTEWasResized=!0),n){a=r.GetTextParams(!1),l=a.trect;let t=r.GetSVGFrame(v);n.SetPos(l.x-t.x,l.y-t.y),n.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,l.width,l.height)}if(r.ResizeInTextEdit(e,v),this.TextResizeNeedPageResize(r,v.x+v.width,v.y+v.height),m&&0!==r.RotationAngle){let t={x:p.x+p.width/2,y:p.y+p.height/2},e=ToolActUtil.RotateRect(p,t,r.RotationAngle);t={x:v.x+v.width/2,y:v.y+v.height/2};let i=ToolActUtil.RotateRect(v,t,r.RotationAngle);g=e.x-i.x,f=e.y-i.y,r.OffsetShape(g,f)}s||HookUtil.ResizeSetLinkFlag(t,DSConstant.LinkFlags.Move)}}}}}}else r.AdjustTextEditBackground(t,n);LogUtil.Debug("O.Opt: TextResizeCommon completed for shape:",t)}static ResetActiveTextEditAfterUndo(t){LogUtil.Debug("O.Opt: ResetActiveTextEditAfterUndo called with text override:",t?"provided":"none");const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==e.theActiveTextEditObjectID){const i=ObjectUtil$1.GetObjectPtr(e.theActiveTextEditObjectID,!1);if(!i)return void LogUtil.Debug("O.Opt: ActiveTextObject not found, aborting");const n=i.DataID;if(-1!==n){const s=ObjectUtil$1.GetObjectPtr(n,!1);if(s){let n=s.runtimeText;const a=s.selrange;t&&(n=t),t||(ObjectUtil$1.AddToDirtyList(e.theActiveTextEditObjectID),SvgUtil.RenderDirtySVGObjects());const o=T3Gv.opt.svgObjectLayer.GetElementById(e.theActiveTextEditObjectID);if(o&&o.textElem){this.TextRegisterEvents(o.textElem);const t=T3Gv.opt.svgDoc.GetActiveEdit();t&&(t.SetRuntimeText(n),t.SetSelectedRange(a.start,a.end,a.line,a.anchor)),""===n.text&&(LogUtil.Debug("O.Opt: Initializing empty text formatting"),this.InitEmptyText(i,o))}}}e.TELastOp=NvConstant.TextElemLastOpt.Init,SvgUtil.ShowSVGSelectionState(e.theActiveTextEditObjectID,!1)}LogUtil.Debug("O.Opt: ResetActiveTextEditAfterUndo complete")}static GuessTextIndents(t,e){let i,n,s,a,o,r,l,h,c,u,d,p,g,f,b;LogUtil.Debug("O.Opt GuessTextIndents - Input:",{polygonPoints:t,shapeFrame:e});let v,m=!1,y=!1,S=10,w=[{x:0,y:0},{x:0,y:0}],x=[{x:0,y:0},{x:0,y:0}],C={},D={},T={};i=e.width,i<1&&(i=1),n=e.height,n<1&&(n=1),s=i,a=n;let k=Utils2.SetRect(0,0,e.width,e.height);o=a/20;for(let $=0;$<S;$++){r=.8*$*s/S;let e=PolyUtil.PolyGetIntersect(t,r,w,null,!0);if(2===e)for(let i=0;i<S-$;i++)l=(1-i/S*.8)*s,e=PolyUtil.PolyGetIntersect(t,l,x,null,!0),2===e&&(h=x[0]>w[0]?x[0]:w[0],c=x[1]<w[1]?x[1]:w[1],h<c&&(p=h,e=PolyUtil.PolyGetIntersect(t,p+1,x,null,!1),e>2&&(p=h+=o,e=PolyUtil.PolyGetIntersect(t,p+1,x,null,!1)),p=c,2===e&&(e=PolyUtil.PolyGetIntersect(t,p-1,x,null,!1),e>2&&(p=c-=o,e=PolyUtil.PolyGetIntersect(t,p-1,x,null,!1))),2===e&&c>h&&(p=h+(c-h)/2,u=r,d=l,e=PolyUtil.PolyGetIntersect(t,p-1,x,null,!1),2===e&&(x[0]>r&&(u=x[0]),x[1]<l&&(d=x[1])),g=(d-u)*(c-h),(!1===m||f<g)&&(m=!0,f=g,C=Utils2.SetRect(u,h,d,c)))))}m&&(b=f,Utils2.CopyRect(D,C),y=!0),o=s/20;for(let $=0;$<S;$++)if(r=.8*$*a/S,v=PolyUtil.PolyGetIntersect(t,r,w,null,!1),2===v)for(let e=0;e<S-$;e++)l=(1-e/S*.8)*a,v=PolyUtil.PolyGetIntersect(t,l,x,null,!1),2===v&&(h=x[0]>w[0]?x[0]:w[0],c=x[1]<w[1]?x[1]:w[1],h<c&&(p=h,v=PolyUtil.PolyGetIntersect(t,p+1,x,null,!0),v>2&&(p=h+=o,v=PolyUtil.PolyGetIntersect(t,p+1,x,null,!0)),p=c,2===v&&(v=PolyUtil.PolyGetIntersect(t,p-1,x,null,!0),v>2&&(p=c-=o,v=PolyUtil.PolyGetIntersect(t,p-1,x,null,!0))),2===v&&c>h&&(p=h+(c-h)/2,u=r,d=l,v=PolyUtil.PolyGetIntersect(t,p-1,x,null,!0),2===v&&(x[0]>r&&(u=x[0]),x[1]<l&&(d=x[1])),g=(d-u)*(c-h),(!1===m||f<g)&&(m=!0,y=!0,f=g,C=Utils2.SetRect(h,u,c,d)))));for(y&&m&&b>f&&Utils2.CopyRect(C,D),m?(T.left_sindent=(C.x+0)/i,T.right_sindent=(k.x+k.width-(C.x+C.width)-0)/i,T.top_sindent=(C.y+0)/n,T.bottom_sindent=(k.y+k.height-(C.y+C.height)-0)/n):(T.left_sindent=.2,T.right_sindent=.2,T.top_sindent=.2,T.bottom_sindent=.2);T.left_sindent+T.right_sindent>.8;)T.left_sindent>.4&&(T.left_sindent-=.1),T.right_sindent>.4&&(T.right_sindent-=.1);for(;T.top_sindent+T.bottom_sindent>.8;)T.top_sindent>.4&&(T.top_sindent-=.1),T.bottom_sindent>.4&&(T.bottom_sindent-=.1);return LogUtil.Debug("O.Opt GuessTextIndents - Output:",T),T}static FontSizeToPoints(t){if(LogUtil.Debug("O.Opt FontSizeToPoints - Input:",t),!t)return LogUtil.Debug("O.Opt FontSizeToPoints - Output:",-1),-1;const{rulerConfig:e,svgDoc:i}=T3Gv.docUtil,n=i.docInfo.docDpi,s=e.showpixels?72*t/n:Math.round(72*t/n);return LogUtil.Debug("O.Opt FontSizeToPoints - Output:",s),s}static TextRegisterEvents(t,e,i){LogUtil.Debug("O.Opt TextRegisterEvents - Input:",{textEditorWrapper:t,activationEvent:e,additionalOptions:i}),null!=t&&(T3Gv.opt.SetVirtualKeyboardLifter(t),t.Activate(e,i),T3Gv.opt.textHammer=new Hammer(t.editor.parent.textElem.node),T3Gv.opt.clickAreaHammer=new Hammer(t.editor.parent.clickAreaElem.node),T3Gv.opt.decAreaHammer=new Hammer(t.editor.parent.decorationAreaElem.node),T3Gv.opt.TEWorkAreaHammer=new Hammer(document.getElementById("svg-area")),T3Gv.opt.textHammer.on("dragstart",this.TEDragStartFactory(t.editor)),T3Gv.opt.clickAreaHammer.on("dragstart",this.TEClickAreaDragStartFactory(t.editor)),T3Gv.opt.decAreaHammer.on("dragstart",this.TEClickAreaDragStartFactory(t.editor)),T3Gv.opt.TEWorkAreaHammer.on("drag",this.TEDragFactory(t.editor)),T3Gv.opt.TEWorkAreaHammer.on("dragend",this.TEDragEndFactory(t.editor))),LogUtil.Debug("O.Opt TextRegisterEvents - Output: Registered events")}static TargetPasteText(){if(LogUtil.Debug("O.Opt TargetPasteText - Input: no parameters"),!T3Gv.opt.textClipboard)return LogUtil.Debug("O.Opt TargetPasteText - Output: false (text clipboard does not exist)"),!1;if(null==T3Gv.opt.textClipboard.text)return LogUtil.Debug("O.Opt TargetPasteText - Output: false (text clipboard text is null)"),!1;const t=SelectUtil.GetTargetSelect();if(-1!==t){const e=ObjectUtil$1.GetObjectPtr(t,!1);if(e&&e.AllowTextEdit()){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);this.ActivateTextEdit(e);const i=T3Gv.opt.svgDoc.GetActiveEdit(),n=i.GetText().length;return i.SetSelectedRange(0,n),this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Paste),i.Paste(T3Gv.opt.textClipboard,!0),this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout),LogUtil.Debug("O.Opt TargetPasteText - Output: true (text pasted successfully)"),!0}}return LogUtil.Debug("O.Opt TargetPasteText - Output: false (invalid target or text editing not allowed)"),!1}static GetActiveTextEdit(){LogUtil.Debug("O.Opt GetActiveTextEdit - Input: No parameters");let t=null;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);return-1!=e.theActiveTextEditObjectID&&(t=e.theActiveTextEditObjectID),LogUtil.Debug("O.Opt GetActiveTextEdit - Output:",t),t}static ActivateTextEdit(t,e,i,n){let s,a,o,r,l;LogUtil.Debug("O.Opt ActivateTextEdit - Input:",{drawingElementId:null==t?void 0:t.ID,hasEvent:!!e,preventSelectionChange:i,hasTextData:!!n});const h=t.ID;let c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);const u=[];let d={};if(!(r=ObjectUtil$1.GetObjectPtr(h,!1))||!(r instanceof Instance.Shape.BaseDrawObject)||r.flags&NvConstant.ObjFlags.Lock)return void LogUtil.Debug("O.Opt ActivateTextEdit - Output: Object invalid or locked");if(d.BlockID=h,null==n){if(h==c.theActiveTextEditObjectID)return;-1!=c.theActiveTextEditObjectID&&T3Gv.opt.CloseEdit();const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);-1===t.indexOf(h)||t.length>1?(u.push(h),SelectUtil.SelectObjects(u,!1,!0),s=t[0]):s=h}else d=n.Data;let p=ObjectUtil$1.GetObjectPtr(h,!0);const g=p.GetTextObject(e,!1,d);if(null!=g){if(null==n)c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!0);else{ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).EditorID=n.EditorID,c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!0)}const t=T3Gv.opt.svgObjectLayer.GetElementById(h);if(-1==g){if(p=ObjectUtil$1.GetObjectPtr(h,!0),o=new TextObject({}),a=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TextObject,o),null===a)return void LogUtil.Debug("O.Opt ActivateTextEdit - Output: Failed to create text block");if(!p.SetTextObject(a.ID))return;p.LMAddSVGTextObject(T3Gv.opt.svgDoc,t),o=a.Data}else o=ObjectUtil$1.GetObjectPtr(g,!0),null==t.textElem&&p.LMAddSVGTextObject(T3Gv.opt.svgDoc,t);if(null==n&&(c.theActiveTextEditObjectID=h,c.theTEWasResized=!1,c.theTEWasEdited=!1),null==n&&(r.TextFlags&NvConstant.TextFlags.AttachA||r.TextFlags&NvConstant.TextFlags.AttachB||T3Gv.opt.svgObjectLayer.MoveElementToFront(t)),null==n){e&&e.gesture?this.TextRegisterEvents(t.textElem,e.gesture.srcEvent,i):this.TextRegisterEvents(t.textElem,e);const n=T3Gv.opt.svgDoc.GetActiveEdit();if(l=n.GetSelectedRange(),d.theSelectedRange=Utils1.DeepCopy(l),null==e){const t=n.GetText().length;d.theSelectedRange.start=0,d.theSelectedRange.anchor=0,d.theSelectedRange.end=t}}else n&&n.EditorID===cl.EditorID&&(l=n.Data.theSelectedRange);if(""===t.textElem.GetText()){if(g<0){const e={},i=p.GetTextDefault(e);d.TextStyle=Utils1.DeepCopy(i);const n=this.CalcDefaultInitialTextStyle(i);d.theDefaultStyle=Utils1.DeepCopy(n);const s=e.vjust;d.vjust=s,T3Gv.opt.svgDoc.GetActiveEdit(),d.theSelectedRange=l,t.textElem.SetText(" "),t.textElem.SetFormat(n),t.textElem.SetParagraphStyle(e),p instanceof Instance.Shape.BaseShape&&t.textElem.SetVerticalAlignment(s),t.textElem.SetText(""),o.runtimeText=t.textElem.GetRuntimeText()}p.TextFlags=Utils2.SetFlag(p.TextFlags,NvConstant.TextFlags.Clickhere,!1)}l&&(o.selrange=l),null==n&&(t.SetCursor(CursorConstant.CursorType.Text),s&&SvgUtil.ShowSVGSelectionState(s,!1),this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Init)),ObjectUtil$1.PreserveUndoState(!1)}LogUtil.Debug("O.Opt ActivateTextEdit - Output: Text editing activated for object",h)}static CheckTextHyperlinkHit(t,e){if(LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Input:",{drawingObject:t.BlockID,eventPosition:e}),-1===t.DataID&&-1===t.TableID)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (no text data)"),!1;if(t.flags&NvConstant.ObjFlags.Lock)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (object locked)"),!1;if(OptCMUtil.GetEditMode()!==NvConstant.EditState.Default)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (not in default edit mode)"),!1;const i=T3Gv.opt.svgObjectLayer.GetElementById(t.tag),n=i?i.textElem:null;if(!n)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (no text element)"),!1;return!!n.GetHyperlinkAtLocation(e)||(LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (no hyperlink found)"),!1)}static NoteIsShowing(t,e){LogUtil.Debug("O.Opt NoteIsShowing - Input:",{noteShapeId:t,noteTableCell:e});return LogUtil.Debug("O.Opt NoteIsShowing - Output:",false),false}static CreateTextBlock(t,e,i,n){const s={},a=t.GetTextDefault(s);if(!a)return-1;const o=TextUtil.CalcDefaultInitialTextStyle(a),r=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text);if(r.SetText(e),r.SetFormat(o),r.SetParagraphStyle(s),t instanceof Instance.Shape.BaseShape){if(null===t.vjust){const e=ShapeUtil.TextAlignToJust(t.TextAlign);t.vjust=e.vjust}r.SetVerticalAlignment(t.vjust)}if(i){const t=r.CalcTextFit(32e3);i.height=t.height,i.width=t.width}const l=r.GetRuntimeText(),h=r.GetSelectedRange(),c=new TextObject({});return c.runtimeText=l,c.selrange=h,T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TextObject,c).ID}static UpdateFieldDataTooltipPos(t,e){}static HandleDataTooltipClose(t){}static ClearFieldDataDatePicker(){}static HandleTextFormatAttributes(t,e){LogUtil.Debug("O.Opt HandleTextFormatAttributes - Input:",{textObject:t,objectIndex:e});const i=TextConstant.TextFace,n={hasText:!1},s=t.GetTextFormat(!0,n);n.hasText&&(T3Gv.opt.selectionState.selectionhastext=!0),0===e?(T3Gv.opt.selectionState.fontid=s.FontId,T3Gv.opt.selectionState.fontsize=s.FontSize,T3Gv.opt.selectionState.bold=(s.Face&i.Bold)>0,T3Gv.opt.selectionState.italic=(s.Face&i.Italic)>0,T3Gv.opt.selectionState.underline=(s.Face&i.Underline)>0,T3Gv.opt.selectionState.superscript=(s.Face&i.Superscript)>0,T3Gv.opt.selectionState.subscript=(s.Face&i.Subscript)>0):(T3Gv.opt.selectionState.fontid!==s.FontId&&(T3Gv.opt.selectionState.fontid=-1),T3Gv.opt.selectionState.fontsize!==s.FontSize&&(T3Gv.opt.selectionState.fontsize=-1),T3Gv.opt.selectionState.bold!==(s.Face&i.Bold)>0&&(T3Gv.opt.selectionState.bold=!1),T3Gv.opt.selectionState.italic!==(s.Face&i.Italic)>0&&(T3Gv.opt.selectionState.italic=!1),T3Gv.opt.selectionState.underline!==(s.Face&i.Underline)>0&&(T3Gv.opt.selectionState.underline=!1),T3Gv.opt.selectionState.superscript!==(s.Face&i.Superscript)>0&&(T3Gv.opt.selectionState.superscript=!1),T3Gv.opt.selectionState.subscript!==(s.Face&i.Subscript)>0&&(T3Gv.opt.selectionState.subscript=!1)),LogUtil.Debug("O.Opt HandleTextFormatAttributes - Output: Text format attributes processed")}static TEDragStartFactory(t){return LogUtil.Debug("O.Opt TEDragStartFactory - Input:",{mouseDragHandler:t}),function(e){return LogUtil.Debug("O.Opt TEDragStartHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseDown(e),LogUtil.Debug("O.Opt TEDragStartHandler - Output: Mouse down handled"),!1}}static TEClickAreaDragStartFactory(t){return LogUtil.Debug("O.Opt TEClickAreaDragStartFactory - Input:",{clickAreaHandler:t}),function(e){return LogUtil.Debug("O.Opt TEClickAreaDragStartHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseDown(e),LogUtil.Debug("O.Opt TEClickAreaDragStartHandler - Output: Mouse down handled"),!1}}static TEDragFactory(t){return LogUtil.Debug("O.Opt TEDragFactory - Input:",{dragMoveHandler:t}),function(e){return LogUtil.Debug("O.Opt TEDragHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseMove(e),LogUtil.Debug("O.Opt TEDragHandler - Output: Mouse move handled"),!1}}static TEDragEndFactory(t){return LogUtil.Debug("O.Opt TEDragEndFactory - Input:",{dragEndHandler:t}),function(e){return LogUtil.Debug("O.Opt TEDragEndHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseUp(e),LogUtil.Debug("O.Opt TEDragEndHandler - Output: Mouse up handled and messages unblocked"),!1}}static DeleteTargetTextObject(t){if(null==t&&(t=SelectUtil.GetTargetSelect()),t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!0),i=e.DataID;if(-1!=i){const t=T3Gv.stdObj.GetObject(i);e.SetTextObject(-1),t&&t.Delete()}}}static TextAutoScroll(t){if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);if(e&&e.textElem){const t=e.textElem.GetInputCursorPos();if(t){const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.x2,t.y2);T3Gv.docUtil.ScrollToPosition(e.x,e.y)}}}}static TextPinFrame(t,e){const i=OptConstant.Common.EdgeSlop;if(t.x<i&&(t.x=i),t.y<i&&(t.y=i),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let s=t.x+t.width-n.dim.x+i;s>0&&t.x>=s&&(t.x-=s),s=t.y+t.height-n.dim.y+i,s>0&&(t.y-e>=s||LogUtil.Debug("O.Opt TextPinFrame - Error: Frame cannot be pinned within bounds"),t.y-=s)}return!0}static TextResizeNeedPageResize(t,e,i){if(!(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto)){let t,n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e>n.dim.x&&(n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),t={x:n.dim.x+T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),y:n.dim.y},T3Gv.opt.UpdateEdgeLayers([],n.dim,t),n.dim.x+=T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),UIUtil.ResizeSVGDocument()),i>n.dim.y&&(n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),t={x:n.dim.x,y:n.dim.y+T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom)},T3Gv.opt.UpdateEdgeLayers([],n.dim,t),n.dim.y+=T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom),UIUtil.ResizeSVGDocument())}}static InitEmptyText(t,e){const i={},n=t.GetTextDefault(i),s=this.CalcDefaultInitialTextStyle(n),a=i.vjust;e.textElem.SetText(" "),e.textElem.SetFormat(s),e.textElem.SetParagraphStyle(i),t instanceof Instance.Shape.BaseShape&&e.textElem.SetVerticalAlignment(a),e.textElem.SetText("")}}class LinkParameters{constructor(){__publicField(this,"ConnectIndex"),__publicField(this,"ConnectPt"),__publicField(this,"ConnectInside"),__publicField(this,"ConnectHookFlag"),__publicField(this,"HookIndex"),__publicField(this,"InitialHook"),__publicField(this,"PrevConnect"),__publicField(this,"ConnectIndexHistory"),__publicField(this,"SConnectIndex"),__publicField(this,"SConnectInside"),__publicField(this,"SConnectHookFlag"),__publicField(this,"SConnectPt"),__publicField(this,"HiliteConnect"),__publicField(this,"HiliteInside"),__publicField(this,"HiliteHookFlag"),__publicField(this,"SHiliteConnect"),__publicField(this,"SHiliteInside"),__publicField(this,"SHiliteHookFlag"),__publicField(this,"JoinIndex"),__publicField(this,"JoinData"),__publicField(this,"JoinSourceData"),__publicField(this,"SJoinIndex"),__publicField(this,"SJoinData"),__publicField(this,"SJoinSourceData"),__publicField(this,"HiliteJoin"),__publicField(this,"SHiliteJoin"),__publicField(this,"ArraysOnly"),__publicField(this,"lpCircList"),__publicField(this,"DropOnLine"),__publicField(this,"AutoInsert"),__publicField(this,"AutoPoints"),__publicField(this,"AutoSeg"),__publicField(this,"AutoSinglePoint"),__publicField(this,"AutoHeal"),__publicField(this,"AutoHealID"),__publicField(this,"cpt"),__publicField(this,"ContainerPt"),__publicField(this,"AllowJoin"),__publicField(this,"savedEditState"),this.ConnectIndex=-1,this.ConnectPt={x:0,y:0},this.ConnectInside=null,this.ConnectHookFlag=0,this.HookIndex=-1,this.InitialHook=-1,this.PrevConnect=-1,this.ConnectIndexHistory=[],this.SConnectIndex=-1,this.SConnectInside=null,this.SConnectHookFlag=0,this.SConnectPt={x:0,y:0},this.HiliteConnect=-1,this.HiliteInside=null,this.HiliteHookFlag=0,this.SHiliteConnect=-1,this.SHiliteInside=null,this.SHiliteHookFlag=0,this.JoinIndex=-1,this.JoinData=0,this.JoinSourceData=0,this.SJoinIndex=-1,this.SJoinData=0,this.SJoinSourceData=0,this.HiliteJoin=-1,this.SHiliteJoin=-1,this.ArraysOnly=!1,this.lpCircList=[],this.DropOnLine=!1,this.AutoInsert=!1,this.AutoPoints=[],this.AutoSeg=0,this.AutoSinglePoint=0,this.AutoHeal=!1,this.AutoHealID=-1,this.cpt=[],this.ContainerPt=[],this.AllowJoin=0,this.savedEditState=NvConstant.EditState.Default}}class DynamicHit{constructor(t,e,i,n,s,a,o){__publicField(this,"ID"),__publicField(this,"snap"),__publicField(this,"edge"),__publicField(this,"distance"),__publicField(this,"leftright"),__publicField(this,"aboveleft"),__publicField(this,"label"),__publicField(this,"pt"),__publicField(this,"otherhits",[]),this.ID=t,this.snap=e,this.edge=i,this.distance=n,this.leftright=s,this.aboveleft=a,this.label=o,this.pt=null,this.otherhits=[]}}class DynamicUtil{static DynamicSnapsGetSnapObjects(t,e,i,n,s,a){let o,r,l,h,c,u,d,p,g;const f=TextConstant.TextJust,b=LayerUtil.ActiveVisibleZList();o=b.length;const v=function(t,e,n,s,a,o,r,l,h){const c=n-s,p=Math.abs(c);u=[];const g=i[t];if(g&&(u=g.otherhits),p<=5)if(null==g||o<g.distance)g&&u.push(g),d=new DynamicHit(e,c,a,o,r,l,a===f.Center),d.otherhits=u,i[t]=d;else{const t=new DynamicHit(e,c,a,o,r,l,a===f.Center);g.otherhits.push(t)}},m=function(t){let e,n=!1;for(e in i){const s=i[e];if(t&&s&&t.ID==s.ID&&!0===s.label){n=!0;break}}n||(t.label=!0)},y=function(t){let i,n;o=t.otherhits.length;let s,a=[];for(r=0;r<o;r++)i=t.otherhits[r],Utils2.IsEqual(i.snap,t.snap,.5)&&a.push(i);for(t.otherhits=a,o=t.otherhits.length,o>1&&t.otherhits.sort((function(t,e){return t.distance===e.distance?0:t.distance<e.distance?-1:1})),r=o-1;r>=0;r--)if(i=t.otherhits[r],ObjectUtil$1.GetObjectPtr(i.ID,!1).GetSnapRect(),r>0?(n=t.otherhits[r-1],s=ObjectUtil$1.GetObjectPtr(n.ID,!1).GetSnapRect()):(n=t,s=ObjectUtil$1.GetObjectPtr(t.ID,!1).GetSnapRect()),t.leftright)if(t.aboveleft)switch(i.distance-=n.distance+s.height,t.edge){case f.Left:i.pt={x:e.x,y:s.y};break;case f.Right:i.pt={x:l,y:s.y};break;case f.Center:i.pt={x:p,y:s.y}}else switch(i.distance-=n.distance+s.height,t.edge){case f.Left:i.pt={x:e.x,y:s.y+s.height};break;case f.Right:i.pt={x:l,y:s.y+s.height};break;case f.Center:i.pt={x:p,y:s.y+s.height}}else if(t.aboveleft)switch(i.distance-=n.distance+s.width,t.edge){case f.Top:i.pt={x:s.x,y:s.y};break;case f.Bottom:i.pt={x:s.x,y:h};break;case f.Center:i.pt={x:s.x,y:g}}else switch(i.distance-=n.distance+s.width,t.edge){case f.Top:i.pt={x:s.x+s.width,y:s.y};break;case f.Bottom:i.pt={x:s.x+s.width,y:h};break;case f.Center:i.pt={x:s.x+s.width,y:g}}},S=function(t,i,n,s,a){let o,r,c,u,d,p,g,f=0,b=[],v=[];const m=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);let y=PolyUtil.PolyLIntersect(t,i,m,m.length);for(;y.bSuccess&&(b.push(y.ipt),f+=y.lpseg,!(f>m.length-1));){const e=m.slice(f);y=PolyUtil.PolyLIntersect(t,i,e,e.length)}if(s){for(r=b.length,o=0;o<r;o++)b[o].y<=e.y?(c=e.y-b[o].y,(void 0===u||c<u)&&(u=c,p=o)):b[o].y>=h&&(c=b[o].y-h,(void 0===d||c<d)&&(d=c,g=o));(void 0!==u&&void 0!==d||!a)&&(void 0!==u&&v.push({pt:b[p],dist:u}),void 0!==d&&v.push({pt:b[g],dist:d}))}else{for(r=b.length,o=0;o<r;o++)b[o].x<=e.x?(c=e.x-b[o].x,(void 0===u||c<u)&&(u=c,p=o)):b[o].x>=l&&(c=b[o].x-l,(void 0===d||c<d)&&(d=c,g=o));(void 0!==u&&void 0!==d||!a)&&(void 0!==u&&v.push({pt:b[p],dist:u}),void 0!==d&&v.push({pt:b[g],dist:d}))}return v},w=function(t,n,s){let a,o;const r=e.x,l=e.y,h=e.x+e.width,c=e.y+e.height,u=e.x+e.width/2,d=e.y+e.height/2,p=TextConstant.TextJust;if(s===NvConstant.GuideDistanceTypes.Room){let e=Utils1.DeepCopy(t.Frame);const s=t.StyleRecord.Line.BThick;if(Utils2.InflateRect(e,-s,-s),Utils2.IsRectangleFullyEnclosed(e,n)){const e=S(t,{x:r,y:d},0,!1,!0),n=S(t,{x:u,y:l},0,!0,!0);2===e.length&&(a=e[0].dist,(null==i.wall_left||i.wall_left.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-1,!0),o.pt=e[0].pt,i.wall_left=o),a=e[1].dist,(null==i.wall_right||i.wall_right.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-2,!0),o.pt=e[1].pt,i.wall_right=o)),2===n.length&&(a=n[0].dist,(null==i.wall_top||i.wall_top.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-1,!0),o.pt=n[0].pt,i.wall_top=o),a=n[1].dist,(null==i.wall_bottom||i.wall_bottom.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-2,!0),o.pt=n[1].pt,i.wall_bottom=o))}}if(s===NvConstant.GuideDistanceTypes.PolyWall||s===NvConstant.GuideDistanceTypes.Room){if(d>=l&&d<=c){const e=S(t,{x:r,y:d},0,!1,!1);2===e.length&&(null!=e[0].pt&&(a=e[0].dist,(null==i.wall_left||i.wall_left.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-1,!0),o.pt=e[0].pt,i.wall_left=o)),null!=e[1].pt&&(a=e[1].dist,(null==i.wall_right||i.wall_right.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-2,!0),o.pt=e[1].pt,i.wall_right=o)))}if(u>=r&&u<=h){const e=S(t,{x:u,y:l},0,!0,!1);2===e.length&&(null!=e[0].pt&&(a=e[0].dist,(null==i.wall_top||i.wall_top.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-1,!0),o.pt=e[0].pt,i.wall_top=o)),null!=e[1].pt&&(a=e[1].dist,(null==i.wall_bottom||i.wall_bottom.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-2,!0),o.pt=e[1].pt,i.wall_bottom=o)))}}else if(s===NvConstant.GuideDistanceTypes.Vertical_Wall){let e=Utils1.DeepCopy(t.Frame);const s=t.StyleRecord.Line.BThick;Utils2.InflateRect(e,-s,0),e.y<=d&&e.y+e.height>=d&&(n.x>e.x+e.width?(a=n.x-(e.x+e.width),(null==i.wall_left||i.wall_left.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-1,!0),i.wall_left=o)):h<e.x&&(a=e.x-h,(null==i.wall_right||i.wall_right.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-2,!0),i.wall_right=o)))}else if(s===NvConstant.GuideDistanceTypes.Horizontal_Wall){let e=Utils1.DeepCopy(t.Frame);const s=t.StyleRecord.Line.BThick;Utils2.InflateRect(e,0,-s),e.x<=u&&e.x+e.width>=u&&(n.y>e.y+e.height?(a=n.y-(e.y+e.height),o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-1,!0),i.wall_top=o):c<e.y&&(a=e.y-c,o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-2,!0),i.wall_bottom=o))}};if(null!=ObjectUtil$1.GetObjectPtr(t,!1)){let l;const h=e.x+e.width,u=e.y+e.height,d=e.x+e.width/2,p=e.y+e.height/2;let g,S=!1;n&&n.distanceonly&&(S=!0);for(let i=0;i<o;i++){const n=b[i];if(n!==t&&!a){const t=ObjectUtil$1.GetObjectPtr(n,!1);if(t){const i=t.GetSnapRect(),s=i.x+i.width,a=i.x,o=i.y,r=i.y+i.height,g=i.x+i.width/2,b=i.y+i.height/2;l=t.GuideDistanceOnly(),l&&w(t,e,l),t&&t.IsSnapTarget()&&!S&&(a>=e.x-5&&a<=e.x+5&&(r<e.y?(c=e.y-r,v("above_left",n,a,e.x,f.Left,c,!0,!0)):o>u&&(c=o-u,v("below_left",n,a,e.x,f.Left,c,!0,!1))),s>=e.x-5&&s<=e.x+5&&(r<e.y?(c=e.y-r,v("above_left",n,s,e.x,f.Left,c,!0,!0)):o>u&&(c=o-u,v("below_left",n,s,e.x,f.Left,c,!0,!1))),s>=h-5&&s<=h+5&&(r<e.y?(c=e.y-r,v("above_right",n,s,h,f.Right,c,!0,!0)):o>u&&(c=o-u,v("below_right",n,s,h,f.Right,c,!0,!1))),a>=h-5&&a<=h+5&&(r<e.y?(c=e.y-r,v("above_right",n,a,h,f.Right,c,!0,!0)):o>u&&(c=o-u,v("below_right",n,a,h,f.Right,c,!0,!1))),o>=e.y-5&&o<=e.y+5&&(s<e.x?(c=e.x-s,v("left_top",n,o,e.y,f.Top,c,!1,!0)):a>h&&(c=a-h,v("right_top",n,o,e.y,f.Top,c,!1,!1))),r>=e.y-5&&r<=e.y+5&&(s<e.x?(c=e.x-s,v("left_top",n,r,e.y,f.Top,c,!1,!0)):a>h&&(c=a-h,v("right_top",n,r,e.y,f.Top,c,!1,!1))),r>=u-5&&r<=u+5&&(s<e.x?(c=e.x-s,v("left_bottom",n,r,u,f.Bottom,c,!1,!0)):a>h&&(c=a-h,v("right_bottom",n,r,u,f.Bottom,c,!1,!1))),o>=u-5&&o<=u+5&&(s<e.x?(c=e.x-s,v("left_bottom",n,o,u,f.Bottom,c,!1,!0)):a>h&&(c=a-h,v("right_bottom",n,o,u,f.Bottom,c,!1,!1))),g>=d-5&&g<=d+5&&(r<e.y?(c=e.y-r,v("above_center",n,g,d,f.Center,c,!0,!0)):o>u&&(c=o-u,v("below_center",n,g,d,f.Center,c,!0,!1))),b>=p-5&&b<=p+5&&(s<e.x?(c=e.x-s,v("left_center",n,b,p,f.Center,c,!1,!0)):a>h&&(c=a-h,v("right_center",n,b,p,f.Center,c,!1,!1))))}}}const x={x:null,y:null},C={x:0,y:0};if(s){let t,e;const n=s.length;for(e=0;e<n;e++){g=s[e];const t=i[g];t&&(t.leftright?(x.x=t.snap,C.x=t.snap):(x.y=t.snap,C.y=t.snap))}for(g in i){const n=i[g];if(null!=n&&s.indexOf(g)<0)if(n.leftright){if("above_center"===g||"below_center"===g)if(s.indexOf("above_right")>=0||s.indexOf("below_right")>=0)for(n.snap-=C.x/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap-=C.x/2;else if(s.indexOf("above_left")>=0||s.indexOf("below_left")>=0)for(n.snap+=-C.x/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap+=-C.x/2;Utils2.IsEqual(n.snap,0,.5)||(i[g]=null)}else{if("left_center"===g||"right_center"===g)if(s.indexOf("left_bottom")>=0||s.indexOf("right_bottom")>=0)for(n.snap-=C.y/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap-=C.y/2;else if(s.indexOf("left_top")>=0||s.indexOf("right_top")>=0)for(n.snap+=-C.y/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap+=-C.y/2;Utils2.IsEqual(n.snap,0,.5)||(i[g]=null)}}for(g in i){const t=i[g];null!=t&&(m(t),y(t))}}else{const t={x:null,y:null};if(T3Gv.docUtil.docConfig.centerSnap){const e=["above_center","below_center","left_center","right_center"];for(o=e.length,r=0;r<o;r++){g=e[r];const n=i[g];null!=n&&null!=n.snap&&(n.leftright?(null==t.x||Math.abs(n.snap)<Math.abs(t.x))&&(t.x=n.snap,x.x=n.snap):(null==t.y||Math.abs(n.snap)<Math.abs(t.x))&&(t.y=n.snap,x.y=n.snap))}}for(g in i){const e=i[g];switch(null!=e&&null!=e.snap&&(e.leftright&&null==t.x?(null==x.x||Math.abs(e.snap)<Math.abs(x.x))&&(x.x=e.snap):null==t.y&&(null==x.y||Math.abs(e.snap)<Math.abs(x.y))&&(x.y=e.snap)),g){case"wall_left":i.left_center&&(i[g]=null);break;case"wall_right":i.right_center&&(i[g]=null);break;case"wall_top":i.above_center&&(i[g]=null);break;case"wall_bottom":i.below_center&&(i[g]=null)}}for(g in i){const t=i[g];null!=t&&null!=t.snap&&(t.leftright?null==x.x||Utils2.IsEqual(t.snap,x.x,.5)||(i[g]=null):null==x.y||Utils2.IsEqual(t.snap,x.y,.5)||(i[g]=null))}for(g in i){const t=i[g];null!=t&&(m(t),y(t))}}return x}}static DynamicSnapsUpdateGuides(t,e,i){if(null!=ObjectUtil$1.GetObjectPtr(e,!1)){let e,n,s,a,o;const r=T3Gv.opt.dynamicGuides,l=TextConstant.TextJust;n=i.y+i.height,s=i.x+i.width,a=i.x+i.width/2,o=i.y+i.height/2;const h={x:0,y:0},c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),u="#2C75F9",d=Utils1.DeepCopy(T3Gv.opt.header.DimensionFontStyle);d.color=u;const p=T3Gv.opt.svgDoc.docInfo.docToScreenScale;d.size/=p;const g=function(t){const e=t+"label",i=t+"back",n=T3Gv.opt.svgHighlightLayer.GetElementById(t),s=T3Gv.opt.svgHighlightLayer.GetElementById(e),a=T3Gv.opt.svgHighlightLayer.GetElementById(i);n&&T3Gv.opt.svgHighlightLayer.RemoveElement(n),s&&T3Gv.opt.svgHighlightLayer.RemoveElement(s),a&&T3Gv.opt.svgHighlightLayer.RemoveElement(a)},f=function(e,r){const p=ObjectUtil$1.GetObjectPtr(e.ID,!1);if(null!=p){let g,f,b;const v=p.GetSnapRect(),m=v.y+v.height,y=v.x+v.width,S=1/T3Gv.opt.svgDoc.GetWorkArea().docScale,w=3*S+","+6*S,x=12*S+","+6*S;let C,D=T3Gv.opt.svgHighlightLayer.GetElementById(r),T=!1,k=null;if(e.leftright?e.edge===l.Left?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.x=i.x),e.aboveleft?null!=e.pt?(g={x:i.x,y:e.pt.y},f={x:i.x,y:v.y},h.y=e.pt.y-e.distance/2):(g={x:i.x,y:n},f={x:i.x,y:v.y},h.y=i.y-e.distance/2):null!=e.pt?(g={x:i.x,y:e.pt.y},f={x:i.x,y:m},h.y=e.pt.y+e.distance/2):(b=t.above_left?n:i.y,g={x:i.x,y:b},f={x:i.x,y:m},h.y=n+e.distance/2)):e.edge===l.Right?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.x=s),e.aboveleft?null!=e.pt?(g={x:s,y:e.pt.y},f={x:s,y:v.y},h.y=e.pt.y-e.distance/2):(g={x:s,y:n},f={x:s,y:v.y},h.y=i.y-e.distance/2):null!=e.pt?(g={x:s,y:e.pt.y},f={x:s,y:m},h.y=e.pt.y+e.distance/2):(b=t.above_left?n:i.y,g={x:s,y:b},f={x:s,y:m},h.y=n+e.distance/2)):e.edge===l.Center&&(T=!0,h.x=a,-1===e.aboveleft?(null!=e.pt?(g={x:a,y:i.y},f={x:a,y:e.pt.y}):(g={x:a,y:i.y},f={x:a,y:v.y}),h.y=i.y-e.distance/2):-2===e.aboveleft?(null!=e.pt?(g={x:a,y:n},f={x:a,y:e.pt.y}):(g={x:a,y:n},f={x:a,y:m}),h.y=n+e.distance/2):e.aboveleft?null!=e.pt?(g={x:a,y:e.pt.y},f={x:a,y:m},h.y=e.pt.y-e.distance/2):(g={x:a,y:i.y},f={x:a,y:m},h.y=i.y-e.distance/2):null!=e.pt?(g={x:a,y:e.pt.y},f={x:a,y:v.y},h.y=e.pt.y+e.distance/2):(g={x:a,y:n},f={x:a,y:v.y},h.y=n+e.distance/2),k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0)):e.edge===l.Top?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.y=i.y),e.aboveleft?null!=e.pt?(g={x:e.pt.x,y:i.y},f={x:v.x,y:i.y},h.x=e.pt.x-e.distance/2):(g={x:s,y:i.y},f={x:v.x,y:i.y},h.x=i.x-e.distance/2):null!=e.pt?(g={x:e.pt.x,y:i.y},f={x:y,y:i.y},h.x=e.pt.x+e.distance/2):(b=t.left_top?s:i.x,g={x:b,y:i.y},f={x:y,y:i.y},h.x=s+e.distance/2)):e.edge===l.Bottom?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.y=n),e.aboveleft?null!=e.pt?(g={x:e.pt.x,y:n},f={x:v.x,y:n},h.x=e.pt.x-e.distance/2):(g={x:s,y:n},f={x:v.x,y:n},h.x=i.x-e.distance/2):null!=e.pt?(g={x:e.pt.x,y:n},f={x:y,y:n},h.x=e.pt.x+e.distance/2):(b=t.left_bottom?s:i.x,g={x:b,y:n},f={x:y,y:n},h.x=s+e.distance/2)):e.edge===l.Center&&(T=!0,h.y=o,-1===e.aboveleft?(null!=e.pt?(g={x:i.x,y:o},f={x:e.pt.x,y:o}):(g={x:i.x,y:o},f={x:v.x,y:o}),h.x=i.x-e.distance/2):-2===e.aboveleft?(null!=e.pt?(g={x:s,y:o},f={x:e.pt.x,y:o}):(g={x:s,y:o},f={x:y,y:o}),h.x=s+e.distance/2):e.aboveleft?null!=e.pt?(g={x:e.pt.x,y:o},f={x:y,y:o},h.x=e.pt.x-e.distance/2):(g={x:i.x,y:o},f={x:y,y:o},h.x=i.x-e.distance/2):null!=e.pt?(g={x:e.pt.x,y:o},f={x:v.x,y:o},h.x=e.pt.x+e.distance/2):(g={x:s,y:o},f={x:v.x,y:o},h.x=s+e.distance/2),k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0)),g){null==D&&(D=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Line),D.SetFillColor("none"),D.SetStrokeColor(u),D.SetStrokeWidth(S),D.SetStrokePattern(T?x:w),D.SetID(r),T3Gv.opt.svgHighlightLayer.AddElement(D)),D.SetPoints(g.x,g.y,f.x,f.y);const t=r+"label",e=r+"back";if(k){C=T3Gv.opt.svgHighlightLayer.GetElementById(t);let i=T3Gv.opt.svgHighlightLayer.GetElementById(e);if(null==C){i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Rect),i.SetID(e),i.SetStrokeWidth(0);const n=c.background.Paint.Color;i.SetFillColor(n),T3Gv.opt.svgHighlightLayer.AddElement(i),C=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),T3Gv.opt.svgHighlightLayer.AddElement(C),C.SetID(t),C.SetRenderingEnabled(!1),C.SetText(k),C.SetFormat(d)}else C.SetRenderingEnabled(!1),C.SetText(k);C.SetRenderingEnabled(!0);const n=C.GetTextMinDimensions();i.SetPos(h.x-n.width/2-2,h.y-n.height/2-2),i.SetSize(n.width+4,n.height+4),C.SetPos(h.x-n.width/2,h.y-n.height/2)}else{C=T3Gv.opt.svgHighlightLayer.GetElementById(t);const i=T3Gv.opt.svgHighlightLayer.GetElementById(e);C&&T3Gv.opt.svgHighlightLayer.RemoveElement(C),i&&T3Gv.opt.svgHighlightLayer.RemoveElement(i)}}}};for(e in t){let i,n,s;const a=[];if(null!=t[e]){for(f(t[e],e),n=t[e].otherhits.length,i=0;i<n;i++)s=t[e].otherhits[i],s.label=t[e].label,a.push(s.ID),f(t[e].otherhits[i],e+s.ID.toString());if(r&&null!=r[e])for(n=r[e].otherhits.length,i=0;i<n;i++)s=r[e].otherhits[i],a.indexOf(s.ID)<0&&g(e+s.ID.toString())}else if(r&&null!=r[e]&&(g(e),r[e].otherhits))for(n=r[e].otherhits.length,i=0;i<n;i++)s=r[e].otherhits[i],g(e+s.ID.toString())}T3Gv.opt.dynamicGuides=t}}static DynamicSnapsRemoveGuides(t){let e,i,n,s;if(t)for(e in t)if(t[e]){const a=e+"label",o=e+"back",r=T3Gv.opt.svgHighlightLayer.GetElementById(e),l=T3Gv.opt.svgHighlightLayer.GetElementById(a),h=T3Gv.opt.svgHighlightLayer.GetElementById(o);if(r&&T3Gv.opt.svgHighlightLayer.RemoveElement(r),l&&T3Gv.opt.svgHighlightLayer.RemoveElement(l),h&&T3Gv.opt.svgHighlightLayer.RemoveElement(h),t[e].otherhits)for(i=t[e].otherhits.length,n=0;n<i;n++){s=t[e].otherhits[n];const i=e+s.ID.toString()+"label",a=e+s.ID.toString()+"back",o=T3Gv.opt.svgHighlightLayer.GetElementById(e+s.ID.toString()),r=T3Gv.opt.svgHighlightLayer.GetElementById(i),l=T3Gv.opt.svgHighlightLayer.GetElementById(a);o&&T3Gv.opt.svgHighlightLayer.RemoveElement(o),r&&T3Gv.opt.svgHighlightLayer.RemoveElement(r),l&&T3Gv.opt.svgHighlightLayer.RemoveElement(l)}}t=null}}class LMEvtUtil{static LMStampPostRelease(t){let e;LogUtil.Debug("= U.LMEvtUtil LMStampPostRelease - Input:",{completeOperation:t}),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,T3Gv.opt.dragTargetId,null),T3Gv.opt.linkParams.HiliteJoin=-1),OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.JoinIndex>=0?PolyUtil.PolyLJoin(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.JoinData,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.JoinSourceData,!1):T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.InitialHook>=0)&&(T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcAutoInsert?this.SD_AutoInsertShape(T3Gv.opt.actionStoredObjectId,T3Gv.opt.linkParams.ConnectIndex):T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcHookReverse?this.LM_ReverseHook(T3Gv.opt.actionStoredObjectId):(e=HookUtil.UpdateHook(T3Gv.opt.actionStoredObjectId,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside),!1==(0!==e&&void 0!==e)&&OptCMUtil.SetLinkFlag(T3Gv.opt.linkParams.ConnectIndex,DSConstant.LinkFlags.Move)))),T3Gv.opt.linkParams=null,LogUtil.Debug("= U.LMEvtUtil LMStampPostRelease - Output: Operation completed")}static LMStampPreTrack(){LogUtil.Debug("= U.LMEvtUtil LMStampPreTrack - Input: No parameters"),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),T3Gv.opt.linkParams=new LinkParameters,T3Gv.opt.linkParams.AutoInsert=DrawUtil.AllowAutoInsert(),T3Gv.opt.drawShape&&T3Gv.opt.drawShape.flags&&T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.DropOnBorder&&(T3Gv.opt.linkParams.DropOnLine=!0),LogUtil.Debug("= U.LMEvtUtil LMStampPreTrack - Output: Link parameters initialized",{autoInsert:T3Gv.opt.linkParams.AutoInsert,dropOnLine:T3Gv.opt.linkParams.DropOnLine||!1})}static LMStampDuringTrack(t,e){let i;if(LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Input:",{position:t,drawingObject:null==e?void 0:e.BlockID}),T3Gv.opt.actionStoredObjectId<0)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No action object ID",t),t;if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: Using move list, returning original position",t),t;if(null==e)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No drawing object",t),t;if(i=HookUtil.MoveGetHookPoints(T3Gv.opt.actionStoredObjectId,e,0,0),!i)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No hook points",t),t;T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0;const n=T3Gv.opt.linkParams;if((n.DropOnLine||n.AutoInsert)&&SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,e,n.cpt,!0,!0,!1,t)){const e={x:t.x+T3Gv.opt.dragDeltaX,y:t.y+T3Gv.opt.dragDeltaY};return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: Drop-on-line adjusted position",e),e}if(T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,T3Gv.opt.dragStartX=t.x,T3Gv.opt.dragStartY=t.y,SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,e,i,!0,!1,n.AllowJoin,t)||n.JoinIndex>=0){const e={x:t.x+T3Gv.opt.dragDeltaX,y:t.y+T3Gv.opt.dragDeltaY};return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: Connection/join adjusted position",e),e}return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No adjustments needed",t),t}static LMMoveDuringTrack(t){let e,i,n,s,a,o;LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Input:",t);let r={},l=[];if(T3Gv.opt.dragTargetId<0)return LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output: Invalid drag target"),t;if(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1),null==i)return LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output: Target object not found"),t;if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.AutoHeal&&(a=Math.abs(t.x-T3Gv.opt.dragStartX),o=Math.abs(t.y-T3Gv.opt.dragStartY),a>50||o>50||T3Gv.opt.linkParams.AutoInsert&&T3Gv.opt.linkParams.ConnectIndex>=0)){s=this.HealLine(i,!1,l),T3Gv.opt.linkParams.AutoHeal=!1,T3Gv.opt.linkParams.AutoHealID=i.BlockID,s>=0&&(l.push(s),ObjectUtil$1.DeleteObjects(l,!1));let t=T3Gv.opt.dirtyList.indexOf(T3Gv.opt.dragTargetId);t>=0&&(T3Gv.opt.dirtyList.splice(t,1),SvgUtil.RenderDirtySVGObjects(),ObjectUtil$1.AddToDirtyList(T3Gv.opt.dragTargetId)),SelectUtil.GetMoveList(T3Gv.opt.dragTargetId,!0,!0,!1,T3Gv.opt.moveBounds,!1)}if(T3Gv.opt.pinRect&&this.PinMoveRect(t),n=HookUtil.MoveGetHookPoints(T3Gv.opt.dragTargetId,i,t.x-T3Gv.opt.dragStartX,t.y-T3Gv.opt.dragStartY),n){if(T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,T3Gv.opt.linkParams.DropOnLine||T3Gv.opt.linkParams.AutoInsert){r=Utils1.DeepCopy(i.Frame),r.x+=t.x-T3Gv.opt.dragStartX,r.y+=t.y-T3Gv.opt.dragStartY;const n=i.Frame;if(i.Frame=r,e=SelectUtil.FindConnect(T3Gv.opt.dragTargetId,i,T3Gv.opt.linkParams.cpt,!0,!0,!1,t),i.Frame=n,e)return t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY,LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output (drop connection):",t),t}T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,e=SelectUtil.FindConnect(T3Gv.opt.dragTargetId,i,n,!0,!1,T3Gv.opt.linkParams.AllowJoin,t),(e||T3Gv.opt.linkParams.JoinIndex>=0)&&(t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY)}return LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output:",t),t}static LMMoveTrack(t,e){if(LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Input:",{event:t,skipScrolling:e}),Date.now()-T3Gv.opt.eventTimestamp<250)return void LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Output: Throttled (skipping)");if(!T3Gv.opt.dragGotMove){let e=T3Gv.opt.moveList;if(e&&e.length){if(DrawUtil.DragDuplicate(t)){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0),i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);t.length=0;for(let r=0;r<e.length;r++)t.push(e[r]);const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);let s=-1,a=null;n&&(a=n.Frame,s=n.DrawingObjectBaseClass);const o=ToolActUtil.DuplicateObjects(!0);t.length=0;for(let e=0;e<o.length;e++)t.push(o[e]);T3Gv.opt.MoveDuplicated=!0,T3Gv.opt.moveList.length=0,T3Gv.opt.dragElementList.length=0,T3Gv.opt.dragBBoxList.length=0,T3Gv.opt.linkParams.lpCircList=[],T3Gv.opt.linkParams.InitialHook=-1;for(let e=o.length-1;e>=0;e--){const t=ObjectUtil$1.GetObjectPtr(o[e],!1);if(t){T3Gv.opt.moveList.push(o[e]),T3Gv.opt.linkParams.lpCircList.push(o[e]),T3Gv.opt.dragElementList.push(o[e]);const n=t.GetSVGFrame();a&&Utils2.EqualRect(n,a,2)&&t.DrawingObjectBaseClass===s&&(T3Gv.opt.dragTargetId=o[e],i.tselect=o[e]),T3Gv.opt.dragBBoxList.push(n)}}e=T3Gv.opt.moveList}const i=e.length;for(let t=0;t<i;t++){const i=e[t],n=ObjectUtil$1.GetObjectPtr(i,!1);if(n){const t=T3Gv.opt.svgObjectLayer.GetElementById(i);n.RemoveDimensionLines(t)}}}}T3Gv.opt.dragGotMove=!0;const i=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;if(e)DrawUtil.ResetAutoScrollTimer();else if(!DrawUtil.AutoScrollCommon(t,!i,"HandleObjectDragDoAutoScroll"))return void LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Output: Auto-scroll in progress");const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),s=this.LMMoveDuringTrack(n,t);T3Gv.opt.HandleObjectDragMoveCommon(s.x,s.y,e,t),LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Output: Objects moved to",s)}static LMMoveRelease(t,e){LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Input:",{event:t,moveData:e});let i=!1;if(!e&&(Utils2.StopPropagationAndDefaults(t),T3Gv.opt.UnbindShapeMoveHammerEvents(),DrawUtil.ResetAutoScrollTimer(),OptCMUtil.SetEditMode(NvConstant.EditState.Default),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,!T3Gv.opt.dragGotMove||DrawUtil.CheckDragIsOverCustomLibrary(t)))return this.LMMovePostRelease(!1),SvgUtil.RenderAllSVGSelectionStates(),T3Gv.opt.moveList=null,void LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Output: Early exit condition met");const n=T3Gv.opt.moveList?T3Gv.opt.moveList.length:0;if(0===n)return void LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Output: No objects to move");let s=null,a={};T3Gv.opt.dragDeltaX,T3Gv.opt.MoveDuplicated;for(let o=0;o<n;o++){const t=T3Gv.opt.moveList[o],i=T3Gv.stdObj.GetObject(t).Data;if(e)a=e.Data.thePointList[o];else{if(s=T3Gv.opt.dragBBoxList[o],!s)continue;a={x:s.x+T3Gv.opt.dragDeltaX,y:s.y+T3Gv.opt.dragDeltaY}}if(i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&null===i.polylist&&i.StyleRecord.Line.BThick&&(a.x+=i.StyleRecord.Line.BThick,a.y+=i.StyleRecord.Line.BThick),e){const e="note_"+t,n=T3Gv.opt.svgHighlightLayer.GetElementById(e);if(n){const t=n.GetPos(),e=a.x-i.Frame.x,s=a.y-i.Frame.y;t.x+=e,t.y+=s,n.SetPos(t.x,t.y)}}T3Gv.opt.SetShapeOriginNoDirty(t,a.x,a.y),T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcAutoInsert&&i.UpdateFrame(i.Frame),(i.Dimensions&NvConstant.DimensionFlags.Always||i.Dimensions&NvConstant.DimensionFlags.Select||e||i.Dimensions&NvConstant.DimensionFlags.Area)&&ObjectUtil$1.AddToDirtyList(t)}if(this.LMMovePostRelease(!0,e),!e&&T3Gv.opt.lastOpDuplicate){i=!0;const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);t.dupdisp.x+=T3Gv.opt.dragDeltaX,t.dupdisp.y+=T3Gv.opt.dragDeltaY}DrawUtil.CompleteOperation(),e||(i&&(T3Gv.opt.lastOpDuplicate=!0),T3Gv.opt.moveList=null),LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Output: Move operation completed")}static LMMovePostRelease(t,e){var i,n;LogUtil.Debug("= U.LMEvtUtil LMMovePostRelease - Input:",{completeOperation:t,moveData:e});let s=!1;const a=[];if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,T3Gv.opt.dragTargetId,null),T3Gv.opt.linkParams.HiliteJoin=-1),e||OptCMUtil.SetEditMode(NvConstant.EditState.Default),t){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId);if(t.objecttype===NvConstant.FNObjectTypes.NgEvent||t.objecttype===NvConstant.FNObjectTypes.NgEventLabel){let t=T3Gv.opt.dragDeltaX,a=T3Gv.opt.moveList;null!=(null==(i=null==e?void 0:e.Data)?void 0:i.dragDeltaX)&&(t=e.Data.dragDeltaX),null!=(null==(n=null==e?void 0:e.Data)?void 0:n.moveList)&&(a=e.Data.moveList),s=this.TimelineMoveEvent(T3Gv.opt.dragTargetId,a,t,!0)}else if(T3Gv.opt.linkParams.JoinIndex>=0)PolyUtil.PolyLJoin(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.JoinData,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.JoinSourceData,!1);else if(T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.InitialHook>=0))s||(T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcAutoInsert?this.SD_AutoInsertShape(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectIndex):T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcHookReverse?this.LM_ReverseHook(T3Gv.opt.dragTargetId):(s=HookUtil.HandleMultipleSelectionHooks(),s||(HookUtil.UpdateHook(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside),OptCMUtil.SetLinkFlag(T3Gv.opt.linkParams.ConnectIndex,DSConstant.LinkFlags.Move),HookUtil.CleanupHooks(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectIndex))));else{const t=OptAhUtil.GetGvSviOpt(T3Gv.opt.dragTargetId)||T3Gv.wallOpt;t instanceof WallOpt&&t.EnsureCubicleBehindOutline(T3Gv.opt.dragTargetId)}e||null==T3Gv.opt.postMoveSelectId||(a.push(T3Gv.opt.postMoveSelectId),SelectUtil.SelectObjects(a,!1,!1),T3Gv.opt.postMoveSelectId=null)}t&&T3Gv.opt.UpdateLinks(),e||(T3Gv.opt.linkParams=null,T3Gv.opt.ob={},T3Gv.opt.dragEnclosingRect=null,T3Gv.opt.dragElementList=[],T3Gv.opt.dragBBoxList=[]),LogUtil.Debug("= U.LMEvtUtil LMMovePostRelease - Output: Move post-processing completed")}static LMSetupMove(t){let e,i,n;LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Input:",t);let s=null,a=null,o=!1;if(T3Gv.opt.MoveDuplicated=!1,e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget),!e)return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (No SVG element found)"),!1;i=e.GetTargetForEvent(t),T3Gv.opt.eventTimestamp=Date.now(),Utils2.StopPropagationAndDefaults(t);const r=e.GetID(),l=ObjectUtil$1.GetObjectPtr(r,!1);if(!(l&&l instanceof Instance.Shape.BaseDrawObject))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Not a valid drawing object)"),!1;if(T3Gv.opt.bInDimensionEdit)return T3Gv.opt.CloseEdit(!1,!0),T3Gv.opt.bInDimensionEdit=!1,LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Was in dimension edit)"),!1;if(i instanceof Text&&(i.ID===OptConstant.SVGElementClass.DimText||i.ID===OptConstant.SVGElementClass.DimTextNoEdit))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Is dimension text)"),!1;if(i instanceof Image&&this.UserDataisIcon(i.GetUserData()))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Is icon element)"),!1;if(T3Gv.opt.crtOpt===OptConstant.OptTypes.FormatPainter){if(n=e.GetID(),this.FormatPainterClick(n,t))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Format painter handled click)"),!1;e=T3Gv.opt.svgObjectLayer.GetElementById(n)}const h=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);if(T3Gv.opt.crtOpt!==OptConstant.OptTypes.FormatPainter||T3Gv.opt.formatPainterMode!==StyleConstant.FormatPainterModes.Object){const i=e.GetTargetForEvent(t);let n=i.GetID();i.GetUserData(),T3Gv.opt.dragTargetId=e.GetID(),T3Gv.opt.dragTargetId=this.GetEventShapeParent(T3Gv.opt.dragTargetId),T3Gv.opt.dragTargetId=OptAhUtil.SelectContainerParent(T3Gv.opt.dragTargetId),s=T3Gv.stdObj.GetObject(T3Gv.opt.dragTargetId);const r=MouseUtil.IsRightClick(t);if(s)if(a=s.Data,o=(a.TextFlags&NvConstant.TextFlags.OneClick)>0,r)o=!1;else if(a.flags&NvConstant.ObjFlags.Lock)return SelectUtil.SelectObjectFromClick(t,e),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Object is locked)"),!1;switch(n){case OptConstant.SVGElementClass.BackgroundImage:n="";break;case OptConstant.SVGElementClass.Slop:T3Gv.opt.DeactivateAllTextEdit(!1),o=!1}switch(n){case OptConstant.SVGElementClass.BackgroundImage:break;case OptConstant.Common.HitAreas:const e=i.GetUserData();return this.LM_HitAreaClick(T3Gv.opt.dragTargetId,e),t.gesture&&t.gesture.stopDetect(),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Hit area click)"),!1}if(o)return TextUtil.ActivateTextEdit(e.svgObj.SDGObj,t,!1),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Activated text edit)"),!1}if(!SelectUtil.SelectObjectFromClick(t,e,!0))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Selection failed)"),!1;if(s=T3Gv.stdObj.GetObject(T3Gv.opt.dragTargetId),null==s)return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Target object is null)"),!1;if(a=s.Data,SvgUtil.HideAllSVGSelectionStates(),DrawUtil.InitializeAutoGrowDrag(),a.InterceptMoveOperation(t))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Move intercepted by object)"),!1;const c={},u={};T3Gv.opt.IsConnectorEndShape(a,null,c)?T3Gv.opt.dragTargetId=c.id:T3Gv.opt.IsGenogramPartner(a,u)&&(T3Gv.opt.dragTargetId=u.id),T3Gv.opt.moveBounds={x:0,y:0,width:0,height:0},T3Gv.opt.pinRect=null,T3Gv.opt.dynamicGuides=new DynamicGuides;let d=[];d=SelectUtil.GetMoveList(T3Gv.opt.dragTargetId,!0,!0,!1,T3Gv.opt.moveBounds,!1),T3Gv.opt.dragStartX=h.x,T3Gv.opt.dragStartY=h.y;let p=d?d.length:0;T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.dragGotMove=!1;let g=[];for(let f=0;f<p;++f){const t=d[f],e=ObjectUtil$1.GetObjectPtr(t,!1);!e||e instanceof Instance.Shape.Connector||e.flags&NvConstant.ObjFlags.NotVisible||g.push(t)}for(let f=0;f<p;++f){const t=d[f],e=ObjectUtil$1.GetObjectPtr(t,!1);if(e instanceof Instance.Shape.Connector)if(e.arraylist.styleflags&OptConstant.AStyles.FlowConn)g.push(t);else if(e.hooks.length){const i=e.hooks[0].objid;ObjectUtil$1.GetObjectPtr(i)instanceof Instance.Shape.Connector?e.flags&NvConstant.ObjFlags.NotVisible||g.push(t):e.flags&NvConstant.ObjFlags.NotVisible&&(!e.hooks||-1===g.indexOf(i))||g.push(t)}else e.flags&NvConstant.ObjFlags.NotVisible||g.push(t)}d=g,p=d.length,T3Gv.opt.moveList=d;for(let f=0;f<p;++f){const t=d[f],e=ObjectUtil$1.GetObjectPtr(t,!1).GetSVGFrame();T3Gv.opt.dragBBoxList.push(e),T3Gv.opt.dragElementList.push(t),T3Gv.docUtil.docConfig.enableSnap&&t===T3Gv.opt.dragTargetId&&(T3Gv.opt.dragTargetBBox=Utils1.DeepCopy(e))}return T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&(T3Gv.opt.dragEnclosingRect=T3Gv.opt.GetListSRect(T3Gv.opt.moveList)),this.LMMovePreTrack(d,t),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: true (Move setup complete)"),!0}static LMMoveExceptionCleanup(t){throw LogUtil.Debug("= U.LMEvtUtil LMMoveExceptionCleanup - Input:",t),T3Gv.opt.linkParams=null,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.moveList=null,T3Gv.opt.dragEnclosingRect=null,T3Gv.opt.dragGotMove=!1,T3Gv.opt.UnbindShapeMoveHammerEvents(),DrawUtil.ResetAutoScrollTimer(),LogUtil.Debug("= U.LMEvtUtil LMMoveExceptionCleanup - Output: Cleanup completed"),t}static LMMoveClick(t){if(LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Input:",t),this.IsWheelClick(t)||T3Constant.DocContext.SpacebarDown)return EvtUtil.Evt_WorkAreaHammerDragStart(t),Utils2.StopPropagationAndDefaults(t),void LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Wheel click or spacebar down detected, redirected to WorkAreaHammerDragStart");Utils2.StopPropagationAndDefaults(t);try{T3Constant.DocContext.HTMLFocusControl&&T3Constant.DocContext.HTMLFocusControl.blur&&T3Constant.DocContext.HTMLFocusControl.blur(),T3Gv.opt.nudgeOpen&&T3Gv.opt.CloseOpenNudge();const e=this.LMSetupMove(t);if(!0!==e)return-1===e?void LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Setup failed with -1, unlocked messages"):void LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Setup failed, unlocked and unblocked messages");T3Gv.opt.crtOpt===OptConstant.OptTypes.None&&OptCMUtil.SetEditMode(NvConstant.EditState.DragShape),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ShapeDrag),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ShapeDragEnd);MouseUtil.IsRightClick(t)||UIUtil.ShowContextMenu(!1,"WorkArea","Default"),LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Move operation set up successfully")}catch(e){throw this.LMMoveExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Error:",e),e}}static IsCtrlClick(t){LogUtil.Debug("= U.LMEvtUtil IsCtrlClick - Input:",t);let e=!1;return t.gesture&&(t=t.gesture.srcEvent),(t instanceof MouseEvent||"onpointerdown"in window&&t instanceof PointerEvent)&&(e=t.ctrlKey),LogUtil.Debug("= U.LMEvtUtil IsCtrlClick - Output:",e),e}static IsWheelClick(t){LogUtil.Debug("= U.LMEvtUtil IsWheelClick - Input:",t);let e=!1;return t.gesture&&(t=t.gesture.srcEvent),(t instanceof MouseEvent||"onpointerdown"in window&&t instanceof PointerEvent)&&(e=2===t.which),LogUtil.Debug("= U.LMEvtUtil IsWheelClick - Output:",e),e}static HandleKeyDown(t,e,i){LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Input:",{eventType:t.type,keyCode:e,altKey:i});let n=T3Gv.opt.svgDoc.GetActiveEdit();if(n&&n.IsActive()){if(!T3Gv.opt.bInNoteEdit){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==t.theActiveTextEditObjectID)switch(e){case KeyboardConstant.Keys.Left_Arrow:case KeyboardConstant.Keys.Right_Arrow:case KeyboardConstant.Keys.Up_Arrow:case KeyboardConstant.Keys.Down_Arrow:t.theTELastOp!==NvConstant.TextElemLastOpt.Init&&TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Select);break;case KeyboardConstant.Keys.Backspace:case KeyboardConstant.Keys.Delete:TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char)}}if(n.HandleKeyDownEvent(t))return LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Output: true (activeEdit handled event)"),!0}else if(32===e){const e=SelectUtil.GetTargetSelect();if(-1!==e){const i=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i.AllowTextEdit()){const i=T3Gv.opt.svgObjectLayer.GetElementById(e);TextUtil.ActivateTextEdit(i),n=T3Gv.opt.svgDoc.GetActiveEdit();const s=n.GetText().length;return n.SetSelectedRange(s,s),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char),n.HandleKeyDownEvent(t),LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Output: true (space activated text edit)"),!0}}}return LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Output: false"),!1}static HandleKeyPress(t,e){LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Input:",{eventType:t.type,keyCode:e});let i=T3Gv.opt.svgDoc.GetActiveEdit();if(i&&i.IsActive()){if(!T3Gv.opt.bInNoteEdit){-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID&&TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char)}if(i.HandleKeyPressEvent(t))return t.preventDefault(),LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Output: true (activeEdit handled event)"),!0}else{const e=SelectUtil.GetTargetSelect();if(-1!==e){const n=ObjectUtil$1.GetObjectPtr(e,!1);if(n&&n.AllowTextEdit()){const n=T3Gv.opt.svgObjectLayer.GetElementById(e);if(TextUtil.ActivateTextEdit(n),i=T3Gv.opt.svgDoc.GetActiveEdit(),i){const e=i.GetText().length;return i.SetSelectedRange(0,e),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char),i.HandleKeyPressEvent(t),LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Output: true (activated text edit)"),!0}}}}return LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Output: false"),!1}static LMMovePreTrack(t,e){LogUtil.Debug("= U.LMEvtUtil LMMovePreTrack - Input:",{objectsToMove:t,event:e}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i=e.gesture&&e.gesture.srcEvent&&e.gesture.srcEvent.altKey;if(T3Gv.opt.linkParams=new LinkParameters,T3Gv.opt.linkParams.AutoInsert=DrawUtil.AllowAutoInsert(),T3Gv.opt.linkParams.AutoInsert){ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1).length>1&&(T3Gv.opt.linkParams.AutoInsert=!1),e.gesture&&e.gesture.srcEvent&&e.gesture.srcEvent.altKey}const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);if(n){T3Gv.opt.ob=Utils1.DeepCopy(n),1===n.hooks.length&&0==(n.GetHookFlags()&NvConstant.HookFlags.LcMoveTarget)&&t.indexOf(n.hooks[0].objid)<0&&(T3Gv.opt.linkParams.ConnectIndex=n.hooks[0].objid,T3Gv.opt.linkParams.PrevConnect=n.hooks[0].objid,T3Gv.opt.linkParams.ConnectIndexHistory.push(n.hooks[0].objid),T3Gv.opt.linkParams.ConnectPt.x=n.hooks[0].connect.x,T3Gv.opt.linkParams.ConnectPt.y=n.hooks[0].connect.y,T3Gv.opt.linkParams.ConnectInside=n.hooks[0].cellid,T3Gv.opt.linkParams.HookIndex=n.hooks[0].hookpt,T3Gv.opt.linkParams.InitialHook=0);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(T3Gv.opt.linkParams.lpCircList=HookUtil.GetHookList(e,T3Gv.opt.linkParams.lpCircList,T3Gv.opt.dragTargetId,n,NvConstant.ListCodes.CircTarg,{}),HookUtil.JoinHookList(T3Gv.opt.linkParams.lpCircList,t),T3Gv.opt.linkParams.AutoInsert&&n instanceof Instance.Shape.BaseShape&&this.HealLine(n,!0,null)>0&&i&&(T3Gv.opt.linkParams.lpCircList=[],T3Gv.opt.linkParams.lpCircList.push(T3Gv.opt.dragTargetId),T3Gv.opt.moveList=[],T3Gv.opt.moveList.push(T3Gv.opt.dragTargetId),T3Gv.opt.linkParams.AutoHeal=!0),DrawUtil.AllowSnapToShapes()){const t=n.GetSnapRect(),e=Utils1.DeepCopy(t);e.x+=T3Gv.opt.dragDeltaX,e.y+=T3Gv.opt.dragDeltaY;const i={},s=n.CanSnapToShapes(i);if(s>=0){const t=ObjectUtil$1.GetObjectPtr(s,!1).GetSnapRect(),e=Utils1.DeepCopy(t),n=new DynamicGuides,a=[T3Gv.opt.dragTargetId];DynamicUtil.DynamicSnapsGetSnapObjects(s,e,n,a,null,i),n&&DynamicUtil.DynamicSnapsUpdateGuides(n,s,e)}}}LogUtil.Debug("= U.LMEvtUtil LMMovePreTrack - Output: Link parameters initialized")}static UnbindActionClickHammerEvents(){LogUtil.Debug("= U.LMEvtUtil UnbindActionClickHammerEvents - Input:");const t=T3Gv.opt.WorkAreaHammer;t&&(t.off("drag"),t.off("dragend"),t.off("doubletap")),LogUtil.Debug("= U.LMEvtUtil UnbindActionClickHammerEvents - Output: Events unbound")}static GetEventShapeParent(t){LogUtil.Debug("= U.LMEvtUtil GetEventShapeParent - Input:",t);const e=ObjectUtil$1.GetObjectPtr(t);if(e&&e.objecttype===NvConstant.FNObjectTypes.NgEventLabel){const t=ObjectUtil$1.GetObjectPtr(e.associd);if(t&&t.objecttype===NvConstant.FNObjectTypes.NgEvent)return LogUtil.Debug("= U.LMEvtUtil GetEventShapeParent - Output:",e.associd),e.associd}return LogUtil.Debug("= U.LMEvtUtil GetEventShapeParent - Output:",t),t}}class BlobBytes{constructor(t,e){__publicField(this,"ImageDir"),__publicField(this,"Bytes"),this.ImageDir=t,this.Bytes=e}}var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$4=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$4(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$4(e,i,a),a};class BaseDrawObject$1{constructor(t){__publicField(this,"Type"),__publicField(this,"Frame"),__publicField(this,"r"),__publicField(this,"inside"),__publicField(this,"trect"),__publicField(this,"rtop"),__publicField(this,"rleft"),__publicField(this,"rbottom"),__publicField(this,"rright"),__publicField(this,"rwd"),__publicField(this,"rht"),__publicField(this,"rflags"),__publicField(this,"RotationAngle"),__publicField(this,"ShortRef"),__publicField(this,"StyleRecord"),__publicField(this,"Dimensions"),__publicField(this,"bOverrideDefaultStyleOnDraw"),__publicField(this,"UniqueID"),__publicField(this,"flags"),__publicField(this,"extraflags"),__publicField(this,"hookflags"),__publicField(this,"targflags"),__publicField(this,"hooks"),__publicField(this,"maxhooks"),__publicField(this,"associd"),__publicField(this,"attachpoint"),__publicField(this,"hookdisp"),__publicField(this,"TextFlags"),__publicField(this,"DrawingObjectBaseClass"),__publicField(this,"objecttype"),__publicField(this,"subtype"),__publicField(this,"dataclass"),__publicField(this,"Layer"),__publicField(this,"SequenceNumber"),__publicField(this,"BusinessObjectID"),__publicField(this,"NoteID"),__publicField(this,"ExpandedViewID"),__publicField(this,"DataID"),__publicField(this,"tindent"),__publicField(this,"TMargins"),__publicField(this,"left_sindent"),__publicField(this,"right_sindent"),__publicField(this,"top_sindent"),__publicField(this,"bottom_sindent"),__publicField(this,"TableID"),__publicField(this,"GraphID"),__publicField(this,"ImageID"),__publicField(this,"ContentType"),__publicField(this,"ContentID"),__publicField(this,"commentId"),__publicField(this,"TextParams"),__publicField(this,"TextGrow"),__publicField(this,"TextAlign"),__publicField(this,"colorfilter"),__publicField(this,"colorchanges"),__publicField(this,"moreflags"),__publicField(this,"sizedim"),__publicField(this,"ConnectPoints"),__publicField(this,"ObjGrow"),__publicField(this,"datasetType"),__publicField(this,"datasetID"),__publicField(this,"datasetTableID"),__publicField(this,"datasetElemID"),__publicField(this,"fieldDataDatasetID"),__publicField(this,"fieldDataTableID"),__publicField(this,"fieldDataElemID"),__publicField(this,"dataStyleOverride"),__publicField(this,"SymbolURL"),__publicField(this,"ImageURL"),__publicField(this,"ImageDir"),__publicField(this,"BlobBytesID"),__publicField(this,"EMFHash"),__publicField(this,"EMFBlobBytesID"),__publicField(this,"OleBlobBytesID"),__publicField(this,"NativeID"),__publicField(this,"SymbolData"),__publicField(this,"nativeDataArrayBuffer"),__publicField(this,"EMFBuffer"),__publicField(this,"EMFBufferType"),__publicField(this,"SymbolID"),__publicField(this,"SVGFragment"),__publicField(this,"ShapesInGroup"),__publicField(this,"InitialGroupBounds"),__publicField(this,"ImageHeader"),__publicField(this,"OleHeader"),__publicField(this,"nIcons"),__publicField(this,"iconSize"),__publicField(this,"iconShapeBottomOffset"),__publicField(this,"iconShapeRightOffset"),__publicField(this,"HyperlinkText"),__publicField(this,"AttachmentInfo"),__publicField(this,"ResizeAspectConstrain"),__publicField(this,"ob"),__publicField(this,"prevBBox"),__publicField(this,"bInGroup"),__publicField(this,"LineTextX"),__publicField(this,"LineTextY"),__publicField(this,"actionArrowHideTimerID"),__publicField(this,"FramezList"),__publicField(this,"ParentFrameID"),__publicField(this,"StartPoint"),__publicField(this,"EndPoint"),__publicField(this,"LineType"),__publicField(this,"BlockID"),__publicField(this,"polylist"),__publicField(this,"dimensionDeflectionH"),__publicField(this,"dimensionDeflectionV"),__publicField(this,"uniType"),__publicField(this,"drawSetting"),__publicField(this,"uniqueId"),t=t||{},this.Type=StateConstant.StoredObjectType.BaseDrawObject,this.Frame=t.Frame||{x:0,y:0,width:0,height:0},this.r=t.r||{x:0,y:0,width:0,height:0},this.inside=t.inside||{x:0,y:0,width:0,height:0},this.trect=t.trect||{x:0,y:0,width:0,height:0},this.rtop=t.rtop||0,this.rleft=t.rleft||0,this.rbottom=t.rbottom||0,this.rright=t.rright||0,this.rwd=t.rwd||0,this.rht=t.rht||0,this.rflags=t.rflags||0,this.RotationAngle=t.RotationAngle||0,this.ShortRef=t.ShortRef||0,this.StyleRecord=t.StyleRecord||null,this.Dimensions=t.Dimensions||0,this.bOverrideDefaultStyleOnDraw=t.bOverrideDefaultStyleOnDraw||!1,this.UniqueID=null==t.UniqueID?-1:t.UniqueID,this.flags=t.flags||0,this.extraflags=t.extraflags||0,this.hookflags=t.hookflags||[],this.targflags=t.targflags||[],this.hooks=t.hooks||[],this.maxhooks=t.maxhooks||1,this.associd=t.associd||-1,this.attachpoint=t.attachpoint||{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax/2},this.hookdisp={x:0,y:0},this.TextFlags=t.TextFlags||0,this.DrawingObjectBaseClass=t.DrawingObjectBaseClass||OptConstant.DrawObjectBaseClass.Shape,this.objecttype=t.objecttype||0,this.subtype=t.subtype||0,this.dataclass=t.dataclass||0,this.Layer=t.Layer||0,this.SequenceNumber=t.SequenceNumber||-1,this.BusinessObjectID=t.BusinessObjectId||-1,this.NoteID=t.NoteID||-1,this.ExpandedViewID=t.ExpandedViewID||-1,this.DataID=t.DataID||-1,this.tindent=t.tindent||{top:0,left:0,bottom:0,right:0},this.TMargins=t.TMargins||{top:0,left:0,bottom:0,right:0},this.left_sindent=t.left_sindent||0,this.right_sindent=t.right_sindent||0,this.top_sindent=t.top_sindent||0,this.bottom_sindent=t.bottom_sindent||0,this.TableID=t.TableID||-1,this.GraphID=t.GraphID||-1,this.ImageID=t.ImageID||-1,this.ContentType=t.ContentType||OptConstant.ContentType.None,this.ContentID=t.ContentID||-1,this.commentId=t.commentId||-1,this.TextParams=t.TextParams||null,this.TextGrow=t.TextGrow||NvConstant.TextGrowBehavior.ProPortional,this.TextAlign=t.TextAlign||TextConstant.TextAlign.Center,this.colorfilter=t.colorfilter||0,this.colorchanges=t.colorchanges||0,this.moreflags=t.moreflags||0,this.sizedim=t.sizedim||{width:0,height:0},this.ConnectPoints=t.ConnectPoints||[],this.ObjGrow=t.ObjGrow||OptConstant.GrowBehavior.All,t.ResizeAspectConstrain=this.ObjGrow===OptConstant.GrowBehavior.ProPortional,this.datasetType=t.datasetType||-1,this.datasetID=t.datasetID||-1,this.datasetTableID=t.datasetTableID||-1,this.datasetElemID=t.datasetElemID||-1,this.fieldDataDatasetID=t.fieldDataDatasetID||-1,this.fieldDataTableID=t.fieldDataTableID||-1,this.fieldDataElemID=t.fieldDataElemID||-1,this.dataStyleOverride=null,this.SymbolURL=t.SymbolURL||"",this.ImageURL=t.ImageURL||"",this.ImageDir=t.ImageDir||null,this.BlobBytesID=t.BlobBytesID||-1,this.EMFHash=t.EMFHash||null,this.EMFBlobBytesID=t.EMFBlobBytesID||-1,this.OleBlobBytesID=t.OleBlobBytesID||-1,this.NativeID=t.NativeID||-1,this.SymbolData=null,this.nativeDataArrayBuffer=null,this.EMFBuffer=null,this.EMFBufferType=t.EMFBufferType||null,this.SymbolID=t.SymbolID,this.SVGFragment=t.SVGFragment||null,this.ShapesInGroup=t.ShapesInGroup||[],this.InitialGroupBounds=t.InitialGroupBounds||{x:0,y:0,width:0,height:0},this.ImageHeader=t.ImageHeader||null,this.OleHeader=t.OleHeader||null,this.nIcons=t.nIcons||0,this.iconSize=t.iconSize||18,this.iconShapeBottomOffset=t.iconShapeBottomOffset||OptConstant.Common.IconShapeBottomOffset,this.iconShapeRightOffset=t.iconShapeRightOffset||OptConstant.Common.iconShapeRightOffset,this.HyperlinkText=t.HyperlinkText||"",this.AttachmentInfo=t.AttachmentInfo||"",this.ResizeAspectConstrain=t.ResizeAspectConstrain||!1,this.ob={},this.prevBBox=t.prevBBox||{x:0,y:0,width:0,height:0},this.bInGroup=!1,this.LineTextX=t.LineTextX||0,this.LineTextY=t.LineTextX||0,this.actionArrowHideTimerID=-1,this.FramezList=null,this.ParentFrameID=-1,this.uniType=t.uniType||"",this.drawSetting=t.drawSetting||{},this.uniqueId=Utils1.GenerateUUID()}GenericKnob(t){LogUtil.Debug("= S.BaseDrawObject: GenericKnob input:",t);let e=t.svgDoc.CreateShape(t.shapeType);if(t.shapeType===OptConstant.CSType.Polygon){if(t.polyPoints)e.SetPoints(t.polyPoints),t.polyPoints=null;else if("vertical"===t.polyType){const i=[{x:0,y:0},{x:t.knobSize/2,y:-t.knobSize},{x:t.knobSize,y:0},{x:t.knobSize/2,y:t.knobSize}];e.SetPoints(i)}else if("horizontal"===t.polyType){const i=[{x:-t.knobSize/2,y:0},{x:t.knobSize/2,y:-t.knobSize/2},{x:3*t.knobSize/2,y:0},{x:t.knobSize/2,y:t.knobSize/2}];e.SetPoints(i)}else{const i=[{x:0,y:t.knobSize/2},{x:t.knobSize/2,y:0},{x:t.knobSize,y:t.knobSize/2},{x:t.knobSize/2,y:t.knobSize}];e.SetPoints(i)}e.SetEventBehavior(OptConstant.EventBehavior.ALL)}return t.locked?(e.SetFillColor("gray"),e.SetID(0)):(e.SetFillColor(t.fillColor),e.SetID(t.knobID),e.SetCursor(t.cursorType)),e.SetSize(t.knobSize,t.knobSize),e.SetPos(t.x,t.y),e.SetFillOpacity(t.fillOpacity),e.SetStrokeWidth(t.strokeSize),e.SetStrokeColor(t.strokeColor),LogUtil.Debug("= S.BaseDrawObject: GenericKnob output:",e),e}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: CreateActionTriggers input:",{inputElement:t,triggerType:e,additionalInfo:i,options:n});return LogUtil.Debug("= S.BaseDrawObject: CreateActionTriggers output:",null),null}CreateShape(t,e){LogUtil.Debug("= S.BaseDrawObject: CreateShape input:",{shapeType:t,options:e});const i={type:t,options:e||{}};return LogUtil.Debug("= S.BaseDrawObject: CreateShape output:",i),i}MoveSVG(){LogUtil.Debug("= S.BaseDrawObject: MoveSVG input, BlockID:",this.BlockID);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){const e=this.GetSVGFrame();LogUtil.Debug("= S.BaseDrawObject: MoveSVG retrieved frame:",e),t.SetPos(e.x,e.y),LogUtil.Debug(`= S.BaseDrawObject: MoveSVG output, SVG element position set to x: ${e.x}, y: ${e.y}`)}else LogUtil.Debug("= S.BaseDrawObject: MoveSVG output, no SVG element found for BlockID:",this.BlockID)}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: CreateConnectHilites input:",{hiliteElements:t,triggerType:e,additionalInfo:i,options:n,extraParam1:s,extraParam2:a});return LogUtil.Debug("= S.BaseDrawObject: CreateConnectHilites output:",null),null}CreateDimensionAdjustmentKnobs(t,e,i){LogUtil.Debug("= S.BaseDrawObject: CreateDimensionAdjustmentKnobs input:",t,e,i);let n=Utils1.DeepCopy(i);const s=n.knobSize/2;n.knobID=OptConstant.ActionTriggerType.DimLineAdj;let a=T3Gv.opt.svgDoc.docInfo.docToScreenScale;T3Gv.opt.svgDoc.docInfo.docScale<=.5&&(a*=2),n.knobSize=OptConstant.Common.KnobSize/a,n.shapeType=OptConstant.CSType.Polygon,n.fillColor="black",n.fillOpacity=1;let o=this.GetDimensionPoints();const r=o.length;for(let l=1;l<r;l++){let i=this.GetDimensionLineDeflectionKnobUserData(e,l,o,s,n.knobSize/2);if(i){n.x=i.knobPoint.x,n.y=i.knobPoint.y;let e=Utils1.CalcAngleFromPoints(o[l-1],o[l]);if(n.polyPoints=[{x:0,y:n.knobSize/2},{x:n.knobSize/2,y:0},{x:n.knobSize,y:n.knobSize/2},{x:n.knobSize/2,y:n.knobSize}],0!==e){let t={x:0,y:0,width:0,height:0};Utils2.GetPolyRect(t,n.polyPoints),Utils3.RotatePointsAboutCenter(t,-e/(180/NvConstant.Geometry.PI),n.polyPoints)}let s=e;this.RotationAngle&&0!==this.RotationAngle&&(s+=this.RotationAngle,s%=360),n.cursorType=this.CalcCursorForAngle(s,!0);let a=this.GenericKnob(n);a.SetUserData(i),t.AddElement(a)}}LogUtil.Debug("= S.BaseDrawObject: CreateDimensionAdjustmentKnobs output: created knobs for",r-1,"segments")}HitAreaClick(t){LogUtil.Debug("= S.BaseDrawObject: HitAreaClick input:",t),LogUtil.Debug("= S.BaseDrawObject: HitAreaClick output: no action taken")}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: ChangeTarget input:",{currentTarget:t,newTarget:e,action:i,options:n,extra1:s,extra2:a}),LogUtil.Debug("= S.BaseDrawObject: ChangeTarget output: completed")}OnConnect(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: OnConnect input:",{connectionPoint:t,targetObject:e,connectionData:i,options:n,context:s}),LogUtil.Debug("= S.BaseDrawObject: OnConnect output: completed")}OnDisconnect(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: OnDisconnect input:",{connectionPoint:t,targetObject:e,disconnectData:i,options:n}),LogUtil.Debug("= S.BaseDrawObject: OnDisconnect output: completed")}GetDimensionsRect(){LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect input, Dimensions:",this.Dimensions,"Frame:",this.Frame);let t=new Rectangle,e=[];if(!(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect output, dimension flags not set. Result:",t),t;const i=this.GetDimensionPoints();if(i.length<2)return LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect output, not enough dimension points. Result:",t),t;for(let s=1;s<i.length;s++){let t=this.GetDimensionFloatingPointValue(s);t||(t=this.GetDimensionTextForPoints(i[s-1],i[s]));const n=Utils1.CalcAngleFromPoints(i[s-1],i[s]),a=this.GetPointsForDimension(n,t,i[s-1],i[s],s);a&&(e.push(a.left),e.push(a.right),e.push(a.textFrame))}const n=this.GetBoundingBoxesForSecondaryDimensions();e=e.concat(n);for(let s=0;s<e.length;s++)0===t.width&&0===t.height?Utils2.CopyRect(t,e[s]):t=Utils2.UnionRect(t,e[s],t);return t.x+=this.Frame.x,t.y+=this.Frame.y,LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect output, result:",t),t}GetBoundingBoxesForSecondaryDimensions(){LogUtil.Debug("= S.BaseDrawObject: GetBoundingBoxesForSecondaryDimensions input");const t=[];return LogUtil.Debug("= S.BaseDrawObject: GetBoundingBoxesForSecondaryDimensions output:",t),t}AddDimensionsToR(){LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR input");let t=this.GetDimensionsRect();LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR - dimensionsRect:",t),0!==t.width?(this.r=Utils2.UnionRect(this.r,t,this.r),LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR - updated r:",this.r)):LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR - dimensionsRect.width is 0, no updates made"),LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR output",this.r)}UpdateFrame(t){LogUtil.Debug("= S.BaseDrawObject: UpdateFrame input:",t),t&&(Utils2.CopyRect(this.Frame,t),Utils2.CopyRect(this.r,t),Utils2.CopyRect(this.inside,t),Utils2.CopyRect(this.trect,t)),LogUtil.Debug("= S.BaseDrawObject: UpdateFrame output:",{Frame:this.Frame,r:this.r,inside:this.inside,trect:this.trect})}SetSize(t,e){LogUtil.Debug("= S.BaseDrawObject: SetSize input:",{width:t,height:e}),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),LogUtil.Debug("= S.BaseDrawObject: SetSize output:",{rflags:this.rflags})}OffsetShape(t,e){LogUtil.Debug("= S.BaseDrawObject: OffsetShape input:",{dx:t,dy:e}),this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.inside.x+=t,this.inside.y+=e,this.trect.x+=t,this.trect.y+=e,LogUtil.Debug("= S.BaseDrawObject: OffsetShape output:",{Frame:this.Frame,r:this.r,inside:this.inside,trect:this.trect})}SetShapeOrigin(t,e,i){LogUtil.Debug("= S.BaseDrawObject: SetShapeOrigin input:",{newX:t,newY:e,origin:i});const n=null!=t?t-this.Frame.x:0,s=null!=e?e-this.Frame.y:0;this.OffsetShape(n,s),LogUtil.Debug("= S.BaseDrawObject: SetShapeOrigin output: new Frame:",this.Frame)}ApplyCurvature(t){LogUtil.Debug("= S.BaseDrawObject: ApplyCurvature input:",t),LogUtil.Debug("= S.BaseDrawObject: ApplyCurvature output: completed")}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("= S.BaseDrawObject: ScaleObject input:",{posOffsetX:t,posOffsetY:e,rotateCenter:i,rotationAngle:n,scaleX:s,scaleY:a,updateContainerStyle:o});let r=this.Frame;if(r.x=t+r.x*s,r.y=e+r.y*a,r.width*=s,r.height*=a,this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),n){const t={x:r.x+r.width/2,y:r.y+r.height/2},e=2*Math.PI*(n/360),s=T3Gv.opt.RotatePointAroundPoint(i,t,e);r.x=s.x-r.width/2,r.y=s.y-r.height/2,this.RotationAngle+=n,this.RotationAngle>=360&&(this.RotationAngle-=360)}if(o){let t=s;a>t&&(t=a),this.StyleRecord.Line.Thickness*=t,this.StyleRecord.Line.BThick*=t}if(this.ContainerList){const t=this.ContainerList;t.HorizontalSpacing*=s,t.VerticalSpacing*=s,t.MinWidth*=s,t.MinHeight*=s,t.childwidth*=s,t.childheight*=s}this.UpdateFrame(r),this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height,LogUtil.Debug("= S.BaseDrawObject: ScaleObject output:",{Frame:this.Frame,RotationAngle:this.RotationAngle,sizedim:this.sizedim})}GetDragR(){let t=new Rectangle;return Utils2.CopyRect(t,this.r),LogUtil.Debug("= S.BaseDrawObject: GetDragR output:",t),t}GetHitTestFrame(){LogUtil.Debug("= S.BaseDrawObject: GetHitTestFrame input");let t=new Rectangle;return Utils2.CopyRect(t,this.r),LogUtil.Debug("= S.BaseDrawObject: GetHitTestFrame output:",t),t}GetSVGFrame(t){LogUtil.Debug("= S.BaseDrawObject: GetSVGFrame - input:",t);const e=new Rectangle;return null==t&&(t=this.Frame),Utils2.CopyRect(e,t),LogUtil.Debug("= S.BaseDrawObject: GetSVGFrame - output:",e),e}LinkGrow(t,e){LogUtil.Debug("= S.BaseDrawObject: LinkGrow input:",{inputElement:t,growthFactor:e}),LogUtil.Debug("= S.BaseDrawObject: LinkGrow output: completed")}GetMoveRect(t){LogUtil.Debug("= S.BaseDrawObject: GetMoveRect input:",{useRelative:t});let e={};return t?(Utils2.CopyRect(e,this.r),Utils2.InflateRect(e,0,0)):Utils2.CopyRect(e,this.Frame),LogUtil.Debug("= S.BaseDrawObject: GetMoveRect output:",e),e}GetPositionRect(){LogUtil.Debug("= S.BaseDrawObject: GetPositionRect input");const t={};return Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseDrawObject: GetPositionRect output:",t),t}AdjustPinRect(t,e){LogUtil.Debug("= S.BaseDrawObject: AdjustPinRect input:",{inputRect:t,adjustment:e});const i=t;return LogUtil.Debug("= S.BaseDrawObject: AdjustPinRect output:",i),i}GetArrayRect(t){LogUtil.Debug("= S.BaseDrawObject: GetArrayRect input:",{useAlternateMapping:t});const e=this.StyleRecord.Line.BThick?2*this.StyleRecord.Line.BThick:this.StyleRecord.Line.Thickness/2;let i=Utils1.DeepCopy(this.Frame);Utils2.InflateRect(i,e,e);const n=new CRect;return t?(n.h=i.y,n.v=i.x,n.hdist=i.height,n.vdist=i.width):(n.h=i.x,n.hdist=i.width,n.v=i.y,n.vdist=i.height),LogUtil.Debug("= S.BaseDrawObject: GetArrayRect output:",n),n}GetTargetRect(t,e){LogUtil.Debug("= S.BaseDrawObject: GetTargetRect input:",{input:t,options:e});const i={x:0,y:0,width:0,height:0};return LogUtil.Debug("= S.BaseDrawObject: GetTargetRect output:",i),i}GetHookFlags(){LogUtil.Debug("= S.BaseDrawObject: GetHookFlags input");return LogUtil.Debug("= S.BaseDrawObject: GetHookFlags output:",0),0}AllowLink(){LogUtil.Debug("= S.BaseDrawObject: AllowLink input: none");return LogUtil.Debug("= S.BaseDrawObject: AllowLink output:",0),0}AllowSpell(){LogUtil.Debug("= S.BaseDrawObject: AllowSpell input, bInGroup:",this.bInGroup,"TextFlags:",this.TextFlags);const t=!this.bInGroup&&0==(this.TextFlags&NvConstant.TextFlags.NoSpell);return LogUtil.Debug("= S.BaseDrawObject: AllowSpell output:",t),t}PreventLink(){LogUtil.Debug("= S.BaseDrawObject: PreventLink input");return LogUtil.Debug("= S.BaseDrawObject: PreventLink output:",false),false}AllowHeal(){LogUtil.Debug("= S.BaseDrawObject: AllowHeal input: none");return LogUtil.Debug("= S.BaseDrawObject: AllowHeal output:",false),false}AllowMaintainLink(){LogUtil.Debug("= S.BaseDrawObject: AllowMaintainLink input, no parameters");return LogUtil.Debug("= S.BaseDrawObject: AllowMaintainLink output:",true),true}GetHookPoints(){LogUtil.Debug("= S.BaseDrawObject: GetHookPoints input");return LogUtil.Debug("= S.BaseDrawObject: GetHookPoints output:",null),null}GetBestHook(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetBestHook - input:",{inputHook:t,targetHook:e,attachmentData:i});const n=e;return LogUtil.Debug("= S.BaseDrawObject: GetBestHook - output:",n),n}SetHookAlign(t,e){LogUtil.Debug("= S.BaseDrawObject: SetHookAlign input:",{hook:t,alignment:e}),LogUtil.Debug("= S.BaseDrawObject: SetHookAlign output: completed")}GetTargetPoints(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetTargetPoints input:",{targetPoint:t,hookFlags:e,extraParam:i});return LogUtil.Debug("= S.BaseDrawObject: GetTargetPoints output:",null),null}AllowHook(t,e,i){LogUtil.Debug("= S.BaseDrawObject: AllowHook input:",{hookData:t,target:e,attachment:i});return LogUtil.Debug("= S.BaseDrawObject: AllowHook output:",true),true}ConnectToHook(t,e){LogUtil.Debug("= S.BaseDrawObject: ConnectToHook input:",{sourceHook:t,targetHook:e});const i=e;return LogUtil.Debug("= S.BaseDrawObject: ConnectToHook output:",i),i}HookToPoint(t,e){LogUtil.Debug("= S.BaseDrawObject: HookToPoint input:",{point:t,target:e});const i={x:0,y:0};return LogUtil.Debug("= S.BaseDrawObject: HookToPoint output:",i),i}IsCoManager(t){LogUtil.Debug("= S.BaseDrawObject: IsCoManager input:",t);return LogUtil.Debug("= S.BaseDrawObject: IsCoManager output:",false),false}LinkNotVisible(){LogUtil.Debug("= S.BaseDrawObject: LinkNotVisible input: no parameters");const t=(this.flags&NvConstant.ObjFlags.NotVisible)>0;return LogUtil.Debug("= S.BaseDrawObject: LinkNotVisible output:",t),t}IsAsstConnector(){LogUtil.Debug("= S.BaseDrawObject: IsAsstConnector input:");return LogUtil.Debug("= S.BaseDrawObject: IsAsstConnector output:",false),false}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: GetPerimPts input:",{unusedId:t,points:e,unusedParam:i,skipRotation:n,optionalParam:s,anotherOptionalParam:a});const o=e.length,r=[],l=PolygonConstant.ShapeTypes.TRIANGLE,h=OptConstant.Common.DimMax;for(let c=0;c<o;c++){r[c]={x:0,y:0,id:0},r[c].x=e[c].x/h*this.Frame.width+this.Frame.x;const t=this.dataclass===l?h-e[c].y:e[c].y;r[c].y=t/h*this.Frame.height+this.Frame.y,null!=e[c].id&&(r[c].id=e[c].id)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,r)}return LogUtil.Debug("= S.BaseDrawObject: GetPerimPts output:",r),r}ChangeHook(t,e,i){LogUtil.Debug("= S.BaseDrawObject: ChangeHook input:",{sourceHook:t,targetHook:e,additionalData:i}),HookUtil.CNChangeHook(this,t,e,i),LogUtil.Debug("= S.BaseDrawObject: ChangeHook output:","Hook change applied")}ChangeShape(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: ChangeShape input:",{e:t,t:e,a:i,r:n,i:s});return LogUtil.Debug("= S.BaseDrawObject: ChangeShape output:",false),false}GetLineChangeFrame(){LogUtil.Debug("= S.BaseDrawObject: GetLineChangeFrame input:",this.Frame);let t=Utils1.DeepCopy(this.Frame);return t.width<OptConstant.Common.SegDefLen&&(t.width=OptConstant.Common.SegDefLen),t.height<OptConstant.Common.SegDefLen&&(t.height=OptConstant.Common.SegDefLen),LogUtil.Debug("= S.BaseDrawObject: GetLineChangeFrame output:",t),t}DeleteObject(){LogUtil.Debug("= S.BaseDrawObject: DeleteObject input:",{TableID:this.TableID,DataID:this.DataID,NoteID:this.NoteID,NativeID:this.NativeID,BlobBytesID:this.BlobBytesID,EMFBlobBytesID:this.EMFBlobBytesID,OleBlobBytesID:this.OleBlobBytesID,commentId:this.commentId});let t=null,e=[];if(-1!==this.DataID&&(t=T3Gv.stdObj.GetObject(this.DataID),t&&t.Delete()),-1!==this.NoteID&&(t=T3Gv.stdObj.GetObject(this.NoteID),t&&t.Delete()),-1!==this.NativeID&&(t=T3Gv.stdObj.GetObject(this.NativeID),t&&t.Delete()),-1!==this.BlobBytesID&&(t=T3Gv.stdObj.GetObject(this.BlobBytesID),t&&t.Delete(),OptCMUtil.IsBlobURL(this.ImageURL)&&OptCMUtil.DeleteURL(this.ImageURL)),-1!==this.EMFBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.EMFBlobBytesID),t&&t.Delete()),-1!==this.OleBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.OleBlobBytesID),t&&t.Delete()),this.RemoveFieldData(!0),this.hooks.length>0){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(t&&t.objecttype===NvConstant.FNObjectTypes.FlWall&&!(t.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)){e=Utils1.DeepCopy(this.hooks),this.hooks=[];const i=T3Gv.opt.svgObjectLayer.GetElementById(t.BlockID);t.UpdateDimensionLines(i),this.hooks=e}}this.commentId>=0&&T3Gv.opt.CommentObjectDelete(this),LogUtil.Debug("= S.BaseDrawObject: DeleteObject output: object deleted")}GetTextIDs(){LogUtil.Debug("= S.BaseDrawObject: GetTextIDs input");const t=[];return LogUtil.Debug("= S.BaseDrawObject: GetTextIDs output:",t),t}GetSegLFace(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetSegLFace input:",{segmentIndex:t,someParam:e,anotherParam:i});return LogUtil.Debug("= S.BaseDrawObject: GetSegLFace output:",0),0}GetSpacing(){LogUtil.Debug("= S.BaseDrawObject: GetSpacing input");const t={width:null,height:null};return LogUtil.Debug("= S.BaseDrawObject: GetSpacing output:",t),t}GetShapeConnectPoint(){LogUtil.Debug("= S.BaseDrawObject: GetShapeConnectPoint input:");const t={x:0,y:0};return LogUtil.Debug("= S.BaseDrawObject: GetShapeConnectPoint output:",t),t}ClosePolygon(t,e,i){LogUtil.Debug("= S.BaseDrawObject: ClosePolygon input:",{e:t,t:e,a:i});return LogUtil.Debug("= S.BaseDrawObject: ClosePolygon output:",false),false}Hit(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: Hit input:",{point:t,param2:e,param3:i,param4:n});const s=Utils2.pointInRect(this.Frame,t)?NvConstant.HitCodes.Border:0;return LogUtil.Debug("= S.BaseDrawObject: Hit output:",s),s}AfterModifyShape(t,e){LogUtil.Debug("= S.BaseDrawObject: AfterModifyShape input:",{shape:t,additionalData:e}),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseDrawObject: AfterModifyShape output: links updated")}AfterRotateShape(t){LogUtil.Debug("= S.BaseDrawObject: AfterRotateShape input:",t),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseDrawObject: AfterRotateShape output: links updated")}PolyGetTargetPointList(t){LogUtil.Debug("= S.BaseDrawObject: PolyGetTargetPointList input:",t);let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null);if(0!==this.RotationAngle){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,e)}return LogUtil.Debug("= S.BaseDrawObject: PolyGetTargetPointList output:",e),e}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: GetPolyPoints input:",{dummy:t,applyAbsoluteOffset:e,unused:i,inflateRect:n,unused2:s});let a=[],o=new Rectangle;const r=this.StyleRecord.Line.Thickness/2;if(Utils2.CopyRect(o,this.Frame),n&&Utils2.InflateRect(o,r,r),a.push(new Point$1(0,0)),a.push(new Point$1(o.width,0)),a.push(new Point$1(o.width,o.height)),a.push(new Point$1(0,o.height)),a.push(new Point$1(0,0)),!e)for(let l=0;l<a.length;l++)a[l].x+=o.x,a[l].y+=o.y;return LogUtil.Debug("= S.BaseDrawObject: GetPolyPoints output:",a),a}RightClick(t){LogUtil.Debug("= S.BaseDrawObject: RightClick input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("= S.BaseDrawObject: Converted window to doc coords:",e);const i=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);return LogUtil.Debug("= S.BaseDrawObject: Found SVG element:",i),SelectUtil.SelectObjectFromClick(t,i)?(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=i.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,LogUtil.Debug("= S.BaseDrawObject: Right click param set to:",T3Gv.opt.rClickParam),T3Gv.docUtil.IsReadOnly()?UIUtil.ShowContextMenu(!0,"DrawObject","ReadOnly"):UIUtil.ShowContextMenu(!0,"DrawObject","Editable"),LogUtil.Debug("= S.BaseDrawObject: RightClick output: Contextual menu shown"),!0):(LogUtil.Debug("= S.BaseDrawObject: RightClick output: Object selection failed"),!1)}AdjustTextEditBackground(t,e){LogUtil.Debug("= s.BaseDrawObject: AdjustTextEditBackground input:",{e:t,t:e})}SetTextContent(t){if(LogUtil.Debug("= S.BaseDrawObject: SetTextContent input:",t),t){const e=new TextObject({runtimeText:t}),i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TextObject,e);if(null===i)throw"error: AddNewObject got a null new text block allocation";this.DataID=i.ID}LogUtil.Debug("= S.BaseDrawObject: SetTextContent output, DataID:",this.DataID)}SetNoteContent(t){if(LogUtil.Debug("= S.BaseDrawObject: SetNoteContent input:",t),t){const e=new TextObject({runtimeText:t}),i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.NotesObject,e);if(null===i)throw T3Util.Error("= s.BaseDrawObject: SetNoteContent error: null new text block allocation"),"error: AddNewObject got a null new text block allocation";this.NoteID=i.ID,LogUtil.Debug("= S.BaseDrawObject: SetNoteContent output: NoteID set to",this.NoteID)}else LogUtil.Debug("= S.BaseDrawObject: SetNoteContent output: no note content provided")}GetArrowheadFormat(){LogUtil.Debug("= S.BaseDrawObject: GetArrowheadFormat input:");return LogUtil.Debug("= S.BaseDrawObject: GetArrowheadFormat output:",null),null}GetTextParaFormat(t){LogUtil.Debug("= S.BaseDrawObject: GetTextParaFormat input:",t);let e={};e.just=this.TextAlign,e.bullet="none",e.spacing=0;const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(this.DataID&&this.DataID>=0){const n=i.textElem;if(n){const i=n.GetVerticalAlignment(),s=n.GetSelectedParagraphStyle();if(s)if(e=new ParagraphFormat,e.bullet=s.bullet,e.spacing=s.spacing,this instanceof Instance.Shape.BaseShape)if(e.vjust=i,t)switch(i){case"bottom":case"top":e.just=i+"-"+s.just;break;default:e.just=s.just}else e.just=s.just;else e.just=this.TextAlign}}return LogUtil.Debug("= S.BaseDrawObject: GetTextParaFormat output:",e),e}GetTextFormat(t,e){let i,n,s,a,o;LogUtil.Debug("= S.BaseDrawObject: GetTextFormat input:",{returnTextFormat:t,textOptions:e});let r=null;const l=TextConstant.TextFace;let h=new TextFmtData,c=new DefaultStyle;const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(h=Utils1.DeepCopy(this.StyleRecord.Text),h.FontId=-1,h.FontName=u.def.lf.fontName,null!==this.DataID&&this.DataID>=0){const u=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(u&&(r=u.textElem),e&&(e.hastext=!0),r){r.GetText();const e=r.GetSelectedFormat();if(e)return t?(h.FontSize=TextUtil.FontSizeToPoints(e.size),h.FontId=-1,h.FontName=e.font,i="bold"===e.weight,h.Face=Utils2.SetFlag(h.Face,l.Bold,i),n="italic"===e.style,h.Face=Utils2.SetFlag(h.Face,l.Italic,n),s="underline"===e.decoration,h.Face=Utils2.SetFlag(h.Face,l.Underline,s),a="super"===e.baseOffset,h.Face=Utils2.SetFlag(h.Face,l.Superscript,a),o="sub"===e.baseOffset,h.Face=Utils2.SetFlag(h.Face,l.Subscript,o),h.Paint.Color=e.color?e.color:"",e.colorTrans&&(h.Paint.Opacity=e.colorTrans),LogUtil.Debug("= S.BaseDrawObject: GetTextFormat output (TxtFmtData):",h),h):(c.font=e.font,c.size=e.size,c.weight=e.weight,c.style=e.style,c.decoration=e.decoration,c.baseOffset=e.baseOffset,c.color=e.color,c.colorTrans=e.colorTrans,LogUtil.Debug("= S.BaseDrawObject: GetTextFormat output (DefaultStyle):",c),c)}}return LogUtil.Debug("= S.BaseDrawObject: GetTextFormat output:",t?h:null),t?h:null}UseTextBlockColor(){LogUtil.Debug("= S.BaseDrawObject: UseTextBlockColor input: none");return LogUtil.Debug("= S.BaseDrawObject: UseTextBlockColor output:",false),false}SetTextObject(t){return LogUtil.Debug("= S.BaseDrawObject: SetTextObject input:",t),this.DataID=t,LogUtil.Debug("= S.BaseDrawObject: SetTextObject output: DataID set to",this.DataID),!0}GetTextObject(t,e){LogUtil.Debug("= S.BaseDrawObject: GetTextObject input:",{input:t,options:e});const i=this.DataID;return LogUtil.Debug("= S.BaseDrawObject: GetTextObject output:",i),i}SetTextFormat(t,e){LogUtil.Debug("= S.BaseDrawObject: SetTextFormat input:",{textFormat:t,options:e}),LogUtil.Debug("= S.BaseDrawObject: SetTextFormat output: completed")}ExtendLines(){LogUtil.Debug("= S.BaseDrawObject: ExtendLines input:"),LogUtil.Debug("= S.BaseDrawObject: ExtendLines output: complete")}ExtendCell(t,e,i){LogUtil.Debug("= S.BaseDrawObject: ExtendCell input:",{inputCell:t,additionalParam:e,anotherParam:i});return LogUtil.Debug("= S.BaseDrawObject: ExtendCell output:",null),null}SetShapeProperties(t){LogUtil.Debug("= S.BaseDrawObject: SetShapeProperties input:",t);let e=!1;switch(t.ClickFlag){case NvConstant.TextFlags.OneClick:0==(this.TextFlags&NvConstant.TextFlags.OneClick)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.OneClick,!0),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.None,!1),e=!0);break;case NvConstant.TextFlags.None:0==(this.TextFlags&NvConstant.TextFlags.None)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.OneClick,!1),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.None,!0),e=!0);break;case 0:(this.TextFlags&NvConstant.TextFlags.None||this.TextFlags&NvConstant.TextFlags.OneClick)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.OneClick,!1),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.None,!1),e=!0)}switch(t.PositionFlag){case NvConstant.TextFlags.AttachA:0==(this.TextFlags&NvConstant.TextFlags.AttachA)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachA,!0),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachB,!1),e=!0);break;case NvConstant.TextFlags.AttachB:0==(this.TextFlags&NvConstant.TextFlags.AttachB)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachB,!0),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachA,!1),e=!0);break;case 0:0==(this.TextFlags&NvConstant.TextFlags.AttachB)&&0==(this.TextFlags&NvConstant.TextFlags.AttachA)||(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachB,!1),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachA,!1),e=!0)}return!0===t.CRFlag?0==(this.TextFlags&NvConstant.TextFlags.FormCR)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.FormCR,!0),e=!0):!1===t.CRFlag&&0!=(this.TextFlags&NvConstant.TextFlags.FormCR)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.FormCR,!1),e=!0),!1===t.AllowSpell?0==(this.TextFlags&NvConstant.TextFlags.NoSpell)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.NoSpell,!0),e=!0):!0===t.AllowSpell&&0!=(this.TextFlags&NvConstant.TextFlags.NoSpell)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.NoSpell,!1),e=!0),LogUtil.Debug("= S.BaseDrawObject: SetShapeProperties output:",e),e}SetShapeConnectionPoints(t,e,i){LogUtil.Debug("= S.BaseDrawObject: SetShapeConnectionPoints input:",{shape:t,connectionPoint:e,additionalInfo:i});return LogUtil.Debug("= S.BaseDrawObject: SetShapeConnectionPoints output:",false),false}GetClosestConnectPoint(t){LogUtil.Debug("= S.BaseDrawObject: GetClosestConnectPoint input:",t);return LogUtil.Debug("= S.BaseDrawObject: GetClosestConnectPoint output:",false),false}ScaleEndPoints(){LogUtil.Debug("= S.BaseDrawObject: ScaleEndPoints input:",{polylist:this.polylist,startPoint:this.StartPoint,endPoint:this.EndPoint}),this.polylist&&this.StartPoint&&this.EndPoint&&this.PolyLineScaleEndPoints(),LogUtil.Debug("= S.BaseDrawObject: ScaleEndPoints output: completed")}PolyLineScaleEndPoints(){LogUtil.Debug("= S.BaseDrawObject: PolyLineScaleEndPoints input:",{polylist:this.polylist,Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});const t=this.Frame.width/this.polylist.dim.x,e=this.Frame.height/this.polylist.dim.y,i=this.Frame.x+this.Frame.width/2,n=this.Frame.y+this.Frame.height/2;if(1===t&&1===e)return void LogUtil.Debug("= S.BaseDrawObject: PolyLineScaleEndPoints output: no scaling required");let s=i-this.StartPoint.x;this.StartPoint.x=i-s*t;let a=n-this.StartPoint.y;this.StartPoint.y=n-a*e,s=i-this.EndPoint.x,this.EndPoint.x=i-s*t,a=n-this.EndPoint.y,this.EndPoint.y=n-a*e,LogUtil.Debug("= S.BaseDrawObject: PolyLineScaleEndPoints output:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}ChangeLineThickness(t){LogUtil.Debug("= S.BaseDrawObject: ChangeLineThickness input:",t),this.UpdateFrame(null),LogUtil.Debug("= S.BaseDrawObject: ChangeLineThickness output: thickness changed")}ChangeEffect(){LogUtil.Debug("= S.BaseDrawObject: ChangeEffect input: no parameters"),this.UpdateFrame(null),LogUtil.Debug("= S.BaseDrawObject: ChangeEffect output: effect changed")}ChangeTextAttributes(t,e,i,n,s,a,o,r){LogUtil.Debug("= S.BaseDrawObject: ChangeTextAttributes input:",{fillColor:t,strokeColor:e,isBold:i,isItalic:n,paramI:s,paramN:a,paramO:o,paramS:r}),(t||e||i||n||r)&&T3Gv.opt.ChangeObjectTextAttributes(this.BlockID,t,e,s,n,a,o,r),LogUtil.Debug("= S.BaseDrawObject: ChangeTextAttributes output: text attributes changed")}SetObjectStyle(t){LogUtil.Debug("= S.BaseDrawObject: SetObjectStyle input:",t);const e=T3Gv.opt.ApplyColorFilter(t,this,this.StyleRecord,this.colorfilter),i=this.StyleRecord.Line.Thickness;return e.StyleRecord&&e.StyleRecord.Fill&&e.StyleRecord.Fill.Paint&&e.StyleRecord.Fill.Paint.Color&&void 0===e.StyleRecord.Name&&void 0===e.StyleRecord.Fill.Paint.FillType&&(this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Gradient?this.StyleRecord.Fill.Paint.Color.toUpperCase()===e.StyleRecord.Fill.Paint.Color.toUpperCase()&&(e.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid):e.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid),T3Gv.opt.ApplyProperties(e,this),e.StyleRecord&&(e.StyleRecord.Line&&e.StyleRecord.Line.Thickness&&this.ChangeLineThickness(i),e.StyleRecord.OutsideEffect&&this.ChangeEffect()),LogUtil.Debug("= S.BaseDrawObject: SetObjectStyle output:",e),e}GetTextDefault(t){if(t&&($$1.extend(!0,t,new ParagraphFormat),t.bullet="none",t.spacing=0,t.just="center",t.vjust="middle",this.TextAlign)){const e=this.TextAlign.indexOf("-");e>=0?(t.vjust=this.TextAlign.slice(0,e),t.just=this.TextAlign.slice(e+1,this.TextAlign.length)):t.just=this.TextAlign}const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),i=Utils1.DeepCopy(this.StyleRecord.Text);return i.FontId=-1,i.FontName=e.def.lf.fontName,i}GetListOfEnclosedObjects(t){LogUtil.Debug("= S.BaseDrawObject: GetListOfEnclosedObjects input:",t);const e=[];return LogUtil.Debug("= S.BaseDrawObject: GetListOfEnclosedObjects output:",e),e}InterceptMoveOperation(t){LogUtil.Debug("= S.BaseDrawObject: InterceptMoveOperation input:",t);return LogUtil.Debug("= S.BaseDrawObject: InterceptMoveOperation output:",false),false}SetupInterceptMove(t){LogUtil.Debug("= S.BaseDrawObject: SetupInterceptMove input:",t);return LogUtil.Debug("= S.BaseDrawObject: SetupInterceptMove output:",false),false}IsSelected(){LogUtil.Debug("= S.BaseDrawObject: IsSelected input: none");const t=this.BlockID,e=T3Gv.opt.selectObjsBlockId.Data,i=$$1.inArray(t,e)>=0;return LogUtil.Debug("= S.BaseDrawObject: IsSelected output:",i),i}RemoveDimensionLines(t){if(LogUtil.Debug("= S.BaseDrawObject: RemoveDimensionLines input:",t),null!=t){const e=[OptConstant.SVGElementClass.DimLine,OptConstant.SVGElementClass.DimText,OptConstant.SVGElementClass.AreaDimLine,OptConstant.SVGElementClass.DimTextNoEdit];for(let i=0;i<e.length;i++){const n=t.GetElementListWithId(e[i]);for(let e=0;e<n.length;e++)t.RemoveElement(n[e])}}LogUtil.Debug("= S.BaseDrawObject: RemoveDimensionLines output: completed")}RemoveCoordinateLines(t){if(LogUtil.Debug("= S.BaseDrawObject: RemoveCoordinateLines input:",t),null!=t){const e=[OptConstant.SVGElementClass.CoordinateLine];for(let i=0;i<e.length;i++){const n=t.GetElementListWithId(e[i]);for(let e=0;e<n.length;e++)t.RemoveElement(n[e])}}LogUtil.Debug("= S.BaseDrawObject: RemoveCoordinateLines output: completed")}SetDimensionLinesVisibility(t,e){function i(t,e,i){const n=t.GetElementListWithId(e);for(let s=0;s<n.length;s++)n[s].SetVisible(i)}LogUtil.Debug("= S.BaseDrawObject: SetDimensionLinesVisibility input:",{svgDoc:t,isVisible:e});const n=this.Dimensions===NvConstant.DimensionFlags.Always||this.Dimensions===NvConstant.DimensionFlags.Select;t&&n&&(i(t,OptConstant.SVGElementClass.DimLine,e),i(t,OptConstant.SVGElementClass.DimText,e),i(t,OptConstant.SVGElementClass.DimTextNoEdit,e)),LogUtil.Debug("= S.BaseDrawObject: SetDimensionLinesVisibility output: visibility set to",e)}NeedsAddLineThicknessToDimension(t){LogUtil.Debug("= S.BaseDrawObject: NeedsAddLineThicknessToDimension input:",t);return LogUtil.Debug("= S.BaseDrawObject: NeedsAddLineThicknessToDimension output:",false),false}GetLengthInRulerUnits(t,e){LogUtil.Debug("= S.BaseDrawObject: GetLengthInRulerUnits input:",{length:t,offset:e});const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let n="",s=0,a=0,o=0,r=0,l=0,h="",c=1;const u=Math.pow(10,T3Gv.docUtil.rulerConfig.dp);if(e&&(e*=100,T3Gv.docUtil.rulerConfig.useInches||(e/=OptConstant.Common.MetricConv),t-=e),T3Gv.docUtil.rulerConfig.showpixels)return n=Math.round(t).toString(),LogUtil.Debug("= S.BaseDrawObject: GetLengthInRulerUnits output:",n),n;if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet){let e=this.GetLengthInUnits(t,!0);if(e<0&&(c=-1,e=-e),s=Math.floor(e/12),a=Math.floor(e%12),o=e-(12*s+a),this.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches&&(a+=12*s,s=0),o>0&&(l=this.GetFractionStringGranularity(i),r=Math.round(o/l),r>=1/l&&(r=0,12==++a&&(a=0,s++)),r>0)){for(;r%2==0;)r/=2,l*=2;h=`${r}/${Math.floor(1/l)}`}0!==s&&(n=s*c+"'"),(a>0||0===h.length)&&(n+=`${0!==s?" ":""}${a}`),h.length>0&&(n+=`${0!==s||0!==a?" ":""}${h}`),n+='"'}else if(T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Inches){const e=this.GetLengthInUnits(t);n=(Math.round(e*u)/u).toString()}else{const e=this.GetLengthInUnits(t);T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.M||T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Cm?n=(Math.round(e*u)/u).toString():T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Mm&&(n=Math.round(e).toString())}return LogUtil.Debug("= S.BaseDrawObject: GetLengthInRulerUnits output:",n),n}GetDimensionTextForPoints(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints input:",{startPoint:t,endPoint:e});const i=360-Utils1.CalcAngleFromPoints(t,e),n=2*Math.PI*(i/360),s=[new Point$1(t.x,t.y),new Point$1(e.x,e.y)];Utils3.RotatePointsAboutCenter(this.Frame,-n,s);const a=Math.abs(s[0].x-s[1].x),o=RulerUtil.GetLengthInRulerUnits(a);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints output:",o),o}UpdateDimensionFromTextObj(t){if(LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromTextObj input:",t),t&&t.userData){const{segment:e,hookedObjectInfo:i}=t.userData,n=t.GetText();i?this.UpdateDimensionsFromTextForHookedObject(t,n,i):e&&e.angleChange?this.UpdateLineAngleDimensionFromText(t,n,e):this.UpdateDimensionFromText(t,n,e)}LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromTextObj output: completed")}UpdateDimensionFromText(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromText input:",{textObject:t,text:e,segment:i}),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromText output: completed")}MaintainProportions(t,e){LogUtil.Debug("= S.BaseDrawObject: MaintainProportions input:",{width:t,height:e});return LogUtil.Debug("= S.BaseDrawObject: MaintainProportions output:",null),null}CanUseRFlags(){LogUtil.Debug("= S.BaseDrawObject: CanUseRFlags input: none");return LogUtil.Debug("= S.BaseDrawObject: CanUseRFlags output:",true),true}UpdateDimensionsFromTextForHookedObject(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionsFromTextForHookedObject input:",{textObject:t,text:e,hookedObjectInfo:i});const n=i.segment;SvgUtil.ShowSVGSelectionState(this.BlockID,!1);const s=this.GetDimensionLengthFromString(e,n);if(s<=0)return ObjectUtil$1.AddToDirtyList(this.BlockID),void SvgUtil.RenderDirtySVGObjects();const a=ObjectUtil$1.GetObjectPtr(i.hookedObjectID,!0);if(!a)return void LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionsFromTextForHookedObject output: hooked object not found");const o=a.hooks[0].connect,r=this.GetPerimPts(this.BlockID,[o],a.hooks[0].hookpt,!1,-1,a.BlockID),l=new Point$1(i.start.x,i.start.y),h=new Point$1(i.end.x,i.end.y),c=[l,h],u=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(l,h);Utils3.RotatePointsAboutCenter(this.Frame,-u,c);let d=s-Math.abs(c[1].x-c[0].x);1===i.side&&(d=-d);const p=this.GetDimensionPoints();for(let m=0;m<p.length;m++)p[m].x+=this.inside.x,p[m].y+=this.inside.y;const g=[p[n-1],p[n],r[0]];Utils3.RotatePointsAboutCenter(this.Frame,-u,g),d>0&&g[2].x+d-a.Frame.width/2>g[1].x?g[2].x=g[1].x-a.Frame.width/2-5:d<0&&g[2].x+d-a.Frame.width/2<g[0].x?g[2].x=g[0].x+a.Frame.width/2+5:g[2].x+=d,Utils3.RotatePointsAboutCenter(this.Frame,u,g);const f=Utils1.DeepCopy(this.Frame);Utils2.InflateRect(f,3,3);const b=Utils2.pointInRect(f,r[0]),v=this.GetTargetPoints(r[0],NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcHookNoExtra|NvConstant.HookFlags.LcShapeOnLine,null);v&&b?(HookUtil.UpdateHook(a.BlockID,0,this.BlockID,a.hooks[0].hookpt,v[0]),OptCMUtil.SetLinkFlag(a.BlockID,DSConstant.LinkFlags.Move),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),HookUtil.UpdateHook(a.BlockID,0,this.BlockID,a.hooks[0].hookpt,v[0])):setTimeout((()=>{}),250),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionsFromTextForHookedObject output: completed")}UpdateDimensions(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateDimensions input:",{inputElement:t,triggerType:e,additionalInfo:i}),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensions output: completed")}GetDimensions(){LogUtil.Debug("= S.BaseDrawObject: GetDimensions input: none");const t={width:this.Frame.width,height:this.Frame.height};return LogUtil.Debug("= S.BaseDrawObject: GetDimensions output:",t),t}GetDimensionsForDisplay(){LogUtil.Debug("= S.BaseDrawObject: GetDimensionsForDisplay input: none");const t={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};return LogUtil.Debug("= S.BaseDrawObject: GetDimensionsForDisplay output:",t),t}CreateDimension(t,e,i,n,s,a,o,r,l,h,c){let u,d=[],p=[],g=[],f=[],b=[];new Rectangle;let v=new Rectangle,m={left:-1,top:-1,right:-1,bottom:-1},y=this.flags&NvConstant.ObjFlags.Lock,S=this.RotationAngle+n,w={segment:r,hookedObjectInfo:null,textFramePts:[]};if(c&&(w.hookedObjectInfo=c),t){if(u=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),t.AddElement(u),u.SetRenderingEnabled(!1),u.SetText(s),Utils2.HasFlag(this.Dimensions,NvConstant.DimensionFlags.Select)&&u.ExcludeFromExport(!0),u.SetUserData(w),this.LineType!==OptConstant.LineType.LINE&&(i||this.Dimensions&NvConstant.DimensionFlags.Total||this.Dimensions&NvConstant.DimensionFlags.EndPts||this.NoGrow())?u.SetID(OptConstant.SVGElementClass.DimTextNoEdit):(u.SetID(OptConstant.SVGElementClass.DimText),u.SetEditCallback(this.DimensionEditCallback,this)),u.SetFormat(T3Gv.opt.header.DimensionFontStyle),u.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),u.SetRenderingEnabled(!0),i){if(this.GetDimensionAreaTextInfo(u,n,d,p,g,f,b),d.length>0&&(Utils2.GetPolyRect(v,d),v.width>=this.Frame.width))return void t.RemoveElement(u);w.textFramePts=d,this.CreateDimensionLineArrowHead(t,e,p,m),this.CreateDimensionLineArrowHead(t,e,g,m),this.CreateDimensionLineArrowHead(t,e,f,m),this.CreateDimensionLineArrowHead(t,e,b,m)}else{if(this.GetDimensionTextInfo(a,o,n,u,r,d,p,g,h),w.textFramePts=Utils1.DeepCopy(d),l&&Utils2.Sqrt((o.x-a.x)**2+(o.y-a.y)**2)<u.geometryBBox.width)return void t.RemoveElement(u);this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()&&!h?(this.CreateDimensionLineSegment(e,i,p,m),this.CreateDimensionLineSegment(e,i,g,m)):(this.CreateDimensionLineArrowHead(t,e,p,m,w),this.CreateDimensionLineArrowHead(t,e,g,m,w))}S>=360&&(S-=360);let c=[new Point$1(d[0].x,d[0].y)];if(S>=89&&S<270){let t=360-n,e=2*Math.PI*(t/360);Utils3.RotatePointsAboutCenter(this.Frame,-e,d),v={x:0,y:0,width:0,height:0},Utils2.GetPolyRect(v,d);let i={x:v.x+v.width,y:v.y+v.height};c=[new Point$1(i.x,i.y)],Utils3.RotatePointsAboutCenter(this.Frame,e,c),(n+=180)>360&&(n-=360)}u.SetPos(c[0].x,c[0].y);try{u.SetRotation(n,c[0].x,c[0].y)}catch(x){throw x}if(!i&&!y&&!this.NoGrow()){let t=Hammer(u.svgObj.SDGObj.DOMElement());t.on("tap",EvtUtil.Evt_DimensionTextTapFactory(this,w,!1)),t.on("doubletap",EvtUtil.Evt_DimensionTextTapFactory(this,w,!0)),u.SetEventProxy(t)}}}CreateCoordinateLine(t,e,i,n,s,a,o,r,l,h,c){let u,d=[],p=[],g=[],f=[],b=[];new Rectangle;let v=new Rectangle,m={left:-1,top:-1,right:-1,bottom:-1},y=this.flags&NvConstant.ObjFlags.Lock,S=this.RotationAngle+n,w={segment:r,hookedObjectInfo:null,textFramePts:[]};if(c&&(w.hookedObjectInfo=c),!t)return;u=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),t.AddElement(u),u.SetRenderingEnabled(!1),u.SetText(n);Utils2.HasFlag(this.Dimensions,NvConstant.DimensionFlags.Select)&&u.ExcludeFromExport(!0),u.SetUserData(w);const x=this.LineType!==OptConstant.LineType.LINE,C=this.Dimensions&NvConstant.DimensionFlags.Total||this.Dimensions&NvConstant.DimensionFlags.EndPts;if(x&&(i||C||this.NoGrow())?u.SetID(OptConstant.SVGElementClass.DimTextNoEdit):(u.SetID(OptConstant.SVGElementClass.DimText),u.SetEditCallback(this.DimensionEditCallback,this)),u.SetFormat(T3Gv.opt.header.DimensionFontStyle),u.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),u.SetRenderingEnabled(!0),i){if(this.GetDimensionAreaTextInfo(u,n,d,p,g,f,b),d.length>0&&(Utils2.GetPolyRect(v,d),v.width>=this.Frame.width))return void t.RemoveElement(u);w.textFramePts=d,this.CreateDimensionLineArrowHead(t,e,p,m),this.CreateDimensionLineArrowHead(t,e,g,m),this.CreateDimensionLineArrowHead(t,e,f,m),this.CreateDimensionLineArrowHead(t,e,b,m)}else{this.GetCoordinateTextInfo(a,o,n,u,r,d,p,g,h),w.textFramePts=Utils1.DeepCopy(d);const s=Utils2.Sqrt((o.x-a.x)**2+(o.y-a.y)**2)<u.geometryBBox.width;if(l&&s)return void t.RemoveElement(u);this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()&&!h?(LogUtil.Debug("=== wall CreateCoordinateLine.leftArrowPoints=",p),LogUtil.Debug("=== wall CreateCoordinateLine.rightArrowPoints=",g),this.CreateCoordinateLineSegment(e,i,p,m),this.CreateCoordinateLineSegment(e,i,g,m)):(this.CreateDimensionLineArrowHead(t,e,p,m,w),this.CreateDimensionLineArrowHead(t,e,g,m,w))}S>=360&&(S-=360);let D=[new Point$1(d[0].x,d[0].y)];if(S>=89&&S<270){let t=360-n,e=2*Math.PI*(t/360);Utils3.RotatePointsAboutCenter(this.Frame,-e,d),v={x:0,y:0,width:0,height:0},Utils2.GetPolyRect(v,d);let i={x:v.x+v.width,y:v.y+v.height};D=[new Point$1(i.x,i.y)],Utils3.RotatePointsAboutCenter(this.Frame,e,D),(n+=180)>360&&(n-=360)}u.SetPos(D[0].x,D[0].y);try{u.SetRotation(n,D[0].x,D[0].y)}catch(T){throw T}if(!i&&!y&&!this.NoGrow()){let t=Hammer(u.svgObj.SDGObj.DOMElement());t.on("tap",EvtUtil.Evt_DimensionTextTapFactory(this,w,!1)),t.on("doubletap",EvtUtil.Evt_DimensionTextTapFactory(this,w,!0)),u.SetEventProxy(t)}}DrawDimensionAngle(t,e,i,n){let s,a,o;LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngle input:",{container:t,pathCreator:e,segmentIndex:i,dimensionPoints:n});const r={angleChange:1,segment:i};if(s=this.GetDimensionAngleInfo(i,n),s){if(t.AddElement(s.text),s.text.SetRenderingEnabled(!1),s.text.SetUserData(r),s.text.SetID(OptConstant.SVGElementClass.DimText),s.text.SetEditCallback(this.DimensionEditCallback,this),s.text.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),s.text.SetRenderingEnabled(!0),s.text.SetPos(s.textRect.x,s.textRect.y),0!==this.RotationAngle&&s.text.SetRotation(-this.RotationAngle),o=Utils2.GetDistanceBetween2Points(s.baseLinePts[1],s.targetLinePts[1]),a=s.text.GetTextMinDimensions(),o>a.width){const t=s.text.svgObj.SDGObj.DOMElement(),e=Hammer(t);e.on("tap",EvtUtil.Evt_DimensionTextTapFactory(this,r,!1)),e.on("doubletap",EvtUtil.Evt_DimensionTextTapFactory(this,r,!0)),s.text.SetEventProxy(e)}else t.RemoveElement(s.text);o>a.width+2*OptConstant.LineAngleDimensionDefs.ArrowHeadSize&&(Utils2.InflateRect(s.textRect,2,2),this.DrawDimensionAngleArc(t,e,s.targetLinePts[0],s.targetLinePts[1],s.textRect,s.baseLinePts[1]),this.DrawDimensionAngleArc(t,e,s.targetLinePts[0],s.targetLinePts[1],s.textRect,s.targetLinePts[1])),this.Dimensions&NvConstant.DimensionFlags.InteriorAngles||(e.MoveTo(s.baseLinePts[0].x,s.baseLinePts[0].y),e.LineTo(s.baseLinePts[1].x,s.baseLinePts[1].y))}LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngle output: completed")}UpdateLineAngleDimensionFromText(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateLineAngleDimensionFromText input:",{textObject:t,text:e,segment:i});let n=parseFloat(e);isNaN(n)||n<-360||n>360?this.UpdateDimensionLines(t):(n<0&&(n+=360),this.SetSegmentAngle(t,i.segment,n)),LogUtil.Debug("= S.BaseDrawObject: UpdateLineAngleDimensionFromText output: completed")}SetSegmentAngle(t,e,i){LogUtil.Debug("= S.BaseDrawObject: SetSegmentAngle input:",{segment:t,angle:e,additionalData:i}),LogUtil.Debug("= S.BaseDrawObject: SetSegmentAngle output: completed")}DrawDimensionAngleArrowhead(t,e,i){LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArrowhead input:",{container:t,angle:e,point:i});const n=[],s=new Rectangle;n.push(new Point$1(i.x,i.y)),n.push(new Point$1(i.x-OptConstant.LineAngleDimensionDefs.ArrowHeadSize,i.y+OptConstant.LineAngleDimensionDefs.ArrowHeadWidth)),n.push(new Point$1(i.x-OptConstant.LineAngleDimensionDefs.ArrowHeadSize,i.y-OptConstant.LineAngleDimensionDefs.ArrowHeadWidth)),Utils3.RotatePointsAboutPoint(i,e,n),Utils2.GetPolyRect(s,n);const a=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polygon);a.SetPoints(n),a.SetEventBehavior(OptConstant.EventBehavior.All),a.SetID(OptConstant.SVGElementClass.DimLine),a.SetPos(0,0),a.SetSize(s.width,s.height),a.SetFillColor(OptConstant.Common.DimLineColor),t.AddElement(a),LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArrowhead output: arrowhead drawn")}GetPerpendicularAngle(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetPerpendicularAngle input:",{point1:t,point2:e,isClockwise:i});let n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(t,e);return n+=i?Math.PI/2:-Math.PI/2,n<0&&(n+=2*Math.PI),n>2*Math.PI&&(n-=2*Math.PI),LogUtil.Debug("= S.BaseDrawObject: GetPerpendicularAngle output:",n),n}DrawDimensionAngleArc(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArc input:",{container:t,pathCreator:e,startPoint:i,endPoint:n,textRect:s,centerPoint:a});let o=Utils2.GetDistanceBetween2Points(i,n),r={x:s.x+s.width/2,y:s.y+s.height/2},l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i,r),h=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i,a);l>Math.PI&&0===h&&(h=2*Math.PI),h-=l,h<0&&(h+=2*Math.PI);let c=h<=Math.PI,u=this.GetPerpendicularAngle(i,a,c),d=Utils3.RotatePointsAboutPoint(i,-u,a),p=this.StyleRecord.Line.Thickness/2;d.x-=p,d=Utils3.RotatePointsAboutPoint(i,u,d);let g=c?d:r,f=c?r:d,b=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i,g),v=PolyUtil.ArcToPoly(OptConstant.Common.MaxPolyPoints,i,o,g.y,f.y,i.x,!1);v=Utils3.RotatePointsAboutPoint(i,-(Math.PI/2-b),v);for(let S=1;S<v.length;S++)e.MoveTo(v[S-1].x,v[S-1].y),e.LineTo(v[S].x,v[S].y);let m=c?v[0]:v[v.length-1];for(let S=0;S<v.length;S++){let t=c?S:v.length-1-S;if(Utils2.GetDistanceBetween2Points(m,v[t])>OptConstant.LineAngleDimensionDefs.ArrowHeadSize){m=v[t];break}}let y=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(m,v[0]);this.DrawDimensionAngleArrowhead(t,y,v[0]),LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArc output: completed")}GetDimensionAngleInfo(t,e){let i,n,s,a,o;LogUtil.Debug("= S.BaseDrawObject: GetDimensionAngleInfo input:",{segmentIndex:t,points:e});let r="",l=null,h=new Rectangle(0,0,0,0),c=[],u=[],d=[],p=0,g=0,f=0;u.push(new Point$1(e[t-1].x,e[t-1].y)),u.push(new Point$1(e[t].x,e[t].y));const b=this.polylist?this.polylist.closed:e.length>2&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;if(this.Dimensions&NvConstant.DimensionFlags.InteriorAngles&&1===t&&!b)return null;if(this.polylist&&t>=1&&t<this.polylist.segs.length){const e=t>1?t-1:this.polylist.segs.length-1;if(this.polylist.segs[t].LineType!==OptConstant.LineType.LINE||this.polylist.segs[e].LineType!==OptConstant.LineType.LINE)return null}for(c.push(new Point$1(u[0].x,u[0].y)),this.Dimensions&NvConstant.DimensionFlags.InteriorAngles?1===t?c.push(new Point$1(e[e.length-2].x,e[e.length-2].y)):c.push(new Point$1(e[t-2].x,e[t-2].y)):(p=Utils2.GetDistanceBetween2Points(u[0],u[1]),c.push(new Point$1(c[0].x+p,c[0].y))),i=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(u[0],u[1]),n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(c[0],c[1]),i-=n,i<0&&(i+=2*Math.PI),g=i/2,i>Math.PI&&(i=2*Math.PI-i,g+=Math.PI,g>=2*Math.PI&&(g-=2*Math.PI)),i+=n,i>=2*Math.PI&&(i-=2*Math.PI),g+=n,g>=2*Math.PI&&(g-=2*Math.PI),d.push(new Point$1(u[0].x,u[0].y)),d.push(new Point$1(u[1].x,u[1].y)),Utils3.RotatePointsAboutPoint(u[0],-i,d),s=Math.min(Utils2.GetDistanceBetween2Points(u[0],u[1]),Utils2.GetDistanceBetween2Points(c[0],c[1])),a=OptConstant.LineAngleDimensionDefs.PreferredBisectorLen<s?OptConstant.LineAngleDimensionDefs.PreferredBisectorLen:s,d[1].x=d[0].x+a,Utils3.RotatePointsAboutPoint(u[0],g,d),f=Math.abs(i/(2*Math.PI)*360),f=Math.round(f),r=f.toString()+"°",l=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),l.SetFormat(T3Gv.opt.header.DimensionFontStyle),l.SetText(r),o=l.GetTextMinDimensions();a<s&&Math.tan(i/2)*a<o.width/2+OptConstant.LineAngleDimensionDefs.PreferredArrowStemMin+OptConstant.LineAngleDimensionDefs.ArrowHeadSize;)a+=OptConstant.LineAngleDimensionDefs.PreferredBisectorLen,a>=s&&(a=s);T3Gv.opt.SetLineLength(u[0],u[1],a),T3Gv.opt.SetLineLength(c[0],c[1],a),T3Gv.opt.SetLineLength(d[0],d[1],a),h=Utils2.SetRect(0,0,o.width,o.height),Utils2.OffsetRect(h,d[1].x,d[1].y),Utils2.OffsetRect(h,-o.width/2,-o.height/2);const v={text:l,textRect:h,baseLinePts:c,targetLinePts:u};return LogUtil.Debug("= S.BaseDrawObject: GetDimensionAngleInfo output:",v),v}GetPointsForDimension(t,e,i,n,s,a){let o;LogUtil.Debug("= S.BaseDrawObject: GetPointsForDimension input:",{angle:t,text:e,startPoint:i,endPoint:n,segmentIndex:s,isStandoff:a});const r=[],l=[],h=[],c=new Rectangle,u=new Rectangle,d=new Rectangle;o=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),o.SetText(e),o.SetFormat(T3Gv.opt.header.DimensionFontStyle),o.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),this.GetDimensionTextInfo(i,n,t,o,s,h,r,l,a),o=null,Utils2.GetPolyRect(c,r),Utils2.GetPolyRect(u,l),Utils2.GetPolyRect(d,h);const p={left:c,textFrame:d,right:u};return LogUtil.Debug("= S.BaseDrawObject: GetPointsForDimension output:",p),p}GetAreaDimension(t){let e;return LogUtil.Debug("= S.BaseDrawObject: GetAreaDimension input:",t),this.Dimensions&NvConstant.DimensionFlags.Area?e=this.GetAreaDimensionText(t):this.Dimensions&NvConstant.DimensionFlags.RectWithAndHeight&&(e=this.GetAreaWidthAndHeightText(t)),LogUtil.Debug("= S.BaseDrawObject: GetAreaDimension output:",e),e}GetAreaDimensionText(t){LogUtil.Debug("= S.BaseDrawObject: GetAreaDimensionText input:",t);let e=0,i="";e=t?this.CalculatePolygonArea(t):this.Frame.width*this.Frame.height;const n=T3Gv.docUtil.rulerConfig.showpixels?e:this.GetLengthInUnits(e);return i=RulerUtil.GetLengthInRulerUnits(n),LogUtil.Debug("= S.BaseDrawObject: GetAreaDimensionText output:",i),i}CalculatePolygonArea(t){let e=0,i=t.length-1;for(let n=0;n<t.length;n++)e+=(t[i].x+t[n].x)*(t[i].y-t[n].y),i=n;return Math.abs(e/2)}GetAreaWidthAndHeightText(t){LogUtil.Debug("= S.BaseDrawObject: GetAreaWidthAndHeightText input:",t);return LogUtil.Debug("= S.BaseDrawObject: GetAreaWidthAndHeightText output:",null),null}GetDimensionPoints(){LogUtil.Debug("= S.BaseDrawObject: GetDimensionPoints input");let t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);if(this.RotationAngle){const e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t)}return LogUtil.Debug("= S.BaseDrawObject: GetDimensionPoints output:",t),t}GetCoordinateLinePoints(){LogUtil.Debug("= S.BaseDrawObject: GetCoordinateLinePoints input");let t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);if(this.RotationAngle){const e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t)}return LogUtil.Debug("= S.BaseDrawObject: GetCoordinateLinePoints output:",t),t}GetHookedObjectDescList(t,e){LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDescList input:",{dimensionPoints:t,context:e});let i=[],n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),s=new Rectangle(0,0,0,0),a=[],o=null,r={x:0,y:0},l=0;if(n){let t=OptCMUtil.FindLink(n,this.BlockID,!0),e=n.length;for(;t>=0&&t<e&&n[t].targetid===this.BlockID;){if(o=ObjectUtil$1.GetObjectPtr(n[t].hookid,!1),o)for(let e=0;e<o.hooks.length;e++)if(o.hooks[e].objid===this.BlockID){a.push(n[t].hookid);break}t++}}if(e&&e.linkParams){if(e.linkParams.ConnectIndex!==this.BlockID&&(e.linkParams.PrevConnect===this.BlockID||e.linkParams.ConnectIndexHistory.indexOf(this.BlockID)>=0)){let t=a.indexOf(e.movingShapeID);t>=0&&a.splice(t,1)}e.linkParams.ConnectIndex===this.BlockID&&a.indexOf(e.movingShapeID)<0&&a.push(e.movingShapeID)}for(let h=0;h<a.length;h++)if(o=ObjectUtil$1.GetObjectPtr(a[h],!1),o instanceof Instance.Shape.BaseShape&&!(e&&e.linkParams&&e.movingShapeID===o.BlockID&&e.linkParams.ConnectIndex<0&&e.linkParams.PrevConnect===this.BlockID)){if(e&&e.linkParams&&e.movingShapeID===o.BlockID)r=e.linkParams.ConnectPt;else{if(!(o.hooks.length>0))continue;r=o.hooks[0].connect}let n=this.GetPerimPts(this.BlockID,[r]),a=this.Hit(n[0],!0,!1,{});if(!a){if(!(this instanceof Instance.Shape.BaseLine)||this instanceof Instance.Shape.PolyLine)continue;if(Utils2.IsEqual(n[0].x,this.StartPoint.x,2)&&Utils2.IsEqual(n[0].y,this.StartPoint.y,2))a.segment=0;else{if(!Utils2.IsEqual(n[0].x,this.EndPoint.x,2)||!Utils2.IsEqual(n[0].y,this.EndPoint.y,2))continue;a.segment=t.length>2?t.length-2:0}}let h=a.segment+1;if(h-1>=t.length)continue;let c=[new Point$1(t[h-1].x,t[h-1].y),new Point$1(t[h].x,t[h].y)],u=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(c[0],c[1]);Utils3.RotatePointsAboutCenter(s,-u,c);let d=e&&e.movingShapeID===o.BlockID?Utils2.PolyFromRect(e.movingShapeBBox):o.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),p=e&&e.movingShapeID===o.BlockID?u:-o.RotationAngle/(180/NvConstant.Geometry.PI),g=Utils2.GetPolyRect({},d),f=Utils1.DeepCopy(n[0]);Utils3.RotatePointsAboutCenter(g,p,[f]),Utils2.OffsetRect(g,n[0].x-f.x,n[0].y-f.y),d=Utils2.PolyFromRect(g),p&&Utils3.RotatePointsAboutPoint(n[0],-p,d);for(let t=0;t<d.length;t++)d[t].x-=this.Frame.x,d[t].y-=this.Frame.y;Utils3.RotatePointsAboutCenter(s,-u,d);let b=Utils2.GetPolyRect({},d),v=new Point$1(b.x,c[0].y),m=new Point$1(b.x+b.width,c[0].y);l=v.x,Utils3.RotatePointsAboutCenter(s,u,[v,m]),i.push({id:o.BlockID,segment:h,segmentSortValue:l,start:{x:v.x,y:v.y},end:{x:m.x,y:m.y}})}return i.sort(((t,e)=>t.segment!==e.segment?t.segment<e.segment?-1:1:t.segmentSortValue<e.segmentSortValue?-1:1)),LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDescList output:",i),i}GetHookedObjectDimensionInfo(t){LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDimensionInfo input:",t);let e=-1,i=new Point$1(0,0);const n=[],s=this.GetDimensionPoints(),a=this.GetHookedObjectDescList(s,t),o=a.length;for(let r=0;r<o;r++){const t=a[r];t.segment>e?(i=s[(e=t.segment)-1],n.push({hookedObjID:t.id,side:0,segment:e,start:{x:i.x,y:i.y},end:{x:t.start.x,y:t.start.y}})):n.length>0&&(n[n.length-1].end=t.start),n.push({hookedObjID:t.id,side:1,segment:e,start:{x:t.end.x,y:t.end.y},end:{x:s[e].x,y:s[e].y}}),i=t.end}return LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDimensionInfo output:",n),n}DimensionLineDeflectionAdjust(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: DimensionLineDeflectionAdjust input:",{element:t,segmentIndex:e,knobPoint:i,ccAngleRadians:n,adjustForKnob:s});let a=this.GetDimensionPoints(),o=this.GetDimensionDeflectionValue(e),r=new Point$1(i.x+this.Frame.x-s,i.y+this.Frame.y-s),l=[a[e-1],a[e],r,new Point$1(t.x,t.y)];Utils3.RotatePointsAboutCenter(this.Frame,-n,l),this.IsReverseWinding()&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,l);let h=l[3].y-l[2].y;return this.polylist&&this.polylist.segs[e].dimTextAltPositioning?o-=h:o+=h,LogUtil.Debug("= S.BaseDrawObject: DimensionLineDeflectionAdjust output:",o),o}GetDimensionLineDeflectionKnobUserData(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflectionKnobUserData input:",{element:t,segmentIndex:e,dimensionPoints:i,knobRadius:n,knobOffset:s});let a,o,r,l,h=null,c=!1;const u=[],d=t.GetElementListWithId(OptConstant.SVGElementClass.DimText);for(let m=0;m<d.length;m++)if(d[m].userData.segment===e&&void 0===d[m].userData.side){h=d[m];break}if(!h)return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflectionKnobUserData output: null"),null;a=h.CalcBBox();const p={x:a.x+a.width+25,y:a.y+a.height/2};if(o=360-h.GetRotation(),360===o&&(o=0),r=2*Math.PI*(o/360),Utils3.RotatePointsAboutPoint({x:a.x,y:a.y},r,[p]),u.push(new Point$1(i[e-1].x,i[e-1].y)),u.push(new Point$1(i[e].x,i[e].y)),u[0].x,u[1].x,u[0].y,u[1].y,l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[e-1],i[e]),this instanceof Instance.Shape.Polygon&&this.polylist){const t=Utils1.DeepCopy(this),e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t);e&&e.IsReverseWinding&&e.IsReverseWinding()&&(c=!0)}this.IsReverseWinding&&this.IsReverseWinding()&&(c=!0),c&&(l+=Math.PI,l%=2*Math.PI),u.push(new Point$1(p.x,p.y));const g=new Rectangle(0,0,0,0);Utils2.GetPolyRect(g,u),Utils3.RotatePointsAboutCenter(g,-l,u),u[2].y,u[0].y;const f=Math.max(u[0].x,u[1].x),b=Math.min(u[0].x,u[1].x);(u[2].x>f||u[2].x<b)&&(u[2].x=Math.abs(l-r)<2?f:b,Utils3.RotatePointsAboutCenter(g,l,u),p.x=u[2].x,p.y=u[2].y),p.x+=n-s,p.y+=n-s;const v={segmentIndex:e,knobPoint:p,ccAngleRadians:l,originalDeflection:this.GetDimensionDeflectionValue(e),adjustForKnob:n-s};return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflectionKnobUserData output:",v),v}GetDimensionDeflectionValue(t){LogUtil.Debug("= S.BaseDrawObject: GetDimensionDeflectionValue input:",t);let e=0;return e=1===t?this.dimensionDeflectionH?this.dimensionDeflectionH:0:this.dimensionDeflectionV?this.dimensionDeflectionV:0,LogUtil.Debug("= S.BaseDrawObject: GetDimensionDeflectionValue output:",e),e}GetDimensionLineDeflection(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflection input:",{knobPoint:t,x:e,y:i,deflectionData:n});let s=[],a=new Point$1(0,0),o=this.GetDimensionPoints();for(let h=0;h<o.length;h++)o[h].x+=this.inside.x,o[h].y+=this.inside.y;a.x=n.knobPoint.x+this.Frame.x-n.adjustForKnob,a.y=n.knobPoint.y+this.Frame.y-n.adjustForKnob,s.push(o[n.segmentIndex-1]),s.push(o[n.segmentIndex]),s.push(new Point$1(a.x,a.y)),s.push(new Point$1(e,i)),Utils3.RotatePointsAboutCenter(this.Frame,-n.ccAngleRadians,s),this.IsReverseWinding()&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,s);let r=s[3].y-s[2].y,l=this.polylist&&this.polylist.segs[n.segmentIndex].dimTextAltPositioning?n.originalDeflection-r:n.originalDeflection+r;return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflection output:",l),l}UpdateDimensionLines(t,e){if(LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionLines input:",{container:t,triggerType:e}),T3Gv.opt.bBuildingSymbols)return t;if(null!=t){this.RemoveDimensionLines(t);(this.Dimensions&NvConstant.DimensionFlags.Area||this.Dimensions&NvConstant.DimensionFlags.RectWithAndHeight)&&this.UpdateAreaDimensionLines(t);return(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select||e)&&this.UpdateEdgeDimensionLines(t,e),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionLines output:",t),t}return LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionLines output: null"),null}UpdateCoordinateLines(t,e){if(LogUtil.Debug("= S.BaseDrawObject: UpdateCoordinateLines input:",{container:t,triggerType:e}),T3Gv.opt.bBuildingSymbols)return t;if(null!=t){this.RemoveCoordinateLines(t);return(this.Dimensions&NvConstant.DimensionFlags.Area||this.Dimensions&NvConstant.DimensionFlags.RectWithAndHeight)&&this.UpdateAreaDimensionLines(t),this.Dimensions&NvConstant.DimensionFlags.Always||(this.Dimensions,NvConstant.DimensionFlags.Select),LogUtil.Debug("= S.BaseDrawObject: UpdateCoordinateLines output:",t),t}return LogUtil.Debug("= S.BaseDrawObject: UpdateCoordinateLines output: null"),null}UpdateHookedObjectDimensionLines(t,e,i){if(LogUtil.Debug("= S.BaseDrawObject: UpdateHookedObjectDimensionLines input:",{container:t,pathCreator:e,dimensionInfo:i}),this.Dimensions&NvConstant.DimensionFlags.AllSeg){const n=this.GetHookedObjectDimensionInfo(i);for(let i=0;i<n.length;i++)if(!Utils2.EqualPt(n[i].start,n[i].end)){const s=Utils1.CalcAngleFromPoints(n[i].start,n[i].end),a=this.GetDimensionTextForPoints(n[i].start,n[i].end);this.CreateDimension(t,e,!1,s,a,n[i].start,n[i].end,n[i].segment,!0,!0,n[i])}}LogUtil.Debug("= S.BaseDrawObject: UpdateHookedObjectDimensionLines output: completed")}UpdateEdgeDimensionLines(t,e){let i,n,s,a,o;LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeDimensionLines input:",{container:t,triggerType:e});let r=0,l=0,h="";if(!t)return void LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeDimensionLines output: container is null");i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Path),t.AddElement(i),n=i.PathCreator(),i.SetID(OptConstant.SVGElementClass.DimLine),i.SetFillColor("none"),i.SetStrokeColor(OptConstant.Common.DimLineColor),i.SetStrokeOpacity(1),i.SetStrokeWidth(1),n.BeginPath();const c=this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select;if(s=this.GetDimensionPoints(),a=s.length,o=this instanceof Instance.Shape.Polygon,c)for(l=1;l<a;l++)Utils2.EqualPt(s[l-1],s[l])||(r=Utils1.CalcAngleFromPoints(s[l-1],s[l]),h=this.GetDimensionFloatingPointValue(l)||this.GetDimensionTextForPoints(s[l-1],s[l]),this.CreateDimension(t,n,!1,r,h,s[l-1],s[l],l,!1,o));this.UpdateSecondaryDimensions(t,n,e),this.ShowOrHideDimensions(!1,e),n.Apply(),LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeDimensionLines output: completed")}UpdateEdgeCoordinateLines(t,e){let i,n,s;LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeCoordinateLines input:",{shapeContainer:t,triggerType:e}),t?(i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Path),t.AddElement(i),n=i.PathCreator(),i.SetID(OptConstant.SVGElementClass.CoordinateLine),i.SetFillColor("none"),i.SetStrokeColor(OptConstant.Common.CoordinateLineColor),i.SetStrokeOpacity(1),i.SetStrokeWidth(1),i.SetStrokePattern("5,5"),n.BeginPath(),s=this.GetCoordinateLinePoints(),LogUtil.Debug("= S.BaseDrawObject: coordinateLinePoints:",s),s.length,Instance.Shape.Polygon,this.UpdateSecondaryDimensions(t,n,e),this.ShowOrHideDimensions(!1,e),n.Apply(),LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeCoordinateLines output: completed")):LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeCoordinateLines output: shapeContainer is null")}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateSecondaryDimensions input:",{container:t,pathCreator:e,triggerType:i}),LogUtil.Debug("= S.BaseDrawObject: UpdateSecondaryDimensions output: completed")}HideOrShowSelectOnlyDimensions(t,e){let i;LogUtil.Debug("= S.BaseDrawObject: HideOrShowSelectOnlyDimensions input:",{show:t,context:e});let n=0,s=null,a=null,o=!1,r=!1;const l=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(null!==l){const h=[OptConstant.SVGElementClass.DimLine,OptConstant.SVGElementClass.DimText,OptConstant.SVGElementClass.AreaDimLine,OptConstant.SVGElementClass.DimTextNoEdit];for(n=l.ElementCount()-1;n>=1;n--)s=l.GetElementByIndex(n),i=s.GetID(),h.indexOf(i)>=0&&(o=!1,e&&(a=s.GetUserData())&&a.hookedObjectInfo&&a.hookedObjectInfo.hookedObjID===e.movingShapeID&&(o=!0),r=t,r=!!o||!!(this.Dimensions&NvConstant.DimensionFlags.Always)||!!(this.Dimensions&NvConstant.DimensionFlags.Select)&&t,s.SetOpacity(r?1:0))}LogUtil.Debug("= S.BaseDrawObject: HideOrShowSelectOnlyDimensions output: completed")}ShowOrHideDimensions(t,e){LogUtil.Debug("= S.BaseDrawObject: ShowOrHideDimensions input:",{show:t,context:e});let i=null;this.HideOrShowSelectOnlyDimensions(t,e),this.hooks.length>0&&e&&e.movingShapeID===this.BlockID&&(i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),(!i||i.objecttype!==NvConstant.FNObjectTypes.FlWall||i.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)&&i.HideOrShowSelectOnlyDimensions(t,e)),LogUtil.Debug("= S.BaseDrawObject: ShowOrHideDimensions output: completed")}GetPointsForAreaDimension(){LogUtil.Debug("= S.BaseDrawObject: GetPointsForAreaDimension input: none");const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);return LogUtil.Debug("= S.BaseDrawObject: GetPointsForAreaDimension output:",t),t}UpdateAreaDimensionLines(t){LogUtil.Debug("= S.BaseDrawObject: UpdateAreaDimensionLines input:",t);const e=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Path);if(null!=t){t.AddElement(e);const i=e.PathCreator();e.SetID(OptConstant.SVGElementClass.AreaDimLine),e.SetFillColor("none"),e.SetStrokeColor(OptConstant.Common.DimLineColor),e.SetStrokeOpacity(1),e.SetStrokeWidth(1),i.BeginPath();const n=this.GetPointsForAreaDimension(),s=this.GetAreaDimension(n);s&&""!==s&&this.CreateDimension(t,i,!0,0,s),e.SetFillColor("#0000FF"),e.SetStrokeWidth(0),i.Apply()}LogUtil.Debug("= S.BaseDrawObject: UpdateAreaDimensionLines output: completed")}GetDimensionFloatingPointValue(t){LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue input:",t);let e=0;const i=this.rflags&NvConstant.FloatingPointDim.Width,n=this.rflags&NvConstant.FloatingPointDim.Height;if(i||n){if(1===t&&i){e=this.GetDimensionLengthFromValue(this.rwd);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue output:",t),t}if(2===t&&n){e=this.GetDimensionLengthFromValue(this.rht);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue output:",t),t}}return LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue output: null"),null}IsTextFrameOverlap(t,e){LogUtil.Debug("= S.BaseDrawObject: IsTextFrameOverlap input:",{textFrame:t,angle:e});return LogUtil.Debug("= S.BaseDrawObject: IsTextFrameOverlap output:",false),false}GetExteriorDimensionMeasurementLineThicknessAdjustment(t){LogUtil.Debug("= S.BaseDrawObject: GetExteriorDimensionMeasurementLineThicknessAdjustment input:",t);return LogUtil.Debug("= S.BaseDrawObject: GetExteriorDimensionMeasurementLineThicknessAdjustment output:",0),0}CanUseStandOffDimensionLines(){LogUtil.Debug("= S.BaseDrawObject: CanUseStandOffDimensionLines input: none");return LogUtil.Debug("= S.BaseDrawObject: CanUseStandOffDimensionLines output:",true),true}GetDimensionLengthFromString(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromString input:",{input:t,someParam:e});let i=this.GetDimensionValueFromString(t,e),n=i<0?i:this.GetDimensionLengthFromValue(i);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromString output:",n),n}GetDimensionValueFromString(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString input:",{input:t,someParam:e});let i=0;if(0===(t=t.trim()).length)return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1;if(!t.match(/^[0-9. \/\'\"]+$/))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1;if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet&&!T3Gv.docUtil.rulerConfig.showpixels){if(i=this.ConvertToFeet(t),i<0||isNaN(i))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1}else{if(!this.NumberIsFloat(t))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1;i=parseFloat(t)}const n=isNaN(i)?-1:i;return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",n),n}GetDimensionLengthFromValue(t){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromValue input:",t);let e=0;return e=T3Gv.docUtil.rulerConfig.showpixels?t:this.UnitsToCoord(t,0),(isNaN(e)||e>4e5)&&(e=-1),LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromValue output:",e),e}AdjustDimensionLength(t){LogUtil.Debug("= S.BaseDrawObject: AdjustDimensionLength input:",t);const e=t;return LogUtil.Debug("= S.BaseDrawObject: AdjustDimensionLength output:",e),e}GetDimensionAreaTextInfo(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: GetDimensionAreaTextInfo input:",{textShape:t,textFramePoints:e,leftArrowPoints:i,rightArrowPoints:n,topArrowPoints:s,bottomArrowPoints:a});const o=t.GetTextMinDimensions(),r={width:o.width,height:o.height,x:this.Frame.width/2-o.width/2,y:this.Frame.height/2-o.height/2};this.Frame2Poly(r,e);const l=.5*r.height,h=.5*l,c={x:0,y:0};c.x=r.x-h,c.y=r.y+(r.height-l)/2,i.push(new Point$1(c.x,c.y)),c.y+=l,i.push(new Point$1(c.x,c.y)),c.x-=l,c.y=r.y+r.height/2,i.push(new Point$1(c.x,c.y)),i.push(new Point$1(i[0].x,i[0].y)),c.x=r.x+r.width+h,c.y=r.y+(r.height-l)/2,n.push(new Point$1(c.x,c.y)),c.y+=l,n.push(new Point$1(c.x,c.y)),c.x+=l,c.y=r.y+r.height/2,n.push(new Point$1(c.x,c.y)),n.push(new Point$1(n[0].x,n[0].y)),c.x=r.x+r.width/2-h/2,c.y=r.y-h,s.push(new Point$1(c.x,c.y)),c.x+=h,s.push(new Point$1(c.x,c.y)),c.x-=h/2,c.y-=h,s.push(new Point$1(c.x,c.y)),s.push(new Point$1(s[0].x,s[0].y)),c.x=r.x+r.width/2-h/2,c.y=r.y+r.height+h,a.push(new Point$1(c.x,c.y)),c.x+=h,a.push(new Point$1(c.x,c.y)),c.x-=h/2,c.y+=h,a.push(new Point$1(c.x,c.y)),a.push(new Point$1(a[0].x,a[0].y)),LogUtil.Debug("= S.BaseDrawObject: GetDimensionAreaTextInfo output:",{textFramePoints:e,leftArrowPoints:i,rightArrowPoints:n,topArrowPoints:s,bottomArrowPoints:a})}GetFrameIntersects(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetFrameIntersects input:",{frame:t,point:e,tolerance:i});return LogUtil.Debug("= S.BaseDrawObject: GetFrameIntersects output:",false),false}AdjustAutoInsertShape(t){LogUtil.Debug("= S.BaseDrawObject: AdjustAutoInsertShape input:",t);return LogUtil.Debug("= S.BaseDrawObject: AdjustAutoInsertShape output:",false),false}GetDimensionTextInfo1(t,e,i,n,s,a,o,r,l){let h,c,u;LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextInfo1 input:",{startPoint:t,endPoint:e,angle:i,textShape:n,segmentIndex:s,textFramePoints:a,leftArrowPoints:o,rightArrowPoints:r,isStandoff:l});const d=[];let p,g,f={x:0,y:0},b={x:0,y:0,width:0,height:0},v=0,m=!1,y=0,S=!1;u=n.GetTextMinDimensions(),b.height=u.height,b.width=u.width,d.push(new Point$1(t.x,t.y)),d.push(new Point$1(e.x,e.y)),h=360-i,c=2*Math.PI*(h/360),Utils3.RotatePointsAboutCenter(this.Frame,-c,d),d[0].x<d[1].x?(p=Utils1.DeepCopy(d[0]),g=Utils1.DeepCopy(d[1])):(p=Utils1.DeepCopy(d[1]),g=Utils1.DeepCopy(d[0])),b.x=p.x+(g.x-p.x)/2,b.y=p.y+(g.y-p.y)/2,b.x-=b.width/2,b.y-=b.height/2,b.y-=b.height/2;if((this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(b.y-=this.StyleRecord.Line.Thickness),S=0!=(this.Dimensions&NvConstant.DimensionFlags.Standoff)&&this.CanUseStandOffDimensionLines(),!l&&!(this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)&&this instanceof Instance.Shape.BaseLine&&this.ShortRef!=OptConstant.LineTypes.LsMeasuringTape&&this.objecttype===NvConstant.FNObjectTypes.FlWall){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);t&&OptCMUtil.FindLink(t,this.BlockID,!0)>=0&&(S=!0)}l&&(S=!1);const w=S?OptConstant.Common.DimDefaultStandoff:OptConstant.Common.DimDefaultNonStandoff;if(b.y-=w,v=OptConstant.Common.DimDefaultTextGap,(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(v+=this.StyleRecord.Line.Thickness),this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){const t=Math.floor((c-.01)/(Math.PI/2));m=1===t||2===t}else if(this.polylist&&!this.polylist.closed&&l){const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),e=[t[s-1],t[s]];Utils3.RotatePointsAboutCenter(this.Frame,-c,e),e.push({x:b.x+b.width/2,y:b.y+b.height/2}),e[2].x=e[0].x+(e[1].x-e[0].x)/2,Utils3.RotatePointsAboutCenter(this.Frame,c,e),Utils2.IsPointInPoly(t,e[2])&&(m=!0)}else this.IsTextFrameOverlap(b,i)&&(m=!0);m&&(b.y+=w,b.y+=b.height,this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(b.y+=2*this.StyleRecord.Line.Thickness),b.y+=w);let x=this.Dimensions&NvConstant.DimensionFlags.Standoff;if(x&&!this.CanUseStandOffDimensionLines()&&(x=!1),l&&(x=!1),x&&(y=(this instanceof Instance.Shape.PolyLine||this instanceof Instance.Shape.Polygon)&&this.polylist&&this.polylist.segs&&this.polylist.segs.length>s?this.polylist.segs[s].dimDeflection:this instanceof Instance.Shape.BaseLine?this.dimensionDeflectionH?this.dimensionDeflectionH:0:Math.abs(i%180)<5?this.dimensionDeflectionH:this.dimensionDeflectionV||0,b.y=m?b.y+y:b.y-y,this.polylist&&this.polylist.segs&&this.polylist.segs.length>s&&(this.polylist.segs[s].dimTextAltPositioning=m)),this.Frame2Poly(b,a),this.Dimensions&x)f.x=p.x,f.y=p.y>b.y?p.y-v:p.y+v,o.push(new Point$1(f.x,f.y)),f.y=b.y+b.height/2,o.push(new Point$1(f.x,f.y)),f.x=b.x-OptConstant.Common.DimDefaultTextGap,o.push(new Point$1(f.x,f.y)),f.x=b.x+b.width+OptConstant.Common.DimDefaultTextGap,r.push(new Point$1(f.x,f.y)),f.x=g.x,r.push(new Point$1(f.x,f.y)),f.y=g.y>b.y?g.y-v:g.y+v,r.push(new Point$1(f.x,f.y));else{const t=.5*b.height,e=.5*t;f.x=b.x-e,f.y=b.y+(b.height-t)/2,o.push(new Point$1(f.x,f.y)),f.y+=t,o.push(new Point$1(f.x,f.y)),f.x-=t,f.y=b.y+b.height/2,o.push(new Point$1(f.x,f.y)),o.push(new Point$1(o[0].x,o[0].y)),f.x=b.x+b.width+e,f.y=b.y+(b.height-t)/2,r.push(new Point$1(f.x,f.y)),f.y+=t,r.push(new Point$1(f.x,f.y)),f.x+=t,f.y=b.y+b.height/2,r.push(new Point$1(f.x,f.y)),r.push(new Point$1(r[0].x,r[0].y))}Utils3.RotatePointsAboutCenter(this.Frame,c,a),Utils3.RotatePointsAboutCenter(this.Frame,c,o),Utils3.RotatePointsAboutCenter(this.Frame,c,r),LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextInfo1 output:",{textDim:b,textFramePoints:a,leftArrowPoints:o,rightArrowPoints:r})}GetDimensionTextInfo(t,e,i,n,s,a,o,r,l){var h,c,u,d=[],p={x:0,y:0},g={x:0,y:0},f={x:0,y:0},b={x:0,y:0,width:0,height:0},v=0,m=!1,y=0,S=!1;u=n.GetTextMinDimensions(),b.height=u.height,b.width=u.width,d.push(new Point$1(t.x,t.y)),d.push(new Point$1(e.x,e.y)),h=360-i,c=2*Math.PI*(h/360),Utils3.RotatePointsAboutCenter(this.Frame,-c,d),d[0].x<d[1].x?(p=Utils1.DeepCopy(d[0]),g=Utils1.DeepCopy(d[1])):(p=Utils1.DeepCopy(d[1]),g=Utils1.DeepCopy(d[0])),b.x=p.x+(g.x-p.x)/2,b.y=p.y+(g.y-p.y)/2,b.x-=b.width/2,b.y-=b.height/2,b.y-=b.height/2;(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(b.y-=this.StyleRecord.Line.Thickness);S=0!=(this.Dimensions&NvConstant.DimensionFlags.Standoff)&&this.CanUseStandOffDimensionLines();const w=this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions;if(!l&&!w&&this instanceof Instance.Shape.BaseLine&&this.ShortRef!=OptConstant.LineTypes.LsMeasuringTape&&this.objecttype===NvConstant.FNObjectTypes.FlWall){var x=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(x){OptCMUtil.FindLink(x,this.BlockID,!0)>=0&&(S=!0)}}l&&(S=!1);const C=S?OptConstant.Common.DimDefaultStandoff:OptConstant.Common.DimDefaultNonStandoff;if(b.y-=C,v=OptConstant.Common.DimDefaultTextGap,this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(v+=this.StyleRecord.Line.Thickness),this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){var D=Math.floor((c-.01)/(Math.PI/2));m=1==D||2==D}else if(this.polylist&&!this.polylist.closed&&l){var T=[(d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null))[s-1],d[s]];Utils3.RotatePointsAboutCenter(this.Frame,-c,T),T.push({x:b.x+b.width/2,y:b.y+b.height/2}),T[2].x=T[0].x+(T[1].x-T[0].x)/2,Utils3.RotatePointsAboutCenter(this.Frame,c,T),Utils2.IsPointInPoly(d,T[2])&&(m=!0)}else this.IsTextFrameOverlap(b,i)&&(m=!0);m&&(b.y+=C,b.y+=b.height,this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(b.y+=2*this.StyleRecord.Line.Thickness),b.y+=C);let k=!1;var $=this.Dimensions&NvConstant.DimensionFlags.Standoff;if($&&!this.CanUseStandOffDimensionLines()&&(k=!1),l&&(k=!1),k&&(y=(this instanceof Instance.Shape.PolyLine||this instanceof Instance.Shape.Polygon)&&this.polylist&&this.polylist.segs&&this.polylist.segs.length>s?this.polylist.segs[s].dimDeflection:this instanceof Instance.Shape.BaseLine?this.dimensionDeflectionH?this.dimensionDeflectionH:0:Math.abs(i%180)<5?this.dimensionDeflectionH:this.dimensionDeflectionV||0,m?b.y+=y:b.y-=y,this.polylist&&this.polylist.segs&&this.polylist.segs.length>s&&(this.polylist.segs[s].dimTextAltPositioning=m)),this.Frame2Poly(b,a),this.Dimensions&$)f.x=p.x,f.y=p.y>b.y?p.y-v:p.y+v,o.push(new Point$1(f.x,f.y)),f.y=b.y+b.height/2,o.push(new Point$1(f.x,f.y)),f.x=b.x-OptConstant.Common.DimDefaultTextGap,o.push(new Point$1(f.x,f.y)),f.x=b.x+b.width+OptConstant.Common.DimDefaultTextGap,r.push(new Point$1(f.x,f.y)),f.x=g.x,r.push(new Point$1(f.x,f.y)),f.y=g.y>b.y?g.y-v:g.y+v,r.push(new Point$1(f.x,f.y));else{var O=.5*b.height,P=.5*O;f.x=b.x-P,f.y=b.y+(b.height-O)/2,o.push(new Point$1(f.x,f.y)),f.y+=O,o.push(new Point$1(f.x,f.y)),f.x-=O,f.y=b.y+b.height/2,o.push(new Point$1(f.x,f.y)),o.push(new Point$1(o[0].x,o[0].y)),f.x=b.x+b.width+P,f.y=b.y+(b.height-O)/2,r.push(new Point$1(f.x,f.y)),f.y+=O,r.push(new Point$1(f.x,f.y)),f.x+=O,f.y=b.y+b.height/2,r.push(new Point$1(f.x,f.y)),r.push(new Point$1(r[0].x,r[0].y))}Utils3.RotatePointsAboutCenter(this.Frame,c,a),Utils3.RotatePointsAboutCenter(this.Frame,c,o),Utils3.RotatePointsAboutCenter(this.Frame,c,r)}GetCoordinateTextInfo(t,e,i,n,s,a,o,r,l){var h,c,u,d=[],p={x:0,y:0},g={x:0,y:0},f={x:0,y:0},b={x:0,y:0,width:0,height:0},v=0,m=!1,y=0,S=!1;u=n.GetTextMinDimensions(),b.height=u.height,b.width=u.width,d.push(new Point$1(t.x,t.y)),d.push(new Point$1(e.x,e.y)),h=360-i,c=2*Math.PI*(h/360),Utils3.RotatePointsAboutCenter(this.Frame,-c,d),d[0].x<d[1].x?(p=Utils1.DeepCopy(d[0]),g=Utils1.DeepCopy(d[1])):(p=Utils1.DeepCopy(d[1]),g=Utils1.DeepCopy(d[0])),b.x=p.x+(g.x-p.x)/2,b.y=p.y+(g.y-p.y)/2,b.x-=b.width/2,b.y-=b.height/2,b.y-=b.height/2;(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(b.y-=this.StyleRecord.Line.Thickness);S=0!=(this.Dimensions&NvConstant.DimensionFlags.Standoff)&&this.CanUseStandOffDimensionLines();const w=this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions;if(!l&&!w&&this instanceof Instance.Shape.BaseLine&&this.ShortRef!=OptConstant.LineTypes.LsMeasuringTape&&this.objecttype===NvConstant.FNObjectTypes.FlWall){var x=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(x){OptCMUtil.FindLink(x,this.BlockID,!0)>=0&&(S=!0)}}l&&(S=!1);const C=S?OptConstant.Common.CoordinateLineDefaultStandoff:OptConstant.Common.CoordinateLineDefaultNonStandoff;b.y-=C,v=OptConstant.Common.CoordinateLineDefaultTextGap;(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(v+=this.StyleRecord.Line.Thickness);if(this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){var D=Math.floor((c-.01)/(Math.PI/2));m=1==D||2==D}else if(this.polylist&&!this.polylist.closed&&l){var T=[(d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null))[s-1],d[s]];Utils3.RotatePointsAboutCenter(this.Frame,-c,T),T.push({x:b.x+b.width/2,y:b.y+b.height/2}),T[2].x=T[0].x+(T[1].x-T[0].x)/2,Utils3.RotatePointsAboutCenter(this.Frame,c,T),Utils2.IsPointInPoly(d,T[2])&&(m=!0)}else this.IsTextFrameOverlap(b,i)&&(m=!0);m&&(b.y+=C,b.y+=b.height,this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(b.y+=2*this.StyleRecord.Line.Thickness),b.y+=C);let k=!1;var $=this.Dimensions&NvConstant.DimensionFlags.Standoff;if($&&!this.CanUseStandOffDimensionLines()&&(k=!1),l&&(k=!1),k&&(y=(this instanceof Instance.Shape.PolyLine||this instanceof Instance.Shape.Polygon)&&this.polylist&&this.polylist.segs&&this.polylist.segs.length>s?this.polylist.segs[s].dimDeflection:this instanceof Instance.Shape.BaseLine?this.dimensionDeflectionH?this.dimensionDeflectionH:0:Math.abs(i%180)<5?this.dimensionDeflectionH:this.dimensionDeflectionV||0,m?b.y+=y:b.y-=y,this.polylist&&this.polylist.segs&&this.polylist.segs.length>s&&(this.polylist.segs[s].dimTextAltPositioning=m)),this.Frame2Poly(b,a),this.Dimensions&$)f.x=p.x,f.y=p.y>b.y?p.y-v:p.y+v,o.push(new Point$1(f.x,f.y)),f.x=b.x-OptConstant.Common.CoordinateLineDefaultTextGap,o.push(new Point$1(f.x,f.y)),f.x=b.x+b.width+OptConstant.Common.CoordinateLineDefaultTextGap,r.push(new Point$1(f.x,f.y)),f.x=g.x,f.y=g.y>b.y?g.y-v:g.y+v,r.push(new Point$1(f.x,f.y));else{var O=.5*b.height,P=.5*O;f.x=b.x-P,f.y=b.y+(b.height-O)/2,o.push(new Point$1(f.x,f.y)),f.y+=O,o.push(new Point$1(f.x,f.y)),f.x-=O,f.y=b.y+b.height/2,o.push(new Point$1(f.x,f.y)),o.push(new Point$1(o[0].x,o[0].y)),f.x=b.x+b.width+P,f.y=b.y+(b.height-O)/2,r.push(new Point$1(f.x,f.y)),f.y+=O,r.push(new Point$1(f.x,f.y)),f.x+=O,f.y=b.y+b.height/2,r.push(new Point$1(f.x,f.y)),r.push(new Point$1(r[0].x,r[0].y))}Utils3.RotatePointsAboutCenter(this.Frame,c,a),Utils3.RotatePointsAboutCenter(this.Frame,c,o),Utils3.RotatePointsAboutCenter(this.Frame,c,r)}CreateDimensionLineSegment(t,e,i,n){LogUtil.Debug("=== wall ========================================================"),LogUtil.Debug("=== wall CreateDimensionLineSegment path,points,bounds",e,i,n);for(let s=0;s<i.length;s++)0===s?t.MoveTo(i[s].x,i[s].y):t.LineTo(i[s].x,i[s].y),(i[s].x<n.left||-1===n.left)&&(n.left=i[s].x),i[s].x>n.right&&(n.right=i[s].x),(i[s].y<n.top||-1===n.top)&&(n.top=i[s].y),i[s].y>n.bottom&&(n.bottom=i[s].y)}CreateCoordinateLineSegment(t,e,i,n){LogUtil.Debug("=== wall CreateCoordinateLineSegment points/bounds",i,n);for(let s=0;s<i.length;s++)0===s?t.MoveTo(i[s].x,i[s].y):t.LineTo(i[s].x,i[s].y),(i[s].x<n.left||-1===n.left)&&(n.left=i[s].x),i[s].x>n.right&&(n.right=i[s].x),(i[s].y<n.top||-1===n.top)&&(n.top=i[s].y),i[s].y>n.bottom&&(n.bottom=i[s].y)}CreateDimensionLineArrowHead(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: CreateDimensionLineArrowHead - Input:",{container:t,polygonCreator:e,arrowPoints:i,bounds:n,userData:s});const a=Utils1.DeepCopy(i),o=a.length;for(let h=0;h<o;h++)n.left=Math.min(n.left,a[h].x),n.right=Math.max(n.right,a[h].x),n.top=Math.min(n.top,a[h].y),n.bottom=Math.max(n.bottom,a[h].y);const r=new Rectangle(0,0,0,0);Utils2.GetPolyRect(r,a);for(let h=0;h<o;h++)a[h].x-=r.x,a[h].y-=r.y;const l=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polygon);l.SetPoints(i),l.SetEventBehavior(OptConstant.EventBehavior.All),l.SetID(OptConstant.SVGElementClass.DimLine),l.SetPos(0,0),l.SetSize(r.width,r.height),l.SetFillColor("black"),Utils2.HasFlag(this.Dimensions,NvConstant.DimensionFlags.Select)&&l.ExcludeFromExport(!0),s&&l.SetUserData(s),t.AddElement(l),LogUtil.Debug("= S.BaseDrawObject: CreateDimensionLineArrowHead - Output: Polygon shape created",l)}ConvertToNative(t,e){LogUtil.Debug("= S.BaseDrawObject: ConvertToNative - Input:",{inputData:t,conversionOptions:e});return LogUtil.Debug("= S.BaseDrawObject: ConvertToNative - Output:",null),null}ContainsText(){LogUtil.Debug("= S.BaseDrawObject: ContainsText - Input: none");const t=this.DataID>=0;return LogUtil.Debug("= S.BaseDrawObject: ContainsText - Output:",t),t}GetToUnits(){LogUtil.Debug("= S.BaseDrawObject: GetToUnits - Input: none");const t=T3Gv.docUtil.rulerConfig.major;let e=T3Gv.docUtil.rulerConfig.majorScale/t;return T3Gv.docUtil.rulerConfig.useInches||(e*=T3Gv.docUtil.rulerConfig.metricConv),LogUtil.Debug("= S.BaseDrawObject: GetToUnits - Output:",e),e}GetLengthInUnits(t,e=!1){LogUtil.Debug("= S.BaseDrawObject: GetLengthInUnits input:",{value:t,round:e});let i=t*this.GetToUnits();if(!e){const t=Math.pow(10,T3Gv.docUtil.rulerConfig.dp);i=Math.round(i*t)/t}return LogUtil.Debug("= S.BaseDrawObject: GetLengthInUnits output:",i),i}GetFractionStringGranularity(t){LogUtil.Debug("= S.BaseDrawObject: GetFractionStringGranularity input:",{input:t});const e=T3Gv.docUtil.rulerConfig;let i;return i=e.denom>=1?1/e.denom:e.majorScale<=1?1/16:e.majorScale<=2?1/8:e.majorScale<=4?1/4:e.majorScale<=8?.5:1,LogUtil.Debug("= S.BaseDrawObject: GetFractionStringGranularity output:",i),i}NumberIsFloat(t){LogUtil.Debug("= S.BaseDrawObject: NumberIsFloat input:",t);const e="9".charCodeAt(0),i="0".charCodeAt(0),n=".".charCodeAt(0);for(let s=0;s<t.length;s++){const a=t.charCodeAt(s);if(!(a>=i&&a<=e||a===n))return LogUtil.Debug("= S.BaseDrawObject: NumberIsFloat output:",!1),!1}return LogUtil.Debug("= S.BaseDrawObject: NumberIsFloat output:",!0),!0}ParseInchesString(t){LogUtil.Debug("= S.BaseDrawObject: ParseInchesString input:",t);let e=0;const i=(t=t.trim()).indexOf(" ");if(i>=0){const n=t.substring(0,i),s=t.substring(i+1),a=parseFloat(n);e=isNaN(a)?0:a;const o=s.indexOf("/");if(o>=0){const t=s.substring(0,o),i=s.substring(o+1),n=parseFloat(t),a=parseFloat(i);isNaN(n)||isNaN(a)||0===a||(e+=n/a)}else{const t=parseFloat(s);isNaN(t)||(e+=t)}}else e=parseFloat(t);return LogUtil.Debug("= S.BaseDrawObject: ParseInchesString output:",e),e}ConvertToFeet(t){LogUtil.Debug("= S.BaseDrawObject: ConvertToFeet - Input:",t);let e=t.trim(),i=e.indexOf("'");i>=0&&i<e.length-1&&" "!==e.charAt(i+1)&&(e=e.substr(0,i+1)+" "+e.substr(i+1));const n=e.split(" ");let s="",a="",o="";n[n.length-1].indexOf("/")>=0?(s=n[n.length-1],n.length>=2&&n[n.length-2].endsWith("'")&&(o=n[n.length-2],a=""),n.length>=3&&(o=n[n.length-3])):2===n.length?(o=n[0],a=n[1]):n[0].endsWith('"')?a=n[0]:o=n[0],o.endsWith("'")&&(o=o.substring(0,o.length-1)),a.endsWith('"')&&(a=a.substring(0,a.length-1)),s.endsWith('"')&&(s=s.substring(0,s.length-1));let r=o.length>0?parseFloat(o):0,l=a.length>0?parseFloat(a):0;if(s.length>0){const t=s.split("/"),e=parseInt(t[0],10),i=parseInt(t[1],10);0!==e&&0!==i&&(l+=e/i)}return l>=12&&0===r?this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.ShowFeetAsInches,!0):r>0&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.ShowFeetAsInches,!1)),r+=l/12,LogUtil.Debug("= S.BaseDrawObject: ConvertToFeet - Output:",r),r}UnitsToCoord(t,e){LogUtil.Debug("= S.BaseDrawObject: UnitsToCoord - Input:",{value:t,offset:e}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i=this.GetToUnits(),n=(t+=e*T3Gv.docUtil.rulerConfig.majorScale)/i;return LogUtil.Debug("= S.BaseDrawObject: UnitsToCoord - Output:",n),n}ConvToUnits(t,e){LogUtil.Debug("= S.BaseDrawObject: ConvToUnits input:",{value:t,offset:e}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i=t*this.GetToUnits()-e*T3Gv.docUtil.rulerConfig.majorScale;return LogUtil.Debug("= S.BaseDrawObject: ConvToUnits output:",i),i}Frame2Poly(t,e){e.push(new Point$1(t.x,t.y)),e.push(new Point$1(t.x+t.width,t.y)),e.push(new Point$1(t.x+t.width,t.y+t.height)),e.push(new Point$1(t.x,t.y+t.height))}SetBackgroundImageURL(t){}CalcTextPosition(t){LogUtil.Debug("= S.BaseDrawObject: CalcTextPosition - Input:",t);const e={x:0,y:0};return LogUtil.Debug("= S.BaseDrawObject: CalcTextPosition - Output:",e),e}GetBlobBytes(){LogUtil.Debug("= S.BaseDrawObject: GetBlobBytes input: none");let t=null;return this.BlobBytesID>=0&&(t=ObjectUtil$1.GetObjectPtr(this.BlobBytesID,!1)),LogUtil.Debug("= S.BaseDrawObject: GetBlobBytes output:",t),t}GetEMFBlobBytes(){LogUtil.Debug("= S.BaseDrawObject: GetEMFBlobBytes input: EMFBlobBytesID =",this.EMFBlobBytesID);let t=null;return this.EMFBlobBytesID>=0&&(t=ObjectUtil$1.GetObjectPtr(this.EMFBlobBytesID,!1)),LogUtil.Debug("= S.BaseDrawObject: GetEMFBlobBytes output:",t),t}GetOleBlobBytes(){LogUtil.Debug("= S.BaseDrawObject: GetOleBlobBytes input:",{OleBlobBytesID:this.OleBlobBytesID});let t=null;return this.OleBlobBytesID>=0&&(t=ObjectUtil$1.GetObjectPtr(this.OleBlobBytesID,!1)),LogUtil.Debug("= S.BaseDrawObject: GetOleBlobBytes output:",t),t}GetGraph(t=!1){LogUtil.Debug("= S.BaseDrawObject: GetGraph input:",{preserve:t});let e=null;return this.GraphID>=0&&(e=ObjectUtil$1.GetObjectPtr(this.GraphID,t)),LogUtil.Debug("= S.BaseDrawObject: GetGraph output:",e),e}SetGraph(t){if(LogUtil.Debug("= S.BaseDrawObject: SetGraph input:",t),this.GraphID>=0)if(null==t){const t=T3Gv.stdObj.GetObject(this.GraphID);t&&t.Delete(),this.GraphID=-1}else{const e=T3Gv.stdObj.PreserveBlock(this.GraphID);e&&(e.Data=t)}else{const e=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.GraphObject,t);e&&(this.GraphID=e.ID)}LogUtil.Debug("= S.BaseDrawObject: SetGraph output:",this.GraphID)}Flip(t){LogUtil.Debug("= S.BaseDrawObject: Flip - Input:",{isHorizontalFlip:t}),LogUtil.Debug("= S.BaseDrawObject: Flip - Output: Completed")}NoFlip(){LogUtil.Debug("= S.BaseDrawObject: NoFlip - Input: {}");const t=this.hooks.length>0;return LogUtil.Debug("= S.BaseDrawObject: NoFlip - Output:",t),t}NoRotate(){LogUtil.Debug("= S.BaseDrawObject: NoRotate - Input: none");return LogUtil.Debug("= S.BaseDrawObject: NoRotate - Output:",false),false}NoGrow(){LogUtil.Debug("= S.BaseDrawObject: NoGrow input: none");const t=(this.colorfilter&StyleConstant.ColorFilters.NCResize)>0;return LogUtil.Debug("= S.BaseDrawObject: NoGrow output:",t),t}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: MaintainPoint - Input:",{currentPoint:t,targetPoint:e,adjustmentX:i,adjustmentY:n,shouldApply:s});return LogUtil.Debug("= S.BaseDrawObject: MaintainPoint - Output:",false),false}AllowTextEdit(){return LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Input:",{TextFlags:this.TextFlags,objecttype:this.objecttype,flags:this.flags,FromEditShapeOutline:this.FromEditShapeOutline}),(this.TextFlags&NvConstant.TextFlags.None)>0?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (None flag is set)"),!1):this.objecttype===NvConstant.FNObjectTypes.ShapeContainer&&0==(this.TextFlags&NvConstant.TextFlags.AttachA)&&0==(this.TextFlags&NvConstant.TextFlags.AttachB)?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (Shape container without attach flags)"),!1):this.flags&NvConstant.ObjFlags.Lock?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (Object is locked)"),!1):this.FromEditShapeOutline?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (FromEditShapeOutline is true)"),!1):(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: true (No table present)"),!0)}AllowDoubleClick(){return!1}ChangeBackgroundColor(t,e){LogUtil.Debug("= S.BaseDrawObject: ChangeBackgroundColor - Input:",{desiredColor:t,applyImmediately:e});return LogUtil.Debug("= S.BaseDrawObject: ChangeBackgroundColor - Output:",false),false}UseEdges(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: UseEdges - Input:",{edgeData:t,threshold:e,isActive:i,radius:n,importance:s,extraParam:a});return LogUtil.Debug("= S.BaseDrawObject: UseEdges - Output:",false),false}ApplyStyle(t,e){LogUtil.Debug("= S.BaseDrawObject: ApplyStyle - Input:",{style:t,applyTextStyle:e});let i=Utils1.DeepCopy(t),n=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);if(!(this.colorfilter&StyleConstant.ColorFilters.NCStyle)){let t={Color:i.Text.Paint.Color},s={color:i.Text.Paint.Color};e&&(this.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape?(i.Fill=Utils1.DeepCopy(this.StyleRecord.Fill),i.Text=Utils1.DeepCopy(n.Text),t={Color:n.Text.Paint.Color},s={color:n.Text.Paint.Color}):this.UseTextBlockColor()&&(i.Text=Utils1.DeepCopy(n.Text),t={Color:n.Text.Paint.Color},s={color:n.Text.Paint.Color})),this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent&&(i.Fill.Paint.FillType=NvConstant.FillTypes.Transparent,i.Fill.Hatch=0),0===this.StyleRecord.Line.Thickness&&(i.Line.Thickness=0),0===i.Line.LinePattern&&(i.Line.LinePattern=this.StyleRecord.Line.LinePattern),i.Fill.Paint.Opacity=this.StyleRecord.Fill.Paint.Opacity,i.Fill.Paint.EndOpacity=this.StyleRecord.Fill.Paint.EndOpacity,i.Line.Paint.Opacity=this.StyleRecord.Line.Paint.Opacity,i.Line.Paint.EndOpacity=this.StyleRecord.Line.Paint.EndOpacity,i.Text.Paint.Opacity=this.StyleRecord.Text.Paint.Opacity,i.Text.Paint.EndOpacity=this.StyleRecord.Text.Paint.EndOpacity,this.ChangeTextAttributes(s,t),this.StyleRecord=i}LogUtil.Debug("= S.BaseDrawObject: ApplyStyle - Output:",{StyleRecord:this.StyleRecord})}GenericIcon(t){LogUtil.Debug("= S.BaseDrawObject: GenericIcon - Input:",t);const e=t.svgDoc.CreateShape(OptConstant.CSType.Image);return null!=t.userData?e.SetUserData(t.userData):e.SetUserData(OptConstant.SVGElementClass.Icon),e.SetSize(t.iconSize,t.iconSize),e.SetPos(t.x,t.y),e.SetURL(t.imageURL),e.SetFillOpacity(1),e.SetStrokeWidth(0),e.SetID(t.iconID),e.SetCursor(t.cursorType),e.ExcludeFromExport(!0),LogUtil.Debug("= S.BaseDrawObject: GenericIcon - Output:",e),e}AddIcon(t,e,i){if(LogUtil.Debug("= S.BaseDrawObject: AddIcon - Input:",{svgDoc:t,container:e,iconParams:i}),e){const t=this.Frame;i.x=t.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=t.height-this.iconShapeBottomOffset-this.iconSize;const n=this.GenericIcon(i);return this.nIcons++,e.AddElement(n),LogUtil.Debug("= S.BaseDrawObject: AddIcon - Output:",n),n}return LogUtil.Debug("= S.BaseDrawObject: AddIcon - Output: container not provided"),null}GetIconShape(){return this.BlockID}HasIcons(){}AddIcons(t,e){if(LogUtil.Debug("= S.BaseDrawObject: AddIcons - Input:",{svgDoc:t,container:e}),e){this.nIcons=0;let i={svgDoc:t,iconSize:this.iconSize,cursorType:CursorConstant.CursorType.Pointer};if(this.nIcons=0,!this.bInGroup){if(this.commentId>=0){i.iconID=OptConstant.ShapeIconType.Comment,i.imageURL=Constants.FilePath_Icons+Constants.Icon_Comment;const n=this.AddIcon(t,e,i),s=OptConstant.SVGElementClass.Icon+"."+this.BlockID;n.SetUserData(s)}if(this.HyperlinkText&&Utils1.ResolveHyperlink(this.HyperlinkText)){i.iconID=OptConstant.ShapeIconType.HyperLink,i.imageURL=Constants.FilePath_Icons+Constants.Icon_Hyperlink;const n=this.AddIcon(t,e,i);n.SetHyperlinkAttribute(this.HyperlinkText),n.SetTooltip(Utils1.ResolveHyperlinkForDisplay(this.HyperlinkText))}if(this.AttachmentInfo&&(i.iconID=OptConstant.ShapeIconType.Attachment,i.imageURL="../../../Styles/Img/Icons/attachment_icon.png",this.AddIcon(t,e,i)),this.ExpandedViewID>=0){i.iconID=OptConstant.ShapeIconType.ExpandedView,i.imageURL=Constants.FilePath_Icons+Constants.Icon_ExpandedView;this.AddIcon(t,e,i).SetCustomAttribute("_expextendtt_",this.ExpandedViewID)}if(-1!==this.NoteID||TextUtil.NoteIsShowing(this.BlockID,null)){let n,s;i.iconID=OptConstant.ShapeIconType.Notes,i.imageURL=Constants.FilePath_Icons+Constants.Icon_Note,this.moreflags&OptConstant.ObjMoreFlags.UseInfoNoteIcon&&(i.imageURL=Constants.FilePath_Icons+Constants.Icon_Info),n=this.AddIcon(t,e,i),n.SetCustomAttribute("_expnotett_",this.NoteID);const a=this,o=n.DOMElement();$$1(o).hover((function(){s=setTimeout((()=>{T3Gv.opt.bInNoteEdit||T3Gv.opt.ShowNote(a.BlockID,null)}),750)}),(function(){T3Gv.opt.bInNoteEdit||T3Gv.opt.HideNote(a.BlockID,null),clearTimeout(s)}))}}}LogUtil.Debug("= S.BaseDrawObject: AddIcons - Output: Completed")}HideAllIcons(t,e){LogUtil.Debug("= S.BaseDrawObject: HideAllIcons - Input: svgLayer =",e),this.nIcons=0;const i=e.GetElementById(OptConstant.ShapeIconType.HyperLink),n=e.GetElementById(OptConstant.ShapeIconType.Notes),s=e.GetElementById(OptConstant.ShapeIconType.Comment),a=e.GetElementById(OptConstant.ShapeIconType.FieldData);i&&e.RemoveElement(i),n&&e.RemoveElement(n),s&&e.RemoveElement(s),a&&e.RemoveElement(a),LogUtil.Debug("= S.BaseDrawObject: HideAllIcons - Output: Icons hidden")}GetHyperlink(t){if(LogUtil.Debug("= S.BaseDrawObject: GetHyperlink - Input:",t),t&&"string"==typeof t&&t.split){const e=t.split(".");e[1]&&parseInt(e[1],10)}let e;return e=this.HyperlinkText,LogUtil.Debug("= S.BaseDrawObject: GetHyperlink - Output:",e),e}SetCursors(){LogUtil.Debug("= S.BaseDrawObject: SetCursors - Input: BlockID =",this.BlockID);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e=!1;if(this.flags&NvConstant.ObjFlags.Lock||!t)this.ClearCursors();else if(OptCMUtil.GetEditMode()===NvConstant.EditState.Default){const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&(this.objecttype===NvConstant.FNObjectTypes.FrameContainer?i.SetCursor(CursorConstant.CursorType.Default):i.SetCursor(CursorConstant.CursorType.Add));let n=t.GetElementById(OptConstant.ShapeIconType.HyperLink);n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.Notes),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.ExpandedView),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.Comment),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.Attachment),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.FieldData),n&&n.SetCursor(CursorConstant.CursorType.Pointer);const s=t.GetElementById(OptConstant.SVGElementClass.Slop);s&&s.SetCursor(CursorConstant.CursorType.Add);const a=T3Gv.opt.svgDoc.GetActiveEdit();if(this.DataID&&this.DataID>=0&&t.textElem&&(t.textElem===a?(i&&i.SetCursor(CursorConstant.CursorType.Text),t.textElem.SetCursorState(CursorConstant.CursorState.EditLink)):t.textElem.SetCursorState(CursorConstant.CursorState.LinkOnly)),(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&this.IsSelected()){const n=t.GetElementListWithId(OptConstant.SVGElementClass.DimText);for(let t=0;t<n.length;t++)n[t].SetCursorState(CursorConstant.CursorState.EditOnly),n[t]===a&&(e=!0);e&&(i&&i.SetCursor(null),s&&s.SetCursor(null))}}else this.ClearCursors();LogUtil.Debug("= S.BaseDrawObject: SetCursors - Output: Completed")}ClearCursors(){LogUtil.Debug("= S.BaseDrawObject: ClearCursors - Input: {}");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&(t.ClearAllCursors(),t.textElem&&t.textElem.SetCursorState(CursorConstant.CursorState.None)),LogUtil.Debug("= S.BaseDrawObject: ClearCursors - Output: Completed")}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject PostCreateShapeCallback - Input:",{shape:t,container:e,config:i,additionalInfo:n}),LogUtil.Debug("= S.BaseDrawObject PostCreateShapeCallback - Output: completed")}SVGTokenizerHook(t){if(LogUtil.Debug("= S.BaseDrawObject: SVGTokenizerHook - Input:",t),T3Gv.opt.bTokenizeStyle){const e=this.colorfilter;if(t=Utils1.DeepCopy(t),e===StyleConstant.ColorFilters.NCAll)return LogUtil.Debug("= S.BaseDrawObject: SVGTokenizerHook - Output (NCAll):",t),t;e&StyleConstant.ColorFilters.NCFill||(t.Fill.Paint.FillType===NvConstant.FillTypes.Gradient&&(t.Fill.Paint.FillType=NvConstant.FillTypes.Solid),t.Fill.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.FillColor,t.Fill.Paint.Color)),e&StyleConstant.ColorFilters.NCLine||(t.Line.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineColor,t.Line.Paint.Color)),e&StyleConstant.ColorFilters.NCLineThick||(t.Line.Thickness=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineThick,t.Line.Thickness))}return LogUtil.Debug("= S.BaseDrawObject: SVGTokenizerHook - Output:",t),t}CancelObjectDraw(){return LogUtil.Debug("= S.BaseDrawObject: CancelObjectDraw - Input: {}"),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseDrawObject: CancelObjectDraw - Output: true"),!0}GetAlignRect(){LogUtil.Debug("= S.BaseDrawObject: GetAlignRect - Input:",{Frame:this.Frame});const t=Utils1.DeepCopy(this.Frame);return LogUtil.Debug("= S.BaseDrawObject: GetAlignRect - Output:",{alignRect:t}),t}GetCustomConnectPointsDirection(){return null}GetTextures(t){LogUtil.Debug("= S.BaseDrawObject: GetTextures - Input:",{textures:t});const e=NvConstant.FillTypes.Texture;if(this.StyleRecord.Fill.Paint.FillType===e){const e=this.StyleRecord.Fill.Paint.Texture;-1===t.indexOf(e)&&t.push(e)}if(this.StyleRecord.Line.Paint.FillType===e){const e=this.StyleRecord.Line.Paint.Texture;-1===t.indexOf(e)&&t.push(e)}if(this.StyleRecord.Text.Paint.FillType===e){const e=this.StyleRecord.Text.Paint.Texture;-1===t.indexOf(e)&&t.push(e)}LogUtil.Debug("= S.BaseDrawObject: GetTextures - Output:",{textures:t})}GetContrastingColorName(t){LogUtil.Debug("= S.BaseDrawObject: GetContrastingColorName - Input:",t);const e=this.StyleRecord.Line.Paint.Color,i=(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=128?"black":"white";return LogUtil.Debug("= S.BaseDrawObject: GetContrastingColorName - Output:",i),i}SetRuntimeEffects(t){LogUtil.Debug("= S.BaseDrawObject: SetRuntimeEffects - Input:",{effectParams:t});const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);e&&this.ApplyEffects(e,t,!1),LogUtil.Debug("= S.BaseDrawObject: SetRuntimeEffects - Output: Completed")}ApplyEffects(t,e,i){}SetEffects(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: SetEffects - Input:",{targetElement:t,flagOverrideGlow:e,isSecondary:i,styleOverride:n,skipOutsideEffects:s,skipInsideEffects:a});const o=this.Frame;let r=[],l=null;if(t){const h=n||this.StyleRecord;if(null!=h){this.dataStyleOverride&&this.dataStyleOverride.glowColor&&(l=this.dataStyleOverride.glowColor);const n=this.CalcEffectSettings(o,h,i);s||(n.outside.type&&(e&&n.outside.type.id===BConstant.EffectType.GLOW.id?r.push({type:n.outside.type,params:n.outside.settings}):e||r.push({type:n.outside.type,params:n.outside.settings})),e?r.push({type:BConstant.EffectType.GLOW,params:{color:"#FFD64A",size:4,asSecondary:!0}}):this.collabGlowColor?r.push({type:BConstant.EffectType.GLOW,params:{color:this.collabGlowColor,size:6,asSecondary:!0}}):l&&r.push({type:BConstant.EffectType.GLOW,params:{color:l,size:4,asSecondary:!0}})),n.inside.type&&!a&&r.push({type:n.inside.type,params:n.inside.settings}),t.Effects().SetEffects(r,o)}}LogUtil.Debug("= S.BaseDrawObject: SetEffects - Output:",{appliedEffects:r,frame:o})}CalcEffectSettings(t,e,i){let n,s,a;LogUtil.Debug("= S.BaseDrawObject CalcEffectSettings - Input:",{frame:t,style:e,isSecondary:i});const o=t.width,r=t.height,l={left:0,top:0,right:0,bottom:0},h={};let c=e.Line.Thickness;i&&c<2&&(c=2);let u=o+c,d=r+c;if(n=Math.min(u,d),n=i?c:Math.min(n,50),h.inside={},h.outside={},e.OutsideEffect&&e.OutsideEffect.OutsideType)switch(h.outside.settings={},e.OutsideEffect.OutsideType){case StyleConstant.OutEffect.Drop:l.left=n*e.OutsideEffect.OutsideExtent_Left,l.top=n*e.OutsideEffect.OutsideExtent_Top,l.right=n*e.OutsideEffect.OutsideExtent_Right,l.bottom=n*e.OutsideEffect.OutsideExtent_Bottom,i&&(l.left&&(l.left=Math.min(l.left,2)),l.top&&(l.top=Math.min(l.top,2)),l.right&&(l.right=Math.min(l.right,2)),l.bottom&&(l.bottom=Math.min(l.bottom,2))),h.outside.type=BConstant.EffectType.DROPSHADOW,h.outside.settings.size=Math.min(Math.max((l.left+l.right)/2,2),50),h.outside.settings.xOff=l.right/2-l.left/2,h.outside.settings.yOff=l.bottom/2-l.top/2,h.outside.settings.color=e.OutsideEffect.Color,h.outside.settings.asSecondary=!0,l.left=Math.max(-h.outside.settings.xOff+h.outside.settings.size,0),l.top=Math.max(-h.outside.settings.yOff+h.outside.settings.size,0),l.right=Math.max(h.outside.settings.xOff+h.outside.settings.size,0),l.bottom=Math.max(h.outside.settings.yOff+h.outside.settings.size,0);break;case StyleConstant.OutEffect.Glow:l.left=l.top=l.right=l.bottom=Math.max(n*e.OutsideEffect.OutsideExtent_Left,2),h.outside.type=BConstant.EffectType.GLOW,h.outside.settings.size=Math.min(Math.max((l.left+l.right)/2,2),50),h.outside.settings.color=e.OutsideEffect.Color,h.outside.settings.asSecondary=!0,l.left=l.top=l.right=l.bottom=h.outside.settings.size;break;case StyleConstant.OutEffect.Refl:l.left=u*e.OutsideEffect.OutsideExtent_Left,l.right=u*e.OutsideEffect.OutsideExtent_Right,l.bottom=d*e.OutsideEffect.OutsideExtent_Bottom,h.outside.type=BConstant.EffectType.REFLECT,h.outside.settings.xOff=l.right-l.left,h.outside.settings.yOff=l.bottom,h.outside.settings.asSecondary=!0,s=Element$1.Effects.CalcSecondaryEffectOffset(h.outside.settings.xOff,h.outside.settings.yOff),l.left=Math.max(-s,0),l.right=Math.max(s,0);break;case StyleConstant.OutEffect.Cast:l.left=u*e.OutsideEffect.OutsideExtent_Left,l.right=u*e.OutsideEffect.OutsideExtent_Right,l.bottom=d*e.OutsideEffect.OutsideExtent_Bottom,h.outside.type=BConstant.EffectType.CASTSHADOW,h.outside.settings.xOff=l.right-l.left,h.outside.settings.yOff=l.bottom,h.outside.settings.size=Math.min(Math.max(.1*Math.abs(l.bottom),2),25),h.outside.settings.asSecondary=!0,s=Element$1.Effects.CalcSecondaryEffectOffset(h.outside.settings.xOff,h.outside.settings.yOff),l.left=Math.max(-s+h.outside.settings.size,0),l.right=Math.max(s+h.outside.settings.size,0),l.bottom=Math.max(h.outside.settings.yOff+h.outside.settings.size,0)}if(e.Fill.FillEffect&&!i)switch(n=Math.min(u,d),h.inside.settings={},e.Fill.FillEffect){case StyleConstant.FillEffect.Gloss:if(h.inside.type=BConstant.EffectType.GLOSS,h.inside.settings.size=Math.min(u,d),h.inside.settings.type=Element$1.Effects.GlossType.Soft,h.inside.settings.dir=Element$1.Effects.FilterDirection.TOP,h.inside.settings.color=e.Fill.EffectColor,e.Fill.LParam)switch(e.Fill.LParam){case 1:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP;break;case 2:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHTTOP;break;case 3:h.inside.settings.dir=Element$1.Effects.FilterDirection.CENTER}e.Fill.WParam&&(h.inside.settings.type=Element$1.Effects.GlossType.Hard);break;case StyleConstant.FillEffect.Bevel:if(n=Math.max(Math.min(n,50)/10,2),h.inside.type=BConstant.EffectType.BEVEL,h.inside.settings.size=n,h.inside.settings.type=Element$1.Effects.BevelType.SOFT,h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP,void 0!==e.Fill.WParam)switch(e.Fill.WParam){case 0:h.inside.settings.type=Element$1.Effects.BevelType.HARD;break;case 1:h.inside.settings.type=Element$1.Effects.BevelType.SOFT;break;case 2:h.inside.settings.type=Element$1.Effects.BevelType.BUMP}switch(e.Fill.LParam){case 0:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFT;break;case 1:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP;break;case 2:h.inside.settings.dir=Element$1.Effects.FilterDirection.TOP;break;case 3:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHTTOP;break;case 4:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHT;break;case 5:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHTBOTTOM;break;case 6:h.inside.settings.dir=Element$1.Effects.FilterDirection.BOTTOM;break;case 7:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTBOTTOM;break;case 8:h.inside.settings.dir=Element$1.Effects.FilterDirection.CENTER}break;case StyleConstant.FillEffect.InShadow:n=Math.min(n,50)/2,e.Fill.WParam?(a=e.Fill.WParam,(a<0||a>100)&&(a=20),n=n*a/100):n/=5,h.inside.type=Effects.EffectType.INNERSHADOW,h.inside.settings.size=n,h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP;break;case StyleConstant.FillEffect.InGlow:n=Math.min(n,50)/2,e.Fill.WParam?(a=e.Fill.WParam,(a<0||a>100)&&(a=20),n=n*a/100):n/=5,h.inside.type=Effects.EffectType.INNERGLOW,h.inside.settings.size=n,h.inside.settings.color=e.Fill.EffectColor}return h.extent=l,LogUtil.Debug("= S.BaseDrawObject CalcEffectSettings - Output:",h),h}CreateGradientRecord(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: CreateGradientRecord - Input:",{flags:t,color1:e,opacity1:i,color2:n,opacity2:s});let a={type:BConstant.GradientStyle.Linear,startPos:BConstant.GradientPos.LeftTop,stops:[]},o={color:e,opacity:i},r={color:n,opacity:s};return t&T3Constant.GradientStyle.GradRev&&(o={color:n,opacity:s},r={color:e,opacity:i}),t&T3Constant.GradientStyle.GradMiddle?(a.stops.push({offset:0,color:o.color,opacity:o.opacity}),a.stops.push({offset:50,color:r.color,opacity:r.opacity}),a.stops.push({offset:100,color:o.color,opacity:o.opacity})):(a.stops.push({offset:0,color:o.color,opacity:o.opacity}),a.stops.push({offset:100,color:r.color,opacity:r.opacity})),t&T3Constant.GradientStyle.GradRadial?(a.type=BConstant.GradientStyle.Radial,a.startPos=BConstant.GradientPos.Center):t&T3Constant.GradientStyle.GradShape?(a.type=BConstant.GradientStyle.Radialfill,a.startPos=BConstant.GradientPos.Center):(a.type=BConstant.GradientStyle.Linear,t&T3Constant.GradientStyle.GradTlbr?a.startPos=BConstant.GradientPos.LeftTop:t&T3Constant.GradientStyle.GradTrbl?a.startPos=BConstant.GradientPos.RightTop:t&T3Constant.GradientStyle.GradVert?a.startPos=BConstant.GradientPos.Top:t&T3Constant.GradientStyle.GradHoriz?a.startPos=BConstant.GradientPos.Left:a.startPos=BConstant.GradientPos.LeftTop),LogUtil.Debug("= S.BaseDrawObject: CreateGradientRecord - Output:",a),a}CreateRichGradientRecord(t){if(LogUtil.Debug("= S.BaseDrawObject: CreateRichGradientRecord - Input:",{index:t}),t<0||t>=T3Gv.opt.richGradients.length)return LogUtil.Debug("= S.BaseDrawObject: CreateRichGradientRecord - Output:",null,"(Invalid index)"),null;const e=T3Gv.opt.richGradients[t];let i={type:BConstant.GradientStyle.Linear,startPos:BConstant.GradientPos.LeftTop,stops:[]};switch(e.gradienttype){case StyleConstant.RichGradientTypes.Linear:i.type=BConstant.GradientStyle.Linear,i.angle=e.angle;break;case StyleConstant.RichGradientTypes.BR:case StyleConstant.RichGradientTypes.RectBR:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.RightBottom;break;case StyleConstant.RichGradientTypes.BL:case StyleConstant.RichGradientTypes.RectBL:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.LeftBottom;break;case StyleConstant.RichGradientTypes.RadialCenter:case StyleConstant.RichGradientTypes.RectCenter:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.Center;break;case StyleConstant.RichGradientTypes.RadialTR:case StyleConstant.RichGradientTypes.RectTR:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.RightTop;break;case StyleConstant.RichGradientTypes.RadialTL:case StyleConstant.RichGradientTypes.RectTL:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.LeftTop;break;case StyleConstant.RichGradientTypes.RadialBC:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.Bottom;break;case StyleConstant.RichGradientTypes.RadialTC:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.Top;break;case StyleConstant.RichGradientTypes.Shape:i.type=BConstant.GradientStyle.Radialfill,i.startPos=BConstant.GradientPos.Center}for(let n=0;n<e.stops.length;n++){const t=e.stops[n];i.stops.push({color:t.color,opacity:t.opacity,offset:t.stop})}return LogUtil.Debug("= S.BaseDrawObject: CreateRichGradientRecord - Output:",i),i}CalcLineHops(t){}AddHopPoint(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: AddHopPoint input:",{pointA:t,pointB:e,hopIndex:i,radius:n,angle:s,flag:a});const o={bSuccess:!1,tindex:-1};return LogUtil.Debug("= S.BaseDrawObject: AddHopPoint output:",o),o}ResetAutoScrollTimer(){LogUtil.Debug("= S.BaseDrawObject: ResetAutoScrollTimer - Input: {}"),-1!==T3Gv.opt.autoScrollTimerId?(T3Gv.opt.autoScrollTimer.clearTimeout(T3Gv.opt.autoScrollTimerId),T3Gv.opt.autoScrollTimer.obj=T3Gv.opt,T3Gv.opt.autoScrollTimerId=-1,LogUtil.Debug("= S.BaseDrawObject: ResetAutoScrollTimer - Output: Timer has been reset")):LogUtil.Debug("= S.BaseDrawObject: ResetAutoScrollTimer - Output: No active timer to reset")}GetActionButtons(){return null}GetArrowheadSelection(t){LogUtil.Debug("= S.BaseDrawObject: GetArrowheadSelection - Input:",{selection:t});return LogUtil.Debug("= S.BaseDrawObject: GetArrowheadSelection - Output:",false),false}SetRolloverActions(t,e){if(LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - Input:",{rolloverElement:t,eventObj:e}),-1!==T3Gv.opt.curHiliteShape&&T3Gv.opt.curHiliteShape!==this.BlockID){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.curHiliteShape,!1);t&&(LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - Clearing previous shape:",T3Gv.opt.curHiliteShape),t.SetRuntimeEffects(!1),t.ClearCursors())}this.SetRuntimeEffects(!0),this.SetCursors(),T3Gv.opt.curHiliteShape=this.BlockID;const i=this;e.svgObj.mouseout((function(){LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - MouseOut Triggered for BlockID:",i.BlockID),i.SetRuntimeEffects(!1),i.ClearCursors(),T3Gv.opt.curHiliteShape===i.BlockID&&(T3Gv.opt.curHiliteShape=-1),LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - MouseOut Completed for BlockID:",i.BlockID)})),LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - Output: Completed setup for BlockID",this.BlockID)}CalcCursorForAngle(t,e){LogUtil.Debug("= S.BaseDrawObject: CalcCursorForAngle - Input:",{angle:t,swap:e}),t=10*Math.round(t/10);let i=CursorConstant.CursorType.ResizeLR;if(t>0&&t<90||t>180&&t<270?i=CursorConstant.CursorType.NwseResize:t>90&&t<180||t>270&&t<360?i=CursorConstant.CursorType.NeswResize:90!==t&&270!==t||(i=CursorConstant.CursorType.ResizeTB),e)switch(i){case CursorConstant.CursorType.ResizeLR:i=CursorConstant.CursorType.ResizeTB;break;case CursorConstant.CursorType.ResizeTB:i=CursorConstant.CursorType.ResizeLR;break;case CursorConstant.CursorType.NwseResize:i=CursorConstant.CursorType.NeswResize;break;case CursorConstant.CursorType.NeswResize:i=CursorConstant.CursorType.NwseResize}return LogUtil.Debug("= S.BaseDrawObject: CalcCursorForAngle - Output:",i),i}FoundText(t,e,i){if(LogUtil.Debug("= S.BaseDrawObject FoundText - Input:",{searchText:t,selectionLength:e,targetBlockId:i}),this.BlockID===i)return LogUtil.Debug("= S.BaseDrawObject FoundText - Output:",!1,"Same BlockID"),!1;let n=!1;if(this.DataID>=0){const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(i){const s=i.textElem;if(s){const a=s.GetText(0).search(t);a>=0&&(TextUtil.ActivateTextEdit(i),s.SetSelectedRange(a,a+e),n=!0)}}}return LogUtil.Debug("= S.BaseDrawObject FoundText - Output:",n),n}MoveBehindAllLinked(){LogUtil.Debug("= S.BaseDrawObject MoveBehindAllLinked - Input: {}");let t=!1,e=LayerUtil.FrontMostLayerZListPreserve(),i=this.BlockID,n=$$1.inArray(i,e),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);if(s){let a=OptCMUtil.FindLink(s,i,!0);for(;a>=0&&a<s.length&&s[a].targetid===i;){let o=s[a].hookid,r=$$1.inArray(o,e);n>r&&(e[r]=i,e[n]=o,n=r,t=!0),a++}}return LogUtil.Debug("= S.BaseDrawObject MoveBehindAllLinked - Output: { hasMoved: "+t+" }"),t}HookedObjectMoving(t){LogUtil.Debug("= S.BaseDrawObject HookedObjectMoving - Input:",{event:t});return LogUtil.Debug("= S.BaseDrawObject HookedObjectMoving - Output:",false),false}CustomSnap(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject CustomSnap - Input:",{snapTarget:t,snapOptions:e,tolerance:i,additionalData:n,flag:s});return LogUtil.Debug("= S.BaseDrawObject CustomSnap - Output:",false),false}GetSnapRect(){LogUtil.Debug("= S.BaseDrawObject GetSnapRect - Input:",{frame:this.Frame});const t={};return Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseDrawObject GetSnapRect - Output:",t),t}CanSnapToShapes(){LogUtil.Debug("= S.BaseDrawObject CanSnapToShapes - Input: {}");return LogUtil.Debug("= S.BaseDrawObject CanSnapToShapes - Output:",-1),-1}IsSnapTarget(){LogUtil.Debug("= S.BaseDrawObject IsSnapTarget - Input:",{});return LogUtil.Debug("= S.BaseDrawObject IsSnapTarget - Output:",false),false}GuideDistanceOnly(){LogUtil.Debug("= S.BaseDrawObject GuideDistanceOnly - Input:",{});return LogUtil.Debug("= S.BaseDrawObject GuideDistanceOnly - Output:",false),false}ActionApplySnaps(t,e){LogUtil.Debug("= S.BaseDrawObject ActionApplySnaps - Input:",{snapTarget:t,snapOptions:e});return LogUtil.Debug("= S.BaseDrawObject ActionApplySnaps - Output:",null),null}GetNotePos(t,e){LogUtil.Debug("= S.BaseDrawObject GetNotePos - Input:",{source:t,container:e});let i=Utils1.DeepCopy(t.Frame);e&&(i.x+=e.frame.x,i.y+=e.frame.y,i.width=e.frame.width-5,i.height=e.frame.height-6);const n=i.width,s=i.height,a={x:i.x+n,y:i.y+s+t.StyleRecord.Line.Thickness/2+1};return LogUtil.Debug("= S.BaseDrawObject GetNotePos - Output:",a),a}RefreshFromRuleChange(t,e){LogUtil.Debug("= S.BaseDrawObject RefreshFromRuleChange - Input:",{fieldDataTableID:t,fieldDataElementID:e}),this.HasFieldDataRecord(t,e,!0)?(this.GetFieldDataStyleOverride(),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("= S.BaseDrawObject RefreshFromRuleChange - Output: Rule change refreshed",{BlockID:this.BlockID})):LogUtil.Debug("= S.BaseDrawObject RefreshFromRuleChange - Output: No matching field data record",{fieldDataTableID:t,fieldDataElementID:e})}IsShapeContainer(t){LogUtil.Debug("= S.BaseDrawObject IsShapeContainer - Input:",t);return LogUtil.Debug("= S.BaseDrawObject IsShapeContainer - Output:",false),false}HasFieldData(){}HasFieldDataForTable(t){}HasFieldDataInText(t){}SetFieldDataRecord(t,e,i){}NewFieldDataRecord(t){}HasFieldDataRecord(t,e,i){}ChangeFieldDataTable(t){}RemoveFieldData(t,e){}GetFieldDataTable(){}GetFieldDataRecord(){}HasFieldDataRules(t){}GetFieldDataStyleOverride(){if(LogUtil.Debug("= S.BaseDrawObject: GetFieldDataStyleOverride input"),this.HasFieldData()&&this.fieldDataElemID>=0?this.dataStyleOverride=TODO.STData.FieldedDataProcessRulesForRecord(this.fieldDataTableID,this.fieldDataElemID):this.dataStyleOverride=null,this.bInGroup){const t=T3Gv.opt.FindParentGroup(this.BlockID);if(t){const e=t.GetFieldDataStyleOverride();if(e){const t=Utils1.DeepCopy(e);t.glowColor=null,t.iconID=null,this.dataStyleOverride?this.dataStyleOverride=$$1.extend(!0,{},t,this.dataStyleOverride):this.dataStyleOverride=t}}}return LogUtil.Debug("= S.BaseDrawObject: GetFieldDataStyleOverride output:",this.dataStyleOverride),this.dataStyleOverride}RefreshFromFieldData(t){}RefreshFromRuleChange(t,e){}RemapDataFields(t){}RegisterForDataDrop(t){}GetFieldDataStyleOverride(){}SetBlobBytes(t,e){var i=new BlobBytes(e,t);if(this.BlobBytesID>=0){var n=T3Gv.stdObj.PreserveBlock(this.BlobBytesID);n&&(n.Data=i)}else{var s=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.BlobBytesObject,i);s&&(this.BlobBytesID=s.ID)}}}__decorateClass$4([Type((()=>QuickStyle))],BaseDrawObject$1.prototype,"StyleRecord",2),__decorateClass$4([Type((()=>Point$1))],BaseDrawObject$1.prototype,"prevBBox",2),__decorateClass$4([Type((()=>Point$1))],BaseDrawObject$1.prototype,"StartPoint",2),__decorateClass$4([Type((()=>Point$1))],BaseDrawObject$1.prototype,"EndPoint",2),__decorateClass$4([Type((()=>PolyList))],BaseDrawObject$1.prototype,"polylist",2);const _T3Timer=class{constructor(t){__publicField(this,"context"),this.context=t||window}setInterval(t,e){const i=_T3Timer.getNewTimerId();if(_T3Timer.timerRegistry[i]={},"string"==typeof t){const n=t;_T3Timer.timerRegistry[i].timer=window.setInterval((()=>{this.context&&this.context[n]&&this.context[n]()}),e)}else _T3Timer.timerRegistry[i].timer=window.setInterval((()=>{t.call(this.context)}),e);return i}setTimeout(t,e,...i){const n=_T3Timer.getNewTimerId();if(_T3Timer.timerRegistry[n]={},"string"==typeof t){const s=t;_T3Timer.timerRegistry[n].timer=window.setTimeout((()=>{this.context&&this.context[s]&&this.context[s](...i),_T3Timer.timerRegistry[n]=null}),e)}else _T3Timer.timerRegistry[n].timer=window.setTimeout((()=>{t.call(this.context,...i),_T3Timer.timerRegistry[n]=null}),e);return n}clearInterval(t){_T3Timer.timerRegistry[t]&&(window.clearInterval(_T3Timer.timerRegistry[t].timer),_T3Timer.timerRegistry[t]=null)}clearTimeout(t){_T3Timer.timerRegistry[t]&&(window.clearTimeout(_T3Timer.timerRegistry[t].timer),_T3Timer.timerRegistry[t]=null)}static getNewTimerId(){let t=0;for(;_T3Timer.timerRegistry[t];)t++;return t}};let T3Timer=_T3Timer;__publicField(T3Timer,"timerRegistry",[]);class ActionUtil{static ClearAllActionArrowTimers(){LogUtil.Debug("O.Opt ClearAllActionArrowTimers: input");const t=LayerUtil.VisibleZList();for(let e=0;e<t.length;e++){const i=ObjectUtil$1.GetObjectPtr(t[e],!1);i&&-1!==i.actionArrowHideTimerID&&(T3Gv.opt.actionArrowHideTimer.clearTimeout(i.actionArrowHideTimerID),i.actionArrowHideTimerID=-1)}LogUtil.Debug("O.Opt ClearAllActionArrowTimers: output")}static RemoveAllActionArrows(){LogUtil.Debug("O.Opt RemoveAllActionArrows - Input: no parameters");const t=LayerUtil.VisibleZList();for(let e=0;e<t.length;e++)this.RemoveActionArrows(t[e],!0);LogUtil.Debug("O.Opt RemoveAllActionArrows - Output: Removed arrows from",t.length,"objects")}static ClearActionArrowTimer(t){if(LogUtil.Debug("O.Opt ClearActionArrowTimer - Input:",t),t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!1);e?e.actionArrowHideTimerID>=0?(T3Gv.opt.actionArrowHideTimer.clearTimeout(e.actionArrowHideTimerID),e.actionArrowHideTimerID=-1,LogUtil.Debug("O.Opt ClearActionArrowTimer - Timer cleared for object",t)):LogUtil.Debug("O.Opt ClearActionArrowTimer - No active timer for object",t):LogUtil.Debug("O.Opt ClearActionArrowTimer - No target object found for id",t)}else LogUtil.Debug("O.Opt ClearActionArrowTimer - Invalid objectId:",t);LogUtil.Debug("O.Opt ClearActionArrowTimer - Output: Completed")}static RemoveActionArrows(t,e){LogUtil.Debug("O.Opt RemoveActionArrows - Input:",{objectId:t,clearTimer:e});const i="actionArrow"+t;if(e)this.ClearActionArrowTimer(t);else{const e=ObjectUtil$1.GetObjectPtr(t,!1);e&&(e.actionArrowHideTimerID=-1)}T3Gv.opt.fromOverlayLayer?setTimeout((()=>{this.SetActionArrowTimer(t)}),0):SvgUtil.ClearOverlayElementsByID(i),LogUtil.Debug("O.Opt RemoveActionArrows - Output: Completed")}static SetActionArrowTimer(t){if(LogUtil.Debug("O.Opt SetActionArrowTimer - Input:",t),t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!1);e?(this.ClearActionArrowTimer(t),e.actionArrowHideTimerID=T3Gv.opt.actionArrowHideTimer.setTimeout("RemoveActionArrows",500,t),LogUtil.Debug("O.Opt SetActionArrowTimer - Timer set for object",t)):LogUtil.Debug("O.Opt SetActionArrowTimer - No target object found for id",t)}else LogUtil.Debug("O.Opt SetActionArrowTimer - Invalid objectId:",t);LogUtil.Debug("O.Opt SetActionArrowTimer - Output: Completed")}}class GlobalMsgModel{constructor(t,e,i,n,s={}){__publicField(this,"type"),__publicField(this,"message"),__publicField(this,"isShow"),__publicField(this,"msgType"),__publicField(this,"extral"),this.type=t||"info",this.message=e||"",this.isShow=i||!1,this.msgType=n||"",this.extral=s||{}}}class QuasarUtil{constructor(){__publicField(this,"$q")}initQuasar(t){this.$q=t}setGlobalMsg(t,e,i,n,s){const a=globalMsg.value.findIndex((t=>t.msgType===n));if(-1!==a)globalMsg.value[a].type=t,globalMsg.value[a].message=e,globalMsg.value[a].isShow=i,globalMsg.value[a].msgType=n,globalMsg.value[a].extral=s||{};else{const a=new GlobalMsgModel;a.type=t||"info",a.message=e||"",a.isShow=i||!1,a.msgType=n||"",a.extral=s||{},globalMsg.value.push(a)}LogUtil.Debug("= U.QuasarUtil setGlobalMsg",{...globalMsg.value})}clearGlobalMsg(t){globalMsg.value=globalMsg.value.filter((e=>e.msgType!==t)),LogUtil.Debug("= U.QuasarUtil clearGlobalMsg",{...globalMsg.value})}clearAllGlobalMsg(){globalMsg.value=[]}ShowLOAD_GRAPHIC_ENTRY_RESSuccess(){LogUtil.Debug("= U.QuasarUtil Graphic loaded successfully")}ShowGET_INITIAL_DATA_RESSuccess(){LogUtil.Debug("= U.QuasarUtil Initial data loaded successfully")}ShowWebSocketError(t){this.$q.notify({message:t,color:"negative",icon:"error",actions:[{label:"Dismiss",color:"white",handler:()=>{}}]})}setLocalSettings(t,e){localSettings.value[t]=e,localStorage.setItem("localSettings",JSON.stringify(localSettings.value))}getLocalSettings(t){const e=localStorage.getItem("localSettings");if(e)return JSON.parse(e)[t]}static ShowContextMenu(t,e,i){LogUtil.Debug("= u.QuasarUtil ShowContextMenu/","isShow,from,type,rClickParam=>",t,e,i,T3Gv.opt.rClickParam),ctxMenuConfig.value={isShow:t,from:e,type:i},objectConfigShow.value=!1}static ShowObjectConfig(t){LogUtil.Debug("= U.QuasarUtil ShowObjectConfig","show=>",t),objectConfigShow.value=t}static UpdateCurrentObjectPos(t){var e,i,n;if(t){const s=null!=(n=null==(i=null==(e=appStateV2)?void 0:e.value)?void 0:i.activeItemIndex)?n:"-1";if("-1"!==s){let e=appStateV2.value.items[s];void 0!==e&&null!=e&&(appStateV2.value.items[s].translate=[t.x,t.y],appStateV2.value.items[s].width=t.width,appStateV2.value.items[s].height=t.height,appStateV2.value.items[s].rotate=t.rotate)}}}static LinkT3EntryDialogActionV2(){var t,e;LogUtil.Debug("= U.QuasarUtil P.IDX2 linkT3EntryDialogAction","open linkT3EntryDialog V2"),linkT3EntryDialogV2.value.active=!0,(null==(t=appStateV2.value.items[appStateV2.value.activeItemIndex])?void 0:t.t3Entry)&&(linkT3EntryDialogV2.value.data=lodash.exports.cloneDeep(null==(e=appStateV2.value.items[appStateV2.value.activeItemIndex])?void 0:e.t3Entry))}static LinkT3EntrySaveV2(){LogUtil.Debug("= U.QuasarUtil Idx linkT3EntrySave linkT3EntryDialog.value.data=",linkT3EntryDialogV2.value.data),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField||(void 0===appStateV2.value.items[appStateV2.value.activeItemIndex].label?appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="description":appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="label");if(void 0!==linkT3EntryDialogV2.value.data.value&&null!==linkT3EntryDialogV2.value.data.value&&linkT3EntryDialogV2.value.data.value>=1e3&&(linkT3EntryDialogV2.value.data.value=linkT3EntryDialogV2.value.data.value/1e3),appStateV2.value.items[appStateV2.value.activeItemIndex].t3Entry=lodash.exports.cloneDeep(toRaw(linkT3EntryDialogV2.value.data)),"Icon"===appStateV2.value.items[appStateV2.value.activeItemIndex].type){let t="fa-solid fa-camera-retro";"GRP"===linkT3EntryDialogV2.value.data.type?t="fa-solid fa-camera-retro":"SCHEDULE"===linkT3EntryDialogV2.value.data.type?t="schedule":"PROGRAM"===linkT3EntryDialogV2.value.data.type?t="fa-solid fa-laptop-code":"HOLIDAY"===linkT3EntryDialogV2.value.data.type&&(t="calendar_month"),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.icon=t}IdxUtils.refreshObjectStatus(appStateV2.value.items[appStateV2.value.activeItemIndex]),linkT3EntryDialogV2.value.data=null,linkT3EntryDialogV2.value.active=!1,DataOpt.SaveAppStateV2(),SvgUtil.RenderAllSVGObjects(),LogUtil.Debug("= U.QuasarUtil P.IDX2 linkT3EntryDialogAction","close linkT3EntryDialog V2",appStateV2.value)}static AddCurrentObjectToAppState(){let t=SelectUtil.GetTargetSelect();var e=ObjectUtil$1.GetObjectPtr(t,!1);LogUtil.Debug("= U.QuasarUtil AddCurrentObjectToAppState targetObject:",e);var i={x:e.Frame.x,y:e.Frame.y,width:e.Frame.width,height:e.Frame.height},n=e.uniqueId,s=e.uniType;LogUtil.Debug("= U.QuasarUtil AddCurrentObjectToAppState uniqueId:|uniType:",i,n,s);const a=NewTool.find((t=>t.name===s));this.AddToAppStateV2(i,a,n),this.SetAppStateV2SelectIndex(a),DataOpt.SaveAppStateV2()}static AddToAppStateV2(t,e,i){const n={width:t.width,height:t.height},s={clientX:t.x,clientY:t.y,top:t.x,left:t.y},a=this.drawObject(n,s,e,i);LogUtil.Debug("= U.QuasarUtil AddToAppStateV2",a,appStateV2.value)}static drawObject(t,e,i,n){var s;const a=lodash.exports.cloneDeep(null==(s=NewTool.find((t=>t.name===(null==i?void 0:i.name))))?void 0:s.settings)||{},o=Object.keys(a).reduce(((t,e)=>(t[e]=a[e].value,t)),{}),r={title:null,active:!1,type:null==i?void 0:i.name,translate:[e.clientX,e.clientY],width:t.width,height:t.height,rotate:0,scaleX:1,scaleY:1,settings:o,zindex:1,t3Entry:null,showDimensions:!0};return this.addObject(r,n)}static addObject(t,e,i,n=!0){const s=appStateV2.value.items.length>0?Math.max(...appStateV2.value.items.map((t=>{var e;return null!=(e=t.id)?e:0}))):0;return s>appStateV2.value.itemsCount&&(appStateV2.value.itemsCount=s),appStateV2.value.itemsCount++,t.id=appStateV2.value.itemsCount,t.uniqueId=e,t.group=i,t.settings.titleColor=t.settings.titleColor||"inherit",t.settings.bgColor=t.settings.bgColor||"inherit",t.settings.textColor=t.settings.textColor||"inherit",t.settings.fontSize=t.settings.fontSize||13,appStateV2.value.items.push(t),appStateV2.value.elementGuidelines=[],t}static SetAppStateV2SelectIndex(t){var e,i;let n="";if(t)n=null!=(e=null==t?void 0:t.name)?e:"";else{let t=SelectUtil.GetTargetSelect();var s=ObjectUtil$1.GetObjectPtr(t,!1);s&&(n=null!=(i=null==s?void 0:s.uniqueId)?i:"")}appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((t=>`${t.uniqueId}`===n)),LogUtil.Debug("= U.QuasarUtil SetAppStateV2SelectIndex",appStateV2.value)}static GetItemFromAPSV2(t){let e=appStateV2.value.items.find((e=>e.uniqueId===t));return e||(LogUtil.Debug(`= U.QuasarUtil Item with id ${t} not found in appStateV2`),null)}static UpdateSvgElementSettings(t,e){LogUtil.Debug("= U.QuasarUtil UpdateSvgElementSettings Input: key,value",t,e,T3Gv.stdObj);var i=SelectUtil.GetSelectedObject(),n=i.selectedObject.GetDrawSetting();(n=n||{})[t]=e,LogUtil.Debug(`= U.QuasarUtil Updated drawSetting: ${t}=${e}`,n),i.selectedObject.SetDrawSetting(n)}}__publicField(QuasarUtil,"quasar");class BaseShape extends BaseDrawObject$1{constructor(t){LogUtil.Debug("= S.BaseShape - constructor input:",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Shape,0!==t.hookflags&&(t.hookflags=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcAttachToLine),0!==t.targflags&&(t.targflags=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcLine),super(t),__publicField(this,"ShapeType"),__publicField(this,"shapeparam"),__publicField(this,"SVGDim"),__publicField(this,"zListIndex"),this.ShapeType=t.ShapeType,this.shapeparam=t.shapeparam||0,this.SVGDim=t.SVGDim||{},LogUtil.Debug("= S.BaseShape - constructor output:",this)}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.BaseShape - CreateActionTriggers input:",{svgDocument:t,triggerIdentifier:e,rotationProvider:i,comparisonTrigger:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL],a=t.CreateShape(OptConstant.CSType.Group),o=OptConstant.Common.KnobSize,r=OptConstant.Common.RKnobSize;let l=this.extraflags&OptConstant.ExtraFlags.SideKnobs&&this.dataclass===PolygonConstant.ShapeTypes.POLYGON;const h=OptConstant.Common.MinSidePointLength;let c=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(c*=2);const u=o/c,d=r/c,p=this.Frame;let g=p.width+u,f=p.height+u;const b=Utils1.DeepCopy(p);b.x-=u/2,b.y-=u/2,b.width+=u,b.height+=u;let v=i.GetRotation()+22.5;v>=360&&(v=0);const m=Math.floor(v/45),y=s.slice(m).concat(s.slice(0,m));let S=!0,w=!l,x=!l;switch(this.ObjGrow){case OptConstant.GrowBehavior.Horiz:S=!1,x=!1;break;case OptConstant.GrowBehavior.Vertical:S=!1,w=!1;break;case OptConstant.GrowBehavior.ProPortional:S=!0,w=!1,x=!1}const C={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:u,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1};if(e!==n&&(C.fillColor="white",C.strokeSize=1,C.strokeColor="black",C.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock)C.fillColor="gray",C.locked=!0,l=!1;else if(this.NoGrow()){C.fillColor="red",l=!1,C.strokeColor="red";for(let t=0;t<8;t++)y[t]=CursorConstant.CursorType.Default}let D;S&&(C.knobID=OptConstant.ActionTriggerType.TopLeft,C.cursorType=y[0],D=this.GenericKnob(C),a.AddElement(D),C.x=g-u,C.y=0,C.cursorType=y[2],C.knobID=OptConstant.ActionTriggerType.TopRight,D=this.GenericKnob(C),a.AddElement(D),C.x=g-u,C.y=f-u,C.cursorType=y[4],C.knobID=OptConstant.ActionTriggerType.BottomRight,D=this.GenericKnob(C),a.AddElement(D),C.x=0,C.y=f-u,C.cursorType=y[6],C.knobID=OptConstant.ActionTriggerType.BottomLeft,D=this.GenericKnob(C),a.AddElement(D)),x&&(C.x=g/2-u/2,C.y=0,C.cursorType=y[1],C.knobID=OptConstant.ActionTriggerType.TopCenter,D=this.GenericKnob(C),a.AddElement(D),C.x=g/2-u/2,C.y=f-u,C.cursorType=y[5],C.knobID=OptConstant.ActionTriggerType.BottomCenter,D=this.GenericKnob(C),a.AddElement(D)),w&&(C.x=0,C.y=f/2-u/2,C.cursorType=y[7],C.knobID=OptConstant.ActionTriggerType.CenterLeft,D=this.GenericKnob(C),a.AddElement(D),C.x=g-u,C.y=f/2-u/2,C.cursorType=y[3],C.knobID=OptConstant.ActionTriggerType.CenterRight,D=this.GenericKnob(C),a.AddElement(D));const T=function(t){let e=null;if(t.hooks.length){const i=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1);i&&(i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||i&&i instanceof Instance.Shape.ShapeContainer)&&(e=i.PrGetShapeConnectorInfo(t.hooks[0]))}return e}(this);if(T&&T.length){const e={svgDoc:t,iconSize:14,imageURL:null,iconID:0,userData:0,cursorType:0};for(let t=0,i=T.length;t<i;t++)"right"===T[t].position?e.x=g-14-1-u:e.x=u+1,"bottom"===T[t].position?e.y=f-14-1-u:e.y=u+1,e.cursorType=T[t].cursorType,e.iconID=T[t].knobID,e.imageURL="vertical"===T[t].polyType?OptConstant.Common.ConMoveVerticalPath:OptConstant.Common.ConMoveHorizontalPath,e.userData=T[t].knobData,D=this.GenericIcon(e),a.AddElement(D),e.x+=16}if(l){const t=Utils1.DeepCopy(this);t.inside=Utils1.DeepCopy(t.Frame);const e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,[]);if(e){C.shapeType=OptConstant.CSType.Oval,C.knobID=OptConstant.ActionTriggerType.MovePolySeg,C.fillColor="green",C.strokeColor="green";for(let t=1,i=e.length;t<i;t++){const i=e[t].x-e[t-1].x,n=e[t].y-e[t-1].y;Utils2.Sqrt(i*i+n*n)>h&&(C.cursorType=i*i>n*n?CursorConstant.CursorType.ResizeTB:CursorConstant.CursorType.ResizeLR,C.x=e[t-1].x+i/2,C.y=e[t-1].y+n/2,D=this.GenericKnob(C),D.SetUserData(t),a.AddElement(D))}}}const k=p.width<44;let $=this.hooks.length>0;if($){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&t.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Connector&&($=!1)}if(!(this.NoRotate()||this.NoGrow()||C.locked||k||$)){const t=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal&&this.flags&NvConstant.ObjFlags.TextOnly&&ShapeUtil.TextAlignToWin(this.TextAlign).just===TextConstant.TextJust.Left;C.shapeType=OptConstant.CSType.Oval,C.x=t?g+d:g-3*d,C.y=f/2-d/2,C.cursorType=CursorConstant.CursorType.Rotate,C.knobID=OptConstant.ActionTriggerType.Rotate,C.fillColor="white",C.fillOpacity=.001,C.strokeSize=1.5,C.strokeColor="black",D=this.GenericKnob(C),a.AddElement(D)}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(a,t,C)}return a.SetSize(g,f),a.SetPos(b.x,b.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.BaseShape - CreateActionTriggers output:",a),a}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.BaseShape - CreateConnectHilites input:",{svgDoc:t,triggerId:e,targetParam:i,additionalParam:n,extraParam:s,connectionHint:a});const o=t.CreateShape(OptConstant.CSType.Group);let r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);const l=OptConstant.Common.ConnPointDim/r;let h=[];this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;const c=this.flags&NvConstant.ObjFlags.ContConn||null!=a;if(c)h.push(i);else if(h=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps,null),null==h)return;const u=this.GetPerimPts(e,h,null,!c,a,s),d=this.Frame;let p=d.width,g=d.height;const f=Utils1.DeepCopy(d);f.x-=l/2,f.y-=l/2,f.width+=l,f.height+=l,p+=l,g+=l;const b={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:0,y:0,knobSize:l,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",KnobID:0,cursorType:CursorConstant.CursorType.Anchor};let v;if(c)f.x=u[0].x,f.y=u[0].y,f.x-=l,f.y-=l,b.x=l/2,b.y=l/2,v=this.GenericKnob(b),o.AddElement(v),o.SetSize(f.width,f.height),o.SetPos(f.x,f.y);else{for(let t=0;t<u.length;t++)b.x=u[t].x-this.Frame.x,b.y=u[t].y-this.Frame.y,v=this.GenericKnob(b),o.AddElement(v);o.SetSize(p,g),o.SetPos(f.x,f.y)}return o.isShape=!0,o.SetEventBehavior(OptConstant.EventBehavior.None),o.SetID("hilite_"+e),LogUtil.Debug("= S.BaseShape - CreateConnectHilites output:",o),o}SetCursors(){LogUtil.Debug("= S.BaseShape - SetCursors input, BlockID:",this.BlockID);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.TextFlags,NvConstant.TextFlags.OneClick;switch(OptCMUtil.GetEditMode()){case NvConstant.EditState.Default:super.SetCursors();break;case NvConstant.EditState.FormatPaint:{LogUtil.Debug("= S.BaseShape - SetCursors: FORMATPAINT mode");const e=t.GetElementById(OptConstant.SVGElementClass.Shape);e&&e.SetCursor(CursorConstant.CursorType.Paint);const i=t.GetElementById(OptConstant.SVGElementClass.Slop);i&&i.SetCursor(CursorConstant.CursorType.Paint);break}default:LogUtil.Debug("= S.BaseShape - SetCursors: Default mode, calling super.SetCursors()"),super.SetCursors()}LogUtil.Debug("= S.BaseShape - SetCursors output, BlockID:",this.BlockID)}GetTextObject(t,e){LogUtil.Debug("= S.BaseShape - GetTextObject input:",{clickEvent:t,skipTableRelease:e});const i=this.GetGraph(!1);if(i){this.DataID=i.selectedText;const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&(t.textElem=t.GetElementById(OptConstant.SVGElementClass.Text,this.DataID))}else this.DataID>=0&&null==ObjectUtil$1.GetObjectPtr(this.DataID,!1)&&(this.DataID=-1);return LogUtil.Debug("= S.BaseShape - GetTextObject output:",{DataID:this.DataID}),this.DataID}UseTextBlockColor(){LogUtil.Debug("= S.BaseShape - UseTextBlockColor input:",{TextFlags:this.TextFlags,FillPaintType:this.StyleRecord.Fill.Paint.FillType,TextPaintColor:this.StyleRecord.Text.Paint.Color,FillColor:this.StyleRecord.Fill.Paint.Color});const t=this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB,e=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent,i=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Solid&&this.StyleRecord.Text.Paint.Color.toUpperCase()===this.StyleRecord.Fill.Paint.Color.toUpperCase(),n=t||e||i;return LogUtil.Debug("= S.BaseShape - UseTextBlockColor output:",n),n}SetTextObject(t){if(LogUtil.Debug("= S.BaseShape - SetTextObject input:",t),this.UseTextBlockColor()){const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);t&&(this.StyleRecord.Text.Paint=Utils1.DeepCopy(t.Text.Paint))}return this.DataID=t,LogUtil.Debug("= S.BaseShape - SetTextObject output:",this.DataID),!0}GetTextParams(t){LogUtil.Debug("= S.BaseShape - GetTextParams input:",{eventData:t});let e={};const i=this.GetGraph(!1);return i&&i.selectedText>=0?e=T3Gv.opt.Graph_GetTRect(this,i,t):(e.trect=Utils1.DeepCopy(this.trect),e.sizedim=Utils1.DeepCopy(this.sizedim),e.tsizedim={width:this.sizedim.width-(this.Frame.width-this.trect.width),height:this.sizedim.height-(this.Frame.height-this.trect.height)}),LogUtil.Debug("= S.BaseShape - GetTextParams output:",e),e}GetTextDefault(t){LogUtil.Debug("= S.BaseShape - GetTextDefault input:",{eventData:t});const e=super.GetTextDefault(t);return LogUtil.Debug("= S.BaseShape - GetTextDefault output:",e),e}SetTextGrow(t){if(LogUtil.Debug("= S.BaseShape - SetTextGrow input:",t),this.TextGrow=t,this.DataID>=0){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){const e=t.textElem;if(this.TextGrow===NvConstant.TextGrowBehavior.Horizontal)e.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,this.trect.width,this.trect.height),LogUtil.Debug("= S.BaseShape - SetTextGrow applied Horizontal constraints");else{const t=Utils1.DeepCopy(this),i=Utils1.DeepCopy(this.Frame);i.width=this.sizedim.width,t.UpdateFrame(i),e.SetConstraints(t.trect.width,t.trect.width,this.trect.height),LogUtil.Debug("= S.BaseShape - SetTextGrow applied Vertical constraints")}}T3Gv.opt.TextResizeCommon(this.BlockID,!0),LogUtil.Debug("= S.BaseShape - SetTextGrow: TextResizeCommon called"),LogUtil.Debug("= S.BaseShape - SetTextGrow output:",this.TextGrow)}}ChangeShape(t,e,i,n,s){let a,o,r;LogUtil.Debug("= S.BaseShape - ChangeShape input:",{newDataClass:t,newShapeType:e,shapeParam:n,preserveAspect:s});const l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(this.SymbolURL&&this.SymbolURL.length>0)return LogUtil.Debug("= S.BaseShape - ChangeShape output: SymbolURL exists, returning false"),!1;if(t!==this.dataclass||e===PolygonConstant.ShapeTypes.RECTANGLE){const h=Utils1.DeepCopy(this);if(s){const t=h.Frame.x+h.Frame.width/2,e=h.Frame.y+h.Frame.height/2;h.Frame.width>h.Frame.height?(h.Frame.x=t-h.Frame.height/2,h.Frame.width=h.Frame.height):(h.Frame.y=e-h.Frame.width/2,h.Frame.height=h.Frame.width)}switch(e){case PolygonConstant.ShapeTypes.RECTANGLE:case PolygonConstant.ShapeTypes.MEASURE_AREA:a=new Instance.Shape.Rect(h);break;case PolygonConstant.ShapeTypes.ROUNDED_RECTANGLE:h.shapeparam=l.def.rrectparam,a=new Instance.Shape.RRect(h),a.moreflags=Utils2.SetFlag(a.moreflags,OptConstant.ObjMoreFlags.FixedRR,!0),n=l.def.rrectparam;break;case PolygonConstant.ShapeTypes.OVAL:case PolygonConstant.ShapeTypes.CIRCLE:a=new Instance.Shape.Oval(h);break;case PolygonConstant.ShapeTypes.POLYGON:const t=i(this.Frame,n);h.VertexArray=t,a=new Instance.Shape.Polygon(h),a.NeedsSIndentCount=!0}if(o=T3Gv.stdObj.PreserveBlock(this.BlockID),a.dataclass=t,a.shapeparam=n,a.ResizeAspectConstrain=s,""===a.ImageURL&&(a.extraflags=Utils2.SetFlag(a.extraflags,OptConstant.ExtraFlags.FlipHoriz|OptConstant.ExtraFlags.FlipVert,!1)),a.ObjGrow=s?OptConstant.GrowBehavior.ProPortional:OptConstant.GrowBehavior.All,a.BlockID=o.Data.BlockID,a.left_sindent=0,a.top_sindent=0,a.right_sindent=0,a.bottom_sindent=0,o.Data=a,a.moreflags=Utils2.SetFlag(a.moreflags,OptConstant.ObjMoreFlags.FixedRR,!1),a.DataID>=0){a.UpdateFrame(a.Frame),a.sizedim.width=a.Frame.width,a.sizedim.height=a.Frame.height;const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e;if(t&&(e=t.textElem),r=Utils1.DeepCopy(a.trect),e){let t=e.CalcTextFit(r.width);t.height>r.height?(t=T3Gv.opt.FitProp(a,e,t.height-r.height,-1),a.Frame.width=t.x,a.Frame.height=t.y):a.TRectToFrame(r,!1)}}return a.SetSize(a.Frame.width,a.Frame.height,0),LogUtil.Debug("= S.BaseShape - ChangeShape output:",{result:!0,newShape:a}),!0}return LogUtil.Debug("= S.BaseShape - ChangeShape output: condition not met, returning false"),!1}SetShapeProperties(t){LogUtil.Debug("= S.BaseShape - SetShapeProperties input:",t);let e=!1,i=0,n=0,s=!1;const a=this.TextFlags,o=NvConstant.TextFlags;if(super.SetShapeProperties(t)&&(e=!0,(this.TextFlags&o.AttachA+o.AttachB)!=(a&o.AttachA+o.AttachB)&&this.DataID>=0)){let t;s=!0,t=this.TextFlags&o.AttachA+o.AttachB?Utils3.FindStyle(OptConstant.Common.TextBlockStyle):ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).def.style;const e={StyleRecord:{Text:{Paint:{Color:t.Text.Paint.Color}}}},i={Color:e.StyleRecord.Text.Paint.Color},n={color:e.StyleRecord.Text.Paint.Color};this.ChangeTextAttributes(n,i)}if(null!=t.tmargin&&this.TMargins.left!==t.tmargin){this.TMargins.left=t.tmargin,this.TMargins.right=t.tmargin,this.TMargins.top=t.tmargin,this.TMargins.bottom=t.tmargin,e=!0;const a=Utils1.DeepCopy(this.Frame);this.UpdateFrame(a),this.trect.width<0&&(i=-this.trect.width),this.trect.height<0&&(n=-this.trect.height),(i||n)&&(Utils2.InflateRect(this.trect,i/2,n/2),this.TRectToFrame(this.trect,!0),ObjectUtil$1.AddToDirtyList(this.BlockID)),this.DataID>=0&&(s=!0),e=!0}return null!=t.SideConn&&this.ShapeType===OptConstant.ShapeType.Polygon&&t.AdjSides!==(this.extraflags&OptConstant.ExtraFlags.SideKnobs)>0&&(this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.SideKnobs,t.SideConn),ObjectUtil$1.AddToDirtyList(this.BlockID),e=!0),null!=t.Container&&t.Container!==(this.moreflags&OptConstant.ObjMoreFlags.SED_MF_Container)>0&&(this.moreflags=Utils2.SetFlag(this.moreflags,OptConstant.ObjMoreFlags.SED_MF_Container,t.Container),e=!0),null!=t.ObjGrow&&t.ObjGrow!==this.ObjGrow&&(this.ObjGrow=t.ObjGrow,ObjectUtil$1.AddToDirtyList(this.BlockID),e=!0,this.ResizeAspectConstrain=this.ObjGrow===OptConstant.GrowBehavior.ProPortional),null!=t.TextGrow&&t.TextGrow!==this.TextGrow&&(this.SetTextGrow(t.TextGrow),e=!0,s=!1),s&&(this.SetTextGrow(this.TextGrow),e=!0),LogUtil.Debug("= S.BaseShape - SetShapeProperties output:",e),e}ApplyStyle(t,e){LogUtil.Debug("= S.BaseShape - ApplyStyle input:",{style:t,options:e});let i=null;this.objecttype!==NvConstant.FNObjectTypes.ShapeContainer&&(t&&t.Line&&t.Border&&(i=Utils1.DeepCopy(t.Line),t.Line=Utils1.DeepCopy(t.Border)),super.ApplyStyle(t,e),null!=i&&(t.Line=Utils1.DeepCopy(i))),LogUtil.Debug("= S.BaseShape - ApplyStyle output:",{style:t,options:e})}SetObjectStyle(t){LogUtil.Debug("= S.BaseShape.SetObjectStyle input:",t);let e=null;t.StyleRecord&&t.StyleRecord.Line&&t.StyleRecord.Border&&(e=Utils1.DeepCopy(t.StyleRecord.Line),t.StyleRecord.Line=Utils1.DeepCopy(t.StyleRecord.Border));const i=super.SetObjectStyle(t);return i.StyleRecord&&i.StyleRecord.Line&&i.StyleRecord.Line.Thickness&&this.SetSize(this.Frame.width,this.Frame.height,OptConstant.ActionTriggerType.LineThickness),null!=e&&(t.StyleRecord.Line=Utils1.DeepCopy(e)),i.StyleRecord&&i.StyleRecord.Fill&&i.StyleRecord.Fill.FillType&&(T3Gv.opt.ClearImage(this.BlockID,!1,!0),this.flags&NvConstant.ObjFlags.TextOnly&&this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Transparent&&(this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.TextOnly,!1))),LogUtil.Debug("= S.BaseShape.SetObjectStyle output:",i),i}SetShapeConnectionPoints(t,e,i){LogUtil.Debug("= S.BaseShape - SetShapeConnectionPoints input:",{connectionType:t,connectionPoints:e,newAttachPoint:i});let n=!1;switch(this.attachpoint.x===i.x&&this.attachpoint.y===i.y||(this.attachpoint.x=i.x,this.attachpoint.y=i.y,n=!0),t){case NvConstant.ObjFlags.ContConn:0==(this.flags&t)&&(this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.UseConnect,!1),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.ContConn,!0),n=!0);break;case NvConstant.ObjFlags.UseConnect:this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.ContConn,!1),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.UseConnect,!0),this.ConnectPoints=Utils1.DeepCopy(e),n=!0;break;default:(this.flags&NvConstant.ObjFlags.ContConn||this.flags&NvConstant.ObjFlags.UseConnect)&&(this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.UseConnect,!1),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.ContConn,!1),n=!0)}return LogUtil.Debug("= S.BaseShape - SetShapeConnectionPoints output:",n),n}GetClosestConnectPoint(t){LogUtil.Debug("= S.BaseShape - GetClosestConnectPoint input:",t);const e=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;let i=[];const n=OptConstant.Common.DimMax;if(e){const t={x:0,y:0,width:n,height:n};if(i=Utils1.DeepCopy(this.ConnectPoints),T3Gv.opt.FlipPoints(t,this.extraflags,i),0!==this.RotationAngle){const e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(t,e,i)}}if(e){let e,n;for(let s=0;s<i.length;s++){const a=i[s],o=t.x-a.x,r=t.y-a.y,l=o*o+r*r;(void 0===e||l<e)&&(e=l,n=a)}return t.x=n.x,t.y=n.y,LogUtil.Debug("= S.BaseShape - GetClosestConnectPoint output:",t),!0}return LogUtil.Debug("= S.BaseShape - GetClosestConnectPoint output:",!1),!1}GetPolyList(){let t;LogUtil.Debug("= S.BaseShape - GetPolyList input:",{});let e,i,n=new PolyList;const s=PolygonConstant.ShapeTypes,a=OptConstant.LineType;switch(this.dataclass){case s.RECTANGLE:t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.segs.push(t);break;case s.ROUNDED_RECTANGLE:e=this.Frame.width,this.Frame.height<e&&(e=this.Frame.height),i=this.GetCornerSize(),t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-2*i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,i),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,this.inside.height-i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height-i),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,-i,i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),n.segs.push(t),n.offset.x=i,n.offset.y=0;break;case s.OVAL:case s.CIRCLE:t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width/2,this.inside.height/2),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t.param=-Math.PI/2,t=new PolySeg(a.ARCSEGLINE,0,this.inside.height),t.ShortRef=OptConstant.ArcQuad.PLA_BL,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-this.inside.width/2,this.inside.height/2),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=-Math.PI/2,t=new PolySeg(a.ARCSEGLINE,0,0),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.offset.x=this.inside.width/2,n.offset.y=0;break;case s.DOCUMENT:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,this.inside.height-i),n.segs.push(t),t=new PolySeg(a.ARCLINE,this.inside.width/2,this.inside.height-i),t.param=i,n.segs.push(t),t=new PolySeg(a.ARCLINE,0,this.inside.height-i),t.param=-i,n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.segs.push(t);break;case s.TERMINAL:this.inside.width>this.inside.height?(i=this.inside.height/2,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-2*i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,i),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height-i),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.segs.push(t)):(i=this.inside.width/2,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,i),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,this.inside.height-i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height-i),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,-i,i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.segs.push(t)),n.offset.x=i,n.offset.y=0;break;case s.STORAGE:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=-Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.segs.push(t),n.offset.x=i,n.offset.y=0;break;case s.DELAY:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.offset.x=0,n.offset.y=0;break;case s.DISPLAY:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-2*i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,-i,this.inside.height/2),n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.offset.x=i,n.offset.y=0;break;default:const o=this.Frame;this.Frame=this.inside;const r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);if(this.Frame=o,r.length>0){n.offset.x=r[0].x,n.offset.y=r[0].y;for(let e=0;e<r.length;e++)t=new PolySeg(a.LINE,r[e].x-n.offset.x,r[e].y-n.offset.y),n.segs.push(t)}}return n.closed=!0,n.dim.x=this.inside.width,n.dim.y=this.inside.height,n.wasline=!1,LogUtil.Debug("= S.BaseShape - GetPolyList output:",n),n}GetListOfEnclosedObjects(t){LogUtil.Debug("= S.BaseShape - GetListOfEnclosedObjects input:",{isRecursive:t});let e=[];const i=OptConstant.ObjMoreFlags.SED_MF_Container;if(this.moreflags&i){let n=LayerUtil.VisibleZList(),s={};const a=n.length;let o=this.trect,r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);if(0!==this.RotationAngle){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,r)}let l=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent;l=!1;let h=0;if(!l)for(let t=0;t<a;t++)if(n[t]===this.BlockID){h=t+1;break}let c=[];for(let u=h;u<a;u++){const a=n[u];if(a!==this.BlockID){let n,l,h=ObjectUtil$1.GetObjectPtr(a,!1);if(0!==h.RotationAngle){n=h.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);const t=-h.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(h.Frame,t,n),Utils2.GetPolyRect(s,n)}else l=Utils1.DeepCopy(h.Frame),s=l;let u=!1;if(u=0!==this.RotationAngle?0!==h.RotationAngle?Utils2.IsAllPolyPointsInPoly(r,n):Utils2.IsAllFrameCornersInPoly(r,s):0!==h.RotationAngle?Utils2.IsAllPolyPointsInPoly(r,n):Utils2.RectInsideRect(o,s),u&&(e.push(a),2===h.hooks.length&&c.push(a),h.moreflags&i&&t)){const t=h.GetListOfEnclosedObjects(!0);t.length&&(e=e.concat(t))}}}for(let t=0;t<c.length;t++){const i=ObjectUtil$1.GetObjectPtr(c[t],!1),n=i.hooks[0].objid,s=i.hooks[1].objid;if((e.indexOf(n)<0||e.indexOf(s)<0)&&e.indexOf(c[t])>=0){const i=e.indexOf(c[t]);e.splice(i,1)}}}return LogUtil.Debug("= S.BaseShape - GetListOfEnclosedObjects output:",e),e}PinProportional(t){LogUtil.Debug("= S.BaseShape PinProportional - Input:",t);const e=OptConstant.Common.KnobSize;let i={};if(0!==this.RotationAngle){const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t),Utils2.GetPolyRect(i,t)}else i=this.Frame;const n={left:i.x-this.r.x+e/2,top:i.y-this.r.y+e/2,right:this.r.x+this.r.width-(i.x+i.width),bottom:this.r.y+this.r.height-(i.y+i.height)};if(t.y<n.top){const e=n.top-t.y,i=e*(T3Gv.opt.actionAspectRatioWidth/T3Gv.opt.actionAspectRatioHeight);t.height-=e,t.width-=i,t.y=n.left}if(t.x<n.left){const e=n.left-t.x,i=e*(T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth);t.height-=i,t.width-=e,t.x=n.left}LogUtil.Debug("= S.BaseShape PinProportional - Output:",t)}HandleActionTriggerTrackCommon(t,e,i){let n,s,a,o,r={x:t,y:e};let l=t-T3Gv.opt.actionStartX,h=e-T3Gv.opt.actionStartY;const c=Utils1.DeepCopy(T3Gv.opt.actionBBox),u=Utils1.DeepCopy(T3Gv.opt.actionBBox),d=this,p=T3Gv.opt.OverrideSnaps(i),g=function(t){let e;if(d.RotationAngle){const i=Utils2.PolyFromRect(t),n=-d.RotationAngle/(180/NvConstant.Geometry.PI);e=Utils1.DeepCopy(t),Utils3.RotatePointsAboutCenter(d.Frame,n,i),Utils2.GetPolyRect(e,i)}else e=t;if(Math.floor(e.x)<0)return!0;if(Math.floor(e.y)<0)return!0;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(e.x+e.width>t.dim.x)return!0;if(e.y+e.height>t.dim.y)return!0}return!1};switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.TopLeft:if(n=u.x-t,s=u.y-e,u.x=t,u.y=e,u.width+=n,u.height+=s,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0?(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=a):(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height-a,u.height=a),this.PinProportional(u)):(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.TopCenter:if(s=u.y-e,u.y=e,u.height=u.height+s,T3Gv.opt.actionLockAspectRatio?(u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height),o=u.height*T3Gv.opt.actionAspectRatioWidth/T3Gv.opt.actionAspectRatioHeight,u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width/2-o/2,u.width=o,this.PinProportional(u)):u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.TopRight:if(s=u.y-e,u.y=e,u.height=u.height+s,u.width=t-u.x,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=t,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0?(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=a):(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height-a,u.height=a),this.PinProportional(u)):(u.width<0&&(u.x=t,u.width=-u.width),u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.CenterRight:if(u.width=t-u.x,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=t,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height/2-a/2,u.height=a,this.PinProportional(u)):u.width<0&&(u.x=t,u.width=-u.width),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.BottomRight:if(u.width=t-u.x,u.height=e-u.y,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=t,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0&&(u.y=c.y-a),u.height=a,this.PinProportional(u)):(u.width<0&&(u.x=t,u.width=-u.width),u.height<0&&(u.y=e,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.BottomCenter:if(u.height=e-u.y,T3Gv.opt.actionLockAspectRatio?(u.height<0&&(u.y=e,u.height=-u.height),o=u.height*T3Gv.opt.actionAspectRatioWidth/T3Gv.opt.actionAspectRatioHeight,u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width/2-o/2,u.width=o,this.PinProportional(u)):u.height<0&&(u.y=e,u.height=-u.height),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.MovePolySeg:r.x=t,r.y=e;let d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);const f=Utils1.DeepCopy(d.Frame);T3Gv.docUtil.docConfig.enableSnap&&!p&&(r=T3Gv.docUtil.SnapToGrid(r)),OptCMUtil.ShapeToPolyLine(this.BlockID,!0,!0),d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1),d.MovePolySeg(T3Gv.opt.actionSvgObject,r.x,r.y,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData),T3Gv.opt.PolyLineToShape(d.BlockID,!0),d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);const b=d.trect,v=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal?T3Gv.opt.header.MaxWorkDim.x:b.width;if(T3Gv.opt.actionSvgObject&&T3Gv.opt.actionSvgObject.textElem){const t=T3Gv.opt.actionSvgObject.textElem.CalcTextFit(v),e=t.width;if(t.height>b.height||e>b.width){OptCMUtil.ShapeToPolyLine(this.BlockID,!0,!0);const t=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);r.x=T3Gv.opt.actionTableLastX,r.y=T3Gv.opt.actionTableLastY,t.MovePolySeg(T3Gv.opt.actionSvgObject,r.x,r.y,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData),T3Gv.opt.PolyLineToShape(this.BlockID,!0),d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1)}}if(T3Gv.opt.actionNewBBox=Utils1.DeepCopy(d.Frame),d.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,OptConstant.ActionTriggerType.MovePolySeg,r),T3Gv.opt.actionTableLastX=r.x,T3Gv.opt.actionTableLastY=r.y,d.RotationAngle){const t=T3Gv.opt.actionSvgObject.GetRotation(),e=Utils1.DeepCopy(d.Frame),i=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(f,e,t),n=T3Gv.opt.actionSvgObject.GetPos();n.x+=i.x,n.y+=i.y,T3Gv.opt.actionSvgObject.SetPos(n.x,n.y),T3Gv.opt.actionBBox.x+=i.x,T3Gv.opt.actionBBox.y+=i.y,T3Gv.opt.actionStartX+=i.x,T3Gv.opt.actionStartY+=i.y,d.Frame.x+=i.x,d.Frame.y+=i.y}break;case OptConstant.ActionTriggerType.BottomLeft:if(u.height=e-u.y,n=u.x-t,u.x=t,u.width+=n,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0&&(u.y=c.y-a),u.height=a,this.PinProportional(u)):(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),u.height<0&&(u.y=e,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.CenterLeft:if(n=u.x-t,u.x=t,u.width+=n,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height/2-a/2,u.height=a,this.PinProportional(u)):u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.ContainerAdj:let m,y,S,w;for(m=T3Gv.opt.dragElementList.length,T3Gv.opt.theActionContainerArrangement===NvConstant.ContainerListArrangements.Column?(-h>T3Gv.opt.actionOldExtra&&(h=-T3Gv.opt.actionOldExtra),T3Gv.opt.actionTableLastY=h,l=0):(-l>T3Gv.opt.actionOldExtra&&(l=-T3Gv.opt.actionOldExtra),T3Gv.opt.actionTableLastY=l,h=0),y=0;y<m;y++)w=T3Gv.opt.dragBBoxList[y],S=SvgUtil.GetSVGDragElement(y),S&&S.SetPos(w.x+l,w.y+h);break;case OptConstant.ActionTriggerType.Rotate:let x=0;const C=t-T3Gv.opt.rotatePivotX,D=e-T3Gv.opt.rotatePivotY;if(0===C&&0===D)x=0;else if(0===C)x=D>0?90:270;else if(C>=0&&D>=0)x=Math.atan(D/C)*(180/NvConstant.Geometry.PI);else if(C<0&&(D>=0||D<0)){x=180+Math.atan(D/C)*(180/NvConstant.Geometry.PI)}else if(C>=0&&D<0){x=360+Math.atan(D/C)*(180/NvConstant.Geometry.PI)}if(T3Gv.docUtil.docConfig.enableSnap&&!p){const t=T3Gv.opt.EnhanceSnaps(i)?T3Gv.opt.enhanceRotateSnap:T3Gv.opt.rotateSnap;x=Math.round(x/t)*t}const T=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),k=-x/(180/NvConstant.Geometry.PI),$={};if(Utils3.RotatePointsAboutCenter(this.Frame,k,T),Utils2.GetPolyRect($,T),$.x<0)break;if($.y<0)break;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if($.x+$.width>t.dim.x)break;if($.y+$.height>t.dim.y)break}T3Gv.opt.rotateEndRotation=x,this.Rotate(T3Gv.opt.actionSvgObject,x);break;case OptConstant.ActionTriggerType.DimLineAdj:this.DimensionLineDeflectionAdjust(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData)}}HandleActionTriggerCallResize(t,e,i,n){let s;this.prevBBox=n?Utils1.DeepCopy(n):Utils1.DeepCopy(this.Frame);const a=Utils1.DeepCopy(this.Frame);if(t.width<OptConstant.Common.MinDim&&(t.width=OptConstant.Common.MinDim),t.height<OptConstant.Common.MinDim&&(t.height=OptConstant.Common.MinDim),this.UpdateFrame(t),e===OptConstant.ActionTriggerType.LineLength&&(e=0),e===OptConstant.ActionTriggerType.LineThickness&&(e=0),T3Gv.opt.actionStoredObjectId===this.BlockID&&i&&UIUtil.UpdateDisplayCoordinates(t,i,CursorConstant.CursorTypes.Grow,this),-1===e&&(e=!0),-1!==this.DataID&&!(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){let i;const n=t.textElem;s=this.trect;const o=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal?T3Gv.opt.header.MaxWorkDim.x:s.width;i=n?n.CalcTextFit(o):{width:0,height:0};const r=Utils2.TrimDP(i.width,T3Gv.docUtil.rulerConfig.dp),l=Utils2.TrimDP(i.height,T3Gv.docUtil.rulerConfig.dp),h=Utils2.TrimDP(i.width,0),c=Utils2.TrimDP(i.height,0),u=Utils2.TrimDP(s.height,0),d=Utils2.TrimDP(s.width,0);let p=c,g=h;if(0!==c&&Math.abs(u-c)<=1&&(p=u),0!==h&&Math.abs(d-h)<=1&&(g=d),p>u||g>d)return e||(s=Utils1.DeepCopy(this.trect),l>s.height&&(s.height=l),r>s.width&&(s.width=r),this.TRectToFrame(s,e)),void this.UpdateFrame(a)}}if(e&&T3Gv.opt.actionSvgObject&&T3Gv.opt.actionStoredObjectId===this.BlockID){const t=this.Resize(T3Gv.opt.actionSvgObject,T3Gv.opt.actionNewBBox,this,e);T3Gv.opt.actionBBox.x+=t.x,T3Gv.opt.actionBBox.y+=t.y,T3Gv.opt.actionStartX+=t.x,T3Gv.opt.actionStartY+=t.y,this.Frame.x+=t.x,this.Frame.y+=t.y,this.inside.x+=t.x,this.inside.y+=t.y,this.trect.x+=t.x,this.trect.y+=t.y}}HandleActionTriggerDoAutoScroll(){T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleActionTriggerDoAutoScroll",100);let t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);if(this.PinAction(t),t=DrawUtil.DoAutoGrowDrag(t),T3Gv.docUtil.ScrollToPosition(t.x,t.y),T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.Rotate&&T3Gv.opt.rotateObjectRadians){let e=t.x,i=t.y;const n={x:e,y:i},s={},a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1).Frame;s.x=a.x+a.width/2,s.y=a.y+a.height/2;const o=T3Gv.opt.RotatePointAroundPoint(s,n,T3Gv.opt.rotateObjectRadians);e=o.x,i=o.y,t.x=e,t.y=i}this.HandleActionTriggerTrackCommon(t.x,t.y)}AutoScrollCommon(t,e,i){LogUtil.Debug("= S.BaseShape - AutoScrollCommon input:",{event:t,enableSnap:e,autoScrollCallback:i});let n=!1;T3Gv.opt.OverrideSnaps(t)&&(e=!1);const s=t.gesture.center.clientX,a=t.gesture.center.clientY;let o=s,r=a;const l=T3Gv.opt.svgDoc.docInfo;if(s>=l.dispX+l.dispWidth-4?(n=!0,o=l.dispX+l.dispWidth-4+32):s<l.dispX&&(n=!0,o=l.dispX-32),a>=l.dispY+l.dispHeight-4?(n=!0,r=l.dispY+l.dispHeight-4+32):a<l.dispY&&(n=!0,r=l.dispY-32),n){if(e&&T3Gv.docUtil.docConfig.enableSnap){const t=T3Gv.docUtil.SnapToGrid({x:o,y:r});o=t.x,r=t.y}return T3Gv.opt.autoScrollXPos=o,T3Gv.opt.autoScrollYPos=r,-1!==T3Gv.opt.autoScrollTimerId?(LogUtil.Debug("= S.BaseShape - AutoScrollCommon output: false (timer already set)"),!1):(T3Gv.opt.autoScrollTimer=new T3Timer(this),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout(i,0),LogUtil.Debug("= S.BaseShape - AutoScrollCommon output: false (timer started)"),!1)}return this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseShape - AutoScrollCommon output: true"),!0}PinAction(t){LogUtil.Debug("= S.BaseShape - PinAction input:",t);const e=OptConstant.Common.KnobSize;let i={},n={};if(0!==this.RotationAngle){const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t),Utils2.GetPolyRect(n,t)}else n=this.Frame;if(i.left=n.x-this.r.x+e/2,i.top=n.y-this.r.y+e/2,i.right=this.r.x+this.r.width-(n.x+n.width)+e/2,i.bottom=this.r.y+this.r.height-(n.y+n.height)+e/2,t.x<i.left&&(t.x=i.left),t.y<i.top&&(t.y=i.top),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const e=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;t.x>e.dim.x-i.right&&(t.x=e.dim.x-i.right),t.y>e.dim.y-i.bottom&&(t.y=e.dim.y-i.bottom)}return LogUtil.Debug("= S.BaseShape - PinAction output:",t),t}ActionApplySnaps(t,e){LogUtil.Debug("= S.BaseShape - ActionApplySnaps input:",{coords:t,triggerType:e});let i=this.GetSnapRect(),n=!1,s=[],a={},o={x:null,y:null};const r=OptConstant.ActionTriggerType;let l;const h=e=>{a.x=e.x,a.y=e.y,a.width=e.width,a.height=t.y-e.y,a.height<0?(a.y=t.y,a.height=e.y-t.y,s.push("left_top","right_top")):s.push("left_bottom","right_bottom"),n=!0},c=e=>{a.x=e.x,a.y=t.y,a.width=e.width,a.height=e.y+e.height-t.y,a.height<0?(a.y=e.y,a.height=t.y-e.y,s.push("left_bottom","right_bottom")):s.push("left_top","right_top"),n=!0},u=e=>{a.y=e.y,a.x=t.x,a.height=e.height,a.width=e.x+e.width-t.x,a.width<0?(a.x=e.x,a.width=t.x-e.x,s.push("above_right","below_right")):s.push("above_left","below_left"),n=!0},d=e=>{a.y=e.y,a.x=e.x,a.height=e.height,a.width=t.x-e.x,a.width<0?(a.x=t.x,a.width=e.x-t.x,s.push("above_left","below_left")):s.push("above_right","below_right"),n=!0};if(DrawUtil.AllowSnapToShapes()){switch(e){case r.BottomCenter:h(i);break;case r.BottomLeft:h(i),u(Utils1.DeepCopy(a));break;case r.BottomRight:h(i),d(Utils1.DeepCopy(a));break;case r.CenterLeft:u(i);break;case r.CenterRight:d(i);break;case r.TopCenter:c(i);break;case r.TopRight:c(i),d(Utils1.DeepCopy(a));break;case r.TopLeft:c(i),u(Utils1.DeepCopy(a))}n&&(l=new DynamicGuides,this.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(o=DynamicUtil.DynamicSnapsGetSnapObjects(this.BlockID,a,l,null,s),null!==o.x&&(t.x+=o.x),null!==o.y&&(t.y+=o.y)))}if(T3Gv.docUtil.docConfig.enableSnap){const e=T3Gv.docUtil.SnapToGrid(t);null===o.x&&(t.x=e.x),null===o.y&&(t.y=e.y)}return LogUtil.Debug("= S.BaseShape - ActionApplySnaps output:",l),l}LMActionTrack(t){if(Utils2.StopPropagationAndDefaults(t),-1==T3Gv.opt.actionStoredObjectId)return!1;let e=null;const i=OptConstant.ActionTriggerType;e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1),T3Gv.opt.actionTriggerId!=OptConstant.ActionTriggerType.Rotate&&e.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!1);const n=e.Frame;let s=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);this.PinAction(s),s=DrawUtil.DoAutoGrowDrag(s);const a=T3Gv.opt.OverrideSnaps(t);let o=!1;switch(T3Gv.opt.actionTriggerId){case i.MODIFYSHAPE:case i.ROTATE:o=!0}let r=null;o||a||(r=this.ActionApplySnaps(s,T3Gv.opt.actionTriggerId));let l=s.x,h=s.y;if(T3Gv.opt.actionTriggerId!=OptConstant.ActionTriggerType.Rotate&&T3Gv.opt.rotateObjectRadians){const t={x:l,y:h},e={x:n.x+n.width/2,y:n.y+n.height/2},i=T3Gv.opt.RotatePointAroundPoint(e,t,T3Gv.opt.rotateObjectRadians);l=i.x,h=i.y,s.x=l,s.y=h}if(this.AutoScrollCommon(t,!0,"HandleActionTriggerDoAutoScroll")&&(s=this.LMActionDuringTrack(s),this.HandleActionTriggerTrackCommon(s.x,s.y,t),T3Gv.opt.actionTriggerId!=OptConstant.ActionTriggerType.Rotate&&e&&e.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!0),r)){const t=Utils1.DeepCopy(this.Frame);this.Frame=T3Gv.opt.actionNewBBox;const e=this.GetSnapRect();this.Frame=t,DynamicUtil.DynamicSnapsUpdateGuides(r,this.BlockID,e)}}LMActionRelease(t,e){LogUtil.Debug("S.BasicShape - LMActionRelease input:",{event:t,additionalData:e});try{let t=!1,i=!1;const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1);if(null==n)return;if(null==e){if(LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),null==T3Gv.opt.actionSvgObject)return;if(T3Gv.opt.actionStoredObjectId<0)return;let t;switch(i=!1,t={BlockID:T3Gv.opt.actionStoredObjectId,ActionTriggerID:T3Gv.opt.actionTriggerId,ActionData:T3Gv.opt.actionTriggerData},t.Frame=Utils1.DeepCopy(n.Frame),t.rotateEndRotation=T3Gv.opt.rotateEndRotation,DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.MovePolySeg:i=!0;{const e=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);t.left_sindent=e.left_sindent,t.right_sindent=e.right_sindent,t.top_sindent=e.top_sindent,t.bottom_sindent=e.bottom_sindent,t.tindent={},t.tindent.left=e.tindent.left,t.tindent.right=e.tindent.right,t.tindent.top=e.tindent.top,t.tindent.bottom=e.tindent.bottom,e.polylist&&(t.polylist=Utils1.DeepCopy(e.polylist)),e.VertexArray&&(t.VertexArray=Utils1.DeepCopy(e.VertexArray))}break;case OptConstant.ActionTriggerType.DimLineAdj:t.dimensionDeflectionH=this.dimensionDeflectionH,t.dimensionDeflectionV=this.dimensionDeflectionV;break;case OptConstant.ActionTriggerType.ContainerAdj:t.actionTableLastY=T3Gv.opt.actionTableLastY}n.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!1)}else T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.MovePolySeg&&(i=!0);if(T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.ContainerAdj)T3Gv.opt.moveList=[],T3Gv.opt.dragElementList.length=0,T3Gv.opt.dragBBoxList.length=0,T3Gv.opt.actionOldExtra=0,this.PrUpdateExtra(T3Gv.opt.actionTableLastY);else if(T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate)T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateEndRotation%360,T3Gv.opt.SetObjectAttributes(T3Gv.opt.actionStoredObjectId,{RotationAngle:T3Gv.opt.rotateEndRotation}),T3Gv.opt.SetObjectFrame(T3Gv.opt.actionStoredObjectId,n.Frame),this.UpdateDimensionLines(T3Gv.opt.actionSvgObject);else if(!i){const e=Utils1.DeepCopy(n.Frame);T3Gv.opt.SetObjectFrame(T3Gv.opt.actionStoredObjectId,e),this.polylist&&this.ShapeType===OptConstant.ShapeType.Polygon&&this.ScaleObject(0,0,0,0,0,0),t=!0}this.LMActionPostRelease(T3Gv.opt.actionStoredObjectId),null==e&&n.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!0),(""!==this.HyperlinkText||-1!==this.NoteID||this.HasFieldData())&&ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LayerUtil.ShowOverlayLayer(),DrawUtil.CompleteOperation(),LogUtil.Debug("S.BasicShape - LMActionRelease output: completed")}catch(i){throw this.LMActionClickExpCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}LMActionPreTrack(t,e){this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1))}LMActionDuringTrack(t){return t}LMActionPostRelease(t){switch(T3Gv.opt.linkParams=null,OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.CenterLeft:case OptConstant.ActionTriggerType.CenterRight:this.sizedim.width=this.Frame.width;break;case OptConstant.ActionTriggerType.TopCenter:case OptConstant.ActionTriggerType.BottomCenter:this.sizedim.height=this.Frame.height;break;default:this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height}}LMSetupActionClick(t,e,i,n,s){let a;T3Gv.opt.eventTimestamp=Date.now();const o=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),r=DrawUtil.DoAutoGrowDrag(o),l=r.x,h=r.y;if(n){const t=ObjectUtil$1.GetObjectPtr(i,!1);t&&t.RotationAngle}else{const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(null===e)return!1;const s=e.GetID();i=parseInt(s.substring(OptConstant.Common.Action.length,s.length),10);const o=e.GetTargetForEvent(t);if(null==o)return!1;n=o.GetID(),a=o.GetUserData(),T3Gv.opt.SetControlDragMode(o)}T3Gv.opt.actionStoredObjectId=i;const c=ObjectUtil$1.GetObjectPtr(i,!0);T3Gv.opt.actionTriggerId=n,T3Gv.opt.actionTriggerData=a;const u=OptConstant.ActionTriggerType;switch(n){case u.CONNECTOR_PERP:case u.CONNECTOR_ADJ:case u.CONNECTOR_HOOK:case u.LINESTART:case u.LINEEND:const e=this.getConnectedObject();return e&&(T3Gv.opt.actionStoredObjectId=e.BlockID,this.ConnectorLMActionClick(t,!0)),!1}n===OptConstant.ActionTriggerType.MovePolySeg&&(T3Gv.opt.actionTriggerData={hitSegment:a,moveAngle:9999}),T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(i),c.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!1),this.LMActionPreTrack(i,n),(""!==this.HyperlinkText||-1!==this.NoteID||this.HasFieldData())&&this.HideAllIcons(T3Gv.opt.svgDoc,T3Gv.opt.actionSvgObject),T3Gv.opt.actionLockAspectRatio=t.gesture.srcEvent.shiftKey,this.ResizeAspectConstrain&&(T3Gv.opt.actionLockAspectRatio=!T3Gv.opt.actionLockAspectRatio);const d=c.Frame;if(T3Gv.opt.actionLockAspectRatio&&(0===d.height?T3Gv.opt.actionLockAspectRatio=!1:(T3Gv.opt.actionAspectRatioWidth=d.width,T3Gv.opt.actionAspectRatioHeight=d.height)),T3Gv.opt.actionBBox=Utils1.DeepCopy(d),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(d),LayerUtil.HideOverlayLayer(),T3Gv.opt.rotateObjectRadians=-this.RotationAngle/(180/NvConstant.Geometry.PI),T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.ContainerAdj){const t={x:l,y:h};T3Gv.opt.actionStartX=t.x,T3Gv.opt.actionStartY=t.y;const e=this.PrGetAdjustShapeList();if(!e)return!1;T3Gv.opt.moveList=e.list,T3Gv.opt.dragElementList=e.svglist,T3Gv.opt.dragBBoxList=e.framelist,T3Gv.opt.actionTableLastY=0,T3Gv.opt.actionOldExtra=e.oldextra,T3Gv.opt.theActionContainerArrangement=e.arrangement}else if(T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate)T3Gv.opt.rotateKnobCenterDivisor=this.RotateKnobCenterDivisor(),T3Gv.opt.rotateStartRotation=this.RotationAngle,T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateStartRotation,T3Gv.opt.rotatePivotX=d.x+d.width/T3Gv.opt.rotateKnobCenterDivisor.x,T3Gv.opt.rotatePivotY=d.y+d.height/T3Gv.opt.rotateKnobCenterDivisor.y,T3Gv.opt.actionStartX=l,T3Gv.opt.actionStartY=h;else{const t={x:l,y:h},e={x:d.x+d.width/2,y:d.y+d.height/2},i=T3Gv.opt.RotatePointAroundPoint(e,t,T3Gv.opt.rotateObjectRadians);T3Gv.opt.actionStartX=i.x,T3Gv.opt.actionStartY=i.y,T3Gv.opt.actionTableLastX=i.x,T3Gv.opt.actionTableLastY=i.y}return!0}getConnectedObject(){if(this.hooks.length){const t=this.hooks[0].objid;return ObjectUtil$1.GetObjectPtr(t,!1)}return null}ConnectorLMActionClick(t,e){LogUtil.Debug("= S.BaseShape - ConnectorLMActionClick input:",{event:t,triggerElement:e}),this.BaseLineLMActionClick(t,e),LogUtil.Debug("= S.BaseShape - ConnectorLMActionClick output")}BaseLineLMActionClick(t,e){LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick input:",{event:t,triggerElement:e});try{const i=this.BlockID,n=ObjectUtil$1.GetObjectPtr(i,!1);if(!(n&&n instanceof BaseDrawObject$1))return LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick output: base object not valid"),!1;if(DrawUtil.InitializeAutoGrowDrag(0,this.BlockID),!this.LMSetupActionClick(t,e))return void LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick output: LMSetupActionClick failed");const s=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ActionTrackHandlerFactory(s)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ActionReleaseHandlerFactory(s)),LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick output: completed successfully")}catch(i){throw this.LMActionClickExpCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}LMActionClickExpCleanup(t){LogUtil.Debug("= S.BaseShape - LMActionClickExpCleanup input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),T3Gv.opt.ob={},T3Gv.opt.linkParams=null,T3Gv.opt.actionTriggerId=-1,T3Gv.opt.actionTriggerData=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LayerUtil.HideOverlayLayer(),LogUtil.Debug("= S.BaseShape - LMActionClickExpCleanup output: cleanup complete")}LMActionClick(t,e,i,n,s){LogUtil.Debug("= S.BaseShape - LMActionClick input:",{event:t,triggerElement:e,additionalId:i,autoGrowParam:n,extraParam:s}),Utils2.StopPropagationAndDefaults(t);try{const a=this.BlockID,o=ObjectUtil$1.GetObjectPtr(a,!1);if(!(o&&o instanceof BaseDrawObject$1))return LogUtil.Debug("= S.BaseShape - LMActionClick output: Invalid drawing object"),!1;if(DrawUtil.InitializeAutoGrowDrag(n),!this.LMSetupActionClick(t,e,i,n,s))return void LogUtil.Debug("= S.BaseShape - LMActionClick output: LMSetupActionClick failed");const r=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ActionTrackHandlerFactory(r)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ActionReleaseHandlerFactory(r)),LogUtil.Debug("= S.BaseShape - LMActionClick output: completed successfully")}catch(a){throw this.LMActionClickExpCleanup(a),T3Gv.opt.ExceptionCleanup(a),a}}StartNewObjectDrawTrackCommon(t,e,i){LogUtil.Debug("= S.BaseShape - StartNewObjectDrawTrackCommon input:",{currentX:t,currentY:e,event:i});let n=t-T3Gv.opt.actionStartX,s=e-T3Gv.opt.actionStartY,a=Utils1.DeepCopy(T3Gv.opt.actionBBox);a.width=a.width+n,a.height=a.height+s;let o={x:a.x+a.width,y:a.y+a.height},r=T3Gv.opt.OverrideSnaps(i);T3Gv.docUtil.docConfig.enableSnap&&!r&&(o=T3Gv.docUtil.SnapToGrid(o),a.width=o.x-a.x,a.height=o.y-a.y),a.width<0&&(a.x=t,a.width=-a.width),a.height<0&&(a.y=e,a.height=-a.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(a),this.UpdateFrame(T3Gv.opt.actionNewBBox),this.Resize(T3Gv.opt.actionSvgObject,a,this),LogUtil.Debug("= S.BaseShape - StartNewObjectDrawTrackCommon output:",T3Gv.opt.actionNewBBox)}StartNewObjectDrawDoAutoScroll(){LogUtil.Debug("= S.BaseShape - StartNewObjectDrawDoAutoScroll input"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("StartNewObjectDrawDoAutoScroll",100);let t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);t=DrawUtil.DoAutoGrowDrag(t),T3Gv.docUtil.ScrollToPosition(t.x,t.y),this.StartNewObjectDrawTrackCommon(t.x,t.y,null),LogUtil.Debug("= S.BaseShape - StartNewObjectDrawDoAutoScroll output:",t)}LMDrawTrack(t){if(LogUtil.Debug("= S.BaseShape - LMDrawTrack input:",t),-1===T3Gv.opt.actionStoredObjectId)return LogUtil.Debug("= S.BaseShape - LMDrawTrack output: No action stored object, returning false"),!1;let e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=T3Gv.opt.OverrideSnaps(t);T3Gv.docUtil.docConfig.enableSnap&&!i&&(e=T3Gv.docUtil.SnapToGrid(e)),e=DrawUtil.DoAutoGrowDrag(e);let n=e.x,s=e.y;this.AutoScrollCommon(t,!0,"StartNewObjectDrawDoAutoScroll")&&(this.LMDrawDuringTrack(n,s),this.StartNewObjectDrawTrackCommon(n,s,t)),LogUtil.Debug("= S.BaseShape - LMDrawTrack output:",{posX:n,posY:s})}LMDrawRelease(t){LogUtil.Debug("= S.BaseShape - LMDrawRelease input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer();const e={x:T3Gv.opt.actionNewBBox.x,y:T3Gv.opt.actionNewBBox.y,width:T3Gv.opt.actionNewBBox.width,height:T3Gv.opt.actionNewBBox.height};T3Gv.opt.SetObjectFrame(T3Gv.opt.actionStoredObjectId,e),this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId);DrawUtil.PostObjectDraw(),LogUtil.Debug("= S.BaseShape - LMDrawRelease output:",{newBoundingBox:e,collaborationData:{}})}LMDrawPreTrack(){LogUtil.Debug("= S.BaseShape - LMDrawPreTrack - Input:");return LogUtil.Debug("= S.BaseShape - LMDrawPreTrack - Output:",true),true}LMDrawDuringTrack(t,e){LogUtil.Debug("= S.BaseShape - LMDrawDuringTrack input:",{posX:t,posY:e});const i={x:t,y:e};return LogUtil.Debug("= S.BaseShape - LMDrawDuringTrack output:",i),i}LMDrawPostRelease(){}LMDrawClickExceptionCleanup(t){LogUtil.Debug("= S.BaseShape - LMDrawClickExceptionCleanup input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),T3Gv.opt.linkParams=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),LogUtil.Debug("= S.BaseShape - LMDrawClickExceptionCleanup output: cleanup complete")}LMDrawClick(t,e){LogUtil.Debug("= S.BaseShape - LMDrawClick input:",{initialX:t,initialY:e});try{this.Frame.x=t,this.Frame.y=e,this.prevBBox=Utils1.DeepCopy(this.Frame),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_DrawReleaseHandlerFactory(this)),LogUtil.Debug("= S.BaseShape - LMDrawClick output:",{Frame:this.Frame,prevBBox:this.prevBBox})}catch(i){throw this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}RotateKnobCenterDivisor(){LogUtil.Debug("= S.BaseShape - RotateKnobCenterDivisor input: no parameters");const t={x:2,y:2};return LogUtil.Debug("= S.BaseShape - RotateKnobCenterDivisor output:",t),t}OffsetShape(t,e,i,n){if(LogUtil.Debug("= S.BaseShape - OffsetShape input:",{offsetX:t,offsetY:e,childShapes:i,linkFlags:n}),this.moreflags&OptConstant.ObjMoreFlags.Container&&i)for(let s=0;s<i.length;s++){const a=i[s],o=ObjectUtil$1.GetObjectPtr(a,!0);if(o){const i=n?n[o.BlockID]:null;o.OffsetShape(t,e,i),OptCMUtil.SetLinkFlag(a,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(a)}}this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.inside.x+=t,this.inside.y+=e,this.trect.x+=t,this.trect.y+=e,this.GetGraph(!0)&&T3Gv.opt.GraphShift(this,t,e),LogUtil.Debug("= S.BaseShape - OffsetShape output:",{Frame:this.Frame,r:this.r,inside:this.inside,trect:this.trect})}SetShapeOrigin(t,e,i){LogUtil.Debug("= S.BaseShape - SetShapeOrigin input:",{newX:t,newY:e,childShapes:i});let n=0,s=0;null!=t&&(n=t-this.Frame.x),null!=e&&(s=e-this.Frame.y),this.OffsetShape(n,s,i),LogUtil.Debug("= S.BaseShape - SetShapeOrigin output:",{offsetX:n,offsetY:s})}SetShapeIndent(t){LogUtil.Debug("= S.BaseShape - SetShapeIndent input:",{applyIndents:t});let e=this.inside.width,i=this.inside.height,n=1,s=1,a=1,o=1;t&&(n=1-(this.left_sindent+this.right_sindent),s=1-(this.bottom_sindent+this.top_sindent),a=1-(this.left_sindent+this.right_sindent),o=1-(this.bottom_sindent+this.top_sindent)),this.tindent.left=this.left_sindent*e/n,this.tindent.top=this.top_sindent*i/s,this.tindent.right=this.right_sindent*e/a,this.tindent.bottom=this.bottom_sindent*i/o,LogUtil.Debug("= S.BaseShape - SetShapeIndent output:",this.tindent)}UpdateFrame(t){LogUtil.Debug("= S.BaseShape - UpdateFrame input:",t);let e=0,i=0;t&&super.UpdateFrame(t),Utils2.CopyRect(this.r,this.Frame),this.StyleRecord&&(this.objecttype!==NvConstant.FNObjectTypes.FlWall&&(this.StyleRecord.Line.BThick=0),this.StyleRecord.Line.BThick?null==this.polylist?e=0:i=this.StyleRecord.Line.Thickness/2:i=e=this.StyleRecord.Line.Thickness/2,this.CalcEffectSettings(this.Frame,this.StyleRecord,!1)),T3Gv.opt.SetShapeR(this),Utils2.CopyRect(this.inside,this.Frame),Utils2.InflateRect(this.inside,-e,-e),Utils2.CopyRect(this.trect,this.Frame),Utils2.InflateRect(this.trect,-i,-i),this.SetShapeIndent(!1),Utils2.SubRect(this.trect,this.tindent),LogUtil.Debug("= S.BaseShape - UpdateFrame output:",{r:this.r,inside:this.inside,trect:this.trect,Frame:this.Frame})}GetSVGFrame(t=this.Frame){LogUtil.Debug("= S.BaseShape - GetSVGFrame input:",t);const e={};return Utils2.CopyRect(e,t),this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(e,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),LogUtil.Debug("= S.BaseShape - GetSVGFrame output:",e),e}GetSnapRect(){LogUtil.Debug("= S.BaseShape - GetSnapRect input");const t={};if(0!==this.RotationAngle){const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,i,e),Utils2.GetPolyRect(t,e)}else Utils2.CopyRect(t,this.Frame);return LogUtil.Debug("= S.BaseShape - GetSnapRect output:",t),t}CanSnapToShapes(){LogUtil.Debug("= S.BaseShape - CanSnapToShapes input");const t=NvConstant.FNObjectTypes;let e;if(this.objecttype===t.ShapeContainer)e=-1;else e=this.BlockID;return LogUtil.Debug("= S.BaseShape - CanSnapToShapes output:",e),e}IsSnapTarget(){LogUtil.Debug("= S.BaseShape - IsSnapTarget input");const t=NvConstant.FNObjectTypes;let e;if(this.objecttype===t.ShapeContainer)e=!1;else e=!(this.hooks.length||T3Gv.opt.FindChildArray(this.BlockID,-1)>=0);return LogUtil.Debug("= S.BaseShape - IsSnapTarget output:",e),e}GetAlignRect(){LogUtil.Debug("= S.BaseShape - GetAlignRect input");const t=Utils1.DeepCopy(this.Frame);if(0!==this.RotationAngle){const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,i,e),Utils2.GetPolyRect(t,e)}return LogUtil.Debug("= S.BaseShape - GetAlignRect output:",t),t}GetCustomConnectPointsDirection(t){LogUtil.Debug("= S.BaseShape - GetCustomConnectPointsDirection input:",{direction:t});let e,i=-1,n=null,s=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints,a=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcForceEnd,null),o=1,r=1,l=1,h=1;const c=OptConstant.Common.DimMax,u=OptConstant.ActionArrow;let d={x:0,y:0,width:c,height:c};if(this.RotationAngle){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(d,t,a)}const p=(t,s)=>{null===n?(i=s,n=Math.abs(t-c/2)):(e=Math.abs(t-c/2),e<n&&(i=s,n=e))};if(a.length,s){o=r=l=h=0,d=new Rectangle(0,0,0,0);const e=a.length;Utils2.GetPolyRect(d,a);for(let t=0;t<e;t++)a[t].x-=d.x,a[t].y-=d.y;if(d.width<1e3&&Utils2.InflateRect(d,1e3,0),d.height<1e3&&Utils2.InflateRect(d,0,1e3),d.height>d.width)for(let i=0;i<e;i++)a[i].y<d.height/6?(o++,t===u.Up&&p(a[i].x,i)):a[i].y>=5*d.height/6?(r++,t===u.Down&&p(a[i].x,i)):a[i].x<d.width/6?(l++,t===u.Left&&p(a[i].y,i)):a[i].x>=5*d.width/6&&(h++,t===u.Right&&p(a[i].y,i));else for(let i=0;i<e;i++)a[i].x<d.width/6?(l++,t===u.Left&&p(a[i].y,i)):a[i].x>=5*d.width/6?(h++,t===u.Right&&p(a[i].y,i)):a[i].y<d.height/6?(o++,t===u.Up&&p(a[i].x,i)):a[i].y>=5*d.height/6&&(r++,t===u.Down&&p(a[i].x,i))}const g={left:l,right:h,top:o,bottom:r,index:i};return LogUtil.Debug("= S.BaseShape - GetCustomConnectPointsDirection output:",g),g}AdjustAutoInsertShape(t,e,i){LogUtil.Debug("= S.BaseShape - AdjustAutoInsertShape input:",{event:t,isVertical:e,isRotated:i});let n=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints,s=0,a=0,o=0,r=0,l=!1,h=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcForceEnd,null),c=h.length<2,u=!1,d=[this.BlockID];if(c?(T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.AutoSinglePoint=!0),l=!0):(T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.AutoSinglePoint=!1),l=!1),n){let t=new Rectangle(0,0,0,0),n=h.length;Utils2.GetPolyRect(t,h);for(let e=0;e<n;e++)h[e].x-=t.x,h[e].y-=t.y;if(t.width<1e3&&Utils2.InflateRect(t,1e3,0),t.height<1e3&&Utils2.InflateRect(t,0,1e3),t.height>t.width){for(let e=0;e<n;e++)h[e].y<t.height/6?s++:h[e].y>=5*t.height/6?a++:h[e].x<t.width/6?o++:h[e].x>=5*t.width/6&&r++;(0===o&&0===r&&s&&a||0===o&&0===r&&l&&(s||a))&&(u=!0)}else{for(let e=0;e<n;e++)h[e].x<t.width/6?o++:h[e].x>=5*t.width/6?r++:h[e].y<t.height/6?s++:h[e].y>=5*t.height/6&&a++;(0===s&&0===a&&o&&r||0===s&&0===a&&l&&(o||r))&&(u=!0)}if(!l)if(u){if(e){if(0!==this.RotationAngle&&180!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(0,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,0)}u=!0}}else if(-90!==this.RotationAngle&&90!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(-90,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,-90)}u=!0}}else if(e){if(-90!==this.RotationAngle&&90!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(-90,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,-90)}u=!0}}else if(0!==this.RotationAngle&&180!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(0,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,0)}u=!0}}return LogUtil.Debug("= S.BaseShape - AdjustAutoInsertShape output:",u),u}TRectToFrame(t,e){LogUtil.Debug("= S.BaseShape - TRectToFrame input:",{rect:t,maintainSize:e});let i=0,n=0,s=0;this.StyleRecord.Line.BThick&&null==this.polylist?(this.StyleRecord.Line.Thickness,i=0):i=this.StyleRecord.Line.Thickness/2,this.trect=Utils1.DeepCopy(t);const a=Utils1.DeepCopy(this.Frame);if(this.inside=new Rectangle(t.x,t.y,t.width,t.height),this.SetShapeIndent(!0),Utils2.Add2Rect(this.inside,this.tindent),this.Frame=Utils1.DeepCopy(this.inside),Utils2.InflateRect(this.Frame,i,i),e||(this.Frame.width<this.sizedim.width&&(n=this.sizedim.width-this.Frame.width,this.Frame.x=a.x),this.Frame.height<this.sizedim.height&&(s=this.sizedim.height-this.Frame.height,this.Frame.y=a.y)),n>0||s>0){const t=Utils1.DeepCopy(this.Frame);t.width+=n,t.height+=s,this.UpdateFrame(t)}else Utils2.CopyRect(this.r,this.Frame),T3Gv.opt.SetShapeR(this);LogUtil.Debug("= S.BaseShape - TRectToFrame output:",{Frame:this.Frame,r:this.r,inside:this.inside})}SetSize(t,e,i){LogUtil.Debug("= S.BaseShape - SetSize input:",{newWidth:t,newHeight:e,actionType:i});let n={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};if(t&&(n.width=t),e&&(n.height=e),t||e){const s=T3Gv.opt.actionBBox,a=T3Gv.opt.actionNewBBox;T3Gv.opt.actionBBox=Utils1.DeepCopy(this.Frame),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(this.Frame),this.HandleActionTriggerCallResize(n,i,null),T3Gv.opt.actionBBox=s,T3Gv.opt.actionNewBBox=a,i!==OptConstant.ActionTriggerType.LineThickness&&(t&&(this.sizedim.width=this.Frame.width),e&&(this.sizedim.height=this.Frame.height)),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let t=0;t<this.hooks.length;t++)OptCMUtil.SetLinkFlag(this.hooks[t].objid,DSConstant.LinkFlags.Move);if(this instanceof Instance.Shape.Polygon){const t=this.RegenerateVectors(n.width,n.height);t&&(this.VertexArray=t),this.polylist&&this.ShapeType===OptConstant.ShapeType.Polygon&&this.ScaleObject(0,0,0,0,0,0)}ObjectUtil$1.AddToDirtyList(this.BlockID),this.rflags&&(t&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1)),e&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)))}LogUtil.Debug("= S.BaseShape - SetSize output:",{Frame:this.Frame,sizedim:this.sizedim,rflags:this.rflags})}UpdateDimensions(t,e,i){LogUtil.Debug("= S.BaseShape - UpdateDimensions input:",{newWidth:t,newHeight:e,maintainAspectRatio:i});const n={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};t&&(n.width=t),e&&(n.height=e),this.UpdateFrame(n),LogUtil.Debug("= S.BaseShape - UpdateDimensions output:",n)}GetHookFlags(){LogUtil.Debug("= S.BaseShape - GetHookFlags input");const t=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcArrayMod|NvConstant.HookFlags.LcAttachToLine;return LogUtil.Debug("= S.BaseShape - GetHookFlags output:",t),t}AllowLink(){LogUtil.Debug("= S.BaseShape - AllowLink input");let t,e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),i=this.flags&NvConstant.ObjFlags.DropOnTable;return e&&(t=e.flags&OptConstant.SessionFlags.SLink||e.flags&OptConstant.SessionFlags.AttLink||i),LogUtil.Debug("= S.BaseShape - AllowLink output:",t),t}GetHookPoints(){LogUtil.Debug("= S.BaseShape - GetHookPoints input");let t=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;if(t){let t=this.ConnectPoints,e=[];for(let i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,id:OptConstant.HookPts.CustomBase+i});return LogUtil.Debug("= S.BaseShape - GetHookPoints output:",e),e}let e=[{x:OptConstant.Common.DimMax/2,y:0,id:OptConstant.HookPts.KTC},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/2,id:OptConstant.HookPts.KRC},{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax,id:OptConstant.HookPts.KBC},{x:0,y:OptConstant.Common.DimMax/2,id:OptConstant.HookPts.KLC}];return LogUtil.Debug("= S.BaseShape - GetHookPoints output:",e),e}SetHookAlign(t,e){let i,n,s;switch(LogUtil.Debug("= S.BaseShape - SetHookAlign input:",{hookPoint:t,alignType:e}),t){case OptConstant.HookPts.AKCL:i=T3Gv.opt.FindChildArray(this.BlockID,-1),i>=0&&(n=ObjectUtil$1.GetObjectPtr(i,!1),n&&(s=n.arraylist.styleflags&OptConstant.AStyles.FlowConn&&!(n.arraylist.styleflags&OptConstant.AStyles.Linear),n.hooks.length&&0===n.hooks[0].connect.x&&!s&&n.SetDirection(!0,!1,!1)));break;case OptConstant.HookPts.AKCR:i=T3Gv.opt.FindChildArray(this.BlockID,-1),i>=0&&(n=ObjectUtil$1.GetObjectPtr(i,!1),n&&(s=n.arraylist.styleflags&OptConstant.AStyles.FlowConn&&!(n.arraylist.styleflags&OptConstant.AStyles.Linear),n.hooks.length&&n.hooks[0].connect.x===OptConstant.Common.DimMax&&!s&&n.SetDirection(!0,!1,!1)))}LogUtil.Debug("= S.BaseShape - SetHookAlign output")}HookToPoint(t,e){LogUtil.Debug("= S.BaseShape - HookToPoint input:",{hookId:t,hookFlags:e});let i=[],n=[{x:0,y:0}],s={},a=-1,o=0;const r=OptConstant.HookPts,l=OptConstant.Common.DimMax,h=NvConstant.HookFlags;if(this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat&&this.PrFormat(this.BlockID),t===r.KAT)n[0].x=this.attachpoint.x,n[0].y=this.attachpoint.y,this.extraflags&OptConstant.ExtraFlags.FlipHoriz&&(n[0].x=l-n[0].x),this.extraflags&OptConstant.ExtraFlags.FlipVert&&(n[0].y=l-n[0].y);else if(t===r.KATD)n[0].x=this.attachpoint.x,n[0].y=this.attachpoint.y;else switch(t){case r.KCTL:n[0].x=0,n[0].y=0;break;case r.KCTR:n[0].x=l,n[0].y=0;break;case r.KCBL:n[0].x=0,n[0].y=l;break;case r.KCBR:n[0].x=l,n[0].y=l;break;case r.KCT:n[0].x=l/2,n[0].y=0,o=h.LcVOnly;break;case r.KCB:n[0].x=l/2,n[0].y=l,o=h.LcVOnly;break;case r.KCL:n[0].x=0,n[0].y=l/2,o=h.LcHOnly;break;case r.KCC:n[0].x=l/2,n[0].y=l/2;break;case r.KCR:n[0].x=l,n[0].y=l/2,o=h.LcHOnly;break;default:if(i=this.GetHookPoints(),!i)return null;for(let e=0;e<i.length;e++)if(t===i[e].id){a=e,n[0].x=i[e].x,n[0].y=i[e].y;break}if(a<0)switch(t){case 1:a=1,n[0].x=l/2,n[0].y=0;break;case 2:a=1,n[0].x=l,n[0].y=l/2;break;case 3:a=1,n[0].x=l/2,n[0].y=l;break;case 4:a=1,n[0].x=0,n[0].y=l/2}if(a<0)return null}return this.RotationAngle||(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,OptConstant.ExtraFlags.FlipVert),s=this.GetPerimPts(-1,n,t,!1,null,-1),t===r.KATD&&(s[0].x-=this.hookdisp.x,s[0].y-=this.hookdisp.y),LogUtil.Debug("= S.BaseShape - HookToPoint output:",s[0]),s[0]}IsCoManager(t){LogUtil.Debug("= S.BaseShape - IsCoManager input:",t);let e=!1;if(this.hooks&&this.hooks.length){const i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(e=i.IsCoManager(t))}return LogUtil.Debug("= S.BaseShape - IsCoManager output:",e),e}RRectGetCornerSize(t){LogUtil.Debug("= S.BaseShape - RRectGetCornerSize input:",{customSize:t});let e=this.Frame.width,i=this.Frame.height,n=e;if(i<n&&(n=i),t&&(n=t),this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let t=OptConstant.Common.RRectFixedDim*this.shapeparam,e=.4*n;return t>e&&(t=e),LogUtil.Debug("= S.BaseShape - RRectGetCornerSize output:",t),t}let s=n*this.shapeparam;return LogUtil.Debug("= S.BaseShape - RRectGetCornerSize output:",s),s}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseShape - GetPerimPts input:",{points:t,targetPoints:e,hookId:i,rotate:n,table:s,needRotate:a});let o=0,r=[],l={};if(this.ShapeType===OptConstant.ShapeType.Rect&&(o=this.RRectGetCornerSize(),o>0))return this.RRectGetPerimPts(t,e,i,n,s,a);if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(l))return r.push(new Point$1(l.x,l.y)),null!=e[0].id&&(r[0].id=e[0].id),LogUtil.Debug("= S.BaseShape - GetPerimPts output:",r),r;for(let h=0;h<e.length;h++)r[h]={x:e[h].x/OptConstant.Common.DimMax*this.Frame.width+this.Frame.x,y:e[h].y/OptConstant.Common.DimMax*this.Frame.height+this.Frame.y,id:null!=e[h].id?e[h].id:0};if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,r)}return LogUtil.Debug("= S.BaseShape - GetPerimPts output:",r),r}RRectGetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseShape - RRectGetPerimPts input:",{e:t,targetPoints:e,hookId:i,rotate:n,table:s,needRotate:a});let o,r,l,h=[0,0];const c=OptConstant.Common.DimMax;let u=[],d={};if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(d))return u.push(new Point$1(d.x,d.y)),null!=e[0].id&&(u[0].id=e[0].id),LogUtil.Debug("= S.BaseShape - RRectGetPerimPts output:",u),u;if(i===OptConstant.HookPts.KAT&&null==s)return u=new BaseDrawObject$1(this).GetPerimPts(t,e,i,!1,s,a),LogUtil.Debug("= S.BaseShape - RRectGetPerimPts output:",u),u;if(this.flags&NvConstant.ObjFlags.UseConnect)for(let p=0;p<e.length;p++)u[p]={x:e[p].x/c*this.Frame.width+this.Frame.x,y:e[p].y/c*this.Frame.height+this.Frame.y,id:null!=e[p].id?e[p].id:0};else{u=new BaseDrawObject$1(this).GetPerimPts(t,e,i,!0,s,a),o=this.GetCornerSize()*OptConstant.Common.RoundFactor,r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);for(let t=0;t<u.length;t++)0===e[t].x&&0===e[t].y?(u[t].x+=o,u[t].y+=o):0===e[t].x&&e[t].y===c?(u[t].x+=o,u[t].y-=o):e[t].x===c&&0===e[t].y?(u[t].x-=o,u[t].y+=o):e[t].x===c&&e[t].y===c?(u[t].x-=o,u[t].y-=o):e[t].x<c/4?(l=PolyUtil.PolyGetIntersect(r,u[t].y,h,null,!1),l&&(u[t].x=h[0],l>1&&h[1]<u[t].x&&(u[t].x=h[1]))):e[t].x>3*c/4?(l=PolyUtil.PolyGetIntersect(r,u[t].y,h,null,!1),l&&(u[t].x=h[0],l>1&&h[1]>u[t].x&&(u[t].x=h[1]))):e[t].y<c/4?(l=PolyUtil.PolyGetIntersect(r,u[t].x,h,null,!0),l&&(u[t].y=h[0],l>1&&h[1]<u[t].y&&(u[t].y=h[1]))):e[t].y>3*c/4&&(l=PolyUtil.PolyGetIntersect(r,u[t].x,h,null,!0),l&&(u[t].y=h[0],l>1&&h[1]>u[t].y&&(u[t].y=h[1]))),null!=e[t].id&&(u[t].id=e[t].id)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,u)}return LogUtil.Debug("= S.BaseShape - RRectGetPerimPts output:",u),u}ChangeTarget(t,e,i,n,s,a){if(LogUtil.Debug("= S.BaseShape - ChangeTarget input:",{eventType:t,targetID:e,additionalData:i,flag:n,coordinates:s,needChangeTarget:a}),a){let t=OptAhUtil.GetGvSviOpt(this.BlockID);null===t&&(t=T3Gv.wallOpt)}LogUtil.Debug("= S.BaseShape - ChangeTarget output")}GetTargetPoints(t,e,i){LogUtil.Debug("= S.BaseShape - GetTargetPoints input:",{event:t,triggerType:e,objectID:i});const n=[{x:0,y:0},{x:OptConstant.Common.DimMax/4,y:0},{x:OptConstant.Common.DimMax/2,y:0},{x:3*OptConstant.Common.DimMax/4,y:0},{x:OptConstant.Common.DimMax,y:0},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/4},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/2},{x:OptConstant.Common.DimMax,y:3*OptConstant.Common.DimMax/4},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax},{x:3*OptConstant.Common.DimMax/4,y:OptConstant.Common.DimMax},{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax},{x:OptConstant.Common.DimMax/4,y:OptConstant.Common.DimMax},{x:0,y:OptConstant.Common.DimMax},{x:0,y:3*OptConstant.Common.DimMax/4},{x:0,y:OptConstant.Common.DimMax/2},{x:0,y:OptConstant.Common.DimMax/4}];let s=[];const a=this.flags&NvConstant.ObjFlags.ContConn&&null!==t,o=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints,r=OptConstant.Common.DimMax;if(i>=0&&ObjectUtil$1.GetObjectPtr(i,!1),a){const i=this.PolyGetTargets(t,e,this.Frame);return LogUtil.Debug("= S.BaseShape - GetTargetPoints output:",i),i}if(o){const t=this.ConnectPoints;for(let e=0;e<t.length;e++)s.push({x:t[e].x,y:t[e].y});if(this.extraflags&(OptConstant.ExtraFlags.FlipHoriz|OptConstant.ExtraFlags.FlipVert)){const t=new Rectangle(0,0,r,r);T3Gv.opt.FlipPoints(t,this.extraflags,s)}return LogUtil.Debug("= S.BaseShape - GetTargetPoints output:",s),s}return LogUtil.Debug("= S.BaseShape - GetTargetPoints output:",n),n}GetSegLFace(t,e,i){LogUtil.Debug("= S.BaseShape - GetSegLFace input:",{point:t,table:e,hookFlags:i});const n=OptConstant.Common.DimMax,s=(t,e)=>{const i=t.x-e.x,n=t.y-e.y;return i*i+n*n};let a=this.RotationAngle,o={...t};if(a){const t=-a/(180/NvConstant.Geometry.PI),e={x:0,y:0,width:n,height:n};Utils3.RotatePointsAboutCenter(e,t,[o])}const r=this.flags&NvConstant.ObjFlags.UseConnect;let l=[];if(r){if(l=this.ConnectPoints,a){const t=-a/(180/NvConstant.Geometry.PI),e={x:0,y:0,width:n,height:n};Utils3.RotatePointsAboutCenter(e,t,l)}const t=new Rectangle(0,0,0,0);Utils2.GetPolyRect(t,l);const e=[{x:n/2,y:0},{x:n/2,y:n},{x:0,y:n/2},{x:n,y:n/2}],i=[{x:t.x+t.width/2,y:t.y},{x:t.x+t.width/2,y:t.y+t.height},{x:t.x,y:t.y+t.height/2},{x:t.x+t.width,y:t.y+t.height/2}],r=t.height<1e3||t.width<1e3?e:i;let h=n*n*n,c=0;for(let n=0;n<r.length;n++){const t=s(r[n],o);t<h&&(h=t,c=n)}const u=OptConstant.HookPts.KTC+c;return LogUtil.Debug("= S.BaseShape - GetSegLFace output:",u),u}const h=o.x,c=n-o.x,u=o.y,d=n-o.y;let p=NvConstant.SegLDir.Klc;return c<h?(p=NvConstant.SegLDir.Krc,u<c?(p=NvConstant.SegLDir.Ktc,d<u&&(p=NvConstant.SegLDir.Kbc)):d<c&&(p=NvConstant.SegLDir.Kbc)):u<h?(p=NvConstant.SegLDir.Ktc,d<u&&(p=NvConstant.SegLDir.Kbc)):d<h&&(p=NvConstant.SegLDir.Kbc),LogUtil.Debug("= S.BaseShape - GetSegLFace output:",p),p}Resize(t,e,i,n,s){if(LogUtil.Debug("= S.BaseShape - Resize input:",{element:t,newSize:e,drawingObject:i,actionType:n,previousBBox:s}),null!=t){i.SetDimensionLinesVisibility(t,!1);const a=t.GetRotation();null==s&&(s=this.prevBBox),Utils1.DeepCopy(this.trect);const o=Utils1.DeepCopy(s),r=Utils1.DeepCopy(e),l=Utils1.DeepCopy(e),h=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(o,r,a);if(this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(l,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),n!==OptConstant.ActionTriggerType.MovePolySeg){t.SetSize(l.width,l.height),t.SetPos(l.x+h.x,l.y+h.y);let e=0;this.ShapeType===OptConstant.ShapeType.Rect&&(e=this.RRectGetCornerSize());const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i.SetSize(l.width,l.height);const n=t.GetElementById(OptConstant.SVGElementClass.Slop);n&&n.SetSize(l.width,l.height);const s=t.GetElementById(OptConstant.SVGElementClass.Hatch);s&&s.SetSize(l.width,l.height),e>0&&i.SetRRectSize&&(i.SetRRectSize(l.width,l.height,e,e),n&&n.SetRRectSize&&n.SetRRectSize(l.width,l.height,e,e),s&&s.SetRRectSize&&s.SetRRectSize(l.width,l.height,e,e))}const c=this.GetGraph(!0);return c?(T3Gv.opt.GraphFormat(this,c,this.Frame,!0),ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects()):this.LMResizeSVGTextObject(t,i,e),t.SetRotation(a),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseShape - Resize output:",h),h}}ResizeInTextEdit(t,e){LogUtil.Debug("= S.BaseShape - ResizeInTextEdit input:",{element:t,newSize:e});const i=t.GetRotation();this.SetDimensionLinesVisibility(t,!1);const n=Utils1.DeepCopy(this.Frame),s=Utils1.DeepCopy(e),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(n,s,i);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(a,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);let r=0;this.ShapeType===OptConstant.ShapeType.Rect&&(r=this.RRectGetCornerSize());const l=t.GetElementById(OptConstant.SVGElementClass.Shape);l&&l.SetSize(a.width,a.height);const h=t.GetElementById(OptConstant.SVGElementClass.Slop);h&&h.SetSize(a.width,a.height);const c=t.GetElementById(OptConstant.SVGElementClass.Hatch);return c&&c.SetSize(e.width,e.height),r>0&&(l&&l.SetRRectSize&&l.SetRRectSize(a.width,a.height,r,r),h&&h.SetRRectSize&&h.SetRRectSize(a.width,a.height,r,r),c&&c.SetRRectSize&&c.SetRRectSize(a.width,a.height,r,r)),t.SetRotation(i),UIUtil.UpdateDisplayCoordinates(e,null,null,this),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseShape - ResizeInTextEdit output:",o),o}Rotate(t,e){LogUtil.Debug("= S.BaseShape - Rotate input:",{element:t,angle:e}),t.SetRotation(e),LogUtil.Debug("= S.BaseShape - Rotate output")}ApplyStyles(t,e){LogUtil.Debug("= S.BaseShape - ApplyStyles input:",{element:t,styleRecord:e});let i=e.Fill.Paint.FillType,n=e.Line.Paint.FillType;const s=""!==this.ImageURL;let a=e.Fill.Paint.Color,o=e.Line.Paint.Color;if(!this.SymbolURL)if(s){let i="PROPFILL";const n={x:0,y:0,width:0,height:0};if(this.ImageHeader&&(this.ImageHeader.croprect&&(n.x=this.ImageHeader.croprect.left,n.y=this.ImageHeader.croprect.top,n.width=this.ImageHeader.croprect.right-this.ImageHeader.croprect.left,n.height=this.ImageHeader.croprect.bottom-this.ImageHeader.croprect.top),void 0!==this.ImageHeader.imageflags&&(this.ImageHeader.imageflags===NvConstant.ImageScales.AlwaysFit?i="NOPROP":this.ImageHeader.imageflags===NvConstant.ImageScales.PropFit&&(i="PROPFIT"))),-1!==this.BlobBytesID){const e=ObjectUtil$1.GetObjectPtr(this.BlobBytesID,!1);e&&e.ImageDir===StyleConstant.ImageDir.Svg?(null==this.SVGDim.width&&(this.SVGDim=Utils2.ParseSVGDimensions(e.Bytes)),t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n,imageWidth:this.SVGDim.width,imageHeight:this.SVGDim.height})):t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n})}else"SVG"===this.ImageURL.slice(-3).toUpperCase()?t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n,imageWidth:this.SVGDim.width,imageHeight:this.SVGDim.height}):t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n});const s=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,a=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;s&&t.SetMirror(s),a&&t.SetFlip(a),t.SetFillOpacity(e.Fill.Paint.Opacity)}else{switch(i){case NvConstant.FillTypes.Gradient:t.SetGradientFill(this.CreateGradientRecord(e.Fill.Paint.GradientFlags,a,e.Fill.Paint.Opacity,e.Fill.Paint.EndColor,e.Fill.Paint.EndOpacity));break;case NvConstant.FillTypes.RichGradient:t.SetGradientFill(this.CreateRichGradientRecord(e.Fill.Paint.GradientFlags));break;case NvConstant.FillTypes.Texture:const i={url:"",scale:1,alignment:e.Fill.Paint.TextureScale.AlignmentScalar},n=e.Fill.Paint.Texture;T3Gv.opt.TextureList.Textures[n]&&(i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.scale=T3Gv.opt.CalcTextureScale(e.Fill.Paint.TextureScale,i.dim.x),e.Fill.Paint.TextureScale.Scale=i.scale,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),t.SetTextureFill(i),t.SetFillOpacity(e.Fill.Paint.Opacity));break;case NvConstant.FillTypes.Transparent:t.SetFillColor("none");break;default:0===e.Fill.Paint.Color.indexOf("#0102")?(t.SetFillColor("none"),T3Gv.opt.Test3DGraph(t.parent,this.Frame.width,this.Frame.height,e.Fill.Paint.Color)):(t.SetFillColor(a),t.SetFillOpacity(e.Fill.Paint.Opacity))}switch(n){case NvConstant.FillTypes.Gradient:t.SetGradientStroke(this.CreateGradientRecord(e.Line.Paint.GradientFlags,o,e.Line.Paint.Opacity,e.Line.Paint.EndColor,e.Line.Paint.EndOpacity));break;case NvConstant.FillTypes.RichGradient:t.SetGradientStroke(this.CreateRichGradientRecord(e.Line.Paint.GradientFlags));break;case NvConstant.FillTypes.Texture:const i={url:"",scale:e.Line.Paint.TextureScale.Scale,alignment:e.Line.Paint.TextureScale.AlignmentScalar},n=e.Line.Paint.Texture;i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),t.SetTextureStroke(i),t.SetStrokeOpacity(e.Line.Paint.Opacity);break;default:t.SetStrokeColor(o),t.SetStrokeOpacity(e.Line.Paint.Opacity)}}LogUtil.Debug("= S.BaseShape - ApplyStyles output")}SetFillHatch(t,e,i){if(LogUtil.Debug("= S.BaseShape - SetFillHatch input:",{element:t,hatchType:e,color:i}),-1!==e&&0!==e){let n=e-1;const s={},a=[];n<10&&(n="0"+n),s.url=Constants.FilePath_Hatches+Constants.HatchName+n+".png",s.scale=1,s.alignment=0,s.dim={x:128,y:128},t.SetTextureFill(s);let o=this.StyleRecord.Line.Paint.Color;i&&(o=i),a.push({type:BConstant.EffectType.RECOLOR,params:{color:o}}),t.Effects().SetEffects(a,this.Frame)}else t.SetFillColor("none");LogUtil.Debug("= S.BaseShape - SetFillHatch output")}IsTransparent(){LogUtil.Debug("= S.BaseShape - IsTransparent input");const t=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent;return LogUtil.Debug("= S.BaseShape - IsTransparent output:",t),t}GetTargetRect(){LogUtil.Debug("= S.BaseShape - GetTargetRect input");const t={};return Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseShape - GetTargetRect output:",t),t}Hit(t,e,i,n){let s,a,o;LogUtil.Debug("= S.BaseShape - Hit input:",{point:t,isBorderOnly:e,isTransparent:i,hitResult:n});const r=[{x:t.x,y:t.y}];let l={};const h=this.StyleRecord.Line.Thickness/2;this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints&&(e=!1),0!==this.RotationAngle&&(s=this.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,s,r));const c={x:r[0].x,y:r[0].y};return Utils2.CopyRect(l,this.Frame),Utils2.InflateRect(l,h,h),o=Utils2.pointInRect(l,c)?NvConstant.HitCodes.Border:0,o&&(a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),T3Gv.opt.fromOverlayLayer||PolyUtil.PolyPtInPolygon(a,c)?(o=NvConstant.HitCodes.Inside,(this.IsTransparent()||e)&&(o=0,e=!0),a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e&&Utils3.LineDStyleHit(a,c,h,0,null)&&(o=NvConstant.HitCodes.Border)):o=0),n&&(n.hitcode=o),LogUtil.Debug("= S.BaseShape - Hit output:",o),o}AllowMaintainLink(){LogUtil.Debug("= S.BaseShape - AllowMaintainLink input");const t=!!(this instanceof Instance.Shape.Polygon&&this.hookflags&NvConstant.HookFlags.LcAttachToLine);return LogUtil.Debug("= S.BaseShape - AllowMaintainLink output:",t),t}PolyGetTargetPointList(t){LogUtil.Debug("= S.BaseShape - PolyGetTargetPointList input:",{rotationAngle:t});let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=0;return 0!==t&&(i=-t/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,i,e)),LogUtil.Debug("= S.BaseShape - PolyGetTargetPointList output:",e),e}PolyGetTargets(t,e,i){LogUtil.Debug("= S.BaseShape - PolyGetTargets input:",{event:t,hookFlags:e,frame:i});let n=-1,s=OptConstant.Common.LongIntMax;const a=[{x:0,y:0}],o=[],r={x:t.x,y:t.y},l={...i},h=this.PolyGetTargetPointList(e);if(!t)return null;!T3Gv.docUtil.docConfig.enableSnap||e&NvConstant.HookFlags.LcNoSnaps||(r.x=T3Gv.docUtil.SnapToGrid(r).x,r.y=T3Gv.docUtil.SnapToGrid(r).y,r.y=Math.max(r.y,i.y),r.y=Math.min(r.y,i.y+i.height),r.x=Math.max(r.x,i.x),r.x=Math.min(r.x,i.x+i.width));for(let c=1;c<h.length;c++){const t=h[c-1],e=h[c];if(Utils2.EqualPt(t,e))continue;const i=e.x-t.x||1,o=e.y-t.y||1;let l,u,d;Math.abs(o/i)>1?(u=r.y,l=t.x+(u-t.y)*(i/o),d=Math.abs(l-r.x)):(l=r.x,u=t.y+(l-t.x)*(o/i),d=Math.abs(u-r.y));const p=Utils2.Pt2Rect(t,e);Utils2.InflateRect(p,1,1),Utils2.pointInRect(p,{x:l,y:u})&&d<s&&(s=d,n=c,a[0].x=l,a[0].y=u)}if(n>=0){if(0!==this.RotationAngle){const t=this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(l,t,a)}const t=(a[0].x-i.x)/i.width*OptConstant.Common.DimMax,e=(a[0].y-i.y)/i.height*OptConstant.Common.DimMax;return o.push(new Point$1(t,e)),LogUtil.Debug("= S.BaseShape - PolyGetTargets output:",o),o}return LogUtil.Debug("= S.BaseShape - PolyGetTargets output: null"),null}LMAddSVGTextObject(t,e){LogUtil.Debug("= S.BaseShape - LMAddSVGTextObject input:",{svgDocument:t,targetElement:e});const i=Utils1.DeepCopy(this.Frame),n=Utils1.DeepCopy(this.trect);const s=T3Gv.stdObj.GetObject(this.DataID);if(null!=s){const a=t.CreateShape(OptConstant.CSType.Text);a.SetRenderingEnabled(!1),a.SetID(OptConstant.SVGElementClass.Text),a.SetUserData(-1);const o=this.StyleRecord;o.Line.BThick&&null==this.polylist&&Utils2.InflateRect(i,o.Line.BThick,o.Line.BThick),a.SetSpellCheck(this.AllowSpell()),a.InitDataSettings(this.fieldDataTableID,this.fieldDataElemID,this.dataStyleOverride),this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB||(a.SetPos(n.x-i.x,n.y-i.y),a.SetSize(n.width,n.height)),e&&(e.AddElement(a),e.isText=!0,e.textElem=a),s.Data.runtimeText?a.SetRuntimeText(s.Data.runtimeText):(a.SetText(""),a.SetParagraphAlignment(this.TextAlign),a.SetVerticalAlignment("middle")),s.Data.runtimeText||(s.Data.runtimeText=a.GetRuntimeText());let r=null;if(this.bInGroup&&a.DisableHyperlinks(!0),this.TextFlags&NvConstant.TextFlags.AttachA)switch(a.SetRenderingEnabled(!0),a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),r=a.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:a.SetPos(0,-r.height-this.TMargins.top),a.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:a.SetPos(this.Frame.width-r.width,-r.height-this.TMargins.top),a.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:a.SetPos(this.Frame.width/2-r.width/2,-r.height-this.TMargins.top),a.SetParagraphAlignment(TextConstant.TextAlign.Center)}else if(this.TextFlags&NvConstant.TextFlags.AttachB)switch(a.SetRenderingEnabled(!0),a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),r=a.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:a.SetPos(0,this.Frame.height+this.TMargins.bottom),a.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:a.SetPos(this.Frame.width-r.width,this.Frame.height+this.TMargins.bottom),a.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:a.SetPos(this.Frame.width/2-r.width/2,this.Frame.height+this.TMargins.bottom),a.SetParagraphAlignment(TextConstant.TextAlign.Center)}else this.TextGrow==NvConstant.TextGrowBehavior.Horizontal?a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,n.width,n.height):a.SetConstraints(n.width,n.width,n.height);a.SetRenderingEnabled(!0),a.SetEditCallback(T3Gv.opt.TextCallback,e),LogUtil.Debug("= S.BaseShape - LMAddSVGTextObject output:",{textElement:a})}}LMResizeSVGTextObject(t,e,i){if(LogUtil.Debug("= S.BaseShape - LMResizeSVGTextObject input:",{svgElement:t,drawingObject:e,newDimensions:i}),-1!==e.DataID){const n=t.GetElementById(OptConstant.SVGElementClass.Text);if(n){const t=e.trect;let s=null;if(this.TextFlags&NvConstant.TextFlags.AttachA){switch(s=n.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,-s.height-this.TMargins.top),n.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(i.width-s.width,-s.height-this.TMargins.top),n.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:n.SetPos(i.width/2-s.width/2,-s.height-this.TMargins.top),n.SetParagraphAlignment(TextConstant.TextAlign.Center)}n.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0)}else if(this.TextFlags&NvConstant.TextFlags.AttachB){switch(s=n.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,i.height+this.TMargins.bottom),n.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(i.width-s.width,i.height+this.TMargins.bottom),n.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:n.SetPos(i.width/2-s.width/2,i.height+this.TMargins.bottom),n.SetParagraphAlignment(TextConstant.TextAlign.Center)}n.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0)}else{n.SetPos(t.x-i.x,t.y-i.y);let e=t.width;this.TextGrow==NvConstant.TextGrowBehavior.Horizontal&&(e=T3Gv.opt.header.MaxWorkDim.x),n.SetConstraints(e,t.width,t.height)}}}LogUtil.Debug("= S.BaseShape - LMResizeSVGTextObject output:",{textResized:!0})}GetIconShape(){return this.BlockID}PostCreateShapeCallback(t,e,i,n){this.UpdateDimensionLines(e),this.AddIcons(t,e)}GetDimensionPoints(){LogUtil.Debug("= S.BaseShape - GetDimensionPoints input:",{});let t=[];t.push(new Point$1(this.Frame.x,this.Frame.y)),this.Frame.width>0&&t.push(new Point$1(this.Frame.x+this.Frame.width,this.Frame.y)),this.Frame.height>0&&t.push(new Point$1(this.Frame.x+this.Frame.width,this.Frame.y+this.Frame.height)),this.RotationAngle;for(let e=0;e<t.length;e++)t[e].x-=this.Frame.x,t[e].y-=this.Frame.y;return LogUtil.Debug("= S.BaseShape - GetDimensionPoints output:",t),t}GetDimensionLineDeflection(t,e,i,n){LogUtil.Debug("S.BaseShape - GetDimensionLineDeflection input:",{unusedSvgElement:t,pointX:e,pointY:i,deflectionConfig:n});let s,a,o=0,r=[],l=new Point$1(0,0),h=this.GetDimensionPoints();for(s=h.length,o=0;o<s;o++)h[o].x+=this.inside.x,h[o].y+=this.inside.y;l.x=n.knobPoint.x+this.Frame.x-n.adjustForKnob,l.y=n.knobPoint.y+this.Frame.y-n.adjustForKnob,r.push(h[n.segmentIndex-1]),r.push(h[n.segmentIndex]),r.push(new Point$1(l.x,l.y)),r.push(new Point$1(e,i)),Utils3.RotatePointsAboutCenter(this.Frame,-n.ccAngleRadians,r),Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,r),a=r[3].y-r[2].y;const c=n.originalDeflection+a;return LogUtil.Debug("S.BaseShape - GetDimensionLineDeflection output:",c),c}DimensionLineDeflectionAdjust(t,e,i,n,s){LogUtil.Debug("= S.BaseShape - DimensionLineDeflectionAdjust input:",{svgElement:t,xCoord:e,yCoord:i,additionalParam:n,segmentInfo:s});const a=this.GetDimensionLineDeflection(t,e,i,s);1===s.segmentIndex?this.dimensionDeflectionH=a:this.dimensionDeflectionV=a,this.UpdateDimensionLines(t),this.Dimensions&NvConstant.DimensionFlags.Select&&this.HideOrShowSelectOnlyDimensions(!0),LogUtil.Debug("= S.BaseShape - DimensionLineDeflectionAdjust output:",{dimensionDeflectionH:this.dimensionDeflectionH,dimensionDeflectionV:this.dimensionDeflectionV})}MaintainProportions(t,e){LogUtil.Debug("= S.BaseShape - MaintainProportions input:",{newWidth:t,newHeight:e});const i=this.Frame.width,n=this.Frame.height;let s=null;if(this.ResizeAspectConstrain){if(null!=t&&i>0)return s=t*(n/i),LogUtil.Debug("= S.BaseShape - MaintainProportions output:",s),s;if(null!=e&&n>0)return s=e*(i/n),LogUtil.Debug("= S.BaseShape - MaintainProportions output:",s),s}return LogUtil.Debug("= S.BaseShape - MaintainProportions output:",s),s}UpdateDimensionFromTextObj(t,e){let i,n;LogUtil.Debug("= S.BaseShape - UpdateDimensionFromTextObj input:",{textComponent:t,textData:e}),T3Gv.stdObj.PreserveBlock(this.BlockID);let s,a,o=-1,r=null,l=null;if(e?(s=e.text,a=e.userData):(s=t.GetText(),a=t.GetUserData()),i=a.segment,n=this.GetDimensionValueFromString(s,i),n>=0&&(o=this.GetDimensionLengthFromValue(n)),o<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects(),void LogUtil.Debug("= S.BaseShape - UpdateDimensionFromTextObj output: Invalid dimension length");1===i?(r=this.MaintainProportions(o,null),this.SetSize(o,r,OptConstant.ActionTriggerType.LineLength),this.GetDimensionsForDisplay().width===o&&(this.rwd=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0))):(l=this.MaintainProportions(null,o),this.SetSize(l,o,OptConstant.ActionTriggerType.LineLength),this.GetDimensionsForDisplay().height===o&&(this.rht=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!0))),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let h=0,c=this.hooks.length;h<c;h++)OptCMUtil.SetLinkFlag(this.hooks[h].objid,DSConstant.LinkFlags.Move);ObjectUtil$1.AddToDirtyList(this.BlockID),(this.Frame.x<0||this.Frame.y<0)&&T3Gv.opt.ScrollObjectIntoView(this.BlockID,!1),DrawUtil.CompleteOperation(),LogUtil.Debug("= S.BaseShape - UpdateDimensionFromTextObj output: update complete")}DimensionEditCallback(t,e,i,n){LogUtil.Debug("S.BaseShape - DimensionEditCallback input:",{actionType:t,eventData:e,textObject:i,shapeObject:n});let s=n;switch(t){case"edit":break;case"keyend":if(e.keyCode===KeyboardConstant.Keys.Tab||e.keyCode===KeyboardConstant.Keys.Enter)return T3Gv.opt.CloseEdit(),void LogUtil.Debug("S.BaseShape - DimensionEditCallback output:",!0);break;case"charfilter":if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet){if(-1===e.search(/(\d|\.|'|"| )/))return void LogUtil.Debug("S.BaseShape - DimensionEditCallback output:",!1)}else if(-1===e.search(/(\d|\.)/))return void LogUtil.Debug("S.BaseShape - DimensionEditCallback output:",!1);break;case"activate":{let t=i.svgObj.SDGObj.svgObj.trans.rotation;if(t+=s.RotationAngle,t>=360&&(t-=360),0!==t){let t=s.GetDimensionPoints(),e=[],n=i.userData.segment,a=Utils1.CalcAngleFromPoints(t[n-1],t[n]);s.GetDimensionTextInfo(t[n-1],t[n],a,i,n,e,[],[]);let o=360-s.RotationAngle,r=2*Math.PI*(o/360);Utils3.RotatePointsAboutCenter(s.Frame,r,e);let l={};Utils2.GetPolyRect(l,e);let h={},c=[];h.x=l.x+l.width/2-i.lastFmtSize.width/2,h.y=l.y+l.height/2-i.lastFmtSize.height/2,c.push(new Point$1(h.x,h.y)),Utils3.RotatePointsAboutCenter(s.Frame,-r,c),i.SetPos(c[0].x,c[0].y),i.SetRotation(-s.RotationAngle,c[0].x,c[0].y)}break}case"deactivate":T3Gv.opt.bInDimensionEdit=!1;Utils1.DeepCopy(i.GetUserData());s.BlockID,i.GetText(),ObjectUtil$1.GetObjectPtr(s.BlockID,!0),s=ObjectUtil$1.GetObjectPtr(s.BlockID,!1),s.UpdateDimensionFromTextObj(i);break}LogUtil.Debug("S.BaseShape - DimensionEditCallback output: completed")}NoFlip(){let t;return LogUtil.Debug("= S.BaseShape - NoFlip input:"),t=this.hooks.length?this.hooks[0].hookpt!==OptConstant.HookPts.KAT&&!(this.hooks[0].hookpt>OptConstant.HookPts.AK):Boolean(this.extraflags&OptConstant.ExtraFlags.NoRotate),LogUtil.Debug("= S.BaseShape - NoFlip output:",t),t}Flip(t){if(LogUtil.Debug("= S.BaseShape - Flip input:",{flipFlags:t}),""!==this.SymbolURL||""!==this.ImageURL){if(t&OptConstant.ExtraFlags.FlipHoriz){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,!t)}if(t&OptConstant.ExtraFlags.FlipVert){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipVert);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipVert,!t)}LogUtil.Debug("= S.BaseShape - Flip output:",{extraflags:this.extraflags})}else LogUtil.Debug("= S.BaseShape - Flip output: no symbol or image found, nothing flipped")}NoRotate(){LogUtil.Debug("= S.BaseShape: NoRotate input: {}");const t=HookUtil.FindAllChildConnectors(this.BlockID);let e;if(this.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1))&&e.objecttype===NvConstant.FNObjectTypes.ShapeContainer)return LogUtil.Debug("= S.BaseShape: NoRotate output: true (hook object is a SHAPECONTAINER)"),!0;if(this.extraflags&OptConstant.ExtraFlags.NoRotate)return LogUtil.Debug("= S.BaseShape: NoRotate output: true (extraflags SEDE_NoRotate set)"),!0;const i=t.length;for(let n=0;n<i;n++)if(e=ObjectUtil$1.GetObjectPtr(t[n],!1),!e.IsFlowChartConnector()&&e.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip>0)return LogUtil.Debug("= S.BaseShape: NoRotate output: true (child connector condition met at index "+n+")"),!0;return LogUtil.Debug("= S.BaseShape: NoRotate output: false"),!1}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.BaseShape - MaintainPoint input:",{currentPoint:t,targetPoint:e,deltaValue:i,mode:n,extraFlag:s});return LogUtil.Debug("= S.BaseShape - MaintainPoint output:",false),false}AddIcon(t,e,i){if(LogUtil.Debug("= S.BaseShape - AddIcon input:",{iconData:t,containerElement:e,iconPosition:i}),e){let t=e.GetID(),n=this.Frame;if(t!==this.BlockID){const e=ObjectUtil$1.GetObjectPtr(t,!1);e&&(n=e.Frame)}i.x=n.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize;const s=this.GenericIcon(i);return this.nIcons++,e.AddElement(s),LogUtil.Debug("= S.BaseShape - AddIcon output:",s),s}return LogUtil.Debug("= S.BaseShape - AddIcon output:",null),null}GetActionButtons(){LogUtil.Debug("= S.BaseShape - GetActionButtons input:",{});if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).moreflags&NvConstant.SessionMoreFlags.NoActionButton)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;if(this.flags&NvConstant.ObjFlags.Lock)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(this.BlockID===t.theActiveTextEditObjectID||this.BlockID===t.theActiveTableObjectID||this.BlockID===t.theActiveOutlineObjectID)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);if(e&&e.layers[e.activelayer].flags&NvConstant.LayerFlags.UseEdges)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;let i=OptAhUtil.GetGvSviOpt(this.BlockID);null==i&&(i=T3Gv.wallOpt);let n=null,s=!1,a=!1,o=!1,r=!1,l=!1;i&&!OptAhUtil.ShapeCannotHaveActionButtons(this)&&(n=i.AllowActionButtons(this),n&&(s=n.up,a=n.down,o=n.left,r=n.right,n.custom&&(l=!0),n.table&&(l=!0)));const h=s||a||o||r||l?{left:o,right:r,up:s,down:a,custom:l}:null;return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",h),h}SetRolloverActions(t,e,i){LogUtil.Debug("S.BaseShape - SetRolloverActions input:",{svgEvent:t,rolloverElement:e,domEvent:i});const n=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);if(n&&n instanceof BaseDrawObject$1){const n=NvConstant.FNObjectTypes;switch(this.objecttype){case n.FrameContainer:if(i){const e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(i.currentTarget).GetTargetForEvent(i);e.GetID()===OptConstant.SVGElementClass.Slop&&super.SetRolloverActions(t,e)}return this.SetCursors(),void LogUtil.Debug("S.BaseShape - SetRolloverActions output:","Handled SWIMLANE/FRAME_CONTAINER rollover");case n.ShapeContainer:return}if(-1!==T3Gv.opt.curHiliteShape&&T3Gv.opt.curHiliteShape!==this.BlockID){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.curHiliteShape,!1);t&&(t.SetRuntimeEffects(!1),t.ClearCursors())}const s="actionArrow"+this.BlockID;this.actionArrowHideTimerID>=0&&T3Gv.opt.ClearActionArrowTimer(this.BlockID),ActionUtil.RemoveActionArrows(this.BlockID,!0);const a=this.GetActionButtons();if(a){const i=!(a.up||a.left||a.down||a.right||a.custom);if(this.flags&NvConstant.ObjFlags.TextOnly||i)super.SetRolloverActions(t,e);else{const i=this.BlockID,n=this;this.SetRuntimeEffects(!0),this.SetCursors(),T3Gv.opt.curHiliteShape=this.BlockID;let o=[],r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);const l=OptConstant.Common.BaseArrowSlop/r,h=OptConstant.Common.ConnectorArrowSlop/r;let c=0;const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);u&&-1!==u.indexOf(i)&&(c=OptConstant.Common.KnobSize/2);let d=0,p=0;if(-1!==T3Gv.opt.actionStoredObjectId||0!==T3Gv.opt.dragBBoxList.length||T3Gv.opt.optSlt)e.svgObj.mouseout((()=>{n.SetRuntimeEffects(!1),n.ClearCursors(),T3Gv.opt.curHiliteShape=-1}));else{let u=l,g=l,f=l,b=l,v=null;const m={lindex:-1,id:-1,hookpt:0};for(;T3Gv.opt.FindChildArrayByIndex(this.BlockID,m)>0;){v=ObjectUtil$1.GetObjectPtr(m.id,!1);const t=(v.arraylist.styleflags&OptConstant.AStyles.CoManager)>0,e=v.IsChildOfAssistant(),i=v.IsFlowChartConnector();let n=v.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip;if(n<0&&(n=0),0!==n&&!i&&!t&&!e&&m.hookpt)switch(m.hookpt){case OptConstant.HookPts.LL:g=h,d+=h-l;break;case OptConstant.HookPts.LR:u=h,d-=h-l;break;case OptConstant.HookPts.LT:b=h,p+=h-l;break;case OptConstant.HookPts.LB:f=h,p-=h-l}}const y=t.CreateShape(OptConstant.CSType.Group);y.SetID(s),y.SetUserData(i);const S=OptConstant.Common.ActionArrowSizeV/r,w=OptConstant.Common.ActionArrowSizeH/r;let x;x.x-=S+g+c,x.y-=S+f+c,x.width+=2*S+(g+u)+2*c,x.height+=2*S+(f+b)+2*c;const C=x.width/2-d/2,D=x.height/2-p/2;if(a.custom){const e=(new LineDraw).CreateCustomActionButtons(t,this,0,this.BlockID);if(e){Utils1.DeepCopy(this.Frame);for(let t=0;t<e.length;t++){const n=e[t];n.SetID(OptConstant.ActionArrow.Custom+t),n.SetUserData(i),y.AddElement(n),o.push(n.DOMElement())}}}if(a.left){let e=(new LineDraw).CreateActionButton(t,g,D,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(0,D),i.LineTo(S,D-w/2),i.LineTo(S,D+w/2),i.LineTo(0,D),i.ClosePath(),i.Apply(),e.SetFillColor("#FF0000"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddLeft)}e.SetID(OptConstant.ActionArrow.Left),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}if(a.up){let e=(new LineDraw).CreateActionButton(t,C,f,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(C,0),i.LineTo(C-w/2,S),i.LineTo(C+w/2,S),i.LineTo(C,0),i.ClosePath(),i.Apply(),e.SetFillColor("#FFD64A"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddUp)}e.SetID(OptConstant.ActionArrow.Up),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}if(a.right){let e=(new LineDraw).CreateActionButton(t,x.width-g,D,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(x.width,D),i.LineTo(x.width-S,D-w/2),i.LineTo(x.width-S,D+w/2),i.LineTo(x.width,D),i.ClosePath(),i.Apply(),e.SetFillColor("#FFD64A"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddRight)}e.SetID(OptConstant.ActionArrow.Right),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}if(a.down){let e=(new LineDraw).CreateActionButton(t,C,x.height-f,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(C,x.height),i.LineTo(C-w/2,x.height-S),i.LineTo(C+w/2,x.height-S),i.LineTo(C,x.height),i.ClosePath(),i.Apply(),e.SetFillColor("#FFD64A"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddDown)}e.SetID(OptConstant.ActionArrow.Down),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}y.SetSize(x.width,x.height),y.SetPos(x.x,x.y),(new LineDraw).RotateActionButtons()&&y.SetRotation(this.RotationAngle),T3Gv.opt.svgOverlayLayer.AddElement(y);const T=function(t){Utils2.StopPropagationAndDefaults(t);const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(e){const i=e.GetTargetForEvent(t);if(i){const n=i.GetID(),s=e.GetUserData(),a=ObjectUtil$1.GetObjectPtr(s,!1);a&&a instanceof BaseDrawObject$1&&null!=n&&null!=s&&(new LineDraw).ActionClick(t,s,n,null)}}},k=function(t){if(LMEvtUtil.IsWheelClick(t)||T3Constant.DocContext.SpacebarDown)return EvtUtil.Evt_WorkAreaHammerDragStart(t),Utils2.StopPropagationAndDefaults(t),!1;T3Constant.DocContext.HTMLFocusControl&&T3Constant.DocContext.HTMLFocusControl.blur&&T3Constant.DocContext.HTMLFocusControl.blur();const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(e){const i=e.GetTargetForEvent(t);if(i){const n=i.GetID(),s=e.GetUserData(),a=ObjectUtil$1.GetObjectPtr(s,!1);if(!(a&&a instanceof BaseDrawObject$1))return!1;switch(n){case OptConstant.ActionArrow.Up:AddAbove(t,s);break;case OptConstant.ActionArrow.Left:AddLeft(t,s);break;case OptConstant.ActionArrow.Down:AddBelow(t,s);break;case OptConstant.ActionArrow.Right:AddRight(t,s);break;default:n>=OptConstant.ActionArrow.Custom&&AddCustom(t,s,n-OptConstant.ActionArrow.Custom)}return!1}}},$=function(t){ActionUtil.SetActionArrowTimer(i)},O=function(t){ActionUtil.ClearActionArrowTimer(i)};for(let t=0;t<o.length;t++){const e=o[t],i=new Hammer(e);i.on("dragstart",k),i.on("click",T),e.onmouseout=$,e.onmouseover=O}e.svgObj.mouseout((()=>{ActionUtil.SetActionArrowTimer(i),n.SetRuntimeEffects(!1),n.ClearCursors(),T3Gv.opt.curHiliteShape=-1}))}}}else super.SetRolloverActions(t,e)}LogUtil.Debug("S.BaseShape - SetRolloverActions output:","Completed rollover actions setup")}UseEdges(t,e,i,n,s,a){let o;LogUtil.Debug("S.ArcSegmentedLine - UseEdges input:",{isHorizontalExplicit:t,isVerticalExplicit:e,horizontalCondition:i,verticalCondition:n,oldPoint:s,newPoint:a});let r=0,l=0,h=0,c=0,u=0,d=0,p=!1;if(s.x!==a.x&&(t&&i?(r=a.x-s.x,p=!0):(o=this.Frame.x+this.Frame.width/2,Math.abs(o-s.x/2)<100?(u=(a.x-s.x)/2,p=!0):this.Frame.x>s.x/2&&(u=a.x-s.x,p=!0))),s.y!==a.y&&(e&&n?(l=a.y-s.y,p=!0):(o=this.Frame.y+this.Frame.height/2,Math.abs(o-s.y/2)<100?(d=(a.y-s.y)/2,p=!0):this.Frame.y>s.y/2&&(d=a.y-s.y,p=!0))),p){ObjectUtil$1.GetObjectPtr(this.BlockID,!0),(u||d)&&this.OffsetShape(u,d);const t=this.Frame.y+this.Frame.height;return(r||l)&&(r&&(h=this.Frame.width+r),l&&(c=this.Frame.height+l),this.SetSize(h,c,OptConstant.ActionTriggerType.LineLength),this.objecttype===NvConstant.FNObjectTypes.Annotation&&(d=t-(this.Frame.y+this.Frame.height),u=0,(u||d)&&this.OffsetShape(u,d))),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.ArcSegmentedLine - UseEdges output:",!0),!0}return LogUtil.Debug("S.ArcSegmentedLine - UseEdges output:",!1),!1}PrUpdateExtra(t){LogUtil.Debug("S.BaseShape - prUpdateExtra input:",{extraAmount:t,currentBlockId:this.BlockID});const e=this.BlockID,i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!0);if(i&&i instanceof Instance.Shape.ShapeContainer){const n=i.ContainerList;if(!(n.flags&NvConstant.ContainerListFlags.Sparse)){const s=n.List.length;for(let a=0;a<s;a++)if(n.List[a].id===e)return n.List[a].extra+=t,n.List[a].extra<0&&(n.List[a].extra=0),OptCMUtil.SetLinkFlag(i.BlockID,DSConstant.LinkFlags.Move),i.flags=Utils2.SetFlag(i.flags,NvConstant.ObjFlags.Obj1,!0),void LogUtil.Debug("S.BaseShape - prUpdateExtra output:",{updatedExtra:n.List[a].extra})}}LogUtil.Debug("S.BaseShape - prUpdateExtra output: no update performed")}PrGetAdjustShapeList(){LogUtil.Debug("S.ArcSegmentedLine - PrGetAdjustShapeList input:");let t=[],e=[],i=[],n=!1;const s=function(n){const s=ObjectUtil$1.GetObjectPtr(n,!1);if(s){const a=s.GetSVGFrame();i.push(a),t.push(n),e.push(n)}};if(this.hooks.length>0){const a=this.BlockID;let o=0;const r=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(r&&r instanceof Instance.Shape.ShapeContainer){const l=r.ContainerList;if(!(l.flags&NvConstant.ContainerListFlags.Sparse)){const r=l.List.length;for(let t=0;t<r;t++)l.List[t].id===a?(o=l.List[t].extra,s(a),n=!0):n&&s(l.List[t].id);return LogUtil.Debug("S.ArcSegmentedLine - PrGetAdjustShapeList output:",{list:t,svglist:e,framelist:i,oldextra:o,arrangement:l.Arrangement}),{list:t,svglist:e,framelist:i,oldextra:o,arrangement:l.Arrangement}}}}return LogUtil.Debug("S.ArcSegmentedLine - PrGetAdjustShapeList output: null"),null}OnDisconnect(t,e,i,n){if(LogUtil.Debug("S.ArcSegmentedLine - OnDisconnect input:",{elementId:t,container:e,disconnectData:i,reason:n}),e instanceof Instance.Shape.ShapeContainer&&null!=this.zListIndex&&this.zListIndex>=0){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);e&&(T3Gv.opt.svgObjectLayer.RemoveElement(e),T3Gv.opt.svgObjectLayer.AddElement(e,this.zListIndex),this.zListIndex=-1)}LogUtil.Debug("S.ArcSegmentedLine - OnDisconnect output: completed")}RightClick(t){LogUtil.Debug("= s.BaseShape: RightClick/ - RightClick input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=OptConstant.ShapeType,n=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);let s=n.GetID(),a=ObjectUtil$1.GetObjectPtr(s,!1);if(a&&a instanceof BaseDrawObject$1){if(!SelectUtil.SelectObjectFromClick(t,n))return!1;if(T3Gv.docUtil.IsReadOnly())return T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=n.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,UIUtil.ShowContextMenu(!0,"Shape","ReadOnly"),!1;const o=n.GetID(),r=n.GetTargetForEvent(t).GetID();if(a=ObjectUtil$1.GetObjectPtr(o,!1),a){let e=(a.TextFlags&NvConstant.TextFlags.OneClick)>0&&r!==OptConstant.SVGElementClass.Slop;if((a.AllowTextEdit()||(e=!1))&&(a.GetTextObject(t,!0)>=0||e)){const i=n.textElem;let s=-1;(i||e)&&(i&&(s=i.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)),(s>=0||e)&&TextUtil.ActivateTextEdit(n,t,!0))}}T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=n.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0;if(null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();e.GetSelectedRange(),e&&e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)}else switch(T3Gv.opt.rClickParam.targetId=s,a=ObjectUtil$1.GetObjectPtr(s,!1),a.objecttype){case NvConstant.FNObjectTypes.FrameContainer:UIUtil.ShowContextMenu(!0,"FrameContainer","Default");break;case NvConstant.FNObjectTypes.Multiplicity:UIUtil.ShowContextMenu(!0,"Multiplicity","Default");break;case NvConstant.FNObjectTypes.ShapeContainer:UIUtil.ShowContextMenu(!0,"ShapeContainer","Default");default:if(a.ShapeType===i.RRect)a.ImageURL&&a.ImageURL.length||a.EMFHash&&a.EMFHash.length?QuasarUtil.ShowContextMenu(!0,"Image","Default"):QuasarUtil.ShowContextMenu(!0,"RRect","Default");else UIUtil.ShowContextMenu(!0,"Shape","Default"),LogUtil.Debug("S.BaseShape - RightClick: Displayed Quasar context menu")}}}}class Rect$1 extends BaseShape{constructor(t){LogUtil.Debug("= S.Rect constructor Input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.Rect,t.moreflags|=OptConstant.ObjMoreFlags.FixedRR,t.uniType="Rect",super(t),this.dataclass=t.dataclass||PolygonConstant.ShapeTypes.RECTANGLE,this.nativeDataArrayBuffer=t.nativeDataArrayBuffer||null,this.SymbolData=t.SymbolData||null,LogUtil.Debug("= S.Rect constructor Output:",this)}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n={...this.Frame},s=this.StyleRecord;s.Line.BThick&&null===this.polylist&&Utils2.InflateRect(n,s.Line.BThick,s.Line.BThick);const a=this.SVGTokenizerHook(s),o=a.Line.Paint.Color,r=a.Line.Thickness,l=a.Line.LinePattern,h=a.Line.Paint.Opacity,c=n.width,u=n.height;i.SetSize(c,u),i.SetPos(n.x,n.y);const d=this.RRectGetCornerSize();let p;if(this.SymbolURL){const e=t.CreateShape(OptConstant.CSType.Rect);e.SetID(OptConstant.SVGElementClass.Shape),e.SetSize(c,u),e.SetImageFill(this.SymbolURL,{scaleType:"NOPROP"});const n=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,s=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;n&&e.SetMirror(n),s&&e.SetFlip(s),i.AddElement(e),this.GetFieldDataStyleOverride()}else d>0?(p=t.CreateShape(OptConstant.CSType.RRect),p.SetRRectSize(c,u,d,d)):p=t.CreateShape(OptConstant.CSType.Rect),p.SetStrokeColor(o),p.SetStrokeOpacity(h),p.SetStrokeWidth(r),0!==l&&p.SetStrokePattern(l),p.SetID(OptConstant.SVGElementClass.Shape),p.SetSize(c,u),i.AddElement(p);if(this.ApplyStyles(p,a),this.ApplyEffects(i,!1,!1),!(this instanceof Instance.Shape.ShapeContainer)){let n=OptConstant.Common.Slop;const s=u,o=c;let l;if(d>0?(l=t.CreateShape(OptConstant.CSType.RRect),l.SetRRectSize(o,s,d,d)):l=t.CreateShape(OptConstant.CSType.Rect),l.SetStrokeColor("white"),l.SetFillColor("none"),l.SetOpacity(0),l.SetStrokeWidth(r+n),e){const t=this.SymbolURL||a.Fill.Paint.FillType===NvConstant.FillTypes.Transparent&&this.DataID>=0;l.SetEventBehavior(t?OptConstant.EventBehavior.HiddenAll:OptConstant.EventBehavior.HiddenOut)}else l.SetEventBehavior(OptConstant.EventBehavior.None);l.SetID(OptConstant.SVGElementClass.Slop),l.ExcludeFromExport(!0),l.SetSize(o||1,s),i.AddElement(l)}const g=a.Fill.Hatch;if(g&&0!==g){let e;d>0?(e=t.CreateShape(OptConstant.CSType.RRect),e.SetRRectSize(c,u,d,d)):e=t.CreateShape(OptConstant.CSType.Rect),e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(c,u),e.SetStrokeWidth(0),this.SetFillHatch(e,g),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),i}GetCornerSize(t){LogUtil.Debug("= S.Rect GetCornerSize Input:",t);const e=this.RRectGetCornerSize(t);return LogUtil.Debug("= S.Rect GetCornerSize Output:",e),e}RRectGetCornerSize(t){LogUtil.Debug("= S.Rect RRectGetCornerSize Input:",t);let e=this.Frame.width,i=this.Frame.height,n=e<i?e:i;if(t&&(n=t),this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let t=OptConstant.Common.RRectFixedDim*this.shapeparam,e=.4*n;return t>e&&(t=e),LogUtil.Debug("= S.Rect RRectGetCornerSize Output:",t),t}let s=n*this.shapeparam;return LogUtil.Debug("= S.Rect RRectGetCornerSize Output:",s),s}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.Rect GetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});let a;return a=this.RRectGetCornerSize()>0?this.RRectGetPolyPoints(t,e,i,n,s):this.BaseDrawingObjectGetPolyPoints(t,e,i,n,s),LogUtil.Debug("= S.Rect GetPolyPoints Output:",a),a}RRectGetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.Rect RRectGetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});let a=[],o={},r={};Utils2.CopyRect(o,this.Frame);let l=this.StyleRecord.Line.Thickness/2;n&&Utils2.InflateRect(o,l,l);let h=this.GetCornerSize();if(r.x=0,r.y=0,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,h,!0),r.x=0,r.y=o.height-2*h,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,h,0,!0),r.x=o.width-h,r.y=o.height,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,-h,!1),r.x=o.width-h,r.y=2*h,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,-h,0,!1),a.push(new Point$1(a[0].x,a[0].y)),!e)for(let c=0,u=a.length;c<u;c++)a[c].x+=o.x,a[c].y+=o.y;return LogUtil.Debug("= S.Rect RRectGetPolyPoints Output:",a),a}BaseDrawingObjectGetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.Rect BaseDrawingObjectGetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});let a=[],o={};Utils2.CopyRect(o,this.Frame);let r=this.StyleRecord.Line.Thickness/2;if(n&&Utils2.InflateRect(o,r,r),a.push(new Point$1(0,0)),a.push(new Point$1(o.width,0)),a.push(new Point$1(o.width,o.height)),a.push(new Point$1(0,o.height)),a.push(new Point$1(0,0)),!e)for(let l=0,h=a.length;l<h;l++)a[l].x+=o.x,a[l].y+=o.y;return LogUtil.Debug("= S.Rect BaseDrawingObjectGetPolyPoints Output:",a),a}ExtendLines(t){LogUtil.Debug("= S.Rect ExtendLines Input:",t),this.RRectGetCornerSize(),LogUtil.Debug("= S.Rect ExtendLines Output")}SetShapeIndent(t){LogUtil.Debug("= S.Rect SetShapeIndent Input:",t);let e;return this.RRectGetCornerSize()>0?e=this.RRectSetShapeIndent(t):(this.left_sindent=0,this.right_sindent=0,this.top_sindent=0,this.bottom_sindent=0,e=super.SetShapeIndent(t)),LogUtil.Debug("= S.Rect SetShapeIndent Output:",e),e}RRectSetShapeIndent(t){LogUtil.Debug("= S.Rect RRectSetShapeIndent Input:",t);let e=this.inside.width,i=this.inside.height,n=e<i?e:i,s=this.shapeparam;if(this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let e=n;t&&(e+=this.GetCornerSize()*OptConstant.Common.RoundFactor*2,e=n+this.GetCornerSize(e)*OptConstant.Common.RoundFactor*2),s=this.GetCornerSize(e)/e}this.left_sindent=s*OptConstant.Common.RoundFactor,this.top_sindent=this.left_sindent,this.right_sindent=this.left_sindent,this.bottom_sindent=this.left_sindent;let a=1,o=1,r=1,l=1;t&&(a=o=r=l=1-2*this.left_sindent),this.tindent.left=this.left_sindent*e/a,this.tindent.top=this.top_sindent*i/o,this.tindent.right=this.right_sindent*e/r,this.tindent.bottom=this.bottom_sindent*i/l,LogUtil.Debug("= S.Rect RRectSetShapeIndent Output:",{left_sindent:this.left_sindent,top_sindent:this.top_sindent,right_sindent:this.right_sindent,bottom_sindent:this.bottom_sindent,tindent:this.tindent})}SetShapeProperties(t){LogUtil.Debug("= S.Rect SetShapeProperties Input:",t);let e=!1;const i=OptConstant.ObjMoreFlags.FixedRR;if(t.hasrrectselected){const n=(this.moreflags&i)>0!==t.rrectfixed,s=t.rrectparam!==this.shapeparam;(n||s)&&(this.moreflags=Utils2.SetFlag(this.moreflags,i,t.rrectfixed),this.shapeparam=t.rrectparam,0===this.shapeparam&&(this.left_sindent=0,this.top_sindent=0,this.right_sindent=0,this.bottom_sindent=0,this.tindent.left=0,this.tindent.top=0,this.tindent.right=0,this.tindent.bottom=0),this.SetSize(this.Frame.width,0,OptConstant.ActionTriggerType.LineLength),0===this.shapeparam&&this.ExtendLines(!0),e=!0)}return Instance.Shape.BaseShape.prototype.SetShapeProperties.call(this,t)&&(e=!0),LogUtil.Debug("= S.Rect SetShapeProperties Output:",e),e}ApplyCurvature(t){LogUtil.Debug("= S.Rect ApplyCurvature Input:",t);var e={hasrrectselected:!0,rrectfixed:!0,rrectparam:t};this.SetShapeProperties(e),LogUtil.Debug("= S.Rect ApplyCurvature Output: Shape properties updated")}}class ArrowheadRecord{constructor(){__publicField(this,"StartArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowID"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),this.StartArrowID=0,this.StartArrowDisp=!1,this.EndArrowID=0,this.EndArrowDisp=!1,this.ArrowSizeIndex=1}}class BaseLine extends BaseDrawObject$1{constructor(t){LogUtil.Debug("= S.BaseLine: constructor called with input:",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Line,t.maxhooks=2,void 0===t.targflags&&(t.targflags=NvConstant.HookFlags.LcLine|NvConstant.HookFlags.LcAttachToLine),void 0===t.hookflags&&(t.hookflags=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcLine),super(t),__publicField(this,"LineType"),__publicField(this,"linetrect"),__publicField(this,"theMinTextDim"),__publicField(this,"TextWrapWidth"),__publicField(this,"polylist"),__publicField(this,"StartArrowID"),__publicField(this,"EndArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),this.LineType=t.LineType,this.linetrect={x:0,y:0,width:0,height:0},this.theMinTextDim={width:0,height:0},this.TextWrapWidth=0,this.iconShapeBottomOffset=20,this.iconShapeRightOffset=0,LogUtil.Debug("= S.BaseLine: constructor output:",this)}checkIfPolyLine(t){LogUtil.Debug("= S.BaseLine: checkIfPolyLine called with input:",t);const e=t instanceof Instance.Shape.PolyLine;return LogUtil.Debug("= S.BaseLine: checkIfPolyLine output:",e),e}CalcFrame(t){LogUtil.Debug("= S.BaseLine: CalcFrame called with inputFlag =",t);let e=!1;this.Frame=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),LogUtil.Debug("= S.BaseLine: Initial Frame calculated as",this.Frame),this.LineType===OptConstant.LineType.SEGLINE&&(e=!0,LogUtil.Debug("= S.BaseLine: LineType is SEGLINE, setting isSegLine to",e));const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,e,!1,null);LogUtil.Debug("= S.BaseLine: Retrieved polyPoints:",i),i&&i.length&&(Utils2.GetPolyRect(this.Frame,i),LogUtil.Debug("= S.BaseLine: Updated Frame using polyPoints:",this.Frame)),this.UpdateFrame(this.Frame,t),LogUtil.Debug("= S.BaseLine: Final Frame after UpdateFrame:",this.Frame)}GetArrowheadFormat(){LogUtil.Debug("= S.BaseLine: GetArrowheadFormat called"),LogUtil.Debug("= S.BaseLine: Input this =",this);const t=new ArrowheadRecord;return ShapeUtil.LineIsReversed(this,null,!1)?(LogUtil.Debug("= S.BaseLine: Line is reversed"),t.StartArrowID=this.EndArrowID,t.EndArrowID=this.StartArrowID,t.StartArrowDisp=this.EndArrowDisp,t.EndArrowDisp=this.StartArrowDisp):(LogUtil.Debug("= S.BaseLine: Line is not reversed"),t.StartArrowID=this.StartArrowID,t.EndArrowID=this.EndArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowDisp=this.EndArrowDisp),t.ArrowSizeIndex=this.ArrowSizeIndex,LogUtil.Debug("= S.BaseLine: Output ArrowheadRecord =",t),t}GetSVGFrame(t){LogUtil.Debug("= S.BaseLine: GetSVGFrame called with input:",t);let e={};return null!=t?Utils2.CopyRect(e,t):e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),LogUtil.Debug("= S.BaseLine: GetSVGFrame output:",e),e}GetPositionRect(){LogUtil.Debug("= S.BaseLine: GetPositionRect called with StartPoint:",this.StartPoint,"and EndPoint:",this.EndPoint);const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);return LogUtil.Debug("= S.BaseLine: GetPositionRect output:",t),t}AdjustPinRect(t,e,i){LogUtil.Debug("= S.BaseLine: AdjustPinRect called with",{pinRect:t,offset:e,additional:i});const n=t;return LogUtil.Debug("= S.BaseLine: AdjustPinRect output:",n),n}GetDimensions(){LogUtil.Debug("= S.BaseLine: GetDimensions called with StartPoint:",this.StartPoint,"and EndPoint:",this.EndPoint);const t=this.EndPoint.x-this.StartPoint.x,e=this.EndPoint.y-this.StartPoint.y,i={x:Utils2.Sqrt(t*t+e*e),y:0};return LogUtil.Debug("= S.BaseLine: GetDimensions output:",i),i}GetDimensionsForDisplay(){LogUtil.Debug("= S.BaseLine: GetDimensionsForDisplay called with no input parameters");const t=this.GetDimensions();LogUtil.Debug("= S.BaseLine: Dimensions retrieved:",t);const e={x:this.Frame.x,y:this.Frame.y,width:t.x,height:t.y};return LogUtil.Debug("= S.BaseLine: GetDimensionsForDisplay output:",e),e}GetSnapRect(){LogUtil.Debug("= S.BaseLine: GetSnapRect called with no input");let t={};if(Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseLine: Initial snapRect copied from Frame:",t),this.objecttype===NvConstant.FNObjectTypes.FlWall){let e=0,i=0;0===t.width&&(e=this.StyleRecord.Line.Thickness/2),0===t.height&&(i=this.StyleRecord.Line.Thickness/2),Utils2.InflateRect(t,e,i),LogUtil.Debug("= S.BaseLine: snapRect after inflation for wall opt wall:",t)}return LogUtil.Debug("= S.BaseLine: GetSnapRect returning:",t),t}CanSnapToShapes(t){if(LogUtil.Debug("= S.BaseLine: CanSnapToShapes called with input:",t),t&&this.objecttype===NvConstant.FNObjectTypes.FlWall){if(Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x,this.StyleRecord.Line.BThick))return t.distanceonly=NvConstant.GuideDistanceTypes.Vertical_Wall,LogUtil.Debug("= S.BaseLine: CanSnapToShapes output:",this.BlockID,"for Vertical_Wall"),this.BlockID;if(Utils2.IsEqual(this.StartPoint.y,this.EndPoint.y,this.StyleRecord.Line.BThick))return t.distanceonly=NvConstant.GuideDistanceTypes.Horizontal_Wall,LogUtil.Debug("= S.BaseLine: CanSnapToShapes output:",this.BlockID,"for Horizontal_Wall"),this.BlockID}return LogUtil.Debug("= S.BaseLine: CanSnapToShapes output: -1"),-1}IsSnapTarget(){LogUtil.Debug("= S.BaseLine: IsSnapTarget called with no input");return LogUtil.Debug("= S.BaseLine: IsSnapTarget output:",false),false}GuideDistanceOnly(){LogUtil.Debug("= S.BaseLine: GuideDistanceOnly called");const t=!!(this.objecttype===NvConstant.FNObjectTypes.FlWall)&&NvConstant.GuideDistanceTypes.PolyWall;return LogUtil.Debug("= S.BaseLine: GuideDistanceOnly returning",t),t}CreateDimension(t,e,i,n,s,a,o,r,l,h,c){if(LogUtil.Debug("= S.BaseLine: CreateDimension called with input:",{startPoint:t,endPoint:e,dimensionParam:i,extraParam1:n,extraParam2:s,extraParam3:a,extraParam4:o,extraParam5:r,extraParam6:l,extraParam7:h,extraParam8:c}),!i||this instanceof Instance.Shape.PolyLine&&this.polylist&&this.polylist.closed){const u=super.CreateDimension(t,e,i,n,s,a,o,r,l,h,c);return LogUtil.Debug("= S.BaseLine: CreateDimension output:",u),u}LogUtil.Debug("= S.BaseLine: CreateDimension condition not met, returning undefined.")}GetDimensionTextForPoints(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints input:",{startPoint:t,endPoint:e});let i=0;if(this.Dimensions&NvConstant.DimensionFlags.Total){const t=this.GetPolyPoints(200,!0,!1,!1,null);for(let e=1;e<t.length;e++){const n=Math.abs(t[e].x-t[e-1].x),s=Math.abs(t[e].y-t[e-1].y);0===n&&0===s||(i+=Math.sqrt(n*n+s*s))}}else{const n=360-Utils1.CalcAngleFromPoints(t,e),s=2*Math.PI*(n/360),a=[new Point$1(t.x,t.y),new Point$1(e.x,e.y)];Utils3.RotatePointsAboutCenter(this.Frame,-s,a),i=Math.abs(a[0].x-a[1].x)}const n=RulerUtil.GetLengthInRulerUnits(i);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints output:",n),n}EnforceMinimum(t){LogUtil.Debug("= S.BaseDrawObject: EnforceMinimum input:",{isPrimary:t,StartPoint:this.StartPoint,EndPoint:this.EndPoint});const e=OptConstant.Common.MinDim;if(Utils2.IsEqual(this.EndPoint.x,this.StartPoint.x)){const i=this.EndPoint.y-this.StartPoint.y;Math.abs(i)<e&&this.hooks.length<2&&(i>=0?t?this.StartPoint.y=this.EndPoint.y-e:this.EndPoint.y=this.StartPoint.y+e:t?this.StartPoint.y=this.EndPoint.y+e:this.EndPoint.y=this.StartPoint.y-e)}else if(Utils2.IsEqual(this.EndPoint.y,this.StartPoint.y)){const i=this.EndPoint.x-this.StartPoint.x;Math.abs(i)<e&&this.hooks.length<2&&(i>=0?t?this.StartPoint.x=this.EndPoint.x-e:this.EndPoint.x=this.StartPoint.x+e:t?this.StartPoint.x=this.EndPoint.x+e:this.EndPoint.x=this.StartPoint.x-e)}else{const i=this.EndPoint.x-this.StartPoint.x,n=this.EndPoint.y-this.StartPoint.y;Math.abs(i)<e&&Math.abs(n)<e&&this.hooks.length<2&&(Math.abs(i)>=Math.abs(n)?i>=0?t?this.StartPoint.x=this.EndPoint.x-e:this.EndPoint.x=this.StartPoint.x+e:t?this.StartPoint.x=this.EndPoint.x+e:this.EndPoint.x=this.StartPoint.x-e:n>=0?t?this.StartPoint.y=this.EndPoint.y-e:this.EndPoint.y=this.StartPoint.y+e:t?this.StartPoint.y=this.EndPoint.y+e:this.EndPoint.y=this.StartPoint.y-e)}LogUtil.Debug("= S.BaseDrawObject: EnforceMinimum output:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateDimensions(t,e,i){LogUtil.Debug("= S.BaseLine: UpdateDimensions called with input:",{newLength:t,unusedParam1:e,unusedParam2:i});let n=0,s=0,a=0,o=0,r=0;const l=[],h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);l.push(new Point$1(this.StartPoint.x-h.x,this.StartPoint.y-h.y)),l.push(new Point$1(this.EndPoint.x-h.x,this.EndPoint.y-h.y)),n=360-Utils1.CalcAngleFromPoints(l[0],l[1]);const c=2*Math.PI*(n/360);Utils3.RotatePointsAboutCenter(this.Frame,-c,l),l[0].x<l[1].x?l[1].x=l[0].x+t:l[1].x=l[0].x-t,Utils3.RotatePointsAboutCenter(this.Frame,c,l),s=l[1].x+h.x,a=l[1].y+h.y,s<0&&(o=-s,s=0),a<0&&(r+=-a,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(r+=OptConstant.Common.DimDefaultStandoff),a+=r);const u=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.AdjustLineEnd(u,s,a,OptConstant.ActionTriggerType.LineEnd,!0),(o>0||r>0)&&(s=this.StartPoint.x+o,a=this.StartPoint.y+r,this.AdjustLineStart(u,s,a,OptConstant.ActionTriggerType.LineStart,!0)),LogUtil.Debug("= S.BaseLine: UpdateDimensions output: StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}OffsetShape(t,e){LogUtil.Debug("= S.BaseLine: OffsetShape called with offsetX:",t,"offsetY:",e),this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.StartPoint.x+=t,this.StartPoint.y+=e,this.EndPoint.x+=t,this.EndPoint.y+=e,this.CalcFrame(),LogUtil.Debug("= S.BaseLine: OffsetShape updated Frame:",this.Frame,"StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}SetShapeOrigin(t,e,i){LogUtil.Debug("= S.BaseLine: SetShapeOrigin called with newX:",t,"newY:",e,"additionalParam:",i);const n=this.GetSVGFrame();let s=0,a=0;null!=t&&(s=n.x-t),null!=e&&(a=n.y-e),this.StartPoint.x-=s,this.StartPoint.y-=a,this.EndPoint.x-=s,this.EndPoint.y-=a,this.CalcFrame(),LogUtil.Debug("= S.BaseLine: SetShapeOrigin updated StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}UpdateFrame(t,e){var i,n,s;let a,o;LogUtil.Debug("= S.BaseLine: UpdateFrame called with inputFrame:",t,"shouldRedraw:",e);let r=t||this.Frame,l=this.LineTextX?Utils1.DeepCopy(this.trect):null,h=(null==(n=null==(i=this.StyleRecord)?void 0:i.Line)?void 0:n.Thickness)||0,c=Math.max(h,OptConstant.Common.MinWidth);super.UpdateFrame(r);let u=Utils1.DeepCopy(this.linetrect);if(u.x+=this.Frame.x,u.y+=this.Frame.y,null==(null==(s=this.StartPoint)?void 0:s.x)&&(e=!1),T3Gv.opt&&(o=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),e?(o&&T3Gv.opt.svgObjectLayer.RemoveElement(o),o=this.CreateShape(T3Gv.opt.svgDoc,!1)):o&&(r=this.GetSVGFrame(),o=o.GetElementById(OptConstant.SVGElementClass.Shape)),o&&(a=o.GetArrowheadBounds(),a&&a.length)))for(let d=0;d<a.length;d++)a[d].x+=r.x,a[d].y+=r.y,this.r=Utils2.UnionRect(a[d],this.r,this.r);if(Utils2.InflateRect(this.r,c/2,c/2),this.StyleRecord){let t=this.CalcEffectSettings(this.Frame,this.StyleRecord,!1);t&&Utils2.Add2Rect(this.r,t.extent)}if(this.DataID>=0&&this.linetrect.width&&(this.r=Utils2.UnionRect(u,this.r,this.r)),this.AddDimensionsToR(),this.TextGrow===NvConstant.TextGrowBehavior.Vertical&&!this.LineTextX){let t=this.GetTextOnLineParams(this.BlockID),e=Utils2.Pt2Rect(t.StartPoint,t.EndPoint);if(!this.TextWrapWidth){let t=Math.sqrt(r.width**2+r.height**2);this.TextWrapWidth=t/2}let i=e.width-this.TextWrapWidth;switch(ShapeUtil.TextAlignToWin(this.TextAlign).just){case TextConstant.TextJust.Left:this.trect.x=e.x,this.trect.width=this.TextWrapWidth;break;case TextConstant.TextJust.Right:this.trect.x=e.x+e.width-this.TextWrapWidth,this.trect.width=this.TextWrapWidth;break;default:this.trect.x=e.x+i/2,this.trect.width=this.TextWrapWidth}}l&&(this.trect.width=l.width,this.trect.height=l.height),LogUtil.Debug("= S.BaseLine: UpdateFrame output:",this.Frame,this.r)}GetHitTestFrame(){LogUtil.Debug("= S.BaseLine: GetHitTestFrame called");let t={};Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseLine: Initial hitTestFrame copied from Frame:",t);const e=OptConstant.Common.KnobSize;return Utils2.InflateRect(t,e/2,e/2),LogUtil.Debug("= S.BaseLine: Inflated hitTestFrame by knob size:",t),t=Utils2.UnionRect(t,this.r,t),LogUtil.Debug("= S.BaseLine: Final hitTestFrame after union with main rectangle:",t),t}GetMoveRect(t){LogUtil.Debug("= S.BaseLine: GetMoveRect called with includeInflation:",t);const e={};return t?(Utils2.CopyRect(e,this.r),Utils2.InflateRect(e,0,0)):Utils2.CopyRect(e,this.Frame),LogUtil.Debug("= S.BaseLine: GetMoveRect output:",e),e}SetSize(t,e,i){LogUtil.Debug("= S.BaseLine: SetSize called with newWidth:",t,"newHeight:",e,"actionType:",i);let n=!1,s=0,a=0;if(i!==OptConstant.ActionTriggerType.LineLength||null==t){null!=t&&(s=t-this.Frame.width),null!=e&&(a=e-this.Frame.height),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),(this.StartPoint.x<this.EndPoint.x||Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x)&&this.StartPoint.y<this.EndPoint.y)&&(n=!0);const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);n?this.AdjustLineEnd(i,this.EndPoint.x+s,this.EndPoint.y+a,0,!0):this.AdjustLineStart(i,this.StartPoint.x+s,this.StartPoint.y+a,0,!0),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}else this.UpdateDimensions(t);LogUtil.Debug("= S.BaseLine: SetSize completed with updated StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}AdjustForLineAngleSnap(t,e){LogUtil.Debug("= S.BaseLine: AdjustForLineAngleSnap called with startPoint:",t,"endPoint:",e);let i=Utils1.CalcAngleFromPoints(t,e),n=!1;return(i>=358||i<=3||i>=178&&i<=183)&&(e.y=t.y,n=!0),(i>=88&&i<=93||i>=268&&i<=273)&&(e.x=t.x,n=!0),LogUtil.Debug("= S.BaseLine: AdjustForLineAngleSnap output endPoint:",e,"adjusted:",n),n}GetAngle(t){LogUtil.Debug("= S.BaseLine: GetAngle called with params:",t);let e=0;const i=this.GetTextOnLineParams(t);let n=i.StartPoint,s=i.EndPoint;if(this.LineType===OptConstant.LineType.LINE){n.x>s.x&&(n=i.EndPoint,s=i.StartPoint);const t=Math.abs(n.x-s.x),a=Math.abs(n.y-s.y);if(a<1)e=0;else if(t<1)e=90;else{const i=Math.atan(a/t);e=n.y<s.y?180-(e=180*i/Math.PI):180*i/Math.PI}}else e=T3Gv.opt.GetClockwiseAngleBetween2PointsInDegrees(n,s);return LogUtil.Debug("= S.BaseLine: GetAngle output:",e),e}GetDrawNormalizedAngle(t,e){LogUtil.Debug("= S.BaseLine: GetDrawNormalizedAngle called with startPoint:",t,"endPoint:",e);let i=Utils1.CalcAngleFromPoints(t,e),n=!1;return this.polylist?this.checkIfPolyLine(this)?n=this.IsReverseWinding():void 0!==this.IsReversed&&(n=this.IsReversed):i>=180&&(n=!0),n&&(i-=180,i<0&&(i+=360)),LogUtil.Debug("= S.BaseLine: GetDrawNormalizedAngle output:",i),i}GetApparentAngle(t){LogUtil.Debug("= S.BaseLine: GetApparentAngle called with params:",t);const e=this.GetDrawNormalizedAngle(this.StartPoint,this.EndPoint);return LogUtil.Debug("= S.BaseLine: GetApparentAngle output:",e),e}IsReverseWinding(){LogUtil.Debug("= S.BaseLine: IsReverseWinding called");let t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);if(LogUtil.Debug("= S.BaseLine: Retrieved points:",t),2===t.length){const e=t[0].x>t[1].x;return LogUtil.Debug("= S.BaseLine: IsReverseWinding output (2 points):",e),e}let e=0;for(let n=0,s=t.length-1;n<t.length;s=n++)e+=(t[s].x+t[n].x)*(t[s].y-t[n].y);const i=.5*e>=0;return LogUtil.Debug("= S.BaseLine: IsReverseWinding output:",i),i}LinkGrow(t,e,i){switch(LogUtil.Debug("= S.BaseLine: LinkGrow called with blockID:",t,"hookPoint:",e,"newPoint:",i),e){case OptConstant.HookPts.KTL:this.StartPoint.x=i.x,this.StartPoint.y=i.y;break;case OptConstant.HookPts.KTR:this.EndPoint.x=i.x,this.EndPoint.y=i.y}this.CalcFrame(!0),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("= S.BaseLine: LinkGrow updated StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}HandleActionTriggerTrackCommon(t,e,i,n){LogUtil.Debug("= S.BaseLine: HandleActionTriggerTrackCommon called with input:",{newX:t,newY:e,redrawFlag:i,eventObj:n}),T3Gv.opt.actionStartX,T3Gv.opt.actionStartY,Utils1.DeepCopy(T3Gv.opt.actionBBox);let s={};function a(t,e,i){const n={x:t,y:e};return i.x<0&&(n.x-=i.x),i.y<0&&(n.y-=i.y),n}switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.LineStart:this.AdjustLineStart(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,i),(this.r.x<0||this.r.y<0)&&(s=a(this.StartPoint.x,this.StartPoint.y,this.r),this.AdjustLineStart(T3Gv.opt.actionSvgObject,s.x,s.y,T3Gv.opt.actionTriggerId,i));break;case OptConstant.ActionTriggerType.PolyEnd:case OptConstant.ActionTriggerType.LineEnd:this.AdjustLineEnd(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,i),(this.r.x<0||this.r.y<0)&&(s=a(this.EndPoint.x,this.EndPoint.y,this.r),this.AdjustLineEnd(T3Gv.opt.actionSvgObject,s.x,s.y,T3Gv.opt.actionTriggerId,i));break;case OptConstant.ActionTriggerType.Rotate:this.AdjustRotate(t,e,n);break;case OptConstant.ActionTriggerType.ModifyShape:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:case OptConstant.ActionTriggerType.PolyNode:case OptConstant.ActionTriggerType.PolyAdj:case OptConstant.ActionTriggerType.TopLeft:case OptConstant.ActionTriggerType.TopRight:case OptConstant.ActionTriggerType.BottomLeft:case OptConstant.ActionTriggerType.BottomRight:this.ModifyShape(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData,i),this.UpdateFrame(),(this.r.x<0||this.r.y<0)&&(s=a(t,e,this.r),this.ModifyShape(T3Gv.opt.actionSvgObject,s.x,s.y,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData),this.UpdateFrame());break;case OptConstant.ActionTriggerType.MovePolySeg:this.MovePolySeg(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData);break;case OptConstant.ActionTriggerType.DimLineAdj:this.DimensionLineDeflectionAdjust(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData)}LogUtil.Debug("= S.BaseLine: HandleActionTriggerTrackCommon completed with updated StartPoint:",this.StartPoint,"and EndPoint:",this.EndPoint)}AdjustRotate(t,e,i){LogUtil.Debug("= S.BaseLine: AdjustRotate called with mouseX:",t,"mouseY:",e,"event:",i);let n=t-T3Gv.opt.rotatePivotX,s=e-T3Gv.opt.rotatePivotY,a=0;0===n&&0===s?a=0:0===n?a=s>0?90:270:n>=0&&s>=0?a=Math.atan(s/n)*(180/NvConstant.Geometry.PI):n<0&&s>=0||n<0&&s<0?a=180+Math.atan(s/n)*(180/NvConstant.Geometry.PI):n>=0&&s<0&&(a=360+Math.atan(s/n)*(180/NvConstant.Geometry.PI));const o=T3Gv.opt.OverrideSnaps(i);if(T3Gv.docUtil.docConfig.enableSnap&&!o){const t=T3Gv.opt.EnhanceSnaps(i)?T3Gv.opt.enhanceRotateSnap:T3Gv.opt.rotateSnap;a=Math.round(a/t)*t}this.Rotate(T3Gv.opt.actionSvgObject,a)&&(T3Gv.opt.rotateEndRotation=a),LogUtil.Debug("= S.BaseLine: AdjustRotate output angle:",a)}DimensionLineDeflectionAdjust(t,e,i,n,s){LogUtil.Debug("= S.BaseLine: DimensionLineDeflectionAdjust called with",{svgDoc:t,mouseX:e,mouseY:i,actionTriggerID:n,triggerData:s}),this.dimensionDeflectionH=this.GetDimensionLineDeflection(t,e,i,s),LogUtil.Debug("= S.BaseLine: Calculated dimensionDeflectionH:",this.dimensionDeflectionH),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseLine: Dimension lines updated");const a=this.Dimensions&NvConstant.DimensionFlags.Select;LogUtil.Debug("= S.BaseLine: isDimSelect:",a),a&&(this.HideOrShowSelectOnlyDimensions(!0),LogUtil.Debug("= S.BaseLine: Select-only dimensions shown")),LogUtil.Debug("= S.BaseLine: DimensionLineDeflectionAdjust completed")}ScaleObject(t,e,i,n,s,a,o){if(LogUtil.Debug("= S.BaseLine: ScaleObject called with",{offsetX:t,offsetY:e,rotationCenter:i,rotationAngle:n,scaleX:s,scaleY:a,adjustThickness:o}),this.StartPoint.x=t+this.StartPoint.x*s,this.StartPoint.y=e+this.StartPoint.y*a,this.EndPoint.x=t+this.EndPoint.x*s,this.EndPoint.y=e+this.EndPoint.y*a,n){const t=2*Math.PI*(n/360);this.StartPoint=T3Gv.opt.RotatePointAroundPoint(i,this.StartPoint,t),this.EndPoint=T3Gv.opt.RotatePointAroundPoint(i,this.EndPoint,t)}if(this.CurveAdjust&&(this.CurveAdjust*=(s+a)/2),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),o){const t=Math.max(s,a);this.StyleRecord.Line.Thickness*=t,this.StyleRecord.Line.BThick*=t}this.CalcFrame(),LogUtil.Debug("= S.BaseLine: ScaleObject output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,CurveAdjust:this.CurveAdjust,StyleRecord:this.StyleRecord})}CanUseStandOffDimensionLines(){LogUtil.Debug("= S.BaseLine: CanUseStandOffDimensionLines called");return LogUtil.Debug("= S.BaseLine: CanUseStandOffDimensionLines output:",true),true}GetDimensionLineDeflection(t,e,i,n){LogUtil.Debug("= S.BaseLine: GetDimensionLineDeflection called with",{svgDoc:t,mouseX:e,mouseY:i,triggerData:n});let s=0;const a=[],o=new Point$1(0,0),r=this.GetDimensionPoints();for(let l=0;l<r.length;l++)r[l].x+=this.inside.x,r[l].y+=this.inside.y;if(o.x=n.knobPoint.x+this.Frame.x-n.adjustForKnob,o.y=n.knobPoint.y+this.Frame.y-n.adjustForKnob,a.push(r[n.segmentIndex-1]),a.push(r[n.segmentIndex]),a.push(new Point$1(o.x,o.y)),a.push(new Point$1(e,i)),Utils3.RotatePointsAboutCenter(this.Frame,-n.ccAngleRadians,a),this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){const t=Math.floor((n.ccAngleRadians-.01)/(Math.PI/2));1!==t&&2!==t&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,a)}else this.polylist&&this.IsReverseWinding()&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,a);return s=a[3].y-a[2].y,s=this.polylist&&this.polylist.segs[n.segmentIndex].dimTextAltPositioning?n.originalDeflection-s:n.originalDeflection+s,LogUtil.Debug("= S.BaseLine: GetDimensionLineDeflection output:",s),s}HandleActionTriggerCallResize(t,e){LogUtil.Debug("= S.BaseLine: HandleActionTriggerCallResize called with event:",t,"triggerData:",e);const i=this.Resize(T3Gv.opt.actionSvgObject,T3Gv.opt.actionNewBBox);T3Gv.opt.actionBBox.x+=i.x,T3Gv.opt.actionBBox.y+=i.y,T3Gv.opt.actionStartX+=i.x,T3Gv.opt.actionStartY+=i.y,LogUtil.Debug("= S.BaseLine: HandleActionTriggerCallResize output resizeAdjustment:",i)}HandleActionTriggerDoAutoScroll(){LogUtil.Debug("= S.BaseLine: HandleActionTriggerDoAutoScroll called"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleActionTriggerDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);LogUtil.Debug("= S.BaseLine: Converted document coordinates:",t),T3Gv.opt.pinRect&&T3Gv.opt.PinTrackPoint(t);const e=DrawUtil.DoAutoGrowDrag(t);LogUtil.Debug("= S.BaseLine: Adjusted coordinates after auto-grow drag:",e),T3Gv.docUtil.ScrollToPosition(e.x,e.y),this.HandleActionTriggerTrackCommon(e.x,e.y),LogUtil.Debug("= S.BaseLine: HandleActionTriggerDoAutoScroll completed")}AutoScrollCommon(t,e,i){let n,s;LogUtil.Debug("= S.BaseLine: AutoScrollCommon called with event:",t,"enableSnap:",e,"autoScrollCallback:",i);let a=!1;T3Gv.opt.OverrideSnaps(t)&&(e=!1),t.gesture?(n=t.gesture.center.clientX,s=t.gesture.center.clientY):(n=t.clientX,s=t.clientY);let o=n,r=s;const l=T3Gv.opt.svgDoc.docInfo;if(n>=l.dispX+l.dispWidth-4&&(a=!0,o=l.dispX+l.dispWidth-4+32),n<l.dispX&&(a=!0,o=l.dispX-32),s>=l.dispY+l.dispHeight-4&&(a=!0,r=l.dispY+l.dispHeight-4+32),s<l.dispY&&(a=!0,r=l.dispY-4-32),a){if(e&&T3Gv.docUtil.docConfig.enableSnap){const t=T3Gv.docUtil.SnapToGrid({x:o,y:r});o=t.x,r=t.y}return T3Gv.opt.autoScrollXPos=o,T3Gv.opt.autoScrollYPos=r,-1===T3Gv.opt.autoScrollTimerId&&(T3Gv.opt.autoScrollTimer=new T3Timer(this),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout(i,0)),LogUtil.Debug("= S.BaseLine: AutoScrollCommon output: shouldAutoScroll = false"),!1}return this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseLine: AutoScrollCommon output: shouldAutoScroll = true"),!0}LMActionTrack(t){let e;if(LogUtil.Debug("= S.BaseLine: LMActionTrack called with event:",t),Utils2.StopPropagationAndDefaults(t),-1==T3Gv.opt.actionStoredObjectId)return!1;const i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),n=t.gesture.srcEvent.altKey;T3Gv.opt.pinRect&&T3Gv.opt.PinTrackPoint(i);const s=DrawUtil.DoAutoGrowDrag(i);let a=this.LMActionDuringTrack(s);if(e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0,T3Gv.opt.OverrideSnaps(t)&&(e=!0),T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.ModifyShape&&T3Gv.docUtil.docConfig.enableSnap&&!e){const t=a.x-T3Gv.opt.actionStartX,e=a.y-T3Gv.opt.actionStartY,i=T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.MovePolySeg;T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate||this.CustomSnap(this.Frame.x,this.Frame.y,t,e,i,a)||i||(a=T3Gv.docUtil.SnapToGrid(a))}this.AutoScrollCommon(t,!e,"HandleActionTriggerDoAutoScroll")&&this.HandleActionTriggerTrackCommon(a.x,a.y,n,t),LogUtil.Debug("= S.BaseLine: LMActionTrack completed with updated coordinates:",a)}LMActionRelease(t,e){switch(LogUtil.Debug("= S.BaseLine: LMActionRelease called with event:",t,"isSecondary:",e),e||(LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer()),T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.Rotate:this.AfterRotateShape(T3Gv.opt.actionStoredObjectId);break;case OptConstant.ActionTriggerType.ModifyShape:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:case OptConstant.ActionTriggerType.PolyNode:case OptConstant.ActionTriggerType.PolyAdj:case OptConstant.ActionTriggerType.PolyEnd:case OptConstant.ActionTriggerType.MovePolySeg:this.AfterModifyShape(T3Gv.opt.actionStoredObjectId,T3Gv.opt.actionTriggerId);break;default:T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(T3Gv.opt.actionStoredObjectId,this,T3Gv.opt.ob,T3Gv.opt.actionTriggerId),T3Gv.opt.ob={},OptCMUtil.SetLinkFlag(T3Gv.opt.actionStoredObjectId,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks())}this.LMActionPostRelease(T3Gv.opt.actionStoredObjectId),(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),e||(T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null),LayerUtil.ShowOverlayLayer(),DrawUtil.CompleteOperation(),LogUtil.Debug("= S.BaseLine: LMActionRelease completed")}LMActionPreTrack(t,e){LogUtil.Debug("= S.BaseLine: LMActionPreTrack called with actionStoredObjectID:",t,"actionTriggerID:",e);let i,n,s,a=-1;if(i=ObjectUtil$1.GetObjectPtr(t,!1),!i)return void LogUtil.Debug("= S.BaseLine: LMActionPreTrack - objectPtr not found");switch(T3Gv.opt.ob=Utils1.DeepCopy(i),e){case OptConstant.ActionTriggerType.LineStart:for(let t=0;t<i.hooks.length;t++)if(i.hooks[t].hookpt===OptConstant.HookPts.KTL||i.hooks[t].hookpt===OptConstant.HookPts.WTL||i.hooks[t].hookpt===OptConstant.HookPts.WTR){a=t;break}break;case OptConstant.ActionTriggerType.LineEnd:for(let t=0;t<i.hooks.length;t++)if(i.hooks[t].hookpt===OptConstant.HookPts.KTR||i.hooks[t].hookpt===OptConstant.HookPts.WBL||i.hooks[t].hookpt===OptConstant.HookPts.WBR){a=t;break}break;default:return void LogUtil.Debug("= S.BaseLine: LMActionPreTrack - invalid actionTriggerID")}this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),s=new LinkParameters,T3Gv.opt.linkParams=s,n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),this.AllowLink()||(s.ArraysOnly=!0),n&&(s.AllowJoin=n.flags&OptConstant.SessionFlags.FreeHand),a>=0&&(s.ConnectIndex=i.hooks[a].objid,s.PrevConnect=i.hooks[a].objid,s.ConnectPt.x=i.hooks[a].connect.x,s.ConnectPt.y=i.hooks[a].connect.y,s.ConnectInside=i.hooks[a].cellid,s.HookIndex=i.hooks[a].hookpt,s.InitialHook=a);const o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);return s.lpCircList=HookUtil.GetHookList(o,s.lpCircList,t,i,NvConstant.ListCodes.CircTarg,{}),a<0&&1===i.hooks.length&&s.lpCircList&&s.lpCircList.push(i.hooks[0].objid),LogUtil.Debug("= S.BaseLine: LMActionPreTrack completed with linkParams:",s),!0}LMActionDuringTrack(t){LogUtil.Debug("= S.BaseLine: LMActionDuringTrack called with event:",t);const e=[{x:0,y:0}];return T3Gv.opt.linkParams&&(e[0].x=t.x,e[0].y=t.y,this.objecttype===NvConstant.FNObjectTypes.FlWall&&(e[0].id=T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart?OptConstant.HookPts.KTL:OptConstant.HookPts.KTR,T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,this,e,!0,!1,T3Gv.opt.linkParams.AllowJoin,t)&&(t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY))),LogUtil.Debug("= S.BaseLine: LMActionDuringTrack output event:",t),t}AfterRotateShape(t){if(LogUtil.Debug("= S.BaseLine: AfterRotateShape called with blockID:",t),this.r.x<0||this.r.y<0)return LogUtil.Debug("= S.BaseLine: Rectangle coordinates are negative, performing undo operation"),void ToolActUtil.Undo();T3Gv.opt.ob.Frame&&(LogUtil.Debug("= S.BaseLine: Maintaining link with frame:",T3Gv.opt.ob.Frame),HookUtil.MaintainLink(t,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),T3Gv.opt.ob={}),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseLine: AfterRotateShape completed for blockID:",t)}AfterModifyShape(t,e){if(LogUtil.Debug("= S.BaseLine: AfterModifyShape called with blockID:",t,"actionTriggerID:",e),T3Gv.opt.actionSvgObject){const t=T3Gv.opt.actionSvgObject.GetElementById(OptConstant.Common.EllipseAxes);null!=t&&(T3Gv.opt.actionSvgObject.RemoveElement(t),LogUtil.Debug("= S.BaseLine: Removed ellipseAxesElement:",t))}T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(t,this,T3Gv.opt.ob,e),T3Gv.opt.ob={},LogUtil.Debug("= S.BaseLine: Maintained link and reset ob.Frame")),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1),LogUtil.Debug("= S.BaseLine: Reset floating point dimensions flags")),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseLine: Set link flag and updated links"),this.arcobj&&(this.arcobj=null,LogUtil.Debug("= S.BaseLine: Reset arcobj to null")),LogUtil.Debug("= S.BaseLine: AfterModifyShape completed for blockID:",t)}LMActionPostRelease(t){LogUtil.Debug("= S.BaseLine: LMActionPostRelease called with blockID:",t),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,this.BlockID,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null),T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,this.BlockID,null),T3Gv.opt.linkParams.HiliteJoin=-1),T3Gv.opt.linkParams.JoinIndex>=0?PolyUtil.PolyLJoin(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.JoinData,t,T3Gv.opt.linkParams.JoinSourceData,!1):(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.InitialHook>=0)&&HookUtil.UpdateHook(t,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),T3Gv.opt.linkParams=null),LogUtil.Debug("= S.BaseLine: LMActionPostRelease completed for blockID:",t)}LMSetupActionClick(t,e){let i,n,s;if(LogUtil.Debug("= S.BaseLine: LMSetupActionClick called with event:",t,"isSecondary:",e),e)i=T3Gv.opt.actionStoredObjectId,n=T3Gv.opt.actionTriggerId,T3Gv.opt.pinRect=null,T3Gv.stdObj.PreserveBlock(i);else{T3Gv.opt.eventTimestamp=Date.now(),t.stopPropagation();const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(null===e)return!1;const a=e.GetID();if(i=parseInt(a.substring(OptConstant.Common.Action.length),10),T3Gv.opt.actionStoredObjectId=i,s=e.GetTargetForEvent(t),null==s)return!1;T3Gv.stdObj.PreserveBlock(i),n=s.GetID(),T3Gv.opt.actionTriggerId=n,T3Gv.opt.actionTriggerData=s.GetUserData(),T3Gv.opt.pinRect=null}e||T3Gv.opt.SetControlDragMode(s),this.LMActionPreTrack(i,n),T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(i),(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&this.HideAllIcons(T3Gv.opt.svgDoc,T3Gv.opt.actionSvgObject);let a=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),o=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;T3Gv.opt.OverrideSnaps(t)&&(o=!0),T3Gv.docUtil.docConfig.enableSnap&&!o&&(a=T3Gv.docUtil.SnapToGrid(a)),a=DrawUtil.DoAutoGrowDrag(a);const r=a.x,l=a.y;T3Gv.opt.actionLockAspectRatio=t.gesture.srcEvent.shiftKey,this.ResizeAspectConstrain&&(T3Gv.opt.actionLockAspectRatio=!T3Gv.opt.actionLockAspectRatio);const h=this.GetSVGFrame();return T3Gv.opt.actionLockAspectRatio&&(0===h.height?T3Gv.opt.actionLockAspectRatio=!1:(T3Gv.opt.actionAspectRatioWidth=h.width,T3Gv.opt.actionAspectRatioHeight=h.height)),T3Gv.opt.actionBBox=Utils1.DeepCopy(h),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(h),LayerUtil.HideOverlayLayer(),T3Gv.opt.actionStartX=r,T3Gv.opt.actionStartY=l,T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate?this.BeforeRotate(h):T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.ModifyShape&&T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.PolyAdj||this.BeforeModifyShape(r,l,T3Gv.opt.actionTriggerData),LogUtil.Debug("= S.BaseLine: LMSetupActionClick output:",!0),!0}BeforeRotate(t){LogUtil.Debug("= S.BaseLine: BeforeRotate called with frame:",t),T3Gv.opt.rotateKnobCenterDivisor=this.RotateKnobCenterDivisor();const e=this.EndPoint.x-this.StartPoint.x,i=this.EndPoint.y-this.StartPoint.y;T3Gv.opt.rotateStartRotation=180*Math.atan2(i,e)/Math.PI,T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateStartRotation,T3Gv.opt.rotatePivotX=t.x+t.width/T3Gv.opt.rotateKnobCenterDivisor.x,T3Gv.opt.rotatePivotY=t.y+t.height/T3Gv.opt.rotateKnobCenterDivisor.y,T3Gv.opt.rotateStartPoint=Utils1.DeepCopy(this.StartPoint),T3Gv.opt.rotateEndPoint=Utils1.DeepCopy(this.EndPoint),LogUtil.Debug("= S.BaseLine: BeforeRotate output:",{rotateStartRotation:T3Gv.opt.rotateStartRotation,rotateEndRotation:T3Gv.opt.rotateEndRotation,rotatePivotX:T3Gv.opt.rotatePivotX,rotatePivotY:T3Gv.opt.rotatePivotY,rotateStartPoint:T3Gv.opt.rotateStartPoint,rotateEndPoint:T3Gv.opt.rotateEndPoint})}LMActionClickExpCleanup(t){LogUtil.Debug("= S.BaseLine: LMActionClickExpCleanup called with error:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),T3Gv.opt.ob={},T3Gv.opt.linkParams=null,T3Gv.opt.actionTriggerId=-1,T3Gv.opt.actionTriggerData=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LogUtil.Debug("= S.BaseLine: LMActionClickExpCleanup completed")}LMActionClick(t,e){LogUtil.Debug("= S.BaseLine: LMActionClick called with event:",t,"isSecondary:",e);try{const i=this.BlockID,n=ObjectUtil$1.GetObjectPtr(i,!1);if(!(n&&n instanceof BaseDrawObject$1))return LogUtil.Debug("= S.BaseLine: LMActionClick - objectPtr is not an instance of BaseDrawObject"),!1;if(DrawUtil.InitializeAutoGrowDrag(0,i),!this.LMSetupActionClick(t,e))return void LogUtil.Debug("= S.BaseLine: LMActionClick - LMSetupActionClick returned false");const s=ObjectUtil$1.GetObjectPtr(i,!1);T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ActionTrackHandlerFactory(s)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ActionReleaseHandlerFactory(s)),LogUtil.Debug("= S.BaseLine: LMActionClick setup completed for blockID:",i)}catch(i){throw T3Util.Error("= s.BaseLine: LMActionClick encountered an error:",i),this.LMActionClickExpCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}Rotate(t,e){LogUtil.Debug("= S.BaseLine: Rotate called with svgElement:",t,"endRotation:",e);const i={x:T3Gv.opt.rotatePivotX,y:T3Gv.opt.rotatePivotY},n=(e-T3Gv.opt.rotateStartRotation)/(180/NvConstant.Geometry.PI),s=T3Gv.opt.RotatePointAroundPoint(i,T3Gv.opt.rotateStartPoint,n),a=T3Gv.opt.RotatePointAroundPoint(i,T3Gv.opt.rotateEndPoint,n);if(LogUtil.Debug("= S.BaseLine: Rotated points calculated as rotatedStartPoint:",s,"rotatedEndPoint:",a),s.x<0||s.y<0||a.x<0||a.y<0)return LogUtil.Debug("= S.BaseLine: Rotation resulted in negative coordinates, returning false"),!1;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(s.x>t.dim.x||s.y>t.dim.y||a.x>t.dim.x||a.y>t.dim.y)return LogUtil.Debug("= S.BaseLine: Rotation resulted in coordinates outside session dimensions, returning false"),!1}return this.AdjustLineStart(t,s.x,s.y,0,!0),this.AdjustLineEnd(t,a.x,a.y,OptConstant.ActionTriggerType.LineEnd,!0),LogUtil.Debug("= S.BaseLine: Rotate completed successfully"),!0}RotateKnobCenterDivisor(){LogUtil.Debug("= S.BaseLine: RotateKnobCenterDivisor called");const t={x:2,y:2};return LogUtil.Debug("= S.BaseLine: RotateKnobCenterDivisor output:",t),t}GetHookFlags(){LogUtil.Debug("= S.BaseLine: GetHookFlags called");const t=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcLine|NvConstant.HookFlags.LcCHook;return LogUtil.Debug("= S.BaseLine: GetHookFlags output:",t),t}AllowLink(){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),i=t&&t.activelayer>=0&&t.layers[t.activelayer].flags&NvConstant.LayerFlags.UseEdges,n=T3Gv.opt.fromOverlayLayer,s=e&&e.flags&OptConstant.SessionFlags.LLink;return!i&&(n||s)}GetHookPoints(){LogUtil.Debug("= S.BaseLine: GetHookPoints called");const t=OptConstant.Common.DimMax,e=[{x:0,y:0,id:OptConstant.HookPts.KTL},{x:t,y:t,id:OptConstant.HookPts.KTR}];return LogUtil.Debug("= S.BaseLine: GetHookPoints output:",e),e}PrGetWidthAdjustment(){LogUtil.Debug("= S.BaseLine: PrGetWidthAdjustment called");const t=this.StyleRecord.Line.Thickness/2;let e=this.GetAngle(null);e>=90&&(e=180-e);const i=e/180*Math.PI,n={deltax:Math.sin(i)*t,deltay:Math.cos(i)*t};return LogUtil.Debug("= S.BaseLine: PrGetWidthAdjustment output:",n),n}GetConnectLine(){LogUtil.Debug("= S.BaseLine: GetConnectLine called");return LogUtil.Debug("= S.BaseLine: GetConnectLine output:",null),null}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: GetPerimPts called with",{hookPoints:t,targetPoints:e,targetID:i,isRelative:n,additionalParam:s,hookIndex:a});let o=[],r={},l={};const h=OptConstant.HookPts,c=e.length;if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&a<0&&c>1){this.StyleRecord.Line.Thickness;const t=this.PrGetWidthAdjustment();for(let i=0;i<c;i++){let n={};switch(e[i].id){case h.WTL:n={x:this.StartPoint.x-t.deltax,y:this.StartPoint.y-t.deltay,id:e[i].id};break;case h.WTR:n={x:this.StartPoint.x+t.deltax,y:this.StartPoint.y-t.deltay,id:e[i].id};break;case h.WBL:n={x:this.EndPoint.x-t.deltax,y:this.EndPoint.y+t.deltay,id:e[i].id};break;case h.WBR:n={x:this.EndPoint.x+t.deltax,y:this.EndPoint.y+t.deltay,id:e[i].id};break;case h.KTL:n={x:this.StartPoint.x,y:this.StartPoint.y,id:e[i].id};break;case h.KTR:n={x:this.EndPoint.x,y:this.EndPoint.y,id:e[i].id}}o.push(n)}return LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}if(a>=0){const t=ObjectUtil$1.GetObjectPtr(a,!1);if(t&&t.objecttype===NvConstant.FNObjectTypes.Multiplicity){let i=5,n=5;i+=t.Frame.width/2;let s=this.GetAngle(null);s>=90&&(s=180-s);const a=s/180*Math.PI;let r=0;if(s<=45)t.subtype==NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(n=-t.Frame.height-5),r=Math.tan(a)*i,0===e[0].x?this.StartPoint.y<this.EndPoint.y?n-=r:n+=r:this.StartPoint.y<this.EndPoint.y?n+=r:n-=r,n=-n,this.StartPoint.x>=this.EndPoint.x&&(i=-i);else{t.subtype==NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(i=-i);const s=Math.tan(Math.PI/2-a);0===e[0].x?(this.StartPoint.y>=this.EndPoint.y?n=-n:n+=t.Frame.height,r=s*Math.abs(n),this.StartPoint.x<this.EndPoint.x?i+=r:i-=r):(this.StartPoint.y>=this.EndPoint.y?n+=t.Frame.height:n=-n,r=s*Math.abs(n),this.StartPoint.x<this.EndPoint.x?i-=r:i+=r,i=-i)}return 0===e[0].x?(o.push(new Point$1(this.StartPoint.x+i,this.StartPoint.y+n)),o[0].id=e[0].id):(o.push(new Point$1(this.EndPoint.x-i,this.EndPoint.y+n)),o[0].id=e[0].id),LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}if(t&&t.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===c){const t=e[0].x/OptConstant.Common.DimMax,i=this.GetPointOnLine(t);return o.push(i),o[0].id=e[0].id,LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}}const u=this.GetConnectLine();u?(r=u.startpt,l=u.endpt):(r=this.StartPoint,l=this.EndPoint);for(let d=0;d<c;d++){if(o[d]={x:0,y:0,id:0},0===e[d].x&&0===e[d].y)o[d].x=r.x,o[d].y=r.y;else if(e[d].x===OptConstant.Common.DimMax&&e[d].y===OptConstant.Common.DimMax)o[d].x=l.x,o[d].y=l.y;else{const t=l.x-r.x,i=l.y-r.y;o[d].x=e[d].x/OptConstant.Common.DimMax*t+r.x,o[d].y=e[d].y/OptConstant.Common.DimMax*i+r.y}null!=e[d].id&&(o[d].id=e[d].id)}return LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}GetPointOnLine(t){LogUtil.Debug("= S.BaseLine: GetPointOnLine called with proportion:",t);const e=(t,e)=>{const i=t.x-e.x,n=t.y-e.y;return Utils2.Sqrt(i*i+n*n)},i={x:this.StartPoint.x,y:this.StartPoint.y},n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),s=[];let a=0;for(let l=1;l<n.length;l++){const t=n[l-1],i=n[l],o=e(t,i);s.push({pt1:t,pt2:i,len:o}),a+=o}const o=(t=Math.max(0,Math.min(1,t)))*a;let r=0;for(const l of s){const{pt1:t,pt2:e,len:n}=l;if(r+n>=o){const s=(o-r)/n;i.x=t.x+(e.x-t.x)*s,i.y=t.y+(e.y-t.y)*s;break}r+=n}return LogUtil.Debug("= S.BaseLine: GetPointOnLine output:",i),i}GetTargetPoints(t,e,i){LogUtil.Debug("= S.BaseLine: GetTargetPoints called with",{hookPoint:t,hookFlags:e,targetID:i});let n=!1,s=!1;const a=[{x:0,y:0}];let o={x:0,y:0};const r=OptConstant.HookPts;if(null!=i&&i>=0){if(ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case r.SED_KTC:case r.SED_KBC:case r.SED_KRC:case r.SED_KLC:const t=ShapeUtil.LineIsReversed(this,null,!1);if(0===this.hooks.length)return t?(a[0].x=OptConstant.Common.DimMax,a[0].y=OptConstant.Common.DimMax,a.push({x:0,y:0})):(a[0].x=0,a[0].y=0,a.push({x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax})),LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a;if(1===this.hooks.length){if(this.hooks[0].hookpt===r.SED_KTR)return a[0].x=0,a[0].y=0,LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a;if(this.hooks[0].hookpt===r.SED_KTL)return a[0].x=OptConstant.Common.DimMax,a[0].y=OptConstant.Common.DimMax,LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a}return[]}}let l=this.EndPoint.x-this.StartPoint.x;Utils2.IsEqual(l,0)&&(l=0),0===l&&(n=!0);let h=this.EndPoint.y-this.StartPoint.y;Utils2.IsEqual(h,0)&&(h=0),0===h&&(s=!0);let c=n?0:h/l;if(o.x=t.x,o.y=t.y,n||Math.abs(c)>1||e&NvConstant.HookFlags.LcHOnly&&!s){if(T3Gv.docUtil.docConfig.enableSnap&&!(e&NvConstant.HookFlags.LcNoSnaps)){o=T3Gv.docUtil.SnapToGrid(o);const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);o.y<t.y&&(o.y=t.y),o.y>t.y+t.height&&(o.y=t.y+t.height)}const t=o.y-this.StartPoint.y;var u=n?t:t/c}else{if(T3Gv.docUtil.docConfig.enableSnap&&!(e&NvConstant.HookFlags.LcNoSnaps)){o=T3Gv.docUtil.SnapToGrid(o);const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);o.x<t.x&&(o.x=t.x),o.x>t.x+t.width&&(o.x=t.x+t.width)}var d=(o.x-this.StartPoint.x)*c}return s||(a[0].y=d/h*OptConstant.Common.DimMax),a[0].x=n?a[0].y:u/l*OptConstant.Common.DimMax,s&&(a[0].y=a[0].x),a[0].x>OptConstant.Common.DimMax&&(a[0].x=OptConstant.Common.DimMax),a[0].y>OptConstant.Common.DimMax&&(a[0].y=OptConstant.Common.DimMax),a[0].x<0&&(a[0].x=0),a[0].y<0&&(a[0].y=0),LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a}AllowHook(t,e,i){LogUtil.Debug("= S.BaseLine: AllowHook called with hookPoint:",t,"targetID:",e,"distance:",i);const n=OptConstant.HookPts;if(null!=e&&e>=0){if(ObjectUtil$1.GetObjectPtr(e,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case n.KTC:case n.KBC:case n.KRC:case n.KLC:if(i>200)return LogUtil.Debug("= S.BaseLine: AllowHook output: false (distance > 200)"),!1;break;default:if(t.id>=n.CustomBase&&t.id<n.CustomBase+100&&i>200)return LogUtil.Debug("= S.BaseLine: AllowHook output: false (custom hook point and distance > 200)"),!1}}return LogUtil.Debug("= S.BaseLine: AllowHook output: true"),!0}DeleteObject(){if(LogUtil.Debug("= S.BaseLine: DeleteObject called"),super.DeleteObject(),this.objecttype===NvConstant.FNObjectTypes.NgEvent)LogUtil.Debug("= S.BaseLine: Handling NgEvent"),this.hooks.length&&ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);else LogUtil.Debug("= S.BaseLine: No specific handling for objecttype:",this.objecttype);LogUtil.Debug("= S.BaseLine: DeleteObject completed")}GetSegLFace(t,e,i){let n;return LogUtil.Debug("= S.BaseLine: GetSegLFace called with objectType:",t,"point:",e,"referencePoint:",i),n=this.Frame.width>=this.Frame.height?e.y>=i.y?OptConstant.HookPts.KBC:OptConstant.HookPts.KTC:e.x>=i.x?OptConstant.HookPts.KRC:OptConstant.HookPts.KLC,LogUtil.Debug("= S.BaseLine: GetSegLFace output:",n),n}GetSpacing(){LogUtil.Debug("= S.BaseLine: GetSpacing called");const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),e={width:null,height:null};if(2===this.hooks.length){const i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),n=ObjectUtil$1.GetObjectPtr(this.hooks[1].objid,!1);t.width<t.height?(e.height=Math.abs(this.StartPoint.y-this.EndPoint.y),i&&n&&(e.height=i.Frame.y<n.Frame.y?n.Frame.y-(i.Frame.y+i.Frame.height):i.Frame.y-(n.Frame.y+n.Frame.height))):(e.width=Math.abs(this.StartPoint.x-this.EndPoint.x),i&&n&&(e.width=i.Frame.x<n.Frame.x?n.Frame.x-(i.Frame.x+i.Frame.width):i.Frame.x-(n.Frame.x+n.Frame.width)))}return LogUtil.Debug("= S.BaseLine: GetSpacing output:",e),e}GetShapeConnectPoint(t){LogUtil.Debug("= S.BaseLine: GetShapeConnectPoint called with hookPointID:",t);const e={x:0,y:0},i={x:0,y:0},n=OptConstant.Common.DimMax,s=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);s.width<s.height?(e.x=n/2,i.x=n/2,this.EndPoint.y<this.StartPoint.y?(e.y=n,i.y=0):(e.y=0,i.y=n)):(e.y=n/2,i.y=n/2,this.EndPoint.x<this.StartPoint.x?(e.x=n,i.x=0):(e.x=0,i.x=n));const a=t===OptConstant.HookPts.KTL?i:e;return LogUtil.Debug("= S.BaseLine: GetShapeConnectPoint output:",a),a}GetBestHook(t,e,i){const n=OptConstant.Common.DimMax,s=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),a=OptConstant.HookPts;let o=!1;const r=ObjectUtil$1.GetObjectPtr(t,!1);if(r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(e){case a.KTC:case a.KBC:case a.KRC:case a.KLC:return s.width<s.height?(o=s.y===this.EndPoint.y,(null==i?void 0:i.y)<n/2?o?a.KTC:a.KBC:o?a.KBC:a.KTC):(o=s.x===this.EndPoint.x,(null==i?void 0:i.x)<n/2?o?a.KLC:a.KRC:o?a.KRC:a.KLC);default:return e}return e}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: CreateConnectHilites called with",{svgDoc:t,targetPoint:e,hookPoint:i,isJoin:n,hookIndex:s,additionalParam:a});const o=t.CreateShape(OptConstant.CSType.Group);let r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);let l=OptConstant.Common.ConnPointLineDim/r;n&&(l=OptConstant.Common.JoinPointLineDim/r);const h=[],c={x:0,y:0,width:0,height:0};if(null!=i){h.push(i);const a=this.GetPerimPts(e,h,null,!0,null,s);n&&(0===i.x&&0===i.y?(a[0].x=this.StartPoint.x,a[0].y=this.StartPoint.y):i.x===OptConstant.Common.DimMax&&i.y===OptConstant.Common.DimMax&&(a[0].x=this.EndPoint.x,a[0].y=this.EndPoint.y)),c.x=a[0].x-l,c.y=a[0].y-l,c.width=l,c.height=l;let r=null;r={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:l/2,y:l/2,knobSize:l,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",KnobID:0,cursorType:CursorConstant.CursorType.Anchor},n&&(r.fillColor="none",r.strokeSize=1,r.strokeColor="black",r.cursorType=CursorConstant.CursorType.Default);const u=this.GenericKnob(r);return o.AddElement(u),o.SetPos(c.x,c.y),o.SetSize(c.width,c.height),o.isShape=!0,o.SetID("hilite_"+e),LogUtil.Debug("= S.BaseLine: CreateConnectHilites output:",o),o}}HookToPoint(t,e){LogUtil.Debug("= S.BaseLine: HookToPoint input, hookId:",t,"outRect:",e);let i={x:0,y:0,id:0};const n=OptConstant,s=this.PrGetWidthAdjustment();switch(t){case n.HookPts.KTL:i.x=this.StartPoint.x,i.y=this.StartPoint.y;break;case n.HookPts.KTR:i.x=this.EndPoint.x,i.y=this.EndPoint.y;break;case n.HookPts.WTL:i.x=this.StartPoint.x-s.deltax,i.y=this.StartPoint.y-s.deltay;break;case n.HookPts.WTR:i.x=this.StartPoint.x+s.deltax,i.y=this.StartPoint.y-s.deltay;break;case n.HookPts.WBL:i.x=this.EndPoint.x-s.deltax,i.y=this.EndPoint.y+s.deltay;break;case n.HookPts.WBR:i.x=this.EndPoint.x+s.deltax,i.y=this.EndPoint.y+s.deltay;break;default:i.x=this.EndPoint.x,i.y=this.EndPoint.y}if(e){const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}return LogUtil.Debug("= S.BaseLine: HookToPoint output, resultPoint:",i,"outRect:",e),i}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.BaseLine: MaintainPoint input:",{point:t,targetId:e,distance:i,lineObj:n,offset:s});let a=-1,o=n;const r={};let l={};if(o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line){switch(o.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:for(let t=0;t<o.hooks.length;t++)if(o.hooks[t].targetid===e){o.HookToPoint(o.hooks[t].hookpt,r),a=0;break}if(0!==a)return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true early (no matching hook)"),!0;l=Utils1.DeepCopy(o),Utils2.CopyRect(l.Frame,r),l.StartPoint.x=r.x,l.StartPoint.y=r.y,l.EndPoint.x=r.x+r.width,l.EndPoint.y=r.y+r.height,o=l}if(T3Gv.opt.LineCheckPoint(this,t))return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true early (LineCheckPoint true)"),!0;if(T3Gv.opt.LinesIntersect(this,o,t))return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true early (LinesIntersect true)"),!0;PolyUtil.LinesMaintainDist(this,i,s,t)}else PolyUtil.LinesMaintainDist(this,i,s,t);return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true"),!0}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: ChangeTarget called with e:",t,"targetId:",e,"a:",i,"r:",n,"i:",s,"n:",a);let o=0,r=ObjectUtil$1.GetObjectPtr(e,!1);if(this.TextFlags&NvConstant.TextFlags.HorizText&&r instanceof Instance.Shape.BaseShape){o=this.GetApparentAngle(-1),o=Math.abs(o)%180;let t=Math.abs(r.RotationAngle%180);LogUtil.Debug("= S.BaseLine: ChangeTarget computed apparentAngle:",o,"targetRotation:",t),Math.abs(t-o)>2&&Math.abs(t-(o-180))>2?(r.RotationAngle=o,OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),ObjectUtil$1.AddToDirtyList(e),LogUtil.Debug("= S.BaseLine: ChangeTarget updated targetObj.RotationAngle to:",o)):LogUtil.Debug("= S.BaseLine: ChangeTarget rotation difference within tolerance, no update performed")}ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("= S.BaseLine: ChangeTarget completed for BlockID:",this.BlockID)}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.BaseLine: GetPolyPoints called with:",{numPoints:t,isRelative:e,a:i,r:n,i:s});const a=[new Point$1(this.StartPoint.x,this.StartPoint.y),new Point$1(this.EndPoint.x,this.EndPoint.y)];if(e)for(const o of a)o.x-=this.Frame.x,o.y-=this.Frame.y;return LogUtil.Debug("= S.BaseLine: GetPolyPoints output:",a),a}Hit(t,e,i,n,s){let a,o,r;LogUtil.Debug("= S.BaseLine: Hit called with input:",{point:t,t:e,isKnob:i,hitResult:n,hookPointID:s});const l=OptConstant.Common.KnobSize;let h=T3Gv.opt.svgDoc.docInfo.docToScreenScale;if(T3Gv.opt.svgDoc.docInfo.docScale<=.5&&(h*=2),i){const e=2*l/h;if(o=Utils2.InflatePoint(this.StartPoint,e),r=Utils2.InflatePoint(this.EndPoint,e),s&&(s===OptConstant.HookPts.KTL&&(o=null),s===OptConstant.HookPts.KTR&&(r=null)),this.hooks)for(let t=0;t<this.hooks.length;t++)this.hooks[t].hookpt===OptConstant.HookPts.KTL&&(o=null),this.hooks[t].hookpt===OptConstant.HookPts.KTR&&(r=null);if(o&&Utils2.pointInRect(o,t)){const t=ObjectUtil$1.GetObjectPtr(n.objectid,!1);if(!(t&&t.polylist&&t.polylist.closed))return n&&(n.hitcode=NvConstant.HitCodes.PLApp,n.segment=OptConstant.HookPts.KTL,n.pt.x=this.StartPoint.x,n.pt.y=this.StartPoint.y),LogUtil.Debug("= S.BaseLine: Hit output:",NvConstant.HitCodes.PLApp),NvConstant.HitCodes.PLApp}if(r&&Utils2.pointInRect(r,t)){const t=ObjectUtil$1.GetObjectPtr(n.objectid,!1);if(!(t&&t.polylist&&t.polylist.closed))return n&&(n.hitcode=NvConstant.HitCodes.PLApp,n.segment=OptConstant.HookPts.KTR,n.pt.x=this.EndPoint.x,n.pt.y=this.EndPoint.y),LogUtil.Debug("= S.BaseLine: Hit output:",NvConstant.HitCodes.PLApp),NvConstant.HitCodes.PLApp}}const c=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,[]),u={x:t.x,y:t.y},d={};if(a=Utils3.LineDStyleHit(c,u,this.StyleRecord.Line.Thickness,0,d),void 0!==d.lpHit&&n){for(let t=0;t<c.length;t++)if(d.lpHit<c[t]){d.lpHit=t;break}n.segment=d.lpHit}return n&&(n.hitcode=a),LogUtil.Debug("= S.BaseLine: Hit output:",a),a}StartNewObjectDrawDoAutoScroll(){LogUtil.Debug("= S.BaseLine: StartNewObjectDrawDoAutoScroll called"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("StartNewObjectDrawDoAutoScroll",100),LogUtil.Debug("= S.BaseLine: autoScrollTimerId set to",T3Gv.opt.autoScrollTimerId);let t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);LogUtil.Debug("= S.BaseLine: Converted window coords to docCoords:",t),t=DrawUtil.DoAutoGrowDrag(t),LogUtil.Debug("= S.BaseLine: After DoAutoGrowDrag, docCoords:",t),T3Gv.docUtil.ScrollToPosition(t.x,t.y),LogUtil.Debug("= S.BaseLine: Scrolled to position:",t),this.StartNewObjectDrawTrackCommon(t.x,t.y,null),LogUtil.Debug("= S.BaseLine: Called StartNewObjectDrawTrackCommon with coords:",t.x,t.y)}StartNewObjectDrawTrackCommon(t,e,i){LogUtil.Debug("= S.BaseLine: StartNewObjectDrawTrackCommon called with x:",t,"y:",e,"extraFlag:",i);const n=t-T3Gv.opt.actionStartX,s=e-T3Gv.opt.actionStartY,a=Math.sqrt(n*n+s*s);LogUtil.Debug("= S.BaseLine: Computed deltaX:",n,"deltaY:",s,"distance:",a);const o=Utils1.DeepCopy(T3Gv.opt.actionBBox);LogUtil.Debug("= S.BaseLine: actionBBox:",o),this.AdjustLineEnd(T3Gv.opt.actionSvgObject,t,e,OptConstant.ActionTriggerType.LineEnd,i),LogUtil.Debug("= S.BaseLine: AdjustLineEnd called with x:",t,"y:",e,"trigger:",OptConstant.ActionTriggerType.LineEnd,"extraFlag:",i)}LMDrawTrack(t){let e;LogUtil.Debug("= S.BaseLine: LMDrawTrack called with event:",t),Utils2.StopPropagationAndDefaults(t);let i=0;if(-1===T3Gv.opt.actionStoredObjectId)return LogUtil.Debug("= S.BaseLine: LMDrawTrack aborted, actionStoredObjectId is -1"),!1;t.gesture?(e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=t.gesture.srcEvent.altKey):e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY),LogUtil.Debug("= S.BaseLine: LMDrawTrack input point (before track):",e),e=this.LMDrawDuringTrack(e),LogUtil.Debug("= S.BaseLine: After LMDrawDuringTrack, trackPoint:",e);let n=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;if(T3Gv.opt.OverrideSnaps(t)&&(n=!0),T3Gv.docUtil.docConfig.enableSnap&&!n){const t=e.x-T3Gv.opt.actionStartX,i=e.y-T3Gv.opt.actionStartY;LogUtil.Debug("= S.BaseLine: Calculated delta for snapping:",{deltaX:t,deltaY:i}),this.CustomSnap(this.Frame.x,this.Frame.y,t,i,!1,e)||(e=T3Gv.docUtil.SnapToGrid(e),LogUtil.Debug("= S.BaseLine: After SnapToGrid, trackPoint:",e))}e=DrawUtil.DoAutoGrowDrag(e),LogUtil.Debug("= S.BaseLine: After DoAutoGrowDrag, trackPoint:",e),this.AutoScrollCommon(t,!n,"StartNewObjectDrawDoAutoScroll")?(LogUtil.Debug("= S.BaseLine: AutoScrollCommon returned true. Calling StartNewObjectDrawTrackCommon with:",{x:e.x,y:e.y,altKey:i}),this.StartNewObjectDrawTrackCommon(e.x,e.y,i)):LogUtil.Debug("= S.BaseLine: AutoScrollCommon returned false, not calling StartNewObjectDrawTrackCommon"),LogUtil.Debug("= S.BaseLine: LMDrawTrack completed with final trackPoint:",e)}CancelObjectDraw(){return LogUtil.Debug("= S.BaseLine: CancelObjectDraw called"),LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.lineStamp&&(T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.off("mousemove"),T3Gv.opt.lineStamp=!1),T3Gv.opt.fromOverlayLayer=!1,T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseLine: CancelObjectDraw completed with output: true"),!0}LMDrawRelease(t,e){LogUtil.Debug("= S.BaseLine: LMDrawRelease called with input:",{event:t,touch:e});try{let i,n={x:0,y:0};let s,a,o=OptConstant.Common.SegDefLen;e?(n={x:e.x,y:e.y},i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e.x,e.y)):t.gesture?(n={x:t.gesture.center.clientX,y:t.gesture.center.clientY},i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY)):(n={x:t.clientX,y:t.clientY},i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY)),LogUtil.Debug("= S.BaseLine: LMDrawRelease - pointerPos:",n,"conversionPoint:",i),t&&Utils2.StopPropagationAndDefaults(t);const r=2*OptConstant.Common.MinDim;if(T3Gv.opt.fromOverlayLayer?(s=T3Gv.opt.lineDrawStartX-i.x,a=T3Gv.opt.lineDrawStartY-i.y,o-=20):(s=T3Gv.opt.drawStartX-i.x,a=T3Gv.opt.drawStartY-i.y),LogUtil.Debug("= S.BaseLine: LMDrawRelease - deltaX:",s,"deltaY:",a,"minLength:",o),!T3Gv.opt.lineStamp&&Math.abs(s)<r&&Math.abs(a)<r)return T3Gv.opt.lineStamp=!0,T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.on("mousemove",EvtUtil.Evt_DrawTrackHandlerFactory(this)),void LogUtil.Debug("= S.BaseLine: LMDrawRelease - negligible movement; early exit.");T3Gv.opt.WorkAreaHammer&&(LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick)),t&&t.gesture&&t.gesture.stopDetect(),this.ResetAutoScrollTimer();Utils1.DeepCopy(T3Gv.opt.linkParams);const l=this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId);T3Gv.opt.fromOverlayLayer,l?DrawUtil.PostObjectDraw(null):DrawUtil.PostObjectDraw(this.LMDrawRelease),T3Gv.opt.lineStamp&&(T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.off("mousemove"),T3Gv.opt.lineStamp=!1),T3Gv.opt.fromOverlayLayer&&(T3Gv.opt.fromOverlayLayer=!1),LogUtil.Debug("= S.BaseLine: LMDrawRelease output: completed successfully")}catch(i){throw OptCMUtil.CancelOperation(),this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),T3Util.Error("= s.BaseLine: LMDrawRelease encountered error:",i),i}}LMDrawPreTrack(t){LogUtil.Debug("= S.BaseLine: LMDrawPreTrack called with event:",t);let e,i=this.GetHookFlags(),n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),s=[{x:0,y:0}],a={};return this.AllowLink()?(T3Gv.opt.linkParams=new LinkParameters,n&&(T3Gv.opt.fromOverlayLayer||(T3Gv.opt.linkParams.AllowJoin=n.flags&OptConstant.SessionFlags.FreeHand)),i&NvConstant.HookFlags.LcCHook&&(s[0].id=OptConstant.HookPts.KTL,s[0].x=t.x,s[0].y=t.y,T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,this,s,!1,!1,T3Gv.opt.linkParams.AllowJoin,t)?(T3Gv.opt.linkParams.SConnectIndex=T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.SConnectHookFlag=T3Gv.opt.linkParams.ConnectHookFlag,T3Gv.opt.linkParams.SConnectInside=T3Gv.opt.linkParams.ConnectInside,T3Gv.opt.linkParams.SConnectPt.x=T3Gv.opt.linkParams.ConnectPt.x,T3Gv.opt.linkParams.SConnectPt.y=T3Gv.opt.linkParams.ConnectPt.y,T3Gv.opt.linkParams.ConnectIndex=-1,T3Gv.opt.linkParams.Hookindex=-1,T3Gv.opt.linkParams.ConnectInside=0,T3Gv.opt.linkParams.ConnectHookFlag=0,t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY,this.StartPoint.x+=T3Gv.opt.dragDeltaX,this.StartPoint.y+=T3Gv.opt.dragDeltaY,this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y,T3Gv.opt.linkParams.lpCircList=HookUtil.GetHookList(e,T3Gv.opt.linkParams.lpCircList,T3Gv.opt.linkParams.SConnectIndex,this,NvConstant.ListCodes.TargOnly,a)):T3Gv.opt.linkParams.JoinIndex>=0&&(T3Gv.opt.linkParams.SJoinIndex=T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.SJoinData=T3Gv.opt.linkParams.JoinData,T3Gv.opt.linkParams.SJoinSourceData=T3Gv.opt.linkParams.JoinSourceData,T3Gv.opt.linkParams.SConnectPt.x=T3Gv.opt.linkParams.ConnectPt.x,T3Gv.opt.linkParams.SConnectPt.y=T3Gv.opt.linkParams.ConnectPt.y,T3Gv.opt.linkParams.JoinIndex=-1,T3Gv.opt.linkParams.JoinData=0,T3Gv.opt.linkParams.JoinSourceData=0,T3Gv.opt.linkParams.lpCircList=HookUtil.GetHookList(e,T3Gv.opt.linkParams.lpCircList,T3Gv.opt.linkParams.SJoinIndex,this,NvConstant.ListCodes.CircTarg,a)))):n&&(this instanceof Instance.Shape.PolyLine||n.flags&OptConstant.SessionFlags.FreeHand)&&(T3Gv.opt.linkParams=new LinkParameters,T3Gv.opt.linkParams.ArraysOnly=!0,T3Gv.opt.linkParams.AllowJoin=n.flags&OptConstant.SessionFlags.FreeHand),LogUtil.Debug("= S.BaseLine: LMDrawPreTrack returning:",!0),!0}LMDrawDuringTrack(t){let e;LogUtil.Debug("= S.BaseLine: LMDrawDuringTrack called with input:",t);let i=[{x:0,y:0}],n=!1;if(null==T3Gv.opt.linkParams)return LogUtil.Debug("= S.BaseLine: LMDrawDuringTrack output (no linkParams):",t),t;if(i[0].x=t.x,i[0].y=t.y,i[0].id=OptConstant.HookPts.KTR,T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,this,i,!0,!1,T3Gv.opt.linkParams.AllowJoin,t)&&(t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY),T3Gv.opt.linkParams.SJoinIndex>=0&&T3Gv.opt.linkParams.JoinIndex<0){let i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.SJoinIndex);this.checkIfPolyLine(i)&&(e=new HitResult(-1,0,null),e.hitcode=i.Hit(t,!1,!0,e),e&&e.hitcode===NvConstant.HitCodes.PLApp&&T3Gv.opt.linkParams.SJoinData!=e.segment&&(n=!0),n?(T3Gv.opt.linkParams.JoinIndex=i.BlockID,T3Gv.opt.linkParams.JoinData=e.segment,T3Gv.opt.linkParams.HiliteJoin<0&&(T3Gv.opt.linkParams.hiliteJoin=i.BlockID,OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkJoin&&(OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!1),i.SetCursors(),OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!1)))):(T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,this.BlockID,null),T3Gv.opt.linkParams.HiliteJoin=-1),OptCMUtil.SetEditMode(NvConstant.EditState.Default)))}return LogUtil.Debug("= S.BaseLine: LMDrawDuringTrack output:",t),t}LMDrawPostRelease(t){if(LogUtil.Debug("= S.BaseLine: LMDrawPostRelease input:",t),null!=T3Gv.opt.linkParams){const e=T3Gv.opt.linkParams;if(e.SHiliteConnect>=0&&(HookUtil.HiliteConnect(e.SHiliteConnect,e.SConnectPt,!1,!1,this.BlockID,e.SHiliteInside),e.SHiliteConnect=-1,e.SHiliteInside=null),e.HiliteConnect>=0&&(HookUtil.HiliteConnect(e.HiliteConnect,e.ConnectPt,!1,!1,this.BlockID,e.HiliteInside),e.HiliteConnect=-1,e.HiliteInside=null),e.SHiliteJoin>=0&&(HookUtil.HiliteConnect(e.SHiliteJoin,e.SConnectPt,!1,!0,this.BlockID,null),e.SHiliteJoin=-1),e.HiliteJoin>=0&&(HookUtil.HiliteConnect(e.HiliteJoin,e.ConnectPt,!1,!0,this.BlockID,null),e.HiliteJoin=-1),OptCMUtil.SetEditMode(NvConstant.EditState.Default),e.SJoinIndex>=0){let i=PolyUtil.PolyLJoin(e.SJoinIndex,e.SJoinData,t,e.SJoinSourceData,!1);if(i!==t&&i>=0){t=i,e.ConnectIndex>=0&&(e.ConnectIndex=-1);const n=ObjectUtil$1.GetObjectPtr(i,!1);Utils2.EqualPt(this.EndPoint,n.StartPoint)?e.JoinSourceData=1:e.JoinSourceData=2}}let i=0;return e.JoinIndex>=0?i=-2===PolyUtil.PolyLJoin(e.JoinIndex,e.JoinData,t,e.JoinSourceData,!1)?1:0:e.ConnectIndex>=0&&HookUtil.UpdateHook(t,e.InitialHook,e.ConnectIndex,e.HookIndex,e.ConnectPt,e.ConnectInside),this.hookflags=Utils2.SetFlag(this.hookflags,NvConstant.HookFlags.LcNoContinuous,!1),T3Gv.opt.UpdateLinks(),T3Gv.opt.linkParams=null,LogUtil.Debug("= S.BaseLine: LMDrawPostRelease output:",i),i}return 0}LMDrawClickExceptionCleanup(t){LogUtil.Debug("= S.BaseLine: LMDrawClickExceptionCleanup called with input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.lineStamp&&(T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.off("mousemove"),T3Gv.opt.lineStamp=!1),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),T3Gv.opt.linkParams=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,T3Gv.opt.lineStamp=!1,T3Gv.opt.fromOverlayLayer=!1,T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),LogUtil.Debug("= S.BaseLine: LMDrawClickExceptionCleanup output: cleanup complete")}LMDrawClick(t,e){LogUtil.Debug("3 ========= LMDrawClick 1 draw click e=>",t,e);try{this.Frame.x=t,this.Frame.y=e,this.StartPoint={x:t,y:e},this.EndPoint={x:t,y:e},T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_DrawReleaseHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.off("tap")}catch(i){throw LogUtil.Debug("3 ========= LMDrawClick 2 eRRdraw click e=>",i),this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}ChangeBackgroundColor(t,e){LogUtil.Debug("= S.BaseLine: ChangeBackgroundColor called with newColor:",t,"currentColor:",e),this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Transparent&&this.StyleRecord.Fill.Paint.Color===e?(LogUtil.Debug("= S.BaseLine: Condition met. Updating background color."),ObjectUtil$1.GetObjectPtr(this.BlockID,!0),this.StyleRecord.Fill.Paint.Color=t,LogUtil.Debug("= S.BaseLine: Background color updated to:",this.StyleRecord.Fill.Paint.Color)):LogUtil.Debug("= S.BaseLine: Condition not met. Background color remains:",this.StyleRecord.Fill.Paint.Color)}ResizeInTextEdit(t,e){LogUtil.Debug("= S.BaseLine: ResizeInTextEdit called with input:",{textObject:t,newSize:e});const i={x:0,y:0};return LogUtil.Debug("= S.BaseLine: ResizeInTextEdit output:",i),i}CalcTextPosition(t){LogUtil.Debug("= S.BaseLine: CalcTextPosition input:",t);const e=t.Frame.x+t.Frame.width/2,i=t.Frame.y+t.Frame.height/2,n=[{x:this.StartPoint.x,y:this.StartPoint.y},{x:this.EndPoint.x,y:this.EndPoint.y}],s={x:this.Frame.x+this.Frame.width/2,y:this.Frame.y+this.Frame.height/2},a=this.GetAngle(null);let o=t.RotationAngle;this.LineType===OptConstant.LineType.LINE&&(o=a+o,o%=180,Math.abs(o)<1&&(o=0));const r=this.EndPoint.x-this.StartPoint.x,l=this.EndPoint.y-this.StartPoint.y,h=a%180;Utils2.IsEqual(h,0)||0!==o||(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!0));const c=Math.sqrt(r*r+l*l);this.TextWrapWidth=c;const u=-a*NvConstant.Geometry.PI/180;Utils3.RotatePointsAboutPoint(s,u,n),this.LineTextX=(e-n[0].x)/c,this.LineTextX<0&&(this.LineTextX=1+this.LineTextX),this.LineTextY=i-n[0].y,this.LineTextX&&(this.trect=Utils1.DeepCopy(t.trect)),LogUtil.Debug("= S.BaseLine: CalcTextPosition output:",{LineTextX:this.LineTextX,LineTextY:this.LineTextY,TextWrapWidth:this.TextWrapWidth,trect:this.trect})}SetTextObject(t){LogUtil.Debug("= S.BaseLine: SetTextObject called with newDataId =",t),this.DataID=t;const e=ShapeUtil.TextAlignToWin(this.TextAlign),i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);return this.StyleRecord.Fill.Paint.Color=i.background.Paint.Color,e.vjust===TextConstant.TextJust.Center?(this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid,this.StyleRecord.Fill.Paint.Opacity=1):this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent,LogUtil.Debug("= S.BaseLine: SetTextObject output, DataID =",this.DataID,"StyleRecord.Fill =",this.StyleRecord.Fill),!0}GetTextOnLineParams(t){LogUtil.Debug("= S.BaseLine: GetTextOnLineParams called with input:",t);let e={Frame:new Rect$1,StartPoint:new Point$1,EndPoint:new Point$1};return e.StartPoint.x=this.StartPoint.x,e.StartPoint.y=this.StartPoint.y,e.EndPoint.x=this.EndPoint.x,e.EndPoint.y=this.EndPoint.y,e.Frame=Utils2.Pt2Rect(e.StartPoint,e.EndPoint),0!==this.LineTextX&&(e.CenterProp=this.LineTextX,e.Displacement=this.LineTextY),LogUtil.Debug("= S.BaseLine: GetTextOnLineParams output:",e),e}TextDirectionCommon(t,e,i,n){LogUtil.Debug("= S.BaseLine: TextDirectionCommon input:",{textObj:t,bgObj:e,useOriginal:i,extraParam:n});let s=t.GetTextMinDimensions(),a=s.width,o=s.height,r=this.GetTextOnLineParams(n),l=r.StartPoint.x,h=r.Frame.x,c=r.EndPoint.x,u=r.StartPoint.y,d=r.Frame.y,p=r.EndPoint.y,g=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(r.StartPoint,r.EndPoint),f=g*(180/NvConstant.Geometry.PI),b=!1,v=.5,m={},y=0,S=0,w=0,x=0;if(t.SetVerticalAlignment("top"),this.linetrect=Utils1.DeepCopy(this.Frame),this.LineTextY&&(y=this.LineTextY*Math.cos(g),S=-this.LineTextY*Math.sin(g)),f>90&&f<270&&(f-=180,b=!0),!i&&this.TextDirection){g=0,f=0;var C=this.TextAlign,T=this.TextDirection}if(this.LineTextX||this.LineTextY){if(s){this.theMinTextDim.width=a,this.theMinTextDim.height=o,i&&(this.TextAlign=C);let n=ShapeUtil.TextAlignToJust(this.TextAlign);if(b&&this.LineType===OptConstant.LineType.LINE)switch(n.just){case TextConstant.TextAlign.Left:n.just=TextConstant.TextAlign.Right;break;case TextConstant.TextAlign.Right:n.just=TextConstant.TextAlign.Left}e&&e.SetSize(a+2,o+2),v=D.CenterProp=r.CenterProp;let s=l+(c-l)*v-h+S,g=u+(p-u)*v-d+y;0===this.trect.height&&(this.trect.height=3*o);let T=this.trect.height>o?this.trect.height:o;if(w=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal?s-a/2:s-this.trect.width/2,x=g-T/2,t.SetPos(w,x),t.SetVerticalAlignment(n.vjust),t.SetParagraphAlignment(n.just),this.TextDirection?t.SetRotation(f,s,g):t.SetRotation(0,s,g),m={x:s,y:g},e){let t={};switch(n.just){case TextConstant.TextAlign.Left:t.x=w-1;break;case TextConstant.TextAlign.Right:t.x=w-1+this.trect.width-a;break;default:t.x=s-a/2-1}switch(n.vjust){case"top":t.y=x-1-T/2;break;case"bottom":t.y=x-o/2-1+T/2;break;default:t.y=x-o/2-1}e.SetPos(t.x,t.y)}this.linetrect.x=w+this.Frame.x,this.linetrect.y=x+this.Frame.y,this.linetrect.width=a+2,this.linetrect.height=o+2,this.TextDirection?(e&&e.SetRotation(f,s,g),this.linetrect=ToolActUtil.RotateRect(this.linetrect,m,f)):e&&e.SetRotation(0,s,g),this.UpdateFrame()}}else if(s){switch(this.theMinTextDim.width=a,this.theMinTextDim.height=o,e.SetSize(a+2,o+2),this.TextAlign){case TextConstant.TextAlign.TopLeft:w=l-h+a/2*Math.cos(g),x=u-d+a/2*Math.sin(g),e.SetPos(w-a/2-1,x-o-this.StyleRecord.Line.Thickness/2-2),w-=a/2,x=x-o-this.StyleRecord.Line.Thickness/2-1,t.SetPos(w,x),t.SetRotation(f,w+a/2,x+o/2),m={x:w+a/2,y:x+o/2},e.SetRotation(f,w+a/2,x+o/2),this.TextGrow===NvConstant.TextGrowBehavior.Vertical&&(b=!1),b?t.SetParagraphAlignment(TextConstant.TextAlign.Right):t.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.Left:w=l-h+a/2*Math.cos(g),x=u-d+a/2*Math.sin(g),e.SetPos(w-a/2-1,x-o/2-1),w-=a/2,x-=o/2,t.SetPos(w,x),t.SetRotation(f,w+a/2,x+o/2),m={x:w+a/2,y:x+o/2},e.SetRotation(f,w+a/2,x+o/2),this.TextGrow===NvConstant.TextGrowBehavior.Vertical&&(b=!1),b?t.SetParagraphAlignment(TextConstant.TextAlign.Right):t.SetParagraphAlignment(TextConstant.TextAlign.Left);break;default:w=(l+c)/2-h,x=(u+p)/2-d,e.SetPos(w,x),t.SetPos(w,x),t.SetRotation(f,w,x),m={x:w,y:x},e.SetRotation(f,w,x),t.SetParagraphAlignment(TextConstant.TextAlign.Center)}this.linetrect.x=w+this.Frame.x,this.linetrect.y=x+this.Frame.y,this.linetrect.width=a,this.linetrect.height=o,m.x+=this.Frame.x,m.y+=this.Frame.y,this.linetrect=ToolActUtil.RotateRect(this.linetrect,m,f),Utils1.DeepCopy(this.linetrect),TextUtil.TextPinFrame(this.linetrect,o),this.linetrect.x=this.linetrect.x-this.Frame.x,this.linetrect.y=this.linetrect.y-this.Frame.y,this.UpdateFrame()}i&&(this.TextDirection=T,this.TextAlign=C),LogUtil.Debug("= S.BaseLine: TextDirectionCommon output:",{linerect:this.linetrect})}LMAddSVGTextObject(t,e){LogUtil.Debug("= S.BaseLine: LMAddSVGTextObject input:",{svgDoc:t,container:e});const i=this.trect,n=t.CreateShape(OptConstant.CSType.Rect);n.SetID(OptConstant.SVGElementClass.TextBackground),n.SetStrokeWidth(0);let s=this.StyleRecord.Fill.Paint.Color;n.SetFillColor(s),this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent?n.SetOpacity(0):n.SetOpacity(this.StyleRecord.Fill.Paint.Opacity);const a=t.CreateShape(OptConstant.CSType.Text);a.SetID(OptConstant.SVGElementClass.Text),a.SetRenderingEnabled(!1),a.SetSize(i.width,i.height),a.SetSpellCheck(this.AllowSpell()),e.isText=!0,e.textElem=a;const o=T3Gv.stdObj.GetObject(this.DataID);o.Data.runtimeText?a.SetRuntimeText(o.Data.runtimeText):(a.SetText(""),a.SetParagraphAlignment(this.TextAlign),a.SetVerticalAlignment("top")),o.Data.runtimeText||(o.Data.runtimeText=a.GetRuntimeText()),this.TextGrow!==NvConstant.TextGrowBehavior.Vertical&&a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,i.height),this.bInGroup&&a.DisableHyperlinks(!0),a.SetRenderingEnabled(!0);const r=a.GetTextMinDimensions();r.height;if(this.TextDirection&&this.StyleRecord.Line.Thickness>=r.height&&n&&(s=this.StyleRecord.Line.Paint.Color,n.SetOpacity(0)),this.LineTextY||this.LineTextX){switch(ShapeUtil.TextAlignToWin(this.TextAlign).vjust){case TextConstant.TextJust.Top:case TextConstant.TextJust.Bottom:this.trect.height,this.LineTextY;break;default:this.LineTextY}}n&&e.AddElement(n),e.AddElement(a),this.TextDirectionCommon(a,n,!1,null),a.SetEditCallback(T3Gv.opt.TextCallback,e),LogUtil.Debug("= S.BaseLine: LMAddSVGTextObject output:",{addedTextElement:a})}LMResizeSVGTextObject(t,e,i){if(LogUtil.Debug("= S.BaseLine: LMResizeSVGTextObject called with input:",{svgDoc:t,textContainer:e,extraData:i}),-1!==e.DataID){const i=t.GetElementById(OptConstant.SVGElementClass.TextBackground),n=t.GetElementById(OptConstant.SVGElementClass.Text);n&&e.TextDirectionCommon(n,i,!1,null)}LogUtil.Debug("= S.BaseLine: LMResizeSVGTextObject completed")}AdjustTextEditBackground(t,e){if(LogUtil.Debug("= S.BaseLine: AdjustTextEditBackground called with input:",{elementId:t,container:e}),-1!==this.DataID){const i=e||T3Gv.opt.svgObjectLayer.GetElementById(t);LogUtil.Debug("= S.BaseLine: Retrieved svgContainer:",i);const n=i.GetElementById(OptConstant.SVGElementClass.TextBackground),s=i.GetElementById(OptConstant.SVGElementClass.Text);if(LogUtil.Debug("= S.BaseLine: Retrieved textBackgroundElement:",n,"and textElement:",s),s){const t=null==e;this.TextDirectionCommon(s,n,t,null),LogUtil.Debug("= S.BaseLine: TextDirectionCommon applied with useOriginal =",t)}else LogUtil.Debug("= S.BaseLine: No text element found in the SVG container.")}else LogUtil.Debug("= S.BaseLine: Skipped AdjustTextEditBackground because DataID is -1.");LogUtil.Debug("= S.BaseLine: AdjustTextEditBackground completed.")}AddCorner(t,e){LogUtil.Debug("= S.BaseLine: AddCorner called with input:",{cornerIndex:t,cornerData:e}),LogUtil.Debug("= S.BaseLine: AddCorner completed with no output (void)")}SVGTokenizerHook(t){return LogUtil.Debug("= S.BaseLine: SVGTokenizerHook called with input:",t),T3Gv.opt.bTokenizeStyle&&((t=Utils1.DeepCopy(t)).Fill.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.SolidFill,t.Fill.Paint.Color),t.Line.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineColor,t.Line.Paint.Color),0===this.StartArrowID&&0===this.EndArrowID&&(t.Line.Thickness=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineThick,t.Line.Thickness))),LogUtil.Debug("= S.BaseLine: SVGTokenizerHook output:",t),t}GetDimensionPoints(){LogUtil.Debug("= S.BaseLine: GetDimensionPoints called, input: none");const t=[],e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);LogUtil.Debug("= S.BaseLine: Computed rect =",e);const i=new Point$1(this.StartPoint.x-e.x,this.StartPoint.y-e.y);LogUtil.Debug("= S.BaseLine: Computed relative start point =",i);const n=new Point$1(this.EndPoint.x-e.x,this.EndPoint.y-e.y);return LogUtil.Debug("= S.BaseLine: Computed relative end point =",n),t.push(i),t.push(n),LogUtil.Debug("= S.BaseLine: GetDimensionPoints output =",t),t}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.BaseLine: PostCreateShapeCallback input:",{svgDoc:t,shapeContainer:e,flag:i,extra:n});const s=e.GetElementById(OptConstant.SVGElementClass.Shape),a=e.GetElementById(OptConstant.SVGElementClass.Slop);LogUtil.Debug("= S.BaseLine: Retrieved shapeElement and slopElement",{shapeElement:s,slopElement:a});let o=T3Gv.arrowHlkTable[this.StartArrowID],r=T3Gv.arrowHlkTable[this.EndArrowID];const l=T3Gv.arrowHsTable[this.ArrowSizeIndex];LogUtil.Debug("= S.BaseLine: Arrow lookup:",{startArrow:o,endArrow:r,arrowSize:l}),0===o.id&&(o=null),0===r.id&&(r=null),LogUtil.Debug("= S.BaseLine: Arrow after check:",{startArrow:o,endArrow:r}),o||r?(s.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp),LogUtil.Debug("= S.BaseLine: Arrowheads set on shapeElement and slopElement")):LogUtil.Debug("= S.BaseLine: No arrowheads to set (both null)"),this.DataID>=0?(this.LMAddSVGTextObject(t,e),LogUtil.Debug("= S.BaseLine: SVG text object added")):LogUtil.Debug("= S.BaseLine: DataID is invalid, skipping text object addition"),this.UpdateDimensionLines(e,null),LogUtil.Debug("= S.BaseLine: Dimension lines updated"),LogUtil.Debug("= S.BaseLine: Coordinate lines updated"),LogUtil.Debug("= S.BaseLine: PostCreateShapeCallback completed")}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.BaseLine: CreateActionTriggers input:",{svgDoc:t,triggerTarget:e,unusedParam:i,secondaryTarget:n});let s,a=!0,o=t.CreateShape(OptConstant.CSType.Group),r=OptConstant.Common.KnobSize,l=OptConstant.Common.RKnobSize;if(!(this instanceof Instance.Shape.Line&&this.objecttype===NvConstant.FNObjectTypes.FlWall&&(T3Gv.wallOpt&&T3Gv.wallOpt.IsAddingWalls&&T3Gv.wallOpt.IsAddingWalls()||T3Constant.DocContext.UsingWallTool))){let i=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(i*=2);const h=r/i*(this.objecttype===NvConstant.FNObjectTypes.FlWall?2:1),c=l/i,u=this.Frame;let d=u.width+h,p=u.height+h,g=Utils1.DeepCopy(u);g.x-=h/2,g.y-=h/2,g.width+=h,g.height+=h;let f,b={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:h,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};e!==n&&(b.fillColor="white",b.strokeSize=1,b.strokeColor="black",b.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(b.fillColor="gray",b.locked=!0):this.NoGrow()&&(b.fillColor="red",b.strokeColor="red",b.cursorType=CursorConstant.CursorType.Default),b.x=this.StartPoint.x-this.Frame.x,b.y=this.StartPoint.y-this.Frame.y,b.knobID=OptConstant.ActionTriggerType.LineStart;const v=ObjectUtil$1.GetObjectPtr(e,!1);if(v&&v.hooks)for(f=0;f<v.hooks.length;f++)if(v.hooks[f].hookpt===OptConstant.HookPts.KTL){b.shapeType=OptConstant.CSType.Oval,a=!1;break}if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&(b.shapeType=OptConstant.CSType.Image),s=this.GenericKnob(b),this.objecttype===NvConstant.FNObjectTypes.FlWall&&s.SetURL&&(s.SetURL(b.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),s.ExcludeFromExport(!0)),o.AddElement(s),b.shapeType=OptConstant.CSType.Rect,v&&v.hooks)for(f=0;f<v.hooks.length;f++)if(v.hooks[f].hookpt===OptConstant.HookPts.KTR){b.shapeType=OptConstant.CSType.Oval,a=!1;break}if(b.x=this.EndPoint.x-this.Frame.x,b.y=this.EndPoint.y-this.Frame.y,b.knobID=OptConstant.ActionTriggerType.LineEnd,this.objecttype===NvConstant.FNObjectTypes.FlWall&&(b.shapeType=OptConstant.CSType.Image),s=this.GenericKnob(b),this.objecttype===NvConstant.FNObjectTypes.FlWall&&s.SetURL&&(s.SetURL(b.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),s.ExcludeFromExport(!0)),o.AddElement(s),a&&!b.locked&&!this.NoGrow()){b.shapeType=OptConstant.CSType.Oval;let t=Math.atan((this.EndPoint.y-this.StartPoint.y)/(this.EndPoint.x-this.StartPoint.x));t<0&&(t=Math.abs(t)),this.EndPoint.x>=this.StartPoint.x?b.x=this.EndPoint.x-3*c*Math.cos(t)-this.Frame.x+h/2-c/2:b.x=this.EndPoint.x+3*c*Math.cos(t)-this.Frame.x+h/2-c/2,this.EndPoint.y>=this.StartPoint.y?b.y=this.EndPoint.y-3*c*Math.sin(t)-this.Frame.y+h/2-c/2:b.y=this.EndPoint.y+3*c*Math.sin(t)-this.Frame.y+h/2-c/2,b.cursorType=CursorConstant.CursorType.Rotate,b.knobID=OptConstant.ActionTriggerType.Rotate,b.fillColor="white",b.fillOpacity=.001,b.strokeSize=2.5,b.knobSize=c,b.strokeColor="white",s=this.GenericKnob(b),o.AddElement(s),b.strokeSize=1,b.strokeColor="black",s=this.GenericKnob(b),o.AddElement(s),b.knobSize=h}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(o,t,b)}return o.SetSize(d,p),o.SetPos(g.x,g.y),o.isShape=!0,o.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.BaseLine: CreateActionTriggers output:",o),o}}CalcCursorForSegment(t,e,i){LogUtil.Debug("= S.BaseLine: CalcCursorForSegment input:",{startPoint:t,endPoint:e,flag:i});const n=Utils1.CalcAngleFromPoints(t,e);LogUtil.Debug("= S.BaseLine: Calculated angle:",n);const s=this.CalcCursorForAngle(n,i);return LogUtil.Debug("= S.BaseLine: CalcCursorForSegment output:",{cursor:s}),s}NoRotate(){LogUtil.Debug("= S.BaseLine: NoRotate called, input: none");const t=this.hooks.length>1;return LogUtil.Debug("= S.BaseLine: NoRotate output:",t),t}SetRuntimeEffects(t){LogUtil.Debug("= S.BaseLine: SetRuntimeEffects called with input:",t);const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);e?(LogUtil.Debug("= S.BaseLine: Retrieved SVG element for BlockID",this.BlockID,":",e),this.ApplyEffects(e,t,!0),LogUtil.Debug("= S.BaseLine: Applied runtime effects with input:",t)):LogUtil.Debug("= S.BaseLine: No SVG element found for BlockID",this.BlockID)}ApplyStyles(t,e){LogUtil.Debug("= S.BaseLine: ApplyStyles called with input:",{element:t,styleObj:e});const i=e.Fill.Paint.FillType,n=e.Line.Paint.FillType,s=""!==this.ImageURL;if(this.polylist&&this.polylist.closed){if(s){let i="PROPFILL",n={x:0,y:0,width:0,height:0};this.ImageHeader&&(this.ImageHeader.croprect&&(n.x=this.ImageHeader.croprect.left,n.y=this.ImageHeader.croprect.top,n.width=this.ImageHeader.croprect.right-this.ImageHeader.croprect.left,n.height=this.ImageHeader.croprect.bottom-this.ImageHeader.croprect.top),void 0!==this.ImageHeader.imageflags&&this.ImageHeader.imageflags===NvConstant.ImageScales.AlwaysFit&&(i="NOPROP")),LogUtil.Debug("= S.BaseLine: Applying image fill with",{url:this.ImageURL,scaleType:i,cropRect:n}),t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n}),t.SetFillOpacity(e.Fill.Paint.Opacity)}}else if(i===NvConstant.FillTypes.Gradient){const i=this.CreateGradientRecord(e.Fill.Paint.GradientFlags,e.Fill.Paint.Color,e.Fill.Paint.Opacity,e.Fill.Paint.EndColor,e.Fill.Paint.EndOpacity);LogUtil.Debug("= S.BaseLine: Applying gradient fill with record:",i),t.SetGradientFill(i)}else if(i===NvConstant.FillTypes.RichGradient){const i=this.CreateRichGradientRecord(e.Fill.Paint.GradientFlags);LogUtil.Debug("= S.BaseLine: Applying rich gradient fill with record:",i),t.SetGradientFill(i)}else if(i===NvConstant.FillTypes.Texture){const i={url:"",scale:1,alignment:e.Fill.Paint.TextureScale.AlignmentScalar},n=e.Fill.Paint.Texture;T3Gv.opt.TextureList.Textures[n]&&(i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.scale=T3Gv.opt.CalcTextureScale(e.Fill.Paint.TextureScale,i.dim.x),e.Fill.Paint.TextureScale.Scale=i.scale,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),LogUtil.Debug("= S.BaseLine: Applying texture fill with params:",i),t.SetTextureFill(i),t.SetFillOpacity(e.Fill.Paint.Opacity))}else i===NvConstant.FillTypes.Transparent?(LogUtil.Debug("= S.BaseLine: Applying transparent fill"),t.SetFillColor("none")):(LogUtil.Debug("= S.BaseLine: Applying solid fill with color:",e.Fill.Paint.Color),t.SetFillColor(e.Fill.Paint.Color),t.SetFillOpacity(e.Fill.Paint.Opacity));if(n===NvConstant.FillTypes.Gradient){const i=this.CreateGradientRecord(e.Line.Paint.GradientFlags,e.Line.Paint.Color,e.Line.Paint.Opacity,e.Line.Paint.EndColor,e.Line.Paint.EndOpacity);LogUtil.Debug("= S.BaseLine: Applying gradient stroke with record:",i),t.SetGradientStroke(i)}else if(n===NvConstant.FillTypes.RichGradient){const i=this.CreateRichGradientRecord(e.Line.Paint.GradientFlags);LogUtil.Debug("= S.BaseLine: Applying rich gradient stroke with record:",i),t.SetGradientStroke(i)}else if(n===NvConstant.FillTypes.Texture){const i={url:"",scale:e.Line.Paint.TextureScale.Scale,alignment:e.Line.Paint.TextureScale.AlignmentScalar},n=e.Line.Paint.Texture;i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),LogUtil.Debug("= S.BaseLine: Applying texture stroke with params:",i),t.SetTextureStroke(i),t.SetStrokeOpacity(e.Line.Paint.Opacity)}else n===NvConstant.FillTypes.Solid?(LogUtil.Debug("= S.BaseLine: Applying solid stroke with color:",e.Line.Paint.Color),t.SetStrokeColor(e.Line.Paint.Color),t.SetStrokeOpacity(e.Line.Paint.Opacity)):(LogUtil.Debug("= S.BaseLine: No stroke to apply, setting stroke color to none"),t.SetStrokeColor("none"));LogUtil.Debug("= S.BaseLine: ApplyStyles completed for element:",t)}CalcLineHops(t,e){LogUtil.Debug("= S.BaseLine: CalcLineHops called with targetShape =",t,"and hopData =",e);const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);let n=i.length,s=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),a=s.length;for(let o=0;o<n;++o){if(this.hoplist.nhops>OptConstant.Common.MaxHops)return void LogUtil.Debug("= S.BaseLine: Maximum hop count exceeded, exiting CalcLineHops");let t,n;o>0?(t=i[o-1],n=i[o]):(t=i[o],n=i[o+1],o++),LogUtil.Debug("= S.BaseLine: Processing base segment between",t,"and",n);let r=this.AddHopPoint(t,n,s,a,o,e);if(null==r){LogUtil.Debug("= S.BaseLine: AddHopPoint returned null, breaking out of loop");break}if(LogUtil.Debug("= S.BaseLine: AddHopPoint result =",r),r.bSuccess){let i=r.tindex;if(i>=1&&a>2){if(LogUtil.Debug("= S.BaseLine: First hop success with tindex =",i,"; refining target poly points"),s=s.slice(i),a-=i,r=this.AddHopPoint(t,n,s,a,o,e),null==r){LogUtil.Debug("= S.BaseLine: Second AddHopPoint returned null, breaking out of loop");break}i=r.tindex,LogUtil.Debug("= S.BaseLine: Refined hop result, new tindex =",i)}if(i<a-1){if(LogUtil.Debug("= S.BaseLine: tindex =",i,"is less than targetPointCount - 1 =",a-1,"; further refining target poly points"),s=s.slice(i),a-=i,r=this.AddHopPoint(t,n,s,a,o,e),null==r){LogUtil.Debug("= S.BaseLine: Third AddHopPoint returned null, breaking out of loop");break}i=r.tindex,LogUtil.Debug("= S.BaseLine: Final hop refinement, new tindex =",i)}}}LogUtil.Debug("= S.BaseLine: CalcLineHops completed")}DebugLineHops(t){LogUtil.Debug("= S.BaseLine: DebugLineHops called with input:",t);const e=this.hoplist.nhops;let i=null,n=!1;const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(0!=(s.flags&OptConstant.SessionFlags.AllowHops)){let a=s.hopdim.x,o=0,r=0,l=0;for(let h=0;h<e;h++)if(i=this.hoplist.hops[h],i.cons)n=!0,l++,o+=i.pt.x,r+=i.pt.y;else{let e;n?(e="green",a=3*s.hopdim.x,l++,o+=i.pt.x,r+=i.pt.y,o/=l,r/=l,n=!1):(e="red",a=s.hopdim.x,o=i.pt.x,r=i.pt.y);const h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),c={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:h.x+(o-a/2),y:h.y+(r-a/2),knobSize:a,fillColor:"none",fillOpacity:1,strokeSize:1,strokeColor:e,KnobID:0,cursorType:CursorConstant.CursorType.Cross};LogUtil.Debug("= S.BaseLine: DebugLineHops knobParams:",c);const u=this.GenericKnob(c);u.SetID("hoptarget"),T3Gv.opt.svgOverlayLayer.AddElement(u),o=0,r=0,l=0}}LogUtil.Debug("= S.BaseLine: DebugLineHops completed")}AddHopPoint(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: AddHopPoint called with input:",{startPoint:t,endPoint:e,polyPoints:i,numPoints:n,segmentIndex:s,hopIndex:a});let o,r,l,h,c,u=0,d=0;if(this.hoplist.nhops>OptConstant.Common.MaxHops)return LogUtil.Debug("= S.BaseLine: Maximum hops exceeded, no hop added."),{bSuccess:!1,tindex:0};const p=i;i=p.slice(u);let g=T3Gv.opt.PolyLIntersect(t,e,i,n);for(r=g.ipt,c=g.lpseg;g.bSuccess;){if(o=Utils2.Pt2Rect(t,e),Utils2.InflateRect(o,2,2),r.x>=o.x&&r.x<=o.x+o.width&&r.y>=o.y&&r.y<=o.y+o.height){c+=u,l=r.x-e.x,h=r.y-e.y;const t={segment:s,index:a,pt:r,dist:Utils2.Sqrt(l*l+h*h),cons:!1};this.hoplist.hops.push(t),this.hoplist.nhops++;const i={bSuccess:!0,tindex:c};return LogUtil.Debug("= S.BaseLine: AddHopPoint output:",i),i}if(u+=c,u>n-1)break;if(++d>n)break;n=(i=p.slice(u)).length,g=T3Gv.opt.PolyLIntersect(t,e,i,n),c=g.lpseg,r=g.ipt}const f={bSuccess:!1,tindex:c};return LogUtil.Debug("= S.BaseLine: AddHopPoint output:",f),f}RightClick(t){LogUtil.Debug("= S.BaseLine: RightClick called with input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("= S.BaseLine: Converted document coords:",e);const i=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(LogUtil.Debug("= S.BaseLine: Found target element:",i),!SelectUtil.SelectObjectFromClick(t,i))return LogUtil.Debug("= S.BaseLine: RightClick - selection failed, returning false"),!1;const n=i.GetID();let s=ObjectUtil$1.GetObjectPtr(n,!1);if(LogUtil.Debug("= S.BaseLine: Retrieved object:",s),s&&s.GetTextObject()>=0){const e=i.textElem;if(e){const n=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("= S.BaseLine: Spell index at location:",n),n>=0&&TextUtil.ActivateTextEdit(i,t,!0)}}if(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=i.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,LogUtil.Debug("= S.BaseLine: Set Right click param:",T3Gv.opt.rClickParam),null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();let i=-1;e&&(i=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)),LogUtil.Debug("= S.BaseLine: Active edit spell index:",i),i>=0?T3Gv.opt.svgDoc.GetSpellCheck().ShowSpellMenu(e,i,t.gesture.center.clientX,t.gesture.center.clientY):UIUtil.ShowContextMenu(!0,"Line","Default")}else UIUtil.ShowContextMenu(!0,"Line","Default");LogUtil.Debug("= S.BaseLine: RightClick completed")}SetObjectStyle(t){LogUtil.Debug("= S.BaseLine: SetObjectStyle called with input:",t);let e=Utils1.DeepCopy(t),i=!1;this.LineType!==OptConstant.LineType.SEGLINE&&null!=e.segl&&delete e.segl,null==t.EndArrowID&&null==t.StartArrowID||(this.StartPoint.x<this.EndPoint.x?i=!1:(this.StartPoint.x>this.EndPoint.x||this.StartPoint.y>this.EndPoint.y)&&(i=!0),i&&(e.EndArrowID=this.EndArrowID,e.StartArrowID=this.StartArrowID,e.EndArrowDisp=this.EndArrowDisp,e.StartArrowDisp=this.StartArrowDisp,null!=t.EndArrowID&&(e.StartArrowID=t.EndArrowID,e.StartArrowDisp=t.EndArrowDisp),null!=t.StartArrowID&&(e.EndArrowID=t.StartArrowID,e.EndArrowDisp=t.StartArrowDisp))),this.polylist&&this.polylist.closed||e&&e.StyleRecord&&e.StyleRecord.Fill&&e.StyleRecord.Fill.Hatch&&(e.StyleRecord.Fill.Hatch=0);let n=super.SetObjectStyle(e);return n.StyleRecord&&n.StyleRecord.Fill&&(this.ImageURL=""),LogUtil.Debug("= S.BaseLine: SetObjectStyle output:",n),n}GetArrowheadSelection(t){if(LogUtil.Debug("= S.BaseLine: GetArrowheadSelection - input:",t),t){(function(t){if(Math.abs(t.EndPoint.x-t.StartPoint.x)<.01)return t.EndPoint.y<t.StartPoint.y;const e=Utils2.Pt2Rect(t.EndPoint,t.StartPoint);return Math.abs(t.EndPoint.x-e.x)<.01&&Math.abs(t.EndPoint.y-e.y)<.01||Math.abs(t.EndPoint.x-e.x)<.01&&Math.abs(t.EndPoint.y-(e.y+e.height))<.01})(this)?(t.StartArrowID=this.EndArrowID,t.StartArrowDisp=this.EndArrowDisp,t.EndArrowID=this.StartArrowID,t.EndArrowDisp=this.StartArrowDisp):(t.StartArrowID=this.StartArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowID=this.EndArrowID,t.EndArrowDisp=this.EndArrowDisp),t.ArrowSizeIndex=this.ArrowSizeIndex}return LogUtil.Debug("= S.BaseLine: GetArrowheadSelection - output:",t),!0}UpdateDimensionFromTextObj(t,e){LogUtil.Debug("= S.BaseLine: UpdateDimensionFromTextObj called with input:",{sourceElement:t,textData:e});let i="",n=-1;T3Gv.stdObj.PreserveBlock(this.BlockID),SvgUtil.ShowSVGSelectionState(this.BlockID,!1);const s=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);LogUtil.Debug("= S.BaseLine: Retrieved SVG element for BlockID",this.BlockID,s),e?(i=e.text,n=e.userData):(i=t.GetText(),n=t.GetUserData()),LogUtil.Debug("= S.BaseLine: Determined text content and userData:",{textContent:i,userData:n}),this.UpdateDimensionFromText(s,i,n),LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText completed"),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("= S.BaseLine: Set link flag for BlockID",this.BlockID);for(let a=0;a<this.hooks.length;a++)OptCMUtil.SetLinkFlag(this.hooks[a].objid,DSConstant.LinkFlags.Move),LogUtil.Debug("= S.BaseLine: Set link flag for hook object with id",this.hooks[a].objid);(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&(ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("= S.BaseLine: Added BlockID to dirty list",this.BlockID)),DrawUtil.CompleteOperation(),LogUtil.Debug("= S.BaseLine: Completed operation for BlockID",this.BlockID),(this.Frame.x<0||this.Frame.y<0)&&(T3Gv.opt.ScrollObjectIntoView(this.BlockID,!1),LogUtil.Debug("= S.BaseLine: Scrolled object into view for BlockID",this.BlockID)),LogUtil.Debug("= S.BaseLine: UpdateDimensionFromTextObj completed for BlockID",this.BlockID)}UpdateDimensionFromText(t,e,i){let n,s,a;LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText called with input:",{inputElement:t,textValue:e,options:i});let o=-1;if(i.hookedObjectInfo){const n=this.UpdateDimensionsFromTextForHookedObject(t,e,i);LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText (hooked) output:",n)}else{if(s=i.segment,n=this.GetDimensionValueFromString(e,s),n>=0&&(o=this.GetDimensionLengthFromValue(n)),o<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects(),void LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText output: invalid dimensionLength (< 0), early return");for(this.UpdateDimensions(o,null,null),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),a=0;a<this.hooks.length;a++)OptCMUtil.SetLinkFlag(this.hooks[a].objid,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change);T3Gv.opt.UpdateLinks(),this.GetDimensionsForDisplay().width===o&&(this.rwd=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0)),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText completed, output dimensionLength:",o)}}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("= S.BaseLine: UpdateSecondaryDimensions called with input:",{container:t,creator:e,forcedUpdate:i});const n=this.objecttype===NvConstant.FNObjectTypes.FlWall,s=!(this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions),a=Boolean(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select||i);n&&s&&a&&this.UpdateHookedObjectDimensionLines(t,e,i),LogUtil.Debug("= S.BaseLine: UpdateSecondaryDimensions completed")}GetBoundingBoxesForSecondaryDimensions(){LogUtil.Debug("= S.BaseLine: GetBoundingBoxesForSecondaryDimensions called, input: none");const t=this.GetHookedObjectDimensionInfo();LogUtil.Debug("= S.BaseLine: Retrieved hookedInfo:",t);const e=[];if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&!(this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)&&this.Dimensions&NvConstant.DimensionFlags.AllSeg){LogUtil.Debug("= S.BaseLine: Conditions met for processing secondary dimensions.");for(let i=0,n=t.length;i<n;i++){const n=t[i];if(LogUtil.Debug(`= S.BaseLine: Processing hookedInfo[${i}]:`,n),Utils2.EqualPt(n.start,n.end)){LogUtil.Debug(`= S.BaseLine: Skipping index ${i} as start and end points are equal.`);continue}const s=Utils1.CalcAngleFromPoints(n.start,n.end);LogUtil.Debug(`= S.BaseLine: Calculated angle at index ${i}:`,s);const a=this.GetDimensionTextForPoints(n.start,n.end);LogUtil.Debug(`= S.BaseLine: Retrieved dimensionText at index ${i}:`,a);const o=this.GetPointsForDimension(s,a,n.start,n.end,n.segment,!0);LogUtil.Debug(`= S.BaseLine: Retrieved dimensionPoints at index ${i}:`,o),o&&(e.push(o.left),e.push(o.right),e.push(o.textFrame),LogUtil.Debug(`= S.BaseLine: Added bounding boxes from index ${i}.`))}}else LogUtil.Debug("= S.BaseLine: Conditions not met for processing secondary dimensions.");return LogUtil.Debug("= S.BaseLine: GetBoundingBoxesForSecondaryDimensions output:",e),e}AddIcon(t,e,i){let n,s;LogUtil.Debug("= S.BaseLine: AddIcon called with input:",{eventData:t,svgContainer:e,iconPositionCoords:i});const a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0),o=a.length;if(this.DataID>=0)2===o?(n=a[1].x,s=a[1].y):3===o?(n=a[2].x,s=a[2].y):(n=a[o-1].x,s=a[o-1].y),this instanceof Instance.Shape.Line||Instance.Shape.ArcLine,n-=this.iconSize,i.y=s-2*this.iconSize,i.x=n-this.iconSize*this.nIcons;else{if(2===o)n=(a[0].x+a[1].x)/2,s=(a[0].y+a[1].y)/2;else if(3===o)n=a[1].x,s=a[1].y;else{const t=Math.floor(o/2);n=a[t].x,s=a[t].y}this instanceof Instance.Shape.Line?(n+=this.iconSize/2,i.y=s+this.iconSize/4):this instanceof Instance.Shape.ArcLine?(n+=this.iconSize/2,i.y=s+this.iconSize/2):this instanceof Instance.Shape.SegmentedLine?i.y=s+this.iconSize/2:i.y=s-this.iconSize/2,i.x=n-this.iconSize*this.nIcons}const r=this.GenericIcon(i);return this.nIcons++,e.AddElement(r),LogUtil.Debug("= S.BaseLine: AddIcon output:",r),r}GetNotePos(t,e){LogUtil.Debug("= S.BaseLine: GetNotePos called with input:",{event:t,param:e});const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0),n=i.length;let s,a,o,r={x:0,y:0};if(this.DataID>=0){2===n?(s=i[1].x,a=i[1].y):3===n?(s=i[2].x,a=i[2].y):(s=i[n-1].x,a=i[n-1].y),this instanceof Instance.Shape.Line||Instance.Shape.ArcLine,s-=this.iconSize,r.y=a-2*this.iconSize,r.x=s-this.iconSize*this.nIcons,1===this.nIcons&&(r.x+=2*this.iconSize),o=this.GetSVGFrame();const t={x:o.x+r.x,y:o.y+r.y+this.iconSize};return LogUtil.Debug("= S.BaseLine: GetNotePos output (DataID valid):",t),t}{if(2===n)s=(i[0].x+i[1].x)/2,a=(i[0].y+i[1].y)/2;else if(3===n)s=i[1].x,a=i[1].y;else{const t=Math.floor(n/2);s=i[t].x,a=i[t].y}this instanceof Instance.Shape.Line?(s+=this.iconSize/2,r.y=a+this.iconSize/4):this instanceof Instance.Shape.ArcLine?(s+=this.iconSize/2,r.y=a+this.iconSize/2):this instanceof Instance.Shape.SegmentedLine?r.y=a+this.iconSize/2:r.y=a-this.iconSize/2,1===this.nIcons&&(s+=this.iconSize),r.x=s,o=this.GetSVGFrame();const t={x:o.x+r.x,y:o.y+r.y+this.iconSize};return LogUtil.Debug("= S.BaseLine: GetNotePos output (DataID invalid):",t),t}}PolyLinePrPolyLGetArcQuadrant(t,e,i){LogUtil.Debug("= S.BaseLine: PolyLinePrPolyLGetArcQuadrant - input:",{startPoint:t,endPoint:e,angle:i});let n={param:0,ShortRef:0},s=[new Point$1(t.x,t.y),new Point$1(e.x,e.y)];LogUtil.Debug("= S.BaseLine: Points array before rotation:",s);let a={x:t.x,y:t.y};if(LogUtil.Debug("= S.BaseLine: Center of rotation:",a),Math.abs(i)>=.01){const t=Math.sin(i),e=Math.cos(i);let n=Math.asin(t);e<0&&(n=-n),LogUtil.Debug("= S.BaseLine: rotationAngle computed:",n),Utils3.RotatePointsAboutPoint(a,n,s),LogUtil.Debug("= S.BaseLine: Points array after rotation:",s)}else LogUtil.Debug("= S.BaseLine: Angle less than threshold, no rotation applied.");const o=s[0],r=s[1];return LogUtil.Debug("= S.BaseLine: Rotated start point:",o),LogUtil.Debug("= S.BaseLine: Rotated end point:",r),r.x>o.x?r.y>o.y?(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_BL,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x > rotatedStart.x and rotatedEnd.y > rotatedStart.y"),e.notclockwise&&(n.param=0,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.param to 0"))):(n.ShortRef=OptConstant.ArcQuad.PLA_TL,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x > rotatedStart.x and rotatedEnd.y <= rotatedStart.y"),e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_TR,n.param=NvConstant.Geometry.PI/2,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.ShortRef to SD_PLA_TR and result.param to PI/2"))):r.y>o.y?(n.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x <= rotatedStart.x and rotatedEnd.y > rotatedStart.y"),e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_BL,n.param=NvConstant.Geometry.PI/2,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.ShortRef to SD_PLA_BL and result.param to PI/2"))):(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_TR,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x <= rotatedStart.x and rotatedEnd.y <= rotatedStart.y"),e.notclockwise&&(n.param=0,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.param to 0"))),LogUtil.Debug("= S.BaseLine: PolyLinePrPolyLGetArcQuadrant - output:",n),n}FieldDataAllowed(){LogUtil.Debug("= S.BaseLine: FieldDataAllowed called, input: none");return LogUtil.Debug("= S.BaseLine: FieldDataAllowed output:",false),false}}var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$3(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$3(e,i,a),a};const _PolyLine=class extends BaseLine{constructor(t){LogUtil.Debug("S.PolyLine: constructor input",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Line,t.LineType=t.LineType||OptConstant.LineType.POLYLINE,super(t),__publicField(this,"polylist"),__publicField(this,"StartPoint"),__publicField(this,"EndPoint"),__publicField(this,"hoplist"),__publicField(this,"ArrowheadData"),__publicField(this,"StartArrowID"),__publicField(this,"EndArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),__publicField(this,"RotateKnobPt"),__publicField(this,"TextDirection"),this.polylist=t.polylist||new PolyList,this.polylist.flags=DSConstant.PolyListFlags.FreeHand,this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.RotateKnobPt={x:0,y:0},this.TextDirection=t.TextDirection||!1,this.CalcFrame(),LogUtil.Debug("S.PolyLine: constructor output",this)}CreateShape(t,e){var i;if(LogUtil.Debug("S.PolyLine: CreateShape input",t,e),this.flags&NvConstant.ObjFlags.NotVisible)return null;const n=t.CreateShape(OptConstant.CSType.ShapeContainer),s=t.CreateShape(OptConstant.CSType.Path);s.SetID(OptConstant.SVGElementClass.Shape);const a=t.CreateShape(OptConstant.CSType.Polyline);a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),this.CalcFrame();const o=this.Frame;let r=this.StyleRecord;r=this.SVGTokenizerHook(r)||(null==(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1))?void 0:i.def.style);const l=r.Line.Paint.Color;let h=r.Line.Thickness;h>0&&h<1&&(h=1);const c=r.Line.Paint.Opacity,u=r.Line.LinePattern,d=o.width,p=o.height;n.SetSize(d,p),n.SetPos(o.x,o.y),s.SetSize(d,p);const g=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);this.UpdateSVG(s,g),s.SetFillColor("none"),s.SetStrokeColor(l),s.SetStrokeOpacity(c),s.SetStrokeWidth(h),0!==u&&s.SetStrokePattern(u),a.SetSize(d,p),this.UpdateSVG(a,g),a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),a.SetEventBehavior(e?OptConstant.EventBehavior.HiddenOut:OptConstant.EventBehavior.None),a.SetStrokeWidth(h+OptConstant.Common.Slop),n.AddElement(s),n.AddElement(a),this.ApplyStyles(s,r),this.ApplyEffects(n,!1,!0);const f=r.Fill.Hatch;if(f&&0!==f&&this.polylist&&this.polylist.closed){const e=t.CreateShape(OptConstant.CSType.Polygon);e.SetPoints(g),e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(d,p),e.SetStrokeWidth(0),this.SetFillHatch(e,f),n.AddElement(e)}return n.isShape=!0,this.AddIcons(t,n),LogUtil.Debug("S.PolyLine: CreateShape output",n),n}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.PolyLine PostCreateShapeCallback input",t,e,i,n);const s=e.GetElementById(OptConstant.SVGElementClass.Shape),a=e.GetElementById(OptConstant.SVGElementClass.Slop);let o=T3Gv.arrowHlkTable[this.StartArrowID],r=T3Gv.arrowHlkTable[this.EndArrowID];const l=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===o.id&&(o=null),0===r.id&&(r=null),(o||r)&&(s.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp)),this.DataID>=0&&this.LMAddSVGTextObject(t,e),this.polylist&&this.polylist.segs&&this.polylist.segs.length>1&&this.UpdateDimensionLines(e),LogUtil.Debug("= S.PolyLine PostCreateShapeCallback output",e)}UpdateSVG(t,e){LogUtil.Debug("S.PolyLine: UpdateSVG input",t,e);const i=e.length;if(t&&t.PathCreator){const n=t.PathCreator();if(n.BeginPath(),i>1){n.MoveTo(e[0].x,e[0].y);for(let t=1;t<i;t++)n.LineTo(e[t].x,e[t].y)}this.polylist.closed&&n.ClosePath(),n.Apply()}LogUtil.Debug("S.PolyLine: UpdateSVG output",t)}SetFillHatch(t,e,i){if(LogUtil.Debug("S.PolyLine: SetFillHatch input",t,e,i),-1!==e&&0!==e){let n=e-1,s={},a=[];n<10&&(n="0"+n),s.url=Constants.FilePath_Hatches+Constants.HatchName+n+".png",s.scale=1,s.alignment=0,s.dim={x:128,y:128},t.SetTextureFill(s);let o=this.StyleRecord.Line.Paint.Color;i&&(o=i),a.push({type:BConstant.EffectType.RECOLOR,params:{color:o}}),t.Effects().SetEffects(a,this.Frame)}else t.SetFillColor("none");LogUtil.Debug("S.PolyLine: SetFillHatch output",t)}GetDimensionPoints(){LogUtil.Debug("S.PolyLine: GetDimensionPoints input");var t=[],e=[],i=0,n=0,s=0,a={},o={};if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.EndPts)t.push(new Point$1(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y)),t.push(new Point$1(this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y));else if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.Total){e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(var r=1;r<e.length;r++)n=Math.abs(e[r-1].x-e[r].x),s=Math.abs(e[r-1].y-e[r].y),i+=Math.sqrt(n*n+s*s);var l={x:this.Frame.width/2,y:this.Frame.height/2};a.x=l.x-i/2,a.y=l.y,t.push(new Point$1(a.x,a.y)),o.x=l.x+i/2,o.y=l.y,t.push(new Point$1(o.x,o.y));var h=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(new Point$1(0,0),new Point$1(this.Frame.width,this.Frame.height));Utils3.RotatePointsAboutPoint(l,h,t)}else t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);return LogUtil.Debug("S.PolyLine: GetDimensionPoints output",t),t}AdjustDimensionLineDeflection(t,e,i,n,s){LogUtil.Debug("S.PolyLine: adjustDimensionLineDeflection input",t,e,i,n,s);const a=s.segmentIndex;this.polylist&&this.polylist.segs&&0!==this.polylist.segs.length&&a>=0&&a<this.polylist.segs.length&&(this.polylist.segs[a].dimDeflection=this.getDimensionLineDeflection(t,e,i,s),this.updateDimensionLines(t),this.Dimensions&NvConstant.DimensionFlags.Select&&this.hideOrShowSelectOnlyDimensions(!0)),LogUtil.Debug("S.PolyLine: adjustDimensionLineDeflection output",this.polylist)}GetDimensionDeflectionValue(t){if(LogUtil.Debug("S.PolyLine: GetDimensionDeflectionValue input",t),this.polylist&&this.polylist.segs&&this.polylist.segs.length>0&&t>=0&&t<this.polylist.segs.length){const e=this.polylist.segs[t].dimDeflection;return LogUtil.Debug("S.PolyLine: GetDimensionDeflectionValue output",e),e}return LogUtil.Debug("S.PolyLine: GetDimensionDeflectionValue output",null),null}GetDimensionFloatingPointValue(t){LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue input",t);let e=0,i={};if(!(this.rflags&NvConstant.FloatingPointDim.Width||this.rflags&NvConstant.FloatingPointDim.Height))return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",null),null;if(!this.GetPolyRectangularInfo(i))return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",null),null;if(i.wdDim===t||i.wdDim+2===t){if(this.rflags&NvConstant.FloatingPointDim.Width){e=this.GetDimensionLengthFromValue(this.rwd);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",t),t}}else if((i.htDim===t||i.htDim+2===t)&&this.rflags&NvConstant.FloatingPointDim.Height){e=this.GetDimensionLengthFromValue(this.rht);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",t),t}return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",null),null}UpdateDrawing(t){LogUtil.Debug("S.PolyLine: UpdateDrawing input",t),LogUtil.Debug("S.PolyLine: UpdateDrawing - Starting update of dimensions and lines");const e=t.GetElementById(OptConstant.SVGElementClass.Shape),i=t.GetElementById(OptConstant.SVGElementClass.Slop);this.CalcFrame();const n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),e.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(e,n),i.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(i,n);const s=t.GetElementById(OptConstant.SVGElementClass.Hatch);s&&(s.SetPoints(n),s.SetSize(this.Frame.width,this.Frame.height)),null!=this.polylist&&null!=this.polylist.segs&&this.polylist.segs.length>1&&this.UpdateDimensionLines(t),LogUtil.Debug("S.PolyLine: UpdateDrawing output",t)}ScaleEndPoints(){LogUtil.Debug("S.PolyLine: ScaleEndPoints input",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});let t=this.Frame.width/this.polylist.dim.x,e=this.Frame.height/this.polylist.dim.y;if(1===t&&1===e)return void LogUtil.Debug("S.PolyLine: ScaleEndPoints output - no scaling performed",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});let i=this.Frame.x+this.Frame.width/2,n=this.Frame.y+this.Frame.height/2,s=i-this.StartPoint.x;this.StartPoint.x=i-s*t;let a=n-this.StartPoint.y;this.StartPoint.y=n-a*e,s=i-this.EndPoint.x,this.EndPoint.x=i-s*t,a=n-this.EndPoint.y,this.EndPoint.y=n-a*e,LogUtil.Debug("S.PolyLine: ScaleEndPoints output",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateFrame(t){LogUtil.Debug("S.PolyLine: UpdateFrame input",t),super.UpdateFrame(t),this.polylist.closed&&this.StyleRecord&&this.StyleRecord.Line,LogUtil.Debug("S.PolyLine: UpdateFrame output",this.Frame)}CalcFrame(){let t;LogUtil.Debug("S.PolyLine: CalcFrame input");let e=[],i={};this.polylist&&(this.polylist.dim.x=0,this.polylist.dim.y=0,e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e&&e.length&&(Utils2.GetPolyRect(i,e),i.width<1&&(i.width=1),i.height<1&&(i.height=1),this.polylist.closed?(this.polylist.dim.x=i.width,this.polylist.dim.y=i.height,this.StyleRecord&&this.StyleRecord.Line&&(this.StyleRecord.Line.BThick||this instanceof Instance.Shape.PolyLineContainer)?(this.inside=Utils1.DeepCopy(i),this.Frame=Utils1.DeepCopy(i),t=this.StyleRecord.Line.Thickness,Utils2.InflateRect(this.inside,-t/2,-t/2)):(this.inside=Utils1.DeepCopy(i),this.Frame=Utils1.DeepCopy(i),this.StyleRecord&&this.StyleRecord.Line&&(t=this.StyleRecord.Line.Thickness))):this.Frame=Utils1.DeepCopy(i))),this.UpdateFrame(this.Frame),LogUtil.Debug("S.PolyLine: CalcFrame output",this.Frame)}GetSVGFrame(t){LogUtil.Debug("S.PolyLine:GetSVGFrame input:",t);let e={};return null==t&&(t=this.Frame),Utils2.CopyRect(e,t),LogUtil.Debug("S.PolyLine:GetSVGFrame output:",e),e}GetDimensions(){LogUtil.Debug("S.PolyLine: GetDimensions input - Frame:",this.Frame);const t={x:this.Frame.width,y:this.Frame.height};return LogUtil.Debug("S.PolyLine: GetDimensions output:",t),t}SetSize(t,e,i){LogUtil.Debug("S.PolyLine: SetSize input",{newWidth:t,newHeight:e,extraParam:i});let n=1,s=1,a=!1,o=!1,r=0,l=0;const h=this.polylist.segs.length,c={x:0,y:0};if(t&&!Utils2.IsEqual(this.Frame.width,0)&&(n=t/this.Frame.width),e&&!Utils2.IsEqual(this.Frame.height,0)&&(s=e/this.Frame.height),1!==n||1!==s)for(let u=0;u<h;u++)this.polylist.segs[u].pt.x*=n,this.polylist.segs[u].pt.y*=s;this.StartPoint.x<=this.EndPoint.x&&(a=!0),this.StartPoint.y<=this.EndPoint.y&&(o=!0),c.x=this.EndPoint.x,c.y=this.EndPoint.y,this.EndPoint.x=this.StartPoint.x+this.polylist.segs[h-1].pt.x,this.EndPoint.y=this.StartPoint.y+this.polylist.segs[h-1].pt.y,a||(r=c.x-this.EndPoint.x,r&&(this.StartPoint.x+=r,this.EndPoint.x+=r)),o||(l=c.y-this.EndPoint.y,l&&(this.StartPoint.y+=l,this.EndPoint.y+=l)),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),this.CalcFrame(),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("S.PolyLine: SetSize output",{frame:this.Frame,startPoint:this.StartPoint,endPoint:this.EndPoint})}UpdateDimensions(t,e,i){LogUtil.Debug("S.PolyLine: UpdateDimensions input",{svgDocument:t,xOffset:e,yOffset:i});const n=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),s=e?this.StartPoint.x+e:this.EndPoint.x,a=i?this.StartPoint.y+i:this.EndPoint.y;this.AdjustLineEnd(n,s,a,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("S.PolyLine: UpdateDimensions output",{newX:s,newY:a})}GetApparentAngle(t){LogUtil.Debug("S.PolyLine: GetApparentAngle input:",t);const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),i=this.PolyHitSeg(t);let n=0;return n=i<0?0:this.GetDrawNormalizedAngle(e[i-1],e[i]),LogUtil.Debug("S.PolyLine: GetApparentAngle output:",n),n}SnapPointToSegment(t,e){LogUtil.Debug("S.PolyLine: SnapPointToSegment input",{segmentIndex:t,pointToSnap:e});const i={},n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);let s=360-Utils1.CalcAngleFromPoints(n[t-1],n[t]);s>=360&&(s=0);const a=2*Math.PI*(s/360);Utils2.GetPolyRect(i,n),Utils3.RotatePointsAboutCenter(i,-a,n),Utils3.RotatePointsAboutCenter(i,-a,[e]),e.y=n[t].y,Utils3.RotatePointsAboutCenter(i,a,[e]),LogUtil.Debug("S.PolyLine: SnapPointToSegment output",{pointToSnap:e})}CalcTextPosition(t){LogUtil.Debug("S.PolyLine: CalcTextPosition input",{svgShape:t});let e,i,n=0,s=[],a={},o={},r={},l={},h={},c=[],u=0,d=Utils1.DeepCopy(this);d.BlockID=-1;const p=d.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,s),g={x:t.Frame.x+t.Frame.width/2,y:t.Frame.y+t.Frame.height/2};e=s.length;const f=(t,e,i)=>{let n,s,a=0;for(let o=e;o<i;o++)n=t[o-1].x-t[o].x,s=t[o-1].y-t[o].y,a+=Utils2.Sqrt(n*n+s*s);return a};let b=0;for(let v=0;v<e;v++){let e;if(0===v)a.x=p[0].x,a.y=p[0].y,e=0;else{if(s[v]===s[v-1])continue;a.x=p[s[v-1]].x,a.y=p[s[v-1]].y,e=s[v-1]}o.x=p[s[v]].x,o.y=p[s[v]].y;const d=s[v]+1;let m={};if(Utils2.GetPolyRect(m,p,e,d),n=f(p,e+1,d),0===m.width&&Utils2.InflateRect(m,5,0),0===m.height&&Utils2.InflateRect(m,0,5),r.x=g.x,r.y=m.y,l.x=m.x,l.y=g.y,Utils2.pointInRect(m,r)||Utils2.pointInRect(m,l)){let s=0;for(let n=e+1;n<d;n++){a.x=p[n-1].x,a.y=p[n-1].y,o.x=p[n].x,o.y=p[n].y;const e=a.x-o.x,r=a.y-o.y,l=Math.sqrt(e*e+r*r);h={x:(a.x+o.x)/2,y:(a.y+o.y)/2},c=[],c.push({...a});const u=Utils1.DeepCopy(g);c.push(u),c.push({...o});let d=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(a,o),f=d*(180/NvConstant.Geometry.PI)%180;Utils2.IsEqual(f,0)||0!==t.RotationAngle||(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!0)),Utils3.RotatePointsAboutPoint(h,d,c);let v=c[1].y-c[0].y;(void 0===i||Math.abs(v)<Math.abs(i))&&(i=v,b=0+s+(c[1].x-a.x)),s+=l}u+=n}else u+=n}0===b&&(b=u/2),this.LineTextX=b/u,this.LineTextY=i,this.LineTextX&&(this.trect=Utils1.DeepCopy(t.trect)),LogUtil.Debug("S.PolyLine: CalcTextPosition output",{LineTextX:this.LineTextX,LineTextY:this.LineTextY,trect:this.trect})}GetTextOnLineParams(t){LogUtil.Debug("S.PolyLine: GetTextOnLineParams input:",{textPositionFactor:t});let e,i,n={Frame:new Instance.Shape.Rect,StartPoint:new Point$1,EndPoint:new Point$1},s=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),a=s.length;s[0].x<s[a-1].x?(e=0,i=a-2):(e=a-2,i=0);let o=Math.round((a-1.1)/2),r=.5,l=this.TextAlign;switch(this.LineTextX&&(r=this.LineTextX,l=TextConstant.TextAlign.Center),l){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.StartPoint.x=s[e].x,n.StartPoint.y=s[e].y,n.EndPoint.x=s[e+1].x,n.EndPoint.y=s[e+1].y;break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.StartPoint.x=s[i].x,n.StartPoint.y=s[i].y,n.EndPoint.x=s[i+1].x,n.EndPoint.y=s[i+1].y;break;default:o=function(t,e){let i=0,n=[];for(let r=1;r<a;r++){let t=s[r],e=s[r-1],a=t.x-e.x,o=t.y-e.y,l=Utils2.Sqrt(a*a+o*o);n.push(l),i+=l}let o=t*i;for(let s=0;s<a-1;s++){if(o<n[s])return e.CenterProp=o/n[s],s;o-=n[s]}return Math.round((a-1.1)/2)}(r,n),n.StartPoint.x=s[o].x,n.StartPoint.y=s[o].y,n.EndPoint.x=s[o+1].x,n.EndPoint.y=s[o+1].y}return n.Frame=Utils1.DeepCopy(this.Frame),LogUtil.Debug("S.PolyLine: GetTextOnLineParams output:",n),n}AddCorner(t,e){let i,n,s,a,o,r,l,h,c,u;LogUtil.Debug("S.PolyLine: AddCorner - input:",{svgElement:t,cornerPoint:e});let d=!1;const p=this.PolyHitSeg(e),g=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);let f=[];if(null==t&&(t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID)),null!=t&&void 0!==this.polylist.segs[p]){for(f=HookUtil.GetHookList(g,f,this.BlockID,this,NvConstant.ListCodes.MoveHook,{}),u=0;u<f.length;u++)T3Gv.stdObj.PreserveBlock(f[u]);if(this.polylist.segs[p].LineType===OptConstant.LineType.LINE&&this.SnapPointToSegment(p,e),a=p+1,this.polylist.closed||1===p&&(a=1,d=!0)||p===this.polylist.segs.length-1&&(d=!0)){const t=[],i={x:this.polylist.segs[p-1].pt.x,y:this.polylist.segs[p-1].pt.y};t.push(i);const n={x:this.polylist.segs[p].pt.x,y:this.polylist.segs[p].pt.y};t.push(n);const a={x:e.x-this.StartPoint.x,y:e.y-this.StartPoint.y};t.push(a),c=Utils1.CalcAngleFromPoints(t[0],t[1]);let r=360-c;if(r>=360&&(r-=360),o=2*Math.PI*(r/360),Utils3.RotatePointsAboutCenter(this.Frame,-o,t),s=new PolySeg(this.polylist.segs[p].LineType,e.x-this.StartPoint.x,e.y-this.StartPoint.y),this.polylist.segs.splice(p,0,s),1===p){t[0].x=t[2].x,t[0].y+=50,Utils3.RotatePointsAboutCenter(this.Frame,o,t);const e=t[0].x+this.StartPoint.x,i=t[0].y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,e,i,OptConstant.ActionTriggerType.LineStart)}else{t[1].x=t[2].x,t[1].y+=50,Utils3.RotatePointsAboutCenter(this.Frame,o,t);const e=t[1].x+this.StartPoint.x,i=t[1].y+this.StartPoint.y;this.AdjustLineEnd(null,e,i,OptConstant.ActionTriggerType.LineEnd)}}else{switch(s=new PolySeg(this.polylist.segs[p].LineType,e.x-this.StartPoint.x,e.y-this.StartPoint.y),this.polylist.segs.splice(p,0,s),d||(s=new PolySeg(this.polylist.segs[p].LineType,e.x-this.StartPoint.x,e.y-this.StartPoint.y),this.polylist.segs.splice(p,0,s)),r=Number(T3Gv.docUtil.rulerConfig.majorScale),T3Gv.docUtil.rulerConfig.units){case NvConstant.RulerUnit.Feet:l=Math.abs(r-this.polylist.segs.length),l%=r,l++,h=l.toString()+"'";break;case NvConstant.RulerUnit.Inches:l=Math.abs(r-this.polylist.segs.length),l%=r,l++,h=l.toString()+'"';break;default:l=Math.abs(r-this.polylist.segs.length),l%=r,l++,h=l.toString()}const i=this.Dimensions;this.UpdateDimensionFromText(t,h,{segment:a}),this.Dimensions=i}OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);const b=this.hooks.length;for(u=0;u<b;u++)OptCMUtil.SetLinkFlag(this.hooks[u].objid,DSConstant.LinkFlags.Move);if(T3Gv.opt.ActionTriggerData=p,this.Frame.x<0||this.Frame.y<0){const t=this.Frame;t.x<0&&(i=-t.x,t.x+=i),t.y<0&&(n=-t.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(n+=OptConstant.Common.DimDefaultStandoff),t.y+=n),this.StartPoint.x+=i,this.StartPoint.y+=n,this.EndPoint.x+=i,this.EndPoint.y+=n,T3Gv.opt.SetObjectFrame(this.BlockID,t)}if(this.UpdateDrawing(t),-1!=this.DataID){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.LMResizeSVGTextObject(t,this,this.Frame)}SvgUtil.ShowSVGSelectionState(t.GetID(),!0),DrawUtil.CompleteOperation()}LogUtil.Debug("S.PolyLine: AddCorner - output: Corner added successfully")}GetKnobSize(t){LogUtil.Debug("S.PolyLine: GetKnobSize input",t);const e=OptConstant.Common.KnobSize;return LogUtil.Debug("S.PolyLine: GetKnobSize output",e),e}GetCornerKnobImages(){LogUtil.Debug("S.PolyLine: GetCornerKnobImages input");return LogUtil.Debug("S.PolyLine: GetCornerKnobImages output",null),null}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.PolyLine: CreateActionTriggers input",{svgDocument:t,targetObject:e,additionalData:i,actionId:n}),this.NoRotate();let s=this.GetCornerKnobImages(),a=this.GetKnobSize(t);const o=OptConstant.Common.RKnobSize;let r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);let l=a/r,h=o/r,c=this.polylist&&this.polylist.segs?this.polylist.segs.length:0,u=t.CreateShape(OptConstant.CSType.Group),d=this.Frame,p=Utils1.DeepCopy(d);p.x-=l/2,p.y-=l/2,p.width+=l,p.height+=l;let g=ObjectUtil$1.GetObjectPtr(e,!1),f=d.width+l,b=d.height+l;Utils1.DeepCopy(d);let v={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:l,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};if(s&&(v.strokeSize=0,delete v.strokeColor,delete v.fillColor,v.shapeType=OptConstant.CSType.Image),e!==n&&(v.fillColor="white",v.fillOpacity=0,v.strokeSize=1,v.strokeColor="black"),this.flags&NvConstant.ObjFlags.Lock?(v.fillColor="gray",v.locked=!0):this.NoGrow()&&(v.fillColor="red",v.strokeColor="red",v.cursorType=CursorConstant.CursorType.Default),!this.polylist.closed){if(v.x=this.StartPoint.x-d.x,v.y=this.StartPoint.y-d.y,v.knobID=OptConstant.ActionTriggerType.LineStart,c>1&&(v.cursorType=this.CalcCursorForSegment(this.polylist.segs[0].pt,this.polylist.segs[1].pt,!1)),g&&g.hooks)for(let e=0;e<g.hooks.length;e++)if(g.hooks[e].hookpt===OptConstant.HookPts.KTL){v.shapeType=OptConstant.CSType.Oval;break}this.NoGrow()&&(v.cursorType=CursorConstant.CursorType.Default);let t=this.GenericKnob(v);s&&t&&t.SetURL&&t.SetURL(v.cursorType===CursorConstant.CursorType.NwseResize?s.nwse:s.nesw),u.AddElement(t)}if(v.shapeType=OptConstant.CSType.Rect,s&&(v.shapeType=OptConstant.CSType.Image),g&&g.hooks)for(let x=0;x<g.hooks.length;x++)if(g.hooks[x].hookpt===OptConstant.HookPts.KTR){v.shapeType=OptConstant.CSType.Oval;break}v.x=this.EndPoint.x-d.x,v.y=this.EndPoint.y-d.y,this.polylist.closed?(v.knobID=OptConstant.ActionTriggerType.PolyEnd,c>3?v.cursorType=this.CalcCursorForSegment(this.polylist.segs[1].pt,this.polylist.segs[c-2].pt,!0):c>1&&(v.cursorType=this.CalcCursorForSegment(this.polylist.segs[c-1].pt,this.polylist.segs[c-2].pt,!1))):(v.knobID=OptConstant.ActionTriggerType.LineEnd,c>1&&(v.cursorType=this.CalcCursorForSegment(this.polylist.segs[c-1].pt,this.polylist.segs[c-2].pt,!1))),this.NoGrow()&&(v.cursorType=CursorConstant.CursorType.Default);let m=this.GenericKnob(v);s&&m.SetURL&&(m.SetURL(v.cursorType===CursorConstant.CursorType.NwseResize?s.nwse:s.nesw),m.ExcludeFromExport(!0)),u.AddElement(m),v.shapeType=OptConstant.CSType.Rect,s&&(v.shapeType=OptConstant.CSType.Image);for(let x=1;x<c-1;x++){if(1===x)switch(this.polylist.segs[x].LineType){case OptConstant.LineType.QUADBEZ:case OptConstant.LineType.CUBEBEZ:case OptConstant.LineType.NURBS:case OptConstant.LineType.ELLIPSE:case OptConstant.LineType.SPLINE:continue}if(2===x)switch(this.polylist.segs[x].LineType){case OptConstant.LineType.NURBSSEG:case OptConstant.LineType.SPLINECON:continue}v.x=this.polylist.segs[x].pt.x+this.StartPoint.x-d.x,v.y=this.polylist.segs[x].pt.y+this.StartPoint.y-d.y,v.cursorType=this.CalcCursorForSegment(this.polylist.segs[x-1].pt,this.polylist.segs[x+1].pt,!0),this.NoGrow()&&(v.cursorType=CursorConstant.CursorType.Default),v.knobID=OptConstant.ActionTriggerType.PolyNode;let t=this.GenericKnob(v);t&&(t.SetUserData(x),s&&t.SetURL&&(t.SetURL(v.cursorType===CursorConstant.CursorType.NwseResize?s.nwse:s.nesw),t.ExcludeFromExport(!0)),u.AddElement(t))}let y={StartPoint:new Point$1(0,0),EndPoint:new Point$1(0,0)};y.StartPoint.x=0,y.StartPoint.y=0,y.EndPoint.x=0,y.EndPoint.y=0;let S=d.x,w=d.y;d&&this.StartPoint&&(S=this.StartPoint.x-d.x,w=this.StartPoint.y-d.y),v.shapeType=OptConstant.CSType.Oval,v.knobID=OptConstant.ActionTriggerType.PolyAdj,v.fillColor="white",v.fillOpacity=.001,v.strokeSize=1,v.strokeColor="green";for(let x=1;x<c;x++)if(this.polylist.segs[x].LineType===OptConstant.LineType.ARCLINE){y.StartPoint.x=1*this.polylist.segs[x-1].pt.x+S,y.StartPoint.y=1*this.polylist.segs[x-1].pt.y+w,y.EndPoint.x=1*this.polylist.segs[x].pt.x+S,y.EndPoint.y=1*this.polylist.segs[x].pt.y+w,this.polylist.segs[x].param>=0?(y.CurveAdjust=this.polylist.segs[x].param,y.IsReversed=!0):(y.CurveAdjust=-this.polylist.segs[x].param,y.IsReversed=!1),y.FromPolygon=!0;let t=new Instance.Shape.ArcLine(y);t.Frame=Utils2.Pt2Rect(y.StartPoint,y.EndPoint);let e=t.CalcRadiusAndCenter(t.StartPoint.x,t.StartPoint.y,t.EndPoint.x,t.EndPoint.y,t.CurveAdjust,t.IsReversed);v.x=e.actionX,v.y=e.actionY;let i=this.GenericKnob(v);i.SetUserData(x),u.AddElement(i)}else if(this.polylist.segs[x].LineType===OptConstant.LineType.PARABOLA){let t=this.PrPolyLGetParabolaAdjPoint(!0,x);if(t){v.x=t.x+this.StartPoint.x-d.x,v.y=t.y+this.StartPoint.y-d.y;let e=this.GenericKnob(v);e.SetUserData(x),u.AddElement(e)}}else if(this.polylist.segs[x].LineType===OptConstant.LineType.ARCSEGLINE){let t=this.PrPolyLGetEllipseAdjPoint(!0,x);v.x=t.x+this.StartPoint.x-d.x,v.y=t.y+this.StartPoint.y-d.y;let e=this.GenericKnob(v);e.SetUserData(x),u.AddElement(e)}if(!v.locked&&!this.NoGrow()){v.shapeType=OptConstant.CSType.Oval,d.width<d.height?(v.x=d.width/2,v.y=d.height-2*h):(v.y=d.height/2,v.x=d.width-2*h),this.RotateKnobPt.x=v.x+d.x,this.RotateKnobPt.y=v.y+d.y,v.cursorType=CursorConstant.CursorType.Rotate,v.knobID=OptConstant.ActionTriggerType.Rotate,v.fillColor="white",v.fillOpacity=.5,v.strokeSize=1.5,v.strokeColor="black",v.knobSize=h;let t=this.GenericKnob(v);u.AddElement(t),v.knobSize=l}return this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()&&this.CreateDimensionAdjustmentKnobs(u,i,v),u.SetSize(f,b),u.SetPos(p.x,p.y),u.isShape=!0,u.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.PolyLine: CreateActionTriggers output",u),u}ScaleObject(t,e,i,n,s,a,o){let r,l,h,c;LogUtil.Debug("S.PolyLine: ScaleObject input",{offsetX:t,offsetY:e,rotationCenter:i,rotationAngleDegrees:n,scaleX:s,scaleY:a,adjustLineThickness:o});let u={x:0,y:0},d={x:0,y:0},p={x:0,y:0},g=[];if(0===s){if(!(this.polylist.dim.x>0&&this.polylist.dim.y>0))return;s=this.inside.width/this.polylist.dim.x,a=this.inside.height/this.polylist.dim.y,this.StartPoint.x=this.Frame.x+this.polylist.offset.x,this.StartPoint.y=this.Frame.y+this.polylist.offset.y}if(this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),1!==s||1!==a){if(o){let t=s;a>t&&(t=a),this.StyleRecord.Line.Thickness=t*this.StyleRecord.Line.Thickness,this.StyleRecord.Line.BThick=t*this.StyleRecord.Line.BThick}for(u.x=this.StartPoint.x-this.Frame.x,u.y=this.StartPoint.y-this.Frame.y,d.x=u.x*s,d.y=u.y*a,l=this.polylist.segs.length,r=1;r<l;r++)switch(this.polylist.segs[r].LineType){case OptConstant.LineType.PARABOLA:0!==this.polylist.segs[r].param&&r>0&&(h=this.PrPolyLGetParabolaAdjPoint(!0,r),h?(h.x+=this.StartPoint.x,h.y+=this.StartPoint.y,g[r]=new Point$1(h.x,h.y)):(this.polylist.segs[r].param=0,this.polylist.segs[r].ShortRef=0));break;case OptConstant.LineType.ARCLINE:0!==this.polylist.segs[r].param&&r>0&&(c=this.PrPolyLGetArc(r,u),g[r]=c.pt)}for(this.StartPoint.x=this.StartPoint.x*s,this.StartPoint.y=this.StartPoint.y*a,this.EndPoint.x=this.EndPoint.x*s,this.EndPoint.y=this.EndPoint.y*a,r=0;r<l;r++)switch(this.polylist.segs[r].LineType){case OptConstant.LineType.PARABOLA:if(this.polylist.segs[r].pt.x*=s,this.polylist.segs[r].pt.y*=a,0!==this.polylist.segs[r].param&&r>0){let t={x:g[r].x*s,y:g[r].y*a};this.PrPolyLGetParabolaParam(t,r)}break;case OptConstant.LineType.ARCLINE:this.polylist.segs[r].pt.x*=s,this.polylist.segs[r].pt.y*=a,0!==this.polylist.segs[r].param&&r>0&&(c=this.PrPolyLGetArc(r,d),p.x=g[r].x*s,p.y=g[r].y*a,this.PrPolyLGetArcParam(c.arcobj,p,r));break;default:this.polylist.segs[r].pt.x*=s,this.polylist.segs[r].pt.y*=a}if(this instanceof BaseShape)return this.polylist.offset.x=d.x,this.polylist.offset.y=d.y,this.polylist.dim.x=this.inside.width,this.polylist.dim.y=this.inside.height,void LogUtil.Debug("S.PolyLine: ScaleObject output (BaseShape scaling applied)",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}else if(this instanceof BaseShape)return;let f=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);for(l=f.length,r=0;r<l;r++)f[r].x+=t,f[r].y+=e;if(n){let t=2*Math.PI*(n/360);Utils3.RotatePointsAboutPoint(i,2*Math.PI-t,f)}for(this.StartPoint.x=f[0].x,this.StartPoint.y=f[0].y,r=0;r<l;r++)this.polylist.segs[r].pt.x=f[r].x-this.StartPoint.x,this.polylist.segs[r].pt.y=f[r].y-this.StartPoint.y;this.EndPoint.x=f[l-1].x,this.EndPoint.y=f[l-1].y,this.CalcFrame(),LogUtil.Debug("S.PolyLine: ScaleObject output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}GetScale(){let t,e,i;LogUtil.Debug("S.PolyLine: GetScale input",{});let n={x:0,y:0};return this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y?(t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y,t<1&&(t=1),i=this.inside.width/t,this.inside.height):i=1,n.x=i,n.y=i,LogUtil.Debug("S.PolyLine: GetScale output",n),n}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.PolyLine: GetPolyPoints input",{pointCount:t,includeFrameOffset:e,includeAllSegments:i,includeClosedSegments:n,segmentIndices:s});let a=[],o=1,r=1,l=this.StartPoint.x-this.Frame.x,h=this.StartPoint.y-this.Frame.y;if(this.polylist&&this.polylist.segs.length){if(this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y){let t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y;t=t<1?1:t,o=this.inside.width/t,r=this.inside.height/e}const n=this.polylist.segs.length;if(i)for(let t=0;t<n;t++)a.push(new Point$1(this.polylist.segs[t].pt.x*o+l,this.polylist.segs[t].pt.y*r+h));else{a.push(new Point$1(this.polylist.segs[0].pt.x*o+l,this.polylist.segs[0].pt.y*r+h));for(let e=1;e<n;e++){switch(this.polylist.segs[e].LineType){case OptConstant.LineType.LINE:case OptConstant.LineType.MOVETO:case OptConstant.LineType.MOVETO_NEWPOLY:a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));break;case OptConstant.LineType.NURBS:if(e<n-1&&this.polylist.segs[e+1].LineType==OptConstant.LineType.NURBSSEG){let i=0;for(let t=e;t<n&&this.polylist.segs[t].LineType==OptConstant.LineType.NURBSSEG;t++){let e=this.polylist.segs[t].pt.x-this.polylist.segs[t-1].pt.x,n=this.polylist.segs[t].pt.y-this.polylist.segs[t-1].pt.y;i+=Math.sqrt(e*e+n*n)}const s=T3Gv.opt.svgDoc.docInfo.docScale;let c=Math.floor(i/8*s);c=c<t?t:c;const u=this.PrGetNURBSPoints(e,c,l,h,o,r);a=a.concat(u)}break;case OptConstant.LineType.QUADBEZ:const i=this.PrGetQuadraticBezierPoints(e,t,l,h,o,r);a=a.concat(i);break;case OptConstant.LineType.CUBEBEZ:const s=this.PrGetCubicBezierPoints(e,t,l,h,o,r);a=a.concat(s);break;case OptConstant.LineType.ELLIPSE:const c=this.PrGetEllipticalArcPoints(e,t,l,h,o,r);a=a.concat(c);break;case OptConstant.LineType.SPLINE:if(e<n-1&&this.polylist.segs[e+1].LineType==OptConstant.LineType.SPLINECON){let i=0;for(let t=e;t<n&&this.polylist.segs[t].LineType==OptConstant.LineType.SPLINECON;t++){let e=this.polylist.segs[t].pt.x-this.polylist.segs[t-1].pt.x,n=this.polylist.segs[t].pt.y-this.polylist.segs[t-1].pt.y;i+=Math.sqrt(e*e+n*n)}const s=T3Gv.opt.svgDoc.docInfo.docScale;let c=Math.floor(i/8*s);c=c<t?t:c;const u=this.PrGetSPLINEPoints(e,c,l,h,o,r);a=a.concat(u)}break;case OptConstant.LineType.PARABOLA:const u=this.PrGetParabolaPoints(t,!0,e,this.polylist.segs[e].param,this.polylist.segs[e].ShortRef,o,r);a=a.concat(u),a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));break;case OptConstant.LineType.ARCSEGLINE:const d=this.PrGetEllipsePoints(t,!0,e,this.polylist.segs[e].param,this.polylist.segs[e].ShortRef,o,r);a=a.concat(d),a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));break;case OptConstant.LineType.ARCLINE:if(0===this.polylist.segs[e].param)a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));else{const t={StartPoint:new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y),EndPoint:new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y),CurveAdjust:Math.abs(this.polylist.segs[e].param),IsReversed:this.polylist.segs[e].param>=0,FromPolygon:!0},i=new Instance.Shape.ArcLine(t);i.Frame=Utils2.Pt2Rect(t.StartPoint,t.EndPoint);const n=i.GetPolyPoints(Math.ceil(OptConstant.Common.MaxPolyPoints/2),!1,!1,!1,null);for(let e=0;e<n.length;e++)n[e].x=n[e].x*o+l,n[e].y=n[e].y*r+h;a=a.concat(n),a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h))}}s&&s.push(a.length-1)}}if(!e)for(let t=0;t<a.length;t++)a[t].x+=this.Frame.x,a[t].y+=this.Frame.y}else a=super.GetPolyPoints(t,e,!0);return LogUtil.Debug("S.PolyLine: GetPolyPoints output",a),a}BeforeModifyShape(t,e,i){LogUtil.Debug("S.PolyLine: BeforeModifyShape input",{event:t,x:e,y:i});let n,s,a,o,r,l={};if(n=this.polylist&&this.polylist.segs?this.polylist.segs.length:0,0!==n){if(this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y){let t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y;t=t<1?1:t,s=this.Frame.width/t,a=this.Frame.height/e}else s=1,a=1;if(o=this.StartPoint.x,r=this.StartPoint.y,i>0&&i<=n-1)switch(this.polylist.segs[i].LineType){case OptConstant.LineType.PARABOLA:break;case OptConstant.LineType.ARCLINE:l.StartPoint=new Point$1(this.polylist.segs[i-1].pt.x*s+o,this.polylist.segs[i-1].pt.y*a+r),l.EndPoint=new Point$1(this.polylist.segs[i].pt.x*s+o,this.polylist.segs[i].pt.y*a+r);let n=this.polylist.segs[i].param;n>=0?(l.CurveAdjust=n,l.IsReversed=!0):(l.CurveAdjust=-n,l.IsReversed=!1),l.FromPolygon=!0,this.arcobj=new Instance.Shape.ArcLine(l),this.arcobj.Frame=Utils2.Pt2Rect(l.StartPoint,l.EndPoint),this.arcobj.BeforeModifyShape(t,e,i)}}LogUtil.Debug("S.PolyLine: BeforeModifyShape output",{arcParams:l})}SnapNewPointTo90Degrees(t,e){LogUtil.Debug("S.PolyLine: SnapNewPointTo90Degrees input",{segmentIndex:t,newPoint:e});let i=-1,n=-1,s=!1;if(!window.event||!window.event.ctrlKey){const a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);t-1>=0?i=t-1:this.polylist.closed&&this.polylist.segs.length>2&&(i=this.polylist.segs.length-2),i>=0&&this.AdjustForLineAngleSnap(a[i],e)&&(s=!0),n=t+1,n>=this.polylist.segs.length&&(n=this.polylist.closed?1:-1),n>=0&&this.AdjustForLineAngleSnap(a[n],e)&&(s=!0)}return LogUtil.Debug("S.PolyLine: SnapNewPointTo90Degrees output",s),s}ModifyShape(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: ModifyShape input",{event:t,x:e,y:i,actionType:n,segmentIndex:s,snapToGrid:a});let o=this.polylist&&this.polylist.segs?this.polylist.segs.length:0,r={},l=null;if(0!==o){if(n===OptConstant.ActionTriggerType.PolyNode)s>=1&&s<o&&(l=new Point$1(e,i),!a&&this.SnapNewPointTo90Degrees(s,l)&&(e=l.x,i=l.y),this.polylist.segs[s].pt.x=e-this.StartPoint.x,this.polylist.segs[s].pt.y=i-this.StartPoint.y,this.polylist.segs[s].LineType===OptConstant.LineType.ARCSEGLINE&&(r=this.PrPolyLGetArcQuadrant(this.polylist.segs[s-1].pt,this.polylist.segs[s].pt,this.polylist.segs[s].param),this.polylist.segs[s].ShortRef=r.ShortRef),s<o-1&&this.polylist.segs[s+1].LineType===OptConstant.LineType.ARCSEGLINE&&(r=this.PrPolyLGetArcQuadrant(this.polylist.segs[s].pt,this.polylist.segs[s+1].pt,this.polylist.segs[s+1].param),this.polylist.segs[s+1].ShortRef=r.ShortRef));else if(n===OptConstant.ActionTriggerType.PolyAdj&&s>0&&s<=o-1)switch(this.polylist.segs[s].LineType){case OptConstant.LineType.PARABOLA:r.x=e,r.y=i,this.PrPolyLGetParabolaParam(r,s);break;case OptConstant.LineType.ARCSEGLINE:r.x=e,r.y=i,this.PrPolyLGetEllipseParam(r,s,t);break;case OptConstant.LineType.ARCLINE:this.arcobj&&(this.arcobj.ModifyShape(null,e,i,n,s),this.polylist.segs[s].param=this.arcobj.IsReversed?this.arcobj.CurveAdjust:-this.arcobj.CurveAdjust)}const h={x:e,y:i},c=this.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(c,h,CursorConstant.CursorTypes.Grow,this),this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)}LogUtil.Debug("S.PolyLine: ModifyShape output",{polylist:this.polylist,Frame:this.Frame})}BeforeRotate(t){LogUtil.Debug("S.PolyLine: BeforeRotate input",t);const e=this.Frame;T3Gv.opt.rotateKnobCenterDivisor=this.RotateKnobCenterDivisor(),T3Gv.opt.rotateStartRotation=0,T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateStartRotation,T3Gv.opt.rotateStartPoint.x=this.RotateKnobPt.x,T3Gv.opt.rotateStartPoint.y=this.RotateKnobPt.y,T3Gv.opt.rotatePivotX=e.x+e.width/T3Gv.opt.rotateKnobCenterDivisor.x,T3Gv.opt.rotatePivotY=e.y+e.height/T3Gv.opt.rotateKnobCenterDivisor.y,LogUtil.Debug("S.PolyLine: BeforeRotate output",{rotateKnobCenterDivisor:T3Gv.opt.rotateKnobCenterDivisor,rotateStartRotation:T3Gv.opt.rotateStartRotation,rotateEndRotation:T3Gv.opt.rotateEndRotation,rotateStartPoint:T3Gv.opt.rotateStartPoint,rotatePivotX:T3Gv.opt.rotatePivotX,rotatePivotY:T3Gv.opt.rotatePivotY})}AdjustRotate(t,e,i){let n;LogUtil.Debug("S.PolyLine: AdjustRotate input",{mouseX:t,mouseY:e,event:i});const s=T3Gv.opt.rotatePivotX,a=T3Gv.opt.rotatePivotY,o=T3Gv.opt.rotateStartPoint.x,r=T3Gv.opt.rotateStartPoint.y;let l=t-s,h=e-a;if(o===s)Math.abs(h)<1e-4&&(h=1e-4),n=180*-Math.atan(l/h)/NvConstant.Geometry.PI,h<0&&(n+=180);else{if(r!==a)return;Math.abs(l)<1e-4&&(l=1e-4),n=180*Math.atan(h/l)/NvConstant.Geometry.PI,l<0&&(n+=180)}const c=T3Gv.opt.OverrideSnaps(i);T3Gv.docUtil.docConfig.enableSnap&&!c&&(n=Math.round(n/T3Gv.opt.rotateSnap)*T3Gv.opt.rotateSnap),n<0&&(n+=360);const u=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils3.RotatePointsAboutCenter(this.Frame,n/360*(2*Math.PI),u);const d={};if(Utils2.GetPolyRect(d,u),d.x>=0&&d.y>=0){if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(d.x+d.width>t.dim.x||d.y+d.height>t.dim.y)return}T3Gv.opt.rotateEndRotation=n,this.Rotate(T3Gv.opt.actionSvgObject,n)}LogUtil.Debug("S.PolyLine: AdjustRotate output",{rotationAngle:n})}Rotate(t,e){LogUtil.Debug("S.PolyLine: Rotate input",{svgElement:t,rotationAngle:e}),t.SetRotation(e,T3Gv.opt.rotatePivotX,T3Gv.opt.rotatePivotY),LogUtil.Debug("S.PolyLine: Rotate output",{svgElement:t,rotationAngle:e})}AfterRotateShape(t,e){LogUtil.Debug("S.PolyLine: AfterRotateShape input",{event:t,actionType:e});const i=T3Gv.opt.rotateEndRotation,n={x:T3Gv.opt.rotatePivotX,y:T3Gv.opt.rotatePivotY},s=-(i-T3Gv.opt.rotateStartRotation)/(180/NvConstant.Geometry.PI);T3Gv.opt.RotatePointAroundPoint(n,T3Gv.opt.rotateStartPoint,s);const a=this.polylist.segs.length;for(let l=0;l<a;++l)this.polylist.segs[l].LineType===OptConstant.LineType.ELLIPSE&&(this.polylist.segs[l].weight+=10*i);const o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils3.RotatePointsAboutPoint(n,s,o);const r=o.length;this.StartPoint.x=o[0].x,this.StartPoint.y=o[0].y;for(let l=0;l<r;l++)this.polylist.segs[l].pt.x=o[l].x-this.StartPoint.x,this.polylist.segs[l].pt.y=o[l].y-this.StartPoint.y;if(this.EndPoint.x=o[r-1].x,this.EndPoint.y=o[r-1].y,e!==OptConstant.ActionTriggerType.MovePolySeg){if(this.CalcFrame(),ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects(),this.UpdateFrame(),this.r.x<0||this.r.y<0)return void ToolActUtil.Undo();T3Gv.opt.ob&&T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(t,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),T3Gv.opt.ob={}),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),ObjectUtil$1.AddToDirtyList(t)}LogUtil.Debug("S.PolyLine: AfterRotateShape output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}IsAdjustingToClosed(t,e){LogUtil.Debug("S.PolyLine: isAdjustingToClosed input",{x:t,y:e});const i=new HitResult(-1,0,null),n={id:T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart?OptConstant.HookPts.KTL:OptConstant.HookPts.KTR,x:t,y:e},s=this.ClosePolygon(this.BlockID,[n],i);return LogUtil.Debug("S.PolyLine: isAdjustingToClosed output",s),s}AdjustLine(t,e,i,n,s){LogUtil.Debug("S.PolyLine: AdjustLine input",{event:t,newX:e,newY:i,actionType:n,snapToGrid:s});let a=this.polylist.segs.length,o={},r=new Point$1(e,i);switch(this.polylist.closed&&n===OptConstant.ActionTriggerType.PolyEnd&&(n=OptConstant.ActionTriggerType.LineStart),n){case OptConstant.ActionTriggerType.LineEnd:!s&&this.SnapNewPointTo90Degrees(a-1,r)&&(e=r.x,i=r.y),this.polylist.segs[a-1].pt.x=e-this.StartPoint.x,this.polylist.segs[a-1].pt.y=i-this.StartPoint.y,this.EndPoint.x=e,this.EndPoint.y=i,this.polylist.segs[a-1].LineType===OptConstant.LineType.ARCSEGLINE&&(o=this.PrPolyLGetArcQuadrant(this.polylist.segs[a-2].pt,this.polylist.segs[a-1].pt,this.polylist.segs[a-1].param),this.polylist.segs[a-1].ShortRef=o.ShortRef);break;case OptConstant.ActionTriggerType.LineStart:!s&&this.SnapNewPointTo90Degrees(0,r)&&(e=r.x,i=r.y);let t=e-this.StartPoint.x,n=i-this.StartPoint.y;this.StartPoint.x=e,this.StartPoint.y=i;for(let e=1;e<a;e++)this.polylist.segs[e].pt.x-=t,this.polylist.segs[e].pt.y-=n;switch(this.polylist.closed&&(this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y,this.polylist.segs[a-1].pt.x=0,this.polylist.segs[a-1].pt.y=0),this.polylist.segs[1].LineType){case OptConstant.LineType.ARCSEGLINE:o=this.PrPolyLGetArcQuadrant(this.polylist.segs[0].pt,this.polylist.segs[1].pt,this.polylist.segs[1].param),this.polylist.segs[1].ShortRef=o.ShortRef;break;case OptConstant.LineType.QUADBEZ:case OptConstant.LineType.CUBEBEZ:case OptConstant.LineType.ELLIPSE:this.polylist.segs[1].pt.x=this.polylist.segs[0].pt.x,this.polylist.segs[1].pt.y=this.polylist.segs[0].pt.y;break;case OptConstant.LineType.NURBS:case OptConstant.LineType.SPLINE:this.polylist.segs[1].pt.x=this.polylist.segs[0].pt.x,this.polylist.segs[1].pt.y=this.polylist.segs[0].pt.y,this.polylist.segs[2].pt.x=this.polylist.segs[0].pt.x,this.polylist.segs[2].pt.y=this.polylist.segs[0].pt.y}}t?(this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)):this.CalcFrame();const l=this.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(l,r,CursorConstant.CursorTypes.Grow,this),LogUtil.Debug("S.PolyLine: AdjustLine output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}AdjustLineEnd(t,e,i,n,s){if(LogUtil.Debug("S.PolyLine: AdjustLineEnd input",{event:t,newX:e,newY:i,actionType:n,snapToGrid:s}),2===this.polylist.segs.length){const t={x:this.EndPoint.x,y:this.EndPoint.y};this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1),e=this.EndPoint.x,i=this.EndPoint.y,this.EndPoint.x=t.x,this.EndPoint.y=t.y}this.AdjustLine(t,e,i,n,s),LogUtil.Debug("S.PolyLine: AdjustLineEnd output",{EndPoint:this.EndPoint})}AdjustLineStart(t,e,i,n,s){if(LogUtil.Debug("S.PolyLine: AdjustLineStart input",{event:t,newX:e,newY:i,actionType:n,snapToGrid:s}),2===this.polylist.segs.length){const t={x:this.StartPoint.x,y:this.StartPoint.y};this.StartPoint.x=e,this.StartPoint.y=i,this.EnforceMinimum(!0),e=this.StartPoint.x,i=this.StartPoint.y,this.StartPoint.x=t.x,this.StartPoint.y=t.y}this.AdjustLine(t,e,i,OptConstant.ActionTriggerType.LineStart,s),LogUtil.Debug("S.PolyLine: AdjustLineStart output",{StartPoint:this.StartPoint})}Flip(t,e){LogUtil.Debug("S.PolyLine: Flip input",{flags:t,isTemporary:e});let i,n,s,a,o=!1;const r=[],l=[],h={};if(e||(T3Gv.opt.ob=Utils1.DeepCopy(this)),i=this.polylist.segs.length,n=this.Frame,this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y?(s=this.polylist.dim.x,a=this.polylist.dim.y,this instanceof Instance.Shape.Polygon&&(this.StartPoint.x=this.Frame.x+this.polylist.offset.x,this.StartPoint.y=this.Frame.y+this.polylist.offset.y)):(s=n.width,a=n.height),t&OptConstant.ExtraFlags.FlipVert){o=!0;const t=this.StartPoint.y-n.y;for(let s=0;s<i;s++)r.push(new Point$1(this.polylist.segs[s].pt.x,this.polylist.segs[s].pt.y+t)),this.polylist.segs[s].LineType===OptConstant.LineType.PARABOLA&&(l[s]=this.PrPolyLGetParabolaAdjPoint(!1,s),l[s].y-=n.y);for(let s=0;s<i;s++)r[s].y=a-r[s].y,l[s]&&(l[s].y=a-l[s].y,l[s].y+=n.y);const e=r[0].y;for(let n=0;n<i;n++)this.polylist.segs[n].pt.y=r[n].y-e;this.StartPoint.y=r[0].y+this.Frame.y,this.EndPoint.y=r[i-1].y+this.Frame.y}if(t&OptConstant.ExtraFlags.FlipHoriz){o=!0;const t=this.StartPoint.x-n.x;for(let s=0;s<i;s++)r.push(new Point$1(this.polylist.segs[s].pt.x+t,this.polylist.segs[s].pt.y)),this.polylist.segs[s].LineType===OptConstant.LineType.PARABOLA&&s>0&&(l[s]=this.PrPolyLGetParabolaAdjPoint(!1,s),l[s].x-=n.x);for(let a=0;a<i;a++)r[a].x=s-r[a].x,l[a]&&(l[a].x=s-l[a].x,l[a].x+=n.x);const e=r[0].x;for(let n=0;n<i;n++)this.polylist.segs[n].pt.x=r[n].x-e;this.StartPoint.x=r[0].x+this.Frame.x,this.EndPoint.x=r[i-1].x+this.Frame.x}if(o){for(let t=0;t<i;t++)switch(this.polylist.segs[t].LineType){case OptConstant.LineType.ARCLINE:this.polylist.segs[t].param=-this.polylist.segs[t].param;break;case OptConstant.LineType.ARCSEGLINE:const e=this.PrPolyLGetArcQuadrant(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt,this.polylist.segs[t].param);this.polylist.segs[t].ShortRef=e.ShortRef;break;case OptConstant.LineType.PARABOLA:l[t]&&(h.x=l[t].x,h.y=l[t].y,this.PrPolyLGetParabolaParam(h,t));break;case OptConstant.LineType.ELLIPSE:let i=this.polylist.segs[t].weight;i=3600-i,this.polylist.segs[t].weight=i}e||(T3Gv.opt.ob&&T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Flip),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)),this.polylist.closed&&(this.polylist.offset.x=this.StartPoint.x-this.Frame.x,this.polylist.offset.y=this.StartPoint.y-this.Frame.y)}T3Gv.opt.ob={},LogUtil.Debug("S.PolyLine: Flip output",this)}LinkGrow(t,e,i){switch(LogUtil.Debug("S.PolyLine: LinkGrow input",{blockID:t,hookPoint:e,newPoint:i}),e){case OptConstant.HookPts.KTL:this.AdjustLineStart(null,i.x,i.y);break;case OptConstant.HookPts.KTR:this.AdjustLineEnd(null,i.x,i.y,OptConstant.ActionTriggerType.LineEnd)}OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("S.PolyLine: LinkGrow output",{blockID:t,hookPoint:e,newPoint:i})}ClosePolygon(t,e,i){if(LogUtil.Debug("S.PolyLine: ClosePolygon input",{blockID:t,hookPoints:e,hitResult:i}),e&&e.length&&this.polylist&&this.polylist.segs.length>3&&!this.polylist.closed&&(this.Hit(e[0],!1,!0,i,e[0].id),i.hitcode===NvConstant.HitCodes.PLApp)){if(e[0].id===OptConstant.HookPts.KTL&&i.segment===OptConstant.HookPts.KTR)return i.objectid=t,i.pt.x=this.polylist.segs[this.polylist.segs.length-1].pt.x+this.StartPoint.x,i.pt.y=this.polylist.segs[this.polylist.segs.length-1].pt.y+this.StartPoint.y,LogUtil.Debug("S.PolyLine: ClosePolygon output",!0),!0;if(e[0].id===OptConstant.HookPts.KTR&&i.segment===OptConstant.HookPts.KTL)return i.objectid=t,i.pt.x=this.polylist.segs[0].pt.x+this.StartPoint.x,i.pt.y=this.polylist.segs[0].pt.y+this.StartPoint.y,LogUtil.Debug("S.PolyLine: ClosePolygon output",!0),!0}return LogUtil.Debug("S.PolyLine: ClosePolygon output",!1),!1}PolyGetTargetPointList(t){LogUtil.Debug("S.PolyLine: PolyGetTargetPointList input",{hookFlags:t});let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=[],n=0;if(this.polylist&&this.polylist.closed&&this.StyleRecord.Line.BThick&&!(t&NvConstant.HookFlags.LcShapeOnLine)){let t=T3Gv.opt.InflateLine(e,this.StyleRecord.Line.BThick,!0,!0),n=T3Gv.opt.InflateLine(e,this.StyleRecord.Line.BThick,!0,!1);i=t.concat(n),e=e.concat(i)}else 0!==this.RotationAngle&&(n=-this.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,n,e));return LogUtil.Debug("S.PolyLine: PolyGetTargetPointList output",e),e}GetTargetPoints(t,e,i){LogUtil.Debug("S.PolyLine: GetTargetPoints input",{hookPoint:t,hookFlags:e,targetObjectID:i});const n=OptConstant.HookPts;if(null!=i&&i>=0&&ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case n.KTC:case n.KBC:case n.KRC:case n.KLC:return LogUtil.Debug("S.PolyLine: GetTargetPoints output",null),null}const s=this.BaseShapePolyGetTargets(t,e,this.Frame);return LogUtil.Debug("S.PolyLine: GetTargetPoints output",s),s}BaseShapePolyGetTargets(t,e,i){LogUtil.Debug("S.PolyLine: BaseShapePolyGetTargets input",{hookPoint:t,hookFlags:e,targetFrame:i});let n=-1,s=OptConstant.Common.LongIntMax,a={x:0,y:0};const o=this.PolyGetTargetPointList(e);if(!t)return null;let r={x:t.x,y:t.y};const l=T3Gv.docUtil.docConfig.enableSnap&&!(e&NvConstant.HookFlags.LcNoSnaps);l&&(r=T3Gv.docUtil.SnapToGrid(r),r.y=Math.max(i.y,Math.min(r.y,i.y+i.height)),r.x=Math.max(i.x,Math.min(r.x,i.x+i.width)));for(let h=1;h<o.length;h++){const e=o[h-1],i=o[h];if(Utils2.EqualPt(e,i))continue;let c,u={x:t.x,y:t.y};if(Math.abs((i.y-e.y)/(i.x-e.x))>1){l&&(u.y=r.y);const t=(i.x-e.x)/(i.y-e.y)*(u.y-e.y)+e.x;if(c=Math.abs(t-u.x),u.x=t,t<Math.min(e.x,i.x)||t>Math.max(e.x,i.x))c=OptConstant.Common.LongIntMax;else{const t=Utils2.Pt2Rect(e,i);Utils2.InflateRect(t,1,1),Utils2.pointInRect(t,u)||(c=OptConstant.Common.LongIntMax)}}else{l&&(u.x=r.x);const t=(i.y-e.y)/(i.x-e.x)*(u.x-e.x)+e.y;if(c=Math.abs(t-u.y),u.y=t,t<Math.min(e.y,i.y)||t>Math.max(e.y,i.y))c=OptConstant.Common.LongIntMax;else{const t=Utils2.Pt2Rect(e,i);Utils2.InflateRect(t,1,1),Utils2.pointInRect(t,u)||(c=OptConstant.Common.LongIntMax)}}c<s&&(n=h,s=c,a={x:u.x,y:u.y})}if(n>=0){const t=[{x:a.x,y:a.y}];if(0!==this.RotationAngle){const e=this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(i,e,t)}const e=i.width,n=i.height,s=0===e?0:(t[0].x-i.x)/e,o=0===n?0:(t[0].y-i.y)/n,r=[new Point$1(s*OptConstant.Common.DimMax,o*OptConstant.Common.DimMax)];return LogUtil.Debug("S.PolyLine: BaseShapePolyGetTargets output",r),r}return LogUtil.Debug("S.PolyLine: BaseShapePolyGetTargets output",null),null}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: GetPerimeterPoints input",{event:t,hookPoints:e,hookPointID:i,rotationAngle:n,scaleFactor:s,targetObjectID:a});let o=[],r=this.Frame;if(e&&2===e.length&&e[0].id===OptConstant.HookPts.KTL&&e[1].id===OptConstant.HookPts.KTR)return o.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),o[0].id=e[0].id,o.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),o[1].id=e[1].id,LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o;let l=ObjectUtil$1.GetObjectPtr(a,!1);if(l&&l.objecttype===NvConstant.FNObjectTypes.Multiplicity&&e){let r,l=this.GetPolyPoints(1,!1,!0,!1,null),h={},c=l.length;return 0===e[0].x?(h.StartPoint=l[0],h.EndPoint=l[1],h.LineType=OptConstant.LineType.LINE,r=new BaseLine(h),r.StartPoint=h.StartPoint,r.EndPoint=h.EndPoint,r.Frame=Utils2.Pt2Rect(h.StartPoint,h.EndPoint),o=super.GetPerimeterPoints(t,e,i,n,s,a)):(h.StartPoint=l[c-2],h.EndPoint=l[c-1],h.LineType=OptConstant.LineType.LINE,r=new BaseLine(h),r.StartPoint=h.StartPoint,r.EndPoint=h.EndPoint,r.Frame=Utils2.Pt2Rect(h.StartPoint,h.EndPoint),o=super.GetPerimeterPoints(t,e,i,n,s,a)),LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o}if(l&&l.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===e.length)return o=super.GetPerimeterPoints(t,e,i,n,s,a),LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o;if(i>=OptConstant.HookPts.KCTL&&i<=OptConstant.HookPts.KCC){if(0===e[0].x)return o[0]={x:this.StartPoint.x,y:this.StartPoint.y,id:e[0].id||0},LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o;if(e[0].x===OptConstant.Common.DimMax)return o[0]={x:this.EndPoint.x,y:this.EndPoint.y,id:e[0].id||0},LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o}for(let h=0;h<e.length;h++){o[h]={x:0,y:0,id:0};let t=r.width,i=r.height;o[h].x=e[h].x/OptConstant.Common.DimMax*t+r.x,o[h].y=e[h].y/OptConstant.Common.DimMax*i+r.y,null!=e[h].id&&(o[h].id=e[h].id)}return LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o}HookToPoint(t,e){let i;LogUtil.Debug("S.PolyLine: HookToPoint input",{hookPoint:t,rect:e});const n={x:0,y:0},s={x:0,y:0};if(t===OptConstant.HookPts.KTL){if(n.x=this.StartPoint.x,n.y=this.StartPoint.y,s.x=this.StartPoint.x+this.polylist.segs[1].pt.x,s.y=this.StartPoint.y+this.polylist.segs[1].pt.y,e){const t=Utils2.Pt2Rect(this.StartPoint,s);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}}else if(n.x=this.EndPoint.x,n.y=this.EndPoint.y,i=this.polylist.segs.length,s.x=this.StartPoint.x+this.polylist.segs[i-2].pt.x,s.y=this.StartPoint.y+this.polylist.segs[i-2].pt.y,e){const t=Utils2.Pt2Rect(this.EndPoint,s);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}return LogUtil.Debug("S.PolyLine: HookToPoint output",n),n}GetSegmentLineFace(t,e,i){LogUtil.Debug("S.PolyLine: GetSegmentLineFace input",{event:t,targetPoint:e,anchorPoint:i});let n=0;const s={x:i.x,y:i.y},a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),o={};if(Utils3.LineDStyleHit(a,s,this.StyleRecord.Line.Thickness,0,o)&&o.lpHit>=0){const t=Utils2.Pt2Rect(a[o.lpHit],a[o.lpHit+1]);n=t.width>=t.height?e.y>=i.y?OptConstant.HookPts.KBC:OptConstant.HookPts.KTC:e.x>=i.x?OptConstant.HookPts.KRC:OptConstant.HookPts.KLC}return LogUtil.Debug("S.PolyLine: GetSegmentLineFace output",n),n}PolyHitSeg(t){LogUtil.Debug("S.PolyLine: PolyHitSeg input",{point:t});let e=[],i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,e),n={},s={x:t.x,y:t.y};if(Utils3.LineDStyleHit(i,s,this.StyleRecord.Line.Thickness,0,n)&&n.lpHit>=0){let t=e.length;for(let s=0;s<t;s++)if(n.lpHit<e[s]){n.lpHit=s;break}const i=n.lpHit+1;return LogUtil.Debug("S.PolyLine: PolyHitSeg output",i),i}return LogUtil.Debug("S.PolyLine: PolyHitSeg output",-1),-1}MaintainPoint(t,e,i,n,s){LogUtil.Debug("S.PolyLine: MaintainPoint input",{point:t,targetID:e,targetObject:i,drawingObject:n,actionType:s});let a,o,r,l={},h={},c=[],u={};if(n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line)switch(n.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:for(a=-1,o=0;o<n.hooks.length;o++)if(n.hooks[o].objid===e){n.HookToPoint(n.hooks[o].hookpt,l),a=0;break}if(0!==a)return!0;h=Utils1.DeepCopy(n),Utils2.CopyRect(h.Frame,l),h.StartPoint.x=l.x,h.StartPoint.y=l.y,h.EndPoint.x=l.x+l.width,h.EndPoint.y=l.y+l.height,n=h}let d=i.PolyHitSeg(t);if(i.polylist.segs.length!==this.polylist.segs.length||s===OptConstant.ActionTriggerType.Flip?(a=this.PolyHitSeg(t),a<0&&(a=i.PolyHitSeg(t)),a>=this.polylist.segs.length&&(a=this.polylist.segs.length-1)):a=d,r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),this.polylist&&this.polylist.closed&&this.StyleRecord.Line.BThick&&n instanceof BaseLine){let e={},n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),s=Utils3.LineDStyleHit(n,{x:t.x,y:t.y},2,-12,e);if(!s||e.lpHit<0){let a=T3Gv.opt.InflateLine(n,i.StyleRecord.Line.BThick,!0,!1);if(s=Utils3.LineDStyleHit(a,{x:t.x,y:t.y},2,-12,e),s&&e.lpHit>=0)r=T3Gv.opt.InflateLine(r,this.StyleRecord.Line.BThick,!0,!1);else{let a=T3Gv.opt.InflateLine(n,i.StyleRecord.Line.BThick,!0,!0);s=Utils3.LineDStyleHit(a,{x:t.x,y:t.y},2,-12,e),s&&e.lpHit>=0&&(r=T3Gv.opt.InflateLine(r,this.StyleRecord.Line.BThick,!0,!0))}}}if(a>=0&&d>=0){if(l=Utils2.Pt2Rect(r[a],r[a-1]),h=Utils1.DeepCopy(this),Utils2.CopyRect(h.Frame,l),h.StartPoint.x=r[a-1].x,h.StartPoint.y=r[a-1].y,h.EndPoint.x=r[a].x,h.EndPoint.y=r[a].y,c=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),u=Utils1.DeepCopy(i),l=Utils2.Pt2Rect(c[d],c[d-1]),Utils2.CopyRect(u.Frame,l),u.StartPoint.x=c[d-1].x,u.StartPoint.y=c[d-1].y,u.EndPoint.x=c[d].x,u.EndPoint.y=c[d].y,n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)return T3Gv.opt.LineCheckPoint(h,t)||PolyUtil.LinesMaintainDist(h,u,s,t),!0;switch(s){case OptConstant.ActionTriggerType.PolyNode:s=T3Gv.opt.actionTriggerData!==a-1&&T3Gv.opt.actionTriggerData!==a||h.StartPoint.x!==r[T3Gv.opt.actionTriggerData].x||h.StartPoint.y!==r[T3Gv.opt.actionTriggerData].y?OptConstant.ActionTriggerType.LineEnd:OptConstant.ActionTriggerType.LineStart;break;case OptConstant.ActionTriggerType.Rotate:return PolyUtil.LinesMaintainDist(h,u,s,t),!0;default:s=OptConstant.ActionTriggerType.LineEnd}return!!T3Gv.opt.LineCheckPoint(h,t)||(i.polylist.segs.length===this.polylist.segs.length?(T3Gv.opt.LinesMaintainDistWithinSegment(this,i,a,t),!0):(T3Gv.opt.LinesIntersect(h,n,t)||PolyUtil.LinesMaintainDist(h,u,s,t),!0))}return LogUtil.Debug("S.PolyLine: MaintainPoint output",!0),!0}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: ChangeTarget input",{objectHookID:t,objectTargetID:e,paramA:i,paramR:n,paramI:s,paramN:a});let o=0,r=null;const l={};let h=null,c=0;if(r=ObjectUtil$1.GetObjectPtr(e,!1),this.TextFlags&NvConstant.TextFlags.HorizText&&r instanceof BaseShape){for(c=0;c<r.hooks.length;c++)if(r.hooks[c].objid===t){h=r.HookToPoint(r.hooks[c].hookpt,l);break}if(null!=h&&this.PolyHitSeg(h)>=0){o=this.GetApparentAngle(h),o=Math.abs(o)%180;const t=Math.abs(r.RotationAngle%180);Math.abs(t-o)>2&&Math.abs(t-(o-180))>2&&(r.RotationAngle=o,OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),ObjectUtil$1.AddToDirtyList(e))}}ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.PolyLine: ChangeTarget output",{angle:o,hookedPoint:h,loopIndex:c})}LMDrawPreTrack(t){return LogUtil.Debug("S.PolyLine: LMDrawPreTrack input",{event:t}),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.JoinIndex>=0)?(this.LMDrawRelease(),LogUtil.Debug("S.PolyLine: LMDrawPreTrack output",!1),!1):(super.LMDrawPreTrack(t),LogUtil.Debug("S.PolyLine: LMDrawPreTrack output",!0),!0)}LMDrawClickExceptionCleanup(t){LogUtil.Debug("S.PolyLine: LMDrawClickExceptionCleanup input",{event:t}),LMEvtUtil.UnbindActionClickHammerEvents(),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),T3Gv.opt.linkParams=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),LogUtil.Debug("S.PolyLine: LMDrawClickExceptionCleanup output",{})}LMDrawClick(t,e){LogUtil.Debug("S.PolyLine: LMDrawClick input",{initialX:t,initialY:e});try{this.Frame.x=t,this.Frame.y=e,this.Frame.width=0,this.Frame.height=0,this.StartPoint={x:t,y:e},this.EndPoint={x:t,y:e};const i=this;T3Gv.opt.WorkAreaHammer.off("dragstart"),T3Gv.opt.WorkAreaHammer.on("doubletap",EvtUtil.Evt_DrawReleaseHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_PolyLineDrawExtendHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_PolyLineDrawExtendHandlerFactory(this)),$$1(window).bind("mousemove",(function(t){try{i.LMDrawTrack(t)}catch(e){throw i.LMDrawClickExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),e}})),LogUtil.Debug("S.PolyLine: LMDrawClick output",{message:"Click handled successfully"})}catch(i){throw this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}LMDrawRelease(t){LogUtil.Debug("S.PolyLine: LMDrawRelease input",{event:t}),t&&t.gesture&&t.gesture.stopDetect(),LMEvtUtil.UnbindActionClickHammerEvents(),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick);const e=this.polylist.segs.length,i=this.polylist.segs[e-2].pt.x-this.polylist.segs[e-1].pt.x,n=this.polylist.segs[e-2].pt.y-this.polylist.segs[e-1].pt.y,s=Math.sqrt(i*i+n*n);e>2&&s<5&&this.polylist.segs.pop(),this.ResetAutoScrollTimer(),this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId),DrawUtil.PostObjectDraw(),LogUtil.Debug("S.PolyLine: LMDrawRelease output",{segmentCount:e,segmentDistance:s})}LMDrawExtend(t){if(LogUtil.Debug("S.PolyLine: LMDrawExtend input",t),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.JoinIndex>=0))this.LMDrawRelease(t);else{let e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=this.polylist.segs.length,n={x:this.polylist.segs[i-2].pt.x+this.StartPoint.x,y:this.polylist.segs[i-2].pt.y+this.StartPoint.y},s=e.x-n.x,a=e.y-n.y;if(Math.sqrt(s*s+a*a)>=10){let i=e.x-this.StartPoint.x,n=e.y-this.StartPoint.y;this.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,i,n)),this.polylist.segs.length>=OptConstant.Common.MaxPolySegs&&this.LMDrawRelease(t)}}LogUtil.Debug("S.PolyLine: LMDrawExtend output",{polySegments:this.polylist.segs})}RightClick(t){let e,i;const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),s=new HitResult(-1,0,null),a=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(!SelectUtil.SelectObjectFromClick(t,a))return!1;const o=a.GetID();if((e=ObjectUtil$1.GetObjectPtr(o,!1))&&e.GetTextObject()>=0){const e=a.textElem;e&&(i=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY),i>=0&&TextUtil.ActivateTextEdit(a,t,!0))}T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=a.GetID(),T3Gv.opt.rClickParam.hitPoint.x=n.x,T3Gv.opt.rClickParam.hitPoint.y=n.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,this.Hit(n,!1,!1,s),s.hitcode&&(T3Gv.opt.rClickParam.segment=s.segment);if(null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();i=-1,e&&(i=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY))}else this.objecttype,NvConstant.FNObjectTypes.FlWall}PrGetNURBSPoints(t,e,i,n,s,a){function o(){let t=(g[d-1]-g[0])/e,i=0,n=g[0];for(let s=0;s<e;s++){for(;n>=g[i];)i++;let e=i-1+l*s;m[e]=1;for(let t=2;t<=c;t++){let s=i-t+1;s<0&&(s=0);for(let a=s;a<=i-1;a++){let i=g[a+t-1]-g[a],s=g[a+t]-g[a+1];0===i&&(i=1e-11),0===s&&(s=1e-11),a+e+1<m.length&&(m[a+e]=m[a+e]*(n-g[a])/i+m[a+1+e]*(g[a+t]-n)/s)}}let a=0;for(let t=0;t<p;t++)a+=u[t]*m[t+e];for(let t=0;t<p;t++)m[t+e]=u[t]*m[t+e]/a;n+=t}return m}LogUtil.Debug("S.PolyLine: PrGetNURBSPoints input",{startSegmentIndex:t,numPoints:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});let r=t,l=0,h=!1;for(r=t;r<this.polylist.segs.length&&(this.polylist.segs[r].LineType===OptConstant.LineType.NURBS||this.polylist.segs[r].LineType===OptConstant.LineType.NURBSSEG);r++){if(this.polylist.segs[r].LineType===OptConstant.LineType.NURBS){if(h)break;h=!0}this.polylist.segs[r].LineType===OptConstant.LineType.NURBSSEG&&l++}let c=this.polylist.segs[t].ShortRef+1,u=[];for(let D=0;D<l;D++)u.push(this.polylist.segs[D+t+1].weight);let d,p=l,g=[];if(-1===this.polylist.segs[t].param){let t=0;for(let i=0;i<c;i++)g.push(t),t++;t++;for(let i=c;i<l+1;i++)g.push(t),t++;let e=g[g.length-1]-g[0];for(let i=1;i<c;i++)g.push(e);d=g.length}else{for(let n=0;n<l-1;n++)g.push(this.polylist.segs[n+t+1].param);g.push(this.polylist.segs[t].param);let e=this.polylist.segs[l+t+1].param;g.push(e);let i=e-g[0];for(let t=0;t<c-1;t++)g.push(g[t+1]+i);d=l+c}let f=[],b=[];for(let D=0;D<l;D++)f.push(this.polylist.segs[D+t+1].pt.x),b.push(this.polylist.segs[D+t+1].pt.y);const v=p*e;let m=new Float64Array(v),y=new Float64Array(f),S=new Float64Array(b);u=new Float64Array(u),g=new Float64Array(g);let w=g[0],x=g[d-1]-w;for(let D=0;D<d;D++)g[D]=(g[D]-w)/x;for(let D=0;D<g.length;D++)g[D]=Math.floor(1e4*g[D])/1e4,D>0?g[D]<g[D-1]&&(g[D]=g[D-1]):g[0]>g[1]&&(g[0]=0);this.polylist.closed?o():null==this.polylist.segs[t].UserData||this.polylist.segs[t].UserData.nPoints!==e||0===this.polylist.segs[t].UserData.basis.length?(o(),this.polylist.segs[t].UserData={nPoints:e,basis:m}):m=this.polylist.segs[t].UserData.basis;let C=[];{let t=(g[d-1]-g[0])/e,o=(Math.floor((g[c-1]-g[0])/t)+1)*p,r=0,l=0;for(let e=0;e<p;e++){let t=u[e]*m[e+o];r+=y[e]*t,l+=S[e]*t}C.push(new Point$1(r*s+i,l*a+n));for(let e=c-1;e<p;e++)if(Math.floor((g[e+1]-g[0])/t),o+=p,o+p-1<v){r=0,l=0;for(let t=0;t<p;t++){let e=m[t+o];r+=y[t]*e,l+=S[t]*e}C.push(new Point$1(r*s+i,l*a+n))}}return LogUtil.Debug("S.PolyLine: PrGetNURBSPoints output",C),C}PrGetSPLINEPoints(t,e,i,n,s,a){function o(){let t,i,n,s,a=(g[d-1]-g[0])/e;i=0,n=g[0];for(let o=0;o<e;o++){for(;n>=g[i];)i++;let e=i-1+b*o;m[e]=1;for(let s=2;s<=c;s++){let a=i-s+1;for(a<0&&(a=0),t=a;t<=i-1;t++){let i=g[t+s-1]-g[t],a=g[t+s]-g[t+1];0===i&&(i=1e-11),0===a&&(a=1e-11),t+e+1<v&&(m[t+e]=m[t+e]*(n-g[t])/i+m[t+1+e]*(g[t+s]-n)/a)}}s=0;for(let t=0;t<u;t++)s+=p[t]*m[t+e];for(let t=0;t<u;t++)m[t+e]=p[t]*m[t+e]/s;n+=a}}let r;LogUtil.Debug("S.PolyLine: PrGetSPLINEPoints input",{startSegmentIndex:t,numPoints:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});let l=[],h=[],c=this.polylist.segs[t].ShortRef+1,u=1;for(r=t+1;r<this.polylist.segs.length&&this.polylist.segs[r].LineType===OptConstant.LineType.SPLINECON;r++)u++;let d,p=[];for(r=0;r<u;r++)p.push(1);let g=[];g.push(this.polylist.segs[t].param),g.push(this.polylist.segs[t].weight);const f=this.polylist.segs[t].dataclass;for(r=2;r<u;r++)g.push(this.polylist.segs[r+t].weight);for(g.push(f),r=0;r<c-1;r++)g.push(f);d=g.length;const b=u;for(l.push(this.polylist.segs[t].pt.x),h.push(this.polylist.segs[t].pt.y),r=1;r<u;r++)l.push(this.polylist.segs[r+t].pt.x),h.push(this.polylist.segs[r+t].pt.y);const v=u*e;let m=new Float64Array(v);const y=new Float64Array(l),S=new Float64Array(h);p=new Float64Array(p);let w=(g=g.map((t=>t)))[0],x=g[d-1]-w;for(r=0;r<d;r++)g[r]=(g[r]-w)/x;for(r=0;r<g.length;r++)g[r]=Math.floor(1e4*g[r])/1e4,r>0&&g[r]<g[r-1]?g[r]=g[r-1]:0===r&&g[0]>g[1]&&(g[0]=0);this.polylist.closed?o():null==this.polylist.segs[t].UserData||this.polylist.segs[t].UserData.nPoints!==e||0===this.polylist.segs[t].UserData.basis.length?(o(),this.polylist.segs[t].UserData={nPoints:e,basis:m}):m=this.polylist.segs[t].UserData.basis;let C=[];{g[d-1],g[0];let t=0,o=0,l=(Math.floor((g[c-1]-g[0])/e)+1)*b;for(r=0;r<u;r++){let e=p[r]*m[r+l];t+=y[r]*e,o+=S[r]*e}C.push(new Point$1(t*s+i,o*a+n))}return LogUtil.Debug("S.PolyLine: PrGetSPLINEPoints output",C),C}PrGetQuadraticBezierPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: PrGetQuadraticBezierPoints input",{startIndex:t,pointCount:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});const o=this.polylist.segs[t].pt.x,r=this.polylist.segs[t].pt.y,l=this.polylist.segs[t+1].pt.x,h=this.polylist.segs[t+1].pt.y,c=this.polylist.segs[t+2].pt.x,u=this.polylist.segs[t+2].pt.y,d=[],p=1/(e-1);let g=0;for(let f=0;f<e;f++){const t=1-g,e=t*t*o+2*t*g*l+g*g*c,f=t*t*r+2*t*g*h+g*g*u;d.push(new Point$1(e*s+i,f*a+n)),g+=p}return LogUtil.Debug("S.PolyLine: PrGetQuadraticBezierPoints output",d),d}PrGetCubicBezierPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: PrGetCubicBezierPoints input",{startSegmentIndex:t,pointCount:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});const o=this.polylist.segs[t].pt.x,r=this.polylist.segs[t].pt.y,l=this.polylist.segs[t+1].pt.x,h=this.polylist.segs[t+1].pt.y,c=this.polylist.segs[t+2].pt.x,u=this.polylist.segs[t+2].pt.y,d=this.polylist.segs[t+3].pt.x,p=this.polylist.segs[t+3].pt.y,g=1/(e-1);let f=0;const b=[];for(let v=0;v<e;v++){const t=1-f,e=t*t,v=e*t,m=f*f,y=m*f,S=new Point$1((v*o+3*e*f*l+3*t*m*c+y*d)*s+i,(v*r+3*e*f*h+3*t*m*u+y*p)*a+n);b.push(S),f+=g}return LogUtil.Debug("S.PolyLine: PrGetCubicBezierPoints output",b),b}PrGetEllipticalArcPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints input",{segmentIndex:t,pointCount:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});const o=[];let r=Math.floor(this.polylist.segs[t].pt.x),l=Math.floor(this.polylist.segs[t].pt.y),h=Math.floor(this.polylist.segs[t+1].pt.x),c=Math.floor(this.polylist.segs[t+1].pt.y),u=Math.floor(this.polylist.segs[t+2].pt.x),d=Math.floor(this.polylist.segs[t+2].pt.y);if(h===r&&c===l||h===u&&c===d)return o.push(new Point$1(r*s+i,l*a+n)),o.push(new Point$1(u*s+i,d*a+n)),LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints output",o),o;const p=this.polylist.segs[t].weight/10,g=this.polylist.segs[t].param,f=((t,e,i,n,s,a)=>{if(t=Math.floor(t),e=Math.floor(e),i=Math.floor(i),n=Math.floor(n),s=Math.floor(s),a=Math.floor(a),t===i)return s<t?n>e?1:-1:s>t?n>e?-1:1:0;if(e===n)return a<e?i>t?-1:1:a>e?i>t?1:-1:0;const o=(n-e)/(i-t),r=o*s+(e-o*t);return Math.abs(a-r)>.001&&0!==o?a>r?i>t?1:-1:i>t?-1:1:0})(r,l,u,d,h,c);if(0===f)return o.push(new Point$1(h*s+i,c*a+n)),o.push(new Point$1(u*s+i,d*a+n)),LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints output",o),o;const b=((t,e,i,n,s,a,o,r)=>{const l={},h=2*Math.PI*(o/360),c=Math.sqrt(t*t+e*e),u=Math.atan2(e,t),d=c*Math.cos(u-h),p=c*Math.sin(u-h),g=Math.sqrt(i*i+n*n),f=Math.atan2(n,i),b=g*Math.cos(f-h),v=g*Math.sin(f-h),m=Math.sqrt(s*s+a*a),y=Math.atan2(a,s),S=m*Math.cos(y-h),w=m*Math.sin(y-h);let x=(d-b)*(d+b)*(v-w)-(b-S)*(b+S)*(p-v)+r*r*(p-v)*(v-w)*(p-w),C=(d-b)*(b-S)/(r*r)+(b-S)*(p-v)*(p+v)-(d-b)*(v-w)*(v+w);const D=d,T=p;x/=2*((d-b)*(v-w)-(b-S)*(p-v)),C/=2*((b-S)*(p-v)-(d-b)*(v-w));const k=Math.sqrt(x*x+C*C);x=k*Math.cos(Math.atan2(C,x)+h),C=k*Math.sin(Math.atan2(C,x)+h);const $=Math.sqrt((D-x)*(D-x)+(T-C)*(T-C)*(r*r)),O=$/r;return l.centerX=x,l.centerY=C,l.majorAxis=$,l.minorAxis=O,l.angle=h,l.eccentricity=r,l})(r,l,u,d,h,c,p,g),v=b.centerX,m=b.centerY,y=b.majorAxis,S=b.minorAxis;let w,x;const C=-2*Math.PI*(p/360),D=2*Math.PI;if(0===C)w=Math.atan2(m-l,(r-v)/g),x=Math.atan2(m-d,(u-v)/g);else{const t=[{x:r,y:l},{x:h,y:c},{x:u,y:d}];!function(t,e,i){for(let n=0;n<i.length;n++){const s=i[n].x-t.x,a=i[n].y-t.y,o=Math.cos(e),r=Math.sin(e);i[n].x=s*o-a*r+t.x,i[n].y=s*r+a*o+t.y}}({x:v,y:m},-C,t),w=Math.atan2(m-t[0].y,(t[0].x-v)/g),x=Math.atan2(m-t[2].y,(t[2].x-v)/g)}x<w&&(x+=D);const T=((t,e,o,r,l,h,c,u,d)=>{const p=[];let g;g=u?(c-h)/(d-1):-(D-(c-h))/(d-1);let f=h;for(let b=0;b<d;b++){const h=o+t*Math.cos(f)*Math.cos(l)-e*Math.sin(f)*Math.sin(l),c=r+t*Math.cos(f)*Math.sin(-l)-e*Math.sin(f)*Math.cos(l);p.push(new Point$1(h*s+i,c*a+n)),f+=g}return p})(y,S,v,m,C,w,x,1===f,e);return LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints output",T),T}PrGetParabolaPoints(t,e,i,n,s,a,o){LogUtil.Debug("S.PolyLine: PrGetParabolaPoints input",{numPoints:t,isClosed:e,segmentIndex:i,param:n,shortRef:s,scaleX:a,scaleY:o});let r,l,h,c={},u=!1,d=[],p=[],g=this.StartPoint.x-this.Frame.x,f=this.StartPoint.y-this.Frame.y;if(e||(g=this.StartPoint.x,f=this.StartPoint.y),Math.abs(n)<1)return p.push(new Point$1(this.polylist.segs[i-1].pt.x*a+g,this.polylist.segs[i-1].pt.y*o+f)),p.push(new Point$1(this.polylist.segs[i].pt.x*a+g,this.polylist.segs[i].pt.y*o+f)),LogUtil.Debug("S.PolyLine: PrGetParabolaPoints output",p),p;if(d.push(new Point$1(this.polylist.segs[i-1].pt.x*a+g,this.polylist.segs[i-1].pt.y*o+f)),d.push(new Point$1(this.polylist.segs[i].pt.x*a+g,this.polylist.segs[i].pt.y*o+f)),r=d[1].x-d[0].x,l=d[1].y-d[0].y,h=Math.sqrt(r*r+l*l),h<1)return LogUtil.Debug("S.PolyLine: PrGetParabolaPoints output",p),p;if(Math.round(6*Math.abs(l))>=1){u=!0;const t=l/h,e=r/h;let i=Math.asin(t);e<0&&(i=-i,n=-n,s=-s),c.x=(d[0].x+d[1].x)/2,c.y=(d[0].y+d[1].y)/2,Utils3.RotatePointsAboutPoint(c,i,d)}d.push(new Point$1((d[0].x+d[1].x)/2,d[0].y+n));const b=d[2].x,v=d[2].y;for(let w=0;w<3;w++)d[w].x-=b,d[w].y-=v;c.x=(d[0].x+d[1].x)/2,c.y=(d[0].y+d[1].y)/2;const m=d[0].y/(d[0].x*d[0].x),y=s/n,S=(d[1].x-d[0].x)/(t-1);for(let w=0;w<t;w++){let t=d[0].x+S*w;t+=y*(n+m*t*t);let e=m*t*t;if(u){const i={x:t,y:e};Utils3.RotatePointsAboutPoint(c,-rotationAngle,[i]),t=i.x,e=i.y}p.push(new Point$1(t+b+g,e+v+f))}return LogUtil.Debug("S.PolyLine: PrGetParabolaPoints output",p),p}PrPolyLGetParabolaAdjPoint(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaAdjPoint input",{event:t,segmentIndex:e});let i,n,s,a,o,r={},l=!1,h=[],c={};if(h.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),h.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),i=h[1].x-h[0].x,n=h[1].y-h[0].y,s=Math.sqrt(i*i+n*n),s<1)return LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaAdjPoint output",c),c;if(a=this.polylist.segs[e].param,o=this.polylist.segs[e].ShortRef,Math.abs(n)>=1){l=!0;const t=n/s,e=i/s;let c=Math.asin(t);e<0&&(c=-c,a=-a,o=-o),r.x=(h[0].x+h[1].x)/2,r.y=(h[0].y+h[1].y)/2,Utils3.RotatePointsAboutPoint(r,c,h)}return h.push(new Point$1((h[0].x+h[1].x)/2+o,h[0].y+a)),l&&Utils3.RotatePointsAboutPoint(r,-rotationAngle,h),c.x=h[2].x,c.y=h[2].y,t||(c.x+=this.StartPoint.x,c.y+=this.StartPoint.y),LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaAdjPoint output",c),c}PrPolyLGetParabolaParam(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaParam input",{event:t,segmentIndex:e});let i,n,s,a,o={},r=1,l=[];if(l.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),l.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),i=l[1].x-l[0].x,n=l[1].y-l[0].y,s=Math.sqrt(i*i+n*n),s>=1){const h=t.x-this.StartPoint.x,c=t.y-this.StartPoint.y;l.push(new Point$1(h,c)),Math.abs(n)>=1?(a=Math.asin(n/s),i<0&&(a=-a,r=-r),o.x=(l[0].x+l[1].x)/2,o.y=(l[0].y+l[1].y)/2,Utils3.RotatePointsAboutPoint(o,a,l)):a=0;const u=(l[0].x+l[1].x)/2,d=l[0].y;this.polylist.segs[e].param=(l[2].y-d)*r,this.polylist.segs[e].ShortRef=(l[2].x-u)*r;let p=6*this.polylist.segs[e].ShortRef;p=Math.floor(p),this.polylist.segs[e].ShortRef=p/6}LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaParam output",{param:this.polylist.segs[e].param,ShortRef:this.polylist.segs[e].ShortRef})}PrPolyLGetArc(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetArc input",{segmentIndex:t,offset:e});let i,n,s={},a={},o={},r={arcObject:null,point:{x:0,y:0}};s.x=this.polylist.segs[t-1].pt.x+e.x,s.y=this.polylist.segs[t-1].pt.y+e.y,a.x=this.polylist.segs[t].pt.x+e.x,a.y=this.polylist.segs[t].pt.y+e.y,i=this.polylist.segs[t].param>=0?{StartPoint:s,EndPoint:a,CurveAdjust:this.polylist.segs[t].param,IsReversed:!0,FromPolygon:!0}:{StartPoint:s,EndPoint:a,CurveAdjust:-this.polylist.segs[t].param,IsReversed:!1,FromPolygon:!0};const l=new Instance.Shape.ArcLine(i);return l.Frame=Utils2.Pt2Rect(s,a),n=l.CalcRadiusAndCenter(s.x,s.y,a.x,a.y,i.CurveAdjust,i.IsReversed),o.x=n.actionX,o.y=n.actionY,l.BeforeModifyShape(o.x,o.y,0),r.arcObject=l,r.point=o,LogUtil.Debug("S.PolyLine: PrPolyLGetArc output",r),r}PrPolyLGetArcParam(t,e,i){LogUtil.Debug("S.PolyLine: PrPolyLGetArcParam input",{shape:t,targetPoint:e,segmentIndex:i}),t&&(t.ModifyShape(null,e.x,e.y,-1,0),t.IsReversed?this.polylist.segs[i].param=t.CurveAdjust:this.polylist.segs[i].param=-t.CurveAdjust),LogUtil.Debug("S.PolyLine: PrPolyLGetArcParam output",this.polylist.segs[i].param)}PrGetEllipsePoints(t,e,i,n,s,a,o){LogUtil.Debug("S.PolyLine: PrGetEllipsePoints input",{numPoints:t,isClosed:e,segmentIndex:i,rotationAngle:n,arcQuadrant:s,scaleX:a,scaleY:o});let r,l,h,c,u,d,p={},g=[],f=[],b={},v=this.StartPoint.x-this.Frame.x,m=this.StartPoint.y-this.Frame.y;if(g.push(new Point$1(this.polylist.segs[i-1].pt.x+v,this.polylist.segs[i-1].pt.y+m)),g.push(new Point$1(this.polylist.segs[i].pt.x+v,this.polylist.segs[i].pt.y+m)),r=g[1].x-g[0].x,l=g[1].y-g[0].y,h=Math.sqrt(r*r+l*l),p.x=this.polylist.segs[i-1].pt.x,p.y=this.polylist.segs[i-1].pt.y,e||(v=this.StartPoint.x,m=this.StartPoint.y),h<1)return f.push(new Point$1(this.polylist.segs[i-1].pt.x*a+v,this.polylist.segs[i-1].pt.y*o+m)),f.push(new Point$1(this.polylist.segs[i].pt.x*a+v,this.polylist.segs[i].pt.y*o+m)),LogUtil.Debug("S.PolyLine: PrGetEllipsePoints output",f),f;Math.abs(n)>=.01&&(c=Math.sin(n),u=Math.cos(n),d=Math.asin(c),Utils3.RotatePointsAboutPoint(p,d,g));let y,S,w=1;switch(s){case OptConstant.ArcQuad.PLA_TL:case OptConstant.ArcQuad.PLA_TR:y=g[1].x,S=g[0].y,w=-1;break;case OptConstant.ArcQuad.PLA_BR:default:y=g[1].x,S=g[0].y}for(let T=0;T<2;T++)g[T].x-=y,g[T].y-=S;let x=Math.abs(g[1].x-g[0].x),C=Math.abs(g[1].y-g[0].y);if(x*=x,x<1e-4)return f.push(new Point$1(this.polylist.segs[i-1].pt.x*a+v,this.polylist.segs[i-1].pt.y*o+m)),f.push(new Point$1(this.polylist.segs[i].pt.x*a+v,this.polylist.segs[i].pt.y*o+m)),LogUtil.Debug("S.PolyLine: PrGetEllipsePoints output",f),f;let D=(g[1].x-g[0].x)/(t-1);for(let T=0;T<t;T++){let t=g[0].x+D*T,e=w*Math.sqrt(1-t*t/x)*C;Math.abs(n)>=.01?(b.x=(t+y-p.x)*u-(e+S-p.y)*c+p.x,b.y=(t+y-p.x)*c+(e+S-p.y)*u+p.y):(b.x=t+y,b.y=e+S),f.push(new Point$1(b.x*a+v,b.y*o+m))}return LogUtil.Debug("S.PolyLine: PrGetEllipsePoints output",f),f}PrPolyLGetEllipseAdjPoint(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseAdjPoint input",{event:t,segmentIndex:e});let i,n,s,a=[],o={},r={};a.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),a.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),o.x=this.polylist.segs[e-1].pt.x,o.y=this.polylist.segs[e-1].pt.y;const l=this.polylist.segs[e].param;return Math.abs(l)>=.01&&(i=Math.sin(l),n=Math.cos(l),s=Math.asin(i),n<0&&(s=-s),Utils3.RotatePointsAboutPoint(o,s,a)),a.push(new Point$1(a[1].x,a[0].y)),Math.abs(l)>=.01&&Utils3.RotatePointsAboutPoint(o,-s,a),r.x=a[2].x,r.y=a[2].y,t||(r.x+=this.StartPoint.x,r.y+=this.StartPoint.y),LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseAdjPoint output",r),r}PrPolyLGetEllipseParam(t,e,i){LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseParam input",{event:t,segmentIndex:e,svgDocument:i});let n,s,a,o,r,l,h=[],c={},u={};if(h.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),h.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),n=h[1].x-h[0].x,s=h[1].y-h[0].y,Math.sqrt(n*n+s*s)>=1&&Math.abs(s)>1){const d=t.x-this.StartPoint.x,p=t.y-this.StartPoint.y;h.push(new Point$1(d,p)),s=h[2].y-h[0].y,n=h[2].x-h[0].x,Math.abs(n)<.001?o=NvConstant.Geometry.PI/2:(a=s/n,o=Math.atan(a)),this.polylist.segs[e].param=o,r=this.PrPolyLGetArcQuadrant(h[0],h[1],o),r.ShortRef!==this.polylist.segs[e].ShortRef&&(this.polylist.segs[e].ShortRef=r.ShortRef),l=this.PrPolyLGetEllipseAdjPoint(!0,e),h.pop(),h.splice(1,0,l),Utils2.GetPolyRect(c,h);const g=this.StartPoint.x-this.Frame.x,f=this.StartPoint.y-this.Frame.y,b=OptConstant.Common.EllipseAxes;if(u=i.GetElementById(b),u||(u=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polyline),u.SetFillColor("none"),u.SetStrokeColor("green"),u.SetStrokePattern("4,2"),u.SetID(b),i.AddElement(u)),u){u.SetSize(c.width,c.height);for(let t=0;t<h.length;t++)h[t].x+=g,h[t].y+=f;u.SetPoints(h)}}LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseParam output",{polyPoints:h,boundingRect:c,ellipseAxesElement:u})}PrPolyLGetArcQuadrant(t,e,i){LogUtil.Debug("S.PolyLine: PrPolyLGetArcQuadrant input",{startPoint:t,endPoint:e,angle:i});let n,s,a,o=[],r={param:0,ShortRef:0},l={};o.push(new Point$1(t.x,t.y)),o.push(new Point$1(e.x,e.y)),l.x=t.x,l.y=t.y,Math.abs(i)>=.01&&(n=Math.sin(i),s=Math.cos(i),a=Math.asin(n),s<0&&(a=-a),Utils3.RotatePointsAboutPoint(l,a,o));const h=o[0],c=o[1];return c.x>h.x?c.y>h.y?(r.param=-NvConstant.Geometry.PI/2,r.ShortRef=OptConstant.ArcQuad.PLA_BL,e.notclockwise&&(r.param=0)):(r.ShortRef=OptConstant.ArcQuad.PLA_TL,e.notclockwise&&(r.ShortRef=OptConstant.ArcQuad.PLA_TR,r.param=NvConstant.Geometry.PI/2)):c.y>h.y?(r.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,e.notclockwise&&(r.ShortRef=OptConstant.ArcQuad.PLA_BL,r.param=NvConstant.Geometry.PI/2)):(r.param=-NvConstant.Geometry.PI/2,r.ShortRef=OptConstant.ArcQuad.PLA_TR,e.notclockwise&&(r.param=0)),LogUtil.Debug("S.PolyLine: PrPolyLGetArcQuadrant output",r),r}NeedsAddLineThicknessToDimension(t,e){LogUtil.Debug("S.PolyLine: NeedsAddLineThicknessToDimension input",{event:t,target:e});const i=!!this.polylist.closed;return LogUtil.Debug("S.PolyLine: NeedsAddLineThicknessToDimension output",i),i}GetExteriorDimensionMeasurementLineThicknessAdjustment(t){LogUtil.Debug("S.PolyLine: GetExteriorDimensionMeasurementLineThicknessAdjustment input",{segmentIndex:t});let e=this.ConvToUnits(this.StyleRecord.Line.Thickness,T3Gv.docUtil.rulerConfig.originx);return e/=2,this.IsTerminalSegment(t)||(e*=2),LogUtil.Debug("S.PolyLine: GetExteriorDimensionMeasurementLineThicknessAdjustment output",e),e}CanUseStandOffDimensionLines(){LogUtil.Debug("S.PolyLine: CanUseStandOffDimensionLines input");const t=!(!this.polylist.closed&&(this.Dimensions&NvConstant.DimensionFlags.Total||this.Dimensions&NvConstant.DimensionFlags.EndPts));return LogUtil.Debug("S.PolyLine: CanUseStandOffDimensionLines output",t),t}GetDimensionTextForPoints(t,e){LogUtil.Debug("S.PolyLine: GetDimensionTextForPoints input",{startPoint:t,endPoint:e});let i=[],n=0,s=0,a=0,o=0,r=0;if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.Total){i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);for(let t=1;t<i.length;t++)s=Math.abs(i[t-1].x-i[t].x),a=Math.abs(i[t-1].y-i[t].y),n+=Math.sqrt(s*s+a*a)}else o=360-Utils1.CalcAngleFromPoints(t,e),r=2*Math.PI*(o/360),i.push(new Point$1(t.x,t.y)),i.push(new Point$1(e.x,e.y)),Utils3.RotatePointsAboutCenter(this.Frame,-r,i),n=Math.abs(i[0].x-i[1].x);const l=RulerUtil.GetLengthInRulerUnits(n);return LogUtil.Debug("S.PolyLine: GetDimensionTextForPoints output",l),l}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("S.PolyLine: UpdateSecondaryDimensions input",{event:t,target:e,additionalData:i});let n=[],s=0;const a=this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select;if((this.objecttype!==NvConstant.FNObjectTypes.FlWall||this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions||(a||i)&&this.UpdateHookedObjectDimensionLines(t,e,i))&&a&&this.Dimensions&NvConstant.DimensionFlags.ShowLineAngles&&this.polylist){n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),s=n.length;for(let i=1;i<s;i++)this.DrawDimensionAngle(t,e,i,n)}LogUtil.Debug("S.PolyLine: UpdateSecondaryDimensions output",{polyPoints:n,pointCount:s})}GetBoundingBoxesForSecondaryDimensions(){LogUtil.Debug("S.PolyLine: GetBoundingBoxesForSecondaryDimensions input");let t=super.GetBoundingBoxesForSecondaryDimensions();if(!(this.Dimensions&NvConstant.DimensionFlags.ShowLineAngles))return LogUtil.Debug("S.PolyLine: GetBoundingBoxesForSecondaryDimensions output",t),t;const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),i=e.length;for(let n=1;n<i;n++){const i=this.GetDimensionAngleInfo(n,e);i&&(i.text=null,t.push(i.textRect))}return LogUtil.Debug("S.PolyLine: GetBoundingBoxesForSecondaryDimensions output",t),t}GetAreaWidthAndHeightText(t){LogUtil.Debug("S.PolyLine: GetAreaWidthAndHeightText input",{polyPoints:t});let e,i,n,s,a,o="";return this.polylist&&this.polylist.closed&&T3Gv.opt.IsRectangularPolygon(t)&&(a=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(t[0],t[1]),a<Math.PI/4||a>1.5*Math.PI||a>.75*Math.PI&&a<1.25*Math.PI?(n=1,s=2):(n=2,s=1),e=Utils2.GetDistanceBetween2Points(t[n-1],t[n]),i=Utils2.GetDistanceBetween2Points(t[s-1],t[s]),o=RulerUtil.GetLengthInRulerUnits(i)+" x "+RulerUtil.GetLengthInRulerUnits(e)),LogUtil.Debug("S.PolyLine: GetAreaWidthAndHeightText output",o),o}SetSegmentAngle(t,e,i){LogUtil.Debug("S.PolyLine: SetSegmentAngle input",{event:t,segmentIndex:e,angle:i});let n,s,a=[],o=[],r=-1,l=0,h=0;if(e<=0||e>=this.polylist.segs.length)return void LogUtil.Debug("S.PolyLine: SetSegmentAngle output",!1);ObjectUtil$1.GetObjectPtr(this.BlockID,!0);const c=Utils1.DeepCopy(this);if(a.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),a.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),a[0].x+=this.StartPoint.x,a[1].x+=this.StartPoint.x,a[0].y+=this.StartPoint.y,a[1].y+=this.StartPoint.y,new Point$1(a[1].x,a[1].y),n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(a[0],a[1]),Utils3.RotatePointsAboutPoint(a[0],-n,a),this.Dimensions&NvConstant.DimensionFlags.InteriorAngles){if(o.push(new Point$1(a[0].x,a[0].y)),1===e){if(!this.polylist.closed)return void LogUtil.Debug("S.PolyLine: SetSegmentAngle output",!1);o.push(new Point$1(this.polylist.segs[this.polylist.segs.length-2].pt.x,this.polylist.segs[this.polylist.segs.length-2].pt.y))}else o.push(new Point$1(this.polylist.segs[e-2].pt.x,this.polylist.segs[e-2].pt.y));o[1].x+=this.StartPoint.x,o[1].y+=this.StartPoint.y,s=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(o[0],o[1]),Utils3.RotatePointsAboutPoint(a[0],s,a)}else s=0;let u=i/360*(2*Math.PI),d=n-s;d<0&&(d+=2*Math.PI),d>Math.PI&&(u=2*Math.PI-u),Utils3.RotatePointsAboutPoint(a[0],u,a),e===this.polylist.segs.length-1?(r=this.polylist.closed?OptConstant.ActionTriggerType.PolyEnd:OptConstant.ActionTriggerType.LineEnd,this.AdjustLineEnd(t,a[1].x,a[1].y,r)):0===e?this.AdjustLineStart(t,a[1].x,a[1].y,OptConstant.ActionTriggerType.LineStart):this.ModifyShape(t,a[1].x,a[1].y,OptConstant.ActionTriggerType.PolyNode,e),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let p=0;p<this.hooks.length;p++)OptCMUtil.SetLinkFlag(this.hooks[p].objid,DSConstant.LinkFlags.Move);if(T3Gv.opt.ActionTriggerData=e,HookUtil.MaintainLink(this.BlockID,this,c,OptConstant.ActionTriggerType.PolyNode),this.Frame.x<0||this.Frame.y<0){const t=this.Frame;t.x<0&&(l=-t.x,t.x+=l),t.y<0&&(h=-t.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(h+=OptConstant.Common.DimDefaultStandoff),t.y+=h),this.StartPoint.x+=l,this.StartPoint.y+=h,this.EndPoint.x+=l,this.EndPoint.y+=h,T3Gv.opt.SetObjectFrame(this.BlockID,t)}this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("S.PolyLine: SetSegmentAngle output",!0)}IsTextFrameOverlap(t,e){LogUtil.Debug("S.PolyLine: IsTextFrameOverlap input",{textFrame:t,rotationAngle:e});const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),n=360-e,s=2*Math.PI*(n/360);Utils3.RotatePointsAboutCenter(this.Frame,-s,i);const a=Utils2.IsFrameCornersInPoly(i,t);return LogUtil.Debug("S.PolyLine: IsTextFrameOverlap output",a),a}IsTerminalSegment(t){LogUtil.Debug("S.PolyLine: IsTerminalSegment input",{segmentIndex:t});const e=!this.polylist.closed&&(1===t||t===this.polylist.segs.length-1);return LogUtil.Debug("S.PolyLine: IsTerminalSegment output",e),e}UpdateDimensionFromTextObj(t,e){LogUtil.Debug("S.PolyLine: UpdateDimensionFromTextObj input",{event:t,textObject:e});let i="",n=null;T3Gv.stdObj.PreserveBlock(this.BlockID),e?(i=e.text,n=e.userData):(i=t.GetText(),n=t.GetUserData());const s=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.UpdateDimensionFromText(s,i,n),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let a=0;a<this.hooks.length;a++)OptCMUtil.SetLinkFlag(this.hooks[a].objid,DSConstant.LinkFlags.Move);(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&ObjectUtil$1.AddToDirtyList(this.BlockID),DrawUtil.CompleteOperation(),LogUtil.Debug("S.PolyLine: UpdateDimensionFromTextObj output",{text:i,userData:n})}UpdateEndPointDimensionFromText(t,e){LogUtil.Debug("S.PolyLine: UpdateEndPointDimensionFromText input",{event:t,dimensionLength:e});const i=[this.StartPoint,this.EndPoint];if(!this.closed){let t=Utils1.CalcAngleFromPoints(this.StartPoint,this.EndPoint);t=360-t;const n=2*Math.PI*(t/360);Utils3.RotatePointsAboutCenter(this.Frame,-n,i),i[1].x=i[0].x+e,Utils3.RotatePointsAboutCenter(this.Frame,n,i),this.AdjustLineEnd(null,i[1].x,i[1].y,OptConstant.ActionTriggerType.LineEnd)}LogUtil.Debug("S.PolyLine: UpdateEndPointDimensionFromText output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateTotalDimensionFromText(t,e){LogUtil.Debug("S.PolyLine: UpdateTotalDimensionFromText input",{event:t,dimensionLength:e});let i=0,n=0,s=0,a=0;const o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(let c=1;c<o.length;c++)n=Math.abs(o[c-1].x-o[c].x),s=Math.abs(o[c-1].y-o[c].y),a=Math.sqrt(n*n+s*s),i+=a;const r=e/i;let l=-(this.Frame.x*r-this.Frame.x);l-=(this.Frame.width*r-this.Frame.width)/2;let h=-(this.Frame.y*r-this.Frame.y);h-=(this.Frame.height*r-this.Frame.height)/2,this.ScaleObject(l,h,null,0,r,r,!1),LogUtil.Debug("S.PolyLine: UpdateTotalDimensionFromText output",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateSegmentDimensionFromText(t,e,i){let n,s,a,o,r,l,h,c,u,d;LogUtil.Debug("S.PolyLine: UpdateSegmentDimensionFromText input",{event:t,dimensionLength:e,segmentIndex:i});const p=new HitResult(-1,0,null);if(T3Gv.opt.ob=Utils1.DeepCopy(this),n=Utils1.CalcAngleFromPoints(this.polylist.segs[i-1].pt,this.polylist.segs[i].pt),this.polylist.segs[i-1].pt.x===this.polylist.segs[i].pt.x&&this.polylist.segs[i-1].pt.y===this.polylist.segs[i].pt.y){const t=1===i?2:i-1;n=Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),n=n+90>=360?n-270:n+90}s=360-n;const g=2*Math.PI*(s/360);a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),o=this.polylist.closed&&this instanceof Instance.Shape.PolyLineContainer?T3Gv.opt.InflateLine(a,this.StyleRecord.Line.BThick,this.polylist.closed,this.Dimensions&NvConstant.DimensionFlags.Exterior):Utils1.DeepCopy(a),o.forEach((t=>{t.x+=this.Frame.x,t.y+=this.Frame.y}));let f=i,b=i-1;if(!this.polylist.closed&&1===i&&o.length>2&&(f=0,b=1),r=o[f].x,l=o[f].y,Utils3.RotatePointsAboutCenter(this.Frame,-g,o),o[b].x=o[f].x<o[b].x?o[f].x+e:o[f].x-e,Utils3.RotatePointsAboutCenter(this.Frame,g,o),h=o[f].x,c=o[f].y,i===this.polylist.segs.length-1){if(this.AdjustLineEnd(null,h,c,this.polylist.closed?OptConstant.ActionTriggerType.PolyEnd:OptConstant.ActionTriggerType.LineEnd),!this.polylist.closed){const t=[{id:OptConstant.HookPts.KTR,x:h,y:c}];this.ClosePolygon(this.BlockID,t,p)&&(this.polylist.segs[this.polylist.segs.length-1].pt=Utils1.DeepCopy(this.polylist.segs[0].pt),this.polylist.closed=!0,this instanceof _PolyLine&&this.MaintainDimensionThroughPolygonOpennessChange(this.polylist.closed))}}else if(this.polylist.closed||1!==i)if(u=h-r,d=c-l,this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y){const t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y,n=this.Frame.width/t,s=this.Frame.height/e;this.polylist.segs[i].pt.x+=u*n,this.polylist.segs[i].pt.y+=d*s}else this.polylist.segs[i].pt.x+=u,this.polylist.segs[i].pt.y+=d;else{this.AdjustLineStart(null,h,c,OptConstant.ActionTriggerType.LineStart);const t=[{id:OptConstant.HookPts.KTL,x:h,y:c}];this.ClosePolygon(this.BlockID,t,p)&&(this.polylist.segs[0].pt=Utils1.DeepCopy(this.polylist.segs[this.polylist.segs.length-1].pt),this.polylist.closed=!0,this instanceof _PolyLine&&this.MaintainDimensionThroughPolygonOpennessChange(this.polylist.closed))}LogUtil.Debug("S.PolyLine: UpdateSegmentDimensionFromText output",{polylist:this.polylist,Frame:this.Frame})}UpdateDimensionFromText(t,e,i){LogUtil.Debug("S.PolyLine: UpdateDimensionFromText input",{event:t,dimensionText:e,dimensionData:i});let n=-1,s=0,a=0;if(i.angleChange)return void this.UpdateLineAngleDimensionFromText(t,e,i);const o=i.segment;SvgUtil.ShowSVGSelectionState(this.BlockID,!1);const r=this.GetDimensionValueFromString(e,o);if(r>=0&&(n=this.GetDimensionLengthFromValue(r)),n<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),void SvgUtil.RenderDirtySVGObjects();const l=Utils1.DeepCopy(this);if(!(this.Dimensions&NvConstant.DimensionFlags.AllSeg)&&(this.Dimensions&NvConstant.DimensionFlags.EndPts||this.Dimensions&NvConstant.DimensionFlags.Total))this.Dimensions&NvConstant.DimensionFlags.EndPts?this.UpdateEndPointDimensionFromText(t,n):this.Dimensions&NvConstant.DimensionFlags.Total&&this.UpdateTotalDimensionFromText(t,n);else{this.UpdateSegmentDimensionFromText(t,n,o);const e={wdDim:-1,htDim:-1};this.GetPolyRectangularInfo(e)?o===e.wdDim||o===e.wdDim+2?(this.rwd=r,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0)):o!==e.htDim&&o!==e.htDim+2||(this.rht=r,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!0)):(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1))}OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let h=0;h<this.hooks.length;h++)OptCMUtil.SetLinkFlag(this.hooks[h].objid,DSConstant.LinkFlags.Move);if(T3Gv.opt.ActionTriggerData=o,HookUtil.MaintainLink(this.BlockID,this,l,OptConstant.ActionTriggerType.PolyNode),this.Frame.x<0||this.Frame.y<0){const t=this.Frame;t.x<0&&(s=-t.x,t.x+=s),t.y<0&&(a=-t.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(a+=OptConstant.Common.DimDefaultStandoff),t.y+=a),this.StartPoint.x+=s,this.StartPoint.y+=a,this.EndPoint.x+=s,this.EndPoint.y+=a,T3Gv.opt.SetObjectFrame(this.BlockID,t)}this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("S.PolyLine: UpdateDimensionFromText output",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint})}GetLineChangeFrame(){LogUtil.Debug("S.PolyLine: GetLineChangeFrame input");let t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);return t.width<OptConstant.Common.SegDefLen&&(t.width=OptConstant.Common.SegDefLen),t.height<OptConstant.Common.SegDefLen&&(t.height=OptConstant.Common.SegDefLen),LogUtil.Debug("S.PolyLine: GetLineChangeFrame output",t),t}CancelObjectDraw(){return LogUtil.Debug("S.PolyLine: CancelObjectDraw input"),LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.WorkAreaHammer.off("doubletap"),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects(),SelectUtil.SelectObjects([this.BlockID],!1,!0),LogUtil.Debug("S.PolyLine: CancelObjectDraw output",!0),!0}GetBoundingBox(){LogUtil.Debug("S.PolyLine: GetBoundingBox input");const t=this.Frame;return LogUtil.Debug("S.PolyLine: GetBoundingBox output",t),t}IsRightAngle(t,e){LogUtil.Debug("S.PolyLine: IsRightAngle input",{segmentIndex:t,tolerance:e});let i=t-1;if(i<0){if(!this.polylist.closed)return LogUtil.Debug("S.PolyLine: IsRightAngle output",!1),!1;i=this.polylist.segs.length-1}let n=t+1;if(n>this.polylist.segs.length-1){if(!this.polylist.closed)return LogUtil.Debug("S.PolyLine: IsRightAngle output",!1),!1;n=1}const s=Utils1.CalcAngleFromPoints(this.polylist.segs[i].pt,this.polylist.segs[t].pt),a=Utils1.CalcAngleFromPoints(this.polylist.segs[t].pt,this.polylist.segs[n].pt),o=Math.abs(s-a),r=Math.abs(90-o)<=e||Math.abs(270-o)<=e;return LogUtil.Debug("S.PolyLine: IsRightAngle output",r),r}GetPolyRectangularInfo(t){LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo input:",t);let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),i=!0;if(5!==this.polylist.segs.length||!this.polylist.closed)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;let n=[];const s=e.length;for(let p=0;p<s;p++)p<s-1&&e[p].x===e[p+1].x&&e[p].y===e[p+1].y||n.push(e[p]);if(e=n,5!==e.length)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;let a=0;for(let p=0;p<e.length-1&&i;p++){let t=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(e[p],e[p+1]);if(p>0){let e=t-a;e<0&&(e+=2*Math.PI),e>Math.PI&&(e-=Math.PI),e>=Math.PI/2-.052&&e<=Math.PI/2+.052||(i=!1)}a=t}let o=Utils2.GetDistanceBetween2Points(e[0],e[1]),r=Utils2.GetDistanceBetween2Points(e[2],e[3]),l=o/r;if(l<=.99||l>=1.01)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;o=Utils2.GetDistanceBetween2Points(e[1],e[2]),r=Utils2.GetDistanceBetween2Points(e[3],e[4]);let h=o/r;if(h<=.99||h>=1.01)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;let c,u,d=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(e[0],e[1]);return d<Math.PI/4||d>1.5*Math.PI||d>.75*Math.PI&&d<1.25*Math.PI?(c=1,u=2):(c=2,u=1),t&&(t.wdDim=c,t.htDim=u),LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!0),!0}GetSegmentsBeforeAndAfter(t,e){LogUtil.Debug("S.PolyLine: GetSegmentsBeforeAndAfter input:",{segmentIndex:t,segmentsInfo:e}),e.segAfter=t+1,e.segAfter>=this.polylist.segs.length&&(e.segAfter=this.polylist.closed?1:-1),e.segBefore=t-1,0===e.segBefore&&(e.segBefore=this.polylist.closed?this.polylist.segs.length-1:-1),LogUtil.Debug("S.PolyLine: GetSegmentsBeforeAndAfter output:",e)}MaintainDimensionThroughPolygonOpennessChange(t){LogUtil.Debug("S.PolyLine: MaintainDimensionThroughPolygonOpennessChange input:",t),t&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total|NvConstant.DimensionFlags.EndPts,!1),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,!0)),LogUtil.Debug("S.PolyLine: MaintainDimensionThroughPolygonOpennessChange output:",this.Dimensions)}GetUnrotatedBoundingBoxOfProposedFrame(t){LogUtil.Debug("S.PolyLine: GetUnrotatedBoundingBoxOfProposedFrame input:",t);let e=Utils1.DeepCopy(t),i=this.GetDimensionsRect(),n=0,s=0;return i.width>0?(n=i.width-this.Frame.width,s=i.height-this.Frame.height):this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness>OptConstant.Common.KnobSize?(n=this.StyleRecord.Line.Thickness,s=this.StyleRecord.Line.Thickness):(n=OptConstant.Common.KnobSize,s=OptConstant.Common.KnobSize),Utils2.InflateRect(e,n/2,s/2),LogUtil.Debug("S.PolyLine: GetUnrotatedBoundingBoxOfProposedFrame output:",e),e}AdjustPolySeg(t,e,i,n,s,a,o,r,l){LogUtil.Debug("S.PolyLine: AdjustPolylineSegment input:",{event:t,initialX:e,initialY:i,newPointX:n,newPointY:s,moveData:a,offsetEnabled:o,minDistance:r,maxDistance:l});let h=Utils1.DeepCopy(this.polylist),c=Utils1.DeepCopy(this.Frame),u=Utils1.DeepCopy(this.StartPoint),d=Utils1.DeepCopy(this.EndPoint);const p=this.GetUnrotatedBoundingBoxOfProposedFrame(this.Frame),g=p.x<0||p.y<0;let f=[];const b={x:e,y:i},v={x:n,y:s};f.push(b),f.push(v);let m=a.moveAngle;const y=a.hitSegment;9999===m&&(m=this.GetSegmentAdjustAngle(y),a.moveAngle=m),m=360-m;const S=2*Math.PI*m/360;let w=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);const x=w[y].x,C=w[y].y;if(Utils3.RotatePointsAboutCenter(this.Frame,-S,w),Utils3.RotatePointsAboutCenter(this.Frame,-S,f),Math.abs(f[1].x-f[0].x)<r)return LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output: false (<minDistance)"),!1;if(l&&l>0&&Math.abs(f[1].x-f[0].x)>l)return LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output: false (>maxDistance)"),!1;if(isNaN(f[1].x-f[0].x))return LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output: false (NaN difference)"),!1;const D=f[1].x-f[0].x;w[y-1].x+=D,w[y].x+=D,Utils3.RotatePointsAboutCenter(this.Frame,S,w);const T=w[y].x-x,k=w[y].y-C,$=this.GetScale();if(y-1!=0){const t={x:this.polylist.segs[y-1].pt.x+T/$.x,y:this.polylist.segs[y-1].pt.y+k/$.y};this.polylist.segs[y-1].pt=Utils1.DeepCopy(t)}if(y!==this.polylist.segs.length-1){const t={x:this.polylist.segs[y].pt.x+T/$.x,y:this.polylist.segs[y].pt.y+k/$.y};this.polylist.segs[y].pt=Utils1.DeepCopy(t)}const O=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let P=!1;y-1==0&&(this.AdjustLineStart(O,w[y-1].x,w[y-1].y,OptConstant.ActionTriggerType.LineStart),P=!0),y===this.polylist.segs.length-1&&(this.AdjustLineEnd(O,w[y].x,w[y].y,this.polylist.closed?OptConstant.ActionTriggerType.PolyEnd:OptConstant.ActionTriggerType.LineEnd),P=!0),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),P?this.CalcFrame():(this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame));const L=this.GetUnrotatedBoundingBoxOfProposedFrame(this.Frame);if(!g&&(L.x<0||L.y<0))if(o){let e={x:0,y:0};L.x<0&&(e.x=-L.x),L.y<0&&(e.y=-L.y),this.OffsetShape(e.x,e.y);const i=this.GetListOfEnclosedObjects(!1);for(let t=0;t<i.length;t++)ObjectUtil$1.GetObjectPtr(i[t],!0).OffsetShape(e.x,e.y),OptCMUtil.SetLinkFlag(i[t],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(i[t]);this.UpdateDrawing(t)}else this.polylist=Utils1.DeepCopy(h),this.Frame=Utils1.DeepCopy(c),this.StartPoint=Utils1.DeepCopy(u),this.EndPoint=Utils1.DeepCopy(d),this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame);const G=this.GetDimensionsForDisplay(),F=new SelectionAttr;return F.width=G.width,F.height=G.height,F.left=G.x,F.top=G.y,UIUtil.UpdateDisplayCoordinates(G,v,CursorConstant.CursorTypes.Grow,this),LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output:",{polylist:this.polylist,Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint}),!0}GetSegmentAdjustAngle(t){LogUtil.Debug("S.PolyLine: GetSegmentAdjustAngle input:",t);let e=9999,i={segBefore:0,segAfter:0},n=0;if(this.polylist.segs.length<=5){this.GetSegmentsBeforeAndAfter(t,i);let s=i.segAfter;if(n=i.segBefore,-1!=n&&(this.GetSegmentsBeforeAndAfter(n,i),-1!=i.segBefore&&this.IsRightAngle(i.segBefore,3)&&(e=Utils1.CalcAngleFromPoints(this.polylist.segs[n-1].pt,this.polylist.segs[n].pt))),9999===e&&-1!=s&&this.IsRightAngle(s,3)&&(e=Utils1.CalcAngleFromPoints(this.polylist.segs[s-1].pt,this.polylist.segs[s].pt)),9999!==e){((t,e)=>{let i=90-t;return t+=i,(e+=i)>=360&&(e-=360),e<0&&(e+=360),Math.abs(90-e)<5||Math.abs(180-e)<5})(Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),e)&&(e=9999)}}return 9999===e&&(e=Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),e+=90,e>=360&&(e-=360)),LogUtil.Debug("S.PolyLine: GetSegmentAdjustAngle output:",e),e}};let PolyLine$1=_PolyLine;__decorateClass$3([Type((()=>PolyList))],PolyLine$1.prototype,"polylist",2);class PolyLineContainer extends PolyLine$1{constructor(t){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t),(t=t||{}).Dimensions=void 0===t.Dimensions?NvConstant.DimensionFlags.Always:t.Dimensions,t.objecttype=void 0===t.objecttype?NvConstant.FNObjectTypes.FlWall:t.objecttype,t.TextFlags=void 0===t.TextFlags?0:t.TextFlags,t.TextFlags=Utils2.SetFlag(t.TextFlags,NvConstant.TextFlags.None,!0),super(t),__publicField(this,"T3Type"),this.T3Type="PolyLineContainer",null!==this.StyleRecord&&void 0!==this.StyleRecord||(this.StyleRecord=new QuickStyle),LogUtil.Debug("= S.PolyLineContainer: Output instance:",this)}CreateShape(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e);const i=super.CreateShape(t,e);return LogUtil.Debug("= S.PolyLineContainer: Output result:",i),i}NoRotate(){LogUtil.Debug("= S.PolyLineContainer: Checking if rotation is allowed");const t=this.polylist.closed;return LogUtil.Debug("= S.PolyLineContainer: Rotation allowed:",t),!t}GetKnobSize(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t);const e=1*OptConstant.Common.KnobSize/1*2;return LogUtil.Debug("= S.PolyLineContainer: Output knobSize:",e),e}GetCornerKnobImages(){LogUtil.Debug("= S.PolyLineContainer: Fetching corner knob images");const t={nwse:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft,nesw:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight};return LogUtil.Debug("= S.PolyLineContainer: Corner knob images:",t),t}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n);let s,a=0,o=0,r=null,l=null,h=0;const c=-1!=navigator.userAgent.toLowerCase().indexOf("firefox");if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&(wallOpt&&wallOpt.IsAddingWalls&&wallOpt.IsAddingWalls()||T3Constant.DocContext.UsingWallTool))return null;a=this.GetKnobSize(t);let u=t.docInfo.docToScreenScale;if(t.docInfo.docScale<=.5&&(u*=2),a/=u,!(l=super.CreateActionTriggers.call(this,t,e,i,n)))return null;h=a/2;const d={svgDoc:t,shapeType:OptConstant.CSType.Image,knobSize:a,fillOpacity:1,strokeSize:0,knobID:OptConstant.ActionTriggerType.MovePolySeg,cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};if(this.flags&NvConstant.ObjFlags.Lock?(d.fillColor="gray",d.locked=!0):this.NoGrow()&&(d.fillColor="red",d.strokeColor="red",d.cursorType=CursorConstant.CursorType.Default),0!==(s=this.polylist.segs.length)){if(s>2&&0==(this.flags&NvConstant.ObjFlags.Lock))for(let t=1;t<s;t++){switch(d.cursorType=this.CalcCursorForAngle(this.GetSegmentAdjustAngle(t)),this.NoGrow()&&(d.cursorType=CursorConstant.CursorType.Default),this.polylist.segs[t].LineType){case OptConstant.LineType.LINE:d.x=this.polylist.segs[t-1].pt.x+(this.polylist.segs[t].pt.x-this.polylist.segs[t-1].pt.x)/2+h+(this.StartPoint.x-this.Frame.x),d.y=this.polylist.segs[t-1].pt.y+(this.polylist.segs[t].pt.y-this.polylist.segs[t-1].pt.y)/2+h+(this.StartPoint.y-this.Frame.y),d.x-=a/2,d.y-=a/2;break;case OptConstant.LineType.ARCLINE:case OptConstant.LineType.PARABOLA:case OptConstant.LineType.ARCSEGLINE:const e=l.GetElementById(OptConstant.ActionTriggerType.PolyAdj,t);if(e){const i=e.GetPos(),n=[new Point$1(this.polylist.segs[t-1].pt.x,this.polylist.segs[t-1].pt.y),i,new Point$1(this.polylist.segs[t].pt.x,this.polylist.segs[t].pt.y)];o=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(n[0],n[2]),Utils3.RotatePointsAboutPoint(n[1],-o,n);const s=new Point$1(n[1].x,n[1].y),a=e.GetGeometryBBox();s.x+=a.width+3,n.push(s),Utils3.RotatePointsAboutPoint(n[1],o,n),d.x=n[3].x,d.y=n[3].y}}r=this.GenericKnob(d),r.SetUserData({hitSegment:t,moveAngle:9999}),r&&r.SetURL&&(r.SetURL(CursorConstant.Knob.Path+CursorConstant.Knob.ExpandVert),r.ExcludeFromExport(!0)),o=Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),0!==o&&(c?(o>=45&&o<=135||o>=235&&o<315)&&r&&r.SetURL&&r.SetURL(CursorConstant.Knob.Path+CursorConstant.Knob.ExpandHoriz):r.SetRotation(o)),l.AddElement(r)}return LogUtil.Debug("= S.PolyLineContainer: Output actionTriggers:",l),l}}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n);const s=super.PostCreateShapeCallback(t,e,i,n);return LogUtil.Debug("= S.PolyLineContainer: Output result:",s),s}UpdateSVG(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e);const i=t.PathCreator();if(i.BeginPath(),e.length>1){i.MoveTo(e[0].x,e[0].y);for(let t=1;t<e.length;t++)i.LineTo(e[t].x,e[t].y)}this.polylist.closed&&i.ClosePath(),i.Apply(),LogUtil.Debug("= S.PolyLineContainer: Updated SVG path")}MostlyContains(t){LogUtil.Debug("= S.PolyLineContainer: Input shape:",t);let e=0,i=!1;const n={},s=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1);if(LayerUtil.ActiveVisibleZList().indexOf(t.BlockID)<0)return!1;0!==t.RotationAngle&&(e=-t.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(t.Frame,e,s));const a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1),o=s.length;for(let h=0;h<o;h++)if(PolyUtil.PolyPtInPolygon(a,s[h])){i=!0;break}if(!i)return!1;if(!Utils2.GetPolyRect(n,s))return!1;0===n.width&&(n.width=1),0===n.height&&(n.height=1);const r=Utils2.IntersectRect(this.Frame,n),l=!!r&&r.width*r.height>n.width*n.height*.75;return LogUtil.Debug("= S.PolyLineContainer: Output result:",l),l}InterceptMoveOperation(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t);let e,i=[],n=LayerUtil.ZList(),s=!1;try{if(e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget),!e)return!1;const a=e.GetTargetForEvent(t).GetID(),o=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);if(a===OptConstant.SVGElementClass.DimText)return!0;if(-1===this.PolyHitSeg(o)&&(s=!0),s){SelectUtil.ClearSelectionClick(),i.push(this.BlockID);for(let t=0;t<n.length;t++){const e=ObjectUtil$1.GetObjectPtr(n[t],!1);this.BlockID===e.BlockID||e.hooks.length||this.MostlyContains(e)&&i.push(e.BlockID)}return SelectUtil.SelectObjects(i,!1,!1),T3Gv.opt.postMoveSelectId=this.BlockID,SvgUtil.HideAllSVGSelectionStates(),LogUtil.Debug("= S.PolyLineContainer: Output selectedObjects:",i),!1}return!1}catch(a){throw this.LMActionClickExpCleanup(a),T3Gv.opt.ExceptionCleanup(a),a}}SetupInterceptMove(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t),T3Gv.opt.eventTimestamp=Date.now(),t.stopPropagation();const e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(null===e)return!1;const i=e.ID;T3Gv.opt.actionStoredObjectId=i,T3Gv.stdObj.PreserveBlock(i);const n=OptConstant.ActionTriggerType.MovePolySeg;T3Gv.opt.actionTriggerId=n,this.LMActionPreTrack(i,n),T3Gv.opt.actionSvgObject=e;let s=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);s=DrawUtil.DoAutoGrowDrag(s);const a=new HitResult(-1,0,null);this.Hit(s,!1,!1,a),T3Gv.opt.actionTriggerData={hitSegment:a.segment+1,moveAngle:9999};const o=s.x,r=s.y,l=this.GetSVGFrame();T3Gv.opt.actionBBox=Utils1.DeepCopy(l),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(l),SvgUtil.HideAllSVGSelectionStates(),T3Gv.opt.actionStartX=o,T3Gv.opt.actionStartY=r;const h=new HitResult(-1,0,null);return this.Hit(s,!1,!1,h),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0),!0}Inflate(t,e,i){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i);const n={},s=[],a=Utils1.DeepCopy(t);function o(t,e){const i=t.x-e.x,n=t.y-e.y;return Utils2.Sqrt(i*i+n*n)}function r(t,e,i){for(let n=e+1;n<t.length;n++)if(o(t[e],t[n])>1e-5)return n;return i&&e===t.length-1&&o(t[e],t[1])>1e-5?1:-1}function l(t,e){for(let i=e-1;i>=0;i--)if(o(t[e],t[i])>1e-5)return i;return-1}function h(t,e,i,n){const s=360-Utils1.CalcAngleFromPoints(e,i),a=2*Math.PI*(s/360),o=[{x:e.x,y:e.y},{x:i.x,y:i.y}];return Utils3.RotatePointsAboutCenter(t,-a,o),o[0].y+=n,o[1].y+=n,Utils3.RotatePointsAboutCenter(t,a,o),o}function c(t,e){const i={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2},n=360-Utils1.CalcAngleFromPoints(t[0],t[1]),s=2*Math.PI*(n/360);Utils3.RotatePointsAboutPoint(i,-s,t);const a=Math.abs(e);t[0].x<t[1].x?(t[0].x-=a,t[1].x+=a):(t[0].x+=a,t[1].x-=a),Utils3.RotatePointsAboutPoint(i,s,t)}function u(t,e,i,n){const s=360-Utils1.CalcAngleFromPoints(t[i],t[e]);return 360-Utils1.CalcAngleFromPoints(t[i],t[n])-s}Utils2.GetPolyRect(n,t);for(let d=0;d<t.length;d++){const t=l(a,d),o=r(a,d,i),p=t>=0?h(n,a[t],a[d],e):[],g=o>=0?h(n,a[d],a[o],e):[],f=[];if(t>=0&&o>=0){let i=u(a,t,d,o);if(i<0&&(i+=360),i>=30&&i<=330){const t={x:0,y:0};T3Gv.opt.GetIntersectPt(p[0],p[1],g[0],g[1],null,t)&&f.push(new Point$1(t.x,t.y))}else c(p,e),f.push(new Point$1(p[1].x,p[1].y)),c(g,e),f.push(new Point$1(g[0].x,g[0].y))}0===f.length&&(t>=0?f.push(new Point$1(p[1].x,p[1].y)):o>=0&&f.push(new Point$1(g[0].x,g[0].y))),s.push(...f)}return i&&s.length>0&&(s[0]=s[s.length-1]),LogUtil.Debug("= S.PolyLineContainer: Output inflatedPoints:",s),s}InflatePolyLine(t,e,i){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i);let n=this.Inflate(t,-e,i);return Utils2.IsPointInPoly(t,n[1])&&(n=this.Inflate(t,e,i)),LogUtil.Debug("= S.PolyLineContainer: Output inflatedPoints:",n),n}MovePolySeg(t,e,i,n,s){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n,s);const a=this.AdjustPolySeg(t,T3Gv.opt.actionStartX,T3Gv.opt.actionStartY,e,i,s,!1,2,1e3);a&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1),T3Gv.opt.actionStartX=e,T3Gv.opt.actionStartY=i),LogUtil.Debug("= S.PolyLineContainer: Output adjusted:",a)}AfterModifyShape(t,e){if(LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e),e===OptConstant.ActionTriggerType.MovePolySeg){(t=>{let e=0,i=-1,n=!1;const s=this.StyleRecord.Line.Thickness;let a=T3Gv.opt.actionTriggerData.moveAngle;const o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),r=o.length;if(0!==a){a=360-a;const t=2*Math.PI*(a/360);Utils3.RotatePointsAboutCenter(this.Frame,-t,o)}const l=o[t].x;if(this.polylist.closed){let t=!0;for(let e=0;e<r;e++)if(!Utils2.IsEqual(o[e].x,l,s)){t=!1;break}if(t)return}for(let c=t+1;c<r&&Utils2.IsEqual(o[c].x,l,s);c++)e++;let h=!0;if(0===e&&1===t&&Utils2.IsEqual(o[r-1].x,l,s)&&Utils2.IsEqual(o[r-2].x,l,s)&&(t=r-2,e=1,Utils2.IsEqual(o[0].y,o[r-2].y,s)||(h=!1)),e>0&&h&&(this.polylist.segs.splice(t,e),n=!0,t+1+e>=r&&1===e&&this.polylist.closed&&Utils2.IsEqual(o[0].x,l,s))){this.polylist.segs.splice(0,1);const t=this.polylist.segs[0].pt.x+this.StartPoint.x,e=this.polylist.segs[0].pt.y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,t,e,OptConstant.ActionTriggerType.LineStart)}for(let c=t-2;c>0&&Utils2.IsEqual(o[c].x,l,s);c--)i=c;if(!this.polylist.closed&&t===r-1&&3===r&&i<0&&Utils2.IsEqual(o[0].x,l,s)&&(i=0),this.polylist.closed&&1===i?Utils2.IsEqual(o[0].x,l,s)&&(i=0):1===i&&this.polylist.segs.length>2&&Utils2.IsEqual(o[0].x,l,s)&&(i=0),i>=0&&(this.polylist.segs.splice(i+1,t-1-i),n=!0),this.polylist.closed&&0===e&&i<0&&(t===r-1||t<=2)){const e=o[2].x;let i=!0;if(2!==t||Utils2.IsEqual(o[1].y,o[0].y,s)||(i=!1),Utils2.IsEqual(o[1].x,e,s)&&Utils2.IsEqual(o[0].x,e,s)&&i){this.polylist.segs.splice(0,2),n=!0;const t=this.polylist.segs[0].pt.x+this.StartPoint.x,e=this.polylist.segs[0].pt.y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,t,e,OptConstant.ActionTriggerType.LineStart)}else if(t===r-1){const e=o[t].x;if(Utils2.IsEqual(o[1].x,e,s)&&Utils2.IsEqual(o[0].x,e,s)){this.polylist.segs.splice(0,1),n=!0;const t=this.polylist.segs[0].pt.x+this.StartPoint.x,e=this.polylist.segs[0].pt.y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,t,e,OptConstant.ActionTriggerType.LineStart)}}else 2===t&&Utils2.IsEqual(o[1].x,e,s)&&Utils2.IsEqual(o[0].x,e,s)&&(this.polylist.segs.splice(1,1),n=!0)}n&&ObjectUtil$1.AddToDirtyList(this.BlockID)})(T3Gv.opt.actionTriggerData.hitSegment)}this.BaseLineAfterModifyShape(t,e),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}BaseLineAfterModifyShape(t,e){if(LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e),T3Gv.opt.actionSvgObject){const t=T3Gv.opt.actionSvgObject.GetElementById(OptConstant.Common.EllipseAxes);null!=t&&T3Gv.opt.actionSvgObject.RemoveElement(t)}T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(t,this,T3Gv.opt.ob,e),T3Gv.opt.ob={}),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),this.arcobj&&(this.arcobj=null),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}UpdateDimensionFromText(t,e,i){let n,s,a,o,r,l,h,c,u;LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i);let d={hitSegment:0,moveAngle:0},p=Utils1.DeepCopy(this),g=this.polylist.closed,f=!1,b=-1;if(i.hookedObjectInfo)return this.UpdateDimensionsFromTextForHookedObject(t,e,i);if(i.angleChange)return this.UpdateLineAngleDimensionFromText(t,e,i);if(a=i.segment,T3Gv.opt.ob=p,ObjectUtil$1.GetObjectPtr(this.BlockID,!0),SvgUtil.ShowSVGSelectionState(this.BlockID,!1),n=this.GetDimensionValueFromString(e,a),n>=0&&(s=this.GetDimensionLengthFromValue(n)),s<=0||n<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),void SvgUtil.RenderDirtySVGObjects();d.hitSegment=a+1,d.hitSegment>=this.polylist.segs.length&&(d.hitSegment=g?1:a,f=!g),g||1!==a&&a!==this.polylist.segs.length-1||(d.hitSegment=a,f=!0),d.moveAngle=this.GetSegmentAdjustAngle(d.hitSegment),l=360-d.moveAngle,h=2*Math.PI*(l/360),o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),r=g&&this instanceof PolyLineContainer?T3Gv.opt.InflateLine(o,this.StyleRecord.Line.BThick,g,this.Dimensions&NvConstant.DimensionFlags.Exterior):Utils1.DeepCopy(o);for(let x=0;x<r.length;x++)r[x].x+=this.Frame.x,r[x].y+=this.Frame.y;c=r[a].x,u=r[a].y,Utils3.RotatePointsAboutCenter(this.Frame,-h,r);let v=Math.abs(r[a].y-r[a-1].y);if(Math.abs(s)<=v||f)return this.Dimensions&NvConstant.DimensionFlags.AllSeg||(b=this.Dimensions,this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,!0),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total,!1),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.EndPts,!1)),super.UpdateDimensionFromText(t,e,i),void(b>0&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,b&NvConstant.DimensionFlags.AllSeg),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total,b&NvConstant.DimensionFlags.Total),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.EndPts,b&NvConstant.DimensionFlags.EndPts)));let m=0===v?s:Math.sqrt(Math.pow(s,2)-Math.pow(v,2));r[a].x=r[a].x>r[a-1].x?r[a-1].x+m:r[a-1].x-m,Utils3.RotatePointsAboutCenter(this.Frame,h,r);let y=r[a].x,S=r[a].y;this.AdjustPolySeg(t,c,u,y,S,d,!0,0),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let x=0;x<this.hooks.length;x++)OptCMUtil.SetLinkFlag(this.hooks[x].objid,DSConstant.LinkFlags.Move);T3Gv.opt.ActionTriggerData=a,HookUtil.MaintainLink(this.BlockID,this,p,OptConstant.ActionTriggerType.PolyNode);let w={wdDim:-1,htDim:-1};if(this.GetPolyRectangularInfo(w)?a===w.wdDim||a===w.wdDim+2?(this.rwd=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0)):a!==w.htDim&&a!==w.htDim+2||(this.rht=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!0)):(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),this.Frame.x<0||this.Frame.y<0){let t={x:0,y:0};this.Frame.x<0&&(t.x=-this.Frame.x,this.Frame.x+=t.x),this.Frame.y<0&&(t.y=-this.Frame.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(t.y+=OptConstant.Common.DimDefaultStandoff),this.Frame.y+=t.y),this.StartPoint.x+=t.x,this.StartPoint.y+=t.y,this.EndPoint.x+=t.x,this.EndPoint.y+=t.y,T3Gv.opt.SetObjectFrame(this.BlockID,this.Frame)}this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}GetDimensionsForDisplay(){if(LogUtil.Debug("= S.PolyLineContainer: Getting dimensions for display"),this.objecttype!==NvConstant.FNObjectTypes.FlWall){const t=this.BaseLineGetDimensions();return LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",t),t}const t=this.GetDimensionPoints(),e={};Utils2.GetPolyRect(e,t);const i={x:e.x,y:e.y,width:e.width,height:e.height};return LogUtil.Debug("= S.PolyLineContainer: Output result:",i),i}BaseLineGetDimensions(){LogUtil.Debug("= S.PolyLineContainer: Getting base line dimensions");let t=this.EndPoint.x-this.StartPoint.x,e=this.EndPoint.y-this.StartPoint.y,i={x:Utils2.Sqrt(t*t+e*e),y:0};return LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",i),i}CanSnapToShapes(t){let e;return LogUtil.Debug("= S.PolyLineContainer: Input shape:",t),t&&!this.polylist.closed?(t.distanceonly=NvConstant.GuideDistanceTypes.PolyWall,e=this.BlockID):e=this.BlockID,LogUtil.Debug("= S.PolyLineContainer: Output result:",e),e}IsSnapTarget(){LogUtil.Debug("= S.PolyLineContainer: Checking if it is a snap target");return LogUtil.Debug("= S.PolyLineContainer: Output result:",false),false}GuideDistanceOnly(){LogUtil.Debug("= S.PolyLineContainer: Checking guide distance type");const t=this.polylist.closed?NvConstant.GuideDistanceTypes.Room:NvConstant.GuideDistanceTypes.PolyWall;return LogUtil.Debug("= S.PolyLineContainer: Output guide distance type:",t),t}SetCursors(){LogUtil.Debug("= S.PolyLineContainer: Setting cursors");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(T3Gv.opt.crtOpt===OptConstant.OptTypes.AddCorner){const e=t.GetElementById(OptConstant.SVGElementClass.Slop);e&&e.SetCursor(CursorConstant.CursorType.Cross)}else this.BaseShapeSetCursors();LogUtil.Debug("= S.PolyLineContainer: Cursors set")}BaseShapeSetCursors(){LogUtil.Debug("= S.PolyLineContainer: Setting cursors");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),e=(this.TextFlags&NvConstant.TextFlags.OneClick)>0;switch(OptCMUtil.GetEditMode()){case NvConstant.EditState.Default:if(this.BaseDrawingObjectSetCursors(),e){const e=t.GetElementById(OptConstant.SVGElementClass.Shape);e&&e.SetCursor(CursorConstant.CursorType.Text),t.GetElementById(OptConstant.SVGElementClass.Slop)}break;case NvConstant.EditState.FormatPaint:const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&i.SetCursor(CursorConstant.CursorType.Paint);const n=t.GetElementById(OptConstant.SVGElementClass.Slop);n&&n.SetCursor(CursorConstant.CursorType.Paint);break;default:this.BaseDrawingObjectSetCursors()}LogUtil.Debug("= S.PolyLineContainer: Cursors set")}BaseDrawingObjectSetCursors(){LogUtil.Debug("= S.PolyLineContainer: Setting cursors");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e=!1;if(!(this.flags&NvConstant.ObjFlags.Lock)&&t)if(OptCMUtil.GetEditMode()===NvConstant.EditState.Default){const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&(this.objecttype===NvConstant.FNObjectTypes.FrameContainer?i.SetCursor(CursorConstant.CursorType.Default):i.SetCursor(CursorConstant.CursorType.Add));[OptConstant.ShapeIconType.HyperLink,OptConstant.ShapeIconType.Notes,OptConstant.ShapeIconType.ExpandedView,OptConstant.ShapeIconType.Comment,OptConstant.ShapeIconType.Attachment,OptConstant.ShapeIconType.FieldData].forEach((e=>{const i=t.GetElementById(e);i&&i.SetCursor(CursorConstant.CursorType.Pointer)}));const n=t.GetElementById(OptConstant.SVGElementClass.Slop);n&&n.SetCursor(CursorConstant.CursorType.Add);const s=T3Gv.opt.svgDoc.GetActiveEdit();if(this.DataID&&this.DataID>=0&&t.textElem&&(t.textElem===s?(i.SetCursor(CursorConstant.CursorType.Text),t.textElem.SetCursorState(CursorConstant.CursorState.EditLink)):t.textElem.SetCursorState(CursorConstant.CursorState.LinkOnly)),this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select&&this.IsSelected()){t.GetElementListWithId(OptConstant.SVGElementClass.DimText).forEach((t=>{t.SetCursorState(CursorConstant.CursorState.EditOnly),t===s&&(e=!0)})),e&&(i.SetCursor(null),n&&n.SetCursor(null))}}else this.ClearCursors();LogUtil.Debug("= S.PolyLineContainer: Cursors set")}GetListOfEnclosedObjects(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e);const i=LayerUtil.ActiveVisibleZList(),n=[];if(!this.polylist.closed)return LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",n),n;this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!0,null);for(let s=0;s<i.length;s++){const a=ObjectUtil$1.GetObjectPtr(i[s],!1);if(this.BlockID!==a.BlockID){const i=e&&1===a.hooks.length&&a.hooks[0].objid===this.BlockID;(!t&&a.hooks.length||this.MostlyContains(a)||i)&&n.push(a.BlockID)}}return LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",n),n}AfterRotateShape(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t);const e=T3Gv.opt.rotateEndRotation;this.RotateAllInContainer(t,e),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects(),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}RotateAllInContainer(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e),LayerUtil.ActiveVisibleZList();let i=[];T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId);let n=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,s=Utils1.DeepCopy(n);if(SelectUtil.ClearSelectionClick(),i=this.GetListOfEnclosedObjects(!1,!0),i.push(this.BlockID),i.length<=1){let n=T3Gv.opt.rotateStartRotation,s=T3Gv.opt.rotateEndRotation;return T3Gv.opt.ob=Utils1.DeepCopy(this),T3Gv.opt.rotateStartRotation=0,T3Gv.opt.rotateEndRotation=e,T3Gv.opt.rotateStartPoint.x=this.RotateKnobPt.x,T3Gv.opt.rotateStartPoint.y=this.RotateKnobPt.y,T3Gv.opt.rotatePivotX=this.Frame.x+this.Frame.width/2,T3Gv.opt.rotatePivotY=this.Frame.y+this.Frame.height/2,super.AfterRotateShape(t),T3Gv.opt.rotateStartRotation=n,T3Gv.opt.rotateEndRotation=s,SelectUtil.SelectObjects(i,!1,!1),T3Gv.opt.ob={},LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",i),i}SelectUtil.SelectObjects(i,!1,!1);let a=ToolActUtil.GroupSelected(!0,null,!1,!1,!1);n=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data;let o=ObjectUtil$1.GetObjectPtr(a,!0);if(null===o)return;T3Gv.opt.svgObjectLayer.GetElementById(o.BlockID).SetRotation(e),o.RotationAngle=e,ToolActUtil.UngroupShape(a,!0);let r=i.pop();SelectUtil.SelectObjects(s,!1,!1);let l=ObjectUtil$1.GetObjectPtr(r,!1);return l.UpdateFrame(),l&&(l.r.x<0||l.r.y<0)&&ToolActUtil.Undo(),LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",i),i}GetPointsForAreaDimension(){LogUtil.Debug("= S.PolyLineContainer: Getting points for area dimension");const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e=this.Dimensions&NvConstant.DimensionFlags.Exterior?T3Gv.opt.InflateLine(t,this.StyleRecord.Line.BThick,this.polylist.closed,!0):T3Gv.opt.InflateLine(t,this.StyleRecord.Line.BThick,this.polylist.closed,!1);return LogUtil.Debug("= S.PolyLineContainer: Output points for area dimension:",e),e}GetDimensionPoints(){LogUtil.Debug("= S.PolyLineContainer: Getting dimension points");let t=[],e=[],i=0,n=0,s=0,a={x:this.Frame.width/2,y:this.Frame.height/2},o={},r={};if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.EndPts)t.push(new Point$1(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y)),t.push(new Point$1(this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y));else if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.Total){e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(let t=1;t<e.length;t++)n=Math.abs(e[t-1].x-e[t].x),s=Math.abs(e[t-1].y-e[t].y),i+=Math.sqrt(n*n+s*s);o.x=a.x-i/2,o.y=a.y,t.push(new Point$1(o.x,o.y)),r.x=a.x+i/2,r.y=a.y,t.push(new Point$1(r.x,r.y));const l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(new Point$1(0,0),new Point$1(this.Frame.width,this.Frame.height));Utils3.RotatePointsAboutPoint(a,l,t)}else e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),t=this.polylist.closed?T3Gv.opt.InflateLine(e,this.StyleRecord.Line.BThick,this.polylist.closed,this.Dimensions&NvConstant.DimensionFlags.Exterior):Utils1.DeepCopy(e);return LogUtil.Debug("= S.PolyLineContainer: Output dimension points:",t),t}CustomSnap(t,e,i,n,s,a){var o,r;LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n,s,a);let l=32768,h=32768,c=32768,u=-1;const d=LayerUtil.ZList(),p=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(let f=0;f<p.length;f++)p[f].x+=t,p[f].y+=e;if(a){const t={};Utils3.LineDStyleHit(p,{x:a.x+i,y:a.y+n},this.StyleRecord.Line.Thickness,0,t)&&t.lpHit>=0&&(u=t.lpHit)}for(let f=0;f<p.length;f++)p[f].x+=i,p[f].y+=n;const g={};Utils2.GetPolyRect(g,p);for(let f=0;f<d.length;f++)if(d[f]!==this.BlockID){if(T3Gv.opt.moveList&&T3Gv.opt.moveList.includes(d[f]))continue;const t=ObjectUtil$1.GetObjectPtr(d[f],!1);if(t instanceof PolyLineContainer){const e=u>=0?u:1,i=u>=0?u+1:p.length;for(let n=e;n<i;n++){const e=new HitResult(-1,0,null);let i={x:null==(o=p[n-1])?void 0:o.x,y:null==(r=p[n-1])?void 0:r.y};if(!t.Hit(i,!1,!1,e)&&(i={x:p[n].x,y:p[n].y},!t.Hit(i,!1,!1,e)))continue;const s=e.segment+1,a=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),u=90-Utils1.CalcAngleFromPoints(p[n-1],p[n])+Utils1.CalcAngleFromPoints(a[s-1],a[s]);if(Math.abs(90-u)<=1||Math.abs(270-u)<=1){const e={x:i.x,y:i.y};t.SnapPointToSegment(s,e);const a=e.x-i.x,o=e.y-i.y;let r=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(p[n-1],p[n])/(2*Math.PI)*360;r>180&&(r-=180),r%90<1||r%90>89?r>=89&&r<=91?(Math.abs(a)>.02&&Math.abs(h)>Math.abs(a)&&(h=a),c=32768,Math.abs(t.Frame.y-g.y)<10?c=t.Frame.y-g.y:Math.abs(t.Frame.y-(g.y+g.height))<10?c=t.Frame.y-(g.y+g.height):Math.abs(t.Frame.y+t.Frame.height-g.y)<10?c=t.Frame.y+t.Frame.height-g.y:Math.abs(t.Frame.y+t.Frame.height-(g.y+g.height))<10&&(c=t.Frame.y+t.Frame.height-(g.y+g.height)),Math.abs(l)>Math.abs(c)&&(l=c)):Math.abs(o)>.02&&Math.abs(l)>Math.abs(o)&&(l=o,h=32768,Math.abs(t.Frame.x-g.x)<10?h=t.Frame.x-g.x:Math.abs(t.Frame.x-(g.x+g.width))<10?h=t.Frame.x-(g.x+g.width):Math.abs(t.Frame.x+t.Frame.width-g.x)<10?h=t.Frame.x+t.Frame.width-g.x:Math.abs(t.Frame.x+t.Frame.width-(g.x+g.width))<10&&(h=t.Frame.x+t.Frame.width-(g.x+g.width)),Math.abs(h),Math.abs(h)):(Math.abs(a)>.02||Math.abs(o)>.02)&&(Math.abs(h)>Math.abs(a)&&(h=a),Math.abs(l)>Math.abs(o)&&(l=o))}}}}return 32768!==h||32768!==l?(h<32768&&(a.x+=h),l<32768&&(a.y+=l),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0),!0):(LogUtil.Debug("= S.PolyLineContainer: Output result:",!1),!1)}CanUseRFlags(){LogUtil.Debug("= S.PolyLineContainer: Checking if RFlags can be used");const t=this.GetPolyRectangularInfo(null);return LogUtil.Debug("= S.PolyLineContainer: Output result:",t),t}SetSize(t,e,i){if(LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i),null!==t){if(null===e&&1===Math.abs(t-this.Frame.width))return!0}else if(null!==e&&null===t&&1===Math.abs(e-this.Frame.height))return!0;this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1));const n=super.SetSize(t,e,i);return LogUtil.Debug("= S.PolyLineContainer: Output result:",n),n}AdjustDimensionLength(t){LogUtil.Debug("= S.PolyLineContainer: Input dimensionLength:",t);let e=t;if(this.polylist&&this.polylist.closed&&null!==this.GetPolyRectangularInfo(null)){const i=this.Dimensions&NvConstant.DimensionFlags.Exterior?-this.StyleRecord.Line.Thickness:this.StyleRecord.Line.Thickness;null!==t&&(e+=i)}return LogUtil.Debug("= S.PolyLineContainer: Output adjustedLength:",e),e}GetDimensionsForDisplay(){LogUtil.Debug("= S.PolyLineContainer: Getting dimensions for display");const t={width:this.Frame.width,height:this.Frame.height,x:this.Frame.x,y:this.Frame.y};return this.polylist&&this.polylist.closed&&(this.Dimensions&NvConstant.DimensionFlags.Exterior?(t.x-=this.StyleRecord.Line.Thickness/2,t.y-=this.StyleRecord.Line.Thickness/2,t.width+=this.StyleRecord.Line.Thickness,t.height+=this.StyleRecord.Line.Thickness):(t.x+=this.StyleRecord.Line.Thickness/2,t.y+=this.StyleRecord.Line.Thickness/2,t.width-=this.StyleRecord.Line.Thickness,t.height-=this.StyleRecord.Line.Thickness)),LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",t),t}GetSnapRect(){LogUtil.Debug("= S.PolyLineContainer: Getting snap rect");const t=this.GetDimensionsForDisplay();return LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",t),t}GetDragR(){LogUtil.Debug("= S.PolyLineContainer: Getting drag rectangle");let t=new Rectangle;if(Utils2.CopyRect(t,this.r),this.polylist&&this.polylist.closed&&this.StyleRecord&&this.StyleRecord.Line){const e=this.StyleRecord.Line.BThick;Utils2.InflateRect(t,2*e,2*e)}return LogUtil.Debug("= S.PolyLineContainer: Output drag rectangle:",t),t}SetShapeOrigin(t,e,i,n){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n);let s=this.GetSVGFrame(),a=0,o=0;this.polylist&&this.polylist.closed&&n&&(this.Dimensions&NvConstant.DimensionFlags.Exterior?(s.x-=this.StyleRecord.Line.Thickness/2,s.y-=this.StyleRecord.Line.Thickness/2,s.width+=this.StyleRecord.Line.Thickness,s.height+=this.StyleRecord.Line.Thickness):(s.x+=this.StyleRecord.Line.Thickness/2,s.y+=this.StyleRecord.Line.Thickness/2,s.width-=this.StyleRecord.Line.Thickness,s.height-=this.StyleRecord.Line.Thickness)),null!==t&&(a=s.x-t),null!==e&&(o=s.y-e),this.StartPoint.x-=a,this.StartPoint.y-=o,this.EndPoint.x-=a,this.EndPoint.y-=o,this.CalcFrame(),LogUtil.Debug("= S.PolyLineContainer: Output frame:",s)}MaintainDimensionThroughPolygonOpennessChange(t){LogUtil.Debug("= S.PolyLineContainer: Input isClosed:",t);let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1),i=!1;t&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total|NvConstant.DimensionFlags.EndPts,!1),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,!0)),i=t?!(this.Dimensions&NvConstant.DimensionFlags.Exterior):this.Dimensions&NvConstant.DimensionFlags.Exterior;let n=T3Gv.opt.InflateLine(e,this.StyleRecord.Line.Thickness/2,!0,i);if(n&&n.length===this.polylist.segs.length){this.StartPoint.x=n[0].x,this.StartPoint.y=n[0].y,this.EndPoint.x=n[n.length-1].x,this.EndPoint.y=n[n.length-1].y;for(let t=0;t<this.polylist.segs.length;t++)this.polylist.segs[t].pt.x=n[t].x-this.StartPoint.x,this.polylist.segs[t].pt.y=n[t].y-this.StartPoint.y}LogUtil.Debug("= S.PolyLineContainer: Output inflatedPoints:",n)}ChangeLineThickness(t){LogUtil.Debug("= S.PolyLineContainer: Input newThickness:",t);let e,i,n,s,a,o=[],r=[],l=this.StyleRecord.Line.Thickness;if(this.UpdateFrame(null),a=(l-t)/2,s=this,s.StyleRecord.Line.BThick&&s.polylist&&s.polylist.closed&&s.polylist.segs&&s.polylist.segs.length){if(s instanceof Instance.Shape.Polygon){let t={};t.Frame=s.Frame,i=new Instance.Shape.PolyLine(t),i.polylist=s.polylist,i.StartPoint=s.StartPoint,i.EndPoint=s.EndPoint}else i=s;if(n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,r),r.length>0)for(o.push(new Point$1(n[0].x,n[0].y)),e=0;e<r.length;e++)o.push(new Point$1(n[r[e]].x,n[r[e]].y));else o=Utils1.DeepCopy(n);n=T3Gv.opt.InflateLine(o,Math.abs(a),!0,a>=0),s.StartPoint.x=n[0].x,s.StartPoint.y=n[0].y,s.EndPoint.x=n[n.length-1].x,s.EndPoint.y=n[n.length-1].y;let t=Utils1.DeepCopy(s.polylist.segs);for(s.polylist.segs=[],e=0;e<n.length;e++)s.polylist.segs.push(new PolySeg(1,n[e].x-s.StartPoint.x,n[e].y-s.StartPoint.y)),e<t.length&&(s.polylist.segs[e].LineType=t[e].LineType,s.polylist.segs[e].ShortRef=t[e].ShortRef,s.polylist.segs[e].dataclass=t[e].dataclass,s.polylist.segs[e].dimDeflection=t[e].dimDeflection,s.polylist.segs[e].flags=t[e].flags,s.polylist.segs[e].param=t[e].param,s.polylist.segs[e].weight=t[e].weight);if(s instanceof Instance.Shape.BaseLine)s.CalcFrame();else if(s instanceof Instance.Shape.Polygon){l=s.StyleRecord.Line.BThick;let t=s.Frame.width/(s.Frame.width+2*l),e=s.Frame.height/(s.Frame.height+2*l),i=s.Frame.x*t-s.Frame.x+l,n=s.Frame.y*e-s.Frame.y+l;s.ScaleObject(i,n,null,0,t,e,!1)}}this.UpdateFrame(null),LogUtil.Debug("= S.PolyLineContainer: Output updated thickness:",t)}ChangeLineThickness(t){LogUtil.Debug("= S.PolyLineContainer: Input newThickness:",t);let e,i,n,s,a,o=[],r=[];const l=this.StyleRecord.Line.Thickness;if(this.UpdateFrame(null),a=(l-t)/2,s=this,s.StyleRecord.Line.BThick&&s.polylist&&s.polylist.closed&&s.polylist.segs&&s.polylist.segs.length){if(s instanceof Instance.Shape.Polygon){let t={};t.Frame=s.Frame,i=new Instance.Shape.PolyLine(t),i.polylist=s.polylist,i.StartPoint=s.StartPoint,i.EndPoint=s.EndPoint}else i=s;if(n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,r),r.length>0)for(o.push(new Point$1(n[0].x,n[0].y)),e=0;e<r.length;e++)o.push(new Point$1(n[r[e]].x,n[r[e]].y));else o=Utils1.DeepCopy(n);n=T3Gv.opt.InflateLine(o,Math.abs(a),!0,a>=0),s.StartPoint.x=n[0].x,s.StartPoint.y=n[0].y,s.EndPoint.x=n[n.length-1].x,s.EndPoint.y=n[n.length-1].y;let t=Utils1.DeepCopy(s.polylist.segs);for(s.polylist.segs=[],e=0;e<n.length;e++)s.polylist.segs.push(new PolySeg(1,n[e].x-s.StartPoint.x,n[e].y-s.StartPoint.y)),e<t.length&&(s.polylist.segs[e].LineType=t[e].LineType,s.polylist.segs[e].ShortRef=t[e].ShortRef,s.polylist.segs[e].dataclass=t[e].dataclass,s.polylist.segs[e].dimDeflection=t[e].dimDeflection,s.polylist.segs[e].flags=t[e].flags,s.polylist.segs[e].param=t[e].param,s.polylist.segs[e].weight=t[e].weight);if(s instanceof Instance.Shape.BaseLine)s.CalcFrame();else if(s instanceof Instance.Shape.Polygon){const t=s.StyleRecord.Line.BThick,e=s.Frame.width/(s.Frame.width+2*t),i=s.Frame.height/(s.Frame.height+2*t),n=s.Frame.x*e-s.Frame.x+t,a=s.Frame.y*i-s.Frame.y+t;s.ScaleObject(n,a,null,0,e,i,!1)}}this.UpdateFrame(null),LogUtil.Debug("= S.PolyLineContainer: Output updated thickness:",t)}}class Line$1 extends BaseLine{constructor(t={}){(t=t||{}).LineType=OptConstant.LineType.LINE,super(t),__publicField(this,"StartPoint"),__publicField(this,"EndPoint"),__publicField(this,"FixedPoint"),__publicField(this,"LineOrientation"),__publicField(this,"hoplist"),__publicField(this,"ArrowheadData"),__publicField(this,"ShortRef"),__publicField(this,"shapeparam"),__publicField(this,"StartArrowID"),__publicField(this,"EndArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),__publicField(this,"TextDirection"),this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.FixedPoint=t.FixedPoint||[0,0],this.LineOrientation=t.LineOrientation||OptConstant.LineOrientation.None,this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.ShortRef=t.ShortRef||0,this.shapeparam=t.shapeparam||0,this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.TextDirection=t.TextDirection||!1,this.CalcFrame()}GetLineShapePolyPoints(t,e){LogUtil.Debug("S.Line - Input:",{numPoints:t,adjustForFrame:e});let i=[],n=this.shapeparam,s=this.ShortRef;n<.01&&(s=0);let a=this.EndPoint.x-this.StartPoint.x,o=this.EndPoint.y-this.StartPoint.y,r=!1;switch(s){case 0:case OptConstant.LineTypes.LsMeasuringTape:i.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),i.push(new Point$1(this.EndPoint.x,this.EndPoint.y));break;case 1:case 2:2===s&&(r=!0);let t=Math.sqrt(a*a+o*o);if(0===t)break;let e=o/t,l=a/t,h=n*(t>200?200:t)/2,c=(t-2*h)/2,u=new Point$1(this.StartPoint.x,this.StartPoint.y);i.push(u);let d=new Point$1(this.StartPoint.x+c*l,this.StartPoint.y+c*e);i.push(d);let p=new Point$1(d.x+h*e,d.y-h*l);if(r){i.push(p);let t=new Point$1(p.x+h*l,p.y+h*e);i.push(t);let n=new Point$1(t.x-2*h*e,t.y+2*h*l);i.push(n);let s=new Point$1(n.x+h*l,n.y+h*e);i.push(s);let a=new Point$1(this.EndPoint.x,this.EndPoint.y);i.push(a)}else{let t=new Point$1(p.x+h*l-h*l/2,p.y+h*e-h*e/2);i.push(t);let n=new Point$1(t.x-2*h*e+2*h*l/2,t.y+2*h*l+2*h*e/2);i.push(n);let s=new Point$1(n.x+h*l,n.y+h*e);i.push(s);let a=new Point$1(this.EndPoint.x,this.EndPoint.y);i.push(a)}}if(e)for(let l=0;l<i.length;l++)i[l].x-=this.Frame.x,i[l].y-=this.Frame.y;return LogUtil.Debug("S.Line - Output:",i),i}CreateShape(t,e){if(LogUtil.Debug("S.Line - Input:",{svgContainer:t,isHidden:e}),this.flags&NvConstant.ObjFlags.NotVisible)return null;let i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=null,s=this.ShortRef,a="#000000",o=1,r=1,l=0;this.shapeparam<.01&&(s=0);let h=(0===s||s==OptConstant.LineTypes.LsMeasuringTape)&&0===this.hoplist.nhops;n=h?t.CreateShape(OptConstant.CSType.Line):t.CreateShape(OptConstant.CSType.Polyline),n.SetID(OptConstant.SVGElementClass.Shape);let c=h?t.CreateShape(OptConstant.CSType.Line):t.CreateShape(OptConstant.CSType.Polyline);c.SetID(OptConstant.SVGElementClass.Slop),c.ExcludeFromExport(!0),this.CalcFrame();let u=this.Frame,d=this.StyleRecord;if(null==d){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);t&&(d=t.def.style)}d&&(a=d.Line.Paint.Color,o=d.Line.Thickness,o>0&&o<1&&(o=1),r=d.Line.Paint.Opacity,l=d.Line.LinePattern);let p=u.width,g=u.height;i.SetSize(p,g),i.SetPos(this.Frame.x,this.Frame.y),n.SetSize(p,g);let f=[];if(h)n.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y);else{if(f=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),0!==this.hoplist.nhops){let t=T3Gv.opt.InsertHops(this,f,f.length);f=f.slice(0,t.npts)}n.SetPoints(f)}return n.SetFillColor("none"),n.SetStrokeColor(a),n.SetStrokeOpacity(r),n.SetStrokeWidth(o),0!==l&&n.SetStrokePattern(l),c.SetSize(p,g),h?c.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):c.SetPoints(f),c.SetStrokeColor("white"),c.SetFillColor("none"),c.SetOpacity(0),e?c.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):c.SetEventBehavior(OptConstant.EventBehavior.None),c.SetStrokeWidth(o+OptConstant.Common.Slop),i.AddElement(n),i.AddElement(c),this.ApplyStyles(n,d),this.ApplyEffects(i,!1,!0),i.isShape=!0,this.AddIcons(t,i),LogUtil.Debug("S.Line - Output:",i),i}SetCursors(){let t;LogUtil.Debug("S.Line - Input:",{crtOpt:T3Gv.opt.crtOpt});const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);T3Gv.opt.crtOpt===OptConstant.OptTypes.AddCorner?(t=e.GetElementById(OptConstant.SVGElementClass.Slop),t&&t.SetCursor(CursorConstant.CursorType.Cross)):this.BaseDrawingObjectSetCursors(),LogUtil.Debug("S.Line - Output:",{shapeElement:t})}BaseDrawingObjectSetCursors(){LogUtil.Debug("S.Line - Input:",{BlockID:this.BlockID,flags:this.flags});const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e=!1;if(!(this.flags&NvConstant.ObjFlags.Lock)&&t)if(OptCMUtil.GetEditMode()===NvConstant.EditState.Default){const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&(this.objecttype===NvConstant.FNObjectTypes.FrameContainer?i.SetCursor(CursorConstant.CursorType.Default):i.SetCursor(CursorConstant.CursorType.Add));const n=t.GetElementById(OptConstant.ShapeIconType.HyperLink);n&&n.SetCursor(CursorConstant.CursorType.Pointer);const s=t.GetElementById(OptConstant.ShapeIconType.Notes);s&&s.SetCursor(CursorConstant.CursorType.Pointer);const a=t.GetElementById(OptConstant.ShapeIconType.ExpandedView);a&&a.SetCursor(CursorConstant.CursorType.Pointer);const o=t.GetElementById(OptConstant.ShapeIconType.Comment);o&&o.SetCursor(CursorConstant.CursorType.Pointer);const r=t.GetElementById(OptConstant.ShapeIconType.Attachment);r&&r.SetCursor(CursorConstant.CursorType.Pointer);const l=t.GetElementById(OptConstant.ShapeIconType.FieldData);l&&l.SetCursor(CursorConstant.CursorType.Pointer);const h=t.GetElementById(OptConstant.SVGElementClass.Slop);h&&h.SetCursor(CursorConstant.CursorType.Add);const c=T3Gv.opt.svgDoc.GetActiveEdit();if(this.DataID&&this.DataID>=0&&t.textElem&&(t.textElem===c?(i.SetCursor(CursorConstant.CursorType.Text),t.textElem.SetCursorState(CursorConstant.CursorState.EditLink)):t.textElem.SetCursorState(CursorConstant.CursorState.LinkOnly)),this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select&&this.IsSelected()){const n=t.GetElementListWithId(OptConstant.SVGElementClass.DimText);for(let t=0;t<n.length;t++)n[t].SetCursorState(CursorConstant.CursorState.EditOnly),n[t]===c&&(e=!0);e&&(i.SetCursor(null),h&&h.SetCursor(null))}}else this.ClearCursors();LogUtil.Debug("S.Line - Output:",{shapeContainer:t,isDimensionTextActive:e})}AdjustLineStart(t,e,i,n,s,a){LogUtil.Debug("S.Line - Input:",{svgContainer:t,startX:e,startY:i,endX:n,endY:s,enforceMinimum:a});let o=[],r=t.GetElementById(OptConstant.SVGElementClass.Shape),l=t.GetElementById(OptConstant.SVGElementClass.Slop);this.StartPoint.x=e,this.StartPoint.y=i,a||this.EnforceMinimum(!0);let h=!1;T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0&&(h=!0),s&&(h=!0),h||this.AdjustForLineAngleSnap(this.EndPoint,this.StartPoint),this.CalcFrame(),t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),r.SetSize(this.Frame.width,this.Frame.height);let c=[],u=(0===this.ShortRef||this.ShortRef==OptConstant.LineTypes.LsMeasuringTape)&&0===this.hoplist.nhops;u?r.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(c=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),r.SetPoints(c)),l.SetSize(this.Frame.width,this.Frame.height),u?l.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):l.SetPoints(c),this.CalcFrame(),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),r.SetSize(this.Frame.width,this.Frame.height),u?r.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(c=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),r.SetPoints(c)),l.SetSize(this.Frame.width,this.Frame.height),u?l.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):l.SetPoints(c),this.UpdateDimensionLines(t),new SelectionAttr;let d=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);o.push(new Point$1(this.StartPoint.x-d.x,this.StartPoint.y-d.y)),o.push(new Point$1(this.EndPoint.x-d.x,this.EndPoint.y-d.y));let p=o[0].x-o[1].x,g=o[0].y-o[1].y;Utils2.Sqrt(p*p+g*g),UIUtil.UpdateDisplayCoordinates(this.Frame,this.StartPoint,CursorConstant.CursorTypes.Grow,this),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("S.Line - Output:",{shapeElement:r,slopElement:l,points:o})}AdjustLineEnd(t,e,i,n,s){LogUtil.Debug("S.Connector - Input:",{svgContainer:t,newEndPointX:e,newEndPointY:i,unusedParam:n,forceAngleSnap:s});let a,o,r=[];t&&(a=t.GetElementById(OptConstant.SVGElementClass.Shape),o=t.GetElementById(OptConstant.SVGElementClass.Slop)),this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1);const l=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;if((s||l)&&this.AdjustForLineAngleSnap(this.StartPoint,this.EndPoint),this.CalcFrame(),t){t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),a.SetSize(this.Frame.width,this.Frame.height);let e=[];const i=(0===this.ShortRef||this.ShortRef===OptConstant.LineTypes.LsMeasuringTape)&&0===this.hoplist.nhops;i?a.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(e=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),a.SetPoints(e)),o.SetSize(this.Frame.width,this.Frame.height),i?o.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):o.SetPoints(e),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),this.CalcFrame(),t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),a.SetSize(this.Frame.width,this.Frame.height),i?a.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(e=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),a.SetPoints(e)),o.SetSize(this.Frame.width,this.Frame.height),i?o.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):o.SetPoints(e),this.UpdateDimensionLines(t),new SelectionAttr;const n=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);r.push(new Point$1(this.StartPoint.x-n.x,this.StartPoint.y-n.y)),r.push(new Point$1(this.EndPoint.x-n.x,this.EndPoint.y-n.y));const s=r[0].x-r[1].x,l=r[0].y-r[1].y;Utils2.Sqrt(s*s+l*l);const h=Utils1.DeepCopy(this.EndPoint);if(UIUtil.UpdateDisplayCoordinates(this.Frame,h,CursorConstant.CursorTypes.Grow,this),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&(h.x!==this.EndPoint.x||h.y!==this.EndPoint.y)){const t=new Error("bounds error");throw t.name="1",t}-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)}LogUtil.Debug("S.Connector - Output:",{shapeElement:t?t.GetElementById(OptConstant.SVGElementClass.Shape):null,slopElement:t?t.GetElementById(OptConstant.SVGElementClass.Slop):null})}Flip(t){let e;LogUtil.Debug("S.Line - Input:",{flipFlags:t});let i=!1;if(T3Gv.opt.ob=Utils1.DeepCopy(this),t&OptConstant.ExtraFlags.FlipVert&&(e=this.StartPoint.y,this.StartPoint.y=this.EndPoint.y,this.EndPoint.y=e,i=!0),t&OptConstant.ExtraFlags.FlipHoriz&&(e=this.StartPoint.x,this.StartPoint.x=this.EndPoint.x,this.EndPoint.x=e,i=!0),i){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.UpdateDimensionLines(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}T3Gv.opt.ob={},LogUtil.Debug("S.Line - Output:",{swapped:i})}AddCorner(t,e){LogUtil.Debug("S.Line - Input:",{event:t,point:e});let i,n=[],s=[],a=!1;T3Gv.opt.ob=Utils1.DeepCopy(this),n=[{x:this.StartPoint.x,y:this.StartPoint.y},{x:this.EndPoint.x,y:this.EndPoint.y}],n.push(new Point$1(e.x,e.y)),i=360-Utils1.CalcAngleFromPoints(n[0],n[1]),i>=360&&(i-=360);const o=2*Math.PI*(i/360);if(Utils3.RotatePointsAboutCenter(this.Frame,-o,n),Math.abs(n[1].y-n[2].y)<=this.StyleRecord.Line.Thickness){n[2].y=n[0].y,Math.abs(n[1].x-n[2].x)>Math.abs(n[0].x-n[2].x)&&(a=!0);const t=i>=0&&i<=180?50:-50;n.push(new Point$1(n[2].x,n[2].y+t)),Utils3.RotatePointsAboutCenter(this.Frame,o,n),s.push(new Point$1(n[2].x,n[2].y)),s.push(new Point$1(n[3].x,n[3].y)),a?(this.StartPoint.x=s[0].x,this.StartPoint.y=s[0].y):(this.EndPoint.x=s[0].x,this.EndPoint.y=s[0].y),this.CalcFrame(),HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.ModifyShape),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),T3Gv.opt.UpdateLinks();const e={StartPoint:{x:s[0].x,y:s[0].y},EndPoint:{x:s[1].x,y:s[1].y},Dimensions:this.Dimensions,TextFlags:this.TextFlags,objecttype:this.objecttype,StyleRecord:Utils1.DeepCopy(this.StyleRecord)},r=new Instance.Shape.Line(e),l=DrawUtil.AddNewObject(r,!1,!0),h=a?PolyUtil.PolyLJoin(l,OptConstant.HookPts.KTL,this.BlockID,OptConstant.HookPts.KTL,!1):PolyUtil.PolyLJoin(l,OptConstant.HookPts.KTL,this.BlockID,OptConstant.HookPts.KTR,!1),c=ObjectUtil$1.GetObjectPtr(h,!1),u=T3Gv.opt.svgObjectLayer.GetElementById(h);let d=Number(T3Gv.docUtil.rulerConfig.majorScale).toString();switch(T3Gv.docUtil.rulerConfig.units){case NvConstant.RulerUnit.Feet:this.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches?d=12*T3Gv.docUtil.rulerConfig.majorScale+'"':d+="'";break;case NvConstant.RulerUnit.Inches:d+='"'}c.UpdateDimensionFromText(u,d,{segment:2}),ObjectUtil$1.AddToDirtyList(this.BlockID),DrawUtil.CompleteOperation()}LogUtil.Debug("S.Line - Output:",{newPoints:n,tempPoints:s,isStartPoint:a})}UseEdges(t,e,i,n,s,a){LogUtil.Debug("S.Line - Input:",{enableX:t,enableY:e,alignX:i,alignY:n,startPoint:s,endPoint:a});let o=0,r=0,l=0,h=0,c=0,u=0,d=!1;if(s.x!==a.x)if(t&&i)Utils2.IsEqual(this.StartPoint.y,this.EndPoint.y)&&(o=a.x-s.x,d=!0);else{const t=this.Frame.x+this.Frame.width/2;Math.abs(t-s.x/2)<100?(c=(a.x-s.x)/2,d=!0):this.Frame.x>s.x/2&&(c=a.x-s.x,d=!0)}if(s.y!==a.y)if(e&&n)Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x)&&(r=a.y-s.y,d=!0);else{const t=this.Frame.y+this.Frame.height/2;Math.abs(t-s.y/2)<100?(u=(a.y-s.y)/2,d=!0):this.Frame.y>s.y/2&&(u=a.y-s.y,d=!0)}return d&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),(c||u)&&this.OffsetShape(c,u),(o||r)&&(o&&(l=this.Frame.width+o),r&&(h=this.Frame.height+r),this.SetSize(l,h,0)),ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.Line - Output:",{offsetX:o,offsetY:r,newWidth:l,newHeight:h,deltaX:c,deltaY:u,shouldAdjust:d}),d}}class WallOpt{constructor(){__publicField(this,"addingWalls")}AllowActionButtons(t){LogUtil.Debug("= U.WallUtil AllowActionButtons input:",t);return LogUtil.Debug("= U.WallUtil AllowActionButtons output:",null),null}ShapeSaveData(t,e){LogUtil.Debug("= U.WallUtil ShapeSaveData input:",{shapeObject:t,targetData:e}),LogUtil.Debug("= U.WallUtil ShapeSaveData completed")}AddWall(t,e){let i;LogUtil.Debug("= U.WallUtil AddWall input:",{event:t,additionalData:e});const n=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;n.def.wallThickness=8.33325;const s=Utils1.DeepCopy(n.def.style),a=T3Gv.opt.GetDrawingScale(T3Gv.docUtil.rulerConfig);T3Gv.docUtil.rulerConfig.useInches?n.def.wallThickness>0?s.Line.Thickness=n.def.wallThickness:(i=48,s.Line.Thickness=8.33333*i/a):n.def.wallThickness>0?s.Line.Thickness=n.def.wallThickness:(i=50,s.Line.Thickness=11.811023622047243*i/a),s.Line.BThick=s.Line.Thickness/2,s.Line.LinePattern=0,s.Line.Paint.Color="#000000",LogUtil.Debug("= WallOpt AddWall o",s);const o=n.dimensions,r=Utils2.SetFlag(o,NvConstant.DimensionFlags.Area,!1),l={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StyleRecord:s,bOverrideDefaultStyleOnDraw:!0,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:!1,Dimensions:r,TextFlags:NvConstant.TextFlags.HorizText|NvConstant.TextFlags.None,objecttype:NvConstant.FNObjectTypes.FlWall},h=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),c=Utils1.DeepCopy(h),u=new Line$1(l);DrawUtil.DrawNewObject(u,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Edit),SelectUtil.SelectObjects(c,!1,!1),LogUtil.Debug("= U.WallUtil AddWall output:",{wallLine:u})}StopAddingWalls(t){LogUtil.Debug("= U.WallUtil StopAddingWalls input:",t);const e=OptConstant.OptTypes;if(this.IsAddingWalls()){this.ToggleAddingWalls();let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);t&&t.length>0?(DrawUtil.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook()):OptCMUtil.CancelOperation(),OptCMUtil.SetEditMode(NvConstant.EditState.Default);let e=[];t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),t&&t.length>0&&(e=Utils1.DeepCopy(t),SelectUtil.SelectObjects(e))}else if(T3Gv.opt.crtOpt===e.AddCorner)T3Gv.wallOpt.AddCornerCancel();else OptCMUtil.CancelOperation();LogUtil.Debug("= U.WallUtil StopAddingWalls output: completed")}CancelObjectDraw(){LogUtil.Debug("= U.WallUtil CancelObjectDraw input: none"),this.StopAddingWalls(),LogUtil.Debug("= U.WallUtil CancelObjectDraw output: completed")}ToggleAddingWalls(t){LogUtil.Debug("= U.WallUtil ToggleAddingWalls input:",t),this.addingWalls=void 0!==t?t:!this.addingWalls,LogUtil.Debug("= U.WallUtil ToggleAddingWalls output:",this.addingWalls)}IsAddingWalls(){LogUtil.Debug("= U.WallUtil IsAddingWalls input: none");const t=this.addingWalls;return LogUtil.Debug("= U.WallUtil IsAddingWalls output:",t),t}AddNewPolyLine(t,e){if(LogUtil.Debug("= U.WallUtil AddNewPolyLine input:",{objectType:t,parameters:e}),t!==NvConstant.FNObjectTypes.FlWall)return LogUtil.Debug("= U.WallUtil AddNewPolyLine output: null"),null;const i=new PolyLineContainer(e);return LogUtil.Debug("= U.WallUtil AddNewPolyLine output:",i),i}AddCornerCancel(){LogUtil.Debug("= U.WallUtil AddCornerCancel input: none"),OptCMUtil.SetEditMode(NvConstant.EditState.Default),OptCMUtil.CancelOperation(),DrawUtil.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook(),OptCMUtil.SetEditMode(NvConstant.EditState.Default),LogUtil.Debug("= U.WallUtil AddCornerCancel output: completed")}AddCorner(t){LogUtil.Debug("= U.WallUtil AddCorner input:",t);try{let e,i,n;t.stopPropagation(),t.preventDefault(),t.gesture?(e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),n=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget),i=n.GetID()):(e=Utils1.DeepCopy(T3Gv.opt.rClickParam.hitPoint),i=T3Gv.opt.rClickParam.targetId,n=T3Gv.opt.svgObjectLayer.GetElementById(i));const s=ObjectUtil$1.GetObjectPtr(i,!0);return s&&"function"==typeof s.AddCorner&&s.AddCorner(n,e),OptCMUtil.SetEditMode(NvConstant.EditState.Default),OptCMUtil.CancelOperation(),DrawUtil.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook(),OptCMUtil.SetEditMode(NvConstant.EditState.Default),LogUtil.Debug("= U.WallUtil AddCorner output: false"),!1}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}}AddCornerStart(t){LogUtil.Debug("= U.WallUtil AddCornerStart input:",t),this.StopAddingWalls(),T3Gv.opt.CloseEdit(),OptCMUtil.CancelOperation(),OptCMUtil.SetEditMode(NvConstant.EditState.Edit);const e=LayerUtil.ActiveVisibleZList();for(let i=0;i<e.length;i++){const t=e[i],n=ObjectUtil$1.GetObjectPtr(t,!1);n.flags&NvConstant.ObjFlags.Lock||n.objecttype===NvConstant.FNObjectTypes.FlWall&&T3Gv.opt.svgObjectLayer.GetElementById(t).svgObj.SDGObj.GetEventProxy().on("dragstart",this.AddCorner)}UIUtil.SetModalOperation(OptConstant.OptTypes.AddCorner),LogUtil.Debug("= U.WallUtil AddCornerStart output: completed")}PostObjectDrawHook(t){LogUtil.Debug("= U.WallUtil PostObjectDrawHook input:",t),this.addingWalls&&(t===BaseLine.prototype.LMDrawRelease?this.AddWall():this.StopAddingWalls()),LogUtil.Debug("= U.WallUtil PostObjectDrawHook output: completed")}NotifySetEditMode(t){if(LogUtil.Debug("= U.WallUtil NotifySetEditMode input:",t),t===NvConstant.EditState.Edit||t===NvConstant.EditState.Default||t===NvConstant.EditState.LinkConnect||t===NvConstant.EditState.LinkJoin)return LogUtil.Debug("= U.WallUtil NotifySetEditMode output:",!1),!1;this.addingWalls&&this.StopAddingWalls(),LogUtil.Debug("= U.WallUtil NotifySetEditMode output: completed")}AlwaysShowLayers(){LogUtil.Debug("= U.WallUtil AlwaysShowLayers input: none");return LogUtil.Debug("= U.WallUtil AlwaysShowLayers output:",true),true}EnsureCubicleBehindOutline(t){LogUtil.Debug("= U.WallUtil EnsureCubicleBehindOutline input:",t);const e=LayerUtil.ActiveVisibleZList();let i=null;const n=ObjectUtil$1.GetObjectPtr(t,!1);function s(t,e){const i=e.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);let n=!1;for(let o=0;o<i.length;o++){const e=new HitResult(-1,0,null);if(e.hitcode=t.Hit(i[o],!1,!0,e),e&&e.hitcode===NvConstant.HitCodes.Border){n=!0;break}}if(!n)return!1;const s=Utils2.IntersectRect(t.Frame,e.Frame);if(!s)return!1;const a=e.Frame;return!(Math.abs(s.x-a.x)>1e-4||Math.abs(s.y-a.y)>1e-4||Math.abs(s.width-a.width)>1e-4||Math.abs(s.height-a.height)>1e-4)}if(n instanceof PolyLineContainer)for(let a=0;a<e.length;a++){const o=e[a];if(t!==o&&(i=ObjectUtil$1.GetObjectPtr(o,!1),i instanceof PolyLineContainer&&s(i,n))){const t=e.indexOf(n.BlockID);if(t<0)return;if(t<a)return;return void T3Gv.opt.PutBehindObject(i.BlockID,n.BlockID)}}LogUtil.Debug("= U.WallUtil EnsureCubicleBehindOutline output: completed")}AllowAutoInsert(){LogUtil.Debug("= U.WallUtil AllowAutoInsert input: none");return LogUtil.Debug("= U.WallUtil AllowAutoInsert output:",false),false}GetAutomationContext(){LogUtil.Debug("= U.WallUtil GetAutomationContext input: none");const t=KeyboardConstant.Contexts.WallOpt;return LogUtil.Debug("= U.WallUtil GetAutomationContext output:",t),t}}class PolygonUtil{constructor(){}static generateParallelogram(t,e){let i=e/t.width;return i>1&&(i=1),[{x:i,y:0},{x:1,y:0},{x:1-i,y:1},{x:0,y:1},{x:i,y:0}]}static generateDiamond(t,e){return[{x:.5,y:0},{x:1,y:.5},{x:.5,y:1},{x:0,y:.5},{x:.5,y:0}]}static generateDocument(t,e){const i=[],n=t.width,s=t.height,a=e;i.push({x:0,y:(s-a)/s}),i.push({x:0,y:(s-a)/s}),i.length=85,i[84]={x:0,y:(s-a)/s},i[1]={x:0,y:0},i[2]={x:1,y:0},i[3]={x:1,y:(s-a-0)/s};const o=n/4,r=a,l=2*o/40;for(let h=1;h<=40;h++){let t=l*h,e=n-t,c=(o-t)/o,u=s-a-0-Math.sqrt(1-c*c)*r;i[h+3]={x:e/n,y:u/s}}for(let h=1;h<=40;h++){let t=l*h,e=n-(t+2*o),c=(o-t)/o,u=s-a+Math.sqrt(1-c*c)*r;i[h+43]={x:e/n,y:u/s}}return i}static generateTerminal(t,e){let i=[];const n=t.width,s=t.height;let a,o;return a=Math.floor(s/2),a>n/2&&(a=Math.floor(n/2)),o={left:0,top:0,right:a,bottom:2*a},i=Utils2.PolyYCurve(i,o,40,0,0,0,a,!0,n,s),o={left:0,top:s-2*a,right:a,bottom:s},i=Utils2.PolyYCurve(i,o,40,0,0,a,0,!0,n,s),o={left:n-a,top:s,right:n,bottom:s-2*a},i=Utils2.PolyYCurve(i,o,40,0,0,0,-a,!1,n,s),o={left:n-a,top:2*a,right:n,bottom:0},i=Utils2.PolyYCurve(i,o,40,0,0,-a,0,!1,n,s),i.push(new Point$1(i[0].x,i[0].y)),i}static generateRightArrow(t,e){let i=e/t.width;return i>1&&(i=1),[{x:0,y:.15},{x:1-i,y:.15},{x:1-i,y:0},{x:1,y:.5},{x:1-i,y:1},{x:1-i,y:.85},{x:0,y:.85},{x:0,y:.15}]}static generateLeftArrow(t,e){let i=e/t.width;return i>1&&(i=1),[{x:0,y:.5},{x:i,y:0},{x:i,y:.15},{x:1,y:.15},{x:1,y:.85},{x:i,y:.85},{x:i,y:1},{x:0,y:.5}]}static generateTopArrow(t,e){let i=e/t.height;return i>1&&(i=1),[{x:.5,y:0},{x:0,y:i},{x:.15,y:i},{x:.15,y:1},{x:.85,y:1},{x:.85,y:i},{x:1,y:i},{x:.5,y:0}]}static generateBottomArrow(t,e){let i=e/t.height;return i>1&&(i=1),[{x:.15,y:0},{x:.15,y:1-i},{x:0,y:1-i},{x:.5,y:1},{x:1,y:1-i},{x:.85,y:1-i},{x:.85,y:0},{x:.15,y:0}]}static generateTriangle(t,e){return[{x:.5,y:0},{x:1,y:1},{x:0,y:1},{x:.5,y:0}]}static generateTriangleDown(t,e){return[{x:0,y:0},{x:1,y:0},{x:.5,y:1},{x:0,y:0}]}static generateInput(t,e){let i=e/t.height;return i>1&&(i=1),[{x:0,y:i},{x:1,y:0},{x:1,y:1},{x:0,y:1},{x:0,y:i}]}static generateTrapezoid(t,e){let i=e/t.width;return i>.5&&(i=.5),[{x:i,y:0},{x:1-i,y:0},{x:1,y:1},{x:0,y:1},{x:i,y:0}]}static generateTrapezoidDown(t,e){let i=e/t.width;return i>.5&&(i=.5),[{x:0,y:0},{x:1,y:0},{x:1-i,y:1},{x:i,y:1},{x:0,y:0}]}static generateOctagon(t,e,i){return[{x:e,y:0},{x:1-e,y:0},{x:1,y:i},{x:1,y:1-i},{x:1-e,y:1},{x:e,y:1},{x:0,y:1-i},{x:0,y:i},{x:e,y:0}]}static generateStorage(t,e,i){let n=[];const s=t.width,a=t.height,o=e,r={x:o/s,y:1};n.push(r);let l={left:0,top:0,right:o,bottom:a};n.length=42,n=Utils2.PolyYCurve(n,l,40,0,0,0,0,!0,s,a);for(let h=0;h<40;h++)n[40-h]=n[42+h];return n[41]={x:o/s,y:0},n[42]={x:1,y:0},l={left:s-o,top:0,right:s,bottom:a},o?(l.left-=0,l.right-=0,n.length=43,n=Utils2.PolyYCurve(n,l,40,0,0,0,0,!0,s,a),n.push({x:1,y:1})):(l.top+=0,l.bottom-=0,n=Utils2.PolyYCurve(n,l,40,0,0,0,0,!0,s,a),n.push({x:1,y:(a-0)/a}),n.push({x:1,y:1})),n}static generateHexagon(t,e){let i=e/t.width;return i>.5&&(i=.5),[{x:i,y:0},{x:1-i,y:0},{x:1,y:.5},{x:1-i,y:1},{x:i,y:1},{x:0,y:.5},{x:i,y:0}]}static generatePentagon(t,e){let i=e/t.height;return i>1&&(i=1),[{x:0,y:1-i},{x:0,y:0},{x:1,y:0},{x:1,y:1-i},{x:.5,y:1},{x:0,y:1-i}]}static generatePentagonLeft(t,e){let i=e/t.width;return i>1&&(i=1),[{x:i,y:0},{x:1,y:0},{x:1,y:1},{x:i,y:1},{x:0,y:.5},{x:i,y:0}]}static generateDelay(t,e){let i=[];const n=t.width,s=t.height,a=e;i[0]={x:0,y:1},i[1]={x:0,y:0},i[2]={x:(n-a)/n,y:0};const o={left:n-a,top:0,right:n,bottom:s};return i=Utils2.PolyYCurve(i,o,80,0,0,0,0,!1,n,s),i.push({x:(n-a)/n,y:1}),i}static generateDisplay(t,e){let i=[];const n=t.width,s=t.height,a=e;i[0]={x:a/n,y:1},i[1]={x:0,y:.5},i[2]={x:a/n,y:0},i[3]={x:(n-a)/n,y:0};const o={left:n-a,top:0,right:n,bottom:s};return i=Utils2.PolyYCurve(i,o,80,0,0,0,0,!1,n,s),i.push({x:(n-a)/n,y:1}),i.push({x:a/n,y:1}),i}}class Polygon$1 extends BaseShape{constructor(t){LogUtil.Debug("S.Polygon: Constructor input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.Polygon,super(t),__publicField(this,"VertexArray"),__publicField(this,"FixedPoint"),__publicField(this,"LineOrientation"),__publicField(this,"hoplist"),__publicField(this,"ArrowheadData"),this.VertexArray=t.VertexArray||[],this.FixedPoint=t.FixedPoint||[0,0],this.LineOrientation=t.LineOrientation||OptConstant.LineOrientation.None,this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.dataclass=PolygonConstant.ShapeTypes.POLYGON,LogUtil.Debug("S.Polygon: Constructor output:",this)}ScaleGeometries(t,e,i,n){LogUtil.Debug("S.Polygon: scaleGeometries input:",{svgDoc:t,points:e,width:i,height:n});let s=null,a=null,o=null,r=null,l=null,h=0;const c=this.Geometries.length;for(let u=0;u<c;u++){const c=this.Geometries[u];if(s!==c.shapeid&&(a&&a.Apply(),o=t.GetElementById(OptConstant.SVGElementClass.Shape,c.shapeid),s=c.shapeid,o&&(o.SetSize(i,n),a=o.PathCreator(),a.BeginPath())),!c.NoFill||0===c.MoveTo.length){let t=e[c.Offset];a.MoveTo(t.x,t.y);for(let i=1;i<c.NPoints;i++)t=e[c.Offset+i],a.LineTo(t.x,t.y)}if(c.Closed&&a.ClosePath(),c.MoveTo.length>0){const a=`${s}.${h}`;if(h++,l=t.GetElementById(OptConstant.SVGElementClass.Shape,a),!l)continue;l.SetSize(i,n),r=l.PathCreator(),r.BeginPath();let o=0,u=1,d=e[c.Offset];for(;o<=c.MoveTo.length;){r.MoveTo(d.x,d.y);const t=o<c.MoveTo.length?c.MoveTo[o]:c.NPoints;for(let i=u;i<t;i++)d=e[c.Offset+i],r.LineTo(d.x,d.y);o++,o<c.MoveTo.length&&(d=e[c.MoveTo[o-1]+c.Offset],u=o<c.MoveTo.length?c.MoveTo[o]:c.NPoints)}r.Apply()}}a&&a.Apply(),LogUtil.Debug("S.Polygon: scaleGeometries output:",{svgDoc:t,points:e,width:i,height:n})}CreateShape(t,e){if(LogUtil.Debug("S.Polygon: CreateShape input:",{svgDoc:t,isInteractive:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.Polygon: CreateShape output: null (not visible)"),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer);let n=t.CreateShape(OptConstant.CSType.Polygon);n.SetID(OptConstant.SVGElementClass.Shape);const s=Utils1.DeepCopy(this.Frame);let a=this.StyleRecord;a.Line.BThick&&null==this.polylist&&Utils2.InflateRect(s,a.Line.BThick,a.Line.BThick),a=this.SVGTokenizerHook(a);const o=a.Line.Paint.Color;a.Line.Paint.Opacity;const r=a.Line.Thickness,l=a.Line.LinePattern;this.GetFieldDataStyleOverride();const h=s.width,c=s.height;i.SetSize(h,c),i.SetPos(s.x,s.y),n.SetSize(h,c);const u=this.VertexArray,d=u.length,p=[];for(let b=0;b<d;++b){const t=u[b];p.push({x:t.x*h,y:t.y*c})}if(this.Geometries&&this.Geometries.length){let e=1,n=0;const s=this.Geometries.length;let u=t.CreateShape(OptConstant.CSType.Path);u.SetID(OptConstant.SVGElementClass.Shape),u.SetUserData(e),u.SetSize(h,c);let d=u.PathCreator();d.BeginPath();let g=this.Geometries[0].NoFill,f=this.Geometries[0].NoLine||this.Geometries[0].MoveTo.length>0;for(let a=0;a<s;a++){const s=this.Geometries[a];if(s.NoFill===g&&(s.NoLine||s.MoveTo.length>0)===f||(d&&1===d.pathSegs.length&&"z"===d.pathSegs[0]?d=null:d&&d.Apply(),f?u.SetStrokeWidth(0):(u.SetStrokeColor(o),u.SetStrokeWidth(r),0!==l&&u.SetStrokePattern(l)),i.AddElement(u),u=t.CreateShape(OptConstant.CSType.Path),u.SetID(OptConstant.SVGElementClass.Shape),e++,u.SetUserData(e),u.SetSize(h,c),d=u.PathCreator(),d.BeginPath(),g=s.NoFill,f=s.NoLine||s.MoveTo.length>0),!g||0===s.MoveTo.length){const t=p[s.Offset];d.MoveTo(t.x,t.y);for(let e=1;e<s.NPoints;e++){const t=p[s.Offset+e];d.LineTo(t.x,t.y)}}if(s.Closed&&d.ClosePath(),s.MoveTo.length>0){const a=t.CreateShape(OptConstant.CSType.Path);a.SetID(OptConstant.SVGElementClass.Shape);const o=e+"."+n;n++,a.SetUserData(o),a.SetSize(h,c);const r=a.PathCreator();r.BeginPath();let l=0,u=1,d=p[s.Offset];for(;l<=s.MoveTo.length;){r.MoveTo(d.x,d.y);const t=l<s.MoveTo.length?s.MoveTo[l]:s.NPoints;for(let e=u;e<t;e++)d=p[s.Offset+e],r.LineTo(d.x,d.y);l++,l<s.MoveTo.length&&(d=p[s.MoveTo[l-1]+s.Offset],u=l<s.MoveTo.length?s.MoveTo[l]:s.NPoints)}r.Apply(),i.AddElement(a)}}d&&d.Apply(),f?u.SetStrokeWidth(0):(u.SetStrokeColor(o),u.SetStrokeWidth(r),0!==l&&u.SetStrokePattern(l)),i.AddElement(u),g?u.SetFillColor("none"):this.ApplyStyles(u,a)}else n.SetPoints(p),n.SetStrokeColor(o),n.SetStrokeWidth(r),0!==l&&n.SetStrokePattern(l),i.AddElement(n),this.ApplyStyles(n,a);this.ApplyEffects(i,!1,!1);const g=t.CreateShape(OptConstant.CSType.Polygon);g.SetPoints(p),g.SetStrokeColor("white"),g.SetFillColor("none"),g.SetOpacity(0),g.SetStrokeWidth(r+OptConstant.Common.Slop),e?g.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):g.SetEventBehavior(OptConstant.EventBehavior.None),g.SetID(OptConstant.SVGElementClass.Slop),g.ExcludeFromExport(!0),g.SetSize(h,c),i.AddElement(g);const f=a.Fill.Hatch;if(f&&0!==f){const e=t.CreateShape(OptConstant.CSType.Polygon);e.SetPoints(p),e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(h,c),e.SetStrokeWidth(0),this.SetFillHatch(e,f),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("S.Polygon: CreateShape output:",i),i}Resize(t,e,i,n){if(LogUtil.Debug("S.Polygon: Resize input:",{svgDoc:t,newSize:e,actionTriggerType:i,prevBBox:n}),null!=t){const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=Utils1.DeepCopy(e),r=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);if(this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(o,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),i!==OptConstant.ActionTriggerType.MovePolySeg){t.SetSize(o.width,o.height),t.SetPos(o.x+r.x,o.y+r.y);const i=t.GetElementById(OptConstant.SVGElementClass.Shape),n=this.RegenerateVectors(o.width,o.height);n&&(this.VertexArray=n);const s=this.VertexArray.map((t=>({x:t.x*o.width,y:t.y*o.height})));this.Geometries&&this.Geometries.length?this.ScaleGeometries(t,s,o.width,o.height):(i.SetPoints(s),i.SetSize(o.width,o.height));const a=t.GetElementById(OptConstant.SVGElementClass.Slop);a&&(a.SetPoints(s),a.SetSize(o.width,o.height));const l=t.GetElementById(OptConstant.SVGElementClass.Hatch);l&&(l.SetPoints(s),l.SetSize(e.width,e.height))}return this.LMResizeSVGTextObject(t,i,e),t.SetRotation(n),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("S.Polygon: Resize output:",r),r}}ResizeInTextEdit(t,e){LogUtil.Debug("S.Polygon: ResizeInTextEdit input:",{svgDoc:t,newSize:e});const i=t.GetRotation();this.SetDimensionLinesVisibility(t,!1);const n=Utils1.DeepCopy(this.Frame),s=Utils1.DeepCopy(e),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(n,s,i);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(a,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape),l=this.RegenerateVectors(a.width,a.height);l&&(this.VertexArray=l),this.polylist&&this.ScaleObject(0,0,0,0,0,0);const h=this.VertexArray.map((t=>({x:t.x*a.width,y:t.y*a.height})));r&&(this.Geometries&&this.Geometries.length?this.ScaleGeometries(t,h,a.width,a.height):r.SetPoints(h),r.SetSize(a.width,a.height));const c=t.GetElementById(OptConstant.SVGElementClass.Slop);c&&(c.SetPoints(h),c.SetSize(a.width,a.height));const u=t.GetElementById(OptConstant.SVGElementClass.Hatch);return u&&(u.SetPoints(h),u.SetSize(e.width,e.height)),t.SetRotation(i),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("S.Polygon: ResizeInTextEdit output:",o),o}GetTargetPoints(t,e,i){LogUtil.Debug("S.Polygon: GetTargetPoints input:",{target:t,hookFlags:e,objectID:i});const n=[{x:OptConstant.Common.DimMax/2,y:0},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/2},{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax},{x:0,y:OptConstant.Common.DimMax/2}],s=this.flags&NvConstant.ObjFlags.ContConn&&null!==t&&0==(e&NvConstant.HookFlags.LcNoContinuous),a=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;if(i>=0&&ObjectUtil$1.GetObjectPtr(i,!1),s){const i=this.PolyGetTargets(t,e,this.Frame);return LogUtil.Debug("S.Polygon: GetTargetPoints output:",i),i}if(a){const t=a?this.ConnectPoints:T3Gv.opt.TableGetRowConnectPoints(this,table),e=Utils1.DeepCopy(t);return LogUtil.Debug("S.Polygon: GetTargetPoints output:",e),e}return LogUtil.Debug("S.Polygon: GetTargetPoints output:",n),n}ExtendLines(){}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.Polygon: GetPerimeterPoints input:",{event:t,pointsArray:e,hookType:i,rotateFlag:n,tableID:s,additionalParams:a});let o,r,l=[],h={},c=[0,0];const u=OptConstant.Common.DimMax;if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(h))return l.push(new Point(h.x,h.y)),null!=e[0].id&&(l[0].id=e[0].id),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l;if(i===OptConstant.HookPts.KAT||i===OptConstant.HookPts.KATD)return l=this.BaseDrawingObject_GetPerimPts(t,e,i,!1,s),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l;const d=e.length;if(this.flags&NvConstant.ObjFlags.UseConnect)for(let p=0;p<d;p++)l[p]={x:0,y:0,id:0},l[p].x=e[p].x/u*this.Frame.width+this.Frame.x,l[p].y=e[p].y/u*this.Frame.height+this.Frame.y,null!=e[p].id&&(l[p].id=e[p].id);else{if(this.flags&NvConstant.ObjFlags.ContConn&&!T3Gv.opt.fromOverlayLayer)return l=this.BaseDrawingObject_GetPerimPts(t,e,i,n,s,a),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l;l=this.BaseDrawingObject_GetPerimPts(t,e,i,!0,s,a);const r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),h=r.length;Utils2.EqualPt(r[0],r[h-1])||r.push(new Point(r[0].x,r[0].y));for(let t=0;t<d;t++)e[t].x<u/4?(o=PolyUtil.PolyGetIntersect(r,l[t].y,c,null,!1),o&&(l[t].x=c[0],o>1&&c[1]<l[t].x&&(l[t].x=c[1]))):e[t].x>3*u/4?(o=PolyUtil.PolyGetIntersect(r,l[t].y,c,null,!1),o&&(l[t].x=c[0],o>1&&c[1]>l[t].x&&(l[t].x=c[1]))):e[t].y<u/4?(o=PolyUtil.PolyGetIntersect(r,l[t].x,c,null,!0),o&&(l[t].y=c[0],o>1&&c[1]<l[t].y&&(l[t].y=c[1]))):e[t].y>3*u/4&&(o=PolyUtil.PolyGetIntersect(r,l[t].x,c,null,!0),o&&(l[t].y=c[0],o>1&&c[1]>l[t].y&&(l[t].y=c[1]))),null!=e[t].id&&(l[t].id=e[t].id)}return n||(r=-this.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,r,l)),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l}BaseDrawingObject_GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("S.Polygon: BaseDrawingObject_GetPerimPts input:",{event:t,pointsArray:e,hookType:i,rotateFlag:n,tableID:s,additionalParams:a});const o=[],r=e.length,l=PolygonConstant.ShapeTypes.TRIANGLE,h=OptConstant.Common.DimMax;for(let c=0;c<r;c++){o[c]={x:0,y:0,id:0},o[c].x=e[c].x/h*this.Frame.width+this.Frame.x;const t=this.dataclass===l?h-e[c].y:e[c].y;o[c].y=t/h*this.Frame.height+this.Frame.y,null!=e[c].id&&(o[c].id=e[c].id)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("S.Polygon: BaseDrawingObject_GetPerimPts output:",o),o}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.Polygon: GetPolyPoints input:",{numPoints:t,includeFrameOffset:e,inflate:i,adjustForLineThickness:n,additionalParams:s});let a,o,r={},l=[];Utils2.CopyRect(r,this.Frame);const h=this.StyleRecord.Line.Thickness/2;n&&Utils2.InflateRect(r,h,h);for(let c=0;c<this.VertexArray.length;++c)a=this.VertexArray[c],o={x:a.x*r.width,y:a.y*r.height},l.push(o);if(!e)for(let c=0;c<l.length;c++)l[c].x+=r.x,l[c].y+=r.y;return LogUtil.Debug("S.Polygon: GetPolyPoints output:",l),l}SetShapeIndent(t){LogUtil.Debug("S.Polygon: SetShapeIndent input:",{isIndentNeeded:t});let e,i,n=1,s=1,a=1,o=1,r=[],l={};e=this.inside.width,i=this.inside.height,this.NeedsSIndentCount&&(r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),l=TextUtil.GuessTextIndents(r,this.Frame),this.left_sindent=l.left_sindent,this.right_sindent=l.right_sindent,this.top_sindent=l.top_sindent,this.bottom_sindent=l.bottom_sindent,this.NeedsSIndentCount=!1),t&&(n=1-(this.left_sindent+this.right_sindent),s=1-(this.left_sindent+this.right_sindent),a=1-(this.bottom_sindent+this.top_sindent),o=1-(this.bottom_sindent+this.top_sindent)),this.tindent.left=this.left_sindent*e/n,this.tindent.top=this.top_sindent*i/a,this.tindent.right=this.right_sindent*e/s,this.tindent.bottom=this.bottom_sindent*i/o,LogUtil.Debug("S.Polygon: SetShapeIndent output:",{left:this.tindent.left,top:this.tindent.top,right:this.tindent.right,bottom:this.tindent.bottom})}Flip(t){LogUtil.Debug("S.Polygon: Flip input:",{flipType:t});let e=!0;const i=PolygonConstant.ShapeTypes,n=OptConstant.Common.DimMax;if(this.VertexArray=ToolActUtil.FlipVertexArray(this.VertexArray,t),this.polylist&&Instance.Shape.PolyLine.prototype.Flip.call(this,t),t&OptConstant.ExtraFlags.FlipVert&&null!=this.dataclass){switch(this.dataclass){case i.ARROW_TOP:this.dataclass=i.ARROW_BOTTOM;break;case i.ARROW_BOTTOM:this.dataclass=i.ARROW_TOP;break;case i.TRIANGLE:this.dataclass=i.TRIANGLE_BOTTOM;break;case i.TRIANGLE_BOTTOM:this.dataclass=i.TRIANGLE;break;case i.TRAPEZOID:this.dataclass=i.TRAPEZOID_BOTTOM;break;case i.TRAPEZOID_BOTTOM:this.dataclass=i.TRAPEZOID;break;case i.POLYGON:case i.MEASURE_AREA:e=!1;break;default:this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipVert,!(this.extraflags&OptConstant.ExtraFlags.FlipVert)),e=!1}if(e&&this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints)for(let t=0;t<this.ConnectPoints.length;t++)this.ConnectPoints[t].y=n-this.ConnectPoints[t].y}if(t&OptConstant.ExtraFlags.FlipHoriz&&null!=this.dataclass){switch(this.dataclass){case i.ARROW_LEFT:this.dataclass=i.ARROW_RIGHT;break;case i.ARROW_RIGHT:this.dataclass=i.ARROW_LEFT;break;case i.POLYGON:case i.MEASURE_AREA:e=!1;break;default:this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,!(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)),e=!1}if(e&&this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints)for(let t=0;t<this.ConnectPoints.length;t++)this.ConnectPoints[t].x=n-this.ConnectPoints[t].x}OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),this.hooks.length&&OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move),this.NeedsSIndentCount=!0,this.UpdateFrame(this.Frame),this.Resize(T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),this.Frame,this),LogUtil.Debug("S.Polygon: Flip output:",{flipType:t})}RegenerateVectors(t,e){LogUtil.Debug("S.Polygon: RegenerateVectors input:",{width:t,height:e});let i,n,s,a=null,o=this.shapeparam;switch(this.dataclass){case PolygonConstant.ShapeTypes.PARALLELOGRAM:a=PolygonUtil.generateParallelogram(this.Frame,o);break;case PolygonConstant.ShapeTypes.TERMINAL:a=PolygonUtil.generateTerminal(this.Frame,o);break;case PolygonConstant.ShapeTypes.PENTAGON:i=t/2,o=t/2*(o/i),a=PolygonUtil.generatePentagon(this.Frame,o);break;case PolygonConstant.ShapeTypes.PENTAGON_LEFT:i=e/2,o=e/2*(o/i),a=PolygonUtil.generatePentagonLeft(this.Frame,o);break;case PolygonConstant.ShapeTypes.HEXAGON:i=e/2,o=e/2*(o/i),a=PolygonUtil.generateHexagon(this.Frame,o);break;case PolygonConstant.ShapeTypes.OCTAGON:n=o*e,s=o*t,n<s&&(s=n),e&&(s=e*(s/e)),o=s/t,n=s/e,a=PolygonUtil.generateOctagon(this.Frame,o,n);break;case PolygonConstant.ShapeTypes.ARROW_RIGHT:a=PolygonUtil.generateRightArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.ARROW_LEFT:a=PolygonUtil.generateLeftArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.ARROW_TOP:a=PolygonUtil.generateTopArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.ARROW_BOTTOM:a=PolygonUtil.generateBottomArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.TRAPEZOID:a=PolygonUtil.generateTrapezoid(this.Frame,o);break;case PolygonConstant.ShapeTypes.TRAPEZOID_BOTTOM:a=PolygonUtil.generateTrapezoidDown(this.Frame,o);break;case PolygonConstant.ShapeTypes.INPUT:a=PolygonUtil.generateInput(this.Frame,o);break;case PolygonConstant.ShapeTypes.STORAGE:s=o,a=PolygonUtil.generateStorage(this.Frame,o,s);break;case PolygonConstant.ShapeTypes.DELAY:a=PolygonUtil.generateDelay(this.Frame,o);break;case PolygonConstant.ShapeTypes.DISPLAY:a=PolygonUtil.generateDisplay(this.Frame,o)}const r=this.extraflags;return r&(OptConstant.ExtraFlags.FlipHoriz|OptConstant.ExtraFlags.FlipVert)&&a&&(a=ToolActUtil.FlipVertexArray(a,r)),LogUtil.Debug("S.Polygon: RegenerateVectors output:",a),a}GetParabolaAdjustmentPoint(t,e){LogUtil.Debug("S.Polygon: GetParabolaAdjustmentPoint input:",{point:t,adjustment:e});const i=Instance.Shape.PolyLine.prototype.PrPolyLGetParabolaAdjPoint.call(this,t,e);return LogUtil.Debug("S.Polygon: GetParabolaAdjustmentPoint output:",i),i}GetArcParameters(t,e){LogUtil.Debug("S.Polygon: GetArcParameters input:",{startPoint:t,endPoint:e});const i=Instance.Shape.PolyLine.prototype.PrPolyLGetArc.call(this,t,e);return LogUtil.Debug("S.Polygon: GetArcParameters output:",i),i}GetParabolaParameters(t,e){LogUtil.Debug("S.Polygon: GetParabolaParameters input:",{event:t,target:e});const i=Instance.Shape.PolyLine.prototype.PrPolyLGetParabolaParam.call(this,t,e);return LogUtil.Debug("S.Polygon: GetParabolaParameters output:",i),i}GetArcParameters(t,e,i){LogUtil.Debug("S.Polygon: GetArcParameters input:",{event:t,target:e,additionalParams:i});const n=Instance.Shape.PolyLine.prototype.PrPolyLGetArcParam.call(this,t,e,i);return LogUtil.Debug("S.Polygon: GetArcParameters output:",n),n}GetArcQuadrant(t,e,i){LogUtil.Debug("S.Polygon: GetArcQuadrant input:",{event:t,target:e,additionalParams:i});const n=Instance.Shape.PolyLine.prototype.PrPolyLGetArcQuadrant.call(this,t,e,i);return LogUtil.Debug("S.Polygon: GetArcQuadrant output:",n),n}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("S.Polygon: ScaleObject input:",{x:t,y:e,rotation:i,center:n,scaleX:s,scaleY:a,adjustLineThickness:o});let r=Utils1.DeepCopy(this.Frame);if(s&&a&&(r.x=t+r.x*s,r.y=e+r.y*a,r.width*=s,r.height*=a),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),i){const t={x:r.x+r.width/2,y:r.y+r.height/2},e=2*Math.PI*(i/360),s=T3Gv.opt.RotatePointAroundPoint(n,t,e);r.x=s.x-r.width/2,r.y=s.y-r.height/2,this.RotationAngle+=i,this.RotationAngle>=360&&(this.RotationAngle-=360)}if(o){let t=s;a>t&&(t=a),this.StyleRecord.Line.Thickness*=t,this.StyleRecord.Line.BThick*=t}this.UpdateFrame(r);const l=this.RegenerateVectors(r.width,r.height);l&&(this.VertexArray=l),this.polylist&&Instance.Shape.PolyLine.prototype.ScaleObject.call(this,0,0,0,0,0,0),s&&a&&(this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height),LogUtil.Debug("S.Polygon: ScaleObject output:",{frameCopy:r,regeneratedVectors:l})}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("S.Polygon: UpdateSecondaryDimensions input:",{svgDoc:t,dimensions:e,polyPoints:i});let n=[],s=0;if((this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&this.Dimensions&NvConstant.DimensionFlags.ShowLineAngles&&this.polylist){n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),s=n.length;for(let i=1;i<s;i++)this.DrawDimensionAngle(t,e,i,n)}LogUtil.Debug("S.Polygon: UpdateSecondaryDimensions output:",{pointsArray:n,pointsCount:s})}SetSegmentAngle(t,e,i){LogUtil.Debug("S.Polygon: SetSegmentAngle input:",{segmentIndex:t,angle:e,additionalParams:i}),T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0);ObjectUtil$1.GetObjectPtr(this.BlockID,!1).SetSegmentAngle(t,e,i),T3Gv.opt.PolyLineToShape(this.BlockID),LogUtil.Debug("S.Polygon: SetSegmentAngle output:",{segmentIndex:t,angle:e,additionalParams:i})}DimensionLineDeflectionAdjust(t,e,i,n,s){if(LogUtil.Debug("S.Polygon: DimensionLineDeflectionAdjust input:",{event:t,target:e,angle:i,radius:n,index:s}),!this.polylist){const a=Instance.Shape.BaseShape.prototype.DimensionLineDeflectionAdjust.call(this,t,e,i,n,s);return LogUtil.Debug("S.Polygon: DimensionLineDeflectionAdjust output:",a),a}T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0);ObjectUtil$1.GetObjectPtr(this.BlockID,!1).DimensionLineDeflectionAdjust(t,e,i,n,s),T3Gv.opt.PolyLineToShape(this.BlockID),LogUtil.Debug("S.Polygon: DimensionLineDeflectionAdjust output: completed")}GetDimensionDeflectionValue(t){if(LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue input:",{segmentIndex:t}),this.polylist){if(!this.polylist.segs||0===this.polylist.segs.length||t<0||t>=this.polylist.segs.length)return void LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue output: undefined");const e=this.polylist.segs[t].dimDeflection;return LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue output:",e),e}{const e=Instance.Shape.BaseShape.prototype.GetDimensionDeflectionValue.call(this,t);return LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue output:",e),e}}UpdateDimensionFromTextObj(t,e){let i,n;LogUtil.Debug("S.Polygon: UpdateDimensionFromTextObj input:",{textObj:t,textData:e}),T3Gv.stdObj.PreserveBlock(this.BlockID),e?(i=e.text,n=e.userData):(i=t.GetText(),n=t.GetUserData());const s=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(n.angleChange)return this.UpdateLineAngleDimensionFromText(s,i,n),ObjectUtil$1.AddToDirtyList(this.BlockID),(this.Frame.x<0||this.Frame.y<0)&&T3Gv.opt.ScrollObjectIntoView(this.BlockID,!1),DrawUtil.CompleteOperation(),void LogUtil.Debug("S.Polygon: UpdateDimensionFromTextObj output: angleChange handled");this.polylist&&(this.extraflags&OptConstant.ExtraFlags.SideKnobs)>0?(T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0),ObjectUtil$1.GetObjectPtr(this.BlockID,!1).UpdateDimensionFromText(s,i,n),T3Gv.opt.PolyLineToShape(this.BlockID)):Instance.Shape.BaseShape.prototype.UpdateDimensionFromTextObj.call(this,t,e),LogUtil.Debug("S.Polygon: UpdateDimensionFromTextObj output: dimension updated")}GetDimensionPoints(){let t;if(LogUtil.Debug("S.Polygon: GetDimensionPoints input"),this.polylist&&(this.extraflags&OptConstant.ExtraFlags.SideKnobs)>0){let e=Utils1.DeepCopy(this);e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,e),t=e.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null)}else t=Instance.Shape.BaseShape.prototype.GetDimensionPoints.call(this);return LogUtil.Debug("S.Polygon: GetDimensionPoints output:",t),t}GetPolyRectangularInfo(){LogUtil.Debug("S.Polygon: GetPolyRectangularInfo input");let t,e,i,n=[];if(!this.polylist)return null;if(n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),5!==this.polylist.segs.length||!this.polylist.closed)return null;let s=[];const a=n.length;for(let u=0;u<a;u++)u<a-1&&n[u].x===n[u+1].x&&n[u].y===n[u+1].y||s.push(n[u]);if(n=s,!Utils2.IsRectangular(n)||5!==n.length)return null;const o=Utils2.GetDistanceBetween2Points(n[0],n[1]),r=Utils2.GetDistanceBetween2Points(n[2],n[3]);if(o/r<=.99||o/r>=1.01)return null;const l=Utils2.GetDistanceBetween2Points(n[1],n[2]),h=Utils2.GetDistanceBetween2Points(n[3],n[4]);if(l/h<=.99||l/h>=1.01)return null;i=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(n[0],n[1]),i<Math.PI/4||i>1.5*Math.PI||i>.75*Math.PI&&i<1.25*Math.PI?(t=1,e=2):(t=2,e=1);const c={wdDim:t,htDim:e};return LogUtil.Debug("S.Polygon: GetPolyRectangularInfo output:",c),c}GetDimensionFloatingPointValue(t){LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue input:",{dimensionType:t});let e=0;if(!this.polylist)return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null (no polylist)"),null;if(!(this.rflags&NvConstant.FloatingPointDim.Width||this.rflags&NvConstant.FloatingPointDim.Height))return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null (no floating point dimensions)"),null;const i=this.GetPolyRectangularInfo();if(!i)return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null (no poly rectangular info)"),null;if(i.wdDim===t||i.wdDim+2===t){if(this.rflags&NvConstant.FloatingPointDim.Width){e=this.GetDimensionLengthFromValue(this.rwd);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output:",t),t}}else if((i.htDim===t||i.htDim+2===t)&&this.rflags&NvConstant.FloatingPointDim.Height){e=this.GetDimensionLengthFromValue(this.rht);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output:",t),t}return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null"),null}IsTextFrameOverlap(t,e){if(LogUtil.Debug("S.Polygon: IsTextFrameOverlap input:",{textFrame:t,rotationAngle:e}),!this.polylist)return LogUtil.Debug("S.Polygon: IsTextFrameOverlap output: false (no polylist)"),!1;const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),n=360-e,s=2*Math.PI*(n/360);Utils3.RotatePointsAboutCenter(this.Frame,-s,i);const a=Utils2.IsFrameCornersInPoly(i,t);return LogUtil.Debug("S.Polygon: IsTextFrameOverlap output:",a),a}}class RRect$1 extends BaseShape{constructor(t){LogUtil.Debug("= S.RRect: constructor input:",t);const e=t||{};e.ShapeType=OptConstant.ShapeType.RRect,e.uniType="RRect",super(e),this.dataclass=PolygonConstant.ShapeTypes.ROUNDED_RECTANGLE,LogUtil.Debug("= S.RRect: constructor output:",this)}GetCornerSize(t){LogUtil.Debug("= S.RRect: GetCornerSize input:",t);const e=this.Frame.width,i=this.Frame.height;let n=e;if(i<n&&(n=i),t&&(n=t),this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let t=OptConstant.Common.RRectFixedDim*this.shapeparam;const e=.4*n;return t>e&&(t=e),LogUtil.Debug("= S.RRect: GetCornerSize output:",t),t}const s=n*this.shapeparam;return LogUtil.Debug("= S.RRect: GetCornerSize output:",s),s}CreateShape(t,e){if(LogUtil.Debug("= S.RRect: CreateShape input:",{svgDoc:t,addEventSlop:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("= S.RRect: CreateShape output:",null),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.RRect);n.SetID(OptConstant.SVGElementClass.Shape);const s=Utils1.DeepCopy(this.Frame);let a=this.StyleRecord;a.Line.BThick&&Utils2.InflateRect(s,a.Line.BThick,a.Line.BThick),a=this.SVGTokenizerHook(a);const o=a.Line.Paint.Color,r=a.Line.Thickness,l=a.Line.LinePattern,h=s.width,c=s.height;i.SetSize(h,c),i.SetPos(s.x,s.y),n.SetSize(h,c);const u=this.GetCornerSize();n.SetRRectSize(h,c,u,u),n.SetStrokeColor(o),n.SetStrokeWidth(r),0!==l&&n.SetStrokePattern(l),i.AddElement(n),this.ApplyStyles(n,a),this.ApplyEffects(i,!1,!1);const d=t.CreateShape(OptConstant.CSType.RRect);d.SetStrokeColor("white"),d.SetFillColor("none"),d.SetOpacity(0),d.SetStrokeWidth(r+OptConstant.Common.Slop),e?d.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):d.SetEventBehavior(OptConstant.EventBehavior.None),d.SetID(OptConstant.SVGElementClass.Slop),d.ExcludeFromExport(!0),d.SetRRectSize(h,c,u,u),i.AddElement(d);const p=a.Fill.Hatch;if(p&&0!==p){const e=t.CreateShape(OptConstant.CSType.RRect);e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(h,c),e.SetRRectSize(h,c,u,u),e.SetStrokeWidth(0),this.SetFillHatch(e,p),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("= S.RRect: CreateShape output:",i),i}Resize(t,e,i){LogUtil.Debug("= S.RRect: Resize input:",{svgElement:t,newDimensions:e,drawingContainer:i}),i.SetDimensionLinesVisibility(t,!1);const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=Utils1.DeepCopy(e),r=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(o,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(o.width,o.height),t.SetPos(o.x+r.x,o.y+r.y);const l=t.GetElementById(OptConstant.SVGElementClass.Shape);l.SetSize(o.width,o.height);const h=t.GetElementById(OptConstant.SVGElementClass.Slop);h&&h.SetSize(o.width,o.height);const c=t.GetElementById(OptConstant.SVGElementClass.Hatch);c&&c.SetSize(e.width,e.height);const u=this.GetCornerSize();return l.SetRRectSize(o.width,o.height,u,u),c&&c.SetRRectSize(o.width,o.height,u,u),h&&h.SetRRectSize(o.width,o.height,u,u),this.LMResizeSVGTextObject(t,i,e),t.SetRotation(n),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("= S.RRect: Resize output:",r),r}ResizeInTextEdit(t,e){LogUtil.Debug("= S.RRect: ResizeInTextEdit input:",{svgElement:t,newDimensions:e});const i=t.GetRotation();this.SetDimensionLinesVisibility(t,!1);const n=Utils1.DeepCopy(this.Frame),s=Utils1.DeepCopy(e),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(n,s,i);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(a,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape);r&&r.SetSize(a.width,a.height);const l=t.GetElementById(OptConstant.SVGElementClass.Slop);l&&l.SetSize(a.width,a.height);const h=t.GetElementById(OptConstant.SVGElementClass.Hatch);h&&h.SetSize(a.width,a.height),this.shapeparam;let c=a.width;a.height<c&&(c=a.height);const u=this.GetCornerSize();return r&&r.SetRRectSize(a.width,a.height,u,u),h&&h.SetRRectSize(a.width,a.height,u,u),l&&l.SetRRectSize(a.width,a.height,u,u),t.SetRotation(i),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("= S.RRect: ResizeInTextEdit output:",o),o}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.RRect: GetPolyPoints input:",{divisionCount:t,applyPositionOffset:e,unusedParamA:i,shouldInflateFrame:n,unusedParamI:s});const a=[],o={},r={};Utils2.CopyRect(o,this.Frame);const l=this.StyleRecord.Line.Thickness/2;n&&Utils2.InflateRect(o,l,l);const h=this.GetCornerSize();if(r.x=0,r.y=0,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,h,!0),r.x=0,r.y=o.height-2*h,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,h,0,!0),r.x=o.width-h,r.y=o.height,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,-h,!1),r.x=o.width-h,r.y=2*h,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,-h,0,!1),a.push(new Point$1(a[0].x,a[0].y)),!e)for(let c=0;c<a.length;c++)a[c].x+=o.x,a[c].y+=o.y;return LogUtil.Debug("= S.RRect: GetPolyPoints output:",a),a}ExtendLines(){}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.RRect: GetPerimPts input:",{eventObj:t,hookPoints:e,anchorType:i,keepRotation:n,optionalParam:s,eventData:a});let o=[];const r={},l=[0,0],h=OptConstant.Common.DimMax,c=e.length;if(1===c&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(r))return o.push(new Point$1(r.x,r.y)),null!=e[0].id&&(o[0].id=e[0].id),LogUtil.Debug("= S.RRect: GetPerimPts output:",o),o;if(i===OptConstant.HookPts.KAT&&null==s)return LogUtil.Debug("= S.RRect: GetPerimPts output:",o),new Instance.Shape.BaseDrawObject(this).GetPerimPts(t,e,i,!1,s,a);if(!!(this.flags&NvConstant.ObjFlags.UseConnect))for(let u=0;u<c;u++)o[u]={x:0,y:0,id:0},o[u].x=e[u].x/OptConstant.Common.DimMax*this.Frame.width+this.Frame.x,o[u].y=e[u].y/OptConstant.Common.DimMax*this.Frame.height+this.Frame.y,null!=e[u].id&&(o[u].id=e[u].id);else{o=new BaseDrawObject(this).GetPerimPts(t,e,i,!0,s,a);let n=this.Frame.width;this.Frame.height<n&&(n=this.Frame.height);const r=this.GetCornerSize()*OptConstant.Common.RoundFactor,c=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);for(let t=0;t<o.length;t++){if(0===e[t].x&&0===e[t].y)o[t].x+=r,o[t].y+=r;else if(0===e[t].x&&e[t].y===h)o[t].x+=r,o[t].y-=r;else if(e[t].x===h&&0===e[t].y)o[t].x-=r,o[t].y+=r;else if(e[t].x===h&&e[t].y===h)o[t].x-=r,o[t].y-=r;else if(e[t].x<h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].y,l,null,!1);e&&(o[t].x=l[0],e>1&&l[1]<o[t].x&&(o[t].x=l[1]))}else if(e[t].x>3*h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].y,l,null,!1);e&&(o[t].x=l[0],e>1&&l[1]>o[t].x&&(o[t].x=l[1]))}else if(e[t].y<h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].x,l,null,!0);e&&(o[t].y=l[0],e>1&&l[1]<o[t].y&&(o[t].y=l[1]))}else if(e[t].y>3*h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].x,l,null,!0);e&&(o[t].y=l[0],e>1&&l[1]>o[t].y&&(o[t].y=l[1]))}null!=e[t].id&&(o[t].id=e[t].id)}}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("= S.RRect: GetPerimPts output:",o),o}SetShapeIndent(t){LogUtil.Debug("= S.RRect: SetShapeIndent input:",t);const e=this.inside.width,i=this.inside.height,n=i>e?e:i;let s=this.shapeparam;const a=OptConstant.Common.RoundFactor;let o=n;this.moreflags&OptConstant.ObjMoreFlags.FixedRR&&(o=n,t&&(o=n+2*this.GetCornerSize()*a,o=n+2*this.GetCornerSize(o)*a),s=this.GetCornerSize(o)/o);const r=s*a;this.left_sindent=r,this.top_sindent=r,this.right_sindent=r,this.bottom_sindent=r;let l=1,h=1;t&&(l=1-2*this.left_sindent,h=l),this.tindent.left=this.left_sindent*e/l,this.tindent.top=this.top_sindent*i/h,this.tindent.right=this.right_sindent*e/l,this.tindent.bottom=this.bottom_sindent*i/h,LogUtil.Debug("= S.RRect: SetShapeIndent output:",{left_sindent:this.left_sindent,top_sindent:this.top_sindent,right_sindent:this.right_sindent,bottom_sindent:this.bottom_sindent,tint:this.tindent})}SetShapeProperties(t){LogUtil.Debug("= S.RRect: SetShapeProperties input:",t);let e=!1;const i=OptConstant.ObjMoreFlags.FixedRR;return t.hasrrectselected&&((this.moreflags&i)>0===t.rrectfixed&&t.rrectparam===this.shapeparam||(this.moreflags=Utils2.SetFlag(this.moreflags,i,t.rrectfixed),this.shapeparam=t.rrectparam,this.SetSize(this.Frame.width,0,OptConstant.ActionTriggerType.LineLength),e=!0)),super.SetShapeProperties(t)&&(e=!0),LogUtil.Debug("= S.RRect: SetShapeProperties output:",e),e}}class Oval$1 extends BaseShape{constructor(t){(t=t||{}).ShapeType=OptConstant.ShapeType.Oval,t.Frame,t.uniType="Oval",LogUtil.Debug("S.Oval: Input options:",t),super(t),this.dataclass=this.ObjGrow===OptConstant.GrowBehavior.ProPortional?PolygonConstant.ShapeTypes.CIRCLE:PolygonConstant.ShapeTypes.OVAL,LogUtil.Debug("S.Oval: Output dataclass:",this.dataclass)}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;LogUtil.Debug("S.Oval: Input renderer:",t,"isHidden:",e);const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=Utils1.DeepCopy(this.Frame),s=this.StyleRecord;s.Line.BThick&&Utils2.InflateRect(n,s.Line.BThick,s.Line.BThick);const a=s.Line.Paint.Color,o=s.Line.Thickness,r=s.Line.LinePattern,l=n.width,h=n.height;i.SetSize(l,h),i.SetPos(n.x,n.y);const c=t.CreateShape(OptConstant.CSType.Oval);c.SetSize(l,h),c.SetStrokeColor(a),c.SetStrokeWidth(o),0!==r&&c.SetStrokePattern(r),c.SetID(OptConstant.SVGElementClass.Shape),i.AddElement(c),this.ApplyStyles(c,s),this.ApplyEffects(i,!1,!1);const u=t.CreateShape(OptConstant.CSType.Oval);u.SetStrokeColor("white"),u.SetFillColor("none"),u.SetOpacity(0),u.SetStrokeWidth(o+OptConstant.Common.Slop),e?u.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):u.SetEventBehavior(OptConstant.EventBehavior.None),u.SetID(OptConstant.SVGElementClass.Slop),u.ExcludeFromExport(!0),u.SetSize(l,h),i.AddElement(u);const d=s.Fill.Hatch;if(d&&0!==d){const e=t.CreateShape(OptConstant.CSType.Oval);e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(l,h),e.SetStrokeWidth(0),this.SetFillHatch(e,d),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("S.Oval: Output shapeContainer:",i),i}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.Oval: Input parameters:",{curveType:t,frame:e,inflate:i,isClosed:n,isReversed:s});let a=[],o={},r=this.StyleRecord.Line.Thickness/2;Utils2.CopyRect(o,this.Frame),i&&Utils2.InflateRect(o,r,r);let l={x:o.width/2,y:0,width:o.width/2,height:o.height};PolyUtil.PolyYCurve(a,l,t,0,0,0,0,!1),a.pop();let h={x:0,y:o.height,width:o.width/2,height:-o.height};if(PolyUtil.PolyYCurve(a,h,t,0,0,0,0,!0),a.pop(),!e)for(let c=0;c<a.length;c++)a[c].x+=o.x,a[c].y+=o.y;return LogUtil.Debug("S.Oval: Output points:",a),a}ExtendLines(){LogUtil.Debug("S.Oval: ExtendLines called")}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.Oval: Input parameters:",{event:t,points:e,hookType:i,isClosed:n,tableIndex:s,isReversed:a});let o=[],r=this.Frame.width,l=this.Frame.height,h=r/2,c=l/2,u=OptConstant.Common.DimMax;if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager({}))return o.push(new Point$1(this.Frame.x,this.Frame.y)),null!=e[0].id&&(o[0].id=e[0].id),LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o;if(i===OptConstant.HookPts.KAT)return o=this.BaseDrawingObject_GetPerimPts(t,e,i,!1,s,a),LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o;if(this.flags&NvConstant.ObjFlags.UseConnect)for(let d=0;d<e.length;d++)o[d]={x:e[d].x/u*r+this.Frame.x,y:e[d].y/u*l+this.Frame.y,id:e[d].id||0};else for(let d=0;d<e.length;d++){let t=r*(e[d].x-u/2)/u,i=l*(e[d].y-u/2)/u;if(0!==t&&0!==i){let e=i<0?-1:1,n=1/(t/i*(t/i)/(h*h)+1/(c*c));t=t/i*(i=Math.sqrt(n)*e)}o.push(new Point$1(t+(this.Frame.x+this.Frame.x+r)/2,i+(this.Frame.y+this.Frame.y+l)/2)),null!=e[d].id&&(o[d].id=e[d].id)}if(!n){let t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o}BaseDrawingObject_GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("S.Oval: Input parameters:",{event:t,points:e,hookType:i,isClosed:n,tableIndex:s,isReversed:a});const o=[],r=e.length,l=PolygonConstant.ShapeTypes.TRIANGLE,h=OptConstant.Common.DimMax;for(let c=0;c<r;c++){const t={x:e[c].x/h*this.Frame.width+this.Frame.x,y:(this.dataclass===l?h-e[c].y:e[c].y)/h*this.Frame.height+this.Frame.y,id:e[c].id||0};o.push(t)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o}SetShapeIndent(t){LogUtil.Debug("S.Oval: Input isIndented:",t);const e=OptConstant.Common.RoundFactor/2,i=this.inside.width,n=this.inside.height;this.leftIndent=e,this.topIndent=e,this.rightIndent=e,this.bottomIndent=e;let s=1,a=1,o=1,r=1;t&&(s=o=1-2*this.leftIndent,a=r=s),this.tindent.left=this.leftIndent*i/s,this.tindent.top=this.topIndent*n/a,this.tindent.right=this.rightIndent*i/o,this.tindent.bottom=this.bottomIndent*n/r,LogUtil.Debug("S.Oval: Output tindent:",this.tindent)}}class BaseSymbol extends BaseShape{constructor(t){LogUtil.Debug("S.BaseSymbol - Constructor input:",t),(t=t||{}).ObjGrow=OptConstant.GrowBehavior.All,t.ResizeAspectConstrain=!0,super(t),this.nativeDataArrayBuffer=t.nativeDataArrayBuffer||null,this.SymbolData=t.SymbolData||null,LogUtil.Debug("S.BaseSymbol - Constructor output:",this)}CreateActionTriggers2(t,e,i,n){LogUtil.Debug("S.BaseSymbol - CreateActionTriggers2 input:",{svgDocument:t,triggerId:e,actionHandler:i,releaseHandler:n});const s=super.CreateActionTriggers(t,e,i,n);return LogUtil.Debug("S.BaseSymbol - CreateActionTriggers2 output:",s),s}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.BaseSymbol - CreateActionTriggers input:",{svgDocument:t,triggerId:e,actionHandler:i,releaseHandler:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL],a=t.CreateShape(OptConstant.CSType.Group),o=OptConstant.Common.KnobSize,r=OptConstant.Common.RKnobSize;let l=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(l*=2);const h=o/l,c=r/l,u=this.Frame;let d=u.width,p=u.height;d+=h,p+=h;const g=Utils1.DeepCopy(u);g.x-=h/2,g.y-=h/2,g.width+=h,g.height+=h;let f=i.GetRotation()+22.5;f>=360&&(f=0);const b=Math.floor(f/45),v=s.slice(b).concat(s.slice(0,b)),m={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:h,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1};if(e!==n&&(m.fillColor="white",m.strokeSize=1,m.strokeColor="black",m.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock)m.fillColor="gray",m.locked=!0;else if(this.NoGrow()){m.fillColor="red",m.strokeColor="red";for(let t=0;t<8;t++)v[t]=CursorConstant.CursorType.Default}m.knobID=OptConstant.ActionTriggerType.TopLeft,m.cursorType=v[0];let y=this.GenericKnob(m);return a.AddElement(y),m.x=d-h,m.y=0,m.cursorType=v[2],m.knobID=OptConstant.ActionTriggerType.TopRight,y=this.GenericKnob(m),a.AddElement(y),m.x=d-h,m.y=p-h,m.cursorType=v[4],m.knobID=OptConstant.ActionTriggerType.BottomRight,y=this.GenericKnob(m),a.AddElement(y),m.x=0,m.y=p-h,m.cursorType=v[6],m.knobID=OptConstant.ActionTriggerType.BottomLeft,y=this.GenericKnob(m),a.AddElement(y),m.locked||this.NoGrow()||(m.shapeType=OptConstant.CSType.Oval,m.x=d-3*c,m.y=p/2-c/2,m.cursorType=CursorConstant.CursorType.Rotate,m.knobID=OptConstant.ActionTriggerType.Rotate,m.fillColor="white",m.fillOpacity=.001,m.strokeSize=1.5,m.strokeColor="#555555",y=this.GenericKnob(m),a.AddElement(y)),a.SetSize(d,p),a.SetPos(g.x,g.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.BaseSymbol - CreateActionTriggers output:",a),a}ChangeShape(t,e,i,n,s){LogUtil.Debug("S.BaseSymbol - ChangeShape input:",{event:t,targetElement:e,newProperties:i,previousState:n,additionalData:s});return LogUtil.Debug("S.BaseSymbol - ChangeShape output:",false),false}Flip(t){if(LogUtil.Debug("S.BaseSymbol - Flip input:",t),T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),t&OptConstant.ExtraFlags.FlipHoriz){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,!t)}if(t&OptConstant.ExtraFlags.FlipVert){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipVert);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipVert,!t)}LogUtil.Debug("S.BaseSymbol - Flip output:",this.extraflags)}LMActionPreTrack(t,e){LogUtil.Debug("S.BaseSymbol - LMActionPreTrack input:",{event:t,trigger:e}),-1!==this.DataID&&(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)&&T3Gv.opt.actionSvgObject.textElem.SetVisible(!1),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),LogUtil.Debug("S.BaseSymbol - LMActionPreTrack output: completed")}LMActionPostRelease(t){LogUtil.Debug("S.BaseSymbol - LMActionPostRelease input:",t),-1!==this.DataID&&(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)&&T3Gv.opt.actionSvgObject.textElem.SetVisible(!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.UpdateLinks(),T3Gv.opt.linkParams=null,this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height,LogUtil.Debug("S.BaseSymbol - LMActionPostRelease output: completed")}}var LockOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},LockOutlinedSvg=LockOutlined$2;function _objectSpread$1(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?Object(arguments[e]):{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})))),n.forEach((function(e){_defineProperty$1(t,e,i[e])}))}return t}function _defineProperty$1(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var LockOutlined=function(t,e){var i=_objectSpread$1({},t,e.attrs);return createVNode(AntdIcon,_objectSpread$1({},i,{icon:LockOutlinedSvg}),null)};LockOutlined.displayName="LockOutlined",LockOutlined.inheritAttrs=!1;var LockOutlined$1=LockOutlined,UnlockOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},UnlockOutlinedSvg=UnlockOutlined$2;function _objectSpread(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?Object(arguments[e]):{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})))),n.forEach((function(e){_defineProperty(t,e,i[e])}))}return t}function _defineProperty(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var UnlockOutlined=function(t,e){var i=_objectSpread({},t,e.attrs);return createVNode(AntdIcon,_objectSpread({},i,{icon:UnlockOutlinedSvg}),null)};UnlockOutlined.displayName="UnlockOutlined",UnlockOutlined.inheritAttrs=!1;var UnlockOutlined$1=UnlockOutlined;class AntdUtil{static ShowNotification(t,e,i){notification[t]({message:e,description:i,style:{fontSize:"12px"},duration:730,placement:"topRight",onClick:()=>{LogUtil.Debug("= u.AntdUtil: ShowNotification/ Message callback clicked")}})}static ShowTopAlert(t,e,i){globalMsgShow.value=!0,commonMsg.value=i;const n=globalMsgShow.value?AdjustVlScrollHeight:0;T3Gv.docUtil&&T3Gv.docUtil.UpdateWorkArea(n)}static CloseGlobalMsg(){globalMsgShow.value=!1;const t=globalMsgShow.value?AdjustVlScrollHeight:0;T3Gv.docUtil&&T3Gv.docUtil.UpdateWorkArea(t)}static ShowMessage(t,e){switch(t){case"error":message.error(e);break;case"warning":message.warning(e);break;case"success":message.success(e)}}}const insertT3EntryDialog=ref$1({active:!1,data:null});class IdxPage2{constructor(){__publicField(this,"webview",null==(_a=window.chrome)?void 0:_a.webview),__publicField(this,"$q"),__publicField(this,"getPanelsInterval"),__publicField(this,"autoSaveInterval"),__publicField(this,"lastDragClientX",0),__publicField(this,"lastDragClientY",0),__publicField(this,"lastDropClientX",0),__publicField(this,"lastDropClientY",0)}initPage(){}initQuasar(t){this.$q=t,Hvac.WebClient.initQuasar(this.$q),Hvac.QuasarUtil.initQuasar(this.$q)}initGlobalNav(){globalNav.value.title="HVAC Drawer",globalNav.value.back=null,globalNav.value.home="/"}restoreAppState(){var t;if(null==(t=this.webview)?void 0:t.postMessage)return;const e=Hvac.LsOpt.loadParsedAppStateLS();e&&(DataOpt.repairDuplicateIds(e),appStateV2.value=e)}isLoggedIn(){this.$q.cookies.has("token")?(liveApi.get("hvacTools").then((async t=>{const e=await t.json();e.length>0&&(null==e||e.forEach((t=>{this.addOnlineLibImage(t)})))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("hvacObjectLibs").then((async t=>{const e=await t.json();e.length>0&&e.forEach((t=>{library.value.objLib.push({id:t.id,label:t.label,items:t.items,online:!0})}))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("me").then((async t=>{user.value=await t.json()})).catch((t=>{}))):user.value=null}static autoManualToggle(t){LogUtil.Debug("5555555 IndexPage2.vue->autoManualToggle->item, locked value",t),t.t3Entry.auto_manual=t.t3Entry.auto_manual?0:1,this.T3UpdateEntryField("auto_manual",t)}static T3UpdateEntryField(t,e){if(!e.t3Entry)return;let i=e.t3Entry[t];const n=i;Math.abs(i)>=1e3&&(i/=1e3),"value"!==t&&"control"!==t||IdxUtils.refreshObjectStatus(e);const s={action:3,field:t,value:i,panelId:e.t3Entry.pid,entryIndex:e.t3Entry.index,entryType:T3_Types[e.t3Entry.type]};isBuiltInEdge.value?Hvac.WebClient.UpdateEntry(s):Hvac.WsClient.UpdateEntry(s),LogUtil.Debug("= Idx T3UpdateEntryField to T3 before, after",n,i)}initFetchPanelEntryInterval(){var t;(null==(t=this.webview)?void 0:t.postMessage)&&(this.getPanelsInterval=setInterval((()=>{Hvac.WebClient.GetPanelsList()}),1e4),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(t.length<=0)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac.WebClient.GetEntries(null,null,e)}),1e4))}initMessageClient(){if(isBuiltInEdge.value)return Hvac.WebClient.GetInitialData(),Hvac.WebClient.GetPanelsList(),void this.initFetchPanelEntryInterval();isBuiltInEdge.value||this.initExternalBrowserOpt()}initExternalBrowserOpt(){isBuiltInEdge.value||(Hvac.WsClient.initQuasar(this.$q),Hvac.WsClient.connect(),setTimeout((()=>{const t=Hvac.DeviceOpt.getCurrentDevice();t?(deviceModel.value.active=!1,deviceModel.value.data=t,Hvac.WsClient.GetInitialData(t.deviceId,t.graphic,!0)):deviceModel.value.active=!0}),1e3),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(0===t.length)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac.WsClient.GetEntries(e)}),1e4))}save(t=!1,e=!1){LogUtil.Debug("= Idx2 save to local storage",(new Date).toLocaleString()),savedNotify.value=t,DataOpt.SaveToLocalStorage(),e&&DataOpt.SaveToT3000()}saveToLocal(){const t=this.prepareSaveData();Hvac.LsOpt.saveAppState(t),isBuiltInEdge.value||Hvac.DeviceOpt.saveDeviceAppState(deviceAppState,deviceModel,t)}saveToT3000(){const t=this.prepareSaveData();if(isBuiltInEdge.value)Hvac.WebClient.SaveGraphicData(null,null,t);else{if(globalMsg.value.find((t=>"get_initial_data"===t.msgType)))return void LogUtil.Debug("= Idx save to T3000 with initial data status error, cancel auto save");const e=Hvac.DeviceOpt.getCurrentDevice(),i=null==e?void 0:e.deviceId,n=null==e?void 0:e.graphic;i&&n?Hvac.WsClient.SaveGraphic(i,n,t):LogUtil.Debug("= Idx save to T3000 current device is null")}}initAutoSaveInterval(){setTimeout((()=>{this.autoSaveInterval=setInterval((()=>{this.save(!0,!0)}),15e3)}),1e4)}prepareSaveData(){const t=lodash.exports.cloneDeep(toRaw(appStateV2.value));return t.selectedTargets=[],t.elementGuidelines=[],t.rulersGridVisible=rulersGridVisible.value,t}T3UpdateEntryField(t,e){if(LogUtil.Debug("idx page 2  T3UpdateEntryField appState before",appStateV2.value),!e.t3Entry)return;let i=e.t3Entry[t];const n=i;Math.abs(i)>=1e3&&(i/=1e3),"value"!==t&&"control"!==t||IdxUtils.refreshObjectStatus(e);const s={action:3,field:t,value:i,panelId:e.t3Entry.pid,entryIndex:e.t3Entry.index,entryType:T3_Types[e.t3Entry.type]};isBuiltInEdge.value?Hvac.WebClient.UpdateEntry(s):Hvac.WsClient.UpdateEntry(s),LogUtil.Debug("= Idx T3UpdateEntryField to T3 before, after",n,i)}addOnlineLibImage(t){const e=library.value.images.findIndex((e=>e.id==="IMG-"+t.id));-1!==e&&library.value.images.splice(e,1),library.value.images.push({id:"IMG-"+t.id,dbId:t.id,name:t.name,path:{}.API_URL+"/file/"+t.file.path,online:!0})}addToNewLibrary(){if(appStateV2.value.selectedTargets.length<1||locked.value)return;const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`))));let e=!1;const i=lodash.exports.cloneDeep(t);library.value.objLibItemsCount++;let n=null;user.value&&(e=!0,liveApi.post("hvacObjectLibs",{json:{label:"Item "+library.value.objLibItemsCount,items:i.map((t=>(delete t.id,t)))}}).then((async t=>{n=await t.json(),AntdUtil.ShowMessage("success","Successfully saved to library"),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:n.items,online:e}),IdxUtils.saveNewLib()})).catch((t=>{AntdUtil.ShowMessage("error",t.message)}))),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:i,online:e}),IdxUtils.saveNewLib()}viewportLeftClick(t){t.preventDefault();if(!locked.value&&"Pointer"!==selectedTool.value.name&&"Wall"!=selectedTool.value.name&&!isDrawing.value&&"Int_Ext_Wall"!=selectedTool.value.name&&"Duct"!=selectedTool.value.name){var e={rect:{width:60,height:60,top:t.clientY,left:t.clientX},clientX:t.clientX,clientY:t.clientY};onSelectoDragEnd(e),this.selectTool(tools[0])}}selectTool(t,e="default"){LogUtil.Debug("= IdxPage selectTool",t,e),selectedTool.value=t,"string"==typeof t&&(selectedTool.value=tools.find((e=>e.name===t))),selectedTool.value.type=e,Hvac.UI.evtOpt.HandleSidebarToolEvent(selectedTool)}viewportRightClick(t){t.preventDefault(),this.selectTool(tools[0]),isDrawing.value&&(isDrawing.value=!1,this.undoAction(),setTimeout((()=>{this.refreshObjects()}),10),Hvac.PageMain.ClearItemsWithZeroWidth(appStateV2),Hvac.PageMain.SetWallDimensionsVisible("all",isDrawing.value,appStateV2,!1))}undoAction(){if(undoHistory.value.length<1)return;redoHistory.value.unshift({title:lastAction,state:lodash.exports.cloneDeep(appStateV2.value)});const t=lodash.exports.cloneDeep(undoHistory.value[0].state);DataOpt.repairDuplicateIds(t),appStateV2.value=t,undoHistory.value.shift(),Hvac.IdxPage.refreshMoveable()}redoAction(){if(redoHistory.value.length<1)return;undoHistory.value.unshift({title:lastAction,state:lodash.exports.cloneDeep(appStateV2.value)});const t=lodash.exports.cloneDeep(redoHistory.value[0].state);DataOpt.repairDuplicateIds(t),appStateV2.value=t,redoHistory.value.shift(),Hvac.IdxPage.refreshMoveable()}updateWeldModelCanvas(t,e){appStateV2.value.items.map((i=>{var n,s,a;if(("Weld_General"===i.type||"Weld_Duct"===i.type)&&i.id===t.id){const t=null==(n=null==i?void 0:i.weldItems[0])?void 0:n.translate[0],o=null==(s=null==i?void 0:i.weldItems[0])?void 0:s.translate[1];null==(a=null==i?void 0:i.weldItems)||a.forEach((i=>{const n=null==e?void 0:e.find((t=>{var e;return(null==(e=null==t?void 0:t.item)?void 0:e.id)===(null==i?void 0:i.id)}));n&&(i.width=n.newPos.width,i.height=n.newPos.height,i.translate[0]=t+n.newPos.trsx,i.translate[1]=o+n.newPos.trsy)}))}}))}updateWeldModel(t,e){appStateV2.value.items.map((i=>{"Weld"===i.type&&i.id===t.id&&(i.settings.weldItems=e)}))}toggleRulersGrid(t){rulersGridVisible.value="Enable"===t,appStateV2.value.rulersGridVisible=rulersGridVisible.value,this.save(!1,!1)}convertObjectType(t,e){var i;if(t||(t=appStateV2.value.items[appStateV2.value.activeItemIndex]),!t)return;addActionToHistory("Convert object to "+e);const n=lodash.exports.cloneDeep(null==(i=tools.find((t=>t.name===e)))?void 0:i.settings)||{},s=Object.keys(n).reduce(((t,e)=>(t[e]=n[e].value,t)),{}),a={};for(const r in s)Object.hasOwnProperty.call(s,r)&&(void 0!==t.settings[r]?a[r]=t.settings[r]:a[r]=s[r]);const o=["bgColor","textColor","title","t3EntryDisplayField"];for(const r of o)void 0===a[r]&&(a[r]=t.settings[r]);t.type=e,t.settings=a}deleteLibImage(t){t.online&&liveApi.delete("hvacTools/"+t.dbId||t.id.slice(4)).then((async()=>{this.$q.notify({type:"positive",message:"Successfully deleted"})})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}));const e=library.value.images.findIndex((e=>e.name===t.name));if(-1!==e&&(library.value.images.splice(e,1),!t.online)){if(library.value.images.length<=0)return;const t=lodash.exports.cloneDeep(library.value.images[e].path);isBuiltInEdge.value?Hvac.WebClient.DeleteImage(toRaw(t)):Hvac.WsClient.DeleteImage(toRaw(t)),IdxUtils.saveLib()}}renameLibItem(t,e){user.value&&t.online&&liveApi.patch("hvacObjectLibs/"+t.id,{json:{label:e}}).then((async()=>{this.$q.notify({type:"positive",message:"Successfully updated"})})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}));const i=library.value.objLib.findIndex((e=>e.name===t.name));-1!==i&&(library.value.objLib[i].label=e),IdxUtils.saveLib()}deleteLibItem(t){user.value&&t.online&&liveApi.delete("hvacObjectLibs/"+t.id).then((async()=>{this.$q.notify({type:"positive",message:"Successfully deleted"})})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}));const e=library.value.objLib.findIndex((e=>e.name===t.name));-1!==e&&library.value.objLib.splice(e,1),IdxUtils.saveLib()}pasteFromClipboard(){if(locked.value)return;let t=[];const e=localStorage.getItem("clipboard");if(e&&(t=JSON.parse(e)),!t)return;this.addActionToHistory("Paste");const i=[],n=[];t.forEach((t=>{n.push(this.cloneObject(t))})),setTimeout((()=>{n.forEach((t=>{const e=document.querySelector(`#moveable-item-${t.id}`);i.push(e)})),appStateV2.value.selectedTargets=i,selecto.value.setSelectedTargets(i),appStateV2.value.activeItemIndex=null}),10)}saveSelectedToClipboard(){if(locked.value)return;if(0===appStateV2.value.selectedTargets.length)return;const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`))));localStorage.setItem("clipboard",JSON.stringify(t)),clipboardFull.value=!0}rotate90Selected(t=!1){moveable.value.request("rotatable",{deltaRotate:t?-90:90},!0),Hvac.IdxPage.refreshMoveable()}sendSelectedToBack(){this.addActionToHistory("Send selected objects to back");appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))).forEach((t=>{t.zindex=t.zindex-1}))}bringSelectedToFront(){this.addActionToHistory("Bring selected objects to front");appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))).forEach((t=>{t.zindex=t.zindex+1}))}objectSettingsUnchanged(){undoHistory.value.shift()}addToLibrary(){if(appStateV2.value.selectedTargets.length<1||locked.value)return;const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`))));let e=!1;const i=lodash.exports.cloneDeep(t);library.value.objLibItemsCount++;let n=null;user.value&&(e=!0,liveApi.post("hvacObjectLibs",{json:{label:"Item "+library.value.objLibItemsCount,items:i.map((t=>(delete t.id,t)))}}).then((async t=>{n=await t.json(),this.$q.notify({type:"positive",message:"Successfully saved to library"}),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:n.items,online:e}),IdxUtils.saveLib()})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}))),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:i,online:e}),IdxUtils.saveLib()}navGoBack(){if(grpNav.value.length>1){const t=grpNav.value[grpNav.value.length-2],e={action:7,panelId:t.pid,entryIndex:t.index};isBuiltInEdge.value?Hvac.WebClient.LoadGraphicEntry(e):Hvac.WsClient.LoadGraphicEntry(e)}else if(isBuiltInEdge.value)Hvac.WebClient.GetInitialData();else{const t=Hvac.DeviceOpt.getCurrentDevice(),e=t.panelId,i=t.graphic;Hvac.WsClient.GetInitialData(e,i,!0)}}setTheSettingContextMenuVisible(){if(appStateV2.value.selectedTargets.length>1)topContextToggleVisible.value=!1,toggleValueShow.value=!1,toggleNumberShow.value=!1;else if(1===appStateV2.value.selectedTargets.length){const t=appStateV2.value.items.find((t=>`moveable-item-${t.id}`===appStateV2.value.selectedTargets[0].id));null!==t.t3Entry?(topContextToggleVisible.value=!0,this.ObjectRightClicked(t,null)):(topContextToggleVisible.value=!1,toggleValueShow.value=!1,toggleNumberShow.value=!1)}}toggleClicked(t,e,i){"mode"===e&&("Auto"===toggleModeValue.value?(toggleValueDisable.value=!0,toggleNumberDisable.value=!0):(toggleValueDisable.value=!1,toggleNumberDisable.value=!1),t.t3Entry.auto_manual="Auto"===toggleModeValue.value?0:1,this.T3UpdateEntryField("auto_manual",t)),"value"==e&&(t.t3Entry.control="Off"===toggleValueValue.value?0:1,this.T3UpdateEntryField("control",t)),"number-value"===e&&(t.t3Entry.value=1*toggleNumberValue.value,this.T3UpdateEntryField("value",t)),this.save(!1,!0)}ObjectRightClicked(t,e){null!==t.t3Entry?(showSettingMenu.value=!0,1===t.t3Entry.auto_manual?(toggleModeValue.value="Manual",toggleValueDisable.value=!1,toggleNumberDisable.value=!1):(toggleModeValue.value="Auto",toggleValueDisable.value=!0,toggleNumberDisable.value=!0),0===t.t3Entry.digital_analog?toggleValueShow.value=!0:toggleValueShow.value=!1,1===t.t3Entry.control?toggleValueValue.value="On":toggleValueValue.value="Off",1===t.t3Entry.digital_analog&&101!==t.t3Entry.range?(toggleNumberShow.value=!0,toggleNumberValue.value=1*t.t3Entry.value):toggleNumberShow.value=!1):showSettingMenu.value=!1}changeEntryValue(t,e,i){const n=i?"control":"value",s=appStateV2.value.items.find((e=>e.id===t.id));s.t3Entry[n]=e,this.T3UpdateEntryField(n,s)}autoManualToggle(t){LogUtil.Debug("5555555 IndexPage.vue->autoManualToggle->item, locked value",t),t.t3Entry.auto_manual=t.t3Entry.auto_manual?0:1,this.T3UpdateEntryField("auto_manual",t)}objectClicked(t){var e,i,n,s,a;if(LogUtil.Debug("= P.IDX2 objectClicked"),this.setTheSettingContextMenuVisible(),locked.value)if("GRP"===(null==(e=t.t3Entry)?void 0:e.type)){const e={action:7,panelId:t.t3Entry.pid,entryIndex:t.t3Entry.index};isBuiltInEdge.value?Hvac.WebClient.LoadGraphicEntry(e):Hvac.WsClient.LoadGraphicEntry(e)}else if(["SCHEDULE","PROGRAM","HOLIDAY"].includes(null==(i=t.t3Entry)?void 0:i.type)){const e={action:8,panelId:t.t3Entry.pid,entryType:T3_Types[t.t3Entry.type],entryIndex:t.t3Entry.index};isBuiltInEdge.value?Hvac.WebClient.OpenEntryEditWindow(e):Hvac.WsClient.OpenEntryEditWindow(e)}else 1===(null==(n=t.t3Entry)?void 0:n.auto_manual)&&0===(null==(s=t.t3Entry)?void 0:s.digital_analog)&&(null==(a=t.t3Entry)?void 0:a.range)&&(t.t3Entry.control=1===t.t3Entry.control?0:1,this.T3UpdateEntryField("control",t))}lockToggle(){appStateV2.value.activeItemIndex=null,appStateV2.value.selectedTargets=[],locked.value=!locked.value,locked.value&&this.selectTool("Pointer"),Hvac.IdxPage.restDocumentAreaPosition()}entryLabel(t){let e=t.description&&t.id!==t.description||!t.description&&t.id!==t.label?t.id+" - ":"";return e=t.description||t.label?e:t.id,e+(t.description||t.label||"")}reloadPanelsData(){T3000_Data.value.loadingPanel=null,isBuiltInEdge.value?Hvac.WebClient.GetPanelsList():Hvac.WsClient.GetPanelsList()}duplicateSelected(){if(appStateV2.value.selectedTargets.length<1)return;this.addActionToHistory("Duplicate the selected objects");const t=[],e={};appStateV2.value.selectedTargets.forEach((i=>{const n=appStateV2.value.items.find((t=>`moveable-item-${t.id}`===i.id));if(n){let i;n.group&&(e[`${n.group}`]||(appStateV2.value.groupCount++,e[`${n.group}`]=appStateV2.value.groupCount),i=e[`${n.group}`]);const s=this.cloneObject(n,i);setTimeout((()=>{const e=document.querySelector(`#moveable-item-${s.id}`);t.push(e)}),10)}})),setTimeout((()=>{appStateV2.value.selectedTargets=t,selecto.value.setSelectedTargets(t),appStateV2.value.activeItemIndex=null}),20)}executeImportFromJson(){var t,e;const i=JSON.parse(importJsonDialog.value.data);(null==(t=i.items)?void 0:t[0].type)?(null==(e=appStateV2.value.items)?void 0:e.length)>0?this.$q.dialog({dark:!0,title:"You have unsaved drawing!",message:"Before proceeding with the import, please note that any unsaved drawing will be lost,\n           and your undo history will also be erased. Are you sure you want to proceed?",cancel:!0,persistent:!0}).onOk((()=>{undoHistory.value=[],redoHistory.value=[],importJsonDialog.value.active=!1,DataOpt.repairDuplicateIds(i),appStateV2.value=i,importJsonDialog.value.data=null,setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100),Hvac.IdxPage.refreshMoveable()})).onCancel((()=>{importJsonDialog.value.active=!1})):(undoHistory.value=[],redoHistory.value=[],importJsonDialog.value.active=!1,DataOpt.repairDuplicateIds(i),appStateV2.value=i,importJsonDialog.value.data=null,setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100),Hvac.IdxPage.refreshMoveable()):this.$q.notify({message:"Error, Invalid json file",color:"negative",icon:"error",actions:[{label:"Dismiss",color:"white",handler:()=>{}}]})}async saveLibImage(t){if(user.value)return LogUtil.Debug("= Idx saveLibImage file",t),LogUtil.Debug("= Idx saveLibImage user",user.value),void liveApi.post("hvacTools",{json:{name:t.name,fileId:t.id}}).then((async t=>{this.$q.notify({color:"positive",message:"Image successfully saved"});const e=await t.json();this.addOnlineLibImage(e)})).catch((t=>{this.$q.notify({color:"negative",message:t.message})}));library.value.imagesCount++;const e={action:9,filename:t.name,fileLength:t.size,fileData:await this.readFile(t.data)};isBuiltInEdge.value?Hvac.WebClient.SaveImage(e):Hvac.WsClient.SaveImage(e)}drawObject(t,e,i){var n,s,a,o;if("libItem"===(i=i||selectedTool.value).type)return void this.addLibItem(i.items,t,e);const r=1/appStateV2.value.viewportTransform.scale,l=lodash.exports.cloneDeep(null==(n=tools.find((t=>t.name===i.name)))?void 0:n.settings)||{},h=Object.keys(l).reduce(((t,e)=>(t[e]=l[e].value,t)),{});"G_Rectangle"===i.name&&(t.width=100);const c=null!=(o=null==(a=null==(s=viewport.value)?void 0:s.getBoundingClientRect)?void 0:a.call(s))?o:{left:viewportMargins.left,top:viewportMargins.top},u={title:null,active:!1,type:i.name,translate:[(e.left-c.left)*r,(e.top-c.top)*r],width:t.width*r,height:t.height*r,rotate:0,scaleX:1,scaleY:1,settings:h,zindex:1,t3Entry:null,showDimensions:!0};if("Image"===i.type&&(u.image=i,u.type=i.id),i.cat){const[t]=i.cat;u.cat=t}const d=this.addObject(u);return["Value","Icon","Switch"].includes(i.name)&&(linkT3EntryDialog.value.active=!0),setTimeout((()=>{locked.value||(appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((t=>t.id===d.id)))}),10),setTimeout((()=>{if(locked.value)return;const t=document.querySelector(`#moveable-item-${d.id}`);appStateV2.value.selectedTargets=[t],selecto.value.setSelectedTargets([t])}),100),d}onCanvasDragOver(t){0===t.clientX&&0===t.clientY||(this.lastDragClientX=t.clientX,this.lastDragClientY=t.clientY)}onCanvasDrop(t){0===t.clientX&&0===t.clientY||(this.lastDropClientX=t.clientX,this.lastDropClientY=t.clientY)}toolDropped(t,e){const i="Int_Ext_Wall"===e.name?{width:200,height:10}:{width:60,height:60};let n,s;0!==this.lastDropClientX||0!==this.lastDropClientY?(n=this.lastDropClientX,s=this.lastDropClientY,this.lastDropClientX=0,this.lastDropClientY=0):0!==t.clientX||0!==t.clientY?(n=t.clientX,s=t.clientY):(n=this.lastDragClientX,s=this.lastDragClientY),this.drawObject(i,{clientX:n,clientY:s,top:s,left:n},e)}ungroupSelected(){appStateV2.value.selectedTargets.length<2||(this.addActionToHistory("Ungroup the selected objects"),appStateV2.value.selectedTargets.length>0&&appStateV2.value.selectedTargets.forEach((t=>{const e=appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.id));e&&(e.group=void 0)})))}groupSelected(){appStateV2.value.selectedTargets.length<2||(this.addActionToHistory("Group the selected objects"),appStateV2.value.selectedTargets.length>0&&(appStateV2.value.groupCount++,appStateV2.value.selectedTargets.forEach((t=>{const e=appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.id));e&&(e.group=appStateV2.value.groupCount)}))))}exportToJsonAction(){const t=lodash.exports.cloneDeep(toRaw(appStateV2.value));t.selectedTargets=[],t.elementGuidelines=[];const e=document.createElement("a"),i=new Blob([JSON.stringify(t)],{type:"application/json"});e.href=URL.createObjectURL(i),e.download="HVAC_Drawer_Project.json",e.click()}gaugeSettingsSave(t){const e=appStateV2.value.items.findIndex((e=>e.id===t.id));appStateV2.value.items[e]=t,gaugeSettingsDialog.value.active=!1,gaugeSettingsDialog.value.data={}}gaugeSettingsDialogAction(t){gaugeSettingsDialog.value.active=!0,gaugeSettingsDialog.value.data=t}readFile(t){return new Promise(((e,i)=>{var n=new FileReader;n.onload=()=>{e(n.result)},n.onerror=i,n.readAsDataURL(t)}))}weldSelected(){if(appStateV2.value.selectedTargets.length<2)return;if(appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))).some((t=>"Weld"===t.type)))return void this.$q.notify({type:"warning",message:"Currently not supported!"});this.addActionToHistory("Weld selected objects");const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))),e=t.every((t=>"General"===t.cat)),i=t.every((t=>"Duct"===t.type));e||i?this.drawWeldObjectCanvas(t):this.drawWeldObject(t),t.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>e.id===t.id));-1!==e&&appStateV2.value.items.splice(e,1)})),Hvac.IdxPage.refreshMoveable()}checkIsOverlap(t){const e=[];return t.map((t=>{const i=document.querySelector(`#moveable-item-${t.id} .duct-start`),n=document.querySelector(`#moveable-item-${t.id} .duct-end`),s=this.isDuctOverlap(i),a=this.isDuctOverlap(n);e.push({id:t.id,isStartOverlap:s,isEndOverlap:a})})),e}isDuctOverlap(t){const e=t.closest(".moveable-item.Duct"),i=getElementInfo(t),n=document.querySelectorAll(".moveable-item.Duct");for(const s of Array.from(n)){if(e.isSameNode(s))continue;const t=getElementInfo(s),n=getDuctPoints(i),a=getDuctPoints(t);if(getOverlapSize(n,a)>0)return!0}return!1}getDuctPoints(t){const{left:e,top:i,pos1:n,pos2:s,pos3:a,pos4:o}=t;return[n,s,o,a].map((t=>[e+t[0],i+t[1]]))}drawWeldObjectCanvas(t){const e=1/appStateV2.value.viewportTransform.scale,i=t[0].translate[0];t[0].translate[1];const n=Math.min(...t.map((t=>t.translate[0])));let s=Math.min(...t.map((t=>t.translate[1])));const a=Math.max(...t.map((t=>t.translate[0]+t.width))),o=Math.max(...t.map((t=>t.translate[1]+t.height)));let r=i<n?i:n;const l=t.reduce(((t,e)=>{const i=e.rotate*Math.PI/180,n=Math.cos(i),s=Math.sin(i);return[{x:e.translate[0],y:e.translate[1]},{x:e.translate[0]+e.width*n,y:e.translate[1]+e.width*s},{x:e.translate[0]-e.height*s,y:e.translate[1]+e.height*n},{x:e.translate[0]+e.width*n-e.height*s,y:e.translate[1]+e.width*s+e.height*n}].forEach((e=>{t.minX=Math.min(t.minX,e.x),t.minY=Math.min(t.minY,e.y),t.maxX=Math.max(t.maxX,e.x),t.maxY=Math.max(t.maxY,e.y)})),t}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});l.minX,l.minY,l.maxX,l.minX,l.maxY,l.minY;const h=t.map((t=>{var e;return null!=(e=null==t?void 0:t.type)?e:""})).join("-");let c=t[0].zindex;t.forEach((t=>{t.zindex=c-1,c=t.zindex}));const u=t.every((t=>"Duct"===t.type));if(u){const e=this.checkIsOverlap(t);t.forEach((t=>{const i=e.find((e=>e.id===t.id));i&&(t.overlap={isStartOverlap:i.isStartOverlap,isEndOverlap:i.isEndOverlap})}))}const d={title:`Weld-${h}`,active:!1,cat:"General",type:u?"Weld_Duct":"Weld_General",translate:[r,s],width:(a-n)*e+8,height:(o-s)*e+8,rotate:0,scaleX:1,scaleY:1,settings:{active:!1,fillColor:"#659dc5",fontSize:16,inAlarm:!1,textColor:"inherit",titleColor:"inherit"},weldItems:lodash.exports.cloneDeep(t),zindex:1,t3Entry:null,id:appStateV2.value.itemsCount+1};this.addObject(d)}addObject(t,e,i=!0){var n;i&&this.addActionToHistory(`Add ${null!=(n=null==t?void 0:t.type)?n:""}`);const s=appStateV2.value.items.length>0?Math.max(...appStateV2.value.items.map((t=>{var e;return null!=(e=t.id)?e:0}))):0;s>appStateV2.value.itemsCount&&(appStateV2.value.itemsCount=s),appStateV2.value.itemsCount++,t.id=appStateV2.value.itemsCount,t.group=e,t.settings.titleColor||(t.settings.titleColor="inherit"),t.settings.bgColor||(t.settings.bgColor="inherit"),t.settings.textColor||(t.settings.textColor="inherit"),t.settings.fontSize||(t.settings.fontSize=16),appStateV2.value.items.push(t);const a=document.querySelectorAll(".moveable-item");return appStateV2.value.elementGuidelines=[],Array.from(a).forEach((function(t){appStateV2.value.elementGuidelines.push(t)})),t}drawWeldObject(t){const e=1/appStateV2.value.viewportTransform.scale,i=t[0].translate[0];t[0].translate[1];const n=Math.min(...t.map((t=>t.translate[0]))),s=Math.min(...t.map((t=>t.translate[1]))),a=Math.max(...t.map((t=>t.translate[0]+t.width))),o=Math.max(...t.map((t=>t.translate[1]+t.height))),r=i<n?i:n,l=t.map((t=>{var e;return null!=(e=null==t?void 0:t.type)?e:""})).join("-");let h=t[0].zindex;t.forEach((t=>{t.zindex=h-1,h=t.zindex}));const c={title:`Weld-${l}`,active:!1,type:"Weld",translate:[r,s],width:(a-n)*e,height:(o-s)*e,rotate:0,scaleX:1,scaleY:1,settings:{active:!1,fillColor:"#659dc5",fontSize:16,inAlarm:!1,textColor:"inherit",titleColor:"inherit",weldItems:lodash.exports.cloneDeep(t)},zindex:1,t3Entry:null,id:appStateV2.value.itemsCount+1};this.addObject(c)}deleteSelected(){this.addActionToHistory("Remove selected objects"),appStateV2.value.selectedTargets.length>0&&(appStateV2.value.selectedTargets.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.id));-1!==e&&appStateV2.value.items.splice(e,1)})),appStateV2.value.selectedTargets=[],appStateV2.value.activeItemIndex=null)}newProject(){var t;(null==(t=appStateV2.value.items)?void 0:t.length)>0?this.$q.dialog({dark:!0,title:"Do you want to clear the drawing and start over?",message:"This will also erase your undo history",cancel:!0,persistent:!0}).onOk((()=>{Hvac.IdxPage.newProject()})).onCancel((()=>{})):Hvac.IdxPage.newProject()}insertT3EntryOnSave(){if(this.addActionToHistory("Link object to T3000 entry"),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField||(void 0===appStateV2.value.items[appStateV2.value.activeItemIndex].label?appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="description":appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="label"),appStateV2.value.items[appStateV2.value.activeItemIndex].t3Entry=lodash.exports.cloneDeep(toRaw(insertT3EntryDialog.value.data)),"Icon"===appStateV2.value.items[appStateV2.value.activeItemIndex].type){let t="fa-solid fa-camera-retro";"GRP"===insertT3EntryDialog.value.data.type?t="fa-solid fa-camera-retro":"SCHEDULE"===insertT3EntryDialog.value.data.type?t="schedule":"PROGRAM"===insertT3EntryDialog.value.data.type?t="fa-solid fa-laptop-code":"HOLIDAY"===insertT3EntryDialog.value.data.type&&(t="calendar_month"),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.icon=t}IdxUtils.refreshObjectStatus(appStateV2.value.items[appStateV2.value.activeItemIndex]),insertT3EntryDialog.value.data=null,insertT3EntryDialog.value.active=!1}insertT3EntrySelect(t){this.addActionToHistory("Insert object to T3000 entry");const e={clientX:300,clientY:100,top:100,left:200+80*insertCount.value},i=tools.find((t=>"Pump"===t.name)),n=this.drawObject({width:60,height:60},e,i),s=appStateV2.value.items.findIndex((t=>t.id===n.id));appStateV2.value.activeItemIndex=s,this.insertT3EntryOnSave(),insertCount.value++}selectPanelFilterFn(t,e){e((()=>{var e,i,n,s;const a=T3000_Data.value.panelsData,o=null!=(s=null!=(n=null==(e=Hvac.DeviceOpt.getCurrentDevice())?void 0:e.deviceId)?n:null==(i=grpNav.value[0])?void 0:i.pid)?s:null;if(!t)return void(selectPanelOptions.value=null!==o?[...a.filter((t=>t.pid===o)),...a.filter((t=>t.pid!==o))]:a);const r=t.match(/^(\d+)\s*[-\s]?\s*(.*)/);let l=null,h=t;if(r){const t=parseInt(r[1]);a.some((e=>e.pid===t))&&(l=t,h=r[2])}const c=h.toUpperCase().trim();if(null!==l){let t=a.filter((t=>t.pid===l));c&&(t=t.filter((t=>{var e,i;return t.command.toUpperCase().includes(c)||(null==(e=t.description)?void 0:e.toUpperCase().includes(c))||(null==(i=t.label)?void 0:i.toUpperCase().includes(c))}))),selectPanelOptions.value=t}else{const t=null!==o?a.filter((t=>t.pid===o)):a;selectPanelOptions.value=c?t.filter((t=>{var e,i;return t.command.toUpperCase().includes(c)||(null==(e=t.description)?void 0:e.toUpperCase().includes(c))||(null==(i=t.label)?void 0:i.toUpperCase().includes(c))})):t}}))}rotate90(t,e=!1){t&&(this.addActionToHistory("Rotate object"),t.rotate=e?t.rotate-90:t.rotate+90,Hvac.IdxPage.refreshMoveable())}flipH(t){this.addActionToHistory("Flip object H"),1===t.scaleX?t.scaleX=-1:t.scaleX=1,Hvac.IdxPage.refreshMoveable()}flipV(t){this.addActionToHistory("Flip object V"),1===t.scaleY?t.scaleY=-1:t.scaleY=1,Hvac.IdxPage.refreshMoveable()}bringToFront(t){this.addActionToHistory("Bring object to front"),t.zindex=t.zindex+1}sendToBack(t){this.addActionToHistory("Send object to back"),t.zindex=t.zindex-1}removeObject(t){this.addActionToHistory("Remove object");const e=appStateV2.value.items.findIndex((e=>e.id===t.id));appStateV2.value.activeItemIndex=null,appStateV2.value.items.splice(e,1),appStateV2.value.selectedTargets=[]}duplicateObject(t){this.addActionToHistory(`Duplicate ${t.type}`),appStateV2.value.activeItemIndex=null;const e=this.cloneObject(t);appStateV2.value.selectedTargets=[],setTimeout((()=>{this.selectObject(e)}),10)}cloneObject(t,e){const i=lodash.exports.cloneDeep(t);i.translate[0]=i.translate[0]+5,i.translate[1]=i.translate[1]+5;return this.addObject(i,e,!1)}selectObject(t){const e=document.querySelector(`#moveable-item-${t.id}`);appStateV2.value.selectedTargets=[e],appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((e=>e.id===t.id))}addLibItem(t,e,i){const n=[],s=[];appStateV2.value.groupCount++,t.forEach((t=>{s.push(this.cloneObject(t,appStateV2.value.groupCount))})),setTimeout((()=>{s.forEach((t=>{const e=document.querySelector(`#moveable-item-${t.id}`);n.push(e)})),appStateV2.value.selectedTargets=n,selecto.value.setSelectedTargets(n),appStateV2.value.activeItemIndex=null;const t=1/appStateV2.value.viewportTransform.scale;setTimeout((()=>{moveable.value.request("draggable",{x:(i.clientX-viewportMargins.left-appStateV2.value.viewportTransform.x)*t-e.width*t,y:(i.clientY-viewportMargins.top-appStateV2.value.viewportTransform.y)*t-e.height*t},!0),setTimeout((()=>{Hvac.IdxPage.refreshMoveable()}),1)}),10)}),10)}onRotateGroupStart(t){this.addActionToHistory("Rotate Group"),t.events.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));t.set(appStateV2.value.items[e].rotate),t.dragStart&&t.dragStart.set(appStateV2.value.items[e].translate)}))}onRotateGroup(t){t.events.forEach(((t,e)=>{const i=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));appStateV2.value.items[i].translate=t.drag.beforeTranslate,appStateV2.value.items[i].rotate=t.rotate}))}onResizeGroup(t){t.events.forEach(((t,e)=>{t.target.style.width=`${t.width}px`,t.target.style.height=`${t.height}px`,t.target.style.transform=t.drag.transform}))}onResizeGroupEnd(t){t.events.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.lastEvent.target.id));appStateV2.value.items[e].width=t.lastEvent.width,appStateV2.value.items[e].height=t.lastEvent.height,appStateV2.value.items[e].translate=t.lastEvent.drag.beforeTranslate})),this.refreshObjects(),keepRatio.value=!1}onRotate(t){appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id)).rotate=t.rotate}onResizeEnd(t){if(null===t.lastEvent||void 0===t.lastEvent)return;const e=appStateV2.value.items.findIndex((e=>{var i,n;return`moveable-item-${e.id}`===(null==(n=null==(i=null==t?void 0:t.lastEvent)?void 0:i.target)?void 0:n.id)}));appStateV2.value.items[e].width=t.lastEvent.width,appStateV2.value.items[e].height=t.lastEvent.height,appStateV2.value.items[e].translate=t.lastEvent.drag.beforeTranslate,Hvac.PageMain.UpdateExteriorWallStroke(appStateV2,e,t.lastEvent.height),this.refreshObjects()}onResize(t){const e=appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id));t.target.style.width=`${t.width}px`,t.target.style.height=`${t.height}px`,t.target.style.transform=`translate(${t.drag.beforeTranslate[0]}px, ${t.drag.beforeTranslate[1]}px) rotate(${e.rotate}deg) scaleX(${e.scaleX}) scaleY(${e.scaleY})`}onDrag(t){appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id)),t.target.style.transform=t.transform}onDragEnd(t){if(t.lastEvent){appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id)).translate=t.lastEvent.beforeTranslate,this.save(!1,!1),this.refreshObjects()}else undoHistory.value.shift()}onDragGroupStart(t){this.addActionToHistory("Move Group"),t.events.forEach(((t,e)=>{const i=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));t.set(appStateV2.value.items[i].translate)}))}onDragGroup(t){t.events.forEach(((t,e)=>{const i=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));appStateV2.value.items[i].translate=t.beforeTranslate}))}onDragGroupEnd(t){t.lastEvent?this.refreshObjects():undoHistory.value.shift()}onSelectoDragStart(t){const e=t.inputEvent.target;(moveable.value.isMoveableElement(e)||appStateV2.value.selectedTargets.some((t=>t===e||t.contains(e))))&&t.stop()}onSelectoSelectEnd(t){var e;if(appStateV2.value.selectedTargets=t.selected,(null==t?void 0:t.selected)&&!(null==(e=null==t?void 0:t.inputEvent)?void 0:e.ctrlKey)){const e=appStateV2.value.items.filter((e=>t.selected.some((t=>t.id===`moveable-item-${e.id}`))));[...new Set(e.filter((t=>t.group)).map((t=>t.group)))].forEach((t=>{this.selectGroup(t)}))}1===appStateV2.value.selectedTargets.length?appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((t=>`moveable-item-${t.id}`===appStateV2.value.selectedTargets[0].id)):appStateV2.value.activeItemIndex=null,t.isDragStart&&(t.inputEvent.preventDefault(),setTimeout((()=>{moveable.value.dragStart(t.inputEvent)}))),appStateV2.value.selectedTargets.length>1&&!locked.value?setTimeout((()=>{ctxMenuConfig.value.isShow=!0}),100):ctxMenuConfig.value.isShow=!1,IdxUtils.refreshMoveableGuides(),setTimeout((()=>{Hvac.PageMain.SetWallDimensionsVisible("select",isDrawing.value,appStateV2,null)}),100)}selectGroup(t){const e=[];appStateV2.value.items.filter((e=>e.group===t&&!appStateV2.value.selectedTargets.some((t=>t.id===`moveable-item-${e.id}`)))).forEach((t=>{const i=document.querySelector(`#moveable-item-${t.id}`);e.push(i)})),appStateV2.value.selectedTargets=appStateV2.value.selectedTargets.concat(e),selecto.value.setSelectedTargets(appStateV2.value.selectedTargets)}onResizeStart(t){this.addActionToHistory("Resize object");const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));t.setOrigin(["%","%"]),t.dragStart&&t.dragStart.set(appStateV2.value.items[e].translate)}addActionToHistory(t){"Move Object"!==t&&setTimeout((()=>{this.save(!1,!1),this.refreshObjects()}),200),redoHistory.value=[],undoHistory.value.unshift({title:t,state:lodash.exports.cloneDeep(appStateV2.value)}),undoHistory.value.length>20&&undoHistory.value.pop()}viewportMouseMoved(t){cursorIconPos.value.x=t.clientX-viewportMargins.left,cursorIconPos.value.y=t.clientY-viewportMargins.top;const e=1/appStateV2.value.viewportTransform.scale;if(isDrawing.value&&continuesObjectTypes.includes(selectedTool.value.name)&&null!==appStateV2.value.activeItemIndex){const i=t.ctrlKey,n=(t.clientX-viewportMargins.left-appStateV2.value.viewportTransform.x)*e,s=(t.clientY-viewportMargins.top-appStateV2.value.viewportTransform.y)*e,a=n-startTransform.value[0],o=s-startTransform.value[1];let r=Math.atan2(o,a)*(180/Math.PI);i&&(r=5*Math.round(r/5));const l=Math.sqrt(a*a+o*o);appStateV2.value.items[appStateV2.value.activeItemIndex].rotate=r,appStateV2.value.items[appStateV2.value.activeItemIndex].width=l,this.refreshObjects()}}refreshObjects(){if(objectsRef.value)for(const t of objectsRef.value)t.refresh&&t.refresh()}showMoreDevices(){Hvac.DeviceOpt.clearDirtyCurrentDevice(),deviceModel.value.active=!0,appStateV2.value.selectedTarget=[],appStateV2.value.selectedTargets=[],appStateV2.value.activeItemIndex=null,Hvac.DeviceOpt.refreshGraphicPanelElementCount(deviceModel.value.data)}updateDeviceModel(t,e){deviceModel.value.active=t,deviceModel.value.data=e}}var ObjectType3_vue_vue_type_style_index_0_scoped_true_lang="";const _hoisted_1={key:1,class:"object-title"},_hoisted_2={class:"relative"},_sfc_main=defineComponent({__name:"ObjectType3",props:{item:{},showArrows:{type:Boolean,default:!1}},emits:["autoManualToggle1","objectClicked","changeValue","updateWeldModel"],setup(t,{emit:e}){useCssVars((t=>({ebcce808:t.item.settings.titleColor,bd7680a6:t.item.settings.bgColor,"0bdc9ff6":t.item.settings.textColor,"4d15442c":t.item.settings.fontSize+"px"})));const i=t,n=e;LogUtil.Debug("= v.ObjectType3 init",i.item),computed((()=>{var t;return IdxUtils.getEntryRange(null==(t=i.item)?void 0:t.t3Entry)}));const s=computed((()=>{var t,e,n,s,a;if(!i.item.t3Entry)return"";const o=IdxUtils.getEntryRange(i.item.t3Entry);if(LogUtil.Debug("= Ot range,t3e",o,i.item.t3Entry),"description"===i.item.settings.t3EntryDisplayField){const n=i.item.t3Entry.description||"",s=null!=(t=i.item.t3Entry.value)?t:"";let a="";if(i.item.t3Entry.range>100){const t=null==(e=o.options)?void 0:e.find((t=>t.value===i.item.t3Entry.value));a=(null==t?void 0:t.name)||""}else 1===i.item.t3Entry.digital_analog?a=s+" "+((null==o?void 0:o.unit)||""):0===i.item.t3Entry.digital_analog&&(a=i.item.t3Entry.control?(null==o?void 0:o.on)||"":(null==o?void 0:o.off)||"");return n+" "+a}if("label"===i.item.settings.t3EntryDisplayField){const t=i.item.t3Entry.label||"",e=null!=(n=i.item.t3Entry.value)?n:"";let a="";if(i.item.t3Entry.range>100){const t=null==(s=o.options)?void 0:s.find((t=>t.value===i.item.t3Entry.value));a=(null==t?void 0:t.name)||""}else 1===i.item.t3Entry.digital_analog?a=e+" "+((null==o?void 0:o.unit)||""):0===i.item.t3Entry.digital_analog&&(a=i.item.t3Entry.control?(null==o?void 0:o.on)||"":(null==o?void 0:o.off)||"");return t+" "+a}if("value"===i.item.settings.t3EntryDisplayField||"control"===i.item.settings.t3EntryDisplayField){if(void 0!==i.item.t3Entry.value&&i.item.t3Entry.range>100){const t=null==(a=o.options)?void 0:a.find((t=>t.value===i.item.t3Entry.value));return null==t?void 0:t.name}if(void 0!==i.item.t3Entry.value&&1===i.item.t3Entry.digital_analog)return i.item.t3Entry.value+" "+o.unit;if(void 0!==i.item.t3Entry.control&&0===i.item.t3Entry.digital_analog)return i.item.t3Entry.control?o.on:o.off}const r=i.item.settings.t3EntryDisplayField;return i.item.t3Entry[r]||""}));function a(t){var e,s;if(!i.item.t3Entry||0===i.item.t3Entry.auto_manual)return;let a=!1,o=i.item.t3Entry.value||0;const r=IdxUtils.getEntryRange(null==(e=i.item)?void 0:e.t3Entry);if(void 0!==i.item.t3Entry.value&&i.item.t3Entry.range>100){const e=null==(s=r.options)?void 0:s.filter((t=>1===t.status));if(!e)return;const n=e.findIndex((t=>t.value===i.item.t3Entry.value));if("decrease"===t&&n<e.length-1)o=e[n+1].value;else{if(!("increase"===t&&n>0))return;o=e[n-1].value}}else if(void 0!==i.item.t3Entry.value&&1===i.item.t3Entry.digital_analog)o="increase"===t?i.item.t3Entry.value+1:i.item.t3Entry.value-1;else if(void 0!==i.item.t3Entry.control&&0===i.item.t3Entry.digital_analog)if(a=!0,"decrease"===t&&0===i.item.t3Entry.control)o=1;else{if("increase"!==t||1!==i.item.t3Entry.control)return;o=0}n("changeValue",i.item,o,a)}function o(t){Utils2.StopPropagationAndDefaults(t),IdxPage2.autoManualToggle(i.item),DataOpt.SaveToLocalStorage()}return computed((()=>{const t=i.item;return["Gauge","Dial"].includes(t.type)&&t.settings.colors?"Gauge"===t.type?t.settings.colors.map((t=>[t.offset/100,t.color])):t.settings.colors.map(((e,i)=>({from:i?t.settings.colors[i-1].offset:0,to:e.offset,color:[e.color]}))):null})),ref$1(null),(t,e)=>{var i,n;return openBlock(),createElementBlock("div",null,[t.item.settings.title?(openBlock(),createElementBlock("div",{key:0,class:"object-title",onClick:e[0]||(e[0]=withModifiers((e=>t.$emit("objectClicked")),["stop"]))},toDisplayString(t.item.settings.title),1)):t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField?(openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(i=t.item.t3Entry)?void 0:i.auto_manual),onClick:e[1]||(e[1]=t=>a("increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",null,[createBaseVNode("span",{onClick:e[2]||(e[2]=e=>t.$emit("objectClicked"))},toDisplayString(s.value||t.item.t3Entry.id),1),void 0!==t.item.t3Entry.auto_manual?(openBlock(),createElementBlock("span",{key:0,class:"mode-icon ml-2 text-lg",onClick:o},[t.item.t3Entry.auto_manual?(openBlock(),createBlock(unref(ATooltip),{key:1,title:"In manual mode"},{default:withCtx((()=>[createVNode(unref(UnlockOutlined$1))])),_:1})):(openBlock(),createBlock(unref(ATooltip),{key:0,title:"In auto mode"},{default:withCtx((()=>[createVNode(unref(LockOutlined$1))])),_:1}))])):createCommentVNode("",!0)]),t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(n=t.item.t3Entry)?void 0:n.auto_manual),onClick:e[3]||(e[3]=t=>a("decrease"))},null,8,["disable"])):createCommentVNode("",!0)])])):createCommentVNode("",!0)])}}});var ObjectType3=_export_sfc(_sfc_main,[["__scopeId","data-v-117b7326"]]);class ForeignObjUtil{static CreateVueCircle(t){let e=null==t?T3Gv.opt.svgDoc:t;const i=e.CreateVueComponent(60,60,VueCircle,{message:"Hello from SVG!",color:"blue"});i.SetPos(0,-50);const n=e.CreateShape(OptConstant.CSType.ShapeContainer);return n.AddElement(i),n.SetID(111),n.SetSize(100,100),n.SetPos(0,0),i}static CreateVueObjectType(t,e){let i=null==t?T3Gv.opt.svgDoc:t;LogUtil.Debug("ForeignObjUtil=CreateVueObjectType",e);var n=e.width;const s=i.CreateVueComponent(n,40,ObjectType3,{item:{title:"==== Test Pump ====",active:!1,type:"Pump",translate:[284,72],width:60,height:60,rotate:0,scaleX:1,scaleY:1,settings:{fillColor:"#659dc5",active:!0,inAlarm:!0,titleColor:"inherit",bgColor:"inherit",textColor:"inherit",fontSize:16,t3EntryDisplayField:"description"},zindex:1,t3Entry:{auto_manual:1,calibration_h:0,calibration_l:0,calibration_sign:1,command:"199IN1",control:1,decom:1,description:"V",digital_analog:1,filter:5,id:"IN1",index:0,label:"IN1",pid:199,range:19,type:"INPUT",unit:19,value:30},showDimensions:!0,cat:"Pipe",id:2},showArrows:!0});s.SetPos(0,-50);const a=i.CreateShape(OptConstant.CSType.ShapeContainer);return a.AddElement(s),a.SetSize(n,40),a.SetPos(0,0),a}static CreateVueObject(t,e,i){let n=null==t?T3Gv.opt.svgDoc:t;var s={item:i,showArrows:!1};const a=n.CreateVueComponent(300,30,ObjectType3,s);a.SetPos(0,-40);const o=n.CreateShape(OptConstant.CSType.ShapeContainer);return o.AddElement(a),o.SetSize(300,30),o.SetPos(0,0),o}}class SvgSymbol extends BaseSymbol{constructor(t){(t=t||{}).ShapeType=OptConstant.ShapeType.SvgSymbol,t.drawSetting=t.drawSetting||{},super(t),LogUtil.Debug("= S.SvgSymbol | Constructor Input/Output:",t.this)}CreateShape(t,e){if(LogUtil.Debug("= S.SvgSymbol | CreateShape Input:",{svgDocument:t,enableEvents:e}),this.flags&NvConstant.ObjFlags.NotVisible)return null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.Symbol);n.SetDrawSetting(this.drawSetting),n.SetSymbolName(this.uniType),n.InitSymbolSource(),n.SetID(OptConstant.SVGElementClass.Shape);const s=this.Frame,a=this.StyleRecord;let o=a.Line.Paint.Color;const r=a.Line.Thickness;let l=this.GetFieldDataStyleOverride();l&&l.strokeColor&&(o=l.strokeColor),(l||this.colorchanges&(StyleConstant.ColorFilters.NCLine|StyleConstant.ColorFilters.NCStyle))&&n.SetStrokeColor(o),this.colorchanges&(StyleConstant.ColorFilters.NCLineThick|StyleConstant.ColorFilters.NCStyle)&&n.SetStrokeWidth(r),n.SetFillOpacity(a.Fill.Paint.Opacity),n.SetStrokeOpacity(a.Line.Paint.Opacity);const h=s.width,c=s.height;n.SetSize(h,c),n.SetScale(h/this.InitialGroupBounds.width,c/this.InitialGroupBounds.height),i.SetSize(h,c),i.SetPos(s.x,s.y);const u=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,d=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;u&&n.SetMirror(u),d&&n.SetFlip(d),i.AddElement(n),this.ApplyStyles(n,a),this.ApplyEffects(i,!1,!1);const p=t.CreateShape(OptConstant.CSType.Rect);p.SetStrokeColor("white"),p.SetFillColor("none"),p.SetOpacity(0),p.SetStrokeWidth(0),e?p.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):p.SetEventBehavior(OptConstant.EventBehavior.None),p.SetID(OptConstant.SVGElementClass.Slop),p.ExcludeFromExport(!0),p.SetSize(h,c),i.AddElement(p),i.isShape=!0;var g=QuasarUtil.GetItemFromAPSV2(this.uniqueId);if(LogUtil.Debug("= S.SvgSymbol | CreateShape apsItem:",g),g&&g.t3Entry){LogUtil.Debug("= S.SvgSymbol | CreateShape apsItem:",g);const e=ForeignObjUtil.CreateVueObject(t,s,g);i.AddElement(e)}return-1!==this.DataID&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("= S.SvgSymbol | CreateShape Output:",i),i}ApplyStyles(t,e){LogUtil.Debug("S.SvgSymbol | ApplyStyles Input:",{shapeElement:t,styleRecord:e});const i=this.GetFieldDataStyleOverride(),n=i&&i.fillColor;if(n||this.colorchanges&(StyleConstant.ColorFilters.NCFill|StyleConstant.ColorFilters.NCStyle)){let s=e.Fill.Paint.FillType,a=e.Fill.Paint.Color;n&&(s=NvConstant.FillTypes.Solid,a=i.fillColor),s===NvConstant.FillTypes.Gradient?(t.SetFillColor(e.Fill.Paint.Color),t.SetGradientFill(this.CreateGradientRecord(e.Fill.Paint.GradientFlags,a,e.Fill.Paint.Opacity,e.Fill.Paint.EndColor,e.Fill.Paint.EndOpacity)),t.fillPaintType=s):s===NvConstant.FillTypes.Transparent?t.SetFillColor("none"):(t.SetFillColor(a),t.SetFillOpacity(e.Fill.Paint.Opacity))}LogUtil.Debug("S.SvgSymbol | ApplyStyles Output:",{shapeElement:t})}Resize(t,e,i){LogUtil.Debug("= S.SvgSymbol | Resize Input:",{shapeElement:t,newBoundingBox:e,eventInfo:i});const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape);r.SetSize(a.width,a.height),r.SetScale(a.width/this.InitialGroupBounds.width,a.height/this.InitialGroupBounds.height);const l=t.GetElementById(OptConstant.SVGElementClass.Slop);return l&&l.SetSize(a.width,a.height),this.LMResizeSVGTextObject(t,i,a),t.SetRotation(n),this.UpdateDimensionLines(t),LogUtil.Debug("= S.SvgSymbol | Resize Output:",{offset:o,shapeElement:t}),o}ResizeInTextEdit(t,e){if(LogUtil.Debug("= S.SvgSymbol | ResizeInTextEdit Input:",{shapeElement:t,newBoundingBox:e}),t){const i=t.GetID();if(i>=0){const n=ObjectUtil$1.GetObjectPtr(i,!1);this.prevBBox=Utils1.DeepCopy(this.Frame);const s=this.Resize(t,e,n);return LogUtil.Debug("= S.SvgSymbol | ResizeInTextEdit Output:",{offset:s}),s}}const i={x:0,y:0};return LogUtil.Debug("= S.SvgSymbol | ResizeInTextEdit Output:",{offset:i}),i}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.SvgSymbol | CreateActionTriggers Input:",{svgDocument:t,triggerType:e,actionHandler:i,additionalParameters:n});const s=super.CreateActionTriggers2(t,e,i,n);return LogUtil.Debug("= S.SvgSymbol | CreateActionTriggers Output:",s),s}BaseShapeCreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.SvgSymbol | BaseShapeCreateActionTriggers Input:",{svgDoc:t,triggerId:e,shape:i,additionalParams:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL];let a,o,r=t.CreateShape(OptConstant.CSType.Group),l=OptConstant.Common.KnobSize,h=OptConstant.Common.RKnobSize,c=this.extraflags&OptConstant.ExtraFlags.SideKnobs&&this.dataclass===PolygonConstant.ShapeTypes.POLYGON,u=OptConstant.Common.MinSidePointLength,d=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(d*=2);const p=l/d,g=h/d;let{x:f,y:b,width:v,height:m}=this.Frame;v+=p,m+=p;const y=Utils1.DeepCopy(this.Frame);y.x-=p/2,y.y-=p/2,y.width+=p,y.height+=p;let S=i.GetRotation()+22.5;S>=360&&(S=0);const w=Math.floor(S/45);let x=s.slice(w).concat(s.slice(0,w)),C=!0,D=!c,T=!c;switch(this.ObjGrow){case OptConstant.GrowBehavior.Horiz:C=!1,T=!1;break;case OptConstant.GrowBehavior.Vertical:C=!1,D=!1;break;case OptConstant.GrowBehavior.ProPortional:C=!0,D=!1,T=!1}const k={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:p,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1};if(e!==n&&(k.fillColor="white",k.strokeSize=1,k.strokeColor="black",k.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(k.fillColor="gray",k.locked=!0,c=!1):this.NoGrow()&&(k.fillColor="red",c=!1,k.strokeColor="red",x=[CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default]),C){k.knobID=OptConstant.ActionTriggerType.TopLeft,k.cursorType=x[0];let t=this.GenericKnob(k);r.AddElement(t),k.x=v-p,k.y=0,k.cursorType=x[2],k.knobID=OptConstant.ActionTriggerType.TopRight,t=this.GenericKnob(k),r.AddElement(t),k.x=v-p,k.y=m-p,k.cursorType=x[4],k.knobID=OptConstant.ActionTriggerType.BottomRight,t=this.GenericKnob(k),r.AddElement(t),k.x=0,k.y=m-p,k.cursorType=x[6],k.knobID=OptConstant.ActionTriggerType.BottomLeft,t=this.GenericKnob(k),r.AddElement(t)}if(T){k.x=v/2-p/2,k.y=0,k.cursorType=x[1],k.knobID=OptConstant.ActionTriggerType.TopCenter;let t=this.GenericKnob(k);r.AddElement(t),k.x=v/2-p/2,k.y=m-p,k.cursorType=x[5],k.knobID=OptConstant.ActionTriggerType.BottomCenter,t=this.GenericKnob(k),r.AddElement(t)}if(D){k.x=0,k.y=m/2-p/2,k.cursorType=x[7],k.knobID=OptConstant.ActionTriggerType.CenterLeft;let t=this.GenericKnob(k);r.AddElement(t),k.x=v-p,k.y=m/2-p/2,k.cursorType=x[3],k.knobID=OptConstant.ActionTriggerType.CenterRight,t=this.GenericKnob(k),r.AddElement(t)}if(a=function(t){let e,i=null;return t.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1),(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||e&&e instanceof Instance.Shape.ShapeContainer)&&(i=e.PrGetShapeConnectorInfo(t.hooks[0]))),i}(this),a&&a.length){const e={svgDoc:t,iconSize:14,imageURL:null,iconID:0,userData:0,cursorType:0};for(let t=a.length,i=0;i<t;i++)"right"===a[i].position?e.x=v-14-1-p:"bottom"===a[i].position?e.y=m-14-1-p:(e.x=p+1,e.y=p+1),e.cursorType=a[i].cursorType,e.iconID=a[i].knobID,e.imageURL="vertical"===a[i].polyType?OptConstant.Common.ConMoveVerticalPath:OptConstant.Common.ConMoveHorizontalPath,e.userData=a[i].knobData,o=this.GenericIcon(e),r.AddElement(o),e.x+=16}if(c){const t=Utils1.DeepCopy(this);t.inside=Utils1.DeepCopy(t.Frame);const e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,[]);if(e)for(let i=1,n=e.length;i<n;i++){const t=e[i].x-e[i-1].x,n=e[i].y-e[i-1].y;if(Utils2.Sqrt(t*t+n*n)>u){k.cursorType=t*t>n*n?CursorConstant.CursorType.ResizeTB:CursorConstant.CursorType.ResizeLR,k.x=e[i-1].x+t/2,k.y=e[i-1].y+n/2;const s=this.GenericKnob(k);s.SetUserData(i),r.AddElement(s)}}}const $=this.Frame.width<44,O=this.hooks.length>0&&!!ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1)&&ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector;if(!(this.NoRotate()||this.NoGrow()||k.locked||$||O)){const t=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal&&this.flags&NvConstant.ObjFlags.TextOnly&&ShapeUtil.TextAlignToWin(this.TextAlign).just===TextConstant.TextJust.Left;k.shapeType=OptConstant.CSType.Oval,k.x=t?v+g:v-3*g,k.y=m/2-g/2,k.cursorType=CursorConstant.CursorType.Rotate,k.knobID=OptConstant.ActionTriggerType.Rotate,k.fillColor="white",k.fillOpacity=.001,k.strokeSize=1.5,k.strokeColor="black";const e=this.GenericKnob(k);r.AddElement(e)}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID.toString());this.CreateDimensionAdjustmentKnobs(r,t,k)}return r.SetSize(v,m),r.SetPos(y.x,y.y),r.isShape=!0,r.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.SvgSymbol | BaseShapeCreateActionTriggers Output:",r),r}SetFillColor(t){var e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(e){var i=e.GetElementById(OptConstant.SVGElementClass.Shape);i.SetFillColor(t);var n=i.GetSvgSymbol();LogUtil.Debug("= S.SvgSymbol | SetFillColor Output 1:",this.SVGFragment),LogUtil.Debug("= S.SvgSymbol | SetFillColor Output 2:",n)}}GetDrawSetting(){return this.drawSetting}SetDrawSetting(t){LogUtil.Debug("= S.SvgSymbol | SetDrawSetting Input: setting",t),this.drawSetting=t;var e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(e){var i=e.GetElementById(OptConstant.SVGElementClass.Shape);i.SetDrawSetting(t),i.RefreshDrawSetting()}}AddDynamicCSS(t,e){LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS Input:",{cssStyles:t,targetSelector:e});const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(!i)return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: SVG element not found"),!1;const n=i.GetElementById(OptConstant.SVGElementClass.Shape);if(!n)return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: Shape element not found"),!1;const s=n.GetSvgSymbol();if(!s)return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: SVG DOM element not found"),!1;try{if("string"==typeof t){let e=s.querySelector("style[data-dynamic-css]");e||(e=document.createElement("style"),e.setAttribute("data-dynamic-css","true"),s.appendChild(e)),e.textContent=t}else if("object"==typeof t){(e?Array.from(s.querySelectorAll(e)):[s]).forEach((e=>{for(const[i,n]of Object.entries(t)){i.replace(/([A-Z])/g,"-$1").toLowerCase();e.style[i]=n}}))}return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: CSS applied successfully"),!0}catch(a){return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS Error:",a),!1}}}class ToolConstant{}__publicField(ToolConstant,"Tools",{Symbol:-1,Select:0,Shape:1,Line:2,Text:3,Wall:4,StyledLine:5});class ToolDuctT1SvgData{static GetSvgFrame(t){var e={width:60,height:60};switch(t){case"Duct1":case"Duct3":case"Duct5":e={width:68.5,height:29.67};break;case"Duct2":e={width:76,height:21.83};break;case"Duct4":e={width:68.5,height:30.67};break;case"Duct6":e={width:66.33,height:38.5};break;case"Duct7":case"Duct8":e={width:30,height:60};break;case"Duct9":e={width:60,height:60};break;case"Duct10":case"Duct11":case"Duct12":e={width:0,height:0}}return e}static Duct1Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1) translate(48.333,14.5)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.333) scale(1,1) translate(19.333,0)">\n        <g width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" stroke="##LineColor=#000000##"\n            stroke-width="##LineThick=1##" stroke-dasharray="none" fill="##FillColor=#FFFFFF##" fill-opacity="1"\n            stroke-opacity="1">\n            <ellipse rx="14.3335" ry="14.3335" cx="14.3335" cy="14.3335" />\n        </g>\n    </g>\n    <g width="20.333" height="20.333" transform="scale(1,1) translate(23.5,4.167)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,20.333\nL20.333,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,19.333L1,19.333L1,21.333L-1,21.333z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="20.333" height="20.333" transform="scale(1,1) translate(23.5,4.167)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0\nL20.333,20.333" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct2Data(){return'\n<g>\n    <g width="35.833" height="20.833" transform="scale(1,1) translate(19.5,0)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="35.833" height="20.833" transform="scale(1,1)\ntranslate(0,0)" fill="##FillColor=#FFFFFF##" fill-opacity="1" stroke-opacity="1">\n            <rect width="35.833" height="20.833" />\n        </g>\n    </g>\n    <g width="28.167" height="0" transform="scale(1,1)\ntranslate(0.5,10.333)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L28.167,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.167" height="0" transform="scale(1,1) translate(46.333,10.333)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L28.167,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct3Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.833)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="##LineThick=1##" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1)\ntranslate(48.333,14.833)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="##LineThick=1##" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.833) scale(1,1) translate(19.333,0.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="28.667" height="28.667" />\n        </g>\n    </g>\n</g>\n    '}static Duct4Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.833)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1) translate(48.333,14.833)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.833) scale(1,1) translate(19.333,0.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="28.667" height="28.667" />\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="scale(1,1) translate(19.333,0.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0\nL28.667,28.667" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct5Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.833)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1) translate(48.333,14.833)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.833) scale(1,1) translate(19.333,0.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="28.667" height="28.667" />\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="scale(1,1) translate(19.333,0.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0\nL28.667,28.667" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="scale(1,1) translate(19.333,0.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,28.667\nL28.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,27.667L1,27.667L1,29.667L-1,29.667z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct6Data(){return'\n<g>\n    <g width="17.833" height="0" transform="scale(1,1) translate(42.5,21.167)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L17.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M17.833,0L17.833,-7" stroke-width="0.5" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="30.833" height="31.5" transform="scale(1,1) translate(11.167,5.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="30.833" height="31.5" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="30.833" height="31.5" />\n        </g>\n    </g>\n    <g width="30.833" height="31.5" transform="scale(1,1) translate(11.167,5.5)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,31.5 L30.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,30.5L1,30.5L1,32.5L-1,32.5z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="30.833" height="31.5" transform="scale(1,1)\ntranslate(11.167,5.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L30.833,31.5" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="16.833" height="15.625" transform="scale(1,1) translate(0,0)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=0##" stroke-dasharray="none"\n            width="16.833" height="15.625" transform="scale(1,1) translate(0,0)" fill="none" stroke-opacity="1">\n            <rect width="16.833" height="15.625" />\n        </g>\n        <g width="16.833333333333332" height="15.624999046325684" transform="scale(1,1)\ntranslate(0,0)"><text width="16.833333333333332" height="15.624999046325684" transform="scale(1,1)\ntranslate(0,0)" xml:space="preserve">\n                <tspan xml:space="preserve" text-rendering="optimizeSpeed" font-size="13.88888888888889"\n                    font-weight="normal" font-style="normal" fill="#000000" opacity="1" x="0" text-anchor="start"\n                    y="12.5" textLength="6.794277667999268" style="font-family: Arial, Helvetica Neue, Helvetica,\nsans-serif;">F</tspan>\n            </text></g>\n    </g>\n</g>\n    '}static Duct7Data(){return'\n    <g>\n        <g>\n            <g width="30" height="60" transform="rotate(0,0) scale(1,1) translate(0,0)">\n                <g stroke="#000000" opacity="1" stroke-width="1" stroke-dasharray="none" width="30" height="60"\n                    transform="scale(1,1) translate(0,0)" fill="#FFFFFF" fill-opacity="1" stroke-opacity="1">\n                    <rect width="30" height="60" />\n                </g>\n            </g>\n            <g width="30" height="60" transform="scale(1,1) translate(0,0)">\n                <g transform="scale(1,1) translate(0,0)" fill="#000000" stroke="#000000" stroke-opacity="1">\n                    <path d="M0,0 L30,60" fill="none" stroke-width="1" stroke-dasharray="none" />\n                    <g>\n                        <g stroke-dasharray="none">\n                            <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                        </g>\n                    </g>\n                </g>\n            </g>\n        </g>\n    </g>\n    '}static Duct8Data(){return'\n    <g width="30" height="60" transform="scale(1,1) translate(0,0)">\n        <g transform="scale(1,1) translate(0,0)" fill="#FFFFFF" stroke="#000000" stroke-width="1" stroke-opacity="1">\n            <path d="M 0,0 L30,0 L30,60 L0,60 L0,0" />\n        </g>\n    </g>\n    '}static Duct9Data(){return'\n   <g width="60" height="60" transform="scale(1,1) translate(0,0)">\n        <g transform="scale(1,1) translate(0,0)" fill="#FFFFFF" stroke="#000000" stroke-width="1" stroke-opacity="1">\n\n<path d="\n    M 0,0\n    L 30,0\n    A 30,30 0 0,0 60,30\n    L 60,60\n    A 60,60 0 0,1 0,0\n    " />\n        </g>\n    </g>\n    '}static Duct10Data(){return"\n\n    "}static Duct11Data(){return"\n\n    "}static Duct12Data(){return"\n\n    "}}const _ToolSvgData=class{static GetSvgData(t){var e=_ToolSvgData.DuctSvg.GetSvgFrame(t);let i=-1e3,n=e.width,s=e.height,a=e.width,o=e.height,r=new SvgSymbol({Frame:{x:i,y:-1e3,width:n,height:s},InitialGroupBounds:{x:i,y:i,width:a,height:o},StyleRecord:new QuickStyle,uniType:t,drawSetting:{}}),l="";switch(t){case"Box":l=this.BoxSvgData();break;case"Text":l=this.TextSvgData();break;case"Icon":l=this.IconSvgData();break;case"SwitchIcon":l=this.SwitchIconSvgData();break;case"Led":l=this.LedSvgData();break;case"RoomHumidity":l=this.RoomHumiditySvgData();break;case"RoomTemperature":l=this.RoomTemperatureSvgData();break;case"Temperature":l=this.TemperatureSvgData();break;case"Boiler":l=this.BoilerSvgData();break;case"Heatpump":l=this.HeatpumpSvgData();break;case"Pump":l=this.PumpSvgData();break;case"ValveThreeWay":l=this.ValveThreeWaySvgData();break;case"ValveTwoWay":l=this.ValveTwoWaySvgData();break;case"Duct":l=_ToolSvgData.DuctSvgData();break;case"Fan":l=this.FanSvgData();break;case"CoolingCoil":l=this.CoolingCoilSvgData();break;case"HeatingCoil":l=this.HeatingCoilSvgData();break;case"Filter":l=this.FilterSvgData();break;case"Humidifier":l=this.HumidifierSvgData();break;case"Humidity":l=this.HumiditySvgData();break;case"Pressure":l=this.PressureSvgData();break;case"Damper":l=this.DamperSvgData();break;case"Temperature2":l=this.Temperature2SvgData();break;case"ThermalWheel":l=this.ThermalWheelSvgData();break;case"Enthalpy":l=this.EnthalpySvgData();break;case"Flow":l=this.FlowSvgData();break;case"Guage":l=this.GuageSvgData();break;case"Dial":l=this.DialSvgData();break;case"Value":l=this.ValueSvgData();break;case"IconWithTitle":l=this.IconWithTitleSvgData();break;case"Test1":l=this.Test1SvgData();break;case"Duct1":l=_ToolSvgData.DuctSvg.Duct1Data();break;case"Duct2":l=_ToolSvgData.DuctSvg.Duct2Data();break;case"Duct3":l=_ToolSvgData.DuctSvg.Duct3Data();break;case"Duct4":l=_ToolSvgData.DuctSvg.Duct4Data();break;case"Duct5":l=_ToolSvgData.DuctSvg.Duct5Data();break;case"Duct6":l=_ToolSvgData.DuctSvg.Duct6Data();break;case"Duct7":l=_ToolSvgData.DuctSvg.Duct7Data();break;case"Duct8":l=_ToolSvgData.DuctSvg.Duct8Data();break;case"Duct9":l=_ToolSvgData.DuctSvg.Duct9Data();break;case"Duct10":l=_ToolSvgData.DuctSvg.Duct10Data();break;case"Duct11":l=_ToolSvgData.DuctSvg.Duct11Data();break;case"Duct12":l=_ToolSvgData.DuctSvg.Duct12Data();break;default:return""}return r.SVGFragment=l,r}static GetSvgDataString(t){let e="";switch(t){case"Box":e=this.BoxSvgData();break;case"Text":e=this.TextSvgData();break;case"Icon":e=this.IconSvgData();break;case"SwitchIcon":e=this.SwitchIconSvgData();break;case"Led":e=this.LedSvgData();break;case"RoomHumidity":e=this.RoomHumiditySvgData();break;case"RoomTemperature":e=this.RoomTemperatureSvgData();break;case"Temperature":e=this.TemperatureSvgData();break;case"Boiler":e=this.BoilerSvgData();break;case"Heatpump":e=this.HeatpumpSvgData();break;case"Pump":e=this.PumpSvgData();break;case"ValveThreeWay":e=this.ValveThreeWaySvgData();break;case"ValveTwoWay":e=this.ValveTwoWaySvgData();break;case"Duct":e=_ToolSvgData.DuctSvgData();break;case"Fan":e=this.FanSvgData();break;case"CoolingCoil":e=this.CoolingCoilSvgData();break;case"HeatingCoil":e=this.HeatingCoilSvgData();break;case"Filter":e=this.FilterSvgData();break;case"Humidifier":e=this.HumidifierSvgData();break;case"Humidity":e=this.HumiditySvgData();break;case"Pressure":e=this.PressureSvgData();break;case"Damper":e=this.DamperSvgData();break;case"Temperature2":e=this.Temperature2SvgData();break;case"ThermalWheel":e=this.ThermalWheelSvgData();break;case"Enthalpy":e=this.EnthalpySvgData();break;case"Flow":e=this.FlowSvgData();break;case"Guage":e=this.GuageSvgData();break;case"Dial":e=this.DialSvgData();break;case"Value":e=this.ValueSvgData();break;case"IconWithTitle":e=this.IconWithTitleSvgData();break;case"Test1":e=this.Test1SvgData();break;case"Duct1":e=_ToolSvgData.DuctSvg.Duct1Data();break;case"Duct2":e=_ToolSvgData.DuctSvg.Duct2Data();break;case"Duct3":e=_ToolSvgData.DuctSvg.Duct3Data();break;case"Duct4":e=_ToolSvgData.DuctSvg.Duct4Data();break;case"Duct5":e=_ToolSvgData.DuctSvg.Duct5Data();break;case"Duct6":e=_ToolSvgData.DuctSvg.Duct6Data();break;case"Duct7":e=_ToolSvgData.DuctSvg.Duct7Data();break;case"Duct8":e=_ToolSvgData.DuctSvg.Duct8Data();break;case"Duct9":e=_ToolSvgData.DuctSvg.Duct9Data();break;case"Duct10":e=_ToolSvgData.DuctSvg.Duct10Data();break;case"Duct11":e=_ToolSvgData.DuctSvg.Duct11Data();break;case"Duct12":e=_ToolSvgData.DuctSvg.Duct12Data();break;default:return""}return e}static GetSvgActiveClassName(t){let e="";switch(t){case"Box":e=this.BoxSvgData();break;case"Text":e=this.TextSvgData();break;case"Icon":e=this.IconSvgData();break;case"SwitchIcon":e=this.SwitchIconSvgData();break;case"Led":e=this.LedSvgData();break;case"RoomHumidity":e=this.RoomHumiditySvgData();break;case"RoomTemperature":e=this.RoomTemperatureSvgData();break;case"Temperature":e=this.TemperatureSvgData();break;case"Boiler":e=this.BoilerSvgData();break;case"Heatpump":e=this.HeatpumpSvgData();break;case"Pump":e=this.PumpSvgData();break;case"ValveThreeWay":e=this.ValveThreeWaySvgData();break;case"ValveTwoWay":e=this.ValveTwoWaySvgData();break;case"Duct":e=_ToolSvgData.DuctSvgData();break;case"Fan":e=this.FanSvgData();break;case"CoolingCoil":e=this.CoolingCoilSvgData();break;case"HeatingCoil":e=this.HeatingCoilSvgData();break;case"Filter":e=this.FilterSvgData();break;case"Humidifier":e=this.HumidifierSvgData();break;case"Humidity":e=this.HumiditySvgData();break;case"Pressure":e=this.PressureSvgData();break;case"Damper":e=this.DamperSvgData();break;case"Temperature2":e=this.Temperature2SvgData();break;case"ThermalWheel":e=this.ThermalWheelSvgData();break;case"Enthalpy":e=this.EnthalpySvgData();break;case"Flow":e=this.FlowSvgData();break;case"Guage":e=this.GuageSvgData();break;case"Dial":e=this.DialSvgData();break;case"Value":e=this.ValueSvgData();break;case"IconWithTitle":e=this.IconWithTitleSvgData();break;case"Test1":e=this.Test1SvgData();break;default:return""}return e}static BoxSvgData(){return""}static TextSvgData(){return""}static IconSvgData(){return""}static SwitchIconSvgData(){return'\n<g transform="scale(0.08,0.08) translate(-370,3)">\n    <use style="fill:##FillColor=#659dc5##" xlink:href="icons.svg#toggle_off1"></use>\n</g>\n      '}static LedSvgData(){return'\n<g transform="scale(1.8,1.8) translate(9,2)">\n    <filter id="light1" x="-0.8" y="-0.8" height="2.2" width="2.8">\n        <feGaussianBlur stdDeviation="2" />\n    </filter>\n    <filter id="light2" x="-0.8" y="-0.8" height="2.2" width="2.8">\n        <feGaussianBlur stdDeviation="4" />\n    </filter>\n    <rect x="2.5099" y="20.382" width="2.1514" height="9.8273" fill="##FillColor=#8c8c8c##" />\n    <path\n        d="m12.977 30.269c0-1.1736-0.86844-2.5132-1.8916-3.4024-0.41616-0.3672-1.1995-1.0015-1.1995-1.4249v-5.4706h-2.1614v5.7802c0 1.0584 0.94752 1.8785 1.9462 2.7482 0.44424 0.37584 1.3486 1.2496 1.3486 1.7694"\n        fill="##FillColor=#8c8c8c##" />\n\n    <path\n        d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z"\n        opacity=".3" />\n    <path\n        d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z"\n        fill="##FillColor=#e6e6e6##" opacity=".5" />\n    <path\n        d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z"\n        fill="##FillColor=#d1d1d1##" opacity=".9" />\n    <g>\n        <path\n            d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z"\n            opacity=".7" />\n        <path\n            d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v3.1054c1.4738 1.6502 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586-7.4e-4 -1.1412-0.47444-2.2025-1.283-3.1047z"\n            opacity=".25" />\n        <ellipse cx="7.0877" cy="16.106" rx="7.087" ry="4.9608" opacity=".25" />\n    </g>\n    <polygon points="2.2032 16.107 3.1961 16.107 3.1961 13.095 6.0156 13.095 10.012 8.8049 3.407 8.8049 2.2032 9.648"\n        fill="##FillColor=#666666##" />\n    <polygon points="11.215 9.0338 7.4117 13.095 11.06 13.095 11.06 16.107 11.974 16.107 11.974 8.5241 10.778 8.5241"\n        fill="##FillColor=#666666##" />\n    <path\n        d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z"\n        fill="##FillColor=#01c16e##" opacity=".65" />\n    <g fill="##FillColor=#ffffff##">\n        <path\n            d="m10.388 3.7541 1.4364-0.2736c-0.84168-1.1318-2.0822-1.9577-3.5417-2.2385l0.25416 1.0807c0.76388 0.27072 1.4068 0.78048 1.8511 1.4314z"\n            opacity=".5" />\n        <path\n            d="m0.76824 19.926v1.5199c0.64872 0.5292 1.4335 0.97632 2.3076 1.3169v-1.525c-0.8784-0.33624-1.6567-0.78194-2.3076-1.3118z"\n            opacity=".5" />\n        <path\n            d="m11.073 20.21c-0.2556 0.1224-0.52992 0.22968-0.80568 0.32976-0.05832 0.01944-0.11736 0.04032-0.17784 0.05832-0.56376 0.17928-1.1614 0.31896-1.795 0.39456-0.07488 0.0094-0.1512 0.01872-0.22464 0.01944-0.3204 0.03024-0.64368 0.05832-0.97056 0.05832-0.14832 0-0.30744-0.01512-0.4716-0.02376-1.2002-0.05688-2.3306-0.31464-3.2976-0.73944l-2e-5 -8.3895v-4.8254c0-1.471 0.84816-2.7295 2.0736-3.3494l-0.02232-0.05328-1.2478-1.512c-1.6697 1.003-2.79 2.8224-2.79 4.9118v11.905c-0.04968-0.04968-0.30816-0.30888-0.48024-0.52992l-0.30744 0.6876c1.4011 1.4818 3.8088 2.4617 6.5426 2.4617 1.6798 0 3.2371-0.37368 4.5115-1.0022l-0.52704-0.40896-0.01006 0.0072z"\n            opacity=".5" />\n    </g>\n</g>\n'}static RoomHumiditySvgData(){return'\n<g transform="scale(2.8,2.8) translate(2,2)">\n    <g transform="translate(-6.9915256,-6.9915256)">\n        <circle r="8.6263752" cy="16" cx="16" style="\n          opacity: 1;\n          fill: ##FillColor=#659dc5##;\n          fill-opacity: 1;\n          fill-rule: nonzero;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.764198;\n          stroke-linecap: butt;\n          stroke-linejoin: round;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <g transform="matrix(0.29971746,0,0,0.29971746,20.655088,20.220855)" style="\n          font-style: normal;\n          font-weight: normal;\n          font-size: 51.4601px;\n          line-height: 125%;\n          font-family: Sans;\n          letter-spacing: 0px;\n          word-spacing: 0px;\n          fill: ##StrokeColor=#000000##;\n          fill-opacity: 1;\n          stroke: none;\n          stroke-width: 1px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        ">\n            <path\n                d="m -29.828843,-32.840076 h 5.075651 v 15.377717 h 18.4432096 v -15.377717 h 5.0756516 V 4.6745172 H -6.3099824 V -13.190771 H -24.753192 V 4.6745172 h -5.075651 z" />\n        </g>\n    </g>\n</g>\n    '}static RoomTemperatureSvgData(){return'\n<g transform="scale(2.8,2.8) translate(2,2)">\n    <g transform="matrix(0.76419842,0,0,0.76419842,-3.2187002,-3.2187002)">\n        <circle r="11.288136" cy="16" cx="16" style="\n          opacity: 1;\n          fill: ##FillColor=#659dc5##;\n          fill-opacity: 1;\n          fill-rule: nonzero;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: round;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <g transform="translate(32.100664,13.086915)" style="\n          font-style: normal;\n          font-weight: normal;\n          font-size: 20.2897px;\n          line-height: 125%;\n          font-family: Sans;\n          letter-spacing: 0px;\n          word-spacing: 0px;\n          fill: ##StrokeColor=#000000##;\n          fill-opacity: 1;\n          stroke: none;\n          stroke-width: 1px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        ">\n            <path\n                d="m -22.356997,-4.4825641 h 12.5126658 v 1.6842067 H -15.095093 V 10.308734 h -2.011141 V -2.7983574 h -5.250763 z" />\n        </g>\n    </g>\n</g>\n    '}static TemperatureSvgData(){return'\n<g transform="scale(2.8,2.8) translate(6,0)">\n    <g id="layer1" stroke="##StrokeColor=#000000##" stroke-width="1px" transform="translate(-10.804626,-9.2243756)">\n        <rect id="rect3012" height="14.505" width="2.901" y="9.9127998" x="14.557" fill="#ffff00" />\n        <path id="path3010" stroke-width="1.2px" transform="matrix(0.74098,0,0,0.74098,7.3047,15.679)"\n            fill="##FillColor=#659dc5##"\n            d="m 17.949,15.898 -3.1021,5.373 H 8.6427 L 5.5406,15.898 8.6427,10.525 h 6.2042 z" />\n    </g>\n    <g id="g4141" transform="translate(-1.2033861,-8.1217684)">\n        <circle r="0.77312505" cy="28.129852" cx="6.4061227" id="path4137" style="\n          fill: none;\n          fill-opacity: 1;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <path id="path4139" d="M 6.4061205,27.157211 V 23.65349" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n    </g>\n</g>\n    '}static BoilerSvgData(){return'\n<g transform="scale(1.6,1.6) translate(3,3)">\n    <path style="\n        fill: ##FillColor=#659dc5##;\n        fill-opacity: 1;\n        fill-rule: nonzero;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1;\n        stroke-linecap: butt;\n        stroke-linejoin: miter;\n        stroke-miterlimit: 4;\n        stroke-dasharray: none;\n        stroke-opacity: 1;\n      " d="m 2,15 8,-7 0,-7 12,0 0,7 8,7 0,16 -28,0 z"></path>\n</g>\n  '}static HeatpumpSvgData(){return'\n<g transform="scale(1.6,1.6) translate(3,3)">\n    <g class="heat-pump" stroke-linejoin="round" stroke="##StrokeColor=#000000##" transform="translate(39 -2.3842e-7)"\n        fill="##FillColor=#659dc5##">\n        <rect class="inner" height="27.718" width="27.718" y="2.141" x="-36.859" stroke-width="1.0868"></rect>\n        <g transform="matrix(1.0276 0 0 1.0276 -39.441 -.44130)" stroke-linecap="round" stroke-miterlimit="1"\n            stroke-width="1.3509">\n            <path d="m16.234 16.944 8.6837-6.894-8.6837-6.894v3.447h-13.152v6.894h13.152z" fill="#ce2824">\n            </path>\n            <path d="m15.766 28.844-8.6837-6.894 8.6837-6.894v3.447h13.152v6.894h-13.152z" fill="#3238db">\n            </path>\n        </g>\n    </g>\n</g>\n    '}static PumpSvgData(){return'\n<g transform="scale(2.5,2.5) translate(1,1)">\n    <g fill="##FillColor=#659dc5##" transform="translate(-5.4940996,-5.5390997)">\n        <g class="pump">\n            <circle stroke="##StrokeColor=#000000##" cy="16" cx="15.955" r="9.9609003" class="pump-background" />\n            <g transform="translate(16,16)">\n                <path d="M -5,8.1369 V -8.1191 L 9.078,0.0091 Z" class="rotating-middle" stroke="##StrokeColor=#000000##"\n                    stroke-width="0.96719" />\n            </g>\n        </g>\n    </g>\n</g>\n    '}static ValveThreeWaySvgData(){return'\n<g transform="scale(2,2.3) translate(4,4)">\n    <g transform="matrix(1,0,0,-1,-4.3773334,22.894063)">\n        <g stroke-linejoin="round" stroke="##StrokeColor=#000000##" class="twv" fill="##FillColor=#659dc5##">\n            <g stroke-linecap="round">\n                <path d="M 16,16 4.925,22.3941 V 9.6061 Z" />\n                <path d="m 16,16 11.075,6.3941 V 9.6061 Z" />\n                <path d="M 16,16 9.606,4.925 h 12.788 z" />\n            </g>\n            <g class="blocker-wrapper">\n                <g class="blocker" fill="#000000" transform="translate(16,16)">\n                    <path stroke-width="0.80716"\n                        d="m 0,-9.6108 a 8.8788,8.8788 0 0 0 -6.0273,2.375 l 1.6172,2.8008 A 5.7576,5.7576 0 0 1 0,-6.4897 5.7576,5.7576 0 0 1 4.4062,-4.4292 L 6.0293,-7.2397 A 8.8788,8.8788 0 0 0 0,-9.6108 Z" />\n                </g>\n            </g>\n        </g>\n        <path d="M 6.7797,10.576 V 21.084" stroke="##StrokeColor=#000000##" stroke-width="1px" fill="none" />\n    </g>\n</g>\n    '}static ValveTwoWaySvgData(){return'\n<g transform="scale(2.2,2.9) translate(2,4)">\n    <g stroke-linejoin="round" fill-rule="nonzero" transform="translate(-3.8922957,-7.3951286)"\n        stroke="##StrokeColor=#000000##" stroke-linecap="round" stroke-dasharray="none" stroke-miterlimit="4"\n        stroke-width="1" fill="##FillColor=#659dc5##">\n        <path d="M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z" transform="translate(5.3992957,6.473236)" />\n        <path d="M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z" transform="matrix(-1,0,0,1,25.341517,6.354592)" />\n    </g>\n</g>\n    '}static DuctSvgData(){return""}static FanSvgData(){return'\n<g transform="scale(1.6,1.6) translate(2,6)">\n    <g fill="##FillColor=#659dc5##" transform="matrix(1, 0, 0, 1, -0.231, -4.151388)">\n        <g class="fan">\n            <g id="g8">\n                <path class="fan-background"\n                    d="m12.297 5.154c-6.117 0-11.066 4.9492-11.066 11.066 0 6.117 4.9492 11.066 11.066 11.066 5.7137 0 10.408-4.3091 11.003-9.8647h7.525v-12.268h-18.148c-0.12601-0.0043-0.25236 0-0.37941 0z"\n                    fill-rule="evenodd" stroke="##StrokeColor=#000000##" stroke-width="1px"\n                    fill="##FillColor=#659dc5##" />\n            </g>\n            <g id="g4148" transform="translate(12.464 16.395)">\n                <g id="g4162" stroke="##StrokeColor=#000000##" stroke-width="1.5" fill="none" class="rotating-middle">\n                    <path id="use3009" d="m-1.8112-3.9787 3.6227-4.4971" />\n                    <path id="use3011" d="m0.87376-4.2835 5.5741-1.5089" />\n                    <path id="use3013" d="m3.2243-2.9521 5.3965 2.0557" />\n                    <path id="use3015" d="m4.3433-0.4935 3.1575 4.835" />\n                    <path id="use3017" d="m3.8043 2.1547-0.28747 5.7676" />\n                    <path id="use3019" d="m1.8113 3.9787-3.6227 4.4971" />\n                    <path id="use3021" d="m-0.87324 4.2837-5.5741 1.5089" />\n                    <path id="use3023" d="m-3.2242 2.9527-5.3965-2.0559" />\n                    <path id="use3025" d="m-4.3432 0.4935-3.158-4.8353" />\n                    <path id="use3027" d="m-3.8032-2.1541 0.2875-5.7676" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static CoolingCoilSvgData(){return'\n<g transform="scale(2,2) translate(5.5,0)">\n    <g stroke="##StrokeColor=#000000##" transform="matrix(1, 0, 0, 1, -6.058399, -1.3729)">\n        <rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="##FillColor=#659dc5##" />\n        <g transform="translate(24.9334,29.6232) rotate(180)">\n            <rect id="rect4367" class="cooling-coil" height="27.246" width="17.875" x="0" y="0"\n                fill="##FillColor=#659dc5##" stroke="none" />\n        </g>\n        <rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="none" />\n        <path id="path3001" d="m7.322 2.3729 17.424 27.254" stroke-width="1px" fill="none" />\n        <path id="path3003" d="m24.929 2.3734-17.642 27.182" stroke-width="1px" fill="none" />\n    </g>\n</g>\n    '}static HeatingCoilSvgData(){return'\n<g transform="scale(2,2) translate(5.5,0)">\n    <defs id="defs3">\n        <rect id="heating-coil-rect" height="27.246" width="17.868" x="0" y="0" />\n    </defs>\n    <g stroke="##StrokeColor=#000000##" id="g15" transform="translate(-6.129206,-1.5327875)">\n        <use xlink:href="#heating-coil-rect" fill="##FillColor=#659dc5##" stroke="none" x="7.066" y="2.3771999"\n            id="use6" />\n        <g transform="rotate(180,12.4667,14.8116)" id="g10">\n            <use xlink:href="#heating-coil-rect" class="heating-coil" x="0" y="0" fill="##FillColor=#659dc5##"\n                stroke="none" id="use8" />\n        </g>\n        <use xlink:href="#heating-coil-rect" stroke-width="1" fill="none" x="7.066" y="2.3771999" id="use12" />\n        <path id="path3003" stroke-linejoin="miter" d="M 24.929,2.3734 7.2868,29.555" stroke="##StrokeColor=#000000##"\n            stroke-linecap="butt" stroke-width="1px" fill="none" />\n    </g>\n</g>\n    '}static FilterSvgData(){return'\n<g transform="scale(2,2) translate(9,0)">\n    <g stroke="##StrokeColor=#000000##" stroke-width="1" transform="matrix(1, 0, 0, 1, -9.37, -1.3252)">\n        <rect id="rect4367" height="27.35" width="11.26" y="2.3252" x="10.37" fill="##FillColor=#659dc5##" />\n        <path id="path3756" stroke-linejoin="miter"\n            d="m11.892,2.6997,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334"\n            stroke-linecap="round" stroke-miterlimit="4" stroke-dasharray="none" stroke-width="1.2694304" fill="none" />\n    </g>\n</g>\n    '}static HumidifierSvgData(){return'\n<g transform="scale(2.2,2.2) translate(5,2)">\n    <g class="duct-humidifier" transform="matrix(1, 0, 0, 1, -3.324199, -7.877)">\n        <g id="g11" transform="translate(0 5.1505)">\n            <g id="g13" stroke="##StrokeColor=#000000##" stroke-width=".5" class="water-drops"\n                fill="#00f0ff">\n                <path id="path4150"\n                    d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                <g id="g4236" transform="translate(0 .17167)">\n                    <path id="path4150-7"\n                        d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                    <path id="path4150-7-1"\n                        d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                </g>\n            </g>\n            <g id="g19" transform="translate(0,8)">\n                <g id="g21" stroke="##StrokeColor=#000000##" stroke-width=".5" class="water-drops water-drops-2"\n                    fill="#00f0ff">\n                    <path id="path23"\n                        d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                    <g id="g25" transform="translate(0 .17167)">\n                        <path id="path27"\n                            d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                        <path id="path29"\n                            d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                    </g>\n                </g>\n            </g>\n        </g>\n        <path id="rect4136-6" class="humidifier-body"\n            d="m4.3242 8.877v22.586h4.0059v-9.883h4.3789v-2.617h-4.3789v-5.721h4.3789v-2.617h-4.3789v-1.748h-4.0059z"\n            stroke="##StrokeColor=#000000##" fill="##FillColor=#659dc5##" />\n    </g>\n</g>\n    '}static HumiditySvgData(){return'\n<g transform="scale(2.5,2.5) translate(8,0)">\n    <rect style="\n        fill: #00d1ff;\n        fill-opacity: 1;\n        fill-rule: nonzero;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n      " x="3.660192" y="0.5" width="2.901" height="14.505" />\n    <path style="fill: ##FillColor=#659dc5##; stroke: ##StrokeColor=#000000##; stroke-width: 0.889176px"\n        d="m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z" />\n    <g transform="translate(-10.962785,-9.3157224)">\n        <g>\n            <path\n                d="m 17.43357,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n            <path\n                d="m 17.43357,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n        </g>\n        <g transform="translate(0,0.107786)">\n            <path\n                d="m 14.710621,24.560747 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n            <path\n                d="m 14.710621,27.770688 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n        </g>\n    </g>\n</g>\n    '}static PressureSvgData(){return'\n<g transform="scale(1.5,1.6) translate(6,6)">\n    <path style="fill: ##FillColor=#659dc5##; stroke: ##StrokeColor=#000000##; stroke-width: 1.29098px"\n        d="M 21.101011,20.624556 17.76371,26.404938 H 11.089107 L 7.7518058,20.624556 11.089107,14.844174 h 6.674603 z" />\n    <g transform="matrix(0.39332133,0,0,0.5366036,8.3312906,37.286552)">\n        <g transform="translate(0,0.03745956)">\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1.30927;\n            stroke-linecap: round;\n            stroke-linejoin: round;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="m 16.929663,-31.088307 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" />\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1;\n            stroke-linecap: butt;\n            stroke-linejoin: miter;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="M 27.541431,-31.088307 H 18.912663" />\n        </g>\n        <path d="m 15.532379,-39.152447 v 16.2032" style="\n          fill: none;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n        " />\n        <g transform="matrix(-1,0,0,1,-1.8983044,-0.27118644)">\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1.30927;\n            stroke-linecap: round;\n            stroke-linejoin: round;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="m -15.961713,-30.779661 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" />\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1;\n            stroke-linecap: butt;\n            stroke-linejoin: miter;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="M -5.3499446,-30.779661 H -13.978713" />\n        </g>\n    </g>\n    <g transform="translate(-1.5131572,-0.15657804)">\n        <path d="M 2.0131572,0.15657804 V 6.9638416 H 14.573291 v 8.3199894" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <path d="M 29.865974,0.15657812 V 6.9638416 H 17.305841 v 8.3199894" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n    </g>\n</g>\n      '}static DamperSvgData(){return'\n<g transform="scale(2,2) translate(10,0)">\n    <rect class="damper" height="27.5" width="12" stroke="##StrokeColor=#000000##" stroke-miterlimit="4" x="0.69481522"\n        y="0.67645228" stroke-dasharray="none" stroke-width="1" fill="##FillColor=#659dc5##" />\n    <g stroke="##StrokeColor=#000000##" stroke-width="1.5px" transform="translate(-9.3051848,-1.5735477)">\n        <g transform="translate(16,7)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n        <g transform="translate(16,13)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n        <g transform="translate(16,19)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n        <g transform="translate(16,25)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n    </g>\n    <g stroke-linejoin="miter" transform="matrix(1.2268237,0,0,0.94845469,-13.299764,-1.1862851)"\n        stroke="##StrokeColor=#000000##" stroke-linecap="butt" fill="none">\n        <path stroke-width="1.06273px" d="m 16.298,2.2402 v 28.442" />\n    </g>\n</g>\n    '}static Temperature2SvgData(){return""}static ThermalWheelSvgData(){return'\n<g transform="scale(1.4,1.2) translate(9,8)">\n    <g stroke="##StrokeColor=#000000##" fill="##FillColor=#659dc5##" transform="translate(-2.370089)">\n        <rect class="thermal-wheel-background" height="40" width="25.5" y="-4" x="3" fill="inherit" stroke-width="1" />\n        <g class="thermal-wheel" stroke-width="1">\n            <line x1="3" x2="28.5" y1="-4" y2="-4" />\n            <line x1="3" x2="28.5" y1="0" y2="0" />\n            <line x1="3" x2="28.5" y1="4" y2="4" />\n            <line x1="3" x2="28.5" y1="8" y2="8" />\n            <line x1="3" x2="28.5" y1="12" y2="12" />\n            <line x1="3" x2="28.5" y1="16" y2="16" />\n            <line x1="3" x2="28.5" y1="20" y2="20" />\n            <line x1="3" x2="28.5" y1="24" y2="24" />\n            <line x1="3" x2="28.5" y1="28" y2="28" />\n            <line x1="3" x2="28.5" y1="32" y2="32" />\n            <line x1="3" x2="28.5" y1="36" y2="36" />\n        </g>\n    </g>\n</g>\n    '}static EnthalpySvgData(){return'\n<g transform="scale(2.8,2.4) translate(5,1)">\n    <defs>\n        <linearGradient id="linearGradient4194">\n            <stop style="stop-color: #ffff00; stop-opacity: 1" offset="0" id="stop4196" />\n            <stop id="stop4148" offset="0.3598454" style="stop-color:#ffff00; stop-opacity: 1" />\n            <stop id="stop4144" offset="0.59441435" style="stop-color: #00ffff; stop-opacity: 1" />\n            <stop style="stop-color: #00ffff; stop-opacity: 1" offset="1" id="stop4198" />\n        </linearGradient>\n        <linearGradient xlink:href="#linearGradient4194" id="linearGradient4219" x1="15.955305" y1="9.504283"\n            x2="16.127491" y2="24.826317" gradientUnits="userSpaceOnUse"\n            gradientTransform="translate(-10.896808,-9.4127998)" />\n    </defs>\n    <rect style="\n        fill: url(#linearGradient4219);\n        fill-opacity: 1;\n        fill-rule: nonzero;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n      " x="3.660192" y="0.5" width="2.901" height="14.505" id="rect3012" />\n    <path style="fill: ##FillColor=#659dc5## ; stroke: ##StrokeColor=#000000##; stroke-width: 0.889176px"\n        d="m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z" />\n    <g transform="translate(-10.733726,-9.4127998)">\n        <g transform="translate(8.1630559,0.95878887)">\n            <circle style="\n            fill: none;\n            fill-opacity: 1;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " id="path4137" cx="6.4061227" cy="28.129852" r="0.77312505" />\n            <path style="\n            fill: none;\n            fill-rule: evenodd;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-linecap: butt;\n            stroke-linejoin: miter;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " d="M 6.4061205,27.157211 V 23.65349" />\n        </g>\n        <path style="\n          fill: none;\n          stroke:##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        "\n            d="m 17.270488,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" />\n        <path style="\n          fill: none;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        "\n            d="m 17.270488,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" />\n    </g>\n</g>\n    '}static FlowSvgData(){return'\n<g transform="scale(2.7,2.5) translate(7,2)">\n    <defs>\n        <linearGradient id="linearGradient4194">\n            <stop style="stop-color: #ffff00; stop-opacity: 1" offset="0" />\n            <stop style="stop-color: currentColor; stop-opacity: 1" offset="1" />\n        </linearGradient>\n    </defs>\n    <path style="fill: ##FillColor=#659dc5##; stroke: ##StrokeColor=#000000##; stroke-width: 0.889176px"\n        d="m 9.7077419,16.908637 -2.298594,3.981286 H 2.8119599 L 0.51336587,16.908637 2.8119599,12.927351 h 4.597188 z" />\n    <g transform="matrix(0.83920236,0,0,0.83920236,-8.3130944,-6.3365267)">\n        <path id="path4146" d="m 14.917284,30.513877 v -5.217284 h 2.569115" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.824475px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        " />\n        <path d="m 14.956808,27.549512 h 2.529591" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.824475px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        " />\n    </g>\n    <path style="\n        fill: none;\n        fill-rule: evenodd;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n        stroke-linecap: butt;\n        stroke-linejoin: miter;\n        stroke-opacity: 1;\n      " d="M 5.1629049,12.964256 V 0.5 H 0.56071887" />\n    <path style="\n        fill: none;\n        fill-rule: evenodd;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n        stroke-linecap: butt;\n        stroke-linejoin: miter;\n        stroke-opacity: 1;\n      " d="m 5.0190869,8.889403 h 2.205215 v 4.122792" />\n</g>\n    '}static GuageSvgData(){return""}static DialSvgData(){return""}static ValueSvgData(){return""}static IconWithTitleSvgData(){return""}static TestSvg(){}static Test1SvgData(){return'\n<g>\n    <g width="13.667" height="10.167" transform="scale(1,1) translate(0,20.833)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="13.667" height="10.167" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="13.667" height="10.167" />\n        </g>\n    </g>\n    <g width="13.667" height="10.167" transform="scale(1,1) translate(56.833,21.167)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="13.667" height="10.167" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="13.667" height="10.167" />\n        </g>\n    </g>\n    <g width="13.667" height="10.167" transform="rotate(270,34.667,6.75) scale(1,1) translate(27.833,1.667)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="13.667" height="10.167" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="13.667" height="10.167" />\n        </g>\n    </g>\n    <g width="46.167" height="25.5" transform="scale(1,1) translate(12,12.667)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="46.167" height="25.5" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="46.167" height="25.5" />\n        </g>\n    </g>\n</g>\n    '}};let ToolSvgData=_ToolSvgData;__publicField(ToolSvgData,"DuctSvg",ToolDuctT1SvgData);class ToolUtil{SetSelectionTool(t,e){LogUtil.Debug("O.ActiveSelection.SetSelectionTool - Input:",{toolType:t,isSticky:e}),SvgUtil.RenderAllSVGSelectionStates()}CancelOperation(t){return LogUtil.Debug("O.ToolOpt CancelOperation input:",t),this.SetSelectionTool(ToolConstant.Tools.Select,!1),OptCMUtil.CancelOperation(),LogUtil.Debug("O.ToolOpt CancelOperation output: false"),!1}SetDefaultWallThickness(t,e){LogUtil.Debug("O.ToolOpt SetDefaultWallThickness input:",t,e);var i=1;T3Gv.docUtil.rulerConfig.useInches||(i=OptConstant.Common.MetricConv),e&&(t=e.Data.thick);var n=t*T3Gv.docUtil.rulerConfig.major/(T3Gv.docUtil.rulerConfig.majorScale*i),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(!Utils2.IsEqual(s.def.wallThickness,n,.01)||e){T3Gv.opt.CloseEdit(!0,!0),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),e||(s.def.wallThickness=n);s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);DrawUtil.CompleteOperation()}LogUtil.Debug("O.ToolOpt SetDefaultWallThickness output: void")}DrawNewWallShape(t,e){var i;LogUtil.Debug("O.ToolOpt DrawNewWallShape input:",t,e);var n=null!=e,s=T3Gv.wallOpt;if(s&&s.AddWall&&(T3Gv.opt.CloseEdit(),s.ToggleAddingWalls(!0),i=s.AddWall(n,e)),n)return LogUtil.Debug("O.ToolOpt DrawNewWallShape output:",i),i;LogUtil.Debug("O.ToolOpt DrawNewWallShape output: undefined")}StampOrDragDropNewShape(t,e,i){LogUtil.Debug("U.ToolUtil.StampOrDragDropNewShape - Input:",t,e),DrawUtil.PreDragDropOrStamp();let n=this.StampOrDragDropCallback;T3Gv.opt.stampTimeout=window.setTimeout(n,200,this,e,i),LogUtil.Debug("U.ToolUtil.StampOrDragDropNewShape - Output: stampTimeout set")}DrawNewLineShape(t,e,i,n){LogUtil.Debug("O.ToolOpt DrawNewLineShape input:",t,e,i,n);let s=!1,a=null;switch(t){case"line":a=this.DrawNewLine(i,0,s,n);break;case"commline":a=this.DrawNewLine(i,1,s,n);break;case"digiline":a=this.DrawNewLine(i,2,s,n);break;case"arcLine":a=this.DrawNewArcLine(s,i,n);break;case"segLine":a=this.DrawNewSegLine(s,i,n);break;case"arcSegLine":a=this.DrawNewArcSegLine(s,i,n);break;case"polyLine":a=this.DrawNewPolyLine(s,i,n);break;case"polyLineContainer":a=this.DrawNewPolyLineContainer(s,i,n);break;case"freehandLine":a=this.DrawNewFreehandLine(s,i,n);break;case"moveWall":a=T3Gv.wallOpt&&T3Gv.wallOpt.AddWall?T3Gv.wallOpt.AddWall(s,n):this.DrawNewLine(i,0,s,n)}LogUtil.Debug("O.ToolOpt DrawNewLineShape output:",a)}DrawNewLine(t,e,i,n){LogUtil.Debug("O.ToolOpt DrawNewLine input:",t,e,i,n);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o,r=s.d_sarrow,l=s.d_earrow,h=s.d_sarrowdisp,c=s.d_earrowdisp,u=0;switch(e){case OptConstant.LineTypes.LsComm:case OptConstant.LineTypes.LsDigi:u=.25}r>0!=l>0&&(0===l&&(l=r,c=h),r=0,h=!1),o=n?Utils1.DeepCopy(n.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:r,StartArrowDisp:h,EndArrowID:l,EndArrowDisp:c,ArrowSizeIndex:s.d_arrowsize,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,ShortRef:e,shapeparam:u,bOverrideDefaultStyleOnDraw:!0};const d=new Line$1(o);let p=Utils1.DeepCopy(s.def.style);if(n&&n.Data&&n.Data.attributes&&n.Data.attributes.StyleRecord?p=Utils1.DeepCopy(n.Data.attributes.StyleRecord):(Utils3.FindStyle(OptConstant.Common.TextBlockStyle),p.Text.Paint.Color="#000000"),d.StyleRecord=p,s.flags&OptConstant.SessionFlags.AllowHops&&(d.flags=Utils2.SetFlag(d.flags,NvConstant.ObjFlags.LineHop,!0)),i)return LogUtil.Debug("O.ToolOpt DrawNewLine output:",d),d;DrawUtil.DrawNewObject(d,t),LogUtil.Debug("O.ToolOpt DrawNewLine output: void")}StampOrDragDropCallback(t,e,i){var n;LogUtil.Debug("O.ToolOpt StampOrDragDropCallback input:",t,e);var s=PolygonConstant.ShapeTypes;switch(T3Gv.opt.stampTimeout=null,n=!0,e){case"textLabel":t.StampTextLabel(!1,!1);break;case s.RECTANGLE:t.DrawRectangle(n,!1);break;case s.ROUNDED_RECTANGLE:t.StampRoundRect(n,!1);break;case s.CIRCLE:t.DrawCircle(n,!0);break;case s.OVAL:t.DrawCircle(n,!1);break;case s.ForeignObject:t.StampVueComponent(n,i);break;default:t.StampShape(e,n)}LogUtil.Debug("O.ToolOpt StampOrDragDropCallback output: void")}DrawRectangle(t,e){ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i={Frame:{x:-1e3,y:-1e3,width:e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeWidth,height:e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeHeight},TextGrow:NvConstant.TextGrowBehavior.ProPortional,shapeparam:0,moreflags:OptConstant.ObjMoreFlags.FixedRR,ObjGrow:OptConstant.GrowBehavior.All};e&&(i.ObjGrow=OptConstant.GrowBehavior.ProPortional);const n=new Rect$1(i);DrawUtil.MouseDrawNewShape(n,!0,!0,!0,null,null)}StampRoundRect(t,e){let i,n;LogUtil.Debug("O.ToolOpt StampRoundRect input:",t,e);const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e?(i=OptConstant.Common.ShapeSquare,n=OptConstant.Common.ShapeSquare):(i=OptConstant.Common.ShapeWidth,n=OptConstant.Common.ShapeHeight);const a={Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional,shapeparam:s.def.rrectparam,moreflags:OptConstant.ObjMoreFlags.FixedRR,ObjGrow:OptConstant.GrowBehavior.All};e&&(a.ObjGrow=OptConstant.GrowBehavior.ProPortional);const o=new RRect$1(a);DrawUtil.MouseDrawNewShape(o,!0,!0,!0,null,null),LogUtil.Debug("O.ToolOpt StampRoundRect output: void")}DrawCircle(t,e){let i=e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeWidth,n=e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeHeight;let s=e?{Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ObjGrow:OptConstant.GrowBehavior.ProPortional}:{Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional};const a=new Oval$1(s);DrawUtil.MouseDrawNewShape(a,!0,!0,!0,null,null)}StampVueComponent(t,e){let i,n;LogUtil.Debug("U.ToolUtil StampVueComponent:",t,e),i=OptConstant.Common.ShapeWidth,n=OptConstant.Common.ShapeHeight;let s=null;s={Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional,uniType:e};var a={item:{title:"==== Test Pump ====",active:!1,type:"Pump",translate:[284,72],width:60,height:60,rotate:0,scaleX:1,scaleY:1,settings:{fillColor:"#659dc5",active:!0,inAlarm:!0,titleColor:"inherit",bgColor:"inherit",textColor:"inherit",fontSize:16,t3EntryDisplayField:"description"},zindex:1,t3Entry:{auto_manual:1,calibration_h:0,calibration_l:0,calibration_sign:1,command:"199IN1",control:1,decom:1,description:"V",digital_analog:1,filter:5,id:"IN1",index:0,label:"IN1",pid:199,range:19,type:"INPUT",unit:19,value:30},showDimensions:!0,cat:"Pipe",id:2},showArrows:!0},o=QuasarUtil.GetItemFromAPSV2(e);LogUtil.Debug("apsItem",o);var r=this.CreateForeignObjectWithVue(T3Gv.opt.svgDoc,ObjectType,a,s);DrawUtil.MouseDrawNewShape(r,!0,!0,!0,null,null),LogUtil.Debug("U.ToolUtil StampVueComponent output: void")}CreateForeignObjectWithVue(t,e,i,n){const s=new Instance.Shape.ForeignObject({vueComponent:e,vueProps:i,...n});return LogUtil.Debug("ToolUtil->CreateForeignObjectWithVue After",s),s}StampTextLabel(t,e){LogUtil.Debug("O.ToolOpt StampTextLabel input:",t,e);const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(e||-1==i.theActiveTextEditObjectID){if(!e){const t=SelectUtil.GetTargetSelect();if(t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!1);if(e&&e.AllowTextEdit()){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);return TextUtil.ActivateTextEdit(e)}}}}else TextUtil.DeactivateTextEdit();const n=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;let s=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);null==s&&(s=n.def.style);const a={StyleRecord:Utils1.DeepCopy(s),Frame:{x:0,y:0,width:0,height:0},TMargins:{top:0,left:0,bottom:0,right:0},TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:TextConstant.TextAlign.Left,flags:NvConstant.ObjFlags.TextOnly};null==a.StyleRecord.Line&&(a.StyleRecord.Line=Utils1.DeepCopy(s.Border)),a.StyleRecord.Line.Thickness=0;const o=new Instance.Shape.Rect(a),r=Utils1.DeepCopy(n.def.style);r.Text.Paint=Utils1.DeepCopy(s.Text.Paint),o.StyleRecord.Text=r.Text;const l=TextUtil.CalcDefaultInitialTextStyle(o.StyleRecord.Text),h=T3Gv.opt.svgDoc.CalcStyleMetrics(l);T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=h.ascent,o.Frame.height=h.height,t||TextUtil.DeactivateTextEdit(!1),DrawUtil.StampNewTextShapeOnTap(o,!1,!1,!1,t,this.StampCallback,{bActivateText:!0}),LogUtil.Debug("O.ToolOpt StampTextLabel output: void")}StampCallback(t,e){if(e.bActivateText){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);TextUtil.ActivateTextEdit(e)}}StampShape(t,e){let i;LogUtil.Debug("U.ToolUtil.StampShape - Input:",t,e);const n=PolygonConstant.ShapeTypes,s={x:-1e3,y:-1e3,width:OptConstant.Common.ShapeWidth,height:OptConstant.Common.ShapeHeight},a=T3Gv.opt.GetShapeParams(t,s),o={Frame:s,TextGrow:NvConstant.TextGrowBehavior.ProPortional,dataclass:a.dataclass,shapeparam:a.shapeparam};switch(a.bIsSquare&&(o.ObjGrow=OptConstant.GrowBehavior.ProPortional),a.dataclass){case n.RECTANGLE:i=new Rect$1(o);break;case n.ROUNDED_RECTANGLE:i=new RRect$1(o);break;case n.OVAL:i=new Oval$1(o);break;default:const t=a.polyVectorMethod(s,a.shapeparam);o.VertexArray=t,i=new Polygon$1(o),i.dataclass=a.dataclass}DrawUtil.MouseDrawNewShape(i,!0,!0,!0,null,null),LogUtil.Debug("U.ToolUtil.StampShape - Output: Shape stamped successfully")}RotateShapes(t){LogUtil.Debug("O.ToolOpt RotateShapes input:",t);try{T3Gv.opt.CloseEdit(),ToolActUtil.RotateShapes(parseInt(t,10))}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}LogUtil.Debug("O.ToolOpt RotateShapes output: void")}AlignShapes(t){LogUtil.Debug("O.ToolOpt AlignShapes input:",t);try{T3Gv.opt.CloseEdit(),ToolActUtil.AlignShapes(t)}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}LogUtil.Debug("O.ToolOpt AlignShapes output: void")}DeleteSelectedObjects(){LogUtil.Debug("O.ToolOpt DeleteSelectedObjects input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.DeleteSelectedObjects()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt DeleteSelectedObjects output: void")}Undo(){LogUtil.Debug("O.ToolOpt Undo input: no parameters");try{ToolActUtil.Undo()}catch(t){throw t}LogUtil.Debug("O.ToolOpt Undo output: void")}Redo(){LogUtil.Debug("O.ToolOpt Redo input: no parameters");try{ToolActUtil.Redo()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt Redo output: void")}Copy(){LogUtil.Debug("O.ToolOpt Copy input: no parameters");try{let e=!1;try{e=document.execCommand("copy")}catch(t){throw t}e||T3Gv.opt.CopyObjects()}catch(t){throw T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt Copy output: void")}Cut(){LogUtil.Debug("O.ToolOpt Cut input: no parameters");try{let e=!1;try{e=document.execCommand("cut")}catch(t){throw t}e||ToolActUtil.CutObjects()}catch(t){throw T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt Cut output: void")}Paste(t){LogUtil.Debug("= u.ToolUtil: Paste/ input isRightClick:",t);try{T3Gv.opt.PastePoint=null,t&&T3Gv.opt.rClickParam&&(T3Gv.opt.PastePoint=T3Gv.opt.rClickParam.hitPoint),T3Clipboard.PasteFromUIaction()}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}}SendToBackOf(){LogUtil.Debug("O.ToolOpt SendToBackOf input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.SendToBackOf()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt SendToBackOf output: void")}BringToFrontOf(){LogUtil.Debug("O.ToolOpt BringToFrontOf input: no parameters");try{T3Gv.opt.CloseEdit(),DrawUtil.BringToFrontOf()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt BringToFrontOf output: void")}GroupSelected(){LogUtil.Debug("O.ToolOpt GroupSelected input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.GroupSelected(!1,null,!1,!1,!0)}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt GroupSelected output: void")}UnGroupSelected(){LogUtil.Debug("O.ToolOpt UnGroupSelected input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.UnGroupSelected()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt UnGroupSelected output: void")}FlipHorizontal(){LogUtil.Debug("O.ToolOpt FlipHorizontal input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.FlipShapes(OptConstant.ExtraFlags.FlipHoriz)}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt FlipHorizontal output: void")}FlipVertical(){LogUtil.Debug("O.ToolOpt FlipVertical input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.FlipShapes(OptConstant.ExtraFlags.FlipVert)}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt FlipVertical output: void")}MakeSameSize(t){LogUtil.Debug("O.ToolOpt MakeSameSize input:",t);try{T3Gv.opt.CloseEdit(),ToolActUtil.MakeSameSize(parseInt(t,10))}catch(e){T3Gv.opt.ExceptionCleanup(e)}LogUtil.Debug("O.ToolOpt MakeSameSize output: void")}GetSelectionContext(){LogUtil.Debug("O.ToolOpt GetSelectionContext input: no parameters");try{const t=SelectUtil.GetSelectionContext();return LogUtil.Debug("O.ToolOpt GetSelectionContext output:",t),t}catch(t){T3Gv.opt.ExceptionCleanup(t)}}IsActiveTextEdit(){LogUtil.Debug("O.ToolOpt IsActiveTextEdit input: no parameters");try{const t=-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID;return LogUtil.Debug("O.ToolOpt IsActiveTextEdit output:",t),t}catch(t){T3Gv.opt.ExceptionCleanup(t),LogUtil.Debug("O.ToolOpt IsActiveTextEdit output: undefined (error)")}}HandleKeyDown(t,e,i){LogUtil.Debug("O.ToolOpt HandleKeyDown input:",t,e,i);try{const n=LMEvtUtil.HandleKeyDown(t,e,i);return LogUtil.Debug("O.ToolOpt HandleKeyDown output:",n),n}catch(n){T3Gv.opt.ExceptionCleanup(n),LogUtil.Debug("O.ToolOpt HandleKeyDown output: undefined (error)")}}Duplicate(){LogUtil.Debug("O.ToolOpt Duplicate input: no parameters");try{ToolActUtil.DuplicateObjects(),LogUtil.Debug("O.ToolOpt Duplicate output: void")}catch(t){T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(t),LogUtil.Debug("O.ToolOpt Duplicate output: void (error)")}}HandleKeyPress(t,e){LogUtil.Debug("O.ToolOpt HandleKeyPress input:",t,e);try{const i=LMEvtUtil.HandleKeyPress(t,e);return LogUtil.Debug("O.ToolOpt HandleKeyPress output:",i),i}catch(i){T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("O.ToolOpt HandleKeyPress output: undefined (error)")}}DragDropSymbol(t,e){LogUtil.Debug("U.ToolUtil.dragDropSymbol - Input:",t,e),this.StampOrDragDropNewSymbol(t,e),LogUtil.Debug("U.ToolUtil.dragDropSymbol - Output: void")}StampOrDragDropNewSymbol(t,e){LogUtil.Debug("O.ToolOpt StampOrDragDropNewSymbol input:",t,e);const i='\n      <path\n        style="\n          fill: ##FillColor=#28c3c6##;\n          fill-opacity: 1;\n          fill-rule: nonzero;\n          stroke:##LineColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        "\n        d="m 3.714,27.855 14.856,-12.999 0,-12.999 22.284,0 0,12.999 14.856,12.999 0,29.712 -51.996,0 z"\n      ></path>\n    ',n=new SvgSymbol({Frame:{x:-1e3,y:-1e3,width:60,height:60},hookflags:257,moreflags:64,targflags:3,InitialGroupBounds:{x:0,y:0,width:30,height:30}});n.StyleRecord=new QuickStyle;const s=i.replace(/\n\s*/g," ").trim();LogUtil.Debug("D.D testSvgString",s),n.Frame={x:-1e3,y:-1e3,width:60,height:60},n.InitialGroupBounds={width:60,height:60,x:-1e3,y:-1e3};n.SVGFragment='\n        <g transform="translate(0,0)">\n            <circle r="30" cy="30" cx="30"\n            style="\n                    opacity: 1;\n                    fill: ##FillColor=#FFFFFF##;\n                    fill-opacity: 1;\n                    fill-rule: nonzero;\n                    stroke:##FillColor=#000000##;\n                    stroke-width: 0.764198;\n                    stroke-linecap: butt;\n                    stroke-linejoin: round;\n                    stroke-miterlimit: 4;\n                    stroke-dasharray: none;\n                    stroke-opacity: 1;\n                  "/>\n            <g transform="matrix(1,0,0,1,46,43)"\n            style="\n                    font-style: normal;\n                    font-weight: normal;\n                    font-size: 51px;\n                    line-height: 125%;\n                    font-family: Sans;\n                    letter-spacing: 0px;\n                    word-spacing: 0px;\n                    fill:##FillColor=#000000##;\n                    fill-opacity: 1;\n                    stroke: none;\n                    stroke-width: 1px;\n                    stroke-linecap: butt;\n                    stroke-linejoin: miter;\n                    stroke-opacity: 1;\n                  ">\n                <path\n                    d="m -29.828843,-32.840076 h 5.075651 v 15.377717 h 18.4432096 v -15.377717 h 5.0756516 V 4.6745172 H -6.3099824 V -13.190771 H -24.753192 V 4.6745172 h -5.075651 z" />\n            </g>\n        </g>\n      ',n&&DrawUtil.DragDropNewShape(n,!0,!0,!1,null,null),LogUtil.Debug("O.ToolOpt StampOrDragDropNewSymbol output: void")}ToolDragDropSymbol(t,e){var i=ToolSvgData.GetSvgData(t);this.ToolDragDropNewSymbol(i,e),LogUtil.Debug("= U.ToolUtil.dragDropSymbol - Input/Output:",t,e)}ToolDragDropNewSymbol(t,e){DrawUtil.DragDropNewShape(t,!0,!0,!1,null,null),LogUtil.Debug("= U.ToolUtil ToolDragDropNewSymbol input/output:",t,e)}DrawNewSegLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewSegLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),n=i?Utils1.DeepCopy(i.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,curveparam:s.def.curveparam,bOverrideDefaultStyleOnDraw:!0};const c=new Instance.Shape.SegmentedLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,s.flags&OptConstant.SessionFlags.AllowHops&&(c.flags=Utils2.SetFlag(c.flags,NvConstant.ObjFlags.LineHop,!0)),t)return LogUtil.Debug("O.ToolOpt DrawNewSegLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewSegLine output: void")}DrawNewArcSegLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewArcSegLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),n=i?Utils1.DeepCopy(i.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,bOverrideDefaultStyleOnDraw:!0};const c=new Instance.Shape.ArcSegmentedLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,s.flags&OptConstant.SessionFlags.AllowHops&&(c.flags=Utils2.SetFlag(c.flags,NvConstant.ObjFlags.LineHop,!0)),t)return LogUtil.Debug("O.ToolOpt DrawNewArcSegLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewArcSegLine output: void")}DrawNewPolyLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewPolyLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),i?n=Utils1.DeepCopy(i.Data.attributes):(n={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,polylist:new PolyList,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,extraflags:OptConstant.ExtraFlags.SideKnobs,bOverrideDefaultStyleOnDraw:!0},n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)),n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)));const c=new Instance.Shape.PolyLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,t)return LogUtil.Debug("O.ToolOpt DrawNewPolyLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewPolyLine output: void")}DrawNewPolyLineContainer(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewPolyLineContainer input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);i?n=Utils1.DeepCopy(i.Data.attributes):(n={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:s.d_sarrow,EndArrowID:s.d_earrow,StartArrowDisp:s.d_sarrowdisp,EndArrowDisp:s.d_earrowdisp,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,polylist:new PolyList,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions},n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)),n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)));const o=new Instance.Shape.PolyLineContainer(n);if(t)return LogUtil.Debug("O.ToolOpt DrawNewPolyLineContainer output:",o),o;DrawUtil.DrawNewObject(o,e),LogUtil.Debug("O.ToolOpt DrawNewPolyLineContainer output: void")}DrawNewFreehandLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewFreehandLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;i?n=Utils1.DeepCopy(i.Data.attributes):(n={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},pointlist:[],bOverrideDefaultStyleOnDraw:!0},n.pointlist.push({x:0,y:0}));const a=new Instance.Shape.FreehandLine(n);let o=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord&&(o=Utils1.DeepCopy(i.Data.attributes.StyleRecord)),a.StyleRecord=o,t)return LogUtil.Debug("O.ToolOpt DrawNewFreehandLine output:",a),a;DrawUtil.DrawNewObject(a,e),LogUtil.Debug("O.ToolOpt DrawNewFreehandLine output: void")}DrawNewArcLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewArcLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),n=i?Utils1.DeepCopy(i.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,bOverrideDefaultStyleOnDraw:!0};const c=new Instance.Shape.ArcLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,s.flags&OptConstant.SessionFlags.AllowHops&&(c.flags=Utils2.SetFlag(c.flags,NvConstant.ObjFlags.LineHop,!0)),t)return LogUtil.Debug("O.ToolOpt DrawNewArcLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewArcLine output: void")}SelectAllObjects(){LogUtil.Debug("O.ToolOpt SelectAllObjects input: no parameters");try{SelectUtil.SelectAllObjects()}catch(t){T3Gv.opt.ExceptionCleanup(t)}LogUtil.Debug("O.ToolOpt SelectAllObjects output: void")}Save(){T3Gv.opt.CloseEdit(),DataOpt.SaveToLocalStorage()}VueForeignObject(){this.tul.StampOrDragDropNewShape(event,shapeType)}ClearAndRest(){DataOpt.ClearT3LocalStorage(),DrawUtil.ClearDrawArea()}}class ToolOpt{constructor(){__publicField(this,"tul"),this.tul=new ToolUtil}SelectAct(t){LogUtil.Debug("= O.ToolOpt SelectAct - Input:",{event:t}),this.tul.CancelOperation()}SelectAllObjects(){LogUtil.Debug("= O.ToolOpt SelectAllObjects - Input:",{event:event}),this.tul.SelectAllObjects()}DrawWall(t){this.tul.SetDefaultWallThickness(.5,null),this.tul.DrawNewWallShape(null,null),LogUtil.Debug("= O.ToolOpt DrawWall - Output: Initialized wall drawing with thickness",.5)}StampShapeFromToolAct(t,e,i){this.tul.StampOrDragDropNewShape(t,e,i),LogUtil.Debug("= O.ToolOpt StampShapeFromToolAct - Output:",{event:t,shapeType:e,uniShapeType:i})}ToolLineAct(t,e){this.tul.DrawNewLineShape(t,!1,!1),LogUtil.Debug("= O.ToolOpt ToolLineAct - Output: Drew new line shape","line type=",t)}RotateAct(t,e){this.tul.RotateShapes(e)}ShapeAlignAct(t){LogUtil.Debug("= O.ToolOpt ShapeAlignAct - Input:",{alignmentType:t}),this.tul.AlignShapes(t)}GroupAct(t){this.tul.GroupSelected(),LogUtil.Debug("= O.ToolOpt GroupAct - Output: Grouped selected shapes")}UnGroupAct(t){this.tul.UnGroupSelected(),LogUtil.Debug("= O.ToolOpt UngroupAct - Output: Ungrouped selected shapes")}ShapeFlipHorizontalAct(t){this.tul.FlipHorizontal(),LogUtil.Debug("= O.ToolOpt ShapeFlipHorizontalAct - Output: Flipped shapes horizontally")}ShapeFlipVerticalAct(t){this.tul.FlipVertical(),LogUtil.Debug("= O.ToolOpt ShapeFlipVerticalAct - Output: Flipped shapes vertically")}MakeSameSizeAct(t,e){this.tul.MakeSameSize(e),LogUtil.Debug("= O.ToolOpt MakeSameSizeAct - Output: Made shapes same size with option",e)}ShapeBringToFrontAct(t){this.tul.BringToFrontOf(),LogUtil.Debug("= O.ToolOpt ShapeBringToFrontAct - Output: Brought shapes to front")}ShapeSendToBackAct(t){this.tul.SendToBackOf(),LogUtil.Debug("= O.ToolOpt ShapeSendToBackAct - Output: Sent shapes to back")}PasteAct(t){this.tul.Paste(false),LogUtil.Debug("= O.ToolOpt PasteAct - Output: Pasted objects isRightClick",false)}PasteActRightClickAct(t){this.tul.Paste(true),LogUtil.Debug("= O.ToolOpt PasteActRightClickAct - Output: Pasted objects with right click context menu",true)}CopyAct(t){this.tul.Copy(),LogUtil.Debug("= O.ToolOpt CopyAct - Output: Copied selected objects")}CutAct(t){this.tul.Cut(),LogUtil.Debug("= O.ToolOpt CutAct - Output: Cut selected objects")}DeleteAct(t){this.tul.DeleteSelectedObjects(),LogUtil.Debug("= O.ToolOpt DeleteAct - Output: Deleted selected objects")}UndoAct(t){this.tul.Undo(),LogUtil.Debug("= O.ToolOpt UndoAct - Output: Undid last operation")}RedoAct(t){this.tul.Redo(),LogUtil.Debug("= O.ToolOpt RedoAct - Output: Redid last undone operation")}SaveAct(){this.tul.Save()}DuplicateAct(t){this.tul.Duplicate(),LogUtil.Debug("= O.ToolOpt DuplicateAct - Output: Duplicated selected objects")}ClickSymbolAct(t){const e="d6e019b9-110d-4990-8897-eade69451d92";this.tul.StampOrDragDropNewSymbol(e,!1),LogUtil.Debug("= O.ToolOpt ClickSymbolAct - Output: Pre-loaded symbol",e)}DragDropSymbolAct(t){this.tul.DragDropSymbol(t,!0),LogUtil.Debug("= O.ToolOpt DragDropSymbolAct - Output: Handled symbol drag and drop")}LibSetBackgroundImageAct(t,e){LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Input:",{event:t,isLayerImage:e});try{T3Gv.opt.CloseEdit(!0,!0);const t="C:\\Users\\Double\\Desktop\\RE5cNdq.jpg",i=document.createElement("input");i.type="file",i.accept="image/*",i.onchange=t=>{var n;const s=null==(n=i.files)?void 0:n[0];if(!s)return void LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: No file selected");const a=new FileReader;a.onload=()=>{a.result;e?T3Gv.opt.ImportBackgroundLayerImage(s):T3Gv.opt.SetBackgroundImage(s),LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Output: Set background image",{asLayer:e})},a.onerror=()=>{LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: Failed to read file")},a.readAsDataURL(s)},i.click();let n=t;e?T3Gv.opt.ImportBackgroundLayerImage(n):T3Gv.opt.SetBackgroundImage(n),LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Output: Set background image",{asLayer:e})}catch(i){T3Gv.opt.ExceptionCleanup(i)}}LibLockAct(t){var e;try{const i=t?null==(e=T3Gv.opt.rClickParam)?void 0:e.targetId:SelectUtil.GetTargetSelect();T3Gv.opt.CloseEdit(!0),T3Gv.opt.Lock(i,!0),LogUtil.Debug("= O.ToolOpt LibLockAct - Input/Output: Locked object with ID",t,i)}catch(i){T3Gv.opt.ExceptionCleanup(i)}}LibUnlockAct(t){var e;try{const i=t?null==(e=T3Gv.opt.rClickParam)?void 0:e.targetId:SelectUtil.GetTargetSelect();T3Gv.opt.CloseEdit(!0),T3Gv.opt.Lock(i,!1),LogUtil.Debug("= O.ToolOpt LibUnlockAct - Input/Output: Unlocked object with ID",t,i)}catch(i){T3Gv.opt.ExceptionCleanup(i)}}LibSetBackgroundColorAct(t){try{T3Gv.opt.CloseEdit(!0,!0);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);let i=e.background.Paint.Color;e.background.Paint.FillType===NvConstant.FillTypes.Transparent&&(i=NvConstant.Colors.White);let n=t;t===NvConstant.Colors.Trans&&(n=NvConstant.Colors.White),UIUtil.ChangeBackgroundTextColor(n,i),t===NvConstant.Colors.Trans?(e.background.Paint.FillType=NvConstant.FillTypes.Transparent,e.background.Paint.Color=NvConstant.Colors.White):(e.background.Paint.FillType=NvConstant.FillTypes.Solid,e.background.Paint.Color=t),e.background.Paint.Opacity=1,UIUtil.SetBackgroundColor(),DrawUtil.CompleteOperation(),LogUtil.Debug("= O.ToolOpt LibSetBackgroundColorAct - Output: Set background color",t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}LibImportSvgSymbolAct(t){try{T3Gv.opt.CloseEdit();const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=e=>{var i;const n=null==(i=t.files)?void 0:i[0];if(!n)return void LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: No file selected");const s=new FileReader;s.onload=()=>{s.result;T3Gv.opt.ImportSvgSymbol(n),LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Output: Set background image",{e:e})},s.onerror=()=>{LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: Failed to read file")},s.readAsDataURL(n)},t.click()}catch(e){T3Gv.opt.ExceptionCleanup(e)}}LibToolShape(t,e){this.tul.ToolDragDropSymbol(t,e)}LibAddNoteAct(){}LibAddCommentAct(){}LibHyperlinkAct(){}VueForeignObjectAct(t,e,i){LogUtil.Debug("= = O.ToolOpt VueForeignObjectAct - Iutput: Created shape of type",t,e,i),this.tul.StampOrDragDropNewShape(t,e,i)}SetX(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.SetTopLeft(t,!0)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetY(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.SetTopLeft(t,!1)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetWidth(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.ChangeWidth(t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetHeight(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.ChangeHeight(t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetBackgroundColor(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.SetBackgroundColor(t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}AddToLibraryAct(){try{T3Gv.opt.CloseEdit(),T3Gv.opt.AddToLibrary()}catch(t){T3Gv.opt.ExceptionCleanup(t)}}LoadLibraryAct(){try{T3Gv.opt.CloseEdit(),T3Gv.opt.LoadLibrary()}catch(t){T3Gv.opt.ExceptionCleanup(t)}}ResetScaleAct(t){try{T3Gv.opt.CloseEdit(),T3Gv.docUtil.SetZoomLevel(100*HvConstant.T3Config.Zoom.Default),T3Gv.docUtil.UpdateRefZoomScale(HvConstant.T3Config.Zoom.Default)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}ClearAct(){try{T3Gv.opt.CloseEdit(),this.tul.ClearAndRest(),LogUtil.Debug("= O.ToolOpt ClearAct - Output: Cleared all shapes and data")}catch(t){T3Gv.opt.ExceptionCleanup(t)}}ClearContextMenu(){try{QuasarUtil.ShowContextMenu(!1,"DocumentArea","Default")}catch(t){T3Gv.opt.ExceptionCleanup(t)}}}const _EvtOpt=class{BindElemCtlEvent(){$$1(document).ready((()=>{this.BindVueForeignObjectEvent(),this.BindSelectEvent(),this.BindSelectAllEvent(),this.BindLibraryEvent(),this.BindLineEvent(),this.BindLine1Event(),this.BindWallEvent(),this.BindRectEvent(),this.BindOvalEvent(),this.BindImageEvent(),this.BindCircleEvent(),this.BindTextEvent(),this.BindArrREvent(),this.BindArrLEvent(),this.BindArrTEvent(),this.BindArrBEvent(),this.BindRoate45Event(),this.BindRoate90Event(),this.BindAlignLeftEvent(),this.BindAlignCentersEvent(),this.BindAlignTopsEvent(),this.BindAlignMiddlesEvent(),this.BindAlignBottomsEvent(),this.BindAlignRightsEvent(),this.BindGroupEvent(),this.BindUngroupEvent(),this.BindFlipHorizontalEvent(),this.BindFlipVerticalEvent(),this.BindSameHeightEvent(),this.BindSameWidthEvent(),this.BindSameBothEvent(),this.BindBringToFrontEvent(),this.BindSendToBackEvent(),this.BindCopyEvent(),this.BindCutEvent(),this.BindPasteEvent(),this.BindDeleteEvent(),this.BindUndoEvent(),this.BindRedoEvent(),this.BindSaveEvent(),this.BindDuplicateEvent(),this.BindClearEvent(),this.BindLibSelectEvent(),this.BindLibBoxEvent(),this.BindLibTextEvent(),this.BindLibIconEvent(),this.BindLibSwitchIconEvent(),this.BindLibLedEvent(),this.BindLibRoomHumidityEvent(),this.BindLibRoomTemperatureEvent(),this.BindLibTemperatureEvent(),this.BindLibBoilerEvent(),this.BindLibHeatpumpEvent(),this.BindLibPumpEvent(),this.BindLibValveThreeWayEvent(),this.BindLibValveTwoWayEvent(),this.BindLibDuctEvent(),this.BindLibFanEvent(),this.BindLibCoolingCoilEvent(),this.BindLibHeatingCoilEvent(),this.BindLibFilterEvent(),this.BindLibHumidifierEvent(),this.BindLibHumidityEvent(),this.BindLibPressureEvent(),this.BindLibDamperEvent(),this.BindLibTemperature2Event(),this.BindLibThermalWheelEvent(),this.BindLibEnthalpyEvent(),this.BindLibFlowEvent(),this.BindLibGuageEvent(),this.BindLibDialEvent(),this.BindLibValueEvent(),this.BindLibIconWithTitleEvent(),this.BindLibSetBackgroundColorEvent(),this.BindLibSetBackgroundImageEvent(),this.BindLibImportSvgSymbolEvent(),this.BindLibLockEvent(),this.BindLibUnLockEvent(),this.BindLibAddNoteEvent(),this.BindLibAddCommentEvent(),this.BindLibHyperlinkEvent(),this.BindSetXEvent(),this.BindSetYEvent(),this.BindSetWidthEvent(),this.BindSetHeightEvent(),this.BindAddToLibraryEvent(),this.BindLoadLibraryEvent(),this.BindDuct1Event(),this.BindDuct2Event(),this.BindDuct3Event(),this.BindDuct4Event(),this.BindDuct5Event(),this.BindDuct6Event(),this.BindDuct7Event(),this.BindDuct8Event(),this.BindDuct9Event(),this.BindDuct10Event(),this.BindDuct11Event(),this.BindDuct12Event(),this.BindResetScaleEvent(),this.BindDocumentAreaEvent()}))}BindSelectEvent(){$$1("#btn_try_select").on("click",(t=>{_EvtOpt.toolOpt.SelectAct(t)}))}BindSelectAllEvent(){$$1("#btn_try_select_all").on("click",(t=>{_EvtOpt.toolOpt.SelectAllObjects()}))}BindLibraryEvent(){$$1("#btn_try_library").on("click",(t=>{_EvtOpt.toolOpt.DragDropSymbolAct(t)}))}BindLineEvent(){$$1("#btn_try_line").on("pointerdown",(t=>{_EvtOpt.toolOpt.ToolLineAct("line",t)}))}BindLine1Event(){$$1("#btn_try_line1").on("pointerdown",(t=>{_EvtOpt.toolOpt.ToolLineAct("arcLine",t)}))}BindWallEvent(){$$1("#btn_try_wall").on("pointerdown",(t=>{_EvtOpt.toolOpt.DrawWall(t)}))}BindRectEvent(){$$1("#btn_try_Rect").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,2,"Rect")}))}BindOvalEvent(){$$1("#btn_try_Oval").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,4,"Oval")}))}BindImageEvent(){$$1("#btn_try_Image").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,1,"Image")}))}BindCircleEvent(){$$1("#btn_try_Circ").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,9,"Circle")}))}BindTextEvent(){$$1("#btn_try_Text").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,"textLabel","Text")}))}BindArrREvent(){$$1("#btn_try_ArrR").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,10,"ArrR")}))}BindArrLEvent(){$$1("#btn_try_ArrL").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,11,"ArrL")}))}BindArrTEvent(){$$1("#btn_try_ArrT").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,12,"ArrT")}))}BindArrBEvent(){$$1("#btn_try_ArrB").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,13,"ArrB")}))}BindRoate45Event(){$$1("#btn_try_Roate45").on("pointerdown",(t=>{_EvtOpt.toolOpt.RotateAct(t,45)}))}BindRoate90Event(){$$1("#btn_try_Roate90").on("pointerdown",(t=>{_EvtOpt.toolOpt.RotateAct(t,90)}))}BindAlignLeftEvent(){$$1("#btn_try_Align_lefts").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("lefts")}))}BindAlignCentersEvent(){$$1("#btn_try_Align_centers").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("centers")}))}BindAlignTopsEvent(){$$1("#btn_try_Align_tops").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("tops")}))}BindAlignMiddlesEvent(){$$1("#btn_try_Align_middles").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("middles")}))}BindAlignBottomsEvent(){$$1("#btn_try_Align_bottoms").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("bottoms")}))}BindAlignRightsEvent(){$$1("#btn_try_Align_rights").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("rights")}))}BindGroupEvent(){$$1("#btn_try_Group").on("pointerdown",(t=>{_EvtOpt.toolOpt.GroupAct(t)}))}BindUngroupEvent(){$$1("#btn_try_UnGroup").on("pointerdown",(t=>{_EvtOpt.toolOpt.UnGroupAct(t)}))}BindFlipHorizontalEvent(){$$1("#btn_try_Flip_Horizontal").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeFlipHorizontalAct(t)}))}BindFlipVerticalEvent(){$$1("#btn_try_Flip_Vertical").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeFlipVerticalAct(t)}))}BindSameHeightEvent(){$$1("#btn_try_Same_Height").on("pointerdown",(t=>{_EvtOpt.toolOpt.MakeSameSizeAct(t,1)}))}BindSameWidthEvent(){$$1("#btn_try_Same_Width").on("pointerdown",(t=>{_EvtOpt.toolOpt.MakeSameSizeAct(t,2)}))}BindSameBothEvent(){$$1("#btn_try_Same_Both").on("pointerdown",(t=>{_EvtOpt.toolOpt.MakeSameSizeAct(t,3)}))}BindBringToFrontEvent(){$$1("#btn_try_BringToFront").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeBringToFrontAct(t)}))}BindSendToBackEvent(){$$1("#btn_try_SendToBack").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeSendToBackAct(t)}))}BindPasteEvent(){$$1("#btn_try_Paste").on("pointerdown",(t=>{_EvtOpt.toolOpt.PasteAct(t)}))}BindCopyEvent(){$$1("#btn_try_Copy").on("pointerdown",(t=>{_EvtOpt.toolOpt.CopyAct(t)}))}BindCutEvent(){$$1("#btn_try_Cut").on("pointerdown",(t=>{_EvtOpt.toolOpt.CutAct(t)}))}BindDeleteEvent(){$$1("#btn_try_Delete").on("pointerdown",(t=>{_EvtOpt.toolOpt.DeleteAct(t)}))}BindUndoEvent(){$$1("#btn_try_Undo").on("pointerdown",(t=>{_EvtOpt.toolOpt.UndoAct(t)}))}BindRedoEvent(){$$1("#btn_try_Redo").on("pointerdown",(t=>{_EvtOpt.toolOpt.RedoAct(t)}))}BindSaveEvent(){$$1("#btn_try_Save").on("pointerdown",(t=>{_EvtOpt.toolOpt.SaveAct()}))}BindDuplicateEvent(){$$1("#btn_try_Duplicate").on("pointerdown",(t=>{_EvtOpt.toolOpt.DuplicateAct(t)}))}BindClearEvent(){$$1("#btn_try_Clear").on("pointerdown",(t=>{_EvtOpt.toolOpt.ClearAct()}))}BindLibSelectEvent(){$$1("#btn_try_Lib_Select").on("pointerdown",(t=>{_EvtOpt.toolOpt.SelectAct(t)}))}BindLibBoxEvent(){$$1("#btn_try_Lib_Box").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Box",!0)}))}BindLibTextEvent(){$$1("#btn_try_Lib_Text").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Text",!0)}))}BindLibIconEvent(){$$1("#btn_try_Lib_Icon").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Icon",!0)}))}BindLibSwitchIconEvent(){$$1("#btn_try_Lib_SwitchIcon").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("SwitchIcon",!0)}))}BindLibLedEvent(){$$1("#btn_try_Lib_Led").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Led",!0)}))}BindLibRoomHumidityEvent(){$$1("#btn_try_Lib_RoomHumidity").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("RoomHumidity",!0)}))}BindLibRoomTemperatureEvent(){$$1("#btn_try_Lib_RoomTemperature").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("RoomTemperature",!0)}))}BindLibTemperatureEvent(){$$1("#btn_try_Lib_Temperature").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Temperature",!0)}))}BindLibBoilerEvent(){$$1("#btn_try_Lib_Boiler").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Boiler",!0)}))}BindLibHeatpumpEvent(){$$1("#btn_try_Lib_Heatpump").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Heatpump",!0)}))}BindLibPumpEvent(){$$1("#btn_try_Lib_Pump").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Pump",!0)}))}BindLibValveThreeWayEvent(){$$1("#btn_try_Lib_ValveThreeWay").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("ValveThreeWay",!0)}))}BindLibValveTwoWayEvent(){$$1("#btn_try_Lib_ValveTwoWay").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("ValveTwoWay",!0)}))}BindLibDuctEvent(){$$1("#btn_try_Lib_Duct").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct",!0)}))}BindLibFanEvent(){$$1("#btn_try_Lib_Fan").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Fan",!0)}))}BindLibCoolingCoilEvent(){$$1("#btn_try_Lib_CoolingCoil").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("CoolingCoil",!0)}))}BindLibHeatingCoilEvent(){$$1("#btn_try_Lib_HeatingCoil").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("HeatingCoil",!0)}))}BindLibFilterEvent(){$$1("#btn_try_Lib_Filter").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Filter",!0)}))}BindLibHumidifierEvent(){$$1("#btn_try_Lib_Humidifier").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Humidifier",!0)}))}BindLibHumidityEvent(){$$1("#btn_try_Lib_Humidity").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Humidity",!0)}))}BindLibPressureEvent(){$$1("#btn_try_Lib_Pressure").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Pressure",!0)}))}BindLibDamperEvent(){$$1("#btn_try_Lib_Damper").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Damper",!0)}))}BindLibTemperature2Event(){$$1("#btn_try_Lib_Temperature2").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Temperature2",!0)}))}BindLibThermalWheelEvent(){$$1("#btn_try_Lib_ThermalWheel").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("ThermalWheel",!0)}))}BindLibEnthalpyEvent(){$$1("#btn_try_Lib_Enthalpy").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Enthalpy",!0)}))}BindLibFlowEvent(){$$1("#btn_try_Lib_Flow").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Flow",!0)}))}BindLibGuageEvent(){$$1("#btn_try_Lib_Guage").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Guage",!0)}))}BindLibDialEvent(){$$1("#btn_try_Lib_Dial").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Dial",!0)}))}BindLibValueEvent(){$$1("#btn_try_Lib_Value").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Value",!0)}))}BindLibIconWithTitleEvent(){$$1("#btn_try_Lib_IconWithTitle").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("IconWithTitle",!0)}))}BindLibSetBackgroundColorEvent(){$$1("#btn_try_Lib_SetBackgroundColor").on("pointerdown",(t=>{"#FFFFFF"==T3Gv.docUtil.docConfig.backgroundColor?(_EvtOpt.toolOpt.LibSetBackgroundColorAct("#20b2aa"),T3Gv.docUtil.docConfig.backgroundColor="#20b2aa"):(_EvtOpt.toolOpt.LibSetBackgroundColorAct("#FFFFFF"),T3Gv.docUtil.docConfig.backgroundColor="#FFFFFF")}))}BindLibSetBackgroundImageEvent(){$$1("#btn_try_Lib_SetBackgroundImage").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibSetBackgroundImageAct(t,!1)}))}BindLibImportSvgSymbolEvent(){$$1("#btn_try_Lib_ImportSvgSymbol").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibImportSvgSymbolAct(t)}))}BindLibLockEvent(){$$1("#btn_try_Lib_Lock").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibLockAct(t)}))}BindLibUnLockEvent(){$$1("#btn_try_Lib_UnLock").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibUnlockAct(t)}))}BindLibAddNoteEvent(){$$1("#btn_try_Lib_AddNote").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibAddNoteAct()}))}BindLibAddCommentEvent(){$$1("#btn_try_Lib_AddComment").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibAddCommentAct()}))}BindLibHyperlinkEvent(){$$1("#btn_try_Lib_Hyperlink").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibHyperlinkAct()}))}HandleSidebarToolEvent(t){LogUtil.Debug("Selected tool: ",t),"Temperature"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Temperature",!0),"Boiler"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Boiler",!0),"Heatpump"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Heatpump",!0),"Pump"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Pump",!0),"ValveThreeWay"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("ValveThreeWay",!0),"ValveTwoWay"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("ValveTwoWay",!0),t.value.name,"Fan"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Fan",!0),"CoolingCoil"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("CoolingCoil",!0),"HeatingCoil"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("HeatingCoil",!0),"Filter"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Filter",!0),"Humidifier"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Humidifier",!0),"Humidity"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Humidity",!0),"Pressure"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Pressure",!0),"Damper"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Damper",!0),"ThermalWheel"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("ThermalWheel",!0),"Enthalpy"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Enthalpy",!0),"Flow"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Flow",!0),"RoomHumidity"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("RoomHumidity",!0),"RoomTemperature"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("RoomTemperature",!0),t.value.name,t.value.name,t.value.name,"Wall"==t.value.name&&_EvtOpt.toolOpt.DrawWall(event),"Line"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("line",event),"ArcLine"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("arcLine",event),"SegLine"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("segLine",event),"PolyLine"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("polyLine",event),"G_Circle"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,9,"G_Circle"),"G_Rectangle"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,2,"G_Rectangle"),"ArrowRight"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,10,"g_arr_right"),"ArrowLeft"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,11,"g_arr_left"),"ArrowTop"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,12,"g_arr_top"),"ArrowBottom"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,13,"g_arr_bottom"),"Oval"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,4,"Oval"),"Switch"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("SwitchIcon",!0),"LED"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Led",!0),"Text"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,"textLabel","Text"),"Box"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,2,"Box"),"Pointer"==t.value.name&&_EvtOpt.toolOpt.SelectAct(event),"Duct1"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct1",!0),"Duct2"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct2",!0),"Duct3"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct3",!0),"Duct4"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct4",!0),"Duct5"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct5",!0),"Duct6"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct6",!0),"Duct7"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct7",!0),"Duct8"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct8",!0),"Duct9"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct9",!0)}BindVueForeignObjectEvent(){$$1("#btn_try_vue_foreignObject").on("pointerdown",(t=>{_EvtOpt.toolOpt.VueForeignObjectAct(t,PolygonConstant.ShapeTypes.ForeignObject,"Boiler")}))}BindSetXEvent(){$$1("#btn_try_x").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetX("1.5")}))}BindSetYEvent(){$$1("#btn_try_y").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetY("2.3")}))}BindSetWidthEvent(){$$1("#btn_try_w").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetWidth("3.2")}))}BindSetHeightEvent(){$$1("#btn_try_h").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetHeight("2.5")}))}BindAddToLibraryEvent(){$$1("#btn_try_Add_To_Library").on("pointerdown",(t=>{_EvtOpt.toolOpt.AddToLibraryAct()}))}BindLoadLibraryEvent(){$$1("#btn_try_Load_Library").on("pointerdown",(t=>{_EvtOpt.toolOpt.LoadLibraryAct()}))}BindDuct1Event(){$$1("#btn_try_Duct_1").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct1",!0)}))}BindDuct2Event(){$$1("#btn_try_Duct_2").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct2",!0)}))}BindDuct3Event(){$$1("#btn_try_Duct_3").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct3",!0)}))}BindDuct4Event(){$$1("#btn_try_Duct_4").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct4",!0)}))}BindDuct5Event(){$$1("#btn_try_Duct_5").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct5",!0)}))}BindDuct6Event(){$$1("#btn_try_Duct_6").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct6",!0)}))}BindDuct7Event(){$$1("#btn_try_Duct_7").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct7",!0)}))}BindDuct8Event(){$$1("#btn_try_Duct_8").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct8",!0)}))}BindDuct9Event(){$$1("#btn_try_Duct_9").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct9",!0)}))}BindDuct10Event(){$$1("#btn_try_Duct_10").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct10",!0)}))}BindDuct11Event(){$$1("#btn_try_Duct_11").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct11",!0)}))}BindDuct12Event(){$$1("#btn_try_Duct_12").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct12",!0)}))}BindResetScaleEvent(){$$1("#btn_try_Reset_Scale").on("pointerdown",(t=>{_EvtOpt.toolOpt.ResetScaleAct(t)}))}BindDocumentAreaEvent(){$$1("#document-area").on("pointerdown",(t=>{_EvtOpt.toolOpt.ClearContextMenu()}))}};let EvtOpt=_EvtOpt;__publicField(EvtOpt,"toolOpt",new ToolOpt);class DrawUtil{static CancelObjectStamp(t){LogUtil.Debug("O.Opt CancelObjectStamp - Input:",{shouldUnbindEvents:t}),UIUtil.SetModalOperation(OptConstant.OptTypes.None),T3Constant.DocContext.SelectionToolSticky=!1,LMEvtUtil.LMStampPostRelease(!1),T3Gv.opt.actionStoredObjectId>=0&&(ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates(),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null),OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&($$1(window).unbind("mousedown"),$$1(window).unbind("click"),$$1(window).unbind("mousemove",EvtUtil.Evt_MouseStampObjectMove),T3Gv.opt.WorkAreaHammer.enable(!0)),T3Gv.opt.moveList=null,T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampSticky=!1,LogUtil.Debug("O.Opt CancelObjectStamp - Output: Object stamp canceled")}static CancelObjectStampTextOnTap(t){LogUtil.Debug("O.Opt CancelObjectStampTextOnTap - Input:",t),UIUtil.SetModalOperation(OptConstant.OptTypes.None),LMEvtUtil.LMStampPostRelease(!1),OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.moveList=null,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.drawShape=null,T3Gv.opt.moveList=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LogUtil.Debug("O.Opt CancelObjectStampTextOnTap - Output: Completed")}static CancelObjectDragDrop(t){if(LogUtil.Debug("O.Opt CancelObjectDragDrop - Input:",{shouldUnbindEvents:t}),UIUtil.SetModalOperation(OptConstant.OptTypes.None),LMEvtUtil.LMStampPostRelease(!1),T3Gv.opt.actionStoredObjectId>=0){const t=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId);t&&T3Gv.opt.svgObjectLayer.RemoveElement(t),ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates(),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null}OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&T3Gv.opt.UnbindDragDropOrStamp(),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.moveList=null,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,LogUtil.Debug("O.Opt CancelObjectDragDrop - Output: Drag and drop canceled")}static CancelObjectDraw(){LogUtil.Debug("O.Opt CancelObjectDraw - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1),e=t instanceof Instance.Shape.PolyLine||t instanceof Instance.Shape.PolyLineContainer;UIUtil.SetModalOperation(OptConstant.OptTypes.None),LMEvtUtil.LMStampPostRelease(!1),T3Gv.opt.actionStoredObjectId>=0&&!e?(ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates(),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null):ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.UnbindDragDropOrStamp(),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),t&&t.CancelObjectDraw(),T3Gv.wallOpt.CancelObjectDraw&&T3Gv.wallOpt.CancelObjectDraw(),LogUtil.Debug("O.Opt CancelObjectDraw - Output: Object draw canceled.")}static DragDropNewShape(t,e,i,n,s,a){LogUtil.Debug("= U.DrawUtil DragDropNewShape - Input:",{drawingShape:t?t.BlockID:null,horizontalCenter:e,verticalCenter:i,useDefaultStyle:n,hasCallback:!!s});try{UIUtil.SetModalOperation(OptConstant.OptTypes.DragDrop),ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),T3Gv.opt.CloseEdit(),T3Gv.opt.stampCompleteCallback=s||null,T3Gv.opt.stampCompleteUserData=a||null,T3Gv.opt.stampHCenter=e,T3Gv.opt.stampVCenter=i,T3Gv.opt.useDefaultStyle=n,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.newObjectVisible=!1,T3Gv.opt.drawShape=t,t.flags&NvConstant.ObjFlags.TextOnly?OptCMUtil.SetEditMode(NvConstant.EditState.Text):OptCMUtil.SetEditMode(NvConstant.EditState.Stamp),T3Gv.Evt_StampObjectDragEnd=EvtUtil.Evt_StampObjectDragEndFactory(n),T3Gv.opt.mainAppHammer||this.PreDragDropOrStamp(),T3Gv.opt.WorkAreaHammer.enable(!1),T3Gv.opt.mainAppHammer.on("mousemove",EvtUtil.Evt_StampObjectDrag),T3Gv.opt.mainAppHammer.on("mouseup",T3Gv.Evt_StampObjectDragEnd),LMEvtUtil.LMStampPreTrack(),this.InitializeAutoGrowDrag(),LogUtil.Debug("= U.DrawUtil DragDropNewShape - Output: Drag and drop initialized")}catch(o){throw LogUtil.Debug("= U.DrawUtil DragDropNewShape - Error:",o),OptCMUtil.CancelOperation(),T3Gv.opt.ExceptionCleanup(o),o}}static AllowAutoInsert(){LogUtil.Debug("O.Opt AllowAutoInsert - Input: No parameters");const t=T3Gv.wallOpt.AllowAutoInsert();return LogUtil.Debug("O.Opt AllowAutoInsert - Output:",t),t}static InitializeAutoGrowDrag(t,e){LogUtil.Debug("O.Opt InitializeAutoGrowDrag - Input:",{actionType:t,shouldCloseEdit:e}),T3Gv.opt.dragGotAutoResizeRight=!1,T3Gv.opt.dragGotAutoResizeBottom=!1,T3Gv.opt.dragGotAutoResizeOldX=[],T3Gv.opt.dragGotAutoResizeOldY=[],LogUtil.Debug("O.Opt InitializeAutoGrowDrag - Output: Auto grow drag initialized")}static MouseDrawNewShape(t,e,i,n,s,a){LogUtil.Debug("= u.DrawUtil: MouseDrawNewShape - Input:",{drawingShape:t?t.BlockID:null,centerHorizontally:e,centerVertically:i,useDefaultStyle:n,hasCallback:!!s,hasUserData:!!a}),UIUtil.SetModalOperation(OptConstant.OptTypes.Stamp),ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),TextUtil.DeactivateTextEdit(!1),T3Gv.opt.stampCompleteCallback=s||null,T3Gv.opt.stampCompleteUserData=a||null,T3Gv.opt.stampHCenter=e,T3Gv.opt.stampVCenter=i,T3Gv.opt.useDefaultStyle=n,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.newObjectVisible=!1,T3Gv.opt.drawShape=t,t.flags&NvConstant.ObjFlags.TextOnly?OptCMUtil.SetEditMode(NvConstant.EditState.Text):OptCMUtil.SetEditMode(NvConstant.EditState.Stamp,CursorConstant.CursorType.Stamp),T3Gv.opt.WorkAreaHammer.enable(!1),$$1(window).bind("mousemove",EvtUtil.Evt_MouseStampObjectMove),T3Gv.Evt_LMMouseStpObjectDone=EvtUtil.Evt_MouseStampObjectDoneFactory(n),$$1(window).bind("mousedown",T3Gv.Evt_LMMouseStpObjectDone),$$1(window).bind("click",T3Gv.Evt_LMMouseStpObjectDone),LMEvtUtil.LMStampPreTrack(),this.InitializeAutoGrowDrag()}static MouseStampObjectDone(t,e){LogUtil.Debug("O.Opt MouseStampObjectDone - Input:",{event:t,additionalData:e});try{const e=T3Gv.opt.svgDoc.docInfo;let i=!1;const n=[];if(this.ResetAutoScrollTimer(),(t.clientX>=e.dispX+e.dispWidth||t.clientX<T3Gv.opt.svgDoc.docInfo.dispX||t.clientY<T3Gv.opt.svgDoc.docInfo.dispY)&&(i=!0),i)return this.CancelObjectStamp(!0),void LogUtil.Debug("O.Opt MouseStampObjectDone - Output: Canceled (outside work area)");if(T3Gv.opt.actionStoredObjectId<0)return void LogUtil.Debug("O.Opt MouseStampObjectDone - Output: No object created yet");SelectUtil.ClearAnySelection(!0);const s={FrameList:[]};let a=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY);const o=T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly;if(!o){const e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,i=T3Gv.opt.OverrideSnaps(t);!T3Gv.docUtil.docConfig.enableSnap||e||i||(a=T3Gv.docUtil.SnapToGrid(a))}let r=a.x;T3Gv.opt.stampHCenter&&(r-=T3Gv.opt.drawShape.Frame.width/2);let l,h,c=a.y;if(T3Gv.opt.stampVCenter&&(c-=T3Gv.opt.drawShape.Frame.height/2),T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let t=0;t<T3Gv.opt.moveList.length;t++){const e=T3Gv.opt.moveList[t],i=ObjectUtil$1.GetObjectPtr(e,!0);i&&(i.UpdateFrame(i.Frame),h=Utils1.DeepCopy(i.Frame),s.FrameList.push(h),i.dataStyleOverride=null)}else{if(T3Gv.opt.drawShape){if(T3Gv.opt.drawShape.sizedim.width=T3Gv.opt.drawShape.Frame.width,T3Gv.opt.drawShape.sizedim.height=T3Gv.opt.drawShape.Frame.height,T3Gv.opt.drawShape.objecttype===NvConstant.FNObjectTypes.Frame){const t=LayerUtil.ZListPreserve();l=this.ReplaceSpecialObject(T3Gv.opt.drawShape,T3Gv.opt.actionStoredObjectId,t,T3Gv.opt.drawShape.objecttype),s.ReplaceSpecialObjectID=l}T3Gv.opt.drawShape.UpdateFrame(T3Gv.opt.drawShape.Frame),h=Utils1.DeepCopy(T3Gv.opt.drawShape.Frame),s.FrameList.push(h)}ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0)}if(s.linkParams=Utils1.DeepCopy(T3Gv.opt.linkParams),T3Gv.opt.SetLinkFlagsOnFilledClosedPolylines(),T3Gv.wallOpt instanceof WallOpt&&T3Gv.wallOpt.EnsureCubicleBehindOutline(T3Gv.opt.actionStoredObjectId),OptCMUtil.SetEditMode(NvConstant.EditState.Default),$$1(window).unbind("mousedown"),$$1(window).unbind("click"),$$1(window).unbind("mousemove",EvtUtil.Evt_MouseStampObjectMove),T3Gv.opt.WorkAreaHammer.enable(!0),o||n.push(T3Gv.opt.actionStoredObjectId),T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(n.length=0,n.push(...T3Gv.opt.moveList),T3Gv.opt.actionStoredObjectId=-1):ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),l){const t=[l];ObjectUtil$1.DeleteObjects(t,!1)}LayerUtil.IsTopMostVisibleLayer()||LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),SvgUtil.RenderDirtySVGObjects(),T3Gv.opt.moveList=null,T3Gv.opt.stampCompleteCallback&&T3Gv.opt.actionStoredObjectId>=0&&T3Gv.opt.stampCompleteCallback(T3Gv.opt.actionStoredObjectId,T3Gv.opt.stampCompleteUserData),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,LMEvtUtil.LMStampPostRelease(!0),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,UIUtil.SetModalOperation(OptConstant.OptTypes.None),this.CompleteOperation(n),QuasarUtil.AddCurrentObjectToAppState(),LogUtil.Debug("O.Opt MouseStampObjectDone - Output: Stamp operation completed successfully")}catch(i){LogUtil.Debug("O.Opt MouseStampObjectDone - Error:",i),OptCMUtil.CancelOperation(),this.DragDrop_ExceptionCleanup(),T3Gv.opt.ExceptionCleanup(i)}}static MouseAddNewShape(t){let e;LogUtil.Debug("O.Opt MouseAddNewShape - Input:",{useDefaultStyle:t});let i=null!==T3Gv.opt.drawShape.nativeDataArrayBuffer,n=0,s=!1;if((e=this.AddNewObject(T3Gv.opt.drawShape,t,!1))>=0){T3Gv.opt.actionStoredObjectId=e;let t=LayerUtil.VisibleZList();if(T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let e=0;e<T3Gv.opt.moveList.length;e++){let i=T3Gv.opt.moveList[e],a=ObjectUtil$1.GetObjectPtr(i,!1);if(a){let e=a.GetSVGFrame();a instanceof Instance.Shape.PolyLine&&a.polylist&&a.polylist.closed&&a.StyleRecord&&a.StyleRecord.Line&&a.StyleRecord.Line.BThick&&e.x<0&&e.y<0&&(n=-2*a.StyleRecord.Line.BThick,s=a instanceof Instance.Shape.PolyLineContainer),e.y+=n,e.x+=n,s||(n=0),T3Gv.opt.dragBBoxList.push(e);let o=t.indexOf(i);SvgUtil.AddSVGObject(o,i,!0,!1),T3Gv.opt.dragElementList.push(i),T3Gv.docUtil.docConfig.enableSnap&&i===T3Gv.opt.actionStoredObjectId&&(T3Gv.opt.dragTargetBBox=Utils1.DeepCopy(e)),T3Gv.opt.dragEnclosingRect=T3Gv.opt.GetListSRect(T3Gv.opt.moveList,!1,!0)}}else if(i){let i=ObjectUtil$1.GetObjectPtr(e,!1),n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),s=i.ImageURL&&i.ImageURL.length>0;i&&i.SymbolID!==OptConstant.Common.WallOpenId&&!s&&i.ApplyCurvature(n.def.rrectparam);let a=t.indexOf(T3Gv.opt.actionStoredObjectId);SvgUtil.AddSVGObject(a,e,!0,!1)}T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.lpCircList.push(T3Gv.opt.actionStoredObjectId),UIUtil.ShowFrame(!0)}LogUtil.Debug("O.Opt MouseAddNewShape - Output: New object created with ID:",e)}static MouseStampObjectMove(t){LogUtil.Debug("O.Opt MouseStampObjectMove - Input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY);if(T3Gv.opt.actionStoredObjectId<0){if(!(t.clientX>=T3Gv.opt.svgDoc.docInfo.dispX&&t.clientY>=T3Gv.opt.svgDoc.docInfo.dispY))return void LogUtil.Debug("O.Opt MouseStampObjectMove - Output: Cursor outside document boundaries");this.MouseAddNewShape(T3Gv.opt.useDefaultStyle),T3Gv.opt.newObjectVisible=!0,LogUtil.Debug("O.Opt MouseStampObjectMove - Created new shape with ID:",T3Gv.opt.actionStoredObjectId)}this.AutoScrollCommon(t,!0,"HandleStampDragDoAutoScroll")&&this.StampObjectMoveCommon(e.x,e.y,t),LogUtil.Debug("O.Opt MouseStampObjectMove - Output: Movement processed")}static StampObjectMoveCommon(t,e,i){var n,s,a,o;let r,l,h,c,u,d,p,g,f;LogUtil.Debug("O.Opt StampObjectMoveCommon - Input:",{mouseX:t,mouseY:e,event:i});let b,v=0,m=0,y={},S={x:t,y:e},w=null;const x=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(t,e);if(!x)return void LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: No valid window coordinates");if(T3Gv.opt.actionStoredObjectId>0){if(x.x<T3Gv.opt.svgDoc.docInfo.dispX||x.y<T3Gv.opt.svgDoc.docInfo.dispY){if(T3Gv.opt.newObjectVisible){if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let t=0;t<T3Gv.opt.moveList.length;++t)c=T3Gv.opt.moveList[t],p=SvgUtil.GetSVGDragElement(t),p&&p.SetVisible(!1);else T3Gv.opt.actionSvgObject&&T3Gv.opt.actionSvgObject.SetVisible(!1);T3Gv.opt.newObjectVisible=!1,UIUtil.ShowFrame(!1)}return void LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: Object outside viewport, hidden")}if(!T3Gv.opt.newObjectVisible){if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let t=0;t<T3Gv.opt.moveList.length;++t)c=T3Gv.opt.moveList[t],p=SvgUtil.GetSVGDragElement(t),p&&p.SetVisible(!0);else T3Gv.opt.actionSvgObject&&T3Gv.opt.actionSvgObject.SetVisible(!0);T3Gv.opt.newObjectVisible=!0,UIUtil.ShowFrame(!0)}}if(r=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1),!r)return void LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: No valid drawing object");const C=T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly,D=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,T=T3Gv.opt.OverrideSnaps(i)||D;let k,$;if(!T3Gv.opt.moveList&&!C&&this.AllowSnapToShapes()){const t={};if(k=r.CanSnapToShapes(t),k>=0){const e=new DynamicGuides,i=ObjectUtil$1.GetObjectPtr(k,!1).GetSnapRect();$=Utils1.DeepCopy(i),$.x=S.x-i.width/2,$.y=S.y-i.height/2;const n=DynamicUtil.DynamicSnapsGetSnapObjects(k,$,e,T3Gv.opt.moveList,null,t);null!==n.x&&($.x+=n.x,S.x+=n.x),null!==n.y&&($.y+=n.y,S.y+=n.y)}}if(T3Gv.docUtil.docConfig.enableSnap&&!T&&!C){let t,e;if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(l=T3Gv.opt.moveList.indexOf(T3Gv.opt.actionStoredObjectId),e=Utils1.DeepCopy(T3Gv.opt.dragBBoxList[l]),t=r.GetSnapRect()):(e=Utils1.DeepCopy(T3Gv.opt.actionBBox),t=r.GetSnapRect()),w=T3Gv.opt.dragEnclosingRect?Utils1.DeepCopy(T3Gv.opt.dragEnclosingRect):t,w&&e){u=w.x-e.x,d=w.y-e.y,w.x=S.x-w.width/2,w.y=S.y-w.height/2;const i={x:w.x-u,y:w.y-d},n=Utils1.DeepCopy(t);if(n.x=S.x-t.width/2,n.y=S.y-t.height/2,r.CustomSnap(i.x,i.y,0,0,!1,S));else if(T3Gv.docUtil.docConfig.centerSnap){const t=T3Gv.docUtil.SnapToGrid(S);S.x=t.x,S.y=t.y}else{const t=T3Gv.docUtil.SnapRect(n);S.x+=t.x,S.y+=t.y}}}if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length){h=T3Gv.opt.moveList.length,l=T3Gv.opt.moveList.indexOf(T3Gv.opt.actionStoredObjectId),b=T3Gv.opt.dragEnclosingRect;let t={x:S.x+b.width/2,y:S.y+b.height/2};t=this.DoAutoGrowDrag(t),S.x=t.x-b.width/2,S.y=t.y-b.height/2,u=S.x-b.x-b.width/2,d=S.y-b.y-b.height/2,b.x+u<0&&(u=-b.x),b.y+d<0&&(d=-b.y),b=T3Gv.opt.dragBBoxList[l],r.SetShapeOrigin((null!=(n=null==b?void 0:b.x)?n:0)+u,(null!=(s=null==b?void 0:b.y)?s:0)+d),S=LMEvtUtil.LMStampDuringTrack(S,r);const e=r.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(e,S,CursorConstant.CursorTypes.Plus,r);const i=new SelectionAttr;i.left=e.x,i.top=e.y;const a=r.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches;i.widthstr=T3Constant.DocContext.CurrentWidth,i.heightstr=T3Constant.DocContext.CurrentHeight,i.leftstr=RulerUtil.GetLengthInRulerUnits(i.left,!1,T3Gv.docUtil.rulerConfig.originx,a),i.topstr=RulerUtil.GetLengthInRulerUnits(i.top,!1,T3Gv.docUtil.rulerConfig.originy,a);for(let n=0;n<h;++n){c=T3Gv.opt.moveList[n];const t=ObjectUtil$1.GetObjectPtr(c);if(t){if(c!==T3Gv.opt.actionStoredObjectId){if(b=T3Gv.opt.dragBBoxList[n],!b)continue;t.SetShapeOrigin(b.x+u,b.y+d)}p=SvgUtil.GetSVGDragElement(n),!p&&t.ShapeType===OptConstant.ShapeType.SvgSymbol&&t.SVGFragment&&(g||(g=LayerUtil.VisibleZList()),f=g.indexOf(c),SvgUtil.AddSVGObject(f,c,!0,!1),p=T3Gv.opt.svgObjectLayer.GetElementById(c)),p&&p.SetPos(b.x+u,b.y+d)}}}else{b=Utils1.DeepCopy(T3Gv.opt.actionBBox),w=Utils1.DeepCopy(T3Gv.opt.dragEnclosingRect);let t={x:S.x+w.width/2,y:S.y+w.height/2};t=this.DoAutoGrowDrag(t),S.x=t.x-w.width/2,S.y=t.y-w.height/2,u=S.x-w.x-w.width/2,d=S.y-w.y-w.height/2,u=b.x+u<0?-w.x:S.x-b.x-b.width/2,d=b.y+d<0?-w.y:S.y-b.y-b.height/2,r.SetShapeOrigin(b.x+u,b.y+d),S=LMEvtUtil.LMStampDuringTrack(S,r);const e=r.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(e,S,CursorConstant.CursorTypes.Move,r);const i=new SelectionAttr;i.left=e.x,i.top=e.y;const n=r.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches;i.widthstr=T3Constant.DocContext.CurrentWidth,i.heightstr=T3Constant.DocContext.CurrentHeight,i.leftstr=RulerUtil.GetLengthInRulerUnits(i.left,!1,T3Gv.docUtil.rulerConfig.originx,n),i.topstr=RulerUtil.GetLengthInRulerUnits(i.top,!1,T3Gv.docUtil.rulerConfig.originy,n),u=S.x-w.x-w.width/2,d=S.y-w.y-w.height/2,w.x+u-v<0?(u=-w.x+v,v=0):u=S.x-b.x-b.width/2,w.y+d-m<0?(d=-w.y+m,m=0):d=S.y-b.y-b.height/2,r.SetShapeOrigin((null!=(a=null==b?void 0:b.x)?a:0)+u,(null!=(o=null==b?void 0:b.y)?o:0)+d),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.ConnectIndexHistory.length>0)&&(y=Utils1.DeepCopy(b),y.x+=u,y.y+=d,HookUtil.HandleHookedObjectMoving(r,y)),T3Gv.opt.actionSvgObject.SetPos(b.x+u-v,b.y+d-m);const s=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,l=new DynamicGuides;l&&(s?T3Gv.opt.dynamicGuides&&(DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null):DynamicUtil.DynamicSnapsUpdateGuides(l,k,$))}LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: Object positioned at",S)}static DragDropObjectDone(t,e){LogUtil.Debug("DragDropObjectDone - Input:",{event:t,additionalData:e}),T3Gv.opt.WorkAreaHammer.enable(!0);try{Utils2.StopPropagationAndDefaults(t),this.ResetAutoScrollTimer();let e,i,n,s,a=!1;const o=T3Gv.opt.svgDoc.docInfo;let r=!1;const l=[];if(t.clientX>=o.dispX+o.dispWidth&&(r=!0),t.clientX<T3Gv.opt.svgDoc.docInfo.dispX&&(r=!0),t.clientY<T3Gv.opt.svgDoc.docInfo.dispY&&(r=!0),r)return this.CancelObjectDragDrop(!0),void LogUtil.Debug("DragDropObjectDone - Output: Canceled (outside work area)");if(null==T3Gv.opt.linkParams)return this.CancelObjectDragDrop(!0),void LogUtil.Debug("DragDropObjectDone - Output: Canceled (no link parameters)");let h=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY);if(T3Gv.opt.drawShape&&(a=!!(T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly)),!a){const e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,i=T3Gv.opt.OverrideSnaps(t);!T3Gv.docUtil.docConfig.enableSnap||e||i||(h=T3Gv.docUtil.SnapToGrid(h))}let c=h.x;T3Gv.opt.stampHCenter&&(c-=T3Gv.opt.drawShape.Frame.width/2);let u,d,p=h.y;T3Gv.opt.stampVCenter&&(p-=T3Gv.opt.drawShape.Frame.height/2);const g={FrameList:[]};if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(u=T3Gv.opt.moveList[0],i=T3Gv.opt.moveList.length,e=0;e<i;e++)n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.moveList[e],!0),n&&(n.UpdateFrame(n.Frame),d=Utils1.DeepCopy(n.Frame),g.FrameList.push(d)),n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.moveList[e],!0);else{if(T3Gv.opt.drawShape){if(u=T3Gv.opt.drawShape.BlockID,T3Gv.opt.drawShape.sizedim.width=T3Gv.opt.drawShape.Frame.width,T3Gv.opt.drawShape.sizedim.height=T3Gv.opt.drawShape.Frame.height,T3Gv.opt.drawShape.objecttype===NvConstant.FNObjectTypes.Frame){const t=LayerUtil.ZListPreserve();s=this.ReplaceSpecialObject(T3Gv.opt.drawShape,T3Gv.opt.actionStoredObjectId,t,T3Gv.opt.drawShape.objecttype)}T3Gv.opt.drawShape.UpdateFrame(T3Gv.opt.drawShape.Frame),d=Utils1.DeepCopy(T3Gv.opt.drawShape.Frame),g.FrameList.push(d)}ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0)}OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.UnbindDragDropOrStamp(),a||l.push(T3Gv.opt.actionStoredObjectId);let f=OptAhUtil.GetGvSviOpt(u);if(null==f&&(f=T3Gv.wallOpt),f instanceof WallOpt&&f.EnsureCubicleBehindOutline(T3Gv.opt.actionStoredObjectId),T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(l.length=0,l.push(...T3Gv.opt.moveList),T3Gv.opt.actionStoredObjectId=-1):ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),s){const t=[s];ObjectUtil$1.DeleteObjects(t,!1)}LayerUtil.IsTopMostVisibleLayer()||LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),SvgUtil.RenderDirtySVGObjects(),T3Gv.opt.SetLinkFlagsOnFilledClosedPolylines(),T3Gv.opt.moveList=null,T3Gv.opt.stampCompleteCallback&&T3Gv.opt.actionStoredObjectId>=0&&T3Gv.opt.stampCompleteCallback(T3Gv.opt.actionStoredObjectId,T3Gv.opt.stampCompleteUserData),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,LMEvtUtil.LMStampPostRelease(!0),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null,UIUtil.SetModalOperation(OptConstant.OptTypes.None),this.CompleteOperation(l),QuasarUtil.AddCurrentObjectToAppState(),LogUtil.Debug("DragDropObjectDone - Output: Drag-drop operation completed successfully")}catch(i){throw LogUtil.Debug("DragDropObjectDone - Error:",i),OptCMUtil.CancelOperation(),this.DragDrop_ExceptionCleanup(),T3Gv.opt.ExceptionCleanup(i),i}}static ReplaceSpecialObject(t,e,i,n){let s,a,o,r;for(LogUtil.Debug("O.Opt ReplaceSpecialObject - Input:",{drawingObject:t,targetObjectId:e,zList:i,objectType:n}),LayerUtil.VisibleZList(),a=i.length,s=0;s<a;s++)if(r=i[s],o=ObjectUtil$1.GetObjectPtr(r,!1),o&&o.objecttype===n&&r!==e)return i[s]=e,i[a-1]===e&&(i[a-1]=r),t.Frame=Utils1.DeepCopy(o.Frame),o.extraflags=Utils2.SetFlag(o.extraflags,OptConstant.ExtraFlags.NoDelete,!1),o.flags&NvConstant.ObjFlags.Lock&&(t.flags=Utils2.SetFlag(t.flags,NvConstant.ObjFlags.Lock,!0)),LogUtil.Debug("O.Opt ReplaceSpecialObject - Output: Replaced object ID:",r),r;return LogUtil.Debug("O.Opt ReplaceSpecialObject - Output: No object replaced"),0}static DragDrop_ExceptionCleanup(){LogUtil.Debug("O.Opt DragDrop_ExceptionCleanup - Input: No parameters"),T3Gv.opt.emptyEMFList=[],T3Gv.opt.emptySymbolList=[],LogUtil.Debug("O.Opt DragDrop_ExceptionCleanup - Output: Cleanup completed")}static StampObjectMove(t){LogUtil.Debug("O.Opt StampObjectMove - Input:",t),Utils2.StopPropagationAndDefaults(t);let e=0,i=0;t.gesture?(e=t.gesture.center.clientX,i=t.gesture.center.clientY):(e=t.clientX,i=t.clientY);const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e,i);if(LogUtil.Debug("O.Opt StampObjectMove - Converted coordinates:",n),T3Gv.opt.actionStoredObjectId<0){if(e<T3Gv.opt.svgDoc.docInfo.dispX||i<T3Gv.opt.svgDoc.docInfo.dispY)return void LogUtil.Debug("O.Opt StampObjectMove - Output: Cursor outside document boundaries");this.MouseAddNewShape(T3Gv.opt.useDefaultStyle),T3Gv.opt.newObjectVisible=!0,LogUtil.Debug("O.Opt StampObjectMove - Created new shape with ID:",T3Gv.opt.actionStoredObjectId)}this.AutoScrollCommon(t,!0,"HandleStampDragDoAutoScroll")&&this.StampObjectMoveCommon(n.x,n.y,t),LogUtil.Debug("O.Opt StampObjectMove - Output: Movement processed")}static PreDragDropOrStamp(){LogUtil.Debug("O.Opt PreDragDropOrStamp - Input: No parameters"),T3Gv.opt.mainAppHammer&&T3Gv.opt.UnbindDragDropOrStamp(),T3Gv.opt.mainAppHammer=new Hammer(T3Gv.opt.mainAppElement),LogUtil.Debug("O.Opt PreDragDropOrStamp - Output: Hammer manager created for drag/drop operations")}static DrawNewObject(t,e){LogUtil.Debug("O.Opt DrawNewObject - Input:",{newShape:t,clearExistingSection:e}),UIUtil.SetModalOperation(OptConstant.OptTypes.Draw),ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),T3Gv.opt.CloseEdit(),T3Gv.opt.lineDrawId=-1,T3Gv.opt.drawShape=t,SelectUtil.ClearAnySelection(!e),OptCMUtil.SetEditMode(NvConstant.EditState.Edit),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDrawStart),LogUtil.Debug("O.Opt DrawNewObject - Output: Draw new object initialized")}static StartNewObjectDraw(t){if(LogUtil.Debug("O.Opt StartNewObjectDraw - Input:",t),T3Gv.opt.lineStamp)return void LogUtil.Debug("O.Opt StartNewObjectDraw - Output: lineStamp active, aborting draw");let e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("O.Opt StartNewObjectDraw: Client coords and Doc coords",t.gesture.center.clientX,t.gesture.center.clientY,e),T3Gv.opt.drawStartX=e.x,T3Gv.opt.drawStartY=e.y,LogUtil.Debug("O.Opt StartNewObjectDraw: Draw start coordinates set",T3Gv.opt.drawStartX,T3Gv.opt.drawStartY);if(!T3Gv.opt.drawShape.LMDrawPreTrack(e))return void LogUtil.Debug("O.Opt StartNewObjectDraw - Output: Pre-track check failed");let i=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,n=T3Gv.opt.OverrideSnaps(t);i=i||n;if(T3Gv.docUtil.docConfig.enableSnap&&!i){let t=T3Gv.opt.drawShape.GetSnapRect(),i=T3Gv.opt.dragEnclosingRect?Utils1.DeepCopy(T3Gv.opt.dragEnclosingRect):t,n=Utils1.DeepCopy(T3Gv.opt.actionBBox),s=i.x-n.x,a=i.y-n.y;i.x=e.x-i.width/2,i.y=e.y-i.height/2;let o={x:i.x-s,y:i.y-a};if(!T3Gv.opt.drawShape.CustomSnap(o.x,o.y,0,0,!1,e))if(T3Gv.docUtil.docConfig.centerSnap){let t=T3Gv.docUtil.SnapToGrid(e);e.x=t.x,e.y=t.y}else{let i=Utils1.DeepCopy(t);i.x=e.x-t.width/2,i.y=e.y-t.height/2;let n=T3Gv.docUtil.SnapRect(i);e.x+=n.x,e.y+=n.y}}let s=e.x,a=e.y;SelectUtil.ClearAnySelection(!0),T3Gv.opt.actionStartX=s,T3Gv.opt.actionStartY=a,T3Gv.opt.actionBBox={x:s,y:a,width:1,height:1},T3Gv.opt.actionNewBBox={x:s,y:a,width:1,height:1};let o=T3Gv.opt.drawShape;this.InitializeAutoGrowDrag(),UIUtil.ShowFrame(!0),o.LMDrawClick(s,a),this.AddNewObject(o,!o.bOverrideDefaultStyleOnDraw,!1);let r=LayerUtil.ActiveLayerZList(),l=r.length;T3Gv.opt.actionStoredObjectId=r[l-1],T3Gv.opt.linkParams&&T3Gv.opt.linkParams.lpCircList&&T3Gv.opt.linkParams.lpCircList.push(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.SConnectIndex,T3Gv.opt.linkParams.SConnectPt,!0,!1,o.BlockID,T3Gv.opt.linkParams.SConnectInside),T3Gv.opt.linkParams.SHiliteConnect=T3Gv.opt.linkParams.SConnectIndex,T3Gv.opt.linkParams.SHiliteInside=T3Gv.opt.linkParams.SConnectInside),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SJoinIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.SJoinIndex,T3Gv.opt.linkParams.SConnectPt,!0,!0,o.BlockID,null),T3Gv.opt.linkParams.SHiliteJoin=T3Gv.opt.linkParams.SJoinIndex),LogUtil.Debug("O.Opt StartNewObjectDraw - Output: New object drawn with ID",T3Gv.opt.actionStoredObjectId)}static StampTextObjectOnTapDone(t,e){LogUtil.Debug("O.Opt StampTextObjectOnTapDone - Input:",{event:t,optionalParam:e});let i=[],n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),s=T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly;if(!s){let e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0;T3Gv.opt.OverrideSnaps(t)&&(e=!0),T3Gv.docUtil.docConfig.enableSnap&&!e&&(n=T3Gv.docUtil.SnapToGrid(n))}let a=n.x-T3Gv.opt.drawShape.Frame.width/2,o=n.y-T3Gv.opt.drawShape.Frame.height/2;T3Gv.opt.drawShape.Frame.x=a-T3Gv.opt.stampShapeOffsetX,T3Gv.opt.drawShape.Frame.y=o-T3Gv.opt.stampShapeOffsetY,T3Gv.opt.drawShape.sizedim.width=T3Gv.opt.drawShape.Frame.width,T3Gv.opt.drawShape.sizedim.height=T3Gv.opt.drawShape.Frame.height,T3Gv.opt.drawShape.UpdateFrame(T3Gv.opt.drawShape.Frame),ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(ObjectUtil$1.DeleteObjects(i,!1),i=T3Gv.opt.moveList.slice(0),T3Gv.opt.actionStoredObjectId=-1):ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),SvgUtil.RenderDirtySVGObjects(),T3Gv.opt.moveList=null,T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.CompleteOperation(i),T3Gv.opt.stampCompleteCallback&&T3Gv.opt.actionStoredObjectId>=0&&T3Gv.opt.stampCompleteCallback(T3Gv.opt.actionStoredObjectId,T3Gv.opt.stampCompleteUserData),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,LMEvtUtil.LMStampPostRelease(!0),s||i.push(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,UIUtil.SetModalOperation(OptConstant.OptTypes.None),LogUtil.Debug("O.Opt StampTextObjectOnTapDone - Output:",{stampedShapeId:T3Gv.opt.actionStoredObjectId,objectIdsToSelect:i})}static StampNewTextShapeOnTap(t,e,i,n,s,a,o){LogUtil.Debug("O.Opt StampNewTextShapeOnTap - Input:",{shape:t,hCenter:e,vCenter:i,operation:n,isSticky:s,completeCallback:a,completeUserData:o}),UIUtil.SetModalOperation(OptConstant.OptTypes.StampTextOnTap),T3Gv.opt.stampCompleteCallback=a||null,T3Gv.opt.stampCompleteUserData=o||null,T3Gv.opt.stampHCenter=e,T3Gv.opt.stampVCenter=i,T3Gv.opt.stampSticky=s,T3Gv.opt.drawShape=t,SelectUtil.ClearAnySelection(!1),OptCMUtil.SetEditMode(NvConstant.EditState.Text);T3Gv.opt.WorkAreaHammer.on("tap",(e=>{try{this.AddNewObject(t,n,!1);const i=LayerUtil.ActiveLayerZList(),s=i.length;T3Gv.opt.actionStoredObjectId=i[s-1],T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId),this.StampTextObjectOnTapDone(e,n)}catch(i){throw OptCMUtil.CancelOperation(),T3Gv.opt.ExceptionCleanup(i),i}})),LMEvtUtil.LMStampPreTrack(),LogUtil.Debug("O.Opt StampNewTextShapeOnTap - Output: Completed")}static BringToFrontOf(){LogUtil.Debug("O.Opt BringToFrontOf - Input: no parameters");const t=LayerUtil.GetFrontBackLayersForSelected();t.result&&this.BringToFrontOfSpecificLayer(t.frontmostindex),LogUtil.Debug("O.Opt BringToFrontOf - Output: completed")}static BringToFrontOfSpecificLayer(t,e){LogUtil.Debug("O.Opt BringToFrontOfSpecificLayer - Input:",{targetLayerIndex:t,updateSelectedBlock:e});const i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId);let n=Utils1.DeepCopy(i.Data);if(0!==n.length){const i=T3Gv.opt.AddAssoctoList(n),s=i.length;if(0!==s){const n=LayerUtil.VisibleZList();if(n.length<1)return void LogUtil.Debug("O.Opt BringToFrontOfSpecificLayer - Output:","No visible objects found");let a=[];for(let t=0;t<s;t++){const e=i[t],s=n.indexOf(e);a.push(s)}a.sort(((t,e)=>t-e));let o=[];for(let t=0;t<s;t++){const e=n[a[t]];o.push(e)}const r=LayerUtil.ZListPreserveForLayer(t);for(let t=0;t<s;t++){const e=o[t];LayerUtil.RemoveFromAllZLists(e),r.push(e)}if(HookUtil.UpdateLineHops(!0),null==e){T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId).Data=i}SvgUtil.RenderAllSVGObjects(),this.CompleteOperation(),LogUtil.Debug("O.Opt BringToFrontOfSpecificLayer - Output:","Operation completed")}}}static AllowGroup(t){LogUtil.Debug("O.Opt AllowGroup - Input:",t);for(const e of t){const i=ObjectUtil$1.GetObjectPtr(e,!1);if(i){if(i.flags&NvConstant.ObjFlags.Lock)return LogUtil.Debug("O.Opt AllowGroup - Output: false"),!1;for(const e of i.hooks)if(t.indexOf(e.objid)<0)return LogUtil.Debug("O.Opt AllowGroup - Output: false"),!1}}return LogUtil.Debug("O.Opt AllowGroup - Output: true"),!0}static ResetObjectDraw(){LogUtil.Debug("O.Opt ResetObjectDraw - Input: No parameters"),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),UIUtil.SetModalOperation(OptConstant.OptTypes.None),LogUtil.Debug("O.Opt ResetObjectDraw - Output: Object draw state reset")}static PostObjectDraw(t){LogUtil.Debug("O.Opt PostObjectDraw - Input:",t);let e=[],i=T3Gv.stdObj.GetObject(T3Gv.opt.actionStoredObjectId);return null!=i?(null==i.Data.Frame||i.Data.Frame.width<10&&i.Data.Frame.height<10?(ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates()):(i.Data.sizedim.width=i.Data.Frame.width,i.Data.sizedim.height=i.Data.Frame.height,T3Gv.state.ReplaceInCurrentState(T3Gv.opt.actionStoredObjectId,i),i.Data.objecttype!==NvConstant.FNObjectTypes.FlWall&&e.push(T3Gv.opt.actionStoredObjectId),LayerUtil.IsTopMostVisibleLayer()||LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId)),this.PostObjectDrawCommon(e,t),LogUtil.Debug("O.Opt PostObjectDraw - Output:",e.length),e.length):(this.PostObjectDrawCommon(null,t),LogUtil.Debug("O.Opt PostObjectDraw - Output: 0"),0)}static PostObjectDrawCommon(t,e){LogUtil.Debug("O.Opt PostObjectDrawCommon - Input:",{affectedObjects:t,event:e}),this.CompleteOperation(t),this.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook&&T3Gv.wallOpt.PostObjectDrawHook(e),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LogUtil.Debug("O.Opt PostObjectDrawCommon - Output: Operation completed")}static AddNewObject(t,e,i,n){LogUtil.Debug("O.Opt AddNewObject - Input:",{drawingObject:t,shouldStyleCopy:e,renderSelection:i,textContent:n});let s=16;if(n=n||null,null==t)throw new Error("The drawing object is null");const a=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;if(void 0===e&&(e=!0),e){t.StyleRecord=Utils1.DeepCopy(a.def.style),t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(t.StyleRecord.Line=Utils1.DeepCopy(t.StyleRecord.Border),t.TMargins=Utils1.DeepCopy(a.def.tmargins),t.TextFlags=Utils2.SetFlag(t.TextFlags,NvConstant.TextFlags.FormCR,(a.def.textflags&NvConstant.TextFlags.FormCR)>0));let e=a.def.just;"middle"!==a.def.vjust&&"center"!==a.def.vjust&&(e=a.def.vjust+"-"+a.def.just),t.TextAlign=e}T3Gv.opt.forcedotted&&t.StyleRecord&&(t.StyleRecord.Line.LinePattern=T3Gv.opt.forcedotted,T3Gv.opt.forcedotted=null),t.UpdateFrame(t.Frame),t.sizedim.width=t.Frame.width,t.sizedim.height=t.Frame.height,t.UniqueID=T3Gv.opt.uniqueId++,t.objecttype===NvConstant.FNObjectTypes.FlWall&&(s=NvConstant.LayerFlags.UseEdges),t.DataID=n?TextUtil.CreateTextBlock(t,n):-1;const o=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.BaseDrawObject,t);if(null==o)throw new Error("AddNewObject got a null new graphics block allocation");LayerUtil.ZListPreserve(s).push(o.ID);const r=t instanceof Instance.Shape.BaseLine;ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);return LayerUtil.IsTopMostVisibleLayer()||r?SvgUtil.RenderLastSVGObject(i):(SvgUtil.RenderLastSVGObject(i),LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),SvgUtil.RenderDirtySVGObjectsNoSetMouse()),T3Gv.opt.actionBBox=Utils1.DeepCopy(t.Frame),T3Gv.opt.dragEnclosingRect=t.GetDragR(),LogUtil.Debug("O.Opt AddNewObject - Output:",o.ID),o.ID}static DragDuplicate(t){if(LogUtil.Debug("O.Opt DragDuplicate - Input:",t),null==t)return LogUtil.Debug("O.Opt DragDuplicate - Output: false (null event)"),!1;let e=t.ctrlKey;if(t.gesture&&t.gesture.srcEvent&&(e=t.gesture.srcEvent.ctrlKey),e){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);t&&t.datasetElemID>=0&&(e=!1)}return LogUtil.Debug("O.Opt DragDuplicate - Output:",e),e}static CheckDragIsOverCustomLibrary(t){return!1}static AutoScrollCommon(t,e,i){let n,s;LogUtil.Debug("O.Opt AutoScrollCommon - Input:",{event:t,snapEnabled:e,callback:i});let a=!1;T3Gv.opt.OverrideSnaps(t)&&(e=!1),t.gesture?(n=t.gesture.center.clientX,s=t.gesture.center.clientY):(n=t.clientX,s=t.clientY);let o=n,r=s;const l=T3Gv.opt.svgDoc.docInfo,h=l.dispX,c=l.dispY,u=l.dispWidth,d=l.dispHeight;if(n>=h+u-8&&(a=!0,o=h+u-8+32),n<h&&(a=!0,o=h-32),s>=c+d-8&&(a=!0,r=c+d-8+32),s<c&&(a=!0,r=c-32),a){if(e&&T3Gv.docUtil.docConfig.enableSnap){let t={x:o,y:r};t=T3Gv.docUtil.SnapToGrid(t),o=t.x,r=t.y}return T3Gv.opt.autoScrollXPos=o,T3Gv.opt.autoScrollYPos=r,-1!==T3Gv.opt.autoScrollTimerId?(LogUtil.Debug("O.Opt AutoScrollCommon - Output: Auto scroll already scheduled"),!1):(T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout(i,0),LogUtil.Debug("O.Opt AutoScrollCommon - Output: Auto scroll timer set",{newX:o,newY:r}),!1)}return DrawUtil.ResetAutoScrollTimer(),LogUtil.Debug("O.Opt AutoScrollCommon - Output: No auto scroll needed, timer reset"),!0}static ResetAutoScrollTimer(){LogUtil.Debug("O.Opt ResetAutoScrollTimer - Input:"),-1!==T3Gv.opt.autoScrollTimerId&&(T3Gv.opt.autoScrollTimer.clearTimeout(T3Gv.opt.autoScrollTimerId),T3Gv.opt.autoScrollTimerId=-1),LogUtil.Debug("O.Opt ResetAutoScrollTimer - Output: Timer reset")}static DoAutoGrowDrag(t){LogUtil.Debug("O.Opt DoAutoGrowDrag - Input:",t),t.x<0&&(t.x=0),t.y<0&&(t.y=0);let e=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto)return t.x>e.dim.x&&(t.x=e.dim.x),t.y>e.dim.y&&(t.y=e.dim.y),LogUtil.Debug("O.Opt DoAutoGrowDrag - Output:",t),t;{let i;return t.x>e.dim.x?(T3Gv.opt.dragGotAutoResizeOldX.push(e.dim.x),e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:e.dim.x+T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),y:e.dim.y},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.x+=T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,T3Gv.opt.dragGotAutoResizeRight=!0):T3Gv.opt.dragGotAutoResizeRight&&t.x<T3Gv.opt.dragGotAutoResizeOldX.slice(-1).pop()&&(e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:T3Gv.opt.dragGotAutoResizeOldX.pop(),y:e.dim.y},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.x=i.x,T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,0===T3Gv.opt.dragGotAutoResizeOldX.length&&(T3Gv.opt.dragGotAutoResizeRight=!1)),t.y>e.dim.y?(T3Gv.opt.dragGotAutoResizeOldY.push(e.dim.y),e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:e.dim.x,y:e.dim.y+T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom)},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.y+=T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom),T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,T3Gv.opt.dragGotAutoResizeBottom=!0):T3Gv.opt.dragGotAutoResizeBottom&&t.y<T3Gv.opt.dragGotAutoResizeOldY.slice(-1).pop()&&(e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:e.dim.x,y:T3Gv.opt.dragGotAutoResizeOldY.pop()},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.y=i.y,T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,0===T3Gv.opt.dragGotAutoResizeOldY.length&&(T3Gv.opt.dragGotAutoResizeBottom=!1)),LogUtil.Debug("O.Opt DoAutoGrowDrag - Output:",t),t}}static CompleteOperation(t,e,i,n){LogUtil.Debug("= u.DrawUtil: CompleteOperation - Input:",{objectIdsToSelect:t,preserveUndoState:e,fitOption:i,unusedParameter:n}),SvgUtil.HideAllSVGSelectionStates(),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.UpdateLinks(),HookUtil.UpdateLineHops(!0),SvgUtil.RenderDirtySVGObjects(),UIUtil.FitDocumentWorkArea(!1,!1,!1,i),t?SelectUtil.SelectObjects(t,!1,!0):SvgUtil.RenderAllSVGSelectionStates(),e||ObjectUtil$1.PreserveUndoState(!1),ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),T3Gv.docUtil.ShowCoordinates(!0),T3Gv.opt.lastOpDuplicate=!1,T3Gv.opt.ScrollObjectIntoView(-1,!1),T3Clipboard&&T3Clipboard.FocusOnClipboardInput&&T3Clipboard.FocusOnClipboardInput(),this.UpdateAppStateV2Frame(),LogUtil.Debug("O.Opt CompleteOperation - Output: Operation completed.")}static AllowSnapToShapes(){LogUtil.Debug("O.Opt AllowSnapToShapes - Input: No parameters"),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const t=T3Gv.docUtil.docConfig.snapToShapes;return LogUtil.Debug("O.Opt AllowSnapToShapes - Output:",t),t}static GetSelectObjectCoords(){let t=SelectUtil.GetTargetSelect();var e=ObjectUtil$1.GetObjectPtr(t,!1);if(null==e)return null;var i=e.GetDimensionsForDisplay();return i.rotate=e.RotationAngle,i}static UpdateAppStateV2Frame(){var t=this.GetSelectObjectCoords();null!=t&&(QuasarUtil.UpdateCurrentObjectPos(t),EvtOpt.toolOpt.SaveAct(),LogUtil.Debug("= U.UIUtil QuasarUtil.UpdateCurrentObjectPos",!0,t,t.x,t.y,t.width,t.height))}static ClearDrawArea(){T3Gv.opt.CloseEdit(!0),LayerUtil.ClearSVGHighlightLayer(),LayerUtil.ClearSVGOverlayLayer(),LayerUtil.ClearSVGObjectLayer(),ObjectUtil$1.ClearDirtyList(),SelectUtil.ClearAnySelection(!0),UIUtil.SetBackgroundColor(),LogUtil.Info("= u.DrawUtil: ClearDrawArea, Draw area cleared and background color set.")}}class DSUtil{static GetImageDir(t){var e=0;switch(t){case"image/jpeg":e=StyleConstant.ImageDir.Jpg;break;case"image/png":e=StyleConstant.ImageDir.Png;break;case"image/svg+xml":e=StyleConstant.ImageDir.Svg;break;case"image/wmf":e=StyleConstant.ImageDir.Meta}return e}}class OptCMUtil{static GetClipboardType(){LogUtil.Debug("O.Opt GetClipboardType - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);let e;T3Gv.clipboard.Get();const i=-1!==t.theActiveTextEditObjectID,n=T3Gv.opt.bInNoteEdit;return e=i||n?T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text?T3Constant.ClipboardType.Text:T3Constant.ClipboardType.None:T3Gv.opt.header.ClipboardBuffer&&T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.LM?T3Constant.ClipboardType.LM:SelectUtil.GetTargetSelect()>=0&&T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text?T3Constant.ClipboardType.Text:T3Constant.ClipboardType.None,LogUtil.Debug("O.Opt GetClipboardType - Output:",e),e}static PixelstoPoints(t){return Math.floor(100*t/72+.5)}static SetLinkFlag(t,e){LogUtil.Debug("O.Opt SetLinkFlag - Input:",{targetId:t,flagValue:e});const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(null==i)return LogUtil.Debug("O.Opt SetLinkFlag - Output: 1 (links not found)"),1;let n=this.FindLink(i,t,!0);if(n>=0){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0),s=ObjectUtil$1.GetObjectPtr(t,!0);if(null==s)return LogUtil.Debug("O.Opt SetLinkFlag - Output: 1 (target object not found)"),1;for(s.ChangeTarget(t,null,null,null,null,!1);n<i.length&&i[n].targetid==t;)i[n].flags=Utils2.SetFlag(i[n].flags,e,!0),n++}return LogUtil.Debug("O.Opt SetLinkFlag - Output: 0 (success)"),0}static FindLink(t,e,i){if(LogUtil.Debug("O.Opt FindLink - Input:",{links:t,targetId:e,exactMatchOnly:i}),0===t.length){const t=i?-1:0;return LogUtil.Debug("O.Opt FindLink - Output (empty links):",t),t}for(let s=0;s<t.length;s++){if(t[s].targetid===e)return LogUtil.Debug("O.Opt FindLink - Output (exact match):",s),s;if(!i&&t[s].targetid>e)return LogUtil.Debug("O.Opt FindLink - Output (insertion point):",s),s}const n=i?-1:t.length;return LogUtil.Debug("O.Opt FindLink - Output (no match):",n),n}static SetEditMode(t,e,i,n){LogUtil.Debug("O.Opt SetEditMode - Input:",{stateMode:t,cursorType:e,shouldAddToList:i,preserveExisting:n});let s=e;if(T3Gv.opt.editModeList&&(i||n)||(T3Gv.opt.editModeList=[]),T3Gv.wallOpt&&T3Gv.wallOpt.NotifySetEditMode&&T3Gv.wallOpt.NotifySetEditMode(t),!s)switch(t){case NvConstant.EditState.Stamp:s=CursorConstant.CursorType.Stamp;break;case NvConstant.EditState.Text:s=CursorConstant.CursorType.Text;break;case NvConstant.EditState.FormatPaint:s=CursorConstant.CursorType.Paint;break;case NvConstant.EditState.LinkConnect:s=CursorConstant.CursorType.Anchor;break;case NvConstant.EditState.LinkJoin:s=CursorConstant.CursorType.EditClose;break;case NvConstant.EditState.Edit:s=CursorConstant.CursorType.Edit;break;case NvConstant.EditState.DragControl:s=CursorConstant.CursorType.NeswResize;break;case NvConstant.EditState.DragShape:s=CursorConstant.CursorType.Move;break;case NvConstant.EditState.Grab:s=CursorConstant.CursorType.Grab;break;default:s=CursorConstant.CursorType.Default}if(T3Gv.opt.svgDoc.SetCursor(s),i||!T3Gv.opt.editModeList.length?T3Gv.opt.editModeList.push({mode:t,cursor:s}):(T3Gv.opt.editModeList[T3Gv.opt.editModeList.length-1].mode=t,T3Gv.opt.editModeList[T3Gv.opt.editModeList.length-1].cursor=s),T3Gv.opt.curHiliteShape>=0){const t=T3Gv.stdObj.GetObject(T3Gv.opt.curHiliteShape);t&&t.Data.SetCursors()}LogUtil.Debug("O.Opt SetEditMode - Output:",{mode:t,cursor:s})}static CancelOperation(t){switch(LogUtil.Debug("O.Opt CancelOperation - Input: crtOpt =",T3Gv.opt.crtOpt),T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:break;case OptConstant.OptTypes.Stamp:DrawUtil.CancelObjectStamp(!0);break;case OptConstant.OptTypes.StampTextOnTap:DrawUtil.CancelObjectStampTextOnTap(!0);break;case OptConstant.OptTypes.DragDrop:DrawUtil.CancelObjectDragDrop(!0);break;case OptConstant.OptTypes.Draw:DrawUtil.CancelObjectDraw();break;case OptConstant.OptTypes.FormatPainter:UIUtil.SetFormatPainter(!0,!1);break;case OptConstant.OptTypes.AddCorner:T3Gv.wallOpt&&T3Gv.wallOpt.AddCorner&&this.ResetHammerGesture("dragstart",T3Gv.wallOpt.AddCorner,T3Gv.Evt_ShapeDragStart)}LogUtil.Debug("O.Opt CancelOperation - Output: completed")}static ResetHammerGesture(t,e,i){LogUtil.Debug("O.Opt ResetHammerGesture - Input:",{eventType:t,currentHandler:e,newHandler:i});const n=LayerUtil.ActiveVisibleZList();for(let s=0;s<n.length;s++){const a=T3Gv.opt.svgObjectLayer.GetElementByID(n[s]).svgObj.SDGObj.GetEventProxy();let o=!1;for(let t=0;t<a.eventHandlers.length;t++)if(a.eventHandlers[t].handler===e){o=!0;break}o&&a.on(t,i)}LogUtil.Debug("O.Opt ResetHammerGesture - Output: Hammer gestures reset")}static RebuildURLs(t,e){let i,n,s,a,o,r,l,h;if(LogUtil.Debug("O.Opt RebuildURLs - Input:",{stateId:t,isNextState:e}),e)for(i=T3Gv.state.states[t+1].storedObjects.length,n=0;n<i;n++)s=T3Gv.state.states[t+1].storedObjects[n],s.Type===StateConstant.StoredObjectType.BaseDrawObject&&s.stateOptTypeId===StateConstant.StateOperationType.CREATE&&(o=s.Data,this.IsBlobURL(o.ImageURL)&&(a=T3Gv.stdObj.GetObject(s.ID),a&&(o=a.Data,r=o.GetBlobBytes(),l=DSUtil.GetImageBlobType(r.ImageDir),o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l))));for(i=T3Gv.state.states[t].storedObjects.length,n=0;n<i;n++)s=T3Gv.state.states[t].storedObjects[n],s.Type===StateConstant.StoredObjectType.BaseDrawObject&&(s.stateOptTypeId===StateConstant.StateOperationType.DELETE?e||(a=T3Gv.stdObj.GetObject(s.ID),a&&(o=a.Data,o.BlobBytesID>=0&&this.IsBlobURL(o.ImageURL)&&(r=o.GetBlobBytes(),l=DSUtil.GetImageBlobType(r.ImageDir),o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l)))):(h=s.Data,a=T3Gv.stdObj.GetObject(s.ID),this.IsBlobURL(h.ImageURL)?a?(o=a.Data,h.ImageURL!==o.ImageURL&&(this.DeleteURL(h.ImageURL),this.IsBlobURL(o.ImageURL)&&(r=o.GetBlobBytes(),r&&(l=DSUtil.GetImageBlobType(r.ImageDir),this.IsBlobURL(o.ImageURL)&&(o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l)))))):this.DeleteURL(h.ImageURL):a&&(o=a.Data,this.IsBlobURL(o.ImageURL)&&(r=o.GetBlobBytes(),r&&(l=DSUtil.GetImageBlobType(r.ImageDir),this.IsBlobURL(o.ImageURL)&&(o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l)))))));LogUtil.Debug("O.Opt RebuildURLs - Output: URLs rebuilt for state:",t)}static IsBlobURL(t){LogUtil.Debug("O.Opt IsBlobURL - Input:",t);const e=!!(t&&t.length>0&&"blob:"===t.substring(0,5));return LogUtil.Debug("O.Opt IsBlobURL - Output:",e),e}static ShapeToPolyLine(t,e,i,n){let s,a,o,r=!1;const l=[];let h={};if(n)s=n,r=!0,h=Utils1.DeepCopy(s.Frame);else{s=ObjectUtil$1.GetObjectPtr(t,!1),null==s.polylist?(s.polylist=s.GetPolyList(),s.StartPoint={},s.EndPoint={}):r=!0;const e=T3Gv.stdObj.PreserveBlock(t);if(null==e)return;s=e.Data,h=Utils1.DeepCopy(s.Frame)}if(r){if(!s.polylist)return null;if(T3Gv.opt.GetClosedPolyDim(s),!Utils2.IsEqual(s.polylist.dim.x,h.width)){const t=Utils2.DeepCopy(s);t.inside=Utils1.DeepCopy(s.Frame),Instance.Shape.PolyLine.prototype.ScaleObject.call(t,0,0,0,0,0,0),s.polylist=t.polylist}}return o=s.polylist.segs.length,s.StartPoint.x=s.Frame.x+s.polylist.segs[0].pt.x+s.polylist.offset.x,s.StartPoint.y=s.Frame.y+s.polylist.segs[0].pt.y+s.polylist.offset.y,s.EndPoint.x=s.Frame.x+s.polylist.segs[o-1].pt.x+s.polylist.offset.x,s.EndPoint.y=s.Frame.y+s.polylist.segs[o-1].pt.y+s.polylist.offset.y,a=e?new Instance.Shape.PolyLineContainer(s):new Instance.Shape.PolyLine(s),a.BlockID=s.BlockID,a.polylist.Shape_Rotation=s.RotationAngle,a.polylist.Shape_DataID=s.DataID,a.RotationAngle=0,a.DataID=-1,n||(preservedBlock.Data=a),i||(ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects(),l.push(t),SelectUtil.SelectObjects(l,!1,!0)),a.inside=Utils1.DeepCopy(s.Frame),a}static PutInFrontofObject(t,e){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0),n=i.layers[i.activelayer].zList,s=n.indexOf(t),a=n.indexOf(e);if(!(s<0||a<0))if(a<s){for(let t=a;t<s;t++)n[t]=n[t+1],ObjectUtil$1.AddToDirtyList(n[t]);n[s]=e,ObjectUtil$1.AddToDirtyList(e)}else{for(let t=a;t>s+1;t--)n[t]=n[t-1],ObjectUtil$1.AddToDirtyList(n[t]);n[s+1]=e,ObjectUtil$1.AddToDirtyList(e)}}static InsertHops(t,e,i){let n,s,a,o,r,l,h,c,u,d,p=new Point$1,g=new Point$1,f=new Point$1,b=new Point$1,v=[];const m=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);c=m.hopdim.x,u=m.hopdim.y;for(n=t.hoplist.nhops-1;n>=0;n--)if(!t.hoplist.hops[n].cons){for(s=t.hoplist.hops[n].segment,a=n,l=n;a>0&&t.hoplist.hops[a-1].cons;)s=t.hoplist.hops[a-1].segment,l=a-1,a--;if(s>=i)return{bSuccess:!1,npts:i};if(d=this.InsertPoints(e,i,s,2),i=d.npts,d.bSuccess){if(e[s]={x:t.hoplist.hops[l].pt.x,y:t.hoplist.hops[l].pt.y},e[s+1]={x:t.hoplist.hops[n].pt.x,y:t.hoplist.hops[n].pt.y},s<s){for(o=s;o<i;o++)e[s+o-s]={x:e[o].x,y:e[o].y};i-=s-s}if(r=s+1,o=h=s+1,d=this.PolyTrimForArrow(e,0,h,c,c,p,g,!1),h=d.npts,p=d.spt,g=d.ept,h<o){for(;o<i;o++)e[h+o-o]={x:e[o].x,y:e[o].y};i-=o-h,r-=o-h}if(f={x:p.x,y:p.y},o=h=i-r,d=this.PolyTrimForArrow(e,r,h,c,c,p,g,!0),h=d.npts,p=d.spt,h<o&&(i-=o-h),b={x:(g=d.ept).x,y:g.y},d=this.BuildHop(m.hopstyle,u,f,b,h),v=d.pts,h=d.npts,d=this.InsertPoints(e,i,h,h),i=d.npts,d.bSuccess)for(o=0;o<h;o++)e[h+o]={x:v[o].x,y:v[o].y}}}return{bSuccess:!0,npts:i}}static PolyTrimForArrow(t,e,i,n,s,a,o,r){let l=new Point$1,h={findpt:l,npts:i},c={spt:{},ept:{},pts:[],npts:0};return h=this.PolyFindLength(t,e,i,s,r,!1,l),l=h.findpt,i=h.npts,r?(c.spt={x:t[e].x,y:t[e].y},c.ept={x:l.x,y:l.y}):(c.ept={x:t[e+i-1].x,y:t[e+i-1].y},c.spt={x:l.x,y:l.y}),h=this.PolyFindLength(t,e,i,n,r,!0,l),l=h.findpt,i=h.npts,c.pts=h.pts,c.npts=i,c}static InsertPoints(t,e,i,n){if(e+n>OptConstant.Common.MaxPolyPoints)return{bSuccess:!1,npts:e};for(let s=0;s<n;++s){const e=new Point$1;t.push(e)}for(let s=e-1;s>=i;s--)t[s+n]={x:t[s].x,y:t[s].y};e+=n;for(let s=i;s<i+n;s++)t[s]={x:s-i,y:s-i};return{bSuccess:!0,npts:e}}static GetEditMode(){LogUtil.Debug("= O.Opt GetEditMode - Input");const t=T3Gv.opt.editModeList||[];let e=NvConstant.EditState.Default;return t.length&&(e=t[t.length-1].mode),LogUtil.Debug("= O.Opt GetEditMode - Output:",e),e}static DeleteURL(t){const e=window.URL||window.webkitURL;e&&e.revokeObjectURL&&e.revokeObjectURL(t)}}class UIUtil{static ShowContextMenu(t,e,i){LogUtil.Debug("= u.UIUtil: ShowContextMenu - Input:",{isShow:t,from:e,type:i}),QuasarUtil.ShowContextMenu(t,e,i)}static ShowObjectConfig(t){QuasarUtil.ShowObjectConfig(t)}static ShowFrame(t){LogUtil.Debug("= U.UIUtil: ShowFrame - Input:",{isShowFrame:t});T3Gv.docUtil.docConfig.showRulers?LogUtil.Debug("= U.UIUtil: ShowFrame - Output: Frame visibility set to",t):LogUtil.Debug("= U.UIUtil: ShowFrame - Output: Rulers are not shown")}static UpdateDisplayCoordinates(t,e,i,n){var s,a;if(T3Gv.docUtil.docConfig.showRulers){let i=0,l=0;const h=T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet;if(h&&(i=l=NvConstant.DimensionFlags.ShowFractionalInches,n&&(l=Utils2.SetFlag(i,NvConstant.DimensionFlags.ShowFeetAsInches,(n.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches)>0))),t){const e=RulerUtil.GetLengthInRulerUnits(t.x,!1,T3Gv.docUtil.rulerConfig.originx,i),n=RulerUtil.GetLengthInRulerUnits(t.y,!1,T3Gv.docUtil.rulerConfig.originy,i),s=RulerUtil.GetLengthInRulerUnits(t.width,!1,null,l),a=RulerUtil.GetLengthInRulerUnits(t.height,!1,null,l);LogUtil.Debug("= U.UIUtil: Formatted Values: Origin x,y,w,h",e,n,s,a),LogUtil.Debug("= U.UIUtil: Formatted Values: Dimension x,y,w,h",t.x,t.y,t.width,t.height);const c=r(o(e,h)),u=r(o(n,h)),d=r(o(s,h)),p=r(o(a,h));LogUtil.Debug("= U.UIUtil: Formatted Values: After x,y,w,h",c,u,d,p),t.x,t.y,t.width,t.height}if(e){e.x=Math.max(0,e.x),e.y=Math.max(0,e.y);const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e.x=Math.min(null==(s=null==t?void 0:t.dim)?void 0:s.x,null==e?void 0:e.x),e.y=Math.min(null==(a=null==t?void 0:t.dim)?void 0:a.y,null==e?void 0:e.y)}}function o(t,e){let i=t,n=2;if(n=T3Gv.docUtil.rulerConfig.dp,e)return t;if(T3Gv.docUtil.rulerConfig.showpixels)return t.toFixed(0);if(null!=t.toFixed&&(i=t.toFixed(n)),e){const t=i.indexOf('"'),e=i.indexOf("'");if(t<0)i+="    ";else for(let n=e-t;n<4;n++)i+=" ";for(let n=e;n<4;n++)i+=" "}else{let t=i.indexOf(".");if(t<0&&(i+=".",t=i.length-1),t>=0){for(let e=n,s=i.length-t-1;e<s;e++)i+="0";for(let e=t;e<4;e++)i+=" "}}return i}function r(t){const e=t.length;let i=t.trim();for(let n=i.length;n<e;n++)i+=" ";return i}LogUtil.Debug("= U.UIUtil: UpdateDisplayCoordinates - Output: Coordinates updated in UI")}static ShowXY(t){}static GetDocDirtyState(){LogUtil.Debug("= U.UIUtil: GetDocDirtyState - Input: no parameters");const t=T3Gv.opt.header.DocIsDirty;return LogUtil.Debug("= U.UIUtil: GetDocDirtyState - Output:",t),t}static SetDocDirtyState(t,e){LogUtil.Debug("= U.UIUtil: SetDocDirtyState - Input:",{isDirty:t,allowReplaceWhenClean:e}),T3Gv.opt.header.DocIsDirty=t,t?T3Gv.opt.header.AllowReplace=!1:!0===e&&(T3Gv.opt.header.AllowReplace=!0),LogUtil.Debug("= U.UIUtil: SetDocDirtyState - Output: Document dirty state set to",t)}static SetFormatPainter(t,e){let i,n;if(LogUtil.Debug("= U.UIUtil: SetFormatPainter - Input:",{shouldDisable:t,makeSticky:e}),T3Gv.opt.crtOpt===OptConstant.OptTypes.FormatPainter)return T3Gv.opt.crtOpt=OptConstant.OptTypes.None,OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.formatPainterSticky=!1,void LogUtil.Debug("= U.UIUtil: SetFormatPainter - Output: Format painter disabled");if(!t){OptCMUtil.CancelOperation();if(null!=TextUtil.GetActiveTextEdit()){T3Gv.opt.crtOpt=OptConstant.OptTypes.FormatPainter,T3Gv.opt.formatPainterMode=StyleConstant.FormatPainterModes.Text,T3Gv.opt.formatPainterSticky=e;const t=T3Gv.opt.svgDoc.GetActiveEdit();t&&(T3Gv.opt.formatPainterText=t.GetSelectedFormat(),T3Gv.opt.formatPainterStyle={StyleRecord:{}},T3Gv.opt.formatPainterStyle.Text=new TextFmtData,TextUtil.TextStyleToText(T3Gv.opt.formatPainterStyle.Text,T3Gv.opt.formatPainterText),OptCMUtil.SetEditMode(NvConstant.EditState.FormatPaint))}else(i=SelectUtil.GetTargetSelect())>=0&&(n=ObjectUtil$1.GetObjectPtr(i,!1))&&(T3Gv.opt.crtOpt=OptConstant.OptTypes.FormatPainter,T3Gv.opt.formatPainterSticky=e,T3Gv.opt.formatPainterMode=StyleConstant.FormatPainterModes.Object,T3Gv.opt.formatPainterStyle=Utils1.DeepCopy(n.StyleRecord),T3Gv.opt.formatPainterStyle.Border=Utils1.DeepCopy(n.StyleRecord.Line),!(n.ImageURL||n.SymbolURL||n instanceof Instance.Shape.GroupSymbol)||n instanceof Instance.Shape.SvgSymbol||(delete T3Gv.opt.formatPainterStyle.Fill,delete T3Gv.opt.formatPainterStyle.Name,(0===n.StyleRecord.Line.Thickness||n instanceof Instance.Shape.GroupSymbol)&&(delete T3Gv.opt.formatPainterStyle.Line,delete T3Gv.opt.formatPainterStyle.Border)),T3Gv.opt.formatPainterText=n.GetTextFormat(!1,null),null===T3Gv.opt.formatPainterText&&(T3Gv.opt.formatPainterText=TextUtil.CalcDefaultInitialTextStyle(T3Gv.opt.formatPainterStyle.Text)),T3Gv.opt.formatPainterParaFormat=n.GetTextParaFormat(!1),T3Gv.opt.formatPainterArrows=n.GetArrowheadFormat(),OptCMUtil.SetEditMode(NvConstant.EditState.FormatPaint))}LogUtil.Debug("= U.UIUtil: SetFormatPainter - Output:",{mode:T3Gv.opt.formatPainterMode,isSticky:T3Gv.opt.formatPainterSticky,crtOpt:T3Gv.opt.crtOpt})}static InitSvgDocument(t=!1){const e=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;LogUtil.Debug("InitSvgDoc dim from T3Gv.stdObj without load storage data",T3Gv.opt.sdDataBlockId,T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data);const i=DataOpt.GetSDDataDimensions(),n=null==i||0===i.x&&0===i.y;LogUtil.Debug("InitSvgDoc dim from storage data",i);const s=this.GetScreenDimensions();e.dim.x=n?s.width:i.x,e.dim.y=n?s.height:i.y,LogUtil.Debug("InitSvgDoc set the block data with previous dim",T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data);var a=e.dim.x,o=e.dim.y;const r={svgAreaId:T3Gv.opt.svgDocId,documentWidth:a,documentHeight:o,documentDPI:100};T3Gv.docUtil.InitializeWorkArea(r,t)}static InitT3GvOpt(){T3Gv.opt.svgDoc=T3Gv.docUtil.DocObject(),T3Gv.opt.svgObjectLayer=T3Gv.opt.svgDoc.AddLayer("svg-object-layer"),T3Gv.opt.svgDoc.SetDocumentLayer("svg-object-layer"),T3Gv.opt.svgOverlayLayer=T3Gv.opt.svgDoc.AddLayer("svg-overlay-layer"),T3Gv.opt.svgOverlayLayer.ExcludeFromExport(!0),T3Gv.opt.svgHighlightLayer=T3Gv.opt.svgDoc.AddLayer("svg-highlight-layer"),T3Gv.opt.svgHighlightLayer.ExcludeFromExport(!0),T3Gv.opt.svgCollabLayer=T3Gv.opt.svgDoc.AddLayer("svg-collab-layer"),T3Gv.opt.svgCollabLayer.ExcludeFromExport(!0),T3Gv.opt.svgCollabLayer.AllowScaling(!1),T3Gv.opt.mainAppElement=document.getElementById("main-app"),T3Gv.opt.workAreaElement=document.getElementById("svg-area"),T3Gv.opt.documentElement=document.getElementById("document-area"),T3Gv.opt.WorkAreaHammer=new Hammer(T3Gv.opt.workAreaElement),T3Gv.opt.documentElementHammer=new Hammer(T3Gv.opt.documentElement),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),T3Gv.opt.WorkAreaHammer.on("wheel",EvtUtil.Evt_WorkAreaMouseWheel),T3Gv.opt.documentElementHammer.on("wheel",EvtUtil.Evt_WorkAreaMouseWheel),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart)}static SetModalOperation(t){LogUtil.Debug("= U.UIUtil: SetModalOperation - Input:",{operation:t}),t!==OptConstant.OptTypes.None&&T3Gv.opt.crtOpt!==OptConstant.OptTypes.None&&T3Gv.opt.crtOpt!==t&&OptCMUtil.CancelOperation(),T3Gv.opt.crtOpt=t,LogUtil.Debug("= U.UIUtil: SetModalOperation - Output:",{crtOpt:t})}static ResizeSVGDocument(){LogUtil.Debug("= U.UIUtil: ResizeSVGDocument - Input: No parameters");const t=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;T3Gv.docUtil.ResizeDocument(t.dim.x,t.dim.y),LogUtil.Debug("= U.UIUtil: ResizeSVGDocument - Output: Document resized to",t.dim)}static SetBackgroundColor(){LogUtil.Debug("= U.UIUtil: SetBackgroundColor - Input:",{});const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),e=T3Gv.docUtil.GetBackground();if(t&&e){const i=t.background.Paint;if(i.FillType===NvConstant.FillTypes.Solid)i.Color===NvConstant.Colors.White||0===i.Opacity?e.SetFillColor("none"):e.SetFillColor(i.Color);else if(i.FillType===NvConstant.FillTypes.Gradient){const t=new Instance.Shape.BaseShape;e.SetGradientFill(t.CreateGradientRecord(i.GradientFlags,i.Color,i.Opacity,i.EndColor,i.EndOpacity))}else if(i.FillType===NvConstant.FillTypes.RichGradient){const t=new Instance.Shape.BaseShape;e.SetGradientFill(t.CreateRichGradientRecord(i.GradientFlags))}else i.FillType===NvConstant.FillTypes.Texture?(i.TextureScale.AlignmentScalar,i.Texture):e.SetFillColor("none");e.ExcludeFromExport(this.GetBackgroundTransparent())}const i=LayerUtil.VisibleZList();for(let n=0,s=i.length;n<s;n++){const t=i[n],e=ObjectUtil$1.GetObjectPtr(t,!1);e&&e.DataID>=0&&ObjectUtil$1.AddToDirtyList(t)}LogUtil.Debug("= U.UIUtil: SetBackgroundColor - Output:",{})}static GetBackgroundTransparent(){LogUtil.Debug("= U.UIUtil: GetBackgroundTransparent - Input: no parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),e=T3Gv.docUtil.GetBackground();let i=!0;if(t&&e){const e=t.background.Paint;switch(e.FillType){case NvConstant.FillTypes.Solid:i=e.Color===NvConstant.Colors.White||0===e.Opacity;break;case NvConstant.FillTypes.Gradient:case NvConstant.FillTypes.RichGradient:case NvConstant.FillTypes.Texture:i=!1;break;default:i=!0}}return LogUtil.Debug("= U.UIUtil: GetBackgroundTransparent - Output:",i),i}static SetDocumentScale(t,e){LogUtil.Debug("= u.UIUtil: SetDocumentScale/ input",{scaleFactor:t,skipCentering:e}),T3Gv.opt.svgDoc&&T3Gv.docUtil.SetZoomFactor(t,e)}static UpdateDocumentScale(){if(LogUtil.Debug("= U.UIUtil: UpdateDocumentScale: input"),T3Gv.opt.svgDoc){T3Gv.opt.svgDoc.GetActiveEdit()||(SvgUtil.HideAllSVGSelectionStates(),SvgUtil.RenderAllSVGSelectionStates())}}static IsPlanningDocument(){return!1}static GetUIAdaptation(t){LogUtil.Debug("= U.UIUtil: GetUIAdaptation - Input:",t);let e=!1;return t.gesture?"onpointerdown"in window?t.gesture.srcEvent instanceof PointerEvent&&"touch"==t.gesture.srcEvent.pointerType&&(e=!0):"ontouchstart"in window&&-1!=t.gesture.srcEvent.type.indexOf("touch")?e=!0:"mousedown"==t.gesture.srcEvent.type&&(e=!1):"onpointerdown"in window?t instanceof PointerEvent&&"touch"==t.pointerType&&(e=!0):"ontouchstart"in window&&-1!=t.type.indexOf("touch")?e=!0:"mousedown"==t.type&&(e=!1),LogUtil.Debug("= U.UIUtil: GetUIAdaptation - Output:",e),e}static FitDocumentWorkArea(t,e,i,n){let s,a,o,r,l;LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Input:",{preserveState:t,forceFlag:e,allowOverride:i,fitOptions:n});let h=!1,c=!1,u=!1,d=!1;if(!T3Gv.opt)return;const p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);for(p.layers[p.activelayer].flags&NvConstant.LayerFlags.UseEdges&&(h=!0,r=p.layers[p.activelayer].flags&NvConstant.LayerFlags.Visible),o=p.nlayers,a=0;a<o;a++)if(p.layers[a].flags&NvConstant.LayerFlags.UseEdges&&p.layers[a].flags&NvConstant.LayerFlags.Visible||h){c=!0;break}let g,f;s=T3Gv.opt.CalcAllObjectEnclosingRect(c&&!h,n);let b=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),v=T3Gv.opt.header.Page.papersize,m=T3Gv.opt.header.Page.margins,y=v.x-(m.left+m.right),S=v.y-(m.top+m.bottom),w={x:0,y:0};if(s.x<0&&(s.x=0),s.y<0&&(s.y=0),g=Math.floor(s.x+s.width),f=Math.floor(s.y+s.height),c&&!h&&(f<T3Gv.opt.header.Page.minsize.y&&(f=T3Gv.opt.header.Page.minsize.y,u=!0),g<T3Gv.opt.header.Page.minsize.x&&(g=T3Gv.opt.header.Page.minsize.x,d=!0)),T3Gv.opt.header.flags&OptConstant.HeaderFlags.Pages&&!h){let t,i,n=Math.ceil(g/y),s=Math.ceil(f/S);if(n<1&&(n=1),s<1&&(s=1),c?(t=Math.ceil(b.dim.x/y),i=Math.ceil(b.dim.y/S)):(t=Math.round(b.dim.x/y),i=Math.round(b.dim.y/S)),t<1&&(t=1),i<1&&(i=1),g<=b.dim.x&&f<=b.dim.y&&!e&&n>=t&&s>=i&&1===t&&1===i)return void LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Output: No resize needed");w={x:n*y,y:s*S},d&&(w.x=g),u&&(w.y=f),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&(w.x<b.dim.x&&(w.x=b.dim.x),w.y<b.dim.y&&(w.y=b.dim.y))}else h&&(s.width+=12,s.height+=12),w.x=s.x+s.width,w.y=s.y+s.height,!h||Utils2.IsEqual(w.x,b.dim.x,2)&&Utils2.IsEqual(w.y,b.dim.y,2)||(r?(w.x<y&&(w.x=y),w.y<S&&(w.y=S),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto||(T3Gv.opt.header.Page.minsize.y=w.y,T3Gv.opt.header.Page.minsize.x=w.x)):(T3Gv.opt.header.Page.minsize.x=y,T3Gv.opt.header.Page.minsize.y=S)),w.x<T3Gv.opt.header.Page.minsize.x&&(w.x=T3Gv.opt.header.Page.minsize.x),w.y<T3Gv.opt.header.Page.minsize.y&&(w.y=T3Gv.opt.header.Page.minsize.y);l=Utils2.IsEqual(w.x,b.dim.x)&&Utils2.IsEqual(w.y,b.dim.y);const x=w.x>b.dim.x||w.y>b.dim.y;if(l)T3Gv.docUtil.CheckScaleToFit()&&this.ResizeSVGDocument();else{if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&!i&&(!x||function(t,e,i){const n=t.x%e;return Utils2.IsEqual(n,0)}(b.dim,y))){if(x){const t=new Error("bounds error");throw t.name="1",t}return void LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Output: No resize needed (NoAuto constraint)")}let e=!0;t&&(e=!1),b=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,e),T3Gv.opt.UpdateEdgeLayers([],b.dim,w),b.dim.x=w.x,b.dim.y=w.y,this.ResizeSVGDocument()}LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Output:",{newSize:w,documentSizeChanged:l,isGrowing:x})}static ChangeBackgroundTextColor(t,e){if(t!==e){const i=LayerUtil.ZList(),n=i.length;for(let s=0;s<n;s++){const n=ObjectUtil$1.GetObjectPtr(i[s],!1);n&&n.ChangeBackgroundColor(t,e)}}}static GetScreenDimensions(){const t={width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight};return LogUtil.Debug("= U.UIUtil: GetScreenDimensions - Output:",t),t}}class SvgUtil{static RenderAllSVGSelectionStates(){LogUtil.Debug("= U.SvgUtil: RenderAllSVGSelectionStates - Input: No parameters");const t=LayerUtil.ActiveVisibleZList(),e=t.length,i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,n=SelectUtil.GetTargetSelect(),s=[OptConstant.SVGElementClass.DimLine,OptConstant.SVGElementClass.DimText,OptConstant.SVGElementClass.AreaDimLine,OptConstant.SVGElementClass.DimTextNoEdit],a=function(t){return function(e){return t.LMActionClick(e),!1}};for(let r=0;r<e;++r){const e=t[r],l=i.indexOf(e);if(l<0)continue;const h=ObjectUtil$1.GetObjectPtr(e,!1);if(null===h||h.flags&NvConstant.ObjFlags.NotVisible)continue;const c=T3Gv.opt.svgObjectLayer.GetElementById(e);if(null===c||null===c.GetElementById(OptConstant.SVGElementClass.Shape))continue;const u=OptConstant.Common.Action+e;let d=T3Gv.opt.svgOverlayLayer.GetElementById(u);if(null===d&&null!==(d=h.CreateActionTriggers(T3Gv.opt.svgDoc,e,c,n))){T3Gv.opt.svgOverlayLayer.AddElement(d);try{d.SetRotation(h.RotationAngle)}catch(o){throw o}const t=0==(h.flags&NvConstant.ObjFlags.Lock),e=!T3Gv.docUtil.IsReadOnly(),i=!h.NoGrow();if(t&&e&&i){const t=d.DOMElement(),e=new Hammer(t);e.on("tap",EvtUtil.Evt_ActionTriggerTap),e.on("dragstart",a(h)),d.SetEventProxy(e)}}if(h.Dimensions&NvConstant.DimensionFlags.Select)for(let t=c.ElementCount()-1;t>=1;t--){const e=c.GetElementByIndex(t),i=e.GetID();s.indexOf(i)>=0&&e.SetOpacity(l>=0?1:0)}}LogUtil.Debug("= U.SvgUtil: RenderAllSVGSelectionStates - Output: Selection states rendered")}static HideAllSVGSelectionStates(){LogUtil.Debug("= U.SvgUtil: HideAllSVGSelectionStates: input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);T3Gv.opt.SetDimensionVisibility(t,!1),T3Gv.opt.fromOverlayLayer||T3Gv.opt.svgOverlayLayer.RemoveAll(),ActionUtil.ClearAllActionArrowTimers(),LayerUtil.ShowOverlayLayer(),LogUtil.Debug("= U.SvgUtil: HideAllSVGSelectionStates: output")}static RenderDirtySVGObjects(){this.RenderDirtySVGObjectsCommon(!0)}static RenderDirtySVGObjectsCommon(t){if(LogUtil.Debug("= U.SvgUtil: RenderDirtySVGObjectsCommon - Input:",{renderSelectionStates:t}),0!==T3Gv.opt.dirtyList.length){const e=LayerUtil.VisibleZList(),i=LayerUtil.ActiveVisibleZList(),n=function(t){const e=[],i=NvConstant.ObjFlags.NotVisible;for(let n=0;n<t.length;n++){const s=ObjectUtil$1.GetObjectPtr(t[n],!1);s&&0==(s.flags&i)&&e.push(t[n])}return e}(e);T3Gv.opt.dirtyList.sort(((t,i)=>e.indexOf(t)<e.indexOf(i)?-1:1));const s=T3Gv.opt.dirtyList.length;for(let a=0;a<s;a++){let s=!1;const o=T3Gv.opt.dirtyList[a],r=T3Gv.opt.dirtyListMoveOnly[o];let l=n.indexOf(o);if(l<0&&(l=e.indexOf(o)),l>=0)if(t&&(s=-1!==i.indexOf(o)),r){const t=ObjectUtil$1.GetObjectPtr(o,!1);t&&t.MoveSVG()}else this.AddSVGObject(l,o,!0,s)}if(T3Gv.opt.dirtyListReOrder){const t=n.length;for(let e=0;e<t;e++){const t=n[e],i=T3Gv.opt.svgObjectLayer.GetElementById(t.toString());i&&(T3Gv.opt.svgObjectLayer.RemoveElement(i),T3Gv.opt.svgObjectLayer.AddElement(i,e))}}ObjectUtil$1.ClearDirtyList()}LogUtil.Debug("= U.SvgUtil: RenderDirtySVGObjectsCommon - Output: Completed rendering dirty SVG objects")}static AddSVGObject(t,e,i,n){LogUtil.Info("= U.SvgUtil: AddSVGObject - Input:",{containerElement:t,objectId:e,removeExisting:i,renderCallback:n});let s=T3Gv.opt.svgDoc,a=T3Gv.stdObj.GetObject(e);if(LogUtil.Info("= u.SvgUtil: AddSVGObject / stdObj's object: objectId,stdObj,drawingObj",e,T3Gv.stdObj,a),!a)return void LogUtil.Info("= U.SvgUtil: AddSVGObject - Output: No drawing object found.");let o,r=a.Data;r.tag=e;let l=r.CreateShape(s,n);if(l){l.SetID(e),i?(o=T3Gv.opt.svgObjectLayer.GetElementById(e),l&&T3Gv.opt.svgObjectLayer.AddElement(l,t),o&&T3Gv.opt.svgObjectLayer.RemoveElement(o)):l&&T3Gv.opt.svgObjectLayer.AddElement(l),l&&r.PostCreateShapeCallback(s,l,n);try{l.SetRotation(r.RotationAngle,r.Frame.x+r.Frame.width/2,r.Frame.y+r.Frame.height/2)}catch(h){throw LogUtil.Info("= U.SvgUtil: AddSVGObject - SetRotation error:",h),h}if(null!==l)if(n){let t=l.DOMElement(),e=new Hammer(t),i=EvtUtil.Evt_ShapeTapFactory(r);e.on("tap",i),T3Gv.docUtil.IsReadOnly()||(T3Gv.Evt_ShapeDragStart=EvtUtil.Evt_ShapeDragStartFactory(r),e.on("dragstart",T3Gv.Evt_ShapeDragStart),(r.AllowTextEdit()||r.AllowDoubleClick())&&(T3Gv.Evt_LMShapeDoubleTap=EvtUtil.Evt_ShapeDoubleTapFactory(r),e.on("doubletap",T3Gv.Evt_LMShapeDoubleTap)),l.SetEventProxy(e)),T3Gv.docUtil.IsReadOnly()||l.svgObj.mouseover((function(t){let e=this.SDGObj.GetID(),i=ObjectUtil$1.GetObjectPtr(e,!1);i&&i.SetRolloverActions(s,l,t)})),r.RegisterForDataDrop(l)}else l.SetEventBehavior(OptConstant.EventBehavior.None)}LogUtil.Info("= U.SvgUtil: AddSVGObject - Output: Completed adding SVG object for objectId",e)}static RenderAllSVGObjects(){LogUtil.Debug("= U.SvgUtil: RenderAllSVGObjects - Input: no parameters");const t=LayerUtil.VisibleZList(),e=LayerUtil.ActiveVisibleZList(),i=t.length;LayerUtil.ClearSVGHighlightLayer(),LayerUtil.ClearSVGOverlayLayer(),LayerUtil.ClearSVGObjectLayer(),UIUtil.SetBackgroundColor();for(let n=0;n<i;++n){const i=t[n],s=-1!==e.indexOf(i);SvgUtil.AddSVGObject(n,i,!1,s)}SvgUtil.RenderAllSVGSelectionStates(),ObjectUtil$1.ClearDirtyList(),LogUtil.Debug("= U.SvgUtil: RenderAllSVGObjects - Output: rendering complete")}static GetSVGDragElement(t){if(LogUtil.Debug("= U.SvgUtil: GetSVGDragElement - Input:",t),!T3Gv.opt.dragElementList||t<0||t>=T3Gv.opt.dragElementList.length)return LogUtil.Debug("= U.SvgUtil: GetSVGDragElement - Output: null (invalid index)"),null;const e=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.dragElementList[t]);return LogUtil.Debug("= U.SvgUtil: GetSVGDragElement - Output:",e?"Element found":"null"),e}static ShowSVGSelectionState(t,e){LogUtil.Debug("= U.SvgUtil: ShowSVGSelectionState - Input:",{objectId:t,isSelected:e});const i=OptConstant.Common.Action+t,n=SelectUtil.GetTargetSelect();let s=T3Gv.opt.svgOverlayLayer.GetElementById(i);const a=T3Gv.opt.svgObjectLayer.GetElementById(t.toString()),o=ObjectUtil$1.GetObjectPtr(t,!1);if(null!==o){if(null===s&&e){if(s=o.CreateActionTriggers(T3Gv.opt.svgDoc,t,a,n),null!==s){T3Gv.opt.svgOverlayLayer.AddElement(s);try{s.SetRotation(o.RotationAngle)}catch(l){throw l}if(!o.NoGrow()){const t=s.DOMElement(),e=Hammer(t);e.on("tap",EvtUtil.Evt_ActionTriggerTap),e.on("dragstart",(r=o,t=>(r.LMActionClick(t),!1))),s.SetEventProxy(e)}}}else null===s||e||T3Gv.opt.svgOverlayLayer.RemoveElement(s);if(o.Dimensions&NvConstant.DimensionFlags.Select)for(let t=a.ElementCount()-1;t>=1;t--){const i=a.GetElementByIndex(t);i.GetID()!==OptConstant.SVGElementClass.DimLine&&i.GetID()!==OptConstant.SVGElementClass.DimText||i.SetOpacity(e?1:0)}}var r;LogUtil.Debug("= U.SvgUtil: ShowSVGSelectionState - Output:",{objectId:t,isSelected:e})}static ClearOverlayElementsByID(t,e){LogUtil.Debug("= U.SvgUtil: ClearOverlayElementsByID - Input:",{elementID:t,resetHighlight:e});const i=T3Gv.opt.svgOverlayLayer.GetElementListWithId(t),n=i.length;for(let s=0;s<n;++s)T3Gv.opt.svgOverlayLayer.RemoveElement(i[s]);if(e&&-1!==T3Gv.opt.curHiliteShape){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.curHiliteShape,!1);t&&(t.SetRuntimeEffects(!1),t.ClearCursors())}LogUtil.Debug("= U.SvgUtil: ClearOverlayElementsByID - Output: Completed")}static RenderLastSVGObject(t){LogUtil.Debug("= U.SvgUtil: RenderLastSVGObject shouldRenderSelectionStates",t),T3Gv.opt.fromOverlayLayer;const e=LayerUtil.ActiveLayerZList(),i=e[e.length-1];SvgUtil.AddSVGObject(void 0,i,!1,t),t&&SvgUtil.RenderAllSVGSelectionStates()}static RenderDirtySVGObjectsNoSetMouse(){this.RenderDirtySVGObjectsCommon(!1)}}class LayerUtil{static ActiveVisibleZList(){LogUtil.Debug("U.LayerUtil ActiveVisibleZList: input");const t=T3Gv.opt.layersManagerBlockId,e=ObjectUtil$1.GetObjectPtr(t,!1),i=e.layers,n=e.nlayers,s=e.activelayer;let a=[];for(let o=n-1;o>=0;o--){const t=i[o];(o===s||t.flags&NvConstant.LayerFlags.Visible&&t.flags&NvConstant.LayerFlags.Active)&&(a=a.concat(t.zList))}return LogUtil.Debug("U.LayerUtil ActiveVisibleZList: output",a),a}static ShowOverlayLayer(){LogUtil.Debug("O.Opt ShowOverlayLayer: input"),T3Gv.opt.svgOverlayLayer.SetVisible(!0),LogUtil.Debug("O.Opt ShowOverlayLayer: output")}static VisibleZList(){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers,i=t.nlayers,n=t.activelayer;let s=[];for(let a=i-1;a>=0;a--){const t=e[a];(a===n||t.flags&NvConstant.LayerFlags.Visible)&&(s=s.concat(t.zList))}return LogUtil.Debug("= U.LayerUtil VisibleZList: output | visibleZList",s),s}static RemoveFromAllZLists(t){LogUtil.Debug("O.Opt RemoveFromAllZLists - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0),i=e.nlayers;for(let n=0;n<i;++n){const i=e.layers[n].zList,s=i.indexOf(t);if(-1!=s)return i.splice(s,1),void LogUtil.Debug("O.Opt RemoveFromAllZLists - Output: Removed object from layer",n)}LogUtil.Debug("O.Opt RemoveFromAllZLists - Output: Object not found in any layer")}static ClearSVGHighlightLayer(){LogUtil.Debug("O.Opt ClearSVGHighlightLayer - Input: none"),null!==T3Gv.opt.svgOverlayLayer?(T3Gv.opt.svgHighlightLayer.RemoveAll(),LogUtil.Debug("O.Opt ClearSVGHighlightLayer - Output: SVG highlight layer cleared")):LogUtil.Debug("O.Opt ClearSVGHighlightLayer - Output: svgOverlayLayer is null, no action taken")}static ClearSVGOverlayLayer(){LogUtil.Debug("O.Opt ClearSVGOverlayLayer - Input: none"),null!==T3Gv.opt.svgOverlayLayer?(T3Gv.opt.svgOverlayLayer.RemoveAll(),LogUtil.Debug("O.Opt ClearSVGOverlayLayer - Output: SVG overlay layer cleared")):LogUtil.Debug("O.Opt ClearSVGOverlayLayer - Output: svgOverlayLayer is null, no action taken")}static ClearSVGObjectLayer(){LogUtil.Debug("O.Opt ClearSVGObjectLayer - Input: none"),null!==T3Gv.opt.svgObjectLayer?(T3Gv.opt.svgObjectLayer.RemoveAll(),LogUtil.Debug("O.Opt ClearSVGObjectLayer - Output: SVG object layer cleared")):LogUtil.Debug("O.Opt ClearSVGObjectLayer - Output: svgObjectLayer is null, no action taken")}static UpdateObjectLayerIndices(t){LogUtil.Debug("O.Opt UpdateObjectLayerIndices - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.layers,n=e.nlayers;for(let s=0;s<n;s++){const e=i[s].zList;for(let i=0,n=e.length;i<n;i++){const n=ObjectUtil$1.GetObjectPtr(e[i],!1);n&&(n.Layer=s,n.GetTextures(t.TextureList))}}LogUtil.Debug("O.Opt UpdateObjectLayerIndices - Output: Completed")}static InsertObjectsIntoLayerAt(t,e){LogUtil.Debug("O.Opt InsertObjectsIntoLayerAt - Input:",{objectId:t,insertList:e});const i=this.FindLayerForShapeID(t);if(i>=0){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers;let s=n[i].zList;const a=s.indexOf(t),o=s.slice(a+1);s.splice(a+1,s.length-a-1),n[i].zList=s.concat(e,o)}LogUtil.Debug("O.Opt InsertObjectsIntoLayerAt - Output:",{objectId:t,insertList:e})}static ZListPreserveForLayer(t){LogUtil.Debug("O.Opt ZListPreserveForLayer - Input:",{layerIndex:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers[t].zList;return LogUtil.Debug("O.Opt ZListPreserveForLayer - Output:",e),e}static FindLayerForShapeID(t){LogUtil.Debug("O.Opt FindLayerForShapeID - Input:",{shapeId:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.layers,n=e.nlayers;for(let s=0;s<n;s++){if(-1!==i[s].zList.indexOf(t))return LogUtil.Debug("O.Opt FindLayerForShapeID - Output:",{result:s}),s}return LogUtil.Debug("O.Opt FindLayerForShapeID - Output:",{result:-1}),-1}static GetFrontBackLayersForSelected(){LogUtil.Debug("O.Opt GetFrontBackLayersForSelected - Input:",{});const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers,i=t.nlayers;let n=-1,s=0;const a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),o=a.length;if(0===o){const t={result:!1,frontmostname:e[0].name,frontmostindex:0,backmostname:e[i-1].name,backmostindex:i};return LogUtil.Debug("O.Opt GetFrontBackLayersForSelected - Output:",t),t}for(let l=0;l<o;l++){const t=this.FindLayerForShapeID(a[l]);(t<n||-1===n)&&(n=t),t>s&&(s=t)}const r={result:!0,frontmostname:e[n].name,frontmostindex:n,backmostname:e[s].name,backmostindex:s};return LogUtil.Debug("O.Opt GetFrontBackLayersForSelected - Output:",r),r}static FrontMostLayerZListPreserve(){LogUtil.Debug("O.Opt FrontMostLayerZListPreserve - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers[0].zList;return LogUtil.Debug("O.Opt FrontMostLayerZListPreserve - Output: Retrieved front-most layer Z-list with",t.length,"objects"),t}static HideOverlayLayer(){LogUtil.Debug("O.Opt HideOverlayLayer - Input: No parameters"),T3Gv.opt.svgOverlayLayer.SetVisible(!1),LogUtil.Debug("O.Opt HideOverlayLayer - Output: Overlay layer hidden")}static IsTopMostVisibleLayer(){LogUtil.Debug("O.Opt isTopMostVisibleLayer - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1).activelayer===this.GetTopMostVisibleLayer();return LogUtil.Debug("O.Opt isTopMostVisibleLayer - Output:",t),t}static GetTopMostVisibleLayer(){LogUtil.Debug("O.Opt getTopMostVisibleLayer - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers,i=t.nlayers;for(let n=0;n<i;++n)if(e[n].flags&NvConstant.LayerFlags.Visible)return LogUtil.Debug("O.Opt getTopMostVisibleLayer - Output:",n),n;return LogUtil.Debug("O.Opt getTopMostVisibleLayer - Output:",-1),-1}static ActiveLayerZList(){LogUtil.Debug("O.Opt ActiveLayerZList - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers[t.activelayer].zList;return LogUtil.Debug("O.Opt ActiveLayerZList - Output:",e),e}static ZListPreserve(t){LogUtil.Debug("O.Opt zListPreserve - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0),i=e.layers,n=e.activelayer;let s=i[n];if(s.flags&NvConstant.LayerFlags.NoAdd||s.flags&t){const t=i.length;for(let e=0;e<t;e++)if(0==(i[e].flags&NvConstant.LayerFlags.NoAdd)){this.MakeLayerActiveByIndex(e),this.DirtyObjectsOnLayer(n,s),this.DirtyObjectsOnLayer(e,i[e]),SvgUtil.RenderDirtySVGObjects(),s=i[e];break}}return LogUtil.Debug("O.Opt zListPreserve - Output:",s.zList),s.zList}static DirtyObjectsOnLayer(t,e){var i;const n=e.zList,s=null!=(i=null==n?void 0:n.length)?i:0;for(let a=0;a<s;++a)ObjectUtil$1.AddToDirtyList(n[a])}static MarkAllAllVisibleHigherLayerObjectsDirty(){let t,e;const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);for(t=i.activelayer-1;t>=0;t--)if(i.layers[t].flags&NvConstant.LayerFlags.Visible)for(e=0;e<i.layers[t].zList.length;e++)ObjectUtil$1.AddToDirtyList(i.layers[t].zList[e])}static ZList(){LogUtil.Debug("O.Opt ZList - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);let e=[];for(let i=t.nlayers-1;i>=0;i--)e=e.concat(t.layers[i].zList);return LogUtil.Debug("O.Opt ZList - Output: Retrieved",e.length,"objects"),e}static MakeLayerActiveByIndex(t){LogUtil.Debug("O.Opt MakeLayerActiveByIndex - Input:",{layerIndex:t}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),T3Gv.opt.CloseEdit();if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).moreflags&NvConstant.SessionMoreFlags.HideLayerTabs){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);t.moreflags=Utils2.SetFlag(t.moreflags,NvConstant.SessionMoreFlags.HideLayerTabs,!1)}const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.nlayers,n=e.layers;if(n[e.activelayer].layertype,t>=0&&t<i){ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).activelayer=t,n[t].layerType,this.AdjustSelectedListAfterLayerChange()}LogUtil.Debug("O.Opt MakeLayerActiveByIndex - Output: Layer activated")}static AdjustSelectedListAfterLayerChange(){LogUtil.Debug("O.Opt AdjustSelectedListAfterLayerChange - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0),e=SelectUtil.GetTargetSelect(),i=t.length,n=[];T3Gv.opt.CloseEdit();const s=this.ActiveVisibleZList();for(let o=0;o<i;++o){const e=t[o];-1!==s.indexOf(e)&&n.push(e)}-1===s.indexOf(e)&&SelectUtil.SetTargetSelect(-1);const a=n.length;if(i!==a){t.length=0;for(let e=0;e<a;++e)t.push(n[e])}LogUtil.Debug("O.Opt AdjustSelectedListAfterLayerChange - Output: Selection adjusted")}static AddNewLayerAtFront(t,e,i){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0);if(n.nlayers>=OptConstant.Common.MaxTotalLayers)return!1;const s=new Instance.Basic.Layer;return s.name=t,s.flags=0,e&&(s.flags|=NvConstant.LayerFlags.Visible),i&&(s.flags|=NvConstant.LayerFlags.Active),n.layers.unshift(s),n.nlayers++,!0}static RotateLayerStack(t){T3Gv.opt.CloseEdit();const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers,i=e.shift();e.push(i),this.AdjustSelectedListAfterLayerChange(),SvgUtil.RenderAllSVGObjects(),t||DrawUtil.CompleteOperation()}}class ObjectUtil{static GetObjectPtr(t,e){const i=T3Gv.stdObj.GetObject(t);if(null==i||t<0)return null;return e?T3Gv.stdObj.PreserveBlock(t).Data:i.Data}static AddToDirtyList(t,e){LogUtil.Debug("O.Opt AddToDirtyList - Input:",{objectId:t,isMoveOnly:e}),T3Gv.opt.dirtyList.indexOf(t)<0?(T3Gv.opt.dirtyList.push(t),T3Gv.opt.dirtyListMoveOnly[t]=!!e):e||(T3Gv.opt.dirtyListMoveOnly[t]=!1),LogUtil.Debug("O.Opt AddToDirtyList - Output: Dirty list updated")}static DeleteObjects(t,e){let i,n,s,a,o,r,l,h,c,u;if(LogUtil.Debug("O.Opt DeleteObjects - Input:",{objectIds:t,forceDelete:e}),this.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),null!=t)for(n=t.length?t.length:0,i=n-1;i>=0;i--){s=t[i];const n=T3Gv.stdObj.GetObject(s);if(n){if(l=n.Data,l.extraflags&OptConstant.ExtraFlags.NoDelete&&!e)continue;LayerUtil.RemoveFromAllZLists(s),SelectUtil.RemoveFromSelectedList(s),OptCMUtil.SetLinkFlag(s,DSConstant.LinkFlags.DeleteTarget),h=l.hooks.length;for(let t=0;t<h;t++)c=l.hooks[t].objid,c>0&&(u=this.GetObjectPtr(c,!0),u&&u.ChangeTarget(c,s,l.hooks[t].cellid,l.hooks[t].updhook,l.hooks[t].connect,!1));l.DeleteObject(),n.Delete()}a=T3Gv.opt.svgObjectLayer.GetElementById(s),a&&T3Gv.opt.svgObjectLayer.RemoveElement(a),o=OptConstant.Common.Action+s,r=T3Gv.opt.svgOverlayLayer.GetElementById(o),null!=r&&T3Gv.opt.svgOverlayLayer.RemoveElement(r)}LogUtil.Debug("O.Opt DeleteObjects - Output: Objects deleted:",n)}static PreserveUndoState(t){if(LogUtil.Debug("O.Opt PreserveUndoState - Input:",{shouldKeepStateOpen:t}),!T3Gv.opt.noUndo){if(null===T3Gv.state)throw new Error("state is null");if(T3Gv.state.currentStateId>=0){const e=Utils1.IsStateOpen();T3Gv.state.PreserveState(),e&&T3Gv.state.AddToHistoryState(),!t&&e&&UIUtil.SetDocDirtyState(!0)}}LogUtil.Debug("O.Opt PreserveUndoState - Output: State preserved")}static ClearDirtyList(){LogUtil.Debug("O.Opt ClearDirtyList - Input: No parameters"),T3Gv.opt.dirtyList=[],T3Gv.opt.dirtyListMoveOnly=[],T3Gv.opt.dirtyListReOrder=!1,LogUtil.Debug("O.Opt ClearDirtyList - Output: Dirty list cleared")}static ClearFutureUndoStates(){T3Gv.state.ClearFutureUndoStates()}static ClearT3GvState(){DataOpt.InitStateAndStore()}static ClearUndoRedo(){T3Gv.state.ResetUndoStates()}}var ObjectUtil$1=ObjectUtil;const _EvtUtil=class{static initialize(){if(this.isInitialized)LogUtil.Warn("EvtUtil already initialized");else try{this.cleanup(),this.setupEventHandlers(),this.isInitialized=!0,LogUtil.Info("EvtUtil initialized successfully")}catch(t){LogUtil.Error("Failed to initialize EvtUtil:",t)}}static cleanup(){try{this.eventHandlers.forEach(((t,e)=>{document.removeEventListener(e,t)})),this.eventHandlers.clear(),$$1(document).off(".t3000-evt"),$$1("#svg-area").off(".t3000-evt"),this.hammerInstances.forEach(((t,e)=>{t&&"function"==typeof t.destroy&&t.destroy()})),this.hammerInstances.clear(),this.isInitialized=!1,LogUtil.Info("EvtUtil cleanup completed")}catch(t){LogUtil.Error("Error during EvtUtil cleanup:",t)}}static setupEventHandlers(){const t=this.Evt_MouseMove.bind(this),e=this.Evt_WorkAreaMouseWheel.bind(this);this.eventHandlers.set("mousemove",t),this.eventHandlers.set("wheel",e),document.addEventListener("mousemove",t),document.addEventListener("wheel",e,{passive:!1}),this.setupHammerHandlers()}static setupHammerHandlers(){if(document.getElementById("svg-area"))try{LogUtil.Info("Hammer.js setup placeholder - implement when library is available")}catch(t){LogUtil.Error("Failed to setup Hammer handlers:",t)}else LogUtil.Warn("svg-area element not found, skipping Hammer setup")}static Evt_MouseMove(t){var e;try{const i=null==(e=T3Gv.opt)?void 0:e.svgDoc;if(!i)return;const n=i.docInfo;if(!n)return void LogUtil.Warn("SVG document info not available");if("number"!=typeof t.clientX||"number"!=typeof t.clientY)return void LogUtil.Error("Invalid mouse event coordinates");if(t.clientX>=n.dispX&&t.clientY>=n.dispY&&t.clientX<n.dispX+n.dispWidth&&t.clientY<n.dispY+n.dispHeight){const e=i.ConvertWindowToDocCoords(t.clientX,t.clientY);e&&(UIUtil.ShowXY(!0),UIUtil.UpdateDisplayCoordinates(null,e,null,null))}else UIUtil.ShowXY(!1)}catch(i){LogUtil.Error("Error in Evt_MouseMove:",i)}}static Evt_WorkAreaHammerClick(t){LogUtil.Debug("E.Evt WorkAreaHammerClick input:",t),Utils2.StopPropagationAndDefaults(t);const e=MouseUtil.IsRightClick(t);return e||(SelectUtil.ClearSelectionClick(),UIUtil.ShowContextMenu(!1,"WorkArea","Default"),UIUtil.ShowObjectConfig(!1)),T3Constant.DocContext.CanTypeInWorkArea=!0,e&&(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.hitPoint=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),SelectUtil.ClearSelectionClick(),UIUtil.ShowContextMenu(!0,"WorkArea","Default")),LogUtil.Debug("E.Evt WorkAreaHammerClick output:",e?"right-click menu shown":"selection cleared","rClickParam:",T3Gv.opt.rClickParam),!1}static Evt_WorkAreaMouseWheel(t){LogUtil.Debug("E.Evt WorkAreaMouseWheel input:",t);let e=T3Gv.docUtil;if(t.ctrlKey){const i=t.clientX,n=t.clientY,s=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(i,n);t.deltaY>0?e.ZoomInAndOut(!1,!0):t.deltaY<0&&e.ZoomInAndOut(!0,!0),Utils2.StopPropagationAndDefaults(t);const a=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(s.x,s.y),o=i-a.x,r=n-a.y,l=$$1("#svg-area"),h=l.scrollLeft(),c=l.scrollTop();T3Gv.docUtil.SetScroll(h-o,c-r),LogUtil.Debug("E.Evt WorkAreaMouseWheel output: zoom adjusted, focus maintained")}}static Evt_WorkAreaHammerDragStart(t){LogUtil.Debug("E.Evt WorkAreaHammerDragStart input:",t);const e=$$1("#svg-area"),i=e.offset(),n=t.gesture.center.clientX-i.left,s=t.gesture.center.clientY-i.top,a=e[0].clientWidth,o=e[0].clientHeight;if(!(n>=a||s>=o))return Utils2.StopPropagationAndDefaults(t),MouseUtil.IsRightClick(t)?(t.preventDefault(),t.stopPropagation(),UIUtil.ShowContextMenu(!1,"WorkArea","Default"),LogUtil.Debug("E.Evt WorkAreaHammerDragStart output: right-click handled"),!1):(SelectUtil.StartOptSltSelect(t),LogUtil.Debug("E.Evt WorkAreaHammerDragStart output: opt slt selection started"),!1)}static Evt_OptSltDrag(t){LogUtil.Debug("E.Evt OptSltDrag input:",t),Utils2.StopPropagationAndDefaults(t);try{if(!DrawUtil.AutoScrollCommon(t,!1,"OptSltSelectDoAutoScroll"))return;const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("E.Evt OptSltDrag processing: coordinates",e),SelectUtil.OptSltSelectMoveCommon(e.x,e.y),LogUtil.Debug("E.Evt OptSltDrag output: opt slt updated")}catch(e){throw SelectUtil.OptSltSelectExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt OptSltDrag error:",e),e}}static Evt_OptSltDragEnd(t){LogUtil.Debug("E.Evt OptSltDragEnd input:",t),Utils2.StopPropagationAndDefaults(t);try{SelectUtil.UnbindOptSltHammerEvents(),DrawUtil.ResetAutoScrollTimer();const e=T3Gv.opt.optSltFrame;SelectUtil.SelectAllInRect(e,t.gesture.srcEvent.shiftKey),T3Gv.opt.svgOverlayLayer.RemoveElement(T3Gv.opt.optSlt),LogUtil.Debug("E.Evt OptSltDragEnd processing: resetting opt slt state"),T3Gv.opt.optSlt=null,T3Gv.opt.optSltStartX=0,T3Gv.opt.optSltStartY=0,T3Gv.opt.optSltFrame={x:0,y:0,width:0,height:0},LogUtil.Debug("E.Evt OptSltDragEnd output: selection completed")}catch(e){throw SelectUtil.OptSltSelectExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt OptSltDragEnd error:",e),e}}static Evt_WorkAreaHammerDrawStart(t){LogUtil.Debug("E.Evt WorkAreaHammerDrawStart input:",t),t.stopPropagation(),t.preventDefault();return MouseUtil.IsRightClick(t)?LogUtil.Debug("E.Evt WorkAreaHammerDrawStart output: right-click ignored"):(DrawUtil.StartNewObjectDraw(t),LogUtil.Debug("E.Evt WorkAreaHammerDrawStart output: drawing started")),!1}static Evt_DrawTrackHandlerFactory(t){return LogUtil.Debug("E.Evt DrawTrackHandlerFactory input:",t),function(e){LogUtil.Debug("E.Evt DrawTrack input:",e);try{t.LMDrawTrack(e),LogUtil.Debug("E.Evt DrawTrack output: drawing tracked")}catch(i){throw t.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt DrawTrack error:",i),i}}}static Evt_DrawReleaseHandlerFactory(t){return LogUtil.Debug("E.Evt DrawReleaseHandlerFactory input:",t),function(e){LogUtil.Debug("E.Evt DrawRelease input:",e);try{t.LMDrawRelease(e),LogUtil.Debug("E.Evt DrawRelease output: drawing completed")}catch(i){throw OptCMUtil.CancelOperation(),t.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt DrawRelease error:",i),i}}}static Evt_ShapeTapFactory(t){let e;return LogUtil.Debug("= U.EvtUtil: ShapeTapFactory input:",t),function(i){LogUtil.Debug("= U.EvtUtil: ShapeTap input:",i),Utils2.StopPropagationAndDefaults(i);const n=MouseUtil.IsRightClick(i);if(T3Gv.docUtil.IsReadOnly()){if(n)return t.RightClick(i),LogUtil.Debug("= U.EvtUtil: ShapeTap output: right-click menu in read-only mode"),!1}else if(n)return t.RightClick(i),LogUtil.Debug("= U.EvtUtil: ShapeTap output: right-click menu shown"),!1;switch(T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:return TextUtil.CheckTextHyperlinkHit(t,i)||UIUtil.GetUIAdaptation(i)&&!T3Gv.docUtil.IsReadOnly()&&(e=T3Gv.opt.svgObjectLayer.GetElementById(t.tag),t.SetRolloverActions(T3Gv.opt.svgDoc,e)),UIUtil.ShowObjectConfig(!0),QuasarUtil.SetAppStateV2SelectIndex(null),LogUtil.Debug("= U.EvtUtil: ShapeTap output: normal tap processed"),!1;case OptConstant.OptTypes.Draw:case OptConstant.OptTypes.DrawPolyline:return LogUtil.Debug("= U.EvtUtil: ShapeTap output: ignored in draw mode"),!1;case OptConstant.OptTypes.StampTextOnTap:return T3Gv.opt.stampSticky||DrawUtil.CancelObjectStampTextOnTap(!0),t.AllowTextEdit()&&(e=T3Gv.opt.svgObjectLayer.GetElementById(t.tag),TextUtil.ActivateTextEdit(e.svgObj.SDGObj,i,!1)),LogUtil.Debug("= U.EvtUtil: ShapeTap output: text edit activated in stamp mode"),!1}}}static Evt_ShapeDragStartFactory(t){return LogUtil.Debug("E.Evt ShapeDragStartFactory input:",t),function(t){if(LogUtil.Debug("E.Evt ShapeDragStart input:",t),T3Gv.opt.crtOpt===OptConstant.OptTypes.Draw)return LogUtil.Debug("E.Evt ShapeDragStart output: prevented in draw mode"),!1;if(T3Gv.opt.crtOpt===OptConstant.OptTypes.Stamp)return t.stopPropagation(),t.gesture.stopPropagation(),LogUtil.Debug("E.Evt ShapeDragStart output: prevented in stamp mode"),!1;if(MouseUtil.IsRightClick(t))return t.preventDefault(),t.stopPropagation(),t.gesture.preventDefault(),t.gesture.stopPropagation(),LogUtil.Debug("E.Evt ShapeDragStart output: right-click prevented"),!1;switch(T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:case OptConstant.OptTypes.FormatPainter:return Utils2.StopPropagationAndDefaults(t),LMEvtUtil.LMMoveClick(t),LogUtil.Debug("E.Evt ShapeDragStart output: move operation started"),!1;case OptConstant.OptTypes.Draw:return LogUtil.Debug("E.Evt ShapeDragStart output: forwarded to draw handler"),_EvtUtil.Evt_WorkAreaHammerDrawStart(t);case OptConstant.OptTypes.DrawPolyline:case OptConstant.OptTypes.StampTextOnTap:return LogUtil.Debug("E.Evt ShapeDragStart output: prevented in special mode"),!1}}}static Evt_ShapeHoldFactory(t){return LogUtil.Debug("E.Evt ShapeHoldFactory input:",t),function(e){switch(LogUtil.Debug("E.Evt ShapeHold input:",e),T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:e.gesture.stopDetect(),Utils2.StopPropagationAndDefaults(e),t.RightClick(e);try{LMEvtUtil.LMMoveRelease(e)}catch(i){throw LMEvtUtil.LMMoveExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt ShapeHold error:",i),i}return LogUtil.Debug("E.Evt ShapeHold output: context menu displayed"),!1;case OptConstant.OptTypes.Draw:case OptConstant.OptTypes.DrawPolyline:case OptConstant.OptTypes.StampTextOnTap:return LogUtil.Debug("E.Evt ShapeHold output: prevented in special mode"),!1}}}static Evt_ShapeDoubleTapFactory(t){return LogUtil.Debug("E.Evt ShapeDoubleTapFactory input:",t),function(e){LogUtil.Debug("E.Evt ShapeDoubleTap input:",e);const i=t.BlockID,n=ObjectUtil$1.GetObjectPtr(i,!1);if(!(n&&n instanceof Instance.Shape.BaseDrawObject))return LogUtil.Debug("E.Evt ShapeDoubleTap output: invalid object"),!1;switch(T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:if(T3Gv.opt.bInNoteEdit)return LogUtil.Debug("E.Evt ShapeDoubleTap output: prevented during note edit"),!1;if(t.GetGraph(!1),t instanceof Instance.Shape.ShapeContainer)return t.DoubleClick(e),LogUtil.Debug("E.Evt ShapeDoubleTap output: container double-click handled"),!1;const i=T3Gv.opt.svgObjectLayer.GetElementById(t.tag);return TextUtil.ActivateTextEdit(i.svgObj.SDGObj,e),LogUtil.Debug("E.Evt ShapeDoubleTap output: text editor activated"),!1;case OptConstant.OptTypes.Draw:case OptConstant.OptTypes.DrawPolyline:case OptConstant.OptTypes.StampTextOnTap:return LogUtil.Debug("E.Evt ShapeDoubleTap output: prevented in special mode"),!1}}}static Evt_ShapeDrag(t){LogUtil.Debug("E.Evt ShapeDrag input:",t),Utils2.StopPropagationAndDefaults(t);try{let e=DrawUtil.CheckDragIsOverCustomLibrary(t);LMEvtUtil.LMMoveTrack(t,e),LogUtil.Debug("E.Evt ShapeDrag output: shape position updated")}catch(e){throw LMEvtUtil.LMMoveExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt ShapeDrag error:",e),e}}static Evt_ShapeDragEnd(t){LogUtil.Debug("E.Evt ShapeDragEnd input:",t),Utils2.StopPropagationAndDefaults(t);try{LMEvtUtil.LMMoveRelease(t),LogUtil.Debug("E.Evt ShapeDragEnd output: shape movement completed")}catch(e){throw LMEvtUtil.LMMoveExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt ShapeDragEnd error:",e),e}}static Evt_ActionTrackHandlerFactory(t){return LogUtil.Debug("E.Evt ActionTrackHandlerFactory input:",t),function(e){return LogUtil.Debug("E.Evt ActionTrack input:",e),t.LMActionTrack(e),LogUtil.Debug("E.Evt ActionTrack output: action tracked"),!1}}static Evt_ActionReleaseHandlerFactory(t){return LogUtil.Debug("E.Evt ActionReleaseHandlerFactory input:",t),function(e){return LogUtil.Debug("E.Evt ActionRelease input:",e),t.LMActionRelease(e),LogUtil.Debug("E.Evt ActionRelease output: action completed"),!1}}static Evt_StampObjectDrag(t){return LogUtil.Debug("E.Evt StampObjectDrag input:",t),DrawUtil.StampObjectMove(t),LogUtil.Debug("E.Evt StampObjectDrag output: stamp object position updated"),!0}static Evt_MouseStampObjectMove(t){LogUtil.Debug("E.Evt MouseStampObjectMove input:",t),DrawUtil.MouseStampObjectMove(t),LogUtil.Debug("E.Evt MouseStampObjectMove output: stamp object position updated")}static Evt_MouseStampObjectDoneFactory(t){return LogUtil.Debug("E.Evt MouseStampObjectDoneFactory input:",t),function(e){return LogUtil.Debug("E.Evt MouseStampObjectDone input:",e),DrawUtil.MouseStampObjectDone(e,t),LogUtil.Debug("E.Evt MouseStampObjectDone output: object placement completed"),!0}}static Evt_StampObjectDragEndFactory(t){return LogUtil.Debug("E.Evt StampObjectDragEndFactory input:",t),function(e){return LogUtil.Debug("E.Evt StampObjectDragEnd input:",e),DrawUtil.DragDropObjectDone(e,t),LogUtil.Debug("E.Evt StampObjectDragEnd output: object placement completed"),!0}}static Evt_ActionTriggerTap(t){return LogUtil.Debug("E.Evt ActionTriggerTap input:",t),t.preventDefault(),t.gesture.stopPropagation(),t.stopPropagation(),LogUtil.Debug("E.Evt ActionTriggerTap output: propagation stopped"),!1}static Evt_WorkAreaHammerPinchIn(t){if(LogUtil.Debug("E.Evt WorkAreaHammerPinchIn input:",t),t.gesture.scale>.666)return!1;Utils2.StopPropagationAndDefaults(t),t.gesture.stopDetect(),SelectUtil.OptSltSelectCancel(),T3Gv.opt.moveList&&T3Gv.opt.moveList.length&&LMEvtUtil.LMMoveRelease(t),T3Gv.docUtil.svgDoc.GetWorkArea();const e=t.gesture.center.clientX,i=t.gesture.center.clientY,n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e,i);let s=Math.round(100*T3Gv.docUtil.GetZoomFactor());if(s>50){s=Math.max(50,s-50),T3Gv.docUtil.SetZoomFactor(s/100);const t=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(n.x,n.y),a=e-t.x,o=i-t.y,r=$$1("#svgarea"),l=r.scrollLeft(),h=r.scrollTop();T3Gv.docUtil.SetScroll(l-a,h-o)}return LogUtil.Debug("E.Evt WorkAreaHammerPinchIn output: zoom out completed",{newZoomFactor:s/100}),!1}static Evt_WorkAreaHammerPinchOut(t){if(LogUtil.Debug("E.Evt WorkAreaHammerPinchOut input:",t),t.gesture.scale<1.333)return!1;Utils2.StopPropagationAndDefaults(t),t.gesture.stopDetect(),T3Gv.opt.OptSltSelectCancel(),T3Gv.opt.moveList&&T3Gv.opt.moveList.length&&LMEvtUtil.LMMoveRelease(t),T3Gv.docUtil.svgDoc.GetWorkArea();const e=t.gesture.center.clientX,i=t.gesture.center.clientY,n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e,i);let s=Math.round(100*T3Gv.docUtil.GetZoomFactor());if(s<400){s=Math.min(400,s+50),T3Gv.docUtil.SetZoomFactor(s/100);const t=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(n.x,n.y),a=e-t.x,o=i-t.y,r=$$1("#svgarea"),l=r.scrollLeft(),h=r.scrollTop();T3Gv.docUtil.SetScroll(l-a,h-o)}return LogUtil.Debug("E.Evt WorkAreaHammerPinchOut output: zoom in completed",{newZoomFactor:s/100}),!1}static Evt_WorkAreaHammerPinchEnd(t){LogUtil.Debug("E.Evt WorkAreaHammerPinchEnd input:",t),LogUtil.Debug("E.Evt WorkAreaHammerPinchEnd output: touch pan state reset")}static Evt_DimensionTextKeyboardLifter(t,e){LogUtil.Debug("E.Evt DimensionTextKeyboardLifter input:",{element:t,keyboardEvent:e}),T3Gv.opt.VirtualKeyboardLifter(t,e),LogUtil.Debug("E.Evt DimensionTextKeyboardLifter output: UI adjusted for virtual keyboard")}static Evt_DimensionTextDoubleTapFactory(t,e){return LogUtil.Debug("E.Evt DimensionTextDoubleTapFactory input:",{shape:t,textId:e}),function(i){let n,s;if(LogUtil.Debug("E.Evt DimensionTextDoubleTap input:",i),T3Gv.opt.crtOpt==OptConstant.OptTypes.None){const a=T3Gv.opt.svgObjectLayer.GetElementById(t.BlockID);if(null!=a){s=a.ElementCount();for(let t=0;t<s;++t)if(n=a.GetElementByIndex(t),n.GetID()==OptConstant.SVGElementClass.DimText&&n.GetUserData()==e)return T3Gv.opt.bInDimensionEdit=!0,SelectUtil.UpdateSelectionAttributes(null),i.gesture?TextUtil.TextRegisterEvents(n.svgObj.SDGObj,i.gesture.srcEvent):TextUtil.TextRegisterEvents(n.svgObj.SDGObj,i),i.stopPropagation(),LogUtil.Debug("E.Evt DimensionTextDoubleTap output: dimension text editing activated"),!1}return LogUtil.Debug("E.Evt DimensionTextDoubleTap output: dimension text element not found"),!1}return LogUtil.Debug("E.Evt DimensionTextDoubleTap output: prevented in modal operation"),!1}}static Evt_DimensionTextTapFactory(t,e,i){return LogUtil.Debug("E.Evt DimensionTextTapFactory input:",{shape:t,textId:e,preventPropagation:i}),function(n){if(LogUtil.Debug("E.Evt DimensionTextTap input:",n),T3Gv.opt.crtOpt==OptConstant.OptTypes.None){const s=T3Gv.opt.svgObjectLayer.GetElementById(t.BlockID);if(null!=s)for(let t=0;t<s.ElementCount();++t){const a=s.GetElementByIndex(t);if(a.GetID()==OptConstant.SVGElementClass.DimText&&a.GetUserData()==e)return T3Gv.opt.bInDimensionEdit&&T3Gv.opt.svgDoc.GetActiveEdit()==a?(i&&n.stopPropagation(),LogUtil.Debug("E.Evt DimensionTextTap output: already editing this dimension"),!1):(T3Gv.opt.CloseEdit(!1,!0),T3Gv.opt.bInDimensionEdit=!0,SelectUtil.UpdateSelectionAttributes(null),n.gesture?TextUtil.TextRegisterEvents(a,n.gesture.srcEvent):TextUtil.TextRegisterEvents(a,n),n.stopPropagation(),LogUtil.Debug("E.Evt DimensionTextTap output: dimension text editing activated"),!1)}return LogUtil.Debug("E.Evt DimensionTextTap output: dimension text element not found"),!1}return LogUtil.Debug("E.Evt DimensionTextTap output: prevented in modal operation"),!1}}static Evt_PolyLineDrawExtendHandlerFactory(t){return LogUtil.Debug("E.Evt PolyLineDrawExtendHandlerFactory input:",t),function(e){LogUtil.Debug("E.Evt PolyLineDrawExtend input:",e);try{t.LMDrawExtend(e),LogUtil.Debug("E.Evt PolyLineDrawExtend output: polyline extended")}catch(i){OptCMUtil.CancelOperation(),t.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt PolyLineDrawExtend error:",i)}}}static Evt_PolyLineDrawDragStart(t){return LogUtil.Debug("E.Evt PolyLineDrawDragStart input:",t),LogUtil.Debug("E.Evt PolyLineDrawDragStart output: drag prevented during polyline drawing"),!1}};let EvtUtil=_EvtUtil;__publicField(EvtUtil,"eventHandlers",new Map),__publicField(EvtUtil,"hammerInstances",new Map),__publicField(EvtUtil,"isInitialized",!1),__publicField(EvtUtil,"Evt_DrawExtendHandler",null);class Rect extends Element$1{constructor(){super(),__publicField(this,"shapeElem"),this.svgObj=null,this.shapeElem=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.shapeElem=new T3Svg.Rect,this.svgObj.add(this.shapeElem),this.InitElement(t,e),this.svgObj}SetSize(t,e){const i=Utils1.RoundCoord(t),n=Utils1.RoundCoord(e);this.geometryBBox.width=i,this.geometryBBox.height=n,this.svgObj.size(i,n),this.shapeElem.size(i,n),this.UpdateTransform(),this.RefreshPaint()}}class Container extends Element$1{constructor(){super()}AddElement(t,e){void 0!==e&&this.svgObj instanceof T3Svg.Doc&&e++,this.svgObj.add(t.svgObj,e),t.svgObj.parent===this.svgObj&&(t.parent=this,t.RefreshPaint(!0))}RemoveElement(t){t&&t.svgObj.parent===this.svgObj&&(this.svgObj.remove(t.svgObj),t.parent=null)}RemoveAll(){let t=this.svgObj instanceof T3Svg.Doc?1:0,e=this.svgObj.children().length;for(let i=t;i<e;i++)this.svgObj.removeAt(t)}RemoveElementByInternalId(t){const e=this.svgObj.children();for(let i=this.svgObj instanceof T3Svg.Doc?1:0;i<e.length;i++){const n=e[i].SDGObj;if(n&&n.internalID===t){this.svgObj.removeAt(i);break}}}ElementCount(){let t=this.svgObj.children().length;return this.svgObj instanceof T3Svg.Doc&&t--,t}GetElementByIndex(t){const e=this.svgObj.children();return this.svgObj instanceof T3Svg.Doc&&t++,t<0||t>=e.length?null:e[t].SDGObj}GetElementById(t,e){const i=this.svgObj.children();for(let n=this.svgObj instanceof T3Svg.Doc?1:0;n<i.length;n++){const s=i[n].SDGObj;if(s&&s.ID===t){if(e&&s.userData!==e)continue;return s}}return null}GetElementByIdInGroup(t){function e(i){const n=i.svgObj.children();let s=null;for(let a=0;a<n.length;a++){const i=n[a].SDGObj;if(i){if(i.ID===t){s=i;break}if(s=e(i),s)break}}return s}const i=this.svgObj.children();for(let n=0;n<i.length;n++){const s=i[n].SDGObj;if(s){if(s.ID===t)return s;const i=e(s);if(i)return i}}return null}GetElementListWithId(t){const e=this.svgObj.children(),i=[];for(let n=this.svgObj instanceof T3Svg.Doc?1:0;n<e.length;n++){const s=e[n].SDGObj;s&&s.ID===t&&i.push(s)}return i}GetElementByInternalId(t){const e=this.svgObj.children();for(let i=this.svgObj instanceof T3Svg.Doc?1:0;i<e.length;i++){const n=e[i].SDGObj;if(n&&n.internalID===t)return n}return null}FindElement(t){const e=this.svgObj.children();for(let i=0;i<e.length;i++){const n=e[i].SDGObj;if(n){if(n.ID===t)return n;if(n instanceof Container){const e=n.FindElement(t);if(e)return e}}}return null}FindElementByDOMElement(t){const e=this.svgObj.children();for(let i=this.svgObj instanceof T3Svg.Doc?1:0;i<e.length;i++){const n=e[i].SDGObj;if(n){if(n.DOMElement()===t)return n;if(n instanceof Container){const e=n.FindElementByDOMElement(t);if(e)return e}}}return null}GetElementIndex(t){let e=this.svgObj.children().indexOf(t.svgObj);return e>0&&this.svgObj instanceof T3Svg.Doc&&e--,e}MoveElementForward(t){this.GetElementIndex(t)<this.ElementCount()-1&&t.svgObj.forward()}MoveElementBackward(t){this.GetElementIndex(t)>0&&t.svgObj.backward()}MoveElementToFront(t){t.svgObj.front()}MoveElementToBack(t){t.svgObj.back(),t.svgObj.level()}}"undefined"!=typeof window&&("SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,n,s,a,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=n,this._y1=s,this._x2=a,this._y2=o},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,n,s,a,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=n,this._y1=s,this._x2=a,this._y2=o},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=n,this._y1=s},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=n,this._y1=s},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,n,s,a,o,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=n,this._r2=s,this._angle=a,this._largeArcFlag=o,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,n,s,a,o,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=n,this._r2=s,this._angle=a,this._largeArcFlag=o,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=n,this._y2=s},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=n,this._y2=s},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,n,s,a){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,n,s,a)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,n,s,a){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,n,s,a)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,n,s,a,o){return new window.SVGPathSegArcAbs(void 0,t,e,i,n,s,a,o)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,n,s,a,o){return new window.SVGPathSegArcRel(void 0,t,e,i,n,s,a,o)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));var i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(this._pathElement){var e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){var e="",i=!0;return t.forEach((function(t){i?(i=!1,e+=t._asPathString()):e+=" "+t._asPathString()})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];var e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};var n=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};n.prototype._isCurrentSpace=function(){var t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},n.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},n.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},n.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},n.prototype.peekSegmentType=function(){var t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},n.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},n.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},n.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},n.prototype._parseNumber=function(){var t=0,e=0,i=1,n=0,s=1,a=1,o=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,s=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var r=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r)for(var l=this._currentIndex-1,h=1;l>=r;)e+=h*(this._string.charAt(l--)-"0"),h*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,n+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=o&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,a=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var c=e+n;if(c*=s,t&&(c*=Math.pow(10,a*t)),o!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),c}},n.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}},n.prototype.parseSegment=function(){var t=this._string[this._currentIndex],i=this._pathSegTypeFromChar(t);if(i==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((i=this._nextCommandHelper(t,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=i,i){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}};var s=new i,a=new n(t);if(!a.initialCommandIsMoveTo())return[];for(;a.hasMoreData();){var o=a.parseSegment();if(!o)return[];s.appendSegment(o)}return s.pathSegList}));class Creator{constructor(t){__publicField(this,"element"),__publicField(this,"pathSegs"),__publicField(this,"curPosX"),__publicField(this,"curPosY"),this.element=t,this.pathSegs=[],this.curPosX=0,this.curPosY=0}BeginPath(){this.pathSegs=[],this.curPosX=0,this.curPosY=0}MoveTo(t,e,i){const n=Utils1.RoundCoord(t),s=Utils1.RoundCoord(e),a=`${i?"m":"M"}${n},${s}`;this.pathSegs.push(a),i?(this.curPosX+=n,this.curPosY+=s):(this.curPosX=n,this.curPosY=s)}LineTo(t,e,i){const n=i?"l":"L",s=Utils1.RoundCoord(t),a=Utils1.RoundCoord(e),o=`${n}${s},${a}`;this.pathSegs.push(o),i?(this.curPosX+=s,this.curPosY+=a):(this.curPosX=s,this.curPosY=a)}CurveTo(t,e,i,n,s){const a=Utils1.RoundCoord(t),o=Utils1.RoundCoord(e),r=Utils1.RoundCoord(i),l=Utils1.RoundCoord(n),h=`${s?"q":"Q"}${a},${o} ${r},${l}`;this.pathSegs.push(h),s?(this.curPosX+=r,this.curPosY+=l):(this.curPosX=r,this.curPosY=l)}SimpleArcTo(t,e,i,n){let s=t,a=e;n&&(s+=this.curPosX,a+=this.curPosY);const o=Math.abs(s-this.curPosX),r=Math.abs(a-this.curPosY);o&&r?this.ArcTo(t,e,o,r,0,i,!1,n):this.LineTo(t,e,n)}ArcTo(t,e,i,n,s,a,o,r){const l=Utils1.RoundCoord(t),h=Utils1.RoundCoord(e),c=`${r?"a":"A"}${Utils1.RoundCoord(i)},${Utils1.RoundCoord(n)} ${s} ${o?1:0},${a?1:0} ${l},${h}`;this.pathSegs.push(c),r?(this.curPosX+=l,this.curPosY+=h):(this.curPosX=l,this.curPosY=h)}ClosePath(){this.pathSegs.push("z")}ToString(){return this.pathSegs.join(" ")}Apply(){const t=this.ToString();this.element&&this.element instanceof Path&&this.element.SetPath(t)}}class Path extends Container{constructor(){super(),__publicField(this,"pathCreator"),__publicField(this,"pathElem"),__publicField(this,"arrowAreaElem"),__publicField(this,"arrowElems"),__publicField(this,"sArrowRec"),__publicField(this,"eArrowRec"),__publicField(this,"origPathData"),__publicField(this,"sArrowSize"),__publicField(this,"eArrowSize"),__publicField(this,"sArrowDisp"),__publicField(this,"eArrowDisp"),__publicField(this,"sArrowMetrics"),__publicField(this,"eArrowMetrics"),__publicField(this,"arrowheadBounds"),this.pathCreator=null,this.svgObj=null,this.pathElem=null,this.arrowAreaElem=null,this.arrowElems=[],this.sArrowRec=null,this.eArrowRec=null,this.origPathData=null,this.strokeWidth=0,this.sArrowSize=0,this.eArrowSize=0,this.sArrowDisp=!1,this.eArrowDisp=!1,this.sArrowMetrics={},this.eArrowMetrics={},this.arrowheadBounds=[]}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.pathElem=new T3Svg.Path,this.svgObj.add(this.pathElem),this.arrowAreaElem=new T3Svg.Container(T3Svg.create("g")),this.svgObj.add(this.arrowAreaElem),this.InitElement(t,e),this.svgObj}SetArrowheads(t,e,i,n,s,a){this.IsClosed()||(this.sArrowRec=t,this.eArrowRec=i,this.sArrowSize=e,this.eArrowSize=n,this.sArrowDisp=s||!1,this.eArrowDisp=a||!1,this.UpdateArrowheads())}SetStrokeWidth(t){isNaN(t)&&"string"==typeof t&&(t=Instance.Basic.Symbol.ParsePlaceholder(t,BConstant.Placeholder.LineThick)),t=Utils1.RoundCoord(t),this.pathElem.attr("stroke-width",t),this.strokeWidth=Number(t),this.pathElem.attr("stroke-dasharray",this.GetStrokePatternForWidth()),this.UpdateArrowheads()}SetStrokeColor(t){this.svgObj.attr("stroke",t),this.IsClosed()||(this.svgObj.attr("fill",t),this.pathElem.attr("fill","none")),this.ClearColorData(!1)}UpdatePattern(t,e){let i;Instance.Basic.Element.prototype.UpdatePattern.call(this,t,e),e||(i=this.svgObj.attr("stroke"),this.IsClosed()||(this.svgObj.attr("fill",i),this.pathElem.attr("fill","none")))}UpdateGradient(t,e){let i;Instance.Basic.Element.prototype.UpdateGradient.call(this,t,e),e||(i=this.svgObj.attr("stroke"),this.IsClosed()||(this.svgObj.attr("fill",i),this.pathElem.attr("fill","none")))}SetStrokePattern(t){this.strokeDashArray=t,this.pathElem.attr("stroke-dasharray",this.GetStrokePatternForWidth())}SetSize(t,e){}GetArrowheadBounds(){return[...this.arrowheadBounds]}UpdateArrowheads(){const t=this.sArrowRec,e=this.eArrowRec,i=this.sArrowSize,n=this.eArrowSize;let s=null,a=null;for(;this.arrowAreaElem.children().length;)this.arrowAreaElem.removeAt(0);if(this.arrowElems.length=0,this.arrowheadBounds=[],!this.IsClosed()&&this.origPathData){this.pathElem.plot(this.origPathData);const o=t||this.EmptyArrowhead(),r=e||this.EmptyArrowhead();o&&(this.sArrowMetrics=this.CalcArrowheadDim(o,i,this.sArrowDisp)),r&&(this.eArrowMetrics=this.CalcArrowheadDim(r,n,this.eArrowDisp)),this.CalcArrowheadPlacement(o,r),o&&(s=this.CreateArrowheadElem(o,this.sArrowMetrics,!0,this.arrowheadBounds)),r&&(a=this.CreateArrowheadElem(r,this.eArrowMetrics,!1,this.arrowheadBounds)),o&&this.sArrowMetrics.trimAmount&&this.TrimPath("start",this.sArrowMetrics.trimAmount),r&&this.eArrowMetrics.trimAmount&&this.TrimPath("end",this.eArrowMetrics.trimAmount),s&&(this.arrowElems.push(s),this.arrowAreaElem.add(s)),a&&(this.arrowElems.push(a),this.arrowAreaElem.add(a))}}CalcArrowheadDim(t,e,i){let n,s;const a={width:0,height:0,scaleFactor:0,attachX:0,attachY:0,endX:0,endY:0,trimAmount:0};return s=2*(this.strokeWidth+e),t.fixedSizeScale&&(s=this.strokeWidth*t.fixedSizeScale),n=s/t.defArea.height,a.width=t.defArea.width*n,a.height=s,a.scaleFactor=n,a.attachX=t.attachPt.x*n,a.attachY=t.attachPt.y*n,a.endX=t.endPt.x*n,a.endY=t.endPt.y*n,t.centered&&(a.endX=a.attachX,a.endY=a.attachY),a.trimAmount=a.endX-a.attachX,i&&!t.centered&&(a.trimAmount+=10),a}CreateArrowheadElem(t,e,i,n){let s=this.pathElem.attr("stroke-width");isNaN(s)&&(s=Number(Instance.Basic.Symbol.ParsePlaceholder(s,Instance.Basic.Symbol.Placeholder.LineThick)));let a=this.svgObj.attr("stroke-opacity");isNaN(a)&&(a=1);const o={x:e.offsetX,y:e.offsetY},r=e.rotatePt,l=e.angle,h=e.scaleFactor,c=t.geometry,u=new T3Svg.Container(T3Svg.create("g"));u.parts=[];let d=c;i&&t.flippedGeometry&&(d=t.flippedGeometry);for(let p=0;p<d.length;p++){let t=!1,e=null,i="";const n=d[p];switch(n.type){case"RECT":{e=new T3Svg.Path,i="M";const s=n.pathData.x*h+o.x,a=n.pathData.y*h+o.y,c=n.pathData.width*h,u=n.pathData.height*h;let d=Utils1.RotatePoint(r,{x:s,y:a},l);i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"L",d=Utils1.RotatePoint(r,{x:s+c,y:a},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"L",d=Utils1.RotatePoint(r,{x:s+c,y:a+u},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"L",d=Utils1.RotatePoint(r,{x:s,y:a+u},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"z",e.plot(i),t=!0;break}case"OVAL":{e=new T3Svg.Path,i="M";let s=n.pathData.x*h+o.x,a=n.pathData.y*h+o.y;const c=n.pathData.width*h/2,u=n.pathData.height*h/2;a+=u-.5;let d=Utils1.RotatePoint(r,{x:s,y:a},l);i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"A",i+=Utils1.RoundCoord(c)+","+Utils1.RoundCoord(u)+" "+Utils1.RoundCoord(l)+" 1 1 ",d=Utils1.RotatePoint(r,{x:s,y:a+1},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"z",e.plot(i),t=!0;break}case"PATH":{e=new T3Svg.Path,i="";const s=n.pathData;if(!Array.isArray(s))continue;for(let e=0;e<s.length;e++){const n=s[e];if(!Array.isArray(n)||n.length<1){i="";break}switch(n[0]){case"M":case"L":{if(n.length<3)break;const t=n[1]*h+o.x,e=n[2]*h+o.y,s=Utils1.RotatePoint(r,{x:t,y:e},l);i+=n[0]+Utils1.RoundCoord(s.x)+","+Utils1.RoundCoord(s.y);break}case"A":{if(n.length<8)break;const t=n[6]*h+o.x,e=n[7]*h+o.y,s=n[1]*h,a=n[2]*h;let c=Utils1.RotatePoint(r,{x:t,y:e},l);i+="A"+Utils1.RoundCoord(s)+","+Utils1.RoundCoord(a)+" "+Utils1.RoundCoord(n[3]+l)+" "+n[4]+" "+n[5]+" "+Utils1.RoundCoord(c.x)+","+Utils1.RoundCoord(c.y);break}case"z":i+="z",t=!0}}e.plot(i);break}default:e=null}n.noWhiteFill&&(t=!1),e&&(u.add(e),u.parts.push({elem:e,filled:n.filled}),n.filled?(e.attr("stroke","none"),e.attr("fill-opacity",a)):(e.attr("stroke-width",s*n.stroke),t?(e.attr("fill-opacity",1),e.attr("fill","#FFFFFF")):e.attr("fill","none")))}if(u.attr("stroke-dasharray","none"),n&&"empty"!==t.desc){let e=o.x,i=o.y,s=t.defArea.width*h,a=t.defArea.height*h;if(l){let t=Utils1.RotatePoint(r,{x:e,y:i},l),n=t.x,o=t.x,h=t.y,c=t.y;t=Utils1.RotatePoint(r,{x:e+s,y:i},l),n=t.x<n?t.x:n,o=t.x>o?t.x:o,h=t.y<h?t.y:h,c=t.y>c?t.y:c,t=Utils1.RotatePoint(r,{x:e,y:i+a},l),n=t.x<n?t.x:n,o=t.x>o?t.x:o,h=t.y<h?t.y:h,c=t.y>c?t.y:c,t=Utils1.RotatePoint(r,{x:e+s,y:i+a},l),n=t.x<n?t.x:n,o=t.x>o?t.x:o,h=t.y<h?t.y:h,c=t.y>c?t.y:c,e=n,i=h,s=o-n,a=c-h}n.push({x:e,y:i,width:s,height:a})}return u}CalcArrowheadPlacement(t,e){if(t||e)try{const i=this.pathElem.node.getTotalLength();let n=this.pathElem.node.getPointAtLength(0),s=this.pathElem.node.getPointAtLength(i),a=t?this.sArrowMetrics.trimAmount:0,o=e?this.eArrowMetrics.trimAmount:0;if(a+o>=i){const t=this.pathElem.node.getPointAtLength(i/2);a&&o?(this.sArrowMetrics.trimAmount=i/2,this.eArrowMetrics.trimAmount=i/2,a=o=i/2):a?(this.sArrowMetrics.trimAmount=i,a=i):(this.eArrowMetrics.trimAmount=i,o=i),n=t,s=t}let r=t?t.centered?this.pathElem.node.getPointAtLength(i/2):this.pathElem.node.getPointAtLength(a):null,l=e?e.centered?this.pathElem.node.getPointAtLength(i/2):this.pathElem.node.getPointAtLength(i-o):null;if(t){let e=r.x===n.x&&r.y===n.y?i<2?{x:n.x+2,y:n.y}:this.pathElem.node.getPointAtLength(2):r;t.centered&&i>=4&&(n=this.pathElem.node.getPointAtLength(i/2-2)),this.sArrowMetrics.angle=t.noRotate?0:Utils1.CalcAngleFromPoints(e,n),this.sArrowMetrics.rotatePt=r,this.sArrowMetrics.offsetX=r.x-this.sArrowMetrics.attachX,this.sArrowMetrics.offsetY=r.y-this.sArrowMetrics.attachY}if(e){let t=l.x===s.x&&l.y===s.y?i<2?{x:s.x-2,y:s.y}:this.pathElem.node.getPointAtLength(i-2):l;e.centered&&i>=4&&(s=this.pathElem.node.getPointAtLength(i/2+2)),this.eArrowMetrics.angle=e.noRotate?0:Utils1.CalcAngleFromPoints(t,s),this.eArrowMetrics.rotatePt=l,this.eArrowMetrics.offsetX=l.x-this.eArrowMetrics.attachX,this.eArrowMetrics.offsetY=l.y-this.eArrowMetrics.attachY}}catch(i){LogUtil.Error("= b.Path: CalcArrowheadPlacement/ Error in CalcArrowheadPlacement:",i)}}EmptyArrowhead(){return{id:0,desc:"empty",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!1,noRotate:!0,geometry:[{type:"RECT",filled:!1,noWhiteFill:!0,stroke:0,pathData:{x:0,y:0,width:10,height:10}}]}}TrimPath(t,e){const i=this.pathElem.node.pathSegList.numberOfItems,n=this.pathElem.node.getTotalLength();let s={x:0,y:0};if(e)if(e>=n)this.pathElem.plot();else{const a="start"===t?e:n-e,o=this.pathElem.node.getPathSegAtLength(a);let r=this.pathElem.node.getPointAtLength(a);r={x:Utils1.RoundCoord(r.x),y:Utils1.RoundCoord(r.y)};const l=this.pathElem.node.pathSegList.getItem(o);if("start"===t){const t=this.IsSegmentAbs(l);t||(s=this.CalcSegEndpoint(this.pathElem,o),s.x=Utils1.RoundCoord(s.x),s.y=Utils1.RoundCoord(s.y));for(let i=1;i<o;i++)this.pathElem.node.pathSegList.removeItem(1);const e=this.pathElem.node.createSVGPathSegMovetoAbs(r.x,r.y);if(this.pathElem.node.pathSegList.replaceItem(e,0),!t){let t;switch(l.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:t=this.pathElem.node.createSVGPathSegLinetoAbs(s.x,s.y);break;case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_REL:t=this.pathElem.node.createSVGPathSegArcAbs(s.x,s.y,l.r1,l.r2,l.angle,l.largeArcFlag,l.sweepFlag);break;default:t=null}t&&this.pathElem.node.pathSegList.replaceItem(t,1)}}else{for(let e=o+1;e<i;e++)this.pathElem.node.pathSegList.removeItem(o+1);let t;switch(l.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:t=this.pathElem.node.createSVGPathSegLinetoAbs(r.x,r.y);break;case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_REL:t=this.pathElem.node.createSVGPathSegArcAbs(r.x,r.y,l.r1,l.r2,l.angle,l.largeArcFlag,l.sweepFlag);break;default:t=null}t&&this.pathElem.node.pathSegList.replaceItem(t,o)}}}CalcSegEndpoint(t,e){let i={x:0,y:0};for(let n=0;n<=e;n++){const e=t.node.pathSegList.getItem(n);switch(e.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_MOVETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:void 0!==e.x&&(i.x=e.x),void 0!==e.y&&(i.y=e.y);break;case OptConstant.SVGPathSeg.PATHSEG_MOVETO_REL:0===n?(i.x=e.x,i.y=e.y):(i.x+=e.x,i.y+=e.y);break;default:void 0!==e.x&&(i.x+=e.x),void 0!==e.y&&(i.y+=e.y)}}return i}GetGeometryBBox(){if(this.geometryBBox.width<0||this.geometryBBox.height<0){const t=this.doc.GetFormattingLayer(),e=new T3Svg.Path;e.plot(this.origPathData),t.svgObj.add(e);const i=e.node.getBBox();t.svgObj.remove(e),this.geometryBBox.x=i.x,this.geometryBBox.y=i.y,this.geometryBBox.width=i.width,this.geometryBBox.height=i.height}return this.geometryBBox}IsSegmentAbs(t){let e=!1;switch(t.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_MOVETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:e=!0}return e}IsClosed(){const t=this.pathElem.node.pathSegList.numberOfItems;if(t<1)return!1;return this.pathElem.node.pathSegList.getItem(t-1).pathSegType===OptConstant.SVGPathSeg.PATHSEG_CLOSEPATH}SetPath(t,e){this.origPathData=t,this.pathElem.plot(t),this.UpdateArrowheads(),this.UpdateTransform(),e?(this.geometryBBox.x=e.x,this.geometryBBox.y=e.y,this.geometryBBox.width=e.width,this.geometryBBox.height=e.height):(this.geometryBBox.width=-1,this.geometryBBox.height=-1),this.RefreshPaint()}PathCreator(){return this.pathCreator||(this.pathCreator=new Creator(this)),this.pathCreator}}class RRect extends Path{constructor(){super(),__publicField(this,"rx"),__publicField(this,"ry"),this.rx=0,this.ry=0}SetRRectSize(t,e,i,n){i>=t/2&&(i=(t-1)/2),n>=e/2&&(n=(e-1)/2),this.rx=i,this.ry=n;const s=this.PathCreator(),a=t-2*i,o=e-2*n;s.BeginPath(),i&&n?(s.MoveTo(0,n),s.SimpleArcTo(i,-n,!0,!0),s.LineTo(a,0,!0),s.SimpleArcTo(i,n,!0,!0),s.LineTo(0,o,!0),s.SimpleArcTo(-i,n,!0,!0),s.LineTo(-a,0,!0),s.SimpleArcTo(-i,-n,!0,!0),s.ClosePath()):(s.MoveTo(0,0),s.LineTo(t,0,!0),s.LineTo(0,e,!0),s.LineTo(-t,0,!0),s.ClosePath());const r=s.ToString();this.SetPath(r,{x:0,y:0,width:t,height:e})}SetSize(t,e){this.SetRRectSize(t,e,this.rx,this.ry)}}class Oval extends Element$1{constructor(){super(),__publicField(this,"shapeElem"),this.svgObj=null,this.shapeElem=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.shapeElem=new T3Svg.Ellipse,this.svgObj.add(this.shapeElem),this.InitElement(t,e),this.svgObj}SetSize(t,e){const i=Utils1.RoundCoord(t),n=Utils1.RoundCoord(e);this.geometryBBox.width=i,this.geometryBBox.height=n,this.svgObj.size(i,n),this.shapeElem.size(i,n),this.UpdateTransform(),this.RefreshPaint()}}class Line extends Path{constructor(){super()}SetPoints(t,e,i,n){const s=this.PathCreator();s.BeginPath(),s.MoveTo(t,e),s.LineTo(i,n);const a=s.ToString();this.SetPath(a,{x:Math.min(t,i),y:Math.min(e,n),width:Math.abs(i-t),height:Math.abs(n-e)})}}class PolyLine extends Path{constructor(){super()}SetPoints(t){const e=this.PathCreator(),i={x:0,y:0},n={x:0,y:0},s=t.length;if(e.BeginPath(),s>1){const s=t[0];e.MoveTo(s.x,s.y),i.x=n.x=s.x,i.y=n.y=s.y}for(let r=1;r<s;r++){const s=t[r];e.LineTo(s.x,s.y),i.x=Math.min(i.x,s.x),i.y=Math.min(i.y,s.y),n.x=Math.max(n.x,s.x),n.y=Math.max(n.y,s.y)}const a=e.ToString(),o={x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y};this.SetPath(a,o)}}class PolyPolyLine extends Path{constructor(){super(),__publicField(this,"pList"),this.pList=[],this.arrowElems=[]}Clear(){this.pList=[],this.BuildPath()}AddPolyLine(t,e,i){this.pList.push({points:t,sArrowFlag:e,eArrowFlag:i})}BuildPath(){for(;this.arrowAreaElem.children().length;)this.arrowAreaElem.removeAt(0);this.arrowElems.length=0;const t=this.PathCreator();t.BeginPath(),this.arrowheadBounds=[];let e=null;const i={x:0,y:0},n={x:0,y:0};let s=!0,a=!1;const o=this.pList.length;for(let l=0;l<o;l++){let o=null,r=null;const h=this.pList[l].points.length;for(let c=0;c<h-1;c++){const u=0===c,d=c===h-2,p=this.pList[l].points[c];let g=this.pList[l].points[c+1];u&&this.pList[l].sArrowFlag&&this.sArrowRec&&(o={arrowRec:this.sArrowRec,arrowSize:this.sArrowSize,arrowDisp:this.sArrowDisp}),d&&this.pList[l].eArrowFlag&&this.eArrowRec&&(r={arrowRec:this.eArrowRec,arrowSize:this.eArrowSize,arrowDisp:this.eArrowDisp}),(o||r)&&(this.GenerateArrowheads(p,g,o,r),a=!0),s?(i.x=Math.min(p.x,g.x),i.y=Math.min(p.y,g.y),n.x=Math.max(p.x,g.x),n.y=Math.max(p.y,g.y)):(i.x=Math.min(i.x,p.x,g.x),i.y=Math.min(i.y,p.y,g.y),n.x=Math.max(n.x,p.x,g.x),n.y=Math.max(n.y,p.y,g.y)),s=!1,e=o?o.segPt:p,r&&(g=r.segPt),u?t.MoveTo(e.x,e.y):d||t.LineTo(e.x,e.y),d&&t.LineTo(g.x,g.y)}o&&(this.arrowAreaElem.add(o.arrowElem),this.arrowElems.push(o.arrowElem)),r&&(this.arrowAreaElem.add(r.arrowElem),this.arrowElems.push(r.arrowElem))}if(!a&&e){const t={arrowRec:this.EmptyArrowhead(),arrowSize:this.sArrowSize,arrowDisp:!1,arrowElem:null};this.GenerateArrowheads(e,e,t,null),this.arrowAreaElem.add(t.arrowElem),this.arrowElems.push(t.arrowElem)}const r=t.ToString();this.origPathData=r,this.pathElem.plot(r),this.UpdateTransform(),this.geometryBBox.x=i.x,this.geometryBBox.y=i.y,this.geometryBBox.width=n.x-i.x,this.geometryBBox.height=n.y-i.y,this.RefreshPaint()}UpdateArrowheads(){this.BuildPath()}GenerateArrowheads(t,e,i,n){let s,a,o,r,l,h,c,u;if(i&&(i.segPt={x:t.x,y:t.y},i.attachPt={x:t.x,y:t.y},i.offset={x:t.x,y:t.y},i.arrowElem=null,i.angle=180),n&&(n.segPt={x:e.x,y:e.y},n.attachPt={x:e.x,y:e.y},n.offset={x:e.x,y:e.y},n.arrowElem=null,n.angle=0),s=e.x-t.x,a=e.y-t.y,o=Math.sqrt(s*s+a*a),i&&(r=this.CalcArrowheadDim(i.arrowRec,i.arrowSize,i.arrowDisp)),n&&(l=this.CalcArrowheadDim(n.arrowRec,n.arrowSize,n.arrowDisp)),h=(r?r.trimAmount:0)+(l?l.trimAmount:0),h>o?(c=(r?r.trimAmount:0)/h*o,u=(l?l.trimAmount:0)/h*o):(c=r?r.trimAmount:0,u=l?l.trimAmount:0),o){const h=s/o,d=a/o;i&&(i.segPt.x=t.x+c*h,i.segPt.y=t.y+c*d,i.attachPt.x=i.arrowRec.centered?t.x+o/2*h:i.segPt.x,i.attachPt.y=i.arrowRec.centered?t.y+o/2*d:i.segPt.y,i.angle=i.arrowRec.noRotate?0:Utils1.CalcAngleFromPoints(e,t),i.offset.x=i.attachPt.x-r.attachX,i.offset.y=i.attachPt.y-r.attachY),n&&(n.segPt.x=t.x+(o-u)*h,n.segPt.y=t.y+(o-u)*d,n.attachPt.x=n.arrowRec.centered?t.x+o/2*h:n.segPt.x,n.attachPt.y=n.arrowRec.centered?t.y+o/2*d:n.segPt.y,n.angle=n.arrowRec.noRotate?0:Utils1.CalcAngleFromPoints(t,e),n.offset.x=n.attachPt.x-l.attachX,n.offset.y=n.attachPt.y-l.attachY),r&&(r.offsetX=i.offset.x,r.offsetY=i.offset.y,r.angle=i.angle,r.rotatePt=i.attachPt,i.arrowElem=this.CreateArrowheadElem(i.arrowRec,r,!0,this.arrowheadBounds)),l&&(l.offsetX=n.offset.x,l.offsetY=n.offset.y,l.angle=n.angle,l.rotatePt=n.attachPt,n.arrowElem=this.CreateArrowheadElem(n.arrowRec,l,!1,this.arrowheadBounds))}}}class Polygon extends Path{constructor(){super()}SetPoints(t){let e=this.PathCreator(),i={x:0,y:0},n={x:0,y:0},s=t.length;e.BeginPath(),s>1&&(e.MoveTo(t[0].x,t[0].y),i.x=n.x=t[0].x,i.y=n.y=t[0].y);for(let o=1;o<s;o++)e.LineTo(t[o].x,t[o].y),i.x=Math.min(i.x,t[o].x),i.y=Math.min(i.y,t[o].y),n.x=Math.max(n.x,t[o].x),n.y=Math.max(n.y,t[o].y);s>1&&e.ClosePath();let a=e.ToString();this.SetPath(a,{x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y})}}class Group extends Container{constructor(){super(),__publicField(this,"clipElem")}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.clipElem=null,this.InitElement(t,e),this.svgObj}GetGeometryBBox(){if(this.geometryBBox.width<0||this.geometryBBox.height<0){let t,e,i=this.doc.GetFormattingLayer(),n=[],s={x:this.svgObj.trans.x,y:this.svgObj.trans.y},a=this.svgObj.trans.rotation,o=this.svgObj.parent,r=0;o&&(r=this.svgObj.position(),o.remove(this.svgObj)),this.RemoveNodesRecursively(this.svgObj.node,n),i.svgObj.add(this.svgObj),this.svgObj.transform({x:0,y:0,rotation:0}),t=this.svgObj.rbox(),i.svgObj.remove(this.svgObj),e=this.doc.ConvertWindowToDocCoords(t.x,t.y),this.geometryBBox.x=e.x,this.geometryBBox.y=e.y,this.geometryBBox.width=t.width,this.geometryBBox.height=t.height,this.svgObj.transform({x:s.x,y:s.y,rotation:a});for(let l=0;l<n.length;l++){let t=n[l];t.parent.insertBefore(t.node,t.sibling)}o&&o.add(this.svgObj,r),this.UpdateTransform()}return this.geometryBBox}RemoveNodesRecursively(t,e){const i=t.parentNode;if(t.hasAttribute&&t.removeAttribute&&"ELEMENT_NODE"===t.nodeType){if(t.hasAttribute("no-export")||t.hasAttribute("sfx"))return e.push({node:t,parent:i,sibling:t.nextSibling}),void i.removeChild(t);if("pattern"===t.nodeName)return e.push({node:t,parent:i,sibling:t.nextSibling}),void i.removeChild(t);for(let i=t.childNodes.length-1;i>=0;i--)this.RemoveNodesRecursively(t.childNodes[i],e)}}SetClipRect(t,e,i,n){if(this.ClearClipRect(),i&&n){const s=Utils1.MakeGuid(),a=new T3Svg.Container(T3Svg.create("clipPath"));a.attr("id",s);const o=new T3Svg.Rect;o.transform({x:Utils1.RoundCoord(t),y:Utils1.RoundCoord(e)}),o.size(Utils1.RoundCoord(i),Utils1.RoundCoord(n)),a.add(o),this.svgObj.add(a),this.svgObj.attr("clip-path","url(#"+s+")"),this.clipElem=a}}ClearClipRect(){this.clipElem&&(this.svgObj.remove(this.clipElem),this.svgObj.node.removeAttribute("clip-path"),this.clipElem=null)}GetTargetForEvent(t){if(!(t&&this instanceof Container))return this;let e=t.target||t.srcElement;const i=this.DOMElement();if(!e||e===i)return this;let n=this.FindElementByDOMElement(e);for(;e&&!n;)e=e.parentNode,n=e===i?this:this.FindElementByDOMElement(e);return n||this}RefreshPaint(t){if(this.fillPatternData?this.UpdatePattern(this.fillPatternData.ID,!0):this.fillGradientData&&this.UpdateGradient(this.fillGradientData.ID,!0),this.strokePatternData?this.UpdatePattern(this.strokePatternData.ID,!1):this.strokeGradientData&&this.UpdateGradient(this.strokeGradientData.ID,!1),t&&this instanceof Group){const e=this.ElementCount();for(let i=0;i<e;i++){const e=this.GetElementByIndex(i);e&&e.RefreshPaint(t)}}}}class Layer extends Container{constructor(){super(),__publicField(this,"scaleOKFlag"),__publicField(this,"dpiScaleOnlyFlag"),this.scaleOKFlag=!0,this.dpiScaleOnlyFlag=!1}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.InitElement(t,e),this.svgObj}AllowScaling(t){this.scaleOKFlag=t,t&&(this.dpiScaleOnlyFlag=!1)}AllowDpiScalingOnly(t){this.dpiScaleOnlyFlag=t,t&&(this.scaleOKFlag=!1)}IsScalingAllowed(){return this.scaleOKFlag}IsDpiScalingAllowed(){return this.dpiScaleOnlyFlag}}class Symbol$1 extends Element$1{constructor(){super(),__publicField(this,"shapeElem"),__publicField(this,"fillColors"),__publicField(this,"lineColors"),__publicField(this,"lineWidths"),__publicField(this,"solidFills"),__publicField(this,"fillTrans"),__publicField(this,"lineTrans"),__publicField(this,"strokeColors"),__publicField(this,"srcSymbolSvg"),__publicField(this,"svgContent"),__publicField(this,"symbolName"),__publicField(this,"drawSetting")}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.shapeElem=new T3Svg.Container(T3Svg.create("g")),this.svgObj.add(this.shapeElem),this.InitElement(t,e),this.fillColors=[],this.lineColors=[],this.lineWidths=[],this.solidFills=[],this.fillTrans=[],this.lineTrans=[],this.srcSymbolSvg="",this.strokeColors=[],this.svgObj}InitSymbolSource(){var t=this.GetSymbolSource(),e="object-svg";if(this.drawSetting&&(this.drawSetting.active&&this.drawSetting.inAlarm?e=`${e} active in-alarm`:this.drawSetting.active?e=`${e} active`:this.drawSetting.inAlarm&&(e=`${e} in-alarm`)),""!==e){t=`\n          <g class="${e}">\n                    ${t}\n          </g>\n        `}this.drawSetting&&this.drawSetting.fillColor?(this.SetSymbolSource(t),this.SetFillColor(this.drawSetting.fillColor,!0)):(this.SetSymbolSource(t),this.RebuildSymbol())}GetSymbolSource(t){return null==t||""===t?ToolSvgData.GetSvgDataString(this.symbolName):t}SetSymbolSource(t){if(this.srcSymbolSvg=t,this.fillColors=Symbol$1.GetPlaceholders(BConstant.Placeholder.FillColor,t),this.lineColors=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineColor,t),this.lineWidths=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineThick,t),this.solidFills=Symbol$1.GetPlaceholders(BConstant.Placeholder.SolidFill,t),this.fillTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.FillTrans,t),this.lineTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineTrans,t),this.strokeColors=Symbol$1.GetPlaceholders(BConstant.Placeholder.StrokeColor,t),t){t=t.replace(/fill-opacity="[\d.]*"/g,"").replace(/stroke-opacity="[\d.]*"/g,"");const e=Symbol$1.CreatePlaceholder(BConstant.Placeholder.FillTrans,BConstant.PlaceholderDefault[BConstant.Placeholder.FillTrans]);t=t.replace(new RegExp('fill="##FillColor',"g"),'fill-opacity="'+e+'" fill="##FillColor'),this.fillTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.FillTrans,t);const i=Symbol$1.CreatePlaceholder(BConstant.Placeholder.LineTrans,BConstant.PlaceholderDefault[BConstant.Placeholder.LineTrans]);t=t.replace(new RegExp('stroke="##LineColor',"g"),'stroke-opacity="'+i+'" stroke="##LineColor').replace(new RegExp('fill="##LineColor',"g"),'fill-opacity="'+i+'" fill="##LineColor'),this.lineTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineTrans,t),this.srcSymbolSvg=t}}RebuildSymbol(){let t=`<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>${this.srcSymbolSvg}</svg>`;const e=new DOMParser;this.shapeElem.clear(),this.svgObj.clear(),this.svgObj.add(this.shapeElem),t=Symbol$1.ReplacePlaceholder(this.fillColors,t),t=Symbol$1.ReplacePlaceholder(this.lineColors,t),t=Symbol$1.ReplacePlaceholder(this.lineWidths,t),t=Symbol$1.ReplacePlaceholder(this.solidFills,t),t=Symbol$1.ReplacePlaceholder(this.fillTrans,t),t=Symbol$1.ReplacePlaceholder(this.lineTrans,t),t=Symbol$1.ReplacePlaceholder(this.strokeColors,t),e.async=!1;let i=e.parseFromString(t,"text/xml").documentElement.firstChild;for(;i;)this.shapeElem.node.appendChild(this.svgObj.node.ownerDocument.importNode(i,!0)),i=i.nextSibling;this.svgContent=t}GetScaleElement(){return this.shapeElem}SetFillColor(t,e){LogUtil.Debug("= B.Symbol SetFillColor | color,skipClear",t,e);let i=!1;e||this.ClearColorData(!0);for(let n=0;n<this.fillColors.length;n++)this.fillColors[n].val=t,i=!0;if(t.startsWith("#"))for(let n=0;n<this.solidFills.length;n++)this.solidFills[n].val=t,i=!0;i&&this.RebuildSymbol()}SetTextureFill(t){Instance.Basic.Element.SetTextureFill.call(this,t);const e=this.svgObj.attr("fill");this.svgObj.attr("fill",""),this.fillPatternData&&this.fillPatternData.patternElem&&(this.svgObj.remove(this.fillPatternData.patternElem),this.SetFillColor(e,!0),this.svgObj.add(this.fillPatternData.patternElem,0))}SetGradientFill(t){Instance.Basic.Element.SetGradientFill.call(this,t);const e=this.svgObj.attr("fill");this.svgObj.attr("fill",""),this.fillGradientData&&this.fillGradientData.gradientElem&&(this.svgObj.remove(this.fillGradientData.gradientElem),this.SetFillColor(e,!0),this.svgObj.add(this.fillGradientData.gradientElem,0))}SetStrokeColor(t,e){e||this.ClearColorData(!1);for(let i=0;i<this.strokeColors.length;i++)this.strokeColors[i].val=t;this.strokeColors.length&&this.RebuildSymbol()}SetTextureStroke(t){Instance.Basic.Element.SetTextureStroke.call(this,t);const e=this.svgObj.attr("stroke");this.svgObj.attr("stroke",""),this.strokePatternData&&this.strokePatternData.patternElem&&(this.svgObj.remove(this.strokePatternData.patternElem),this.SetStrokeColor(e,!0),this.svgObj.add(this.strokePatternData.patternElem,0))}SetGradientStroke(t){Instance.Basic.Element.SetGradientStroke.call(this,t);const e=this.svgObj.attr("stroke");this.svgObj.attr("stroke",""),this.strokeGradientData&&this.strokeGradientData.gradientElem&&(this.svgObj.remove(this.strokeGradientData.gradientElem),this.SetStrokeColor(e,!0),this.svgObj.add(this.strokeGradientData.gradientElem,0))}SetStrokeWidth(t){isNaN(Number(t))&&(t=Number(Symbol$1.ParsePlaceholder(t,BConstant.Placeholder.LineThick)));for(let e=0;e<this.lineWidths.length;e++)this.lineWidths[e].val=t;this.lineWidths.length&&this.RebuildSymbol()}SetFillOpacity(t){for(let e=0;e<this.fillTrans.length;e++)this.fillTrans[e].val=t;this.fillTrans.length&&this.RebuildSymbol()}SetStrokeOpacity(t){for(let e=0;e<this.lineTrans.length;e++)this.lineTrans[e].val=t;this.lineTrans.length&&this.RebuildSymbol()}SetStrokePattern(t){}SetAttributes(t){this.svgObj.attr("background-color",t),this.shapeElem.attr("background-color",t)}GetSvgSymbol(){return this.svgContent}SetInActive(t){}SetDrawSetting(t){this.drawSetting=t,LogUtil.Debug("= B.Symbol SetDrawSetting Input/Output drawSetting",t)}RefreshDrawSetting(){LogUtil.Debug("= B.Symbol RefreshDrawSetting src-symbol-svg",this.srcSymbolSvg),this.InitSymbolSource()}SetSymbolName(t){this.symbolName=t}static CreatePlaceholder(t,e=""){return`${t}=${e}${BConstant.Placeholder.Terminator}`}static ParsePlaceholder(t,e){const i=t.indexOf("=")+1,n=t.lastIndexOf(BConstant.Placeholder.Terminator);let s=BConstant.PlaceholderDefault[e];return i>0&&n>i&&(s=t.slice(i,n)),s}static GetPlaceholders(t,e){const i=[];if(!e)return i;try{const n=e.match(new RegExp(`${t}.*?##`,"g"));if(n)for(let e=0;e<n.length;e++)i.push({placeholder:n[e],val:Symbol$1.ParsePlaceholder(n[e],t)})}catch(n){T3Util.Error("= b.Symbol: GetPlaceholders/ Error getting placeholders:",n)}return i}static ReplacePlaceholder(t,e){let i=e;if(!e)return i;for(let n=0;n<t.length;n++)i=i.replace(new RegExp(t[n].placeholder,"g"),t[n].val);return i}}class ShapeContainer$1 extends Group{constructor(){super(),__publicField(this,"shapeGroup")}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.InitElement(t,e),this.shapeGroup=new Group,this.shapeGroup.CreateElement(t,e),super.AddElement(this.shapeGroup),this.svgObj}AddElement(t,e,i){return i?super.AddElement(t,e):this.shapeGroup?this.shapeGroup.AddElement(t,e):void 0}RemoveElement(t,e){return e?super.RemoveElement(t):this.shapeGroup?this.shapeGroup.RemoveElement(t):void 0}RemoveAll(t){return t?super.RemoveAll():this.shapeGroup?this.shapeGroup.RemoveAll():void 0}RemoveElementByInternalId(t,e){return e?super.RemoveElementByInternalId(t):this.shapeGroup?this.shapeGroup.RemoveElementByInternalId(t):void 0}ElementCount(t){return t?super.ElementCount():this.shapeGroup?this.shapeGroup.ElementCount():0}GetElementByIndex(t,e){return e?super.GetElementByIndex(t):this.shapeGroup?this.shapeGroup.GetElementByIndex(t):null}GetElementById(t,e,i){return e?super.GetElementById(t,i):this.shapeGroup?this.shapeGroup.GetElementById(t,i):null}GetElementByIdInGroup(t,e){return e?super.GetElementByIdInGroup(t):this.shapeGroup?this.shapeGroup.GetElementByIdInGroup(t):null}GetElementListWithId(t,e){return e?super.GetElementListWithId(t):this.shapeGroup?this.shapeGroup.GetElementListWithId(t):[]}GetElementByInternalId(t,e){return e?super.GetElementByInternalId(t):this.shapeGroup?this.shapeGroup.GetElementByInternalId(t):null}FindElement(t,e){return e?super.FindElement(t):this.shapeGroup?this.shapeGroup.FindElement(t):null}FindElementByDOMElement(t,e){return e?super.FindElementByDOMElement(t):this.shapeGroup?this.shapeGroup.FindElementByDOMElement(t):null}GetElementIndex(t,e){return e?super.GetElementIndex(t):this.shapeGroup?this.shapeGroup.GetElementIndex(t):-1}MoveElementForward(t,e){return e?super.MoveElementForward(t):this.shapeGroup?this.shapeGroup.MoveElementForward(t):void 0}MoveElementBackward(t,e){return e?super.MoveElementBackward(t):this.shapeGroup?this.shapeGroup.MoveElementBackward(t):void 0}MoveElementToFront(t,e){return e?super.MoveElementToFront(t):this.shapeGroup?this.shapeGroup.MoveElementToFront(t):void 0}MoveElementToBack(t,e){return e?super.MoveElementToBack(t):this.shapeGroup?this.shapeGroup.MoveElementToBack(t):void 0}}class ShapeCopy extends Element$1{constructor(){super(),__publicField(this,"shapeElem"),this.svgObj=null,this.shapeElem=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("use")),this.InitElement(t,e),this.svgObj}SetElementSource(t){const e=t.SetInternalID();this.svgObj.attr("xlink:href",`#${e}`,"http://www.w3.org/1999/xlink")}}class DefaultFmtText{constructor(){__publicField(this,"width"),__publicField(this,"height"),__publicField(this,"fmtWidth"),__publicField(this,"text"),__publicField(this,"paragraphs"),__publicField(this,"styles"),__publicField(this,"hyperlinks"),this.width=0,this.height=0,this.fmtWidth=0,this.text="",this.paragraphs=[],this.styles=[],this.hyperlinks=[]}}class DefaultRtText{constructor(){__publicField(this,"text"),__publicField(this,"charStyles"),__publicField(this,"styleRuns"),__publicField(this,"styles"),__publicField(this,"hyperlinks"),this.text="",this.charStyles=[],this.styleRuns=[],this.styles=[new DefaultStyle],this.hyperlinks=[]}}class Formatter{constructor(t){__publicField(this,"parent"),__publicField(this,"limits"),__publicField(this,"fmtText"),__publicField(this,"rtData"),__publicField(this,"renderedLines"),__publicField(this,"wordList"),__publicField(this,"renderingEnabled"),__publicField(this,"deferredRenderNeeded"),__publicField(this,"contentVersion"),__publicField(this,"spellCheckEnabled"),__publicField(this,"dataNameEnabled"),__publicField(this,"renderedDataFields"),this.parent=t,this.limits={minWidth:0,maxWidth:0},this.fmtText=new DefaultFmtText,this.rtData=new DefaultRtText,this.renderedLines=[],this.wordList=null,this.renderingEnabled=!0,this.deferredRenderNeeded=!1,this.contentVersion=0,this.spellCheckEnabled=!1,this.dataNameEnabled=!1}SetLimits(t){this.limits.minWidth=void 0!==t.minWidth?t.minWidth:this.limits.minWidth,this.limits.maxWidth=void 0!==t.maxWidth?t.maxWidth:this.limits.maxWidth,this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)}SetRenderingEnabled(t){let e=[];if(this.renderingEnabled=t,t&&this.deferredRenderNeeded){for(let t=0;t<this.rtData.styleRuns.length;t++)e.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[t].pStyle)});this.BuildRuntimeRuns(this.rtData,e),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits),this.UpdateSpellCheckFormatting(),this.deferredRenderNeeded=!1}}SetText(t,e,i,n,s){let a="",o=this.DefaultPStyle(),r=[],l=-1,h=-1,c=!1,u="",d="";t=String(t).replace(/(\r\n|\r|\u2028|\u2029)/g,"\n").replace(/([\u0000-\u0008]|[\u000B-\u001F])/g,""),null==i?i=0:(i<0||i>this.rtData.text.length)&&(i=this.rtData.text.length),(null==n||n>this.rtData.text.length-i)&&(n=this.rtData.text.length-i),"number"==typeof e?l=e:!this.rtData.text.length||i>=this.rtData.text.length-1?(l=Math.max(this.rtData.styles.length-1,0),c=!0):n>0?(l=this.GetFormatAtOffset(i).id,h=this.GetFormatAtOffset(i+n).id):(l=this.GetFormatAtOffset(i-1).id,h=this.GetFormatAtOffset(i).id),0===i&&(c=!0),h<0&&(h=l);const p=this.GetTextParagraphCount(t),g=this.GetParagraphAtOffset(i);g>=0&&(o=this.rtData.styleRuns[g].pStyle);for(let f=0;f<p;f++)r.push({pStyle:Utils1.CopyObj(o)});if(r=this.MergeParagraphInfo(r,i,n),i===this.rtData.text.length?a=this.rtData.text+t:(i>0&&(u=this.rtData.text.slice(0,i)),i+n<this.rtData.text.length&&(d=this.rtData.text.slice(i+n)),a=u+t+d),s||!1!==this.parent.CallEditCallback("onbeforeinsert",a)){this.rtData.text=a,this.contentVersion++,this.rtData.styles.length||(this.rtData.styles=[new DefaultStyle]);let s=this.GetFormatByID(l),o=this.GetFormatByID(h);if(s.hyperlink!==o.hyperlink&&(c=!0),(s.dataField||c)&&(s=Utils1.CopyObj(s),s.dataField=null,c&&(s.hyperlink=-1),l=this.FindAddStyle(s)),t.length){const s=new Array(t.length).fill(l);this.rtData.charStyles.splice(i,n,...s),e&&"object"==typeof e&&this.SetFormat(e,i,t.length)}else if(n&&(this.rtData.charStyles.splice(i,n),!this.rtData.text.length)){e&&"object"==typeof e&&(e.hyperlink=-1,e.dataField=null,l=this.SetFormat(e,0,0));const t=this.GetFormatByID(l);this.rtData.styles=[Utils1.CopyObj(t)]}const u=this.renderingEnabled;this.SetRenderingEnabled(!1),this.BuildRuntimeRuns(this.rtData,r),this.AdjustSpellCheck(t),u&&this.SetRenderingEnabled(!0)}}GetText(t,e){let i="";return this.rtData.text.length&&(null==t?t=0:t>=this.rtData.text.length&&(t=this.rtData.text.length-1),(!e||t+e>this.rtData.text.length)&&(e=this.rtData.text.length-t),i=this.rtData.text.substr(t,e)),i}SetRuntimeText(t,e,i,n){let s="",a="",o="",r=[],l=[];if(t.styles&&t.styles.length){null==e?e=0:(e<0||e>this.rtData.text.length)&&(e=this.rtData.text.length),(null==i||i>this.rtData.text.length-e)&&(i=this.rtData.text.length-e);const h=0===e&&i===this.rtData.text.length;if(e===this.rtData.text.length?s=this.rtData.text+t.text:(e>0&&(a=this.rtData.text.slice(0,e)),e+i<this.rtData.text.length&&(o=this.rtData.text.slice(e+i)),s=a+t.text+o),!1!==this.parent.CallEditCallback("onbeforeinsert",s)){if(this.rtData.text=s,this.contentVersion++,l=this.MergeParagraphInfo(t.paraInfo,e,i),t.hyperlinks.forEach((t=>{this.rtData.hyperlinks.push(String(t)),r.push(this.rtData.hyperlinks.length-1)})),t.styles.forEach((t=>{t.hyperlink>=0&&t.hyperlink<r.length?t.hyperlink=r[t.hyperlink]:t.hyperlink=-1})),t.text.length){let n=Utils1.CopyObj(t.charStyles),s=new Array(t.styles.length),a=n.length;for(let e=0;e<a;e++){let i=n[e],a=s[i];void 0===a&&(i<t.styles.length?(a=this.FindAddStyle(t.styles[i]),s[i]=a):(a=0,s[i]=a)),n[e]=a}this.rtData.charStyles.splice(e,i,...n)}else i?this.rtData.charStyles.splice(e,i):this.rtData.styles[0]=Utils1.DeepCopy(t.styles[0]);n||(this.parent.vAlign=t.vAlign),!this.parent.internalID&&t.internalID&&(this.parent.internalID=t.internalID),h&&(this.contentVersion=t.contentVersion);const a=this.renderingEnabled;this.SetRenderingEnabled(!1),this.BuildRuntimeRuns(this.rtData,l),this.AdjustSpellCheck(),a&&this.SetRenderingEnabled(!0)}}else this.SetText(t.text,null,e,i)}GetRuntimeText(t,e){let i={text:"",charStyles:[],styles:[],hyperlinks:[],paraInfo:[],vAlign:"",internalID:"",contentVersion:0};null==t?t=0:t>=this.rtData.text.length&&(t=this.rtData.text.length-1),(!e||t+e>this.rtData.text.length)&&(e=this.rtData.text.length-t);const n=t+e,s=this.GetParagraphAtOffset(t),a=this.GetParagraphAtOffset(n);this.rtData.styles.forEach((t=>{i.styles.push(Utils1.CopyObj(t))})),i.styles.length||i.styles.push(new DefaultStyle),this.rtData.hyperlinks.forEach((t=>{i.hyperlinks.push(Utils1.CopyObj(t))})),i.text=this.rtData.text.substr(t,e),i.charStyles=this.rtData.charStyles.slice(t,t+e);const o=Math.max(this.GetBulletIndent(),8);for(let r=s;r<=a;r++){let t=Utils1.CopyObj(this.rtData.styleRuns[r].pStyle);t.bindent="none"===t.bullet?0:o,i.paraInfo.push({pStyle:t,offset:this.rtData.styleRuns[r].start})}for(let r=0;r<i.styles.length;r++)if(i.styles[r].spError){let t=Utils1.CopyObj(i.styles[r]);t.spError=!1;let e=this.FindAddStyle(t,!0);if(e<0)i.styles[r].spError=!1;else for(let n=0;n<i.charStyles.length;n++)i.charStyles[n]===r&&(i.charStyles[n]=e)}return this.TrimUnusedStyles(i),i.vAlign=this.parent.GetVerticalAlignment(),i.internalID=this.parent.internalID,i.contentVersion=this.contentVersion,i}DeleteText(t,e){this.SetText("",null,t,e)}GetTextLength(){return this.rtData.text.length}GetTextFormatSize(){let t=Math.max(this.fmtText.width,this.limits.minWidth);return this.limits.maxWidth&&(t=Math.min(t,this.limits.maxWidth)),{width:t,height:this.fmtText.height}}GetContentVersion(){return this.contentVersion}GetSpellCheckEnabled(){return this.spellCheckEnabled}SpellCheckValid(){return this.spellCheckEnabled&&this.parent.doc.spellChecker&&this.parent.doc.spellChecker.GetActive()&&this.parent.IsActive()}SetSpellCheck(t){this.spellCheckEnabled=t,t||this.UpdateSpellCheckFormatting()}UpdateSpellCheck(t){if(!this.SpellCheckValid())return this.UpdateSpellCheckFormatting(),void this.parent.CallEditCallback("spellcheck");const e=this.GetWordList();this.MergeWordLists(t,e),this.UpdateSpellCheckFormatting(),this.parent.CallEditCallback("spellcheck")}UpdateSpellCheckFormatting(){if(!this.SpellCheckValid())return this.SetFormat({spError:!1}),void(this.wordList=null);const t=this.GetWordList(),e=t.list.length;this.SetFormat({spError:!1},null,null,!0);for(let i=0;i<e;i++){const e=t.list[i].start,n=t.list[i].end;t.list[i].status!==BConstant.WordState.Wrong||this.IsDataFieldInRange(e,n)||this.SetFormat({spError:!0},e,t.list[i].word.length,!0)}if(this.renderingEnabled){const t=[];for(let e=0;e<this.rtData.styleRuns.length;e++)t.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[e].pStyle)});this.BuildRuntimeRuns(this.rtData,t),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)}}AdjustSpellCheck(t){let e=t&&1===t.length&&t.search(/[^\u0000-\u2FFF]|[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u0386-\u04FF\u1E00-\u1FFF]/)>=0,i=!1;if(this.SpellCheckValid()&&this.parent.IsActive()){let t=this.GetWordList();if(!e)for(let e=0;e<t.list.length;e++)if(t.list[e].status===BConstant.WordState.NotProcessed){i=!0;break}i?this.parent.DoSpellCheck():this.UpdateSpellCheckFormatting()}else this.wordList=null}GetSpellAtPoint(t){let e=null,i=null,n=-1;if(t.y<0||t.y>this.fmtText.height)return-1;for(let s=0;s<this.renderedLines.length;s++)if(t.y>=this.renderedLines[s].top&&t.y<=this.renderedLines[s].bottom){if(t.x<this.renderedLines[s].left||t.x>this.renderedLines[s].right)break;for(let n=0;n<this.renderedLines[s].runs.length;n++)if(t.x<=this.renderedLines[s].runs[n].right){e=this.renderedLines[s],i=this.renderedLines[s].runs[n];break}break}if(e&&i){this.BuildRuntimeCharPos(e,i);let s=i.charPos,a=i.left;n=i.runRec.dispStart;for(let e=0;e<s.length;e++){if(s[e]>t.x){(a+s[e])/2<t.x&&n++;break}a=s[e],n++}let o=this.GetFormatAtOffset(n);o&&o.style&&o.style.spError||(n=-1)}return n}CalcTextFit(t){let e,i={maxWidth:0};return t&&(i.maxWidth=t),e=this.CalcFromRuntime(this.rtData,i),{width:e.dispMinWidth,height:e.height}}CalcTextWrap(t){LogUtil.Debug("B.Text.Formatter: CalcTextWrap input:",t);let e={maxWidth:0};t&&(e.maxWidth=t);const i=this.CalcFromRuntime(this.rtData,e);let n,s,a;const o=[];for(n=0;n<i.paragraphs.length;n++){const t=i.paragraphs[n];for(t.lines.length||(a=t.start,o.push(a)),s=0;s<t.lines.length;s++)a=t.lines[s].start,o.push(a)}return LogUtil.Debug("B.Text.Formatter: CalcTextWrap output:",o),o}CalcFormatChange(t){LogUtil.Debug("B.Text.Formatter: CalcFormatChange input:",t);let e=Utils1.CopyObj(this.rtData),i=[];for(let a=0;a<e.styles.length;a++)e.styles[a]=this.MergeStyles(t,e.styles[a]);for(let a=this.fmtText.paragraphs.length-1;a>=0;a--){let t=this.fmtText.paragraphs[a];for(let i=t.lines.length-1;i>0;i--){let n=t.lines[i].start;0!==n&&(e.text=e.text.slice(0,n)+"\n"+e.text.slice(n),e.charStyles.splice(n,0,e.charStyles[n-1]))}}for(let a=0;a<this.rtData.styleRuns.length;a++)i.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[a].pStyle)});this.BuildRuntimeRuns(e,i);let n=this.CalcFromRuntime(e,{maxWidth:32e3}),s={width:n.width,height:n.height};return LogUtil.Debug("B.Text.Formatter: CalcFormatChange output:",s),s}GetHitInfo(t){LogUtil.Debug("B.Text.Formatter: GetHitInfo input:",t);let e=t.x,i=t.y,n=-1,s=-1,a={index:0,rLine:0,rRun:0,pRun:0,fPara:0,fLine:0,fRun:0,inDataField:!1,dataFieldInfo:null};if(i<0)return LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;if(i>this.fmtText.height)return a.index=this.fmtText.text.length,a.rLine=this.renderedLines.length,a.fPara=this.fmtText.paragraphs.length,LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;for(let d=0;d<this.renderedLines.length;d++)if(i>=this.renderedLines[d].top&&i<=this.renderedLines[d].bottom){n=d,s=-1;let t=this.renderedLines[d].runs.length;for(let i=0;i<t;i++)if(e<this.renderedLines[d].runs[i].right){s=i;break}break}if(n<0)return LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;a.rLine=n,a.rRun=s;let o=this.renderedLines[n],r=o.paraIndex,l=o.lineIndex;if(a.fPara=r,a.fLine=l,s<0)return a.pRun=0,a.rRun=0,this.fmtText.paragraphs[r].lines[l].runs.length>0?a.index=this.fmtText.paragraphs[r].lines[l].runs[0].dispStart:a.index=this.fmtText.paragraphs[r].lines[l].start,this.IsDataFieldAtPos(a.index)&&(a.inDataField=!0,a.dataFieldInfo=this.GetDataField(a.index)),LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;let h=o.runs[s];a.fRun=h.runIndex,this.BuildRuntimeCharPos(o,h);let c=h.charPos.length,u=this.fmtText.paragraphs[r].lines[l].runs[h.runIndex];if(e<=h.left)a.index=u.dispStart;else{let t=u.dispStart,i=h.left;for(let n=0;n<c;n++){if(h.charPos[n]>e){(i+h.charPos[n])/2<e&&t++;break}i=h.charPos[n],t++}a.index=t}return LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a}GetAdjacentChar(t,e,i,n){LogUtil.Debug("B.Text.Formatter: GetAdjacentChar input:",{index:t,line:e,direction:i,event:n});let s,a,o,r,l,h=t,c=e,u=n&&n.ctrlKey,d=!0,p={x:0,y:0},g={index:h,line:c};if("prev"===i||"next"===i)switch(s=this.GetRenderedCharInfo(h,c),s.rLine>=0&&(a=this.renderedLines[s.rLine],a&&a.runs.length&&(r=a.runs[0].runRec.dispStart,l=a.runs[a.runs.length-1].runRec.dispStart+a.runs[a.runs.length-1].runRec.dispLen)),i){case"prev":h>0&&(u?(g.index=Formatter.FindPrevNextWord(this.fmtText.text,h,!0),g.index<r&&g.line--):g.index--),d=!1;break;case"next":h<this.fmtText.text.length&&(u?(g.index=Formatter.FindPrevNextWord(this.fmtText.text,h,!1),g.index>l&&g.line++):g.index++)}else if("home"===i||"end"===i)if(u)switch(g.line=void 0,i){case"home":g.index=0,d=!1;break;case"end":g.index=this.fmtText.text.length}else{if(s=this.GetRenderedCharInfo(h,c),s.rLine<0)return g;if(g.line=s.rLine,a=this.renderedLines[s.rLine],!a||!a.runs.length)return g;switch(r=a.runs[0].runRec.dispStart,l=a.runs[a.runs.length-1].runRec.dispStart+a.runs[a.runs.length-1].runRec.dispLen,i){case"home":g.index=r,d=!1;break;case"end":g.index=l}}else{if(s=this.GetRenderedCharInfo(h,c),s.rLine<0)return g;switch(r=h,l=h,u&&this.renderedLines[s.rLine]&&this.renderedLines[s.rLine].runs.length&&(a=this.renderedLines[s.rLine],r=a.runs[0].runRec.dispStart,l=a.runs[a.runs.length-1].runRec.dispStart+a.runs[a.runs.length-1].runRec.dispLen),i){case"up":if(s.rLine>0)if(a=this.renderedLines[s.rLine-1],u)r===h?a.runs.length&&(o=a.runs[0].runRec,g.index=o.dispStart,g.line=s.rLine-1):(g.index=r,g.line=s.rLine);else{let t=a.lineRec;p.x=s.left,p.y=t.yOffset+t.height/2;let e=this.GetHitInfo(p);e.index>=0&&(g.index=e.index,g.line=s.rLine-1)}else u&&(g.index=r,g.line=s.rLine);d=!1;break;case"down":if(s.rLine<this.renderedLines.length-1)if(a=this.renderedLines[s.rLine+1],u)a.runs.length&&(o=a.runs[0].runRec,g.index=o.dispStart,g.line=s.rLine+1);else{let t=a.lineRec;p.x=s.left,p.y=t.yOffset+t.height/2;let e=this.GetHitInfo(p);e.index>=0&&(g.index=e.index,g.line=s.rLine+1)}else u&&(g.index=l,g.line=s.rLine)}}if(g.index>0&&g.index<this.fmtText.text.length){let t=this.GetDataField(g.index);if(t){let e=g.index;d?g.index>t.startPos&&(g.index=t.endPos):g.index=t.startPos,e!==g.index&&(s=this.GetRenderedCharInfo(g.index),s.rLine>=0&&(d&&s.rLine>g.line||!d&&s.rLine<g.line)&&(g.line=s.rLine))}}return LogUtil.Debug("B.Text.Formatter: GetAdjacentChar output:",g),g}GetRenderedCharInfo(t,e){let i,n,s,a;LogUtil.Debug("B.Text.Formatter: GetRenderedCharInfo input:",{charIndex:t,lineIndex:e});const o=this.GetTextFormatSize(),r={rLine:-1,rRun:-1,rChar:-1,left:0,right:0,top:0,bottom:0};if(t<0){if(void 0===e)return r;r.rLine=e,n=(i=this.renderedLines[e]).lineRec}else for(let l=0;l<this.renderedLines.length&&(r.rLine=l,n=(i=this.renderedLines[l]).lineRec,!(t<n.start+n.length));l++);if(r.rLine<0)return r;if(r.rLine>0&&t>=0&&t<i.dispStart&&(r.rLine--,n=(i=this.renderedLines[r.rLine]).lineRec),(void 0===e||e<0)&&(e=-2),t===n.start&&e===r.rLine-1&&(r.rLine=e,n=(i=this.renderedLines[r.rLine]).lineRec),r.top=Math.max(0,Math.min(o.height,i.top)),r.bottom=Math.max(0,Math.min(o.height,i.bottom)),t<0)return r.left=Math.max(0,Math.min(o.width,i.left)),r.right=Math.max(0,Math.min(o.width,i.right)),LogUtil.Debug("B.Text.Formatter: GetRenderedCharInfo output:",r),r;for(let l=0;l<i.runs.length&&(r.rRun=l,s=(a=i.runs[l]).runRec,!(t<s.start+s.length));l++);return r.rRun<0?(r.left=i.left,r.right=i.left):t>=n.start+n.length?(r.left=i.right,r.right=i.right,r.rChar=n.length):(this.BuildRuntimeCharPos(i,a),r.rChar=t-s.dispStart,r.rChar<0?(r.rChar=-1,r.left=a.left,r.right=a.left):r.rChar>=a.charPos.length?(r.rChar=a.charPos.length,r.rChar>0?(r.left=a.charPos[r.rChar-1],r.right=r.left):(r.left=a.right,r.right=a.right)):(r.left=a.left,r.right=a.charPos[r.rChar],r.rChar>0&&(r.left=a.charPos[r.rChar-1]))),r.left=Math.max(0,Math.min(o.width,r.left)),r.right=Math.max(0,Math.min(o.width,r.right)),LogUtil.Debug("B.Text.Formatter: GetRenderedCharInfo output:",r),r}GetRenderedRange(t,e){LogUtil.Debug("B.Text.Formatter: GetRenderedRange input:",{startIndex:t,endIndex:e});let i=[];if(t>e||t<0||e<0)return i;let n=this.GetRenderedCharInfo(t),s=this.GetRenderedCharInfo(e);if(n.rLine===s.rLine)i.push({left:n.left,top:n.top,right:s.left,bottom:s.bottom});else for(let a=n.rLine;a<=s.rLine;a++){let t=this.GetRenderedCharInfo(-1,a),e={left:t.left,top:t.top,right:t.right,bottom:t.bottom};a===n.rLine?e.left=n.left:a===s.rLine&&(e.right=s.left),i.push(e)}for(let a=0;a<i.length;a++)i[a].left<0&&(i[a].left=0),i[a].right<i[a].left&&(i[a].right=i[a].left),this.limits.maxWidth&&i[a].right>this.limits.maxWidth&&(i[a].right=this.limits.maxWidth);return LogUtil.Debug("B.Text.Formatter: GetRenderedRange output:",i),i}BuildRuntimeCharPos(t,e){LogUtil.Debug("B.Text.Formatter: BuildRuntimeCharPos input:",{line:t,run:e});let i=[],n=e.left;const s=e.elem?e.elem.node:null,a=e.runRec;e.isTab&&t.pStyle.tabspace&&(n-=n%t.pStyle.tabspace);for(let o=0;s&&o<a.dispLen;o++)e.isTab?n+=t.pStyle.tabspace:n=e.left+Formatter.GetRunPositionForChar(s,o,!1,e.cache,e.left),i.push(n);for(let o=a.length-(a.dispStart-a.start),r=i.length;r<o;r++){const s=a.dispStart+r;if(e.isTab)n+=t.pStyle.tabspace;else{if(" "!==this.fmtText.text[s])break;n+=a.space}i.push(n)}e.charPos=i,LogUtil.Debug("B.Text.Formatter: BuildRuntimeCharPos output:",e.charPos)}GetWordAtIndex(t){LogUtil.Debug("B.Text.Formatter: GetWordAtIndex input:",t);let e=this.GetWordList(),i={start:t,end:t};for(let n=0;n<e.list.length;n++)if(t>=e.list[n].start&&t<e.list[n].end){i.start=e.list[n].start,i.end=e.list[n].end;break}return LogUtil.Debug("B.Text.Formatter: GetWordAtIndex output:",i),i}GetWordList(){let t;return LogUtil.Debug("B.Text.Formatter: GetWordList input"),this.wordList&&this.wordList.sessionID===this.GetContentVersion()?(LogUtil.Debug("B.Text.Formatter: GetWordList output:",this.wordList),this.wordList):(t=this.wordList,this.wordList=this.BuildWordList(),t&&this.MergeWordLists(t,this.wordList),LogUtil.Debug("B.Text.Formatter: GetWordList output:",this.wordList),this.wordList)}MergeWordLists(t,e){LogUtil.Debug("B.Text.Formatter: MergeWordLists input:",{newWordList:t,currentWordList:e});for(let i=0;i<t.list.length;i++){const n=t.list[i];for(let t=0;t<e.list.length;t++){const i=e.list[t];if(i.word===n.word){i.status=n.status,i.auto=n.auto,i.needSuggest=n.needSuggest,i.suggestions=n.suggestions;break}}}LogUtil.Debug("B.Text.Formatter: MergeWordLists output:",e)}BuildWordList(){let t;LogUtil.Debug("B.Text.Formatter: BuildWordList input");const e={textID:this.parent.GetInternalID(),sessionID:this.GetContentVersion(),list:[]},i=/(([^\u0000-\u2FFF]|[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u0386-\u04FF\u1E00-\u1FFF])+)(([\u0027\u0060\u2018\u2019\u2032](([^\u0000-\u2FFF]|[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u0386-\u04FF\u1E00-\u1FFF])+))*)/g;for(;null!==(t=i.exec(this.rtData.text));){const i=t[0].replace(/[\u0027\u0060\u2018\u2019\u2032]/g,"'");e.list.push({word:i,start:t.index,end:t.index+t[0].length,status:BConstant.WordState.NotProcessed,auto:!1,needSuggest:!0,suggestions:null})}return LogUtil.Debug("B.Text.Formatter: BuildWordList output:",e),e}SetFormat(t,e,i,n){LogUtil.Debug("B.Text.Formatter: SetFormat input:",{format:t,start:e,length:i,skipCallback:n});let s=-1,a=!1;if(0===t.size)return-1;if(null==e?e=0:e>=this.rtData.text.length&&(e=this.rtData.text.length-1),(null==i||e+i>this.rtData.text.length)&&(i=this.rtData.text.length-e),t.font&&!t.type&&(t.type=this.parent.doc.GetFontType(t.font)),i<=0){if(s=this.SetRuntimeCharFormat(e,t,!1),0===this.rtData.text.length){const t=this.rtData.styles[s];this.rtData.styles=[t],s=0}return LogUtil.Debug("B.Text.Formatter: SetFormat output:",s),s}for(let r=0;r<i;r++){const i=r+e;this.rtData.charStyles[i]!==this.SetRuntimeCharFormat(i,t,!0)&&(a=!0)}if(n||!a)return LogUtil.Debug("B.Text.Formatter: SetFormat output: No format change"),-1;s=this.rtData.styles.length-1;for(let r=0;r<this.rtData.charStyles.length;r++)if(0===r)s=this.rtData.charStyles[r];else if(this.rtData.charStyles[r]!==s){s=-1;break}if(s>=0){const t=this.rtData.styles[s];this.rtData.styles=[t];for(let e=0;e<this.rtData.charStyles.length;e++)this.rtData.charStyles[e]=0}const o=[];return this.rtData.styleRuns.forEach((t=>{o.push({pStyle:t.pStyle})})),this.BuildRuntimeRuns(this.rtData,o),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits),this.parent.CallEditCallback("select"),LogUtil.Debug("B.Text.Formatter: SetFormat output:",-1),-1}GetFormatAtOffset(t,e){LogUtil.Debug("B.Text.Formatter: GetFormatAtOffset input:",{offset:t,runtimeData:e});let i=0,n=new DefaultStyle;t>=(e=e||this.rtData).charStyles.length&&(t=e.charStyles.length-1),t<0&&(t=0),t<e.charStyles.length?(i=e.charStyles[t],i<e.styles.length&&(n=e.styles[i])):e.styles.length>0&&(i=e.styles.length-1,n=e.styles[i]);const s={id:i,style:n};return LogUtil.Debug("B.Text.Formatter: GetFormatAtOffset output:",s),s}GetFormatByID(t){LogUtil.Debug("B.Text.Formatter: GetFormatByID input:",t);let e=new DefaultStyle;return t>=0&&t<this.rtData.styles.length&&(e=this.rtData.styles[t]),LogUtil.Debug("B.Text.Formatter: GetFormatByID output:",e),e}SetParagraphStyle(t,e,i){let n,s;if(LogUtil.Debug("B.Text.Formatter: SetParagraphStyle input:",{paragraphStyle:t,startOffset:e,length:i}),null==e?e=0:e>this.rtData.text.length&&(e=this.rtData.text.length),(null==i||e+i>this.rtData.text.length)&&(i=this.rtData.text.length-e),n=this.GetParagraphAtOffset(e),s=this.GetParagraphAtOffset(e+i),n>=0){t.bullet&&"none"!==t.bullet&&(t.lindent=0,t.pindent=0);for(let e=n;e<=s;e++)void 0!==t.just&&(this.rtData.styleRuns[e].pStyle.just=t.just),void 0!==t.bullet&&(this.rtData.styleRuns[e].pStyle.bullet=t.bullet),void 0!==t.spacing&&(this.rtData.styleRuns[e].pStyle.spacing=Number(t.spacing)),void 0!==t.pindent&&(this.rtData.styleRuns[e].pStyle.pindent=Number(t.pindent)),void 0!==t.lindent&&(this.rtData.styleRuns[e].pStyle.lindent=Number(t.lindent)),void 0!==t.rindent&&(this.rtData.styleRuns[e].pStyle.rindent=Number(t.rindent)),void 0!==t.tabspace&&(this.rtData.styleRuns[e].pStyle.tabspace=Number(t.tabspace));this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)}LogUtil.Debug("B.Text.Formatter: SetParagraphStyle output:",this.fmtText)}GetParagraphStyle(t){LogUtil.Debug("B.Text.Formatter: GetParagraphStyle input:",t);let e=this.DefaultPStyle();const i=this.GetParagraphAtOffset(t);return i>=0&&(e=Utils1.CopyObj(this.rtData.styleRuns[i].pStyle)),LogUtil.Debug("B.Text.Formatter: GetParagraphStyle output:",e),e}GetParagraphAtOffset(t){LogUtil.Debug("B.Text.Formatter: GetParagraphAtOffset input:",t);for(let i=0;i<this.rtData.styleRuns.length;i++)if(t<this.rtData.styleRuns[i].start+this.rtData.styleRuns[i].nChars)return LogUtil.Debug("B.Text.Formatter: GetParagraphAtOffset output:",i),i;const e=this.rtData.styleRuns.length-1;return LogUtil.Debug("B.Text.Formatter: GetParagraphAtOffset output:",e),e}GetParagraphCount(){LogUtil.Debug("B.Text.Formatter: GetParagraphCount input");const t=this.rtData.styleRuns.length;return LogUtil.Debug("B.Text.Formatter: GetParagraphCount output:",t),t}GetParagraphPosition(t){LogUtil.Debug("B.Text.Formatter: GetParagraphPosition input:",t);const e=t<this.rtData.styleRuns.length?this.rtData.styleRuns[t].start:-1;return LogUtil.Debug("B.Text.Formatter: GetParagraphPosition output:",e),e}GetCommonFormatForRange(t,e){LogUtil.Debug("B.Text.Formatter: GetCommonFormatForRange input:",{startIndex:t,length:e});let i,n,s={};if((void 0===t||t<0)&&(t=0),(void 0===e||e<0||e>this.rtData.charStyles.length-t)&&(e=Math.max(this.rtData.charStyles.length-t,0)),!e||t>=this.rtData.charStyles.length)s=Utils1.CopyObj(this.GetFormatAtOffset(t-1).style);else{i=this.rtData.charStyles[t],i>=0&&i<this.rtData.styles.length&&(s=Utils1.CopyObj(this.rtData.styles[i]));for(let a=1;a<e;a++)n=this.rtData.charStyles[t+a],n!==i&&(i=n,s=this.AndStyles(s,this.rtData.styles[n]))}return LogUtil.Debug("B.Text.Formatter: GetCommonFormatForRange output:",s),s}GetFormatRangeAtIndex(t,e){LogUtil.Debug("B.Text.Formatter: GetFormatRangeAtIndex input:",{format:t,index:e});let i=e,n=e,s=-1;const a=this.rtData.charStyles.length;if(!this.IsFormatAtIndex(t,e))return LogUtil.Debug("B.Text.Formatter: GetFormatRangeAtIndex output:",{start:-1,end:-1}),{start:-1,end:-1};for(let r=e-1;r>=0;r--){const e=this.rtData.charStyles[r];if(e!==s&&!this.IsFormatAtIndex(t,r))break;i=r,s=e}s=-1;for(let r=e+1;r<a;r++){const e=this.rtData.charStyles[r];if(e!==s&&!this.IsFormatAtIndex(t,r))break;n=r,s=e}const o={start:i,end:n};return LogUtil.Debug("B.Text.Formatter: GetFormatRangeAtIndex output:",o),o}IsFormatAtIndex(t,e){LogUtil.Debug("B.Text.Formatter: IsFormatAtIndex input:",{format:t,index:e});const i=this.GetFormatAtOffset(e),n=this.MatchPartialStyles(i.style,t);return LogUtil.Debug("B.Text.Formatter: IsFormatAtIndex output:",n),n}GetFormatTextMinDimensions(){LogUtil.Debug("B.Text.Formatter: GetFormatTextMinDimensions input");const t={width:this.fmtText.width,height:this.fmtText.height};return LogUtil.Debug("B.Text.Formatter: GetFormatTextMinDimensions output:",t),t}SetHyperlink(t,e,i){LogUtil.Debug("B.Text.Formatter: SetHyperlink input:",{url:t,startOffset:e,length:i});let n,s,a,o,r=!1;null==e?e=0:e>=this.rtData.text.length&&(e=this.rtData.text.length-1),o=null==i||e+i>this.rtData.text.length?this.rtData.text.length:e+i,a=this.GetHyperlinkAtOffset(e),a&&(s=this.GetFormatRangeAtIndex({hyperlink:a.id},e),e=s.start,s.end>=o&&(o=s.end+1,r=!0)),o>e+1&&!r&&(a=this.GetHyperlinkAtOffset(o-1),a&&(s=this.GetFormatRangeAtIndex({hyperlink:a.id},o-1),o=s.end+1)),e==o&&(n=this.GetWordAtIndex(e),e=n.start,o=n.end),e==o&&o++;for(let h=e;h<o;h++){let t=this.GetFormatAtOffset(h).style;t.hyperlink>=0&&this.RemoveHyperlink(t.hyperlink)}let l=this.rtData.hyperlinks.length;this.rtData.hyperlinks.push(t),i=o-e,this.SetFormat({hyperlink:l},e,i),LogUtil.Debug("B.Text.Formatter: SetHyperlink output:",{url:t,startOffset:e,length:i})}GetHyperlinkAtOffset(t){LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtOffset input:",t);const e=this.GetFormatAtOffset(t).style;let i=null;return void 0!==e.hyperlink&&e.hyperlink>=0&&e.hyperlink<this.rtData.hyperlinks.length&&(i={url:this.rtData.hyperlinks[e.hyperlink],id:e.hyperlink}),LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtOffset output:",i),i}GetHyperlinkAtPoint(t){LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtPoint input:",t);let e,i,n=-1;if(t.y<0||t.y>this.fmtText.height)return LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtPoint output:",null),null;for(e=0;e<this.renderedLines.length;e++)if(t.y>=this.renderedLines[e].top&&t.y<=this.renderedLines[e].bottom){if(t.x<this.renderedLines[e].left||t.x>this.renderedLines[e].right)break;for(i=0;i<this.renderedLines[e].runs.length;i++)if(t.x<=this.renderedLines[e].runs[i].right){n=this.renderedLines[e].runs[i].runRec.style;break}break}let s=null;if(n>=0){const t=this.fmtText.styles[n].hyperlink;void 0!==t&&t>=0&&t<this.rtData.hyperlinks.length&&(s={url:this.rtData.hyperlinks[t],id:t})}return LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtPoint output:",s),s}ClearHyperlink(t){LogUtil.Debug("B.Text.Formatter: ClearHyperlink input:",t);const e=this.GetHyperlinkAtOffset(t);e&&(this.RemoveHyperlink(e.id),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)),LogUtil.Debug("B.Text.Formatter: ClearHyperlink output:",this.fmtText)}RemoveHyperlink(t){if(LogUtil.Debug("B.Text.Formatter: RemoveHyperlink input:",t),t>=0&&t<this.rtData.hyperlinks.length){this.rtData.hyperlinks.splice(t,1);for(let e=0;e<this.rtData.styles.length;e++)this.rtData.styles[e].hyperlink===t?this.rtData.styles[e].hyperlink=-1:this.rtData.styles[e].hyperlink>t&&this.rtData.styles[e].hyperlink--}LogUtil.Debug("B.Text.Formatter: RemoveHyperlink output:",this.rtData.hyperlinks)}SetHyperlinkCursor(){let t,e,i,n;for(LogUtil.Debug("B.Text.Formatter: SetHyperlinkCursor input"),t=0;t<this.renderedLines.length;t++)for(e=0;e<this.renderedLines[t].runs.length;e++)i=this.renderedLines[t].runs[e].runRec.style,this.rtData.styles[i].hyperlink>=0&&(n=this.renderedLines[t].runs[e].elem,n&&n.node.setAttribute("class",CursorConstant.CursorType.Pointer));LogUtil.Debug("B.Text.Formatter: SetHyperlinkCursor output")}RenderFormattedText(t,e){let i,n,s,a,o,r,l,h,c,u;LogUtil.Debug("B.Text.Formatter: RenderFormattedText input:",{textContainer:t,formattingLayer:e});let d,p,g=[],f=[];(d=t.parent)&&(p=t.position(),d.remove(t)),t.clear(),t.attr("xml:space","preserve"),this.renderedLines=[],this.renderedDataFields=[],e.clear(),this.fmtText.paragraphs.forEach(((d,p)=>{r=null,"none"!==d.pStyle.bullet&&d.bindent&&(r={bullet:d.pStyle.bullet,xPos:0,yPos:d.yOffset,indent:d.bindent,height:d.height,ascent:d.height/2,hasText:!1,style:this.GetBulletStyle(p)}),d.lines.forEach(((e,b)=>{switch(s=0,a=e.width+d.bindent,o=this.fmtText.fmtWidth-(e.indent+d.pStyle.rindent),d.pStyle.just){case"center":s=(o-a)/2;break;case"right":s=o-a}s+=e.indent,r&&0===b&&(r.xPos=s,r.yPos=e.yOffset,r.ascent=e.ascent),s+=e.bindent,l={paraIndex:p,lineIndex:b,lineRec:e,left:s,right:s,top:e.yOffset,bottom:e.yOffset+e.height,dispStart:e.start,pStyle:d.pStyle,runs:[]};for(let t=0;t<e.spErrors.length;t++)f.push({x:s+e.spErrors[t].startPos,y:e.yOffset+e.ascent,width:e.spErrors[t].endPos-e.spErrors[t].startPos});for(let t=0;t<e.dataFields.length;t++)this.renderedDataFields.push({x:s+e.dataFields[t].startPos,y:e.yOffset,width:e.dataFields[t].endPos-e.dataFields[t].startPos,height:e.height,fieldID:e.dataFields[t].fieldID});e.runs.forEach(((a,o)=>{r&&(r.hasText=a.width>0),h=null,c=null,i=this.fmtText.styles[a.style],n=this.fmtText.text.substr(a.dispStart,a.dispLen);let d=!1,p=this.parent.dataStyleOverride||{};p._curFieldDecoration=null,p._curFieldStyle=null,a.dispLen>0&&!a.isTab&&(i.dataField&&(p._curFieldStyle=this.parent.GetDataStyle(i.dataField)),h=Formatter.CreateTextRunElem(n,i,this.parent.doc,this.parent.linksDisabled,p),h.attr("x",Utils1.RoundCoord(s)),h.attr("text-anchor","start"),h.attr("y",Utils1.RoundCoord(e.yOffset+e.ascent+a.extraYOffset)),h.attr("textLength",a.dispWidth),this.parent.linksDisabled||(this.AttachHyperlinkToRun(h,i)?d=!0:i.hyperlink=-1),t.add(h),c=this.parent.doc.GetTextRunCache(i,n));("underline"===(p._curFieldDecoration||i.decoration)||d)&&a.extraYOffset<=0&&(u=d?"#0000FF":i.color,g.push({x:s,y:e.yOffset+e.ascent,width:a.width,color:u})),l.runs.length||(l.dispStart=a.dispStart),l.runs.push({runIndex:o,runRec:a,left:s,right:s+a.width,isTab:a.isTab,elem:h,cache:c}),s+=a.width})),l.right=s,this.renderedLines.push(l)})),r&&r.hasText&&this.RenderBullet(r,e)}));for(let b=0;b<g.length;b++)this.RenderUnderline(g[b],e);if(this.SpellCheckValid())for(let b=0;b<f.length;b++)this.RenderSpellError(f[b],e);this.parent.IsActive()&&this.RenderDataFieldHilites(e),d&&d.add(t,p),LogUtil.Debug("B.Text.Formatter: RenderFormattedText output:",this.renderedLines)}AttachHyperlinkToRun(t,e){if(LogUtil.Debug("B.Text.Formatter: AttachHyperlinkToRun input:",{element:t,style:e}),void 0!==e.hyperlink&&e.hyperlink>=0&&e.hyperlink<this.fmtText.hyperlinks.length){const t=this.fmtText.hyperlinks[e.hyperlink];Utils1.ResolveHyperlinkForDisplay(t)}return LogUtil.Debug("B.Text.Formatter: AttachHyperlinkToRun output:",!1),!1}RenderUnderline(t,e){LogUtil.Debug("B.Text.Formatter: RenderUnderline input:",{underline:t,formattingLayer:e});const i=new T3Svg.Path,n=Utils1.RoundCoord(t.x),s=Utils1.RoundCoord(t.y)+2,a=Utils1.RoundCoord(t.width);i.plot(`M${n},${s}h${a}`),i.attr("stroke-width",1),i.attr("stroke",t.color),i.attr("fill","none"),e.add(i),LogUtil.Debug("B.Text.Formatter: RenderUnderline output")}RenderSpellError(t,e){LogUtil.Debug("B.Text.Formatter: RenderSpellError input:",{spellError:t,formattingLayer:e});const i=new T3Svg.Path;let n=t.x,s=t.y+2,a=1;const o=n+t.width;let r=`M${n},${s+a}`;for(;n<o;)r+=`L${n+=2},${s+=a=-a}`;i.plot(r),i.attr("stroke-width",1),i.attr("stroke-opacity",.7),i.attr("stroke","#FF0000"),i.attr("fill","none"),i.node.setAttribute("no-export","1"),e.add(i),LogUtil.Debug("B.Text.Formatter: RenderSpellError output")}RenderDataFieldHilites(t){let e,i,n;if(LogUtil.Debug("B.Text.Formatter: RenderDataFieldHilites input:",t),this.renderedDataFields){this.ClearDataFieldHilites(t);for(let s=0;s<this.renderedDataFields.length;s++)e=this.renderedDataFields[s],i=this.parent.GetDataText(e.fieldID,!0),n=new T3Svg.Container(T3Svg.create("rect")),n.move(e.x,e.y),n.size(e.width,e.height),n.attr("fill","#A6F8CD"),n.attr("stroke-width",0),n.attr("fill-opacity",.4),n.attr("pointer-events","fill"),n.node.setAttribute("no-export","1"),Instance.Basic.Element.SetTooltipOnElement(n,i),t.add(n),e.elem=n}LogUtil.Debug("B.Text.Formatter: RenderDataFieldHilites output")}ClearDataFieldHilites(t){if(LogUtil.Debug("B.Text.Formatter: ClearDataFieldHilites input:",t),this.renderedDataFields)for(let e=0;e<this.renderedDataFields.length;e++){const i=this.renderedDataFields[e].elem;i&&(t.remove(i),this.renderedDataFields[e].elem=null)}LogUtil.Debug("B.Text.Formatter: ClearDataFieldHilites output")}RenderBullet(t,e){LogUtil.Debug("B.Text.Formatter: RenderBullet input:",{bulletInfo:t,formattingLayer:e});let i,n,s,a=!1,o=!1;const r=Math.max(4,t.indent/2);switch(s=t.style.color,t.bullet){case"hround":i=this.parent.doc.CreateShape(OptConstant.CSType.Oval).SetSize(r,r),o=!0;break;case"sround":i=this.parent.doc.CreateShape(OptConstant.CSType.Oval).SetSize(r,r),a=!0;break;case"hsquare":i=this.parent.doc.CreateShape(OptConstant.CSType.Rect).SetSize(r,r),o=!0;break;case"ssquare":i=this.parent.doc.CreateShape(OptConstant.CSType.Rect).SetSize(r,r),a=!0;break;case"diamond":i=this.parent.doc.CreateShape(OptConstant.CSType.Polygon).SetPoints([{x:r/2,y:0},{x:r,y:r/2},{x:r/2,y:r},{x:0,y:r/2}]),a=!0;break;case"chevron":i=this.parent.doc.CreateShape(OptConstant.CSType.Polygon).SetPoints([{x:0,y:0},{x:r,y:r/2},{x:0,y:r},{x:r/2,y:r/2}]),a=!0;break;case"check":i=this.parent.doc.CreateShape(OptConstant.CSType.Polyline).SetPoints([{x:0,y:r-r/4},{x:r/4,y:r},{x:r,y:0}]),o=!0;break;case"plus":n=this.parent.doc.CreateShape(OptConstant.CSType.Path).PathCreator(),n.MoveTo(0,r/2).LineTo(r,r/2),n.MoveTo(r/2,0).LineTo(r/2,r),n.Apply(),i=n,o=!0}if(i){const n=(t.indent-r)/2,l=r<t.ascent?t.ascent-r:r<t.height?0:(t.height-r)/2;i.SetPos(t.xPos+n,t.yPos+l),a?i.SetFillColor(s):i.SetFillColor("none"),o?i.SetStrokeColor(s).SetStrokeWidth(1):i.SetStrokeColor("none").SetStrokeWidth(0),e.add(i.svgObj)}LogUtil.Debug("B.Text.Formatter: RenderBullet output")}SetRuntimeCharFormat(t,e,i){LogUtil.Debug("B.Text.Formatter: SetRuntimeCharFormat input:",{charIndex:t,format:e,apply:i});let n=this.GetFormatAtOffset(t).style,s=this.MergeStyles(e,n),a=this.FindAddStyle(s);return i&&(this.rtData.charStyles[t]=a),LogUtil.Debug("B.Text.Formatter: SetRuntimeCharFormat output:",a),a}CalcFromRuntime(t,e){LogUtil.Debug("B.Text.Formatter: CalcFromRuntime input:",{runtimeData:t,limits:e});let i=new DefaultFmtText,n=e?e.maxWidth:0,s=e?e.minWidth:0,a=0,o=null;if(i.text=String(t.text),t.styles.forEach((t=>{i.styles.push(t)})),i.hyperlinks=Utils1.CopyObj(t.hyperlinks),n||(n=32e3),i.fmtWidth=s,this.renderingEnabled){let e=Math.max(this.GetBulletIndent(),8);i.width=0,i.dispMinWidth=0,t.styleRuns.forEach(((s,r)=>{let l={pStyle:Utils1.CopyObj(s.pStyle),width:0,height:0,start:s.start,length:s.nChars,bindent:0,yOffset:a,dispMinWidth:0,lines:[]},h=0;l.pStyle.bullet&&"none"!==l.pStyle.bullet&&(h=e);let c=h/2+2;l.bindent=h,o||(o=new T3Svg.Container(T3Svg.create("text")),o.attr("xml:space","preserve"),o.attr("fill-opacity",0),this.parent.doc.GetFormattingLayer().svgObj.add(o));let u,d=this.CalcParagraphRunMetrics(t,s,o,this.parent.doc.GetFormattingLayer()),p=null;do{let e=l.lines.length?l.pStyle.lindent:l.pStyle.pindent;h&&(e=0);let i=n-(h+l.pStyle.rindent+e);if(u=this.BuildLineForDisplay(d,i,p,l.pStyle),u.runs.length){let i={width:0,height:0,start:s.start,length:0,bindent:l.bindent,indent:e,yOffset:a,ascent:0,descent:0,dispMinWidth:0,runs:[],spErrors:[],dataFields:[]};if(e+=h,l.lines.length&&(i.start=u.runs[0].start),u.runs.forEach((e=>{let n=e.source;delete e.source,i.runs.push(e),t.spErrors&&n&&e.extraYOffset<=0&&!e.isTab&&t.spErrors.forEach((t=>{let s=t.startIndex,a=t.startIndex+t.nChars-1;if(s<e.dispStart+e.dispLen&&a>=e.dispStart){let t={startIndex:Math.max(s,e.dispStart),endIndex:Math.min(a,e.dispStart+e.dispLen-1),startPos:0,endPos:0},o=t.startIndex-e.start+n.startRunChar;t.startPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,o,!0,n.cache);let r=t.endIndex-e.start+n.startRunChar;t.endPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,r,!1,n.cache),i.spErrors.push(t)}})),t.dataFields&&n&&!e.isTab&&t.dataFields.forEach((t=>{let s=t.startIndex,a=t.startIndex+t.nChars-1;if(s<e.dispStart+e.dispLen&&a>=e.dispStart){let o={fieldID:t.fieldID,startIndex:Math.max(s,e.dispStart),endIndex:Math.min(a,e.dispStart+e.dispLen-1),startPos:0,endPos:0},r=o.startIndex-e.start+n.startRunChar;o.startPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,r,!0,n.cache);let l=o.endIndex-e.start+n.startRunChar;o.endPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,l,!1,n.cache),i.dataFields.push(o)}})),i.descent=Math.max(i.descent,e.descent),i.ascent=Math.max(i.ascent,e.ascent),i.length+=e.length,i.width+=e.width,i.dispMinWidth+=e.dispMinWidth})),i.height=i.ascent+i.descent,r<t.styleRuns.length-1||u.nextRunInfo&&u.runs.length)if(l.pStyle.spacing<0){let t=-l.pStyle.spacing-i.height;t>0&&(i.height+=t)}else i.height+=i.height*l.pStyle.spacing;l.width=Math.max(l.width,i.width+e),l.dispMinWidth=Math.max(l.dispMinWidth,i.dispMinWidth+e),l.height+=i.height,a+=i.height,l.lines.push(i)}p=u.nextRunInfo}while(p&&u.runs.length);if(this.parent.doc.GetFormattingLayer().svgObj.remove(o),i.height+=l.height,h>0&&l.lines.length&&l.height<c){let t=(c-l.height)/2;l.lines.forEach((e=>{e.yOffset+=t})),a+=c-l.height,i.height+=c-l.height}i.paragraphs.push(l),i.width=Math.max(i.width,l.width),i.dispMinWidth=Math.max(i.dispMinWidth,l.dispMinWidth)})),i.fmtWidth=Math.max(i.fmtWidth,i.width)}else this.deferredRenderNeeded=!0;return LogUtil.Debug("B.Text.Formatter: CalcFromRuntime output:",i),i}BuildLineForDisplay(t,e,i,n){LogUtil.Debug("B.Text.Formatter: BuildLineForDisplay input:",{paragraphRunMetrics:t,availableWidth:e,nextRunInfo:i,paragraphStyle:n});let s=0,a=0,o=0,r=0,l=!i;i&&(s=i.curRun||0,a=i.curChar||0,o=i.curPos||0,a<t[s].startDispIndex&&(a=t[s].startDispIndex),o<t[s].startDispPos&&(o=t[s].startDispPos),i=null);const h={runs:[],nextRunInfo:null},c={runIndex:-1,startChar:0,endChar:0,startPos:0,endPos:0,isRunEnd:!1,breakRec:null};for(;s<t.length;){const i=t[s],l=Math.max(i.endDispPos-o,0);if(l>e)break;const u={width:Math.min(i.width-o,e),height:i.runRT.metrics.height,start:i.startIndex+a,length:i.nChars-a,dispStart:i.startIndex+a,dispLen:Math.max(i.endDispIndex-a,0),dispWidth:l,dispMinWidth:l,space:i.runRT.metrics.width,ascent:i.runRT.metrics.ascent,descent:i.runRT.metrics.descent,extraYOffset:i.runRT.metrics.extraYOffset,isTab:i.isTab,style:i.runRT.style,source:{runElem:i.runElem,cache:i.cache,startRunChar:a,startRunPos:o}};if(u.isTab&&n.tabspace>0){const t=r-r%n.tabspace;u.width=t+n.tabspace*u.length-r}if(i.hasCR&&u.length++,u.width>0){const t=i.breaks[i.breaks.length-1];t&&t.startIndex>=a&&(c.runIndex=h.runs.length,c.startChar=t.startIndex-a,c.endChar=t.endIndex-a,c.startPos=t.startPos-o,c.endPos=t.endPos-o,c.breakRec=t,c.rtRunIndex=s,c.rtRunPos=o,c.rtRunChar=a,c.isRunEnd=t.endIndex===i.nChars),h.runs.push(u)}e-=u.width,r+=u.width,s++,o=0,a=0}if(s<t.length){if(i={curRun:s,curChar:a,curPos:o},e>0){const n=t[s];let r=null;for(let t=n.breaks.length-1;t>=0;t--){const s=n.breaks[t];if(s.startPos-o<=e){i.curChar=s.endIndex,i.curPos=s.endPos,r={width:Math.min(i.curPos-o,e),height:n.runRT.metrics.height,start:n.startIndex+a,length:i.curChar-a,dispStart:n.startIndex+a,dispLen:s.startIndex-a,dispWidth:s.startPos-o,dispMinWidth:s.startPos-o,space:n.runRT.metrics.width,ascent:n.runRT.metrics.ascent,descent:n.runRT.metrics.descent,extraYOffset:n.runRT.metrics.extraYOffset,isTab:n.isTab,style:n.runRT.style,source:{runElem:n.runElem,cache:n.cache,startRunChar:a,startRunPos:o}},h.runs.push(r);break}}if(!r)if(c.runIndex>=0){if(!c.isRunEnd){for(;h.runs.length>c.runIndex+1;)h.runs.pop();r=h.runs[c.runIndex],r.width=c.endPos,r.length=c.endChar,r.dispLen=c.startChar,r.dispWidth=c.startPos,r.dispMinWidth=c.startPos,i.curRun=c.rtRunIndex,i.curChar=c.endChar+c.rtRunChar,i.curPos=c.endPos+c.rtRunPos}}else{r={width:0,height:n.runRT.metrics.height,start:n.startIndex+a,length:0,dispStart:n.startIndex+a,dispLen:0,dispWidth:0,dispMinWidth:0,space:n.runRT.metrics.width,ascent:n.runRT.metrics.ascent,descent:n.runRT.metrics.descent,extraYOffset:n.runRT.metrics.extraYOffset,isTab:n.isTab,style:n.runRT.style,source:{runElem:n.runElem,cache:n.cache,startRunChar:a,startRunPos:o}};let t=0;for(;a<n.nChars&&t<e;)t=Formatter.GetRunPositionForChar(n.runElem.node,a,!1,n.cache)-o,(t<=e||!h.runs.length&&!r.length)&&(r.width=t,r.dispWidth=t,r.dispMinWidth=t,r.length++,r.dispLen++,a++,i.curChar++,i.curPos=o+t);r.length&&h.runs.push(r)}}}else if(t.length>0&&!h.runs.length&&l){const e=t[0],i={width:0,height:e.runRT.metrics.height,start:e.startIndex,length:0,dispStart:e.startIndex,dispLen:0,dispWidth:0,dispMinWidth:0,space:e.runRT.metrics.width,ascent:e.runRT.metrics.ascent,descent:e.runRT.metrics.descent,extraYOffset:e.runRT.metrics.extraYOffset,isTab:e.isTab,style:e.runRT.style,source:{runElem:e.runElem,cache:e.cache,startRunChar:0,startRunPos:0}};e.hasCR&&i.length++,h.runs.push(i)}return h.nextRunInfo=i,LogUtil.Debug("B.Text.Formatter: BuildLineForDisplay output:",h),h}CalcParagraphRunMetrics(t,e,i,n){LogUtil.Debug("B.Text.Formatter: CalcParagraphRunMetrics input:",{runtimeData:t,styleRun:e,formattingLayer:i,docFormattingLayer:n});const s=/(\s+)/g,a=/(\t+)/g;let o=[],r=[];for(let l=0;l<e.runs.length;l++){const i=e.runs[l].start,n=e.runs[l].nChars,s=e.runs[l].style;let o,h=[],c=n?t.text.substr(i,n):"";for(;null!==(o=a.exec(c));)h.push({start:o.index,end:o.index+o[0].length,nChars:o[0].length});if(h.length){h[0].start>0&&r.push({start:i,nChars:h[0].start,style:s,metrics:e.runs[l].metrics});for(let t=0;t<h.length;t++)r.push({start:i+h[t].start,nChars:h[t].nChars,style:s,metrics:e.runs[l].metrics,isTab:!0}),h[t].end<n&&(t<h.length-1?r.push({start:i+h[t].end,nChars:h[t+1].start-h[t].end,style:s,metrics:e.runs[l].metrics}):r.push({start:i+h[t].end,nChars:n-h[t].end,style:s,metrics:e.runs[l].metrics}))}else r.push({start:i,nChars:n,style:s,metrics:e.runs[l].metrics})}for(let l=0;l<r.length;l++){const e=r[l].start;let n=r[l].nChars;const a=t.styles[r[l].style],h=n&&"\n"===t.text[e+n-1];h&&n--;let c,u=n?t.text.substr(e,n):"",d=[];for(;null!==(c=s.exec(u));)d.push({startIndex:c.index,endIndex:c.index+c[0].length,startPos:0,endPos:0});let p={startIndex:e,endIndex:e+n,nChars:n,style:a,breaks:d,str:u,startDispIndex:0,endDispIndex:n,width:0,startDispPos:0,endDispPos:0,hasCR:h,runRT:r[l],isTab:r[l].isTab};d.length&&!a.dataField&&(0===d[0].startIndex&&(p.startDispIndex=d[0].endIndex),d[d.length-1].endIndex===n&&(p.endDispIndex=d[d.length-1].startIndex));let g=null,f=null;n&&!p.isTab&&(u+=".",g=Formatter.CreateTextRunElem(u,a,this.parent.doc,this.parent.linksDisabled,null),g.attr("x",0),g.attr("text-anchor","start"),g.attr("y",0),i.add(g),f=this.parent.doc.GetTextRunCache(a,u)),p.runElem=g,p.cache=f,o.push(p)}n.svgObj.add(i);for(let l=0;l<o.length;l++){const t=o[l],e=t.runElem;if(e){const i=t.endIndex-t.startIndex-1,n=Formatter.GetRunPositionForChar(e.node,i,!1,t.cache);t.width=n,t.endDispPos=n;for(let s=0;s<t.breaks.length;s++){const i=t.breaks[s];if(i.startIndex>0){const n=Formatter.GetRunPositionForChar(e.node,i.startIndex,!0,t.cache);i.startPos=n}if(i.endIndex===t.nChars)i.endPos=n;else{const n=Formatter.GetRunPositionForChar(e.node,i.endIndex,!0,t.cache);i.endPos=n}0!==s||0!==i.startIndex||t.style.dataField||(t.startDispPos=i.endPos),s!==t.breaks.length-1||i.endIndex!==t.nChars||t.style.dataField||(t.endDispPos=i.startPos)}}}return LogUtil.Debug("B.Text.Formatter: CalcParagraphRunMetrics output:",o),o}GetTextParagraphCount(t){LogUtil.Debug("B.Text.Formatter: GetTextParagraphCount input:",t);let e=1;const i=t.match(/\n/g);return i&&(e+=i.length),LogUtil.Debug("B.Text.Formatter: GetTextParagraphCount output:",e),e}MergeParagraphInfo(t,e,i){LogUtil.Debug("B.Text.Formatter: MergeParagraphInfo input:",{paragraphStyles:t,startOffset:e,length:i});let n,s=this.GetParagraphAtOffset(e),a=this.GetParagraphAtOffset(e+i),o=[];s<0&&(s=0,a=0);for(let r=0;r<s;r++)o.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[r].pStyle)});s<this.rtData.styleRuns.length&&(!t.length||e!==this.rtData.styleRuns[s].start||i<this.rtData.styleRuns[s].nChars-1||i<this.rtData.styleRuns[s].nChars&&s===this.rtData.styleRuns.length-1)&&(n={pStyle:Utils1.CopyObj(this.rtData.styleRuns[s].pStyle)}),void 0===n&&t.length>0&&(n=t[0]),void 0!==n&&o.push(n);for(let r=1;r<t.length;r++)o.push(t[r]);for(let r=a+1;r<this.rtData.styleRuns.length;r++)o.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[r].pStyle)});return LogUtil.Debug("B.Text.Formatter: MergeParagraphInfo output:",o),o}BuildRuntimeRuns(t,e){LogUtil.Debug("B.Text.Formatter: BuildRuntimeRuns input:",{runtimeData:t,paragraphStyles:e});let i=[],n=this.DefaultPStyle(),s=t.text.length;i.push(0);for(let a=0;a<s;a++)"\n"===t.text[a]&&i.push(a+1);if(t.styleRuns=[],t.spErrors=[],t.dataFields=[],this.parent.doc)for(let a=0;a<i.length;a++){let o=i[a],r=a<i.length-1?i[a+1]-o:s-o,l=t.styleRuns.length<e.length?t.styleRuns.length:0,h=e[l]?e[l].pStyle:n,c={pStyle:Utils1.CopyObj(h),runs:[],start:o,nChars:r};if(this.renderingEnabled)if(r){let e=null,i=null,n=null;for(let s=o;s<o+r;s++){let a=this.GetFormatAtOffset(s,t);if(e&&this.MatchStylesNoSpell(a.style,e.style))c.runs[c.runs.length-1].nChars++;else{let t={style:a.id,start:s,nChars:1,metrics:this.parent.doc.CalcStyleMetrics(a.style)};c.runs.push(t)}e=a,a.style.spError?i?i.nChars++:(i={startIndex:s,nChars:1},t.spErrors.push(i)):i=null,a.style.dataField?n&&n.fieldID===a.style.dataField?n.nChars++:(n={fieldID:a.style.dataField,startIndex:s,nChars:1},t.dataFields.push(n)):n=null}}else{let e=this.GetFormatAtOffset(o,t),i={style:e.id,start:o,nChars:0,metrics:this.parent.doc.CalcStyleMetrics(e.style)};c.runs.push(i)}else this.deferredRenderNeeded=!0;t.styleRuns.push(c)}LogUtil.Debug("B.Text.Formatter: BuildRuntimeRuns output:",t.styleRuns)}GetBulletPIndex(){LogUtil.Debug("B.Text.Formatter: GetBulletPIndex input");let t=0;if(this.rtData.styleRuns)for(let e=0;e<this.rtData.styleRuns.length;e++){const i=this.rtData.styleRuns[e].pStyle;if(i&&i.bullet&&"none"!==i.bullet){t=e;break}}return LogUtil.Debug("B.Text.Formatter: GetBulletPIndex output:",t),t}GetBulletIndent(){LogUtil.Debug("B.Text.Formatter: GetBulletIndent input");let t=0;const e=this.GetBulletPIndex();return this.rtData.styleRuns&&e<this.rtData.styleRuns.length&&this.rtData.styleRuns[e].runs&&this.rtData.styleRuns[e].runs.length&&(t=this.rtData.styleRuns[e].runs[0].metrics.ascent),LogUtil.Debug("B.Text.Formatter: GetBulletIndent output:",t),t}GetBulletStyle(t){LogUtil.Debug("B.Text.Formatter: GetBulletStyle input:",t);let e=new DefaultStyle;if((void 0===t||t<0||this.rtData.styleRuns&&t>=this.rtData.styleRuns.length)&&(t=this.GetBulletPIndex()),this.rtData.styleRuns&&t<this.rtData.styleRuns.length&&this.rtData.styleRuns[t].runs&&this.rtData.styleRuns[t].runs.length){const i=this.rtData.styleRuns[t].runs[0].style;e=this.rtData.styles[i]}return LogUtil.Debug("B.Text.Formatter: GetBulletStyle output:",e),e}FindAddStyle(t,e){LogUtil.Debug("B.Text.Formatter: FindAddStyle input:",{style:t,skipAdd:e});let i=-1;const n=this.rtData.styles.length;if(!t)return LogUtil.Debug("B.Text.Formatter: FindAddStyle output:",0),0;for(let s=0;s<n;s++)if(this.MatchStyles(t,this.rtData.styles[s])){i=s;break}return i<0&&!e&&(this.rtData.styles.push(t),i=n),LogUtil.Debug("B.Text.Formatter: FindAddStyle output:",i),i}TrimUnusedStyles(t){LogUtil.Debug("B.Text.Formatter: TrimUnusedStyles input:",t);let e=[],i=[];const n=t.styles.length,s=t.charStyles.length;if(n){e=new Array(n).fill(!1);for(let i=0;i<s;i++)e[t.charStyles[i]]=!0;for(let a=0;a<n;a++)if(e[a]){const e=i.length;i.push(t.styles[a]);for(let i=0;i<s;i++)t.charStyles[i]===a&&(t.charStyles[i]=e)}!i.length&&t.styles.length>0&&i.push(t.styles[t.styles.length-1]),t.styles=i}LogUtil.Debug("B.Text.Formatter: TrimUnusedStyles output:",t)}MergeStyles(t,e){LogUtil.Debug("B.Text.Formatter: MergeStyles input:",{newStyle:t,baseStyle:e});const i={font:void 0!==t.font?t.font:e.font,type:void 0!==t.type?t.type:e.type,size:void 0!==t.size?t.size:e.size,weight:void 0!==t.weight?t.weight:e.weight,style:void 0!==t.style?t.style:e.style,baseOffset:void 0!==t.baseOffset?t.baseOffset:e.baseOffset,decoration:void 0!==t.decoration?t.decoration:e.decoration,spError:void 0!==t.spError?t.spError:e.spError,color:void 0!==t.color?t.color:e.color,colorTrans:void 0!==t.colorTrans?t.colorTrans:e.colorTrans,dataField:void 0!==t.dataField?t.dataField:e.dataField,hyperlink:void 0!==t.hyperlink?t.hyperlink:e.hyperlink};return LogUtil.Debug("B.Text.Formatter: MergeStyles output:",i),i}AndStyles(t,e){LogUtil.Debug("B.Text.Formatter: AndStyles input:",{style1:t,style2:e});const i={font:t.font===e.font?t.font:void 0,type:t.type===e.type?t.type:void 0,size:t.size===e.size?t.size:void 0,weight:t.weight===e.weight?t.weight:void 0,style:t.style===e.style?t.style:void 0,baseOffset:t.baseOffset===e.baseOffset?t.baseOffset:void 0,decoration:t.decoration===e.decoration?t.decoration:void 0,spError:t.spError===e.spError?t.spError:void 0,color:t.color===e.color?t.color:void 0,colorTrans:t.colorTrans===e.colorTrans?t.colorTrans:void 0,dataField:t.dataField===e.dataField?t.dataField:void 0,hyperlink:t.hyperlink===e.hyperlink?t.hyperlink:void 0};return LogUtil.Debug("B.Text.Formatter: AndStyles output:",i),i}MatchStyles(t,e){LogUtil.Debug("B.Text.Formatter: MatchStyles input:",{style1:t,style2:e});const i=t.font===e.font&&t.type===e.type&&t.size===e.size&&t.weight===e.weight&&t.style===e.style&&t.baseOffset===e.baseOffset&&t.decoration===e.decoration&&t.spError===e.spError&&t.color===e.color&&t.colorTrans===e.colorTrans&&t.dataField===e.dataField&&t.hyperlink===e.hyperlink;return LogUtil.Debug("B.Text.Formatter: MatchStyles output:",i),i}MatchStylesNoSpell(t,e){LogUtil.Debug("B.Text.Formatter: MatchStylesNoSpell input:",{style1:t,style2:e});const i=t.font===e.font&&t.type===e.type&&t.size===e.size&&t.weight===e.weight&&t.style===e.style&&t.baseOffset===e.baseOffset&&t.decoration===e.decoration&&t.color===e.color&&t.colorTrans===e.colorTrans&&t.dataField===e.dataField&&t.hyperlink===e.hyperlink;return LogUtil.Debug("B.Text.Formatter: MatchStylesNoSpell output:",i),i}MatchPartialStyles(t,e){LogUtil.Debug("B.Text.Formatter: MatchPartialStyles input:",{style1:t,style2:e});const i=!(void 0!==t.font&&void 0!==e.font&&t.font!==e.font||void 0!==t.type&&void 0!==e.type&&t.type!==e.type||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.weight&&void 0!==e.weight&&t.weight!==e.weight||void 0!==t.style&&void 0!==e.style&&t.style!==e.style||void 0!==t.baseOffset&&void 0!==e.baseOffset&&t.baseOffset!==e.baseOffset||void 0!==t.decoration&&void 0!==e.decoration&&t.decoration!==e.decoration||void 0!==t.spError&&void 0!==e.spError&&t.spError!==e.spError||void 0!==t.color&&void 0!==e.color&&t.color!==e.color||void 0!==t.colorTrans&&void 0!==e.colorTrans&&t.colorTrans!==e.colorTrans||void 0!==t.dataField&&void 0!==e.dataField&&t.dataField!==e.dataField||void 0!==t.hyperlink&&void 0!==e.hyperlink&&t.hyperlink!==e.hyperlink);return LogUtil.Debug("B.Text.Formatter: MatchPartialStyles output:",i),i}DefaultPStyle(){return{just:"left",bullet:"none",spacing:0,pindent:0,lindent:0,rindent:0,tabspace:0}}SetDataNameDisplay(t){LogUtil.Debug("B.Text.Formatter: SetDataNameDisplay input:",t),this.dataNameEnabled=t,LogUtil.Debug("B.Text.Formatter: SetDataNameDisplay output:",this.dataNameEnabled)}GetDataNameDisplay(){LogUtil.Debug("B.Text.Formatter: GetDataNameDisplay input");const t=this.dataNameEnabled;return LogUtil.Debug("B.Text.Formatter: GetDataNameDisplay output:",t),t}GetDataField(t){if(LogUtil.Debug("B.Text.Formatter: GetDataField input:",t),!this.HasDataFields()||!this.IsDataFieldAtPos(t))return LogUtil.Debug("B.Text.Formatter: GetDataField output:",null),null;let e=null;for(let i=0;i<this.rtData.dataFields.length;i++){const n=this.rtData.dataFields[i].startIndex,s=n+this.rtData.dataFields[i].nChars;if(t>=n&&t<s){e={fieldID:this.rtData.dataFields[i].fieldID,startPos:n,endPos:s};break}}return LogUtil.Debug("B.Text.Formatter: GetDataField output:",e),e}IsDataFieldAtPos(t){LogUtil.Debug("B.Text.Formatter: IsDataFieldAtPos input:",t);const e=!!this.GetFormatAtOffset(t).style.dataField;return LogUtil.Debug("B.Text.Formatter: IsDataFieldAtPos output:",e),e}IsDataFieldInRange(t,e){if(LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange input:",{startIndex:t,endIndex:e}),!this.HasDataFields())return LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange output:",!1),!1;for(let i=t;i<=e;i++)if(this.IsDataFieldAtPos(i))return LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange output:",!0),!0;return LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange output:",!1),!1}HasDataFields(){LogUtil.Debug("B.Text.Formatter: HasDataFields input");const t=this.rtData.dataFields&&this.rtData.dataFields.length>0;return LogUtil.Debug("B.Text.Formatter: HasDataFields output:",t),t}HasDataField(t){if(LogUtil.Debug("B.Text.Formatter: HasDataField input:",t),!this.HasDataFields())return LogUtil.Debug("B.Text.Formatter: HasDataField output:",!1),!1;const e=Formatter.FormatDataFieldID(t,!1);for(let i=0;i<this.rtData.dataFields.length;i++)if(Formatter.FormatDataFieldID(this.rtData.dataFields[i].fieldID,!1)===e)return LogUtil.Debug("B.Text.Formatter: HasDataField output:",!0),!0;return LogUtil.Debug("B.Text.Formatter: HasDataField output:",!1),!1}ClearDataFieldRun(t){if(LogUtil.Debug("B.Text.Formatter: ClearDataFieldRun input:",t),this.HasDataFields())if(t){for(let e=0;e<this.rtData.dataFields.length;e++)if(Formatter.FormatDataFieldID(this.rtData.dataFields[e].fieldID,!1)===t){const t=this.rtData.dataFields[e].startIndex,i=this.rtData.dataFields[e].nChars;this.SetFormat({dataField:null},t,i)}}else this.SetFormat({dataField:null});LogUtil.Debug("B.Text.Formatter: ClearDataFieldRun output")}RebuildFromData(){if(LogUtil.Debug("B.Text.Formatter: RebuildFromData input"),this.HasDataFields()){const t=Utils1.CopyObj(this.rtData.dataFields);for(let e=t.length-1;e>=0;e--){const i=t[e].fieldID,n=this.parent.GetDataText(i,this.dataNameEnabled),s=t[e].startIndex,a=t[e].nChars,o=n&&n.length?{dataField:i}:null;this.SetText(n,o,s,a,!0)}}LogUtil.Debug("B.Text.Formatter: RebuildFromData output")}RemapDataFields(t){if(LogUtil.Debug("B.Text.Formatter: RemapDataFields input:",t),this.HasDataFields()){const e=e=>{const[i,n]=e.split("_");for(let s=0;s<t.length;s++)if(t[s].srcFieldID===i)return`${t[s].dstFieldID}_${n}`;return e};if(this.rtData){for(let t=0;t<this.rtData.styles.length;t++)this.rtData.styles[t].dataField&&(this.rtData.styles[t].dataField=e(this.rtData.styles[t].dataField));for(let t=0;t<this.rtData.dataFields.length;t++)this.rtData.dataFields[t].fieldID&&(this.rtData.dataFields[t].fieldID=e(this.rtData.dataFields[t].fieldID))}if(this.fmtText){for(let t=0;t<this.fmtText.styles.length;t++)this.fmtText.styles[t].dataField&&(this.fmtText.styles[t].dataField=e(this.fmtText.styles[t].dataField));this.fmtText.paragraphs.forEach((t=>{t.lines.forEach((t=>{for(let i=0;i<t.dataFields.length;i++)t.dataFields[i].fieldID&&(t.dataFields[i].fieldID=e(t.dataFields[i].fieldID))}))}))}if(this.renderedDataFields)for(let t=0;t<this.renderedDataFields.length;t++)this.renderedDataFields[t].fieldID&&(this.renderedDataFields[t].fieldID=e(this.renderedDataFields[t].fieldID))}LogUtil.Debug("B.Text.Formatter: RemapDataFields output")}static CreateTextRunElem(t,e,i,n,s){LogUtil.Debug("B.Text.Formatter: CreateTextRunElem input:",{text:t,style:e,doc:i,linksDisabled:n,fieldStyleOverride:s});let a=1;const o=new T3Svg.Container(T3Svg.create("tspan"));let r=String(t).replace(/\n/g,"");r.length||(r="."),o.node.textContent=r.replace(/ /g," "),o.attr("xml:space","preserve"),o.attr("text-rendering","optimizeSpeed");let l=e.color,h=e.weight,c=e.style,u=e.decoration;const d=e.hyperlink>=0;if(s&&(s.textColor&&(l=s.textColor),s._curFieldStyle)){const t=s._curFieldStyle;for(let e=0;e<t.length;e++)switch(t[e].name){case"color":l=t[e].val;break;case"font-weight":h=t[e].val;break;case"font-style":c=t[e].val;break;case"text-decoration":"underline"===t[e].val?(s._curFieldDecoration=t[e].val,u=null):u=t[e].val}}if(e){"sub"!==e.baseOffset&&"super"!==e.baseOffset||(a=.8);for(const t in e)switch(t){case"font":e.mappedFont||(e.mappedFont=[]),$$1(o.node).css("font-family",e.mappedFont);break;case"size":let i=e[t];isNaN(i)||(i*=a,o.attr("font-size",i));break;case"weight":o.attr("font-weight",h);break;case"style":o.attr("font-style",c);break;case"decoration":u&&o.attr("text-decoration",u);break;case"color":d&&!n||o.attr("fill",l);break;case"colorTrans":o.attr("opacity",e[t])}d&&!n&&o.attr("fill","#0000FF")}return LogUtil.Debug("B.Text.Formatter: CreateTextRunElem output:",o),o}static GetRunPositionForChar(t,e,i,n,s){if(LogUtil.Debug("B.Text.Formatter: GetRunPositionForChar input:",{element:t,charIndex:e,isStart:i,cache:n,offset:s}),e<0)return-1;let a;if(s=s||0,n&&n.startOffsets&&n.endOffsets&&n.startOffsets.length>e){a=(i?n.startOffsets:n.endOffsets)[e]}if(void 0===a){a=-1;try{if(a=(i?t.getStartPositionOfChar(e):t.getEndPositionOfChar(e)).x-s,n){(i?n.startOffsets:n.endOffsets)[e]=a}}catch(o){throw o}}return LogUtil.Debug("B.Text.Formatter: GetRunPositionForChar output:",a),a}static CalcStyleMetrics(t,e){LogUtil.Debug("B.Text.Formatter: CalcStyleMetrics input:",{style:t,doc:e});let i=null;const n={height:0,width:0,ascent:0,descent:0,extraYOffset:0};let s=!1,a=!1;const o=new T3Svg.Container(T3Svg.create("text"));o.attr("xml:space","preserve"),o.attr("text-anchor","start");const r=Formatter.CreateTextRunElem(" .",t,e,!1,null);o.add(r),o.attr("fill-opacity",0);const l=e.GetFormattingLayer();l.svgObj.add(o);const h=o.node.getExtentOfChar(0);if(l.svgObj.remove(o),n.height=h.height,n.width=h.width,n.ascent=-h.y,n.descent=n.height-n.ascent,n.extraYOffset=0,t&&(s="sub"===t.baseOffset,a="super"===t.baseOffset),s||a){i=Utils1.CopyObj(t),i.baseOffset=void 0;const s=e.CalcStyleMetrics(i);if(a){const t=s.ascent/2,e=t+n.ascent+s.descent;e>s.height&&(s.height=e),n.height=s.height,n.ascent=s.height-s.descent,n.descent=s.descent,n.extraYOffset=-t}else{const t=n.ascent/2;s.descent<n.descent+t&&(s.descent=n.descent+t),n.height=s.ascent+s.descent,n.ascent=s.ascent,n.descent=s.descent,n.extraYOffset=t}}return LogUtil.Debug("B.Text.Formatter: CalcStyleMetrics output:",n),n}static MakeIDFromStyle(t){LogUtil.Debug("B.Text.Formatter: MakeIDFromStyle input:",t);const e=(t.font+"_"+t.size+"_"+t.weight+"_"+t.style+"_"+t.baseOffset).replace(/ /g,"");return LogUtil.Debug("B.Text.Formatter: MakeIDFromStyle output:",e),e}static FindPrevNextWord(t,e,i){LogUtil.Debug("B.Text.Formatter: FindPrevNextWord input:",{text:t,position:e,isPrevious:i});const n=t.length,s=/[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/,a=/[`~!@#$%\^&?*()_\-+={}\[\]|\\;:'",.<>\/]/,o=/[^\s`~!@#$%\^&?*()_\-+={}\[\]|\\;:'",.<>\/]/,r=t=>s.test(t)?s:a.test(t)?a:o.test(t)?o:null;let l;if(i&&e>0){for(e--;s.test(t[e])&&e>0;)e--;if(l=r(t[e]),l&&e>0)for(;l.test(t[e-1])&&e>0;)e--}else if(e<n){for(l=r(t[e]);l&&l.test(t[e])&&e<n;)e++;for(!l&&e<n&&e++;s.test(t[e])&&e<n;)e++}return LogUtil.Debug("B.Text.Formatter: FindPrevNextWord output:",e),e}static FormatDataFieldID(t,e){LogUtil.Debug("B.Text.Formatter: FormatDataFieldID input:",{fieldID:t,generateUnique:e});let i=t;const n=i.indexOf("_")>0;return e?n||(i+="_"+Utils3.MakeShortUniqueID()):n&&(i=i.split("_")[0]),LogUtil.Debug("B.Text.Formatter: FormatDataFieldID output:",i),i}}class Edit{constructor(t){__publicField(this,"parent"),__publicField(this,"isActive"),__publicField(this,"selStart"),__publicField(this,"selEnd"),__publicField(this,"selAnchor"),__publicField(this,"inActiveSel"),__publicField(this,"activeSelPos"),__publicField(this,"cursorPos"),__publicField(this,"cursorLine"),__publicField(this,"curHit"),__publicField(this,"lastClickTime"),__publicField(this,"inWordSelect"),__publicField(this,"anchorWord"),__publicField(this,"savedCursorState"),__publicField(this,"TableDrag"),__publicField(this,"virtualKeyboardHook"),__publicField(this,"activateInit"),__publicField(this,"lastKeyProcessed"),__publicField(this,"textEntryField"),__publicField(this,"textEntrySelStart"),__publicField(this,"textEntrySelEnd"),__publicField(this,"inputFocusTimer"),this.parent=t,this.isActive=!1,this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.inActiveSel=!1,this.activeSelPos=-1,this.cursorPos=-1,this.cursorLine=void 0,this.curHit=null,this.lastClickTime=0,this.inWordSelect=!1,this.anchorWord=null,this.savedCursorState=this.parent.cursorState,this.TableDrag=!1}BeginTableDrag(){this.TableDrag=!0,this.DeactivateCursor(),this.ClearSelection(),this.parent.SetSelectionVisible(!1),this.parent.ClearDataFieldHilites(),this.curHit=null}SetVirtualKeyboardHook(t,e){this.virtualKeyboardHook=t,this.InitTextEntry(e)}Activate(t,e){this.isActive=!0,this.inActiveSel=!1,this.lastClickTime=0,this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.parent.decorationAreaElem.attr("pointer-events",OptConstant.EventBehavior.None),this.parent.clickAreaElem.attr("pointer-events",OptConstant.EventBehavior.HiddenAll),this.parent.CallEditCallback("activate"),this.savedCursorState=this.parent.cursorState,this.parent.cursorState=CursorConstant.CursorState.None,this.activateInit=!0,this.lastKeyProcessed=!1,setTimeout((()=>{this.activateInit=!1}),10),this.textEntryField&&this.InitTextEntry(this.textEntryField),t?(t.gesture={center:{clientX:t.clientX,clientY:t.clientY}},this.HandleMouseDown(t),e?this.parent.DoSpellCheck():this.HandleMouseUp(t),this.virtualKeyboardHook&&this.virtualKeyboardHook(this.parent,!0)):(this.SetInsertPos(this.parent.GetTextLength()),this.virtualKeyboardHook&&this.virtualKeyboardHook(this.parent,!0),this.parent.DoSpellCheck()),this.parent.SetCursorState(CursorConstant.CursorState.EditLink),this.UpdateTextEntryField(!1),this.parent.RenderDataFieldHilites()}Deactivate(t){this.isActive=!1,this.inActiveSel=!1,this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.activateInit=!1,t||(this.parent.DoSpellCheck(),this.parent.UpdateTextObject()),this.parent.clickAreaElem.node.removeAttribute("pointer-events"),this.parent.cursorState===CursorConstant.CursorState.EditLink&&this.parent.SetCursorState(this.savedCursorState),this.savedCursorState=this.parent.cursorState,this.DeactivateCursor(),this.ClearSelection(),this.parent.ClearDataFieldHilites(),this.parent.CallEditCallback("deactivate"),this.virtualKeyboardHook&&this.virtualKeyboardHook(this.parent,!1),this.textEntryField&&this.textEntryField.off("input")}IsActive(){return this.isActive}SetSelection(t,e,i,n,s){t>=0&&t===e?this.SetInsertPos(t,{rLine:i}):(this.selStart=t,this.selEnd=e,this.selAnchor=void 0!==n?n:t,this.UpdateSelection()),s||this.UpdateTextEntryField(!0)}ClearSelection(){this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.UpdateSelection()}GetSelection(){return{start:this.selStart,end:this.selEnd,line:this.cursorLine,anchor:this.selAnchor}}SetInsertPos(t,e,i){this.selStart=t,this.selEnd=t,this.selAnchor=t,this.UpdateSelection(),this.cursorPos=t,this.cursorLine=e?e.rLine:void 0,this.UpdateCursor(),i||this.UpdateTextEntryField(!0),this.parent.CallEditCallback("select")}UpdateSelection(){let t,e;if(e=new Creator,this.DeactivateCursor(),this.selStart<0||this.selEnd<0||this.selStart===this.selEnd)this.parent.HideSelection();else if(t=this.parent.formatter.GetRenderedRange(this.selStart,this.selEnd),t.length){for(let n=0;n<t.length;n++)e.MoveTo(t[n].left,t[n].top),e.LineTo(t[n].right,t[n].top),e.LineTo(t[n].right,t[n].bottom),e.LineTo(t[n].left,t[n].bottom),e.ClosePath();const i=e.ToString();this.parent.ShowSelection(i)}else this.parent.HideSelection()}DeactivateCursor(){this.parent.HideInputCursor(),this.cursorPos=-1,this.cursorLine=void 0}UpdateCursor(){if(this.cursorPos<0)this.DeactivateCursor();else{const t=this.parent.formatter.GetRenderedCharInfo(this.cursorPos,this.cursorLine);this.parent.ShowInputCursor(t.left,t.top,t.bottom)}}HandleMouseDown(t){const e=t&&(t.shiftKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey),i=MouseUtil.IsRightClick(t),n=Date.now();if(this.activateInit=!1,this.isActive&&!i){const i=t.gesture.center.clientX,s=t.gesture.center.clientY,a=this.parent.doc.ConvertWindowToElemCoords(i,s,this.parent.textElem.node);if(!this.parent.linksDisabled&&(this.parent.cursorState===CursorConstant.CursorState.EditLink||this.parent.cursorState===CursorConstant.CursorState.LinkOnly)){const t=this.parent.formatter.GetHyperlinkAtPoint(a);if(t)return this.parent.CallEditCallback("hyperlink",t.url),!1}const o=this.parent.formatter.GetHitInfo(a);if(this.DeactivateCursor(),this.parent.activeEditStyle=-1,this.inActiveSel=!0,this.activeSelPos=o.index,this.selStart>=0&&this.selAnchor>=0&&e)return this.HandleMouseMove(t),this.parent.CallEditCallback("click"),!1;if(this.selStart=o.index,this.selEnd=o.index,this.selAnchor=o.index,this.curHit=o,this.lastClickTime+300<n)this.inWordSelect=!1,this.anchorWord=null;else{const t=this.parent.formatter.GetWordAtIndex(o.index);t.end>t.start&&(this.inWordSelect=!0,this.anchorWord=t,this.selStart=t.start,this.selEnd=t.end,this.selAnchor=t.start)}if(this.inWordSelect){let t=this.parent.formatter.GetDataField(this.selStart);t&&(this.selStart=t.startPos,this.selAnchor=t.startPos),t=this.parent.formatter.GetDataField(this.selEnd),t&&(this.selEnd=t.endPos)}else{const t=this.parent.formatter.GetDataField(this.selStart);t&&t.startPos!==this.selStart&&(this.selStart=t.startPos,this.selEnd=t.endPos,this.selAnchor=t.startPos)}return this.lastClickTime=n,this.SetSelection(this.selStart,this.selEnd,void 0,this.selAnchor),this.parent.CallEditCallback("click"),!1}}HandleMouseMove(t){let e,i,n;const s={x:0,y:0};if(this.inActiveSel){this.activateInit=!1;const a=t.gesture.center.clientX,o=t.gesture.center.clientY,r=this.parent.doc.ConvertWindowToElemCoords(a,o,this.parent.textElem.node);s.x=r.x,s.y=r.y;const l=this.parent.textElem.trans.x,h=this.parent.textElem.trans.y;s.x+=l,s.y+=h;const c=this.parent.GetPos();if(s.x<0||s.x>this.parent.geometryBBox.width||s.y<0||s.y>this.parent.geometryBBox.height){const t={x:c.x+s.x,y:c.y+s.y};this.parent.CallEditCallback("dragoutside",t)}return e=this.parent.formatter.GetHitInfo(r),this.curHit=e,this.activeSelPos=Math.max(e.index,0),this.inWordSelect?(i=this.parent.formatter.GetWordAtIndex(this.activeSelPos),this.activeSelPos>=this.anchorWord.start?(this.selStart=this.anchorWord.start,this.selEnd=i.end):(this.selStart=i.start,this.selEnd=this.anchorWord.end)):this.selAnchor<=this.activeSelPos?(this.selStart=this.selAnchor,this.selEnd=this.activeSelPos):(this.selStart=this.activeSelPos,this.selEnd=this.selAnchor),n=this.parent.formatter.GetDataField(this.selStart),n&&(this.selStart=n.startPos),n=this.parent.formatter.GetDataField(this.selEnd),n&&n.startPos!==this.selEnd&&(this.selEnd=n.endPos),this.SetSelection(this.selStart,this.selEnd,void 0,this.selAnchor),!1}}HandleMouseUp(t){if(this.inActiveSel)return this.activateInit=!1,this.TableDrag?(this.TableDrag=!1,this.inActiveSel=!1,this.parent.CallEditCallback("dragoutside_mouseup"),!1):(this.inActiveSel=!1,this.selStart===this.selEnd?(this.SetInsertPos(this.selStart,this.curHit),this.parent.DoSpellCheck()):(this.parent.CallEditCallback("select"),this.parent.CallEditCallback("selectrange")),this.curHit=null,!1)}HandleKeyPress(t){const e=t.charCode?t.charCode:t.keyCode;let i=String.fromCharCode(e);const n=t&&(t.shiftKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey),s=t&&(t.ctrlKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.ctrlKey),a={keyCode:i,shiftKey:n,ctrlKey:s},o=this.activateInit;if(this.activateInit=!1,this.lastKeyProcessed=!1,i!==t.key&&t.key&&1===t.key.length&&(i=t.key),"\t"===i)return this.parent.CallEditCallback("keyend",a),this.lastKeyProcessed=!0,!0;if("\r"===i||"\n"===i){if(a.keyCode=KeyboardConstant.Keys.Enter,this.parent.CallEditCallback("keyend",a))return this.lastKeyProcessed=!0,!0;if(!o&&s)return this.lastKeyProcessed=!0,this.parent.Paste(i,!1),!0}return!1===this.parent.CallEditCallback("charfilter",i)?(this.lastKeyProcessed=!0,!0):!!o&&(this.lastKeyProcessed=!0,this.parent.Paste(i,!1),!0)}HandleKeyDown(t){const e=t&&(t.shiftKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey),i=t&&(t.ctrlKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.ctrlKey);switch(this.activateInit=!1,this.lastKeyProcessed=!1,t.keyCode){case 8:case 46:this.lastKeyProcessed=!0,this.HandleDeleteKey(t.keyCode);break;case 9:case 35:case 36:case 37:case 38:case 39:case 40:this.lastKeyProcessed=!0,this.HandleCursorKey(t.keyCode,e,i);break;case 13:case 32:return this.HandleKeyPress(t);default:return!1}return!0}HandleDeleteKey(t){const e=this.selStart,i=this.selEnd-this.selStart;e<0||(i>0?this.parent.Delete():46===t?e<this.parent.GetTextLength()&&(this.selEnd=e+1,this.parent.Delete()):8===t&&e>0&&(this.selStart--,this.parent.Delete()))}HandleCursorKey(t,e,i){let n={index:-1,line:void 0},s=-1,a=!1;const o=this.selStart!==this.selEnd,r={keyCode:t,shiftKey:e,ctrlKey:i};switch(e&&!this.inWordSelect?s=this.selAnchor===this.selStart?this.selEnd:this.selStart:(s=this.selEnd,this.selAnchor=this.selStart,this.inWordSelect=!1),t){case KeyboardConstant.Keys.Tab:n.index=-1;break;case KeyboardConstant.Keys.End:n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"end",r),a=!0;break;case KeyboardConstant.Keys.Home:n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"home",r),a=!0;break;case KeyboardConstant.Keys.Left_Arrow:o&&!e&&(s=this.selStart),n=!o||e||i?this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"prev",r):{index:s};break;case KeyboardConstant.Keys.Up_Arrow:o&&!e&&(s=this.selStart),n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"up",r);break;case KeyboardConstant.Keys.Right_Arrow:o&&!e&&(s=this.selEnd),n=!o||e||i?this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"next",r):{index:s};break;case KeyboardConstant.Keys.Down_Arrow:o&&!e&&(s=this.selEnd),n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"down",r);break;default:return}n.index!==s||a||o?(e?(s===this.selStart?this.selStart=n.index:this.selEnd=n.index,this.selStart>this.selEnd&&([this.selStart,this.selEnd]=[this.selEnd,this.selStart])):(this.selStart=n.index,this.selEnd=n.index,this.selAnchor=n.index),this.parent.activeEditStyle=-1,this.SetSelection(this.selStart,this.selEnd,n.line,this.selAnchor),this.parent.CallEditCallback("select"),this.parent.DoSpellCheck()):this.parent.CallEditCallback("keyend",r)}InitTextEntry(t){this.textEntryField=$$1(t),this.textEntrySelStart=0,this.textEntrySelEnd=0,this.textEntryField.off("input"),this.textEntryField.on("input",this,(t=>{const e=t.data;return e&&e.HandleTextEntryFieldUpdate(),!1})),this.ResetTextEntry()}ResetTextEntry(){if(this.isActive&&this.textEntryField&&"hidden"!==this.textEntryField.css("visibility")){if(null==this.inputFocusTimer&&(this.inputFocusTimer=setInterval((()=>{this.ResetTextEntry()}),10)),!this.textEntryField.is(":focus")){const t=document.activeElement;null!=t&&t!==document.body&&t!==window&&t!==document&&t!==$$1("#_clipboardInput")[0]&&t!==$$1("#_IEclipboardDiv")[0]||this.textEntryField.focus()}}else null!=this.inputFocusTimer&&(clearInterval(this.inputFocusTimer),this.inputFocusTimer=void 0)}UpdateTextEntryField(t){if(this.isActive&&this.textEntryField&&void 0!==this.textEntryField[0]){const e=this.textEntryField[0];this.ResetTextEntry(),t||e.value===this.parent.formatter.rtData.text||this.textEntryField.val(this.parent.formatter.rtData.text);const i=e.value.length,n=Math.min(Math.max(this.selStart,0),i),s=Math.min(Math.max(this.selEnd,n),i);e.selectionStart===n&&e.selectionEnd===s||Edit.SetInputSelection(e,n,s),this.textEntrySelStart=n,this.textEntrySelEnd=s}}ValidateEdit(t,e,i){const n=this.selStart,s=this.selEnd-this.selStart;let a="",o="",r="";return n>=e.length?r=e+t:(n>0&&(a=e.slice(0,n)),n+s<e.length&&(o=e.slice(n+s)),r=a+t+o),r===i}HandleTextEntryFieldUpdate(){if(this.isActive&&this.textEntryField)if(this.activateInit=!1,this.lastKeyProcessed)this.UpdateTextEntryField();else{const t=this.textEntryField[0],e=t.value,i=this.parent.formatter.rtData.text;let n=t.selectionStart,s=t.selectionEnd,a="";this.selStart=this.textEntrySelStart,this.selEnd=this.textEntrySelEnd,n=Math.min(n,e.length),s=Math.min(s,e.length),s>0&&(a=s>this.selStart?e.slice(this.selStart,s):e.slice(s-1,s));let o=null;if(this.ValidateEdit(a,i,e)||(o=!1,this.selStart=o.pos,this.selEnd=o.pos+o.replace,a=o.str),a){if(!1===this.parent.CallEditCallback("charfilter",a))return t.value!==this.parent.formatter.rtData.text&&this.textEntryField.val(this.parent.formatter.rtData.text),void(t.selectionStart===this.textEntrySelStart&&t.selectionEnd===this.textEntrySelEnd||Edit.SetInputSelection(t,this.textEntrySelStart,this.textEntrySelEnd));this.parent.Paste(a,!1,!0)}else o&&o.replace&&this.parent.Delete(!0);this.SetSelection(s,s,void 0,s,!0),Edit.SetInputSelection(t,n,s),this.textEntrySelStart=n,this.textEntrySelEnd=s}}static SetInputSelection(t,e,i){t.selectionStart=e,t.selectionEnd=i}}class Text$1 extends Element$1{constructor(){super(),__publicField(this,"formatter"),__publicField(this,"editor"),__publicField(this,"textElem"),__publicField(this,"selectElem"),__publicField(this,"cursorElem"),__publicField(this,"clickAreaElem"),__publicField(this,"decorationAreaElem"),__publicField(this,"cursorTimer"),__publicField(this,"cursorPos"),__publicField(this,"cursorState"),__publicField(this,"minHeight"),__publicField(this,"vAlign"),__publicField(this,"textElemOffset"),__publicField(this,"activeEditStyle"),__publicField(this,"selectHidden"),__publicField(this,"linksDisabled"),__publicField(this,"editCallback"),__publicField(this,"editCallbackData"),__publicField(this,"dataTableID"),__publicField(this,"dataRecordID"),__publicField(this,"dataStyleOverride"),__publicField(this,"lastFmtSize")}CreateElement(t,e){return this.formatter=new Formatter(this),this.editor=new Edit(this),this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.InitElement(t,e),this.textElem=new T3Svg.Container(T3Svg.create("text")),this.selectElem=new T3Svg.Path,this.cursorElem=new T3Svg.Line,this.clickAreaElem=new T3Svg.Rect,this.decorationAreaElem=new T3Svg.Container(T3Svg.create("g")),this.cursorTimer=void 0,this.cursorPos=void 0,this.cursorState=CursorConstant.CursorState.LinkOnly,this.clickAreaElem.attr("stroke-width",0),this.clickAreaElem.attr("fill","none"),this.clickAreaElem.attr("visibility","hidden"),this.clickAreaElem.node.setAttribute("no-export","1"),this.selectElem.node.setAttribute("no-export","1"),this.cursorElem.node.setAttribute("no-export","1"),this.svgObj.add(this.clickAreaElem),this.svgObj.add(this.textElem),this.svgObj.add(this.decorationAreaElem),this.minHeight=0,this.vAlign="top",this.textElemOffset=0,this.activeEditStyle=-1,this.selectHidden=!1,this.linksDisabled=!1,this.editCallback=null,this.editCallbackData=null,this.dataTableID=-1,this.dataRecordID=-1,this.dataStyleOverride=null,this.lastFmtSize={width:0,height:0},this.SetText(""),this.svgObj}SetText(t,e,i,n,s){LogUtil.Debug("B.Text: SetText input:",{newText:t,formatStyle:e,startPos:i,preserveFormatting:n,updateTextEntry:s});const a=i||0,o=t.length;this.editor.IsActive()&&this.editor.ClearSelection(),!e&&this.activeEditStyle>=0&&(e=this.activeEditStyle),this.activeEditStyle=-1,this.formatter.SetText(t,e,i,n),this.UpdateTextObject(),this.editor.IsActive()&&(s||this.editor.UpdateTextEntryField(!1),this.editor.SetInsertPos(a+o,null,s)),LogUtil.Debug("B.Text: SetText output: text updated successfully")}GetText(t,e){LogUtil.Debug("B.Text: GetText input:",{startIndex:t,textLength:e});const i=this.formatter.GetText(t,e);return LogUtil.Debug("B.Text: GetText output:",i),i}GetTextLength(){LogUtil.Debug("B.Text: GetTextLength input: none");const t=this.formatter.GetTextLength();return LogUtil.Debug("B.Text: GetTextLength output:",t),t}SetRuntimeText(t,e,i,n,s){LogUtil.Debug("B.Text: SetRuntimeText input:",{textData:t,startPos:e,textLength:i,preserveFormatting:n,updateTextEntry:s});const a=e||0,o=t.text.length;this.editor.IsActive()&&this.editor.ClearSelection(),this.activeEditStyle=-1,this.formatter.SetRuntimeText(t,e,i,n),this.UpdateTextObject(),this.editor.IsActive()&&(s||this.editor.UpdateTextEntryField(!1),this.editor.SetInsertPos(a+o,null,s)),LogUtil.Debug("B.Text: SetRuntimeText output: text updated successfully")}GetRuntimeText(t,e){LogUtil.Debug("B.Text: GetRuntimeText input:",{startIndex:t,textLength:e});const i=this.formatter.GetRuntimeText(t,e);return LogUtil.Debug("B.Text: GetRuntimeText output:",i),i}DeleteText(t,e,i){LogUtil.Debug("B.Text: DeleteText input:",{startPosition:t,deleteLength:e,updateTextEntry:i}),t=t||0,this.editor.IsActive()&&this.editor.ClearSelection();let n=this.formatter.GetDataField(t);if(n&&(t=n.startPos),e){let i=t+e;n=this.formatter.GetDataField(i),n&&n.startPos!==i&&(i=n.endPos),e=i-t}this.activeEditStyle=-1,this.formatter.DeleteText(t,e),this.UpdateTextObject(),this.editor.IsActive()&&(i||this.editor.UpdateTextEntryField(!1),this.editor.SetInsertPos(t,null,i)),LogUtil.Debug("B.Text: DeleteText output:",{deletedCharacters:e,startPosition:t})}Copy(t){LogUtil.Debug("B.Text: Copy input:",{useRuntime:t});let e=0,i=0;if(this.editor.IsActive()){const t=this.editor.GetSelection();if(t.start===t.end)return LogUtil.Debug("B.Text: Copy output: null (empty selection)"),null;t.start>=0&&t.end>t.start&&(e=t.start,i=t.end-t.start)}const n=t?this.GetRuntimeText(e,i):this.GetText(e,i);return LogUtil.Debug("B.Text: Copy output:",n),n}Paste(t,e,i){LogUtil.Debug("B.Text: Paste input:",{inputText:t,useRuntime:e,updateTextEntry:i});let n,s=0,a=0;if(this.editor.IsActive()&&(n=this.editor.GetSelection()).start>=0&&(s=n.start,a=n.end-n.start),e)if(this.SetRuntimeText(t,s,a,!0,i),this.dataTableID>0&&this.dataRecordID>0){let t=this.formatter.GetTextLength();this.UpdateFromData();let e=this.formatter.GetTextLength();if(this.editor.IsActive()&&(this.editor.UpdateTextEntryField(!1),t!==e)){const i=this.editor.selStart+(e-t);this.editor.SetInsertPos(i)}}else this.formatter.ClearDataFieldRun(),this.UpdateTextObject();else this.SetText(t,null,s,a,i);this.CallEditCallback("edit"),LogUtil.Debug("B.Text: Paste output: finished pasting")}Delete(t){let e,i,n;LogUtil.Debug("B.Text: Delete input:",{updateTextEntry:t}),this.editor.IsActive()&&(n=this.editor.GetSelection(),n.start>=0&&(e=n.start,i=n.end-n.start)),this.DeleteText(e,i,t),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: Delete output:",{deletedCharacters:i,startPosition:e})}SetSelectedFormat(t){let e,i;if(LogUtil.Debug("B.Text: SetSelectedFormat input:",{formatStyle:t}),this.editor.IsActive()){const t=this.editor.GetSelection();t.start>=0&&(e=t.start,i=t.end-t.start)}this.SetFormat(t,e,i),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedFormat output: completed")}GetSelectedFormat(){let t,e,i;LogUtil.Debug("B.Text: GetSelectedFormat input: none"),this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start,i=t.end-t.start));const n=this.GetFormat(e,i);return LogUtil.Debug("B.Text: GetSelectedFormat output:",n),n}SetSelectedAlignment(t){LogUtil.Debug("B.Text: SetSelectedAlignment input:",{alignment:t});let e=0,i=0;if(this.editor.IsActive()){const t=this.editor.GetSelection();t.start>=0&&(e=t.start,i=t.end-t.start)}this.SetParagraphAlignment(t,e,i),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedAlignment output:",{alignment:t,selectionStart:e,selectionLength:i})}GetSelectedAlignment(){LogUtil.Debug("B.Text: GetSelectedAlignment called");let t,e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start));const i=this.GetParagraphAlignment(e);return LogUtil.Debug("B.Text: GetSelectedAlignment output:",i),i}SetSelectedParagraphStyle(t){let e,i;if(LogUtil.Debug("B.Text: SetSelectedParagraphStyle input:",{paragraphStyle:t}),this.editor.IsActive()){const t=this.editor.GetSelection();t.start>=0&&(e=t.start,i=t.end-t.start)}this.SetParagraphStyle(t,e,i),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedParagraphStyle output:",{paragraphStyle:t,selectionStart:e,selectionLength:i})}GetSelectedParagraphStyle(){let t;LogUtil.Debug("B.Text: GetSelectedParagraphStyle input: none");let e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start));const i=this.GetParagraphStyle(e);return LogUtil.Debug("B.Text: GetSelectedParagraphStyle output:",i),i}SetSelectedHyperlink(t){let e;LogUtil.Debug("B.Text: SetSelectedHyperlink input:",{hyperlink:t});let i=0,n=this.GetTextLength();this.editor.IsActive()&&(e=this.editor.GetSelection(),e.start>=0&&(i=e.start,n=e.end-e.start)),this.SetHyperlink(t,i,n),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedHyperlink output:",{hyperlink:t,startPosition:i,selectionLength:n})}GetSelectedHyperlink(){let t;LogUtil.Debug("B.Text: GetSelectedHyperlink input: none");let e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start));const i=this.GetHyperlink(e);return LogUtil.Debug("B.Text: GetSelectedHyperlink output:",i),i}DeleteSelectedHyperlink(){LogUtil.Debug("B.Text: DeleteSelectedHyperlink input: no parameters; checking editor state");let t,e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start)),this.DeleteHyperlink(e),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: DeleteSelectedHyperlink output: Deleted hyperlink at position",e)}SetFormat(t,e,i){LogUtil.Debug("B.Text: SetFormat input:",{newFormat:t,selectionStart:e,selectionLength:i});const n=this.formatter.SetFormat(t,e,i);this.activeEditStyle=n,this.UpdateTextObject(),LogUtil.Debug("B.Text: SetFormat output:",{activeEditStyle:this.activeEditStyle})}GetFormat(t,e){LogUtil.Debug("B.Text: GetFormat input:",{startIndex:t,rangeLength:e});let i,n=this.activeEditStyle;return i=0===e&&n>=0?this.formatter.GetFormatByID(n):this.formatter.GetCommonFormatForRange(t,e),LogUtil.Debug("B.Text: GetFormat output:",i),i}SetVerticalAlignment(t){LogUtil.Debug("B.Text: SetVerticalAlignment input:",t),this.vAlign=t,this.UpdateTextObject(),LogUtil.Debug("B.Text: SetVerticalAlignment output: vAlign updated to",this.vAlign)}GetVerticalAlignment(){LogUtil.Debug("B.Text: GetVerticalAlignment input: none");const t=this.vAlign;return LogUtil.Debug("B.Text: GetVerticalAlignment output:",t),t}SetParagraphAlignment(t,e,i){LogUtil.Debug("B.Text: SetParagraphAlignment input:",{alignment:t,selectionStart:e,selectionLength:i}),this.SetParagraphStyle({just:t},e,i),LogUtil.Debug("B.Text: SetParagraphAlignment output: completed",{alignment:t,selectionStart:e,selectionLength:i})}GetParagraphAlignment(t){LogUtil.Debug("B.Text: GetParagraphAlignment input:",{paragraphIndex:t});const e=this.GetParagraphStyle(t).just;return LogUtil.Debug("B.Text: GetParagraphAlignment output:",e),e}SetParagraphStyle(t,e,i){LogUtil.Debug("B.Text: SetParagraphStyle input:",{paragraphStyle:t,startPosition:e,selectionLength:i}),this.formatter.SetParagraphStyle(t,e,i),this.UpdateTextObject(),LogUtil.Debug("B.Text: SetParagraphStyle output: completed")}GetParagraphStyle(t){LogUtil.Debug("B.Text: GetParagraphStyle input:",{paragraphIndex:t});const e=this.formatter.GetParagraphStyle(t);return LogUtil.Debug("B.Text: GetParagraphStyle output:",e),e}GetParagraphCount(){LogUtil.Debug("B.Text: GetParagraphCount input: none");const t=this.formatter.GetParagraphCount();return LogUtil.Debug("B.Text: GetParagraphCount output:",t),t}GetParagraphPosition(t){LogUtil.Debug("B.Text: GetParagraphPosition input:",{paragraphIndex:t});const e=this.formatter.GetParagraphPosition(t);return LogUtil.Debug("B.Text: GetParagraphPosition output:",e),e}SetHyperlink(t,e,i){LogUtil.Debug("B.Text: SetHyperlink input:",{url:t,startPos:e,selectionLength:i}),t&&t.length?(this.formatter.SetHyperlink(t,e,i),this.UpdateTextObject(),LogUtil.Debug("B.Text: SetHyperlink output: hyperlink set successfully")):(this.DeleteHyperlink(e),LogUtil.Debug("B.Text: SetHyperlink output: hyperlink deleted"))}GetHyperlink(t){LogUtil.Debug("B.Text: GetHyperlink input:",t);const e=this.formatter.GetHyperlinkAtOffset(t),i=e?e.url:null;return LogUtil.Debug("B.Text: GetHyperlink output:",i),i}DeleteHyperlink(t){LogUtil.Debug("B.Text: DeleteHyperlink input:",{hyperlinkStart:t}),this.formatter.ClearHyperlink(t),this.UpdateTextObject(),LogUtil.Debug("B.Text: DeleteHyperlink output: Hyperlink removed at",t)}GetHyperlinkAtLocation(t){LogUtil.Debug("B.Text: GetHyperlinkAtLocation input:",t);const e=t.gesture.center.clientX,i=t.gesture.center.clientY+$$1(window).scrollTop(),n=this.doc.ConvertWindowToElemCoords(e,i,this.textElem.node),s=this.formatter.GetHyperlinkAtPoint(n),a=s?s.url:null;return LogUtil.Debug("B.Text: GetHyperlinkAtLocation output:",a),a}SetConstraints(t,e,i){LogUtil.Debug("B.Text: SetConstraints input:",{maxWidth:t,minWidth:e,minHeight:i}),void 0===t&&void 0===e||this.formatter.SetLimits({maxWidth:t,minWidth:e}),void 0!==i&&(this.minHeight=i),this.UpdateTextObject(),LogUtil.Debug("B.Text: SetConstraints output: Constraints updated")}SetEditCallback(t,e){LogUtil.Debug("B.Text: SetEditCallback input:",{callback:t,callbackData:e}),this.editCallback=t,this.editCallbackData=e,LogUtil.Debug("B.Text: SetEditCallback output: Callback set successfully")}CallEditCallback(t,e){if(LogUtil.Debug("B.Text: CallEditCallback input:",{actionType:t,callbackData:e}),this.editCallback){const i=this.editCallback(t,e,this,this.editCallbackData);return LogUtil.Debug("B.Text: CallEditCallback output:",i),i}LogUtil.Debug("B.Text: CallEditCallback output:","No editCallback defined")}GetTextSize(){LogUtil.Debug("B.Text: GetTextSize input: no parameters");let t=this.formatter.GetTextFormatSize();return t.height=Math.max(t.height,this.minHeight),LogUtil.Debug("B.Text: GetTextSize output:",t),t}GetTextMinDimensions(){LogUtil.Debug("B.Text: GetTextMinDimensions input: none");const t=this.formatter.GetFormatTextMinDimensions();return LogUtil.Debug("B.Text: GetTextMinDimensions output:",t),t}SetSize(t,e){LogUtil.Debug("B.Text: SetSize input:",{width:t,minHeight:e}),this.SetConstraints(t,t,e),LogUtil.Debug("B.Text: SetSize output: constraints set with",{maxWidth:t,minWidth:t,minHeight:e})}CalcTextFit(t){LogUtil.Debug("B.Text: CalcTextFit input:",t);const e=this.formatter.CalcTextFit(t);return LogUtil.Debug("B.Text: CalcTextFit output:",e),e}CalcTextWrap(t){LogUtil.Debug("B.Text: CalcTextWrap input:",t);const e=this.formatter.CalcTextWrap(t);return LogUtil.Debug("B.Text: CalcTextWrap output:",e),e}CalcFormatChange(t){LogUtil.Debug("B.Text: CalcFormatChange input:",t);const e=this.formatter.CalcFormatChange(t);return LogUtil.Debug("B.Text: CalcFormatChange output:",e),e}SetRenderingEnabled(t){LogUtil.Debug("B.Text: SetRenderingEnabled input:",{isEnabled:t});const e=this.formatter.deferredRenderNeeded;void 0===t&&(t=!0),this.formatter.renderingEnabled!==t&&(this.formatter.SetRenderingEnabled(t),t&&e&&this.UpdateTextObject()),LogUtil.Debug("B.Text: SetRenderingEnabled output: rendering enabled set to",t)}IsRenderingEnabled(t){LogUtil.Debug("B.Text: IsRenderingEnabled input:",{renderingFlag:t});const e=this.formatter.renderingEnabled;return LogUtil.Debug("B.Text: IsRenderingEnabled output:",e),e}GetContentVersion(){LogUtil.Debug("B.Text: GetContentVersion input: none");const t=this.formatter.GetContentVersion();return LogUtil.Debug("B.Text: GetContentVersion output:",t),t}GetSpellCheck(){LogUtil.Debug("B.Text: GetSpellCheck input: none");const t=this.formatter.GetSpellCheck();return LogUtil.Debug("B.Text: GetSpellCheck output:",t),t}SetSpellCheck(t,e){LogUtil.Debug("B.Text: SetSpellCheck input:",{isSpellCheckEnabled:t,updateImmediately:e}),this.formatter.SetSpellCheck(t),e&&(t?this.doc.spellChecker&&this.doc.spellChecker.CheckSpellingForTextObj(this):this.UpdateTextObject()),LogUtil.Debug("B.Text: SetSpellCheck output: completed")}UpdateSpellCheck(t){LogUtil.Debug("B.Text: UpdateSpellCheck input:",t),this.formatter.UpdateSpellCheck(t),this.UpdateTextObject(),LogUtil.Debug("B.Text: UpdateSpellCheck output: Spell check updated and text object refreshed")}GetSpellCheckList(){LogUtil.Debug("B.Text: GetSpellCheckList input: no parameters");const t=this.formatter.GetWordList();return LogUtil.Debug("B.Text: GetSpellCheckList output:",t),t}DoSpellCheck(){LogUtil.Debug("B.Text: DoSpellCheck input: none"),this.formatter.SpellCheckValid()?this.doc.spellChecker.CheckSpellingForTextObj(this):this.formatter.UpdateSpellCheckFormatting(),LogUtil.Debug("B.Text: DoSpellCheck output: completed")}GetSpellAtLocation(t,e){LogUtil.Debug("B.Text: GetSpellAtLocation input:",{clientX:t,clientY:e}),e+=$$1(window).scrollTop();const i=this.doc.ConvertWindowToElemCoords(t,e,this.textElem.node),n=this.formatter.GetSpellAtPoint(i);return LogUtil.Debug("B.Text: GetSpellAtLocation output:",n),n}UpdateTextObject(){LogUtil.Debug("B.Text: UpdateTextObject input:");const t=this.formatter.GetTextFormatSize();let e=!1,i=0;if(this.formatter.renderingEnabled){const n=t.height,s=this.minHeight,a=Math.max(n,s);switch(this.vAlign){case"top":i=0;break;case"middle":i=(a-n)/2;break;case"bottom":i=a-n}const o={width:t.width,height:a};o.width===this.lastFmtSize.width&&o.height===this.lastFmtSize.height||(this.CallEditCallback("willresize",o),e=!0),this.svgObj.size(t.width,a),this.clickAreaElem.transform({x:0,y:0}),this.clickAreaElem.size(t.width,a),this.textElem.size(t.width,n),this.textElem.transform({x:0,y:i}),this.decorationAreaElem.size(t.width,n),this.decorationAreaElem.transform({x:0,y:i}),this.textElemOffset=i,this.geometryBBox.width=t.width,this.geometryBBox.height=a,this.RefreshPaint(),this.formatter.RenderFormattedText(this.textElem,this.decorationAreaElem),this.linksDisabled||this.cursorState!==CursorConstant.CursorState.EditLink&&this.cursorState!==CursorConstant.CursorState.LinkOnly||this.formatter.SetHyperlinkCursor(),this.editor.IsActive()&&(this.editor.cursorPos>=0?this.editor.UpdateCursor():this.editor.selStart>=0&&this.editor.UpdateSelection()),e&&this.CallEditCallback("didresize",o),this.lastFmtSize=o,LogUtil.Debug("B.Text: UpdateTextObject output:",o)}}Activate(t,e){LogUtil.Debug("B.Text: Activate input:",{inputEvent:t,callbackData:e}),this.activeEditStyle=-1,this.selectHidden=!1,this.doc.SetActiveEdit(this),this.editor.Activate(t,e),LogUtil.Debug("B.Text: Activate output: Editor activated")}Deactivate(t){LogUtil.Debug("B.Text: Deactivate input:",{deactivationEvent:t}),this.activeEditStyle=-1,this.doc.activeEdit=null,this.editor.Deactivate(t),LogUtil.Debug("B.Text: Deactivate output: Editor deactivated")}IsActive(){LogUtil.Debug("B.Text: IsActive input: none");const t=this.editor.IsActive();return LogUtil.Debug("B.Text: IsActive output:",t),t}SetVirtualKeyboardHook(t,e){LogUtil.Debug("B.Text: SetVirtualKeyboardHook input:",{callback:t,hookData:e}),this.editor.SetVirtualKeyboardHook(t,e),LogUtil.Debug("B.Text: SetVirtualKeyboardHook output: hook set successfully")}GetSelectedRange(){LogUtil.Debug("B.Text: GetSelectedRange input: none");let t={start:-1,end:-1};return this.editor.IsActive()&&(t=this.editor.GetSelection()),LogUtil.Debug("B.Text: GetSelectedRange output:",t),t}SetSelectedRange(t,e,i,n){LogUtil.Debug("B.Text: SetSelectedRange input:",{startIndex:t,endIndex:e,selectionExtra:i,updateFlag:n}),t<0||!this.editor.IsActive()?LogUtil.Debug("B.Text: SetSelectedRange output: Invalid start index or editor not active"):(t!==e&&(this.activeEditStyle=-1),this.editor.SetSelection(t,e,i,n),this.CallEditCallback("select"),LogUtil.Debug("B.Text: SetSelectedRange output:",{startIndex:t,endIndex:e}))}HandleKeyPressEvent(t){LogUtil.Debug("B.Text: HandleKeyPressEvent input:",t);const e=!!(this.editor&&this.editor.IsActive())&&this.editor.HandleKeyPress(t);return LogUtil.Debug("B.Text: HandleKeyPressEvent output:",e),e}HandleKeyDownEvent(t){LogUtil.Debug("B.Text: HandleKeyDownEvent input:",t);const e=this.editor&&this.editor.IsActive()&&this.editor.HandleKeyDown(t);return LogUtil.Debug("B.Text: HandleKeyDownEvent output:",e),e}HideSelection(){LogUtil.Debug("B.Text: HideSelection input: none"),this.selectElem.plot(),this.svgObj.remove(this.selectElem),LogUtil.Debug("B.Text: HideSelection output: selection hidden")}ShowSelection(t){LogUtil.Debug("B.Text: ShowSelection input:",t),this.selectElem.attr("fill","#8888FF"),this.selectElem.attr("stroke-width",0),this.selectElem.attr("fill-opacity",.4),this.selectElem.attr("pointer-events","none"),this.selectElem.transform({y:this.textElemOffset}),this.selectHidden?this.selectElem.attr("visibility","hidden"):this.selectElem.attr("visibility","visible"),t&&this.selectElem.plot(t),this.svgObj.add(this.selectElem),LogUtil.Debug("B.Text: ShowSelection output: selection displayed successfully")}SetSelectionVisible(t){LogUtil.Debug("B.Text: SetSelectionVisible input:",{isVisible:t}),this.selectHidden=!t,this.IsActive()&&(this.selectHidden?(this.cursorElem.attr("visibility","hidden"),this.selectElem.attr("visibility","hidden")):(this.cursorElem.attr("visibility","visible"),this.selectElem.attr("visibility","visible"))),LogUtil.Debug("B.Text: SetSelectionVisible output: selection visibility set to",t)}HideInputCursor(){LogUtil.Debug("B.Text: HideInputCursor input: no parameters"),void 0!==this.cursorTimer&&(clearInterval(this.cursorTimer),this.cursorTimer=void 0),this.cursorElem.attr("visibility","hidden"),this.svgObj.remove(this.cursorElem),this.cursorPos=void 0,LogUtil.Debug("B.Text: HideInputCursor output: Cursor hidden")}ShowInputCursor(t,e,i){LogUtil.Debug("B.Text: ShowInputCursor input:",{x:t,startY:e,endY:i});const n=this.doc.ConverWindowToDocLength(1);void 0!==this.cursorTimer&&clearInterval(this.cursorTimer),this.cursorElem.attr("fill","none"),this.cursorElem.attr("stroke-width",n),this.cursorElem.attr("stroke","#000"),this.cursorElem.attr("pointer-events","none"),this.cursorElem.attr({x1:t,y1:e+this.textElemOffset,x2:t,y2:i+this.textElemOffset}),this.selectHidden?this.cursorElem.attr("visibility","hidden"):this.cursorElem.attr("visibility","visible"),this.svgObj.add(this.cursorElem),this.cursorPos={x:t,y1:e+this.textElemOffset,y2:i+this.textElemOffset},this.cursorTimer=setInterval((()=>{this.cursorElem.attr("visibility","hidden"),setTimeout((()=>{this.selectHidden||this.cursorElem.attr("visibility","visible")}),250)}),1e3),this.editor.IsActive()&&this.editor.virtualKeyboardHook&&this.editor.virtualKeyboardHook(this,!0),LogUtil.Debug("B.Text: ShowInputCursor output: Cursor shown at",{x:t,y1:e+this.textElemOffset,y2:i+this.textElemOffset})}GetInputCursorPos(){if(LogUtil.Debug("B.Text: GetInputCursorPos input: none"),this.cursorPos){const t=this.doc.ConvertElemToWindowCoords(this.cursorPos.x,this.cursorPos.y1,this.svgObj.node),e=this.doc.ConvertElemToWindowCoords(this.cursorPos.x,this.cursorPos.y2,this.svgObj.node),i={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return LogUtil.Debug("B.Text: GetInputCursorPos output:",i),i}return LogUtil.Debug("B.Text: GetInputCursorPos output: cursor position is not defined"),null}SetCursorState(t){LogUtil.Debug("B.Text: SetCursorState input:",t),this.cursorState=t,this.ClearAllCursors(),t!==CursorConstant.CursorState.EditOnly&&t!==CursorConstant.CursorState.EditLink||this.SetCursor(CursorConstant.CursorType.Text),this.linksDisabled||t!==CursorConstant.CursorState.EditLink&&t!==CursorConstant.CursorState.LinkOnly||this.formatter.SetHyperlinkCursor(),LogUtil.Debug("B.Text: SetCursorState output: cursorState set to",t)}GetCursorState(){LogUtil.Debug("B.Text: GetCursorState input: none");const t=this.cursorState;return LogUtil.Debug("B.Text: GetCursorState output:",t),t}DisableHyperlinks(t){LogUtil.Debug("B.Text: DisableHyperlinks input:",{shouldDisableHyperlinks:t}),this.linksDisabled=t,this.SetCursorState(this.cursorState),this.UpdateTextObject(),LogUtil.Debug("B.Text: DisableHyperlinks output:",{linksDisabled:this.linksDisabled})}InitDataSettings(t,e,i){LogUtil.Debug("B.Text: InitDataSettings input:",{tableId:t,recordId:e,styleOverride:i}),this.dataTableID=t,this.dataRecordID=e,this.dataStyleOverride=i,LogUtil.Debug("B.Text: InitDataSettings output:",{dataTableID:this.dataTableID,dataRecordID:this.dataRecordID,dataStyleOverride:this.dataStyleOverride})}IsDataInitialized(){LogUtil.Debug("B.Text: isDataInitialized input: no parameters");const t=this.dataTableID>0&&this.dataRecordID>0;return LogUtil.Debug("B.Text: isDataInitialized output:",t),t}GetDataField(t){LogUtil.Debug("B.Text: GetDataField input:",{startPosition:t});const e=this.formatter.GetDataField(t);return LogUtil.Debug("B.Text: GetDataField output:",e),e}InsertDataField(t,e,i){LogUtil.Debug("B.Text: InsertDataField input:",{fieldId:t,startPosition:e,preserveFormatting:i});const n=this.GetDataText(t,this.formatter.GetDataNameDisplay()),s={dataField:Formatter.FormatDataFieldID(t,!0)};this.SetText(n,s,e,i),LogUtil.Debug("B.Text: InsertDataField output: data field inserted",{fieldId:t,startPosition:e,preserveFormatting:i})}PasteDataField(t){LogUtil.Debug("B.Text: PasteDataField input:",{dataFieldId:t});let e,i=0,n=0;this.editor.IsActive()&&(e=this.editor.GetSelection(),e.start>=0&&(i=e.start,n=e.end-e.start)),this.InsertDataField(t,i,n),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: PasteDataField output:",{dataFieldId:t,selectionStart:i,selectionLength:n})}HasDataFields(){LogUtil.Debug("B.Text: HasDataFields input: no parameters");const t=this.formatter.HasDataFields();return LogUtil.Debug("B.Text: HasDataFields output:",t),t}HasDataField(t){LogUtil.Debug("B.Text: HasDataField input:",t);const e=this.formatter.HasDataField(t);return LogUtil.Debug("B.Text: HasDataField output:",e),e}UpdateFromData(t,e){LogUtil.Debug("B.Text: UpdateFromData input:",{tableId:t,recordId:e}),void 0!==t&&void 0!==e&&(t===this.dataTableID&&e===this.dataRecordID||(this.dataStyleOverride=null),this.InitDataSettings(t,e,this.dataStyleOverride)),this.formatter.RebuildFromData(),this.UpdateTextObject(),LogUtil.Debug("B.Text: UpdateFromData output:","Data updated successfully")}SetDataNameDisplay(t){LogUtil.Debug("B.Text: SetDataNameDisplay input:",{dataName:t}),this.formatter.SetDataNameDisplay(t),this.UpdateFromData(this.dataTableID,this.dataRecordID),LogUtil.Debug("B.Text: SetDataNameDisplay output: Data name display updated")}GetDataNameDisplay(){LogUtil.Debug("B.Text: GetDataNameDisplay input: no parameters");const t=this.formatter.GetDataNameDisplay();return LogUtil.Debug("B.Text: GetDataNameDisplay output:",t),t}GetDataText(t,e){LogUtil.Debug("B.Text: GetDataText input:",{fieldId:t,useFieldName:e});let i=" ";if(this.dataTableID<0||this.dataRecordID<0)return LogUtil.Debug("B.Text: GetDataText output:",i),i;const n=Formatter.FormatDataFieldID(t,!1);if(e)i=TData.FieldedDataGetFieldName(this.dataTableID,n);else{i=TData.FieldedDataGetFieldValue(this.dataTableID,this.dataRecordID,n);const t=TData.FieldedDataGetFieldType(this.dataTableID,n);i=T3Gv.opt.ModifyFieldDataForDisplay(i,t)}return i&&""!==i||(i=" "),LogUtil.Debug("B.Text: GetDataText output:",i),i}GetDataStyle(t){LogUtil.Debug("B.Text: GetDataStyle input:",{dataFieldId:t});let e=[];if(this.dataTableID<0||this.dataRecordID<0)return LogUtil.Debug("B.Text: GetDataStyle output:",e),e;const i=Formatter.FormatDataFieldID(t,!1),n=TData.FieldedDataGetFieldStyle(this.dataTableID,this.dataRecordID,i);return n&&(e=TData.FieldedDataParseStyle(n)),LogUtil.Debug("B.Text: GetDataStyle output:",e),e}CheckDataExists(t){LogUtil.Debug("B.Text: CheckDataExists input:",{dataFieldId:t});const e=this.dataTableID>=0,i=this.dataRecordID>=0;let n=!1;if(e&&i){const e=Formatter.FormatDataFieldID(t,!1);n=!!TData.FieldedDataGetRecord(this.dataTableID,this.dataRecordID)[e]}return LogUtil.Debug("B.Text: CheckDataExists output:",n),n}RenderDataFieldHilites(){LogUtil.Debug("B.Text: RenderDataFieldHilites input: no parameters"),this.formatter.RenderDataFieldHilites(this.decorationAreaElem),LogUtil.Debug("B.Text: RenderDataFieldHilites output: Data field highlights rendered")}ClearDataFieldHilites(){LogUtil.Debug("B.Text: ClearDataFieldHilites input: no parameters"),this.formatter.ClearDataFieldHilites(this.decorationAreaElem),LogUtil.Debug("B.Text: ClearDataFieldHilites output: Data field hilites cleared")}RemapDataFields(t){LogUtil.Debug("B.Text: RemapDataFields input:",t),this.HasDataFields()&&this.formatter.RemapDataFields(t),LogUtil.Debug("B.Text: RemapDataFields output: completed remapping")}static RemapDataFieldsInRuntimeText(t,e){function i(t){const i=t.split("_");let n=i[0];const s=i[1];for(let a=0;a<e.length;a++)if(e[a].srcFieldID===n){n=e[a].dstFieldID;break}return n+"_"+s}LogUtil.Debug("B.Text: RemapDataFieldsInRuntimeText input:",{runtimeText:t,mappingArray:e});for(let n=0;n<t.styles.length;n++){const e=t.styles[n].dataField;e&&(t.styles[n].dataField=i(e))}LogUtil.Debug("B.Text: RemapDataFieldsInRuntimeText output:",t)}}class Image$1 extends Element$1{constructor(){super()}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("image")),this.InitElement(t,e),this.svgObj}SetURL(t){this.svgObj.attr({preserveAspectRatio:"none"}),this.svgObj.src=t,this.svgObj.attr("xlink:href",t,T3Svg.xlink)}}class DocInfo{constructor(){__publicField(this,"dispX"),__publicField(this,"dispY"),__publicField(this,"dispWidth"),__publicField(this,"dispHeight"),__publicField(this,"dispDpiX"),__publicField(this,"dispDpiY"),__publicField(this,"scrollX"),__publicField(this,"scrollY"),__publicField(this,"docDpi"),__publicField(this,"docScale"),__publicField(this,"docWidth"),__publicField(this,"docHeight"),__publicField(this,"docToScreenScale"),__publicField(this,"docDpiScale"),__publicField(this,"docVisX"),__publicField(this,"docVisY"),__publicField(this,"docVisWidth"),__publicField(this,"docVisHeight"),__publicField(this,"docScreenX"),__publicField(this,"docScreenY"),__publicField(this,"docScreenWidth"),__publicField(this,"docScreenHeight"),__publicField(this,"maxScrollX"),__publicField(this,"maxScrollY"),this.dispX=0,this.dispY=0,this.dispWidth=0,this.dispHeight=0,this.dispDpiX=0,this.dispDpiY=0,this.scrollX=0,this.scrollY=0,this.docDpi=0,this.docScale=0,this.docWidth=0,this.docHeight=0,this.docToScreenScale=0,this.docDpiScale=0,this.docVisX=0,this.docVisY=0,this.docVisWidth=0,this.docVisHeight=0,this.docScreenX=0,this.docScreenY=0,this.docScreenWidth=0,this.docScreenHeight=0,this.maxScrollX=0,this.maxScrollY=0}}class ForeignObject$1 extends Element$1{constructor(){super(...arguments),__publicField(this,"vueInstance",null),__publicField(this,"shapeGroup"),__publicField(this,"svgObj"),__publicField(this,"foreignObj")}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("foreignObject")),this.InitElement(t,e),this.svgObj}SetSize(t,e){return this.svgObj.size(t,e),this}SetPosition(t,e){return this.svgObj.move(t,e),this}MountVueComponent(t,e={}){try{Promise.all([__vitePreload((()=>import("./vue.runtime.esm-bundler.f0155a5e.js")),["assets/vue.runtime.esm-bundler.f0155a5e.js","assets/index.3938ccd1.js","assets/index.fbd60cd5.css"]),__vitePreload((()=>import("./quasar.client.28551ef0.js")),["assets/quasar.client.28551ef0.js","assets/index.3938ccd1.js","assets/index.fbd60cd5.css"])]).then((([i,n])=>{const s=document.createElement("div");if(s.style.width="100%",s.style.height="100%",this.svgObj.node.appendChild(s),i.createApp){this.vueInstance=i.createApp(t,e);const a=n.default||n;this.vueInstance.use(a.Quasar||a,{config:{},plugins:{}}),this.vueInstance.mount(s)}else if(i.default&&"function"==typeof i.default.extend){i.default.use(n.default||n);const a=i.default.extend(t);this.vueInstance=new a({propsData:e}),this.vueInstance.$mount(s)}else if("function"==typeof i.extend){i.use(n.default||n);const a=i.extend(t);this.vueInstance=new a({propsData:e}),this.vueInstance.$mount(s)}else this.vueInstance=i.createApp(t,e),this.vueInstance.use(n.default||n),this.vueInstance.mount(s)}))}catch(i){T3Util.Error("= b.ForeignObject: MountVueComponent/ Failed to mount Vue component:",i)}return this}SetHtmlContent(t){return this.svgObj.html(t),this}DestroyVueComponent(){this.vueInstance&&(this.vueInstance.$destroy(),this.vueInstance=null,this.svgObj.node.textContent="")}setSecureHTML(t){__vitePreload((()=>import("./T3SecurityUtil.03cf8f05.js")),["assets/T3SecurityUtil.03cf8f05.js","assets/purify.es.fbbbfcb0.js"]).then((({T3Security:e})=>{const i=e.sanitizeHTML(t,!0);this.svgObj.node.innerHTML=i})).catch((()=>{this.svgObj.node.textContent=t}))}RemoveElement(){this.DestroyVueComponent(),super.RemoveElement()}}const _Document=class extends Container{constructor(t,e){super(),__publicField(this,"parentElem"),__publicField(this,"svgObj"),__publicField(this,"docInfo"),__publicField(this,"activeEdit"),__publicField(this,"spellChecker"),__publicField(this,"documentLayerId"),__publicField(this,"imageLoadRefCount"),this.parentElem=t,this.parentElem="#"!==this.parentElem.charAt(0)&&"."!==this.parentElem.charAt(0)?"#"+this.parentElem:this.parentElem,this.svgObj=T3Svg.svg($$1(this.parentElem)[0]),this.docInfo=new DocInfo,this.activeEdit=null,this.spellChecker=null,this.documentLayerId=null,this.imageLoadRefCount=0,this.InitElement(this,null),this.InitializeContainer()}GetSpellCheck(){LogUtil.Debug("= B.Document","GetSpellCheck","Not implemented")}CreateShape(t){let e=null;switch(t){case OptConstant.CSType.Rect:e=new Rect;break;case OptConstant.CSType.RRect:e=new RRect;break;case OptConstant.CSType.Oval:e=new Oval;break;case OptConstant.CSType.Line:e=new Line;break;case OptConstant.CSType.Polyline:e=new PolyLine;break;case OptConstant.CSType.PolyPolyline:e=new PolyPolyLine;break;case OptConstant.CSType.PolylineContainer:e=new PolyLine;break;case OptConstant.CSType.Polygon:e=new Polygon;break;case OptConstant.CSType.Path:e=new Path;break;case OptConstant.CSType.Text:e=new Text$1;break;case OptConstant.CSType.Image:e=new Image$1;break;case OptConstant.CSType.Group:e=new Group;break;case OptConstant.CSType.Layer:e=new Layer;break;case OptConstant.CSType.Symbol:e=new Symbol$1;break;case OptConstant.CSType.ShapeCopy:e=new ShapeCopy;break;case OptConstant.CSType.ShapeContainer:e=new ShapeContainer$1;break;case OptConstant.CSType.ForeignObject:e=new ForeignObject$1;break;default:return null}try{return e?(e.CreateElement(this,null),e):null}catch(i){throw i}}InitializeContainer(){this.GetDeviceDetail(),this.docInfo.docDpi=this.docInfo.dispDpiX,this.docInfo.docWidth=this.docInfo.dispWidth,this.docInfo.docHeight=this.docInfo.dispHeight,this.docInfo.docScale=1,this.docInfo.scrollX=0,this.docInfo.scrollY=0,this.CalcWorkArea(),this.ApplyDocumentTransform()}GetDeviceDetail(){const t=this.CreateShape(OptConstant.CSType.Rect);t.SetFillOpacity(0),t.SetStrokeWidth(0),t.SetSize("100in","100in"),this.AddElement(t);const e=t.GetBBox();this.docInfo.dispDpiX=e.width/100,this.docInfo.dispDpiY=e.height/100,this.RemoveElement(t),this.docInfo.dispWidth=$$1(this.parentElem).innerWidth(),this.docInfo.dispHeight=$$1(this.parentElem).innerHeight()}CalcWorkArea(){if(LogUtil.Debug("= B.Document CalcWorkArea ",$$1(this.parentElem)),null===$$1(this.parentElem)||void 0===$$1(this.parentElem))return;const t=$$1(this.parentElem).offset();null!=t&&(this.docInfo.dispX=t.left,this.docInfo.dispY=t.top,this.docInfo.dispWidth=$$1(this.parentElem).innerWidth(),this.docInfo.dispHeight=$$1(this.parentElem).innerHeight(),this.docInfo.scrollX=$$1(this.parentElem).scrollLeft(),this.docInfo.scrollY=$$1(this.parentElem).scrollTop(),this.docInfo.docToScreenScale=this.docInfo.dispDpiX/this.docInfo.docDpi*this.docInfo.docScale,this.docInfo.docDpiScale=this.docInfo.dispDpiX/this.docInfo.docDpi,this.docInfo.docScreenX=this.docInfo.dispX-this.docInfo.scrollX,this.docInfo.docScreenY=this.docInfo.dispY-this.docInfo.scrollY,this.docInfo.docScreenWidth=this.docInfo.docWidth*this.docInfo.docToScreenScale,this.docInfo.docScreenHeight=this.docInfo.docHeight*this.docInfo.docToScreenScale,this.docInfo.maxScrollX=Math.max(0,this.docInfo.docScreenWidth-this.docInfo.dispWidth),this.docInfo.maxScrollY=Math.max(0,this.docInfo.docScreenHeight-this.docInfo.dispHeight),this.docInfo.docVisWidth=Math.min(this.docInfo.dispWidth/this.docInfo.docToScreenScale,this.docInfo.docWidth),this.docInfo.docVisHeight=Math.min(this.docInfo.dispHeight/this.docInfo.docToScreenScale,this.docInfo.docHeight),this.docInfo.docVisX=Math.min(this.docInfo.scrollX/this.docInfo.docToScreenScale,this.docInfo.docWidth-this.docInfo.docVisWidth),this.docInfo.docVisY=Math.min(this.docInfo.scrollY/this.docInfo.docToScreenScale,this.docInfo.docHeight-this.docInfo.docVisHeight))}ApplyDocumentTransform(t){const e=this.ElementCount();if(this.svgObj.attr({width:this.docInfo.docScreenWidth,height:this.docInfo.docScreenHeight}),!t)for(let i=0;i<e;i++){const t=this.GetElementByIndex(i);t instanceof Layer&&(t.IsScalingAllowed()?t.svgObj.transform({scaleX:this.docInfo.docToScreenScale,scaleY:this.docInfo.docToScreenScale}):t.IsDpiScalingAllowed()&&t.svgObj.transform({scaleX:this.docInfo.docDpiScale,scaleY:this.docInfo.docDpiScale}))}}CalcScaleToFit(t,e,i,n){i||(i=this.docInfo.docWidth),n||(n=this.docInfo.docHeight);const s=this.docInfo.dispDpiX/this.docInfo.docDpi,a=t/(i*s),o=e/(n*s);let r=Math.min(a,o);return r>1&&(r=1),{scale:r,width:this.docInfo.docWidth*s*r,height:this.docInfo.docHeight*s*r}}SetDocumentSize(t,e){this.SetDocumentMetrics({width:t,height:e})}GetDocumentSize(){return{width:this.docInfo.docWidth,height:this.docInfo.docHeight}}SetDocumentDPI(t){this.SetDocumentMetrics({dpi:t})}SetDocumentScale(t){this.SetDocumentMetrics({scale:t})}SetDocumentMetrics(t){this.docInfo.docWidth=t.width||this.docInfo.docWidth,this.docInfo.docHeight=t.height||this.docInfo.docHeight,this.docInfo.docDpi=t.dpi||this.docInfo.docDpi,this.docInfo.docScale=t.scale||this.docInfo.docScale,this.CalcWorkArea(),this.ApplyDocumentTransform()}CalcScrollToVisible(t,e){let i=0,n=0;const s=this.docInfo.docVisX+this.docInfo.docVisWidth,a=this.docInfo.docVisY+this.docInfo.docVisHeight;return t=Math.max(0,Math.min(t,this.docInfo.docWidth)),e=Math.max(0,Math.min(e,this.docInfo.docHeight)),t<this.docInfo.docVisX?i=t-this.docInfo.docVisX:t>s&&(i=t-s),e<this.docInfo.docVisY?n=e-this.docInfo.docVisY:e>a&&(n=e-a),i||n?{xOff:this.docInfo.scrollX+i*this.docInfo.docToScreenScale,yOff:this.docInfo.scrollY+n*this.docInfo.docToScreenScale}:null}GetWorkArea(){return this.docInfo}ConvertDocToWindowCoords(t,e){return{x:t*this.docInfo.docToScreenScale+this.docInfo.docScreenX,y:e*this.docInfo.docToScreenScale+this.docInfo.docScreenY}}ConvertDocToWindowLength(t){return t*this.docInfo.docToScreenScale}ConvertOffsetToDocCoords(t,e){return{x:t/this.docInfo.docToScreenScale,y:e/this.docInfo.docToScreenScale}}ConvertWindowToDocCoords(t,e){return{x:(t-this.docInfo.docScreenX)/this.docInfo.docToScreenScale,y:(e-this.docInfo.docScreenY)/this.docInfo.docToScreenScale}}ConvertWindowToDocLength(t){return t/this.docInfo.docToScreenScale}ConvertWindowToElemCoords(t,e,i){const n=this.DOMElement().createSVGPoint(),s=this.DOMElement();n.x=t,n.y=e;const a=n.matrixTransform(s.getScreenCTM().inverse()).matrixTransform(i.getTransformToElement(s).inverse());return{x:a.x,y:a.y}}ConvertElemToWindowCoords(t,e,i){const n=this.DOMElement().createSVGPoint(),s=this.DOMElement();n.x=t,n.y=e;const a=n.matrixTransform(i.getTransformToElement(s)).matrixTransform(s.getScreenCTM());return{x:a.x,y:a.y}}RotateAroundCenterPt(t,e,i){const n=this.DOMElement().createSVGPoint(),s=this.DOMElement().createSVGMatrix(),a=(isNaN(t.x)?0:t.x)-(isNaN(e.x)?0:e.x),o=(isNaN(t.y)?0:t.y)-(isNaN(e.y)?0:e.y);n.x=a,n.y=o;const r=n.matrixTransform(s.rotate(i));return{x:r.x+e.x,y:r.y+e.y}}CalculateRotatedOffsetForResize(t,e,i){const n={x:t.x+t.width/2,y:t.y+t.height/2},s={x:e.x+e.width/2,y:e.y+e.height/2},a=this.RotateAroundCenterPt(s,n,i);return{x:a.x-s.x,y:a.y-s.y}}AddLayer(t){const e=this.CreateShape(OptConstant.CSType.Layer);return e.SetID(t),this.AddElement(e),this.ApplyDocumentTransform(),$$1(e.svgObj.node).data("layerID",t),e}RemoveLayer(t){const e=this.GetElementById(t);e&&this.RemoveElement(e)}GetLayer(t){let e,i=null;const n=this.ElementCount();for(let s=0;s<n;s++)if(e=this.GetElementByIndex(s),e instanceof Layer&&e.GetID()===t){i=e;break}return i}GetDocumentLayer(){let t,e=null;const i=this.ElementCount();for(let n=0;n<i;n++)if(t=this.GetElementByIndex(n),t instanceof Layer)if(this.documentLayerId){if(this.documentLayerId===t.GetID()){e=t;break}}else if(t.IsScalingAllowed()){e=t;break}return e}SetDocumentLayer(t){this.documentLayerId=t}GetFormattingLayer(){let t=this.GetLayer("_formatting_");return t&&!t.IsDpiScalingAllowed()&&(t=null),t||(t=this.AddLayer("_formatting_"),t.AllowDpiScalingOnly(!0),t.ExcludeFromExport(!0),this.MoveLayer("_formatting_",NvConstant.LayerMoveType.Bottom),t.SetOpacity(0),this.ApplyDocumentTransform()),t}GetPreviousLayer(t){let e=null;const i=this.ElementCount();for(let n=0;n<i;n++){const i=this.GetElementByIndex(n);if(i instanceof Layer){if(i.GetID()===t)break;e=i}}return e}GetNextLayer(t){let e=null,i=null,n=0;const s=this.ElementCount();t&&(i=this.GetLayer(t),i&&(n=this.GetElementIndex(i)+1));for(let a=n;a<s;a++){const t=this.GetElementByIndex(a);if(t instanceof Layer){e=t;break}}return e}MoveLayer(t,e,i){const n=this.GetLayer(t);if(!n)return;const s=this.ElementCount();let a=s-1,o=this.GetElementIndex(n),r=null,l=0;switch(i&&(r=this.GetLayer(i),r&&(l=this.GetElementIndex(r),o<l&&l--)),e){case NvConstant.LayerMoveType.Bottom:a=0;break;case NvConstant.LayerMoveType.Before:a=l;break;case NvConstant.LayerMoveType.After:a=l+1;break;case NvConstant.LayerMoveType.Top:a=s-1;break;default:return}a!==o&&(this.RemoveElement(n),this.AddElement(n,a))}GetTextCacheForStyle(t){const e=Formatter.MakeIDFromStyle(t);let i=_Document._TextMetricsCache[e];return i||(i={metrics:Formatter.CalcStyleMetrics(t,this),textCache:{}},_Document._TextMetricsCache[e]=i),i}CalcStyleMetrics(t){const e=this.GetTextCacheForStyle(t);return Utils1.CopyObj(e.metrics)}GetTextRunCache(t,e){return{startOffsets:[],endOffsets:[]}}SetActiveEdit(t){const e=this.GetActiveEdit();e&&e!==t&&e.Deactivate(),this.activeEdit=t}ClearActiveEdit(t){const e=this.GetActiveEdit();e&&e.Deactivate(t),this.activeEdit=null}GetActiveEdit(){return this.activeEdit&&!this.activeEdit.InDocument()&&(this.activeEdit=null),this.activeEdit}DefExists(t){const e=this.svgObj.defs().children();let i=!1;for(let n=0;n<e.length;n++)if(e[n].attrs.id===t){i=!0;break}return i}Defs(){return this.svgObj.defs()}ClearDefs(){const t=this.Defs();t&&t.clear()}ImageLoadAddRef(){this.imageLoadRefCount++}ImageLoadDecRef(){this.imageLoadRefCount=Math.max(0,this.imageLoadRefCount-1)}ImageLoadGetRefCount(){return this.imageLoadRefCount}ImageLoadResetRefCount(){this.imageLoadRefCount=0}ConverWindowToDocLength(t){return t/this.docInfo.docToScreenScale}CreateVueComponent(t,e,i,n={}){const s=this.CreateShape(OptConstant.CSType.ForeignObject);return s&&(s.SetSize(t,e),s.MountVueComponent(i,n)),s}};let Document=_Document;__publicField(Document,"_TextMetricsCache",{});class DocConfig{constructor(){__publicField(this,"showRulers",!0),__publicField(this,"showGrid",!0),__publicField(this,"enableSnap",!1),__publicField(this,"centerSnap",!0),__publicField(this,"zoom",!0),__publicField(this,"zoomLevels",1),__publicField(this,"scale",!0),__publicField(this,"showPageDivider",!1),__publicField(this,"spellCheck",!0),__publicField(this,"spellDict",!0),__publicField(this,"spellFlags",!0),__publicField(this,"snapToShapes",!0),__publicField(this,"backgroundColor","#FFFFFF")}}class RefUtil{static SetShowRulers(t){showRulers.value=t}static SetShowGrid(t){showGrid.value=t}}class DocUtil{constructor(){__publicField(this,"docConfig"),__publicField(this,"rulerConfig"),__publicField(this,"workAreaId"),__publicField(this,"svgAreaId"),__publicField(this,"hRulerAreaId"),__publicField(this,"vRulerAreaId"),__publicField(this,"cRulerAreaId"),__publicField(this,"svgDoc"),__publicField(this,"hRulerDoc"),__publicField(this,"vRulerDoc"),__publicField(this,"gridLayer","_doc_grid"),__publicField(this,"pageDividerLayer","_doc_page_divider"),__publicField(this,"backgroundLayer","_background"),__publicField(this,"backgroundElem"),__publicField(this,"rulerVis",!0),__publicField(this,"gridVis",!0),__publicField(this,"scaleToFit",!1),__publicField(this,"scaleToPage",!1),__publicField(this,"scrollWidth",0),__publicField(this,"hRulerGuide",null),__publicField(this,"vRulerGuide",null),__publicField(this,"rulerGuideWinPos",{x:0,y:0}),__publicField(this,"rulerGuideScrollTimer",null),__publicField(this,"rulerInDrag",!1),__publicField(this,"printHandler",null),__publicField(this,"inZoomIdle",!1),this.InitDocConfig(),this.rulerConfig=new RulerConfig}InitDocConfig(){LogUtil.Debug("= U.DocUtil: InitDocConfig - Input: Initializing document configuration"),this.docConfig=new DocConfig,this.docConfig.showRulers=!1,this.docConfig.showGrid=!1,this.docConfig.showPageDivider=!1,this.docConfig.enableSnap=!0,this.docConfig.centerSnap=!0,this.docConfig.snapToShapes=!0,this.docConfig.zoom=!0,this.docConfig.zoomLevels=!0,this.docConfig.scale=!0,this.docConfig.spellCheck=!1,this.docConfig.spellDict=!1,this.docConfig.spellFlags=!1,LogUtil.Debug("= U.DocUtil: InitDocConfig - Output:",this.docConfig)}InitializeWorkArea(t,e=!1){LogUtil.Info("= u.DocUtil: InitializeWorkArea - Input:",t),t=t||{},this.workAreaId=t.workAreaId||"#document-area",this.svgAreaId=t.svgAreaId||"#svg-area",this.hRulerAreaId=t.hRulerAreaId||"#h-ruler",this.vRulerAreaId=t.vRulerAreaId||"#v-ruler",this.cRulerAreaId=t.cRulerAreaId||"#c-ruler",e||(this.svgDoc=null,this.hRulerDoc=null,this.vRulerDoc=null),this.rulerVis=!0,this.gridVis=!0,this.gridLayer="_doc_grid",this.pageDividerLayer="_doc_page_divider",this.backgroundLayer="_background",this.backgroundElem=null,this.scaleToFit=!1,this.scaleToPage=!1,this.scrollWidth=0,this.printHandler=null,$$1(window).bind("resize",this,(function(t){t.data.HandleResizeEvent()})),$$1(this.svgAreaId).bind("scroll",this,(function(t){t.data.HandleScrollEvent()})),this.rulerConfig=new RulerConfig,this.rulerConfig.denom=RulerUtil.GetFractionDenominator(),this.UpdateRulerVisibility(),$$1(window).bind("mousemove",EvtUtil.Evt_MouseMove),e||this.InitSvgArea(t),this.UpdateGridVisibility(),e||this.SetUpRulers(),this.UpdateGrid(),this.UpdatePageDivider(),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: InitializeWorkArea - Output:",{workAreaId:this.workAreaId,svgAreaId:this.svgAreaId,hRulerAreaId:this.hRulerAreaId,vRulerAreaId:this.vRulerAreaId,cRulerAreaId:this.cRulerAreaId,gridLayer:this.gridLayer,pageDividerLayer:this.pageDividerLayer,backgroundLayer:this.backgroundLayer,scaleToFit:this.scaleToFit,scaleToPage:this.scaleToPage})}InitSvgArea(t){LogUtil.Info("= u.DocUtil: InitSvgArea - Input:",t),t=t||{},this.svgDoc||(this.svgDoc=new Document(this.svgAreaId,[]));let e=this.svgDoc.AddLayer(this.backgroundLayer);this.backgroundElem=this.svgDoc.CreateShape(OptConstant.CSType.Rect),e.AddElement(this.backgroundElem),this.backgroundElem.SetPos(0,0),this.backgroundElem.SetStrokeWidth(0),this.backgroundElem.SetStrokeColor("none"),this.backgroundElem.SetFillColor("none"),this.backgroundElem.ExcludeFromExport(!0),e.SetCustomAttribute("t3-background","1"),e=this.svgDoc.AddLayer(this.gridLayer),e.AllowScaling(!1),e.ExcludeFromExport(!0),e.SetCustomAttribute("t3-grid","1"),e=this.svgDoc.AddLayer(this.pageDividerLayer),e.AllowScaling(!1),e.ExcludeFromExport(!0),t.layers&&Array.isArray(t.layers)&&t.layers.forEach((t=>{this.svgDoc.AddLayer(t)})),t.documentWidth&&t.documentHeight&&this.svgDoc.SetDocumentSize(t.documentWidth,t.documentHeight),t.documentDPI&&this.svgDoc.SetDocumentDPI(t.documentDPI),this.backgroundElem.SetSize(this.svgDoc.docInfo.docWidth,this.svgDoc.docInfo.docHeight),this.svgDoc.ImageLoadResetRefCount(),LogUtil.Debug("= U.DocUtil: InitSvgArea - Output:",{documentWidth:this.svgDoc.docInfo.docWidth,documentHeight:this.svgDoc.docInfo.docHeight,layers:[this.backgroundLayer,this.gridLayer,this.pageDividerLayer]})}CheckScaleToFit(){if(LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Input: scaleToFit =",this.scaleToFit),!this.scaleToFit)return LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Output: false (scaleToFit disabled)"),!1;const t=this.GetWorkAreaSize(),e=$$1(this.vRulerAreaId).width(),i=$$1(this.hRulerAreaId).height();let n={x:0,y:0,width:t.width,height:t.height};this.docConfig.showRulers&&(n.x+=e,n.width-=e,n.y+=i,n.height-=i),LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Available rect:",n);const s=this.svgDoc.CalcScaleToFit(n.width-20,n.height-20);LogUtil.Debug("= U.DocUtil: CheckScaleToFit - CalcScaleToFit result:",s);const a=this.svgDoc.docInfo.docScale!==s.scale;return LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Output:",a),a}UpdateWorkArea(t){const e=this.docConfig.showRulers;let i=this.GetWorkAreaSize();i.height-=null!=t?t:0;const n=$$1(this.vRulerAreaId).width(),s=$$1(this.hRulerAreaId).height();LogUtil.Debug("= u.DocUtil: UpdateWorkArea/ - Input:",{workAreaSize:i,showRulers:e,verticalRulerWidth:n,horizontalRulerHeight:s}),this.scrollWidth||(this.scrollWidth=this.GetScrollBarSize());let a={x:0,y:0,width:i.width,height:i.height};e&&(a.x+=n,a.width-=n,a.y+=s,a.height-=s);let o={width:0,height:0},r=null;if(this.svgDoc)if(this.scaleToFit)T3Gv.opt.inAutoScroll?(r=this.svgDoc.GetWorkArea(),o={width:r.docScreenWidth,height:r.docScreenHeight}):a.width>0&&a.height>0?(r=this.svgDoc.CalcScaleToFit(a.width-20,a.height-20),o={width:r.width,height:r.height},this.svgDoc.docInfo.docScale!==r.scale&&(this.svgDoc.SetDocumentScale(r.scale),this.IdleZoomUI(),this.UpdateGrid(),this.UpdatePageDivider(),this.ResetRulers())):(r=this.svgDoc.GetWorkArea(),o={width:r.docScreenWidth,height:r.docScreenHeight});else if(this.scaleToPage&&a.width>0&&a.height>0){const t=T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),e=T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom);r=this.svgDoc.CalcScaleToFit(a.width-20,a.height-20,t,e),o={width:r.width,height:r.height},T3Gv.opt.inAutoScroll||this.svgDoc.docInfo.docScale===r.scale||(this.svgDoc.SetDocumentScale(r.scale),this.IdleZoomUI(),this.UpdateGrid(),this.UpdatePageDivider(),this.ResetRulers())}else r=this.svgDoc.GetWorkArea(),o={width:r.docScreenWidth,height:r.docScreenHeight};else o={width:a.width,height:a.height};const l={width:Math.min(a.width,o.width),height:Math.min(a.height,o.height)};let h=!1,c=!1;l.width<o.width&&(h=!0,l.height+=this.scrollWidth,l.height>a.height&&(l.height=a.height,c=!0)),l.height<o.height&&(c=!0,l.width+=this.scrollWidth,l.width>a.width&&(l.width=a.width,h=!0));const u={x:a.x+(a.width-l.width)/2,y:a.y+(a.height-l.height)/2};$$1(this.svgAreaId).css({left:u.x,top:u.y,width:l.width,height:l.height,"overflow-x":h?"scroll":"hidden","overflow-y":c?"scroll":"hidden"}),e&&($$1(this.hRulerAreaId).css({left:u.x,top:u.y-s,width:l.width,height:s}),$$1(this.vRulerAreaId).css({left:u.x-n,top:u.y,width:n,height:l.height}),$$1(this.cRulerAreaId).css({left:u.x-n,top:u.y-s})),this.svgDoc&&(this.svgDoc.CalcWorkArea(),this.AdjustScroll(),this.svgDoc.ApplyDocumentTransform(!0)),LogUtil.Debug("= u.DocUtil: UpdateWorkArea/ - Output:",{finalPosition:u,finalSize:l,targetDimensions:o,needHorizontalScroll:h,needVerticalScroll:c})}GetWorkAreaSize(){const t={width:$$1(this.workAreaId).width(),height:$$1(this.workAreaId).height()};return LogUtil.Debug("= u.DocUtil: GetWorkAreaSize/ - Input/Output:",{workAreaId:this.workAreaId},t),t}GetScrollBarSize(){LogUtil.Debug("= U.DocUtil: GetScrollBarSize - Input: Measuring scrollbar width");const t=$$1('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),e=t.children(),i=e.innerWidth();e.height(99);const n=i-e.innerWidth();return t.remove(),LogUtil.Debug("= U.DocUtil: GetScrollBarSize - Output:",{scrollbarWidth:n}),n}AdjustScroll(t,e){LogUtil.Debug("= U.DocUtil: AdjustScroll - Input:",{horizontalScroll:t,verticalScroll:e});const i=this.svgDoc.GetWorkArea(),n=Math.min(void 0!==t?t:i.scrollX,i.maxScrollX),s=Math.min(void 0!==e?e:i.scrollY,i.maxScrollY);$$1(this.svgAreaId).scrollLeft(n),$$1(this.svgAreaId).scrollTop(s),this.svgDoc.CalcWorkArea(),this.SyncRulers(),LogUtil.Debug("= U.DocUtil: AdjustScroll - Output:",{targetHorizontalScroll:n,targetVerticalScroll:s})}HandleResizeEvent(){this.UpdateWorkArea(),LogUtil.Debug("= u.DocUtil: HandleResizeEvent/ - Input/Output: Work area updated")}HandleScrollEvent(){LogUtil.Debug("= U.DocUtil: HandleScrollEvent - Input: Handling scroll event");const t=this.svgDoc.GetWorkArea(),e=t.scrollX,i=t.scrollY;this.svgDoc.CalcWorkArea(),this.SyncRulers();const n=this.svgDoc.GetWorkArea(),s=e-n.scrollX,a=i-n.scrollY;LogUtil.Debug("= U.DocUtil: HandleScrollEvent - Output:",{initialScroll:{x:e,y:i},currentScroll:{x:n.scrollX,y:n.scrollY},deltaScroll:{x:s,y:a}})}SetResolution(t){LogUtil.Debug("= U.DocUtil: SetResolution - Input:",t),this.svgDoc&&(this.svgDoc.SetDocumentDPI(t),this.UpdateWorkArea()),LogUtil.Debug("= U.DocUtil: SetResolution - Output: Resolution updated")}ResizeDocument(t,e,i){LogUtil.Debug("= U.DocUtil: ResizeDocument - Input:",{width:t,height:e,skipUIUpdate:i}),this.svgDoc&&(this.svgDoc.SetDocumentSize(t,e),this.backgroundElem.SetSize(t,e),i||(this.ResetRulers(),this.UpdateGrid(),this.UpdatePageDivider(),this.UpdateWorkArea())),LogUtil.Debug("= U.DocUtil: ResizeDocument - Output: Document resized to",{width:t,height:e})}GetDocumentSize(){LogUtil.Debug("= U.DocUtil: GetDocumentSize - Input: Retrieving document dimensions");const t=this.svgDoc.GetDocumentSize();return LogUtil.Debug("= U.DocUtil: GetDocumentSize - Output:",t),t}DocumentPageSizeChanged(){LogUtil.Debug("= U.DocUtil: DocumentPageSizeChanged - Input: Document page size changed"),this.svgDoc&&(this.scaleToPage?this.UpdateWorkArea():this.UpdatePageDivider()),LogUtil.Debug("= U.DocUtil: DocumentPageSizeChanged - Output: Display updated")}MaintainView(t){LogUtil.Debug("= U.DocUtil: MaintainView - Input:",{skipSelection:t});const e=this.svgDoc.GetWorkArea(),i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let n=i.length?T3Gv.opt.GetListSRect(i):T3Gv.opt.CalcAllObjectEnclosingRect(!1);n.width&&n.height||(n.x=0,n.y=0,n.width=e.docWidth,n.height=e.docHeight),t&&(n.width=0,n.height=0);const s=(n.x+n.width/2)*e.docToScreenScale-e.dispWidth/2,a=(n.y+n.height/2)*e.docToScreenScale-e.dispHeight/2;this.AdjustScroll(s,a),LogUtil.Debug("= U.DocUtil: MaintainView - Output:",{horizontalScroll:s,verticalScroll:a,boundingRect:n})}SetZoomFactor(t,e){if(LogUtil.Debug("= u.DocUtil: SetZoomFactor/ - Input: zoomFactor,skipCentering",{zoomFactor:t,skipCentering:e}),!this.svgDoc)return LogUtil.Debug("= u.DocUtil: SetZoomFactor/ - Output: false (no svgDoc)"),!1;if(!this.scaleToFit&&!this.scaleToPage&&t===this.GetZoomFactor())return LogUtil.Debug("= u.DocUtil: SetZoomFactor/ - Output: false (zoom unchanged)"),!1;if(this.scaleToFit=!1,this.scaleToPage=!1,this.svgDoc.SetDocumentScale(t),!e){const t=this.svgDoc.GetWorkArea(),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let i=e.length?T3Gv.opt.GetListSRect(e):T3Gv.opt.CalcAllObjectEnclosingRect(!1);i.width&&i.height||(i={x:0,y:0,width:t.docWidth,height:t.docHeight});const n=(i.x+i.width/2)*t.docToScreenScale-t.dispWidth/2,s=(i.y+i.height/2)*t.docToScreenScale-t.dispHeight/2;this.AdjustScroll(n,s)}return this.IdleZoomUI(),this.ResetRulers(),this.UpdateGrid(),this.UpdatePageDivider(),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: SetZoomFactor - Output: true (zoom updated)"),!0}GetZoomFactor(){let t=this.svgDoc?this.svgDoc.GetWorkArea().docScale:HvConstant.T3Config.Zoom.Default;return LogUtil.Debug("= u.DocUtil: GetZoomFactor/ - Input/Output:",t),t}SetSizeToFit(t){LogUtil.Debug("= U.DocUtil: SetSizeToFit - Input:",t),this.scaleToFit=t,t&&(this.scaleToPage=!1),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: SetSizeToFit - Output:",{scaleToFit:this.scaleToFit,scaleToPage:this.scaleToPage})}GetSizeToFit(){const t=this.scaleToFit;return LogUtil.Debug("= U.DocUtil: GetSizeToFit - Retrieving scale-to-fit setting Input/Output: ",t),t}SetSizeToPage(t){LogUtil.Debug("= U.DocUtil: SetSizeToPage - Input:",t),this.scaleToPage=t,t&&(this.scaleToFit=!1),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: SetSizeToPage - Output:",{scaleToPage:this.scaleToPage,scaleToFit:this.scaleToFit})}GetSizeToPage(){const t=this.scaleToPage;return LogUtil.Debug("= U.DocUtil: GetSizeToPage - Input/Output:",t),t}IdleZoomUI(){UIUtil.UpdateDocumentScale(),LogUtil.Debug("= U.DocUtil: IdleZoomUI - Input/Output: Zoom UI updated")}SetScroll(t,e){LogUtil.Debug("= U.DocUtil: SetScroll - Input:",{horizontalScroll:t,verticalScroll:e}),this.AdjustScroll(t,e),LogUtil.Debug("= U.DocUtil: SetScroll - Output: Scroll position updated")}ScrollToPosition(t,e){LogUtil.Debug("= U.DocUtil: ScrollToPosition - Input:",{xPosition:t,yPosition:e});const i=this.svgDoc.CalcScrollToVisible(t,e);i&&this.AdjustScroll(i.xOff,i.yOff),LogUtil.Debug("= U.DocUtil: ScrollToPosition - Output:",{calculatedOffsets:i,scrollApplied:!!i})}RulersNotEqual(t,e){LogUtil.Debug("= U.DocUtil: RulersNotEqual - Input:",{rulerConfig1:t,rulerConfig2:e}),t=t||{};let i=0,n=0;(e=e||{}).originx&&(i=e.originx),e.originy&&(n=e.originy);let s=t.useInches!=e.useInches||t.units!=e.units||t.major!=e.major||t.majorScale!=e.majorScale||t.nTics!=e.nTics||t.nMid!=e.nMid||t.nGrid!=e.nGrid||t.dp!=e.dp||t.denom!=e.denom||t.originx!=i||t.originy!=n;return t.major&&e.major&&t.major!=e.major&&(s=!0),null!=t.showpixels&&null!=e.showpixels&&t.showpixels!=e.showpixels&&(s=!0),LogUtil.Debug("= U.DocUtil: RulersNotEqual - Output:",s),s}PagesNotEqual(t,e){LogUtil.Debug("= U.DocUtil: PagesNotEqual - Input:",{pageConfig1:t,pageConfig2:e});if(null==t||null==t||null==e)return LogUtil.Debug("= U.DocUtil: PagesNotEqual - Output: false (invalid configs)"),!1;const i=t.papersize.x!=e.papersize.x||t.papersize.y!=e.papersize.y||t.margins.left!=e.margins.left||t.margins.right!=e.margins.right||t.margins.top!=e.margins.top||t.margins.bottom!=e.margins.bottom||t.landscape!=e.landscape;return LogUtil.Debug("= U.DocUtil: PagesNotEqual - Output:",i),i}DocObject(){LogUtil.Debug("= U.DocUtil: DocObject - Input: Getting document object");const t=this.svgDoc;return LogUtil.Debug("= U.DocUtil: DocObject - Output:",t?"Document object returned":"No document object"),t}SetRulers(t,e){let i;LogUtil.Debug("= U.DocUtil: SetRulers - Input:",{rulerSettings:t,shouldPropagate:e}),t&&(this.rulerConfig.useInches=void 0!==t.useInches?t.useInches:this.rulerConfig.useInches,this.rulerConfig.units=void 0!==t.units?t.units:this.rulerConfig.units,this.rulerConfig.major=void 0!==t.major?t.major:this.rulerConfig.major,this.rulerConfig.majorScale=void 0!==t.majorScale?t.majorScale:this.rulerConfig.majorScale,this.rulerConfig.nTics=void 0!==t.nTics?t.nTics:this.rulerConfig.nTics,this.rulerConfig.nMid=void 0!==t.nMid?t.nMid:this.rulerConfig.nMid,this.rulerConfig.nGrid=void 0!==t.nGrid?t.nGrid:this.rulerConfig.nGrid,this.rulerConfig.originx=void 0!==t.originx?t.originx:this.rulerConfig.originx,this.rulerConfig.originy=void 0!==t.originy?t.originy:this.rulerConfig.originy,this.rulerConfig.dp=void 0!==t.dp?t.dp:this.rulerConfig.dp,this.rulerConfig.denom=void 0!==t.denom?t.denom:this.rulerConfig.denom,null!=t.showpixels&&(this.rulerConfig.showpixels=t.showpixels),e||(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),i.rulerConfig=Utils1.DeepCopy(this.rulerConfig)),this.ResetRulers(),this.UpdateGrid(),this.UpdatePageDivider()),LogUtil.Debug("= U.DocUtil: SetRulers - Output:",{updatedRulerConfig:this.rulerConfig})}ShowCoordinates(t){return!1}UpdateRulerVisibility(){return LogUtil.Debug("= U.DocUtil: UpdateRulerVisibility - Input:",{showRulers:this.docConfig.showRulers,currentVisibility:this.rulerVis}),this.docConfig.showRulers!==this.rulerVis&&(this.docConfig.showRulers?($$1(this.hRulerAreaId).css("visibility","visible"),$$1(this.vRulerAreaId).css("visibility","visible"),$$1(this.cRulerAreaId).css("visibility","visible"),this.ShowCoordinates(!0)):($$1(this.hRulerAreaId).css("visibility","hidden"),$$1(this.vRulerAreaId).css("visibility","hidden"),$$1(this.cRulerAreaId).css("visibility","hidden"),this.ShowCoordinates(!1)),this.UpdateWorkArea(),this.rulerVis=this.docConfig.showRulers),LogUtil.Debug("= U.DocUtil: UpdateRulerVisibility - Output:",{updatedVisibility:this.rulerVis}),!0}SetUpRulers(){LogUtil.Debug("= U.DocUtil: SetUpRulers - Input:",{horizontalRulerAreaId:this.hRulerAreaId,verticalRulerAreaId:this.vRulerAreaId,centerRulerAreaId:this.cRulerAreaId,isReadOnly:this.IsReadOnly()}),this.hRulerDoc||(this.hRulerDoc=new Document(this.hRulerAreaId,[])),this.vRulerDoc||(this.vRulerDoc=new Document(this.vRulerAreaId,[])),this.hRulerGuide=null,this.vRulerGuide=null,this.rulerGuideWinPos={x:0,y:0},this.rulerGuideScrollTimer=null,this.rulerInDrag=!1,this.IsReadOnly()||(new Hammer($$1(this.hRulerAreaId)[0]).on("doubletap",this.RulerTopDoubleClick),new Hammer($$1(this.vRulerAreaId)[0]).on("doubletap",this.RulerLeftDoubleClick),new Hammer($$1(this.cRulerAreaId)[0]).on("doubletap",this.RulerCenterDoubleClick),new Hammer($$1(this.hRulerAreaId)[0]).on("dragstart",this.RulerDragStart),new Hammer($$1(this.vRulerAreaId)[0]).on("dragstart",this.RulerDragStart),new Hammer($$1(this.cRulerAreaId)[0]).on("dragstart",this.RulerDragStart),new Hammer($$1(this.hRulerAreaId)[0]).on("drag",this.RulerTopDrag),new Hammer($$1(this.vRulerAreaId)[0]).on("drag",this.RulerLeftDrag),new Hammer($$1(this.cRulerAreaId)[0]).on("drag",this.RulerCenterDrag),new Hammer($$1(this.hRulerAreaId)[0]).on("dragend",this.RulerDragEnd),new Hammer($$1(this.vRulerAreaId)[0]).on("dragend",this.RulerDragEnd),new Hammer($$1(this.cRulerAreaId)[0]).on("dragend",this.RulerDragEnd)),this.ResetRulers(),LogUtil.Debug("= U.DocUtil: SetUpRulers - Output:",{horizontalRulerDocInitialized:!!this.hRulerDoc,verticalRulerDocInitialized:!!this.vRulerDoc,rulerGuides:{horizontalRulerGuide:this.hRulerGuide,verticalRulerGuide:this.vRulerGuide},rulerInDrag:this.rulerInDrag})}ResetRulers(){LogUtil.Debug("= U.DocUtil: ResetRulers - Input: Resetting horizontal and vertical rulers");const t=this.svgDoc.GetWorkArea(),e=$$1(this.vRulerAreaId).width(),i=$$1(this.hRulerAreaId).height();this.hRulerDoc.SetDocumentSize(t.docScreenWidth+100,i),this.vRulerDoc.SetDocumentSize(e,t.docScreenHeight+100),this.hRulerDoc.RemoveAll(),this.vRulerDoc.RemoveAll(),this.SetRulerContent(this.hRulerDoc,!0),this.SetRulerContent(this.vRulerDoc,!1),LogUtil.Debug("= U.DocUtil: ResetRulers - Output: Rulers have been reset and redrawn")}GetScaledRuler(t){LogUtil.Debug("= U.DocUtil: GetScaledRuler - Input:",{conversionFactor:t,documentScale:this.svgDoc.docInfo.docScale});let e=Math.floor(this.svgDoc.docInfo.docScale);return 0===e?(e=Math.floor(1/this.svgDoc.docInfo.docScale),e>1&&(t/=e)):e>1&&(t*=e),LogUtil.Debug("= U.DocUtil: GetScaledRuler - Output:",{adjustedFactor:t}),t}SetRulerContent(t,e){LogUtil.Debug("= U.DocUtil: SetRulerContent - Input:",{rulerDocument:t,isHorizontalRuler:e});const i=this.svgDoc.GetWorkArea(),n=$$1(this.vRulerAreaId).width(),s=$$1(this.hRulerAreaId).height(),a=e?s:n;let o=1;const r=this.GetScaledRuler(o),l=t.CreateShape(OptConstant.CSType.Path);let h="";const c=Utils1.RoundCoordLP(Math.round(3*a/4)),u=Utils1.RoundCoordLP(Math.round(a/2)),d=Utils1.RoundCoordLP(Math.round(a/4));let p=0;this.rulerConfig.useInches||(o*=OptConstant.Common.MetricConv);const g=this.rulerConfig.nTics;let f=this.rulerConfig.nMid;g%2&&(f=0);const b=Math.round(g/(f+1)),v=e?i.docScreenWidth:i.docScreenHeight;let m=this.rulerConfig.major/o;const y=[];let S=e?this.rulerConfig.originx:this.rulerConfig.originy,w=S-Math.floor(S);w&&(w-=1),w*=m;let x=-Math.ceil(S)*this.rulerConfig.majorScale;m/=r;let C=0;do{let t=w+p*(this.rulerConfig.major/r/o),n=Utils1.RoundCoordLP(t*i.docToScreenScale),s=this.rulerConfig.showpixels?100*(x+p*(this.rulerConfig.majorScale/r)):x+p*(this.rulerConfig.majorScale/r);e?(y.push({label:s,x:n+2,y:1}),h+=`M${n},${a}v-${c}`):(y.push({label:s,x:3,y:n+2}),h+=`M${a},${n}h-${c}`);for(let o=1;o<g;o++){let n=t+o*(m/g),s=Utils1.RoundCoordLP(n*i.docToScreenScale),r=o%b?d:u;h+=e?`M${s},${a}v-${r}`:`M${a},${s}h-${r}`}C=Utils1.RoundCoordLP((w+(p+1)*(this.rulerConfig.major/r/o))*i.docToScreenScale),p++}while(C<v);l.SetPath(h),l.SetFillColor("none"),l.SetStrokeColor("#000"),l.SetStrokeWidth(".5"),t.AddElement(l),t.SetCursor(CursorConstant.CursorType.Default);let D=!1;for(let O=0;O<y.length;O++)if(y[O].label!==parseInt(y[O].label.toString(),10)){D=!0;break}if(D)for(let O=0;O<y.length;O++)y[O].label=y[O].label.toFixed(1);const T={size:10,color:"#000"},k=y.length,$=Math.floor(k/250)||1;for(let O=0;O<k;O+=$){const e=t.CreateShape(OptConstant.CSType.Text);e.SetText(y[O].label,T),t.AddElement(e),e.SetPos(y[O].x,y[O].y)}LogUtil.Debug("= U.DocUtil: SetRulerContent - Output:",{pathLength:h.length,labelCount:k,displayedLabels:Math.ceil(k/$)})}SyncRulers(){const t=$$1(this.svgAreaId).scrollLeft(),e=$$1(this.svgAreaId).scrollTop();LogUtil.Debug("= U.DocUtil: SyncRulers - Input:",{horizontalScroll:t,verticalScroll:e}),$$1(this.hRulerAreaId).scrollLeft(t),$$1(this.vRulerAreaId).scrollTop(e),LogUtil.Debug("= U.DocUtil: SyncRulers - Output: Rulers synchronized",{horizontalScroll:t,verticalScroll:e})}UpdateGridVisibility(){LogUtil.Debug("= u.DocUtil: UpdateGridVisibility - Input:",{showGrid:this.docConfig.showGrid,currentGridVisibility:this.gridVis});const t=this.svgDoc?this.svgDoc.GetLayer(this.gridLayer):null;let e=!1;return t?this.docConfig.showGrid===this.gridVis?(LogUtil.Debug("= U.DocUtil: UpdateGridVisibility - Output: No change in grid visibility. Current value:",this.gridVis),e):(t.SetVisible(this.docConfig.showGrid),this.gridVis=this.docConfig.showGrid,e=!0,LogUtil.Debug("= U.DocUtil: UpdateGridVisibility - Output: Grid visibility updated to",this.gridVis),e):(LogUtil.Debug("= U.DocUtil: UpdateGridVisibility - Output: Grid layer not found."),e)}UpdateGrid(){LogUtil.Debug("= U.DocUtil: UpdateGrid - Input:",{workArea:this.svgDoc.GetWorkArea(),gridLayer:this.gridLayer,rulerSettings:this.rulerConfig});const t=this.svgDoc.GetWorkArea(),e=this.svgDoc.GetLayer(this.gridLayer);let i=1;if(e){const n=this.GetScaledRuler(i);e.RemoveAll();const s=this.svgDoc.CreateShape(OptConstant.CSType.Path),a=this.svgDoc.CreateShape(OptConstant.CSType.Path);this.rulerConfig.useInches||(i=OptConstant.Common.MetricConv);const o=this.rulerConfig.major/i,r=this.rulerConfig.nGrid*n;let l="",h="";const c=T3Gv.opt.header.Page.papersize,u=T3Gv.opt.header.Page.margins,d=c.x-(u.left+u.right)/2,p=c.y-(u.top+u.bottom)/2,g=Utils1.RoundCoordLP(t.docScreenWidth+2*d*t.docToScreenScale),f=Utils1.RoundCoordLP(t.docScreenHeight+2*p*t.docToScreenScale),b=-Utils1.RoundCoordLP(d*t.docToScreenScale),v=-Utils1.RoundCoordLP(p*t.docToScreenScale),m=b+g,y=v+f;let S=this.rulerConfig.originx-Math.floor(this.rulerConfig.originx);S&&(S-=1),S*=o;let w=-Math.ceil(d/o),x=0,C=0;do{if(C=S+w*(this.rulerConfig.major/i),x=Utils1.RoundCoordLP(C*t.docToScreenScale),x>m)break;l+=`M${x},${v}v${f}`;for(let e=1;e<r&&(C=S+w*(this.rulerConfig.major/i)+e*(o/r),x=Utils1.RoundCoordLP(C*t.docToScreenScale),!(x>m));e++)h+=`M${x},${v}v${f}`;w++}while(x<m);let D=this.rulerConfig.originy-Math.floor(this.rulerConfig.originy);D&&(D-=1),D*=o;let T=-Math.ceil(p/o),k=0,$=0;do{if($=D+T*(this.rulerConfig.major/i),k=Utils1.RoundCoordLP($*t.docToScreenScale),k>y)break;l+=`M${b},${k}h${g}`;for(let e=1;e<r&&($=D+T*(this.rulerConfig.major/i)+e*(o/r),k=Utils1.RoundCoordLP($*t.docToScreenScale),!(k>y));e++)h+=`M${b},${k}h${g}`;T++}while(k<y);s.SetPath(l),s.SetFillColor("none"),s.SetStrokeColor("#000"),s.SetStrokeOpacity(".4"),s.SetStrokeWidth(".5"),a.SetPath(h),a.SetFillColor("none"),a.SetStrokeColor("#000"),a.SetStrokeOpacity(".2"),a.SetStrokeWidth(".5"),e.AddElement(a),e.AddElement(s),e.SetEventBehavior(OptConstant.EventBehavior.None),LogUtil.Debug("= U.DocUtil: UpdateGrid - Output:",{majorPathCommands:l,minorPathCommands:h,boundaries:{startX:b,startY:v,endX:g,endY:f,maxX:m,maxY:y}})}}UpdatePageDivider(){LogUtil.Debug("= u.DocUtil: UpdatePageDivider - T3Gv.docUtil",T3Gv);if(!T3Gv.docUtil.docConfig.showPageDivider)return;const t=this.svgDoc.GetWorkArea(),e=this.svgDoc.GetLayer(this.pageDividerLayer);if(e){e.RemoveAll();const i=this.svgDoc.CreateShape(OptConstant.CSType.Path);let n="";const s=T3Gv.opt.header.Page,a=s.papersize,o=s.margins;a.x-(o.left+o.right)<=0&&(o.left=50,o.right=50),a.y-(o.top+o.bottom)<=0&&(o.top=50,o.bottom=50);let r=a.x-(o.left+o.right),l=a.y-(o.top+o.bottom);const h=r*t.docToScreenScale,c=l*t.docToScreenScale;let u=h;for(;u<t.docScreenWidth;)n+="M"+Utils1.RoundCoordLP(u)+",0v"+t.docScreenHeight,u+=h;let d=c;for(;d<t.docScreenHeight;)n+="M0,"+Utils1.RoundCoordLP(d)+"h"+t.docScreenWidth,d+=c;i.SetPath(n),i.SetFillColor("none"),i.SetStrokeColor("#000088"),i.SetStrokeOpacity(".6"),i.SetStrokePattern("10,4"),i.SetStrokeWidth(".5"),e.AddElement(i),LogUtil.Debug("= U.DocUtil: UpdatePageDivider - Output:",{screenPaperDimensions:{width:h,height:c},pathCommandLength:n.length})}else LogUtil.Debug("= U.DocUtil: UpdatePageDivider - Output: No page divider layer found")}SnapToGrid(t){LogUtil.Debug("= U.DocUtil: SnapToGrid - Input:",t),this.svgDoc.GetWorkArea();let e=1;this.rulerConfig.useInches||(e=OptConstant.Common.MetricConv);const i=this.GetScaledRuler(e);let n={x:t.x,y:t.y},s={x:0,y:0};const a=this.rulerConfig.major/e,o=a/(this.rulerConfig.nGrid*i),r=Math.floor(n.x/a);s.x=r*a,n.x-=s.x;const l=Math.round(n.x/o);s.x+=l*o;const h=Math.floor(n.y/a);s.y=h*a,n.y-=s.y;const c=Math.round(n.y/o);return s.y+=c*o,LogUtil.Debug("= U.DocUtil: SnapToGrid - Output:",s),s}RulerTopDoubleClick(t){LogUtil.Debug("= U.DocUtil: RulerTopDoubleClick - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!1,!0),LogUtil.Debug("= U.DocUtil: RulerTopDoubleClick - Output: Completed")}RulerLeftDoubleClick(t){LogUtil.Debug("= U.DocUtil: RulerLeftDoubleClick - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!1),LogUtil.Debug("= U.DocUtil: RulerLeftDoubleClick - Output: Completed")}RulerCenterDoubleClick(t){LogUtil.Debug("= U.DocUtil: RulerCenterDoubleClick - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!0),LogUtil.Debug("= U.DocUtil: RulerCenterDoubleClick - Output: Completed")}RulerDragStart(t){if(LogUtil.Debug("= U.DocUtil: RulerDragStart - Input:",{dragEvent:t}),!T3Gv.docUtil.IsReadOnly()){if(MouseUtil.IsRightClick(t))return Utils2.StopPropagationAndDefaults(t),void LogUtil.Debug("= U.DocUtil: RulerDragStart - Output: Right click detected, operation canceled");T3Gv.docUtil.rulerInDrag=!0}LogUtil.Debug("= U.DocUtil: RulerDragStart - Output:",{rulerInDrag:T3Gv.docUtil.rulerInDrag})}RulerTopDrag(t){if(LogUtil.Debug("= U.DocUtil: RulerTopDrag - Input:",{dragEvent:t}),Utils2.StopPropagationAndDefaults(t),LMEvtUtil.IsCtrlClick(t))return Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!1,!0),void LogUtil.Debug("= U.DocUtil: RulerTopDrag - Output: Handled as double click");T3Gv.docUtil.RulerDragGuides(t,!1,!0),LogUtil.Debug("= U.DocUtil: RulerTopDrag - Output: Drag guides initiated")}RulerLeftDrag(t){if(LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Input:",{dragEvent:t}),Utils2.StopPropagationAndDefaults(t),LMEvtUtil.IsCtrlClick(t))return LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Ctrl click detected"),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!1),void LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Output: Handled as double click");T3Gv.docUtil.RulerDragGuides(t,!0,!1),LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Output: Drag guides initiated")}RulerCenterDrag(t){if(LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),LMEvtUtil.IsCtrlClick(t))return LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Ctrl click detected, invoking double click handler"),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!0),void LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Output: Double click action completed");T3Gv.docUtil.RulerDragGuides(t,!0,!0),LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Output: Drag guides initiated")}RulerDragEnd(t){LogUtil.Debug("= U.DocUtil: RulerDragEnd - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerEndGuides(),LogUtil.Debug("= U.DocUtil: RulerDragEnd - Output: Completed")}RulerHandleDoubleClick(t,e,i){if(LogUtil.Debug("= U.DocUtil: RulerHandleDoubleClick - Input:",{clickEvent:t,isVerticalRuler:e,isIntersectionPoint:i}),!MouseUtil.IsRightClick(t)){let n={originx:this.rulerConfig.originx,originy:this.rulerConfig.originy};const s=this.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);if(this.svgDoc.GetWorkArea(),this.rulerInDrag=!1,!this.IsReadOnly()){if(e&&i)n.originx=0,n.originy=0;else if(i)n.originx=s.x/this.rulerConfig.major,this.rulerConfig.useInches||(n.originx*=OptConstant.Common.MetricConv);else{if(!e)return void LogUtil.Debug("= U.DocUtil: RulerHandleDoubleClick - Early Exit: No valid direction specified.");n.originy=s.y/this.rulerConfig.major,this.rulerConfig.useInches||(n.originy*=OptConstant.Common.MetricConv)}this.SetRulers(n),this.ShowCoordinates(!0);const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);SelectUtil.UpdateSelectionAttributes(t),LogUtil.Debug("= U.DocUtil: RulerHandleDoubleClick - Output:",{updatedOrigins:n,selectedObjects:t})}}}RulerDragGuides(t,e,i){LogUtil.Debug("= U.DocUtil: RulerDragGuides - Input:",{dragEvent:t,isVerticalRuler:e,isHorizontalRuler:i});const n=this.svgDoc.GetWorkArea(),s=1/n.docScale,a=`${4*s},${2*s}`;if(this.rulerInDrag){(this.hRulerGuide&&!i||this.vRulerGuide&&!e||i&&!this.hRulerGuide||e&&!this.vRulerGuide)&&(this.RulerEndGuides(),this.rulerInDrag=!0),e&&!this.hRulerGuide&&(this.hRulerGuide=this.svgDoc.CreateShape(OptConstant.CSType.Line),this.hRulerGuide.SetFillColor("none"),this.hRulerGuide.SetStrokeColor("black"),this.hRulerGuide.SetStrokeWidth(s),this.hRulerGuide.SetStrokePattern(a),T3Gv.opt.svgOverlayLayer.AddElement(this.hRulerGuide)),i&&!this.vRulerGuide&&(this.vRulerGuide=this.svgDoc.CreateShape(OptConstant.CSType.Line),this.vRulerGuide.SetFillColor("none"),this.vRulerGuide.SetStrokeColor("black"),this.vRulerGuide.SetStrokeWidth(s),this.vRulerGuide.SetStrokePattern(a),T3Gv.opt.svgOverlayLayer.AddElement(this.vRulerGuide)),this.rulerGuideWinPos.x=t.gesture.center.clientX,this.rulerGuideWinPos.y=t.gesture.center.clientY,i||(this.rulerGuideWinPos.x=n.dispX+n.dispWidth/2),e||(this.rulerGuideWinPos.y=n.dispY+n.dispHeight/2),this.RulerDrawGuides();!this.rulerGuideScrollTimer&&(!(e&&i)||this.rulerGuideWinPos.x>n.dispX&&this.rulerGuideWinPos.y>n.dispY)&&(this.rulerGuideScrollTimer=setInterval((()=>{T3Gv.docUtil.RulerAutoScrollGuides()}),100))}LogUtil.Debug("= U.DocUtil: RulerDragGuides - Output:",{horizontalGuide:this.hRulerGuide?"exists":"null",verticalGuide:this.vRulerGuide?"exists":"null",guidePosition:this.rulerGuideWinPos,autoScrollTimer:this.rulerGuideScrollTimer?"active":"inactive"})}RulerAutoScrollGuides(){LogUtil.Debug("= U.DocUtil: RulerAutoScrollGuides - Input:",{rulerGuideWinPos:this.rulerGuideWinPos,workArea:this.svgDoc.GetWorkArea()});const t=this.svgDoc.GetWorkArea();let e=!1;const i=this.svgDoc.ConvertWindowToDocCoords(this.rulerGuideWinPos.x,this.rulerGuideWinPos.y);(this.rulerGuideWinPos.x<t.dispX||this.rulerGuideWinPos.x>t.dispX+t.dispWidth||this.rulerGuideWinPos.y<t.dispY||this.rulerGuideWinPos.y>t.dispY+t.dispHeight)&&(e=!0),e&&(this.ScrollToPosition(i.x,i.y),this.RulerDrawGuides()),LogUtil.Debug("= U.DocUtil: RulerAutoScrollGuides - Output:",{autoScrollPerformed:e,documentCoordinates:i})}RulerDrawGuides(){LogUtil.Debug("= U.DocUtil: RulerDrawGuides - Input:",{mouseWindowPosition:this.rulerGuideWinPos,hRulerGuide:this.hRulerGuide?"exists":"null",vRulerGuide:this.vRulerGuide?"exists":"null"});const t=this.svgDoc.GetWorkArea();let e=this.svgDoc.ConvertWindowToDocCoords(this.rulerGuideWinPos.x,this.rulerGuideWinPos.y);this.docConfig.enableSnap&&(e=this.SnapToGrid(e)),this.vRulerGuide&&(e.x<t.docVisX?e.x=t.docVisX:e.x>t.docVisX+t.docVisWidth&&(e.x=t.docVisX+t.docVisWidth),this.vRulerGuide.SetPoints(e.x,0,e.x,t.docHeight)),this.hRulerGuide&&(e.y<t.docVisY?e.y=t.docVisY:e.y>t.docVisY+t.docVisHeight&&(e.y=t.docVisY+t.docVisHeight),this.hRulerGuide.SetPoints(0,e.y,t.docWidth,e.y)),LogUtil.Debug("= U.DocUtil: RulerDrawGuides - Output:",{constrainedCoordinates:e,workAreaBounds:{horizontal:{min:t.docVisX,max:t.docVisX+t.docVisWidth},vertical:{min:t.docVisY,max:t.docVisY+t.docVisHeight}}})}RulerEndGuides(){LogUtil.Debug("= U.DocUtil: RulerEndGuides - Input:",{rulerGuideScrollTimer:this.rulerGuideScrollTimer,horizontalRulerGuide:this.hRulerGuide,verticalRulerGuide:this.vRulerGuide,rulerInDrag:this.rulerInDrag}),this.rulerGuideScrollTimer&&(clearInterval(this.rulerGuideScrollTimer),this.rulerGuideScrollTimer=null),this.hRulerGuide&&(T3Gv.opt.svgOverlayLayer.RemoveElement(this.hRulerGuide),this.hRulerGuide=null),this.vRulerGuide&&(T3Gv.opt.svgOverlayLayer.RemoveElement(this.vRulerGuide),this.vRulerGuide=null),this.rulerInDrag=!1,LogUtil.Debug("= U.DocUtil: RulerEndGuides - Output:",{rulerGuideScrollTimer:this.rulerGuideScrollTimer,horizontalRulerGuide:this.hRulerGuide,verticalRulerGuide:this.vRulerGuide,rulerInDrag:this.rulerInDrag})}SnapRect(t){LogUtil.Debug("= U.DocUtil: SnapRect - Input:",t);const e={x:t.x,y:t.y},i={x:t.x+t.width,y:t.y+t.height},n=this.SnapToGrid(e),s=this.SnapToGrid(i),a=n.x-e.x,o=s.x-i.x,r=Math.abs(a)>Math.abs(o)?o:a,l=n.y-e.y,h=s.y-i.y,c={x:r,y:Math.abs(l)>Math.abs(h)?h:l};return LogUtil.Debug("= U.DocUtil: SnapRect - Output:",c),c}UpdateConfig(t){LogUtil.Debug("= U.DocUtil: UpdateConfig - Input:",t),this.docConfig=t,this.UpdateRulerVisibility(),this.UpdateGridVisibility(),LogUtil.Debug("= U.DocUtil: UpdateConfig - Output: Updated docConfig",this.docConfig)}GetBackground(){LogUtil.Debug("= U.DocUtil: GetBackground - Input: Getting background element");const t=this.backgroundElem;return LogUtil.Debug("= U.DocUtil: GetBackground - Output:",t?"Background element retrieved":"No background element"),t}IsReadOnly(){return!1}ZoomChange(t,e){LogUtil.Debug("= u.DocUtil: ZoomChange/ - Input:",{newZoomScale:t,newZoomStep:e});const i=T3Gv.docUtil.GetZoomFactor();LogUtil.Debug("= u.DocUtil: ZoomChange/ - Current Zoom Factor:",i);const n=t>i;t&&t>0&&this.ZoomInAndOut(n,!1,t,e),LogUtil.Debug("= u.DocUtil: ZoomChange/ - Output: Zoom changed to",t)}ZoomSpecify(t,e){this.SetZoomLevel(100*t,e),DataOpt.SaveToLocalStorage(),T3Gv.docUtil.UpdateRefZoomScale(Number(t.toFixed(2))),LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - New zoom factor set:",Number(t.toFixed(2)))}ZoomInAndOut(t,e,i,n){LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - Input:",{isZoomIn:t,skipCentering:e});const s=n||HvConstant.T3Config.Zoom.Step,a=HvConstant.T3Config.Zoom.Max,o=HvConstant.T3Config.Zoom.Min,r=T3Gv.docUtil.GetZoomFactor();let l=i||1;if(t){if(r>=a)return void LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - Already at maximum zoom (4x), exiting");l=Math.round(r/s)*s,l=parseFloat(l.toFixed(2)),l===r&&(l=r+s),l>a&&(l=a)}else{if(r<=o)return void LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - Already at minimum zoom (0.25x), exiting");l=Math.round(r/s)*s,l=parseFloat(l.toFixed(2)),l===r&&(l=r-s),l<o&&(l=o)}this.SetZoomLevel(100*l,e),DataOpt.SaveToLocalStorage(),T3Gv.docUtil.UpdateRefZoomScale(Number(l.toFixed(2))),LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - New zoom factor set:",Number(l.toFixed(2)))}SetZoomLevel(t,e){LogUtil.Debug("= u.DocUtil: SetZoomLevel/ - Input: zoomPct, skipCentering?",{zoomPct:t,skipCentering:e}),t>0&&!this.inZoomIdle&&T3Gv.opt?(UIUtil.SetDocumentScale(t/100,e),LogUtil.Debug("= u.DocUtil: SetZoomLevel/ - Applied zoom factor:",t/100)):LogUtil.Debug("= u.DocUtil: SetZoomLevel/ - Zoom not applied. Conditions not met:",{validZoom:t>0,notIdle:!this.inZoomIdle,optManagerExists:!!T3Gv.opt}),DataOpt.SaveToLocalStorage()}SetZoomLevelByIndex(t){if(LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - Input:",{zoomIndex:t}),t<0||t>=this.docConfig.zoomLevels.length)LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - Invalid zoom index, out of bounds");else if(this.docConfig.zoom=t,T3Gv.opt){const e=this.docConfig.zoomLevels[t]/100;LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - Setting zoom factor:",e),UIUtil.SetDocumentScale(e)}else LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - OptManager not available, zoom not applied")}IdleZoomCtls(){LogUtil.Debug("O.DocOpt - IdleZoomControls - Entering function");const t=$$1("#zoom-ctl-id"),e=Math.round(100*T3Gv.docUtil.GetZoomFactor());LogUtil.Debug("O.DocOpt - IdleZoomControls - Current zoom percentage:",e),T3Gv.docUtil.GetSizeToFit(),this.inZoomIdle=!0,t.val(e).change(),this.inZoomIdle=!1,LogUtil.Debug("O.DocOpt - IdleZoomControls - Zoom controls updated")}ZoomIn(){this.ZoomInAndOut(!0)}ZoomOut(){this.ZoomInAndOut(!1)}UpdateRefZoomScale(t){zoomScale.value=t}LoadRulersSetting(){var t,e;const i=DataOpt.LoadDocSettingData(),n=null==(e=null==(t=null==i?void 0:i.docConfig)?void 0:t.showRulers)||e;this.docConfig.showRulers=n,RefUtil.SetShowRulers(n),this.UpdateRulerVisibility(),LogUtil.Debug("= U.DocUtil: LoadRulersSetting - Output:",{showRulers:n})}LoadGridSetting(){var t,e;const i=DataOpt.LoadDocSettingData(),n=null==(e=null==(t=null==i?void 0:i.docConfig)?void 0:t.showGrid)||e;this.docConfig.showGrid=n,RefUtil.SetShowGrid(n),this.UpdateGridVisibility(),LogUtil.Debug("= U.DocUtil: LoadGridSetting - Output:",{showGrid:n})}RemoveAllLayers(){const t=T3Gv.opt.layersManagerBlockId,e=ObjectUtil$1.GetObjectPtr(t,!1).layers;LogUtil.Info("= u.DocUtil: RemoveAllLayers - Input:",{layersManagerBlockId:t,layers:e}),this.svgDoc.RemoveLayer("0")}}class ArrowDefs{constructor(){__publicField(this,"uiArrowDefs"),__publicField(this,"InitArrowDefs",(()=>{this.uiArrowDefs=[{id:0,desc:"No arrow",defArea:{width:1,height:1},endPt:{x:0,y:0},attachPt:{x:0,y:0},centered:!1,geometry:[]},{id:1,desc:"Filled arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]}]},{id:2,desc:"Line arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10]]}]},{id:3,desc:"Fancy arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["L",5,5],["z"]]}]},{id:4,desc:"Filled circle",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!0,pathData:{x:0,y:0,width:10,height:10}}]},{id:5,desc:"Unfilled circle",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}}]},{id:6,desc:"Filled square",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"RECT",filled:!0,pathData:{x:0,y:0,width:10,height:10}}]},{id:7,desc:"Unfilled square",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"RECT",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}}]},{id:8,desc:"Crows foot",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,5],["L",10,0],["M",0,5],["L",10,5],["M",0,5],["L",10,10]]}]},{id:9,desc:"Back slash",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,10]]}]},{id:10,desc:"Filled crows foot",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,5],["L",10,0],["L",10,10],["z"]]}]},{id:11,desc:"Filled diamond",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,5],["L",10,0],["L",20,5],["L",10,10],["z"]]}]},{id:12,desc:"Zero to many",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",20,0],["M",10,5],["L",20,5],["M",10,5],["L",20,10]]}]},{id:13,desc:"One to many",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",5,0],["L",5,10]]},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",20,0],["M",10,5],["L",20,5],["M",10,5],["L",20,10]]}]},{id:14,desc:"Zero to one",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",20,5],["M",15,0],["L",15,10]]}]},{id:15,desc:"One to one",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:20,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",5,0],["L",5,10],["M",10,0],["L",10,10]]}]},{id:16,desc:"One to zero",defArea:{width:20,height:10},endPt:{x:15,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",5,0],["L",5,10]]},{type:"OVAL",filled:!1,stroke:.5,pathData:{x:10,y:0,width:10,height:10}}]},{id:17,desc:"Center filled arrow",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]}]},{id:18,desc:"Center line arrow",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10]]}]},{id:19,desc:"Center fancy arrow",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["L",5,5],["z"]]}]},{id:20,desc:"Double arrow",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]},{type:"PATH",filled:!0,pathData:[["M",10,0],["L",20,5],["L",10,10],["z"]]}]},{id:21,desc:"Filled dimension arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,0],["L",10,10]]}]},{id:22,desc:"Line dimension arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10]]},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,0],["L",10,10]]}]},{id:23,desc:"Dimension line",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,0],["L",10,10]]}]},{id:25,desc:"Arc down",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,1,10,10]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,0,10,0]]}]},{id:26,desc:"Arc up",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,0,10,0]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,1,10,10]]}]},{id:27,desc:"Half arrow up",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,10],["L",10,5]]}]},{id:28,desc:"Half arrow down",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,10],["L",10,5]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5]]}]},{id:29,desc:"Center cross",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,10],["M",0,10],["L",10,0]]}]},{id:30,desc:"Half line up",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,0]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,10]]}]},{id:31,desc:"Half line down",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,10]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,0]]}]},{id:32,desc:"Slash",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,10],["L",10,0]]}]},{id:33,desc:"Unfilled arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]}]},{id:34,desc:"Unfilled crows foot",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,5],["L",10,0],["L",10,10],["z"]]}]},{id:35,desc:"Unfilled diamond",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,5],["L",10,0],["L",20,5],["L",10,10],["z"]]}]},{id:36,desc:"Single line cross",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",0,10]]}]},{id:37,desc:"down indicator",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,10],["L",5,5],["z"]]}],flippedGeometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,0],["L",5,5],["z"]]}]},{id:38,desc:"up indicator",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,0],["L",5,5],["z"]]}],flippedGeometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,10],["L",5,5],["z"]]}]},{id:39,desc:"round end",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,fixedSizeScale:1,geometry:[{type:"OVAL",filled:!0,pathData:{x:0,y:0,width:10,height:10}}]}]})),this.InitArrowDefs()}}class ArrowSizes{constructor(){__publicField(this,"uiarrowSizes",[]),__publicField(this,"InitArrowSizes",(()=>{this.uiarrowSizes=[2,4,6,1.5,3,12,24]})),this.InitArrowSizes()}}class LibList{constructor(){__publicField(this,"selected"),__publicField(this,"lib"),this.selected=0,this.lib=[]}}var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$2(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$2(e,i,a),a};class HeaderInfo{constructor(){__publicField(this,"Page"),__publicField(this,"MaxWorkDim"),__publicField(this,"DimensionFont"),__publicField(this,"DimensionFontStyle"),__publicField(this,"flags"),__publicField(this,"BusinessModule"),__publicField(this,"dateformat"),__publicField(this,"originaltemplate"),__publicField(this,"orgcharttable"),__publicField(this,"exportpath"),__publicField(this,"presentationBackground"),__publicField(this,"presentationName"),__publicField(this,"importSourcePath"),__publicField(this,"defaultlibs"),__publicField(this,"lp_list"),__publicField(this,"ClipboardBuffer"),__publicField(this,"ClipboardType"),__publicField(this,"holidaymask"),__publicField(this,"DocIsDirty"),__publicField(this,"AllowReplace"),__publicField(this,"FontList"),__publicField(this,"SymbolSearchString"),__publicField(this,"ParentPageID"),__publicField(this,"clipboardJson"),this.Initialize()}Initialize(){this.Page=new PageSetting,this.MaxWorkDim=new Point$1(OptConstant.Common.MaxWorkDimX,OptConstant.Common.MaxWorkDimY),this.DimensionFont=new FontRecord,this.DimensionFontStyle=new DefaultStyle,this.flags=OptConstant.HeaderFlags.Pages,this.BusinessModule="",this.dateformat=-1,this.originaltemplate="",this.orgcharttable="",this.exportpath="",this.presentationBackground="",this.presentationName="",this.importSourcePath="",this.defaultlibs="",this.lp_list=new LibList,this.ClipboardBuffer=null,this.ClipboardType=T3Constant.ClipboardType.None,this.clipboardJson=null,this.holidaymask=0,this.DocIsDirty=!1,this.AllowReplace=!0,this.FontList=[],this.SymbolSearchString="",this.ParentPageID=""}}__decorateClass$2([Type((()=>PageSetting))],HeaderInfo.prototype,"Page",2),__decorateClass$2([Type((()=>Point$1))],HeaderInfo.prototype,"MaxWorkDim",2),__decorateClass$2([Type((()=>FontRecord))],HeaderInfo.prototype,"DimensionFont",2),__decorateClass$2([Type((()=>DefaultStyle))],HeaderInfo.prototype,"DimensionFontStyle",2),__decorateClass$2([Type((()=>LibList))],HeaderInfo.prototype,"lp_list",2);class ImageRecord{constructor(){__publicField(this,"mr"),__publicField(this,"croprect"),__publicField(this,"imageflags"),__publicField(this,"scale"),__publicField(this,"iconid"),this.mr={x:0,y:0,width:0,height:0},this.croprect={left:0,top:0,right:0,bottom:0},this.imageflags=NvConstant.ImageScales.CropToFit,this.scale=1,this.iconid=0}}class OptUtil{constructor(){__publicField(this,"svgDocId"),__publicField(this,"svgDoc"),__publicField(this,"svgObjectLayer"),__publicField(this,"svgOverlayLayer"),__publicField(this,"svgHighlightLayer"),__publicField(this,"svgCollabLayer"),__publicField(this,"sVGroot"),__publicField(this,"optSlt"),__publicField(this,"optSltStartX"),__publicField(this,"optSltStartY"),__publicField(this,"optSltFrame"),__publicField(this,"dragElementList"),__publicField(this,"dragBBoxList"),__publicField(this,"dragEnclosingRect"),__publicField(this,"dragStartX"),__publicField(this,"dragStartY"),__publicField(this,"dragDeltaX"),__publicField(this,"dragDeltaY"),__publicField(this,"dragTargetId"),__publicField(this,"dragTargetBBox"),__publicField(this,"dragGotMove"),__publicField(this,"dragGotAutoResizeRight"),__publicField(this,"dragGotAutoResizeBottom"),__publicField(this,"dragGotAutoResizeOldX"),__publicField(this,"dragGotAutoResizeOldY"),__publicField(this,"theDragGotAutoResizeOldLeft"),__publicField(this,"theDragGotAutoResizeOldTop"),__publicField(this,"moveList"),__publicField(this,"moveBounds"),__publicField(this,"pinRect"),__publicField(this,"theDragGotAutoResizeLeft"),__publicField(this,"theDragGotAutoResizeTop"),__publicField(this,"noUndo"),__publicField(this,"actionStoredObjectId"),__publicField(this,"actionSvgObject"),__publicField(this,"actionTriggerId"),__publicField(this,"actionTriggerData"),__publicField(this,"actionStartX"),__publicField(this,"actionStartY"),__publicField(this,"actionTableLastX"),__publicField(this,"actionTableLastY"),__publicField(this,"actionOldExtra"),__publicField(this,"actionBBox"),__publicField(this,"actionNewBBox"),__publicField(this,"actionLockAspectRatio"),__publicField(this,"actionAspectRatioWidth"),__publicField(this,"actionAspectRatioHeight"),__publicField(this,"crtOpt"),__publicField(this,"drawShape"),__publicField(this,"drawStartX"),__publicField(this,"drawStartY"),__publicField(this,"lineDrawStartX"),__publicField(this,"lineDrawStartY"),__publicField(this,"lineDrawId"),__publicField(this,"lineDrawLineId"),__publicField(this,"lineStamp"),__publicField(this,"dynamicGuides"),__publicField(this,"rotateKnobCenterDivisor"),__publicField(this,"rotateStartPoint"),__publicField(this,"rotateEndPoint"),__publicField(this,"rotateObjectRadians"),__publicField(this,"rotateStartRotation"),__publicField(this,"rotateEndRotation"),__publicField(this,"rotatePivotX"),__publicField(this,"rotatePivotY"),__publicField(this,"rotateSnap"),__publicField(this,"enhanceRotateSnap"),__publicField(this,"autoScrollTimer"),__publicField(this,"autoScrollTimerId"),__publicField(this,"autoScrollXPos"),__publicField(this,"autoScrollYPos"),__publicField(this,"inAutoScroll"),__publicField(this,"mainAppElement"),__publicField(this,"mainAppHammer"),__publicField(this,"workAreaElement"),__publicField(this,"WorkAreaHammer"),__publicField(this,"documentElement"),__publicField(this,"documentElementHammer"),__publicField(this,"workAreaTextInputProxy"),__publicField(this,"TEHammer"),__publicField(this,"TEWorkAreaHammer"),__publicField(this,"clickAreaHammer"),__publicField(this,"decAreaHammer"),__publicField(this,"noteAreaHammer"),__publicField(this,"textHammer"),__publicField(this,"editModeList"),__publicField(this,"selectObjsBlockId"),__publicField(this,"sdDataBlockId"),__publicField(this,"teDataBlockId"),__publicField(this,"layersManagerBlockId"),__publicField(this,"linksBlockId"),__publicField(this,"stampTimeout"),__publicField(this,"stampCompleteCallback"),__publicField(this,"stampCompleteUserData"),__publicField(this,"stampHCenter"),__publicField(this,"stampVCenter"),__publicField(this,"stampShapeOffsetX"),__publicField(this,"stampShapeOffsetY"),__publicField(this,"stampSticky"),__publicField(this,"lastOpDuplicate"),__publicField(this,"formatPainterMode"),__publicField(this,"formatPainterStyle"),__publicField(this,"formatPainterSticky"),__publicField(this,"formatPainterText"),__publicField(this,"formatPainterParaFormat"),__publicField(this,"formatPainterArrows"),__publicField(this,"nudgeDelta"),__publicField(this,"nudgeOpen"),__publicField(this,"nudgeX"),__publicField(this,"nudgeY"),__publicField(this,"nudgeGrowX"),__publicField(this,"nudgeGrowY"),__publicField(this,"useDefaultStyle"),__publicField(this,"newObjectVisible"),__publicField(this,"TextureList"),__publicField(this,"nStdTextures"),__publicField(this,"richGradients"),__publicField(this,"header"),__publicField(this,"FileVersion"),__publicField(this,"bDrawEffects"),__publicField(this,"hasBlockDirectory"),__publicField(this,"nDataStoreStart"),__publicField(this,"textClipboard"),__publicField(this,"htmlClipboard"),__publicField(this,"imageClipboard"),__publicField(this,"cutFromButton"),__publicField(this,"topLeftPastePos"),__publicField(this,"topLeftPasteScrollPos"),__publicField(this,"pasteCount"),__publicField(this,"dirtyList"),__publicField(this,"dirtyListMoveOnly"),__publicField(this,"dirtyListReOrder"),__publicField(this,"curNoteShape"),__publicField(this,"curNoteGraphPint"),__publicField(this,"bInNoteEdit"),__publicField(this,"bNoteChanged"),__publicField(this,"emptySymbolList"),__publicField(this,"emptyEMFList"),__publicField(this,"addCount"),__publicField(this,"symbolLibraryItemID"),__publicField(this,"bitmapImportCanvas"),__publicField(this,"bitmapImportCanvasCTX"),__publicField(this,"bitmapScaledCanvas"),__publicField(this,"bitmapScaledCanvasCTX"),__publicField(this,"bitmapImportSourceWidth"),__publicField(this,"bitmapImportSourceHeight"),__publicField(this,"bitmapImportDestWidth"),__publicField(this,"bitmapImportDestHeight"),__publicField(this,"bitmapImportMaxScaledWidth"),__publicField(this,"bitmapImportMaxScaledHeight"),__publicField(this,"bitmapImportDPI"),__publicField(this,"bitmapImportMimeType"),__publicField(this,"bitmapImportOriginalSize"),__publicField(this,"bitmapImportScaledSize"),__publicField(this,"scaledBitmapCallback"),__publicField(this,"bitmapImportEXIFdata"),__publicField(this,"bitmapImportFile"),__publicField(this,"bitmapImportResult"),__publicField(this,"wasClickInShape"),__publicField(this,"textEntryTimer"),__publicField(this,"eventTimestamp"),__publicField(this,"actionArrowHideTimer"),__publicField(this,"uniqueId"),__publicField(this,"fromOverlayLayer"),__publicField(this,"postMoveSelectId"),__publicField(this,"bBuildingSymbols"),__publicField(this,"bTokenizeStyle"),__publicField(this,"linkParams"),__publicField(this,"rClickParam"),__publicField(this,"bInDimensionEdit"),__publicField(this,"oldAllowSave"),__publicField(this,"doubleClickSymbolTimeStamp"),__publicField(this,"importContext"),__publicField(this,"curHiliteShape"),__publicField(this,"cachedHeight"),__publicField(this,"cachedWidth"),__publicField(this,"commentUserIds"),__publicField(this,"activeExpandedView"),__publicField(this,"alternateStateManagerVars"),__publicField(this,"socketAction"),__publicField(this,"pageAction"),__publicField(this,"pagesToDelete"),__publicField(this,"oldFileMetaData"),__publicField(this,"selectionState"),__publicField(this,"forcedotted"),__publicField(this,"ob"),__publicField(this,"PastePoint"),__publicField(this,"OldConnectorExtra"),__publicField(this,"OldConnectorWd"),__publicField(this,"OldConnectorHt"),__publicField(this,"OldConnectorGap"),__publicField(this,"ConnectorList"),__publicField(this,"ConnectorWidthList"),__publicField(this,"flowchartShift"),__publicField(this,"HookedObjectMovingTimer"),__publicField(this,"HookedObjectMovingLastExecutionTime")}InitializeProperties(){this.svgDocId="#svg-area",this.svgObjectLayer=null,this.svgOverlayLayer=null,this.svgHighlightLayer=null,this.svgCollabLayer=null,this.sVGroot=null,this.optSlt=null,this.optSltStartX=0,this.optSltStartY=0,this.optSltFrame={x:0,y:0,width:0,height:0},this.dragElementList=[],this.dragStartX=0,this.dragStartY=0,this.dragDeltaX=0,this.dragDeltaY=0,this.dragTargetId=null,this.dragGotMove=!1,this.dragBBoxList=[],this.dragTargetBBox={},this.dragEnclosingRect=null,this.dragGotAutoResizeRight=!1,this.dragGotAutoResizeBottom=!1,this.dragGotAutoResizeOldX=[],this.dragGotAutoResizeOldY=[],this.theDragGotAutoResizeOldLeft=[],this.theDragGotAutoResizeOldTop=[],this.theDragGotAutoResizeLeft=!1,this.theDragGotAutoResizeTop=!1,this.moveList=[],this.moveBounds=null,this.pinRect=null,this.noUndo=!1,this.actionStoredObjectId=-1,this.actionSvgObject=null,this.actionTriggerId=0,this.actionTriggerData=0,this.actionStartX=0,this.actionStartY=0,this.actionTableLastX=0,this.actionTableLastY=0,this.actionOldExtra=0,this.actionBBox={},this.actionNewBBox={},this.actionLockAspectRatio=!1,this.actionAspectRatioWidth=0,this.actionAspectRatioHeight=0,this.crtOpt=OptConstant.OptTypes.None,this.drawShape=null,this.drawStartX=0,this.drawStartY=0,this.lineDrawStartX=0,this.lineDrawStartY=0,this.lineDrawId=-1,this.lineDrawLineId=-1,this.lineStamp=!1,this.fromOverlayLayer=!1,this.dynamicGuides=null,this.rotateKnobCenterDivisor={x:2,y:2},this.rotateStartPoint={},this.rotateEndPoint={},this.rotateObjectRadians=0,this.rotateStartRotation=0,this.rotateEndRotation=0,this.rotatePivotX=0,this.rotatePivotY=0,this.rotateSnap=5,this.enhanceRotateSnap=45,this.autoScrollTimer=new T3Timer(this),this.autoScrollTimerId=-1,this.autoScrollXPos=0,this.autoScrollYPos=0,this.inAutoScroll=!1,this.mainAppElement=null,this.mainAppHammer=null,this.workAreaElement=null,this.WorkAreaHammer=null,this.workAreaTextInputProxy=null,this.TEHammer=null,this.TEWorkAreaHammer=null,this.clickAreaHammer=null,this.decAreaHammer=null,this.noteAreaHammer=null,this.textEntryTimer=null,this.editModeList=null,this.selectObjsBlockId=-1,this.sdDataBlockId=-1,this.teDataBlockId=-1,this.layersManagerBlockId=-1,this.linksBlockId=-1,this.stampTimeout=null,this.stampCompleteCallback=null,this.stampCompleteUserData=null,this.stampHCenter=!0,this.stampVCenter=!0,this.stampShapeOffsetX=0,this.stampShapeOffsetY=0,this.stampSticky=!1,this.lastOpDuplicate=!1,this.formatPainterMode=StyleConstant.FormatPainterModes.None,this.formatPainterStyle=new QuickStyle,this.formatPainterSticky=!1,this.formatPainterText=new QuickStyle,this.formatPainterParaFormat=new ParagraphFormat,this.formatPainterArrows=null,this.nudgeDelta=10,this.nudgeOpen=!1,this.nudgeX=0,this.nudgeY=0,this.nudgeGrowX=0,this.nudgeGrowY=0,this.useDefaultStyle=!1,this.newObjectVisible=!1,this.TextureList=new TextureList,this.nStdTextures=0,this.richGradients=[],this.header=new HeaderInfo,this.FileVersion=41,this.bDrawEffects=!0,this.hasBlockDirectory=!1,this.nDataStoreStart=T3Gv.stdObj.storedObjects.length,this.textClipboard=null,this.htmlClipboard=null,this.imageClipboard=null,this.cutFromButton=!1,this.topLeftPastePos={x:0,y:0},this.topLeftPasteScrollPos={x:0,y:0},this.pasteCount=0,this.dirtyList=[],this.dirtyListMoveOnly=[],this.dirtyListReOrder=!1,this.bInNoteEdit=!1,this.bNoteChanged=!1,this.wasClickInShape=!1,this.eventTimestamp=0,this.actionArrowHideTimer=new T3Timer(this),this.uniqueId=0,this.bInDimensionEdit=!1,this.oldAllowSave=!0,this.postMoveSelectId=null,this.bBuildingSymbols=!1,this.bTokenizeStyle=!1,this.linkParams=null,this.rClickParam=null,this.curHiliteShape=-1,this.doubleClickSymbolTimeStamp=0,this.importContext=null,this.cachedHeight=null,this.cachedWidth=null,this.emptySymbolList=[],this.emptyEMFList=[],this.addCount=0,this.symbolLibraryItemID=-1,this.bitmapImportCanvas=null,this.bitmapImportCanvasCTX=null,this.bitmapScaledCanvas=null,this.bitmapScaledCanvasCTX=null,this.bitmapImportSourceWidth=0,this.bitmapImportSourceHeight=0,this.bitmapImportDestWidth=800,this.bitmapImportDestHeight=800,this.bitmapImportMaxScaledWidth=1200,this.bitmapImportMaxScaledHeight=1200,this.bitmapImportDPI=200,this.bitmapImportMimeType="",this.bitmapImportOriginalSize=0,this.bitmapImportScaledSize=0,this.scaledBitmapCallback=null,this.bitmapImportEXIFdata=null,this.bitmapImportFile=null,this.bitmapImportResult=null,this.commentUserIds=[],this.activeExpandedView=null,this.alternateStateManagerVars={bHasBeenSaved:!1},this.socketAction=[],this.pageAction=[],this.pagesToDelete=[],this.oldFileMetaData=null,this.selectionState=new SelectionAttr,this.InitBlockData()}InitBlockData(){const t=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.SelectedListObject,[]);this.selectObjsBlockId=t.ID;const e=new SDData;e.def.style=new QuickStyle,e.def.pen=Utils1.DeepCopy(OptConstant.Common.PenStylingDefault),e.def.highlighter=Utils1.DeepCopy(OptConstant.Common.HighlighterStylingDefault),e.d_sarrow=0,e.d_sarrowdisp=!1,e.d_earrow=0,e.d_earrowdisp=!1,e.d_arrowsize=1,e.CurrentTheme=null;const i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.SDDataObject,e);this.sdDataBlockId=i.ID;const n=new LayersManager,s=new Layer$1;s.name=OptConstant.Common.DefaultLayerName,n.layers.push(s),n.nlayers=1,n.activelayer=0;const a=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.LayersManagerObject,n);this.layersManagerBlockId=a.ID;const o=new TEData,r=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TEDataObject,o);this.teDataBlockId=r.ID;const l=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.LinkListObject,[]);this.linksBlockId=l.ID}Initialize(t=!1){ObjectUtil$1.PreserveUndoState(!0),UIUtil.InitSvgDocument(t),UIUtil.InitT3GvOpt(),this.sVGroot=this.svgDoc.svgObj.node,SelectUtil.UpdateSelectionAttributes(null),this.BuildarrowHlkTables(),OptCMUtil.SetEditMode(NvConstant.EditState.Default)}HandleDimensionEditMode(t){LogUtil.Debug("= O.OptUtil  HandleDimensionEditMode - Input:",t);const e=TextConstant.TextFace;this.selectionState.fontid=-1,this.selectionState.fontsize=T3Gv.opt.header.DimensionFont.fontSize,this.selectionState.bold=(T3Gv.opt.header.DimensionFont.face&e.Bold)>0,this.selectionState.italic=(T3Gv.opt.header.DimensionFont.face&e.Italic)>0,this.selectionState.underline=(T3Gv.opt.header.DimensionFont.face&e.Underline)>0,this.selectionState.superscript=(T3Gv.opt.header.DimensionFont.face&e.Superscript)>0,this.selectionState.subscript=(T3Gv.opt.header.DimensionFont.face&e.Subscript)>0,this.selectionState.csOptMng=null,LogUtil.Debug("= O.OptUtil  HandleDimensionEditMode - Output: Dimension edit mode processed")}HandleEmptySelectionOrNoteEditMode(t){LogUtil.Debug("= O.OptUtil  HandleEmptySelectionOrNoteEditMode - Input:",t);const e=TextConstant.TextFace;if(this.selectionState.fontid=-1,this.selectionState.fontsize=t.def.style.Text.FontSize,this.selectionState.bold=(t.def.style.Text.Face&e.Bold)>0,this.selectionState.italic=(t.def.style.Text.Face&e.Italic)>0,this.selectionState.underline=(t.def.style.Text.Face&e.Underline)>0,this.selectionState.superscript=(t.def.style.Text.Face&e.Superscript)>0,this.selectionState.subscript=(t.def.style.Text.Face&e.Subscript)>0,this.selectionState.TextDirection=0==(t.def.textflags&NvConstant.TextFlags.HorizText),this.selectionState.dimensions=t.dimensions&NvConstant.DimensionFlags.Always||t.dimensions&NvConstant.DimensionFlags.Select,this.bInNoteEdit&&this.curNoteShape>=0){const t=OptAhUtil.GetGvSviOpt(this.curNoteShape);t&&(this.selectionState.csOptMng=t)}LogUtil.Debug("= O.OptUtil  HandleEmptySelectionOrNoteEditMode - Output: Empty selection or note edit mode processed")}ProcessTargetObject(t,e){LogUtil.Debug("= O.OptUtil  ProcessTargetObject - Input:",{targetId:t,targetObject:e});const i=OptAhUtil.GetGvSviOpt(t);if(i&&(this.selectionState.csOptMng=i),this.selectionState.tselect=t,e){this.selectionState.colorfilter=e.colorfilter,e.GetPositionRect(),this.selectionState.subtype=e.subtype,this.selectionState.objecttype=e.objecttype,this.selectionState.datasetElemID=e.datasetElemID;const t=e.GetDimensionsForDisplay();this.selectionState.left=t.x,this.selectionState.top=t.y,this.selectionState.width=t.width,this.selectionState.height=t.height,e.objecttype===NvConstant.FNObjectTypes.FlWall&&(this.selectionState.WallThickness=e.StyleRecord.Line.Thickness),this.selectionState.leftstr=e.GetLengthInRulerUnits(this.selectionState.left,T3Gv.docUtil.rulerConfig.originx),this.selectionState.topstr=e.GetLengthInRulerUnits(this.selectionState.top,T3Gv.docUtil.rulerConfig.originy),this.selectionState.widthstr=e.GetLengthInRulerUnits(this.selectionState.width),0!==t.height?this.selectionState.heightstr=e.GetLengthInRulerUnits(this.selectionState.height):this.selectionState.heightstr="",this.selectionState.selectionhastext=e.DataID>=0}LogUtil.Debug("= O.OptUtil  ProcessTargetObject - Output: Target object processed")}ProcessSelectedObject(t,e,i){LogUtil.Debug("= O.OptUtil  ProcessSelectedObject - Input:",{object:t,textObject:e,objectIndex:i});const n=OptConstant.DrawObjectBaseClass;t.ImageURL&&t.ImageURL.length&&this.selectionState.nimageselected++,t instanceof Instance.Shape.ShapeContainer&&(this.selectionState.lockedTableSelected=!0,this.selectionState.IsTargetTable=!0),t.objecttype===NvConstant.FNObjectTypes.FlWall&&(this.selectionState.iswallselected=!0);let s=t.DrawingObjectBaseClass;switch(t instanceof Instance.Shape.PolyLineContainer&&(s=n.Shape),s){case n.Shape:this.ProcessShapeObject(t,null);break;case n.Connector:this.ProcessConnectorObject(t);case n.Line:this.ProcessLineObject(t)}e.DataID>=0&&(this.selectionState.selectionhastext=!0),(t instanceof Instance.Shape.GroupSymbol||t.NativeID>=0)&&this.selectionState.ngroupsselected++,TextUtil.HandleTextFormatAttributes(e,i),t instanceof Instance.Shape.PolyLineContainer&&this.selectionState.npolylinecontainerselected++,t instanceof Instance.Shape.PolyLine&&t.polylist&&t.polylist.segs&&(this.selectionState.nsegs=t.polylist.segs.length,this.selectionState.polyclosed=t.polylist.closed),this.selectionState.dimensions|=t.Dimensions&(NvConstant.DimensionFlags.Always|NvConstant.DimensionFlags.Select),LogUtil.Debug("= O.OptUtil  ProcessSelectedObject - Output: Object processed")}ProcessShapeObject(t,e){this.selectionState.nshapeselected++,t.ShapeType!==OptConstant.ShapeType.Rect&&t.ShapeType!==OptConstant.ShapeType.RRect||(t.moreflags&OptConstant.ObjMoreFlags.FixedRR?-2===this.selectionState.fixedCornerRadius?this.selectionState.fixedCornerRadius=100*t.shapeparam:this.selectionState.fixedCornerRadius!==100*t.shapeparam&&(this.selectionState.fixedCornerRadius=-1):-2===this.selectionState.fixedCornerRadius&&0===t.shapeparam?this.selectionState.fixedCornerRadius=0:this.selectionState.fixedCornerRadius=-1),LogUtil.Debug("= O.OptUtil  ProcessShapeObject - Output: Shape object processed")}ProcessConnectorObject(t){LogUtil.Debug("= O.OptUtil  ProcessConnectorObject - Input:",t),this.selectionState.nconnectorselected++,t.AllowCurveOnConnector()&&(this.selectionState.connectorCanHaveCurve=!0,-2===this.selectionState.lineCornerRadius?this.selectionState.lineCornerRadius=t.arraylist.curveparam:this.selectionState.lineCornerRadius!==t.arraylist.curveparam&&(this.selectionState.lineCornerRadius=-1)),LogUtil.Debug("= O.OptUtil  ProcessConnectorObject - Output: Connector object processed")}ProcessLineObject(t){LogUtil.Debug("= O.OptUtil  ProcessLineObject - Input:",t),this.selectionState.nlineselected++;const e=t.TextDirection;0===this.selectionState.TextDirection?this.selectionState.TextDirection=e:this.selectionState.TextDirection!==e&&(this.selectionState.TextDirection=-1),t.LineType===OptConstant.LineType.SEGLINE&&(-2===this.selectionState.lineCornerRadius?this.selectionState.lineCornerRadius=t.segl.curveparam:this.selectionState.lineCornerRadius!==t.segl.curveparam&&(this.selectionState.lineCornerRadius=-1)),LogUtil.Debug("= O.OptUtil  ProcessLineObject - Output: Line processed",{lineCount:this.selectionState.nlineselected,textDirection:this.selectionState.TextDirection,cornerRadius:this.selectionState.lineCornerRadius})}BuildarrowHlkTables(){LogUtil.Debug("= O.OptUtil  BuildarrowHlkTables - Input: No parameters");const t=(new ArrowDefs).uiArrowDefs,e=(new ArrowSizes).uiarrowSizes;T3Gv.arrowHlkTable.length=t.length;for(let i=0;i<t.length;i++)T3Gv.arrowHlkTable[t[i].id]=t[i];T3Gv.arrowHsTable.length=e.length;for(let i=0;i<e.length;i++)T3Gv.arrowHsTable[i]=e[i];LogUtil.Debug("= O.OptUtil  BuildarrowHlkTables - Output: Arrowhead lookup tables built")}SetDimensionVisibility(t,e){}CloseEdit(t,e,i){LogUtil.Debug("= O.OptUtil  CloseEdit - Input:",{skipShapeClose:t,closeOption:e,skipTooltipProcessing:i}),this.nudgeOpen,UIUtil.SetFormatPainter(!0,!1),this.DeactivateAllTextEdit(!1,!t),this.bInNoteEdit,t||this.CloseShapeEdit(e),LogUtil.Debug("= O.OptUtil  CloseEdit - Output: done")}DeactivateAllTextEdit(t,e){LogUtil.Debug("= O.OptUtil  DeactivateAllTextEdit - Input:",{skipShapeClose:t,closeOption:e});if(-1!==ObjectUtil$1.GetObjectPtr(this.teDataBlockId,!1).theActiveTextEditObjectID)TextUtil.DeactivateTextEdit(t,e);else{const t=this.svgDoc.GetActiveEdit();null!=t&&t.ID===OptConstant.SVGElementClass.DimText&&TextUtil.TEUnregisterEvents()}LogUtil.Debug("= O.OptUtil  DeactivateAllTextEdit - Output: done")}CloseShapeEdit(t,e,i){LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Input:",{providedOutlineId:t,useAlternate:e,alternateOutlineId:i});let n=ObjectUtil$1.GetObjectPtr(this.teDataBlockId,!1),s=n.theActiveOutlineObjectID;if(e&&(s=i),s>=0){if(!0===t)return void LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Skipping close because providedOutlineId is true");if(t===s)return void LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Provided outline id equals active outline id, no action taken");let i=ObjectUtil$1.GetObjectPtr(s,!1);if(i){if(i.objecttype===NvConstant.FNObjectTypes.FlWall)return void LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Active outline is a wall opt wall, skipping close");i=ObjectUtil$1.GetObjectPtr(s,!1),i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line&&i.LineType===OptConstant.LineType.POLYLINE&&i.polylist.closed&&this.PolyLineToShape(s)}e||(n=ObjectUtil$1.GetObjectPtr(this.teDataBlockId,!0),n.theActiveOutlineObjectID=-1),DrawUtil.CompleteOperation()}LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Operation complete")}PolyLineToShape(t,e){let i,n,s,a,o,r,l,h,c={x:0,y:0,width:0,height:0};const u=T3Gv.stdObj.PreserveBlock(t);if(null!=u){for(i=u.Data,a=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),r=a.length,i.polylist.dim.x=i.inside.width,i.polylist.dim.y=i.inside.height,i.polylist.offset.x=i.StartPoint.x-i.Frame.x,i.polylist.offset.y=i.StartPoint.y-i.Frame.y,l=i.inside.width,l<1&&(l=1),h=i.inside.height,h<1&&(h=1),n=new Instance.Shape.Polygon(i),n.NeedsSIndentCount=!0,n.polylist=i.polylist,n.BlockID=i.BlockID,n.StartPoint=i.StartPoint,n.EndPoint=i.EndPoint,n.RotationAngle=i.polylist.Shape_Rotation,n.DataID=i.polylist.Shape_DataID,Utils2.GetPolyRect(c,a),s=0;s<r;s++)s>0&&a[s].x===a[s-1].x&&a[s].y===a[s-1].y||(a[s].x-=c.x,a[s].y-=c.y,o=new Point$1(a[s].x/l,a[s].y/h),n.VertexArray.push(o));return n.UpdateFrame(i.Frame),u.Data=n,e||(ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects()),!0}return!1}EndStampSession(){LogUtil.Debug("= O.OptUtil  EndStampSession - Input");OptCMUtil.GetEditMode()===NvConstant.EditState.Stamp&&(T3Gv.opt.actionStoredObjectId=-1,DrawUtil.CancelObjectDragDrop(!0),T3Gv.opt.mainAppHammer&&T3Gv.opt.UnbindDragDropOrStamp()),LogUtil.Debug("= O.OptUtil  EndStampSession - Output: done")}OverrideSnaps(t){if(LogUtil.Debug("= O.OptUtil  OverrideSnaps - Input:",t),null==t)return LogUtil.Debug("= O.OptUtil  OverrideSnaps - Output: false (no event)"),!1;let e=t.altKey;return t.gesture&&t.gesture.srcEvent&&(e=t.gesture.srcEvent.altKey),LogUtil.Debug("= O.OptUtil  OverrideSnaps - Output:",e),!0===e}ExceptionCleanup(t){LogUtil.Debug("= O.OptUtil  ExceptionCleanup - Input:",t);try{TextUtil.TEUnregisterEvents(),this.DeactivateAllTextEdit(!0),this.CloseEdit(!1,!0),T3Gv.state.ExceptionCleanup(),UIUtil.ResizeSVGDocument(),SvgUtil.RenderAllSVGObjects();ObjectUtil$1.GetObjectPtr(this.sdDataBlockId,!1);const t=ObjectUtil$1.GetObjectPtr(this.selectObjsBlockId,!1);SelectUtil.UpdateSelectionAttributes(t),LogUtil.Debug("= O.OptUtil  ExceptionCleanup - Output: done")}catch(e){throw e}}RemoveNotVisible(t){LogUtil.Debug("= O.OptUtil  RemoveNotVisible - Input:",t);const e=NvConstant.ObjFlags.NotVisible,i=[];for(let n=0;n<t.length;n++){const s=t[n],a=ObjectUtil$1.GetObjectPtr(s,!1);!a||a.flags&e||i.push(s)}return LogUtil.Debug("= O.OptUtil  RemoveNotVisible - Output:",i),i}AllowAddToRecent(t){return LogUtil.Debug("= O.OptUtil  allowAddToRecent - Input:",t),t&&t.flags&NvConstant.ObjFlags.TextOnly?(LogUtil.Debug("= O.OptUtil  allowAddToRecent - Output:",!1),!1):(LogUtil.Debug("= O.OptUtil  allowAddToRecent - Output:",!0),!0)}UnbindDragDropOrStamp(){LogUtil.Debug("= O.OptUtil  UnbindDragDropOrStamp - Input: No parameters"),T3Gv.opt.mainAppHammer&&(T3Gv.opt.mainAppHammer.dispose(),T3Gv.opt.mainAppHammer=null),LogUtil.Debug("= O.OptUtil  UnbindDragDropOrStamp - Output: DragDrop or Stamp unbound")}GetTargetNode(t){const e=ObjectUtil$1.GetObjectPtr(t,!1);return e&&e.hooks.length&&(t=this.GetTargetNode(e.hooks[0].objid)),t}UpdateLinks(){let t,e,i,n,s,a,o,r,l,h,c,u,d,p,g,f,b,v,m,y;LogUtil.Debug("= O.OptUtil  UpdateLinks - Input: No parameters");let S=!0,w=!1,x=!1,C=0,D={x:0,y:0},T=[{x:0,y:0}],k={x:0,y:0,width:0,height:0};const $=OptConstant;let O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1),P=!1;if(null==O)return HookUtil.UpdateLineHops(!0),LogUtil.Debug("= O.OptUtil  UpdateLinks - Output: 1 (No links found)"),1;HookUtil.FixAnyCircularHooks();const L=ObjectUtil$1.GetObjectPtr(this.sdDataBlockId,!1),G=T3Gv.docUtil.docConfig.enableSnap;for(T3Gv.docUtil.docConfig.enableSnap=!1,i=O.length-1;i>=0&&!(i>=O.length);i--)O[i].flags&DSConstant.LinkFlags.DeleteTarget?(P||(O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0),P=!0),HookUtil.DeleteLink(O,O[i].targetid,-1,null,0,!1),i=O.length):(O[i].flags&DSConstant.LinkFlags.DeleteLink||O[i].flagss&DSConstant.LinkFlags.Break||null==(g=ObjectUtil$1.GetObjectPtr(O[i].hookid,!1)))&&(P||(O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0),P=!0),HookUtil.DeleteLink(O,O[i].targetid,O[i].hookid,O[i].cellid,0,!1),i=O.length);if(L.flags&$.SessionFlags.NoTreeOverlap||L.flags&$.SessionFlags.IsFlowChart){let t;e=O.length;const n={topconnector:-1,topshape:-1,foundtree:!1};for(i=0;i<e;i++)t=O[i].flags&DSConstant.LinkFlags.Move,t&&(s=ObjectUtil$1.GetObjectPtr(O[i].targetid,!1),n.topshape>=0&&OptCMUtil.SetLinkFlag(n.topshape,DSConstant.LinkFlags.Move),n.topshape=-1,n.foundtree=!1)}for(;S;)for(S=!1,i=0;i<O.length;i++)if(O[i].flags&DSConstant.LinkFlags.Move){if(P||(O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0),P=!0),g=ObjectUtil$1.GetObjectPtr(O[i].hookid,!0),null==g){O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.DeleteLink,!0),O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Move,!1),x=!0;continue}if(b=HookUtil.VerifyLink(g,O[i]),b>=0){if(g.LinkNotVisible(),f=ObjectUtil$1.GetObjectPtr(O[i].targetid,!1),g.objecttype===NvConstant.FNObjectTypes.Multiplicity&&(O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Change,!1)),O[i].flags&DSConstant.LinkFlags.Change){if(a=g.HookToPoint(g.hooks[b].hookpt,null),C=NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcForceEnd,C=Utils2.SetFlag(C,NvConstant.HookFlags.LcShapeOnLine,!(g instanceof Instance.Shape.BaseLine)),o=f.GetTargetPoints(a,C,g.BlockID),o){for(r=o.length,p=null,l=0;l<r;l++)d=o[l].x-g.hooks[b].connect.x,u=o[l].y-g.hooks[b].connect.y,c=d*d+u*u,(null==p||c<p)&&(p=c,h=l);null!=h&&(g.hooks[b].connect.x=o[h].x,g.DrawingObjectBaseClass!=OptConstant.DrawObjectBaseClass.Connector&&(g.hooks[b].connect.y=o[h].y))}g.hooks[b].hookpt=f.GetBestHook(O[i].hookid,g.hooks[b].hookpt,g.hooks[b].connect),O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Change,!1)}if(D=g.HookToPoint(g.hooks[b].hookpt,null),null==D)continue;null!=f&&(T[0].x=g.hooks[b].connect.x,T[0].y=g.hooks[b].connect.y,T=f.GetPerimPts(O[i].targetid,T,g.hooks[b].hookpt,!1,O[i].cellid,O[i].hookid),1===g.hooks.length?(d=T[0].x-D.x,Math.abs(d)<.1&&(d=0),u=T[0].y-D.y,Math.abs(u)<.1&&(u=0),(d||u)&&(ToolActUtil.OffsetShape(O[i].hookid,d,u,OptConstant.ActionTriggerType.UpdateLinks),t=g.Frame,(t.x<0||t.y<0||t.x+t.width>L.dim.x||t.y+t.height>L.dim.y)&&(w=!0,n=this.GetTargetNode(O[i].hookid),s=ObjectUtil$1.GetObjectPtr(n,!1),s&&(s.flags=Utils2.SetFlag(s.flags,NvConstant.ObjFlags.Bounds,!0))))):2===g.hooks.length&&g.LinkGrow(O[i].hookid,g.hooks[b].hookpt,T[0])),O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Move,!1),S=!0}else x=!0}if(x)for(i=O.length-1;i>=0&&!(i>=O.length);i--)O[i].flags&DSConstant.LinkFlags.DeleteTarget?(HookUtil.DeleteLink(O,O[i].targetid,-1,null,0,!1),i=O.length):(O[i].flags&DSConstant.LinkFlags.DeleteLink||O[i].flagss&DSConstant.LinkFlags.Break||null==(g=ObjectUtil$1.GetObjectPtr(O[i].hookid,!1)))&&(HookUtil.DeleteLink(O,O[i].targetid,O[i].hookid,O[i].cellid,0,!1),i=O.length);if(w){const t=LayerUtil.ZList();for(DrawUtil.InitializeAutoGrowDrag(),e=t.length,i=0;i<e;i++)if(m=ObjectUtil$1.GetObjectPtr(t[i],!1),m&&m.flags&NvConstant.ObjFlags.Bounds&&(m.flags=Utils2.SetFlag(m.flags,NvConstant.ObjFlags.Bounds,!1),v=SelectUtil.GetMoveList(t[i],!1,!0,!1,k,!1),d=0,k.x+k.width>L.dim.x&&(d=L.dim.x-(k.x+k.width)),d<-k.x&&(d=-k.x),u=0,k.y+k.height>L.dim.y&&(u=L.dim.y-(k.y+k.height)),u<-k.y&&(u=-k.y),y=v.length,(d||u)&&y))for(l=0;l<y;l++)ToolActUtil.OffsetShape(v[l],d,u,OptConstant.ActionTriggerType.UpdateLinks);this.moveList=null}return T3Gv.docUtil.docConfig.enableSnap=G,LogUtil.Debug("= O.OptUtil  UpdateLinks - Output: 0 (Success)"),0}CalcAllObjectEnclosingRect(t,e){LogUtil.Debug("= O.OptUtil  CalcAllObjectEnclosingRect - Input:",{shouldUseEdges:t,fitOptions:e});const i=LayerUtil.VisibleZList(),n=i.length;let s=0,a=0;const o=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1);let r={x:0,y:0,width:0,height:0};if(0===n)return LogUtil.Debug("= O.OptUtil  CalcAllObjectEnclosingRect - Output:",r),r;let l=0,h=0,c=null,u=null,d=[];for(l=0;l<o.nlayers;l++)if(l!==o.activelayer&&o.layers[l].flags&NvConstant.LayerFlags.UseEdges&&(d=d.concat(o.layers[l].zList),t)){s=25,a=25;const t=d.length,e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);for(let i=0;i<t;i++)c=ObjectUtil$1.GetObjectPtr(d[i],!1),c&&c.objecttype===NvConstant.FNObjectTypes.Annotation&&c.Frame.y+c.Frame.height>=e.dim.y-OptConstant.Common.AnnoHotDist&&(a=10+e.dim.y-c.Frame.y)}let p=0;for(let g=0;g<n;g++){if(h=i[g],d.indexOf(h)>=0)continue;const t=T3Gv.stdObj.GetObject(h);null!=t&&(c=t.Data,c.flags&NvConstant.ObjFlags.NotVisible||(u=e?Utils1.DeepCopy(c.Frame):Utils1.DeepCopy(c.r),0===p?r=Utils1.DeepCopy(u):Utils2.UnionRect(u,r,r),p++))}return t&&(r.width+=s,r.height+=a),LogUtil.Debug("= O.OptUtil  CalcAllObjectEnclosingRect - Output:",r),r}ScrollObjectIntoView(t,e,i){let n;if(LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Input:",{objectId:t,shouldCenterObject:e,customRect:i}),null!=t&&-1!=t||(t=SelectUtil.GetTargetSelect()),-1==t)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: No valid object ID");if(i)n=i;else{const e=ObjectUtil$1.GetObjectPtr(t,!1);if(null==e)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Object not found");n=e.r}const s=this.svgDoc.docInfo,a={x:s.docVisX,y:s.docVisY,width:s.docVisWidth,height:s.docVisHeight};if(Utils2.IsRectangleFullyEnclosed(a,n)&&!e)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Object already visible");let o,r;if((n.width>=a.width||n.height>=a.height)&&Utils2.UnionRect(a,n,a)&&!e)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Oversized object, no scroll needed");if(e){const t=a.x+a.width/2,e=a.y+a.height/2,i=n.x+n.width/2,l=e-(n.y+n.height/2);return o=(a.x-(t-i))*s.docToScreenScale,r=(a.y-l)*s.docToScreenScale,T3Gv.docUtil.SetScroll(o,r),void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Centered object",{scrollX:o,scrollY:r})}o=a.x,r=a.y;let l=20,h=20;s.docVisWidth<s.docWidth&&(h=30),s.docVisHeight<s.docHeight&&(l=30),n.x<a.x&&(o=n.x-20),n.x+n.width>a.x+a.width&&(o=n.x+n.width-a.width+h),n.y<a.y&&(r=n.y-20),n.y+n.height>a.y+a.height&&(r=n.y+n.height-a.height+l),o*=s.docToScreenScale,r*=s.docToScreenScale,T3Gv.docUtil.SetScroll(o,r),LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Scrolled to make object visible",{scrollX:o,scrollY:r})}SetControlDragMode(t){LogUtil.Debug("= O.OptUtil  SetControlDragMode - Input:",t);const e=t.GetCursor();OptCMUtil.SetEditMode(NvConstant.EditState.DragControl,e),LogUtil.Debug("= O.OptUtil  SetControlDragMode - Output: Mode set to DRAGCONTROL with cursor type:",e)}UnbindShapeMoveHammerEvents(){LogUtil.Debug("= O.OptUtil  UnbindShapeMoveHammerEvents - Input: No parameters"),T3Gv.opt.WorkAreaHammer&&(T3Gv.opt.WorkAreaHammer.off("drag"),T3Gv.opt.WorkAreaHammer.off("dragend"),T3Gv.opt.WorkAreaHammer.off("mousemove")),LogUtil.Debug("= O.OptUtil  UnbindShapeMoveHammerEvents - Output: Events unbound")}IsConnectorEndShape(t,e,i){let n;LogUtil.Debug("= O.OptUtil  IsConnectorEndShape - Input:",{objectData:t,connectorObject:e,resultContainer:i});const s=!!(t&&t.hooks.length&&0===t.hooks[0].connect.y&&t.hooks[0].connect.x<0&&(null===e&&(e=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1)),i&&e&&e.hooks.length&&(n=ObjectUtil$1.GetObjectPtr(e.hooks[0].objid,!1))&&n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector));return s&&(i.id=e.hooks[0].objid,n.extraflags&OptConstant.ExtraFlags.NoDelete?(i.nshapes=n.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,i.nshapes<0&&(i.nshapes=0),i.pasted=!1):i.pasted=!0),LogUtil.Debug("= O.OptUtil  IsConnectorEndShape - Output:",s),s}IsGenogramPartner(t,e){let i,n;if(LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Input:",{objectData:t,resultContainer:e}),t&&t.hooks.length){if(i=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1),i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&i.IsGenoConnector())return e.id=t.hooks[0].objid,LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Output: true (genogram connector found)"),!0}else if((n=this.FindChildArray(t.BlockID,-1))>=0&&(i=ObjectUtil$1.GetObjectPtr(n,!1)).IsGenoConnector())return e.id=n,LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Output: true (child genogram connector found)"),!0;return LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Output: false"),!1}FindChildArray(t,e){LogUtil.Debug("= O.OptUtil  FindChildArray - Input:",{objectId:t,excludeConnectorId:e});const i=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1),n=OptCMUtil.FindLink(i,t,!0),s=i.length;if(n>=0){let a=n;for(;a<s&&i[a].targetid===t;){const t=i[a].hookid;if(t!==e){const e=ObjectUtil$1.GetObjectPtr(t,!1);if(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)return LogUtil.Debug("= O.OptUtil  FindChildArray - Output: Found connector:",t),t}a++}}return LogUtil.Debug("= O.OptUtil  FindChildArray - Output: No connector found (-1)"),-1}EnhanceSnaps(t){if(LogUtil.Debug("= O.OptUtil  EnhanceSnaps - Input:",t),null==t)return LogUtil.Debug("= O.OptUtil  EnhanceSnaps - Output: false (null event)"),!1;let e=t.shiftKey;return t.gesture&&t.gesture.srcEvent&&(e=t.gesture.srcEvent.shiftKey),LogUtil.Debug("= O.OptUtil  EnhanceSnaps - Output:",e),!0===e}SetShapeOriginNoDirty(t,e,i){LogUtil.Debug("= O.OptUtil  SetShapeOriginNoDirty - Input:",{objectId:t,newX:e,newY:i});let n={x:0,y:0},s=T3Gv.stdObj.PreserveBlock(t).Data;n.x=s.Frame.x,n.y=s.Frame.y,s.SetShapeOrigin(e,i),(e-n.x||i-n.y)&&OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),LogUtil.Debug("= O.OptUtil  SetShapeOriginNoDirty - Output: Shape origin updated")}RotatePointAroundPoint(t,e,i){LogUtil.Debug("= O.OptUtil  RotatePointAroundPoint - Input:",{centerPoint:t,targetPoint:e,angleRadians:i});const n={x:e.x,y:e.y},s=Math.sin(i),a=Math.cos(i);n.x-=t.x,n.y-=t.y;const o=n.x*a-n.y*s,r=n.x*s+n.y*a;return n.x=o+t.x,n.y=r+t.y,LogUtil.Debug("= O.OptUtil  RotatePointAroundPoint - Output:",n),n}UpdateEdgeLayers(t,e,i){let n,s,a,o,r,l,h,c,u,d;LogUtil.Debug("= O.OptUtil  UpdateEdgeLayers - Input:",{objectsToExclude:t,originalDimensions:e,newDimensions:i});let p=!1;const g=OptConstant.Common.AnnoHotDist,f=g,b=g,v=e.x-2*g,m=e.y-2*g,y=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1),S=y.layers,w=y.nlayers,x=Utils1.DeepCopy(this.dirtyList);for(this.dirtyList=[],n=0;n<w;n++)if(n!==y.activelayer&&S[n].flags&NvConstant.LayerFlags.UseEdges)for(s=S[n].zList,a=s.length,o=0;o<a;o++)r=s[o],t.indexOf(r)>=0||(l=ObjectUtil$1.GetObjectPtr(r,!1),l&&(h=l.Frame.x<f,c=l.Frame.y<b,u=l.Frame.x+l.Frame.width>f+v,d=l.Frame.y+l.Frame.height>b+m,l.UseEdges(h,c,u,d,e,i)&&(p=!0)));p&&SvgUtil.RenderDirtySVGObjects(),this.dirtyList=x,LogUtil.Debug("= O.OptUtil  UpdateEdgeLayers - Output: Edge layers updated, needsRedraw:",p)}SetLinkFlagsOnFilledClosedPolylines(t){LogUtil.Debug("= O.OptUtil  SetLinkFlagsOnFilledClosedPolylines - Input:",t);let e=null,i=null;if(t&&(e=ObjectUtil$1.GetObjectPtr(t,!1),e&&e instanceof Instance.Shape.PolyLine&&e.polylist&&e.polylist.closed&&OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change)),this.moveList&&this.moveList.length)for(let n=0;n<this.moveList.length;n++)if(i=ObjectUtil$1.GetObjectPtr(this.moveList[n],!0),i&&i.hooks.length>0)for(let t=0;t<i.hooks.length;t++){const e=ObjectUtil$1.GetObjectPtr(i.hooks[t].objid,!1);e&&e.StyleRecord&&e.StyleRecord.Line&&e.StyleRecord.Line.BThick&&e.polylist&&e.polylist.closed&&OptCMUtil.SetLinkFlag(i.hooks[t].objid,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change)}LogUtil.Debug("= O.OptUtil  SetLinkFlagsOnFilledClosedPolylines - Output: Link flags updated")}SetShapeR(t){let e,i;if(LogUtil.Debug("= O.OptUtil  SetShapeR - Input:",{shapeObjectId:t.BlockID}),t.StyleRecord&&(i=t.StyleRecord.Line.BThick&&null==t.polylist?t.StyleRecord.Line.Thickness:t.StyleRecord.Line.Thickness/2,e=t.CalcEffectSettings(t.Frame,t.StyleRecord,!1)),Utils2.InflateRect(t.r,i,i),e&&Utils2.Add2Rect(t.r,e.extent),t.DataID>=0&&(t.TextFlags&NvConstant.TextFlags.AttachB||t.TextFlags&NvConstant.TextFlags.AttachA)){const e=(e=>{if(null==e)return null;let i=T3Gv.opt.svgObjectLayer.GetElementById(e);if(null==i&&(i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.ShapeContainer),i.SetID(t.BlockID),T3Gv.opt.svgObjectLayer.AddElement(i,0),t.LMAddSVGTextObject(T3Gv.opt.svgDoc,i)),i){const t=i.GetElementById(OptConstant.SVGElementClass.Text);if(t){const e=t.GetPos(),i=t.GetTextMinDimensions();return{x:e.x,y:e.y,width:i.width,height:i.height}}}return null})(t.BlockID);e&&(e.x+=t.Frame.x,e.y+=t.Frame.y,Utils2.UnionRect(t.r,e,t.r))}if(t.AddDimensionsToR(),0!==t.RotationAngle){let e,i,n={},s={x:0,y:0};s.x=t.Frame.x+t.Frame.width/2,s.y=t.Frame.y+t.Frame.height/2,Utils2.CopyRect(n,t.Frame),Utils2.CopyRect(t.Frame,t.r),LogUtil.Debug("= O.OptUtil  SetShapeR - Getting poly points for rotation"),e=new Instance.Shape.BaseDrawObject(t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),i=-t.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutPoint(s,i,e),Utils2.GetPolyRect(t.r,e),Utils2.CopyRect(t.Frame,n)}return LogUtil.Debug("= O.OptUtil  SetShapeR - Output: Bounding rectangle calculated",t.r),0}FindChildArrayByIndex(t,e,i,n){let s,a,o;LogUtil.Debug("= O.OptUtil  FindChildArrayByIndex - Input:",{parentId:t,resultInfo:e,hasLinksList:!!i,baseClass:n});const r=i||ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1);n=n||OptConstant.DrawObjectBaseClass.Connector;const l=OptCMUtil.FindLink(r,t,!0),h=r.length;if(l>=0)for(s=l;s<h&&r[s].targetid===t;s++)if(s>e.lindex&&(a=r[s].hookid,(o=ObjectUtil$1.GetObjectPtr(a,!1))&&o.DrawingObjectBaseClass===n))return e.lindex=s,e.id=a,e.hookpt=o.hooks[0].hookpt,LogUtil.Debug("= O.OptUtil  FindChildArrayByIndex - Output: Found child",a),a;return LogUtil.Debug("= O.OptUtil  FindChildArrayByIndex - Output: No child found (-1)"),-1}SetObjectFrame(t,e){LogUtil.Debug("= O.OptUtil  SetObjectFrame - Input:",{objectId:t,newFrame:e});const i=ObjectUtil$1.GetObjectPtr(t,!0);return null==i?(LogUtil.Debug("= O.OptUtil  SetObjectFrame - Output: Failed to get object (1)"),1):(OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),i.hooks.length&&OptCMUtil.SetLinkFlag(i.hooks[0].objid,DSConstant.LinkFlags.Move),i.UpdateFrame(e),LogUtil.Debug("= O.OptUtil  SetObjectFrame - Output: Frame updated successfully (0)"),0)}SetObjectAttributes(t,e){LogUtil.Debug("= O.OptUtil  SetObjectAttributes - Input:",{objectId:t,attributes:e});const i=T3Gv.stdObj.PreserveBlock(t);this.ApplyProperties(e,i.Data),LogUtil.Debug("= O.OptUtil  SetObjectAttributes - Output: Attributes applied")}ApplyProperties(t,e){LogUtil.Debug("= O.OptUtil  ApplyProperties - Input:",{sourceProperties:Object.keys(t),targetObject:e?e.constructor.name:null});for(const i in t){const n=e[i],s=t[i],a=typeof n;if(null==n){const t=typeof s;null==s||"string"===t||"number"===t||"boolean"===t?e[i]=s:s instanceof Array?e[i]=s.slice(0):s instanceof Blob||s instanceof Uint8Array?e[i]=s:"function"!==t&&(e[i]=Object.assign(new s.constructor,Utils1.DeepCopy(s)))}else if("string"===a||"number"===a||"boolean"===a)e[i]=s;else if(s instanceof Array)e[i]=s.slice(0);else if(s instanceof Blob||s instanceof Uint8Array)e[i]=s;else if("function"!==a){const t=Object.assign(new n.constructor,Utils1.DeepCopy(n));e[i]=t,this.ApplyProperties(s,t)}}LogUtil.Debug("= O.OptUtil  ApplyProperties - Output: Properties applied")}GetDrawingScale(t){LogUtil.Debug("= O.OptUtil  GetDrawingScale - Input:",t);const e=NvConstant.RulerUnit;let i=t.majorScale,n=t.major;switch(null==n&&(n=OptConstant.Common.DefaultRulerMajor),t.units){case e.Feet:i*=12;break;case e.Mm:i/=10;break;case e.M:i*=100}const s=i*(OptConstant.Common.DefaultRulerMajor/n);return LogUtil.Debug("= O.OptUtil  GetDrawingScale - Output:",s),s}GetCounterClockwiseAngleBetween2Points(t,e){LogUtil.Debug("= O.OptUtil  GetCounterClockwiseAngleBetween2Points - Input:",{startPoint:t,endPoint:e});const i=NvConstant.Geometry.PI,n=e.x-t.x,s=t.y-e.y;let a;return a=0===n?s>=0?i/2:-i/2:0===s?n>=0?0:i:Math.atan2(s,n),a<0&&(a+=2*i),LogUtil.Debug("= O.OptUtil  GetCounterClockwiseAngleBetween2Points - Output:",a),a}UndoEditMode(){LogUtil.Debug("= O.OptUtil  UndoEditMode - Input: No parameters");const t=this.editModeList||[];if(t.length>1){t.pop();const e=t[t.length-1];OptCMUtil.SetEditMode(e.mode,e.cursor,!1,!0)}LogUtil.Debug("= O.OptUtil  UndoEditMode - Output: Previous edit mode restored")}LineCheckPoint(t,e){LogUtil.Debug("= O.OptUtil  LineCheckPoint - Input:",{lineObject:t.BlockID,point:e});const i=Utils1.DeepCopy(e),n=[];n.push(new Point$1(t.StartPoint.x,t.StartPoint.y)),n.push(new Point$1(t.EndPoint.x,t.EndPoint.y));const s=0!==Utils3.LineDStyleHit(n,i,t.StyleRecord.Line.Thickness,0,0);return LogUtil.Debug("= O.OptUtil  LineCheckPoint - Output:",s),s}GetIntersectPt(t,e,i,n,s,a){let o,r,l,h,c,u,d,p,g,f,b,v,m,y=!1,S=!1;function w(t,e){return Math.abs(t.x-e.x)<.2}function x(t,e){return Math.abs(t.y-e.y)<.2}if(o=e.x-t.x,r=e.y-t.y,w(t,e)?(y=!0,p=e.x,l=1):x(t,e)?(g=e.y,l=0):l=r/o,f=t.x,b=t.y,h=n.x-i.x,c=n.y-i.y,w(i,n)?(S=!0,p=n.x,u=1):x(i,n)?(g=n.y,u=0):u=c/h,v=i.x,m=i.y,l===u||y&&S)return!1;if(!S&&!y){if(d=u-l,Math.abs(d)<1e-4)return!1;p=(b-m+u*v-l*f)/d}return y&&!S?g=m+u*(f-v):S&&!y?0===l&&s&&(g=n.y,g>=s.y&&g<=s.y+s.height||(g=-1)):u&&(g=b+l*(p-f)),a.x=p,a.y=g,!0}ArcCheckPoint(t,e){LogUtil.Debug("= O.OptUtil  ArcCheckPoint - Input:",{drawingObject:t.BlockID,testPoint:e});const i=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),n=0!==Utils3.LineDStyleHit(i,e,t.StyleRecord.lineThickness,0,null);return LogUtil.Debug("= O.OptUtil  ArcCheckPoint - Output:",n),n}LinesIntersect(t,e,i){LogUtil.Debug("= O.OptUtil  LinesIntersect - Input:",{line1:{start:t.StartPoint,end:t.EndPoint},line2:{start:e.StartPoint,end:e.EndPoint}});const n={x:i.x,y:i.y};return this.GetIntersectPt(t.StartPoint,t.EndPoint,e.StartPoint,e.EndPoint,e.Frame,n)&&n.x>=t.Frame.x&&n.x<=t.Frame.x+t.Frame.width&&n.y>=t.Frame.y&&n.y<=t.Frame.y+t.Frame.height?(i.x=n.x,i.y=n.y,LogUtil.Debug("= O.OptUtil  LinesIntersect - Output: Lines intersect at",i),!0):(LogUtil.Debug("= O.OptUtil  LinesIntersect - Output: Lines do not intersect"),!1)}InflateLine(t,e,i,n){let s,a,o,r,l;LogUtil.Debug("= O.OptUtil  InflateLine - Input:",{pointCount:t.length,thickness:e,isClosed:i,isOutward:n});let h=[],c=[],u={segmentsInserted:!1};function d(t,e){const i=e.x-t.x,n=e.y-t.y;return Utils2.Sqrt(i*i+n*n)}function p(t,e,i){const n=t-Math.PI/2;return t-=n,(e-=n)<0&&(e+=2*Math.PI),e>2*Math.PI&&(e-=2*Math.PI),Math.abs(t-e)<=i}function g(t,e){let i=[],n={x:0,y:0,width:0,height:0};for(i=Utils1.DeepCopy(t),Utils2.GetPolyRect(n,i),a=0;a<i.length;a++)i[a].x-=n.x,i[a].y-=n.y;const s=2*e,o=Math.max(n.width,n.height);if(s>o)return t;const r=(o+s)/o;for(a=0;a<i.length;a++)i[a].x*=r,i[a].y*=r,i[a].x+=n.x-e,i[a].y+=n.y-e;return i}function f(t,e,i,n,s){let a=[],o=d(t,e),r=d(t,i),l=o>0?r/o:0,h=d(n,s);a=[{x:n.x,y:n.y},{x:0,y:0},{x:s.x,y:s.y}];let c=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(n,s);return Utils3.RotatePointsAboutPoint(a[0],-c,a),a[1].y=a[0].y,a[2].x>a[0].x?a[1].x=a[0].x+h*l:a[1].x=a[0].x-h*l,Utils3.RotatePointsAboutPoint(a[0],c,a),a[1]}if(r=e/2,r<3?r=3:r>5&&(r=5),h=this.CalcPolyOutline(t,e,i,n,r,u),null===h||u.segmentsInserted){const i=g(t,n?e:-e);return LogUtil.Debug("= O.OptUtil  InflateLine - Output (fallback to scaling):",i.length),i}if(i&&h.push(new Point$1(h[0].x,h[0].y)),s=this.GetPolygonWindingDirection(t),-1===s&&n?h.reverse():1!==s||n||h.reverse(),null===this.CalcPolyOutline(h,e,i,!n,r,u)||u.segmentsInserted){const i=g(t,n?e:-e);return LogUtil.Debug("= O.OptUtil  InflateLine - Output (fallback after verification):",i.length),i}l=t.length;let b=h.length;for(;--b>0&&--l>0;){const e=this.GetCounterClockwiseAngleBetween2Points(h[b-1],h[b]);if(!p(this.GetCounterClockwiseAngleBetween2Points(t[l-1],t[l]),e,.01)){for(a=l-1;a>=0;a--){if(p(this.GetCounterClockwiseAngleBetween2Points(t[a],t[l]),e,.01)){for(o=c.length-1;o>=0;o--)h.splice(b,0,f(t[l],t[l-c.length],c[o],h[b],h[b-1]));l-=c.length,c=[];break}c.push(new Point$1(t[a].x,t[a].y))}if(c.length>0)break}}return h.length!==t.length&&(h=g(t,n?e:-e)),LogUtil.Debug("= O.OptUtil  InflateLine - Output:",h.length),h}CalcPolyOutline(t,e,i,n,s,a){let o,r,l,h,c,u,d,p;LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Input:",{pointCount:t.length,thickness:e,isClosed:i,isOutward:n,segmentStep:s});const g=[],f=[];let b=0;const v={x:0,y:0},m=1e5;if(t.length<2)return LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Insufficient points (null)"),null;let y=1;if(i){for(o=0;o<t.length-1;o++)t[o+1].x,t[o].x,t[o+1].y,t[o].y;y=this.GetPolygonWindingDirection(t)}if(n||(y=-y),y<1?(u=t.length-1,d=-1):(u=0,d=t.length),!e)return LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: No thickness, returning copy of input points"),Utils1.DeepCopy(t);for(b=0,c=u-y,s?h=s:(h=e/2,h<3?h=3:h>5&&(h=5)),o=u;o!=d;o+=y){if(c<0||c>t.length-1){if(!i){c=o;continue}c=c<0?t.length-1:0}if(o==d-y&&(h=2),Utils1.DeltaPoints(t[o],t[c])<h)continue;const n=new SegmentData;n.origSeg.start=Utils1.DeepCopy(t[c]),n.origSeg.end=Utils1.DeepCopy(t[o]),Utils1.CalcExtendedOffsetSegment(n,e,2,m),n.clipSeg.start=Utils1.DeepCopy(n.extSeg.start),n.clipSeg.end=Utils1.DeepCopy(n.extSeg.end),b>0&&n.angle==f[b-1].angle?(f[b-1].origSeg.end=Utils1.DeepCopy(n.origSeg.end),f[b-1].clipSeg.end=Utils1.DeepCopy(n.clipSeg.end),f[b-1].extSeg.end=Utils1.DeepCopy(n.extSeg.end),f[b-1].extSeg.endExt=Utils1.DeepCopy(n.extSeg.endExt),f[b-1].extSeg.endRay=Utils1.DeepCopy(n.extSeg.endRay)):(f.push(n),b++),c=o}if(!b)return LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: No segments created (null)"),null;if(1==b)return g.push(f[0].clipSeg.start),g.push(f[0].clipSeg.end),LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Single segment outline created",g),g;for(r=b-1,o=0;o<b;o++)i||0!==o?(Utils1.CompareAngle(f[o].angle,f[r].angle)>0&&(Utils1.CalcSegmentIntersect(f[r].clipSeg.start,f[r].extSeg.endExt,f[o].extSeg.startExt,f[o].clipSeg.end,v)?(f[r].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v)):Utils1.DeltaAngle(f[o].angle,f[r].angle)<15?(f[r].clipSeg.end.x=(f[r].extSeg.end.x+f[o].extSeg.start.x)/2,f[r].clipSeg.end.y=(f[r].extSeg.end.y+f[o].extSeg.start.y)/2,f[o].clipSeg.start=Utils1.DeepCopy(f[r].clipSeg.end)):(f[r].clipSeg.end=Utils1.DeepCopy(f[r].extSeg.endExt),f[o].clipSeg.start=Utils1.DeepCopy(f[o].extSeg.startExt),Utils1.InsertSegment(f,o,f[r].clipSeg.end,f[o].clipSeg.start,e,2,m),b++,o++,a.segmentsInserted=!0)),r=o):r=o;for(r=0,o=1;o<b;o++){if(p=!1,Utils1.AreSegmentsObtuse(f,b,o,r)&&Utils1.AreSegmentsAjacent(b,o,r))p=!0;else if(Utils1.CalcSegmentIntersect(f[r].clipSeg.start,f[r].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v))p=!0,f[r].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v);else if(Utils1.SegmentsInAlignment(f,b,o,r))p=!0,f[r].clipSeg.end.x=(f[r].clipSeg.end.x+f[o].clipSeg.start.x)/2,f[r].clipSeg.end.y=(f[r].clipSeg.end.y+f[o].clipSeg.start.y)/2,f[o].clipSeg.start=f[r].clipSeg.end;else if(r>0)for(l=r-1;l>=0&&!p&&!(l<0);)if(Utils1.IsEmptySeg(f[l].clipSeg))l--;else{if(o!=b-1&&Utils1.AreSegmentsObtuse(f,b,o,l))break;if(Utils1.CalcSegmentIntersect(f[l].clipSeg.start,f[l].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v)){r=l,f[l].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v),p=!0;break}if(Utils1.IsEnd(o,f.length,i)&&Utils1.DeltaAngle(f[o].angle,f[l].angle)>0&&Utils1.CalcSegmentIntersect(f[l].clipSeg.start,f[l].extSeg.endRay,f[o].clipSeg.start,f[o].clipSeg.end,v)){r=l,f[l].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v),p=!0;break}l--}if(p){for(l=r+1;l<o;)f[l].clipSeg.end=Utils1.DeepCopy(f[l].clipSeg.start),l++;r=o}else if(Utils1.IsEnd(o,f.length,i))for(f[r].clipSeg.end=Utils1.DeepCopy(f[o].extSeg.end),l=r+1;l<b;)f[l].clipSeg.end=Utils1.DeepCopy(f[l].clipSeg.start),l++;else f[o].clipSeg.end=Utils1.DeepCopy(f[o].clipSeg.start)}if(i){let t=-1,e=-1;for(o=0;o<b;o++)if(!Utils1.IsEmptySeg(f[o].clipSeg)){t=o;break}for(o=b-1;o>=0;o--)if(!Utils1.IsEmptySeg(f[o].clipSeg)){e=o;break}if(t>=0&&e>=0)for(p=!1,o=t;!p&&o<e;o++)if(r=e,Utils1.AreSegmentsObtuse(f,b,o,r)&&Utils1.AreSegmentsAjacent(b,o,r))p=!0;else if(Utils1.CalcSegmentIntersect(f[r].clipSeg.start,f[r].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v))p=!0,f[r].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v);else if(Utils1.SegmentsInAlignment(f,b,o,r))p=!0;else{for(l=r-1;l>o&&!p;)if(Utils1.IsEmptySeg(f[l].clipSeg))l--;else{if(Utils1.AreSegmentsObtuse(f,b,o,l))break;if(Utils1.CalcSegmentIntersect(f[l].clipSeg.start,f[l].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v)){r=l,f[l].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v),p=!0;break}l--}if(p)for(l=r+1;l<=e;)f[l].clipSeg.end=Utils1.DeepCopy(f[l].clipSeg.start),l++;else f[o].clipSeg.end=Utils1.DeepCopy(f[o].clipSeg.start)}}for(o=0;o<b;o++)Utils1.IsEmptySeg(f[o].clipSeg)||(0!==g.length&&f[o].clipSeg.start.x==g[g.length-1].x&&f[o].clipSeg.start.y==g[g.length-1].y||g.push(Utils1.DeepCopy(f[o].clipSeg.start)),g.push(Utils1.DeepCopy(f[o].clipSeg.end)));for(;g.length>1&&Utils1.DeltaPoints(g[g.length-1],g[0])<3;)g.splice(g.length-1,1);return g.length<2&&!i||g.length<3&&i?(LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Insufficient output points (null)"),null):(LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Outline created with",g.length,"points"),g)}GetPolygonWindingDirection(t){LogUtil.Debug("= O.OptUtil  GetPolygonWindingDirection - Input:",{pointCount:t.length});let e=0;for(let n=0;n<t.length-1;n++)e+=(t[n+1].x-t[n].x)*(t[n+1].y+t[n].y);const i=e>0?-1:1;return LogUtil.Debug("= O.OptUtil  GetPolygonWindingDirection - Output:",i),i}GetTargetList(t,e,i,n,s){let a,o,r,l;LogUtil.Debug("= O.OptUtil  GetTargetList - Input:",{objectId:t,linksListLength:null==e?void 0:e.length,targetListLength:null==i?void 0:i.length,hasBoundingRect:!!n,listCode:s});let h=NvConstant.ListCodes.MoveHook;if(s===NvConstant.ListCodes.MoveTargAndLines&&(h=s),a=ObjectUtil$1.GetObjectPtr(t,!1),null==a)return LogUtil.Debug("= O.OptUtil  GetTargetList - Output: Source object not found, returning original list"),i;HookUtil.FixAnyCircularHooks(a);for(let c=0;c<a.hooks.length;c++){if(l=a.hooks[c].objid,i.indexOf(l)<0&&(i.push(l),n&&(o=ObjectUtil$1.GetObjectPtr(l,!1),!(o.flags&NvConstant.ObjFlags.NotVisible)))){const t=o.GetMoveRect(!0,!0);n=Utils2.UnionRect(n,t,n)}r=OptCMUtil.FindLink(e,l,!0),r>=0&&(i=HookUtil.AddToHookList(e,i,r,l,h,1,n)),i=this.GetTargetList(l,e,i,n,s)}return LogUtil.Debug("= O.OptUtil  GetTargetList - Output: Returning list with",i.length,"targets"),i}GetClockwiseAngleBetween2PointsInDegrees(t,e){LogUtil.Debug("= O.OptUtil  GetClockwiseAngleBetween2PointsInDegrees - Input:",{startPoint:t,endPoint:e});const i=NvConstant.Geometry.PI;let n,s,a;n=e.x-t.x,s=e.y-t.y,a=0===n?s>=0?i/2:-i/2:0===s?n>=0?0:i:Math.atan2(s,n),a<0&&(a+=2*i);const o=a*(180/i);return LogUtil.Debug("= O.OptUtil  GetClockwiseAngleBetween2PointsInDegrees - Output:",o),o}NormalizeAngle(t,e){return LogUtil.Debug("= O.OptUtil  NormalizeAngle - Input:",{angle:t,adjustment:e}),(t+=e)>=2*NvConstant.Geometry.PI&&(t-=2*NvConstant.Geometry.PI),t<0&&(t+=2*NvConstant.Geometry.PI),LogUtil.Debug("= O.OptUtil  NormalizeAngle - Output:",t),t}GetShapeParams(t,e){let i;LogUtil.Debug("= O.OptUtil  GetShapeParams - Input:",{shapeType:t,shapeDimensions:e});let n=!1,s=0;switch(t){case PolygonConstant.ShapeTypes.RECTANGLE:case PolygonConstant.ShapeTypes.OVAL:case PolygonConstant.ShapeTypes.ROUNDED_RECTANGLE:break;case PolygonConstant.ShapeTypes.CIRCLE:n=!0;break;case PolygonConstant.ShapeTypes.DIAMOND:i=PolygonUtil.generateDiamond;break;case PolygonConstant.ShapeTypes.TRIANGLE:i=PolygonUtil.generateTriangle;break;case PolygonConstant.ShapeTypes.TRIANGLE_BOTTOM:i=PolygonUtil.generateTriangleDown;break;case PolygonConstant.ShapeTypes.PARALLELOGRAM:s=.13333*e.width,i=PolygonUtil.generateParallelogram;break;case PolygonConstant.ShapeTypes.PENTAGON:s=.4*e.height,i=PolygonUtil.generatePentagon,n=!1;break;case PolygonConstant.ShapeTypes.PENTAGON_LEFT:s=.4*e.width,i=PolygonUtil.generatePentagonLeft,n=!1;break;case PolygonConstant.ShapeTypes.HEXAGON:s=.26*e.width,i=PolygonUtil.generateHexagon,n=!1;break;case PolygonConstant.ShapeTypes.OCTAGON:s=.28,i=PolygonUtil.generateOctagon,n=!1;break;case PolygonConstant.ShapeTypes.ARROW_RIGHT:s=.3*e.width,i=PolygonUtil.generateRightArrow;break;case PolygonConstant.ShapeTypes.ARROW_LEFT:s=.3*e.width,i=PolygonUtil.generateLeftArrow;break;case PolygonConstant.ShapeTypes.ARROW_TOP:s=.3*e.height,i=PolygonUtil.generateTopArrow;break;case PolygonConstant.ShapeTypes.ARROW_BOTTOM:s=.3*e.height,i=PolygonUtil.generateBottomArrow;break;case PolygonConstant.ShapeTypes.TRAPEZOID:s=.2*e.width,i=PolygonUtil.generateTrapezoid;break;case PolygonConstant.ShapeTypes.TRAPEZOID_BOTTOM:s=.2*e.width,i=PolygonUtil.generateTrapezoidDown;break;case PolygonConstant.ShapeTypes.INPUT:s=.27*e.height,i=PolygonUtil.generateInput;break;case PolygonConstant.ShapeTypes.TERMINAL:i=PolygonUtil.generateTerminal;break;case PolygonConstant.ShapeTypes.STORAGE:s=e.width/7.5,i=PolygonUtil.generateStorage;break;case PolygonConstant.ShapeTypes.DOCUMENT:i=PolygonUtil.generateDocument,s=e.height/7.5;break;case PolygonConstant.ShapeTypes.DELAY:s=e.width/5,i=PolygonUtil.generateDelay;break;case PolygonConstant.ShapeTypes.DISPLAY:s=e.width/7.5,i=PolygonUtil.generateDisplay}const a={dataclass:t,shapeparam:s,polyVectorMethod:i,bCircularize:n};return LogUtil.Debug("= O.OptUtil  GetShapeParams - Output:",a),a}AddtoDelete(t,e,i){let n;LogUtil.Debug("= O.OptUtil  AddtoDelete - Input:",{objectIds:t,isForced:e,additionalData:i});let s,a,o,r,l,h=t.length,c=OptConstant.ConnectorDefines,u=0;for(n=0;n<h;n++)if(s=ObjectUtil$1.GetObjectPtr(t[n],!1),null!=s)if(a=t[n],s instanceof Instance.Shape.ShapeContainer&&this.ContainerAddtoDelete(s,t),s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)s.IsFlowChartConnector&&s.IsFlowChartConnector()?(s.objecttype,OptAhUtil.GetConnectorTree(t[n],t)):(OptAhUtil.GetConnectorTree(t[n],t),h=t.length,e&&s.hooks.length&&(r=ObjectUtil$1.GetObjectPtr(s.hooks[0].objid,!1),r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&t.indexOf(s.hooks[0].objid)<0&&t.push(s.hooks[0].objid)));else{let i=!1;if(o=OptAhUtil.GetParentConnector(t[n],null),o>=0){if(r=ObjectUtil$1.GetObjectPtr(o,!1),r){let h={};if(this.IsConnectorEndShape(s,r,h)){if(void 0===l&&(l=h.nshapes),t.indexOf(o)<0)l-u>1||h.pasted||e?(t.push(o),r.extraflags&OptConstant.ExtraFlags.NoDelete&&(r.extraflags=Utils2.SetFlag(r.extraflags,OptConstant.ExtraFlags.NoDelete,!1)),OptAhUtil.GetConnectorTree(o,t),h.pasted||u++):t.splice(n,1);else if(h.nshapes<=1&&!h.pasted&&!e){t.splice(n,1);let e=t.indexOf(o);e>=0&&t.splice(e,1)}if(r.IsFlowChartConnector&&r.IsFlowChartConnector()){let e=T3Gv.opt.FindChildArray(t[n],-1);ObjectUtil$1.GetObjectPtr(e,!1)}else if(r.arraylist.styleflags&OptConstant.AStyles.CoManager)if(e){a=r.arraylist.hook[c.NSkip].id,t.indexOf(o)<0&&t.push(o);let e=r.arraylist.hook.length;for(let i=c.NSkip;i<e;i++){let e=r.arraylist.hook[i].id;t.indexOf(e)<0&&t.push(e)}}else{let e=r.arraylist.hook.length;for(let n=c.NSkip;n<e;n++){let e=r.arraylist.hook[n].id;if(t.indexOf(e)<0){i=!0;break}}}else 0===r.hooks.length&&T3Gv.opt.CN_GetNShapes(o)<=1&&-1===t.indexOf(o)&&t.push(o)}}}else{let s;s=1,e||(i=!0);let a=-1;for(let e=0;e<s;e++){let e=T3Gv.opt.FindChildArray(t[n],a);if(e>=0){let n=ObjectUtil$1.GetObjectPtr(e,!0);if(n&&n.arraylist&&(n.arraylist.hook.length<=c.SEDA_NSkip||n.flags&NvConstant.ObjFlags.NotVisible)&&(i=!1),n.IsGenoConnector&&n.IsGenoConnector()){i=!1;let s=-1,a=n.arraylist.hook.length;for(let e=c.SEDA_NSkip;e<a;e++){let a=n.arraylist.hook[e].id;if(t.indexOf(a)<0){if(ObjectUtil$1.GetObjectPtr(a,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){i=!0;break}ObjectUtil$1.GetObjectPtr(a,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(s=a)}}i||(t.indexOf(e)<0&&t.push(e),s>=0&&t.indexOf(s)<0&&t.push(s),i=!0)}n.flags=Utils2.SetFlag(n.flags,NvConstant.ObjFlags.Obj1,!0),OptCMUtil.SetLinkFlag(e,DSConstant.LinkFlags.Move)}a=e}}if(!i){let i=HookUtil.FindAllChildConnectors(a).length,n=HookUtil.FindAllChildConnectors(a);for(let e=0;e<i;e++){let i=ObjectUtil$1.GetObjectPtr(n[e],!1);i&&i.IsFlowChartConnector&&i.IsFlowChartConnector()||OptAhUtil.GetConnectorTree(n[e],t)}if(s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&!e){let e=[],i=this.HealLine(s,!1,e);if(i>=0){t.indexOf(i)<0&&t.push(i);for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i])}}if(s.associd>=0){let e=!1,i=ObjectUtil$1.GetObjectPtr(s.associd,!1);i&&(i.hooks.length&&i.hooks[0].hookpt===OptConstant.HookPts.KATD&&(e=!0),i.objecttype!==NvConstant.FNObjectTypes.NgEvent&&i.objecttype!==NvConstant.FNObjectTypes.NgEventLabel&&t.indexOf(s.associd)<0&&t.push(s.associd)),e&&t.indexOf(s.associd)<0&&t.push(s.associd)}if(s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line){let e=SelectUtil.FindAllChildObjects(s.BlockID,OptConstant.DrawObjectBaseClass.Shape,NvConstant.FNObjectTypes.Multiplicity);if(e&&e.length)for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i])}if(!e){let e=SelectUtil.FindAllChildObjects(s.BlockID,OptConstant.DrawObjectBaseClass.Line,null);if(e&&e.length)for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i])}}}return LogUtil.Debug("= O.OptUtil  AddtoDelete - Output:",{objectIds:t,helperValue:-1}),-1}HealLine(t,e,i){let n,s,a,o,r,l,h,c,u,d,p,g,f,b,v,m,y=[],S=[],w=[];const x=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1);let C=-1,D=-1,T=!1,k=!1,$=[];const O=OptConstant.HookPts,P=function(t,e,i,n,s,a){let o,r,l,h,c=[],u=[];if(o=t.segl.pts.length,r=e.segl.pts.length,l=Utils2.IsEqual(i.y,n.y,.1)?Math.abs(i.x-n.x):Math.abs(i.y-n.y),a)for(h=2;h<r;h++){let t=Utils2.IsEqual(e.segl.pts[h].y,e.segl.pts[h-1].y)?Math.abs(e.segl.pts[h].x-e.segl.pts[h-1].x):Math.abs(e.segl.pts[h].y-e.segl.pts[h-1].y);u.push(t)}else for(h=r-2;h>0;h--){let t=Utils2.IsEqual(e.segl.pts[h].y,e.segl.pts[h-1].y)?Math.abs(e.segl.pts[h].x-e.segl.pts[h-1].x):Math.abs(e.segl.pts[h].y-e.segl.pts[h-1].y);u.push(t)}if(s){for(h=u.length-1;h>=0;h--)c.push(u[h]);for(c.push(l),h=2;h<o;h++){let e=Utils2.IsEqual(t.segl.pts[h].y,t.segl.pts[h-1].y)?Math.abs(t.segl.pts[h].x-t.segl.pts[h-1].x):Math.abs(t.segl.pts[h].y-t.segl.pts[h-1].y);c.push(e)}}else{for(h=1;h<o-1;h++){let e=Utils2.IsEqual(t.segl.pts[h].y,t.segl.pts[h-1].y)?Math.abs(t.segl.pts[h].x-t.segl.pts[h-1].x):Math.abs(t.segl.pts[h].y-t.segl.pts[h-1].y);c.push(e)}c.push(l);for(let t=0;t<u.length;t++)c.push(u[t])}return c},L=function(t,e){let i,n=e.length,s=t.segl.pts.length-1;for(5===s&&(e[2]=e[4]),i=0;i<n&&i<=s;i++)t.segl.lengths[i]=e[i]};if(r=OptCMUtil.FindLink(x,t.BlockID,!0),d=t.BlockID,r<0)return-1;HookUtil.AddToHookList(x,y,r,t.BlockID,NvConstant.ListCodes.TopOnly,1,{});let G=n=y.length;for(s=0;s<n;s++)if(a=ObjectUtil$1.GetObjectPtr(y[s],!1),a.AllowHeal()){S.push(y[s]);const t=a.hooks.length;for(let e=0;e<t;e++)a.hooks[e].objid===d&&(a.hooks[e].connect,a.hooks[e].hookpt===O.KTL?w.push(a.segl.firstdir):w.push(a.segl.lastdir))}if((n=S.length)>=2&&n<4)for(s=0;s<n;s++){switch(w[s]){case O.KTC:p=S[s],void 0!==g&&(S[0]=p,S[1]=g,n=2,T=!0);break;case O.KBC:g=S[s],void 0!==p&&(S[0]=p,S[1]=g,n=2,T=!0);break;case O.KLC:f=S[s],void 0!==b&&(S[0]=f,S[1]=b,n=2,T=!0);break;case O.KRC:b=S[s],void 0!==f&&(S[0]=f,S[1]=b,n=2,T=!0)}if(T)break}if(e&&T)return 1;if(T){if(a=ObjectUtil$1.GetObjectPtr(S[0],!0),o=ObjectUtil$1.GetObjectPtr(S[1],!0),1===a.hooks.length&&2===o.hooks.length){let t=S[0];S[0]=S[1],S[1]=t,a=ObjectUtil$1.GetObjectPtr(S[0],!0),o=ObjectUtil$1.GetObjectPtr(S[1],!0)}let e,r=Utils2.Pt2Rect(a.StartPoint,a.EndPoint),d=Utils2.Pt2Rect(o.StartPoint,o.EndPoint),p=T3Gv.opt.GetPolyLineLinks(S[0],0),g=T3Gv.opt.GetPolyLineLinks(S[1],0);for(n=a.hooks.length,s=0;s<n;s++)a.hooks[s].objid!=t.BlockID?C=a.hooks[s].objid:c=s;for(n=o.hooks.length,s=0;s<n;s++)o.hooks[s].objid!=t.BlockID?D=o.hooks[s].objid:u=s;if(C>=0&&D>=0&&C!=D){if(o.hooks[u].hookpt===O.KTL){l=o.segl.firstdir,h=o.StartPoint,k=!1,m={x:o.StartPoint.x,y:o.StartPoint.y};const t=o.segl.pts.length;t>2&&(m.x=d.x+o.segl.pts[t-2].x,m.y=d.y+o.segl.pts[t-2].y)}else l=o.segl.lastdir,h=o.EndPoint,k=!0,m={x:o.StartPoint.x,y:o.StartPoint.y},m.x=d.x+o.segl.pts[1].x,m.y=d.y+o.segl.pts[1].y;if(a.hooks[c].hookpt===O.KTL)v={x:a.StartPoint.x,y:a.StartPoint.y},v.x=r.x+a.segl.pts[1].x,v.y=r.y+a.segl.pts[1].y,$=P(a,o,v,m,!0,k),a.segl.firstdir=l,a.StartPoint.x=h.x,a.StartPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0);else{v={x:a.StartPoint.x,y:a.StartPoint.y};const t=a.segl.pts.length;t>2&&(v.x=r.x+a.segl.pts[t-2].x,v.y=r.y+a.segl.pts[t-2].y),$=P(a,o,v,m,!1,k),a.segl.lastdir=l,a.EndPoint.x=h.x,a.EndPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0)}if(2===G){let e;e=Utils2.IsEqual(v.y,m.y,2)?OptConstant.ActionArrow.Right:OptConstant.ActionArrow.Down,OptAhUtil.ShiftConnectedShapes(t.BlockID,D,a.BlockID,e,!1)}return a.CalcFrame(),this.FilterLinks(p,g,i),g&&g.length&&HookUtil.MoveLinks(S[0],S[1],g,null),p&&p.length&&HookUtil.MoveLinks(S[0],S[0],p,null),a.hoplist.hops=[],a.hoplist.nhops=0,ObjectUtil$1.AddToDirtyList(S[0]),HookUtil.UpdateHook(S[0],c,D,a.hooks[c].hookpt,o.hooks[u].connect,o.hooks[u].cellid),OptCMUtil.SetLinkFlag(o.hooks[u].objid,DSConstant.LinkFlags.Move),this.UpdateLinks(),S[1]}if(C>=0&&D<0){if(o.hooks[0].hookpt===O.KTL)l=o.segl.lastdir,h=o.EndPoint,k=!0,m={x:o.StartPoint.x,y:o.StartPoint.y},m.x=d.x+o.segl.pts[1].x,m.y=d.y+o.segl.pts[1].y;else{l=o.segl.firstdir,h=o.StartPoint,k=!1,m={x:o.StartPoint.x,y:o.StartPoint.y};const t=o.segl.pts.length;t>2&&(m.x=d.x+o.segl.pts[t-2].x,m.y=d.y+o.segl.pts[t-2].y)}if(a.hooks[c].hookpt===O.KTL)v={x:a.StartPoint.x,y:a.StartPoint.y},v.x=r.x+a.segl.pts[1].x,v.y=r.y+a.segl.pts[1].y,$=P(a,o,v,m,!0,k),a.segl.firstdir=l,a.StartPoint.x=h.x,a.StartPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0),a.CalcFrame(),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0);else{v={x:a.StartPoint.x,y:a.StartPoint.y};const t=a.segl.pts.length;t>2&&(v.x=r.x+a.segl.pts[t-2].x,v.y=r.y+a.segl.pts[t-2].y),$=P(a,o,v,m,!1,k),a.segl.lastdir=l,a.EndPoint.x=h.x,a.EndPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0),a.CalcFrame(),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0)}return this.FilterLinks(p,g,i),g&&g.length&&HookUtil.MoveLinks(S[0],S[1],g,null),p&&p.length&&HookUtil.MoveLinks(S[0],S[0],p,null),a.hoplist.hops=[],a.hoplist.nhops=0,HookUtil.UpdateHook(S[0],c,-1,a.hooks[c].hookpt,a.hooks[c].connect,a.hooks[c].cellid),ObjectUtil$1.AddToDirtyList(S[0]),S[1]}if(e=function(t,e,i,n){let s,a,o=new Instance.Shape.SegLine,r=Utils2.Pt2Rect(t.StartPoint,t.EndPoint);if(a=t.segl.pts.length,e===O.KTL){for(s=a-1;s>0;s--)o.pts.push({x:t.segl.pts[s].x+r.x,y:t.segl.pts[s].y+r.y});o.firstdir=t.segl.lastdir}else{for(s=0;s<a-1;s++)o.pts.push({x:t.segl.pts[s].x+r.x,y:t.segl.pts[s].y+r.y});o.firstdir=t.segl.firstdir}if(a=i.segl.pts.length,d=Utils2.Pt2Rect(i.StartPoint,i.EndPoint),n===O.KTR){for(s=a-2;s>=0;s--)o.pts.push({x:i.segl.pts[s].x+d.x,y:i.segl.pts[s].y+d.y});o.lastdir=i.segl.firstdir}else{for(s=1;s<a;s++)o.pts.push({x:i.segl.pts[s].x+d.x,y:i.segl.pts[s].y+d.y});o.lastdir=i.segl.lastdir}for(a=o.pts.length,s=1;s<a;s++)o.pts[s].x==o.pts[s-1].x?o.lengths.push(Math.abs(o.pts[s].y-o.pts[s-1].y)):o.lengths.push(Math.abs(o.pts[s].x-o.pts[s-1].x));return o}(o,o.hooks[0].hookpt,a,a.hooks[0].hookpt),o.hooks[0].hookpt===O.KTL){let t=o.EndArrowID;o.EndArrowID=o.StartArrowID,o.StartArrowID=t,t=o.EndArrowDisp,o.EndArrowDisp=o.StartArrowDisp,o.StartArrowDisp=t}o.hoplist.hops=[],o.hoplist.nhops=0,o.segl=e,pointCount=e.pts.length,o.StartPoint.x=e.pts[0].x,o.StartPoint.y=e.pts[0].y,o.EndPoint.x=e.pts[pointCount-1].x,o.EndPoint.y=e.pts[pointCount-1].y;const f=Utils2.Pt2Rect(o.StartPoint,o.EndPoint);for(s=0;s<pointCount;s++)o.segl.pts[s].x-=f.x,o.segl.pts[s].y-=f.y;return o.CalcFrame(),h=o.EndPoint,o.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0),o.CalcFrame(),this.FilterLinks(g,p,i),p&&p.length&&HookUtil.MoveLinks(S[1],S[0],p,null),g&&g.length&&HookUtil.MoveLinks(S[1],S[1],g,null),HookUtil.UpdateHook(S[1],u,-1,o.hooks[u].hookpt,o.hooks[u].connect,o.hooks[u].cellid),ObjectUtil$1.AddToDirtyList(S[1]),S[0]}return-1}SetVirtualKeyboardLifter(t){}VirtualKeyboardLifter(t,e){if(LogUtil.Debug("= O.OptUtil  VirtualKeyboardLifter - Input:",{element:t,isActive:e}),e){const e=t.CalcElementFrame();{let t=T3Gv.docUtil.DocObject().ConvertDocToWindowCoords(e.x,e.y),i=T3Gv.docUtil.DocObject().ConvertDocToWindowLength(e.width);0===i&&(i=1);let n=T3Gv.docUtil.DocObject().ConvertDocToWindowLength(e.height);0===n&&(n=1),T3Gv.opt.workAreaTextInputProxy.css("visibility","visible"),T3Gv.opt.workAreaTextInputProxy.css("opacity","0"),T3Gv.opt.workAreaTextInputProxy.css("color","transparent"),T3Gv.opt.workAreaTextInputProxy.css("z-index","-1000"),T3Gv.opt.workAreaTextInputProxy.css("text-align","left"),t.x=-9999,i=800,T3Gv.opt.workAreaTextInputProxy.css("left",t.x+"px"),T3Gv.opt.workAreaTextInputProxy.css("top",t.y+"px"),T3Gv.opt.workAreaTextInputProxy.css("width",i+"px"),T3Gv.opt.workAreaTextInputProxy.css("height",n+"px"),T3Gv.opt.workAreaTextInputProxy.val(""),T3Gv.opt.workAreaTextInputProxy.focus()}}else T3Gv.opt.workAreaTextInputProxy.css("visibility","visible"),T3Gv.opt.workAreaTextInputProxy.blur(),T3Gv.opt.workAreaTextInputProxy.val(""),T3Gv.opt.workAreaTextInputProxy.css("visibility","hidden");LogUtil.Debug("= O.OptUtil  VirtualKeyboardLifter - Output: completed")}AddAssoctoList(t,e){LogUtil.Debug("= O.OptUtil  AddAssoctoList - Input:",{listOfObjectIds:t,skipContainerParents:e});let i=[];const n=t.length,s=NvConstant.FNObjectTypes;for(let a=0;a<n;a++){const n=t[a],o=ObjectUtil$1.GetObjectPtr(n,!1);if(!(e&&OptAhUtil.HasContainerParent(o)||(o.objecttype,i.indexOf(n)<0&&i.push(n),o&&o.associd>=0&&ObjectUtil$1.GetObjectPtr(o.associd,!1)&&i.indexOf(o.associd)<0&&i.push(o.associd),o.objecttype!==s.ShapeContainer)))T3Gv.opt.ContainerAddtoDelete(o,i)}return LogUtil.Debug("= O.OptUtil  AddAssoctoList - Output:",i),i}ShowLoading(t){}IsLinkedOutside(t){LogUtil.Debug("= O.OptUtil  IsLinkedOutside - Input:",{linkedObjectIds:t});const e=LayerUtil.ZList();for(let i=0;i<t.length;i++){const n=ObjectUtil$1.GetObjectPtr(t[i],!1);for(let i=0;i<e.length;i++){const s=ObjectUtil$1.GetObjectPtr(e[i],!1);if(s.associd===n.BlockID&&-1===t.indexOf(s.BlockID))return LogUtil.Debug("= O.OptUtil  IsLinkedOutside - Output:",!0),!0}}return LogUtil.Debug("= O.OptUtil  IsLinkedOutside - Output:",!1),!1}IsGroupNonDelete(){LogUtil.Debug("= O.OptUtil  IsGroupNonDelete - Input: no parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let e=null;for(let i=0;i<t.length;i++)if(e=ObjectUtil$1.GetObjectPtr(t[i],!1),e.extraflags&OptConstant.ExtraFlags.NoDelete)return LogUtil.Debug("= O.OptUtil  IsGroupNonDelete - Output: true"),!0;return LogUtil.Debug("= O.OptUtil  IsGroupNonDelete - Output: false"),!1}GetListSRect(t,e,i){let n;LogUtil.Debug("= O.OptUtil  GetListSRect - Input:",{objectIdList:t,useFrame:e,useDragRectangle:i});const s=NvConstant.ObjFlags.NotVisible;for(let a=0;a<t.length;a++){const o=t[a],r=ObjectUtil$1.GetObjectPtr(o,!1);if(null!=r){const t=e?r.Frame:i?r.GetDragR():r.r;r&&0==(r.flags&s)&&(void 0===n?(n={},Utils2.CopyRect(n,t)):Utils2.UnionRect(t,n,n))}}return LogUtil.Debug("= O.OptUtil  GetListSRect - Output:",n),n}FindParentGroup(t,e){let i,n;LogUtil.Debug("= O.OptUtil  FindParentGroup - Input:",{targetId:t,currentGroup:e});const s=(e=e||null)?e.ShapesInGroup:LayerUtil.ZList();for(n=0;n<s.length;n++){if(s[n]===t)return LogUtil.Debug("= O.OptUtil  FindParentGroup - Output:",e),e;if(i=ObjectUtil$1.GetObjectPtr(s[n],!1),i instanceof Instance.Shape.GroupSymbol&&i.ShapesInGroup){const e=T3Gv.opt.FindParentGroup(t,i);if(e)return LogUtil.Debug("= O.OptUtil  FindParentGroup - Output:",e),e}}return LogUtil.Debug("= O.OptUtil  FindParentGroup - Output: null"),null}RebuildLinks(t,e){LogUtil.Debug("= O.OptUtil  RebuildLinks - Input:",{linkList:t,objectId:e});const i=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i.hooks){const n=i.hooks.length;for(let i=0;i<n;i++)T3Gv.opt.InsertLink(t,e,i,DSConstant.LinkFlags.Move)}LogUtil.Debug("= O.OptUtil  RebuildLinks - Output: Completed")}GetBlobImages(t,e){let i,n;LogUtil.Debug("= O.OptUtil  GetBlobImages - Input:",{objectIdsCount:t.length,blobMapSize:Object.keys(e).length});let s=null,a=null,o=t.length;for(n=0;n<o;++n)s=ObjectUtil$1.GetObjectPtr(t[n],!1),s.ShapeType==OptConstant.ShapeType.GroupSymbol?s.ShapesInGroup&&s.ShapesInGroup.length&&this.GetBlobImages(s.ShapesInGroup,e):(i="",s.ImageURL?i=s.ImageURL:s.SymbolURL&&(i=s.SymbolURL),i&&(a=s.GetBlobBytes(),a&&!e[i]&&(e[i]=a)));LogUtil.Debug("= O.OptUtil  GetBlobImages - Output:",{processedObjects:o,blobMapSize:Object.keys(e).length})}GetSRect(t,e,i){LogUtil.Debug("= O.OptUtil  GetSRect - Input:",{excludeTitleBlocks:t,hasFrameDetails:!!e,objectList:i?i.length:"undefined"});const n=NvConstant.ObjFlags.NotVisible,s=NvConstant.TextFlags.TitleBlock,a=i||LayerUtil.VisibleZList(),o=a.length;let r,l,h,c;for(let u=0;u<o;u++)l=ObjectUtil$1.GetObjectPtr(a[u],!1),null!=l&&(h=!1,t&&l.TextFlags&s&&(h=!0),l&&0==(l.flags&n)&&!h&&(c=Utils1.DeepCopy(l.r),void 0===r?(r=c,e&&(e.x=l.Frame.x,e.y=l.Frame.y,e.width=l.Frame.width,e.height=l.Frame.height)):Utils2.UnionRect(c,r,r)));return LogUtil.Debug("= O.OptUtil  GetSRect - Output:",r),r}GetAutomationContext(t){LogUtil.Debug("= O.OptUtil  GetAutomationContext - Input:",t),ObjectUtil$1.GetObjectPtr(this.sdDataBlockId,!1);let e=DSConstant.Contexts.Automation;return t&&(e=t.GetAutomationContext()),e===DSConstant.Contexts.Automation&&(e=DSConstant.Contexts.Automation),LogUtil.Debug("= O.OptUtil  GetAutomationContext - Output:",e),e}RestorePrimaryStateManager(){LogUtil.Debug("= O.OptUtil  RestorePrimaryStateManager - Input: no parameters"),T3Gv.bIsPrimaryStateManager||SvgUtil.RenderAllSVGObjects(),LogUtil.Debug("= O.OptUtil  RestorePrimaryStateManager - Output: Primary state manager restored")}LinesMaintainDistWithinSegment(t,e,i,n){LogUtil.Debug("= O.OptUtil : LinesMaintainDistWithinSegment inputs:",{targetLine:t.BlockID||"unknown",sourceLine:e.BlockID||"unknown",segmentIndex:i,point:{x:n.x,y:n.y}});var s={},a=e.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils2.GetPolyRect(s,a);var o=360-Utils1.CalcAngleFromPoints(a[i-1],a[i]),r=2*Math.PI*(o/360);Utils3.RotatePointsAboutCenter(s,-r,a);var l=[n];Utils3.RotatePointsAboutCenter(s,-r,l);var h=a[i].x-a[i-1].x,c=(n.x-a[i-1].x)/h,u=n.y-a[i-1].y;Utils3.RotatePointsAboutCenter(s,r,l);var d=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),p=360-Utils1.CalcAngleFromPoints(d[i-1],d[i]),g=2*Math.PI*(p/360);Utils2.GetPolyRect(s,d),Utils3.RotatePointsAboutCenter(s,-g,d),Utils3.RotatePointsAboutCenter(s,-g,l);var f=(d[i].x-d[i-1].x)*c;return l[0].x=d[i-1].x+f,l[0].y=d[i-1].y+u,Utils3.RotatePointsAboutCenter(t.Frame,g,l),n=l[0],LogUtil.Debug("= O.OptUtil : LinesMaintainDistWithinSegment output:",{point:{x:n.x,y:n.y}}),n}HandleObjectDragDoAutoScroll(){LogUtil.Debug("= O.OptUtil  HandleObjectDragDoAutoScroll - Input: Starting auto-scroll"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleObjectDragDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);T3Gv.docUtil.ScrollToPosition(t.x,t.y),this.HandleObjectDragMoveCommon(t.x,t.y),LogUtil.Debug("= O.OptUtil  HandleObjectDragDoAutoScroll - Output: Position updated",t)}HandleObjectDragMoveCommon(t,e,i,n){LogUtil.Debug("= O.OptUtil  HandleObjectDragMoveCommon - Input:",{mouseX:t,mouseY:e,skipScrolling:i,event:n});const s=()=>{T3Gv.opt.dragDeltaX<-T3Gv.opt.moveBounds.x&&(T3Gv.opt.dragDeltaX=-T3Gv.opt.moveBounds.x),T3Gv.opt.dragDeltaY<-T3Gv.opt.moveBounds.y&&(T3Gv.opt.dragDeltaY=-T3Gv.opt.moveBounds.y)};if(T3Gv.opt.pinRect){const i={x:t,y:e};this.PinMoveRect(i),t=i.x,e=i.y}T3Gv.opt.dragDeltaX=t-T3Gv.opt.dragStartX,T3Gv.opt.dragDeltaY=e-T3Gv.opt.dragStartY,s();let a={x:T3Gv.opt.dragDeltaX+T3Gv.opt.moveBounds.x+T3Gv.opt.moveBounds.width,y:T3Gv.opt.dragDeltaY+T3Gv.opt.moveBounds.y+T3Gv.opt.moveBounds.height};a=DrawUtil.DoAutoGrowDrag(a);const o=T3Gv.opt.moveList,r=o?o.length:0;if(0===r)return void LogUtil.Debug("= O.OptUtil  HandleObjectDragMoveCommon - Output: No objects to move");let l=0,h=null,c=null,u={x:t,y:e},d={x:0,y:0},p={x:0,y:0},g=T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.JoinIndex>=0)||i;const f=T3Gv.opt.EnhanceSnaps(n);T3Gv.opt.OverrideSnaps(n)&&(g=!0);let b=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1),v={x:null,y:null};const m={x:t,y:e};m.x<0&&(m.x=0),g&&T3Gv.opt.dynamicGuides&&(DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null);let y,S=new DynamicGuides;if(!g&&DrawUtil.AllowSnapToShapes()){c=b.GetSnapRect(),d=Utils1.DeepCopy(c),d.x+=T3Gv.opt.dragDeltaX,d.y+=T3Gv.opt.dragDeltaY;const t={};y=b.CanSnapToShapes(t),y>=0&&(c=ObjectUtil$1.GetObjectPtr(y,!1).GetSnapRect(),p=Utils1.DeepCopy(c),p.x+=T3Gv.opt.dragDeltaX,p.y+=T3Gv.opt.dragDeltaY,v=DynamicUtil.DynamicSnapsGetSnapObjects(y,p,S,T3Gv.opt.moveList,null,t),null!==v.x&&(m.x+=v.x,p.x+=v.x,T3Gv.opt.dragDeltaX=m.x-T3Gv.opt.dragStartX),null!==v.y&&(m.y+=v.y,p.y+=v.y,T3Gv.opt.dragDeltaY=m.y-T3Gv.opt.dragStartY),s())}if(T3Gv.docUtil.docConfig.enableSnap&&!g){if(c=b.GetSnapRect(),d=Utils1.DeepCopy(c),d.x+=T3Gv.opt.dragDeltaX,d.y+=T3Gv.opt.dragDeltaY,b&&b.CustomSnap(b.Frame.x,b.Frame.y,T3Gv.opt.dragDeltaX,T3Gv.opt.dragDeltaY,!1,m))null===v.x&&(T3Gv.opt.dragDeltaX=m.x-T3Gv.opt.dragStartX),null===v.y&&(T3Gv.opt.dragDeltaY=m.y-T3Gv.opt.dragStartY),s();else if(T3Gv.docUtil.docConfig.centerSnap)u.x=c.x+T3Gv.opt.dragDeltaX+c.width/2,u.y=c.y+T3Gv.opt.dragDeltaY+c.height/2,u=T3Gv.docUtil.SnapToGrid(u),null===v.x&&(T3Gv.opt.dragDeltaX=u.x-c.x-c.width/2),null===v.y&&(T3Gv.opt.dragDeltaY=u.y-c.y-c.height/2);else{d=Utils1.DeepCopy(c),d.x+=T3Gv.opt.dragDeltaX,d.y+=T3Gv.opt.dragDeltaY;const t=T3Gv.docUtil.SnapRect(d);null===v.x&&(T3Gv.opt.dragDeltaX+=t.x),null===v.y&&(T3Gv.opt.dragDeltaY+=t.y)}f&&(Math.abs(T3Gv.opt.dragDeltaX)>=Math.abs(T3Gv.opt.dragDeltaY)?T3Gv.opt.dragDeltaY=0:T3Gv.opt.dragDeltaX=0)}const w=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=T3Gv.opt.moveBounds.x+T3Gv.opt.moveBounds.width+T3Gv.opt.dragDeltaX;t>w.dim.x&&(T3Gv.opt.dragDeltaX-=t-w.dim.x);const e=T3Gv.opt.moveBounds.y+T3Gv.opt.moveBounds.height+T3Gv.opt.dragDeltaY;e>w.dim.y&&(T3Gv.opt.dragDeltaY-=e-w.dim.y)}let x=SelectUtil.GetTargetSelect();for(x<0&&(x=T3Gv.opt.dragTargetId),!0===i&&(T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0),l=0;l<r;++l){if(c=T3Gv.opt.dragBBoxList[l],o[l]===x){b=ObjectUtil$1.GetObjectPtr(x,!1);let t={x:c.x+T3Gv.opt.dragDeltaX,y:c.y+T3Gv.opt.dragDeltaY,width:c.width,height:c.height};b&&(t=b.GetDimensionsForDisplay(),t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY,(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.ConnectIndexHistory.length>0)&&HookUtil.HandleHookedObjectMoving(b,t)),UIUtil.UpdateDisplayCoordinates(t,u,CursorConstant.CursorTypes.Move,b);const e=new SelectionAttr;e.left=t.x,e.top=t.y;const i=b.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches;e.widthstr=T3Constant.DocContext.CurrentWidth,e.heightstr=T3Constant.DocContext.CurrentHeight,e.leftstr=RulerUtil.GetLengthInRulerUnits(e.left,!1,T3Gv.docUtil.rulerConfig.originx,i),e.topstr=RulerUtil.GetLengthInRulerUnits(e.top,!1,T3Gv.docUtil.rulerConfig.originy,i),S&&DynamicUtil.DynamicSnapsUpdateGuides(S,y,p)}h=SvgUtil.GetSVGDragElement(l),h&&(h.SetPos(c.x+T3Gv.opt.dragDeltaX,c.y+T3Gv.opt.dragDeltaY),c.x,T3Gv.opt.dragDeltaX,c.y,T3Gv.opt.dragDeltaY,c.width,c.height)}LogUtil.Debug("= O.OptUtil  HandleObjectDragMoveCommon - Output:",{deltaX:T3Gv.opt.dragDeltaX,deltaY:T3Gv.opt.dragDeltaY,objectsProcessed:r})}HandleStampDragDoAutoScroll(){LogUtil.Debug("= O.OptUtil  HandleStampDragDoAutoScroll - Input: Starting auto-scroll"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleStampDragDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);T3Gv.docUtil.ScrollToPosition(t.x,t.y),DrawUtil.StampObjectMoveCommon(t.x,t.y),LogUtil.Debug("= O.OptUtil  HandleStampDragDoAutoScroll - Output: Position updated",t)}OptSltSelectDoAutoScroll(){LogUtil.Debug("= O.OptUtil  OptSltSelectDoAutoScroll - Input: starting auto scroll"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("OptSltSelectDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);LogUtil.Debug(`= O.OptUtil  OptSltSelectDoAutoScroll - Converted Coordinates: x=${t.x}, y=${t.y}`),T3Gv.docUtil.ScrollToPosition(t.x,t.y),LogUtil.Debug(`= O.OptUtil  OptSltSelectDoAutoScroll - Scrolled to position: x=${t.x}, y=${t.y}`),SelectUtil.OptSltSelectMoveCommon(t.x,t.y),LogUtil.Debug("= O.OptUtil  OptSltSelectDoAutoScroll - Output: Rectangle selection moved")}ImportBackgroundLayerImage(t,e){let i,n;LogUtil.Debug("= O.OptUtil  ImportBackgroundLayerImage - Input:",{imageUrl:t,importOptions:e});let s=-1;let a=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1);if(a){for(i=0;i<a.layers.length;i++)if(a.layers[i].layertype===NvConstant.LayerTypes.Background){s=i;break}if(s<0)LayerUtil.AddNewLayerAtFront("Background Layer",!0,!1),LayerUtil.RotateLayerStack(!0),s=a.layers.length-1,a.layers[s].layertype=NvConstant.LayerTypes.Background;else{if(n=a.layers[s].zList,n.length>0&&null==e)return;this.CloseEdit(!0)}LayerUtil.MakeLayerActiveByIndex(s),a.layers[s].flags=Utils2.SetFlag(a.layers[s].flags,NvConstant.LayerFlags.NoAdd,!1),T3Gv.opt.SetBackgroundImage(t,!0,e,!0)}LogUtil.Debug("= O.OptUtil  ImportBackgroundLayerImage - Output: Background layer updated")}SetBackgroundImage(t,e,i,n,s){let a;LogUtil.Debug("= O.OptUtil  SetBackgroundImage - Input:",{imageUrl:t,replaceExisting:e,hasImportData:!!i,isBackground:n,hasCallback:!!s});let o=!1,r="",l=null,h=null,c=this,u=e,d=800,p=800;const g=(t,e,i)=>{let s,a=[];if(!i&&t>0&&e>0){let i=e,o=t;const u=c.CalcWorkAreaCenterCoords(o,i),d=new QuickStyle;d.Name="",d.Line.Thickness=0,d.Fill.Paint.FillType=NvConstant.FillTypes.Transparent;const p={Frame:{x:u.x,y:u.y,width:o,height:i},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ImageURL:r,StyleRecord:d,ObjGrow:OptConstant.GrowBehavior.ProPortional,flags:NvConstant.ObjFlags.ImageOnly,extraflags:OptConstant.ExtraFlags.NoColor},g=new Instance.Shape.Rect(p);if(g){const i=DSUtil.GetImageDir(l);g.SetBlobBytes(h,i),i===StyleConstant.ImageDir.Svg&&(g.SVGDim={width:t,height:e})}s=DrawUtil.AddNewObject(g,!1,!0);const f=ObjectUtil$1.GetObjectPtr(s,!1);f&&(f.TextFlags=NvConstant.TextFlags.AttachB,f.ImageHeader=new ImageRecord,a.push(s));const b=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1);if(b&&b.layers[b.activelayer].layertype===NvConstant.LayerTypes.Background){const t=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!0);t.layers[t.activelayer].flags=Utils2.SetFlag(t.layers[t.activelayer].flags,NvConstant.LayerFlags.NoAdd,!0)}n&&SvgUtil.RenderAllSVGObjects(),DrawUtil.CompleteOperation(a)}},f=(t,e,i,s)=>{try{let o;r=t,l=e,h=i;let c,d,p,f,b=!1;if((s?s.Data.ImageDir:DSUtil.GetImageDir(e))===StyleConstant.ImageDir.Svg&&(b=!0,o=Utils2.ParseSVGDimensions(i)),s?c=s.Data.BlockID:(c=SelectUtil.GetTargetSelect(),f=!1,n&&(c=-1),c>=0&&(a=ObjectUtil$1.GetObjectPtr(c,!1),(null==d?void 0:d.indexOf(a.objecttype))<0&&(null==p?void 0:p.indexOf(a.subtype))<0?a.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape||a instanceof Instance.Shape.BaseSymbol||a.SymbolURL||(f=u):(c=-1,f=!1))),f||s)if(a=ObjectUtil$1.GetObjectPtr(c,!1),a.GetTable(!1));else{a=ObjectUtil$1.GetObjectPtr(c,!0),b&&(a.SVGDim=o),TextUtil.DeleteTargetTextObject(c),OptCMUtil.IsBlobURL&&OptCMUtil.IsBlobURL(a.ImageURL)&&(OptCMUtil.DeleteURL(a.ImageURL),a.ImageURL=""),a.ImageURL=t;const e=DSUtil.GetImageDir(l);a.StyleRecord.Fill.Paint.Opacity=1,a.SetBlobBytes(i,e),a.ImageHeader=new ImageRecord,a.TextFlags=Utils2.SetFlag(a.TextFlags,NvConstant.TextFlags.None,!0),ObjectUtil$1.AddToDirtyList(c),DrawUtil.CompleteOperation()}else b?g(o.width,o.height,null):Style.CalcImageSize(t,g)}catch(o){throw o}};if(i);else{let i=SelectUtil.GetTargetSelect();0===e&&(o=!1,u=!0,i>=0&&(a=ObjectUtil$1.GetObjectPtr(i,!1),i=-1)),i>=0&&(a=ObjectUtil$1.GetObjectPtr(i,!1),a.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape||a instanceof Instance.Shape.BaseSymbol||a.SymbolURL||(o=u),o&&(a=ObjectUtil$1.GetObjectPtr(i,!1),d=a.Frame.width,p=a.Frame.height));const n=new Instance.Shape.BitmapImporter;n&&n.ImportBitmap(t,d,p,this.bitmapImportDPI,f)}LogUtil.Debug("= O.OptUtil  SetBackgroundImage - Output: Background image set")}CalcWorkAreaCenterCoords(t,e){const i=this.svgDoc,n=i.docInfo.dispX+i.docInfo.dispWidth/2-t/2*i.docInfo.docToScreenScale,s=i.docInfo.dispY+i.docInfo.dispHeight/2-e/2*i.docInfo.docToScreenScale,a=i.ConvertWindowToDocCoords(n,s);return a.x=a.x<10?10:a.x,a.y=a.y<10?10:a.y,a}CalcDocCoords(t,e){const i=this.svgDoc;let n=i.docInfo.dispX+t*i.docInfo.docToScreenScale,s=i.docInfo.dispY+e*i.docInfo.docToScreenScale;const a=i.ConvertWindowToDocCoords(n,s);return a.x=a.x<10?10:a.x,a.y=a.y<10?10:a.y,a}Lock(t,e){const i=T3Gv.stdObj.GetObject(this.selectObjsBlockId).Data,n=i.length;if(0!==n||e){let e,s=0,a=!0;const o=NvConstant.ObjFlags.Lock;for((e=ObjectUtil$1.GetObjectPtr(t,!1))&&(a=0==(e.flags&o)),s=0;s<n;++s)e=ObjectUtil$1.GetObjectPtr(i[s],!0),e.flags=Utils2.SetFlag(e.flags,o,a),ObjectUtil$1.AddToDirtyList(i[s]);DrawUtil.CompleteOperation()}else LogUtil.Debug("= O.OptUtil  Lock - Error: No objects selected")}ImportSvgSymbol(t){let e="",i=null,n=null;const s=(t,s,a)=>{let o;const r=[];if(!a&&t>0&&s>0){let a=200,l=200;t<s?l*=t/s:a*=s/t;const h=this.CalcWorkAreaCenterCoords(l,a),c=new QuickStyle;c.Name="",c.Line.Thickness=0,c.Fill.Paint.FillType=NvConstant.FillTypes.Transparent;const u={Frame:{x:h.x,y:h.y,width:a,height:l},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ImageURL:e,StyleRecord:c,ObjGrow:OptConstant.GrowBehavior.ProPortional,flags:NvConstant.ObjFlags.ImageOnly,extraflags:OptConstant.ExtraFlags.NoColor},d=new Instance.Shape.Rect(u);o=DrawUtil.AddNewObject(d,!1,!0);const p=ObjectUtil$1.GetObjectPtr(o,!1);if(p){const t=DSUtil.GetImageDir(i);p.SetBlobBytes(n,t)}r.push(o),DrawUtil.CompleteOperation(r)}},a=new Instance.Shape.SvgImporter;a&&a.ImportSvg(t,((t,a,o)=>{e=t,i=a,n=o,this.CalcSVGSymbolDimensions(a,t,s)}))}CalcSVGSymbolDimensions(t,e,i){if(t){const e=new FileReader;e.UserData={callback:i},e.onload=function(t){const e=this.result;let i=null;window.DOMParser?i=(new DOMParser).parseFromString(e,"text/xml"):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async=!1,i.loadXML(e));let n=i.documentElement.getAttribute("width");n&&(n=n.match(/\d*\.*\d*/)[0]);let s=i.documentElement.getAttribute("height");if(s&&(s=s.match(/\d*\.*\d*/)[0]),n&&s)this.UserData.callback(n,s,null);else{const t=i.documentElement.getAttribute("viewBox");if(t){const e=t.split(" ");n=parseFloat(e[2]),n=n.match(/\d*\.*\d*/)[0],s=parseFloat(e[3]),s=s.match(/\d*\.*\d*/)[0],n&&s?this.UserData.callback(n,s,null):this.UserData.callback(0,0,{error:"No width/height and viewbox bad"})}else this.UserData.callback(0,0,{error:"No viewbox or width/height"})}},e.readAsText(t)}else i&&i(0,0,{error:"No blob passed in"})}ShapeToPolyLine(t,e,i,n){let s,a,o,r,l=[],h={x:0,y:0,width:0,height:0};if(n)a=n,r=!0,h=Utils1.DeepCopy(a.Frame);else{a=ObjectUtil$1.GetObjectPtr(t,!1),null==a.polylist?(a.polylist=a.GetPolyList(),a.StartPoint={},a.EndPoint={}):r=!0;const e=T3Gv.stdObj.PreserveBlock(t);if(null==e)return;a=e.Data,h=Utils1.DeepCopy(a.Frame)}if(r){if(!a.polylist)return null;if(T3Gv.opt.GetClosedPolyDim(a),!Utils2.IsEqual(a.polylist.dim.x,h.width)){const t=Utils1.DeepCopy(a);t.inside=Utils1.DeepCopy(a.Frame),Instance.Shape.PolyLine.prototype.ScaleObject.call(t,0,0,0,0,0,0),a.polylist=t.polylist}}return o=a.polylist.segs.length,a.StartPoint.x=a.Frame.x+a.polylist.segs[0].pt.x+a.polylist.offset.x,a.StartPoint.y=a.Frame.y+a.polylist.segs[0].pt.y+a.polylist.offset.y,a.EndPoint.x=a.Frame.x+a.polylist.segs[o-1].pt.x+a.polylist.offset.x,a.EndPoint.y=a.Frame.y+a.polylist.segs[o-1].pt.y+a.polylist.offset.y,s=e?new Instance.Shape.PolyLineContainer(a):new Instance.Shape.PolyLine(a),s.BlockID=a.BlockID,s.polylist.Shape_Rotation=a.RotationAngle,s.polylist.Shape_DataID=a.DataID,s.RotationAngle=0,s.DataID=-1,n||(objectBlock.Data=s),i||(this.AddToDirtyList(t),this.RenderDirtySVGObjects(),l.push(t),this.SelectObjects(l,!1,!0)),s.inside=Utils1.DeepCopy(a.Frame),s}GetClosedPolyDim(t){let e,i={x:0,y:0,width:0,height:0};if(t.polylist){const n=Utils1.DeepCopy(t),s=new Instance.Shape.PolyLine(n);s.inside=Utils1.DeepCopy(t.Frame),s.polylist.dim.x=0,s.polylist.dim.y=0,e=s.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e&&e.length&&(Utils2.GetPolyRect(i,e),i.width<1&&(i.width=1),i.height<1&&(i.height=1),t.polylist.closed&&(t.polylist.dim.x=i.width,t.polylist.dim.y=i.height))}}TextCallback(t,e,i,n){let s,a,o,r,l,h=n.ID,c=null,u=!1;try{const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if("spellcheck"===t&&(c=ObjectUtil$1.GetObjectPtr(h,!1),c&&(r=c.GetTable(!1),r&&(l=i.GetUserData(),u=!(r.select>=0)||r.cells[r.select].DataID!=l)),null==T3Gv.opt.svgDoc.GetActiveEdit()&&(u=!0)),n.theActiveTextEditObjectID!=h||u)return void("spellcheck"===t&&(c=ObjectUtil$1.GetObjectPtr(h,!1),c&&(r=c.GetTable(!1),l=r?i.GetUserData():c.DataID,l>0&&i&&(s=i.GetRuntimeText(),a=ObjectUtil$1.GetObjectPtr(l,Utils1.IsStateOpen()),a&&(a.runtimeText=s),Utils1.IsStateOpen()||(o=[],o.push(T3Gv.stdObj.GetObject(l)))))));switch(t){case"dragoutside":if((c=ObjectUtil$1.GetObjectPtr(h,!1))&&(r=c.GetTable(!1))&&r.select>=0){const t=c.GetTextParams(!1),n=e,s={};s.x=n.x+c.Frame.x,s.y=n.y+c.Frame.y;const a=t.trect;Utils2.pointInRect(a,s)||(i.editor.isActive&&i.editor.BeginTableDrag(),s.y-=c.trect.y,s.x-=c.trect.x)}break;case"keyend":return e.keyCode,!0;case"edit":TextUtil.TextAutoScroll(h),TextUtil.TextResizeCommon(h);break;case"didresize":case"selectrange":case"hyperlink":case"select":case"deactivate":break;case"click":n.theTELastOp!=NvConstant.TextElemLastOpt.Init&&TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Select);break;case"charfilter":return c=ObjectUtil$1.GetObjectPtr(h,!1),!0}}catch(d){T3Gv.opt.ExceptionCleanup(d)}}LinesAddCurve(t,e,i,n,s,a){}DeleteBlock(t){}ChangeObjectTextAttributes(t,e,i,n,s,a,o,r){}DeSelect(t){}TextEdit_PauseTyping(){clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)}SetTopLeft(t,e){const i=SelectUtil.GetTargetSelect();if(i<0)return;const n=ObjectUtil$1.GetObjectPtr(i,!0);if(null!==n){let s,a,o,r;s=T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units==NvConstant.RulerUnit.Feet?Utils3.ConvertToFeet(t):Utils3.NumberIsFloat(t,!0)?parseFloat(t):0,e?T3Gv.docUtil.rulerConfig.originx&&(a=100*T3Gv.docUtil.rulerConfig.originx,T3Gv.docUtil.rulerConfig.useInches||(a/=OptConstant.Common.MetricConv),s+=RulerUtil.GetLengthInUnits(a),t=s.toFixed(2)):T3Gv.docUtil.rulerConfig.originy&&(a=100*T3Gv.docUtil.rulerConfig.originy,T3Gv.docUtil.rulerConfig.useInches||(a/=OptConstant.Common.MetricConv),s+=RulerUtil.GetLengthInUnits(a),t=s.toFixed(2));const l=this.GetDimensionLengthFromString(t,!1,!1);e?(o=l,r=null):(r=l,o=null),n.SetShapeOrigin(o,r,null,!0),OptCMUtil.SetLinkFlag(i,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(i,!0),DrawUtil.CompleteOperation();const h=n.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(h,null,null,n)}}ChangeWidth(t){let e=-1,i=-1,n=null;this.cachedWidth=null;const s=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,a=s.length;if(0!==a){for(let o=0;o<a;++o){const a=ObjectUtil$1.GetObjectPtr(s[o],!0);if(e=a.GetDimensionValueFromString(t,1),e>=0&&(i=a.GetDimensionLengthFromValue(e),i=a.AdjustDimensionLength(i),n=a.MaintainProportions(i,null)),i>=0){a.SetSize(i,n,OptConstant.ActionTriggerType.LineLength);const t=a.GetDimensionsForDisplay();a.CanUseRFlags()&&t.width===i&&(a.rflags=Utils2.SetFlag(a.rflags,NvConstant.FloatingPointDim.Width,!0),a.rwd=e),OptCMUtil.SetLinkFlag(s[o],DSConstant.LinkFlags.Move)}ObjectUtil$1.AddToDirtyList(s[o])}DrawUtil.CompleteOperation()}}ChangeHeight(t){let e=-1,i=-1,n=null;this.cachedHeight=null;const s=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,a=s.length;if(0!==a){for(let o=0;o<a;++o){const a=ObjectUtil$1.GetObjectPtr(s[o],!0);if(e=a.GetDimensionValueFromString(t,2),e>=0&&(i=a.GetDimensionLengthFromValue(e),i=a.AdjustDimensionLength(i),n=a.MaintainProportions(null,i)),i>=0){a.SetSize(n,i,OptConstant.ActionTriggerType.LineLength);const t=a.GetDimensionsForDisplay();a.CanUseRFlags()&&t.height===i&&(a.rflags=Utils2.SetFlag(a.rflags,NvConstant.FloatingPointDim.Height,!0),a.rht=e),OptCMUtil.SetLinkFlag(s[o],DSConstant.LinkFlags.Move)}ObjectUtil$1.AddToDirtyList(s[o])}DrawUtil.CompleteOperation()}}GetDimensionLengthFromString(t,e,i){let n=0,s=0;if(0===t.length)return 0;if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units==NvConstant.RulerUnit.Feet&&!e){if(n=Utils3.ConvertToFeet(t),n<0&&!i)return!1}else{if(!Utils3.NumberIsFloat(t,i))return 1;n=parseFloat(t)}return s=T3Gv.docUtil.rulerConfig.showpixels?n:this.UnitsToCoord(n,0),s>4e5&&(s=-1),s}UnitsToCoord(t,e){ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);const i=RulerUtil.GetToUnits();return(t+=e*T3Gv.docUtil.rulerConfig.majorScale)/i}SetBackgroundColor(t){try{let e;T3Gv.opt.CloseEdit(!0,!0),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);let i=e.background.Paint.Color;e.background.Paint.FillType===NvConstant.FillTypes.Transparent&&(i=NvConstant.Colors.White);let n=t;t===NvConstant.Colors.Trans&&(n=NvConstant.Colors.White),UIUtil.ChangeBackgroundTextColor(n,i),t===NvConstant.Colors.Trans?(e.background.Paint.FillType=NvConstant.FillTypes.Transparent,e.background.Paint.Color=NvConstant.Colors.White):(e.background.Paint.FillType=NvConstant.FillTypes.Solid,e.background.Paint.Color=t),e.background.Paint.Opacity=1,UIUtil.SetBackgroundColor(),DrawUtil.CompleteOperation()}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetShapeBackgroundColor(t){}AddToLibrary(){const t=T3Gv.stdObj.GetObject(this.selectObjsBlockId),e=t.Data;if(LogUtil.Debug("= u.OptUtil: AddToLibrary - Selected Object, Selected Data, Object Count",t,e,e.length),0===e.length)return LogUtil.Debug("= u.OptUtil: AddToLibrary - Error: No objects selected"),!1;const i=[];e.forEach((t=>{const e=T3Gv.stdObj.GetObject(t);if(e){const t=Utils1.DeepCopy(e);i.push(t)}}));const n=JSON.stringify(i,((t,e)=>{if("function"!=typeof e)return e}));return DataOpt.SaveT3Library(n),LogUtil.Debug("= u.OptUtil: AddToLibrary - Successfully saved to local storage",{itemCount:i.length,storageKey:"t3.library",sizeInBytes:n.length}),Hvac.IdxPage2.addToNewLibrary(),i}LoadLibrary(){const t=DataOpt.LoadT3Library();if(!t||0===t.length)return LogUtil.Debug("= u.OptUtil: LoadLibrary - No library items found in storage"),!1;LogUtil.Debug("= u.OptUtil: LoadLibrary - rck:",T3Gv.opt.rClickParam);const e=T3Gv.opt.rClickParam&&T3Gv.opt.rClickParam.hitPoint.x&&T3Gv.opt.rClickParam.hitPoint.y,i=e?T3Gv.opt.rClickParam.hitPoint.x:100,n=e?T3Gv.opt.rClickParam.hitPoint.y:100;LogUtil.Debug("= u.OptUtil: LoadLibrary - coordsX,coordsY:",i,n);const s=this.CalcDocCoords(i,n);LogUtil.Debug("= u.OptUtil: LoadLibrary - docCoords:",s);const a=[];let o=null,r=null,l=0,h=0;return t.forEach(((t,e)=>{if(!t.Data)return;const s=DataOpt.ConvertPlanObjectToShape(t.Data);if(LogUtil.Debug("= u.OptUtil: LoadLibrary - ConvertPlanObjectToShape:",s),!s)return;const c=Utils1.DeepCopy(s.Frame);null===o&&(o=c.x,r=c.y,l=i-o,h=n-r);const u=c.x+l,d=c.y+h;LogUtil.Debug("= u.OptUtil: LoadLibrary - Positioning shape:",{index:e,original:{x:c.x,y:c.y},new:{x:u,y:d},offset:{x:l,y:h}}),s.SetShapeOrigin(u,d,null,!1);const p=DrawUtil.AddNewObject(s,!1,!1);p<0||(a.push(p),LogUtil.Debug("= u.OptUtil: LoadLibrary - newObject,newObjectId:",s,p))})),!(a.length<=0)&&(this.CloseEdit(!0),SvgUtil.RenderAllSVGObjects(),DrawUtil.CompleteOperation(a),T3Gv.opt.rClickParam=null,LogUtil.Debug("= u.OptUtil: LoadLibrary - Output: Successfully loaded and rendered",a.length,a),!0)}NudgeSelectedObjects(t,e,i){let n,s;LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Input:",{horizontalDelta:t,verticalDelta:e,isResizeMode:i});let a=T3Gv.stdObj.GetObject(this.selectObjsBlockId).Data,o=a.length;const r=0==(T3Gv.opt.header.flags&OptConstant.HeaderFlags.AutoGrowTopLeft),l=SelectUtil.GetTargetSelect();if(0===o)return void LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: No objects selected");let h,c,u;T3Gv.opt.dynamicGuides&&(DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null);const d={};let p,g,f,b,v,m=SelectUtil.GetMoveList(a[0],!0,!0,!1,d,!1);for(h=m.length-1;h>=0;h--)if(s=ObjectUtil$1.GetObjectPtr(m[h],!1),i&&s.NoGrow())m.splice(h,1);else if(m[h]!==a[0]||(s.objecttype===NvConstant.FNObjectTypes.GanttBar&&m.splice(h,1),0!=(s.flags&NvConstant.ObjFlags.Lock)))if(s.flags&NvConstant.ObjFlags.Lock)m.splice(h,1);else if(!i)for(c=0;c<s.hooks.length;c++)if(-1===m.indexOf(s.hooks[c].objid)){m.splice(h,1);break}if(a=m,o=a.length,!i&&r&&(d.x+t<0||d.y+e<0))return void LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: Operation would move objects out of bounds");if(d.x+=t,d.y+=e,0===o)return void LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: No modifiable objects found");SvgUtil.HideAllSVGSelectionStates();let y=0;for(this.dragBBoxList=[],y=0;y<o;++y){if(p=a[y],s=ObjectUtil$1.GetObjectPtr(p,!1),i){if(n=Utils1.DeepCopy(s),g=s.GetDimensions(),f=null,b=null,v=!1,t){if((s.ObjGrow===OptConstant.GrowBehavior.All||s.ObjGrow===OptConstant.GrowBehavior.ProPortional||s.ObjGrow===OptConstant.GrowBehavior.Horiz)&&(f=g.x+t,f<=10))continue;g.y>0&&s.ObjGrow===OptConstant.GrowBehavior.ProPortional&&(b=g.y+t,v=!0)}if(e&&!v){if((s.ObjGrow===OptConstant.GrowBehavior.All||s.ObjGrow===OptConstant.GrowBehavior.ProPortional||s.ObjGrow===OptConstant.GrowBehavior.Vertical)&&(b=g.y+e,b<=10))continue;g.x>0&&s.ObjGrow===OptConstant.GrowBehavior.ProPortional&&(f=g.x+e)}s=ObjectUtil$1.GetObjectPtr(p,!0),s.flags&NvConstant.ObjFlags.TextOnly&&s.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent&&(s.flags=Utils2.SetFlag(s.flags,NvConstant.ObjFlags.TextOnly,!1),s.SetTextGrow(NvConstant.TextGrowBehavior.Vertical)),s.SetSize(f,b,OptConstant.ActionTriggerType.LineLength),HookUtil.MaintainLink(s.BlockID,s,n,OptConstant.ActionTriggerType.LineEnd)}else ToolActUtil.OffsetShape(p,t,e,OptConstant.ActionTriggerType.TableSelect);if(ObjectUtil$1.AddToDirtyList(p,!i),p===l){const t=s.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(t,null,null,s)}s&&1===s.hooks.length&&!i&&(u=ObjectUtil$1.GetObjectPtr(s.hooks[0].objid,!1),this.HookedObjectMovingDebounced(s,u))}this.nudgeOpen?i?(this.nudgeGrowX+=t,this.nudgeGrowY+=e):(this.nudgeX+=t,this.nudgeY+=e):i?(this.nudgeGrowX=t,this.nudgeGrowY=e,this.nudgeX=0,this.nudgeY=0):(this.nudgeGrowX=0,this.nudgeGrowY=0,this.nudgeX=t,this.nudgeY=e),(this.theDragGotAutoResizeLeft||this.theDragGotAutoResizeTop)&&this.ResetOrigin(),this.nudgeOpen=!1,this.UpdateLinks(),HookUtil.UpdateLineHops(!0),UIUtil.FitDocumentWorkArea(!1,!1),SvgUtil.RenderDirtySVGObjects(),SvgUtil.RenderAllSVGSelectionStates(),this.ScrollObjectIntoView(-1,!1,d),this.nudgeOpen=!0,DrawUtil.UpdateAppStateV2Frame(),LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: Objects modified",{objectCount:o})}ResetOrigin(){LogUtil.Debug("= O.OptUtil  ResetOrigin - Input: Starting reset");const t=this.theDragGotAutoResizeLeft?-this.theDragGotAutoResizeOldLeft.at(-1):0,e=this.theDragGotAutoResizeTop?-this.theDragGotAutoResizeOldTop.at(-1):0;LayerUtil.ZList().forEach((i=>{const n=T3Gv.stdObj.PreserveBlock(i).Data;null!=n&&(n.OffsetShape(t,e),ObjectUtil$1.AddToDirtyList(i))})),this.ResetSVGRenderOffset(),this.theDragGotAutoResizeLeft=!1,this.theDragGotAutoResizeTop=!1,this.theDragGotAutoResizeOldLeft=[],this.theDragGotAutoResizeOldTop=[],LogUtil.Debug("= O.OptUtil  ResetOrigin - Output: Origin reset completed",{horizontalOffset:t,verticalOffset:e})}ResetSVGRenderOffset(){LogUtil.Debug("= O.OptUtil  ResetSVGRenderOffset - Input: Resetting offsets to zero"),this.SetSVGRenderOffset(0,0),LogUtil.Debug("= O.OptUtil  ResetSVGRenderOffset - Output: Offsets reset")}SetSVGRenderOffset(t,e){LogUtil.Debug("= O.OptUtil  SetSVGRenderOffset - Input:",{horizontalOffset:t,verticalOffset:e}),this.svgObjectLayer&&this.svgObjectLayer.SetPos(t,e),this.svgOverlayLayer&&this.svgOverlayLayer.SetPos(t,e),this.svgHighlightLayer&&this.svgHighlightLayer.SetPos(t,e),this.svgCollabLayer&&this.svgCollabLayer.SetPos(t,e),LogUtil.Debug("= O.OptUtil  SetSVGRenderOffset - Output: Positions updated for all layers")}HookedObjectMovingDebounced(t,e){if(LogUtil.Debug("= O.OptUtil  HookedObjectMovingDebounced - Input:",{movingObjectId:t.BlockID,hookedObjectId:null==e?void 0:e.BlockID}),e&&e.HookedObjectMoving&&e.Dimensions&(NvConstant.DimensionFlags.Always|NvConstant.DimensionFlags.Select)){clearTimeout(this.HookedObjectMovingTimer);const i=!this.HookedObjectMovingLastExecutionTime||Date.now()-this.HookedObjectMovingLastExecutionTime>=100?0:100,n=this;this.HookedObjectMovingTimer=setTimeout((function(){e.HookedObjectMoving({linkParams:null,movingShapeID:t.BlockID,movingShapeBBox:t.GetDimensionsForDisplay()}),n.HookedObjectMovingLastExecutionTime=Date.now(),LogUtil.Debug("= O.OptUtil  HookedObjectMovingDebounced - Output: HookedObjectMoving called")}),i)}else LogUtil.Debug("= O.OptUtil  HookedObjectMovingDebounced - Output: No action (hookedObject not eligible)")}CloseOpenNudge(){this.nudgeOpen=!1,DrawUtil.CompleteOperation(),LogUtil.Debug("= O.OptUtil  CloseOpenNudge - Input/Output: Nudge closed and operation completed")}FlipPoints(t,e,i){let n,s,a;LogUtil.Debug("= O.OptUtil  FlipPoints - Input:",{frame:t,flipFlags:e,pointCount:i.length});const o=OptConstant.ExtraFlags;for(a=i.length,s=0;s<a;s++)e&o.FlipHoriz&&(n=i[s].x-t.x,i[s].x=t.x+t.width-n),e&o.FlipVert&&(n=i[s].y-t.y,i[s].y=t.y+t.height-n);LogUtil.Debug("= O.OptUtil  FlipPoints - Output: Points flipped",{pointCount:a})}TableGetRowConnectPoints(t,e){var i,n;let s,a,o,r,l,h,c,u;LogUtil.Debug("= O.OptUtil  TableGetRowConnectPoints - Input:",{tableElement:null==t?void 0:t.BlockID,tableData:{rowCount:null==(i=null==e?void 0:e.rows)?void 0:i.length,cellCount:null==(n=null==e?void 0:e.cells)?void 0:n.length}});const d=e.rows.length,p=[],g=t.Frame.height,f=OptConstant.Common.DimMax;h={x:f/2,y:0},p.push(h),h={x:f/2,y:f},p.push(h);const b=t.trect.y-t.Frame.y;for(s=0;s<d;s++){for(c=e.rows[s],r=e.cells[c.start],l=r.frame.y+b,o=r.frame.height,u=r.nextra,a=1;a<=u;a++)r=e.cells[e.rows[s+a].start],o+=r.frame.height;s+=u,l+=o/2,h={x:0,y:l/g*f},p.push(h)}for(s=0;s<d;s++){for(c=e.rows[s],r=e.cells[c.start+c.ncells-1],l=r.frame.y+b,o=r.frame.height,u=r.nextra,a=1;a<=u;a++){const t=e.rows[s+a];r=e.cells[t.start+t.ncells-1],o+=r.frame.height}s+=u,l+=o/2,h={x:f,y:l/g*f},p.push(h)}return LogUtil.Debug("= O.OptUtil  TableGetRowConnectPoints - Output:",{pointCount:p.length}),p}FindAllChildLines(t,e){const i={lindex:-1,id:-1,hookpt:0},n=[];for(;this.FindChildArrayByIndex(t,i,e,OptConstant.DrawObjectBaseClass.Line)>0;)n.push(i.id);return n}CommentUngroup(t){}CommentGroup(t){}UngroupNative(t,e,i){let n,s,a,o,r,l,h,c,u,d=[],p={selectedList:[]};if(n=ObjectUtil$1.GetObjectPtr(t,!1),n.NativeID>=0&&(s=ObjectUtil$1.GetObjectPtr(n.NativeID,!1))&&(ShapeUtil.ReadSymbolFromBuffer(s,0,0,0,!1,!1,p,!1,!1,!1,!1,!1),p.selectedList.length)){l=p.selectedList.length;let e=this.GetListSRect(p.selectedList);o=n.Frame.width/e.width,r=n.Frame.height/e.height;let s={x:n.Frame.x+n.Frame.width/2,y:n.Frame.y+n.Frame.height/2};if(c=n.Frame.x,u=n.Frame.y,Utils2.IsEqual(100*o,100)&&Utils2.IsEqual(100*r,100)||!(l>1))for(h=0;h<l;h++)t=p.selectedList[h],ObjectUtil$1.GetObjectPtr(t,!1).OffsetShape(c,u);else for(h=0;h<l;h++)t=p.selectedList[h],ObjectUtil$1.GetObjectPtr(t,!1).ScaleObject(c,u,s,0,o,r,!0);l>1&&!i?(t=ToolAct2Util.GroupSelectedShapes(!0,p.selectedList,!1),a=ObjectUtil$1.GetObjectPtr(t,!1),d.push(t),a.InitialGroupBounds.x=0,a.InitialGroupBounds.y=0,a.Frame=Utils1.DeepCopy(n.Frame),a.RotationAngle=n.RotationAngle,a.extraflags=Utils2.SetFlag(a.extraflags,OptConstant.ExtraFlags.FlipHoriz,(n.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0),a.extraflags=Utils2.SetFlag(a.extraflags,OptConstant.ExtraFlags.FlipVert,(n.extraflags&OptConstant.ExtraFlags.FlipVert)>0),a.UpdateFrame(a.Frame)):d.push(p.selectedList[0])}return d}}class KeyboardUtil{constructor(){__publicField(this,"Name"),__publicField(this,"Context"),__publicField(this,"ModifierKey"),__publicField(this,"KeyCode"),__publicField(this,"Command"),__publicField(this,"CommandParent"),__publicField(this,"CommandParams"),__publicField(this,"Execute")}BuildCommand(t,e,i,n,s,a,o){return LogUtil.Debug("U.KeyboardUtil: Creating keyboard command",t,e,i,n),this.Name=null!==t?t:null,this.Context=null!==e?e:KeyboardConstant.Contexts.None,this.ModifierKey=null!==i?i:KeyboardConstant.ModifierKeys.None,this.KeyCode=null!==n?n:null,this.Command="function"==typeof s?s:function(){LogUtil.Debug("U.KeyboardUtil: Keyboard command is unbound",this.Name,this.ModifierKey,this.KeyCode)},this.CommandParent=null!==a?a:this,this.CommandParams=null!==o?o:[],this.Execute=function(){LogUtil.Debug("U.KeyboardUtil: Executing command",this.Name);const t=this.Command.apply(this.CommandParent,this.CommandParams);return LogUtil.Debug("U.KeyboardUtil: Command execution complete",this.Name),t},this}}class ArrowKeyOpt{NavRight(){LogUtil.Debug("= O.ArrowKeyOpt: NavRight called");try{this.NudgeRight()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavRight error:",t),T3Gv.opt.ExceptionCleanup(t)}}NavLeft(){LogUtil.Debug("= O.ArrowKeyOpt: NavLeft called");try{this.NudgeLeft()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavLeft error:",t),T3Gv.opt.ExceptionCleanup(t)}}NavUp(){LogUtil.Debug("= O.ArrowKeyOpt: NavUp called");try{this.NudgeUp()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavUp error:",t),T3Gv.opt.ExceptionCleanup(t)}}NavDown(){LogUtil.Debug("= O.ArrowKeyOpt: NavDown called");try{this.NudgeDown()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavDown error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeRight(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeRight called");try{this.Nudge(1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeRight error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeLeft(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeLeft called");try{this.Nudge(-1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeLeft error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeUp(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeUp called");try{this.Nudge(0,-1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeUp error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeDown(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeDown called");try{this.Nudge(0,1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeDown error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowRight(){LogUtil.Debug("= O.ArrowKeyOpt: GrowRight called");try{this.NudgeGrow(1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowRight error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowLeft(){LogUtil.Debug("= O.ArrowKeyOpt: GrowLeft called");try{this.NudgeGrow(-1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowLeft error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowDown(){LogUtil.Debug("= O.ArrowKeyOpt: GrowDown called");try{this.NudgeGrow(0,1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowDown error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowUp(){LogUtil.Debug("= O.ArrowKeyOpt: GrowUp called");try{this.NudgeGrow(0,-1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowUp error:",t),T3Gv.opt.ExceptionCleanup(t)}}Nudge(t,e){LogUtil.Debug(`= O.ArrowKeyOpt: Nudge input - xOffset: ${t}, yOffset: ${e}`);const i=T3Gv.opt.NudgeSelectedObjects(t,e,!1);return LogUtil.Debug("= O.ArrowKeyOpt: Nudge complete"),i}NudgeGrow(t,e){LogUtil.Debug(`= O.ArrowKeyOpt: NudgeGrow input - xAmount: ${t}, yAmount: ${e}`);const i=T3Gv.opt.NudgeSelectedObjects(t,e,!0);return LogUtil.Debug("= O.ArrowKeyOpt: NudgeGrow complete"),i}}class KeyboardOpt{constructor(){}static GetCommandsInContext(t,e,i,n,s){LogUtil.Debug("U.KeyboardUtil: Getting commands for context",t);let a=[];switch(t){case KeyboardConstant.Contexts.All:a.push((new KeyboardUtil).BuildCommand("Copy",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.C,i.Copy,i)),a.push((new KeyboardUtil).BuildCommand("Cut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.X,i.Cut,i)),a.push((new KeyboardUtil).BuildCommand("Paste",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.V,i.Paste,i)),a.push((new KeyboardUtil).BuildCommand("Undo",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Z,i.Undo,i)),a.push((new KeyboardUtil).BuildCommand("Redo",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.B,i.Redo,i)),a.push((new KeyboardUtil).BuildCommand("Reset",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.R,i.ClearAndRest,i)),a.push((new KeyboardUtil).BuildCommand("SelectAll",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.A,i.SelectAllObjects,i)),a.push((new KeyboardUtil).BuildCommand("Delete",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.None,KeyboardConstant.Keys.Delete,i.DeleteSelectedObjects,i)),a.push((new KeyboardUtil).BuildCommand("Cancel",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.None,KeyboardConstant.Keys.Escape,i.CancelOperation,i)),a.push((new KeyboardUtil).BuildCommand("Group",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.G,i.GroupSelected,i)),a.push((new KeyboardUtil).BuildCommand("Ungroup",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl_Shift,KeyboardConstant.Keys.G,i.UnGroupSelected,i)),a.push((new KeyboardUtil).BuildCommand("Duplicate",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.D,i.Duplicate,i)),a.push((new KeyboardUtil).BuildCommand("Save",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.S,i.Save,i)),a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Add,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Subtract,n.ZoomOut,n)),a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Equal_Sign,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Dash,n.ZoomOut,n)),a.push((new KeyboardUtil).BuildCommand("NavRight",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Right_Arrow,s.NavRight,s)),a.push((new KeyboardUtil).BuildCommand("NavLeft",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Left_Arrow,s.NavLeft,s)),a.push((new KeyboardUtil).BuildCommand("NavUp",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Up_Arrow,s.NavUp,s)),a.push((new KeyboardUtil).BuildCommand("NavDown",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Down_Arrow,s.NavDown,s));break;case KeyboardConstant.Contexts.ReadOnly:a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Add,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Subtract,n.ZoomOut,n)),a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Equal_Sign,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Dash,n.ZoomOut,n));break;case KeyboardConstant.Contexts.Automation:a.push((new KeyboardUtil).BuildCommand("NavRight",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Right_Arrow,s.NavRight,s)),a.push((new KeyboardUtil).BuildCommand("NavLeft",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Left_Arrow,s.NavLeft,s)),a.push((new KeyboardUtil).BuildCommand("NavUp",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Up_Arrow,s.NavUp,s)),a.push((new KeyboardUtil).BuildCommand("NavDown",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Down_Arrow,s.NavDown,s));break;case KeyboardConstant.Contexts.AutomationNoCtrl:case KeyboardConstant.Contexts.WallOpt:break;case KeyboardConstant.Contexts.Text:case KeyboardConstant.Contexts.DimensionText:a.push((new KeyboardUtil).BuildCommand("Copy",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.C,i.Copy,i)),a.push((new KeyboardUtil).BuildCommand("Cut",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.X,i.Cut,i)),a.push((new KeyboardUtil).BuildCommand("Paste",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.V,i.Paste,i)),a.push((new KeyboardUtil).BuildCommand("Undo",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Z,i.Undo,i)),a.push((new KeyboardUtil).BuildCommand("Redo",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.B,i.Redo,i))}return LogUtil.Debug("U.KeyboardUtil: Retrieved",null==a?void 0:a.length,"commands for context",t),a}static OnKeyUp(t){LogUtil.Debug("U.KeyboardUtil: Processing key up event",t.keyCode),t.keyCode===KeyboardConstant.Keys.Space&&(LogUtil.Debug("U.KeyboardUtil: Space key released, updating spacebar state"),T3Constant.DocContext.SpacebarDown=!1)}static OnKeyDown(t){LogUtil.Debug("U.KeyboardUtil: Processing key down event",t.keyCode);const e=t.keyCode,i=Utils3.GetModifierKeys(t);e===KeyboardConstant.Keys.Space&&(LogUtil.Debug("U.KeyboardUtil: Space key pressed, updating spacebar state"),T3Constant.DocContext.SpacebarDown=!0);const n=$$1(t.target||t.srcElement);8!==e||n.is('input,[contenteditable="true"],textarea')&&"radio"!==n.attr("type")&&"checkbox"!==n.attr("type")||(LogUtil.Debug("U.KeyboardUtil: Preventing default backspace behavior"),t.preventDefault());try{KeyboardOpt.HandleKeyDown(t,e,i)}catch(s){throw T3Util.Error("= o.KeyboardOpt: OnKeyDown/ Error in key down handler",s),T3Gv.opt.ExceptionCleanup(s),s}}static HandleKeyDown(t,e,i){LogUtil.Debug("U.KeyboardUtil: Processing key down event",{keyCode:e,modifierKey:i});let n=!1,s=[],a=0,o=0,r=new ToolUtil,l=new KeyboardUtil,h=T3Gv.docUtil,c=new ArrowKeyOpt;const u=(e==KeyboardConstant.Keys.Left_Arrow||e==KeyboardConstant.Keys.Right_Arrow||e==KeyboardConstant.Keys.Up_Arrow||e==KeyboardConstant.Keys.Down_Arrow)&&T3Gv.userSetting.DisableCtrlArrowShapeInsert;if(1!=i||67!=e&&99!=e&&88!=e&&120!=e&&86!=e&&118!=e){let d=r.GetSelectionContext();if("titleInput"===t.target.id&&(d=KeyboardConstant.Contexts.Text),d instanceof Array)for(a=d.length,o=0;o<a;o++)s.push(d[o]);else s.push(d);const p=null;s.indexOf(p)<0&&s.push(p),s.push(KeyboardConstant.Contexts.All),a=s.length,T3Gv.docUtil.IsReadOnly()&&(s=[KeyboardConstant.Contexts.ReadOnly],a=s.length);for(let g=0;g<a;g++){const a=s[g],d=KeyboardOpt.GetCommandsInContext(a,l,r,h,c),p=d.length;for(o=0;o<p;o++){const s=d[o];if(s.KeyCode===e&&s.ModifierKey===i){if(u&&n)break;if(!s.Execute())return LogUtil.Debug("U.KeyboardUtil: Command executed and prevented default",{command:s.Name}),t.stopPropagation(),void t.preventDefault()}}if(!1===T3Constant.DocContext.CanTypeInWorkArea)return;if(a===KeyboardConstant.Contexts.DimensionText&&(n=!0),a===KeyboardConstant.Contexts.Text&&(i===KeyboardConstant.ModifierKeys.None||i===KeyboardConstant.ModifierKeys.Shift||i===KeyboardConstant.ModifierKeys.Ctrl||i===KeyboardConstant.ModifierKeys.Ctrl_Shift))if(!1===r.IsActiveTextEdit()&&"titleInput"!=t.target.id){if(-1!=KeyboardConstant.NonTextKeys.indexOf(e))continue;i!=KeyboardConstant.ModifierKeys.Ctrl&&(n=!0)}else n=!0;if(n&&i!=KeyboardConstant.ModifierKeys.Ctrl)break}n&&(e===KeyboardConstant.Keys.Escape?(T3Gv.opt.DeactivateAllTextEdit(!1),T3Gv.opt.bInNoteEdit,SvgUtil.RenderAllSVGSelectionStates(),t.stopPropagation(),t.preventDefault(),LogUtil.Debug("U.KeyboardUtil: Text edit closed with Escape key")):r.HandleKeyDown(t,e,i)&&(t.stopPropagation(),t.preventDefault(),LogUtil.Debug("U.KeyboardUtil: Key event handled by shapes controller")))}else T3Clipboard.isFirefox&&(T3Clipboard.FocusOnIEclipboardDiv(),LogUtil.Debug("U.KeyboardUtil: Focusing on IE clipboard div for Firefox"));LogUtil.Debug("U.KeyboardUtil: Key down handling complete")}static OnKeyPress(t){LogUtil.Debug("U.KeyboardUtil: Processing key press event",t.charCode);const e=t.charCode;try{LogUtil.Debug("U.KeyboardUtil: Delegating key press handling to MainController",{charCode:e}),KeyboardOpt.HandleKeyPress(t,e)}catch(i){throw T3Util.Error("= o.KeyboardOpt: OnKeyPress/ Error in key press handler",i),i}}static HandleKeyPress(t,e){LogUtil.Debug("U.KeyboardUtil: Handling key press event",{charCode:e});let i=!1,n=new ToolUtil;if(1!=Utils3.GetModifierKeys(t)||67!=e&&99!=e&&88!=e&&120!=e&&86!=e&&118!=e){if(!1!==T3Constant.DocContext.CanTypeInWorkArea&&!T3Gv.docUtil.IsReadOnly()){const s=n.GetSelectionContext();s instanceof Array&&(i=s.indexOf(KeyboardConstant.Contexts.Text)>=0),(i||s===KeyboardConstant.Contexts.Text||s===KeyboardConstant.Contexts.DimensionText)&&(LogUtil.Debug("U.KeyboardUtil: Delegating key press to shape handler in text context"),n.HandleKeyPress(t,e)&&t.stopPropagation())}}else T3Clipboard.isFirefox&&(LogUtil.Debug("U.KeyboardUtil: Focusing on IE clipboard div for Firefox"),T3Clipboard.FocusOnIEclipboardDiv());LogUtil.Debug("U.KeyboardUtil: Key press handling complete")}}class UserSetting{constructor(){__publicField(this,"UserID"),__publicField(this,"DateChanged"),__publicField(this,"ShowGrid"),__publicField(this,"RecentColors"),__publicField(this,"PaperSize"),__publicField(this,"Metric"),__publicField(this,"DisableCtrlArrowShapeInsert"),__publicField(this,"CursorDisplayMode"),this.UserID=-1,this.DateChanged=null,this.ShowGrid=!1,this.RecentColors=[],this.PaperSize=0,this.Metric=!1,this.DisableCtrlArrowShapeInsert=!1,this.CursorDisplayMode=T3Constant.CursorDisplayMode.Show}}class UserOpt{constructor(){__publicField(this,"userSetting"),this.userSetting=new UserSetting}Initialize(){T3Gv.userSetting=this.userSetting}}const Basic$1={Container:Container,Effect:Effects,Style:Style,Element:Element$1,Group:Group,Image:Image$1,Layer:Layer,Line:Line,Oval:Oval,Creator:Creator,Path:Path,Polygon:Polygon,PolyLine:PolyLine,PolyPolyLine:PolyPolyLine,Rect:Rect,RRect:RRect,ShapeContainer:ShapeContainer$1,ShapeCopy:ShapeCopy,Symbol:Symbol$1,Edit:Edit};class ArcLine extends BaseLine{constructor(t={}){LogUtil.Debug("= S.ArcLine constructor input:",t),t.LineType=OptConstant.LineType.ARCLINE,super(t),__publicField(this,"CurveAdjust"),__publicField(this,"IsReversed"),__publicField(this,"FromPolygon"),__publicField(this,"FixedPoint"),__publicField(this,"LineOrientation"),__publicField(this,"hoplist"),__publicField(this,"ArrowheadData"),__publicField(this,"StartArrowID"),__publicField(this,"EndArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),__publicField(this,"TextDirection"),__publicField(this,"OriginalCurveAdjust"),__publicField(this,"OriginalIsReversed"),__publicField(this,"OriginalLineSide"),__publicField(this,"OriginalCenterPointDistance"),this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.CurveAdjust=t.CurveAdjust,this.IsReversed=t.IsReversed||!1,this.FromPolygon=t.FromPolygon||!1,this.CalcFrame(),this.FixedPoint=t.FixedPoint||[0,0],this.LineOrientation=t.LineOrientation||OptConstant.LineOrientation.None,this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.TextDirection=t.TextDirection||!1,LogUtil.Debug("= S.ArcLine constructor output:",this)}CalcRadiusAndCenter(t,e,i,n,s,a){LogUtil.Debug("= S.ArcLine CalcRadiusAndCenter input:",{startX:t,startY:e,endX:i,endY:n,curveAdjust:s,isReversed:a});const o={centerX:0,centerY:0,actionX:0,actionY:0,radius:0,valid:!1,centerInside:!1},r=t+(i-t)/2,l=e+(n-e)/2,h=i-t,c=n-e;let u=Math.sqrt(h*h+c*c);if(0===u)return LogUtil.Debug("= S.ArcLine CalcRadiusAndCenter output:",o),o.valid=!1,o;const d=-c/u,p=h/u,g=u/2,f=s;let b,v,m,y,S,w,x,C,D=Math.abs((g*g+f*f)/(2*f));if(D<f)o.centerInside=!0,b=Utils2.Sqrt(D*D-g*g),a?(y=r+b*d,S=l+b*p,w=y+D*d,x=S+D*p):(y=r-b*d,S=l-b*p,w=y-D*d,x=S-D*p);else{let t=D;t=a?t+f:t-f,v=d*t,m=p*t,y=r+v,S=l+m,w=y-D*d,x=S-D*p,a&&(C=D-f,y=r+d*C,S=l+p*C)}return o.radius=D,o.centerX=y,o.centerY=S,o.actionX=w,o.actionY=x,o.valid=!0,LogUtil.Debug("= S.ArcLine CalcRadiusAndCenter output:",o),o}GetLineChangeFrame(){LogUtil.Debug("= S.ArcLine GetLineChangeFrame input:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint});let t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);return t.width<OptConstant.Common.SegDefLen&&(t.width=OptConstant.Common.SegDefLen),t.height<OptConstant.Common.SegDefLen&&(t.height=OptConstant.Common.SegDefLen),LogUtil.Debug("= S.ArcLine GetLineChangeFrame output:",t),t}CreateArcShapeForHops(t,e){if(LogUtil.Debug("= S.ArcLine CreateArcShapeForHops input:",{svgDoc:t,isTouch:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("= S.ArcLine CreateArcShapeForHops output:",null),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.Polyline);n.SetID(OptConstant.SVGElementClass.Shape);const s=t.CreateShape(OptConstant.CSType.Polyline);s.SetID(OptConstant.SVGElementClass.Slop),s.ExcludeFromExport(!0),this.CalcFrame();const a=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),o=this.StyleRecord,r=this.SVGTokenizerHook(o),l=r.Line.Paint.Color,h=r.Line.Thickness,c=r.Line.Paint.Opacity,u=r.Line.LinePattern;i.SetSize(a.width,a.height),i.SetPos(a.x,a.y);let d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0);const p=T3Gv.opt.InsertHops(this,d,d.length);return d=d.slice(0,p.npts),n.SetPoints(d),n.SetFillColor("none"),n.SetStrokeColor(l),n.SetStrokeOpacity(c),n.SetStrokeWidth(h),0!==u&&n.SetStrokePattern(u),s.SetPoints(d),s.SetStrokeColor("white"),s.SetFillColor("none"),s.SetOpacity(0),e?s.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):s.SetEventBehavior(OptConstant.EventBehavior.None),s.SetStrokeWidth(h+OptConstant.Common.Slop),i.AddElement(n),i.AddElement(s),this.ApplyStyles(n,r),this.ApplyEffects(i,!1,!0),i.isShape=!0,this.AddIcons(t,i),LogUtil.Debug("= S.ArcLine CreateArcShapeForHops output:",i),i}CreateShape(t,e){if(LogUtil.Debug("= S.ArcLine CreateShape input:",{svgDoc:t,isTouch:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("= S.ArcLine CreateShape output:",null),null;if(0===this.hoplist.nhops){const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.Path);n.SetID(OptConstant.SVGElementClass.Shape);const s=t.CreateShape(OptConstant.CSType.Path);s.SetID(OptConstant.SVGElementClass.Slop),s.ExcludeFromExport(!0),this.CalcFrame();const a=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),o=this.StyleRecord,r=this.SVGTokenizerHook(o),l=r.Line.Paint.Color,h=r.Line.Paint.Opacity;let c=r.Line.Thickness;c>0&&c<1&&(c=1);const u=r.Line.LinePattern,d=a.width,p=a.height;return i.SetSize(d,p),i.SetPos(a.x,a.y),n.SetFillColor("none"),n.SetStrokeColor(l),n.SetStrokeOpacity(h),n.SetStrokeWidth(c),0!==u&&n.SetStrokePattern(u),s.SetStrokeColor("white"),s.SetFillColor("none"),s.SetOpacity(0),e?s.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):s.SetEventBehavior(OptConstant.EventBehavior.None),s.SetStrokeWidth(c+OptConstant.Common.Slop),i.AddElement(n),i.AddElement(s),this.ApplyStyles(n,r),this.ApplyEffects(i,!1,!0),i.isShape=!0,this.AddIcons(t,i),LogUtil.Debug("= S.ArcLine CreateShape output:",i),i}const i=this.CreateArcShapeForHops(t,e);return LogUtil.Debug("= S.ArcLine CreateShape output:",i),i}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.ArcLine PostCreateShapeCallback input:",{svgDoc:t,svgContainer:e,callbackData:i,event:n}),0===this.hoplist.nhops?this.RegenerateGenerateArc(e):this.RegenerateGenerateArcForHops(e),this.DataID>=0&&this.LMAddSVGTextObject(t,e),this.UpdateDimensionLines(e),LogUtil.Debug("= S.ArcLine PostCreateShapeCallback output:","Callback completed")}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.ArcLine CreateActionTriggers input:",{svgDoc:t,targetId:e,triggerType:i,compareId:n});let s=t.CreateShape(OptConstant.CSType.Group),a=OptConstant.Common.KnobSize,o=OptConstant.Common.RKnobSize,r=!0,l=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(l*=2);let h=a/l,c=o/l;this.objecttype===NvConstant.FNObjectTypes.FlWall&&(h*=2);let u=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),d=u.width+h,p=u.height+h,g=ObjectUtil$1.GetObjectPtr(e,!1),f=Utils1.DeepCopy(u);f.x-=h/2,f.y-=h/2,f.width+=h,f.height+=h;let b={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:h,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1,x:0,y:0,knobID:OptConstant.ActionTriggerType.LineStart};if(e!==n&&(b.fillColor="white",b.strokeSize=1,b.strokeColor="black",b.fillOpacity=0),b.x=this.StartPoint.x-u.x,b.y=this.StartPoint.y-u.y,b.knobID=OptConstant.ActionTriggerType.LineStart,g&&g.hooks)for(let C=0;C<g.hooks.length;C++)if(g.hooks[C].hookpt===OptConstant.HookPts.KTL){b.shapeType=OptConstant.CSType.Oval,r=!1;break}this.objecttype===NvConstant.FNObjectTypes.FlWall&&(b.shapeType=OptConstant.CSType.Image);let v=this.GenericKnob(b);if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&v.SetURL&&(v.SetURL(b.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),v.ExcludeFromExport(!0)),s.AddElement(v),b.shapeType=OptConstant.CSType.Rect,b.x=this.EndPoint.x-u.x,b.y=this.EndPoint.y-u.y,b.knobID=OptConstant.ActionTriggerType.LineEnd,g&&g.hooks)for(let C=0;C<g.hooks.length;C++)if(g.hooks[C].hookpt===OptConstant.HookPts.KTR){b.shapeType=OptConstant.CSType.Oval,r=!1;break}this.objecttype===NvConstant.FNObjectTypes.FlWall&&(b.shapeType=OptConstant.CSType.Image),v=this.GenericKnob(b),this.objecttype===NvConstant.FNObjectTypes.FlWall&&v.SetURL&&(v.SetURL(b.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),v.ExcludeFromExport(!0)),s.AddElement(v),b.shapeType=OptConstant.CSType.Rect,b.cursorType=this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!0),this.NoGrow()&&(b.cursorType=CursorConstant.CursorType.Default);let m=this.StartPoint.x,y=this.StartPoint.y,S=this.EndPoint.x,w=this.EndPoint.y,x=this.CalcRadiusAndCenter(m,y,S,w,this.CurveAdjust,this.IsReversed);if(b.x=x.actionX-u.x,b.y=x.actionY-u.y,b.knobID=OptConstant.ActionTriggerType.ModifyShape,v=this.GenericKnob(b),s.AddElement(v),r&&!b.locked&&!this.NoGrow()){b.shapeType=OptConstant.CSType.Oval;let t=Math.atan((this.EndPoint.y-this.StartPoint.y)/(this.EndPoint.x-this.StartPoint.x));t<0&&(t=-t),this.EndPoint.x>=this.StartPoint.x?(b.x=this.EndPoint.x-2*c*Math.cos(t)-u.x,b.y=this.EndPoint.y-2*c*Math.sin(t)-u.y):(b.x=this.StartPoint.x-2*c*Math.cos(t)-u.x,b.y=this.StartPoint.y-2*c*Math.sin(t)-u.y),b.cursorType=CursorConstant.CursorType.Rotate,b.knobID=OptConstant.ActionTriggerType.Rotate,b.fillColor="white",b.fillOpacity=.001,b.strokeSize=1.5,b.strokeColor="black",b.knobSize=c,v=this.GenericKnob(b),s.AddElement(v),b.knobSize=h}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(s,t,b)}return s.SetSize(d,p),s.SetPos(f.x,f.y),s.isShape=!0,s.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.ArcLine CreateActionTriggers output:",s),s}GetTextOnLineParams(t){LogUtil.Debug("= S.ArcLine GetTextOnLineParams input:",{param:t});let e={Frame:new Instance.Shape.Rect,StartPoint:new Point$1(0,0),EndPoint:new Point$1(0,0)};switch(e.StartPoint.x=this.StartPoint.x,e.StartPoint.y=this.StartPoint.y,e.EndPoint.x=this.EndPoint.x,e.EndPoint.y=this.EndPoint.y,e.Frame=Utils2.Pt2Rect(e.StartPoint,e.EndPoint),this.TextAlign){case TextConstant.TextAlign.TopCenter:case TextConstant.TextAlign.Center:case TextConstant.TextAlign.BottomCenter:{const t=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(e.StartPoint,e.EndPoint),i=[];i.push(new Point$1(e.StartPoint.x,e.StartPoint.y)),i.push(new Point$1(e.EndPoint.x,e.EndPoint.y)),Utils3.RotatePointsAboutCenter(e.Frame,t,i);const n=this.CalcRadiusAndCenter(i[0].x,i[0].y,i[1].x,i[1].y,this.CurveAdjust,this.IsReversed);i[0].y=n.actionY,i[1].y=n.actionY,Utils3.RotatePointsAboutCenter(e.Frame,-t,i),e.StartPoint.x=i[0].x,e.StartPoint.y=i[0].y,e.EndPoint.x=i[1].x,e.EndPoint.y=i[1].y;break}}return LogUtil.Debug("= S.ArcLine GetTextOnLineParams output:",e),e}RegenerateGenerateArc(t){LogUtil.Debug("= S.ArcLine RegenerateGenerateArc input:",{svgDoc:t});let e=T3Gv.arrowHlkTable[this.StartArrowID],i=T3Gv.arrowHlkTable[this.EndArrowID],n=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===e.id&&(e=null),0===i.id&&(i=null);const s=t.GetElementById(OptConstant.SVGElementClass.Shape),a=t.GetElementById(OptConstant.SVGElementClass.Slop);if(null!==s&&void 0!==s.PathCreator){const o=s.PathCreator();o.BeginPath();const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.StartPoint.x-r.x,h=this.StartPoint.y-r.y,c=this.EndPoint.x-r.x,u=this.EndPoint.y-r.y,d=this.CalcRadiusAndCenter(l,h,c,u,this.CurveAdjust,this.IsReversed);d.centerInside?(o.MoveTo(c,u),o.ArcTo(l,h,d.radius,d.radius,0,this.IsReversed,!0,!1)):(o.MoveTo(l,h),o.ArcTo(c,u,d.radius,d.radius,0,!this.IsReversed,!1,!1));const p=o.ToString();s.SetPath(p),a.SetPath(p),t.SetSize(r.width,r.height),t.SetPos(r.x,r.y),(e||i)&&(d.centerInside?(s.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp),a.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp)):(s.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp)))}LogUtil.Debug("= S.ArcLine RegenerateGenerateArc output:",{pathData:s&&s.PathCreator?s.PathCreator().ToString():null})}RegenerateGenerateArcForHops(t){LogUtil.Debug("= S.ArcLine RegenerateGenerateArcForHops input:",{svgDoc:t});let e=T3Gv.arrowHlkTable[this.StartArrowID],i=T3Gv.arrowHlkTable[this.EndArrowID],n=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===e.id&&(e=null),0===i.id&&(i=null);const s=t.GetElementById(OptConstant.SVGElementClass.Shape),a=t.GetElementById(OptConstant.SVGElementClass.Slop);let o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0);const r=T3Gv.opt.InsertHops(this,o,o.length);o=o.slice(0,r.npts);const l=o.length;s.SetPoints(o);const h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),c=this.StartPoint.x-h.x,u=this.StartPoint.y-h.y;if(t.SetSize(h.width,h.height),t.SetPos(h.x,h.y),e||i){const t=(c-o[0].x)*(c-o[0].x)+(u-o[0].y)*(u-o[0].y);let r=!1;(c-o[l-1].x)*(c-o[l-1].x)+(u-o[l-1].y)*(u-o[l-1].y)<t&&(r=!0),r?(s.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp),a.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp)):(s.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp))}LogUtil.Debug("= S.ArcLine RegenerateGenerateArcForHops output:",{polyPoints:o,rect:h})}AdjustLineStart(t,e,i){LogUtil.Debug("= S.ArcLine AdjustLineStart input:",{svgDoc:t,newStartX:e,newStartY:i});const n={x:this.StartPoint.x,y:this.StartPoint.y};this.StartPoint.x=e,this.StartPoint.y=i,this.EnforceMinimum(!0),this.CalcFrame(),(this.r.x<0||this.r.y<0)&&(this.StartPoint.x=n.x,this.StartPoint.y=n.y,this.CalcFrame()),this.RegenerateGenerateArc(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),new SelectionAttr;const s=this.EndPoint.x-this.StartPoint.x,a=this.EndPoint.y-this.StartPoint.y;Utils2.Sqrt(s*s+a*a),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(this.Frame,this.StartPoint,CursorConstant.CursorTypes.Grow),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("= S.ArcLine AdjustLineStart output:",{updatedStartPoint:this.StartPoint,updatedFrame:this.Frame})}AdjustLineEnd(t,e,i,n){LogUtil.Debug("= S.ArcLine AdjustLineEnd input:",{svgDoc:t,newEndX:e,newEndY:i,trigger:n});const s={x:this.EndPoint.x,y:this.EndPoint.y};if(this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1),this.CalcFrame(),(this.r.x<0||this.r.y<0)&&(this.EndPoint.x=s.x,this.EndPoint.y=s.y,this.CalcFrame()),t){this.RegenerateGenerateArc(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),new SelectionAttr;const e=this.EndPoint.x-this.StartPoint.x,i=this.EndPoint.y-this.StartPoint.y;Utils2.Sqrt(e*e+i*i),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(this.Frame,this.EndPoint,CursorConstant.CursorTypes.Grow,this),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)}LogUtil.Debug("= S.ArcLine AdjustLineEnd output:",{updatedEndPoint:this.EndPoint,frame:this.Frame})}Flip(t){LogUtil.Debug("= S.ArcLine Flip input:",{flipFlag:t});let e=!1;const i={};if(T3Gv.opt.ob=Utils1.DeepCopy(this),t&OptConstant.ExtraFlags.FlipVert&&(i.y=this.StartPoint.y,this.StartPoint.y=this.EndPoint.y,this.EndPoint.y=i.y,e=!0,LogUtil.Debug("= S.ArcLine Flip: Performed vertical flip.")),t&OptConstant.ExtraFlags.FlipHoriz&&(i.x=this.StartPoint.x,this.StartPoint.x=this.EndPoint.x,this.EndPoint.x=i.x,e=!0,LogUtil.Debug("= S.ArcLine Flip: Performed horizontal flip.")),e){this.IsReversed=!this.IsReversed,LogUtil.Debug("= S.ArcLine Flip: Toggled IsReversed to",this.IsReversed);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&(this.UpdateDimensionLines(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)),T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}T3Gv.opt.ob={},LogUtil.Debug("= S.ArcLine Flip output:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,IsReversed:this.IsReversed})}ModifyShape(t,e,i,n,s){LogUtil.Debug("= S.ArcLine ModifyShape input:",{svgDoc:t,x:e,y:i,trigger:n,additional:s});let a=this.FindSide(this.StartPoint.x,this.StartPoint.y,this.EndPoint.x,this.EndPoint.y,e,i);-1===n&&(a=this.OriginalLineSide),a!==this.OriginalLineSide&&(0!==this.OriginalLineSide&&(this.IsReversed=!this.IsReversed),this.OriginalLineSide=a);const o=this.StartPoint.x+(this.EndPoint.x-this.StartPoint.x)/2-e,r=this.StartPoint.y+(this.EndPoint.y-this.StartPoint.y)/2-i,l=Math.sqrt(o*o+r*r),h=l-this.OriginalCenterPointDistance,c=this.CurveAdjust,u=this.OriginalCurveAdjust;l<this.OriginalCenterPointDistance?this.CurveAdjust=u-h:this.CurveAdjust=u+h,this.CurveAdjust<1?this.CurveAdjust=1:this.CurveAdjust>500&&(this.CurveAdjust=500),this.CalcFrame(),-1!==n&&(this.r.x<0||this.r.y<0)&&(this.CurveAdjust=c,this.CalcFrame()),(this.Dimensions&NvConstant.DimensionFlags.Select||this.Dimensions&NvConstant.DimensionFlags.Always)&&ObjectUtil$1.AddToDirtyList(this.BlockID),t&&(this.RegenerateGenerateArc(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)),LogUtil.Debug("= S.ArcLine ModifyShape output:",{CurveAdjust:this.CurveAdjust,Frame:this.Frame})}FindSide(t,e,i,n,s,a){LogUtil.Debug("= S.ArcLine FindSide input:",{startX:t,startY:e,endX:i,endY:n,testX:s,testY:a});let o=0;if(t===i)return o=s<t?n>e?1:-1:s>t?n>e?-1:1:0,LogUtil.Debug("= S.ArcLine FindSide output:",o),o;if(e===n)return o=a<e?i>t?1:-1:a>e?i>t?-1:1:0,LogUtil.Debug("= S.ArcLine FindSide output:",o),o;const r=(n-e)/(i-t)*(s-t)+e;return o=a>r?i>t?1:-1:a<r?i>t?-1:1:0,LogUtil.Debug("= S.ArcLine FindSide output:",o),o}BeforeModifyShape(t,e,i){LogUtil.Debug("= S.ArcLine BeforeModifyShape input:",{mouseX:t,mouseY:e,extra:i}),this.OriginalCurveAdjust=this.CurveAdjust;const n=this.StartPoint.x+(this.EndPoint.x-this.StartPoint.x)/2-t,s=this.StartPoint.y+(this.EndPoint.y-this.StartPoint.y)/2-e,a=Math.sqrt(n*n+s*s);this.OriginalCenterPointDistance=a,this.OriginalLineSide=this.CurveAdjust<=1?0:this.FindSide(this.StartPoint.x,this.StartPoint.y,this.EndPoint.x,this.EndPoint.y,t,e),LogUtil.Debug("= S.ArcLine BeforeModifyShape output:",{OriginalCurveAdjust:this.OriginalCurveAdjust,OriginalCenterPointDistance:this.OriginalCenterPointDistance,OriginalLineSide:this.OriginalLineSide})}StartNewObjectDrawTrackCommon(t,e,i){LogUtil.Debug("= S.ArcLine StartNewObjectDrawTrackCommon input:",{drawX:t,drawY:e,extra:i});const n=T3Gv.opt.actionStartX,s=t-n,a=e-T3Gv.opt.actionStartY,o=Math.sqrt(s*s+a*a);$$1.extend(!0,{},T3Gv.opt.actionBBox);let r=o/10;r<1?r=1:r>500&&(r=500),this.CurveAdjust=r,this.IsReversed=!(t>=n),this.AdjustLineEnd(T3Gv.opt.actionSvgObject,t,e,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("= S.ArcLine StartNewObjectDrawTrackCommon output:",{CurveAdjust:this.CurveAdjust,IsReversed:this.IsReversed})}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.ArcLine GetPolyPoints input:",{numPoints:t,skipOffset:e,useSuper:i,extraParam1:n,extraParam2:s});let a=[],o={x:0,y:0};if(i)return a=super.GetPolyPoints(t,e,i,n,s),LogUtil.Debug("= S.ArcLine GetPolyPoints output (using super):",a),a;const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.StartPoint.x-r.x,h=this.StartPoint.y-r.y,c=this.EndPoint.x-r.x,u=this.EndPoint.y-r.y,d=c-l,p=u-h,g=Math.sqrt(d*d+p*p);let f=g>0?d/g:0;Math.abs(f)<1e-4&&(f=0);let b=Math.abs(p)<1e-4?0:p,v=Math.asin(f);(b>0||0===b)&&(v=-v);const m=this.CalcRadiusAndCenter(l,h,c,u,this.CurveAdjust,this.IsReversed);o.x=m.centerX,o.y=m.centerY;const y=[];let S,w;if(y.push(new Point$1(l,h)),y.push(new Point$1(c,u)),Utils3.RotatePointsAboutPoint(o,v,y),y[0].y>y[1].y&&!this.FromPolygon?(S=y[1].y,w=y[0].y):(S=y[0].y,w=y[1].y),a=PolyUtil.ArcToPoly(t-1,o,m.radius,S,w,y[0].x,this.IsReversed,m.centerInside),a.push(new Point$1(a[0].x,w)),Utils3.RotatePointsAboutPoint(o,-v,a),!e)for(let x=0;x<a.length;x++)a[x].x+=r.x,a[x].y+=r.y;return LogUtil.Debug("= S.ArcLine GetPolyPoints output:",a),a}GetConnectLine(){LogUtil.Debug("= S.ArcLine GetConnectLine input:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,CurveAdjust:this.CurveAdjust,IsReversed:this.IsReversed});const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),e=this.StartPoint.x-t.x,i=this.StartPoint.y-t.y,n=this.EndPoint.x-t.x,s=this.EndPoint.y-t.y,a={frame:{},length:0,startpt:{x:0,y:0},endpt:{x:0,y:0},center:{}},o=this.CalcRadiusAndCenter(e,i,n,s,this.CurveAdjust,this.IsReversed);if(o.centerInside){const r=n-e,l=s-i;let h=Math.sqrt(r*r+l*l),c=h>0?r/h:0;Math.abs(c)<1e-4&&(c=0);let u=Math.abs(l)<1e-4?0:l,d=Math.asin(c);u>=0&&(d=-d);const p={x:o.centerX,y:o.centerY},g=[];let f,b;g.push(new Point$1(e,i)),g.push(new Point$1(n,s)),Utils3.RotatePointsAboutPoint(p,d,g),g[0].y>g[1].y?(f=g[0].y-g[1].y,b=o.radius-f/2,g[0].y+=b,g[1].y-=b):(f=g[1].y-g[0].y,b=o.radius-f/2,g[1].y+=b,g[0].y-=b),Utils3.RotatePointsAboutPoint(p,-d,g),g[0].x+=t.x,g[0].y+=t.y,g[1].x+=t.x,g[1].y+=t.y;const v=Utils2.Pt2Rect(g[0],g[1]),m=g[0].x-g[1].x,y=g[0].y-g[1].y,S=Math.sqrt(m*m+y*y);return a.frame=v,a.length=S,a.startpt={x:g[0].x,y:g[0].y},a.endpt={x:g[1].x,y:g[1].y},a.center={x:p.x+t.x,y:p.y+t.y},LogUtil.Debug("= S.ArcLine GetConnectLine intermediate values:",{rotatedPoints:g,computedFrame:v,computedLength:S,resultCenter:a.center}),LogUtil.Debug("= S.ArcLine GetConnectLine output:",a),a}return LogUtil.Debug("= S.ArcLine GetConnectLine output:",null),null}GetTargetPoints(t,e,i){LogUtil.Debug("= S.ArcLine GetTargetPoints input:",{hookElement:t,hookFlags:e,targetId:i});const n=[{x:0,y:0}];let s,a={x:0,y:0},o={x:0,y:0};const r=OptConstant.HookPts;if(null!=i&&i>=0&&ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case r.KTC:case r.KBC:case r.KRC:case r.KLC:const n=super.GetTargetPoints(t,e,i);return LogUtil.Debug("= S.ArcLine GetTargetPoints output:",n),n}const l=this.GetConnectLine();l?(a=l.startpt,o=l.endpt):(a=this.StartPoint,o=this.EndPoint);let h=this.EndPoint.x-this.StartPoint.x;Math.abs(h)<1&&(h=1);const c=(this.EndPoint.y-this.StartPoint.y)/h;let u,d;Math.abs(c)>1||e&NvConstant.HookFlags.LcHOnly?(s=T3Gv.opt.ArcToChord(a,o,t,l,this),d=s.y-a.y,u=s.x-a.x):(s=T3Gv.opt.ArcToChord(a,o,t,l,this),u=s.x-a.x,d=s.y-a.y);const p=o.y-a.y,g=o.x-a.x;if(n[0].y=Math.abs(p)>1?d/p*OptConstant.Common.DimMax:OptConstant.Common.DimMax,n[0].x=Math.abs(g)>1?u/g*OptConstant.Common.DimMax:OptConstant.Common.DimMax,n[0].x>OptConstant.Common.DimMax&&(n[0].x=OptConstant.Common.DimMax),n[0].y>OptConstant.Common.DimMax&&(n[0].y=OptConstant.Common.DimMax),n[0].x<0&&(n[0].x=0),n[0].y<0&&(n[0].y=0),l){const t=2*Math.round(s.x/2)!==s.x;n[0].x=2*Math.round((n[0].x+.5)/2),t&&n[0].x--}return LogUtil.Debug("= S.ArcLine GetTargetPoints output:",n),n}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.ArcLine GetPerimPts input:",{event:t,hooks:e,param3:i,param4:n,param5:s,targetId:a});let o=[];const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.StartPoint.x-r.x,h=this.StartPoint.y-r.y,c=this.EndPoint.x-r.x,u=this.EndPoint.y-r.y;if(e&&2===e.length&&e[0].id&&e[0].id===OptConstant.HookPts.KTL&&e[1].id&&e[1].id===OptConstant.HookPts.KTR){let t=new Point$1(this.StartPoint.x,this.StartPoint.y);t.id=e[0].id;let i=new Point$1(this.EndPoint.x,this.EndPoint.y);return i.id=e[1].id,o.push(t,i),LogUtil.Debug("= S.ArcLine GetPerimPts output (direct start/end):",o),o}const d=ObjectUtil$1.GetObjectPtr(a,!1);if(d&&d.objecttype===NvConstant.FNObjectTypes.Multiplicity)return o=super.GetPerimPts(t,e,i,n,s,a),LogUtil.Debug("= S.ArcLine GetPerimPts output (Multiplicity):",o),o;if(d&&d.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===e.length)return o=super.GetPerimPts(t,e,i,n,s,a),LogUtil.Debug("= S.ArcLine GetPerimPts output (ExtraTextLabel):",o),o;const p=this.CalcRadiusAndCenter(l,h,c,u,this.CurveAdjust,this.IsReversed),g={x:p.centerX+r.x,y:p.centerY+r.y};let f=this.IsReversed;const b=super.GetPerimPts(t,e,i,n,s,a);let v,m,y=!1;const S=this.GetConnectLine();S?(v=S.startpt,m=S.endpt,y=2*Math.round(e[0].x/2)!==e[0].x,f=!1):(v=this.StartPoint,m=this.EndPoint);for(let w=0;w<b.length;w++)o[w]=PolyUtil.ChordToArc(v,m,g,p.radius,f,y,p.centerInside,b[w]),null!=b[w].id&&(o[w].id=b[w].id);return LogUtil.Debug("= S.ArcLine GetPerimPts output:",o),o}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.ArcLine MaintainPoint input:",{event:t,targetId:e,maintainDistParam:i,drawingObject:n,extraParam:s});let a=!1,o={},r={};switch(n.DrawingObjectBaseClass){case OptConstant.DrawObjectBaseClass.Line:switch(n.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:for(let t=0;t<n.hooks.length;t++)if(n.hooks[t].targetid===e){n.HookToPoint(n.hooks[t].hookpt,o),a=!0;break}return a?(r=Utils1.DeepCopy(n),Utils2.CopyRect(r.Frame,o),r.StartPoint.x=o.x,r.StartPoint.y=o.y,r.EndPoint.x=o.x+o.width,r.EndPoint.y=o.y+o.height,LogUtil.Debug("= S.ArcLine MaintainPoint output:",r),r):(LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0)}if(T3Gv.opt.ArcCheckPoint(this,t))return LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0;if(T3Gv.opt.ArcIntersect(this,n,t))return LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0;T3Gv.opt.LinesMaintainDist(this,i,s,t);break;case OptConstant.DrawObjectBaseClass.Shape:T3Gv.opt.LinesMaintainDist(this,i,s,t)}return LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0}}class SegLine{constructor(){__publicField(this,"firstdir"),__publicField(this,"lastdir"),__publicField(this,"curveparam"),__publicField(this,"pts"),__publicField(this,"lengths"),this.firstdir=0,this.lastdir=0,this.curveparam=0,this.pts=[],this.lengths=[]}}class SegmentedLine extends BaseLine{constructor(t){LogUtil.Debug("= S.SegmentedLine: constructor input",t);const e=t||{};e.LineType=e.LineType||OptConstant.LineType.SEGLINE,super(e),__publicField(this,"segl"),__publicField(this,"hoplist"),__publicField(this,"ArrowheadData"),__publicField(this,"StartArrowID"),__publicField(this,"EndArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),__publicField(this,"TextDirection"),this.segl=e.segl||new SegLine,null!=e.curveparam&&(this.segl.curveparam=e.curveparam),this.StartPoint=e.StartPoint||{x:0,y:0},this.EndPoint=e.EndPoint||{x:0,y:0},this.SegLFormat(this.EndPoint,OptConstant.ActionTriggerType.LineEnd,0),this.CalcFrame(),this.hoplist=e.hoplist||{nhops:0,hops:[]},this.ArrowheadData=e.ArrowheadData||[],this.StartArrowID=e.StartArrowID||0,this.EndArrowID=e.EndArrowID||0,this.StartArrowDisp=e.StartArrowDisp||!1,this.EndArrowDisp=e.EndArrowDisp||!1,this.ArrowSizeIndex=e.ArrowSizeIndex||0,this.TextDirection=e.TextDirection||!1,LogUtil.Debug("= S.SegmentedLine: constructor output",{segl:this.segl,StartPoint:this.StartPoint,EndPoint:this.EndPoint,hoplist:this.hoplist,ArrowheadData:this.ArrowheadData,StartArrowID:this.StartArrowID,EndArrowID:this.EndArrowID,StartArrowDisp:this.StartArrowDisp,EndArrowDisp:this.EndArrowDisp,ArrowSizeIndex:this.ArrowSizeIndex,TextDirection:this.TextDirection})}CreateShape(t,e){if(LogUtil.Debug("= S.SegmentedLine: CreateShape input",{svgDoc:t,isHidden:e}),this.flags&NvConstant.ObjFlags.NotVisible)return null;let i=[];const n=t.CreateShape(OptConstant.CSType.ShapeContainer),s=t.CreateShape(OptConstant.CSType.Polyline);s.SetID(OptConstant.SVGElementClass.Shape);const a=t.CreateShape(OptConstant.CSType.Polyline);a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),this.CalcFrame();const o=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let r=this.StyleRecord;r=this.SVGTokenizerHook(r);const l=r.Line.Paint.Color;let h=r.Line.Thickness;const c=r.Line.Paint.Opacity,u=r.Line.LinePattern;h>0&&h<1&&(h=1);let d=o.width,p=o.height;if(d<h&&(d=h),p<h&&(p=h),n.SetSize(d,p),n.SetPos(o.x,o.y),s.SetSize(d,p),i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),0!==this.hoplist.nhops){const t=T3Gv.opt.InsertHops(this,i,i.length);i=i.slice(0,t.npts)}return this.UpdateSVG(s,i),s.SetFillColor("none"),s.SetStrokeColor(l),s.SetStrokeOpacity(c),s.SetStrokeWidth(h),0!==u&&s.SetStrokePattern(u),a.SetSize(d,p),this.UpdateSVG(a,i),a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),e?a.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):a.SetEventBehavior(OptConstant.EventBehavior.None),a.SetStrokeWidth(h+OptConstant.Common.Slop),n.AddElement(s),n.AddElement(a),this.ApplyStyles(s,r),this.ApplyEffects(n,!1,!0),n.isShape=!0,this.AddIcons(t,n),LogUtil.Debug("= S.SegmentedLine: CreateShape output",{shape:n}),n}UpdateSVG(t,e){LogUtil.Debug("= S.SegmentedLine: UpdateSVG input",{shape:t,points:e}),t&&t.SetPoints&&t.SetPoints(e),LogUtil.Debug("= S.SegmentedLine: UpdateSVG output",{shape:t})}AllowHeal(){LogUtil.Debug("= S.SegmentedLine: AllowHeal input");return LogUtil.Debug("= S.SegmentedLine: AllowHeal output",true),true}CanUseStandOffDimensionLines(){LogUtil.Debug("= S.SegmentedLine: CanUseStandOffDimensionLines input");return LogUtil.Debug("= S.SegmentedLine: CanUseStandOffDimensionLines output",false),false}SegLFormat(t,e,i){let n,s,a,o,r,l;LogUtil.Debug("= S.SegmentedLine: SegLFormat input",{targetPoint:t,actionType:e,initialDirection:i});let h=!1,c=!1,u=!1;const d=NvConstant.SegLDir,p=(t,e,i)=>{let n=0;const s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);switch(t){case d.Ktc:n=i.y<e.y?a>=s?d.Kbc:i.x<e.x?d.Krc:d.Klc:d.Ktc;break;case d.Kbc:n=i.y>=e.y?a>=s?d.Ktc:i.x<e.x?d.Krc:d.Klc:d.Kbc;break;case d.Klc:n=i.x<e.x?a<=s?d.Krc:i.y<e.y?d.Kbc:d.Ktc:d.Klc;break;case d.Krc:n=i.x>e.x?a<s?d.Klc:i.y<e.y?d.Kbc:d.Ktc:d.Krc;break;default:n=t}return n};if(null!=this.segl){switch(e){case OptConstant.ActionTriggerType.LineStart:this.StartPoint.x=t.x,this.StartPoint.y=t.y;break;case OptConstant.ActionTriggerType.SeglPreserve:case OptConstant.ActionTriggerType.LineEnd:this.EndPoint.x=t.x,this.EndPoint.y=t.y}if(0!==this.segl.firstdir||0!==this.segl.lastdir){if(0===this.segl.lastdir){switch(e){case OptConstant.ActionTriggerType.LineStart:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:i=p(this.segl.firstdir,t,this.EndPoint);break;case OptConstant.ActionTriggerType.SeglPreserve:i=p(this.segl.firstdir,this.StartPoint,this.EndPoint);break;default:i=p(this.segl.firstdir,this.StartPoint,t)}h=!0,this.segl.lastdir=i,u=!0}if(0===this.segl.firstdir){switch(e){case OptConstant.ActionTriggerType.LineEnd:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:i=p(this.segl.lastdir,t,this.StartPoint);break;case OptConstant.ActionTriggerType.SeglPreserve:i=p(this.segl.lastdir,this.EndPoint,this.StartPoint);break;default:i=p(this.segl.lastdir,this.EndPoint,t)}c=!0,this.segl.firstdir=i,u=!0}switch(this.segl.firstdir){case d.Ktc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToTop(e,t,1,!1,u);break;case d.Kbc:this.SegLTopToBottom(e,t,1,!1);break;case d.Klc:this.SegLTopToLeft(e,t,1,1,!1,u);break;case d.Krc:this.SegLTopToLeft(e,t,1,-1,!1,u)}break;case d.Kbc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToBottom(e,t,-1,!1);break;case d.Kbc:this.SegLTopToTop(e,t,-1,!1,u);break;case d.Klc:this.SegLTopToLeft(e,t,-1,1,!1,u);break;case d.Krc:this.SegLTopToLeft(e,t,-1,-1,!1,u)}break;case d.Klc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToLeft(e,t,1,1,!0,u);break;case d.Kbc:this.SegLTopToLeft(e,t,1,-1,!0,u);break;case d.Klc:this.SegLTopToTop(e,t,1,!0,u);break;case d.Krc:this.SegLTopToBottom(e,t,1,!0)}break;case d.Krc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToLeft(e,t,-1,1,!0,u);break;case d.Kbc:this.SegLTopToLeft(e,t,-1,-1,!0,u);break;case d.Klc:this.SegLTopToBottom(e,t,-1,!0);break;case d.Krc:this.SegLTopToTop(e,t,-1,!0,u)}}h&&(this.segl.lastdir=0),c&&(this.segl.firstdir=0)}else if(n=this.EndPoint.x-this.StartPoint.x,s=this.EndPoint.y-this.StartPoint.y,a=Math.abs(n),o=Math.abs(s),r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),o>=1||a>=1){if(0===i&&(i=a-o>.01?OptConstant.Common.HorizOnly:OptConstant.Common.VertOnly),this.segl.pts.splice(0),this.segl.lengths.splice(0),i===OptConstant.Common.HorizOnly)if(o<1)this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(n);else{const t=n/2;this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.StartPoint.x+t,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.StartPoint.x+t,this.EndPoint.y)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(t),this.segl.lengths.push(s),this.segl.lengths.push(t)}else if(i===OptConstant.Common.VertOnly)if(a<1)this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(s);else{const t=s/2;this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y+t)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.StartPoint.y+t)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(t),this.segl.lengths.push(n),this.segl.lengths.push(t)}l=this.segl.pts.length;for(let t=0;t<l;t++)this.segl.pts[t].x-=r.x,this.segl.pts[t].y-=r.y}LogUtil.Debug("= S.SegmentedLine: SegLFormat output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,segl:this.segl})}}GetDimensionPoints(){LogUtil.Debug("= S.SegmentedLine: GetDimensionPoints input",{Dimensions:this.Dimensions,Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});let t=[];if(this.Dimensions&NvConstant.DimensionFlags.AllSeg)t=this.segl.pts;else if(this.Dimensions&NvConstant.DimensionFlags.Total){let e=Utils1.DeepCopy(this.segl.pts);for(let t=0;t<e.length;t++)e[t].x+=this.Frame.x,e[t].y+=this.Frame.y;for(let t=1;t<e.length;t++){const i=Math.abs(e[t-1].x-e[t].x),n=Math.abs(e[t-1].y-e[t].y),s=Math.sqrt(i*i+n*n);LogUtil.Debug("= S.SegmentedLine: Segment distance",{index:t,segmentLength:s})}const i=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),n=(this.Frame.y-i.y)/2,s=(this.Frame.x-i.x)/2,a={x:this.Frame.width/2+s,y:this.Frame.height/2+n},o={x:a.x-10,y:a.y},r={x:a.x+10,y:a.y};t.push(new Point$1(o.x,o.y)),t.push(new Point$1(r.x,r.y))}else{const e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);t.push(new Point$1(this.StartPoint.x-e.x,this.StartPoint.y-e.y)),t.push(new Point$1(this.EndPoint.x-e.x,this.EndPoint.y-e.y))}return LogUtil.Debug("= S.SegmentedLine: GetDimensionPoints output",t),t}SegLTopToTop(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g;LogUtil.Debug("= S.SegmentedLine: SegLTopToTop input",{actionType:t,targetPoint:e,directionFactor:i,isVertical:n,forcePreserveFormat:s});let f=0,b=!1;const v=OptConstant.Common.DimMax;let m={x:0,y:0};if(n){o=Math.abs(this.EndPoint.y-this.StartPoint.y),a=Math.abs(this.EndPoint.x-this.StartPoint.x),r=this.StartPoint.y,l=this.StartPoint.x,h=this.EndPoint.y,c=this.EndPoint.x,u=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let t=u.x;u.x=u.y,u.y=t,PolyUtil.GetMaxDim(m),t=m.x,m.x=m.y,m.y=t}else o=Math.abs(this.EndPoint.x-this.StartPoint.x),a=Math.abs(this.EndPoint.y-this.StartPoint.y),r=this.StartPoint.x,l=this.StartPoint.y,h=this.EndPoint.x,c=this.EndPoint.y,u=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),PolyUtil.GetMaxDim(m);if(d=this.segl.pts.length,this.segl.pts.splice(0),this.hooks&&this.hooks.length>0){if(n?-1===i?this.StartPoint.x>this.EndPoint.x:this.StartPoint.x<this.EndPoint.x:-1===i?this.StartPoint.y>this.EndPoint.y:this.StartPoint.y<this.EndPoint.y){for(let t=0;t<this.hooks.length;t++)if(this.hooks[t].hookpt===OptConstant.HookPts.KTL){const e=ObjectUtil$1.GetObjectPtr(this.hooks[t].objid,!1);if(e){p=e.GetTargetRect(),g=n?this.StartPoint.y+p.height*((v-this.hooks[t].connect.y)/v)+OptConstant.Common.SegDefLen:this.StartPoint.x+p.width*((v-this.hooks[t].connect.x)/v)+OptConstant.Common.SegDefLen;break}}}else for(let t=0;t<this.hooks.length;t++)if(this.hooks[t].hookpt===OptConstant.HookPts.KTR){const e=ObjectUtil$1.GetObjectPtr(this.hooks[t].objid,!1);if(e){p=e.GetTargetRect(),g=n?this.EndPoint.y+p.height*((v-this.hooks[t].connect.y)/v)+OptConstant.Common.SegDefLen:this.EndPoint.x+p.width*((v-this.hooks[t].connect.x)/v)+OptConstant.Common.SegDefLen;break}}p&&(f=n?o<p.height/2+OptConstant.Common.SegMinLen?1:0:o<p.width/2+OptConstant.Common.SegMinLen?1:0)}if(a<OptConstant.Common.SegMinSeg&&(a=0),t===OptConstant.ActionTriggerType.SeglPreserve&&(b=4===d),s&&(b=!0),b||!(o>OptConstant.Common.SegMinLen||a<OptConstant.Common.SegMinLen)||f){6!==d&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(l-u.y,r-u.x)):this.segl.pts.push(new Point$1(r-u.x,l-u.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne&&(this.segl.lengths[0]=n?i*(l-e.x):i*(l-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen));let s=l-i*this.segl.lengths[0];if(s<0&&(s=0),s>m.y&&(s=m.y),n?this.segl.pts.push(new Point$1(s-u.y,r-u.x)):this.segl.pts.push(new Point$1(r-u.x,s-u.y)),this.segl.lengths.length<2&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglTwo)this.segl.lengths[1]=n?e.y-r:e.x-r,this.segl.lengths[1]<OptConstant.Common.SegMinLen&&(this.segl.lengths[1]=OptConstant.Common.SegMinLen);else if(f){const t=g-r;this.segl.lengths[1]<t&&(this.segl.lengths[1]=t)}let a=r+this.segl.lengths[1];a<0&&(a=0),a>m.x&&(a=m.x),n?this.segl.pts.push(new Point$1(s-u.y,a-u.x)):this.segl.pts.push(new Point$1(a-u.x,s-u.y)),this.segl.lengths.length<3&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglThree&&(this.segl.lengths[2]=n?i*(c-e.x):i*(c-e.y),this.segl.lengths[2]<OptConstant.Common.SegMinLen&&(this.segl.lengths[2]=OptConstant.Common.SegMinLen));let o=c-i*this.segl.lengths[2];o<0&&(o=0),o>m.y&&(o=m.y),n?(this.segl.pts.push(new Point$1(o-u.y,a-u.x)),this.segl.pts.push(new Point$1(o-u.y,h-u.x)),this.segl.pts.push(new Point$1(c-u.y,h-u.x))):(this.segl.pts.push(new Point$1(a-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,c-u.y)))}else{4!==d&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(l-u.y,r-u.x)):this.segl.pts.push(new Point$1(r-u.x,l-u.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen);let s,a=this.segl.lengths[0];t===OptConstant.ActionTriggerType.SeglOne?(n?(this.segl.lengths[0]=i*(l-e.x),s=i*(c-e.x)):(this.segl.lengths[0]=i*(l-e.y),s=i*(c-e.y)),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen),s<OptConstant.Common.SegMinLen&&(s=OptConstant.Common.SegMinLen),s<a&&(a=s)):a>OptConstant.Common.SegDefLen&&(a=OptConstant.Common.SegDefLen);let o=l-i*this.segl.lengths[0];o<0&&(o=0),o>m.y&&(o=m.y);let p=c-i*a;p<0&&(p=0),p>m.y&&(p=m.y),-1===i?p>o&&(o=p):p<o&&(o=p),n?(this.segl.pts.push(new Point$1(o-u.y,r-u.x)),this.segl.pts.push(new Point$1(o-u.y,h-u.x)),this.segl.pts.push(new Point$1(c-u.y,h-u.x))):(this.segl.pts.push(new Point$1(r-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,c-u.y)))}LogUtil.Debug("= S.SegmentedLine: SegLTopToTop output",{pts:this.segl.pts,lengths:this.segl.lengths})}SegLTopToBottom(t,e,i,n){let s,a,o,r,l,h;LogUtil.Debug("= S.SegmentedLine: SegLTopToBottom input",{actionType:t,targetPoint:e,directionFactor:i,isVertical:n});let c,u,d={x:0,y:0},p=this.segl.pts.length,g=0;const f=OptConstant.Common.DimMax;if(n){Math.abs(this.EndPoint.y-this.StartPoint.y),s=Math.abs(this.EndPoint.x-this.StartPoint.x),a=this.StartPoint.y,o=this.StartPoint.x,r=this.EndPoint.y,l=this.EndPoint.x,h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let t=h.x;h.x=h.y,h.y=t,PolyUtil.GetMaxDim(d),t=d.x,d.x=d.y,d.y=t}else Math.abs(this.EndPoint.x-this.StartPoint.x),s=Math.abs(this.EndPoint.y-this.StartPoint.y),a=this.StartPoint.x,o=this.StartPoint.y,r=this.EndPoint.x,l=this.EndPoint.y,h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),PolyUtil.GetMaxDim(d);if(c=-1===i?l-2*OptConstant.Common.SegMinLen>o:l+2*OptConstant.Common.SegMinLen<o,p=this.segl.pts.length,this.segl.pts.splice(0),t===OptConstant.ActionTriggerType.SeglPreserve&&(c=6!==p),c)if(Math.abs(a-r)<=1)n?(this.segl.pts.push(new Point$1(o-h.y,a-h.x)),this.segl.pts.push(new Point$1(l-h.y,a-h.x))):(this.segl.pts.push(new Point$1(a-h.x,o-h.y)),this.segl.pts.push(new Point$1(a-h.x,l-h.y))),this.segl.lengths.splice(0);else{4!==p&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(o-h.y,a-h.x)):this.segl.pts.push(new Point$1(a-h.x,o-h.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne?(this.segl.lengths[0]=n?i*(o-e.x):i*(o-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen)):(t!==OptConstant.ActionTriggerType.SeglPreserve&&this.segl.lengths[0]<OptConstant.Common.SegDefLen&&(this.segl.lengths[0]=OptConstant.Common.SegDefLen),this.segl.lengths[0]>s-OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=s-OptConstant.Common.SegMinLen)),u=o-i*this.segl.lengths[0],u<0&&(u=0),u>d.y&&(u=d.y);let c=l+i*OptConstant.Common.SegMinLen;c<0&&(c=0),c>d.y&&(c=d.y),-1===i?(c<o+OptConstant.Common.SegMinLen&&(c=o+OptConstant.Common.SegMinLen),c<u&&(u=c)):(c>o-OptConstant.Common.SegMinLen&&(c=o-OptConstant.Common.SegMinLen),c>u&&(u=c)),n?(this.segl.pts.push(new Point$1(u-h.y,a-h.x)),this.segl.pts.push(new Point$1(u-h.y,r-h.x)),this.segl.pts.push(new Point$1(l-h.y,r-h.x))):(this.segl.pts.push(new Point$1(a-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,l-h.y)))}else{if(this.hooks&&this.hooks.length>0)for(let t=0;t<this.hooks.length;t++)if(this.hooks[t].hookpt===OptConstant.HookPts.KTL){const e=ObjectUtil$1.GetObjectPtr(this.hooks[t].objid,!1);if(e){const i=e.GetTargetRect();g=n?a<=r?this.StartPoint.y+i.height*((f-this.hooks[t].connect.y)/f)+OptConstant.Common.SegDefLen:this.StartPoint.y+i.height*(this.hooks[t].connect.y/f)+OptConstant.Common.SegDefLen:a<=r?this.StartPoint.x+i.width*((f-this.hooks[t].connect.x)/f)+OptConstant.Common.SegDefLen:this.StartPoint.x+i.width*(this.hooks[t].connect.x/f)+OptConstant.Common.SegDefLen;break}}if(6!==p&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(o-h.y,a-h.x)):this.segl.pts.push(new Point$1(a-h.x,o-h.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne&&(this.segl.lengths[0]=n?i*(o-e.x):i*(o-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen)),u=o-i*this.segl.lengths[0],u<0&&(u=0),u>d.y&&(u=d.y),n?this.segl.pts.push(new Point$1(u-h.y,a-h.x)):this.segl.pts.push(new Point$1(a-h.x,u-h.y)),this.segl.lengths.length<2&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglTwo)this.segl.lengths[1]=a<=r?n?e.y-a:e.x-a:n?-(e.y-a):-(e.x-a);else if(g){const t=g-a;this.segl.lengths[1]<t&&(this.segl.lengths[1]=t)}let s;a<=r?(s=a+this.segl.lengths[1],Math.abs(r-s)<OptConstant.Common.SegMinLen&&(s=s<r?r-OptConstant.Common.SegMinLen:r+OptConstant.Common.SegMinLen)):(s=a-this.segl.lengths[1],Math.abs(s-r)<OptConstant.Common.SegMinLen&&(s=s<r?r-OptConstant.Common.SegMinLen:r+OptConstant.Common.SegMinLen)),s<0&&(s=0),s>d.x&&(s=d.x),n?this.segl.pts.push(new Point$1(u-h.y,s-h.x)):this.segl.pts.push(new Point$1(s-h.x,u-h.y)),this.segl.lengths.length<3&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglThree&&(this.segl.lengths[2]=n?-i*(l-e.x):-i*(l-e.y),this.segl.lengths[2]<OptConstant.Common.SegMinLen&&(this.segl.lengths[2]=OptConstant.Common.SegMinLen)),u=l+i*this.segl.lengths[2],u<0&&(u=0),u>d.y&&(u=d.y),n?(this.segl.pts.push(new Point$1(u-h.y,s-h.x)),this.segl.pts.push(new Point$1(u-h.y,r-h.x)),this.segl.pts.push(new Point$1(l-h.y,r-h.x))):(this.segl.pts.push(new Point$1(s-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,l-h.y)))}LogUtil.Debug("= S.SegmentedLine: SegLTopToBottom output",{pts:this.segl.pts,lengths:this.segl.lengths})}SegLTopToLeft(t,e,i,n,s,a){LogUtil.Debug("= S.SegmentedLine: SegLTopToLeft input",{actionType:t,point:e,primaryFactor:i,secondaryFactor:n,isVertical:s,directionFlag:a});let o,r,l,h,c,u,d,p,g,f,b,v,m,y=0,S=0,w=!1,x={},C={x:0,y:0};const D=OptConstant.Common.DimMax;if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),DrawUtil.AllowAutoInsert()&&(w=!0),Math.abs(this.EndPoint.x-this.StartPoint.x),Math.abs(this.EndPoint.y-this.StartPoint.y),s?(f=this.StartPoint.y,b=this.StartPoint.x,v=this.EndPoint.y,m=this.EndPoint.x,x=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=x.x,x.x=x.y,x.y=l,PolyUtil.GetMaxDim(C),l=C.x,C.x=C.y,C.y=l):(f=this.StartPoint.x,b=this.StartPoint.y,v=this.EndPoint.x,m=this.EndPoint.y,x=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),PolyUtil.GetMaxDim(C)),g=this.segl.pts.length,this.segl.pts.splice(0),c=-1==n?f-2*OptConstant.Common.SegMinLen>v:f+2*OptConstant.Common.SegMinLen<v,h=-1==i?m-2*OptConstant.Common.SegMinLen>b&&c:m+2*OptConstant.Common.SegMinLen<b&&c,t===OptConstant.ActionTriggerType.SeglPreserve&&(h=5!==g),a&&(h=!0),h)this.segl.lengths.splice(0),s?(this.segl.pts.push(new Point$1(b-x.y,f-x.x)),this.segl.pts.push(new Point$1(m-x.y,f-x.x)),this.segl.pts.push(new Point$1(m-x.y,v-x.x))):(this.segl.pts.push(new Point$1(f-x.x,b-x.y)),this.segl.pts.push(new Point$1(f-x.x,m-x.y)),this.segl.pts.push(new Point$1(v-x.x,m-x.y)));else{if(c=f<v,5!=g&&this.segl.lengths.splice(0),this.hooks)if(c){if(-1===n){for(y=s?this.EndPoint.y+OptConstant.Common.SegDefLen:this.EndPoint.x+OptConstant.Common.SegDefLen,d=0;d<this.hooks.length;d++)if(this.hooks[d].hookpt===OptConstant.HookPts.KTR){if(u=ObjectUtil$1.GetObjectPtr(this.hooks[d].objid,!1),u){const t=u.GetTargetRect();S=b-(t.y+t.height)<OptConstant.Common.SegDefLen+OptConstant.Common.SegMinLen?s?this.EndPoint.x-t.width*(this.hooks[d].connect.x/D)-OptConstant.Common.SegDefLen:this.EndPoint.y-t.height*(this.hooks[d].connect.y/D)-OptConstant.Common.SegDefLen:s?this.EndPoint.x+t.width*((D-this.hooks[d].connect.x)/D)+OptConstant.Common.SegDefLen:this.EndPoint.y+t.height*((D-this.hooks[d].connect.y)/D)+OptConstant.Common.SegDefLen}break}}else for(d=0;d<this.hooks.length;d++)if(this.hooks[d].hookpt===OptConstant.HookPts.KTR){if(u=ObjectUtil$1.GetObjectPtr(this.hooks[d].objid,!1),u){const t=u.GetTargetRect();y=s?this.StartPoint.y+t.height/2+OptConstant.Common.SegDefLen:this.StartPoint.x+t.width/2+OptConstant.Common.SegDefLen}break}}else for(d=0;d<this.hooks.length;d++)if(this.hooks[d].hookpt===OptConstant.HookPts.KTR){if(u=ObjectUtil$1.GetObjectPtr(this.hooks[d].objid,!1),u){const t=u.GetTargetRect();S=s?this.EndPoint.x-t.width/2-OptConstant.Common.SegDefLen:this.EndPoint.y-t.height/2-OptConstant.Common.SegDefLen}break}if(w&&(S=0,y=0),s?this.segl.pts.push(new Point$1(b-x.y,f-x.x)):this.segl.pts.push(new Point$1(f-x.x,b-x.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne&&(this.segl.lengths[0]=s?i*(b-e.x):i*(b-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen)),p=i*this.segl.lengths[0],c?S&&(p=b-S,p<OptConstant.Common.SegDefLen&&(p=OptConstant.Common.SegDefLen),p<this.segl.lengths[0]&&(p=i*this.segl.lengths[0])):S&&(p=b-S,-1===i?-p<OptConstant.Common.SegDefLen&&(p=-OptConstant.Common.SegDefLen):p<OptConstant.Common.SegDefLen&&(p=OptConstant.Common.SegDefLen),this.segl.lengths[0]<i*p&&(p=i*this.segl.lengths[0])),this.segl.lengths[0]>i*p&&(p=i*this.segl.lengths[0]),o=b-p,o<0&&(o=0),o>C.y&&(o=C.y),s?this.segl.pts.push(new Point$1(o-x.y,f-x.x)):this.segl.pts.push(new Point$1(f-x.x,o-x.y)),this.segl.lengths.length<2&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglTwo&&(c?s?(-1===n?e.y<v+OptConstant.Common.SegDefLen&&(e.y=v+OptConstant.Common.SegDefLen):e.y>v-OptConstant.Common.SegDefLen&&(e.y=v-OptConstant.Common.SegDefLen),this.segl.lengths[1]=Math.abs(e.y-f)):(-1===n?e.x<v+OptConstant.Common.SegDefLen&&(e.x=v+OptConstant.Common.SegDefLen):e.x>v-OptConstant.Common.SegDefLen&&(e.x=v-OptConstant.Common.SegDefLen),this.segl.lengths[1]=Math.abs(e.x-f)):s?(-1===n?e.y<v-OptConstant.Common.SegMinLen&&(e.y=v-OptConstant.Common.SegMinLen):e.y>v+OptConstant.Common.SegMinLen&&(e.y=v+OptConstant.Common.SegMinLen),this.segl.lengths[1]=Math.abs(e.y-f)):(e.x>f-OptConstant.Common.SegMinLen&&(e.x=f-OptConstant.Common.SegMinLen),this.segl.lengths[1]=Math.abs(e.x-f))),c)p=this.segl.lengths[1],y&&y>this.segl.lengths[1]+f&&(p=y-f),r=f+p,-1==n?r<=v&&(r=f+p):r>=v&&(r=f-p);else{r=f-this.segl.lengths[1];const t=v-n*OptConstant.Common.SegDefLen;-1==n&&this.segl.lengths[1]!=OptConstant.Common.SegDefLen?t>r&&(r=t):t<r&&(r=t)}r<0&&(r=0),r>C.x&&(r=C.x),s?(this.segl.pts.push(new Point$1(o-x.y,r-x.x)),this.segl.pts.push(new Point$1(m-x.y,r-x.x)),this.segl.pts.push(new Point$1(m-x.y,v-x.x))):(this.segl.pts.push(new Point$1(r-x.x,o-x.y)),this.segl.pts.push(new Point$1(r-x.x,m-x.y)),this.segl.pts.push(new Point$1(v-x.x,m-x.y)))}LogUtil.Debug("= S.SegmentedLine: SegLTopToLeft output",{pts:this.segl.pts,lengths:this.segl.lengths})}GetCornerSize(t,e){LogUtil.Debug("= S.SegmentedLine: GetCornerSize input",{cornerBaseSize:t,maxCornerSize:e});const i=Math.min(t,e),n=this.segl.curveparam,s=.4*i,a=n>s?s:n;return LogUtil.Debug("= S.SegmentedLine: GetCornerSize output",{cornerSize:a}),a}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.SegmentedLine: GetPolyPoints input",{maxPointCount:t,shouldTranslatePoints:e,shouldSkipCurves:i,reserved:n,extraOptions:s});let a=[],o=0;if(this.segl&&this.segl.pts.length){const t=this.segl.pts.length;if(this.segl.curveparam>0&&!i)for(let e=0;e<t;e++){let i,n,s,r=0,l=0,h=!1;e>0&&e<t-1?(this.segl.pts[e].x===this.segl.pts[e-1].x?(r=Math.abs(this.segl.pts[e].y-this.segl.pts[e-1].y),h=!0,i=this.segl.pts[e].y-this.segl.pts[e-1].y>0?1:-1):(r=Math.abs(this.segl.pts[e].x-this.segl.pts[e-1].x),i=this.segl.pts[e].x-this.segl.pts[e-1].x>0?1:-1),this.segl.pts[e].x===this.segl.pts[e+1].x?(l=Math.abs(this.segl.pts[e].y-this.segl.pts[e+1].y),n=this.segl.pts[e+1].y-this.segl.pts[e].y>0?1:-1):(l=Math.abs(this.segl.pts[e].x-this.segl.pts[e+1].x),n=this.segl.pts[e+1].x-this.segl.pts[e].x>0?1:-1),o=this.GetCornerSize(r,l),h?(a.push(new Point$1(this.segl.pts[e].x,this.segl.pts[e].y-o*i)),s=T3Gv.opt.LinesAddCurve(!0,i,n,this.segl.pts[e].x,this.segl.pts[e].y,o),a=a.concat(s)):(a.push(new Point$1(this.segl.pts[e].x-o*i,this.segl.pts[e].y)),s=T3Gv.opt.LinesAddCurve(!1,i,n,this.segl.pts[e].x,this.segl.pts[e].y,o),a=a.concat(s))):a.push(new Point$1(this.segl.pts[e].x,this.segl.pts[e].y))}else for(let e=0;e<t;e++)a.push(new Point$1(this.segl.pts[e].x,this.segl.pts[e].y));if(!e){const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);for(let e=0;e<a.length;e++)a[e].x+=t.x,a[e].y+=t.y}}else a=super.GetPolyPoints(t,e,!0,s);return LogUtil.Debug("= S.SegmentedLine: GetPolyPoints output",a),a}LMDrawPreTrack(t){LogUtil.Debug("= S.SegmentedLine: LMDrawPreTrack input",{svgDoc:t});const e=super.LMDrawPreTrack(t);let i;return LogUtil.Debug("= S.SegmentedLine: Base LMDrawPreTrack output",{basePreTrackResult:e}),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0&&(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.SConnectIndex,!1),i&&(this.segl.firstdir=i.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.EndPoint,t),LogUtil.Debug("= S.SegmentedLine: Updated segl.firstdir",{firstdir:this.segl.firstdir}))),LogUtil.Debug("= S.SegmentedLine: LMDrawPreTrack output",{result:!0}),!0}AdjustLine(t,e,i,n){let s,a;LogUtil.Debug("= S.SegmentedLine: AdjustLine input",{svgDoc:t,newX:e,newY:i,triggerType:n}),t&&(s=t.GetElementById(OptConstant.SVGElementClass.Shape),a=t.GetElementById(OptConstant.SVGElementClass.Slop));const o=new Point$1(e,i);this.SegLFormat(o,n,0),this.CalcFrame();const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);t&&(t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(r.x,r.y),s.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(s,l),a.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(a,l),new SelectionAttr,this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(this.Frame,o,CursorConstant.CursorTypes.Grow,this),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)),LogUtil.Debug("= S.SegmentedLine: AdjustLine output",{Frame:this.Frame,adjustmentPoint:o})}AdjustLineEnd(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: AdjustLineEnd input",{svgDocument:t,newEndX:e,newEndY:i,triggerType:n});const s={x:this.EndPoint.x,y:this.EndPoint.y};this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1),e=this.EndPoint.x,i=this.EndPoint.y,this.EndPoint.x=s.x,this.EndPoint.y=s.y;const a={x:e,y:i};if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1);t&&(this.segl.lastdir=t.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.StartPoint,a))}else T3Gv.opt.ob&&T3Gv.opt.ob.BlockID===this.BlockID&&(this.segl.firstdir=T3Gv.opt.ob.segl.firstdir,this.segl.lastdir=T3Gv.opt.ob.segl.lastdir);this.AdjustLine(t,e,i,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("= S.SegmentedLine: AdjustLineEnd output",{EndPoint:this.EndPoint,segl:this.segl})}AdjustLineStart(t,e,i){LogUtil.Debug("= S.SegmentedLine: AdjustLineStart input",{svgDocument:t,newStartX:e,newStartY:i});const n={x:this.StartPoint.x,y:this.StartPoint.y},s=OptConstant.Common.MinDim;this.StartPoint.x=e,this.StartPoint.y=i,this.EnforceMinimum(!0);const a=this.StartPoint.x,o=this.StartPoint.y;this.StartPoint.x=n.x,this.StartPoint.y=n.y,this.segl.pts[0].x===this.segl.pts[1].x?(this.segl.lengths[0]+=this.StartPoint.y-o,this.segl.lengths[0]<s&&(this.segl.lengths[0]=s)):(this.segl.lengths[0]+=this.StartPoint.x-a,this.segl.lengths[0]<s&&(this.segl.lengths[0]=s));const r={x:a,y:o};if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1);t&&(this.segl.firstdir=t.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.EndPoint,r))}else T3Gv.opt.ob&&T3Gv.opt.ob.BlockID===this.BlockID&&(this.segl.firstdir=T3Gv.opt.ob.segl.firstdir,this.segl.lastdir=T3Gv.opt.ob.segl.lastdir);this.AdjustLine(t,a,o,OptConstant.ActionTriggerType.LineStart),LogUtil.Debug("= S.SegmentedLine: AdjustLineStart output",{originalStartPoint:n,adjustedPoint:r,seglFirstDir:this.segl.firstdir,seglLength0:this.segl.lengths[0]})}GetDimensions(){LogUtil.Debug("= S.SegmentedLine: GetDimensions input",{StartPoint:this.StartPoint,EndPoint:this.EndPoint});const t={x:Math.abs(this.EndPoint.x-this.StartPoint.x),y:Math.abs(this.EndPoint.y-this.StartPoint.y)};return LogUtil.Debug("= S.SegmentedLine: GetDimensions output",t),t}GetDimensionsForDisplay(){LogUtil.Debug("= S.SegmentedLine: GetDimensionsForDisplay input",{Frame:this.Frame});const t={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};return LogUtil.Debug("= S.SegmentedLine: GetDimensionsForDisplay output",t),t}UpdateDimensions(t,e,i){LogUtil.Debug("= S.SegmentedLine: UpdateDimensions input",{offsetElement:t,offsetX:e,offsetY:i});const n=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),s=e?this.StartPoint.x+e:this.EndPoint.x,a=i?this.StartPoint.y+i:this.EndPoint.y;LogUtil.Debug("= S.SegmentedLine: UpdateDimensions computed",{newEndX:s,newEndY:a}),this.AdjustLineEnd(n,s,a,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("= S.SegmentedLine: UpdateDimensions output",{EndPoint:this.EndPoint})}SetSize(t,e,i){LogUtil.Debug("= S.SegmentedLine: SetSize input",{newWidth:t,newHeight:e,forceFlag:i});let n=!1,s=0,a=0;t&&(s=t-this.Frame.width),e&&(a=e-this.Frame.height),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),(this.StartPoint.x<this.EndPoint.x||Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x)&&this.StartPoint.y<this.EndPoint.y)&&(n=!0);const o=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);n?this.AdjustLineEnd(o,this.EndPoint.x+s,this.EndPoint.y+a,0):this.AdjustLineStart(o,this.StartPoint.x+s,this.StartPoint.y+a,0),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("= S.SegmentedLine: SetSize output",{deltaWidth:s,deltaHeight:a,isEndAdjusted:n})}Flip(t){LogUtil.Debug("= S.SegmentedLine: Flip input",{flipFlags:t});let e,i,n,s=!1,a=[];const o=NvConstant.SegLDir;if(T3Gv.opt.ob=Utils1.DeepCopy(this),t&OptConstant.ExtraFlags.FlipVert){switch(s=!0,this.segl.firstdir){case o.Ktc:this.segl.firstdir=o.Kbc;break;case o.Kbc:this.segl.firstdir=o.Ktc}switch(this.segl.lastdir){case o.Ktc:this.segl.lastdir=o.Kbc;break;case o.Kbc:this.segl.lastdir=o.Ktc}e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);const t=this.segl.pts.length;for(i=0;i<t;i++)a.push(new Point$1(this.segl.pts[i].x,this.segl.pts[i].y+e.y-this.Frame.y));const r=this.Frame.height;for(i=0;i<t;i++)a[i].y=r-a[i].y;for(this.StartPoint.y=a[0].y+this.Frame.y,this.EndPoint.y=a[t-1].y+this.Frame.y,n=this.EndPoint.y<this.StartPoint.y?this.EndPoint.y-this.Frame.y:this.StartPoint.y-this.Frame.y,i=0;i<t;i++)this.segl.pts[i].y=a[i].y-n;a=[]}if(t&OptConstant.ExtraFlags.FlipHoriz){switch(s=!0,this.segl.firstdir){case o.Klc:this.segl.firstdir=o.Krc;break;case o.Krc:this.segl.firstdir=o.Klc}switch(this.segl.lastdir){case o.Klc:this.segl.lastdir=o.Krc;break;case o.Krc:this.segl.lastdir=o.Klc}e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);const t=this.segl.pts.length;for(i=0;i<t;i++)a.push(new Point$1(this.segl.pts[i].x+e.x-this.Frame.x,this.segl.pts[i].y));const r=this.Frame.width;for(i=0;i<t;i++)a[i].x=r-a[i].x;for(this.StartPoint.x=a[0].x+this.Frame.x,this.EndPoint.x=a[t-1].x+this.Frame.x,n=this.EndPoint.x<this.StartPoint.x?this.EndPoint.x-this.Frame.x:this.StartPoint.x-this.Frame.x,i=0;i<t;i++)this.segl.pts[i].x=a[i].x-n;a=[]}if(s){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}T3Gv.opt.ob={},LogUtil.Debug("= S.SegmentedLine: Flip output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,segl:this.segl})}GetFrameIntersects(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects input",{intersectFrame:t,shapeDoc:e,outputPoints:i,resultContext:n});const s=2*OptConstant.Common.SegMinLen,a=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height};const r=this.segl.pts.length;for(let l=1;l<r;l++)if(this.segl.pts[l].x===this.segl.pts[l-1].x){let r=this.segl.pts[l].y<this.segl.pts[l-1].y?this.segl.pts[l].y:this.segl.pts[l-1].y,h=this.segl.pts[l].y>this.segl.pts[l-1].y?this.segl.pts[l].y:this.segl.pts[l-1].y;const c=this.segl.pts[l].x;if(r+s<o.y&&h-s>o.y+o.height&&c>o.x&&c<o.x+o.width)return e.AdjustAutoInsertShape(t,!0),n.AutoSeg=l,o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height},this.segl.pts[l-1].y<this.segl.pts[l].y?(i.push(new Point$1(c+a.x,o.y+a.y)),i[0].index=l,i.push(new Point$1(c+a.x,o.y+o.height+a.y)),i[1].index=l):(i.push(new Point$1(c+a.x,o.y+o.height+a.y)),i.push(new Point$1(c+a.x,o.y+a.y)),i[0].index=l,i[1].index=l),LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects output",{outputPoints:i,resultContext:n,hitSegment:l}),!0}else{let r=this.segl.pts[l].x<this.segl.pts[l-1].x?this.segl.pts[l].x:this.segl.pts[l-1].x,h=this.segl.pts[l].x>this.segl.pts[l-1].x?this.segl.pts[l].x:this.segl.pts[l-1].x;const c=this.segl.pts[l].y;if(r+s<o.x&&h-s>o.x+o.width&&c>o.y&&c<o.y+o.height)return e.AdjustAutoInsertShape(t,!1),n.AutoSeg=l,o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height},this.segl.pts[l-1].x<this.segl.pts[l].x?(i.push(new Point$1(o.x+a.x,c+a.y)),i.push(new Point$1(o.x+o.width+a.x,c+a.y)),i[0].index=l,i[1].index=l):(i.push(new Point$1(o.x+o.width+a.x,c+a.y)),i.push(new Point$1(o.x+a.x,c+a.y)),i[0].index=l,i[1].index=l),LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects output",{outputPoints:i,resultContext:n,hitSegment:l}),!0}return LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects output",{result:!1}),!1}NoRotate(){LogUtil.Debug("= S.SegmentedLine: NoRotate input",{});return LogUtil.Debug("= S.SegmentedLine: NoRotate output",true),true}CalcTextPosition(t){LogUtil.Debug("= S.SegmentedLine: CalcTextPosition input",{textPositioningParams:t});const e={x:t.Frame.x+t.Frame.width/2-this.Frame.x,y:t.Frame.y+t.Frame.height/2-this.Frame.y};LogUtil.Debug("= S.SegmentedLine: Center calculated",{centerPoint:e});const i=this.segl.pts.length;let n,s=1,a=0;const o=[];let r=0;for(let p=1;p<i;p++){const t=this.segl.pts[p-1],i=this.segl.pts[p];if(Utils2.IsEqual(t.x,i.x)){const l=Math.min(t.y,i.y),h=Math.max(t.y,i.y),c=Math.abs(e.x-t.x);e.y>=l&&e.y<=h&&(void 0===n||c<n)&&(n=c,s=p,a=t.y);const u=Math.abs(t.y-i.y);o.push(u),r+=u,LogUtil.Debug("= S.SegmentedLine: Vertical segment",{index:p,segmentLength:u,totalSegmentLength:r})}else{const l=Math.min(t.x,i.x),h=Math.max(t.x,i.x),c=Math.abs(e.y-t.y);e.x>=l&&e.x<=h&&(void 0===n||c<n)&&(n=c,s=p,a=t.x);const u=Math.abs(t.x-i.x);o.push(u),r+=u,LogUtil.Debug("= S.SegmentedLine: Horizontal segment",{index:p,segmentLength:u,totalSegmentLength:r})}}LogUtil.Debug("= S.SegmentedLine: Chosen segment",{bestSegmentIndex:s,minimumDistance:n,segmentReferenceCoordinate:a,totalSegmentLength:r});const l=this.segl.pts[s-1],h=this.segl.pts[s];let c,u;Utils2.IsEqual(l.x,h.x)?(c=Math.abs(e.y-a),u=-(e.x-l.x),LogUtil.Debug("= S.SegmentedLine: Vertical offset",{offsetAlongSegment:c,offsetAcrossSegment:u})):(c=Math.abs(e.x-a),u=e.y-l.y,LogUtil.Debug("= S.SegmentedLine: Horizontal offset",{offsetAlongSegment:c,offsetAcrossSegment:u}));let d=0;for(let p=0;p<s-1;p++)d+=o[p];d+=c,LogUtil.Debug("= S.SegmentedLine: Accumulated distance",{accumulatedDistance:d}),this.LineTextX=r?d/r:0,this.LineTextY=u,this.LineTextX&&(this.trect=Utils1.DeepCopy(t.trect)),t.TextGrow=NvConstant.TextGrowBehavior.Vertical,this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!0),LogUtil.Debug("= S.SegmentedLine: CalcTextPosition output",{LineTextX:this.LineTextX,LineTextY:this.LineTextY,trect:this.trect})}GetTextOnLineParams(t){let e,i,n,s,a;LogUtil.Debug("= S.SegmentedLine: GetTextOnLineParams input",{textOptions:t});let o=0,r=.5;const l={Frame:new Instance.Shape.Rect,StartPoint:new Point$1(0,0),EndPoint:new Point$1(0,0),CenterProp:0},h=this.segl.pts,c=h.length;let u=!1;if(h[0].x<h[c-1].x||h[0].x===h[c-1].x&&h[0].y<h[c-1].y?(e=0,i=c-2):(e=c-2,i=0,u=!0),0!==this.LineTextX){let t=0;for(let i=1;i<c;i++)Utils2.IsEqual(h[i-1].x,h[i].x)?t+=Math.abs(h[i-1].y-h[i].y):t+=Math.abs(h[i-1].x-h[i].x);const e=this.LineTextX*t;LogUtil.Debug("= S.SegmentedLine: Total line length calculated",{totalLineLength:t,targetDistance:e}),o=0,n=c-2;for(let i=1;i<c;i++)if(a=Utils2.IsEqual(h[i-1].x,h[i].x)?Math.abs(h[i-1].y-h[i].y):Math.abs(h[i-1].x-h[i].x),o+=a,o>e){n=i-1,r=(a-(o-e))/a;break}l.CenterProp=r,l.Frame=Utils1.DeepCopy(this.Frame),l.StartPoint.x=l.Frame.x+h[n].x,l.StartPoint.y=l.Frame.y+h[n].y,l.EndPoint.x=l.Frame.x+h[n+1].x,l.EndPoint.y=l.Frame.y+h[n+1].y}else{switch(c){case 2:n=0;break;case 3:Utils2.IsEqual(h[0].x,h[1].x)?(s=Math.abs(h[0].y-h[1].y),a=Math.abs(h[1].x-h[2].x)):(s=Math.abs(h[0].x-h[1].x),a=Math.abs(h[1].y-h[2].y)),n=s>a?0:1;break;case 5:Utils2.IsEqual(h[1].x,h[2].x)?(s=Math.abs(h[1].y-h[2].y),a=Math.abs(h[2].x-h[3].x)):(s=Math.abs(h[1].x-h[2].x),a=Math.abs(h[2].y-h[3].y)),n=s>a?1:2;break;default:n=Math.round((c-1.1)/2)}switch(this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:u?(l.EndPoint.x=this.Frame.x+h[e].x,l.EndPoint.y=this.Frame.y+h[e].y,l.StartPoint.x=this.Frame.x+h[e+1].x,l.StartPoint.y=this.Frame.y+h[e+1].y):(l.StartPoint.x=this.Frame.x+h[e].x,l.StartPoint.y=this.Frame.y+h[e].y,l.EndPoint.x=this.Frame.x+h[e+1].x,l.EndPoint.y=this.Frame.y+h[e+1].y);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:u?(l.EndPoint.x=this.Frame.x+h[i].x,l.EndPoint.y=this.Frame.y+h[i].y,l.StartPoint.x=this.Frame.x+h[i+1].x,l.StartPoint.y=this.Frame.y+h[i+1].y):(l.StartPoint.x=this.Frame.x+h[i].x,l.StartPoint.y=this.Frame.y+h[i].y,l.EndPoint.x=this.Frame.x+h[i+1].x,l.EndPoint.y=this.Frame.y+h[i+1].y);break;default:u?(l.EndPoint.x=this.Frame.x+h[n].x,l.EndPoint.y=this.Frame.y+h[n].y,l.StartPoint.x=this.Frame.x+h[n+1].x,l.StartPoint.y=this.Frame.y+h[n+1].y):(l.StartPoint.x=this.Frame.x+h[n].x,l.StartPoint.y=this.Frame.y+h[n].y,l.EndPoint.x=this.Frame.x+h[n+1].x,l.EndPoint.y=this.Frame.y+h[n+1].y)}l.Frame=Utils1.DeepCopy(this.Frame)}return LogUtil.Debug("= S.SegmentedLine: GetTextOnLineParams output",l),l}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: CreateActionTriggers input",{svgDocument:t,objectId:e,optionalParam:i,connectedObjectId:n});const s=t.CreateShape(OptConstant.CSType.Group),a=OptConstant.Common.KnobSize;let o=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(o*=2);const r=a/o,l=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let h=this.Frame.width+r,c=this.Frame.height+r;const u=ObjectUtil$1.GetObjectPtr(e,!1),d=Utils1.DeepCopy(this.Frame);d.x-=r/2,d.y-=r/2,d.width+=r,d.height+=r;let p={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:r,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};if(e!=n&&(p.fillColor="white",p.strokeSize=1,p.strokeColor="black",p.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(p.fillColor="gray",p.locked=!0):this.NoGrow()&&(p.fillColor="red",p.strokeColor="red",p.cursorType=CursorConstant.CursorType.Default),p.x=this.StartPoint.x-this.Frame.x,p.y=this.StartPoint.y-this.Frame.y,p.knobID=OptConstant.ActionTriggerType.LineStart,u&&u.hooks)for(let b=0;b<u.hooks.length;b++)if(u.hooks[b].hookpt===OptConstant.HookPts.KTL){p.shapeType=OptConstant.CSType.Oval;break}let g=this.GenericKnob(p);if(s.AddElement(g),p.shapeType=OptConstant.CSType.Rect,u&&u.hooks)for(let b=0;b<u.hooks.length;b++)if(u.hooks[b].hookpt===OptConstant.HookPts.KTR){p.shapeType=OptConstant.CSType.Oval;break}p.x=this.EndPoint.x-this.Frame.x,p.y=this.EndPoint.y-this.Frame.y,p.knobID=OptConstant.ActionTriggerType.LineEnd;let f=this.GenericKnob(p);if(s.AddElement(f),p.shapeType=OptConstant.CSType.Rect,this.segl&&this.segl.pts&&this.segl.firstdir>0){const t=this.segl.pts.length;for(let e=2;e<t-1;e++){this.segl.pts[e-1].x===this.segl.pts[e].x?(p.x=this.segl.pts[e].x+l.x-this.Frame.x,p.y=(this.segl.pts[e-1].y+this.segl.pts[e].y)/2+l.y-this.Frame.y):(p.y=this.segl.pts[e].y+l.y-this.Frame.y,p.x=(this.segl.pts[e-1].x+this.segl.pts[e].x)/2+l.x-this.Frame.x),p.cursorType=this.CalcCursorForSegment(this.segl.pts[e],this.segl.pts[e-1],!0),p.knobID=OptConstant.ActionTriggerType.SeglOne+e-2,this.NoGrow()&&(p.cursorType=CursorConstant.CursorType.Default);let t=this.GenericKnob(p);s.AddElement(t)}}return s.SetSize(h,c),s.SetPos(d.x,d.y),s.isShape=!0,s.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.SegmentedLine: CreateActionTriggers output",{knobGroup:s,adjustedFrame:d,adjustedWidth:h,adjustedHeight:c}),s}ModifyShape(t,e,i,n,s){LogUtil.Debug("= S.SegmentedLine: ModifyShape input",{svgDocument:t,newXCoord:e,newYCoord:i,triggerType:n,extraData:s});const a=t.GetElementById(OptConstant.SVGElementClass.Shape),o=t.GetElementById(OptConstant.SVGElementClass.Slop),r=new Point$1(e,i);this.SegLFormat(r,n,0),this.CalcFrame();const l=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,null),h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(h.x,h.y),a.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(a,l),o.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(o,l),this.UpdateDimensionLines(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("= S.SegmentedLine: ModifyShape output",{Frame:this.Frame,polylinePoints:l,boundingRect:h})}OnConnect(t,e,i,n,s){let a,o;LogUtil.Debug("= S.SegmentedLine: OnConnect input",{elementId:t,connectedObject:e,hookPoint:i,connectionCoordinate:n,extraData:s});let r=0;const l=T3Gv.opt.svgObjectLayer.GetElementById(t);switch(i){case OptConstant.HookPts.KTL:this.segl.firstdir=e.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.EndPoint,n),r=OptConstant.ActionTriggerType.LineEnd,a=this.EndPoint.x,o=this.EndPoint.y;break;case OptConstant.HookPts.KTR:this.segl.lastdir=e.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.StartPoint,n),r=OptConstant.ActionTriggerType.LineStart,a=this.StartPoint.x,o=this.StartPoint.y;break;default:LogUtil.Debug("= S.SegmentedLine: OnConnect unknown hookPoint",{hookPoint:i})}r&&(LogUtil.Debug("= S.SegmentedLine: OnConnect calling AdjustLine",{svgDocument:l,adjustXCoord:a,adjustYCoord:o,actionTrigger:r}),this.AdjustLine(l,a,o,r)),LogUtil.Debug("= S.SegmentedLine: OnConnect output")}OnDisconnect(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: OnDisconnect input",{elementId:t,unusedParam:e,hookType:i,extraData:n});let s=0,a=0,o=0;const r=T3Gv.opt.svgObjectLayer.GetElementById(t);switch(T3Gv.opt.ob&&T3Gv.opt.ob.BlockID===this.BlockID&&(this.segl.firstdir=T3Gv.opt.ob.segl.firstdir,this.segl.lastdir=T3Gv.opt.ob.segl.lastdir),i){case OptConstant.HookPts.KTL:o=OptConstant.ActionTriggerType.LineEnd,s=this.EndPoint.x,a=this.EndPoint.y,this.segl.firstdir=0,T3Gv.opt.ob&&T3Gv.opt.ob.segl&&(T3Gv.opt.ob.segl.firstdir=0);break;case OptConstant.HookPts.KTR:o=OptConstant.ActionTriggerType.LineStart,s=this.StartPoint.x,a=this.StartPoint.y,this.segl.lastdir=0,T3Gv.opt.ob&&T3Gv.opt.ob.segl&&(T3Gv.opt.ob.segl.lastdir=0)}o&&(LogUtil.Debug("= S.SegmentedLine: OnDisconnect - calling AdjustLine",{svgDocument:r,adjustXCoord:s,adjustYCoord:a,actionTrigger:o}),this.AdjustLine(r,s,a,o)),LogUtil.Debug("= S.SegmentedLine: OnDisconnect output",{updatedStartPoint:this.StartPoint,updatedEndPoint:this.EndPoint,actionTrigger:o})}LinkGrow(t,e,i){switch(LogUtil.Debug("= S.SegmentedLine: LinkGrow input",{elementId:t,hookType:e,newPosition:i}),e){case OptConstant.HookPts.KTL:Utils2.IsEqual(i.x,this.StartPoint.x)&&Utils2.IsEqual(i.y,this.StartPoint.y)||this.SegLFormat(i,OptConstant.ActionTriggerType.LineStart,0);break;case OptConstant.HookPts.KTR:Utils2.IsEqual(i.x,this.EndPoint.x)&&Utils2.IsEqual(i.y,this.EndPoint.y)||this.SegLFormat(i,OptConstant.ActionTriggerType.LineEnd,0)}this.CalcFrame(!0),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("= S.SegmentedLine: LinkGrow output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}HookToPoint(t,e){LogUtil.Debug("= S.SegmentedLine: HookToPoint input",{hookId:t,outRect:e});const i=OptConstant.HookPts;let n={x:0,y:0},s={x:0,y:0},a={};switch(t){case i.KTL:n.x=this.StartPoint.x,n.y=this.StartPoint.y,e&&(s.x=this.StartPoint.x+this.segl.pts[1].x,s.y=this.StartPoint.y+this.segl.pts[1].y,a=Utils2.Pt2Rect(this.StartPoint,s),e.x=a.x,e.y=a.y,e.width=a.width,e.height=a.height);break;case i.KTR:default:n.x=this.EndPoint.x,n.y=this.EndPoint.y;const t=this.segl.pts.length;e&&(s.x=this.StartPoint.x+this.segl.pts[t-2].x,s.y=this.StartPoint.y+this.segl.pts[t-2].y,a=Utils2.Pt2Rect(this.EndPoint,s),e.x=a.x,e.y=a.y,e.width=a.width,e.height=a.height)}return LogUtil.Debug("= S.SegmentedLine: HookToPoint output",{resultPoint:n,segmentRect:a}),n}GetTargetPoints(t,e,i){LogUtil.Debug("= S.SegmentedLine: GetTargetPoints input",{hookData:t,targetFlags:e,connectedObjectId:i});const n=OptConstant.HookPts,s=OptConstant.Common.DimMax;let a=[{x:0,y:0,id:n.SED_KTL},{x:s,y:s,id:n.SED_KTR}];if(null!=i&&i>=0&&ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){let e=t.id;switch(t.id>=n.CustomBase&&(e=n.CustomBase),e){case n.CustomBase:case n.KTC:case n.KBC:case n.KRC:case n.KLC:{let t=this.Frame.width;t<=0&&(t=1);let e=this.Frame.height;if(e<=0&&(e=1),a[0].x=(this.StartPoint.x-this.Frame.x)/t*s,a[0].y=(this.StartPoint.y-this.Frame.y)/e*s,a[1].x=(this.EndPoint.x-this.Frame.x)/t*s,a[1].y=(this.EndPoint.y-this.Frame.y)/e*s,0===this.hooks.length)return LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",a),a;if(1!==this.hooks.length)return LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",[]),[];if(this.hooks[0].hookpt===n.KTR)return a[1].skip=!0,LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",a),a;if(this.hooks[0].hookpt===n.KTL)return a[0].skip=!0,a[0].x=a[1].x,a[0].y=a[1].y,LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",a),a;break}}}const o=this.BaseShapePolyGetTargets(t,e,this.Frame);return LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",o),o}BaseShapePolyGetTargets(t,e,i){LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets input",{inputPoint:t,hookFlags:e,boundingRect:i});const n=this.PolyGetTargetPointList(e);if(null==t)return LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets output",{targets:null}),null;const s=[{x:0,y:0}],a=[];let o=OptConstant.Common.LongIntMax;const r={x:0,y:0};t.x,t.y;const l={x:t.x,y:t.y};let h=!1,c={},u=-1,d={x:t.x,y:t.y};T3Gv.docUtil.docConfig.enableSnap&&0==(e&NvConstant.HookFlags.LcNoSnaps)&&(d=T3Gv.docUtil.SnapToGrid(d),d.y<i.y&&(d.y=i.y),d.y>i.y+i.height&&(d.y=i.y+i.height),d.x<i.x&&(d.x=i.x),d.x>i.x+i.width&&(d.x=i.x+i.width),h=!0);const p=n.length;for(let g=1;g<p;g++){l.x=t.x,l.y=t.y;const e=n[g-1],i=n[g];if(Utils2.EqualPt(e,i))continue;const s=i.x-e.x,a=i.y-e.y,p=0===s?1:s,f=0===a?1:a;if(Math.abs(f/p)>1){h&&(l.y=d.y);const t=p/f*(l.y-e.y)+e.x;let n=Math.abs(t-l.x);l.x=t;const s=Math.min(e.x,i.x),a=Math.max(e.x,i.x);t<s||t>a?n=OptConstant.Common.LongIntMax:(c=Utils2.Pt2Rect(e,i),Utils2.InflateRect(c,1,1),Utils2.pointInRect(c,l)||(n=OptConstant.Common.LongIntMax)),n<o&&(u=g,r.x=t,r.y=l.y,o=n)}else{h&&(l.x=d.x);const t=f/p*(l.x-e.x)+e.y;let n=Math.abs(t-l.y);l.y=t;const s=Math.min(e.y,i.y),a=Math.max(e.y,i.y);t<s||t>a?n=OptConstant.Common.LongIntMax:(c=Utils2.Pt2Rect(e,i),Utils2.InflateRect(c,1,1),Utils2.pointInRect(c,l)||(n=OptConstant.Common.LongIntMax)),n<o&&(u=g,r.x=l.x,r.y=t,o=n)}}if(u>=0){s[0].x=r.x,s[0].y=r.y;const t=i;if(0!==this.RotationAngle){const e=this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(t,e,s)}const e=t.width,n=t.height,o=0===e?0:(s[0].x-t.x)/e,l=0===n?0:(s[0].y-t.y)/n;return a.push(new Point$1(o*OptConstant.Common.DimMax,l*OptConstant.Common.DimMax)),LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets output",{targets:a}),a}return LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets output",{targets:null}),null}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.SegmentedLine: GetPerimPts input",{unusedInputParam:t,hookPointDefinitions:e,currentHookType:i,unusedParamR:n,unusedParamI:s,connectedObjectId:a});let o=this.Frame,r=[],l=0,h=0;if(e){if(h=e.length,2===h&&e[0].id&&e[0].id===OptConstant.HookPts.KTL&&e[1].id&&e[1].id===OptConstant.HookPts.KTR)return null==e[0].skip&&(r.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),r[0].id=e[0].id,l=1),null==e[1].skip&&(r.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),r[l].id=e[1].id),LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",r),r;if(a>=0){const o=ObjectUtil$1.GetObjectPtr(a,!1);if(o){if(o.objecttype===NvConstant.FNObjectTypes.Multiplicity&&1===h){let t=5,n=5;if(t+=o.Frame.width/2,0===e[0].x){const i=this.segl.pts[0],s=this.segl.pts[1];i.x===s.x?(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(t=-t),n=i.y>s.y?-n:n+o.Frame.height,r.push(new Point$1(this.StartPoint.x+t,this.StartPoint.y+n)),r[0].id=e[0].id):(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(n=-o.Frame.height-5),n=-n,i.x>s.x&&(t=-t),r.push(new Point$1(this.StartPoint.x+t,this.StartPoint.y+n)),r[0].id=e[0].id)}else{const s=this.segl.pts.length,a=this.segl.pts[s-2],l=this.segl.pts[s-1];a.x===l.x?(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(t=-t),n=a.y<l.y?-n:n+o.Frame.height,i===OptConstant.HookPts.KCBR&&(t=-t),r.push(new Point$1(this.EndPoint.x+t,this.EndPoint.y+n)),r[0].id=e[0].id):(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(n=-o.Frame.height-5),n=-n,a.x<l.x&&(t=-t),r.push(new Point$1(this.EndPoint.x+t,this.EndPoint.y+n)),r[0].id=e[0].id)}return LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",r),r}if(o.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===h){const o=super.GetPerimPts(t,e,i,n,s,a);return LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",o),o}}}}h=e?e.length:0,r=new Array(h);for(let c=0;c<h;c++){r[c]={x:0,y:0,id:0};const t=o.width,i=o.height;r[c].x=e[c].x/OptConstant.Common.DimMax*t+o.x,r[c].y=e[c].y/OptConstant.Common.DimMax*i+o.y,null!=e[c].id&&(r[c].id=e[c].id)}return LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",r),r}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("= S.SegmentedLine: ScaleObject input",{scaleX:t,scaleY:e,deltaX:i,deltaY:n,pivotX:s,pivotY:a,preserveAspectRatio:o}),super.ScaleObject(t,e,i,n,s,a,o),this.SegLFormat(this.EndPoint,OptConstant.ActionTriggerType.SeglPreserve,0),this.CalcFrame(),LogUtil.Debug("= S.SegmentedLine: ScaleObject output",{EndPoint:this.EndPoint,Frame:this.Frame})}GetSegLFace(t,e,i){LogUtil.Debug("= S.SegmentedLine: GetSegLFace input",{hookPoint:t,referencePoint:e,testPoint:i});const n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,null);let s=0,a=null;const o={x:i.x,y:i.y},r={};return Utils3.LineDStyleHit(n,o,this.StyleRecord.Line.Thickness,0,r)&&r.lpHit>=0&&(a=Utils2.Pt2Rect(n[r.lpHit],n[r.lpHit+1]),s=a.width>=a.height?e.y>=i.y?OptConstant.HookPts.KBC:OptConstant.HookPts.KTC:e.x>=i.x?OptConstant.HookPts.KRC:OptConstant.HookPts.KLC),LogUtil.Debug("= S.SegmentedLine: GetSegLFace output",{hookDirection:s}),s}GetSpacing(){LogUtil.Debug("= S.SegmentedLine: GetSpacing input",{hooks:this.hooks,segl:this.segl,StartPoint:this.StartPoint,EndPoint:this.EndPoint});const t=OptConstant.HookPts;let e,i,n={width:null,height:null};switch(2===this.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),i=ObjectUtil$1.GetObjectPtr(this.hooks[1].objid,!1)),this.segl.firstdir){case t.KTC:this.segl.lastdir===t.KBC&&(n.height=Math.abs(this.StartPoint.y-this.EndPoint.y),e&&i&&(e.Frame.y<i.Frame.y?n.height=i.Frame.y-(e.Frame.y+e.Frame.height):n.height=e.Frame.y-(i.Frame.y+i.Frame.height)));break;case t.KBC:this.segl.lastdir===t.KTC&&(n.height=Math.abs(this.StartPoint.y-this.EndPoint.y),e&&i&&(e.Frame.y<i.Frame.y?n.height=i.Frame.y-(e.Frame.y+e.Frame.height):n.height=e.Frame.y-(i.Frame.y+i.Frame.height)));break;case t.KLC:this.segl.lastdir===t.KRC&&(n.width=Math.abs(this.StartPoint.x-this.EndPoint.x),e&&i&&(e.Frame.x<i.Frame.x?n.width=i.Frame.x-(e.Frame.x+e.Frame.width):n.width=e.Frame.x-(i.Frame.x+i.Frame.width)));break;case t.KRC:this.segl.lastdir===t.KLC&&(n.width=Math.abs(this.StartPoint.x-this.EndPoint.x),e&&i&&(e.Frame.x<i.Frame.x?n.width=i.Frame.x-(e.Frame.x+e.Frame.width):n.width=e.Frame.x-(i.Frame.x+i.Frame.width)))}return LogUtil.Debug("= S.SegmentedLine: GetSpacing output",n),n}GetShapeConnectPoint(t){let e,i;LogUtil.Debug("= S.SegmentedLine: GetShapeConnectPoint input",{hookType:t});let n={},s={},a=this.segl.lastdir,o=this.segl.firstdir;const r=OptConstant.Common.DimMax,l=this.segl.pts.length;let h;return t===OptConstant.HookPts.KTL?(e=this.segl.pts[0],i=this.segl.pts[1]):(e=this.segl.pts[l-2],i=this.segl.pts[l-1]),e.x===i.x?(n.x=r/2,s.x=r/2,i.y>e.y?(n.y=0,s.y=r,a=OptConstant.HookPts.KTC,o=OptConstant.HookPts.KBC):(n.y=r,s.y=0,a=OptConstant.HookPts.KBC,o=OptConstant.HookPts.KTC)):(n.y=r/2,s.y=r/2,i.x>e.x?(n.x=0,s.x=r,a=OptConstant.HookPts.KLC,o=OptConstant.HookPts.KRC):(n.x=r,s.x=0,a=OptConstant.HookPts.KRC,o=OptConstant.HookPts.KLC)),t===OptConstant.HookPts.KTL?(this.segl.firstdir=o,h=s):(this.segl.lastdir=a,h=n),LogUtil.Debug("= S.SegmentedLine: GetShapeConnectPoint output",h),h}ConnectToHook(t,e){LogUtil.Debug("= S.SegmentedLine: ConnectToHook input",{connectedObjectId:t,hookType:e});let i=e;return ShapeUtil.LineIsReversed(this,null,!1)&&(i===OptConstant.HookPts.KTL?i=OptConstant.HookPts.KTR:i===OptConstant.HookPts.KTR&&(i=OptConstant.HookPts.KTL)),LogUtil.Debug("= S.SegmentedLine: ConnectToHook output",{result:i}),i}GetBestHook(t,e,i){LogUtil.Debug("= S.SegmentedLine: GetBestHook input",{objectId:t,initialHookType:e,referencePoint:i});const n=OptConstant.Common.DimMax;Utils2.Pt2Rect(this.StartPoint,this.EndPoint);const s=OptConstant.HookPts,a=this.segl.pts.length;let o,r,l=i.x;2===a&&this.segl.pts[0].x===this.segl.pts[1].x&&(l=i.y),ShapeUtil.LineIsReversed(this,null,!1)?0===l?(o=this.segl.pts[a-2],r=this.segl.pts[a-1]):(r=this.segl.pts[0],o=this.segl.pts[1]):l===n?(o=this.segl.pts[a-2],r=this.segl.pts[a-1]):(r=this.segl.pts[0],o=this.segl.pts[1]);const h=ObjectUtil$1.GetObjectPtr(t,!1);let c=e;if(h&&h.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(e){case s.KTC:case s.KBC:case s.KRC:case s.KLC:c=o.x===r.x?o.y<r.y?s.KBC:s.KTC:o.x<r.x?s.KRC:s.KLC;break;default:c=e}return LogUtil.Debug("= S.SegmentedLine: GetBestHook output",{bestHookType:c}),c}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.SegmentedLine: MaintainPoint input",{point:t,targetObjectId:e,additionalParams:i,objectToCheck:n,extraParams:s});let a=n,o={},r={},l={};switch(a.DrawingObjectBaseClass){case OptConstant.DrawObjectBaseClass.Line:switch(a.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:let t=!1;for(let i=0;i<a.hooks.length;i++)if(a.hooks[i].targetid===e){a.HookToPoint(a.hooks[i].hookpt,o),t=!0;break}if(!t)return LogUtil.Debug("= S.SegmentedLine: MaintainPoint - no matching hook found, returning true"),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0;l=Utils1.DeepCopy(a),Utils2.CopyRect(l.Frame,o),l.StartPoint.x=o.x,l.StartPoint.y=o.y,l.EndPoint.x=o.x+o.width,l.EndPoint.y=o.y+o.height,a=l}break;case OptConstant.DrawObjectBaseClass.Shape:return PolyUtil.LinesMaintainDist(this,i,s,t),LogUtil.Debug("= S.SegmentedLine: MaintainPoint processed for SHAPE, returning true"),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0}const h=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,null),c=h.length;for(let u=1;u<c;u++){if(r=Utils2.Pt2Rect(h[u],h[u-1]),l=Utils1.DeepCopy(this),Utils2.CopyRect(l.Frame,r),l.StartPoint.x=r.x,l.StartPoint.y=r.y,l.EndPoint.x=r.x+r.width,l.EndPoint.y=r.y+r.height,T3Gv.opt.LineCheckPoint(l,t))return LogUtil.Debug("= S.SegmentedLine: MaintainPoint - LineCheckPoint returned true",{segment:u,lineSegmentRectangle:r}),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0;if(T3Gv.opt.LinesIntersect(l,a,t))return LogUtil.Debug("= S.SegmentedLine: MaintainPoint - LinesIntersect returned true",{segment:u,lineSegmentRectangle:r}),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0}return PolyUtil.LinesMaintainDist(this,i,s,t),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",true),true}}class ArcSegmentedLine extends SegmentedLine{constructor(t){LogUtil.Debug("S.ArcSegmentedLine - Constructor input:",t),(t=t||{}).LineType=t.LineType||OptConstant.LineType.ARCSEGLINE,super(t),LogUtil.Debug("S.ArcSegmentedLine - Constructor output initialized with:",t)}CreateShape(t,e){LogUtil.Debug("S.ArcSegmentedLine - CreateShape input:",{svgContext:t,isPreviewMode:e});let i,n,s,a=[];if(this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.ArcSegmentedLine - CreateShape output:",null),null;const o=t.CreateShape(OptConstant.CSType.ShapeContainer),r=0===this.hoplist.nhops;r?(i=t.CreateShape(OptConstant.CSType.Path),n=t.CreateShape(OptConstant.CSType.Path)):(i=t.CreateShape(OptConstant.CSType.Polyline),n=t.CreateShape(OptConstant.CSType.Polyline)),i.SetID(OptConstant.SVGElementClass.Shape),n.SetID(OptConstant.SVGElementClass.Slop),n.ExcludeFromExport(!0),this.CalcFrame();const l=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let h=this.StyleRecord;h=this.SVGTokenizerHook(h);const c=h.Line.Paint.Color;let u=h.Line.Thickness;const d=h.Line.Paint.Opacity,p=h.Line.LinePattern;u>0&&u<1&&(u=1);const g=l.width,f=l.height;if(o.SetSize(g,f),o.SetPos(l.x,l.y),i.SetSize(g,f),r)a=Instance.Shape.SegmentedLine.prototype.GetPolyPoints.call(this,OptConstant.Common.MaxPolyPoints,!0,!0,null),s=this.UpdateSVG(i,a);else{if(a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0),0!==this.hoplist.nhops){const t=T3Gv.opt.InsertHops(this,a,a.length);a=a.slice(0,t.npts)}i.SetPoints(a)}return i.SetFillColor("none"),i.SetStrokeColor(c),i.SetStrokeOpacity(d),i.SetStrokeWidth(u),0!==p&&i.SetStrokePattern(p),n.SetSize(g,f),r?n.SetPath(s):n.SetPoints(a),n.SetStrokeColor("white"),n.SetFillColor("none"),n.SetOpacity(0),e?n.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):n.SetEventBehavior(OptConstant.EventBehavior.None),n.SetStrokeWidth(u+OptConstant.Common.Slop),o.AddElement(i),o.AddElement(n),this.ApplyStyles(i,h),this.ApplyEffects(o,!1,!0),o.isShape=!0,this.AddIcons(t,o),LogUtil.Debug("S.ArcSegmentedLine - CreateShape output:",o),o}UpdateSVG(t,e){LogUtil.Debug("S.ArcSegmentedLine - updateSVG input:",{svgElement:t,points:e});const i=t.PathCreator();i.BeginPath(),i.MoveTo(e[0].x,e[0].y);let n=e[0].x,s=e[0].y;const a=e.length;2===a&&i.LineTo(e[1].x,e[1].y);for(let r=2;r<a;r++){const t=n,o=s;let l,h,c,u,d;e[r-1].x===e[r].x?(r<a-1?(s=(e[r-1].y+e[r].y)/2,h=Math.abs(e[r-1].y-e[r].y)/2):(h=Math.abs(s-e[r].y),s=e[r].y),l=Math.abs(n-e[r].x),c=s-o,u=(n=e[r].x)-t,d=!(u>=0&&c<0||u<0&&c>=0)):(r<a-1?(l=Math.abs(e[r-1].x-e[r].x)/2,n=(e[r-1].x+e[r].x)/2):(l=Math.abs(n-e[r].x),n=e[r].x),h=Math.abs(s-e[r].y),c=(s=e[r].y)-o,u=n-t,d=!(u<0&&c<0||u>=0&&c>=0)),i.ArcTo(n,s,l,h,0,d,!1,!1)}const o=i.ToString();return t.SetPath(o),LogUtil.Debug("S.ArcSegmentedLine - updateSVG output:",o),o}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.ArcSegmentedLine - GetPolyPoints input:",{numPoints:t,useRelativeCoordinates:e,includeStartPoint:i,unusedFlag:n,unusedParam:s});let a,o,r,l,h,c,u,d,p,g,f,b=[];if(a=Instance.Shape.SegmentedLine.prototype.GetPolyPoints.call(this,OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),c=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),0===this.segl.firstdir&&0===this.segl.lastdir&&(Utils2.IsEqual(c.height,0)||Utils2.IsEqual(c.width,0))){if(b=a,!e)for(o=0,r=b.length;o<r;o++)b[o].x+=c.x,b[o].y+=c.y;return LogUtil.Debug("S.ArcSegmentedLine - GetPolyPoints output:",b),b}if(this.segl&&this.segl.pts.length){for(l=a[0].x,h=a[0].y,r=a.length,i&&b.push(new Point$1(l,h)),o=2;o<r;o++)u=l,d=h,a[o-1].x===a[o].x?(o<r-1?(h=(a[o-1].y+a[o].y)/2,Math.abs(a[o-1].y-a[o].y)):(Math.abs(h-a[o].y),h=a[o].y),Math.abs(l-a[o].x),g=h-d,p=(l=a[o].x)-u,f=!(p>=0&&g<0||p<0&&g>=0)):(o<r-1?(Math.abs(a[o-1].x-a[o].x),l=(a[o-1].x+a[o].x)/2):(Math.abs(l-a[o].x),l=a[o].x),Math.abs(h-a[o].y),g=(h=a[o].y)-d,p=l-u,f=!(p<0&&g<0||p>=0&&g>=0)),i?(b.push(new Point$1(l,h)),b[b.length-1].notclockwise=!f):PolyUtil.EllipseToPoints(b,t/2,u,l,d,h,f);if(!e)for(o=0,r=b.length;o<r;o++)b[o].x+=c.x,b[o].y+=c.y}else b=Instance.Shape.BaseLine.prototype.GetPolyPoints.call(this,t,e,!0,null);return LogUtil.Debug("S.ArcSegmentedLine - GetPolyPoints output:",b),b}GetTextOnLineParams(t){if(LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams input:",t),3!==this.segl.pts.length){const e=Instance.Shape.SegmentedLine.prototype.GetTextOnLineParams.call(this,t);return LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams output:",e),e}switch(this.TextAlign){case TextConstant.TextAlign.TopCenter:case TextConstant.TextAlign.Center:case TextConstant.TextAlign.BottomCenter:{const t=this.GetPolyPoints(22,!1,!1,!1,null),e=[],i={Frame:new Instance.Shape.Rect,StartPoint:new Point$1,EndPoint:new Point$1};i.Frame=Utils2.Pt2Rect(t[0],t[9]);const n=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(t[0],t[9]);return e.push(new Point$1(t[0].x,t[0].y)),e.push(new Point$1(t[9].x,t[9].y)),e.push(new Point$1(t[7].x,t[7].y)),Utils3.RotatePointsAboutCenter(i.Frame,n,e),e[0].y=e[2].y,e[1].y=e[2].y,Utils3.RotatePointsAboutCenter(i.Frame,-n,e),i.StartPoint.x=e[0].x,i.StartPoint.y=e[0].y,i.EndPoint.x=e[1].x,i.EndPoint.y=e[1].y,i.CenterProp=.3,LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams output:",i),i}default:{const e=Instance.Shape.SegmentedLine.prototype.GetTextOnLineParams.call(this,t);return LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams output:",e),e}}}}class BitmapSymbol extends BaseSymbol{constructor(t){t.ShapeType=OptConstant.ShapeType.BitmapSymbol,super(t)}CreateShape(t){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;const e=t.CreateShape(OptConstant.CSType.ShapeContainer),i=t.CreateShape(OptConstant.CSType.Image);i.SetID(OptConstant.SVGElementClass.Shape),i.SetURL(this.SymbolURL);const n=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,s=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;n&&i.SetMirror(n),s&&i.SetFlip(s);const a=this.Frame;this.GetFieldDataStyleOverride();const o=a.width,r=a.height;return e.SetSize(o,r),e.SetPos(a.x,a.y),i.SetSize(o,r),e.AddElement(i),e.isShape=!0,-1!==this.DataID&&this.LMAddSVGTextObject(t,e),e}}class PathPoint{constructor(t,e,i,n,s,a){__publicField(this,"x"),__publicField(this,"y"),__publicField(this,"moveto"),__publicField(this,"arrowhead"),__publicField(this,"curvex"),__publicField(this,"curvey"),this.x=t||0,this.y=e||0,this.moveto=i||!1,this.arrowhead=n||!1,this.curvex=s||0,this.curvey=a||0}}class StepRect{constructor(t,e,i,n){__publicField(this,"h"),__publicField(this,"v"),__publicField(this,"hend"),__publicField(this,"vend"),this.h=t||0,this.v=e||0,this.hend=i||0,this.vend=n||0}}var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$1(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$1(e,i,a),a};class SDHook{constructor(){__publicField(this,"startpoint"),__publicField(this,"endpoint"),__publicField(this,"id"),__publicField(this,"textid"),__publicField(this,"tuniqueid"),__publicField(this,"gap"),__publicField(this,"ogap"),__publicField(this,"extra"),__publicField(this,"comanagerht"),__publicField(this,"isasst"),__publicField(this,"pr"),__publicField(this,"sequence"),__publicField(this,"steps"),this.startpoint={h:0,v:0},this.endpoint={h:0,v:0},this.id=-1,this.textid=-1,this.tuniqueid=-1,this.gap=OptConstant.ConnectorDefines.DefaultWd,this.ogap=0,this.extra=0,this.comanagerht=0,this.isasst=!1,this.pr=new CRect(0,0,0,0),this.sequence=0,this.steps=[]}}__decorateClass$1([Type((()=>CRect))],SDHook.prototype,"pr",2);var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp(e,i,a),a};class SDArray{constructor(){__publicField(this,"styleflags"),__publicField(this,"tilt"),__publicField(this,"angle"),__publicField(this,"ht"),__publicField(this,"wd"),__publicField(this,"flags"),__publicField(this,"matchsizelen"),__publicField(this,"lasttexthook"),__publicField(this,"curveparam"),__publicField(this,"profile"),__publicField(this,"coprofile"),__publicField(this,"steps"),__publicField(this,"hook"),this.styleflags=0,this.tilt=0,this.angle=0,this.ht=0,this.wd=0,this.flags=0,this.matchsizelen=0,this.lasttexthook=-1,this.curveparam=0,this.profile=new CRect(0,0,0,0),this.coprofile=new CRect(0,0,0,0),this.steps=[],this.hook=[]}}__decorateClass([Type((()=>CRect))],SDArray.prototype,"profile",2),__decorateClass([Type((()=>CRect))],SDArray.prototype,"coprofile",2);class Connector extends BaseDrawObject$1{constructor(t){LogUtil.Debug("S.Connector: Input options:",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Connector,t.targflags=NvConstant.HookFlags.LcShape,t.hookflags=NvConstant.HookFlags.LcShape;let e=t.arraylist||new SDArray;null!=t.styleflags?e.styleflags=t.styleflags:e.styleflags=OptConstant.AStyles.PerpConn|OptConstant.AStyles.MinZero,e.ht=null==t.arrayht?OptConstant.ConnectorDefines.DefaultHt:t.arrayht,e.wd=null==t.arraywd?OptConstant.ConnectorDefines.DefaultWd:t.arraywd,e.curveparam=t.curveparam||0;var i=new SDHook;i.startpoint.h=0,i.startpoint.v=0,i.endpoint.h=e.wd,i.endpoint.v=0,e.hook.push(i),t.Frame&&(t.Frame.height=e.ht,t.Frame.width=e.wd),t.EndPoint&&(t.EndPoint.x=e.wd,t.EndPoint.y=e.ht),super(t),__publicField(this,"StartPoint"),__publicField(this,"hoplist"),__publicField(this,"ArrowheadData"),__publicField(this,"StartArrowID"),__publicField(this,"EndArrowID"),__publicField(this,"StartArrowDisp"),__publicField(this,"EndArrowDisp"),__publicField(this,"ArrowSizeIndex"),__publicField(this,"TextDirection"),__publicField(this,"arraylist"),__publicField(this,"vertical"),__publicField(this,"arrayht"),__publicField(this,"arraywd"),__publicField(this,"curveparam"),__publicField(this,"theMinTextDim"),__publicField(this,"TextFlags"),__publicField(this,"EndPoint"),__publicField(this,"lasttexthook"),this.arraylist=e,this.StartPoint=t.StartPoint||{x:0,y:0},this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.TextDirection=t.TextDirection||!1,this.vertical=t.vertical||!1,this.EndPoint=t.EndPoint||{x:this.arraylist.wd,y:this.arraylist.ht},this.theMinTextDim={width:0,height:0},this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!this.TextDirection),LogUtil.Debug("S.Connector: Output instance:",this)}IsChildOfAssistant(){if(LogUtil.Debug("S.Connector: Checking if child of assistant. Hooks:",this.hooks),this.hooks.length){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(LogUtil.Debug("S.Connector: First hook object:",t),t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){const e=t.IsAsstConnector();return LogUtil.Debug("S.Connector: Is assistant connector:",e),e}}return LogUtil.Debug("S.Connector: Not a child of assistant."),!1}LinkNotVisible(){LogUtil.Debug("S.Connector: Checking link visibility.");const t=this.arraylist.styleflags&OptConstant.AStyles.CoManager,e=this.IsChildOfAssistant();if(this.flags&NvConstant.ObjFlags.NotVisible){if(!this.hooks.length||t||e)return LogUtil.Debug("S.Connector: Link is not visible due to hooks, co-manager, or assistant status."),!0;const i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(i&&i.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.Connector: Link is not visible due to first hook object visibility."),!0}return LogUtil.Debug("S.Connector: Link is visible."),!1}GetTextOnLineParams(t){LogUtil.Debug("S.Connector: Input hook:",t);const e={Frame:Utils1.DeepCopy(this.Frame),StartPoint:{x:0,y:0},EndPoint:{x:0,y:0}};return this.vertical?(e.StartPoint.x=t.startpoint.v+this.StartPoint.x,e.StartPoint.y=t.startpoint.h+this.StartPoint.y,e.EndPoint.x=t.endpoint.v+this.StartPoint.x,e.EndPoint.y=t.endpoint.h+this.StartPoint.y):(e.StartPoint.x=t.startpoint.h+this.StartPoint.x,e.StartPoint.y=t.startpoint.v+this.StartPoint.y,e.EndPoint.x=t.endpoint.h+this.StartPoint.x,e.EndPoint.y=t.endpoint.v+this.StartPoint.y),LogUtil.Debug("S.Connector: Output params:",e),e}ChangeBackgroundColor(t,e){LogUtil.Debug("S.Connector: Input newColor:",t,"currentColor:",e),this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Transparent&&this.StyleRecord.Fill.Paint.Color.toLowerCase()===e.toLowerCase()&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),this.StyleRecord.Fill.Paint.Color=t,ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.Connector: Updated StyleRecord.Fill.Paint.Color:",this.StyleRecord.Fill.Paint.Color)}AddSVGTextObject(t,e,i){LogUtil.Debug("S.Connector: Input svgDoc:",t,"parentElement:",e,"hookIndex:",i);let n,s={},a={};void 0===i&&(i=this.arraylist.lasttexthook);const o=this.arraylist.hook[i];this.vertical?(s.x=o.startpoint.v,s.y=o.startpoint.h,a.x=o.endpoint.v,a.y=o.endpoint.h,n=Utils2.Pt2Rect(s,a),Utils2.InflateRect(n,20,0)):(s.x=o.startpoint.h,s.y=o.startpoint.v,a.x=o.endpoint.h,a.y=o.endpoint.v,n=Utils2.Pt2Rect(s,a),Utils2.InflateRect(n,0,20));const r=t.CreateShape(OptConstant.CSType.Rect);r.SetID(OptConstant.SVGElementClass.TextBackground),r.SetUserData(i),r.SetStrokeWidth(0);const l=this.StyleRecord.Fill.Paint.Color;r.SetFillColor(l),this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent?r.SetOpacity(0):r.SetOpacity(this.StyleRecord.Fill.Paint.Opacity);const h=t.CreateShape(OptConstant.CSType.Text);h.SetID(OptConstant.SVGElementClass.Text),h.SetUserData(i),h.SetRenderingEnabled(!1),h.SetSize(n.width,n.height),h.SetSpellCheck(this.AllowSpell()),h.InitDataSettings(this.fieldDataTableID,this.fieldDataElemID),e.AddElement(r),e.AddElement(h),e.isText=!0,i===this.arraylist.lasttexthook&&(e.textElem=h);const c=T3Gv.stdObj.GetObject(o.textid);c.Data.runtimeText?(c.Data.runtimeText.vAlign="top",h.SetRuntimeText(c.Data.runtimeText)):(h.SetText(""),h.SetParagraphAlignment(this.TextAlign),h.SetVerticalAlignment("top")),c.Data.runtimeText||(c.Data.runtimeText=h.GetRuntimeText()),h.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,n.height),this.bInGroup&&h.DisableHyperlinks(!0),h.SetRenderingEnabled(!0),Instance.Shape.BaseLine.prototype.TextDirectionCommon.call(this,h,r,!1,o),h.SetEditCallback(T3Gv.opt.TextCallback,e),LogUtil.Debug("S.Connector: Output textElement:",h)}CreateShape(t,e){LogUtil.Debug("S.Connector: Input svgDoc:",t,"isHidden:",e);let i=(this.arraylist.styleflags&OptConstant.AStyles.CoManager)>0,n=this.IsChildOfAssistant(),s=this.IsFlowChartConnector(),a=this.IsGenoConnector(),o=this.objecttype===NvConstant.FNObjectTypes.CauseEffectMain,r=OptConstant.ConnectorDefines.NSkip;if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),this.flags&NvConstant.ObjFlags.NotVisible){if(this.hooks.length&&!i&&!n&&!s&&!o&&!a){let e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(e&&!(e.flags&NvConstant.ObjFlags.NotVisible)){let e=t.CreateShape(OptConstant.CSType.ShapeContainer);return this.CreateCollapseButton(t,e,!0),e.ExcludeFromExport(!0),LogUtil.Debug("S.Connector: Output shapeContainer:",e),e}}return LogUtil.Debug("S.Connector: Output null due to visibility."),null}let l=t.CreateShape(OptConstant.CSType.PolyPolyline);l.SetID(OptConstant.SVGElementClass.Shape);let h=t.CreateShape(OptConstant.CSType.PolyPolyline);h.SetID(OptConstant.SVGElementClass.Slop),h.ExcludeFromExport(!0);let c=this.Frame,u=this.StyleRecord,d=u.Line.Paint.Color,p=u.Line.Thickness,g=u.Line.Paint.Opacity,f=u.Line.LinePattern,b=c.width,v=c.height,m=t.CreateShape(OptConstant.CSType.ShapeContainer);return m.SetSize(b,v),m.SetPos(c.x,c.y),l.SetSize(b,v),l.SetFillColor("none"),l.SetStrokeColor(d),l.SetStrokeOpacity(g),l.SetStrokeWidth(p),0!==f&&l.SetStrokePattern(f),h.SetSize(b,v),h.SetStrokeColor("white"),h.SetFillColor("none"),h.SetOpacity(0),e?h.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):h.SetEventBehavior(OptConstant.EventBehavior.None),h.SetStrokeWidth(p+OptConstant.Common.SlopShapeExtra),m.AddElement(l),m.AddElement(h),this.ApplyStyles(l,u),this.ApplyEffects(m,!1,!0),i||n||s||o||a||this.CreateCollapseButton(t,m,!1),m.isShape=!0,this.arraylist.hook.length>r&&this.AddIcons(t,m),LogUtil.Debug("S.Connector: Output shapeContainer:",m),m}AddIcon(t,e,i){if(LogUtil.Debug("S.Connector: Input svgDoc:",t,"parentElement:",e,"iconParams:",i),e){const t=this.IsFlowChartConnector(),n=this.Frame;this.nIcons,t&&(this.hooks.length>0?this.hooks[0].hookpt===OptConstant.HookPts.LL||this.hooks[0].hookpt===OptConstant.HookPts.LT?this.vertical?(i.y=this.iconShapeRightOffset+this.nIcons*this.iconSize,i.x=n.width-this.iconShapeBottomOffset-this.iconSize):(i.x=this.iconShapeRightOffset+this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize):(i.x=n.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize):this.arraylist.hook.length>OptConstant.ConnectorDefines.NSkip+1?this.vertical?(i.y=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip+1].startpoint.h+this.iconShapeRightOffset+this.nIcons*this.iconSize,i.x=n.width-this.iconShapeBottomOffset-this.iconSize):(i.x=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip+1].startpoint.h+this.iconShapeRightOffset+this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize):(i.x=n.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize));const s=this.GenericIcon(i);return this.nIcons++,e.AddElement(s),LogUtil.Debug("S.Connector: Output iconElement:",s),s}}PostCreateShapeCallback(t,e,i,n){if(LogUtil.Debug("S.Connector: PostCreateShapeCallback input:",t,e,i,n),!(this.flags&NvConstant.ObjFlags.NotVisible)){let i,n,s=OptConstant.ConnectorDefines.NSkip,a=e.GetElementById(OptConstant.SVGElementClass.Shape),o=e.GetElementById(OptConstant.SVGElementClass.Slop),r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),l=!1;if(this.arraylist&&(n=(i=this.arraylist.hook.length)-s,n<0&&(n=0),0===n&&i>=s))for(let t=0;t<s;t++)this.arraylist.hook[t].id>=0&&n++;this.hooks.length&&(l=!0),!n&&l&&this.UpdateSVG(t,a,r),this.UpdateSVG(t,o,r);for(let h=0;h<i;h++)this.arraylist.hook[h].textid>=0&&this.AddSVGTextObject(t,e,h)}LogUtil.Debug("S.Connector: PostCreateShapeCallback output:",this)}SetRuntimeEffects(t){LogUtil.Debug("S.Connector: SetRuntimeEffects input:",t);const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);e&&this.ApplyEffects(e,t,!0),LogUtil.Debug("S.Connector: SetRuntimeEffects output:",this)}ApplyStyles(t,e){LogUtil.Debug("S.Connector: ApplyStyles input - shape:",t,"styleRecord:",e);const i=e.Line.Paint.FillType;if(t.SetStrokeOpacity(e.Line.Paint.Opacity),i===NvConstant.FillTypes.Gradient){const i=this.CreateGradientRecord(e.Line.Paint.GradientFlags,e.Line.Paint.Color,e.Line.Paint.Opacity,e.Line.Paint.EndColor,e.Line.Paint.EndOpacity);t.SetGradientStroke(i)}else if(i===NvConstant.FillTypes.RichGradient)t.SetGradientStroke(this.CreateRIchGradientRecord(e.Line.Paint.GradientFlags));else if(i===NvConstant.FillTypes.Texture){const i={url:"",scale:e.Line.Paint.TextureScale.Scale,alignment:e.Line.Paint.TextureScale.AlignmentScalar},n=e.Line.Paint.Texture;i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.url,t.SetTextureStroke(i)}else i===NvConstant.FillTypes.Solid?t.SetStrokeColor(e.Line.Paint.Color):t.SetStrokeColor("none");LogUtil.Debug("S.Connector: ApplyStyles output - shape:",t)}CreateRIchGradientRecord(t){throw new Error("Method not implemented.")}GetDimensionPoints(){LogUtil.Debug("S.Connector: GetDimensionPoints input:",{Dimensions:this.Dimensions,Frame:this.Frame});let t,e=[],i=[],n=0,s=0,a=0,o=0,r={x:0,y:0},l={x:0,y:0};if(this.Dimensions&NvConstant.DimensionFlags.EndPts)e.push(new Point$1(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y)),e.push(new Point$1(this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y));else if(this.Dimensions&NvConstant.DimensionFlags.Total){for(i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),n=1;n<i.length;n++)a=Math.abs(i[n-1].x-i[n].x),o=Math.abs(i[n-1].y-i[n].y),s+=Math.sqrt(a*a+o*o);let h={x:this.Frame.width/2,y:this.Frame.height/2};r.x=h.x-s/2,r.y=h.y,e.push(new Point$1(r.x,r.y)),l.x=h.x+s/2,l.y=h.y,e.push(new Point$1(l.x,l.y)),t=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(new Point$1(0,0),new Point$1(this.Frame.width,this.Frame.height)),Utils3.RotatePointsAboutPoint(h,t,e)}else e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);return LogUtil.Debug("S.Connector: GetDimensionPoints output:",e),e}FindTextLabel(t){LogUtil.Debug("S.Connector: _findTextLabel input:",t);const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),i=OptConstant.ConnectorDefines.NSkip;let n={},s=-1;const a=OptConstant.AStyles,o=Boolean(this.arraylist.styleflags&a.Linear),r=Boolean(this.arraylist.styleflags&a.FlowConn);if(t){const a=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),r=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(r){const e=r.GetTargetForEvent(t),n=e.GetID();n!==OptConstant.SVGElementClass.TextBackground&&n!==OptConstant.SVGElementClass.Text||(s=parseInt(e.GetUserData(),10),!o&&s<i&&(s=i))}if(s<0&&this.arraylist.hook.length>=i){const t=Utils3.LineDStyleHit(e,a,this.StyleRecord.Line.Thickness,0,n);void 0!==n.lpHit&&t&&(s=Math.round((n.lpHit-.1)/2),o&&s===i&&(this.arraylist.hook.length>=i+1?s++:s=-1))}}return s<0&&(s=this.arraylist.lasttexthook),s<i&&this.arraylist.hook.length>=i&&(o&&r?this.hooks.length>0?s=this.hooks[0].hookpt===OptConstant.HookPts.LR||this.hooks[0].hookpt===OptConstant.HookPts.LT?OptConstant.ConnectorDefines.ACr:OptConstant.ConnectorDefines.ACl:this.arraylist.hook.length>=i+1&&(s=i+1):s<0&&this.arraylist.hook.length>=i&&(s=i)),LogUtil.Debug("S.Connector: _findTextLabel output:",s),s}SetTextObject(t){LogUtil.Debug("S.Connector: SetTextObject input textId:",t);const e=OptConstant.ConnectorDefines.NSkip;let i=this.arraylist.lasttexthook;const n=this.arraylist.hook.length,s=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),a=ShapeUtil.TextAlignToWin(this.TextAlign),o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);return this.StyleRecord.Fill.Paint.Color=o.background.Paint.Color,a.vjust===TextConstant.TextJust.Center?(this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid,this.StyleRecord.Fill.Paint.Opacity=1):this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent,-2===t?(LogUtil.Debug("S.Connector: SetTextObject output: false (textId is -2)"),!1):n>=e?(s?i=this.FindTextLabel():i<e&&(i=e),i>=n&&(i=n-1),this.arraylist.hook[i].textid=t,this.DataID=t,this.arraylist.lasttexthook=i,t<0&&(this.arraylist.lasttexthook=-1),LogUtil.Debug("S.Connector: SetTextObject output: true"),!0):(LogUtil.Debug("S.Connector: SetTextObject output: false"),!1)}GetTextObject(t,e,i){let n;if(LogUtil.Debug("S.Connector: GetTextObject input:",{inputEvent:t,hookContext:i}),null===t&&null!==i?n=i.hookindex:(n=this.FindTextLabel(t),null!==i&&(i.hookindex=n)),n<0)return LogUtil.Debug("S.Connector: GetTextObject output:",null),null;const s=this.arraylist.hook[n];if(void 0===s)return LogUtil.Debug("S.Connector: GetTextObject output:",null),null;this.DataID=s.textid,this.arraylist.lasttexthook=n;const a=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);return a&&(a.textElem=a.GetElementById(OptConstant.SVGElementClass.Text,n)),LogUtil.Debug("S.Connector: GetTextObject output:",s.textid),s.textid}AdjustTextEditBackground(t,e){if(LogUtil.Debug("S.Connector: AdjustTextEditBackground input - newColor:",t,"svgDoc:",e),-1!==this.DataID){const t=this.arraylist.hook.length;if(this.arraylist.lasttexthook>=0&&this.arraylist.lasttexthook<t){const t=this.arraylist.hook[this.arraylist.lasttexthook],i=e||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(i){const n=i.GetElementById(OptConstant.SVGElementClass.TextBackground,this.arraylist.lasttexthook),s=i.GetElementById(OptConstant.SVGElementClass.Text,this.arraylist.lasttexthook);if(s&&n){const i=null==e;Instance.Shape.BaseLine.prototype.TextDirectionCommon.call(this,s,n,i,t)}}}}LogUtil.Debug("S.Connector: AdjustTextEditBackground output - DataID:",this.DataID)}UpdateSVG(t,e,i){LogUtil.Debug("S.Connector: UpdateSVG input:",{svgDoc:t,shapeElement:e,polyPoints:i}),e.Clear();const n=OptConstant.AStyles,s=!!(this.arraylist.styleflags&n.Linear);let a=T3Gv.arrowHlkTable[this.StartArrowID],o=T3Gv.arrowHlkTable[this.EndArrowID];const r=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===a.id&&(a=null),0===o.id&&(o=null),e.SetArrowheads(a,r,o,r,this.StartArrowDisp,this.EndArrowDisp);const l=i.length;let h=0;for(;h<l;){if(i[h].curvex||i[h].curvey){let t,n=[],a=1,o=1,r=this.vertical;s&&(r=!r),r?(i[h].curvey>0?(t=i[h].curvey,i[h].curvex>0&&(o=-1),a=-1):(t=i[h].curvey,i[h].curvex<0&&(o=-1),i[h].curvey<0&&(a=-1)),n=T3Gv.opt.LinesAddCurve(r,a,o,i[h].x+i[h].curvex,i[h].y,t)):(i[h].curvex>0?(t=i[h].curvex,i[h].curvey>0&&(o=-1),a=-1):(t=i[h].curvex,i[h].curvey<0&&(o=-1),i[h].curvex<0&&(a=-1)),n=T3Gv.opt.LinesAddCurve(r,a,o,i[h].x,i[h].y+i[h].curvey,t)),e.AddPolyLine(n,!1,!1)}let t=[];t.push({x:i[h].x,y:i[h].y});const n=i[h].arrowhead;let a=!1;for(h++;h<l&&!i[h].moveto;)t.push({x:i[h].x,y:i[h].y}),(h===l-1||i[h+1].moveto)&&(a=i[h].arrowhead),h++;t.length>1&&e.AddPolyLine(t,n,a)}e.BuildPath(),LogUtil.Debug("S.Connector: UpdateSVG output:",e)}CreateCollapseButton(t,e,i){let n,s;LogUtil.Debug("S.Connector: CreateCollapseButton input:",{svgDocument:t,parentElement:e,adjustCollapse:i});const a=OptConstant.Common.CKnobSize,o=OptConstant.AStyles,r=0!=(this.arraylist.styleflags&o.ReverseCol),l=0!=(this.arraylist.styleflags&o.BothSides)||0==(this.arraylist.styleflags&o.PerpConn),h=0!=(this.arraylist.styleflags&o.Radial)&&!l,c=a;let u=0,d=0;const p={};s=this.arraylist?this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip:0,s<0&&(s=0);let g,f=!1;if(this.hooks.length>0){switch(f=!0,g=this.HookToPoint(this.hooks[0].hookpt,p),h?this.vertical?(d=0,u=a):(u=0,d=a):0===p.width?d=a:u=a,this.hooks[0].hookpt){case OptConstant.HookPts.LR:case OptConstant.HookPts.LB:u=-u,d=-d}r&&(d=-d),g.x+=u,g.y+=d}if(0!==s&&f){const s={svgDoc:t,iconSize:c,imageURL:null,iconID:OptConstant.Common.HitAreas,userData:OptConstant.HitAreaType.ConnExpand,cursorType:CursorConstant.CursorType.AddPlus,x:g.x-this.Frame.x-c/2,y:g.y-this.Frame.y-c/2};this.extraflags&OptConstant.ExtraFlags.CollapseConn?(s.imageURL=OptConstant.Common.ConPlusPath,s.userData=OptConstant.HitAreaType.ConnExpand):(s.imageURL=OptConstant.Common.ConMinusPath,s.userData=OptConstant.HitAreaType.ConnCollapse),n=this.GenericIcon(s),i&&(e.SetSize(c,c),e.SetPos(this.Frame.x,this.Frame.y),e.isShape=!0),e.AddElement(n)}LogUtil.Debug("S.Connector: CreateCollapseButton output:",{collapseButton:n})}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.Connector: CreateActionTriggers input:",{svgDoc:t,targetId:e,extraParam:i,refId:n});const s=t.CreateShape(OptConstant.CSType.Group),a=OptConstant.Common.KnobSize,o=OptConstant.AStyles,r=this.arraylist.styleflags&o.ReverseCol,l=OptConstant.ConnectorDefines;let h=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(h*=2);const c=a/h,u=this.arraylist&&this.arraylist.hook?this.arraylist.hook.length:0;if(u<=l.NSkip)return LogUtil.Debug("S.Connector: CreateActionTriggers output:",s),s;const d=(this.arraylist.styleflags&o.BothSides)>0||0==(this.arraylist.styleflags&o.PerpConn),p=Boolean(this.arraylist.styleflags&o.Linear),g=this.Frame;let f=g.width+c,b=g.height+c;const v=Utils1.DeepCopy(g);v.x-=c/2,v.y-=c/2,v.width+=c,v.height+=c;const m=ObjectUtil$1.GetObjectPtr(e,!1);let y,S;this.vertical?(y=CursorConstant.CursorType.ResizeTB,S=CursorConstant.CursorType.ResizeLR):(y=CursorConstant.CursorType.ResizeLR,S=CursorConstant.CursorType.ResizeTB);const w=r?-1:1;let x={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:c,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:y};e!==n&&(x.fillColor="white",x.fillOpacity=0,x.strokeSize=1,x.strokeColor="black"),this.flags&NvConstant.ObjFlags.Lock?(x.fillColor="gray",x.locked=!0):this.NoGrow()&&(x.fillColor="red",x.strokeColor="red",S=CursorConstant.CursorType.Default,y=CursorConstant.CursorType.Default);{x.x=this.StartPoint.x-g.x,x.y=this.StartPoint.y-g.y,x.knobID=OptConstant.ActionTriggerType.LineStart;const t=this.GenericKnob(x);s.AddElement(t);var C=t}{x.x=this.EndPoint.x-g.x,x.y=this.EndPoint.y-g.y,x.knobID=OptConstant.ActionTriggerType.LineEnd;const t=this.GenericKnob(x);s.AddElement(t);var D=t}if(m&&m.hooks&&u>1)for(let k=0;k<m.hooks.length;k++){const t=Utils1.DeepCopy(x);let e;if(d){switch(m.hooks[k].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:e=OptConstant.ConnectorDefines.ACl,s.RemoveElement(C);break;default:e=OptConstant.ConnectorDefines.ACr,s.RemoveElement(D)}x.cursorType=y,x.shapeType=OptConstant.CSType.Oval,x.fillColor="white",x.fillOpacity=.01,x.strokeSize=1,x.strokeColor="green"}else e=OptConstant.ConnectorDefines.ACl,x.cursorType=S;if(e>0){const i=this.arraylist.hook[e];this.vertical?(x.x=i.startpoint.v+this.StartPoint.x-g.x,x.y=i.startpoint.h+this.StartPoint.y-g.y,d&&(x.y+=w*(i.endpoint.h-i.startpoint.h)/2)):(x.x=i.startpoint.h+this.StartPoint.x-g.x,x.y=i.startpoint.v+this.StartPoint.y-g.y,d&&(x.x+=w*(i.endpoint.h-i.startpoint.h)/2)),x.knobID=OptConstant.ActionTriggerType.ConnectorHook;const n=this.GenericKnob(x);n.SetUserData(e),s.AddElement(n),x=Utils1.DeepCopy(t)}}if(!p&&this.objecttype!==NvConstant.FNObjectTypes.CauseEffectMain){x.shapeType=OptConstant.CSType.Rect,x.cursorType=S;for(let t=l.NSkip;t<u;t++){const e=this.arraylist.hook[t];this.vertical?(x.x=e.endpoint.v+this.StartPoint.x-g.x,x.y=w*e.endpoint.h+this.StartPoint.y-g.y):(x.x=e.endpoint.h+this.StartPoint.x-g.x,x.y=e.endpoint.v+this.StartPoint.y-g.y),x.knobID=OptConstant.ActionTriggerType.ConnectorRerp;const i=this.GenericKnob(x);i.SetUserData(t-l.NSkip),s.AddElement(i)}}const T=this.PrGetStubIndex();for(let k=l.NSkip+1;k<u&&(p||d||!(u-l.NSkip<=2))&&!(d&&++k>=u);k++){const t=this.arraylist.hook[k-1],e=this.arraylist.hook[k];x.cursorType=y,x.shapeType=OptConstant.CSType.Oval,x.fillColor="white",x.fillOpacity=.01,x.strokeSize=1,x.strokeColor="green",this.vertical?p?(T===l.ACr?x.y=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.y-g.y-e.extra/2:x.y=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.y-g.y+e.extra/2,x.x=t.startpoint.v+this.StartPoint.x-g.x):(x.y=w*((t.endpoint.h+e.endpoint.h)/2)+this.StartPoint.y-g.y+w*e.extra/2,x.x=t.startpoint.v+this.StartPoint.x-g.x+(e.startpoint.v-t.startpoint.v)/2):p?(T===l.ACr?x.x=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.x-g.x-e.extra/2:x.x=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.x-g.x+e.extra/2,x.y=t.startpoint.v+this.StartPoint.y-g.y):(x.x=(t.endpoint.h+e.endpoint.h)/2+this.StartPoint.x-g.x+e.extra/2,x.y=t.startpoint.v+this.StartPoint.y-g.y),x.knobID=OptConstant.ActionTriggerType.ConnectorAdj;const i=this.GenericKnob(x);if(i.SetUserData(k),s.AddElement(i),this.AllowTextEdit()){const t=i.DOMElement(),e=Hammer(t),n=Evt_ShapeDoubleTapFactory(this);e.on("doubletap",n)}}return s.SetSize(f,b),s.SetPos(v.x,v.y),s.isShape=!0,s.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.Connector: CreateActionTriggers output:",s),s}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("S.Connector: CreateConnectHilites input:",{svgDoc:t,targetElement:e,hookIndex:s});const o=OptConstant.AStyles,r=t.CreateShape(OptConstant.CSType.Group);let l,h,c=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(c*=2);const u=OptConstant.Common.ConnPointDim/c,d=[{x:0,y:0},{x:0,y:0}];let p=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcHookNoExtra,s);if(null!=p){const i=this.GetPerimPts(e,p,null,!0,null,s),n=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,a=this.Frame;let c=a.width,g=a.height;const f=Utils1.DeepCopy(a);f.x-=u/2,f.y-=u/2,f.width+=u,f.height+=u,c+=u,g+=u;const b={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:0,y:0,knobSize:u,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",KnobID:0,cursorType:CursorConstant.CursorType.Anchor},v=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),m=Boolean(this.arraylist.styleflags&o.BothSides)||0==(this.arraylist.styleflags&o.PerpConn),y=Boolean(this.arraylist.styleflags&o.Radial)&&!m,S=Boolean(this.arraylist.styleflags&o.BothSides),w=this.arraylist.angle;let x;y&&n>0&&(x=this.vertical?{x:this.StartPoint.x-this.Frame.x,y:this.StartPoint.y-this.Frame.y+this.arraylist.hook[OptConstant.ConnectorDefines.ACl].startpoint.h}:{x:this.StartPoint.x-this.Frame.x+this.arraylist.hook[OptConstant.ConnectorDefines.ACl].startpoint.h,y:this.StartPoint.y-this.Frame.y});for(let t=0;t<i.length;t++){b.x=i[t].x-this.Frame.x,b.y=i[t].y-this.Frame.y,d.length=2,l=this.GenericKnob(b);let e=!1;if(this.vertical){if(0===t)if(n<=0)m?(d[0].x=this.StartPoint.x-this.Frame.x+u/2,d[0].y=this.StartPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2,d[1].y=this.EndPoint.y-this.Frame.y,d.push(new Point$1(b.x+u/2,b.y+u/2)),e=!0):(d[0].x=this.StartPoint.x-this.Frame.x,d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[1].x=this.EndPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2,d.push(new Point$1(b.x+u/2,b.y+u/2)),e=!0);else if(y)d[0].x=x.x,d[0].y=x.y,d[1].x=b.x+u/2,d[1].y=b.y+u/2,e=!0;else{let t=0;this.arraylist.angle&&(t=b.y*this.arraylist.angle),d[0].x=this.StartPoint.x-this.Frame.x+u/2+t,d[0].y=this.StartPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2+t,d[1].y=b.y+u/2,d.push(new Point$1(b.x+u/2,b.y+u/2)),(S||w)&&d.shift(),e=!0}else if(t!==n||y)if(v)i[t].x!==this.StartPoint.x&&(d[0].x=this.StartPoint.x-this.Frame.x+u/2,d[0].y=b.y+u/2,d[1].x=b.x+u/2,d[1].y=b.y+u/2,e=!0);else if(y){switch(p[t].y){case OptConstant.ConnectorDefines.Above:d[0].x=this.StartPoint.x-this.Frame.x-this.arraylist.ht,d[0].y=b.y+u/2,d[1].x=b.x+u/2,d[1].y=b.y+u/2;break;case OptConstant.ConnectorDefines.Below:d[0].x=this.StartPoint.x-this.Frame.x+this.arraylist.ht,d[0].y=b.y+u/2,d[1].x=b.x+u/2,d[1].y=b.y+u/2;break;default:d[0].x=x.x,d[0].y=x.y,d[1].x=b.x+u/2,d[1].y=b.y+u/2}e=!0}else{let t=0;this.arraylist.angle&&(t=b.y*this.arraylist.angle),d[0].x=this.StartPoint.x-this.Frame.x+u/2+t,d[0].y=b.y+u/2,d[1].x=b.x+u/2,d[1].y=b.y+u/2,e=!0}else if(this.arraylist.angle){let t=b.y*this.arraylist.angle;d[0].x=this.StartPoint.x-this.Frame.x+u/2+t,d[0].y=this.EndPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2+t,d[1].y=b.y+u/2,d.push(new Point$1(b.x+u/2,b.y+u/2)),(S||w)&&d.shift(),e=!0}}else if(0===t)if(n<=0)m?(d[0].x=this.StartPoint.x-this.Frame.x,d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[1].x=this.EndPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2,d.push(new Point$1(b.x+u/2,b.y+u/2)),e=!0):(d[0].x=this.StartPoint.x-this.Frame.x+u/2,d[0].y=this.StartPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2,d[1].y=this.EndPoint.y-this.Frame.y,d.push(new Point$1(b.x+u/2,b.y+u/2)),e=!0);else if(y)d[0].y=x.y,d[0].x=x.x,d[1].y=b.y+u/2,d[1].x=b.x+u/2,e=!0;else{let t=0;this.arraylist.angle&&(t=b.x*this.arraylist.angle),d[0].y=this.StartPoint.y-this.Frame.y+u/2+t,d[0].x=this.StartPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2+t,d[1].x=b.x+u/2,d.push(new Point$1(b.x+u/2,b.y+u/2)),(S||w)&&d.shift(),e=!0}else if(t!==n||y)if(v)i[t].y!==this.StartPoint.y&&(d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[0].x=b.x+u/2,d[1].y=b.y+u/2,d[1].x=b.x+u/2,e=!0);else if(y){switch(p[t].y){case OptConstant.ConnectorDefines.Above:d[0].y=this.StartPoint.y-this.Frame.y-this.arraylist.ht,d[0].x=b.x+u/2,d[1].y=b.y+u/2,d[1].x=b.x+u/2;break;case OptConstant.ConnectorDefines.Below:d[0].y=this.StartPoint.y-this.Frame.y+this.arraylist.ht,d[0].x=b.x+u/2,d[1].y=b.y+u/2,d[1].x=b.x+u/2;break;default:d[0].y=x.y,d[0].x=x.x,d[1].y=b.y+u/2,d[1].x=b.x+u/2}e=!0}else d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[0].x=b.x+u/2,d[1].y=b.y+u/2,d[1].x=b.x+u/2,e=!0;else if(this.arraylist.angle){let t=b.x*this.arraylist.angle;d[0].y=this.StartPoint.y-this.Frame.y+u/2+t,d[0].x=this.EndPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2+t,d[1].x=b.x+u/2,d.push(new Point$1(b.x+u/2,b.y+u/2)),(S||w)&&d.shift(),e=!0}r.AddElement(l),e&&(h=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polyline),h&&(h.SetPoints(d),h.SetFillColor("none"),h.SetStrokeColor("black"),h.SetStrokePattern("2,2"),h.SetStrokeWidth(1),r.AddElement(h)))}return r.SetSize(c,g),r.SetPos(f.x,f.y),r.isShape=!0,r.SetID("hilite_"+e),LogUtil.Debug("S.Connector: CreateConnectHilites output:",r),r}}SetCursors(){LogUtil.Debug("S.Connector: SetCursors input");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(Instance.Shape.BaseDrawObject.prototype.SetCursors.call(this),OptCMUtil.GetEditMode()===NvConstant.EditState.Default&&t){const e=t.GetElementById(OptConstant.Common.HitAreas);e&&e.SetCursor(CursorConstant.CursorType.AddPlus)}LogUtil.Debug("S.Connector: SetCursors output")}GetArrowheadSelection(t){return LogUtil.Debug("S.Connector: GetArrowheadSelection input:",t),t&&(t.StartArrowID=this.StartArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowID=this.EndArrowID,t.EndArrowDisp=this.EndArrowDisp,t.ArrowSizeIndex=this.ArrowSizeIndex),LogUtil.Debug("S.Connector: GetArrowheadSelection output:",t),!0}RightClick(t){const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(!SelectUtil.SelectObjectFromClick(t,i))return!1;const n=i.GetID(),s=ObjectUtil$1.GetObjectPtr(n,!1);if(s){if(s.GetTextObject()>=0){const e=i.textElem;if(e){e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)>=0&&TextUtil.ActivateTextEdit(i,t,!0)}}const e=OptConstant.AStyles;s.arraylist.styleflags,e.CoManager,s.arraylist.styleflags,e.PerpConn,s.arraylist.hook.length}if(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=i.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();e&&e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY),UIUtil.ShowContextMenu(!0,"Connector","Editable")}else QuasarUtil.ShowContextMenu(!0,"Connector","Default")}HitAreaClick(t){LogUtil.Debug("S.Connector: HitAreaClick input:",t),T3Gv.opt.CloseEdit();let e=this;switch(t){case OptConstant.HitAreaType.ConnCollapse:e.CollapseConnector(!0,!1,!0);break;case OptConstant.HitAreaType.ConnExpand:e.CollapseConnector(!1,!1,!0)}OptAhUtil.FindTreeTop(e,DSConstant.LinkFlags.Move,{topconnector:-1,topshape:-1,foundtree:!1}),DrawUtil.CompleteOperation(),LogUtil.Debug("S.Connector: HitAreaClick output")}GetPolyPoints(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g,f,b,v=[],m={},y=OptConstant.AStyles;const S=this.arraylist.styleflags&y.CoManager,w=(this.arraylist.styleflags&y.PerpConn)>0,x=this.arraylist.styleflags&y.StartLeft,C=this.IsAsstConnector(),D=OptConstant.ConnectorDefines.NSkip,T=this.arraylist.styleflags&y.ReverseCol,k=this.arraylist.styleflags&OptConstant.AStyles.Linear,$=this.arraylist.styleflags&OptConstant.AStyles.FlowConn&&k,O=0!==this.arraylist.angle,P=OptConstant.ConnectorDefines.ACl,L=this.StartArrowID>0,G=0===this.EndArrowID&&L;let F=!1;const I=this.arraylist.curveparam;let E=0;o=this.arraylist.hook.length,e?(m.x=this.StartPoint.x-this.Frame.x,m.y=this.StartPoint.y-this.Frame.y):m=this.StartPoint;const A=o==D+1&&0==(this.arraylist.styleflags&y.PerpConn),U={index:-1,left:!1};if(this.AllowCurveOnConnector(U)&&(o>D+1||A)&&I>0&&!i){E=I;let t=this.arraylist.ht-function(t){let e,i=0;for(a=0;a<o;a++)if(e=t.arraylist.hook[a],e.comanagerht>i){i=e.comanagerht;break}return i}(this);t<0&&(t=0),C&&!this.vertical?E>this.arraylist.wd&&(E=this.arraylist.wd):E>t&&(E=t)}if(this.vertical){for(d=T?-1:1,h=this.arraylist.ht,a=0;a<o;a++){const t=this.arraylist.hook[a];if(p=Utils2.IsEqual(t.startpoint.v+m.x,t.endpoint.v+m.x)&&Utils2.IsEqual(d*t.startpoint.h+m.y,d*t.endpoint.h+m.y),g=(a>=D||$)&&!S&&!C&&!p&&!F,a!==P||!G||p||$||O||(g=!0,F=!0),a===D&&g&&L&&$&&(g=!1),g&&a===P){let e=!1;$&&o>D&&!L&&(f=this.arraylist.hook[D],e=!Utils2.IsEqual(f.startpoint.h+m.x,f.endpoint.h+m.x)&&Utils2.IsEqual(f.startpoint.v+m.y,f.endpoint.v+m.y)),e&&(g=!1),C&&E&&a===P?(v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!0,g)),t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+m.x-E,d*t.startpoint.h+m.y,!1,g)):v.push(new PathPoint(t.startpoint.v+m.x+E,d*t.startpoint.h+m.y,!1,g))):E&&a===P&&A?(v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!0,g)),v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y-d*E,!1,g))):(v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!0,g)),v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y,!1,g)))}else if(a===U.index&&E){let e=1;this.arraylist.hook[P].endpoint.v>0&&(e=-1),U.left?(v.push(new PathPoint(t.startpoint.v+m.x,t.startpoint.h+m.y+E,!0,g,-e*E,E)),v.push(new PathPoint(t.endpoint.v+m.x,t.endpoint.h+m.y-2*E,!1,g))):(v.push(new PathPoint(t.startpoint.v+m.x,t.startpoint.h+m.y+E,!0,g,-e*E,-E)),v.push(new PathPoint(t.endpoint.v+m.x,t.endpoint.h+m.y,!1,g)))}else if(E&&a===P&&A)v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y-d*E,!0,g)),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!1,g));else if(E&&0===a){if(t.endpoint.v===t.startpoint.v&&t.endpoint.h===t.startpoint.h&&C){v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y,!0,g)),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!1,g));continue}w?v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y+E,!0,g)):A?v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y-E,!0,g)):v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y,!0,g));let e=d*E;A&&(e=E),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y-e,!1,g))}else E&&a===D&&w?(b=E,t.endpoint.h===t.startpoint.h&&t.endpoint.v===t.startpoint.v&&(b=0),t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+m.x-b,d*t.startpoint.h+m.y,!0,g,b,b)):v.push(new PathPoint(t.startpoint.v+m.x+b,d*t.startpoint.h+m.y,!0,g,-b,b)),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!1,g))):E&&a===o-1&&0===k?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+m.x-E,d*t.startpoint.h+m.y,!0,g,E,-d*E)):v.push(new PathPoint(t.startpoint.v+m.x+E,d*t.startpoint.h+m.y,!0,g,-E,-d*E)),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!1,g))):C&&E&&a===P?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+m.x-E,d*t.startpoint.h+m.y,!0,g)):v.push(new PathPoint(t.startpoint.v+m.x+E,d*t.startpoint.h+m.y,!0,g)),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!1,g))):(v.push(new PathPoint(t.startpoint.v+m.x,d*t.startpoint.h+m.y,!0,g)),v.push(new PathPoint(t.endpoint.v+m.x,d*t.endpoint.h+m.y,!1,g)))}if(S)for(x?(r=this.arraylist.coprofile.v,u=-1):(r=this.arraylist.coprofile.vdist,u=1),a=0;a<o;a++){const t=this.arraylist.hook[a];c=x?t.pr.v:t.pr.vdist,l=c?r-(c+2*h):0,E&&0===a?(v.push(new PathPoint(t.startpoint.v+m.x+u*r,t.startpoint.h+m.y+E,!0,!1)),v.push(new PathPoint(-t.endpoint.v-u*l+m.x+u*r,t.endpoint.h+m.y-E,!1,!1))):E&&a===D?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+m.x+u*r+E,t.startpoint.h+m.y,!0,!1,-E,E)):v.push(new PathPoint(t.startpoint.v+m.x+u*r-E,t.startpoint.h+m.y,!0,!1,E,E)),v.push(new PathPoint(-t.endpoint.v-u*l+m.x+u*r,t.endpoint.h+m.y,!1,!1))):E&&a===o-1?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+m.x+u*r+E,t.startpoint.h+m.y,!0,!1,-E,-E)):v.push(new PathPoint(t.startpoint.v+m.x+u*r-E,t.startpoint.h+m.y,!0,!1,E,-E)),v.push(new PathPoint(-t.endpoint.v-u*l+m.x+u*r,t.endpoint.h+m.y,!1,!1))):(v.push(new PathPoint(t.startpoint.v+m.x+u*r,t.startpoint.h+m.y,!0,!1)),v.push(new PathPoint(-t.endpoint.v-u*l+m.x+u*r,t.endpoint.h+m.y,!1,!1)))}}else for(h=this.arraylist.ht,a=0;a<o;a++)this.arraylist.hook[a];return v}OffsetShape(t,e,i){LogUtil.Debug("S.Connector: OffsetShape input:",{offsetX:t,offsetY:e,additionalParam:i}),this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.inside.x+=t,this.inside.y+=e,this.trect.x+=t,this.trect.y+=e,this.StartPoint.x+=t,this.StartPoint.y+=e,this.EndPoint.x+=t,this.EndPoint.y+=e,LogUtil.Debug("S.Connector: OffsetShape output:",this)}CalcFrame(){LogUtil.Debug("S.Connector: CalcFrame input");let t=[];const e=this.arraylist.styleflags&OptConstant.AStyles.Linear;this.arraylist?(t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),e&&t.push(this.EndPoint),t&&t.length&&Utils2.GetPolyRect(this.Frame,t)):this.Frame=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),this.UpdateFrame(this.Frame),LogUtil.Debug("S.Connector: CalcFrame output:",this.Frame)}GetDimensions(){LogUtil.Debug("S.Connector: GetDimensions input");let t={};const e=this.arraylist.styleflags&OptConstant.AStyles.Linear,i=(this.arraylist.styleflags&OptConstant.AStyles.BothSides)>0;return this.vertical?(t.y=this.arraylist.hook[0].endpoint.h-this.arraylist.hook[0].startpoint.h,t.x=e?0:this.arraylist.ht,i&&!e&&(t.x/=2)):(t.x=this.arraylist.hook[0].endpoint.h-this.arraylist.hook[0].startpoint.h,t.y=e?0:this.arraylist.ht,i&&!e&&(t.y/=2)),LogUtil.Debug("S.Connector: GetDimensions output:",t),t}CanSnapToShapes(){LogUtil.Debug("S.Connector: CanSnapToShapes input");const t=this.IsFlowChartConnector(),e=0===this.hooks.length,i=this.arraylist.hook.length===OptConstant.ConnectorDefines.NSkip+1;if(t&&e&&i){const t=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id;return LogUtil.Debug("S.Connector: CanSnapToShapes output:",t),t}return LogUtil.Debug("S.Connector: CanSnapToShapes output: -1"),-1}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("S.Connector: ScaleObject input:",{scaleX:t,scaleY:e,offsetX:i,offsetY:n,primaryScale:s,secondaryScale:a,extraFactor:o}),Instance.Shape.BaseLine.prototype.ScaleObject.call(this,t,e,i,n,s,a,o);const r=this.arraylist.styleflags&OptConstant.AStyles.BothSides||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),l=OptConstant.ConnectorDefines,h=this.arraylist.hook.length,c=l.NSkip;this.vertical?(this.arraylist.ht=this.arraylist.ht*s,this.arraylist.wd=this.arraylist.wd*a,h>=c&&(r?(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*a),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*a)):(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*s),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*s)))):(this.arraylist.wd=this.arraylist.wd*s,this.arraylist.ht=this.arraylist.ht*a,h>=c&&(r?(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*s),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*s)):(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*a),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*a)))),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),LogUtil.Debug("S.Connector: ScaleObject output:",{arraylist:this.arraylist,rflags:this.rflags})}SetSize(t,e,i){let n,s,a;LogUtil.Debug("S.Connector: SetSize input:",{primarySize:t,secondarySize:e,extraInfo:i});let o,r=this.GetDimensions();const l=OptConstant.AStyles,h=(this.arraylist.styleflags&l.BothSides)>0,c=(this.arraylist.styleflags&l.Linear)>0;o=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,n=this.PrGetNBackBoneSegments(),h&&(n%2&&n++,n/=2),this.vertical?(e&&o>1&&(a=e-r.y,this.arraylist.wd+=a/n,this.arraylist.wd<0&&(this.arraylist.wd=0)),t&&!c&&(this.arraylist.ht=t,h&&(this.arraylist.ht/=2))):(t&&o>1&&(s=t-r.x,this.arraylist.wd+=s/n,this.arraylist.wd<0&&(this.arraylist.wd=0)),e&&!c&&(this.arraylist.ht=e,h&&(this.arraylist.ht/=2))),this.PrFormat(this.BlockID),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("S.Connector: SetSize output:",{arraylist:this.arraylist,rflags:this.rflags})}UpdateFrame(t){LogUtil.Debug("S.Connector: UpdateFrame input:",t);let e=t||this.Frame;if(Instance.Shape.BaseDrawObject.prototype.UpdateFrame.call(this,e),T3Gv.opt){let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(null!==t){let e=this.GetSVGFrame(),i=t.GetElementById(OptConstant.SVGElementClass.Shape);if(i){let t=i.GetArrowheadBounds();if(t&&t.length)for(let i=0;i<t.length;i++)t[i].x+=e.x,t[i].y+=e.y,this.r=Utils2.UnionRect(t[i],this.r,this.r)}}}if(this.StyleRecord){let t=this.StyleRecord.Line.Thickness/2;t<OptConstant.Common.MinWidth&&(t=OptConstant.Common.MinWidth),Utils2.InflateRect(this.r,t/2,t/2);let e=this.CalcEffectSettings(this.Frame,this.StyleRecord,!1);e&&Utils2.Add2Rect(this.r,e.extent)}LogUtil.Debug("S.Connector: UpdateFrame output:",this.r)}GetHitTestFrame(){LogUtil.Debug("S.Connector: GetHitTestFrame input");const t=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),e=Boolean(this.arraylist.styleflags&OptConstant.AStyles.StartLeft),i=Boolean(this.arraylist.styleflags&OptConstant.AStyles.FlowConn),n=Boolean(this.arraylist.styleflags&OptConstant.AStyles.BothSides)||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),s=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Radial)&&!n;let a,o;t&&i?this.vertical?(a=OptConstant.Common.FlowConnectorSlop,o=OptConstant.Common.ConnectorSlop):(a=OptConstant.Common.ConnectorSlop,o=OptConstant.Common.FlowConnectorSlop):(a=OptConstant.Common.ConnectorSlop,o=a);let r=Utils1.DeepCopy(this.Frame);if(Utils2.InflateRect(r,a,o),s){const t=i?OptConstant.Common.FlowRadialSlop:OptConstant.Common.ConnectorSlop;this.vertical?e?(r.x-=t,r.width+=t):r.width+=t:e?(r.y-=t,r.height+=t):r.height+=t}return r=Utils2.UnionRect(this.r,r,r),LogUtil.Debug("S.Connector: GetHitTestFrame output",r),r}GetMoveRect(t,e){LogUtil.Debug("S.Connector: GetMoveRect input:",{unusedParam:t,shouldInflate:e});let i={};return 1===this.arraylist.hook.length?(Utils2.CopyRect(i,this.Frame),i.height=0,i.width=0,LogUtil.Debug("S.Connector: GetMoveRect output for single hook:",i),i):(e?(Utils2.CopyRect(i,this.Frame),Utils2.InflateRect(i,this.StyleRecord.Line.Thickness/2,this.StyleRecord.Line.Thickness/2)):Utils2.CopyRect(i,this.Frame),LogUtil.Debug("S.Connector: GetMoveRect output:",i),i)}SetShapeOrigin(t,e){LogUtil.Debug("S.Connector: SetShapeOrigin input: originX =",t,", originY =",e);let i=0,n=0;null!=t&&(i=t-this.Frame.x),null!=e&&(n=e-this.Frame.y),this.OffsetShape(i,n),LogUtil.Debug("S.Connector: SetShapeOrigin output: Offset applied with offsetX =",i,", offsetY =",n)}Hit(t,e,i,n){if(LogUtil.Debug("S.Connector: Hit input:",{point:t,isBorderCheck:e,additionalParam:i,anotherParam:n}),this.IsCoManager())return LogUtil.Debug("S.Connector: Hit output:",0),0;if(e){if(Utils2.pointInRect(this.r,t))return LogUtil.Debug("S.Connector: Hit output:",NvConstant.HitCodes.Border),NvConstant.HitCodes.Border}else{const e=this.GetHitTestFrame();if(Utils2.pointInRect(e,t))return LogUtil.Debug("S.Connector: Hit output:",NvConstant.HitCodes.Border),NvConstant.HitCodes.Border}return LogUtil.Debug("S.Connector: Hit output:",0),0}PreventLink(){return!!this.hooks.length}HandleActionTriggerTrackCommon(t,e){const i=this.arraylist.hook.length;if(!this.arraylist||!this.arraylist.hook||i<1)return;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const n=T3Gv.opt.actionSvgObject,s=n.GetElementById(OptConstant.SVGElementClass.Shape),a=n.GetElementById(OptConstant.SVGElementClass.Slop),o=Utils1.DeepCopy(this.Frame),r=OptConstant.AStyles,l=OptConstant.ConnectorDefines;let h=0,c=0;this.vertical?(c=e-T3Gv.opt.actionStartY,h=t-T3Gv.opt.actionStartX):(h=t-T3Gv.opt.actionStartX,c=e-T3Gv.opt.actionStartY);let u=this.arraylist.ht;const d=this.arraylist.wd;let p=d;const g=Boolean(this.arraylist.styleflags&r.ReverseCol),f=Boolean(this.arraylist.styleflags&r.BothSides||0==(this.arraylist.styleflags&r.PerpConn)),b=Boolean(this.arraylist.styleflags&r.BothSides&&0==(this.arraylist.styleflags&r.Stagger)),v=Boolean(this.arraylist.styleflags&r.Stagger&&this.vertical),m=Boolean(this.arraylist.styleflags&r.StartLeft),y=Boolean(this.arraylist.styleflags&r.Linear),S=Boolean(this.arraylist.styleflags&r.FlowConn),w=this.PrGetStubIndex(),x=this.PrGetEndShapeIndex(),C=y&&w===l.ACr;let D=this.PrGetNBackBoneSegments();b&&(D%2&&D++,D/=2),0!==w&&D++,0!==x&&D++;let k,$=0,O=0,P=0,L=0;switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.ConnectorAdj:(g||C)&&(h=-h);let t=T3Gv.opt.OldConnectorExtra+h;t<-T3Gv.opt.OldConnectorWd&&(t=-T3Gv.opt.OldConnectorWd),h=t-this.arraylist.hook[T3Gv.opt.actionTriggerData].extra,this.arraylist.hook[T3Gv.opt.actionTriggerData].extra=t,b&&T3Gv.opt.actionTriggerData<this.arraylist.hook.length-1&&(this.arraylist.hook[T3Gv.opt.actionTriggerData+1].extra=t),(g||C)&&(h=-h),c=0;break;case OptConstant.ActionTriggerType.LineStart:h=-h,p=T3Gv.opt.OldConnectorWd+h/D,p<0&&(p=0),L=p-d;const e=L*D;this.vertical?o.height+=e:o.width+=e,h=-h,c=0;break;case OptConstant.ActionTriggerType.LineEnd:g&&(h=-h),p=T3Gv.opt.OldConnectorWd+h/D,p<0&&(p=0),L=p-d,this.vertical?o.height+=L*D:o.width+=L*D,g&&(h=-h),c=0;break;case OptConstant.ActionTriggerType.ConnectorRerp:L=u,(b&&T3Gv.opt.actionTriggerData%2||v&&m)&&(c=-c),(m&&b||m)&&(c=-c),u=T3Gv.opt.OldConnectorHt+c,u<0&&(u=0),c=u-L,(m&&b||m)&&(c=-c),h=0;break;case OptConstant.ActionTriggerType.ConnectorHook:k=this.arraylist.hook[T3Gv.opt.actionTriggerData];const i=k.gap;P=f?h:c,g?P=-P:m?f||(P=-P):T3Gv.opt.actionTriggerData===OptConstant.ConnectorDefines.ACr&&(P=-P),k.gap=T3Gv.opt.OldConnectorGap+P;const n=T3Gv.opt.OldConnectorExtra+P;k.gap<0&&(k.gap=0),S&&0===k.gap&&(k.gap=.01);let s=n;s<0&&(s=0),P=k.gap-i,y&&!f&&(k.extra=s),g?P=-P:m?f||(P=-P):T3Gv.opt.actionTriggerData===OptConstant.ConnectorDefines.ACr&&(P=-P),c=0,h=0,f?(g?k.startpoint.h-=P:k.startpoint.h+=P,this.vertical?($=0,O=P):(O=0,$=P)):(k.startpoint.v+=P,this.vertical?(O=0,$=P):($=0,O=P));break;default:return c=0,void(h=0)}this.arraylist.ht=u,this.arraylist.wd=p;const G=this.PrAdjustFormat(h,c,P,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData,D,w,x);let F,I;if(G&&(F=G.linestart,I=G.linedisp),0===P&&(this.vertical?($=c,O=h):($=h,O=c)),n){const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);if(n.SetSize(o.width,o.height),n.SetPos(o.x,o.y),s.SetSize(o.width,o.height),this.UpdateSVG(T3Gv.opt.svgDoc,s,i),a.SetSize(o.width,o.height),this.UpdateSVG(T3Gv.opt.svgDoc,a,i),T3Gv.opt.ConnectorList){const i=T3Gv.opt.ConnectorList.length;switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.ConnectorAdj:this.arraylist.angle&&($=O*this.arraylist.angle);for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].locallist;if(e)for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+$,i.y+O)}if(b&&t<i-1){t++;const e=T3Gv.opt.ConnectorList[t].locallist;if(e)for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+$,i.y+O)}}}break;case OptConstant.ActionTriggerType.LineEnd:case OptConstant.ActionTriggerType.LineStart:this.arraylist.angle&&($=O*this.arraylist.angle);let n=$,s=O,a=-1;T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineEnd&&i>0&&this.arraylist.hook[l.A_Cr].id>=0?a=l.A_Cr:T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart&&i>0&&this.arraylist.hook[l.A_Cl].id>=0&&(a=l.A_Cl);let o=b&&this.arraylist.hook.length%2==0&&T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart;for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].locallist,r=T3Gv.opt.ConnectorList[t].Index;if(e){F&&null!==F[r]&&(this.vertical?(e[0].GetPos(),s=I[r],this.arraylist.angle&&(n=s*this.arraylist.angle)):(e[0].GetPos(),n=I[r]));for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+n,i.y+s)}}if(b&&t<i-1&&!o&&a!==T3Gv.opt.ConnectorList[t+1].Index){t++;const e=T3Gv.opt.ConnectorList[t].locallist;if(e)for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+n,i.y+s)}}o&&(o=!1),n+=$,s+=O}const r={x:this.Frame.x,y:this.Frame.y,width:T.x,height:T.y},h={x:t,y:e};UIUtil.UpdateDisplayCoordinates(r,h,CursorConstant.CursorTypes.Grow,this);break;case OptConstant.ActionTriggerType.ConnectorRerp:let c=0;this.GetTilt()&&(c=-O);for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].GetPos();!(!b&&!v)&&(this.vertical?this.arraylist.angle?t%2:e.x<this.StartPoint.x:e.y<this.StartPoint.y)?T3Gv.opt.ConnectorList[t].SetPos(e.x-$+c,e.y-O):T3Gv.opt.ConnectorList[t].SetPos(e.x+$+c,e.y+O)}const u={x:this.Frame.x,y:this.Frame.y,width:T.x,height:T.y},d={x:t,y:e};UIUtil.UpdateDisplayCoordinates(u,d,CursorConstant.CursorTypes.Grow,this);break;default:for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].GetPos();T3Gv.opt.ConnectorList[t].SetPos(e.x+$,e.y+O)}}}}}UpdateDimensions(t,e,i){let n,s,a,o=!1,r=this.PrGetNBackBoneSegments();const l=OptConstant.AStyles;this.arraylist.styleflags&l.SEDA_BothSides&&(r%2&&r++,r/=2),r<1&&(r=1),this.vertical?(i&&(s=this.arraylist.wd,n=(i-Math.abs(this.EndPoint.y-this.StartPoint.y))/r,this.arraylist.wd+=n,this.arraylist.wd<0&&(this.arraylist.wd=0),o=this.arraylist.wd!==s),t&&(t<0&&(t=0),a=this.arraylist.ht,this.arraylist.ht=t,o=this.arraylist.ht!==a)):(t&&(s=this.arraylist.wd,n=(t-Math.abs(this.EndPoint.x-this.StartPoint.x))/r,this.arraylist.wd+=n,this.arraylist.wd<0&&(this.arraylist.wd=0),o=this.arraylist.wd!==s),e&&(a=this.arraylist.ht,e<0&&(e=0),this.arraylist.ht=e,o=this.arraylist.ht!==a)),o&&this.PrFormat(this.BlockID)}HandleActionTriggerDoAutoScroll(){Instance.Shape.BaseLine.prototype.HandleActionTriggerDoAutoScroll.call(this)}AutoScrollCommon(t,e,i){return Instance.Shape.BaseLine.prototype.AutoScrollCommon.call(this,t,e,i)}LMActionTrack(t){Instance.Shape.BaseLine.prototype.LMActionTrack.call(this,t)}LMActionRelease(t,e){try{let t,i;switch(e||(LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer()),T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.LineStart:case OptConstant.ActionTriggerType.LineEnd:for(t=this.arraylist.hook.length,i=0;i<t;i++){let t=this.arraylist.hook[i];t.extra<-this.arraylist.wd&&(t.extra=-this.arraylist.wd)}}this.PrFormat(T3Gv.opt.actionStoredObjectId),OptCMUtil.SetLinkFlag(T3Gv.opt.actionStoredObjectId,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),e||(this.LMActionPostRelease(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null),LayerUtil.ShowOverlayLayer(),DrawUtil.CompleteOperation()}catch(i){throw Instance.Shape.BaseShape.prototype.LMActionClickExpCleanup.call(this,i),T3Gv.opt.ExceptionCleanup(i),i}}LMSetupActionClick(t,e){return Instance.Shape.BaseLine.prototype.LMSetupActionClick.call(this,t,e)}LMActionClick(t,e){Instance.Shape.BaseLine.prototype.LMActionClick.call(this,t,e)}LMActionClickExpCleanup(t){Instance.Shape.BaseLine.prototype.LMActionClickExpCleanup.call(this,t)}LMActionPreTrack(t,e){LogUtil.Debug("S.Connector: LMActionPreTrack input:",{actionEvent:t,triggerType:e});let i,n,s,a,o,r,l,h={},c=[],u=1,d=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),p=this.arraylist.styleflags&OptConstant.AStyles.BothSides&&0==(this.arraylist.styleflags&OptConstant.AStyles.Stagger),g=(this.arraylist.styleflags&OptConstant.AStyles.Linear)>0,f=OptConstant.ConnectorDefines,b=this,v=function(t,e){let i=t.id;if(t.id<0&&(e===f.ACl?i=b.arraylist.hook[f.NSkip].id:e===f.ACr&&(i=b.arraylist.hook[b.arraylist.hook.length-1].id)),ObjectUtil$1.GetObjectPtr(i,!1)){c=[],c=HookUtil.GetHookList(d,c,i,ObjectUtil$1.GetObjectPtr(i,!1),NvConstant.ListCodes.MoveHook,h),r=c.length;let t=[];for(a=0;a<r;a++)s=T3Gv.opt.svgObjectLayer.GetElementById(c[a]),s&&(t.push(s),ObjectUtil$1.AddToDirtyList(c[a]));let n={Index:e,locallist:t};T3Gv.opt.ConnectorList.push(n)}},m=function(t,e,i,n){let s,a,r;if(o=t.hook.length,e){for(i===f.ACr&&(s=f.ACr,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.endpoint.h-a.startpoint.h-a.gap),s=OptConstant.ConnectorDefines.NSkip;s<o-1-0;s++)a=t.hook[s+0],r=t.hook[s+0+1],T3Gv.opt.ConnectorWidthList[s+0]=r.endpoint.h-a.endpoint.h-t.wd-r.extra,p&&s++;n===f.ACl&&(s=f.ACl,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.startpoint.h-a.endpoint.h-a.gap)}else{let e=0;for(i===f.ACl&&(e=0,s=f.ACl,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.startpoint.h-a.endpoint.h-a.gap),p&&(e=1),s=OptConstant.ConnectorDefines.NSkip+1+e;s<o;s++)a=t.hook[s],r=t.hook[s-1],T3Gv.opt.ConnectorWidthList[s]=a.endpoint.h-r.endpoint.h-t.wd-a.extra,p&&s++;n===f.ACr&&(s=f.ACr,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.endpoint.h-a.startpoint.h-a.gap)}};T3Gv.opt.OldConnectorWd=this.arraylist.wd,T3Gv.opt.OldConnectorHt=this.arraylist.ht,T3Gv.opt.ConnectorList=[],T3Gv.opt.ConnectorWidthList=[],p&&(u=2),e===OptConstant.ActionTriggerType.ConnectorHook&&(i=this.arraylist.hook[T3Gv.opt.actionTriggerData],T3Gv.opt.OldConnectorGap=i.gap,T3Gv.opt.OldConnectorExtra=i.extra);let y=this.PrGetStubIndex(),S=this.PrGetEndShapeIndex();switch(e){case OptConstant.ActionTriggerType.ConnectorAdj:if(u=T3Gv.opt.actionTriggerData,i=this.arraylist.hook[T3Gv.opt.actionTriggerData],T3Gv.opt.OldConnectorExtra=i.extra,o=this.arraylist.hook.length,g&&y===f.ACr)for(a=OptConstant.ConnectorDefines.NSkip;a<u;a++)i=this.arraylist.hook[a],v(i,a);else for(a=u;a<o;a++)i=this.arraylist.hook[a],v(i,a);break;case OptConstant.ActionTriggerType.LineEnd:for(o=this.arraylist.hook.length,m(this.arraylist,!1,y,S),y===f.ACl&&S===f.ACl||(u=0),a=OptConstant.ConnectorDefines.NSkip+u;a<o;a++)i=this.arraylist.hook[a],v(i,a);o&&this.arraylist.hook[f.ACr].id>=0&&v(this.arraylist.hook[f.ACr],f.ACr);break;case OptConstant.ActionTriggerType.LineStart:for(o=this.arraylist.hook.length,p&&o%2==0&&(u=1),m(this.arraylist,!0,y,S),y===f.ACr&&S===f.ACr||(u=0),a=o-1-u;a>=OptConstant.ConnectorDefines.NSkip;a--)i=this.arraylist.hook[a],v(i,a);o&&this.arraylist.hook[f.ACl].id>=0&&v(this.arraylist.hook[f.ACl],f.ACl);break;case OptConstant.ActionTriggerType.ConnectorRerp:case OptConstant.ActionTriggerType.ConnectorHook:if(n=ObjectUtil$1.GetObjectPtr(t,!1),n&&d){for(c=HookUtil.GetHookList(d,c,t,n,NvConstant.ListCodes.ChildrenOnly,h),o=c.length,this.arraylist.hook[f.ACl].id>=0&&(l=c.indexOf(this.arraylist.hook[f.ACl].id),l>=0&&c.splice(l,1)),this.arraylist.hook[f.ACr].id>=0&&(l=c.indexOf(this.arraylist.hook[f.ACr].id),l>=0&&c.splice(l,1)),a=0;a<o;a++)s=T3Gv.opt.svgObjectLayer.GetElementById(c[a]),s&&(T3Gv.opt.ConnectorList.push(s),ObjectUtil$1.AddToDirtyList(c[a]));n.hooks.length&&OptCMUtil.SetLinkFlag(n.hooks[0].objid,DSConstant.LinkFlags.Move)}}return LogUtil.Debug("S.Connector: LMActionPreTrack output:",!0),!0}LMActionDuringTrack(t){LogUtil.Debug("S.Connector: LMActionDuringTrack input:",t);const e=t;return LogUtil.Debug("S.Connector: LMActionDuringTrack output:",e),e}LMActionPostRelease(t){LogUtil.Debug("S.Connector: LMActionPostRelease input:",{releasedConnectorId:t}),T3Gv.opt.ConnectorList=[],T3Gv.opt.ConnectorWidthList=[],OptCMUtil.SetEditMode(NvConstant.EditState.Default),LogUtil.Debug("S.Connector: LMActionPostRelease output: completed")}GetBestHook(t,e,i){LogUtil.Debug("S.Connector: GetBestHook input:",{targetObjectId:t,unusedParam:e,hookPosition:i});const n=this.arraylist.styleflags&OptConstant.AStyles.BothSides,s=this.arraylist.styleflags&OptConstant.AStyles.Linear;let a,o,r;if(a=n?this.arraylist.styleflags&OptConstant.AStyles.StartLeft?i.x%2-1:i.x%2:this.arraylist.styleflags&OptConstant.AStyles.StartLeft,this.vertical){if(!s)return o=-1===i.x?OptConstant.HookPts.AKCB:-2===i.x?OptConstant.HookPts.AKCT:a?OptConstant.HookPts.AKCR:OptConstant.HookPts.AKCL,LogUtil.Debug("S.Connector: GetBestHook output:",o),o;switch(i.y){case OptConstant.ConnectorDefines.Above:o=OptConstant.HookPts.AKCR;break;case OptConstant.ConnectorDefines.Below:o=OptConstant.HookPts.AKCL;break;case OptConstant.ConnectorDefines.Parent:o=0===i.x?OptConstant.HookPts.AKCB:OptConstant.HookPts.AKCT;break;default:r=ObjectUtil$1.GetObjectPtr(t,!1),o=r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LL:OptConstant.HookPts.LT:OptConstant.HookPts.AKCT}return LogUtil.Debug("S.Connector: GetBestHook output:",o),o}if(!s)return r=ObjectUtil$1.GetObjectPtr(t,!1),o=a?r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LB:OptConstant.HookPts.LR:OptConstant.HookPts.AKCB:r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LT:OptConstant.HookPts.LL:OptConstant.HookPts.AKCT,LogUtil.Debug("S.Connector: GetBestHook output:",o),o;switch(i.y){case OptConstant.ConnectorDefines.Above:o=OptConstant.HookPts.AKCB;break;case OptConstant.ConnectorDefines.Below:o=OptConstant.HookPts.AKCT;break;case OptConstant.ConnectorDefines.Parent:o=0===i.x?OptConstant.HookPts.AKCR:OptConstant.HookPts.AKCL;break;default:r=ObjectUtil$1.GetObjectPtr(t,!1),o=r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LT:OptConstant.HookPts.LL:OptConstant.HookPts.AKCL}return LogUtil.Debug("S.Connector: GetBestHook output:",o),o}GetHookFlags(){return NvConstant.HookFlags.LcMoveTarget}HookToPoint(t,e){LogUtil.Debug("S.Connector: HookToPoint input:",{hookPoint:t,outputRectangle:e});let i={x:0,y:0};const n=OptConstant.AStyles,s=OptConstant.ConnectorDefines,a=this.arraylist.styleflags&n.BothSides||0==(this.arraylist.styleflags&n.PerpConn),o=this.arraylist.styleflags&n.ReverseCol;if(i.x=this.StartPoint.x,i.y=this.StartPoint.y,null==this.arraylist)return LogUtil.Debug("S.Connector: HookToPoint output:",i),i;const r=o?-1:1;if(this.arraylist.hook.length<=s.NSkip||this.flags&NvConstant.ObjFlags.NotVisible){let t=this.vertical;if(!a){t=!t,Boolean(this.arraylist.styleflags&n.StartLeft)&&(t=!t)}const s=this.arraylist.styleflags&n.StartLeft?this.arraylist.hook[0].endpoint:this.arraylist.hook[0].startpoint;if(t?(i.y+=s.h,i.x+=s.v):(i.y+=s.v,i.x+=s.h),e){const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}return LogUtil.Debug("S.Connector: HookToPoint output:",i),i}const l=this.arraylist.hook[s.ACl],h=this.arraylist.hook[s.ACr];let c={x:0,y:0},u={x:0,y:0},d={x:0,y:0},p={x:0,y:0};switch(this.vertical?(c.x=this.StartPoint.x+l.endpoint.v,c.y=this.StartPoint.y+r*l.endpoint.h,u.x=this.StartPoint.x+h.endpoint.v,u.y=this.StartPoint.y+r*h.endpoint.h,d.x=this.StartPoint.x+l.startpoint.v,d.y=this.StartPoint.y+r*l.startpoint.h,p.x=this.StartPoint.x+h.startpoint.v,p.y=this.StartPoint.y+r*h.startpoint.h):(c.x=this.StartPoint.x+l.endpoint.h,c.y=this.StartPoint.y+l.endpoint.v,u.x=this.StartPoint.x+h.endpoint.h,u.y=this.StartPoint.y+h.endpoint.v,d.x=this.StartPoint.x+l.startpoint.h,d.y=this.StartPoint.y+l.startpoint.v,p.x=this.StartPoint.x+h.startpoint.h,p.y=this.StartPoint.y+h.startpoint.v),a||(t=OptConstant.HookPts.LL),t){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:if(i.x=c.x,i.y=c.y,e){const t=Utils2.Pt2Rect(c,d);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}break;default:if(i.x=u.x,i.y=u.y,e){const t=Utils2.Pt2Rect(u,p);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}}return LogUtil.Debug("S.Connector: HookToPoint output:",i),i}GetTargetPoints(t,e,i){LogUtil.Debug("S.Connector: GetTargetPoints input:",{unusedParam:t,hookFlags:e,excludedHookId:i});let n=[];if(null==this.arraylist)return LogUtil.Debug("S.Connector: GetTargetPoints output:",{points:n}),n;const s=this.arraylist.hook.length,a=Boolean(this.arraylist.styleflags&OptConstant.AStyles.FlowConn),o=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),r=Boolean(this.arraylist.styleflags&OptConstant.AStyles.StartLeft),l=Boolean(this.arraylist.styleflags&OptConstant.AStyles.BothSides)||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),h=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Radial)&&!l;let c=Boolean(this.arraylist.styleflags&OptConstant.AStyles.EndConn);const u=OptConstant.ConnectorDefines,d=OptConstant.HookPts;e&NvConstant.HookFlags.LcHookNoExtra&&(c=!1);const p=s-u.NSkip;if(p<=0&&!c)n.push(new Point$1(-3,0));else{for(let t=u.NSkip;t<s+1;t++)n.push(new Point$1(t-u.NSkip,0));if(c)if(0==(e&NvConstant.HookFlags.LcForceEnd)&&(this.arraylist.hook[u.ACl].index>=0||this.arraylist.hook[u.ACr].index>=0))c=!1;else if(this.hooks.length)switch(this.hooks[0].hookpt){case d.LL:case d.LT:n.push(new Point$1(-u.ACr,0));break;default:n.push(new Point$1(-u.ACl,0))}else n.push(new Point$1(-u.ACl,0));if(a&&o){for(let t=u.NSkip;t<s;t++)i&&this.arraylist.hook[t].id===i||(n.push(new Point$1(t-u.NSkip,u.Above)),n.push(new Point$1(t-u.NSkip,u.Below)));if(this.hooks.length)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:n.push(new Point$1(0,u.Parent));break;default:n.push(new Point$1(p,u.Parent))}}else if(a&&h)for(let t=u.NSkip;t<s;t++)i&&this.arraylist.hook[t].id===i||(r?n.push(new Point$1(t-u.NSkip,u.Above)):n.push(new Point$1(t-u.NSkip,u.Below)))}return LogUtil.Debug("S.Connector: GetTargetPoints output:",{points:n}),n}AllowMaintainLink(){return!1}ChangeHook(t,e,i){LogUtil.Debug("S.Connector: ChangeHook called with",{triggerEvent:t,isUserInitiated:e,additionalInfo:i});const n=OptConstant.AStyles;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),this.arraylist.styleflags,n.Linear,this.arraylist.styleflags,n.FlowConn,LogUtil.Debug("S.Connector: ChangeHook completed")}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("S.Connector: ChangeTarget called with",{connectorBlockId:t,targetHookId:e,unusedParam1:i,unusedParam2:n,newHookIndexInfo:s,shouldUpdate:a});let o=-1,r=-1;const l=this.arraylist.styleflags&OptConstant.AStyles.BothSides,h=this.arraylist.styleflags&OptConstant.AStyles.Linear;this.arraylist.styleflags,OptConstant.AStyles.FlowConn;const c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).flags&OptConstant.SessionFlags.NoTreeOverlap,u=OptConstant.ConnectorDefines.NSkip;if(null!=e){const i=this.arraylist.hook.length;for(let t=0;t<i;t++){if(this.arraylist.hook[t].id===e){o=t;break}}if(a)if(o>=0){const t=s.x+OptConstant.ConnectorDefines.NSkip;t!==o&&(r=this.arraylist.hook[o].textid,o<t?(l&&s.x++,this.PrAddHookedObject(e,s.x,r),this.PrRemoveHookedObject(e,o)):(this.PrRemoveHookedObject(e,o),this.PrAddHookedObject(e,s.x,r)))}else this.PrAddHookedObject(e,s.x,-1);else if(o>=0){let t=this.arraylist.hook[o];if(t.textid>=0&&(T3Gv.opt.DeleteBlock(t.textid),t.textid=-1),this.PrRemoveHookedObject(e,o),ObjectUtil$1.GetObjectPtr(e,!0),h&&o===u&&this.arraylist.hook.length>=u)if(this.arraylist.hook.length===u)for(let e=0;e<u;e++){let t=this.arraylist.hook[e];t.textid>=0&&(T3Gv.opt.DeleteBlock(t.textid),t.textid=-1)}else if(this.arraylist.hook[u].textid>=0)if(!this.hooks.length||this.hooks[0].hookpt!==OptConstant.HookPts.LL&&this.hooks[0].hookpt!==OptConstant.HookPts.LT){let t=this.arraylist.hook[u];T3Gv.opt.DeleteBlock(t.textid),t.textid=-1}else{let t=this.arraylist.hook[OptConstant.ConnectorDefines.ACl];t.textid>=0&&(T3Gv.opt.DeleteBlock(t.textid),t.textid=-1),t.textid=this.arraylist.hook[u].textid,this.arraylist.hook[u].textid=-1}this.arraylist.styleflags&OptConstant.AStyles.CoManager?this.CollapseCoManager(e):this.IsAsstConnector()&&this.CollapseAssistant()}if(OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),c)OptAhUtil.FindTreeTop(this,DSConstant.LinkFlags.Move,{topconnector:-1,topshape:-1,foundtree:!1});else{const e=ObjectUtil$1.GetObjectPtr(t,!0);e&&e.hooks.length&&OptCMUtil.SetLinkFlag(e.hooks[0].objid,DSConstant.LinkFlags.Move)}this.PrFormat(t),ObjectUtil$1.AddToDirtyList(t)}else this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0);LogUtil.Debug("S.Connector: ChangeTarget completed")}DeleteObject(){LogUtil.Debug("S.Connector: DeleteObject called with no input parameters");const t=OptConstant.AStyles;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),Boolean(this.arraylist.styleflags&t.FlowConn);const e=this.arraylist.hook.length;for(let i=0;i<e;i++){const t=this.arraylist.hook[i];if(-1!==t.textid){const e=T3Gv.stdObj.GetObject(t.textid);e&&(LogUtil.Debug("S.Connector: Deleting text object with id",t.textid),e.Delete())}}LogUtil.Debug("S.Connector: DeleteObject completed with no output")}IsAsstConnector(){LogUtil.Debug("S.Connector: IsAsstConnector called");const t=OptConstant.AStyles,e=(this.arraylist.styleflags&t.Linear)>0,i=(this.arraylist.styleflags&t.PerpConn)>0,n=e&&i;return LogUtil.Debug("S.Connector: IsAsstConnector returning",n),n}AllowCurveOnConnector(t){LogUtil.Debug("S.Connector: AllowCurveOnConnector called with",t);const e=OptConstant.AStyles,i=0==(this.arraylist.styleflags&e.Linear),n=0==(this.arraylist.styleflags&e.BothSides),s=0==(this.arraylist.styleflags&e.Radial),a=0===this.arraylist.tilt,o=0===this.arraylist.angle,r=i&&n&&s&&a&&o;if(this.IsAsstConnector()&&this.arraylist.hook.length>OptConstant.ConnectorDefines.NSkip){let e=-1,i=-1,n=!1;if(this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].isasst?(e=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id,i=OptConstant.ConnectorDefines.NSkip+1,n=!1):this.arraylist.hook[this.arraylist.hook.length-1].isasst&&(e=this.arraylist.hook[this.arraylist.hook.length-1].id,i=this.arraylist.hook.length-1,n=!0),e>=0){const s=ObjectUtil$1.GetObjectPtr(e,!1);if(s&&s.arraylist&&s.arraylist.hook.length<=OptConstant.ConnectorDefines.NSkip)return t&&(t.index=i,t.left=n),LogUtil.Debug("S.Connector: AllowCurveOnConnector returning true"),!0}}return LogUtil.Debug("S.Connector: AllowCurveOnConnector returning",r),r}IsGenoConnector(){LogUtil.Debug("S.Connector: IsGenoConnector called");const t=OptConstant.AStyles,e=(this.arraylist.styleflags&t.Linear)>0,i=(this.arraylist.styleflags&t.GenoConn)>0,n=e&&i;return LogUtil.Debug("S.Connector: IsGenoConnector returning",n),n}IsCoManager(t){LogUtil.Debug("S.Connector: IsCoManager called with output:",t);const e=(this.arraylist.styleflags&OptConstant.AStyles.CoManager)>0,i=OptConstant.AStyles,n=this.arraylist.styleflags&i.StartLeft;return e&&t&&(this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat(this.BlockID),this.vertical?(t.y=(this.EndPoint.y+this.StartPoint.y)/2,t.x=n?this.StartPoint.x-this.arraylist.coprofile.v:this.StartPoint.x+this.arraylist.coprofile.vdist,t.ht=this.arraylist.ht):(t.x=(this.EndPoint.x+this.StartPoint.x)/2,t.y=n?this.StartPoint.y-this.arraylist.coprofile.v:this.StartPoint.y+this.arraylist.coprofile.vdist,t.ht=this.arraylist.ht)),LogUtil.Debug("S.Connector: IsCoManager returning",e),e}GetChildFrame(t){LogUtil.Debug("S.Connector: GetChildFrame called with hookIndex:",t);let e={x:0,y:0,width:150,height:75};const i=this.arraylist.hook.length;if((t+=OptConstant.ConnectorDefines.NSkip)>0&&t<i){const i=this.arraylist.hook[t].id;if(i>=0){const t=ObjectUtil$1.GetObjectPtr(i,!1);t&&(e=Utils1.DeepCopy(t.Frame))}}return LogUtil.Debug("S.Connector: GetChildFrame returning",e),e}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.Connector: GetPerimeterPoints input:",{formatParam:t,inputPoints:e,unusedParamA:i,unusedParamR:n,unusedParamI:s,unusedParamN:a});let o,r,l,h,c,u,d,p,g,f,b,v,m,y,S,w,x,C,D,T,k,$=[];const O=this.arraylist.styleflags,P=O&OptConstant.AStyles.ReverseCol,L=OptConstant.ConnectorDefines;if(T=OptConstant.Common.FlowConnectorDisp,k=OptConstant.Common.FlowConnectorSlop,r=e.length,h=this.arraylist.hook.length,u=h-L.NSkip,u<0&&(u=0),m=O&OptConstant.AStyles.BothSides&&0==(O&OptConstant.AStyles.Stagger),y=O&OptConstant.AStyles.Linear,S=O&OptConstant.AStyles.StartLeft,w=O&OptConstant.AStyles.BothSides||0==(O&OptConstant.AStyles.PerpConn),x=O&OptConstant.AStyles.Radial&&!w,C=(O&OptConstant.AStyles.Stagger)>0,D=P?-1:1,1===r&&this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat(t),e[0].x<0){for(o=0;o<r;o++){if(-3===e[o].x)return w&&(S=P)&&(c=this.arraylist.hook[0]),this.vertical?$.push(new Point$1(c.startpoint.v+this.StartPoint.x,c.startpoint.h+this.StartPoint.y)):$.push(new Point$1(c.startpoint.h+this.StartPoint.x,c.startpoint.v+this.StartPoint.y)),LogUtil.Debug("S.Connector: GetPerimeterPoints output:",$),$;e[o].x===-L.ACl?c=this.arraylist.hook[L.ACl]:e[o].x===-L.ACr&&(c=this.arraylist.hook[L.ACr]),c&&(this.vertical?$.push(new Point$1(c.endpoint.v+this.StartPoint.x,c.endpoint.h+this.StartPoint.y)):$.push(new Point$1(c.endpoint.h+this.StartPoint.x,c.endpoint.v+this.StartPoint.y)),void 0!==e[o].id&&($[o].id=e[o].id))}return LogUtil.Debug("S.Connector: GetPerimeterPoints output:",$),$}if(1===r)$.push(new Point$1(0,0)),l=e[0].x+L.NSkip,l>=h&&(l=h-1),c=this.arraylist.hook[l],this.vertical?($[0].x=c.endpoint.v,$[0].y=D*c.endpoint.h):($[0].x=c.endpoint.h,$[0].y=D*c.endpoint.v),$[0].x+=this.StartPoint.x,$[0].y+=this.StartPoint.y;else for(d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),o=0;o<r;o++)if(e[o].y===L.Parent)0===e[o].x?(l=2*L.ACl,$.push(new Point$1(d[l+1].x,d[l+1].y))):(l=2*L.ACr,$.push(new Point$1(d[l+1].x,d[l+1].y)));else if(0===o||0===e[o].x){l=2*(e[o].x+L.NSkip);let t=this.StartPoint.y,i=this.StartPoint.x;if(u>1?(v=2*(e[o].x+1+L.NSkip),f=d[v].y,b=d[v].x):(f=this.EndPoint.y,b=this.EndPoint.x),this.vertical)switch(e[o].y){case L.Above:x?(p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x-p.width-this.arraylist.ht,d[l+1].y))):(g=d[l].x-k,$.push(new Point$1(g,(f+t)/2)));break;case L.Below:x?(p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x+p.width+this.arraylist.ht,d[l+1].y))):(g=d[l].x+k,$.push(new Point$1(g,(f+t)/2)));break;default:x?$.push(new Point$1(d[l+1].x,d[l+1].y-10)):$.push(new Point$1(d[l+1].x,d[l].y-10))}else switch(e[o].y){case L.Above:if(x)p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x,d[l+1].y-p.height-this.arraylist.ht));else{let t=d[l].y-T;$.push(new Point$1((b+i)/2,t))}break;case L.Below:if(x)p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x,d[l+1].y+p.height+this.arraylist.ht));else{let t=d[l].y+T;$.push(new Point$1((b+i)/2,t))}break;default:x?$.push(new Point$1(d[l+1].x-10,d[l+1].y)):$.push(new Point$1(d[l].x-10,d[l+1].y))}m&&o+1<r&&(l=2*(e[++o].x+L.NSkip),l<d.length-1&&(this.vertical?$.push(new Point$1(d[l+1].x,d[l].y-10)):$.push(new Point$1(d[l].x-10,d[l+1].y))))}else if(e[o].x>0&&e[o].x<u)if(l=2*(e[o].x-1+L.NSkip),v=2*(e[o].x+L.NSkip),e[o].x<u-1?(f=d[2*(e[o].x+1+L.NSkip)].y,b=d[2*(e[o].x+1+L.NSkip)].x):(f=this.EndPoint.y,b=this.EndPoint.x),this.vertical)if(y)switch(e[o].y){case L.Above:g=d[v+1].x-k,$.push(new Point$1(g,(f+d[v+1].y)/2));break;case L.Below:g=d[v+1].x+k,$.push(new Point$1(g,(f+d[v+1].y)/2));break;default:g=d[v+1].x,$.push(new Point$1(g,(d[v].y+d[v+1].y)/2))}else if(x)switch(e[o].y){case L.Above:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x-p.width-this.arraylist.ht,d[v+1].y));break;case L.Below:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x+p.width+this.arraylist.ht,d[v+1].y));break;default:$.push(new Point$1(d[v+1].x,(d[v+1].y+d[l+1].y)/2))}else{let t=(d[v].y-d[l].y)/2*this.arraylist.angle;m?$.push(new Point$1(d[l-1].x+t,(d[v].y+d[l].y)/2)):(t=-t,$.push(new Point$1(d[v+1].x+t,(d[v].y+d[l].y)/2)))}else{if(y)switch(e[o].y){case L.Above:let t=d[l].y-T;$.push(new Point$1((b+this.StartPoint.x)/2,t));break;case L.Below:t=d[l].y+T,$.push(new Point$1((b+this.StartPoint.x)/2,t));break;default:t=d[l].y,$.push(new Point$1((d[v].x+d[v+1].x)/2,t))}else if(x)switch(e[o].y){case L.Above:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x,d[v+1].y-p.height-this.arraylist.ht));break;case L.Below:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x,d[v+1].y+p.height+this.arraylist.ht));break;default:$.push(new Point$1((d[v+1].x+d[l+1].x)/2,d[v+1].y))}else $.push(new Point$1((d[v].x+d[l].x)/2,d[v+1].y));if(m){if(this.vertical){let t=(d[v].y-d[l].y)/2*this.arraylist.angle;$.push(new Point$1(d[v-1].x+t,(d[v].y+d[l].y)/2))}else $.push(new Point$1((d[v].x+d[l].x)/2,d[l+1].y));o++}}else if(o===u){if(l=2*(e[o-1].x+L.NSkip),this.vertical)if(m)$.push(new Point$1(d[l-1].x,d[l].y+10));else if(y)$.push(new Point$1(d[l+1].x,this.EndPoint.y+10));else if(x)$.push(new Point$1(d[l+1].x,d[l+1].y+10));else{let t=10*this.arraylist.angle;C&&!S?$.push(new Point$1(d[l].x-(d[l+1].x-d[l].x)+t,d[l].y+10)):$.push(new Point$1(d[l+1].x+t,d[l].y+10))}else m?$.push(new Point$1(d[l].x+10,d[l-1].y)):y?$.push(new Point$1(this.EndPoint.x+10,d[l].y)):x?$.push(new Point$1(d[l+1].x+10,d[l+1].y)):$.push(new Point$1(d[l].x+10,d[l+1].y));m&&o+1<r&&(l=2*(e[++o].x+L.SEDA_NSkip),l<d.length-1&&(this.vertical?$.push(new Point$1(d[l+1].x,d[l].y-10)):$.push(new Point$1(d[l].x-10,d[l+1].y))))}return LogUtil.Debug("S.Connector: GetPerimeterPoints output:",$),$}SetHookAlign(t,e){LogUtil.Debug("S.Connector: SetHookAlign called with",{currentHook:t,targetHook:e});const i=OptConstant.ConnectorDefines;if(this.arraylist.angle&&this.arraylist.hook.length&&e!==t){let t,e;this.arraylist.hook[i.ACl].id>=0?(this.arraylist.hook[i.ACr].id=this.arraylist.hook[i.ACl].id,this.arraylist.hook[i.ACl].id=-1,t=this.arraylist.hook[i.ACr].gap,this.arraylist.hook[i.ACr].gap=this.arraylist.hook[i.ACl].gap,this.arraylist.hook[i.ACl].gap=t,e=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[i.ACr].id,!0),e&&e.hooks.length&&(e.hooks[0].hookpt=OptConstant.HookPts.AKCT,e.hooks[0].connect.x=-i.ACr)):this.arraylist.hook[i.ACr].id>=0&&(this.arraylist.hook[i.ACl].id=this.arraylist.hook[i.ACr].id,this.arraylist.hook[i.ACr].id=-1,t=this.arraylist.hook[i.ACl].gap,this.arraylist.hook[i.ACr].gap=this.arraylist.hook[i.ACr].gap,this.arraylist.hook[i.ACr].gap=t,e=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[i.ACl].id,!0),e&&e.hooks.length&&(e.hooks[0].hookpt=OptConstant.HookPts.AKCB,e.hooks[0].connect.x=-i.ACl)),this.arraylist.angle=-this.arraylist.angle,this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0)}LogUtil.Debug("S.Connector: SetHookAlign completed")}GetHookPoints(){LogUtil.Debug("S.Connector: GetHookPoints called");const t=[],e=OptConstant.AStyles;if(null==this.arraylist)return LogUtil.Debug("S.Connector: GetHookPoints returning null"),null;const i=this.arraylist.hook.length,n=this.arraylist.styleflags&e.BothSides||0==(this.arraylist.styleflags&e.PerpConn),s=(this.arraylist.styleflags&e.Linear)>0;return i>1||s?(t.push(new Point$1(-1,0)),this.vertical?t[0].id=OptConstant.HookPts.LT:t[0].id=OptConstant.HookPts.LL,n&&(t.push(new Point$1(-2,0)),this.vertical?t[1].id=OptConstant.HookPts.LB:t[1].id=OptConstant.HookPts.LR)):(t.push(new Point$1(-1,0)),this.vertical?t[0].id=OptConstant.HookPts.LT:t[0].id=OptConstant.HookPts.LL),LogUtil.Debug("S.Connector: GetHookPoints returning",t),t}GetTextIDs(){LogUtil.Debug("S.Connector: GetTextIDs called");const t=[],e=this.arraylist.hook.length;for(let i=0;i<e;i++){const e=this.arraylist.hook[i];e.textid>=0&&t.push(e.textid)}return LogUtil.Debug("S.Connector: GetTextIDs returning",t),t}NoFlip(){LogUtil.Debug("S.Connector: NoFlip called");return LogUtil.Debug("S.Connector: NoFlip returning",true),true}NoRotate(){LogUtil.Debug("S.Connector: NoRotate called");return LogUtil.Debug("S.Connector: NoRotate returning",true),true}AllowTextEdit(){LogUtil.Debug("S.Connector: AllowTextEdit called");const t=this.flags&NvConstant.ObjFlags.Lock,e=this.TextFlags&NvConstant.TextFlags.AttachC,i=!t&&e;return LogUtil.Debug("S.Connector: AllowTextEdit returning",i),i}GetArrowheadFormat(){LogUtil.Debug("S.Connector: GetArrowheadFormat called");const t=new ArrowheadRecord;return t.StartArrowID=this.StartArrowID,t.EndArrowID=this.EndArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowDisp=this.EndArrowDisp,t.ArrowSizeIndex=this.ArrowSizeIndex,LogUtil.Debug("S.Connector: GetArrowheadFormat returning",t),t}ChangeTextAttributes(t,e,i,n,s,a,o,r){if(LogUtil.Debug("S.Connector: ChangeTextAttributes called with",{fontName:t,fontAttributes:e,fontSize:i,fontFace:n,fontColor:s,opacity:a,svgElement:o,additionalParams:r}),(t||e||i||n||r)&&0!==this.GetTextIDs().length){let s,l=o||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);const h=this.arraylist.hook.length;e&&(void 0!==e.FontName&&(this.StyleRecord.Text.FontName=e.FontName),void 0!==e.FontId&&(this.StyleRecord.Text.FontId=e.FontId),void 0!==e.FontSize&&(this.StyleRecord.Text.FontSize=e.FontSize),void 0!==e.Face&&(this.StyleRecord.Text.Face=e.Face),void 0!==e.Color&&(this.StyleRecord.Text.Paint.Color=e.Color),void 0!==e.Opacity&&(this.StyleRecord.Text.Paint.Opacity=e.Opacity));for(let o=0;o<h;++o)s=this.arraylist.hook[o],s.textid>=0&&(this.DataID=s.textid,this.arraylist.lasttexthook=o,l&&(l.textElem=l.GetElementById(OptConstant.SVGElementClass.Text,o)),T3Gv.opt.ChangeObjectTextAttributes(this.BlockID,t,e,n,i,a,l,r));this.DataID=-1,this.lasttexthook=-1}LogUtil.Debug("S.Connector: ChangeTextAttributes completed")}CollapseCoManager(t){LogUtil.Debug("S.Connector: CollapseCoManager called with connectorId:",t);let e=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,i=[];if(ObjectUtil$1.GetObjectPtr(t,!0)&&e>=1){let e=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id,i=T3Gv.opt.FindChildArray(t,-1);if(i>=0){let t=ObjectUtil$1.GetObjectPtr(i,!0);t&&HookUtil.UpdateHook(i,0,e,t.hooks[0].hookpt,t.hooks[0].connect,null)}else i=T3Gv.opt.FindChildArray(e,-1),i>=0&&OptCMUtil.SetLinkFlag(e,DSConstant.LinkFlags.Move)}if(e<=1){let t=-1,n={x:0,y:0};if(this.hooks.length&&(t=this.hooks[0].objid,n.x=this.hooks[0].connect.x),t>=0){HookUtil.UpdateHook(this.BlockID,0,-1,this.hooks[0].hookpt,this.hooks[0].connect,null);let s=ObjectUtil$1.GetObjectPtr(t,!1);if(1===e){let e=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id,i=ObjectUtil$1.GetObjectPtr(e,!0);i&&s&&(i.hooks[0].hookpt=s.GetBestHook(e,i.hooks[0].hookpt,i.hooks[0].connect),HookUtil.UpdateHook(e,0,t,i.hooks[0].hookpt,n,null));let a=T3Gv.opt.FindChildArray(e,-1);if(a>=0){let t=ObjectUtil$1.GetObjectPtr(a,!0);t&&t.FixHook(!1,!0)}}i.push(this.BlockID),ObjectUtil$1.DeleteObjects(i,!1)}}LogUtil.Debug("S.Connector: CollapseCoManager completed")}CollapseAssistant(){LogUtil.Debug("S.Connector: CollapseAssistant called");let t=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,e=[];if(1===t){let i=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip],n=ObjectUtil$1.GetObjectPtr(i.id,!0);if(n&&n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){let e=this.hooks.length?this.hooks[0].objid:-1;if(e>=0){n.FixHook(!1,!1);let s=ObjectUtil$1.GetObjectPtr(e,!0);s&&s.IsCoManager()&&(n.hooks[0].connect.y=-OptConstant.AStyles.CoManager),HookUtil.UpdateHook(i.id,0,e,n.hooks[0].hookpt,n.hooks[0].connect,null),HookUtil.UpdateHook(this.BlockID,0,-1,this.hooks[0].hookpt,this.hooks[0].connect,null),t=0,OptCMUtil.SetLinkFlag(e,DSConstant.LinkFlags.Move)}}t<1&&(e.push(this.BlockID),ObjectUtil$1.DeleteObjects(e,!1))}LogUtil.Debug("S.Connector: CollapseAssistant completed")}PrFormat(t){LogUtil.Debug("S.Connector: PrFormat input:",{connectorBlockId:t});let e,i,n,s,a,o,r,l,h,c={},u={},d={},p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),g=[],f=!1,b={},v={lgap:0},m=0;if(this.arraylist.styleflags&OptConstant.AStyles.MatchSize&&this.MatchSize(!1,0),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!1),null==this.arraylist||0===(e=this.arraylist.hook.length))return void LogUtil.Debug("S.Connector: PrFormat early exit - no hooks");s=OptConstant.ConnectorDefines.NSkip;const y=this.arraylist.styleflags&OptConstant.AStyles.Linear,S=this.arraylist.styleflags&OptConstant.AStyles.BothSides||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),w=this.arraylist.styleflags&OptConstant.AStyles.BothSides,x=this.arraylist.styleflags&OptConstant.AStyles.Stagger,C=this.arraylist.styleflags&OptConstant.AStyles.StartLeft,D=this.arraylist.styleflags&OptConstant.AStyles.FlowConn,T=this.arraylist.styleflags&OptConstant.AStyles.CoManager,k=this.IsAsstConnector(),$=this.IsGenoConnector(),O=this.arraylist.styleflags&OptConstant.AStyles.Radial&&!S,P=0==(this.arraylist.styleflags&OptConstant.AStyles.Linear)&&this.arraylist.styleflags&OptConstant.AStyles.FlowConn;r=p.flags&OptConstant.SessionFlags.NoTreeOverlap,l=0==(p.flags&OptConstant.SessionFlags.NoStepFormatting),l&&(r=!0),D?(r=!1,l=!1):(this.objecttype,NvConstant.FNObjectTypes.CauseEffectMain,r=!0,l=!0),P&&(r=!0);const L=this.arraylist.ht,G=this.arraylist.wd;if(this.hooks.length&&(parentObject=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1))&&(f=parentObject.IsCoManager(b),parentObject.IsAsstConnector()&&(m=parentObject.arraylist.coprofile.vdist,e>=s&&(this.arraylist.hook[1].gap>0&&(this.arraylist.hook[1].gap=L),this.arraylist.hook[2].gap>0&&(this.arraylist.hook[2].gap=L)))),n=e-s,n<0&&(n=0),e>=s)for(i=1;i<s;i++)this.arraylist.hook[i].id>=0&&n++;let F=new CRect(0,0,0,0);d.h=this.arraylist.profile.h,d.hdist=this.arraylist.profile.hdist,d.v=this.arraylist.profile.v,d.vdist=this.arraylist.profile.vdist;let I=0;if(e&&this.hooks&&this.hooks.length)switch(S?this.hooks[0].hookpt:OptConstant.HookPts.LL){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:I=OptConstant.HookPts.LL,0===n?(a=this.arraylist.hook[0],c.h=a.startpoint.h,c.v=a.startpoint.v):(a=this.arraylist.hook[OptConstant.ConnectorDefines.ACl],c.h=a.endpoint.h,c.v=a.endpoint.v);break;default:I=OptConstant.HookPts.LR,0===n?(a=this.arraylist.hook[0],c.h=a.endpoint.h,c.v=a.endpoint.v):(a=this.arraylist.hook[OptConstant.ConnectorDefines.ACr],c.h=a.endpoint.h,c.v=a.endpoint.v)}else c.h=0,c.v=0;if(0===n||this.flags&NvConstant.ObjFlags.NotVisible){for(S?(this.arraylist.hook[0].startpoint.h=0,this.arraylist.hook[0].startpoint.v=0,this.arraylist.hook[0].endpoint.v=0,this.arraylist.hook[0].endpoint.h=G,I===OptConstant.HookPts.LR&&(this.arraylist.hook[0].endpoint.h=-G),this.vertical?(this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y+this.arraylist.hook[0].endpoint.h):(this.EndPoint.y=this.StartPoint.y,this.EndPoint.x=this.StartPoint.x+this.arraylist.hook[0].endpoint.h)):(this.arraylist.hook[0].startpoint.h=0,this.arraylist.hook[0].startpoint.v=0,this.arraylist.hook[0].endpoint.h=0,this.arraylist.hook[0].endpoint.v=L,I===OptConstant.HookPts.LR&&(this.arraylist.hook[0].endpoint.v=-L),this.vertical?(this.EndPoint.y=this.StartPoint.y,this.EndPoint.x=this.StartPoint.x+this.arraylist.hook[0].endpoint.v):(this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y+this.arraylist.hook[0].endpoint.v)),i=1;i<e;i++)this.arraylist.hook[i].startpoint.h=0,this.arraylist.hook[i].startpoint.v=0,this.arraylist.hook[i].endpoint.h=this.arraylist.hook[0].endpoint.h,this.arraylist.hook[i].endpoint.v=this.arraylist.hook[0].endpoint.h;return 0===n&&(this.arraylist.profile.h=0,this.arraylist.profile.v=0,this.arraylist.profile.hdist=0,this.arraylist.profile.vdist=0,this.arraylist.steps.length=0),this.CalcFrame(),void LogUtil.Debug("S.Connector: PrFormat exit for empty connector:",this.arraylist)}let E=0,A=0,U=0,_=0,j=w?1:0,M=C;for(i=s;i<e;i++){a=this.arraylist.hook[i],a.pr.h=0,a.pr.v=0,a.pr.hdist=0,a.pr.vdist=0,a.steps.splice(0),a.comanagerht=0,a.isasst=!1;let t=ObjectUtil$1.GetObjectPtr(a.id,!1);if(t){o=t.GetArrayRect(this.vertical);let e=o.h+o.hdist/2;if(a.pr.h=e,a.pr.hdist=0,y?(a.pr.v=o.vdist/2,a.pr.vdist=o.vdist/2):(a.pr.v=0,a.pr.vdist=o.vdist),a.gap=o.hdist/2,a.ogap=o.hdist/2,a.steps.push(new StepRect(-o.hdist/2,0,o.hdist/2,o.vdist)),a.comanagerht=0,t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(t.arraylist.styleflags&OptConstant.AStyles.CoManager&&(a.comanagerht=t.arraylist.ht),this.IsAsstConnector()&&(a.isasst=!0)),x&&(i-s)%2==0&&A<o.vdist&&(A=o.vdist),r){let t=this.GetElementProfile(a.id,M,l,null,P,!1);t&&(a.pr.h=t.frame.h,a.pr.v=t.frame.v,a.pr.hdist=t.frame.hdist,a.pr.vdist=t.frame.vdist,a.gap=a.pr.h,a.ogap=a.pr.hdist,o=a.pr,a.steps=t.steps),P&&(a.pr.v=0,a.pr.vdist=0)}E<o.vdist&&(E=o.vdist),w?(M=!M,(i-s)%2==0?C?U<o.vdist&&(U=o.vdist):U<o.v&&(U=o.v):C?_<o.v&&(_=o.v):_<o.vdist&&(_=o.vdist)):C?U<o.vdist&&(U=o.vdist):U<o.v&&(U=o.v)}else a.gap=0,a.ogap=0,o=new Rectangle(0,0,0,0)}A+=L<8?8:L,this.objecttype===NvConstant.FNObjectTypes.CauseEffectMain&&(U=0,_=0);let N=0;if(y)g=this.FormatLinear(p,t,l,F,g,k,v),N=F.x;else for(i=s;i<e;i++){a=this.arraylist.hook[i];let t,n=a.gap,o=l?0:a.ogap,r=a.extra;if(w&&i+1<e?(t=this.arraylist.hook[i+1],t.gap>n&&(n=t.gap),t.extra>r&&(r=t.extra),t.ogap>o&&(o=t.ogap)):t=null,i>s)if(l){if(x&&!w&&(i-s)%2==1){let t=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,A);this._InsertStepIntoProfile(a.steps,t)}if(N=this.CompareSteps(g,a.steps)+G+r,t){let e=this.CompareSteps(g,t.steps)+G+r;e>N&&(N=e)}}else N+=r,N+=n;a.startpoint.h=N,a.startpoint.v=0,a.endpoint.h=N,a.endpoint.v=L+U-a.comanagerht,a.endpoint.v<0&&(a.endpoint.v=0),t&&(t.startpoint.h=N,t.startpoint.v=0,t.endpoint.h=N,t.endpoint.v=-(L+_)),x&&(w?t&&(o<0&&(o=0),N+=o+G/2,o=0,t.startpoint.h=N,t.endpoint.h=N):(i-s)%2==1&&(a.endpoint.v+=A)),C&&(a.endpoint.v=-a.endpoint.v,t&&(t.endpoint.v=-t.endpoint.v)),this.UpdateCurrentProfile(F,a,h),t&&this.UpdateCurrentProfile(F,t,h),l&&(g=i===s?Utils1.DeepCopy(a.steps):this.AddStepsToProfile(g,a.steps,!1,!1,a.startpoint.h,0),t&&(g=this.AddStepsToProfile(g,t.steps,!1,!1,t.startpoint.h,0))),(i+=j)<e-1&&(l||(N+=x&&w?o+G/2:o+G))}let B=this.arraylist.hook[OptConstant.ConnectorDefines.ABk];B.startpoint.h=0,B.startpoint.v=0,B.endpoint.h=y?0:N,B.endpoint.v=0;let R,H=this.arraylist.hook[OptConstant.ConnectorDefines.ACl],z=this.arraylist.hook[OptConstant.ConnectorDefines.ACr];if(H.id>=0&&(hookedObject=ObjectUtil$1.GetObjectPtr(H.id,!1))){o=hookedObject.GetArrayRect(this.vertical);let t=o.h+o.hdist/2;H.pr.h=t,H.pr.hdist=0,H.pr.v=0,H.pr.vdist=o.vdist,this.UpdateCurrentProfile(F,H,h)}if(z.id>=0&&(hookedObject=ObjectUtil$1.GetObjectPtr(z.id,!1))){o=hookedObject.GetArrayRect(this.vertical);let t=o.h+o.hdist/2;z.pr.h=t,z.pr.hdist=0,z.pr.v=0,z.pr.vdist=o.vdist,this.UpdateCurrentProfile(F,z,h)}if(0===I&&(H.gap=0),T&&(H.gap=0),R=f?b.ht>this.arraylist.ht/2?b.ht:this.arraylist.ht/2:0,S){let t,i;if(e>s){let n=this.arraylist.hook[s];w&&!x&&e>s+1&&this.arraylist.hook[s+1].gap>this.arraylist.hook[s].gap&&(n=this.arraylist.hook[s+1]);let a=this.arraylist.hook[e-1];w&&!x&&e>s+1&&this.arraylist.hook[e-2].gap>this.arraylist.hook[e-1].gap&&(a=this.arraylist.hook[e-2]),t=n.gap,i=a.gap}else t=0,i=0;let n=this.GetTilt();if(y&&(t=0,i=0,0===I&&(z.gap=0)),this.hooks.length)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:z.gap=0,i=0,t-=R-m,y&&D&&0==(this.arraylist.flags&OptConstant.ArrayFlags.LeaveACl)&&0===H.gap&&(H.gap=G);break;case OptConstant.HookPts.LB:case OptConstant.HookPts.LR:H.gap=0,t=0,i-=R-m,y&&D&&0==(this.arraylist.flags&OptConstant.ArrayFlags.LeaveACr)&&0===z.gap&&(z.gap=G)}if(H.id>=0&&(0===H.gap&&(H.gap=x?G/2:G,this.arraylist.hook[s]&&(H.gap+=this.arraylist.hook[s].gap)),this.arraylist.matchsizelen)){let t=H.gap;H.gap=this.arraylist.matchsizelen-N,H.gap<t&&(H.gap=t)}if(z.id>=0&&(z.gap=x?G/2:G,this.arraylist.hook[e-1]&&(z.gap+=this.arraylist.hook[e-1].gap),this.arraylist.matchsizelen)){let t=z.gap;z.gap=this.arraylist.matchsizelen-N,z.gap<t&&(z.gap=t)}H.startpoint.h=0,H.startpoint.v=0,this.arraylist.angle?H.endpoint.h=-H.gap:(H.endpoint.h=-H.gap-t,0===p.moreflags&&D&&y&&(H.endpoint.h-=H.extra)),I===OptConstant.HookPts.LL&&(H.endpoint.h+=n),H.endpoint.v=0,z.startpoint.h=N+v.lgap,z.startpoint.v=0,n||this.arraylist.angle?z.endpoint.h=N+z.gap:(z.endpoint.h=N+z.gap+i,0===p.moreflags&&D&&y&&(z.endpoint.h+=z.extra)),z.endpoint.v=0}else{let t;if(null!=F.firstconnector_x?(t=F.firstconnector_x?2*(F.firstconnector_x+G):0,H.gap=-F.v+L+H.extra):t=N,H.startpoint.h=t/2,H.startpoint.v=0,H.endpoint.h=t/2,H.endpoint.v=C?H.gap-R+m:-H.gap+R-m,z.startpoint.h=t/2,z.startpoint.v=0,z.endpoint.h=t/2,z.endpoint.v=0,O){for(B.startpoint.h=t/2,B.endpoint.h=t/2,i=s;i<e;i++)this.arraylist.hook[i].startpoint.h=t/2;H.endpoint.v=0}}if(this.arraylist.angle?this.AdjustAngleConnector():this.arraylist.tilt&&this.AdjustTiltConnector(),this.vertical?(this.EndPoint.x=this.StartPoint.x+B.endpoint.v,this.EndPoint.y=this.StartPoint.y+N):(this.EndPoint.y=this.StartPoint.y,this.EndPoint.x=this.StartPoint.x+N),this.CalcFrame(),this.hooks&&this.hooks.length){if(S)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:a=this.arraylist.hook[OptConstant.ConnectorDefines.ACl];break;default:a=this.arraylist.hook[OptConstant.ConnectorDefines.ACr]}else a=this.arraylist.hook[OptConstant.ConnectorDefines.ACl];u.h=a.endpoint.h,u.v=a.endpoint.v,null==c.h||Utils2.IsEqual(c.h,u.h)&&Utils2.IsEqual(c.v,u.v)||OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move)}else u.h=0,u.v=0;if(this.arraylist.coprofile=Utils1.DeepCopy(F),this.arraylist.profile.h=u.h-F.h,this.arraylist.profile.hdist=F.hdist-u.h,this.arraylist.profile.v=u.v-F.v,this.arraylist.profile.vdist=F.vdist-u.v,T&&(C?this.arraylist.profile.v+=L:this.arraylist.profile.vdist+=L,this.arraylist.coprofile=Utils1.DeepCopy(this.arraylist.profile),l&&g.length&&(g[0].vend+=2*L,g[0].v-=2*L),g=this.AddCoManagerChildren(C,l,g)),(k||$)&&(g=this.AddAssistantChildren(C,l,g)),l){if(S){g=this.BuildSideConnectorSteps();for(let e=0,i=g.length;e<i;e++)w||(C?g[e].hend=u.v:g[e].h=u.v);let t=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,-u.h);this._InsertStepIntoProfile(g,t),g.length>1&&(g[0].vend=g[1].v)}else{for(let t=0,e=g.length;t<e;t++)g[t].h-=u.h,g[t].hend-=u.h;if(k){let t=C?a.endpoint.v:-a.endpoint.v,e=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,t);this._InsertStepIntoProfile(g,e)}else if(!T){let t=new StepRect(-u.h,0,B.endpoint.h-u.h,L);this._InsertStepIntoProfile(g,t);let e=C?a.endpoint.v:-a.endpoint.v;t=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,e),this._InsertStepIntoProfile(g,t)}}this.arraylist.steps=g}ObjectUtil$1.AddToDirtyList(t),Utils2.IsEqual(this.arraylist.profile.h,d.h)&&Utils2.IsEqual(this.arraylist.profile.v,d.v)&&Utils2.IsEqual(this.arraylist.profile.hdist,d.hdist)&&Utils2.IsEqual(this.arraylist.profile.vdist,d.vdist)||!r||(OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),OptAhUtil.FindTreeTop(this,DSConstant.LinkFlags.Move,{topconnector:-1,topshape:-1,foundtree:!1})),LogUtil.Debug("S.Connector: PrFormat output:",{horizontalPosition:N,stepsCount:g.length,profile:this.arraylist.profile})}GetAngleDisp(t){LogUtil.Debug("S.Connector: GetAngleDisp called with hook:",t);const e={start:0,end:0};return this.arraylist.angle&&(e.start=-t.startpoint.h*this.arraylist.angle,e.end=-t.endpoint.h*this.arraylist.angle),LogUtil.Debug("S.Connector: GetAngleDisp returning angleDisplacement:",e),e}AdjustAngleConnector(){LogUtil.Debug("S.Connector: AdjustAngleConnector called");const t=OptConstant.ConnectorDefines,e=t.NSkip,i=this.arraylist.hook.length;if(i<e)return;let n,s;n=this.arraylist.hook[t.ABk],s=this.GetAngleDisp(n),n.startpoint.v+=s.start,n.endpoint.v-=s.end,n=this.arraylist.hook[t.ACl],s=this.GetAngleDisp(n),n.startpoint.v+=s.start,n.endpoint.v-=s.end,n=this.arraylist.hook[t.ACr],s=this.GetAngleDisp(n),n.startpoint.v-=s.start,n.endpoint.v-=s.end;for(let a=e;a<i;a++)n=this.arraylist.hook[a],s=this.GetAngleDisp(n),n.startpoint.v-=s.end,n.endpoint.v-=s.end;LogUtil.Debug("S.Connector: AdjustAngleConnector completed")}GetTilt(t){LogUtil.Debug("S.Connector: GetTilt called with height:",t);let e=0;if(this.arraylist.tilt){const i=this.arraylist.tilt/180*Math.PI,n=Math.tan(i);if(n){const i=1/n;e=void 0!==t?t*i:this.arraylist.ht/i}}return LogUtil.Debug("S.Connector: GetTilt returning tiltValue:",e),e}AdjustTiltConnector(){LogUtil.Debug("S.Connector: AdjustTiltConnector called");const t=OptConstant.ConnectorDefines.NSkip,e=this.GetTilt();if(e){const i=this.arraylist.hook.length;if(i<t)return;for(let n=t;n<i;n++)this.arraylist.hook[n].endpoint.h-=e}LogUtil.Debug("S.Connector: AdjustTiltConnector completed")}FormatLinear(t,e,i,n,s,a,o){LogUtil.Debug("S.Connector: FormatLinear called with input:",{session:t,useSteps:i,resultFrame:n,stepsBuffer:s,skipAdjustment:a,output:o});const r=OptConstant.ConnectorDefines.NSkip;let l=this.arraylist.hook.length,h=0,c=0,u=this.arraylist.wd,d=0,p=0,g=!1,f=!1,b=!1,v=0;if(l>=r&&this.hooks.length&&!a&&(()=>{const t=this.hooks[0].hookpt===OptConstant.HookPts.LL||this.hooks[0].hookpt===OptConstant.HookPts.LT;return f=this.arraylist.hook[1].gap>1&&t,b=this.arraylist.hook[2].gap>1&&!t,false})()){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(t){const e=0-t.GetArrayRect(this.vertical).hdist;if(f){const t=this.arraylist.hook[r].gap;v=(0-this.arraylist.hook[r].ogap-t)/2,this.arraylist.hook[1].gap=u+e/2+v+this.arraylist.hook[1].extra,this.arraylist.hook[1].gap<u/2&&(this.arraylist.hook[1].gap=u/2)}if(b){const t=this.arraylist.hook[l-1].gap;v=(0-this.arraylist.hook[l-1].ogap-t)/2,this.arraylist.hook[2].gap=u+e/2+v+this.arraylist.hook[2].extra,this.arraylist.hook[2].gap<u/2&&(this.arraylist.hook[2].gap=u/2)}}}for(let m=r;m<l;m++){v=0;const t=this.arraylist.hook[m];t.isasst&&!g&&(n.firstconnector_x=h,g=!0);const e=t.gap,a=i?0:t.ogap;l===r+1&&(t.extra=0),c+=t.extra;const o=this.GetLeftAdjustment(t.id);t.startpoint.h=h+d,t.startpoint.v=0,t.endpoint.h=c,(m>r||f)&&(t.endpoint.h+=o),t.endpoint.v=0,d=this.GetRightAdjustment(t.id),this.UpdateCurrentProfile(n,t,!1),i?(s=m===r?Utils1.DeepCopy(t.steps):this.AddStepsToProfile(s,t.steps,!1,!1,t.endpoint.h,0),t.steps.length&&(t.steps[0].v<p&&(p=t.steps[0].v),t.steps[0].vend>0&&t.steps[0].vend),h=this.CompareSteps(s,t.steps),c=h-o+u):(h=c,h+=e+a,c=h-o+u)}return i&&a&&s.length&&(s[0].v>p&&(s[0].v=p),s[0].vend<0&&(s[0].vend=0)),b?o.lgap=d:h+=d,n.x=h,LogUtil.Debug("S.Connector: FormatLinear output:",{resultFrame:n,stepsBuffer:s}),s}AddCoManagerChildren(t,e,i){LogUtil.Debug("S.Connector: AddCoManagerChildren input:",{useStartPointFlag:t,copySteps:e,currentSteps:i});const n=OptConstant.ConnectorDefines.NSkip;if(this.arraylist.hook.length>=n){const s=this.arraylist.hook[n],a=i.length;this.arraylist.steps.length=0;for(let t=0;t<a;t++)this.arraylist.steps.push(new StepRect(i[t].h,i[t].v,i[t].hend,i[t].vend));const o=this.GetElementProfile(s.id,t,e,this,!1,!1);o&&(i=o.steps,this.arraylist.profile=o.frame)}return LogUtil.Debug("S.Connector: AddCoManagerChildren output:",i),i}AddAssistantChildren(t,e,i){LogUtil.Debug("S.Connector: AddAssistantChildren input:",{useStartPointFlag:t,copySteps:e,currentSteps:i});let n=this.arraylist.hook.length;let s=-1,a=0,o=!1;for(let r=OptConstant.ConnectorDefines.NSkip;r<n;r++){const t=this.arraylist.hook[r],e=ObjectUtil$1.GetObjectPtr(t.id,!1);if(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){s=r,a=t.endpoint.h,o=Boolean(e.arraylist.styleflags&OptConstant.AStyles.ReverseCol);break}}if(s>=0){const n=this.arraylist.hook[s],r=i.length;this.arraylist.steps.length=0;for(let t=0;t<r;t++)this.arraylist.steps.push(new StepRect(i[t].h,i[t].v,i[t].hend,i[t].vend));const l=this.GetElementProfile(n.id,t,e,this,!1,!0);if(l){if(o){const t=l.frame.v;l.frame.v=l.frame.vdist,l.frame.vdist=t}if(l.frame.h>this.arraylist.profile.h&&(this.arraylist.profile.h=l.frame.h),l.frame.hdist>this.arraylist.profile.hdist&&(this.arraylist.profile.hdist=l.frame.hdist),l.frame.v>this.arraylist.profile.v&&(this.arraylist.profile.v=l.frame.v),l.frame.vdist>this.arraylist.profile.vdist&&(this.arraylist.profile.vdist=l.frame.vdist),e){const t=l.steps.length,e=i[0].vend;for(let n=0;n<t;n++)i.push(new StepRect(l.steps[n].h+a,l.steps[n].v+e,l.steps[n].hend+a,l.steps[n].vend+e))}}const h=i.length;for(let t=0;t<h;t++)i[t].h>0&&(i[t].h=0)}return LogUtil.Debug("S.Connector: AddAssistantChildren output:",i),i}CompareSteps(t,e){LogUtil.Debug("S.Connector: CompareSteps called with",{existingSteps:JSON.stringify(t),newSteps:JSON.stringify(e)});let i=0;const n=t.length,s=e.length;let a=0;for(let o=0;o<s;o++)(void 0===a||e[o].vend>a)&&(a=e[o].vend);if(s>0){for(let o=0;o<n&&!(t[o].v>a);o++)for(let n=0;n<s;n++)if(e[n].vend>t[o].v&&e[n].v<t[o].vend){const s=t[o].hend-e[n].h;s>i&&(i=s)}else if(e[n].v>t[o].vend)break}else for(let o=0;o<n;o++)t[o].hend>i&&(i=t[o].hend);return LogUtil.Debug("S.Connector: CompareSteps returning output:",i),i}AddStepsToProfile(t,e,i,n,s,a){LogUtil.Debug("S.Connector: AddStepsToProfile called with",{existingSteps:JSON.stringify(t),newSteps:JSON.stringify(e),transform:i,invert:n,offset:s,newOffset:a});let o=t.length,r=e.length,l=[],h=0,c=[];const u=OptConstant.Common.MaxSteps;if(o&&0===r&&s){for(let e=0;e<o;e++)l.push(new StepRect(t[e].h,t[e].v,s,t[e].vend));return LogUtil.Debug("S.Connector: AddStepsToProfile output",JSON.stringify(l)),l}if(i){for(let t=0;t<r;t++)n?c.push(new StepRect(-e[t].vend,e[t].h+s,e[t].v,e[t].hend+s)):c.push(new StepRect(e[t].v,e[t].h+s,e[t].vend,e[t].hend+s));s=a}else c=e;for(let g=0;g<o;g++){h<u?(h>0&&(l[h-1].vend=t[g].v),l.push(new StepRect(t[g].h,t[g].v,t[g].hend,t[g].vend)),h++):(t[g].vend>l[h-1].vend&&(l[h-1].vend=t[g].vend),l[h-1].h<t[g].h&&(l[h-1].h=t[g].h),l[h-1].hend<t[g].hend&&(l[h-1].hend=t[g].hend));for(let e=0;e<r;e++)if(c[e].vend>t[g].v&&c[e].v<=t[g].vend)if(c[e].v<=l[h-1].v?(l[h-1].hend<c[e].hend+s&&(l[h-1].hend=c[e].hend+s),l[h-1].h>c[e].h+s&&(l[h-1].h=c[e].h+s)):h<u?(l[h-1].vend=c[e].v,l.push(new StepRect(t[g].h,t[g].v,t[g].hend,t[g].vend)),l[h].v=l[h-1].vend,l[h].hend=c[e].hend+s,l[h].h>c[e].h+s&&(l[h].h=c[e].h+s),h++):(c[e].vend>l[h-1].vend&&(l[h-1].vend=c[e].vend),l[h-1].hend<c[e].hend+s&&(l[h-1].hend=c[e].hend+s),l[h-1].h<c[e].h+s&&(l[h-1].h=c[e].h+s)),c[e].vend<t[g].vend)h<u?(l[h-1].vend=c[e].vend,l.push(new StepRect(t[g].h,t[g].v,t[g].hend,t[g].vend)),c[e].v<l[h].v&&(l[h].v=l[h-1].vend),h++):c[e].vend>l[h-1].vend&&(l[h-1].vend=c[e].vend);else if(c[e].v>t[g].vend)break}let d;h?d=l[h-1].vend:(d=0,r&&(d=c[0].v));for(let g=0;g<r;g++)c[g].vend>d&&(h<u?(l.push(new StepRect(c[g].h,c[g].v,c[g].hend,c[g].vend)),c[g].v<d&&h>0&&(l[h].v=d),h++):(c[g].vend>l[h-1].vend&&(l[h-1].vend=c[g].vend),l[h-1].hend<c[g].hend+s&&(l[h-1].hend=c[g].hend+s),l[h-1].h<c[g].h+s&&(l[h-1].h=c[g].h+s)));let p=1;for(let g=1;g<h;g++)l[p-1].h===l[g].h&&l[p-1].hend===l[g].hend?l[p-1].vend=l[g].vend:(p<g&&(l[p]=Utils1.DeepCopy(l[g])),p++);return l.length=l.length>=p?p:l.length,LogUtil.Debug("S.Connector: AddStepsToProfile output",JSON.stringify(l)),l}BuildSideConnectorSteps(){LogUtil.Debug("S.Connector: BuildSideConnectorSteps called, total hooks =",this.arraylist.hook.length);let t=[];const e=OptConstant.AStyles,i=Boolean(this.arraylist.styleflags&e.StartLeft),n=Boolean(this.arraylist.styleflags&e.BothSides);this.arraylist.styleflags;const s=this.arraylist.hook.length,a=OptConstant.ConnectorDefines.NSkip;let o=i;if(s>a){const e=this.arraylist.hook[a],r=e.steps.length;for(let n=0;n<r;n++)i?t.push(new StepRect(-e.steps[n].vend+e.endpoint.v,1*e.steps[n].h,e.steps[n].v+e.endpoint.v,1*e.steps[n].hend)):t.push(new StepRect(e.steps[n].v+e.endpoint.v,1*e.steps[n].h,e.steps[n].vend+e.endpoint.v,1*e.steps[n].hend));for(let i=a+1;i<s;i++){n&&(o=!o);const e=this.arraylist.hook[i],s=e.endpoint.v;t=this.AddStepsToProfile(t,e.steps,!0,o,1*e.startpoint.h,s)}}return LogUtil.Debug("S.Connector: BuildSideConnectorSteps completed with output:",JSON.stringify(t)),t}InsertStepIntoProfile(t,e){LogUtil.Debug("S.Connector: InsertStepIntoProfile called with",{profileSteps:JSON.stringify(t),newStep:JSON.stringify(e)}),t.unshift(e);const i=e.vend-e.v;for(let n=1;n<t.length;n++)t[n].v+=i,t[n].vend+=i;LogUtil.Debug("S.Connector: InsertStepIntoProfile completed with output",JSON.stringify(t))}UpdateCurrentProfile(t,e,i){let n,s;LogUtil.Debug("S.Connector: UpdateCurrentProfile called with",{profile:JSON.stringify(t),hook:JSON.stringify(e),flag:i}),n=e.endpoint.h-e.pr.h,n<t.h&&(t.h=n),s=e.endpoint.h+e.pr.hdist,s>t.hdist&&(t.hdist=s),n=e.endpoint.v-e.pr.v,n<t.v&&(t.v=n),s=e.endpoint.v+e.pr.vdist,s>t.vdist&&(t.vdist=s),LogUtil.Debug("S.Connector: UpdateCurrentProfile completed with output",JSON.stringify(t))}GetFullShapeProfile(t,e,i,n,s){LogUtil.Debug("S.Connector: GetFullShapeProfile called with",{targetObjectId:t,offsetX:e,offsetY:i,resultRect:n,updateUnion:s});let a=ObjectUtil$1.GetObjectPtr(t,!1);const o=OptConstant.ConnectorDefines.NSkip;let r,l={lindex:-1,id:-1,hookpt:0},h={x:0,y:0,width:0,height:0},c=[];if(a)for(Utils2.CopyRect(h,a.Frame),h.x+=e,h.y+=i,s?Utils2.CopyRect(n,h):Utils2.UnionRect(n,h,n);T3Gv.opt.FindChildArrayByIndex(t,l)>0;){let t=ObjectUtil$1.GetObjectPtr(l.id,!1);if(!t)break;let s=t.HookToPoint(t.hooks[0].hookpt,null);c=[],c.push(new Point$1(t.hooks[0].connect.x,t.hooks[0].connect.y)),r=a.GetPerimPts(a.BlockID,c,t.hooks[0].hookpt,!0,null,-1),r&&s&&(e+=r[0].x-s.x,i+=r[0].y-s.y),Utils2.CopyRect(h,t.Frame),h.x+=e,h.y+=i,Utils2.UnionRect(n,h,n);let u=t.arraylist.hook.length;for(let a=o;a<u;a++){let s=t.arraylist.hook[a],o=ObjectUtil$1.GetObjectPtr(s.id,!1);if(o){let a=o.HookToPoint(o.hooks[0].hookpt,null);if(c=[],c.push(new Point$1(o.hooks[0].connect.x,o.hooks[0].connect.y)),r=t.GetPerimPts(t.BlockID,c,o.hooks[0].hookpt,!0,null,-1),r&&a){let o=e+r[0].x-a.x,l=i+r[0].y-a.y;t.GetFullShapeProfile(s.id,o,l,n,!1)}}}}LogUtil.Debug("S.Connector: GetFullShapeProfile completed with resultRect:",n)}GetRightAdjustment(t){LogUtil.Debug("S.Connector: GetRightAdjustment called with hookedObjectId:",t);const e=OptConstant.HookPts,i=ObjectUtil$1.GetObjectPtr(t,!1);if(null==i)return LogUtil.Debug("S.Connector: GetRightAdjustment returning output: 0 (hookedObject is null)"),0;if(0===i.hooks.length)return LogUtil.Debug("S.Connector: GetRightAdjustment returning output: 0 (hookedObject has no hooks)"),0;let n,s,a=0;switch(i.hooks[0].hookpt){case e.AKCT:n=e.AKCB;break;case e.AKCB:n=e.AKCT;break;case e.AKCR:n=e.AKCL;break;case e.AKCL:n=e.AKCR}if(n&&(s=i.HookToPoint(n,null),s)){switch(n){case e.AKCT:a=s.y-i.Frame.y;break;case e.AKCB:a=s.y-i.Frame.y-i.Frame.height;break;case e.AKCR:a=s.x-i.Frame.x-i.Frame.width;break;case e.AKCL:a=s.x-i.Frame.x}Utils2.IsEqual(a,0)&&(a=0)}return LogUtil.Debug("S.Connector: GetRightAdjustment returning output:",a),a}GetLeftAdjustment(t){LogUtil.Debug("S.Connector: GetLeftAdjustment called with hookObjectId:",t);const e=OptConstant.HookPts,i=ObjectUtil$1.GetObjectPtr(t,!1);if(null==i)return LogUtil.Debug("S.Connector: GetLeftAdjustment returning 0 because hookedObject is null"),0;if(i.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape)return LogUtil.Debug("S.Connector: GetLeftAdjustment returning 0 because hookedObject is not of type SHAPE"),0;if(0===i.hooks.length)return LogUtil.Debug("S.Connector: GetLeftAdjustment returning 0 because hookedObject has no hooks"),0;let n,s=i.hooks[0].hookpt,a=0;if(s&&(n=i.HookToPoint(s,null),n)){switch(s){case e.AKCT:a=n.y-i.Frame.y;break;case e.AKCB:a=n.y-i.Frame.y-i.Frame.height;break;case e.AKCR:a=n.x-i.Frame.x-i.Frame.width;break;case e.AKCL:a=n.x-i.Frame.x}Utils2.IsEqual(a,0)&&(a=0)}return LogUtil.Debug("S.Connector: GetLeftAdjustment returning leftAdjustment:",a),a}GetElementProfile(e,i,n,s,a,o){let r,l,h,c,u,d;LogUtil.Debug("S.Connector: GetElementProfile called with",{targetObjectId:e,useStartPointFlag:i,copySteps:n,referenceConnector:s,useFullShapeProfile:a,ignoreGenoFlag:o});let p={},g={},f={h:0,v:0},b={},v={frame:{},nsteps:0,steps:[]};const m=OptConstant.AStyles,y=OptConstant.ConnectorDefines.NSkip,S=ObjectUtil$1.GetObjectPtr(e,!1);if(null==S)return null;let w=this.arraylist.styleflags&m.CoManager;s&&(w=!1);let x=this.arraylist.styleflags&m.Linear,C=this.IsAsstConnector(),D=this.IsGenoConnector();if(o&&(D=!1),C&&s&&(C=!1),S.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){if(C||D)return v.frame.h=0,v.frame.hdist=0,v.frame.v=0,v.frame.vdist=0,this.arraylist.hook[y].id!=e&&(v.frame.v=this.arraylist.hook[y].pr.v),v.steps.push(new StepRect(-v.frame.h,-v.frame.v,v.frame.hdist,v.frame.vdist)),LogUtil.Debug("S.Connector: GetElementProfile output",v),v;const t=S.arraylist.styleflags&m.BothSides||0==(S.arraylist.styleflags&m.PerpConn);if(S.vertical===this.vertical?(v.frame.h=S.arraylist.profile.h,v.frame.hdist=S.arraylist.profile.hdist,v.frame.v=S.arraylist.profile.v,v.frame.vdist=S.arraylist.profile.vdist):(v.frame.v=S.arraylist.profile.h,v.frame.vdist=S.arraylist.profile.hdist,S.arraylist.styleflags&m.CoManager&&this.arraylist.styleflags&m.ReverseCol?(v.frame.h=S.arraylist.profile.vdist,v.frame.hdist=S.arraylist.profile.v):(v.frame.h=S.arraylist.profile.v,v.frame.hdist=S.arraylist.profile.vdist)),n){const e=S.arraylist.steps.length;u=S.arraylist.steps;let i=S.vertical===this.vertical;if(t&&(i=!i),i)for(let t=0;t<e;t++)v.steps.push(new StepRect(u[t].h,u[t].v,u[t].hend,u[t].vend));else for(let t=0;t<e;t++)v.steps.push(new StepRect(u[t].v,u[t].h,u[t].vend,u[t].hend))}return LogUtil.Debug("S.Connector: GetElementProfile output",v),v}if(S.hooks.length&&S.hooks[0].objid===this.BlockID)if(s){v.frame.h=s.arraylist.profile.h,v.frame.v=s.arraylist.profile.v,v.frame.hdist=s.arraylist.profile.hdist,v.frame.vdist=s.arraylist.profile.vdist;const t=this.arraylist.steps.length;for(let e=0;e<t;e++)v.steps.push(new StepRect(this.arraylist.steps[e].h,this.arraylist.steps[e].v,this.arraylist.steps[e].hend,this.arraylist.steps[e].vend));n?(g.x=this.StartPoint.x,g.y=this.StartPoint.y):g=s.HookToPoint(S.hooks[0].hookpt,null),r=Utils2.Pt2CPoint(g,this.vertical),r.v+=this.arraylist.ht}else g=S.HookToPoint(S.hooks[0].hookpt,null),r=Utils2.Pt2CPoint(g,this.vertical),a?(this.GetFullShapeProfile(e,0,0,p,!0),l=Utils2.Rect2CRect(p,this.vertical)):l=S.GetArrayRect(this.vertical),v.frame.h=r.h-l.h,v.frame.hdist=l.h+l.hdist-r.h,v.frame.v=r.v-l.v,v.frame.vdist=l.v+l.vdist-r.v,n&&(i&&!x?v.steps.push(new StepRect(-v.frame.h,v.frame.vdist,v.frame.hdist,v.frame.v)):v.steps.push(new StepRect(-v.frame.h,-v.frame.v,v.frame.hdist,v.frame.vdist)));else g=S.HookToPoint(S.hooks[0].hookpt,null),r=Utils2.Pt2CPoint(g,this.vertical),a?(this.GetFullShapeProfile(e,0,0,p,!0),l=Utils2.Rect2CRect(p,this.vertical)):l=S.GetArrayRect(this.vertical),v.frame.h=r.h-l.h,v.frame.hdist=l.h+l.hdist-r.h,v.frame.v=r.v-l.v,v.frame.vdist=l.v+l.vdist-r.v,n&&(i&&!x?v.steps.push(new StepRect(-v.frame.h,v.frame.vdist,v.frame.hdist,v.frame.v)):v.steps.push(new StepRect(-v.frame.h,-v.frame.v,v.frame.hdist,v.frame.vdist)));if(d=T3Gv.opt.FindChildArray(e,-1),!x&&!w&&!C&&d>=0){const e=ObjectUtil$1.GetObjectPtr(d,!1);if(e&&e.hooks.length&&e.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip>0&&0==(e.flags&NvConstant.ObjFlags.NotVisible)){if(c=[],c.push(new Point$1(e.hooks[0].connect.x,e.hooks[0].connect.y)),h=e.GetPerimPts(e.BlockID,c,e.hooks[0].hookpt,!0,null,-1),h&&r){let t=Utils2.Pt2CPoint(h[0],this.vertical);f.h=r.h-t.h,f.v=r.v-t.v}const n=e.arraylist.steps.length;if(u=e.arraylist.steps,e.vertical===this.vertical?(e.arraylist.styleflags&m.ReverseCol&&(f.h=-f.h),b.h=e.arraylist.profile.h+f.h,b.hdist=e.arraylist.profile.hdist-f.h,b.v=e.arraylist.profile.v+f.v,b.vdist=e.arraylist.profile.vdist-f.v):(e.arraylist.styleflags&m.ReverseCol&&(f.v=-f.v),e.arraylist.styleflags&m.StartLeft&&!bothSides?(b.hdist=e.arraylist.profile.v+f.h,b.h=e.arraylist.profile.vdist-f.h):(b.h=e.arraylist.profile.v+f.h,b.hdist=e.arraylist.profile.vdist-f.h),e.arraylist.styleflags&m.ReverseCol?(b.vdist=e.arraylist.profile.h+f.v,b.v=e.arraylist.profile.hdist-f.v):(b.v=e.arraylist.profile.h+f.v,b.vdist=e.arraylist.profile.hdist-f.v)),b.h>v.frame.h&&(v.frame.h=b.h),b.v>v.frame.v&&(v.frame.v=b.v),b.hdist>v.frame.hdist&&(v.frame.hdist=b.hdist),b.vdist>v.frame.vdist&&(v.frame.vdist=b.vdist),n){if(e.vertical===this.vertical){let e=t?-f.v:f.v;for(let t=0;t<n;t++)v.steps.push(new StepRect(u[t].h-f.h,u[t].v-e,u[t].hend-f.h,u[t].vend-e))}else{let s=i&&e.arraylist.styleflags&m.StartLeft?-f.h:f.h;if(t)for(let t=0;t<n;t++)v.steps.push(new StepRect(u[t].v-s,-u[t].hend-f.v,u[t].vend-s,-u[t].h-f.v));else for(let t=0;t<n;t++)v.steps.push(new StepRect(u[t].v-s,u[t].h-f.v,u[t].vend-s,u[t].hend-f.v))}}}}else if(childObj){let e=t?-f.v:f.v,i=childObj.arraylist.styleflags&m.StartLeft?-f.h:f.h;if(t)for(let t=0;t<u.length;t++)v.steps.push(new StepRect(u[t].v-i,-u[t].hend-e,u[t].vend-i,-u[t].h-e));else for(let t=0;t<u.length;t++)v.steps.push(new StepRect(u[t].v-i,u[t].h-e,u[t].vend-i,u[t].hend-e))}return LogUtil.Debug("S.Connector: GetElementProfile output",v),v}PrAdjustHooks(t,e){LogUtil.Debug("S.Connector: PrAdjustHooks called with startIndex:",t,"offsetAdjustment:",e);const i=OptConstant.ConnectorDefines.NSkip,n=this.arraylist.hook.length;for(let s=t;s<n;s++){const t=this.arraylist.hook[s];if(t.id>=0){const e=ObjectUtil$1.GetObjectPtr(t.id,!0);if(e&&e.hooks.length){e.hooks[0].connect.x=s-i;const n=e.hooks[0].hookpt;e.hooks[0].hookpt=this.GetBestHook(t.id,n,e.hooks[0].connect),e.SetHookAlign(e.hooks[0].hookpt,n)}}}LogUtil.Debug("S.Connector: PrAdjustHooks completed")}PrAddHookedObject(t,e,i){let n,s;LogUtil.Debug("S.Connector: PrAddHookedObject called with objectId:",t,"hookPoint:",e,"textId:",i);let a=new SDHook,o=!1;const r=OptConstant.AStyles,l=this.arraylist.styleflags&r.BothSides||0==(this.arraylist.styleflags&r.PerpConn),h=this.arraylist.styleflags&r.Linear,c=this.arraylist.styleflags&r.Radial;if(null!=this.arraylist){this.arraylist.matchsizelen=0;let r=ObjectUtil$1.GetObjectPtr(t,!1);if(e===OptConstant.ConnectorDefines.StubHookPt)e=0,o=!0;else{if(-1===e||-2===e)return this.arraylist.hook[-e].id=t,void LogUtil.Debug("S.Connector: PrAddHookedObject early exit for negative hookPoint:",e);r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&r.arraylist.angle&&(o=!0)}if(e>=0){if(this.vertical,n=this.arraylist.hook.length,n<OptConstant.ConnectorDefines.NSkip)for(let t=n;t<OptConstant.ConnectorDefines.NSkip;t++){let t=new SDHook;l?1!==this.arraylist.hook.length||h||c?t.gap=this.arraylist.wd:t.gap=OptConstant.Common.CITreeSpaceExtra+this.arraylist.wd:1!==this.arraylist.hook.length||h||c?t.gap=this.arraylist.ht:t.gap=OptConstant.Common.CITreeSpaceExtra+this.arraylist.ht,this.arraylist.hook.push(t)}if(s=e+OptConstant.ConnectorDefines.NSkip,0===e&&i>=0&&h&&(0===this.hooks.length||this.hooks[0].hookpt!==OptConstant.HookPts.LL&&this.hooks[0].hookpt!==OptConstant.HookPts.LT)){let t=T3Gv.stdObj.GetObject(i);t&&t.Delete(),i=-1}a.id=t,i&&(a.textid=i),n=this.arraylist.hook.length,n<s&&(s=n,o=!0),this.arraylist.hook.splice(s,0,a),n=this.arraylist.hook.length,o?this.PrAdjustHooks(s,0):(r=ObjectUtil$1.GetObjectPtr(t,!0),r&&r.SetHookAlign(r.hooks[0].hookpt,r.hooks[0].hookpt)),this.PrAdjustHooks(s+1,1)}}LogUtil.Debug("S.Connector: PrAddHookedObject completed with objectId:",t)}PrRemoveHookedObject(t,e){LogUtil.Debug("S.Connector: PrRemoveHookedObject called with objectId:",t,"hookIndex:",e);let i=0;if(null!=this.arraylist){this.arraylist.matchsizelen=0;let t=this.arraylist.hook.length;if(e>=OptConstant.ConnectorDefines.NSkip&&e<t&&(e<t-1&&e>OptConstant.ConnectorDefines.NSkip&&(i=this.arraylist.hook[e].extra),this.arraylist.hook.splice(e,1)),this.arraylist.hook.length===OptConstant.ConnectorDefines.NSkip+2){let t=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip+1];(this.arraylist.styleflags&OptConstant.AStyles.PerpConn)>0&&(0===t.extra&&0===i||(this.arraylist.wd+=t.extra+i,this.arraylist.wd<0&&(this.arraylist.wd=0),t.extra=0))}this.PrAdjustHooks(e,-1)}LogUtil.Debug("S.Connector: PrRemoveHookedObject completed for hookIndex:",e)}PrGetNBackBoneSegments(){LogUtil.Debug("S.Connector: PrGetNBackBoneSegments() called, input: none");let t=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip;t<2&&(t=2);const e=t-1;return LogUtil.Debug("S.Connector: PrGetNBackBoneSegments() returning output:",e),e}PrGetStubIndex(){LogUtil.Debug("S.Connector: PrGetStubIndex called");let t=0;const e=OptConstant.AStyles,i=this.arraylist.styleflags&e.BothSides||0==(this.arraylist.styleflags&e.PerpConn),n=OptConstant.ConnectorDefines,s=OptConstant.HookPts;if(i&&this.hooks.length)switch(this.hooks[0].hookpt){case s.LL:case s.LT:t=n.ACl;break;default:t=n.ACr}return LogUtil.Debug("S.Connector: PrGetStubIndex returning output:",t),t}PrGetEndShapeIndex(){LogUtil.Debug("S.Connector: PrGetEndShapeIndex called");let t=0;const e=OptConstant.AStyles,i=OptConstant.ConnectorDefines,n=OptConstant.HookPts;if(this.arraylist.styleflags&e.EndConn&&this.hooks.length>0)switch(this.hooks[0].hookpt){case n.LL:case n.LT:t=i.ACr;break;default:t=i.ACl}return LogUtil.Debug("S.Connector: PrGetEndShapeIndex returning output:",t),t}PrAdjustFormat(t,e,i,n,s,a,o,r){LogUtil.Debug("S.Connector: PrAdjustFormat input:",{horizontalOffset:t,verticalOffset:e,gapAdjustment:i,actionTriggerType:n,actionTriggerData:s,backboneSegments:a,stubIndex:o,endShapeIndex:r});let l,h,c,u,d=0;const p=OptConstant.AStyles,g=this.arraylist.styleflags&p.BothSides||0==(this.arraylist.styleflags&p.PerpConn),f=this.arraylist.styleflags&p.BothSides&&0==(this.arraylist.styleflags&p.Stagger),b=this.arraylist.styleflags&p.Stagger&&this.vertical,v=this.arraylist.styleflags&p.Linear,m=this.arraylist.styleflags&p.ReverseCol,y=this.arraylist.styleflags&p.StartLeft,S=this.arraylist.styleflags&p.Radial,w=OptConstant.ConnectorDefines,x=[],C=[],D=[],T=[],k=[],$=this,O=function(t,e){let i,n=0,s=0;for(o!==w.ACl&&o!==w.ACr||(l=o,c=$.arraylist.hook[l],x[l]=c.startpoint.h,C[l]=c.gap+D[l],n++,D[l]<0?C[l]<-D[l]&&(i=C[l],i<0&&(i=0),s+=-D[l]+i,C[l]<0&&(C[l]=0),n--,D[l]=0):C[l]<D[l]&&(i=C[l],i<0&&(i=0),s+=D[l]-i,C[l]<0&&(C[l]=0),n--,D[l]=0)),l=t;l<e;l++)0!==D[l]&&(c=$.arraylist.hook[l],x[l]=c.startpoint.h,C[l]=$.arraylist.wd+c.extra,n++,D[l]<0?C[l]<-D[l]&&(i=C[l],i<0&&(i=0),s+=-D[l]+i,C[l]<0&&(C[l]=0),n--,D[l]=0):C[l]<D[l]&&(i=C[l],i<0&&(i=0),s+=D[l]-i,C[l]<0&&(C[l]=0),n--,D[l]=0));return n<=0&&(s=0),s/n},P=function(e,i,n){let s,a=2,r=!1,h=0;for(o===w.ACl?(l=o,s=$.arraylist.hook[l],T[l]=s.startpoint.h-s.endpoint.h,D[l]=t):o===w.ACr&&(l=o,s=$.arraylist.hook[l],T[l]=s.endpoint.h-s.startpoint.h,D[l]=-t),l=e;l<i;l++)s=$.arraylist.hook[l],D[l]=n?-t:t,T[l]=s.endpoint.h-s.startpoint.h;for(;Math.abs(a)>1;){if(a=O(e,i),Math.abs(a>1))for(l=e;l<i;l++)0!==D[l]&&(r=!0,D[l]+=a);if(!r)break}if(n){const t=$.arraylist.hook.length;for(o===w.ACr&&(h-=C[l=o]-T[l],x[l]+=h,k[t-1]=h),l=i-1;l>=e;l--)h-=C[l]-T[l],x[l]+=h,k[l-1]=h}else{for(o===w.ACl&&(h+=C[l=o]-T[l],x[l]+=h,x[w.NSkip]+=h,k[w.NSkip]=h,C[w.NSkip]=0),l=e+1;l<i;l++)h+=C[l-1]-T[l-1],x[l]+=h,k[l-1]=h;h+=C[i-1]-T[i-1],k[i-1]=h}},L=function(t,e,i){let n,s,a,h=0,u=0;const d=i?1:0,p=function(t){if(t!==w.ACl&&t!==w.ACr)return;if(n=t,s=$.arraylist.hook[n],x[n]=s.startpoint.h,t===w.ACl)C[n]=s.gap+D[n],x[w.NSkip]=s.startpoint.h;else{const t=$.arraylist.hook.length;C[n]=s.gap+D[n],t>w.NSkip&&(x[t-1]=s.startpoint.h,C[t-1]=0)}u++;let e=T[n]-T3Gv.opt.ConnectorWidthList[n];D[n]<0?e<-D[n]&&(a=e,a<0&&(a=0),h+=-D[n]+a,C[n]<0&&(C[n]=0),u--,D[n]=0):C[n]<D[n]&&(a=C[n],a<0&&(a=0),h+=D[n]-a,C[n]<0&&(C[n]=0),u--,D[n]=0),C[n]+=T3Gv.opt.ConnectorWidthList[n]};for(p(o),p(r),l=t;l<e;l++)f&&i&&l++,0!==D[l]&&(s=$.arraylist.hook[l],c=$.arraylist.hook[l+d],x[l]=S?s.endpoint.h:s.startpoint.h,C[l]=$.arraylist.wd+c.extra,u++,D[l]<0?C[l]<-D[l]&&(a=C[l],a<0&&(a=0),h+=-D[l]+a,C[l]<0&&(C[l]=0),u--,D[l]=0):C[l]<D[l]&&(a=C[l],a<0&&(a=0),h+=D[l]-a,C[l]<0&&(C[l]=0),u--,D[l]=0),C[l]+=T3Gv.opt.ConnectorWidthList[l],f&&!i&&l++);return u<=0&&(h=0),h/u},G=function(e,i,n){let s,a,l=2,h=!1,c=0,u=0;if(o===w.ACl?(s=o,a=$.arraylist.hook[s],T[s]=a.startpoint.h-a.endpoint.h,D[s]=t):o===w.ACr&&(s=o,a=$.arraylist.hook[s],T[s]=a.endpoint.h-a.startpoint.h,D[s]=-t),r===w.ACl?(s=r,a=$.arraylist.hook[s],T[s]=a.startpoint.h-a.endpoint.h,D[s]=-t):r===w.ACr&&(s=r,a=$.arraylist.hook[s],T[s]=a.endpoint.h-a.startpoint.h,D[s]=t),n)for(f&&(u=1),s=e;s<i;s++)a=$.arraylist.hook[s],D[s+u]=-t,T[s+u]=$.arraylist.hook[s+1+u].endpoint.h-a.endpoint.h,f&&s++;else for(s=e;s<i;s++)a=$.arraylist.hook[s],D[s]=t,T[s]=a.endpoint.h-$.arraylist.hook[s-1].endpoint.h,f&&s++;for(;Math.abs(l)>1;){if(l=L(e,i,n),Math.abs(l>1))for(s=e;s<i;s++)0!==D[s]&&(h=!0,D[s]+=l),f&&s++;if(!h)break}const d=$.arraylist.hook.length;if(n){for(o===w.ACr&&(c-=C[s=o]-T[s],x[s]+=c,d>w.NSkip&&(k[d-1]=c,C[d-1]=0),C[s]-=T3Gv.opt.ConnectorWidthList[s]),s=i-1;s>=e;s--)f&&s++,c-=C[s]-T[s],k[s]=c,x[s]+=c,f&&s--,f&&s--;r===w.ACl&&(c-=C[s=r]-T[s],x[s]+=c,k[s]=m?-c:c,C[s]-=T3Gv.opt.ConnectorWidthList[s])}else{for(o===w.ACl&&(c+=C[s=o]-T[s],x[s]+=c,$.arraylist.hook.length>w.NSkip&&(x[w.NSkip]+=c,k[w.NSkip]=m?-c:c),C[w.NSkip]=0,C[s]-=T3Gv.opt.ConnectorWidthList[s]),s=e;s<i;s++)c+=C[s]-T[s],k[s]=m?-c:c,x[s]+=c,f&&s++;r===w.ACr&&(c+=C[s=r]-T[s],x[s]+=c,k[w.ACr]=c,C[s]-=T3Gv.opt.ConnectorWidthList[s])}for(s=e;s<i;s++)f&&n&&s++,C[s]=0};if(h=this.arraylist.hook.length,t){let e=f?2:1;if(d=t,m&&(t=-t),n===OptConstant.ActionTriggerType.ConnectorAdj){if(v&&o===w.ACr)for(l=s;l>w.NSkip;l--)c=this.arraylist.hook[l],v&&l===s||S||(c.startpoint.h+=d),c.endpoint.h+=d;else for(l=s;l<h;l++)c=this.arraylist.hook[l],v&&l===s||S||(c.startpoint.h+=d),c.endpoint.h+=d,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle),f&&l<h-1&&(l++,c=this.arraylist.hook[l],c.startpoint.h+=d,c.endpoint.h+=d,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle));v||S||(this.arraylist.hook[0].endpoint.h+=d,this.arraylist.angle&&(this.arraylist.hook[0].endpoint.v+=d*this.arraylist.angle))}else if(n===OptConstant.ActionTriggerType.LineStart){let t=!1;for(f&&h%2==0?(e=2,t=!0):e=f?3:1,v?P(w.NSkip,h-1-e+(v?1:0)+1,!0):G(w.NSkip+(v?1:0),h-1-e+(v?1:0)+1,!0),o===w.ACr&&(c=this.arraylist.hook[o],c.gap=C[o],d=x[o]-c.startpoint.h,c.startpoint.h=x[o],this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle),v||(e=0,h>w.NSkip&&(c=this.arraylist.hook[0],c.endpoint.h=x[o],this.arraylist.angle&&(c.endpoint.v+=d*this.arraylist.angle)))),l=h-1-e+(v?1:0);l>=w.NSkip+(v?1:0);l--)c=this.arraylist.hook[l],S?(d=x[l]-c.endpoint.h,c.endpoint.h=x[l]):(d=x[l]-c.startpoint.h,c.startpoint.h=x[l],this.arraylist.tilt?c.endpoint.h=c.endpoint.h+d:c.endpoint.h=c.startpoint.h+C[l]),this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle),u=c,f&&l>w.NSkip&&!t&&(l--,c=this.arraylist.hook[l],c.startpoint.h+=d,c.endpoint.h+=d,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle)),t=!1;v||S||(this.arraylist.hook[0].startpoint.h+=d,this.arraylist.angle&&(this.arraylist.hook[0].startpoint.v+=d*this.arraylist.angle,this.arraylist.hook[w.ACl].endpoint.h!=this.arraylist.hook[w.ACl].startpoint.h&&(l=w.ACl,c=this.arraylist.hook[w.ACl],c.gap=C[l],d=x[l]-c.startpoint.h,h>w.NSkip?(c.startpoint.h=this.arraylist.hook[w.NSkip].endpoint.h,c.startpoint.v=this.arraylist.hook[w.NSkip].startpoint.v):(c.startpoint.h=this.arraylist.hook[w.ACr].startpoint.h,c.startpoint.v=this.arraylist.hook[w.ACr].startpoint.v),c.endpoint.h=c.startpoint.h-C[w.ACl],this.arraylist.angle&&(c.endpoint.v+=d*this.arraylist.angle))))}else{for(v?(o===w.ACl&&(e=0),P(w.NSkip+e,h,!1)):G(w.NSkip+e,h,!1),o===w.ACl&&(e=0,c=this.arraylist.hook[o],c.gap=C[o],d=x[o]-c.startpoint.h,c.startpoint.h=x[o],this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle),!v&&h>w.NSkip&&(c=this.arraylist.hook[0],c.startpoint.h=x[o],this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle))),l=w.NSkip+e;l<h;l++)c=this.arraylist.hook[l],S?(d=x[l]-c.endpoint.h,c.endpoint.h=x[l]):(d=x[l]-c.startpoint.h,c.startpoint.h=x[l],c.endpoint.h=c.startpoint.h+C[l]),this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle),u=c,f&&l<h-1&&(l++,c=this.arraylist.hook[l],c.startpoint.h=u.startpoint.h,c.endpoint.h=u.endpoint.h,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle));v||S||(this.arraylist.hook[0].endpoint.h+=d,this.arraylist.angle&&(this.arraylist.hook[0].endpoint.v+=d*this.arraylist.angle,this.arraylist.hook[w.ACr].endpoint.h!=this.arraylist.hook[w.ACr].startpoint.h&&(c=this.arraylist.hook[w.ACr],l=w.ACr,c.gap=C[l],d=x[l]-c.startpoint.h,h>w.NSkip?(c.startpoint.h=this.arraylist.hook[h-1].endpoint.h,c.startpoint.v=this.arraylist.hook[h-1].startpoint.v):(c.startpoint.h=this.arraylist.hook[w.ACl].startpoint.h,c.startpoint.v=this.arraylist.hook[w.ACl].startpoint.v),c.endpoint.h=c.startpoint.h+C[l],this.arraylist.angle&&(c.endpoint.v+=d*this.arraylist.angle))))}}if(e){const t=this.GetTilt();for(l=w.NSkip;l<h;l++)c=this.arraylist.hook[l],b&&y?c.endpoint.v-=e:c.endpoint.v+=e,t&&(c.endpoint.h-=e),f&&l<h-1&&(l++,c=this.arraylist.hook[l],c.endpoint.v-=e,t&&(c.endpoint.h-=e))}if(i)if(g)for(m&&(i=-i),this.arraylist.hook[0].startpoint.h+=i,this.arraylist.hook[0].endpoint.h+=i,l=w.NSkip;l<h;l++)c=this.arraylist.hook[l],c.startpoint.h+=i,c.endpoint.h+=i;else for(this.arraylist.hook[0].startpoint.v+=i,this.arraylist.hook[0].endpoint.v+=i,l=w.NSkip;l<h;l++)c=this.arraylist.hook[l],c.startpoint.v+=i,c.endpoint.v+=i;const F={linestart:x,linelen:C,linedisp:k};return LogUtil.Debug("S.Connector: PrAdjustFormat output:",F),F}PrGetShapeConnectorInfo(t){let e,i;LogUtil.Debug("S.Connector: PrGetShapeConnectorInfo called with input:",t);let n=0;const s=OptConstant.AStyles,a=Boolean(this.arraylist.styleflags&s.BothSides||0==(this.arraylist.styleflags&s.PerpConn)),o=Boolean(this.arraylist.styleflags&s.BothSides),r=OptConstant.ConnectorDefines,l=OptConstant.HookPts,h=OptConstant.ActionTriggerType,c=Boolean(this.arraylist.styleflags&s.Linear),u=[];if(a&&this.hooks.length)switch(e=this.hooks[0],e.hookpt){case l.LL:case l.LT:n=r.ACl;break;default:n=r.ACr}let d=t.connect.x;if(this.vertical)if(c)if(n===r.ACr){let e=t.hookpt;d+r.NSkip<this.arraylist.hook.length-1?d>=0&&(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeT,knobData:d+r.NSkip+1,hook:e,polyType:"vertical",position:"bottom"},u.push(i)):(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeT,knobData:r.ACr,hook:e,polyType:"vertical",position:"bottom"},u.push(i))}else d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeT,knobData:d+r.NSkip,hook:t.hookpt,polyType:"vertical"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeT,knobData:r.ACl,hook:t.hookpt,polyType:"vertical"},u.push(i));else i={knobID:h.ConnectorRerp,cursorType:CursorConstant.CursorType.ResizeR,knobData:t.connect.x,hook:t.hookpt,polyType:"horizontal"},u.push(i),o&&d%2!=0&&d--,d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeT,knobData:d+r.NSkip,hook:t.hookpt,polyType:"vertical"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeT,knobData:r.ACl,hook:t.hookpt,polyType:"vertical"},u.push(i));else if(c)if(n===r.ACr){let e=t.hookpt;d+r.NSkip<this.arraylist.hook.length-1?d>=0&&(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:d+r.NSkip+1,hook:e,polyType:"horizontal",position:"right"},u.push(i)):(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeR,knobData:r.ACr,hook:e,polyType:"horizontal",position:"right"},u.push(i))}else d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:d+r.NSkip,hook:t.hookpt,polyType:"horizontal"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeR,knobData:r.ACl,hook:t.hookpt,polyType:"horizontal"},u.push(i));else i={knobID:h.ConnectorRerp,cursorType:CursorConstant.CursorType.ResizeT,knobData:t.connect.x,hook:t.hookpt,polyType:"vertical"},u.push(i),o&&d%2!=0&&d--,d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:d+r.NSkip,hook:t.hookpt,polyType:"horizontal"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeR,knobData:r.ACl,hook:e.hookpt,polyType:"horizontal"},u.push(i));return LogUtil.Debug("S.Connector: PrGetShapeConnectorInfo returning output:",u),u}GetConnectorOrientation(t){LogUtil.Debug("S.Connector: GetConnectorOrientation called with isReversed:",t);const e=OptConstant.AStyles;let i=Boolean(this.arraylist.styleflags&e.StartLeft);let n;return Boolean(this.arraylist.styleflags&e.BothSides||0==(this.arraylist.styleflags&e.PerpConn))&&(i=!1,t&&(i=!0)),n=this.vertical?i?Instance.Shape.ConnectorDir.ORG_HORIZONTALRIGHT:Instance.Shape.ConnectorDir.ORG_HORIZONTAL:i?Instance.Shape.ConnectorDir.ORG_VERTICALUP:Instance.Shape.ConnectorDir.ORG_VERTICALDOWN,LogUtil.Debug("S.Connector: GetConnectorOrientation result:",n),n}IsFlowChartConnector(){LogUtil.Debug("S.Connector: IsFlowChartConnector called");const t=OptConstant.AStyles,e=(this.arraylist.styleflags&t.FlowConn)>0;return LogUtil.Debug("S.Connector: IsFlowChartConnector result:",e),e}IsOrgChartConnector(t){LogUtil.Debug("S.Connector: IsOrgChartConnector called with allowedTypes:",t);let e=0===this.objecttype;if(t)for(let n=0;n<t.length;n++)if(this.objecttype===t[n]){e=!0;break}const i=!this.IsFlowChartConnector()&&e;return LogUtil.Debug("S.Connector: IsOrgChartConnector result:",i),i}IsCauseAndEffectChartConnector(){LogUtil.Debug("S.Connector: IsCauseAndEffectChartConnector called");const t=NvConstant.FNObjectTypes,e=this.objecttype===t.CauseEffectMain;return LogUtil.Debug("S.Connector: IsCauseAndEffectChartConnector result:",e),e}IsOrgChartTypeConnector(){LogUtil.Debug("S.Connector: IsOrgChartTypeConnector called");let t=!1;return this.objecttype,t=!1,LogUtil.Debug("S.Connector: IsOrgChartTypeConnector result:",t),t}FixHook(t,e){LogUtil.Debug("S.Connector: FixHook called with preserveOriginalPosition:",t,"forceCoManagerUpdate:",e);const i=OptConstant.AStyles,n=OptConstant.Common.DimMax,s=Boolean(this.arraylist.styleflags&i.StartLeft),a=Boolean(this.arraylist.styleflags&i.BothSides||0==(this.arraylist.styleflags&i.PerpConn)),o=Boolean(this.arraylist.styleflags&i.BothSides),r=Boolean(this.arraylist.styleflags&i.ReverseCol),l={x:this.hooks[0].connect.x,y:this.hooks[0].connect.y};let h=!1;if(this.hooks.length){if(!t){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&t.IsCoManager(null)&&(e||(h=!0))}const i=this.hooks[0].hookpt===OptConstant.HookPts.LL||this.hooks[0].hookpt===OptConstant.HookPts.LT;OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move),this.vertical?a?s?(i?(this.hooks[0].connect.y=r?0:n,this.hooks[0].hookpt=OptConstant.HookPts.LT):(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LB),this.hooks[0].connect.x=o?n/2:3*n/4):(i?(this.hooks[0].connect.y=r?0:n,this.hooks[0].hookpt=OptConstant.HookPts.LT):(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LB),this.hooks[0].connect.x=o?n/2:n/4):s?(this.hooks[0].connect.x=0,this.hooks[0].hookpt=OptConstant.HookPts.LR,this.hooks[0].connect.y=n/2):(this.hooks[0].connect.x=n,this.hooks[0].hookpt=OptConstant.HookPts.LL,this.hooks[0].connect.y=n/2):a?(i?(this.hooks[0].connect.x=n,this.hooks[0].hookpt=OptConstant.HookPts.LL):(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LR),this.hooks[0].connect.x=n/2):s?(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LB,this.hooks[0].connect.x=n/2):(this.hooks[0].connect.y=n,this.hooks[0].hookpt=OptConstant.HookPts.LT,this.hooks[0].connect.x=n/2),t&&(this.hooks[0].connect.x=l.x,this.hooks[0].connect.y=l.y),h&&(this.hooks[0].connect.y=-OptConstant.AStyles.CoManager)}LogUtil.Debug("S.Connector: FixHook completed with hook position:",this.hooks[0].connect,"hook point:",this.hooks[0].hookpt)}SetDirection(t,e,i){LogUtil.Debug("S.Connector: SetDirection called with invertStyle:",t,"toggleOrientation:",e,"propagate:",i);const n=OptConstant.AStyles,s=OptConstant.ConnectorDefines.NSkip;let a=this.arraylist.styleflags&n.BothSides||0==(this.arraylist.styleflags&n.PerpConn);const o=this.arraylist.styleflags&n.CoManager,r=this.arraylist.styleflags&n.ReverseCol;let l=!1;const h=this.arraylist.hook.length;if(e&&(a?(l=(this.arraylist.styleflags&OptConstant.AStyles.ReverseCol)>0,this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.PerpConn,!0),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.StartLeft,!1),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.ReverseCol,!1),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.BothSides,!1),a=!1):this.vertical=!this.vertical),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.ReverseCol,!1),t)if(a)this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.ReverseCol,0===r);else{if(o&&i){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&(t.arraylist.styleflags&n.BothSides||(t.arraylist.styleflags,n.PerpConn))}l||(this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.StartLeft,0==(this.arraylist.styleflags&OptConstant.AStyles.StartLeft)))}else l&&(this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.StartLeft,!0));OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0),this.FixHook(i,!1);for(let c=s;c<h;c++){const i=this.arraylist.hook[c],n=ObjectUtil$1.GetObjectPtr(i.id,!0);if(n&&n.hooks.length)if(n.hooks[0].hookpt=this.GetBestHook(i.id,n.hooks[0].hookpt,n.hooks[0].connect),OptCMUtil.SetLinkFlag(i.id,DSConstant.LinkFlags.Move),n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)n.SetDirection(t,e,!0);else{const n=T3Gv.opt.FindChildArray(i.id,-1);if(n>=0){const i=ObjectUtil$1.GetObjectPtr(n,!0);i&&i.SetDirection(t,e,!1)}}}LogUtil.Debug("S.Connector: SetDirection completed")}SetSpacing(t,e){LogUtil.Debug("S.Connector: SetSpacing called with adjustPrimaryDimension:",t,"spacingValue:",e);let i,n,s=e,a=this.arraylist.hook.length;const o=OptConstant.AStyles;let r=this.arraylist.styleflags&o.BothSides||0==(this.arraylist.styleflags&o.PerpConn);const l=this.arraylist.styleflags&o.CoManager,h=OptConstant.ConnectorDefines.NSkip,c=function(t,e){for(let n=h;n<a;n++)i=t.hook[n],i.extra+e<0&&(i.extra=-e)};if(l&&this.vertical!==t&&(s=e/2),this.hooks.length)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LT:case OptConstant.HookPts.LB:t&&(n=null,r?(i=a>2?this.hooks[0].hookpt===OptConstant.HookPts.LT?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ACr]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.wd,i.gap<0&&(i.gap=0))):(i=a>2?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.ht,i.gap<0&&(i.gap=0))));break;case OptConstant.HookPts.LL:case OptConstant.HookPts.LR:t||(n=null,r?(i=a>2?this.hooks[0].hookpt===OptConstant.HookPts.LL?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ACr]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.wd,i.gap<0&&(i.gap=0))):(i=a>2?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.ht,i.gap<0&&(i.gap=0))))}this.vertical?t?(LogUtil.Debug("S.Connector: Setting width to",s),this.arraylist.wd=s,c(this.arraylist,s)):(LogUtil.Debug("S.Connector: Setting height to",s),this.arraylist.ht=s):t?(LogUtil.Debug("S.Connector: Setting height to",s),this.arraylist.ht=s):(LogUtil.Debug("S.Connector: Setting width to",s),this.arraylist.wd=s,c(this.arraylist,s)),LogUtil.Debug("S.Connector: SetSpacing completed")}CollapseConnector(t,e,i){LogUtil.Debug("S.Connector: CollapseConnector called with collapseState:",t,"updateLinkFlags:",e,"propagateCollapse:",i);var n,s,a,o=NvConstant.ObjFlags.NotVisible,r=OptConstant.ExtraFlags.CollapseConn,l=[];-1==t&&(t=0==(this.extraflags&r));var h=this.extraflags&r;if(e&&(h&&0==(this.flags&o)?(t=!0,this.extraflags=Utils2.SetFlag(this.extraflags,r,!1)):!h&&this.flags&o?(t=!1,this.extraflags=Utils2.SetFlag(this.extraflags,r,!0)):t=(this.extraflags&r)>0),i&&this.hooks.length>0&&OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move),(this.extraflags&r)>0!=t||!i){(i||e)&&OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),!i&&t?this.flags=Utils2.SetFlag(this.flags,o,t):0===h&&(this.flags=Utils2.SetFlag(this.flags,o,!1)),ObjectUtil$1.AddToDirtyList(this.BlockID),T3Gv.opt.dirtyListReOrder=!0,this.flags&o&&(l.push(this.BlockID),T3Gv.opt.DeSelect(l));for(var c=this.arraylist.hook.length,u=OptConstant.ConnectorDefines.NSkip;u<c;u++)if(this.arraylist.hook[u].id>=0&&(n=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[u].id,!0)))switch(n.DrawingObjectBaseClass){case OptConstant.DrawObjectBaseClass.Connector:n.CollapseConnector(t,e,i);break;default:if(i||t?n.flags=Utils2.SetFlag(n.flags,o,t):0===h&&(n.flags=Utils2.SetFlag(n.flags,o,!1)),ObjectUtil$1.AddToDirtyList(this.arraylist.hook[u].id),T3Gv.opt.dirtyListReOrder=!0,n.flags&o&&l.push(this.arraylist.hook[u].id),n.flags&o&&!1!==t)break;(s=T3Gv.opt.FindChildArray(this.arraylist.hook[u].id,-1))>=0&&(ObjectUtil$1.GetObjectPtr(s,!0).CollapseConnector(t,e,!1),(a=T3Gv.opt.FindChildArray(this.arraylist.hook[u].id,s))>=0&&ObjectUtil$1.GetObjectPtr(a,!0).CollapseConnector(t,e,!1))}T3Gv.opt.DeSelect(l),this.PrFormat(this.BlockID)}LogUtil.Debug("S.Connector: CollapseConnector completed for BlockID:",this.BlockID,"with collapseState:",t)}MatchSize(t,e){let i;LogUtil.Debug("S.Connector: MatchSize called with applyNewWidth:",t,"newWidth:",e);const n=this.arraylist.hook.length;let s,a,o;const r=[],l=OptConstant.ConnectorDefines.NSkip,h=OptConstant.ConnectorDefines,c=OptConstant.HookPts;let u=!1,d=!1;function p(t,e,i,n){this.cobj=t,this.bkdist=e,this.stubindex=i,this.stubdist=n}for(i=l;i<n;i++)if(s=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[i].id,!1),s&&s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){void 0===a?a=s.arraylist.wd:Utils2.IsEqual(a,s.arraylist.wd)||(u=!0,s.arraylist.wd>a&&(a=s.arraylist.wd));const t=s.arraylist.hook[h.A_Bk].endpoint.h-s.arraylist.hook[h.A_Bk].startpoint.h,e=s.hooks[0].hookpt===c.SED_LL||s.hooks[0].hookpt===c.SED_LT?h.A_Cr:h.A_Cl,i=Math.abs(s.arraylist.hook[e].endpoint.h-s.arraylist.hook[e].startpoint.h),n=t+i;void 0===o?o=n:Utils2.IsEqual(n,o)||(d=!0,n>o&&(o=n));const l=new p(s,t,e,i);r.push(l)}if(t&&(Utils2.IsEqual(a,e)||(a=e,u=!0)),u){const t=r.length;for(o=void 0,d=!0,i=0;i<t;i++){s=ObjectUtil$1.GetObjectPtr(r[i].cobj.BlockID,!0),s.arraylist.matchsizelen=0,OptCMUtil.SetLinkFlag(s.BlockID,DSConstant.LinkFlags.Move);const t=s.hooks[0].hookpt===c.LL||s.hooks[0].hookpt===c.LT?h.ACl:h.ACr;s.arraylist.hook[t].gap=a,s.PrFormat(s.BlockID);const e=s.arraylist.hook[h.ABk].endpoint.h-s.arraylist.hook[h.ABk].startpoint.h,n=Math.abs(s.arraylist.hook[r[i].stubindex].endpoint.h-s.arraylist.hook[r[i].stubindex].startpoint.h);r[i].bkdist=e,r[i].stubdist=n;const l=e+n;(void 0===o||!Utils2.IsEqual(l,o)&&l>o)&&(o=l)}}if(d){const t=r.length;if(!u)for(o=void 0,i=0;i<t;i++){s=ObjectUtil$1.GetObjectPtr(r[i].cobj.BlockID,!0),s.arraylist.matchsizelen=0,OptCMUtil.SetLinkFlag(s.BlockID,DSConstant.LinkFlags.Move),s.PrFormat(s.BlockID),r[i].bkdist=s.arraylist.hook[h.ABk].endpoint.h-s.arraylist.hook[h.ABk].startpoint.h,r[i].stubdist=Math.abs(s.arraylist.hook[r[i].stubindex].endpoint.h-s.arraylist.hook[r[i].stubindex].startpoint.h);const t=r[i].bkdist+r[i].stubdist;(void 0===o||!Utils2.IsEqual(t,o)&&t>o)&&(o=t)}for(i=0;i<t;i++){const t=r[i].bkdist+r[i].stubdist;Utils2.IsEqual(t,o)||(s=r[i].cobj,s.arraylist.matchsizelen=o,s.PrFormat(s.BlockID))}}LogUtil.Debug("S.Connector: MatchSize completed with reference width:",a,"max combined distance:",o)}FoundText(t,e,i){LogUtil.Debug("S.Connector: FoundText called with searchText:",t,"length:",e,"blockID:",i);let n=0;const s=this.arraylist.hook.length,a=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(null!=a){i===this.BlockID&&(n=this.arraylist.lasttexthook+1);for(let i=n;i<s;i++)if(this.arraylist.hook[i].textid>=0){const n=a.GetElementById(OptConstant.SVGElementClass.Text,i);if(n&&n.GetText(0).search(t)>=0)return this.arraylist.lasttexthook=i,TextUtil.ActivateTextEdit(a),n.SetSelectedRange(n.GetText(0).search(t),n.GetText(0).search(t)+e),LogUtil.Debug("S.Connector: FoundText found text at hook index:",i),!0}}return LogUtil.Debug("S.Connector: FoundText did not find the text"),!1}FieldDataAllowed(){LogUtil.Debug("S.Connector: Checking if field data is allowed");return LogUtil.Debug("S.Connector: Field data allowed:",false),false}}class D3Symbol extends Symbol$1{constructor(t){t=t||{},LogUtil.Debug("S.D3Symbol: Input options:",t),t.ShapeType=OptConstant.ShapeType.D3Symbol,t.objecttype=NvConstant.FNObjectTypes.D3Symbol,t.TextFlags=t.TextFlags||NvConstant.TextFlags.AttachB,super(),this.SetD3Settings(t.d3Settings),LogUtil.Debug("S.D3Symbol: Output options after initialization:",t)}CreateShape(t,e){if(LogUtil.Debug("S.D3Symbol: Enter CreateShape with parameters:",{svgDocument:t,applyHiddenEventBehavior:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.D3Symbol: Object not visible, exiting CreateShape."),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=this.Frame;this.TextFlags=NvConstant.TextFlags.AttachB,i.SetSize(n.width,n.height),i.SetPos(n.x,n.y),i.isShape=!0;const s=t.CreateShape(OptConstant.CSType.Group);s.SetSize(n.width,n.height),s.SetID(OptConstant.SVGElementClass.Shape);const a=t.CreateShape(OptConstant.CSType.Rect);a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),a.SetStrokeWidth(0),e?a.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):a.SetEventBehavior(OptConstant.EventBehavior.None),a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),a.SetSize(n.width,n.height),i.AddElement(a),i.AddElement(s),this.RenderControl(t,i),-1!==this.DataID&&this.LMAddSVGTextObject(t,i);const o=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,r=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;return o&&s.SetMirror(o),r&&s.SetFlip(r),T3Gv.opt.bDrawEffects&&this.SetEffects(s,!1,!1),LogUtil.Debug("S.D3Symbol: Exit CreateShape with shapeContainer:",i),i}MapData(t){LogUtil.Debug("S.D3Symbol: MapData - Input:",t);const e=this.GetPublicParams();if(!t||0===e.length||!this.HasFieldData())return void LogUtil.Debug("S.D3Symbol: MapData - No mapping performed (missing data, public params or field data).");const i=TODO.STData.FieldedDataGetFieldList(this.fieldDataTableID,!0),n=[];e.forEach((e=>{const s=t[e];if(s&&s.dataMap){const t=(t=>{const e=(t||"").split(":"),i={name:e[0].toLowerCase(),start:0,flags:null};for(let n=1;n<e.length;n++){const t=e[n];isNaN(parseInt(t,10))?i.flags=t.toLowerCase():i.start=parseInt(t,10)}return i})(s.dataMap),e=((t,e,n,s)=>{if(!t||!n)return null;n=n.toLowerCase();let a=null;for(let l=e=e||0;l<i.length;l++){const e=i[l];if(o=e.type,("string"===(r=n)&&"string"===o||"number"===o&&("int"===r||"float"===r)||"*"===t||"?"===t||o===r)&&("*"===t||"?"===t||e.name.toLowerCase()===t)){if(!s){a=l;break}if(null===a&&(a=[]),a.push(l),"?"===t)break}}var o,r;return a})(t.name,t.start,s.type,s.isArray);if(null!==e){let a=null,o=[];this.fieldDataElemID<0?"all"===t.flags?(o=n,a=[]):o=[n[0]]:o=[this.fieldDataElemID],o.forEach((n=>{let o=null;if(s.isArray)o=[],e.forEach((e=>{const s=i[e],a="label"===t.flags?s.name:TODO.STData.FieldedDataGetFieldValue(this.fieldDataTableID,n,s.fieldID);void 0!==a&&o.push(a)}));else{const s=i[e],a="label"===t.flags?s.name:TODO.STData.FieldedDataGetFieldValue(this.fieldDataTableID,n,s.fieldID);void 0!==a&&(o=a)}null!==o&&(a?Array.isArray(a)?a.push(o):a=[a,o]:a=o)})),null!==a&&(s.value=a)}}})),LogUtil.Debug("S.D3Symbol: MapData - Output (mapped data updated in object).")}SetParamValue(t,e){LogUtil.Debug("S.D3Symbol: SetParamValue - Input:",{paramName:t,paramValue:e});const i=this.d3Settings?this.d3Settings.renderSettings:null;i&&i[t]&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),i[t].value=e,i[t].dataMap=null,this.UpdateSizeFromSettings(),ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.D3Symbol: SetParamValue - Updated renderSettings:",i)}UpdateSizeFromSettings(){}GetRenderParams(){LogUtil.Debug("S.D3Symbol: GetRenderParams - Start");const t=this.Frame,e=this.d3Settings?this.d3Settings.renderSettings:null;if(e){const i=Utils1.DeepCopy(e);i.width=i.width||{},i.height=i.height||{},i.width.value=t.width,i.height.value=t.height;return(t=>{const i=this.GetFieldDataStyleOverride(),n=i&&i.strokeColor?i.strokeColor:null,s=i&&i.fillColor?i.fillColor:null,a=i&&i.textColor?i.textColor:null;let o=this.StyleRecord.Fill.Paint.Color,r=this.StyleRecord.Line.Paint.Color,l=this.StyleRecord.Text.Paint.Color;this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent?o="none":this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Solid&&this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Gradient&&(o=null),this.StyleRecord.Line.Paint.FillType===NvConstant.FillTypes.Transparent?r="none":this.StyleRecord.Line.Paint.FillType!==NvConstant.FillTypes.Solid&&this.StyleRecord.Line.Paint.FillType!==NvConstant.FillTypes.Gradient&&(r=null);const h=s||o,c=n||r,u=this.StyleRecord.Line.Thickness,d=a||l;h&&t.fillColor&&(t.fillColor.value=h),c&&t.strokeColor&&(t.strokeColor.value=c),t.strokeWidth&&(t.strokeWidth.value=u),d&&t.textColor&&(t.textColor.value=d),o&&e.fillColor&&(e.fillColor.value=o),r&&e.strokeColor&&(e.strokeColor.value=r),e.strokeWidth&&(e.strokeWidth.value=u),l&&e.textColor&&(e.textColor.value=l)})(i),this.MapData(i),LogUtil.Debug("S.D3Symbol: GetRenderParams - Output:",i),i}return LogUtil.Debug("S.D3Symbol: GetRenderParams - No renderSettings found."),null}SetDataMap(t,e){LogUtil.Debug("S.D3Symbol: SetDataMap - Input:",{paramName:t,dataMap:e});const i=this.d3Settings?this.d3Settings.renderSettings:null;i&&i[t]&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),i[t].dataMap=e,this.UpdateSizeFromSettings(),ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.D3Symbol: SetDataMap - Updated renderSettings:",i)}GetPublicParams(){LogUtil.Debug("S.D3Symbol: GetPublicParams - Start");const t=this.d3Settings?this.d3Settings.publicAttributes:null,e=[];return t?(t.forEach((t=>{Instance.Shape.D3Symbol.DefaultStyleParams.indexOf(t)<0&&e.push(t)})),LogUtil.Debug("S.D3Symbol: GetPublicParams - Output:",e),e):(LogUtil.Debug("S.D3Symbol: GetPublicParams - No public attributes found."),e)}ExportD3Settings(){LogUtil.Debug("S.D3Symbol: ExportD3Settings - Start");let t="";return this.d3Settings&&(t=JSON.stringify(this.d3Settings)),LogUtil.Debug("S.D3Symbol: ExportD3Settings - Output:",t),t}ImportD3Settings(t){LogUtil.Debug("S.D3Symbol: ImportD3Settings - Input:",t);let e=null;try{e=JSON.parse(t)}catch(i){throw T3Util.Error("= s.D3Symbol: ImportD3Settings - Error parsing settings:",i),i}e&&this.SetD3Settings(e),LogUtil.Debug("S.D3Symbol: ImportD3Settings - Output settings applied.")}SetD3Settings(t){}Resize(t,e,i){}ChangeTextAttributes(t,e,i,n,s,a,o,r){LogUtil.Debug("S.D3Symbol: ChangeTextAttributes - Input:",{newText:t,newFont:e,newSize:i,newColor:n,newAlignment:s,newWeight:a,newStyle:o,newDecoration:r}),TextUtil.GetActiveTextEdit()===this.BlockID?e=null:t=null,Instance.Shape.BaseDrawObject.prototype.ChangeTextAttributes.call(this,t,e,i,n,s,a,o,r),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.D3Symbol: ChangeTextAttributes - Completed")}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.D3Symbol: CreateActionTriggers - Input parameters:",{event:t,triggerType:e,action:i,response:n});const s=Instance.Shape.BaseShape.prototype.CreateActionTriggers.apply(this,[t,e,i,n]);return LogUtil.Debug("S.D3Symbol: CreateActionTriggers - Output result:",s),s}RefreshFromFieldData(t){return LogUtil.Debug("S.D3Symbol: RefreshFromFieldData - Input:",t),t&&this.fieldDataTableID!==t?(LogUtil.Debug("S.D3Symbol: RefreshFromFieldData - Output: false"),!1):(Instance.Shape.BaseDrawObject.prototype.RefreshFromFieldData.call(this,t),this.UpdateSizeFromSettings(),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.D3Symbol: RefreshFromFieldData - Output: true"),!0)}static DefaultD3Settings(t){LogUtil.Debug("S.D3Symbol: Input settings:",t);let e={moduleID:null,renderSettings:{},publicAttributes:[]};return t&&(e=$.extend(!0,e,t)),LogUtil.Debug("S.D3Symbol: Output settings:",e),e}}__publicField(D3Symbol,"DefaultStyleParams",["fillColor","strokeColor","strokeWidth","textColor"]);class FreehandLine extends BaseLine{constructor(t){(t=t||{}).LineType=OptConstant.LineType.FREEHAND,t.TextFlags=t.TextFlags|NvConstant.TextFlags.None,super(t),__publicField(this,"StartPoint"),__publicField(this,"EndPoint"),__publicField(this,"pointlist"),this.TextFlags=t.TextFlags||0,this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.pointlist=t.pointlist||[],this.RotationAngle=t.RotationAngle||0,this.flags=t.flags||0,this.CalcFrame()}GetFreehandPoints(t){let e=[],i=this.StartPoint.x,n=this.StartPoint.y;if(!0===t&&(i-=this.Frame.x,n-=this.Frame.y),this.pointlist)for(let s=0;s<this.pointlist.length;s++){const t=this.pointlist[s];let a={x:t.x+i,y:t.y+n};e.push(a)}return e}CalcFrame(){let t={width:0,height:0,x:0,y:0},e=[];this.pointlist&&this.pointlist.length&&(e=this.GetFreehandPoints(!1),Utils2.GetPolyRect(t,e),t.width<1&&(t.width=1),t.height<1&&(t.height=1),this.Frame=Utils1.DeepCopy(t)),this.UpdateFrame(this.Frame)}GetDimensionsForDisplay(){return{x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height}}GetSVGFrame(t){var e={};return null==t&&(t=this.Frame),Utils2.CopyRect(e,t),e}UpdateDrawing(t){var e=t.GetElementById(OptConstant.SVGElementClass.Shape),i=t.GetElementById(OptConstant.SVGElementClass.Slop);this.CalcFrame();var n=this.GetFreehandPoints(!0);t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),e.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(e,n),i.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(i,n)}UpdateSVG(t,e){var i,n=e.length;if(t&&t.PathCreator){(i=t.PathCreator()).BeginPath(),n>1&&i.MoveTo(e[0].x,e[0].y);for(let t=1;t<n;t++)i.LineTo(e[t].x,e[t].y);i.Apply()}}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;let i=[],n=t.CreateShape(OptConstant.CSType.ShapeContainer),s=t.CreateShape(OptConstant.CSType.Path);s.SetID(OptConstant.SVGElementClass.Shape);let a=t.CreateShape(OptConstant.CSType.Path);a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),this.CalcFrame();let o=this.Frame,r=this.StyleRecord;if(r=this.SVGTokenizerHook(r),null==r){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);t&&(r=t.def.style)}let l=o.width,h=o.height;n.SetSize(l,h),n.SetPos(this.Frame.x,this.Frame.y),s.SetSize(l,h),i=this.GetFreehandPoints(!0),this.UpdateSVG(s,i);let c=r.Line.Paint.Color,u=r.Line.Thickness;r.Line.Thickness>0&&r.Line.Thickness<1&&(u=1);let d=r.Line.Paint.Opacity;return s.SetFillColor("none"),s.SetStrokeColor(c),s.SetStrokeOpacity(d),s.SetStrokeWidth(u),a.SetSize(l,h),this.UpdateSVG(a,i),a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),e?a.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):a.SetEventBehavior(OptConstant.EventBehavior.None),a.SetStrokeWidth(u+OptConstant.Common.Slop),n.AddElement(s),n.AddElement(a),this.ApplyStyles(s,r),this.ApplyEffects(n,!1,!0),n.isShape=!0,n}PostCreateShapeCallback(t,e,i,n){}CreateActionTriggers(t,e,i,n){let s=OptConstant.Common.KnobSize,a=t.CreateShape(OptConstant.CSType.Group),o=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(o*=2);let r=s/o,l=this.Frame,h=l.width,c=l.height;ObjectUtil$1.GetObjectPtr(e,!1),h+=r,c+=r;let u=Utils1.DeepCopy(l);u.x-=r/2,u.y-=r/2,u.width+=r,u.height+=r;let d={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:r,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:CursorConstant.CursorType.ResizeLT,locked:!1};e!==n&&(d.fillColor="white",d.strokeSize=1,d.strokeColor="black",d.fillOpacity=0),d.knobID=OptConstant.ActionTriggerType.TopLeft,d.cursorType=CursorConstant.CursorType.ResizeLT;let p=this.GenericKnob(d);return a.AddElement(p),d.x=h-r,d.y=0,d.cursorType=CursorConstant.CursorType.ResizeRT,d.knobID=OptConstant.ActionTriggerType.TopRight,p=this.GenericKnob(d),a.AddElement(p),d.x=h-r,d.y=c-r,d.cursorType=CursorConstant.CursorType.ResizeRB,d.knobID=OptConstant.ActionTriggerType.BottomRight,p=this.GenericKnob(d),a.AddElement(p),d.x=0,d.y=c-r,d.cursorType=CursorConstant.CursorType.ResizeLB,d.knobID=OptConstant.ActionTriggerType.BottomLeft,p=this.GenericKnob(d),a.AddElement(p),a.SetSize(h,c),a.SetPos(u.x,u.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),a}ModifyShape(t,e,i,n,s){let a={x:e,y:i},o=Utils1.DeepCopy(T3Gv.opt.actionBBox),r=0,l=0;switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.TopLeft:r=o.x-e,l=o.y-i,o.x=e,o.y=i,o.width+=r,o.height+=l,o.width<0&&(o.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,o.width=-o.width),o.height<0&&(o.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a);break;case OptConstant.ActionTriggerType.TopRight:l=o.y-i,o.y=i,o.height=o.height+l,o.width=e-o.x,o.width<0&&(o.x=e,o.width=-o.width),o.height<0&&(o.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a);break;case OptConstant.ActionTriggerType.BottomRight:o.width=e-o.x,o.height=i-o.y,o.width<0&&(o.x=e,o.width=-o.width),o.height<0&&(o.y=i,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a);break;case OptConstant.ActionTriggerType.BottomLeft:o.height=i-o.y,r=o.x-e,o.x=e,o.width+=r,o.width<0&&(o.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,o.width=-o.width),o.height<0&&(o.y=i,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a)}}SetSize(t,e,i){let n,s,a={};a.x=this.Frame.x,a.y=this.Frame.y,a.width=this.Frame.width,a.height=this.Frame.height,t&&(a.width=t),e&&(a.height=e),(t||e)&&(n=T3Gv.opt.actionBBox,s=T3Gv.opt.actionNewBBox,T3Gv.opt.actionBBox=Utils1.DeepCopy(this.Frame),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(this.Frame),this.HandleActionTriggerCallResize(a,i,null),T3Gv.opt.actionBBox=n,T3Gv.opt.actionNewBBox=s,ObjectUtil$1.AddToDirtyList(this.BlockID),this.rflags&&(t&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1)),e&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1))))}HandleActionTriggerCallResize(t,e,i){this.prevBBox=Utils1.DeepCopy(this.Frame);let n=Utils1.DeepCopy(this.Frame);t.width<OptConstant.Common.MinDim&&(t.width=OptConstant.Common.MinDim),t.height<OptConstant.Common.MinDim&&(t.height=OptConstant.Common.MinDim);let s=1,a=1;t.width&&!Utils2.IsEqual(this.Frame.width,0)&&(s=t.width/this.Frame.width),t.height&&!Utils2.IsEqual(this.Frame.height,0)&&(a=t.height/this.Frame.height);let o=t.x-n.x,r=t.y-n.y;this.StartPoint.x+=o,this.StartPoint.y+=r;let l=this.pointlist.length;for(let h=0;h<l;h++)this.pointlist[h].x*=s,this.pointlist[h].y*=a;if(this.CalcFrame(),e===OptConstant.ActionTriggerType.LineLength&&(e=0,noMin=!0),T3Gv.opt.actionStoredObjectId===this.BlockID&&i&&UIUtil.UpdateDisplayCoordinates(t,i,CursorConstant.CursorTypes.Grow,this),e&&T3Gv.opt.actionSvgObject&&T3Gv.opt.actionStoredObjectId===this.BlockID){if(null===T3Gv.opt.actionSvgObject)return;this.prevBBox,Utils1.DeepCopy(this.trect),this.UpdateDrawing(T3Gv.opt.actionSvgObject)}}AllowHook(t,e,i){return!1}AllowLink(){return!1}PreventLink(){return!0}NoRotate(){return!0}CustomSnap(t){return!0}AdjustLineEnd(t,e,i,n){let s=this.pointlist[this.pointlist.length-1],a=e-s.x,o=i-s.y;if(Math.sqrt(a*a+o*o)>3){let t=e-this.StartPoint.x,n=i-this.StartPoint.y,s=new Point$1(t,n);this.pointlist.push(s)}this.AdjustLine(t,e,i,n)}AdjustLine(t,e,i,n){t?this.UpdateDrawing(t):this.CalcFrame()}LMActionDuringTrack(t){return t}LMDrawDuringTrack(t){return t}LMDrawRelease(t){t&&(Utils2.StopPropagationAndDefaults(t),t.gesture.stopDetect()),LMEvtUtil.UnbindActionClickHammerEvents(),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),Utils1.DeepCopy(T3Gv.opt.drawShape.StyleRecord),T3Gv.opt.drawShape.StartArrowID,T3Gv.opt.drawShape.EndArrowID,T3Gv.opt.drawShape.StartArrowDisp,T3Gv.opt.drawShape.ArrowSizeIndex,T3Gv.opt.drawShape.TextGrow,T3Gv.opt.drawShape.TextAlign,T3Gv.opt.drawShape.TextDirection,T3Gv.opt.drawShape.Dimensions,Utils1.DeepCopy(T3Gv.opt.drawShape.StartPoint),Utils1.DeepCopy(T3Gv.opt.drawShape.EndPoint),Utils1.DeepCopy(T3Gv.opt.drawShape.Frame),this.pointlist&&Utils1.DeepCopy(this.pointlist),Utils1.DeepCopy(T3Gv.opt.linkParams),this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId),DrawUtil.PostObjectDraw()}LMDrawClick(t,e){LogUtil.Debug("= s.FreehandLine LMDrawClick mouseX, mouseY=>",t,e);try{this.Frame.x=t,this.Frame.y=e,this.Frame.width=0,this.Frame.height=0,this.StartPoint={x:t,y:e},this.EndPoint={x:t,y:e},T3Gv.opt.WorkAreaHammer.off("dragstart"),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_DrawReleaseHandlerFactory(this))}catch(i){throw this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}}class GroupSymbol extends BaseSymbol{constructor(t){(t=t||{}).ShapeType=OptConstant.ShapeType.GroupSymbol,t.flags=NvConstant.ObjFlags.ImageOnly,LogUtil.Debug("S.GroupSymbol - Input options:",t),super(t),__publicField(this,"collabGlowColor"),LogUtil.Debug("S.GroupSymbol - GroupSymbol created")}CreateShape(t,e){if(LogUtil.Debug("S.GroupSymbol - CreateShape input:",{svgDocument:t,shapeOptions:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.GroupSymbol - CreateShape output:",null),null;this.GetFieldDataStyleOverride();const i=t.CreateShape(OptConstant.CSType.ShapeContainer);return LogUtil.Debug("S.GroupSymbol - CreateShape output:",i),i}PostCreateShapeCallback(t,e,i,n){if(LogUtil.Debug("S.GroupSymbol - PostCreateShapeCallback input:",{svgDocument:t,groupElement:e,eventSettings:i,extraFlags:n}),!(this.flags&NvConstant.ObjFlags.NotVisible)){let s=t.CreateShape(OptConstant.CSType.Group);s.SetID(OptConstant.SVGElementClass.Shape),e.AddElement(s);let a=this.Frame,o=a.width,r=a.height;e.SetSize(o,r),e.SetPos(a.x,a.y);let l,h=this.ShapesInGroup.length,c=null,u=null,d=0,p=null,g=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,f=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0,b=g,v=f,m=0;null!=n&&((n&OptConstant.ExtraFlags.FlipHoriz)>0&&(b=!b),(n&OptConstant.ExtraFlags.FlipVert)>0&&(v=!v)),m=Utils2.SetFlag(m,OptConstant.ExtraFlags.FlipHoriz,b),m=Utils2.SetFlag(m,OptConstant.ExtraFlags.FlipVert,v);for(let e=0;e<h;++e){let i=this.ShapesInGroup[e];l=ObjectUtil$1.GetObjectPtr(i,!1),c=l.Dimensions,l.Dimensions=0,u=l.CreateShape(t),u&&(u.SetID(i),s.AddElement(u),l.PostCreateShapeCallback(t,u,null,m)),l.Dimensions=c,d=l.RotationAngle,l instanceof Instance.Shape.BaseShape&&(0!==d&&u.SetRotation(d),l.DataID>=0&&(b||v)&&(p=u.GetElementById(OptConstant.SVGElementClass.Text),p&&(b&&p.SetMirror(b),v&&p.SetFlip(v))))}s.SetSize(o,r),e.isShape=!0;let y=t.CreateShape(OptConstant.CSType.Rect);y.SetStrokeColor("white"),y.SetFillColor("none"),y.SetOpacity(0),y.SetStrokeWidth(5),i?y.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):y.SetEventBehavior(OptConstant.EventBehavior.None),e.AddElement(y),y.SetID(OptConstant.SVGElementClass.Slop),y.ExcludeFromExport(!0),y.SetSize(o,r),s.SetScale(o/this.InitialGroupBounds.width,r/this.InitialGroupBounds.height),g&&s.SetMirror(g),f&&s.SetFlip(f),-1!==this.DataID&&this.LMAddSVGTextObject(t,e),this.UpdateDimensionLines(e),this.AddIcons(t,e),this.ApplyEffects(e,!1,!1)}LogUtil.Debug("S.GroupSymbol - PostCreateShapeCallback output executed")}SetObjectStyle(t){if(LogUtil.Debug("S.GroupSymbol - SetObjectStyle input:",t),t.ImageURL&&""!==t.ImageURL)LogUtil.Debug("S.GroupSymbol - SetObjectStyle output: No changes applied since ImageURL exists");else{const e=T3Gv.opt.ApplyColorFilter(t,this,this.StyleRecord,this.colorfilter);T3Gv.opt.ApplyGroupProperties(e,this),LogUtil.Debug("S.GroupSymbol - SetObjectStyle output: Applied color filter and group properties")}}ChangeTextAttributes(t,e,i,n,s,a,o,r){let l,h;LogUtil.Debug("S.GroupSymbol - ChangeTextAttributes input:",{textContent:t,styleOptions:e,textAlignment:i,textRotation:n,textMargin:s,textPadding:a,parentElementOverride:o,forceUpdate:r});const c=this.ShapesInGroup,u=c.length;let d=!1;if(0!==u){let p,g;if(p=o||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),p&&(g=p.GetElementById(OptConstant.SVGElementClass.Shape)),null!=g){this.AllowTextEdit()&&Instance.Shape.BaseSymbol.prototype.ChangeTextAttributes.call(this,t,e,i,n,s,a,g,r),e&&(void 0!==e.FontName&&(this.StyleRecord.Text.FontName=e.FontName),void 0!==e.FontId&&(this.StyleRecord.Text.FontId=e.FontId),void 0!==e.FontSize&&(this.StyleRecord.Text.FontSize=e.FontSize),void 0!==e.Face&&(this.StyleRecord.Text.Face=e.Face),void 0!==e.Color&&(this.StyleRecord.Text.Paint.Color=e.Color),void 0!==e.Opacity&&(this.StyleRecord.Text.Paint.Opacity=e.Opacity));for(let o=0;o<u;++o){let u=ObjectUtil$1.GetObjectPtr(c[o],!0);if(u&&0==(u.colorfilter&StyleConstant.ColorFilters.NCText)){let o=g.GetElementById(u.BlockID);l=u.Frame.height,h=u.Frame.width,u.ChangeTextAttributes(t,e,i,n,s,a,o,r),u.Frame.width===h&&u.Frame.height===l||(d=!0)}}if(d){ObjectUtil$1.AddToDirtyList(this.BlockID);const t=this.Frame.width/this.InitialGroupBounds.width,e=this.Frame.height/this.InitialGroupBounds.height;if(!isNaN(t)&&!isNaN(e)){const i=Utils1.DeepCopy(this.Frame);i.width=t*this.InitialGroupBounds.width,i.height=e*this.InitialGroupBounds.height,this.UpdateFrame(i)}}this.ConvertToNative(T3Gv.opt.richGradients,!1)}}LogUtil.Debug("S.GroupSymbol - ChangeTextAttributes output executed")}GetTextures(t){LogUtil.Debug("S.GroupSymbol - GetTextures input:",t);const e=this.ShapesInGroup.length;for(let i=0;i<e;i++){const e=ObjectUtil$1.GetObjectPtr(this.ShapesInGroup[i],!1);e&&e.GetTextures(t)}LogUtil.Debug("S.GroupSymbol - GetTextures output executed")}Resize(t,e,i){LogUtil.Debug("S.GroupSymbol - Resize input:",{svgElement:t,newDimensions:e,resizeInfo:i});const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);t.SetSize(e.width,e.height),t.SetPos(e.x+o.x,e.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape);r.SetSize(e.width,e.height),r.SetScale(e.width/this.InitialGroupBounds.width,e.height/this.InitialGroupBounds.height);return t.GetElementById(OptConstant.SVGElementClass.Slop).SetSize(e.width,e.height),this.LMResizeSVGTextObject(t,i,e),t.SetRotation(n),this.UpdateDimensionLines(t),LogUtil.Debug("S.GroupSymbol - Resize output:",o),o}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.GroupSymbol - CreateActionTriggers input:",{svgDocument:t,triggerType:e,shapeOptions:i,actionRequest:n});const s=this.BaseShapeCreateActionTriggers(t,e,i,n);return LogUtil.Debug("S.GroupSymbol - CreateActionTriggers output:",s),s}BaseShapeCreateActionTriggers(t,e,i,n){LogUtil.Debug("S.GroupSymbol - BaseShapeCreateActionTriggers input:",{svgDocument:t,triggerType:e,shapeOptions:i,actionRequest:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL];let a=t.CreateShape(OptConstant.CSType.Group);const o=OptConstant.Common.KnobSize,r=OptConstant.Common.RKnobSize;let l=this.extraflags&OptConstant.ExtraFlags.SideKnobs&&this.dataclass===PolygonConstant.ShapeTypes.POLYGON;const h=OptConstant.Common.MinSidePointLength;let c=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(c*=2);const u=o/c,d=r/c;const p=this.Frame;let g=p.width,f=p.height;g+=u,f+=u;let b=Utils1.DeepCopy(p);b.x-=u/2,b.y-=u/2,b.width+=u,b.height+=u;let v=i.GetRotation()+22.5;v>=360&&(v=0);const m=Math.floor(v/45);let y=s.slice(m).concat(s.slice(0,m)),S=!0,w=!l,x=!l;switch(this.ObjGrow){case OptConstant.GrowBehavior.Horiz:S=!1,x=!1;break;case OptConstant.GrowBehavior.Vertical:S=!1,w=!1;break;case OptConstant.GrowBehavior.ProPortional:S=!0,w=!1,x=!1}let C={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:u,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1,knobID:0,cursorType:""};if(e!==n&&(C.fillColor="white",C.strokeSize=1,C.strokeColor="black",C.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(C.fillColor="gray",C.locked=!0,l=!1):this.NoGrow()&&(C.fillColor="red",l=!1,C.strokeColor="red",y=[CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default]),S){C.knobID=OptConstant.ActionTriggerType.TopLeft,C.cursorType=y[0];let t=this.GenericKnob(C);a.AddElement(t),C.x=g-u,C.y=0,C.cursorType=y[2],C.knobID=OptConstant.ActionTriggerType.TopRight,t=this.GenericKnob(C),a.AddElement(t),C.x=g-u,C.y=f-u,C.cursorType=y[4],C.knobID=OptConstant.ActionTriggerType.BottomRight,t=this.GenericKnob(C),a.AddElement(t),C.x=0,C.y=f-u,C.cursorType=y[6],C.knobID=OptConstant.ActionTriggerType.BottomLeft,t=this.GenericKnob(C),a.AddElement(t)}if(x){C.x=g/2-u/2,C.y=0,C.cursorType=y[1],C.knobID=OptConstant.ActionTriggerType.TopCenter;let t=this.GenericKnob(C);a.AddElement(t),C.x=g/2-u/2,C.y=f-u,C.cursorType=y[5],C.knobID=OptConstant.ActionTriggerType.BottomCenter,t=this.GenericKnob(C),a.AddElement(t)}if(w){C.x=0,C.y=f/2-u/2,C.cursorType=y[7],C.knobID=OptConstant.ActionTriggerType.CenterLeft;let t=this.GenericKnob(C);a.AddElement(t),C.x=g-u,C.y=f/2-u/2,C.cursorType=y[3],C.knobID=OptConstant.ActionTriggerType.CenterRight,t=this.GenericKnob(C),a.AddElement(t)}const D=function(t){let e=null;if(t.hooks.length){const i=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1);(i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||i&&i instanceof Instance.Shape.ShapeContainer)&&(e=i.PrGetShapeConnectorInfo(t.hooks[0]))}return e}(this);if(D&&D.length){const e={svgDoc:t,iconSize:14,imageURL:null,iconID:0,userData:0,cursorType:0,x:0,y:0};for(let t=0,i=D.length;t<i;t++){"right"===D[t].position?e.x=g-14-1-u:"bottom"===D[t].position?e.y=f-14-1-u:(e.x=u+1,e.y=u+1),e.cursorType=D[t].cursorType,e.iconID=D[t].knobID,e.imageURL="vertical"===D[t].polyType?OptConstant.Common.ConMoveVerticalPath:OptConstant.Common.ConMoveHorizontalPath,e.userData=D[t].knobData;let i=this.GenericIcon(e);a.AddElement(i),e.x+=16}}if(l){let t=Utils1.DeepCopy(this);t.inside=Utils1.DeepCopy(t.Frame);let e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,[]);if(e)for(let i=1,n=e.length;i<n;i++){const t=e[i].x-e[i-1].x,n=e[i].y-e[i-1].y;if(Utils2.Sqrt(t*t+n*n)>h){C.cursorType=t*t>n*n?CursorConstant.CursorType.ResizeTB:CursorConstant.CursorType.ResizeLR,C.x=e[i-1].x+t/2,C.y=e[i-1].y+n/2;let s=this.GenericKnob(C);s.SetUserData(i),a.AddElement(s)}}}const T=this.NoRotate()||this.NoGrow()||C.locked,k=p.width<44;let $=this.hooks.length>0;if($){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&t.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Connector&&($=!1)}if(!T&&!k&&!$){const t=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal&&this.flags&NvConstant.ObjFlags.TextOnly&&ShapeUtil.TextAlignToWin(this.TextAlign).just===TextConstant.TextJust.Left;C.shapeType=OptConstant.CSType.Oval,C.x=t?g+d:g-3*d,C.y=f/2-d/2,C.cursorType=CursorConstant.CursorType.Rotate,C.knobID=OptConstant.ActionTriggerType.Rotate,C.fillColor="white",C.fillOpacity=.001,C.strokeSize=1.5,C.strokeColor="black";let e=this.GenericKnob(C);a.AddElement(e)}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(a,t,C)}return a.SetSize(g,f),a.SetPos(b.x,b.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.GroupSymbol - BaseShapeCreateActionTriggers output:",a),a}ContainsText(){if(LogUtil.Debug("S.GroupSymbol - ContainsText input:",{DataID:this.DataID,BlockID:this.BlockID,ShapesCount:this.ShapesInGroup.length}),this.DataID>=0)return LogUtil.Debug("S.GroupSymbol - ContainsText output:",!1),!1;for(let t=0;t<this.ShapesInGroup.length;t++){if(ObjectUtil$1.GetObjectPtr(this.ShapesInGroup[t],!1).ContainsText())return LogUtil.Debug("S.GroupSymbol - ContainsText output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - ContainsText output:",!1),!1}ConvertToNative(t,e){let i;LogUtil.Debug("S.GroupSymbol - ConvertToNative input:",{richGradients:t,shouldReturnBuffer:e});const n=new WResult;n.richGradients=t;const s=this.ShapesInGroup.length;if(s>0){for(let e=0;e<s;e++){const t=this.ShapesInGroup[e];n.zList.push(t);const i=ObjectUtil$1.GetObjectPtr(t,!1);i.layer=this.Layer,i.GetTextures(n.TextureList)}n.sdp=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),n.tLMB=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),n.ctp=T3Gv.opt.header,n.GroupOffset.x=0,n.GroupOffset.y=0,n.WriteGroupBlock=!0,n.fontlist=T3Gv.opt.header.FontList,T3Gv.docUtil.svgDoc.GetWorkArea(),n.docDpi=T3Gv.docUtil.svgDoc.docInfo.docDpi;const t=ShapeUtil.WriteBuffer(n,!0,!0,!0);if(!0===e)return LogUtil.Debug("S.GroupSymbol - ConvertToNative output:",t),t;let a=null;t&&(a=new Uint8Array(t),this.NativeID>=0?(i=T3Gv.stdObj.PreserveBlock(this.NativeID),i&&(i.Data=a)):(i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.HNativeObject,a),this.NativeID=i.ID)),LogUtil.Debug("S.GroupSymbol - ConvertToNative output:",{preservedBlock:i})}else LogUtil.Debug("S.GroupSymbol - ConvertToNative output: No shapes in group")}DeleteObject(){LogUtil.Debug("S.GroupSymbol - DeleteObject input: none");const t=this.ShapesInGroup,e=t.length;for(let i=0;i<e;i++){const e=ObjectUtil$1.GetObjectPtr(t[i],!1);if(e){const n=T3Gv.stdObj.GetObject(t[i]);e.DeleteObject(),n&&n.Delete()}}this.BaseDrawObjectDeleteObject(),LogUtil.Debug("S.GroupSymbol - DeleteObject output: deleted")}BaseDrawObjectDeleteObject(){LogUtil.Debug("S.GroupSymbol - BaseDrawObjectDeleteObject input: none");let t=null,e=null,i=null,n=[];-1!==this.DataID&&(t=T3Gv.stdObj.GetObject(this.DataID),t&&t.Delete()),-1!==this.NoteID&&(t=T3Gv.stdObj.GetObject(this.NoteID),t&&t.Delete()),-1!==this.NativeID&&(t=T3Gv.stdObj.GetObject(this.NativeID),t&&t.Delete()),-1!==this.BlobBytesID&&(t=T3Gv.stdObj.GetObject(this.BlobBytesID),t&&t.Delete(),OptCMUtil.IsBlobURL(this.ImageURL)&&OptCMUtil.DeleteURL(this.ImageURL)),-1!==this.EMFBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.EMFBlobBytesID),t&&t.Delete()),-1!==this.OleBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.OleBlobBytesID),t&&t.Delete()),this.BaseDrawObjectRemoveFieldData(!0),this.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),!e||e.objecttype!==NvConstant.FNObjectTypes.FlWall||e.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions||(n=Utils1.DeepCopy(this.hooks),this.hooks=[],i=T3Gv.opt.svgObjectLayer.GetElementById(e.BlockID),e.UpdateDimensionLines(i),this.hooks=n)),LogUtil.Debug("S.GroupSymbol - BaseDrawObjectDeleteObject output: executed")}BaseDrawObjectRemoveFieldData(t,e){LogUtil.Debug("S.GroupSymbol - BaseDrawObjectRemoveFieldData input:",{shouldRemove:t,fieldDataTableId:e}),!this.HasFieldData()||e&&this.fieldDataTableID!==e||(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),t&&(this.fieldDataElemID<0?TODO.STData.DeleteFieldedDataTable(this.fieldDataTableID):TODO.STData.FieldedDataDelRecord(this.fieldDataTableID,this.fieldDataElemID)),this.fieldDataDatasetID=-1,this.fieldDataTableID=-1,this.fieldDataElemID=-1,this.dataStyleOverride=null,ObjectUtil$1.AddToDirtyList(this.BlockID),this.BaseDrawObjectRefreshFromFieldData()),LogUtil.Debug("S.GroupSymbol - BaseDrawObjectRemoveFieldData output executed")}BaseDrawObjectRefreshFromFieldData(t){if(LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData input:",{tableId:t}),t&&this.fieldDataTableID!==t)return LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData output:",!1),!1;const e=this.HasFieldDataInText(t),i=this.HasFieldDataRules(t);let n=!1;return e||i?(this.GetFieldDataStyleOverride(),e&&(this.ChangeTextAttributes(null,null,null,null,null,null,null,!0),n=!0),TODO.STData.FieldedDataHasRulesForRecord(this.fieldDataTableID,this.fieldDataElemID)&&(ObjectUtil$1.AddToDirtyList(this.BlockID),n=!0),LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData output:",n),n):(LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData output:",!1),!1)}ApplyEffects(t,e,i){if(LogUtil.Debug("S.GroupSymbol - ApplyEffects input:",{svgElement:t,isHighlighted:e,extraParam:i}),!(t=t||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID)))return void LogUtil.Debug("S.GroupSymbol - ApplyEffects output: No SVG element found");if(!T3Gv.opt.bDrawEffects||T3Gv.opt.bTokenizeStyle)return void LogUtil.Debug("S.GroupSymbol - ApplyEffects output: Global flags disable effects");const n=t.shapeGroup||t,s=[];let a=null,o=4;e?a="#FFD64A":this.collabGlowColor?(a=this.collabGlowColor,o=6):this.dataStyleOverride&&this.dataStyleOverride.glowColor&&(a=this.dataStyleOverride.glowColor),a?(s.push({type:BConstant.EffectType.GLOW,params:{color:a,size:o,asSecondary:!0}}),n.Effects().SetEffects(s,this.Frame),LogUtil.Debug("S.GroupSymbol - ApplyEffects output:","Effects applied with glowColor",a)):LogUtil.Debug("S.GroupSymbol - ApplyEffects output: No glow color configured")}AllowTextEdit(){LogUtil.Debug("S.GroupSymbol - AllowTextEdit input:",{});const t=Boolean(this.TextFlags&NvConstant.TextFlags.AttachB||this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachD||this.DataID>=0);return LogUtil.Debug("S.GroupSymbol - AllowTextEdit output:",t),t}RemoveFieldData(t,e){LogUtil.Debug("S.GroupSymbol - RemoveFieldData input:",{fieldKey:t,fieldValue:e}),Instance.Shape.BaseSymbol.prototype.RemoveFieldData.call(this,t,e);const i=this.ShapesInGroup,n=i.length;for(let s=0;s<n;s++){const n=ObjectUtil$1.GetObjectPtr(i[s],!1);n&&n.RemoveFieldData(t,e)}LogUtil.Debug("S.GroupSymbol - RemoveFieldData output executed")}HasFieldDataInText(t){LogUtil.Debug("S.GroupSymbol - HasFieldDataInText input:",{fieldData:t});const e=this.ShapesInGroup,i=e.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataInText.call(this,t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataInText output:",!0),!0;for(let n=0;n<i;++n){const i=ObjectUtil$1.GetObjectPtr(e[n],!1);if(i&&i.HasFieldDataInText(t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataInText output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataInText output:",!1),!1}HasFieldDataRules(t){LogUtil.Debug("S.GroupSymbol - HasFieldDataRules input:",{criteria:t});const e=this.ShapesInGroup,i=e.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataRules.call(this,t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRules output:",!0),!0;for(let n=0;n<i;n++){const i=ObjectUtil$1.GetObjectPtr(e[n],!1);if(i&&i.HasFieldDataRules(t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRules output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataRules output:",!1),!1}HasFieldDataForTable(t){LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable input:",{tableId:t});const e=this.ShapesInGroup,i=e.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataForTable.call(this,t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable output:",!0),!0;for(let n=0;n<i;n++){const i=ObjectUtil$1.GetObjectPtr(e[n],!1);if(i&&i.HasFieldDataForTable(t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable output:",!1),!1}HasFieldDataRecord(t,e,i){LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord input:",{fieldKey:t,fieldValue:e,recordId:i});const n=this.ShapesInGroup,s=n.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataRecord.call(this,t,e,i))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!0),!0;if(!i)return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!1),!1;for(let a=0;a<s;++a){const s=ObjectUtil$1.GetObjectPtr(n[a],!1);if(s&&s.HasFieldDataRecord(t,e,i))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!1),!1}RefreshFromFieldData(t){LogUtil.Debug("S.GroupSymbol - refreshFromFieldData input:",t);let e=!1;return Instance.Shape.BaseSymbol.prototype.RefreshFromFieldData.call(this,t)&&(e=!0),this.HasFieldDataInText(t)&&(this.GetFieldDataStyleOverride(),this.ChangeTextAttributes(null,null,null,null,null,null,null,!0),e=!0),this.HasFieldDataRules(t)&&(ObjectUtil$1.AddToDirtyList(this.BlockID),e=!0),LogUtil.Debug("S.GroupSymbol - refreshFromFieldData output:",e),e}RemapDataFields(t){LogUtil.Debug("S.GroupSymbol - remapDataFields input:",t),Instance.Shape.BaseSymbol.prototype.RemapDataFields.call(this,t);const e=this.ShapesInGroup;for(let i=0;i<e.length;i++){const n=ObjectUtil$1.GetObjectPtr(e[i],!1);n&&n.RemapDataFields(t)}LogUtil.Debug("S.GroupSymbol - remapDataFields output: completed")}}class ContainerListShape{constructor(){__publicField(this,"id"),__publicField(this,"pt"),__publicField(this,"extra"),this.id=-1,this.pt={x:0,y:0},this.extra=0}}class ShapeContainer extends Rect$1{constructor(t){LogUtil.Debug("= S.ShapeContainer constructor - Input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.Rect,super(t),__publicField(this,"ContainerList"),__publicField(this,"zListIndex"),this.dataclass=t.dataclass||PolygonConstant.ShapeTypes.RECTANGLE,this.ContainerList=t.ContainerList||new Instance.Shape.ContainerList,this.objecttype=NvConstant.FNObjectTypes.ShapeContainer,this.nativeDataArrayBuffer=t.nativeDataArrayBuffer||null,this.SymbolData=t.SymbolData||null,LogUtil.Debug("= S.ShapeContainer constructor - Output:",{ShapeType:t.ShapeType,dataclass:this.dataclass,ContainerList:this.ContainerList,objecttype:this.objecttype,nativeDataArrayBuffer:this.nativeDataArrayBuffer,SymbolData:this.SymbolData})}IsShapeContainer(t,e){LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Input:",{shapeToCheck:t,hookPoint:e});const i=NvConstant.ContainerListFlags;if(null==t)return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1;if(t.ParentFrameID>=0&&ObjectUtil$1.GetObjectPtr(t.ParentFrameID,!1))return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1;if(t.flags&NvConstant.ObjFlags.TextOnly)return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){const n=this.ContainerList,s=n.flags&i.Sparse;let a;return e&&(s||n.Arrangement!==NvConstant.ContainerListArrangements.Row?e.id=OptConstant.HookPts.KCT:(e.x-=t.Frame.width/2,e.y+=t.Frame.height/2,e.id=OptConstant.HookPts.KCL)),a=n.flags&i.AllowOnlyContainers?t instanceof ShapeContainer:!(n.flags&i.AllowOnlyNonContainers)||!(t instanceof ShapeContainer),LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",a),a}return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.ShapeContainer CreateConnectHilites - Input:",{connectEvent:t,targetObject:e,highlightOptions:i,sourceShape:n,connectionType:s,additionalContext:a});const o={active:!0,eventDetails:t,targetDetails:e,optionsPassed:i,additionalData:{param1:n,param2:s,param3:a}};return LogUtil.Debug("= S.ShapeContainer CreateConnectHilites - Output:",o),o}GetBestHook(t,e,i){LogUtil.Debug("= S.ShapeContainer GetBestHook - Input:",{connectionEvent:t,proposedHook:e,contextData:i});const n=e;return LogUtil.Debug("= S.ShapeContainer GetBestHook - Output:",n),n}GetTargetPoints(t,e,i){LogUtil.Debug("= S.ShapeContainer GetTargetPoints - Input:",{options:t,filterCriteria:e,renderContext:i});const n=[],s=this.ContainerList,a=s.List,o=a.length,r=OptConstant.Common.DimMax;let l={x:r/2,y:0};const h=s.flags&NvConstant.ContainerListFlags.Sparse,c=this.PrGetContainerFrame().frame.width;let u=s.ndown,d=s.nacross;if(h){for(let t=0;t<=u;t++)for(let e=-1;e<=d;e++)l=new Point$1(e,t),n.push(l);return LogUtil.Debug("= S.ShapeContainer GetTargetPoints - Output:",n),n}if(s.Arrangement===NvConstant.ContainerListArrangements.Column){o>0&&(l.x=a[0].pt.x/c*r),n.push(l);for(let t=0;t<o;t++){const e=a[t].pt.x/c*r,i=new Point$1(e,t+1);n.push(i)}}else{l.x=s.HorizontalSpacing,l.y=0,o>0&&(l.x=0),n.push(l);for(let t=0;t<o;t++){const e=a[t].pt.y/c*r,i=new Point$1(e,t+1);n.push(i)}}return LogUtil.Debug("= S.ShapeContainer GetTargetPoints - Output:",n),n}PrGetContainerFrame(){LogUtil.Debug("= S.ShapeContainer PrGetContainerFrame - Input:",{trect:this.trect});const t={frame:Utils1.DeepCopy(this.trect),StartY:0};return LogUtil.Debug("= S.ShapeContainer PrGetContainerFrame - Output:",t),t}GetHitTestFrame(t){LogUtil.Debug("= S.ShapeContainer GetHitTestFrame - Input:",{target:t});const e={},i=this.ContainerList,n=i.flags&NvConstant.ContainerListFlags.Sparse;return Utils2.CopyRect(e,this.r),t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(n?(e.width+=i.HorizontalSpacing+i.childwidth,e.x-=i.HorizontalSpacing+i.childwidth/2):e.width+=i.HorizontalSpacing+t.Frame.width/2,e.height+=2*i.VerticalSpacing),LogUtil.Debug("= S.ShapeContainer GetHitTestFrame - Output:",e),e}AllowDoubleClick(){LogUtil.Debug("= S.ShapeContainer AllowDoubleClick - Input:",{});const t=!!(this.ContainerList.flags&NvConstant.ContainerListFlags.Sparse);return LogUtil.Debug("= S.ShapeContainer AllowDoubleClick - Output:",t),t}DoubleClick(t,e){LogUtil.Debug("= S.ShapeContainer DoubleClick - Input:",{event:t,target:e});const i=this.ContainerList,n=i.List,s=n.length;let a,o,r=0,l=0,h=null;const c=t=>{let e=0;for(let s=0;s<i.ndown;s++){const a=s*i.nacross+t;let o;if(n[a].id>=0){const t=ObjectUtil$1.GetObjectPtr(n[a].id,!1);if(!t)continue;o=t.Frame.width}else o=i.childwidth;o>e&&(e=o)}return e+2*i.HorizontalSpacing};if(i.flags&NvConstant.ContainerListFlags.Sparse){if(e)r=e.Data.row,l=e.Data.col,a=!0,o=Utils1.DeepCopy(e.Data.theNewPoint);else{if(a=!1,o=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),o=Utils1.DeepCopy(o),o.x-=this.Frame.x,o.y-=this.Frame.y,(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)&&(o.y<10||o.y>this.Frame.height-10)){const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);return LogUtil.Debug("= S.ShapeContainer DoubleClick - Output: activating text edit."),void TextUtil.ActivateTextEdit(e.svgObj.SDGObj,t)}const e=this.GetTargetPoints(),s=this.GetPerimPts(null,e,null,!0,null,1);let h=Number.MAX_VALUE,u=-1;for(let t=0;t<s.length;t++){const e=s[t].x-o.x,i=s[t].y-o.y,n=e*e+i*i;n<h&&(h=n,u=t)}if(u>=0)l=e[u].x,r=e[u].y,a=!0;else{let t=!1;for(let s=1;s<i.ndown;s++){const e=s*i.nacross;if(n[e].pt.y>o.y){r=s-1,t=!0;break}}t||(r=i.ndown-1);let e=!1;for(let s=1;s<i.nacross;s++)if(n[s].pt.x>o.x){e=!0;const t=c(s-1),i=n[s-1].pt.x+t/2;l=o.x<i?s-1:s;break}e||(l=i.nacross-1),a=n[i.nacross*r+l].id<0}}if(a){let t;if(e)t=e.Data.closest;else{t=((t,e)=>{let a=-1;if(i.Arrangement===NvConstant.ContainerListArrangements.Column){if(e<=i.nacross&&(e=i.nacross-1)<0)return-1;for(let s=0;s<i.ndown;s++){const o=s*i.nacross+e;if(o<n.length&&n[o].id>=0){if(!(s<t))return a<0?n[o].id:a;a=n[o].id}}}else for(let s=0;s<i.nacross;s++){if(t<=i.ndown&&(t=i.ndown-1)<0)return-1;const o=t*i.nacross+s;if(o<n.length&&n[o].id>=0){if(!(s<e))return a<0?n[o].id:a;a=n[o].id}}if(a<0)for(let i=0;i<s;i++)if(n[i].id>=0)return n[i].id;return a})(r,l)}if(t<0){h=e?e.Data.SymbolID:"currentSymbolId";const t=T3Gv.baseOpt.AddSymbol(h),n=ObjectUtil$1.GetObjectPtr(t,!0),s=i.childwidth,a=i.childheight,r={x:o.x,y:o.y,width:s,height:a};n.UpdateFrame(r),n.sizedim.width=s,n.sizedim.height=a,ObjectUtil$1.AddToDirtyList(t)}else{const e=T3Gv.baseOpt.DuplicateShape(t,!0,!1);ObjectUtil$1.AddToDirtyList(e)}const a={x:l,y:r},c=OptConstant.HookPts.KCT,u=[];HookUtil.UpdateHook(t<0?h:t,-1,this.BlockID,c,a,null),u.push(t<0?h:t),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),DrawUtil.CompleteOperation(u)}}LogUtil.Debug("= S.ShapeContainer DoubleClick - Output:",{event:t,target:e})}NoRotate(){LogUtil.Debug("= S.ShapeContainer NoRotate - Input:",{});return LogUtil.Debug("= S.ShapeContainer NoRotate - Output:",true),true}FieldDataAllowed(){LogUtil.Debug("= S.ShapeContainer FieldDataAllowed - Input:",{thisContext:this});return LogUtil.Debug("= S.ShapeContainer FieldDataAllowed - Output:",true),true}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.ShapeContainer GetPerimPts - Input:",{hookPoint:t,targetPoints:e,hookType:i,considerLayout:n,additionalContext:s,pointIndex:a});const o=[],r=this.ContainerList,l=r.List,h=l.length,c=OptConstant.Common.DimMax,u=NvConstant.ContainerListArrangements,d=!!(r.flags&NvConstant.ContainerListFlags.Sparse);1===e.length&&this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat();const p=this.PrGetContainerFrame(),g=p.frame;if(r.VerticalSpacing,p.StartY,1===e.length&&a<0){let t,n;i===OptConstant.HookPts.KCTL?(t=g.x,n=g.y):i===OptConstant.HookPts.KCL?(t=g.x,n=g.y+g.height/2):(t=g.x+g.width/2,n=g.y);const s=new Point$1(t,n);return null!=e[0].id&&(s.id=e[0].id),o.push(s),LogUtil.Debug("= S.ShapeContainer GetPerimPts - Output (single point):",o),o}if(d&&a>=0){for(let t=0;t<e.length;t++){let i,n=0,s=0;e[t].y<r.ndown?e[t].x<0?(i=e[t].y*r.nacross,s=l[i].pt.y,n=-r.childwidth/2):e[t].x<r.nacross?(i=e[t].y*r.nacross+e[t].x,s=l[i].pt.y,n=l[i].pt.x):(i=e[t].y*r.nacross+r.nacross-1,s=l[i].pt.y,n=r.width+(e[t].x-r.nacross)*r.childwidth+r.childwidth/2,n>g.width-r.HorizontalSpacing/2&&(n=g.width-r.HorizontalSpacing/2)):(s=r.height+(e[t].y-r.ndown)*r.childheight+r.VerticalSpacing,s>g.height-r.VerticalSpacing/2&&(s=g.height-r.VerticalSpacing/2),e[t].x<0?(i=e[t].y*r.nacross,n=-r.childwidth/2):e[t].x<r.nacross?(i=e[t].y>=r.ndown?(r.ndown-1)*r.nacross+e[t].x:(e[t].y-1)*r.nacross+e[t].x,n=l[i].pt.x):(n=r.width+(e[t].x-r.nacross)*r.childwidth+r.childwidth/2,n>g.width-r.HorizontalSpacing/2&&(n=g.width-r.HorizontalSpacing/2)));const a=new Point$1(n+g.x,s+g.y);o.push(a)}return LogUtil.Debug("= S.ShapeContainer GetPerimPts - Output (sparse):",o),o}for(let f=0;f<e.length;f++){let t=e[f].y,n=0,s=0;if(r.Arrangement===u.Column?n=e[f].x/c*g.width:s=e[f].x/c*g.height,t<h)s=l[t].pt.y,n=l[t].pt.x;else if(0===h)r.Arrangement===u.Column?s=r.VerticalSpacing:(n=r.HorizontalSpacing,s=this.Frame.height/2);else{t=h-1;const e=ObjectUtil$1.GetObjectPtr(l[t].id,!1);if(r.Arrangement===u.Row){if(n=r.width,s=l[t].pt.y,e){const i=l[t].pt.x+e.Frame.width+r.HorizontalSpacing;n=i>r.width?r.width:i}}else{if(s=r.height,e){s=l[t].pt.y+e.Frame.height+r.VerticalSpacing}n=l[t].pt.x}}i===OptConstant.HookPts.KAT&&(s=0);const a=new Point$1(n+g.x,s+g.y);null!=e[f].id&&(a.id=e[f].id),e.length>1&&(r.Arrangement===u.Column?a.y-=r.VerticalSpacing/2:a.x-=r.HorizontalSpacing/2),o.push(a)}return LogUtil.Debug("= S.ShapeContainer GetPerimPts - Output:",o),o}PrFormat(t){LogUtil.Debug("= S.ShapeContainer PrFormat - Input:",{skipSizeUpdate:t});const e=this.ContainerList,i=e.List,n=i.length;let s=0;e.VerticalSpacing;const a=NvConstant.ContainerListArrangements,o=this;let r=0;const l=Boolean(e.flags&NvConstant.ContainerListFlags.Sparse),h=Boolean(e.flags&NvConstant.ContainerListFlags.LeftChanged),c=Boolean(e.flags&NvConstant.ContainerListFlags.TopChanged);e.flags=Utils2.SetFlag(e.flags,NvConstant.ContainerListFlags.LeftChanged,!1),e.flags=Utils2.SetFlag(e.flags,NvConstant.ContainerListFlags.TopChanged,!1);const u=function(t,s,a){let l=t,h=e.VerticalSpacing+r,c=e.Wrap,u=0,d=0;for(;l<n;l++){h+=i[l].extra,i[l].pt={x:s,y:h};const t=ObjectUtil$1.GetObjectPtr(i[l].id,!1);if(t&&(t.Frame.y!==h&&OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),t.Frame.width>d&&(d=t.Frame.width),h+=t.Frame.height+e.VerticalSpacing,u++),c>0&&u>=c)break}d+=2*e.HorizontalSpacing,d<e.MinWidth&&(d=e.MinWidth);let p=d;a&&p<a.width&&(p=a.width);let g=!1;for(let e=t;e<l;e++){i[e].pt.x+=p/2;const t=ObjectUtil$1.GetObjectPtr(i[e].id,!1);t&&t.Frame.x+t.Frame.width/2!==o.Frame.x+i[e].pt.x&&(OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),g=!0)}return g&&OptCMUtil.SetLinkFlag(o.BlockID,DSConstant.LinkFlags.Move),{start:l,colwidth:p,top:h}},d=function(t,s,a,r){let l=t,h=e.HorizontalSpacing,c=e.Wrap,u=0,d=0,p=a;for(;l<n;l++){h+=i[l].extra,i[l].pt={x:h,y:p};const t=ObjectUtil$1.GetObjectPtr(i[l].id,!1);let n,s;if(t?(t.Frame.y/2!==p&&OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),n=t.Frame.width,s=t.Frame.height):(n=e.childwidth,s=e.childheight),s>d&&(d=s),h+=n+e.HorizontalSpacing,u++,c>0&&u>=c)break}d+=2*e.VerticalSpacing,d<e.MinHeight&&(d=e.MinHeight);let g=d;r&&g<r.height&&(g=r.height);let f=!1;for(let e=t;e<l;e++){i[e].pt.y+=g/2;const t=ObjectUtil$1.GetObjectPtr(i[e].id,!1);t&&t.Frame.y+t.Frame.height/2!==s.y+i[e].pt.y&&(OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),f=!0)}return f&&OptCMUtil.SetLinkFlag(o.BlockID,DSConstant.LinkFlags.Move),{start:l,rowht:g,left:h}},p=this.PrGetContainerFrame(),g=p.frame;r=p.StartY;let f,b=0,v=e.VerticalSpacing+r,m=0,y=v;if(l){const t=function(t){let i=t,n=[],s=[];for(let a=0;a<e.ndown;a++)for(let t=0;t<e.nacross;t++){const i=a*e.nacross+t,o=e.List[i];null==o.id&&(o.id=-1);const r=ObjectUtil$1.GetObjectPtr(o.id,!1),l=r?r.Frame.width:e.childwidth,h=r?r.Frame.height:e.childheight;(null==n[t]||n[t]<l)&&(n[t]=l),(null==s[a]||s[a]<h)&&(s[a]=h)}for(let a=0;a<e.ndown;a++){let t=e.HorizontalSpacing;for(let s=0;s<e.nacross;s++){const o=a*e.nacross+s,r=e.List[o];r.pt.x=t+n[s]/2,r.pt.y=i,t+=n[s]+e.HorizontalSpacing}i+=s[a]+e.VerticalSpacing}return{left:0,top:i}}(v);m=t.left,y=t.top}else switch(e.Arrangement){case a.Column:for(;b<n;)f=u(b,s,null),b=f.start,m+=f.colwidth,s+=f.colwidth,b<n&&(m-=e.HorizontalSpacing,s-=e.HorizontalSpacing),f.top>y&&(y=f.top);break;case a.Row:for(;b<n;)v-=e.VerticalSpacing,f=d(b,g,v,null),b=f.start,y+=f.rowht,v+=f.rowht,f.left>m&&(m=f.left)}if(!t){e.width=m,y+=r,e.height=y,m<e.MinWidth&&(m=e.MinWidth),y<e.MinHeight&&(y=e.MinHeight);let t=m-g.width,i=y-g.height;Utils2.IsEqual(i,0,1)&&(i=0),Utils2.IsEqual(t,0,1)&&(t=0);let n=0,s=0;if(t||i){t&&(g.width=m,n=h?-t:t),i&&(g.height=y,s=c?-i:i),this.TRectToFrame(g,!0),ObjectUtil$1.AddToDirtyList(this.BlockID);const e=this.hooks.length?ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1):null;e&&e instanceof ShapeContainer&&(e.flags=Utils2.SetFlag(e.flags,NvConstant.ObjFlags.Obj1,!0),OptCMUtil.SetLinkFlag(e.BlockID,DSConstant.LinkFlags.Move)),(n||s)&&this.OffsetShape(n,s)}this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!1)}LogUtil.Debug("= S.ShapeContainer PrFormat - Output:",{ContainerList:e})}OnConnect(t,e,i,n,s){if(LogUtil.Debug("= S.ShapeContainer OnConnect - Input:",{connectionId:t,targetObject:e,connectionAnchor:i,connectionReference:n,additionalInfo:s}),e instanceof ShapeContainer&&(null==this.zListIndex||this.zListIndex<0)){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);e&&(this.zListIndex=T3Gv.opt.svgObjectLayer.GetElementIndex(e),T3Gv.opt.svgObjectLayer.MoveElementToFront(e))}LogUtil.Debug("= S.ShapeContainer OnConnect - Output:",{zListIndex:this.zListIndex})}PrGetShapeConnectorInfo(t){LogUtil.Debug("= S.ShapeContainer PrGetShapeConnectorInfo - Input:",{eventData:t});const e=this.ContainerList,i=e.flags&NvConstant.ContainerListFlags.Sparse,n=e.flags&NvConstant.ContainerListFlags.Adjust,s=[],a=OptConstant.ActionTriggerType;if(i||!n)return LogUtil.Debug("= S.ShapeContainer PrGetShapeConnectorInfo - Output:",null),null;const o=e.Arrangement===NvConstant.ContainerListArrangements.Row?{knobID:a.ContainerAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:0,hook:t.hookpt,polyType:"horizontal"}:{knobID:a.ContainerAdj,cursorType:CursorConstant.CursorType.ResizeB,knobData:0,hook:t.hookpt,polyType:"vertical"};return s.push(o),LogUtil.Debug("= S.ShapeContainer PrGetShapeConnectorInfo - Output:",s),s}GetListOfEnclosedObjects(t){LogUtil.Debug("= S.ShapeContainer GetListOfEnclosedObjects - Input:",t);const e=[];return LogUtil.Debug("= S.ShapeContainer GetListOfEnclosedObjects - Output:",e),e}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("= S.ShapeContainer ChangeTarget - Input:",{changeEvent:t,targetShapeId:e,connectionAnchor:i,boundingRect:n,gridPosition:s,shouldAttach:a});const o=(t,e)=>{const i=h.List,n=i.length,s=new ContainerListShape;if(s.id=t,e>=n)i.push(s);else{const t=i[e].extra;i[e].extra=0,s.extra=t,i.splice(e,0,s)}},r=t=>{const e=h.List,i=e.length;let n=-1;for(let s=0;s<i;s++)if(e[s].id===t){n=s;break}n>=0&&e.splice(n,1)},l=(t,e)=>{const i=h,n=i.List;let s=0,a=0;const o=[],r=[];for(let h=0;h<i.ndown;h++)for(let e=0;e<i.nacross;e++){const s=n[i.nacross*h+e];s.id===t&&(s.id=-1),s.id>=0&&(o[e]=!0,r[h]=!0)}let l=-1;for(let h=0;h<i.nacross;h++)!0===o[h]&&l<0&&(l=h);let c=-1;for(let h=i.nacross-1;h>=0;h--)!0===o[h]&&c<0&&(c=h);let u=-1;null==r[0]&&e&&0===e.y&&(r[0]=!0);for(let h=0;h<i.ndown;h++)!0===r[h]&&u<0&&(u=h);let d=-1;for(let h=i.ndown-1;h>=0;h--)!0===r[h]&&d<0&&(d=h);for(let h=i.ndown-1;h>d;h--)i.ndown>1&&(n.splice(h*i.nacross,i.nacross),i.ndown--);for(let h=u-1;h>=0;h--)i.ndown>1&&(n.splice(h*i.nacross,i.nacross),i.ndown--,a--);for(let h=i.nacross-1;h>c;h--)if(i.nacross>1){for(let t=i.ndown-1;t>=0;t--)n.splice(i.nacross*t+h,1);i.nacross--}for(let h=l-1;h>=0;h--)if(i.nacross>1){for(let t=i.ndown-1;t>=0;t--)n.splice(i.nacross*t+h,1);i.nacross--,s--}return{dx:s,dy:a}},h=this.ContainerList;let c=h.List;const u=this,d=h.flags&NvConstant.ContainerListFlags.Sparse;let p=-1;for(let g=0,f=c.length;g<f;g++)if(c[g].id===e){p=g;break}if(null!=e){const t=ObjectUtil$1.GetObjectPtr(e,!1);let i;if(t.OnDisconnect(e,this),d){let n;if(a){p>=0&&(n=l(e,s),s.x+=n.dx,s.y+=n.dy),((t,e)=>{const i=h,n=i.List;const s=NvConstant.ContainerListArrangements,a=(t,e)=>{if(e<0||t<0)return{dx:0,dy:0};if(i.Arrangement===s.Column){let s=-1;for(let a=t+1;a<i.ndown;a++){const t=a*i.nacross+e;n[t].id<0&&s<0&&(s=a)}if(s<0){for(let t=0;t<i.nacross;t++){const t=new ContainerListShape;n.push(t)}i.ndown++,s=i.ndown-1}for(let a=s;a>t;a--){const t=(a-1)*i.nacross+e,s=a*i.nacross+e;n[s].id=n[t].id}n[t*i.nacross+e].id=-1}else if(i.Arrangement===s.Row){let s=-1;for(let a=e+1;a<i.nacross;a++){const e=t*i.nacross+a;n[e].id<0&&s<0&&(s=a)}if(s<0){for(let t=i.ndown;t>0;t--){const e=t*i.nacross;for(let t=0;t<i.nacross;t++){const t=new ContainerListShape;n.splice(e,0,t)}}i.nacross++,s=i.nacross-1}for(let a=s;a>e;a--){const e=t*i.nacross+(a-1),s=t*i.nacross+a;n[s].id=n[e].id}n[t*i.nacross+e].id=-1}return{dx:0,dy:0}};if(!(t>=h.nacross||e>=h.ndown&&t>=0)){if(e<0||t<0)return a(t,e);const i=h.nacross*e+t;n[i].id>=0&&a(t,e)}})(s.x,s.y),s.y<0&&(s.y=0),s.x<0&&(s.x=0);((t,e,i)=>{const n=h,s=n.List;if(i>=n.ndown)for(let a=n.ndown;a<=i;a++){for(let t=0;t<n.nacross;t++){const t=new ContainerListShape;s.push(t)}n.ndown=i+1}if(e>=n.nacross){const t=n.nacross;for(let i=n.ndown-1;i>=0;i--){const n=t*(i+1);for(let i=t;i<=e;i++){const t=new ContainerListShape;s.splice(n,0,t)}}n.nacross=e+1}s[i*n.nacross+e].id=t})(e,s.x,s.y),T3Gv.opt.PutInFrontofObject(u.BlockID,e),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!0)}else l(e,null),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!1),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);if(a&&(p>=0?(i=s.y,i>p?(o(e,s.y),r(e)):i<p?(r(e),o(e,i)):(o(e,s.y),T3Gv.opt.PutInFrontofObject(u.BlockID,e),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!0))):(r(e),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!1),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move))),d){(()=>{const t=h,e=t.List;for(let i=0;i<t.ndown;i++)for(let n=0;n<t.nacross;n++){const s=i*t.nacross+n,a=ObjectUtil$1.GetObjectPtr(e[s].id,!1);if(a&&a.hooks.length){const t=a.hooks[0].connect;if(t.x!==n||t.y!==i){const t=ObjectUtil$1.GetObjectPtr(e[s].id,!0);t.hooks[0].connect.x=n,t.hooks[0].connect.y=i}}}})()}else{(()=>{const t=h.List;for(let e=0,i=t.length;e<i;e++){const i=ObjectUtil$1.GetObjectPtr(t[e].id,!0);i&&i.hooks.length&&(i.hooks[0].connect.y=e)}})()}this.PrFormat()}else this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0);LogUtil.Debug("= S.ShapeContainer ChangeTarget - Output:",{containerList:this.ContainerList,targetShapeId:e,gridPosition:s})}}}class BitmapImporter{ImportBitmapV1(t,e,i,n,s){if(LogUtil.Debug("S.BitmapImporter - Input:",{imageFile:t,targetWidth:e,targetHeight:i,resolution:n}),!t||!s||n<=0)return;T3Gv.opt.bitmapImportDestWidth=e,T3Gv.opt.bitmapImportDestHeight=i,T3Gv.opt.bitmapImportDPI=n;const a=t.type;if(T3Gv.opt.bitmapImportMimeType=a,"image/jpeg"===a||"image/png"===a){T3Gv.opt.bitmapImportOriginalSize=t.size,T3Gv.opt.scaledBitmapCallback=s;const e=new FileReader;e.onload=function(e){T3Gv.opt.bitmapImportEXIFdata=null,T3Gv.opt.bitmapImportFile=t,T3Gv.opt.bitmapImportResult=e.target.result,LogUtil.Debug("S.BitmapImporter - Output (JPEG/PNG):",{result:e.target.result})},e.readAsDataURL(t)}else{const e=new FileReader;e.onload=function(){const t=new Blob([this.result],{type:a}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;if(i&&i.createObjectURL){const n=i.createObjectURL(t);LogUtil.Debug(`S.BitmapImporter - Output (${"image/svg+xml"===a?"SVG":"Other"}):`,{objectUrl:n,blob:t,byteArray:e}),s(n,t,e)}},e.readAsArrayBuffer(t)}}ImportBitmap(t,e,i,n,s){let a;if(!t||!s||n<=0)return;T3Gv.opt.bitmapImportDestWidth=e,T3Gv.opt.bitmapImportDestHeight=i,T3Gv.opt.bitmapImportDPI=n;const o=t.type;T3Gv.opt.bitmapImportMimeType=o,t instanceof File?"image/jpeg"===o||"image/png"===o?(T3Gv.opt.bitmapImportOriginalSize=t.size,T3Gv.opt.scaledBitmapCallback=s,a=new FileReader,a.onload=function(){const t=new Blob([this.result],{type:o}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;let n="";i&&i.createObjectURL&&(n=i.createObjectURL(t),s&&s(n,t,e))},a.readAsArrayBuffer(t)):"image/svg+xml"===o&&(a=new FileReader,a.onload=function(){const t=new Blob([this.result],{type:o}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;let n="";i&&i.createObjectURL&&(n=i.createObjectURL(t),s&&s(n,t,e))},a.readAsArrayBuffer(t)):(a=new FileReader,a.onload=function(){const t=new Blob([this.result],{type:o}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;let n="";i&&i.createObjectURL&&(n=i.createObjectURL(t),s&&s(n,t,e))},a.readAsArrayBuffer(t))}}class SvgImporter{ImportSvg(t,e){LogUtil.Debug("= S.SvgImporter - Input file:",t);const i=t.type;if("image/svg+xml"===i){const n=new FileReader;n.onload=function(){const s=n.result,a=new Blob([s],{type:i}),o=new Uint8Array(s),r=window.URL||window.webkitURL;let l="";r&&r.createObjectURL&&(l=r.createObjectURL(a),LogUtil.Debug("= S.SvgImporter - Generated URL:",l),LogUtil.Debug("= S.SvgImporter - Generated Blob:",a),LogUtil.Debug("= S.SvgImporter - Generated Uint8Array:",o),e&&e(l,a,o)),void 0!==t.msClose&&(LogUtil.Debug("= S.SvgImporter - Calling msClose"),t.msClose())},n.readAsArrayBuffer(t)}else LogUtil.Debug("= S.SvgImporter - Unsupported file type:",i)}}class ForeignObject extends BaseShape{constructor(t){LogUtil.Debug("= S.ForeignObject Input:",t),LogUtil.Debug("= S.ForeignObject Input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.ForeignObject,super(t),__publicField(this,"vueInstance",null),__publicField(this,"htmlContent",null),__publicField(this,"vueComponent",null),__publicField(this,"vueProps",{}),this.dataclass=t.dataclass||PolygonConstant.ShapeTypes.RECTANGLE,this.vueComponent=t.vueComponent||null,this.vueProps=t.vueProps||{},this.htmlContent=t.htmlContent||null,LogUtil.Debug("= S.ForeignObject Created instance:",this)}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=Utils1.DeepCopy(this.Frame),s=this.StyleRecord,a=this.SVGTokenizerHook(s),o=a.Line.Paint.Color,r=a.Line.Thickness,l=a.Line.LinePattern,h=a.Line.Paint.Opacity,c=n.width,u=n.height;i.SetSize(c,u),i.SetPos(n.x,n.y);const d=t.CreateShape(OptConstant.CSType.ForeignObject);if(d.SetID(OptConstant.SVGElementClass.Shape),d.SetSize(c,u),d.SetStrokeColor(o),d.SetStrokeOpacity(h),d.SetStrokeWidth(r),0!==l&&d.SetStrokePattern(l),i.AddElement(d),this.htmlContent)d.SetHtmlContent(this.htmlContent);else if(this.vueComponent)if("string"==typeof this.vueComponent){const t=this.vueComponent,e={"ObjectType2.vue":()=>__vitePreload((()=>import("./ObjectType2.33762189.js")),["assets/ObjectType2.33762189.js","assets/index.3938ccd1.js","assets/index.fbd60cd5.css","assets/IdxUtils.90eb8a31.js","assets/T3Data.cbe80363.js","assets/_commonjsHelpers.a5007c1f.js","assets/EditOutlined.6584eaab.js","assets/AntdIcon.ce0fcb4c.js","assets/button.e008c943.js","assets/index.33b844cc.js","assets/Serializer.f6a5f515.js","assets/_getTag.ea883084.js"])};e[t]?e[t]().then((t=>{const e=t.default||t;d.MountVueComponent(e,this.vueProps)})).catch((e=>{T3Util.Error(`= s.ForeignObject CreateShape Failed to load component: ${t}`,e)})):T3Util.Error(`= s.ForeignObject CreateShape Component not found in registry: ${t}`)}else if(this.vueComponent&&"object"==typeof this.vueComponent)if("function"==typeof this.vueComponent.render||"function"==typeof this.vueComponent.setup)d.MountVueComponent(this.vueComponent,this.vueProps);else{const t=this.vueComponent.name||this.vueComponent.__name;if(t){LogUtil.Debug(`Attempting to load component by name: ${t}`),LogUtil.Debug("this.vueProps:  ",this.vueProps);let e=`../../../../components/${t}.vue`;"AntdTest"===t&&(e=`../../../../components/NewUI/${t}.vue`),__vitePreload((()=>import(e)),[]).then((t=>{const e=t.default||t;d.MountVueComponent(e,this.vueProps)})).catch((e=>{T3Util.Error(`= s.ForeignObject CreateShape Failed to load component by name: ${t}`,e)}))}}else T3Util.Error("= s.ForeignObject CreateShape Invalid vue component provided:",this.vueComponent);if(this.ApplyStyles(d,a),this.ApplyEffects(i,!1,!1),!(this instanceof Instance.Shape.ShapeContainer)){const n=OptConstant.Common.Slop,s=t.CreateShape(OptConstant.CSType.Rect);s.SetStrokeColor("white"),s.SetFillColor("none"),s.SetOpacity(0),s.SetStrokeWidth(r+n),e?s.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):s.SetEventBehavior(OptConstant.EventBehavior.None),s.SetID(OptConstant.SVGElementClass.Slop),s.ExcludeFromExport(!0),s.SetSize(c||1,u),i.AddElement(s)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),i}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.ForeignObject GetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});const a=[];let o={};Utils2.CopyRect(o,this.Frame);const r=this.StyleRecord.Line.Thickness/2;if(n&&Utils2.InflateRect(o,r,r),a.push(new Point$1(0,0)),a.push(new Point$1(o.width,0)),a.push(new Point$1(o.width,o.height)),a.push(new Point$1(0,o.height)),a.push(new Point$1(0,0)),!e)for(let l=0,h=a.length;l<h;l++)a[l].x+=o.x,a[l].y+=o.y;return LogUtil.Debug("= S.ForeignObject GetPolyPoints Output:",a),a}SetHtmlContent(t){return LogUtil.Debug("= S.ForeignObject SetHtmlContent Input:",t),this.htmlContent=t,this.vueComponent=null,this.vueProps={},this.vueInstance=null,LogUtil.Debug("= S.ForeignObject SetHtmlContent Output: Updated content"),!0}SetVueComponent(t,e={}){return LogUtil.Debug("= S.ForeignObject SetVueComponent Input:",{component:t,props:e}),this.vueComponent=t,this.vueProps=e||{},this.htmlContent=null,LogUtil.Debug("= S.ForeignObject SetVueComponent Output: Updated component"),!0}GetTextDefault(t){if(this.vueComponent||this.htmlContent){return{}}return super.GetTextDefault(t)}SetShapeProperties(t){LogUtil.Debug("= S.ForeignObject SetShapeProperties Input:",t);let e=!1;return void 0!==t.htmlContent&&t.htmlContent!==this.htmlContent&&(this.SetHtmlContent(t.htmlContent),e=!0),void 0!==t.vueComponent&&t.vueComponent!==this.vueComponent&&(this.SetVueComponent(t.vueComponent,t.vueProps),e=!0),super.SetShapeProperties(t)&&(e=!0),LogUtil.Debug("= S.ForeignObject SetShapeProperties Output:",e),e}RemoveElement(){LogUtil.Debug("= S.ForeignObject RemoveElement"),this.vueInstance&&("function"==typeof this.vueInstance.unmount?this.vueInstance.unmount():"function"==typeof this.vueInstance.$destroy&&this.vueInstance.$destroy(),this.vueInstance=null),super.RemoveElement()}LMActionPostRelease(t){if(LogUtil.Debug("= S.ForeignObject LMActionPostRelease Input:",t),super.LMActionPostRelease(t),this.vueComponent){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){const e=t.GetElementById(OptConstant.SVGElementClass.Shape);e&&(e.MountVueComponent(this.vueComponent,this.vueProps),LogUtil.Debug("= S.ForeignObject LMActionPostRelease: Vue component refreshed"))}}LogUtil.Debug("= S.ForeignObject LMActionPostRelease Output: completed")}}const Shape={ArcLine:ArcLine,ArcSegmentedLine:ArcSegmentedLine,BaseDrawObject:BaseDrawObject$1,BaseLine:BaseLine,BaseShape:BaseShape,BaseSymbol:BaseSymbol,BitmapSymbol:BitmapSymbol,Connector:Connector,D3Symbol:D3Symbol,FreehandLine:FreehandLine,GroupSymbol:GroupSymbol,Line:Line$1,Oval:Oval$1,Polygon:Polygon$1,PolyLine:PolyLine$1,PolyLineContainer:PolyLineContainer,Rect:Rect$1,RRect:RRect$1,SegmentedLine:SegmentedLine,ShapeContainer:ShapeContainer,SvgSymbol:SvgSymbol,BitmapImporter:BitmapImporter,SvgImporter:SvgImporter,ForeignObject:ForeignObject};SVGElement.prototype.getTransformToElement=function(t){return t.getScreenCTM().inverse().multiply(this.getScreenCTM())};class T3Opt{constructor(){__publicField(this,"evtOpt"),__publicField(this,"userOpt"),this.evtOpt=new EvtOpt,this.userOpt=new UserOpt}Initialize(t){var e,i,n,s;T3Gv.quasar=t,QuasarUtil.quasar=t,initializeInstance(Basic$1,Shape),DataOpt.InitStateAndStore(),T3Gv.docUtil=new DocUtil,T3Gv.opt=new OptUtil,T3Gv.opt.InitializeProperties(),T3Gv.opt.Initialize(),T3Gv.wallOpt=new WallOpt,window.oncontextmenu=function(t){t.preventDefault()},window.onkeydown=KeyboardOpt.OnKeyDown,window.onkeyup=KeyboardOpt.OnKeyUp,window.onkeypress=KeyboardOpt.OnKeyPress,window.docUtil=T3Gv.docUtil,window.wallOpt=T3Gv.wallOpt,this.evtOpt.BindElemCtlEvent(),T3Clipboard.Init(),DataOpt.InitStoredData(),DataOpt.LoadAppStateV2(),SvgUtil.RenderAllSVGObjects(),this.userOpt.Initialize(),LogUtil.Debug("= o.T3Opt: Initialize/ - After initialize all and the T3Gv.stdObj loaded from storage data:",T3Gv.opt.sdDataBlockId,T3Gv.stdObj),T3Gv.docUtil.LoadRulersSetting(),T3Gv.docUtil.LoadGridSetting();const a=DataOpt.LoadDocSettingData(),o=100*(null!=(i=null==(e=null==a?void 0:a.docInfo)?void 0:e.docScale)?i:1);T3Gv.docUtil.SetZoomLevel(o),T3Gv.docUtil.UpdateRefZoomScale(null!=(s=null==(n=null==a?void 0:a.docInfo)?void 0:n.docScale)?s:1),LogUtil.Debug(`= o.T3Opt: Initialize/ - After initialize all and set SetZoomLevel for resizing the work area:${o}`)}ReInitialize(){var t,e,i,n;initializeInstance(Basic$1,Shape),DataOpt.InitStateAndStore(),T3Gv.opt.InitializeProperties(),T3Gv.opt.Initialize(!1),DataOpt.SaveToLocalStorage(),T3Gv.wallOpt=new WallOpt,window.oncontextmenu=function(t){t.preventDefault()},window.onkeydown=KeyboardOpt.OnKeyDown,window.onkeyup=KeyboardOpt.OnKeyUp,window.onkeypress=KeyboardOpt.OnKeyPress,window.docUtil=T3Gv.docUtil,window.wallOpt=T3Gv.wallOpt,this.evtOpt.BindElemCtlEvent(),T3Clipboard.Init(),DataOpt.InitStoredData(),DataOpt.LoadAppStateV2(),this.userOpt.Initialize(),LogUtil.Debug("= o.T3Opt: Initialize/ - After initialize all and the T3Gv.stdObj loaded from storage data:",T3Gv.opt.sdDataBlockId,T3Gv.stdObj),T3Gv.docUtil.LoadRulersSetting(),T3Gv.docUtil.LoadGridSetting();const s=DataOpt.LoadDocSettingData(),a=100*(null!=(e=null==(t=null==s?void 0:s.docInfo)?void 0:t.docScale)?e:1);T3Gv.docUtil.SetZoomLevel(a),T3Gv.docUtil.UpdateRefZoomScale(null!=(n=null==(i=null==s?void 0:s.docInfo)?void 0:i.docScale)?n:1),LogUtil.Debug(`= o.T3Opt: Initialize/ - After initialize all and set SetZoomLevel for resizing the work area:${a}`)}}class KeyInsertOpt{constructor(){__publicField(this,"insertT3EntryDialog"),this.insertT3EntryDialog=insertT3EntryDialog.value}InsertT3EntryDialog(){LogUtil.Debug("= O.KeyInsertOpt InsertT3EntryDialog: The insert key has been pressed"),LogUtil.Debug("= O.KeyInsertOpt InsertT3EntryDialog: The insertT3EntryDialog data been initial with value",this.insertT3EntryDialog),this.insertT3EntryDialog.active=!0}CloseT3EntryDialog(){this.insertT3EntryDialog.active=!1}InsertT3EntrySelect(t){LogUtil.Debug("= O.KeyInsertOpt InsertT3EntryDialog: value",t)}}class MockData{}__publicField(MockData,"DeviceList",[{id:0,label:"All Devices",icon:"devices",children:[{id:1,label:"T3-XX-ESP 1",icon:"horizontal_rule"},{id:2,label:"T3-XX-ESP 2",icon:"horizontal_rule"},{id:3,label:"T3-XX-ESP 3",icon:"horizontal_rule"},{id:4,label:"T3-XX-ESP 4",icon:"horizontal_rule"},{id:5,label:"T3-XX-ESP 5",icon:"horizontal_rule"},{id:6,label:"T3-XX-ESP 6",icon:"horizontal_rule"},{id:7,label:"T3-XX-ESP 7",icon:"horizontal_rule"},{id:8,label:"T3-XX-ESP 8",icon:"horizontal_rule"},{id:9,label:"T3-XX-ESP 9",icon:"horizontal_rule"},{id:10,label:"T3-XX-ESP 10",icon:"horizontal_rule"},{id:11,label:"T3-XX-ESP 11",icon:"horizontal_rule"},{id:12,label:"T3-XX-ESP 12",icon:"horizontal_rule"},{id:13,label:"T3-XX-ESP 13",icon:"horizontal_rule"},{id:14,label:"T3-XX-ESP 14",icon:"horizontal_rule"},{id:15,label:"T3-XX-ESP 15",icon:"horizontal_rule"},{id:16,label:"T3-XX-ESP 16",icon:"horizontal_rule"},{id:17,label:"T3-XX-ESP 17",icon:"horizontal_rule"},{id:18,label:"T3-XX-ESP 18",icon:"horizontal_rule"}]}]),__publicField(MockData,"GraphicList",[{id:1,fullLabel:"T3-xx-ESP1 full label 1",label:"label 1",pictureFile:"",elementCount:0},{id:2,fullLabel:"T3-xx-ESP1 full label 2",label:"label 2",pictureFile:"",elementCount:0},{id:3,fullLabel:"T3-xx-ESP1 full label 3",label:"label 3",pictureFile:"",elementCount:0},{id:4,fullLabel:"T3-xx-ESP1 full label 4",label:"label 4",pictureFile:"",elementCount:0},{id:5,fullLabel:"T3-xx-ESP1 Default",label:"label 5",pictureFile:"",elementCount:0},{id:6,fullLabel:"T3-xx-ESP1 full label 6",label:"label 6",pictureFile:"",elementCount:0},{id:7,fullLabel:"T3-xx-ESP1 full label 7",label:"label 7",pictureFile:"",elementCount:0},{id:8,fullLabel:"T3-xx-ESP1 Default",label:"label 8",pictureFile:"",elementCount:0}]);class PanelInfo{constructor(){__publicField(this,"object_instance"),__publicField(this,"online_time"),__publicField(this,"panel_name"),__publicField(this,"panel_number"),__publicField(this,"pid"),__publicField(this,"serial_number")}}class DeviceItem{constructor(){__publicField(this,"id"),__publicField(this,"label"),__publicField(this,"icon"),__publicField(this,"children"),__publicField(this,"pl")}initData(t,e,i,n,s){this.id=t,this.label=e,this.icon=i,this.children=n,this.pl=s}}class LsOpt{saveAppState(t){localStorage.setItem("appState",JSON.stringify(t))}saveDeviceAppState(t){localStorage.setItem("deviceAppState",JSON.stringify(t))}loadDeviceAppStateLS(){const t=localStorage.getItem("deviceAppState");return t?JSON.parse(t):null}loadAppStateLS(){const t=localStorage.getItem("appState");return null!=t?t:null}loadParsedAppStateLS(){const t=localStorage.getItem("appState");return t?JSON.parse(t):null}}class DeviceOpt{constructor(){__publicField(this,"lsOpt"),__publicField(this,"mockDeviceList"),__publicField(this,"mockGraphicList"),__publicField(this,"panelList"),__publicField(this,"deviceList"),__publicField(this,"graphicList"),__publicField(this,"currentDevice"),this.lsOpt=new LsOpt,this.mockDeviceList=MockData.DeviceList,this.mockGraphicList=MockData.GraphicList,this.panelList=[],this.deviceList=[],this.graphicList=[],this.currentDevice={}}initPanelList(t){if(null==t)return;const e=t.map((t=>{const e=new PanelInfo;return e.object_instance=t.object_instance,e.online_time=t.online_time,e.panel_name=t.panel_name,e.panel_number=t.panel_number,e.pid=t.pid,e.serial_number=t.serial_number,e}));this.panelList=e}initDeviceList(t){this.initPanelList(t);const e=this.panelList.map((t=>{const e=new DeviceItem;return e.initData(t.panel_number,t.panel_name,"horizontal_rule",[],t),e})),i=new DeviceItem;i.initData(-1,"All Devices","devices",e,{}),this.deviceList=[i],T3Data.deviceList.value=this.deviceList}initGraphicList(t){LogUtil.Debug("= Dvopt t3 graphic data",t);const e=t.filter((t=>t.id.startsWith("GRP"))).slice(0,8).map((t=>({id:t.id.includes("GRP")?parseInt(t.id.replace("GRP",""),10):parseInt(t.id,10),fullLabel:t.description||"",label:t.label||"",elementCount:Number(t.count)||0})));LogUtil.Debug("= Dvopt t3 transformedGraphicItems",e),this.graphicList=e,T3Data.graphicList.value=e,LogUtil.Debug("= Dvopt t3 graphicList",T3Data.graphicList.value)}calculateElementCount(t){const e=T3Data.currentDevice.value;if(!e)return 0;const i=this.lsOpt.loadDeviceAppStateLS();if(i){const n=i.find((i=>{var n,s;return(null==(n=null==i?void 0:i.device)?void 0:n.deviceId)===(null==e?void 0:e.deviceId)&&(null==(s=null==i?void 0:i.device)?void 0:s.graphic)===t}));if(n)return n.appState.items.length}return 0}syncTempAppStateToDeviceAppState(){const t=localStorage.getItem("tempAppState"),e=this.getCurrentDevice();if(!t||!e)return;const i=JSON.parse(t),n=this.lsOpt.loadDeviceAppStateLS()||[],s=n.findIndex((t=>{var i,n;return(null==(i=null==t?void 0:t.device)?void 0:i.device)===(null==e?void 0:e.device)&&(null==(n=null==t?void 0:t.device)?void 0:n.graphic)===(null==e?void 0:e.graphic)}));-1!==s?n[s].appState=i:n.push({device:e,appState:i}),localStorage.setItem("deviceAppState",JSON.stringify(n))}saveCurrentDevice(t){localStorage.setItem("currentDevice",JSON.stringify(t))}getCurrentDevice(){return localStorage.getItem("currentDevice")?JSON.parse(localStorage.getItem("currentDevice")):null}saveAppState(t){localStorage.setItem("appState",JSON.stringify(t))}findAllNodes(t,e){for(const i of t){if(i.label===e)return i;if(i.children){const t=this.findAllNodes(i.children,e);if(t)return t}}return null}setDeviceAndGraphicDefaultData(t){const e=this.findAllNodes(T3Data.deviceList.value,t.device);e&&(e.icon="check")}saveDeviceAppState(t,e,i){let n=e.value.data;if(!n.device&&(n=this.getCurrentDevice(),null===n))return;const s=this.lsOpt.loadDeviceAppStateLS();null!==s&&(t.value=s);if(t.value.some((t=>{var e,i;return(null==(e=null==t?void 0:t.device)?void 0:e.device)===(null==n?void 0:n.device)&&(null==(i=null==t?void 0:t.device)?void 0:i.graphic)===(null==n?void 0:n.graphic)})))t.value.forEach((t=>{var e,s;if((null==(e=null==t?void 0:t.device)?void 0:e.device)===(null==n?void 0:n.device)&&(null==(s=null==t?void 0:t.device)?void 0:s.graphic)===(null==n?void 0:n.graphic)){const e=lodash.exports.cloneDeep(i);t.appState=e}}));else{const e=lodash.exports.cloneDeep(i),s={device:n,appState:e};t.value.push(s)}this.lsOpt.saveDeviceAppState(t.value),this.refreshCurrentDeviceCount(e)}loadDeviceAppState(t,e,i){const n=this.lsOpt.loadDeviceAppStateLS();null!==n&&(t.value=n);const s=t.value.find((t=>{var i,n;return(null==(i=null==t?void 0:t.device)?void 0:i.device)===(null==e?void 0:e.device)&&(null==(n=null==t?void 0:t.device)?void 0:n.graphic)===(null==e?void 0:e.graphic)}));if(s){const t=lodash.exports.cloneDeep(s.appState);return t.selectedTarget=[],t.selectedTargets=[],t.activeItemIndex=-1,t}}refreshCurrentDeviceCount(t){const e=this.lsOpt.loadDeviceAppStateLS(),i=this.getCurrentDevice();i&&i.graphicFull&&e&&(e.forEach((e=>{var n,s,a,o,r;if((null==(n=null==e?void 0:e.device)?void 0:n.device)===(null==i?void 0:i.device)&&(null==(s=null==e?void 0:e.device)?void 0:s.graphic)===(null==i?void 0:i.graphic)){const n=null!=(r=null==(o=null==(a=null==e?void 0:e.appState)?void 0:a.items)?void 0:o.length)?r:0;return i.graphicFull.elementCount=n,void(t&&(t.value.data=i))}})),localStorage.setItem("currentDevice",JSON.stringify(i)))}refreshGraphicPanelElementCount(t){const e=this.lsOpt.loadDeviceAppStateLS();if(!e)return;const i=e.filter((e=>{var i;return(null==(i=null==e?void 0:e.device)?void 0:i.device)===(null==t?void 0:t.device)}));T3Data.graphicList.value.forEach((t=>{var e,n,s;const a=i.find((e=>{var i;return(null==(i=null==e?void 0:e.device)?void 0:i.graphic)===t.id}));if(a){const i=null!=(s=null==(n=null==(e=null==a?void 0:a.appState)?void 0:e.items)?void 0:n.length)?s:0;t.elementCount=i}})),LogUtil.Debug("= Dvopt refresh element count",T3Data.graphicList.value)}clearGraphicPanelElementCount(){T3Data.graphicList.value.forEach((t=>{t.elementCount=0}))}clearDirtyCurrentDevice(){const t=this.getCurrentDevice();T3Data.deviceList.value.length>0&&T3Data.deviceList.value[0].children.forEach((e=>{"check"===e.icon&&e.label!==t.device&&(e.icon="horizontal_rule")}))}loadGraphicPanelData(t){MockData.GraphicList.forEach((e=>{e.fullLabel=`${t.device} mock real ${e.id}`,e.label=`mock real ${e.id}`,e.pictureFile="",e.elementCount=0}))}getSerialNumber(t){var e,i,n;let s=-1;if(0===T3Data.deviceList.value.length){const t=this.getCurrentDevice();s=null!=(e=null==t?void 0:t.serialNumber)?e:-1}else{const e=null==(n=null==(i=T3Data.deviceList.value[0])?void 0:i.children)?void 0:n.find((e=>e.pl.panel_number===t));e&&(s=e.pl.serial_number)}return s}refreshDeviceAppState(){var t,e,i;LogUtil.Debug("= Dvopt: refreshDeviceAppState / start to refresh deviceAppState");const n=this.loadDeviceAppState(deviceAppState,deviceModel.value.data,null);if(LogUtil.Debug("= Dvopt: refreshDeviceAppState / existAppState",n),n){if(Array.isArray(n.items)){const e=new Set;let i=n.items.reduce(((t,e)=>{var i;return Math.max(t,null!=(i=e.id)?i:0)}),0);for(const t of n.items)e.has(t.id)?t.id=++i:e.add(t.id);i>(null!=(t=n.itemsCount)?t:0)&&(n.itemsCount=i)}appState.value=n}else appState.value=lodash.exports.cloneDeep(emptyProject),appState.value.rulersGridVisible=rulersGridVisible.value;LogUtil.Debug("= Dvopt: refreshDeviceAppState / appState.value",appState.value),this.saveAppState(appState.value),rulersGridVisible.value=null!=(i=null==(e=appState.value)?void 0:e.rulersGridVisible)&&i}refreshCurrentDevice(){const t=this.getCurrentDevice();if(!t||!t.graphicFull)return;const e=appState.value.items.length;e!==t.graphicFull.elementCount&&(t.graphicFull.elementCount=e,this.saveCurrentDevice(t))}addPresetsData(){var t,e;const i=lodash.exports.cloneDeep(emptyProject);localStorage.setItem("tempAppState",JSON.stringify(i)),LogUtil.Debug("= Dvopt: addPresetsData / set the tempAppState to empty project",i);const n=this.getCurrentDevice(),s=null!=(t=null==n?void 0:n.device)?t:"-";null==n||n.deviceId;const a=null!=(e=null==n?void 0:n.graphic)?e:-1;LogUtil.Debug("= Dvopt: addPresetsData / currentDevice",n),n.graphicFull.elementCount=0,this.saveCurrentDevice(n),appState.value=lodash.exports.cloneDeep(emptyProject),rulersGridVisible.value=!1,LogUtil.Debug("= Dvopt: addPresetsData / set the appState value to empty project",appState.value),this.saveAppState(appState.value),LogUtil.Debug("= Dvopt: addPresetsData / save the appState value to local storage",appState.value);const o=this.lsOpt.loadDeviceAppStateLS();if(LogUtil.Debug("= Dvopt: addPresetsData / load deviceAppStateLS",o),!o)return;const r=o.findIndex((t=>{var e,i;return(null==(e=null==t?void 0:t.device)?void 0:e.device)===s&&(null==(i=null==t?void 0:t.device)?void 0:i.graphic)===a}));-1!==r&&(o[r].appState=lodash.exports.cloneDeep(emptyProject)),localStorage.setItem("deviceAppState",JSON.stringify(o)),LogUtil.Debug("= Dvopt: addPresetsData / save the deviceAppState to local storage",o)}mergeAppState(t){if(!appState.value&&!t)return;const e=appState.value.version,i=t.items.length>0?Math.max(...t.items.map((t=>t.id))):0;appState.value.items.forEach((t=>{t.id=i+t.id}));const n={version:e,items:[...t.items,...appState.value.items],selectedTargets:[],elementGuidelines:[],itemsCount:appState.value.itemsCount+t.itemsCount,groupCount:appState.value.groupCount+t.groupCount,activeItemIndex:-1,viewportTransform:appState.value.viewportTransform,rulersGridVisible:appState.value.rulersGridVisible||t.rulersGridVisible};appState.value=n,this.saveAppState(appState.value),LogUtil.Debug("= Dvopt mergeAppState",appState.value)}isCurrentDeviceMessage(t){var e,i,n,s,a,o;const r=null!=(e=null==t?void 0:t.panelId)?e:-1,l=null!=(i=null==t?void 0:t.viewitem)?i:-1,h=null!=(n=null==t?void 0:t.serialNumber)?n:-1;if(LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / msgData",t),LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / panelId,viewitem,serialNumber",r,l,h),-1===r||-1===l||-1===h)return LogUtil.Error("= Dvopt: isCurrentDeviceMessage / Invalid message data"),!1;const c=this.getCurrentDevice();if(LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / currentDevice",c),!c)return LogUtil.Error("= Dvopt: isCurrentDeviceMessage / No current device found"),!1;null==c||c.device;const u=null!=(s=null==c?void 0:c.deviceId)?s:-1,d=null!=(a=null==c?void 0:c.graphic)?a:-1,p=null!=(o=null==c?void 0:c.serialNumber)?o:-1;LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / crtPanelId,crtGraphicId,crtSerialNumber",u,d,p);const g=u===r,f=p===h,b=d===l+1;return LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / isSamePanel",g,"isSameSerial",f,"isSameViewItem",b),g&&f&&b}}class MessageModel{constructor(){__publicField(this,"deviceOpt"),__publicField(this,"browserType"),__publicField(this,"header"),__publicField(this,"message"),__publicField(this,"currentDevice"),this.deviceOpt=new DeviceOpt,this.loadCurrentDevice(),this.browserType=this.getBrowserType(),this.header={from:this.browserType},this.message={}}getBrowserType(){const t=navigator.userAgent;return t.indexOf("Firefox")>-1?"Firefox":t.indexOf("Chrome")>-1?"Chrome":t.indexOf("Safari")>-1?"Safari":t.indexOf("MSIE")>-1||document.DOCUMENT_NODE?"IE":"Unknown"}loadCurrentDevice(){const t=this.deviceOpt.getCurrentDevice();null===t?this.setEmptyDevice():this.currentDevice=t}setEmptyDevice(){this.currentDevice={device:"",deviceId:-1,serialNumber:-1,graphic:-1,graphicFull:{id:-1,fullLabel:"",label:"",elementCount:""}}}setHeader(){this.header.from=this.getBrowserType()}setMessage(t,e,i,n,s,a){null!=t&&(this.message.action=t),null!=e&&(this.message.panelId=e),null!=i&&(this.message.viewitem=i-1,this.message.viewitem<0&&(this.message.viewitem=-1)),null!=n&&void 0!==n&&(this.message.data=n),null!=a&&void 0!==a&&(this.message.clientId=Utils1.GenerateUUID()),this.message.msgId=Utils1.GenerateUUID();null!=e&&null!=s&&(this.message.serialNumber=s)}formatMessageData(){return{header:this.header,message:this.message}}}class T3UIUtil{static ShowWebSocketError(t){AntdUtil.ShowTopAlert("error","WebSocket Error",t)}static ShowZoomInOutError(t){AntdUtil.ShowTopAlert("error","Zoom In/Out Error",t)}static SetNavVisiblity(t){topNavVisible.value=!0,leftNavVisible.value=!0,rightNavVisible.value=!0}}class WebSocketClient{constructor(){__publicField(this,"socket",null),__publicField(this,"retries",0),__publicField(this,"maxRetries",10),__publicField(this,"pingInterval",1e4),__publicField(this,"pingIntervalId",null),__publicField(this,"reconnectTimeoutId",null),__publicField(this,"dataRequestErrorCount",0),__publicField(this,"maxDataRequestErrors",3),__publicField(this,"lastErrorTime",0),__publicField(this,"uri"),__publicField(this,"messageModel"),__publicField(this,"messageData"),__publicField(this,"needRefresh",!0),__publicField(this,"$q"),__publicField(this,"reloadInitialDataInterval"),__publicField(this,"isDestroyed",!1),__publicField(this,"messageQueue",[]),__publicField(this,"deviceOpt",null),__publicField(this,"idxPage",null),__publicField(this,"quasarUtil",null),__publicField(this,"messageHandlers",{[MessageType.GET_PANEL_DATA_RES]:this.HandleGetPanelDataRes.bind(this),[MessageType.GET_INITIAL_DATA_RES]:this.HandleGetInitialDataRes.bind(this),[MessageType.SAVE_GRAPHIC_DATA_RES]:this.HandleSaveGraphicRes.bind(this),[MessageType.UPDATE_ENTRY_RES]:this.HandleUpdateEntryRes.bind(this),[MessageType.GET_PANELS_LIST_RES]:this.HandleGetPanelsListRes.bind(this),[MessageType.GET_ENTRIES_RES]:this.HandleGetEntriesRes.bind(this),[MessageType.LOGGING_DATA_RES]:this.HandleLoggingDataRes.bind(this),[MessageType.LOAD_GRAPHIC_ENTRY_RES]:this.HandleLoadGraphicEntryRes.bind(this),[MessageType.OPEN_ENTRY_EDIT_WINDOW_RES]:this.HandleOpenEntryEditWindowRes.bind(this),[MessageType.SAVE_IMAGE_RES]:this.HandleSaveImageRes.bind(this),[MessageType.SAVE_LIBRARY_DATA_RES]:this.HandleSaveLibraryDataRes.bind(this),[MessageType.SAVE_NEW_LIBRARY_DATA_RES]:this.HandleSaveNewLibraryDataRes.bind(this),[MessageType.DELETE_IMAGE_RES]:this.HandleDeleteImageRes.bind(this),[MessageType.DATA_SERVER_ONLINE]:this.HandleDataServerOnline.bind(this)})}setDependencies(t,e,i){this.deviceOpt=t,this.idxPage=e,this.quasarUtil=i}connect(){if(this.isDestroyed)return void LogUtil.Error("Cannot connect: WebSocketClient has been destroyed");this.cleanup(),this.uri=this.getUri();const t=`ws://${this.uri}:9104`;try{this.socket=new WebSocket(t),this.setupEventHandlers()}catch(e){LogUtil.Error("Failed to create WebSocket connection:",e),this.attemptReconnect()}}setupEventHandlers(){this.socket&&(this.socket.onopen=this.onOpen.bind(this),this.socket.onmessage=this.onMessage.bind(this),this.socket.onclose=this.onClose.bind(this),this.socket.onerror=this.onError.bind(this))}onOpen(t){LogUtil.Debug("= ws: connection opened:",t),this.retries=0,this.socket&&this.socket.readyState===WebSocket.OPEN&&(this.bindCurrentClient(),this.processPendingMessages()),this.GetPanelsList()}onMessage(t){LogUtil.Debug("= Ws message received:",t.data);try{this.processMessage(t.data)}catch(e){LogUtil.Error("Error processing WebSocket message:",e)}}onClose(t){LogUtil.Debug("= ws: connection closed:",t),this.cleanup(),this.isDestroyed||this.attemptReconnect()}onError(t){T3Util.Error("= ws: onError/",t);T3UIUtil.ShowWebSocketError("Load device data failed, please check whether the T3000 application is running or not."),this.cleanup(),this.isDestroyed||this.attemptReconnect()}cleanup(){this.pingIntervalId&&(clearInterval(this.pingIntervalId),this.pingIntervalId=null),this.reconnectTimeoutId&&(clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=null),this.reloadInitialDataInterval&&(clearInterval(this.reloadInitialDataInterval),this.reloadInitialDataInterval=null),this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.readyState===WebSocket.OPEN&&this.socket.close(),this.socket=null)}startPing(){this.pingIntervalId&&clearInterval(this.pingIntervalId),this.pingIntervalId=setInterval((()=>{if(this.socket&&this.socket.readyState===WebSocket.OPEN)try{this.socket.send("ping")}catch(t){LogUtil.Error("Failed to send ping:",t)}}),this.pingInterval)}attemptReconnect(){if(this.retries>=this.maxRetries||this.isDestroyed)return;const t=Math.min(1e3*Math.pow(2,this.retries),3e4);this.reconnectTimeoutId=setTimeout((()=>{this.retries++,this.connect()}),t)}getUri(){return new URL(window.location.href).hostname}bindCurrentClient(){const t=Utils1.GenerateUUID();this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(13,null,null,null,null,t);const e=this.messageModel.formatMessageData();this.messageData=JSON.stringify(e),this.sendMessage(this.messageData)}sendMessage(t){var e;if(this.isDestroyed)LogUtil.Error("Cannot send message: WebSocketClient has been destroyed");else if(this.socket&&this.socket.readyState===WebSocket.OPEN)try{this.socket.send(t);const e=(new Date).toLocaleString();try{const i=JSON.parse(t),n=(null==i?void 0:i.message)||i,s=this.getActionDetails(null==n?void 0:n.action);LogUtil.Debug("= WS: Sent message to T3000 backend:",{messageDetails:{action:null==n?void 0:n.action,actionName:s.name,actionDescription:s.description,actionCategory:s.category,implemented:s.implemented},messageContext:{panelId:null==n?void 0:n.panelId,viewitem:null==n?void 0:n.viewitem,msgId:null==n?void 0:n.msgId,serialNumber:null==n?void 0:n.serialNumber,hasData:!!(null==n?void 0:n.data),dataType:(null==n?void 0:n.data)?typeof n.data:null,dataLength:Array.isArray(null==n?void 0:n.data)||"string"==typeof(null==n?void 0:n.data)?n.data.length:null},connectionInfo:{socketState:this.socket.readyState,socketUrl:this.socket.url,timestamp:e},rawMessage:t})}catch{LogUtil.Debug("= WS: Sent message to T3000 backend (unparseable):",{messageType:"RAW_STRING",messageLength:(null==t?void 0:t.length)||0,timestamp:e,rawMessage:t})}}catch(i){LogUtil.Error("Failed to send message:",i),this.messageQueue.push(t),this.attemptReconnect()}else this.messageQueue.push(t),LogUtil.Debug("= ws: sendMessage / socket not open, message queued. Ready state:",null==(e=this.socket)?void 0:e.readyState),this.socket&&this.socket.readyState!==WebSocket.CLOSED||this.connect()}processPendingMessages(){for(var t;this.messageQueue.length>0&&(null==(t=this.socket)?void 0:t.readyState)===WebSocket.OPEN;){const t=this.messageQueue.shift();if(t)try{this.socket.send(t),LogUtil.Debug("= ws: pending message sent:",t)}catch(e){LogUtil.Error("Failed to send pending message:",e),this.messageQueue.unshift(t);break}}}destroy(){this.isDestroyed=!0,this.cleanup(),this.messageQueue=[],LogUtil.Debug("= ws: WebSocketClient destroyed")}async loadDemoDataFallback(){try{LogUtil.Info("📦 Loading demo device data as fallback");const t=await demoDeviceData();t&&t.data?(T3000_Data.value.panelsData=t.data,selectPanelOptions.value=t.data,t.ranges&&(T3000_Data.value.panelsRanges=t.ranges),LogUtil.Info(`✅ Demo data loaded successfully: ${t.data.length} panels`)):LogUtil.Warn("⚠️ Demo data load returned empty or invalid data")}catch(t){LogUtil.Error("❌ Failed to load demo data:",t)}}FormatMessageData(t,e,i,n){var s,a;const o=null!=(a=null==(s=this.deviceOpt)?void 0:s.getSerialNumber(e))?a:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(t,e,i,n,o);const r=this.messageModel.formatMessageData();this.messageData=JSON.stringify(r)}FormatUpdateEntryData(t){var e,i,n;const s=t.panelId,a=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null===a||null==a)return;const o=a.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(s))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.UPDATE_ENTRY,s,o,null,r),this.messageModel.message.field=t.field,this.messageModel.message.value=t.value,this.messageModel.message.entryIndex=t.entryIndex,this.messageModel.message.entryType=t.entryType,void 0!==t.data&&(this.messageModel.message.data=t.data);const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}FormatSaveImageData(t){var e,i,n;const s=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==s)return;const a=s.panelId,o=s.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(a))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.SAVE_IMAGE,a,o,null,r),this.messageModel.message.filename=t.filename,this.messageModel.message.fileLength=t.fileLength,this.messageModel.message.fileData=t.fileData;const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}FormatLoadGraphicEntryData(t){var e,i,n;const s=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==s)return;const a=t.panelId||s.panenId,o=s.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(a))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.LOAD_GRAPHIC_ENTRY,a,o,null,r),this.messageModel.message.entryIndex=t.entryIndex,this.messageModel.message.viewitem=t.entryIndex;const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}FormatOpenEntryEditWindow(t){var e,i,n;const s=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==s)return;const a=t.panelId||s.panenId,o=s.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(a))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.OPEN_ENTRY_EDIT_WINDOW,a,o,null,r),this.messageModel.message.entryType=t.entryType,this.messageModel.message.entryIndex=t.entryIndex;const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}GetData(t){this.sendMessage(JSON.stringify({action:t}))}GetPanelData(t){const e=(new Error).stack,i=e?e.split("\n"):[],n=(i.slice(1,6),i[2]||"Unknown caller"),s=n.match(/at\s+(.+)\s+\((.+):(\d+):(\d+)\)/);s?(s[1],s[2].split("/").pop()||s[2],s[3],s[4]):n.trim();this.FormatMessageData(MessageType.GET_PANEL_DATA,t,null,null),this.sendMessage(this.messageData)}GetInitialData(t,e,i){this.needRefresh=null==i||i,this.FormatMessageData(MessageType.GET_INITIAL_DATA,t,e,null),this.sendMessage(this.messageData)}SaveGraphic(t,e,i){this.FormatMessageData(MessageType.SAVE_GRAPHIC_DATA,t,e,i),this.sendMessage(this.messageData)}UpdateEntry(t){this.FormatUpdateEntryData(t),this.sendMessage(this.messageData)}GetPanelsList(){const t=(new Error).stack,e=t?t.split("\n"):[],i=(e.slice(1,6),e[2]||"Unknown caller"),n=i.match(/at\s+(.+)\s+\((.+):(\d+):(\d+)\)/);n?(n[1],n[2].split("/").pop()||n[2],n[3],n[4]):i.trim();this.FormatMessageData(MessageType.GET_PANELS_LIST,null,null,null),this.sendMessage(this.messageData)}GetEntries(t){var e;const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==i)return;const n=i.deviceId,s=i.graphic;i.serialNumber,this.FormatMessageData(MessageType.GET_ENTRIES,n,s,t),this.sendMessage(this.messageData)}GetLoggingData(t){var e;const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==i)return;const n=i.deviceId,s=i.graphic,a=t||i.serialNumber;this.FormatMessageData(MessageType.LOGGING_DATA,n,s,null),this.messageModel.message.serialNumber=a;const o=this.messageModel.formatMessageData();this.messageData=JSON.stringify(o),this.sendMessage(this.messageData)}LoadGraphicEntry(t){this.FormatLoadGraphicEntryData(t),this.sendMessage(this.messageData)}OpenEntryEditWindow(t){this.FormatOpenEntryEditWindow(t),this.sendMessage(this.messageData)}SaveImage(t){this.FormatSaveImageData(t),this.sendMessage(this.messageData)}SaveLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}SaveNewLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_NEW_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}DeleteImage(t){var e;const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==i)return;const n=i.deviceId,s=i.graphic;this.FormatMessageData(MessageType.DELETE_IMAGE,n,s,t),this.sendMessage(this.messageData)}printLog(t){try{if("GET_INITIAL_DATA_RES"==t.action){const e=JSON.parse(t.data),i=t.entry,n=null!=t.library&&""!==t.library?JSON.parse(t.library):{};LogUtil.Debug("= ws: printLog / Received data:",!0,{action:"GET_INITIAL_DATA_RES",data:e,entry:i,library:n})}else LogUtil.Debug("= ws: printLog / Received data:",t)}catch(e){LogUtil.Debug("= ws: printLog / Received data error",e)}}processMessage(t){LogUtil.Debug("= ws: printLog / received origin data",t);try{const e=JSON.parse(t);if(void 0!==e.error||!1===(null==e?void 0:e.status))return void this.handleError(e);this.printLog(e),this.processMessageData(e),this.showSuccess(e),LogUtil.Debug("= ========================")}catch(e){T3Util.Error("= ws: processMessage/ failed to parse | process data:",e)}}processMessageData(t){const e=this.messageHandlers[t.action];e?e(t):LogUtil.Warn("No handler for message action:",t.action,t)}HandleGetPanelDataRes(t){var e,i,n;if(LogUtil.Debug("= ws: HandleGetPanelDataRes START ================="),LogUtil.Debug("= ws: HandleGetPanelDataRes / received panel_id:",null==t?void 0:t.panel_id),LogUtil.Debug("= ws: HandleGetPanelDataRes / received data length:",(null==(e=null==t?void 0:t.data)?void 0:e.length)||0),LogUtil.Debug("= ws: HandleGetPanelDataRes / current loadingPanel:",T3000_Data.value.loadingPanel),LogUtil.Debug("= ws: HandleGetPanelDataRes / total panels in list:",T3000_Data.value.panelsList.length),LogUtil.Debug("= ws: HandleGetPanelDataRes / BEFORE - panelsData length:",T3000_Data.value.panelsData.length),(null==t?void 0:t.data)&&t.data.length>0&&LogUtil.Debug("= ws: HandleGetPanelDataRes / sample received data items (first 3):",t.data.slice(0,3).map((t=>({pid:t.pid,index:t.index,type:t.type,label:t.label||t.description})))),null==(i=this.deviceOpt)||i.initGraphicList(t.data),(null==t?void 0:t.panel_id)&&(null==(n=this.idxPage)||n.clearGetPanelsInterval()),null==t?void 0:t.panel_id){if(null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel<T3000_Data.value.panelsList.length-1){LogUtil.Debug("= ws: HandleGetPanelDataRes / triggering next panel load, increment loadingPanel from:",T3000_Data.value.loadingPanel),T3000_Data.value.loadingPanel++;const t=T3000_Data.value.loadingPanel,e=T3000_Data.value.panelsList[t].panel_number;LogUtil.Debug("= ws: HandleGetPanelDataRes / loading next panel at index:",t,"panel_number:",e),this.GetPanelData(e)}null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel===T3000_Data.value.panelsList.length-1&&(LogUtil.Debug("= ws: HandleGetPanelDataRes / reached last panel, setting loadingPanel to null"),T3000_Data.value.loadingPanel=null);T3000_Data.value.panelsData.length,T3000_Data.value.panelsData.filter((e=>e.pid===t.panel_id));T3000_Data.value.panelsData=T3000_Data.value.panelsData.filter((e=>e.pid!==t.panel_id));T3000_Data.value.panelsData.length,t.data&&t.data.length;T3000_Data.value.panelsData=T3000_Data.value.panelsData.concat(t.data);T3000_Data.value.panelsData.length;const e={};T3000_Data.value.panelsData.forEach((t=>{e[t.pid]=(e[t.pid]||0)+1}));const i=Object.keys(e).filter((t=>e[t]>1));i.length>0&&LogUtil.Debug("= ws: HandleGetPanelDataRes / WARNING: Found items with same PID after filtering!",i),T3000_Data.value.panelsData.sort(((t,e)=>t.pid-e.pid)),selectPanelOptions.value=T3000_Data.value.panelsData;const n=T3000_Data.value.panelsRanges.length;T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.filter((e=>e.pid!==t.panel_id));const s=T3000_Data.value.panelsRanges.length;T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.concat(t.ranges);const a=T3000_Data.value.panelsRanges.length;LogUtil.Debug("= ws: HandleGetPanelDataRes / ranges: before filter:",n,"after filter:",s,"after concat:",a,"new ranges added:",t.ranges?t.ranges.length:0),IdxUtils.refreshLinkedEntries(t.data),IdxUtils.refreshLinkedEntries2(t.data),LogUtil.Debug("= ws: HandleGetPanelDataRes / FINAL - panelsData length:",T3000_Data.value.panelsData.length),LogUtil.Debug("= ws: HandleGetPanelDataRes END ===================")}}HandleGetInitialDataRes(t){var e,i,n,s,a;LogUtil.Debug("= ws: HandleGetInitialDataRes / msgData:",t),this.dataRequestErrorCount=0;if(!(null==(e=this.deviceOpt)?void 0:e.isCurrentDeviceMessage(t)))return void LogUtil.Debug("= ws: HandleGetInitialDataRes / not current device message, return");const o=t.data;null!=o&&localStorage.setItem("tempAppState",o);const r=JSON.parse(o);LogUtil.Debug("= ws: HandleGetInitialDataRes / GET_INITIAL_DATA_RES msgData-appState | needRefresh:",r,this.needRefresh),this.needRefresh&&(null==(i=this.deviceOpt)||i.syncTempAppStateToDeviceAppState(),null==(n=this.deviceOpt)||n.refreshDeviceAppState(),null==(s=this.deviceOpt)||s.refreshCurrentDevice(),grpNav.value=[t.entry],t.library&&(t.library=JSON.parse(t.library),library.value=t.library),setTimeout((()=>{var t;IdxUtils.refreshMoveableGuides(),null==(t=this.idxPage)||t.resetPanzoom()}),100),this.clearInitialDataInterval(),null==(a=this.quasarUtil)||a.clearGlobalMsg("get_initial_data"))}HandleSaveGraphicRes(t){IdxUtils.saveGraphicData(t,this.$q)}HandleUpdateEntryRes(t){}HandleGetPanelsListRes(t){var e,i,n;const s=t.data;if(void 0===s)return;null==(e=this.deviceOpt)||e.initDeviceList(s),LogUtil.Debug("= ws: GET_PANELS_LIST_RES",null==(i=this.deviceOpt)?void 0:i.deviceList);const a=s.length>0?s[0].panel_number:null;null!==a&&this.GetPanelData(a);const o=JSON.parse(localStorage.getItem("currentDevice")||"{}");if(o&&!o.deviceId){const t=o.device,e=s.find((e=>e.panel_name===t));e&&(o.deviceId=e.panel_number,o.serialNumber=e.serial_number,localStorage.setItem("currentDevice",JSON.stringify(o)))}(null==(n=t.data)?void 0:n.length)&&(T3000_Data.value.panelsList=t.data,T3000_Data.value.loadingPanel=0)}HandleGetEntriesRes(t){t.data.forEach(((t,e)=>{var i,n;const s=T3000_Data.value.panelsData.findIndex((e=>e.index===t.index&&e.type===t.type&&e.pid===t.pid));if(-1!==s){const e=T3000_Data.value.panelsData[s],a="MON"===e.type&&(Array.isArray(e.input)||Array.isArray(e.range)||e.num_inputs>0),o="MON"===t.type&&!Array.isArray(t.input)&&!Array.isArray(t.range)&&!t.num_inputs,r=this.hasComplexDataStructures(e),l=!this.hasComplexDataStructures(t),h=r&&l;if(a&&o){LogUtil.Warn("🚨 DATA CORRUPTION PREVENTED! Attempted to replace detailed monitor config with simplified version:",{id:t.id,pid:t.pid,existingDetails:{input:!!e.input,range:!!e.range,num_inputs:e.num_inputs,inputLength:null==(i=e.input)?void 0:i.length},newDetails:{input:!!t.input,range:!!t.range,num_inputs:t.num_inputs,inputLength:null==(n=t.input)?void 0:n.length}});const s=["input","range","num_inputs","an_inputs"],a=Object.keys(e),o=Object.keys(t);a.filter((t=>o.includes(t))).filter((t=>!s.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else if(h){const i=this.getComplexFields(e),n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else T3000_Data.value.panelsData[s]=t}else T3000_Data.value.panelsData.push(t)})),selectPanelOptions.value=T3000_Data.value.panelsData,IdxUtils.refreshLinkedEntries(t.data),IdxUtils.refreshLinkedEntries2(t.data)}HandleLoggingDataRes(t){var e;LogUtil.Debug("= ws: HandleLoggingDataRes START ================="),LogUtil.Debug("= ws: HandleLoggingDataRes / response structure:",{hasData:!!(null==t?void 0:t.data),dataLength:(null==(e=null==t?void 0:t.data)?void 0:e.length)||0});let i=[];t.data&&Array.isArray(t.data)&&t.data.forEach(((t,e)=>{var n;LogUtil.Debug(`= ws: HandleLoggingDataRes / device ${e}:`,{panel_id:t.panel_id,panel_name:t.panel_name,panel_serial_number:t.panel_serial_number,hasDeviceData:!!t.device_data,deviceDataLength:(null==(n=t.device_data)?void 0:n.length)||0}),t.device_data&&Array.isArray(t.device_data)&&(i=i.concat(t.device_data))})),LogUtil.Debug("= ws: HandleLoggingDataRes / total points extracted:",i.length),i.forEach(((t,e)=>{if(void 0!==t.unit&&void 0===t.units&&(t.units=t.unit,delete t.unit),t.type){const e={INPUT:"IN",OUTPUT:"OUT",VARIABLE:"VAR"};e[t.type]&&(t.type=e[t.type])}void 0!==t.calibration_h&&void 0===t.calibration&&(t.calibration=t.calibration_h),void 0!==t.calibration_sign&&void 0===t.sign&&(t.sign=t.calibration_sign);const i=T3000_Data.value.panelsData.findIndex((e=>e.index===t.index&&e.type===t.type&&e.pid===t.pid));if(-1!==i){const e=T3000_Data.value.panelsData[i],n="MON"===e.type&&(Array.isArray(e.input)||Array.isArray(e.range)||e.num_inputs>0),s="MON"===t.type&&!Array.isArray(t.input)&&!Array.isArray(t.range)&&!t.num_inputs,a=this.hasComplexDataStructures(e),o=!this.hasComplexDataStructures(t),r=a&&o;if(n&&s){LogUtil.Warn("🚨 DATA CORRUPTION PREVENTED! [LOGGING_DATA] Attempted to replace detailed monitor with simplified version:",{id:t.id,pid:t.pid});const i=["input","range","num_inputs","an_inputs"],n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else if(r){const i=this.getComplexFields(e),n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else T3000_Data.value.panelsData[i]=t}})),linkT3EntryDialog.value.active||(selectPanelOptions.value=T3000_Data.value.panelsData),IdxUtils.refreshLinkedEntries(i),IdxUtils.refreshLinkedEntries2(i),LogUtil.Debug("= ws: HandleLoggingDataRes / AFTER - panelsData length:",T3000_Data.value.panelsData.length),LogUtil.Debug("= ws: HandleLoggingDataRes END ===================")}HandleLoadGraphicEntryRes(t){var e,i,n,s;if(t.data=JSON.parse(t.data),Array.isArray(null==(e=t.data)?void 0:e.items)){const e=new Set;let n=t.data.items.reduce(((t,e)=>{var i;return Math.max(t,null!=(i=e.id)?i:0)}),0);for(const i of t.data.items)e.has(i.id)?i.id=++n:e.add(i.id);n>(null!=(i=t.data.itemsCount)?i:0)&&(t.data.itemsCount=n)}if(appState.value=t.data,void 0!==appState.value.rulersGridVisible&&(rulersGridVisible.value=appState.value.rulersGridVisible),void 0!==appState.value.locked&&(locked.value=appState.value.locked),grpNav.value.length>1){const e=grpNav.value[grpNav.value.length-2];e.index!==t.entry.index||e.pid!==t.entry.pid?grpNav.value.push(t.entry):grpNav.value.pop()}else grpNav.value.push(t.entry);setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100);const a=null==(n=this.deviceOpt)?void 0:n.getCurrentDevice();a&&(null==(s=this.deviceOpt)||s.refreshGraphicPanelElementCount(a))}HandleOpenEntryEditWindowRes(t){}HandleSaveImageRes(t){library.value.imagesCount++,library.value.images.push({id:"IMG-"+library.value.imagesCount,name:t.data.name,path:t.data.path,online:!1}),IdxUtils.saveLib()}HandleSaveLibraryDataRes(t){}HandleSaveNewLibraryDataRes(t){LogUtil.Debug("= ws: Handle SAVE_NEW_LIBRARY_DATA_RES",t.data)}HandleDeleteImageRes(t){}HandleGetAllDevicesDataRes(t){}HandleDataServerOnline(t){var e;this.GetPanelsList();const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice(),n=null==i?void 0:i.deviceId,s=null==i?void 0:i.graphic;n&&s&&this.GetInitialData(n,s)}initQuasar(t){this.$q=t}handleError(t){var e;if(!t&&!t.error)return;T3Util.Error("= ws: handleError/ messageData:",t);const i=null!=(e=null==t?void 0:t.error)?e:"";t.action===MessageType.GET_PANEL_DATA_RES||t.action===MessageType.GET_INITIAL_DATA_RES||t.action===MessageType.GET_PANELS_LIST_RES?this.handleSpecialMessage(t):""!==i&&T3UIUtil.ShowWebSocketError(i)}showSuccess(t){var e,i,n,s,a;const o=null!=(e=null==t?void 0:t.action)?e:-1,r=null!=(n=null==(i=null==t?void 0:t.data)?void 0:i.status)&&n;LogUtil.Debug("= ws: showSuccess | action:",o,"| status:",r),o==MessageType.LOAD_GRAPHIC_ENTRY_RES&&(null==(s=this.quasarUtil)||s.ShowLOAD_GRAPHIC_ENTRY_RESSuccess()),o==MessageType.GET_INITIAL_DATA_RES&&(null==(a=this.quasarUtil)||a.ShowGET_INITIAL_DATA_RESSuccess())}handleSpecialMessage(t){var e;const i=t.action,n=Date.now();if(n-this.lastErrorTime>6e4&&(this.dataRequestErrorCount=0),this.dataRequestErrorCount++,this.lastErrorTime=n,this.dataRequestErrorCount>this.maxDataRequestErrors){if(LogUtil.Warn(`⚠️ Stopped retrying after ${this.maxDataRequestErrors} consecutive errors for action: ${i}`),LogUtil.Warn(`Error message: ${t.error}`),this.dataRequestErrorCount===this.maxDataRequestErrors+1){const e=`Unable to load panel data after ${this.maxDataRequestErrors} attempts. ${t.error}`;T3UIUtil.ShowWebSocketError(e)}i==MessageType.GET_PANEL_DATA_RES&&0===T3000_Data.value.panelsData.length&&(LogUtil.Info("📦 Loading demo data as fallback after max retries"),this.loadDemoDataFallback())}else{if(i==MessageType.GET_PANEL_DATA_RES||i==MessageType.GET_PANELS_LIST_RES){const e=`Load device data failed with error: "${t.error}". Retry ${this.dataRequestErrorCount}/${this.maxDataRequestErrors}`;if(LogUtil.Warn(e),t.error&&t.error.includes("No cached data")){LogUtil.Info("📦 No cached data available for this panel, dismissing loading and stopping retry"),this.dataRequestErrorCount=0;const t=T3000_Data.value.loadingPanel;if(null!==t&&t<T3000_Data.value.panelsList.length-1){T3000_Data.value.loadingPanel=t+1;const e=T3000_Data.value.panelsList[T3000_Data.value.loadingPanel].panel_number;LogUtil.Info(`📦 Skipping panel with no cached data, loading next panel: ${e}`),this.GetPanelData(e)}else T3000_Data.value.loadingPanel=null,0===T3000_Data.value.panelsData.length&&(LogUtil.Info("📦 No panel data exists, loading demo data as fallback"),this.loadDemoDataFallback());return}this.dataRequestErrorCount===this.maxDataRequestErrors&&T3UIUtil.ShowWebSocketError(e),setTimeout((()=>{this.GetPanelsList()}),5e3)}if(i==MessageType.GET_INITIAL_DATA_RES){const i=`Load initial data failed with error: "${t.error}". Retry ${this.dataRequestErrorCount}/${this.maxDataRequestErrors}`;LogUtil.Warn(i),this.dataRequestErrorCount===this.maxDataRequestErrors&&(T3UIUtil.ShowWebSocketError(i),null==(e=this.quasarUtil)||e.setGlobalMsg("error",i,!1,"get_initial_data",null))}}}reloadInitialData(){this.needRefresh&&(this.reloadInitialDataInterval||(this.reloadInitialDataInterval=setInterval((()=>{var t;const e=null==(t=this.deviceOpt)?void 0:t.getCurrentDevice(),i=null==e?void 0:e.deviceId,n=null==e?void 0:e.graphic;i&&n&&this.GetInitialData(i,n)}),3e4)))}clearInitialDataInterval(){this.reloadInitialDataInterval&&clearInterval(this.reloadInitialDataInterval),this.reloadInitialDataInterval=null,LogUtil.Debug("= ws: clearInitialDataInterval / this.reloadInitialDataInterval ",this.reloadInitialDataInterval)}hasComplexDataStructures(t){if(!t||"object"!=typeof t)return!1;const e=Object.values(t).some((t=>Array.isArray(t))),i=Object.values(t).some((t=>t&&"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0)),n=({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"]}[t.type]||[]).some((e=>void 0!==t[e]));return e||i||n}getDataComplexityInfo(t){if(!t||"object"!=typeof t)return{simple:!0};const e=Object.keys(t).filter((e=>Array.isArray(t[e]))),i=Object.keys(t).filter((e=>t[e]&&"object"==typeof t[e]&&!Array.isArray(t[e])));return{totalFields:Object.keys(t).length,arrays:e.length,arrayFields:e,objects:i.length,objectFields:i,hasComplexity:this.hasComplexDataStructures(t)}}getComplexFields(t){if(!t||"object"!=typeof t)return[];const e=[];Object.keys(t).forEach((i=>{Array.isArray(t[i])&&e.push(i)})),Object.keys(t).forEach((i=>{t[i]&&"object"==typeof t[i]&&!Array.isArray(t[i])&&Object.keys(t[i]).length>0&&e.push(i)}));return({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"],PID:["parameters","settings","config"]}[t.type]||[]).forEach((i=>{void 0===t[i]||e.includes(i)||e.push(i)})),e}identifyRequestOrigin(t){for(const e of t){if(e.includes("IndexPageSocket"))return"TrendLogIndexPageSocket.vue";if(e.includes("IndexPage"))return"IndexPage.vue";if(e.includes("initializeT3000Data"))return"T3000_Data_Initialization";if(e.includes("onMounted"))return"Component_OnMounted_Lifecycle";if(e.includes("setTimeout"))return"Delayed_Timer_Execution";if(e.includes("HandleGetPanelsListRes"))return"Auto_Chain_After_PanelsList_Response";if(e.includes("HandleGetPanelDataRes"))return"Auto_Chain_After_PanelData_Response";if(e.includes("watch"))return"Vue_Reactive_Watcher";if(e.includes("loadTrendLogItemData"))return"Data_Loading_Function";if(e.includes("connect"))return"WebSocket_Connection_Establishment"}return"Unknown_Origin"}categorizeCallSource(t){const e=t.join(" ");return e.includes("initializeT3000Data")?"INITIALIZATION_REQUEST":e.includes("onMounted")?"COMPONENT_MOUNT_REQUEST":e.includes("setTimeout")?"DELAYED_EXECUTION_REQUEST":e.includes("HandleGetPanelsListRes")?"AUTO_CHAIN_AFTER_PANELS_LIST":e.includes("HandleGetPanelDataRes")?"AUTO_CHAIN_AFTER_PANEL_DATA":e.includes("watch")?"REACTIVE_WATCHER_TRIGGER":e.includes("loadTrendLogItemData")?"EXPLICIT_DATA_LOAD_REQUEST":e.includes("retry")||e.includes("Retry")?"USER_RETRY_REQUEST":e.includes("route")?"ROUTE_CHANGE_TRIGGER":e.includes("connect")?"WEBSOCKET_CONNECTION_TRIGGER":"MANUAL_OR_DIRECT_CALL"}getActionDetails(t){return{0:{name:"GET_PANEL_DATA",description:"Request panel data from T3000 backend",category:"Data_Request",implemented:!0,responseAction:"GET_PANEL_DATA_RES"},1:{name:"GET_INITIAL_DATA",description:"Request initial application data and state",category:"Initialization",implemented:!0,responseAction:"GET_INITIAL_DATA_RES"},2:{name:"SAVE_GRAPHIC_DATA",description:"Save graphic/layout data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_GRAPHIC_DATA_RES"},3:{name:"UPDATE_ENTRY",description:"Update a specific entry/field value",category:"Data_Update",implemented:!0,responseAction:"UPDATE_ENTRY_RES"},4:{name:"GET_PANELS_LIST",description:"Request list of available panels",category:"Data_Request",implemented:!0,responseAction:"GET_PANELS_LIST_RES"},5:{name:"GET_PANEL_RANGE_INFO",description:"Request panel range information",category:"Data_Request",implemented:!1,responseAction:"GET_PANEL_RANGE_INFO_RES"},6:{name:"GET_ENTRIES",description:"Request specific entries data",category:"Data_Request",implemented:!0,responseAction:"GET_ENTRIES_RES"},7:{name:"LOAD_GRAPHIC_ENTRY",description:"Load graphic entry for editing",category:"UI_Navigation",implemented:!0,responseAction:"LOAD_GRAPHIC_ENTRY_RES"},8:{name:"OPEN_ENTRY_EDIT_WINDOW",description:"Open entry edit window in T3000",category:"UI_Action",implemented:!0,responseAction:"OPEN_ENTRY_EDIT_WINDOW_RES"},9:{name:"SAVE_IMAGE",description:"Save image file to T3000 library",category:"File_Operation",implemented:!0,responseAction:"SAVE_IMAGE_RES"},10:{name:"SAVE_LIBRARY_DATA",description:"Save library data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_LIBRARY_DATA_RES"},11:{name:"DELETE_IMAGE",description:"Delete image from T3000 library",category:"File_Operation",implemented:!0,responseAction:"DELETE_IMAGE_RES"},12:{name:"GET_SELECTED_DEVICE_INFO",description:"Get information about selected device",category:"Device_Info",implemented:!0,responseAction:"GET_SELECTED_DEVICE_INFO_RES"},13:{name:"BIND_DEVICE",description:"Bind/connect to a device",category:"Device_Operation",implemented:!1,responseAction:"BIND_DEVICE_RES"},14:{name:"SAVE_NEW_LIBRARY_DATA",description:"Save new library data to T3000",category:"Data_Save",implemented:!1,responseAction:"SAVE_NEW_LIBRARY_DATA_RES"}}[t]||{name:"UNKNOWN_ACTION",description:`Unknown action code: ${t}`,category:"Unknown",implemented:!1,responseAction:"UNKNOWN_RES"}}}let panzoomInstance=null,isRestoringPanzoom=!1;class IdxPage{constructor(){__publicField(this,"webview",null==(_b=window.chrome)?void 0:_b.webview),__publicField(this,"zoom"),__publicField(this,"getPanelsInterval"),__publicField(this,"autoSaveInterval"),__publicField(this,"$q"),this.initZoom()}initPage(){Hvac.WebClient.initMessageHandler(),this.initGlobalNav(),this.isLoggedIn(),this.restoreAppState(),this.setDocMarginOffset(),this.initPanzoom(),this.initMessageClient(),this.initScorller(),this.initAutoSaveInterval(),this.initWindowListener(),this.refreshMoveableGuides(),this.resetPanzoom(),this.clearGrpSwitch()}initPage5(){Hvac.WebClient.initMessageHandler(),this.initGlobalNav(),this.isLoggedIn(),this.restoreAppState(),this.setDocMarginOffset(),this.initMessageClient(),this.initAutoSaveInterval(),this.initWindowListener5(),this.refreshMoveableGuides(),Hvac.UI.Initialize()}initQuasar(t){this.$q=t,Hvac.WebClient.initQuasar(this.$q),Hvac.QuasarUtil.initQuasar(this.$q)}zoomAction(t="in",e=null){"out"===t?this.zoom.value-=10:"set"===t?this.zoom.value=e:this.zoom.value+=10,LogUtil.Debug("= Idx zoomAction",this.zoom.value)}initWindowListener(){window.addEventListener("beforeunload",(function(t){Hvac.IdxPage.clearAutoSaveInterval(),Hvac.WsClient.clearInitialDataInterval()})),window.addEventListener("resize",(()=>{IdxPage.restDocumentAreaPosition(null)}))}initWindowListener5(){window.addEventListener("beforeunload",(function(t){Hvac.IdxPage.clearAutoSaveInterval(),Hvac.WsClient.clearInitialDataInterval()})),window.addEventListener("resize",(()=>{}))}initGlobalNav(){globalNav.value.title="HVAC Drawer",globalNav.value.back=null,globalNav.value.home="/"}restoreAppState(){var t;if(null==(t=this.webview)?void 0:t.postMessage)return;const e=Hvac.LsOpt.loadParsedAppStateLS();e&&(DataOpt.repairDuplicateIds(e),appState.value=e,rulersGridVisible.value=appState.value.rulersGridVisible)}setDocMarginOffset(){this.webview?(isBuiltInEdge.value=!0,documentAreaPosition.value.widthOffset="128px",documentAreaPosition.value.heightOffset="68px",viewportMargins.top=56):(isBuiltInEdge.value=!1,viewportMargins.top=117)}initPanzoom(){const t={maxZoom:4,minZoom:.1,zoomDoubleClickSpeed:1,filterKey:function(){return!0},beforeMouseDown:function(t){return!!locked.value||!t.altKey},beforeWheel:function(t){return!!locked.value}};panzoomInstance=panzoom(viewport.value,t),panzoomInstance.on("transform",(function(t){appState.value.viewportTransform=t.getTransform(),triggerRef(appState),IdxPage.restDocumentAreaPosition(t.getTransform()),isRestoringPanzoom||Hvac.QuasarUtil.setLocalSettings("transform",t.getTransform())}))}resetPanzoom(){var t,e,i,n;let s=appState.value.viewportTransform;if((!s||0===s.x&&0===s.y&&1===s.scale)&&(s=Hvac.QuasarUtil.getLocalSettings("transform")),s&&appState.value.items&&appState.value.items.length>0){const i=appState.value.items,n=(null==(t=viewport.value)?void 0:t.clientWidth)||800,a=(null==(e=viewport.value)?void 0:e.clientHeight)||600,o=-s.x/s.scale,r=o+n/s.scale,l=-s.y/s.scale,h=l+a/s.scale;i.some((t=>{const e=t.translate[0],i=t.translate[1],n=t.width||100,s=t.height||100;return!(e+n<o||e>r||i+s<l||i>h)}))||(LogUtil.Warn("⚠️ Saved viewport position shows NO items - will auto-center"),s=null)}if(!s&&appState.value.items&&appState.value.items.length>0){const t=appState.value.items,e=t.map((t=>t.translate[0])),a=t.map((t=>t.translate[1])),o=(Math.min(...e)+Math.max(...e))/2,r=(Math.min(...a)+Math.max(...a))/2;s={x:((null==(i=viewport.value)?void 0:i.clientWidth)||800)/2-o,y:((null==(n=viewport.value)?void 0:n.clientHeight)||600)/2-r,scale:.7},LogUtil.Debug("🎯 Auto-centering viewport on items:",s)}s&&panzoomInstance&&(isRestoringPanzoom=!0,panzoomInstance.zoomAbs(s.x,s.y,s.scale),panzoomInstance.moveTo(s.x,s.y),setTimeout((()=>{isRestoringPanzoom=!1}),100))}clearGrpSwitch(){DataOpt.ClearGrpSwitch()}initZoom(){this.zoom=computed({get:()=>parseInt(100*appState.value.viewportTransform.scale+""),set(t){if(!t)return;const e=t/100,i=appState.value.viewportTransform.x,n=appState.value.viewportTransform.y;appState.value.viewportTransform.scale=e,panzoomInstance&&panzoomInstance.zoomAbs(i,n,e)}})}static restDocumentAreaPosition(t){const e=document.querySelector(".full-area");e&&(documentAreaPosition.value.workAreaPadding=locked.value?"0px":"110px",documentAreaPosition.value.hRulerWOffset=locked.value?"24px":"128px",documentAreaPosition.value.wpwWOffset=locked.value?"24px":"128px",documentAreaPosition.value.wpWOffset=locked.value?"26px":"136px",documentAreaPosition.value.hRuler={width:e.clientWidth,height:20},documentAreaPosition.value.vRuler={width:20,height:e.clientHeight},documentAreaPosition.value.hvGrid={width:e.clientWidth,height:e.clientHeight},documentAreaPosition.value.wiewPortWH={width:"calc(100vw - v-bind('documentAreaPosition.wpWOffset'))",height:"calc(100vh - 93px)"},documentAreaPosition.value.widthOffset=locked.value?"24px":"128px",isBuiltInEdge.value?documentAreaPosition.value.heightOffset=(locked.value,"68px"):documentAreaPosition.value.heightOffset=(locked.value,"115px"))}refreshMoveableGuides(){setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100)}handleScroll(t){documentAreaPosition.value.vRuler.height+=t.target.scrollTop,documentAreaPosition.value.hRuler.width+=t.target.scrollLeft,document.querySelector(".v-ruler").scroll(0,t.target.scrollTop),document.querySelector(".h-ruler").scroll(t.target.scrollLeft,0)}initScorller(){const t=document.querySelector(".viewport-wrapper");t.addEventListener("scroll",this.handleScroll),documentAreaPosition.value.hRuler={width:t.clientWidth,height:20},documentAreaPosition.value.vRuler={width:20,height:t.clientHeight},documentAreaPosition.value.hvGrid={width:t.clientWidth,height:t.clientHeight}}initFetchPanelEntryInterval(){var t;(null==(t=this.webview)?void 0:t.postMessage)&&(this.getPanelsInterval=setInterval((()=>{Hvac.WebClient.GetPanelsList()}),1e4),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(t.length<=0)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac.WebClient.GetEntries(null,null==e?void 0:e.index,e)}),1e4))}initMessageClient(){if(isBuiltInEdge.value)return Hvac.WebClient.GetInitialData(),Hvac.WebClient.GetPanelsList(),void this.initFetchPanelEntryInterval();isBuiltInEdge.value||this.initExternalBrowserOpt()}initExternalBrowserOpt(){isBuiltInEdge.value||(Hvac.WsClient.initQuasar(this.$q),Hvac.WsClient.connect(),setTimeout((()=>{const t=Hvac.DeviceOpt.getCurrentDevice();t?(deviceModel.value.active=!1,deviceModel.value.data=t,Hvac.WsClient.GetInitialData(t.deviceId,t.graphic,!0)):deviceModel.value.active=!0}),1e3),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(0===t.length)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac.WsClient.GetEntries(e)}),1e4))}clearGetPanelsInterval(){this.getPanelsInterval&&clearInterval(this.getPanelsInterval)}clearIdx(){appState.value.selectedTargets=[],panzoomInstance&&(panzoomInstance.dispose(),panzoomInstance=null)}isLoggedIn(){this.$q.cookies.has("token")?(liveApi.get("hvacTools").then((async t=>{const e=await t.json();e.length>0&&(null==e||e.forEach((t=>{this.addOnlineLibImage(t)})))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("hvacObjectLibs").then((async t=>{const e=await t.json();e.length>0&&e.forEach((t=>{library.value.objLib.push({id:t.id,label:t.label,items:t.items,online:!0})}))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("me").then((async t=>{user.value=await t.json()})).catch((t=>{}))):user.value=null}T3UpdateEntryField(t,e){if(!e.t3Entry)return;let i=e.t3Entry[t];const n=i;Math.abs(i)>=1e3&&(i/=1e3),"value"!==t&&"control"!==t||IdxUtils.refreshObjectStatus(e);const s={action:3,field:t,value:i,panelId:e.t3Entry.pid,entryIndex:e.t3Entry.index,entryType:T3_Types[e.t3Entry.type]};isBuiltInEdge.value?Hvac.WebClient.UpdateEntry(s):Hvac.WsClient.UpdateEntry(s),LogUtil.Debug("= Idx T3UpdateEntryField to T3 before, after",n,i)}newProject(){var t;if(isBuiltInEdge.value)appState.value=lodash.exports.cloneDeep(emptyProject),undoHistory.value=[],redoHistory.value=[],this.refreshMoveable(),(null==(t=this.webview)?void 0:t.postMessage)||localStorage.removeItem("appState");else{appState.value=lodash.exports.cloneDeep(emptyProject),undoHistory.value=[],redoHistory.value=[],this.refreshMoveable(),localStorage.setItem("appState",JSON.stringify(appState.value));const t=Hvac.DeviceOpt.getCurrentDevice(),e=Hvac.LsOpt.loadDeviceAppStateLS();if(t){const i=e.find((e=>e.device.device===t.device&&e.device.graphic===t.graphic));i&&(i.appState=lodash.exports.cloneDeep(emptyProject),localStorage.setItem("deviceAppState",JSON.stringify(e)))}localStorage.setItem("tempAppState",JSON.stringify(appState.value)),t.graphicFull.elementCount=0,localStorage.setItem("currentDevice",JSON.stringify(t))}}refreshMoveable(){setTimeout((()=>{moveable.value.updateRect()}),1)}save(t=!1,e=!1,i=!1){savedNotify.value=t,this.saveToLocal(),e&&this.saveToT3000(i)}prepareSaveData(){const t=lodash.exports.cloneDeep(toRaw(appState.value));return t.itemsCount=t.items.length>0?Math.max(...t.items.map((t=>{var e;return null!=(e=t.id)?e:0}))):0,t.selectedTargets=[],t.elementGuidelines=[],t.rulersGridVisible=rulersGridVisible.value,t.locked=locked.value,t}saveToLocal(){const t=this.prepareSaveData();if(Hvac.LsOpt.saveAppState(t),!isBuiltInEdge.value){DataOpt.LoadGrpSwitch()||Hvac.DeviceOpt.saveDeviceAppState(deviceAppState,deviceModel,t)}}saveToT3000(t=!1){const e=this.prepareSaveData(),i=DataOpt.LoadGrpSwitch();LogUtil.Debug("= Idx saveToT3000 called:",{isAutoSave:t,hasGrpSwitch:!!i});const n=globalMsg.value.find((t=>"get_initial_data"===t.msgType)),s=globalMsg.value.find((t=>"load_graphic_entry"===t.msgType));if(n||s)LogUtil.Debug("= Idx save to T3000 - currently loading data, skip save to prevent race condition");else if(i)t?LogUtil.Debug("= Idx saveToT3000 - auto-save skipped during GRP navigation"):LogUtil.Debug("= Idx saveToT3000 - manual save skipped during GRP navigation to prevent race condition");else if(isBuiltInEdge.value)LogUtil.Debug("= Idx saveToT3000 using current device (null params)"),Hvac.WebClient.SaveGraphicData(null,null,e);else{const t=Hvac.DeviceOpt.getCurrentDevice();let i=null==t?void 0:t.deviceId,n=null==t?void 0:t.graphic;LogUtil.Debug("= Idx saveToT3000 using currentDevice:",{panelId:i,graphicId:n}),i&&n?Hvac.WsClient.SaveGraphic(i,n,e):LogUtil.Debug("= Idx save to T3000 current device is null")}}initAutoSaveInterval(){setTimeout((()=>{this.autoSaveInterval=setInterval((()=>{LogUtil.Debug("= Idx auto save every 30s",(new Date).toLocaleString()),this.save(!0,!0,!0)}),15e3)}),1e4)}clearAutoSaveInterval(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}addOnlineLibImage(t){const e=library.value.images.findIndex((e=>e.id==="IMG-"+t.id));-1!==e&&library.value.images.splice(e,1),library.value.images.push({id:"IMG-"+t.id,dbId:t.id,name:t.name,path:{}.API_URL+"/file/"+t.file.path,online:!0})}}class WebViewClient{constructor(){__publicField(this,"webview",null==(_c=window.chrome)?void 0:_c.webview),__publicField(this,"message"),__publicField(this,"messageData"),__publicField(this,"$q"),__publicField(this,"deviceOpt"),__publicField(this,"idxPage"),__publicField(this,"idxUtils"),__publicField(this,"messageHandlers",{[MessageType.GET_PANEL_DATA_RES]:this.HandleGetPanelDataRes.bind(this),[MessageType.GET_INITIAL_DATA_RES]:this.HandleGetInitialDataRes.bind(this),[MessageType.SAVE_GRAPHIC_DATA_RES]:this.HandleSaveGraphicDataRes.bind(this),[MessageType.UPDATE_ENTRY_RES]:this.HandleUpdateEntryRes.bind(this),[MessageType.GET_PANELS_LIST_RES]:this.HandleGetPanelsListRes.bind(this),[MessageType.GET_ENTRIES_RES]:this.HandleGetEntriesRes.bind(this),[MessageType.LOAD_GRAPHIC_ENTRY_RES]:this.HandleLoadGraphicEntryRes.bind(this),[MessageType.OPEN_ENTRY_EDIT_WINDOW_RES]:this.HandleOpenEntryEditWindowRes.bind(this),[MessageType.SAVE_IMAGE_RES]:this.HandleSaveImageRes.bind(this),[MessageType.SAVE_LIBRARY_DATA_RES]:this.HandleSaveLibraryDataRes.bind(this),[MessageType.SAVE_NEW_LIBRARY_DATA_RES]:this.HandleSaveNewLibraryDataRes.bind(this),[MessageType.DELETE_IMAGE_RES]:this.HandleDeleteImageRes.bind(this)}),this.message={}}setDependencies(t,e,i){this.deviceOpt=t,this.idxPage=e,this.idxUtils=i}initMessageHandler(){this.webview&&this.webview.addEventListener("message",this.handleMessage.bind(this))}initQuasar(t){this.$q=t}sendMessage(t){if(!this.webview)return void LogUtil.Debug("= Wv2 window.chrome.webview is not available");const e=this.getActionDetails(null==t?void 0:t.action),i=new Date,n=`${i.toLocaleTimeString()}.${i.getMilliseconds().toString().padStart(3,"0")}`;this.webview.postMessage(t),LogUtil.Debug(`= Wv2 Sent message to T3 [${n}], action= ${e.name} | ${null==t?void 0:t.action}, message=`,t)}handleMessage(t){var e;const i=null!=(e=null==t?void 0:t.data)?e:{},n=new Date,s=`${n.toLocaleTimeString()}.${n.getMilliseconds().toString().padStart(3,"0")}`,a=this.getActionDetails(null==i?void 0:i.action);LogUtil.Debug(`= Wv2 Received message from T3 [${s}], action= ${null==i?void 0:i.action} | ${"UNKNOWN_ACTION"==a.name?-1:a.name}, message=`,i);try{this.processMessageData(i)}catch(o){T3Util.Error("= wv2: handleMessage failed to parse | process data:",o)}}FormatMessageData(t,e,i,n){this.setMessageData(t,e,i,n),this.messageData=this.message}FormatUpdateEntryData(t){this.message={},this.message.action=MessageType.UPDATE_ENTRY,this.message.field=t.field,this.message.value=t.value,this.message.panelId=t.panelId,this.message.entryIndex=t.entryIndex,this.message.entryType=t.entryType,this.message.viewitem=t.entryIndex,this.messageData=this.message}FormatSaveImageData(t){this.message={},this.message.action=MessageType.SAVE_IMAGE,this.message.filename=t.filename,this.message.fileLength=t.fileLength,this.message.fileData=t.fileData,this.message.viewitem=t.entryIndex,this.messageData=this.message}FormatLoadGraphicEntryData(t){this.message={},this.message.action=MessageType.LOAD_GRAPHIC_ENTRY,this.message.panelId=t.panelId,this.message.entryIndex=t.entryIndex,this.message.viewitem=t.entryIndex,this.messageData=this.message}FormatOpenEntryEditWindowData(t){this.message={},this.message.action=MessageType.OPEN_ENTRY_EDIT_WINDOW,this.message.panelId=t.panelId,this.message.entryType=t.entryType,this.message.entryIndex=t.entryIndex,this.messageData=this.message}setMessageData(t,e,i,n){var s,a,o;this.message={};let r=null;if(this.deviceOpt&&"function"==typeof this.deviceOpt.getSerialNumber)try{r=this.deviceOpt.getSerialNumber(e)}catch(l){}if(!r){const t=new URLSearchParams(window.location.search).get("sn");t&&(r=parseInt(t,10),isNaN(r)&&(r=t))}if(!r&&e&&void 0!==T3000_Data&&(null==(s=T3000_Data.value)?void 0:s.panelsList)){const t=T3000_Data.value.panelsList.find((t=>t.panel_number===e));t&&t.serial_number&&(r=t.serial_number)}null!=t&&(this.message.action=t),null!=e&&(this.message.panelId=e),null!=i&&(this.message.viewitem=i-1,this.message.viewitem<0&&(this.message.viewitem=-1)),null!=n&&void 0!==n&&(this.message.data=n),this.message.msgId=Utils1.GenerateUUID();null!=e&&null!=r?(this.message.serialNumber=r,LogUtil.Debug("= Wv2 SetMessageData - Serial number resolved:",{panelId:e,serialNumber:r,method:this.deviceOpt?"deviceOpt":new URLSearchParams(window.location.search).get("sn")?"URL_param":"panels_list",action:t})):null!=e&&LogUtil.Warn("= Wv2 SetMessageData - No serial number found for panelId:",e,{hasDeviceOpt:!!this.deviceOpt,urlSn:new URLSearchParams(window.location.search).get("sn"),panelsListLength:void 0!==T3000_Data?(null==(o=null==(a=T3000_Data.value)?void 0:a.panelsList)?void 0:o.length)||0:"N/A"})}GetInitialData(t,e,i){this.FormatMessageData(MessageType.GET_INITIAL_DATA,t,e,i),this.sendMessage(this.messageData)}GetPanelsList(t,e,i){this.FormatMessageData(MessageType.GET_PANELS_LIST,t,e,i),this.sendMessage(this.messageData)}GetPanelData(t,e,i){this.FormatMessageData(MessageType.GET_PANEL_DATA,t,e,i),this.sendMessage(this.messageData)}GetEntries(t,e,i){this.FormatMessageData(MessageType.GET_ENTRIES,t,e,i),this.sendMessage(this.messageData)}SaveLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}SaveNewLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_NEW_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}SaveGraphicData(t,e,i){this.FormatMessageData(MessageType.SAVE_GRAPHIC_DATA,t,e,i),this.sendMessage(this.messageData)}UpdateEntry(t){this.FormatUpdateEntryData(t),this.sendMessage(this.messageData)}SaveImage(t){this.FormatSaveImageData(t),this.sendMessage(this.messageData)}LoadGraphicEntry(t){this.FormatLoadGraphicEntryData(t),this.sendMessage(this.messageData)}OpenEntryEditWindow(t){this.FormatOpenEntryEditWindowData(t),this.sendMessage(this.messageData)}DeleteImage(t){this.FormatMessageData(MessageType.DELETE_IMAGE,null,null,t),this.sendMessage(this.messageData)}processMessageData(t){if(void 0!==t.error||!1===(null==t?void 0:t.status))return void this.handleError(t);const e=this.messageHandlers[t.action];e?e(t):LogUtil.Warn("No handler for message action:",t.action,t)}handleError(t){var e;if(!t||!t.error&&!1!==t.status)return;T3Util.Error("= wv2: handleError/ messageData:",t);const i=null!=(e=null==t?void 0:t.error)?e:"Unknown error",n=t.action;n===MessageType.GET_PANEL_DATA_RES||n===MessageType.GET_INITIAL_DATA_RES||n===MessageType.GET_PANELS_LIST_RES?this.handleSpecialMessage(t):""!==i&&T3Util.Error("WebView message error:",i)}handleSpecialMessage(t){const e=t.action;if(e===MessageType.GET_PANEL_DATA_RES||e===MessageType.GET_PANELS_LIST_RES){if(t.error&&t.error.includes("No cached data")){LogUtil.Info("📦 No cached data available for this panel, skipping to next panel");if(null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel<T3000_Data.value.panelsList.length-1){T3000_Data.value.loadingPanel++;const t=T3000_Data.value.loadingPanel,e=T3000_Data.value.panelsList[t].panel_number;LogUtil.Info("📦 Skipping panel, loading next panel at index:",t,"panel_number:",e),this.GetPanelData(e)}else T3000_Data.value.loadingPanel=null;return void(0===T3000_Data.value.panelsData.length&&(LogUtil.Info("📦 No panel data exists, loading demo data as fallback"),this.loadDemoDataFallback()))}const e=`Load device data failed with error: "${t.error}". Please check whether the T3000 application is running.`;LogUtil.Warn(e),T3Util.Error(e)}if(e===MessageType.GET_INITIAL_DATA_RES){const e=`Load initial data failed with error: "${t.error}". Please try not to update the graphic area, this may cause data loss.`;LogUtil.Warn(e),T3Util.Error(e)}}async loadDemoDataFallback(){try{LogUtil.Info("📦 Loading demo device data as fallback");const{demoDeviceData:t}=await __vitePreload((()=>import("./common.0a9f0488.js")),["assets/common.0a9f0488.js","assets/index.3938ccd1.js","assets/index.fbd60cd5.css"]),e=await t();e&&e.data?(T3000_Data.value.panelsData=e.data,selectPanelOptions.value=e.data,e.ranges&&(T3000_Data.value.panelsRanges=e.ranges),LogUtil.Info(`✅ Demo data loaded successfully: ${e.data.length} panels`)):LogUtil.Warn("⚠️ Demo data load returned empty or invalid data")}catch(t){LogUtil.Error("❌ Failed to load demo data:",t)}}HandleGetPanelDataRes(t){if((null==t?void 0:t.panel_id)&&((null==t?void 0:t.panel_id)&&this.idxPage.clearGetPanelsInterval(),null==t?void 0:t.panel_id)){if(null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel<T3000_Data.value.panelsList.length-1){T3000_Data.value.loadingPanel++;const t=T3000_Data.value.loadingPanel,e=T3000_Data.value.panelsList[t].panel_number;this.GetPanelData(e)}null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel===T3000_Data.value.panelsList.length-1&&(T3000_Data.value.loadingPanel=null),T3000_Data.value.panelsData=T3000_Data.value.panelsData.filter((e=>e.pid!==t.panel_id)),T3000_Data.value.panelsData=T3000_Data.value.panelsData.concat(t.data),T3000_Data.value.panelsData.sort(((t,e)=>t.pid-e.pid)),selectPanelOptions.value=T3000_Data.value.panelsData,T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.filter((e=>e.pid!==t.panel_id)),T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.concat(t.ranges);const e={};T3000_Data.value.panelsData.forEach((t=>{e[t.pid]=(e[t.pid]||0)+1})),this.idxUtils.refreshLinkedEntries(t.data),this.idxUtils.refreshLinkedEntries2(t.data)}}HandleGetInitialDataRes(t){var e,i;if(t.data=JSON.parse(t.data),Array.isArray(null==(e=t.data)?void 0:e.items)){const e=new Set;let n=t.data.items.reduce(((t,e)=>{var i;return Math.max(t,null!=(i=e.id)?i:0)}),0);for(const i of t.data.items)e.has(i.id)?i.id=++n:e.add(i.id);n>(null!=(i=t.data.itemsCount)?i:0)&&(t.data.itemsCount=n)}appState.value=t.data,rulersGridVisible.value=appState.value.rulersGridVisible,void 0!==appState.value.locked&&(locked.value=appState.value.locked),grpNav.value=[t.entry],t.library&&(t.library=JSON.parse(t.library),library.value=t.library),setTimeout((()=>{this.idxUtils.refreshMoveableGuides()}),100)}HandleSaveGraphicDataRes(t){this.idxUtils.saveGraphicData(t,this.$q)}HandleUpdateEntryRes(t){}HandleGetPanelsListRes(t){var e;(null==(e=t.data)?void 0:e.length)&&(T3000_Data.value.panelsList=t.data,T3000_Data.value.loadingPanel=0,this.GetPanelData(T3000_Data.value.panelsList[0].panel_number))}HandleGetEntriesRes(t){LogUtil.Debug("= Wv2 Received message from T3 [HandleGetEntriesRes], msgData=",t),t.data&&t.data.length,t.data.forEach(((t,e)=>{const i=T3000_Data.value.panelsData.findIndex((e=>e.index===t.index&&e.type===t.type&&e.pid===t.pid));if(-1!==i){const e=T3000_Data.value.panelsData[i],n="MON"===e.type&&(Array.isArray(e.input)||Array.isArray(e.range)||e.num_inputs>0),s="MON"===t.type&&!Array.isArray(t.input)&&!Array.isArray(t.range)&&!t.num_inputs,a=this.hasComplexDataStructures(e),o=!this.hasComplexDataStructures(t),r=a&&o;if(n&&s){const i=["input","range","num_inputs","an_inputs"],n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else if(r){const i=this.getComplexFields(e),n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else T3000_Data.value.panelsData[i]=t}})),linkT3EntryDialog.value.active||(selectPanelOptions.value=T3000_Data.value.panelsData),this.idxUtils.refreshLinkedEntries(t.data),this.idxUtils.refreshLinkedEntries2(t.data)}HandleLoadGraphicEntryRes(t){var e,i,n,s;if(t.data=JSON.parse(t.data),Array.isArray(null==(e=t.data)?void 0:e.items)){const e=new Set;let n=t.data.items.reduce(((t,e)=>{var i;return Math.max(t,null!=(i=e.id)?i:0)}),0);for(const i of t.data.items)e.has(i.id)?i.id=++n:e.add(i.id);n>(null!=(i=t.data.itemsCount)?i:0)&&(t.data.itemsCount=n)}if(appState.value=t.data,grpNav.value.length>1){const e=grpNav.value[grpNav.value.length-2];e.index!==t.entry.index||e.pid!==t.entry.pid?grpNav.value.push(t.entry):grpNav.value.pop()}else grpNav.value.push(t.entry);setTimeout((()=>{this.idxUtils.refreshMoveableGuides()}),100);const a=null==(n=this.deviceOpt)?void 0:n.getCurrentDevice();a&&(null==(s=this.deviceOpt)||s.refreshGraphicPanelElementCount(a))}HandleOpenEntryEditWindowRes(t){}HandleSaveImageRes(t){library.value.imagesCount++,library.value.images.push({id:"IMG-"+library.value.imagesCount,name:t.data.name,path:t.data.path,online:!1}),this.idxUtils.saveLib()}HandleSaveLibraryDataRes(t){}HandleSaveNewLibraryDataRes(t){LogUtil.Debug("= Wv2 Handle SAVE_NEW_LIBRARY_DATA_RES:",t)}HandleDeleteImageRes(t){}HandleGetAllDevicesDataRes(t){}hasComplexDataStructures(t){if(!t||"object"!=typeof t)return!1;const e=Object.values(t).some((t=>Array.isArray(t))),i=Object.values(t).some((t=>t&&"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0)),n=({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"]}[t.type]||[]).some((e=>void 0!==t[e]));return e||i||n}getDataComplexityInfo(t){if(!t||"object"!=typeof t)return{simple:!0};const e=Object.keys(t).filter((e=>Array.isArray(t[e]))),i=Object.keys(t).filter((e=>t[e]&&"object"==typeof t[e]&&!Array.isArray(t[e])));return{totalFields:Object.keys(t).length,arrays:e.length,arrayFields:e,objects:i.length,objectFields:i,hasComplexity:this.hasComplexDataStructures(t)}}getComplexFields(t){if(!t||"object"!=typeof t)return[];const e=[];Object.keys(t).forEach((i=>{Array.isArray(t[i])&&e.push(i)})),Object.keys(t).forEach((i=>{t[i]&&"object"==typeof t[i]&&!Array.isArray(t[i])&&Object.keys(t[i]).length>0&&e.push(i)}));return({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"],PID:["parameters","settings","config"]}[t.type]||[]).forEach((i=>{void 0===t[i]||e.includes(i)||e.push(i)})),e}getActionDetails(t){return{0:{name:"GET_PANEL_DATA",description:"Request panel data from T3000 backend",category:"Data_Request",implemented:!0,responseAction:"GET_PANEL_DATA_RES"},1:{name:"GET_INITIAL_DATA",description:"Request initial application data and state",category:"Initialization",implemented:!0,responseAction:"GET_INITIAL_DATA_RES"},2:{name:"SAVE_GRAPHIC_DATA",description:"Save graphic/layout data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_GRAPHIC_DATA_RES"},3:{name:"UPDATE_ENTRY",description:"Update a specific entry/field value",category:"Data_Update",implemented:!0,responseAction:"UPDATE_ENTRY_RES"},4:{name:"GET_PANELS_LIST",description:"Request list of available panels",category:"Data_Request",implemented:!0,responseAction:"GET_PANELS_LIST_RES"},5:{name:"GET_PANEL_RANGE_INFO",description:"Request panel range information",category:"Data_Request",implemented:!1,responseAction:"GET_PANEL_RANGE_INFO_RES"},6:{name:"GET_ENTRIES",description:"Request specific entries data",category:"Data_Request",implemented:!0,responseAction:"GET_ENTRIES_RES"},7:{name:"LOAD_GRAPHIC_ENTRY",description:"Load graphic entry for editing",category:"UI_Navigation",implemented:!0,responseAction:"LOAD_GRAPHIC_ENTRY_RES"},8:{name:"OPEN_ENTRY_EDIT_WINDOW",description:"Open entry edit window in T3000",category:"UI_Action",implemented:!0,responseAction:"OPEN_ENTRY_EDIT_WINDOW_RES"},9:{name:"SAVE_IMAGE",description:"Save image file to T3000 library",category:"File_Operation",implemented:!0,responseAction:"SAVE_IMAGE_RES"},10:{name:"SAVE_LIBRARY_DATA",description:"Save library data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_LIBRARY_DATA_RES"},11:{name:"DELETE_IMAGE",description:"Delete image from T3000 library",category:"File_Operation",implemented:!0,responseAction:"DELETE_IMAGE_RES"},12:{name:"GET_SELECTED_DEVICE_INFO",description:"Get information about selected device",category:"Device_Info",implemented:!0,responseAction:"GET_SELECTED_DEVICE_INFO_RES"},13:{name:"BIND_DEVICE",description:"Bind/connect to a device",category:"Device_Operation",implemented:!1,responseAction:"BIND_DEVICE_RES"},14:{name:"SAVE_NEW_LIBRARY_DATA",description:"Save new library data to T3000",category:"Data_Save",implemented:!1,responseAction:"SAVE_NEW_LIBRARY_DATA_RES"}}[t]||{name:"UNKNOWN_ACTION",description:`Unknown action code: ${t}`,category:"Unknown",implemented:!1,responseAction:"UNKNOWN_RES"}}}const Hvac={PageMain:new PageMain,UI:null,KiOpt:new KeyInsertOpt,QuasarUtil:new QuasarUtil,LsOpt:new LsOpt,DeviceOpt:new DeviceOpt,WsClient:new WebSocketClient,IdxPage:new IdxPage,WebClient:null,IdxUtils:IdxUtils,IdxPage2:new IdxPage2};Hvac.WsClient.setDependencies(Hvac.DeviceOpt,Hvac.IdxPage,Hvac.QuasarUtil),Hvac.UI=new T3Opt,Hvac.WebClient=new WebViewClient,Hvac.IdxUtils.setDependencies(Hvac.WebClient,Hvac.DeviceOpt,Hvac.WsClient),Hvac.WebClient.setDependencies(Hvac.DeviceOpt,Hvac.IdxPage,Hvac.IdxUtils);export{camelize as A,getDist$2 as B,between as C,DragScroll$1 as D,EVENTS as E,DataOpt as F,Gesto as G,Hvac as H,insertT3EntryDialog as I,IdxPage as J,getElementInfo$1 as K,getOverlapSize$1 as L,METHODS as M,EvtOpt as N,ObjectType as O,PROPERTIES as P,T3Constant as Q,LockOutlined$1 as R,SelectUtil as S,T3UIUtil as T,UnlockOutlined$1 as U,NvConstant as V,RulerUtil as W,QuasarUtil as X,switchIcons as Y,AntdUtil as Z,Moveable as a,getDistElementMatrix as b,createMatrix as c,isObject as d,isString as e,getDocument as f,getWindow as g,calculateMatrixDist as h,isUndefined as i,isNode as j,diff as k,fitPoints as l,isFunction as m,addEvent as n,isArray as o,getOverlapPoints as p,EventEmitter$1 as q,removeEvent as r,styled$1 as s,hasClass as t,addClass as u,calculateBoundSize as v,splitUnit as w,isInside as x,getAreaSize as y,Properties as z};
