(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"0078":function(e,t,n){"use strict";n.r(t);var i=n("5b62"),o=n("ac1d"),r=n("6bc7"),a=n("bf95"),s=n("085e"),l=n("b9af"),u=n("4401"),c=n("70cd"),d=n("0da6"),h=n("af8d"),p=n("a470"),f=n("0d5c"),m=n("6f1d"),g="dx-slideout",v="dx-slideout-item-container",_="dx-slideout-menu",y="dx-slideout-item",b="dxSlideoutItemData",C=d["a"].inherit({ctor:function(e,t){this.callBase(e,t),this._logDeprecatedComponentWarning("20.1","dxDrawer")},_getDefaultOptions:function(){return Object(l["a"])(this.callBase(),{activeStateEnabled:!1,menuItemTemplate:"menuItem",swipeEnabled:!0,menuVisible:!1,menuPosition:"normal",menuGrouped:!1,menuGroupTemplate:"menuGroup",onMenuItemRendered:null,onMenuGroupRendered:null,contentTemplate:"content",selectionMode:"single",selectedIndex:0,selectionRequired:!0})},_itemClass:function(){return y},_itemDataKey:function(){return b},_itemContainer:function(){return Object(i["a"])(this._slideOutView.content())},_init:function(){this._selectedItemContentRendered=!1,this.callBase(),this.$element().addClass(g),this._initSlideOutView()},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({menuItem:new p["a"]("item"),menuGroup:new p["a"]("group"),content:new f["a"]})},_initEditStrategy:function(){if(this.option("menuGrouped")){var e=u["a"].inherit({_getPlainItems:function(){return this.callBase().reduce((e,t)=>(e.push.apply(e,t.items),e),[])}});this._editStrategy=new e(this)}else this.callBase()},_initSlideOutView:function(){this._slideOutView=this._createComponent(this.$element(),c["default"],{integrationOptions:{},menuVisible:this.option("menuVisible"),swipeEnabled:this.option("swipeEnabled"),menuPosition:this.option("menuPosition"),onOptionChanged:this._slideOutViewOptionChanged.bind(this)}),this._itemContainer().addClass(v)},_slideOutViewOptionChanged:function(e){"menuVisible"===e.name&&this.option(e.name,e.value)},_initMarkup:function(){this._renderList(),this._renderContentTemplate(),this.callBase()},_render:function(){this._slideOutView._renderShield(),this.callBase()},_renderList:function(){var e=this._list&&this._list.$element()||Object(i["a"])("
").addClass(_).appendTo(Object(i["a"])(this._slideOutView.menuContent()));this._renderItemClickAction(),this._list=this._createComponent(e,h["a"],{itemTemplateProperty:"menuTemplate",selectionMode:this.option("selectionMode"),selectionRequired:this.option("selectionRequired"),indicateLoading:!1,onItemClick:this._listItemClickHandler.bind(this),items:this.option("items"),dataSource:this._dataSource,itemTemplate:this._getTemplateByOption("menuItemTemplate"),grouped:this.option("menuGrouped"),groupTemplate:this._getTemplateByOption("menuGroupTemplate"),onItemRendered:this.option("onMenuItemRendered"),onGroupRendered:this.option("onMenuGroupRendered"),onContentReady:this._updateSlideOutView.bind(this)}),this._list.option("selectedIndex",this.option("selectedIndex"))},_getGroupedOption:function(){return this.option("menuGrouped")},_updateSlideOutView:function(){this._slideOutView._dimensionChanged()},_renderItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_listItemClickHandler:function(e){var t=this._list.$element().find(".dx-list-item").index(e.itemElement);this.option("selectedIndex",t),this._itemClickAction(e)},_renderContentTemplate:function(){if(!Object(a["d"])(this._singleContent)){var e=this._itemContainer().html().length;this._getTemplateByOption("contentTemplate").render({container:Object(o["a"])(this._itemContainer())}),this._singleContent=this._itemContainer().html().length!==e}},_itemClickHandler:r["n"],_renderContentImpl:function(){if(!this._singleContent){var e=this.option("items"),t=this.option("selectedIndex");if(e.length&&t>-1){this._selectedItemContentRendered=!0;var n=this._list.getItemByIndex(t);this._renderItems([n])}}},_renderItem:function(e,t){this._itemContainer().find("."+y).remove(),this.callBase(e,t)},_selectedItemElement:function(){return this._itemElements().eq(0)},_updateSelection:function(){this._prepareContent(),this._renderContent()},_getListWidth:function(){return this._slideOutView._getMenuWidth()},_changeMenuOption:function(e,t){this._list.option(e,t),this._updateSlideOutView()},_cleanItemContainer:function(){this._singleContent||this.callBase()},beginUpdate:function(){this.callBase(),this._list&&this._list.beginUpdate()},endUpdate:function(){this._list&&this._list.endUpdate(),this.callBase()},_optionChanged:function(e){var t=e.name,n=e.value;switch(t){case"menuVisible":case"swipeEnabled":case"rtlEnabled":case"menuPosition":this._slideOutView.option(t,n);break;case"width":this.callBase(e),this._updateSlideOutView();break;case"menuItemTemplate":this._changeMenuOption("itemTemplate",this._getTemplate(n));break;case"items":this._changeMenuOption("items",this.option("items")),this._selectedItemContentRendered||this._updateSelection();break;case"dataSource":case"selectedIndex":case"selectedItem":this._changeMenuOption(t,n),this.callBase(e);break;case"menuGrouped":this._initEditStrategy(),this._changeMenuOption("grouped",n);break;case"menuGroupTemplate":this._changeMenuOption("groupTemplate",this._getTemplate(n));break;case"onMenuItemRendered":this._changeMenuOption("onItemRendered",n);break;case"onMenuGroupRendered":this._changeMenuOption("onGroupRendered",n);break;case"onItemClick":this._renderItemClickAction();break;case"contentTemplate":this._singleContent=null,this._invalidate();break;default:this.callBase(e)}},showMenu:function(){return this._slideOutView.toggleMenuVisibility(!0)},hideMenu:function(){return this._slideOutView.toggleMenuVisibility(!1)},toggleMenuVisibility:function(e){return this._slideOutView.toggleMenuVisibility(e)}}).include(m["a"]);Object(s["a"])("dxSlideOut",C),t["default"]=C},"0094":function(e,t,n){"use strict";var i,o=n("bb2f"),r=n("da84"),a=n("e330"),s=n("6964"),l=n("f183"),u=n("6d61"),c=n("acac"),d=n("861d"),h=n("69f3").enforce,p=n("d039"),f=n("cdce"),m=Object,g=Array.isArray,v=m.isExtensible,_=m.isFrozen,y=m.isSealed,b=m.freeze,C=m.seal,x={},w={},S=!r.ActiveXObject&&"ActiveXObject"in r,T=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},O=u("WeakMap",T,c),E=O.prototype,I=a(E.set),k=function(){return o&&p((function(){var e=b([]);return I(new O,e,1),!_(e)}))};if(f)if(S){i=c.getConstructor(T,"WeakMap",!0),l.enable();var D=a(E["delete"]),A=a(E.has),P=a(E.get);s(E,{delete:function(e){if(d(e)&&!v(e)){var t=h(this);return t.frozen||(t.frozen=new i),D(this,e)||t.frozen["delete"](e)}return D(this,e)},has:function(e){if(d(e)&&!v(e)){var t=h(this);return t.frozen||(t.frozen=new i),A(this,e)||t.frozen.has(e)}return A(this,e)},get:function(e){if(d(e)&&!v(e)){var t=h(this);return t.frozen||(t.frozen=new i),A(this,e)?P(this,e):t.frozen.get(e)}return P(this,e)},set:function(e,t){if(d(e)&&!v(e)){var n=h(this);n.frozen||(n.frozen=new i),A(this,e)?I(this,e,t):n.frozen.set(e,t)}else I(this,e,t);return this}})}else k()&&s(E,{set:function(e,t){var n;return g(e)&&(_(e)?n=x:y(e)&&(n=w)),I(this,e,t),n==x&&b(e),n==w&&C(e),this}})},"0096":function(e,t,n){"use strict"; /*! * devextreme-vue * Version: 21.2.14 * Build date: Tue Jun 20 2023 * * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-vue */var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n1){var i=this._getNestedConfig(n.fullName);if(i)return void i._onOptionChanged(e.slice(1),t);this._tryEmitOptionChanged(n.name,t.component.option(this.fullPath?this.fullPath+"."+n.name:n.name))}else this._tryEmitOptionChanged(n.name,t.value)}},e.prototype._getNestedConfig=function(e){for(var t=0,n=this._nestedConfigurations;t{this._pushImpl(e),this._eventsStrategy.fireEvent("push",[e])})},_pushImpl:d["n"],remove:function(e){var t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("removing",[e]),t._addFailHandlers(t._removeImpl(e).done((function(e){t._eventsStrategy.fireEvent("removed",[e]),t._eventsStrategy.fireEvent("modified")})))},_removeImpl:h,_addFailHandlers:function(e){return e.fail(this._errorHandler).fail(a["b"])},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}});m.create=function(e,t){if(!(e in f))throw a["a"].Error("E4020",e);return new f[e](t)},m.registerClass=function(e,t){return t&&(f[t]=e),e},m.inherit=function(e){return function(t,n){var i=e.apply(this,[t]);return m.registerClass(i,n),i}}(m.inherit),t["a"]=m},"0135":function(e,t,n){ /*! * DevExpress Diagram (dx-diagram.min) * Version: 2.1.68 * Build date: Wed Jan 04 2023 * * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs */ !function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=58)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.x=e,this.y=t}return e.zero=function(){return new e(0,0)},e.fromNumber=function(t){return new e(t,t)},e.prototype.isZero=function(){return 0===this.x&&0===this.y},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.copyFrom=function(e){this.x=e.x,this.y=e.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(e){return this.x===e.x&&this.y===e.y},e.prototype.offset=function(e,t){return this.x+=e,this.y+=t,this},e.prototype.offsetByPoint=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.multiply=function(e,t){return this.x*=e,this.y*=t,this},e.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},e.prototype.applyConverter=function(e){return this.x=e(this.x),this.y=e(this.y),this},e.plus=function(t,n){return new e(t.x+n.x,t.y+n.y)},e.minus=function(t,n){return new e(t.x-n.x,t.y-n.y)},e.xComparer=function(e,t){return e.x-t.x},e.yComparer=function(e,t){return e.y-t.y},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();t.Point=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShapeType=t.ShapeTypes=t.ShapeCategories=void 0;var i=function(){function e(){}return e.General="general",e.Flowchart="flowchart",e.OrgChart="orgChart",e.Containers="containers",e.Custom="custom",e}();t.ShapeCategories=i;var o=function(){function e(){}return e.Text="text",e.Rectangle="rectangle",e.Ellipse="ellipse",e.Cross="cross",e.Triangle="triangle",e.Diamond="diamond",e.Heart="heart",e.Pentagon="pentagon",e.Hexagon="hexagon",e.Octagon="octagon",e.Star="star",e.ArrowLeft="arrowLeft",e.ArrowUp="arrowTop",e.ArrowRight="arrowRight",e.ArrowDown="arrowBottom",e.ArrowUpDown="arrowNorthSouth",e.ArrowLeftRight="arrowEastWest",e.Process="process",e.Decision="decision",e.Terminator="terminator",e.PredefinedProcess="predefinedProcess",e.Document="document",e.MultipleDocuments="multipleDocuments",e.ManualInput="manualInput",e.Preparation="preparation",e.Data="data",e.Database="database",e.HardDisk="hardDisk",e.InternalStorage="internalStorage",e.PaperTape="paperTape",e.ManualOperation="manualOperation",e.Delay="delay",e.StoredData="storedData",e.Display="display",e.Merge="merge",e.Connector="connector",e.Or="or",e.SummingJunction="summingJunction",e.Container="container",e.VerticalContainer="verticalContainer",e.HorizontalContainer="horizontalContainer",e.Card="card",e.CardWithImageOnLeft="cardWithImageOnLeft",e.CardWithImageOnTop="cardWithImageOnTop",e.CardWithImageOnRight="cardWithImageOnRight",e}();t.ShapeTypes=o,function(e){e[e.text=0]="text",e[e.rectangle=1]="rectangle",e[e.ellipse=2]="ellipse",e[e.cross=3]="cross",e[e.triangle=4]="triangle",e[e.diamond=5]="diamond",e[e.heart=6]="heart",e[e.pentagon=7]="pentagon",e[e.hexagon=8]="hexagon",e[e.octagon=9]="octagon",e[e.star=10]="star",e[e.arrowLeft=11]="arrowLeft",e[e.arrowTop=12]="arrowTop",e[e.arrowRight=13]="arrowRight",e[e.arrowBottom=14]="arrowBottom",e[e.arrowNorthSouth=15]="arrowNorthSouth",e[e.arrowEastWest=16]="arrowEastWest",e[e.process=17]="process",e[e.decision=18]="decision",e[e.terminator=19]="terminator",e[e.predefinedProcess=20]="predefinedProcess",e[e.document=21]="document",e[e.multipleDocuments=22]="multipleDocuments",e[e.manualInput=23]="manualInput",e[e.preparation=24]="preparation",e[e.data=25]="data",e[e.database=26]="database",e[e.hardDisk=27]="hardDisk",e[e.internalStorage=28]="internalStorage",e[e.paperTape=29]="paperTape",e[e.manualOperation=30]="manualOperation",e[e.delay=31]="delay",e[e.storedData=32]="storedData",e[e.display=33]="display",e[e.merge=34]="merge",e[e.connector=35]="connector",e[e.or=36]="or",e[e.summingJunction=37]="summingJunction",e[e.verticalContainer=38]="verticalContainer",e[e.horizontalContainer=39]="horizontalContainer",e[e.cardWithImageOnLeft=40]="cardWithImageOnLeft",e[e.cardWithImageOnTop=41]="cardWithImageOnTop",e[e.cardWithImageOnRight=42]="cardWithImageOnRight"}(t.ShapeType||(t.ShapeType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.width=e,this.height=t}return e.empty=function(){return new e(0,0)},e.fromNumber=function(t){return new e(t,t)},e.initByCommonAction=function(t){var n=function(e){return e.width},i=function(e){return e.height};return new e(t(n,i),t(i,n))},e.prototype.isEmpty=function(){return 0===this.width&&0===this.height},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.nonNegativeSize=function(){return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this},e.prototype.offset=function(e,t){return this.width=this.width+e,this.height=this.height+t,this},e.prototype.multiply=function(e,t){return this.width*=e,this.height*=t,this},e.prototype.equals=function(e){return this.width===e.width&&this.height===e.height},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},e.prototype.applyConverter=function(e){return this.width=e(this.width),this.height=e(this.height),this},e.equals=function(e,t){return e.width===t.width&&e.height===t.height},e}();t.Size=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventUtils=t.HtmlFocusUtils=t.ObjectUtils=t.GeometryUtils=t.Utils=t.EventDispatcher=t.Range=t.LineEquation=void 0,n(174);var i=n(2),o=n(0),r=n(13),a=n(41),s=n(35),l=n(31),u=n(60),c=n(33),d=n(26),h=n(18),p=n(65),f=function(){function e(e,t,n){this.aParam=e,this.bParam=t,this.cParam=n}return e.fromPoints=function(t,n,i){return void 0===i&&(i=1e-5),_.areDuplicatedPoints(t,n,i)?void 0:new e(n.y-t.y,t.x-n.x,n.x*t.y-t.x*n.y)},e.prototype.getPointIntersection=function(e,t){void 0===t&&(t=1e-5);var n=this.aParam,i=this.bParam,o=this.cParam,r=e.aParam,a=e.bParam,s=e.cParam,u=r*i-n*a;if(l.MathUtils.numberCloseTo(u,0,t))return null;if(0===n){var c=(a*o-s*i)/(i*r);return this.createPoint(c,-o/i)}var d=(s*n-o*r)/u;return this.createPoint((-i*d-o)/n,d)},e.prototype.containsPoint=function(e,t){return void 0===t&&(t=1e-5),l.MathUtils.numberCloseTo(this.aParam*e.x+this.bParam*e.y+this.cParam,0,t)},e.prototype.createPoint=function(e,t,n){return void 0===n&&(n=1e-5),new o.Point(l.MathUtils.numberCloseTo(e,0,n)?0:e,l.MathUtils.numberCloseTo(t,0,n)?0:t)},e}();t.LineEquation=f;var m=function(){function e(e,t){this.from=e,this.to=void 0!==t?t:e}return Object.defineProperty(e.prototype,"length",{get:function(){return Math.abs(this.to-this.from)},enumerable:!1,configurable:!0}),e.prototype.extend=function(e){this.from=Math.min(e.from,this.from),this.to=Math.max(e.to,this.to)},e.prototype.includes=function(e){return e>=this.from&&e<=this.to},e.fromLength=function(t,n){return new e(t,t+n)},e}();t.Range=m;var g=function(){function e(){this.listeners=[]}return e.prototype.add=function(e){if(!e)throw new Error("Not Implemented");this.hasEventListener(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0,n=void 0;n=this.listeners[t];t++)if(n===e){this.listeners.splice(t,1);break}},e.prototype.raise=function(e){for(var t=[],n=1;n0)p=f;else if(0===f)return new o.Point(r[p],s[h])}return null},e.checkRect=function(e,t,n,i,o,r,a){for(var s=0,l=0,u=n.length-2,c=i;c0&&i.filter((function(e){return 1===d.length?!e.containsPoint(d[0].startPoint)&&!e.containsPoint(d[0].endPoint):e!==d[0]&&e!==d[1]})).some((function(e){return a.isIntersected(e)}))&&!o&&(o=!0),r||(r=!0),"continue"}if(!u&&c){o||(o=!0,r&&(r=!1));var h=i.filter((function(e){return e.containsPoint(l)}));return h.length>0&&i.filter((function(e){return 1===h.length?!e.containsPoint(h[0].startPoint)&&!e.containsPoint(h[0].endPoint):e!==h[0]&&e!==h[1]})).some((function(e){return a.isIntersected(e)}))&&!r&&(r=!0),"continue"}var p=i.filter((function(e){return e.containsPoint(s)})),f=i.filter((function(e){return e.containsPoint(l)}));if(2===p.length&&2===f.length)return{value:!0};if(1===p.length&&1===f.length&&p[0]!==f[0])return{value:!0};r||1!==f.length||p.length||(r=!0),o||1!==p.length||f.length||(o=!0,r&&(r=!1))}},s=0;s2;){var s=this.getNextPoint(t,a,1,i),l=this.getNextPoint(t,a,-1,i);l&&s&&!e.isRightAngleCorner(l,r,s,o)&&n(r,a)||a++}},e.removeDuplicatedPoints=function(t,n,i,o){void 0===i&&(i=function(e){return void 0!==e}),void 0===o&&(o=1e-5);for(var r,a=0;(r=t[a])&&t.length>2;){var s=this.getNextPoint(t,a,1,i);if(s&&e.areDuplicatedPoints(r,s,o)){var l=a===t.length-2?a:a+1;if(n(t[l],l))continue}a++}},e.removeNotCornersPoints=function(t,n,i,o){void 0===i&&(i=function(e){return void 0!==e}),void 0===o&&(o=1e-5);for(var r,a=0;(r=t[a])&&t.length>2;){var s=this.getNextPoint(t,a,1,i),l=this.getNextPoint(t,a,-1,i);l&&s&&!e.isCorner(l,r,s,o)&&n(r,a)||a++}},e.removeBackwardPoints=function(t,n,i,o){void 0===i&&(i=function(e){return void 0!==e}),void 0===o&&(o=1e-5);for(var r,a=0;(r=t[a])&&t.length>2;){var s=this.getNextPoint(t,a,1,i),l=this.getNextPoint(t,a,-1,i);l&&s&&e.isBackwardPoint(l,r,s,o)&&n(r,a)||a++}},e.isRightAngleCorner=function(t,n,i,o){return void 0===o&&(o=1e-5),l.MathUtils.numberCloseTo(e.createAngle(t,n,i),Math.PI/2,o)||l.MathUtils.numberCloseTo(e.createAngle(t,n,i),Math.PI,o)||l.MathUtils.numberCloseTo(e.createAngle(t,n,i),3*Math.PI/2,o)},e.isCorner=function(t,n,i,o){return void 0===o&&(o=1e-5),!l.MathUtils.numberCloseTo(e.createAngle(t,n,i),0,o)},e.areDuplicatedPoints=function(e,t,n){return void 0===n&&(n=1e-5),l.MathUtils.numberCloseTo(e.x,t.x,n)&&l.MathUtils.numberCloseTo(e.y,t.y,n)},e.isBackwardPoint=function(t,n,i,o){return void 0===o&&(o=1e-5),l.MathUtils.numberCloseTo(e.createAngle(t,n,i),Math.PI,o)},e.createAngle=function(e,t,n){var i=u.Vector.fromPoints(t,n),o=u.Vector.fromPoints(e,t),r=i.x,a=i.y,s=o.x,l=o.y,c=Math.atan2(r*l-s*a,r*s+a*l);return c<0?2*Math.PI+c:c},e.getNextPoint=function(e,t,n,i){for(var o,r=t+n;o=e[r];){if(i(o))return o;r+=n}},e.addSelectedLinesTo=function(e,t,n,i,o,r,a,s,u,c,d,h,p,f){void 0===f&&(f=1e-5);var m=t.y-e.y,g=n.y-t.y,v=e.x-t.x,_=t.x-n.x,y=m*_-g*v;if(!l.MathUtils.numberCloseTo(y,0,f)){var b=m*(e.x+i)+v*(e.y+o),C=g*(t.x+s)+_*(t.y+u);h((_*b-v*C)/y,(m*C-g*b)/y);var x=m*(e.x+r)+v*(e.y+a),w=g*(t.x+c)+_*(t.y+d);p((_*x-v*w)/y,(m*w-g*x)/y)}},e.getSelectionOffsetPoint=function(e,t,n){return new o.Point((e.y-t.y)/n,(t.x-e.x)/n)},e.getSelectionTextStartEndPoints=function(e,t,n,i,r,a){var s=(t.x-e.x)/n,l=(t.y-e.y)/n,u=r.width*s+r.height*l;switch(a){case d.TextAlignment.Left:return[i,new o.Point(i.x+s*u,i.y+l*u)];case d.TextAlignment.Right:return[new o.Point(i.x-s*u,i.y-l*u),i];default:return[new o.Point(i.x-.5*s*u,i.y-.5*l*u),new o.Point(i.x+.5*s*u,i.y+.5*l*u)]}},e.getPathLength=function(e){var t,n=0;return e.forEach((function(e){void 0!==t&&(n+=s.Metrics.euclideanDistance(e,t)),t=e})),n},e.getPathPointByPosition=function(e,t){if(!e.length)throw new Error("Invalid points");if(0>t||t>1)throw new Error("Invalid relative position");var n=this.getPathLength(e);if(e.length<=2&&0===n||0===t)return[e[0],0];for(var i=n*t,r=0,a=1;a=i){var u=i-r,c=(e[a].x-e[a-1].x)/l,d=(e[a].y-e[a-1].y)/l;return[new o.Point(e[a-1].x+c*u,e[a-1].y+d*u),a]}r+=l}return[e[e.length-1],e.length-1]},e.getLineAngle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},e.getTriangleBeginAngle=function(e,t,n){var i=this.getLineAngle(e,t),o=this.getLineAngle(e,n);return Math.abs(o-i)},e.getTriangleEndAngle=function(e,t,n){var i=this.getLineAngle(e,t),o=this.getLineAngle(n,t);return Math.abs(i-o)},e.getPathPointByPoint=function(e,t){if(!e.length)throw new Error("Invalid points");if(1===e.length)return e[0];for(var n,i=Number.MAX_VALUE,o=1;o=m&&m>=-Math.PI/2?(g*=_?1:-1,v*=_?1:-1):-Math.PI/2>=m&&m>=-Math.PI&&(g*=_?-1:1,v*=_?1:-1),n=t.clone().offset(g,v)}}return n},e.getPathPositionByPoint=function(e,t,n){void 0===n&&(n=100),t=this.getPathPointByPoint(e,t);for(var i=this.getPathLength(e),o=0,r=1;ri.top&&(r=-a.top-i.top+1),a.left<0&&-a.left>i.left&&(o=-a.left-i.left+1)),e.style.setProperty("left",o+"px","important"),e.style.setProperty("top",r+"px","important")}}if(e.focus({preventScroll:!0}),t){var s=this.getHtmlScrollPosition();y.compareObjects(n,s)||this.setHtmlScrollPosition(n),e.style.setProperty("left","-1000px","important"),e.style.setProperty("top","-1000px","important")}}catch(e){}},e.getHtmlScrollPosition=function(){return{pos:this.getDocumentScrollPosition(window,document),iframePos:window.top!==window&&this.getDocumentScrollPosition(window.top,window.top.document)}},e.getDocumentScrollPosition=function(e,t){return{left:e.pageXOffset||t.documentElement.scrollLeft||t.body.scrollLeft,top:e.pageYOffset||t.documentElement.scrollTop||t.body.scrollTop}},e.setHtmlScrollPosition=function(e){this.setDocumentScrollPosition(document,e.pos),window.top!==window&&e.iframePos&&this.setDocumentScrollPosition(window.top.document,e.iframePos)},e.setDocumentScrollPosition=function(e,t){e.documentElement.scrollTop=t.top,e.documentElement.scrollLeft=t.left,e.body.scrollTop=t.top,e.body.scrollLeft=t.left},e}();t.HtmlFocusUtils=b;var C=function(){function e(){}return e.isLeftButtonPressed=function(e){return p.EvtUtils.isLeftButtonPressed(e)},e.isPointerEvents=function(){return window.PointerEvent},e.isMousePointer=function(e){return this.isPointerEvents()&&e.pointerType&&"mouse"===e.pointerType},e.isTouchMode=function(){return h.Browser.TouchUI||window.navigator&&window.navigator.maxTouchPoints>0},e.isTouchEvent=function(t){return h.Browser.TouchUI||!e.isMousePointer(t)},e}();t.EventUtils=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelUtils=void 0;var i=n(12),o=n(35),r=n(0),a=n(13),s=n(2),l=n(60),u=n(31),c=n(47),d=n(48),h=n(66),p=n(188),f=n(53),m=n(86),g=n(112),v=n(67),_=n(113),y=n(114),b=n(189),C=n(190),x=n(191),w=n(192),S=n(115),T=n(68),O=n(193),E=n(194),I=n(88),k=n(69),D=n(116),A=n(117),P=n(89),M=n(70),R=n(54),j=n(195),N=n(38),B=n(3),L=n(6),F=n(32),V=n(29),H=n(85),z=n(14),U=function(){function e(){}return e.setShapePosition=function(t,n,i,o,r){if(void 0===r&&(r=!0),!i.position.equals(o)){var a=o.clone().offset(-i.position.x,-i.position.y);t.addAndRedo(new x.MoveShapeHistoryItem(i.key,o)),r&&i.children.forEach((function(i){if(i instanceof z.Shape){var o=i.position.clone().offset(a.x,a.y);e.setShapePosition(t,n,i,o)}}))}},e.setShapeSize=function(e,t,n,i,o){n.size.equals(o)&&n.position.equals(i)||e.addAndRedo(new S.ResizeShapeHistoryItem(n.key,i,o))},e.addConnectorPoint=function(e,t,n,i){e.addAndRedo(new p.AddConnectorPointHistoryItem(t,n,i))},e.deleteConnectorCustomPoints=function(e,t){if(t.points.length>2){var n=t.tryCreateRenderPointsContext();if(t.properties.lineOption!==F.ConnectorLineOption.Straight&&n){var i=t.points[0].clone(),o=t.points[t.points.length-1].clone();e.addAndRedo(new m.ChangeConnectorPointsHistoryItem(t.key,[i,o],new H.ConnectorRenderPointsContext([new V.ConnectorRenderPoint(i.x,i.y,0),new V.ConnectorRenderPoint(o.x,o.y,1)],!1,n.actualRoutingMode)))}else e.addAndRedo(new m.ReplaceConnectorPointsHistoryItem(t.key,[t.points[0].clone(),t.points[t.points.length-1].clone()]))}},e.deleteConnectorUnnecessaryPoints=function(t,n){var i=n.getRenderPoints(!0).map((function(e){return e.clone()}));if(n.properties.lineOption===F.ConnectorLineOption.Straight){var o=e.createUnnecessaryRenderPoints(i.filter((function(e){return!e.skipped})).map((function(e){return e.clone()})),n.skippedRenderPoints,(function(t){return e.findFirstPointIndex(i,(function(e){return e.equals(t)}))}));Object.keys(o).length&&t.addAndRedo(new m.ReplaceConnectorPointsHistoryItem(n.key,e.createNecessaryPoints(n.points.map((function(e){return e.clone()})),o)))}else{var r=n.tryCreateRenderPointsContext(!0),a=i.filter((function(e){return!e.skipped})).map((function(e){return e.clone()}));if(o=e.createUnnecessaryRightAngleRenderPoints(a,n.skippedRenderPoints,(function(t){return e.findFirstPointIndex(i,(function(e){return e.equals(t)}))})),Object.keys(o).length){var s=e.createNecessaryPoints(n.points.map((function(e){return e.clone()})),o),l=new H.ConnectorRenderPointsContext(e.validateRenderPointIndexes(s,a,0),r.lockCreateRenderPoints,r.actualRoutingMode);t.addAndRedo(new m.ChangeConnectorPointsHistoryItem(n.key,s,l))}}},e.fixConnectorBeginEndConnectionIndex=function(e,t){if(t.beginItem&&-1===t.beginConnectionPointIndex){var n=t.beginItem.getNearestConnectionPoint(t.points[0]);e.addAndRedo(new d.SetConnectionPointIndexHistoryItem(t,n,L.ConnectorPosition.Begin))}if(t.endItem&&-1===t.endConnectionPointIndex){var i=t.endItem.getNearestConnectionPoint(t.points[t.points.length-1]);e.addAndRedo(new d.SetConnectionPointIndexHistoryItem(t,i,L.ConnectorPosition.End))}},e.skipUnnecessaryRenderPoints=function(t){var n=t.map((function(e){return e.clone()}));e.removeUnnecessaryRenderPoints(n),t.forEach((function(e){return e.skipped=n.some((function(t){return t.skipped&&t.equals(e)}))})),t[0].skipped=!1,t[t.length-1].skipped=!1},e.skipUnnecessaryRightAngleRenderPoints=function(t){var n=t.map((function(e){return e.clone()}));e.removeUnnecessaryRightAngleRenderPoints(n),t.forEach((function(e){return e.skipped=n.some((function(t){return t.skipped&&t.equals(e)}))})),t[0].skipped=!1,t[t.length-1].skipped=!1},e.removeUnnecessaryRenderPoints=function(t){B.GeometryUtils.removeUnnecessaryPoints(t,(function(n,i){return e.removeUnnecessaryPoint(t,n,i)}),(function(e){return void 0!==e&&!e.skipped})),t[0].skipped=!1,t[t.length-1].skipped=!1},e.removeUnnecessaryRightAngleRenderPoints=function(t){B.GeometryUtils.removeUnnecessaryRightAnglePoints(t,(function(n,i){return e.removeUnnecessaryPoint(t,n,i)}),(function(e){return void 0!==e&&!e.skipped})),t[0].skipped=!1,t[t.length-1].skipped=!1},e.createUnnecessaryRenderPoints=function(t,n,i,o){void 0===o&&(o=function(e){return!0});var r={};return B.GeometryUtils.removeUnnecessaryPoints(t,(function(n,a){return e.collectNotSkippedRenderPoints(r,t,n,a,i,o)})),e.collectSkippedRenderPoints(r,n,i,o),r},e.createUnnecessaryRightAngleRenderPoints=function(t,n,i,o){void 0===o&&(o=function(e){return!0});var r={};return B.GeometryUtils.removeUnnecessaryRightAnglePoints(t,(function(n,a){return e.collectNotSkippedRenderPoints(r,t,n,a,i,o)})),e.collectSkippedRenderPoints(r,n,i,o),r},e.createNecessaryPoints=function(e,t){var n=this,i=[],o=e.length-1;return e.forEach((function(e,r){(0===r||r===o||n.isNecessaryPoint(e,r,t))&&i.push(e.clone())})),i},e.isNecessaryPoint=function(e,t,n){return!Object.keys(n).some((function(i){var o=n[i];return o.pointIndex===t&&B.GeometryUtils.areDuplicatedPoints(e,o)}))},e.collectSkippedRenderPoints=function(e,t,n,i){void 0===i&&(i=function(e){return!0}),t&&t.forEach((function(t){if(i(t)){var o=n(t);void 0===e[o]&&(e[o]=t)}}))},e.collectNotSkippedRenderPoints=function(e,t,n,i,o,r){if(void 0===r&&(r=function(e){return!0}),!r(n))return!1;var a=o(n);return void 0===e[a]&&(e[a]=n,n.skipped=!0,t.splice(i,1)),!0},e.removeUnnecessaryPoint=function(e,t,n){return-1===t.pointIndex?(e.splice(n,1),!0):(t.skipped=!0,!1)},e.validateRenderPointIndexes=function(e,t,n){var i=this,o=t.map((function(t,o){return new V.ConnectorRenderPoint(t.x,t.y,o>=n&&t.pointIndex>=0?i.findFirstPointIndex(e,(function(e){return e.equals(t)})):t.pointIndex,t.skipped)}));return o[0].skipped=!1,o[o.length-1].skipped=!1,o},e.findFirstPointIndex=function(e,t){if(!e||!t)return-1;for(var n=0;n-1?(r(t,i),i!==n.connector.beginConnectionPointIndex&&n.connector.beginItem&&e.addAndRedo(new v.DeleteConnectionHistoryItem(n.connector,L.ConnectorPosition.Begin)),a(n.connector),e.addAndRedo(new d.AddConnectionHistoryItem(n.connector,t,i,L.ConnectorPosition.Begin))):n.connector.beginItem&&(e.addAndRedo(new v.DeleteConnectionHistoryItem(n.connector,L.ConnectorPosition.Begin)),e.addAndRedo(new C.MoveConnectorPointHistoryItem(n.connector.key,0,n.point)))})),i.forEach((function(n){var i=s.getMovingShapeConnectionPointIndex(t,n.point);t.rectangle.containsPoint(n.point)||i>-1?(r(t,i),i!==n.connector.endConnectionPointIndex&&n.connector.endItem&&e.addAndRedo(new v.DeleteConnectionHistoryItem(n.connector,L.ConnectorPosition.End)),a(n.connector),e.addAndRedo(new d.AddConnectionHistoryItem(n.connector,t,i,L.ConnectorPosition.End))):n.connector.endItem&&(e.addAndRedo(new v.DeleteConnectionHistoryItem(n.connector,L.ConnectorPosition.End)),e.addAndRedo(new C.MoveConnectorPointHistoryItem(n.connector.key,n.connector.points.length-1,n.point)))}))},e.getMovingShapeConnectionPointIndex=function(e,t){var n=this,i=-1;return e.getConnectionPoints().forEach((function(e,r){o.Metrics.euclideanDistance(t,e)0;){var n=t.attachedConnectors[0];e.addAndRedo(new v.DeleteConnectionHistoryItem(n,n.beginItem===t?L.ConnectorPosition.Begin:L.ConnectorPosition.End))}e.endTransaction()},e.deleteShape=function(e,t){var n=e.modelManipulator.permissionsProvider.canDeleteItems([t]);e.beginTransaction(),this.detachConnectors(e,t),e.addAndRedo(new y.DeleteShapeHistoryItem(t.key,n)),e.endTransaction()},e.deleteConnector=function(e,t){e.beginTransaction(),t.beginItem&&e.addAndRedo(new v.DeleteConnectionHistoryItem(t,L.ConnectorPosition.Begin)),t.endItem&&e.addAndRedo(new v.DeleteConnectionHistoryItem(t,L.ConnectorPosition.End)),e.addAndRedo(new _.DeleteConnectorHistoryItem(t.key)),e.endTransaction()},e.deleteAllItems=function(e,t,n){this.deleteItems(e,t,n,t.items.slice(),!0)},e.deleteSelection=function(e,t,n){this.deleteItems(e,t,n,n.getSelectedItems())},e.changeSelectionLocked=function(t,n,i,o){t.beginTransaction(),i.getSelectedItems(!0).forEach((function(e){t.addAndRedo(new A.ChangeLockedHistoryItem(e,o))})),e.updateSelection(t,i),t.endTransaction()},e.copyStylesToItem=function(e,t,n,i){var o=t.findItem(i);n.styleText.forEach((function(t){n.styleText[t]!==o.styleText[t]&&e.addAndRedo(new M.ChangeStyleTextHistoryItem(i,t,n.styleText[t]))})),n.style.forEach((function(t){n.style[t]!==o.style[t]&&e.addAndRedo(new P.ChangeStyleHistoryItem(i,t,n.style[t]))}))},e.updateSelection=function(e,t){e.addAndRedo(new T.SetSelectionHistoryItem(t,t.getKeys(),!0))},e.cloneShapeToOffset=function(e,t,n,i,o){e.beginTransaction();var r=n.position.clone().offset(i,o),a=new f.AddShapeHistoryItem(n.description,r,n.text);e.addAndRedo(a);var s=a.shapeKey;return e.addAndRedo(new S.ResizeShapeHistoryItem(s,r,n.size.clone())),e.addAndRedo(new D.ChangeCustomDataHistoryItem(s,B.ObjectUtils.cloneObject(n.customData))),e.addAndRedo(new g.ChangeShapeParametersHistoryItem(s,n.parameters.clone())),this.copyStylesToItem(e,t,n,s),e.endTransaction(),s},e.applyOffsetToConnectorRenderPointsContext=function(e,t,n){return e&&e.renderPoints?new H.ConnectorRenderPointsContext(e.renderPoints.map((function(e){return e.clone().offset(t,n)})),!0,e.actualRoutingMode):void 0},e.cloneConnectorToOffset=function(e,t,n,i,o,r,a){e.beginTransaction();var s=n.points.map((function(e){return e.clone().offset(r,a)})),l=new h.AddConnectorHistoryItem(s,void 0,this.applyOffsetToConnectorRenderPointsContext(n.tryCreateRenderPointsContext(),r,a));e.addAndRedo(l);var u=l.connectorKey,c=t.findConnector(u);if(n.properties.forEach((function(t){n.properties[t]!==c.properties[t]&&e.addAndRedo(new I.ChangeConnectorPropertyHistoryItem(u,t,n.properties[t]))})),i){var p=t.findShape(i);e.addAndRedo(new d.AddConnectionHistoryItem(c,p,n.beginConnectionPointIndex,L.ConnectorPosition.Begin))}if(o){var f=t.findShape(o);e.addAndRedo(new d.AddConnectionHistoryItem(c,f,n.endConnectionPointIndex,L.ConnectorPosition.End))}return n.texts.clone().forEach((function(t){e.addAndRedo(new k.ChangeConnectorTextHistoryItem(c,t.position,t.value))})),this.copyStylesToItem(e,t,n,u),e.endTransaction(),u},e.cloneSelectionToOffset=function(t,n,i,o,r,a){var s=this;t.beginTransaction();var l={},u=[];o.getSelectedShapes().forEach((function(e){var o=s.cloneShapeToOffset(t,n,e,r,a);l[e.key]=o,u.push(o),i&&i(o)})),o.getSelectedConnectors().forEach((function(e){var o=e.beginItem?l[e.beginItem.key]:null,c=e.endItem?l[e.endItem.key]:null,d=s.cloneConnectorToOffset(t,n,e,o,c,r,a);u.push(d),i&&i(d)})),t.addAndRedo(new T.SetSelectionHistoryItem(o,u)),e.tryUpdateModelRectangle(t),t.endTransaction()},e.findContainerByEventKey=function(t,n,i){var o=t.findContainer(i);if(o&&!o.isLocked)return o;var r=t.findShape(i);return r&&r.container&&!n.hasKey(r.key)?e.findContainerByEventKey(t,n,r.container.key):void 0},e.canInsertToContainer=function(e,t,n){return t!==n&&!(t instanceof z.Shape&&e.findChild(t,n.key))},e.canInsertSelectionToContainer=function(e,t,n){var i=!0;return t.getSelectedItems().forEach((function(t){t!==n?t instanceof z.Shape&&e.findChild(t,n.key)&&(i=!1):i=!1})),i},e.insertToContainer=function(e,t,n,i){if(!i.enableChildren)throw Error("Inpossible to add children to non-container shape.");if(this.canInsertToContainer(t,n,i)){var o=n.container;o!==i&&(e.beginTransaction(),o&&(e.addAndRedo(new w.RemoveFromContainerHistoryItem(n)),n.attachedConnectors.forEach((function(t){t.container&&e.addAndRedo(new w.RemoveFromContainerHistoryItem(t))}))),e.addAndRedo(new b.InsertToContainerHistoryItem(n,i)),this.updateAttachedConnectorsContainer(e,t,n),e.endTransaction())}},e.removeFromContainer=function(e,t,n){n.container&&(e.beginTransaction(),e.addAndRedo(new w.RemoveFromContainerHistoryItem(n)),this.updateAttachedConnectorsContainer(e,t,n),e.endTransaction())},e.insertSelectionToContainer=function(e,t,n,i){var o=this;e.beginTransaction();var r=n.getSelectedItems();r.filter((function(e){return!e.container||-1===r.indexOf(e.container)})).forEach((function(n){o.insertToContainer(e,t,n,i)})),e.endTransaction()},e.removeSelectionFromContainer=function(e,t,n){var i=this;e.beginTransaction(),n.getSelectedItems().forEach((function(o){o.container&&!n.hasKey(o.container.key)&&(e.addAndRedo(new w.RemoveFromContainerHistoryItem(o)),i.updateAttachedConnectorsContainer(e,t,o))})),e.endTransaction()},e.getConnectorContainer=function(e){if(e.beginItem&&e.endItem){for(var t={},n=e.beginItem.container;n;)t[n.key]=!0,n=n.container;for(var i=e.endItem.container;i;){if(void 0!==t[i.key])return i;i=i.container}}},e.updateAttachedConnectorsContainer=function(e,t,n){var i=this;e.beginTransaction(),n.attachedConnectors.forEach((function(n){i.updateConnectorContainer(e,t,n)})),e.endTransaction()},e.updateConnectorContainer=function(e,t,n){var i=this.getConnectorContainer(n);i?e.addAndRedo(new b.InsertToContainerHistoryItem(n,i)):n.container&&e.addAndRedo(new w.RemoveFromContainerHistoryItem(n))},e.updateNewShapeProperties=function(e,t,n){t.inputPosition.getDefaultStyle().forEach((function(i){e.addAndRedo(new P.ChangeStyleHistoryItem(n,i,t.inputPosition.getDefaultStylePropertyValue(i)))})),t.inputPosition.getDefaultTextStyle().forEach((function(i){e.addAndRedo(new M.ChangeStyleTextHistoryItem(n,i,t.inputPosition.getDefaultTextStylePropertyValue(i)))}))},e.updateNewConnectorProperties=function(e,t,n){t.inputPosition.getDefaultConnectorProperties().forEach((function(i){e.addAndRedo(new I.ChangeConnectorPropertyHistoryItem(n,i,t.inputPosition.getDefaultConnectorPropertyValue(i)))})),t.inputPosition.getDefaultStyle().forEach((function(i){e.addAndRedo(new P.ChangeStyleHistoryItem(n,i,t.inputPosition.getDefaultStylePropertyValue(i)))})),t.inputPosition.getDefaultTextStyle().forEach((function(i){e.addAndRedo(new M.ChangeStyleTextHistoryItem(n,i,t.inputPosition.getDefaultTextStylePropertyValue(i)))}))},e.applyLayout=function(e,t,n,i,o,r,a,s,l,u){e.beginTransaction();var c=this.getOccupiedRectangles(r,n);return o=this.offsetLayoutToFreeSpace(o,n&&n.clientRectangle,c,a.containerPadding),s&&this.adjustLayoutToSnapGrid(t,o,l),n&&this.resizeContainerOnLayout(e,t,o,n,a.containerPadding),this.applyLayoutToNodes(e,t,o,i.edges.map((function(e){return t.findConnector(e.key)}))),this.applyLayoutToConnectors(e,t,o,i.edges.map((function(e){return t.findConnector(e.key)})),u),e.endTransaction(),o.getRectangle(!0)},e.getNonGraphItems=function(e,t,n,i,o){return(t?e.getChildren(t):e.items.filter((function(e){return!e.container}))).filter((function(e){return e instanceof L.Connector?!(e.beginItem&&n[e.beginItem.key]||e.endItem&&n[e.endItem.key]||-1!==o.indexOf(e)):e instanceof z.Shape?!n[e.key]&&-1===i.indexOf(e):void 0}))},e.getOccupiedRectangles=function(e,t){var n=e.map((function(e){return e.rectangle}));if(t&&n.length){var i=t.clientRectangle;n.push(new a.Rectangle(i.right,i.y,1,1)),n.push(new a.Rectangle(i.right,i.bottom,1,1))}return n},e.offsetLayoutToFreeSpace=function(e,t,n,i){var o=e.getRectangle(!0),r=B.GeometryUtils.findFreeSpace(n,o.createSize().offset(i,i).nonNegativeSize(),!1,t);if(r){var a=r.x+i,s=r.y+i;return e.offsetNodes(a,s)}var l=n&&n.length?n.reduce((function(e,t){return t.right>e?t.right:e}),0):t?t.x:0,u=t?t.y:Math.max(0,o.y);return e.offsetNodes(l+i,u+i)},e.resizeContainerOnLayout=function(t,n,i,o,r){var a=i.getRectangle(!0),l=o.children.filter((function(e){return e instanceof z.Shape?-1===i.nodeKeys.indexOf(e.key):!!(e instanceof L.Connector&&e.beginItem&&e.endItem)&&-1===i.nodeKeys.indexOf(e.beginItem.key)&&-1===i.nodeKeys.indexOf(e.endItem.key)})).map((function(e){return e.rectangle})),u=l.map((function(e){return e.right})).reduce((function(e,t){return Math.max(e,t)}),a.right),c=l.map((function(e){return e.bottom})).reduce((function(e,t){return Math.max(e,t)}),a.bottom),d=o.rectangle.width+u+r-o.rectangle.right,h=o.rectangle.height+c+r-o.rectangle.bottom;e.setShapeSize(t,n,o,o.position,new s.Size(d,h)),e.updateShapeAttachedConnectors(t,n,o)},e.applyLayoutToNodes=function(e,t,n,i){var o=this,r=i.reduce((function(e,t){return e[t.key]=e}),{});n.forEachNode((function(n,i){var a=t.findShape(i);o.applyLayoutToNode(e,t,a,n.position,r)}))},e.applyLayoutToNode=function(t,n,i,o,r){var a=this,s=o.clone().offset(-i.position.x,-i.position.y);e.setShapePosition(t,n,i,o,!1),0===s.x&&0===s.y||(i.attachedConnectors.filter((function(e){return!r[e.key]})).forEach((function(e){a.updateConnectorAttachedPoints(t,n,e);for(var i=e.beginItem?1:0,o=e.endItem?e.points.length-2:e.points.length-1,r=i;r<=o;r++)a.moveConnectorPoint(t,e,r,e.points[r].offset(s.x,s.y))})),n.getChildren(i).forEach((function(e){if(e instanceof z.Shape){var i=e.position.clone().offset(s.x,s.y);a.applyLayoutToNode(t,n,e,i,r)}})))},e.applyLayoutToConnectors=function(e,t,n,i,o){var r=this;i.filter((function(e){return e.beginItem||e.endItem})).forEach((function(i){var a=n.edgeToPosition[i.key];if(i.beginItem&&i.endItem&&!o&&a){var s=i.beginItem.getConnectionPointIndexForSide(a.beginIndex);s!==i.beginConnectionPointIndex&&e.addAndRedo(new d.SetConnectionPointIndexHistoryItem(i,s,L.ConnectorPosition.Begin));var l=i.endItem.getConnectionPointIndexForSide(a.endIndex);l!==i.endConnectionPointIndex&&e.addAndRedo(new d.SetConnectionPointIndexHistoryItem(i,l,L.ConnectorPosition.End))}r.updateConnectorAttachedPoints(e,t,i),a&&r.deleteConnectorCustomPoints(e,i)}))},e.adjustLayoutToSnapGrid=function(e,t,n){var i=this;t.nodeKeys.forEach((function(o){t.nodeToLayout[o].position.x=i.getSnappedPos(e,n,t.nodeToLayout[o].position.x,!0),t.nodeToLayout[o].position.y=i.getSnappedPos(e,n,t.nodeToLayout[o].position.y,!1)}))},e.getGraphInfoByItems=function(e,t,n,i){void 0===i&&(i=!0);var o={};[].concat(t).concat(n).forEach((function(e){var t=e.container&&e.container.key;o[t]||(o[t]=[]),o[t].push(e)}));var r=[];for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=a&&e.findContainer(a);if(!s||s.expanded&&!e.findItemCollapsedContainer(s)){var l=s&&s.key,u=this.getGraphByItems(e,o[a],l,!i),c=!1;(u.nodes.length>1||u.nodes.length&&(i||s&&o[s.container&&s.container.key]))&&(c=!0),c&&r.push(new j.GraphInfo(s,u))}}return r.sort((function(e,t){return t.level-e.level}))},e.getGraphByItems=function(e,t,n,i){var o=this,r=new R.Graph([],[]),a={};return t.forEach((function(e){o.extendByConnectedComponents(e,r,n,a,i)})),r.nodes.sort((function(t,n){return e.getItemIndex(e.findItem(t))-e.getItemIndex(e.findItem(n))})),r.edges.sort((function(t,n){return e.getItemIndex(e.findItem(t.key))-e.getItemIndex(e.findItem(n.key))})),r.edges=r.edges.filter((function(e){return r.getNode(e.from)&&r.getNode(e.to)})),r},e.extendByConnectedComponents=function(e,t,n,i,o){var r=this;!e||o&&e.locked||i[e.key]||(i[e.key]=!0,!(e instanceof L.Connector&&(e.container&&e.container.key)===n&&e.beginItem)||e.beginItem.locked&&o||!e.endItem||e.endItem.locked&&o||e.beginItem===e.endItem?e instanceof z.Shape&&(e.container&&e.container.key)===n&&(t.addNode(e),e.attachedConnectors.forEach((function(e){return r.extendByConnectedComponents(e,t,n,i,o)}))):(t.addEdge(new N.Edge(e.key,e.beginItem&&e.beginItem.key,e.endItem&&e.endItem.key)),this.extendByConnectedComponents(e.beginItem,t,n,i,o),this.extendByConnectedComponents(e.endItem,t,n,i,o)))},e.getlUnitValue=function(e,t){switch(e){case c.DiagramUnit.Cm:return i.UnitConverter.twipsToCentimeters(t);case c.DiagramUnit.In:return i.UnitConverter.twipsToInches(t);case c.DiagramUnit.Px:return i.UnitConverter.twipsToPixels(t)}},e.getUnitText=function(e,t,n,i,o){void 0===o&&(o=2);var r=t[e]?" "+t[e]:"",a=this.getlUnitValue(e,i);switch(e){case c.DiagramUnit.Cm:case c.DiagramUnit.In:return n(+a.toFixed(o))+r;case c.DiagramUnit.Px:return n(+a.toFixed(0))+r}},e.getTwipsValue=function(e,t){switch(e){case c.DiagramUnit.Cm:return i.UnitConverter.centimetersToTwips(t);case c.DiagramUnit.In:return i.UnitConverter.inchesToTwips(t);case c.DiagramUnit.Px:return i.UnitConverter.pixelsToTwips(t)}},e.getGuidItemKey=function(){return u.MathUtils.generateGuid()},e.createSelectedItems=function(e){var t={};return e.getSelectedItems(!0).forEach((function(e){return t[e.key]=e})),t},e.canMoveConnector=function(e,t){var n=t.beginItem,i=t.endItem;return n||i?!!e[t.key]&&(n===i?!!e[n.key]:n?i?!!e[n.key]&&!!e[i.key]:!!e[n.key]:!!e[i.key]):!t.isLocked},e.createRectangle=function(e){return B.GeometryUtils.getCommonRectangle(e.map((function(e){return e.rectangle})))},e.connectionPointActionSize=i.UnitConverter.pixelsToTwips(8),e}();t.ModelUtils=U},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PathPrimitiveClosePathCommand=t.PathPrimitiveArcToCommand=t.PathPrimitiveQuadraticCurveToCommand=t.PathPrimitiveCubicCurveToCommand=t.PathPrimitiveLineToCommand=t.PathPrimitiveMoveToCommand=t.PathPrimitiveCommand=t.PathPrimitive=void 0;var r=n(15),a=n(24),s=n(109),l=function(e){function t(t,n,i,o,r){var a=e.call(this,n,i,o,r)||this;return a.commands=t.map((function(e){return e.style=n,e})),a}return o(t,e),t.prototype.createMainElement=function(){return document.createElementNS(r.svgNS,"path")},t.prototype.applyElementProperties=function(t,n){t.setAttribute("d",this.commands.map((function(e){return e.toString()})).join(" ")),this.setPositionCorrectionAttribute(t),e.prototype.applyElementProperties.call(this,t,n)},t}(a.SvgPrimitive);t.PathPrimitive=l;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.PrimitiveObject);t.PathPrimitiveCommand=u;var c=function(e){function t(t,n){var i=e.call(this)||this;return i.x=t,i.y=n,i}return o(t,e),t.prototype.toString=function(){return"M "+this.getUnitVaue(this.x)+" "+this.getUnitVaue(this.y)},t.fromPoint=function(e){return new t(e.x,e.y)},t}(u);t.PathPrimitiveMoveToCommand=c;var d=function(e){function t(t,n){var i=e.call(this)||this;return i.x=t,i.y=n,i}return o(t,e),t.prototype.toString=function(){return"L "+this.getUnitVaue(this.x)+" "+this.getUnitVaue(this.y)},t.fromPoint=function(e){return new t(e.x,e.y)},t}(u);t.PathPrimitiveLineToCommand=d;var h=function(e){function t(t,n,i,o,r,a){var s=e.call(this)||this;return s.x1=t,s.y1=n,s.x2=i,s.y2=o,s.x3=r,s.y3=a,s}return o(t,e),t.prototype.toString=function(){return"C "+this.getUnitVaue(this.x1)+" "+this.getUnitVaue(this.y1)+","+this.getUnitVaue(this.x2)+" "+this.getUnitVaue(this.y2)+","+this.getUnitVaue(this.x3)+" "+this.getUnitVaue(this.y3)},t}(u);t.PathPrimitiveCubicCurveToCommand=h;var p=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.x1=t,r.y1=n,r.x2=i,r.y2=o,r}return o(t,e),t.prototype.toString=function(){return"Q "+this.getUnitVaue(this.x1)+" "+this.getUnitVaue(this.y1)+","+this.getUnitVaue(this.x2)+" "+this.getUnitVaue(this.y2)},t}(u);t.PathPrimitiveQuadraticCurveToCommand=p;var f=function(e){function t(t,n,i,o,r,a,s){var l=e.call(this)||this;return l.rx=t,l.ry=n,l.xAxisRotation=i,l.largeArcFlag=o,l.sweepFag=r,l.x=a,l.y=s,l}return o(t,e),t.prototype.toString=function(){return"A "+this.getUnitVaue(this.rx)+" "+this.getUnitVaue(this.ry)+" "+this.getUnitVaue(this.xAxisRotation)+" "+(this.largeArcFlag?"1":"0")+" "+(this.sweepFag?"1":"0")+this.getUnitVaue(this.x)+","+this.getUnitVaue(this.y)},t}(u);t.PathPrimitiveArcToCommand=f;var m=function(e){function t(){return e.call(this)||this}return o(t,e),t.prototype.toString=function(){return"z"},t}(u);t.PathPrimitiveClosePathCommand=m},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=t.CONNECTOR_DEFAULT_TEXT_POSITION=t.ConnectorPosition=void 0;var r,a=n(12),s=n(13),l=n(33),u=n(2),c=n(42),d=n(84),h=n(11),p=n(43),f=n(5),m=n(63),g=n(17),v=n(28),_=n(3),y=n(9),b=n(4),C=n(179),x=n(180),w=n(186),S=n(32),T=n(187),O=n(85);!function(e){e[e.Begin=0]="Begin",e[e.End=1]="End"}(r=t.ConnectorPosition||(t.ConnectorPosition={})),t.CONNECTOR_DEFAULT_TEXT_POSITION=.5;var E=function(e){function n(t){var n=e.call(this)||this;if(n.beginConnectionPointIndex=-1,n.endConnectionPointIndex=-1,n.properties=new S.ConnectorProperties,n.points=t.map((function(e){return e.clone()})),t.length<2)throw Error("Points count should be greater than 1");return n.texts=new T.ConnectorTexts,n}return o(n,e),Object.defineProperty(n.prototype,"rectangle",{get:function(){return _.GeometryUtils.createRectagle(this.getRenderPoints(!0))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"skippedRenderPoints",{get:function(){return this.renderPoints?this.renderPoints.filter((function(e){return e.skipped})):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldChangeRenderPoints",{get:function(){return void 0!==this.renderPoints&&void 0!==this.routingStrategy},enumerable:!1,configurable:!0}),n.prototype.assign=function(t){e.prototype.assign.call(this,t),t.beginItem=this.beginItem,t.beginConnectionPointIndex=this.beginConnectionPointIndex,t.endItem=this.endItem,t.endConnectionPointIndex=this.endConnectionPointIndex,t.properties=this.properties.clone(),t.texts=this.texts.clone(),void 0!==this.routingStrategy&&(t.routingStrategy=this.routingStrategy.clone()),void 0!==this.renderPoints&&(t.renderPoints=this.renderPoints.map((function(e){return e.clone()}))),void 0!==this.renderPointsWithoutSkipped&&(t.renderPointsWithoutSkipped=this.renderPointsWithoutSkipped.map((function(e){return e.clone()}))),void 0!==this.actualRoutingMode&&(t.actualRoutingMode=this.actualRoutingMode),void 0!==this.lockCreateRenderPoints&&(t.lockCreateRenderPoints=this.lockCreateRenderPoints),void 0!==this.shouldInvalidateRenderPoints&&(t.shouldInvalidateRenderPoints=this.shouldInvalidateRenderPoints)},n.prototype.clone=function(){var e=new n(this.points);return this.assign(e),e},n.prototype.getTextCount=function(){return this.texts.count()},n.prototype.getText=function(e){void 0===e&&(e=t.CONNECTOR_DEFAULT_TEXT_POSITION);var n=this.texts.get(e);return n?n.value:""},n.prototype.setText=function(e,n){void 0===n&&(n=t.CONNECTOR_DEFAULT_TEXT_POSITION),e&&""!==e?this.texts.set(n,new T.ConnectorText(n,e)):this.texts.remove(n)},n.prototype.getTextPoint=function(e){var t=this.getRenderPoints();return _.GeometryUtils.getPathPointByPosition(t,e)[0]},n.prototype.getTextPositionByPoint=function(e){var t=this.getRenderPoints(),n=_.GeometryUtils.getPathLength(t),i=_.GeometryUtils.getPathPositionByPoint(t,e),o=a.UnitConverter.pointsToTwips(parseInt(this.styleText["font-size"]));return o>i*n?o/n:o>n-i*n?(n-o)/n:i},n.prototype.getTextRectangle=function(e){return s.Rectangle.fromGeometry(this.getTextPoint(e),new u.Size(0,0))},n.prototype.changeRoutingStrategy=function(e){this.routingStrategy=e,this.invalidateRenderPoints()},n.prototype.clearRoutingStrategy=function(){delete this.routingStrategy,delete this.renderPoints,delete this.renderPointsWithoutSkipped,delete this.lockCreateRenderPoints,delete this.actualRoutingMode,delete this.shouldInvalidateRenderPoints,this.invalidateRenderPoints()},n.prototype.getCustomRenderPoints=function(e){void 0===e&&(e=!1);var t=this.getRenderPoints(e),n=[];return t.forEach((function(e,i){i>0&&i2,v.ConnectorRoutingMode.AllShapesOnly):this.invalidateRenderPoints()},n.prototype.onMovePoint=function(e,t){this.shouldChangeRenderPoints?(0!==e&&e!==this.points.length-1||(this.lockCreateRenderPoints=!1),this.replaceRenderPointsCore(this.routingStrategy.onMovePoint(this.points,e,t,this.renderPoints),this.lockCreateRenderPoints,v.ConnectorRoutingMode.AllShapesOnly)):this.invalidateRenderPoints()},n.prototype.onMovePoints=function(e,t,n,i){this.shouldChangeRenderPoints?(0!==e&&n!==this.points.length-1||(this.lockCreateRenderPoints=!1),this.replaceRenderPointsCore(this.routingStrategy.onMovePoints(this.points,e,t,n,i,this.renderPoints),this.lockCreateRenderPoints,v.ConnectorRoutingMode.AllShapesOnly)):this.invalidateRenderPoints()},n.prototype.replaceRenderPoints=function(e){void 0!==e?this.replaceRenderPointsCore(e.renderPoints,e.lockCreateRenderPoints,e.actualRoutingMode):this.invalidateRenderPoints()},n.prototype.clearRenderPoints=function(){this.changeRenderPoints(void 0),this.lockCreateRenderPoints=!1,this.actualRoutingMode=void 0,this.invalidateRenderPoints()},n.prototype.replaceRenderPointsCore=function(e,t,n){this.changeRenderPoints(e),this.lockCreateRenderPoints=t,this.actualRoutingMode=n,this.invalidateRenderPoints()},n.prototype.changeRenderPoints=function(e){this.renderPoints=e,this.renderPointsWithoutSkipped=e?this.renderPoints.filter((function(e){return!e.skipped})):void 0},n.prototype.getCalculator=function(){return this.properties.lineOption===S.ConnectorLineOption.Straight?new C.ConnectorPointsCalculator(this):new x.ConnectorPointsOrthogonalCalculator(this)},n.prototype.invalidateRenderPoints=function(){this.shouldInvalidateRenderPoints=!0},n.prototype.createPrimitives=function(){var e=[],t=this.getRenderPoints(),n=new f.PathPrimitive(t.map((function(e,t){return 0===t?new f.PathPrimitiveMoveToCommand(e.x,e.y):new f.PathPrimitiveLineToCommand(e.x,e.y)})),this.style);return e.push(n),(e=e.concat(this.createLineEndingPrimitives(t,n))).concat(this.createTextPrimitives())},n.prototype.createLineEndingPrimitives=function(e,t){var n=[];return e.length>1&&[{strategy:this.createLineEndingStrategy(this.properties.startLineEnding),point1:e[0],point2:e[1]},{strategy:this.createLineEndingStrategy(this.properties.endLineEnding),point1:e[e.length-1],point2:e[e.length-2]}].forEach((function(e){var i=e.strategy;if(i.hasCommands()){var o=t;i.needCreateSeparatePrimitive()&&n.push(o=i.createPrimitive()),o.commands=o.commands.concat(i.createCommands(e.point1,e.point2))}})),n},n.prototype.createLineEndingStrategy=function(e){switch(e){case S.ConnectorLineEnding.None:return new w.ConnectorLineEndingNoneStrategy(this.style);case S.ConnectorLineEnding.Arrow:return new w.ConnectorLineEndingArrowStrategy(this.style);case S.ConnectorLineEnding.OutlinedTriangle:return new w.ConnectorLineEndingOutlinedTriangleStrategy(this.style);case S.ConnectorLineEnding.FilledTriangle:return new w.ConnectorLineEndingFilledTriangleStrategy(this.style);default:return new w.ConnectorLineEndingStrategy(this.style)}},n.prototype.createSelectorPrimitives=function(){var e=[],t=this.getRenderPoints();return e.push(new f.PathPrimitive(t.map((function(e,t){return 0===t?new f.PathPrimitiveMoveToCommand(e.x,e.y):new f.PathPrimitiveLineToCommand(e.x,e.y)})),null,"selector")),e},n.prototype.createTextPrimitives=function(){var e=this;if(!this.enableText)return[];var t=[];return this.texts.forEach((function(n){var i=e.getText(n.position);if(i&&""!==i){var o=e.getTextPoint(n.position);t=t.concat([new m.TextPrimitive(o.x,o.y,i,p.TextOwner.Connector,void 0,void 0,void 0,e.styleText,!0,null,c.PAGE_BG_TEXTFLOOR_FILTER_ID,void 0,(function(t){g.RenderUtils.setElementEventData(t,h.MouseEventElementType.ConnectorText,e.key,n.position)}))])}})),t},n.prototype.getExtremeItem=function(e){return e===r.Begin?this.beginItem:e===r.End?this.endItem:null},n.prototype.getExtremeConnectionPointIndex=function(e){return e===r.Begin?this.beginConnectionPointIndex:e===r.End?this.endConnectionPointIndex:-1},n.prototype.getMinX=function(){return this.getRenderPoints().map((function(e){return e.x})).reduce((function(e,t){return Math.min(e,t)}),Number.MAX_VALUE)},n.prototype.getMinY=function(){return this.getRenderPoints().map((function(e){return e.y})).reduce((function(e,t){return Math.min(e,t)}),Number.MAX_VALUE)},n.prototype.getConnectionPoints=function(){return[]},n.prototype.getConnectionPointSide=function(e,t){return y.ConnectionPointSide.Undefined},n.prototype.getSegments=function(){var e=[],t=this.getRenderPoints();return t.forEach((function(n,i){i>0&&e.push(new l.Segment(t[i-1],n))})),e},n.prototype.intersectedByRect=function(e){return this.getSegments().some((function(t){return t.isIntersectedByRect(e)}))},n.prototype.toNative=function(e){var t=new d.NativeConnector(this.key,this.dataKey);return t.fromKey=this.beginItem&&this.beginItem.dataKey,t.toKey=this.endItem&&this.endItem.dataKey,t.texts=this.texts.map((function(e){return e})).sort((function(e,t){return e.position-t.position})).map((function(e){return e.value})),t.fromId=this.beginItem&&this.beginItem.key,t.fromPointIndex=this.beginConnectionPointIndex,t.toId=this.endItem&&this.endItem.key,t.toPointIndex=this.endConnectionPointIndex,t.points=this.points.map((function(e){return e.clone()})),t.applyUnits(e),t},n.minOffset=a.UnitConverter.pixelsToTwips(24),n.minTextHeight=a.UnitConverter.pixelsToTwips(12),n}(y.DiagramItem);t.Connector=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShapeDescription=t.ShapeTextPadding=t.ShapeDefaultSize=t.ShapeMinDimension=t.ShapeDefaultDimension=void 0;var i=n(12),o=n(2),r=n(36),a=n(43),s=n(21),l=n(63),u=n(3),c=n(45),d=n(9);t.ShapeDefaultDimension=1440,t.ShapeMinDimension=360,t.ShapeDefaultSize=new o.Size(t.ShapeDefaultDimension,t.ShapeDefaultDimension),t.ShapeTextPadding=i.UnitConverter.pixelsToTwips(10);var h=function(){function e(e,n){void 0===e&&(e=t.ShapeDefaultSize.clone()),this.defaultSize=e,this.hasDefaultText=n,this.onChanged=new u.EventDispatcher,this.connectionPoints=this.createConnectionPoints()}return Object.defineProperty(e.prototype,"enableText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowEditText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableImage",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowEditImage",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableChildren",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxHeight",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxSize",{get:function(){return this.defaultSize},enumerable:!1,configurable:!0}),e.prototype.getTitle=function(){return r.DiagramLocalizationService.shapeTexts[this.key]},e.prototype.getDefaultText=function(){return this.hasDefaultText?r.DiagramLocalizationService.shapeTexts[this.key]:""},e.prototype.getDefaultImageUrl=function(){return""},e.prototype.getConnectionPoints=function(){return this.connectionPoints},e.prototype.createConnectionPoints=function(){return[new c.ConnectionPoint(.5,0,d.ConnectionPointSide.North),new c.ConnectionPoint(1,.5,d.ConnectionPointSide.East),new c.ConnectionPoint(.5,1,d.ConnectionPointSide.South),new c.ConnectionPoint(0,.5,d.ConnectionPointSide.West)]},e.prototype.processConnectionPoint=function(e,t){},e.prototype.getConnectionPointIndexForItem=function(e,t){return t},e.prototype.getConnectionPointIndexForSide=function(e){return e},e.getConnectionPointSideByGeometry=function(e){return e.x>=e.y&&(e.x>0||e.y>0)?e.x<.5||1-e.x>=e.y?d.ConnectionPointSide.North:d.ConnectionPointSide.East:e.x>.5||1-e.x<=e.y?d.ConnectionPointSide.South:d.ConnectionPointSide.West},e.prototype.createParameters=function(e){},e.prototype.normalizeParameters=function(e,t){},e.prototype.modifyParameters=function(e,t,n,i){throw Error("Not implemented")},e.prototype.changeParameterValue=function(e,t,n){var i=e.get(t);i.value=n(i)},e.prototype.getParameterPoints=function(e){return[]},e.prototype.getExpandedSize=function(e){return e.size},e.prototype.getCollapsedSize=function(e){return e.size},e.prototype.getToolboxHeightToWidthRatio=function(e,t){return t/e},e.prototype.allowResizeHorizontally=function(e){return!0},e.prototype.allowResizeVertically=function(e){return!0},e.prototype.createPrimitives=function(e,t){var n=[];return n=n.concat(this.createShapePrimitives(e,t)),this.enableImage&&(n=n.concat(this.createImagePrimitives(e,t))),this.enableText&&(n=n.concat(this.createTextPrimitives(e,t))),n},e.prototype.createImagePrimitives=function(e,t){return[]},e.prototype.createTextPrimitives=function(t,n){if(void 0===t.text||""===t.text)return[];var i=this.getTextRectangle(t);return[new l.TextPrimitive(i.x,i.y,t.text,a.TextOwner.Shape,i.width,i.height,e.textSpacing,t.styleText,!1,this.getTextClipPathId(n),void 0,this.getTextAngle())]},e.prototype.getTextClipPathId=function(e){},e.prototype.getTextAngle=function(){return l.TextAngle.Angle0deg},e.prototype.getClientRectangle=function(e){return e.rectangle},e.prototype.getTextEditRectangle=function(e){return this.getTextRectangle(e)},e.prototype.createSelectorPrimitives=function(e){return[new s.RectanglePrimitive(e.position.x,e.position.y,e.size.width,e.size.height,null,"selector")]},e.prototype.raiseShapeDescriptionChanged=function(e){this.onChanged.raise1((function(t){return t.notifyShapeDescriptionChanged(e)}))},e.textSpacing=i.UnitConverter.pixelsToTwips(2),e}();t.ShapeDescription=h},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHistoryItem=t.HistoryItem=void 0;var r=function(){function e(){this.uniqueId=-1}return e.prototype.changeModified=function(){return!0},e.prototype.getName=function(){return this.constructor.name},e}();t.HistoryItem=r;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.historyItems=[],t.dataSyncItems=[],t}return o(t,e),t.prototype.changeModified=function(){for(var e,t=0;e=this.historyItems[t];t++)if(e.changeModified())return!0;return!1},t.prototype.redo=function(e){for(var t,n=0;t=this.historyItems[n];n++)t.redo(e)},t.prototype.undo=function(e){for(var t,n=this.dataSyncItems.length-1;t=this.dataSyncItems[n];n--)t.undo(e);for(this.dataSyncItems=[],n=this.historyItems.length-1;t=this.historyItems[n];n--)t.undo(e)},t.prototype.add=function(e){if(null==e)throw new Error("cannot be null");this.historyItems.push(e)},t}(r);t.CompositionHistoryItem=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramItem=t.DEFAULT_ZINDEX=t.ConnectionPointSide=void 0;var i,o=n(13),r=n(35),a=n(3),s=n(26);!function(e){e[e.Undefined=-1]="Undefined",e[e.North=0]="North",e[e.East=1]="East",e[e.South=2]="South",e[e.West=3]="West"}(i=t.ConnectionPointSide||(t.ConnectionPointSide={})),t.DEFAULT_ZINDEX=0;var l=function(){function e(){this.key=void 0,this.dataKey=void 0,this.customData=void 0,this.attachedConnectors=[],this.zIndex=t.DEFAULT_ZINDEX,this.locked=!1,this.container=void 0,this.style=new s.Style,this.styleText=new s.TextStyle}return e.prototype.assign=function(e){e.key=this.key,e.dataKey=this.dataKey,e.customData=a.ObjectUtils.cloneObject(this.customData),e.locked=this.locked,e.attachedConnectors=this.attachedConnectors.slice(),e.style=this.style.clone(),e.styleText=this.styleText.clone(),e.zIndex=this.zIndex,e.container=this.container},e.prototype.getConnectionPointPosition=function(e,t){return this.getConnectionPoint(e,t).toPoint()},e.prototype.getConnectionPoint=function(e,t){e<0&&t&&(e=this.getNearestConnectionPoint(t));var n=this.getConnectionPoints();return n[e]||n[0]},e.prototype.getNearestConnectionPoint=function(e){var t,n=Number.MAX_VALUE;return this.getConnectionPoints().forEach((function(i,o){var a=r.Metrics.euclideanDistance(i,e);at[n].y||e===i.West&&o.xt[n].x?r:n}),0)},e.prototype.getConnectionPointSideByIndex=function(e,t){var n=this.getConnectionPoint(e,t);return this.getConnectionPointSide(n,t)},e.prototype.getConnectionPointIndexForSide=function(e){return e},Object.defineProperty(e.prototype,"enableText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowEditText",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTemplate",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enableChildren",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLocked",{get:function(){return this.locked||this.container&&this.container.isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowResizeHorizontally",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowResizeVertically",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.style.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.intersectedByRect=function(e){return o.Rectangle.areIntersected(this.rectangle,e)},e}();t.DiagramItem=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleCommandBase=void 0;var r=n(197),a=n(198),s=n(4),l=n(36),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getState=function(){return new a.SimpleCommandState(this.isEnabled(),this.getValue(),this.getDefaultValue(),this.getItems(),this.isVisible())},t.prototype.isVisible=function(){return!0},t.prototype.isEnabled=function(){return!this.control.settings.readOnly||this.isEnabledInReadOnlyMode()},t.prototype.isEnabledInReadOnlyMode=function(){return!1},t.prototype.getValue=function(){},t.prototype.getDefaultValue=function(){},t.prototype.getItems=function(){},t.prototype.getModelUnit=function(e){return s.ModelUtils.getlUnitValue(this.control.model.units,e)},t.prototype.getModelUnitText=function(e){return s.ModelUtils.getUnitText(this.control.model.units,l.DiagramLocalizationService.unitItems,l.DiagramLocalizationService.formatUnit,e)},t.prototype.getModelUnitTwipsValue=function(e){return s.ModelUtils.getTwipsValue(this.control.model.units,e)},t.prototype.getViewUnit=function(e){return s.ModelUtils.getlUnitValue(this.control.settings.viewUnits,e)},t.prototype.getViewUnitText=function(e){return s.ModelUtils.getUnitText(this.control.settings.viewUnits,l.DiagramLocalizationService.unitItems,l.DiagramLocalizationService.formatUnit,e)},t.prototype.getViewUnitTwipsValue=function(e){return s.ModelUtils.getTwipsValue(this.control.settings.viewUnits,e)},t}(r.CommandBase);t.SimpleCommandBase=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramClipboardEvent=t.DiagramKeyboardEvent=t.DiagramContextMenuEvent=t.DiagramWheelEvent=t.DiagramMouseEvent=t.DiagramMouseEventBase=t.DiagramMouseEventTouch=t.DiagramFocusEvent=t.DiagramEvent=t.ResizeEventSource=t.MouseEventSource=t.MouseEventElementType=t.MouseButton=void 0;var r=n(25);!function(e){e[e.None=0]="None",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Middle=4]="Middle"}(t.MouseButton||(t.MouseButton={})),function(e){e[e.Undefined=0]="Undefined",e[e.Background=1]="Background",e[e.Document=2]="Document",e[e.Connector=3]="Connector",e[e.ConnectorPoint=4]="ConnectorPoint",e[e.ConnectorSide=5]="ConnectorSide",e[e.ConnectorOrthogonalSide=6]="ConnectorOrthogonalSide",e[e.ConnectorText=7]="ConnectorText",e[e.Shape=8]="Shape",e[e.ShapeResizeBox=9]="ShapeResizeBox",e[e.ShapeParameterBox=10]="ShapeParameterBox",e[e.SelectionRect=11]="SelectionRect",e[e.ShapeConnectionPoint=12]="ShapeConnectionPoint",e[e.ShapeExpandButton=13]="ShapeExpandButton"}(t.MouseEventElementType||(t.MouseEventElementType={}));var a=function(){return function(e,t,n){this.type=e,this.key=t,this.value=n}}();t.MouseEventSource=a,function(e){e[e.Undefined=0]="Undefined",e[e.ResizeBox_NW=1]="ResizeBox_NW",e[e.ResizeBox_NE=2]="ResizeBox_NE",e[e.ResizeBox_SE=3]="ResizeBox_SE",e[e.ResizeBox_SW=4]="ResizeBox_SW",e[e.ResizeBox_N=5]="ResizeBox_N",e[e.ResizeBox_E=6]="ResizeBox_E",e[e.ResizeBox_S=7]="ResizeBox_S",e[e.ResizeBox_W=8]="ResizeBox_W"}(t.ResizeEventSource||(t.ResizeEventSource={}));var s=function(){return function(e){this.modifiers=e}}();t.DiagramEvent=s;var l=function(e){function t(t){var n=e.call(this,r.ModifierKey.None)||this;return n.inputText=t,n}return o(t,e),t}(s);t.DiagramFocusEvent=l;var u=function(){return function(e,t){this.offsetPoint=e,this.modelPoint=t}}();t.DiagramMouseEventTouch=u;var c=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.offsetPoint=n,r.modelPoint=i,r.source=o,r}return o(t,e),t}(s);t.DiagramMouseEventBase=c;var d=function(e){function t(t,n,i,o,r,a,s){void 0===a&&(a=[]);var l=e.call(this,t,i,o,r)||this;return l.button=n,l.touches=a,l.isTouchMode=s,l.scrollX=0,l.scrollY=0,l}return o(t,e),t}(c);t.DiagramMouseEvent=d;var h=function(e){function t(t,n,i,o,r,a){var s=e.call(this,t,o,r,a)||this;return s.deltaX=n,s.deltaY=i,s}return o(t,e),t}(c);t.DiagramWheelEvent=h;var p=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.eventPoint=n,o.modelPoint=i,o}return o(t,e),t}(s);t.DiagramContextMenuEvent=p;var f=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.keyCode=n,o.inputText=i,o}return o(t,e),t.prototype.getShortcutCode=function(){return this.modifiers|this.keyCode},t}(s);t.DiagramKeyboardEvent=f;var m=function(e){function t(t){var n=e.call(this,r.ModifierKey.None)||this;return n.clipboardData=t,n}return o(t,e),t}(s);t.DiagramClipboardEvent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.hundredthsOfMillimeterToTwipsRound=function(e){return Math.round(1440*e/2540)},e.documentsToTwips=function(e){return 24*e/5},e.pixelsToTwips=function(t){return Math.round(e.pixelsToTwipsF(t))},e.pixelsToTwipsCustomDpi=function(t,n){return Math.round(e.pixelsToTwipsFCustomDpi(t,n))},e.inchesToTwips=function(t){return Math.round(e.inchesToTwipsF(t))},e.pointsToTwips=function(t){return Math.round(e.pointsToTwipsF(t))},e.picasToTwips=function(t){return Math.round(1440*t/e.PICAS_PER_INCH)},e.centimetersToTwips=function(t){return Math.round(e.centimetersToTwipsF(t))},e.pixelsToTwipsF=function(t){return 1440*t/e.DPI},e.pixelsToTwipsFCustomDpi=function(e,t){return 1440*e/t},e.inchesToTwipsF=function(e){return 1440*e},e.pointsToTwipsF=function(e){return 20*e},e.centimetersToTwipsF=function(t){return 1440*t/e.CENTIMETERS_PER_INCH},e.twipsToDegrees=function(e){return e/6e4},e.twipsToRadians=function(e){return e/6e4*Math.PI/180},e.degreesToTwips=function(e){return 6e4*e},e.radiansToTwips=function(e){return 6e4*e/Math.PI*180},e.radiansToDegrees=function(e){return e/Math.PI*180},e.twipsToFD=function(e){return Math.round(2048*e/1875)},e.fdToTwips=function(e){return Math.round(1875*e/2048)},e.emuToTwips=function(e){return e/635},e.twipsToPixels=function(t){return Math.round(e.twipsToPixelsF(t))},e.inchesToPixels=function(t){return Math.round(e.DPI*t)},e.centimeterToPixel=function(e){return Math.round(this.centimeterToPixelF(e))},e.centimeterToPixelF=function(t){return t*e.DPI/e.CENTIMETERS_PER_INCH},e.millimetersToPixel=function(t){return Math.round(t/(e.CENTIMETERS_PER_INCH/e.DPI)/10)},e.pointsToPixels=function(t){return Math.round(t*e.DPI/72)},e.pointsToPixelsF=function(t){return t*e.DPI/72},e.twipsToPixelsF=function(t){return t*e.DPI/1440},e.pixelsToPoints=function(t){return Math.round(72*t/e.DPI)},e.pixelsToPointsF=function(t){return 72*t/e.DPI},e.twipsToPoints=function(e){return Math.round(this.twipsToPointsF(e))},e.twipsToPointsF=function(e){return e/20},e.twipsToInches=function(e){return e/1440},e.pixelsToInches=function(t){return t/e.DPI},e.twipsToCentimeters=function(t){return t*e.CENTIMETERS_PER_INCH/1440},e.pixelToCentimeters=function(t){return t*e.CENTIMETERS_PER_INCH/e.DPI},e.twipsToHundredthsOfMillimeter=function(e){return Math.round(127*e/72)},e.pixelsToHundredthsOfMillimeter=function(t){return Math.round(2540*t/e.DPI)},e.hundredthsOfMillimeterToTwips=function(e){return 15*e/127},e.twipsToEmu=function(e){return 635*e},e.twipsToDegree=function(e){return e/6e4},e.DPI=96,e.CENTIMETERS_PER_INCH=2.54,e.PICAS_PER_INCH=6,e}();t.UnitConverter=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(163),r=n(164),a=n(106),s=n(0),l=n(2),u=function(){function e(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}return Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return e.center(this)},enumerable:!0,configurable:!0}),e.prototype.createRectangle=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.createSize=function(){return new l.Size(this.width,this.height)},e.prototype.createPosition=function(){return new s.Point(this.x,this.y)},e.prototype.createVerticalInterval=function(){return new a.FixedInterval(this.y,this.height)},e.prototype.createHorizontalInterval=function(){return new a.FixedInterval(this.x,this.width)},e.fromGeometry=function(t,n){return new e(t.x,t.y,n.width,n.height)},e.fromPoints=function(t,n){return new e(Math.min(t.x,n.x),Math.min(t.y,n.y),Math.abs(t.x-n.x),Math.abs(t.y-n.y))},e.fromPositions=function(t,n,i,o){return new e(Math.min(t,i),Math.min(n,o),Math.abs(i-t),Math.abs(o-n))},e.fromCenter=function(t,n){return new e(t.x-n,t.y-n,2*n,2*n)},e.prototype.isCollapsed=function(){return 0===this.width||0===this.height},e.prototype.isEmpty=function(){return 0===this.x&&0===this.y&&0===this.width&&0===this.height},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.setPosition=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.setSize=function(e){return this.width=e.width,this.height=e.height,this},e.prototype.setGeomerty=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},e.prototype.moveRectangle=function(e,t){return this.x+=e,this.y+=t,this},e.prototype.moveRectangleByPoint=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.resize=function(e,t){return this.width+=e,this.height+=t,this},e.prototype.nonNegativeSize=function(){return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this},e.prototype.multiply=function(e,t){return this.x*=e,this.y*=t,this.width*=e,this.height*=t,this},e.prototype.equals=function(t){return e.equals(this,t)},e.prototype.clone=function(){var t=new e(0,0,0,0);return t.copyFrom(this),t},e.prototype.copyFrom=function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},e.prototype.containsPoint=function(t){return e.containsPoint(this,t)},e.prototype.containsRectangle=function(e){return this.x<=e.x&&this.right>=e.right&&this.y<=e.y&&this.bottom>=e.bottom},e.prototype.inflate=function(e,t){return void 0===t&&(t=e),this.x-=e,this.y-=t,this.width+=2*e,this.height+=2*t,this},e.prototype.applyOffsetsInside=function(e){return this.x+=e.left,this.y+=e.top,this.width-=e.left+e.right,this.height-=e.top+e.bottom,this},e.prototype.applyNormalizedOffsetsInside=function(e){var t=Math.max(0,e.left),n=t+Math.max(0,e.right);0!==n&&(n<=this.width?(this.x+=t,this.width-=n):(this.x+=this.width*(t/n),this.width=0));var i=Math.max(0,e.top),o=i+Math.max(0,e.bottom);return 0!==o&&(o<=this.height?(this.y+=i,this.height-=o):(this.y+=this.height*(i/o),this.height=0)),this},e.prototype.applyOffsetsOutside=function(e){return this.x-=e.left,this.y-=e.top,this.width+=e.left+e.right,this.height+=e.top+e.bottom,this},e.prototype.applyConverter=function(e){return this.x=e(this.x),this.y=e(this.y),this.width=e(this.width),this.height=e(this.height),this},e.getHorizIntersection=function(e,t){return r.IntervalAlgorithms.getIntersection(new a.FixedInterval(e.x,e.width),new a.FixedInterval(t.x,t.width))},e.getVertIntersection=function(e,t){return r.IntervalAlgorithms.getIntersection(new a.FixedInterval(e.y,e.height),new a.FixedInterval(t.y,t.height))},e.getIntersection=function(t,n){var i=r.IntervalAlgorithms.getIntersection(new a.FixedInterval(t.x,t.width),new a.FixedInterval(n.x,n.width));if(!i)return null;var o=r.IntervalAlgorithms.getIntersection(new a.FixedInterval(t.y,t.height),new a.FixedInterval(n.y,n.height));return o?new e(i.start,o.start,i.length,o.length):null},e.getHorNonCollapsedIntersection=function(t,n){var i=e.getHorizIntersection(t,n);return i&&!i.isCollapsed()?i:null},e.getVertNonCollapsedIntersection=function(t,n){var i=e.getVertIntersection(t,n);return i&&!i.isCollapsed()?i:null},e.getNonCollapsedIntersection=function(t,n){var i=e.getIntersection(t,n);return i&&!i.isCollapsed()?i:null},e.areIntersected=function(e,t){return!(e.x>t.x+t.width||t.x>e.x+e.width||e.y>t.y+t.height||t.y>e.y+e.height)},e.union=function(t,n){var i=Math.max(t.x+t.width,n.x+n.width),o=Math.max(t.y+t.height,n.y+n.height),r=Math.min(t.x,n.x),a=Math.min(t.y,n.y);return new e(r,a,i-r,o-a)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},e.center=function(e){return new s.Point(e.x+e.width/2,e.y+e.height/2)},e.containsPoint=function(e,t){var n=e.x+e.width,i=e.y+e.height;return t.y>=e.y&&i>=t.y&&t.x>=e.x&&n>=t.x},e}();t.Rectangle=u,function(e){e[e.None=0]="None",e[e.Top=1]="Top",e[e.Bottom=2]="Bottom",e[e.Left=4]="Left",e[e.Right=8]="Right"}(i=t.HitTestDeviation||(t.HitTestDeviation={}));var c=function(){function e(e,t){this.initRectangle=e,this.initPoint=t,this.deviation=new o.Flag(i.None)}return e.prototype.calcDeviation=function(){return this.initPoint.xthis.initRectangle.right&&this.deviation.set(i.Right,!0),this.initPoint.ythis.initRectangle.bottom&&this.deviation.set(i.Bottom,!0),this},e.prototype.calcAdditionalParams=function(){return this.insidePoint=this.initPoint.clone(),this.offsetToInside=new s.Point(0,0),this.deviation.get(i.Left)?(this.insidePoint.x=this.initRectangle.x,this.offsetToInside.x=this.insidePoint.x-this.initPoint.x):this.deviation.get(i.Right)&&(this.insidePoint.x=this.initRectangle.right,this.offsetToInside.x=this.initPoint.x-this.insidePoint.x),this.deviation.get(i.Top)?(this.insidePoint.y=this.initRectangle.y,this.offsetToInside.y=this.insidePoint.y-this.initPoint.y):this.deviation.get(i.Bottom)&&(this.insidePoint.y=this.initRectangle.bottom,this.offsetToInside.y=this.initPoint.y-this.insidePoint.y),this},e}();t.RectangleDeviation=c},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=void 0;var r=n(13),a=n(7),s=n(37),l=n(9),u=n(45),c=n(51),d=n(84),h=function(e){function t(t,n,i){var o=e.call(this)||this;if(o.description=t,o.children=[],o.expanded=!0,o.expandedSize=void 0,!t)throw Error("Shape type is incorrect");o.position=n.clone();var r=i?t.toolboxSize:t.defaultSize;return o.size=r.clone(),o.text=t.getDefaultText(),o.image=new c.ImageInfo(t.getDefaultImageUrl()),o.parameters=new s.ShapeParameters,t.createParameters(o.parameters),o}return o(t,e),t.prototype.assign=function(t){e.prototype.assign.call(this,t),t.size=this.size.clone(),t.text=this.text,t.image=this.image.clone(),t.parameters=this.parameters.clone(),t.children=this.children.slice(),t.expanded=this.expanded,this.expandedSize&&(t.expandedSize=this.expandedSize.clone())},t.prototype.clone=function(){var e=new t(this.description,this.position.clone());return this.assign(e),e},Object.defineProperty(t.prototype,"enableText",{get:function(){return this.description.enableText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditText",{get:function(){return this.description.allowEditText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTemplate",{get:function(){return this.description.hasTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableChildren",{get:function(){return this.description.enableChildren},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableImage",{get:function(){return this.description.enableImage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditImage",{get:function(){return this.description.allowEditImage},enumerable:!1,configurable:!0}),t.prototype.getMinWidth=function(e){return"number"==typeof this.description.minWidth?this.description.minWidth:"number"==typeof e?e:a.ShapeMinDimension},t.prototype.getMinHeight=function(e){return"number"==typeof this.description.minHeight?this.description.minHeight:"number"==typeof e?e:a.ShapeMinDimension},t.prototype.getMaxWidth=function(e){return"number"==typeof this.description.maxWidth?this.description.maxWidth:"number"==typeof e?e:void 0},t.prototype.getMaxHeight=function(e){return"number"==typeof this.description.maxHeight?this.description.maxHeight:"number"==typeof e?e:void 0},t.prototype.createPrimitives=function(){return this.description.createPrimitives(this)},t.prototype.createSelectorPrimitives=function(){return this.description.createSelectorPrimitives(this)},t.prototype.normalizeX=function(e){return Math.max(this.position.x,Math.min(e,this.position.x+this.size.width))},t.prototype.normalizeY=function(e){return Math.max(this.position.y,Math.min(e,this.position.y+this.size.height))},t.prototype.getConnectionPoints=function(){var e=this;return this.description.getConnectionPoints().map((function(t){var n=new u.ConnectionPoint(e.position.x+t.x*e.size.width,e.position.y+t.y*e.size.height,t.side);return e.description.processConnectionPoint(e,n),n}))},t.prototype.getConnectionPointSide=function(e,t){return e.side!==l.ConnectionPointSide.Undefined?e.side:this.getConnectionPointSideByGeometry(e)},t.prototype.getConnectionPointSideByGeometry=function(e){var t=e.clone().offset(-this.position.x,-this.position.y).multiply(1/this.size.width,1/this.size.height);return a.ShapeDescription.getConnectionPointSideByGeometry(t)},t.prototype.getConnectionPointIndexForItem=function(e,t){return this.description.getConnectionPointIndexForItem(e,t)},t.prototype.getConnectionPointIndexForSide=function(e){return this.description.getConnectionPointIndexForSide(e)},t.prototype.toggleExpandedSize=function(){this.expanded?(this.size=this.getExpandedSize(),this.expandedSize=void 0):(this.expandedSize=this.size.clone(),this.size=this.getCollapsedSize())},t.prototype.getExpandedSize=function(){return this.description.getExpandedSize(this)},t.prototype.getCollapsedSize=function(){return this.description.getCollapsedSize(this)},t.prototype.getToolboxHeightToWidthRatio=function(){return this.description.getToolboxHeightToWidthRatio(this.size.width,this.size.height)},Object.defineProperty(t.prototype,"allowResizeHorizontally",{get:function(){return this.description.allowResizeHorizontally(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowResizeVertically",{get:function(){return this.description.allowResizeVertically(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectangle",{get:function(){return r.Rectangle.fromGeometry(this.position,this.size)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientRectangle",{get:function(){return this.description.getClientRectangle(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textRectangle",{get:function(){return this.description.getTextRectangle(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditRectangle",{get:function(){return this.description.getTextEditRectangle(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textAngle",{get:function(){return this.description.getTextAngle()},enumerable:!1,configurable:!0}),t.prototype.toNative=function(e){var t=new d.NativeShape(this.key,this.dataKey);return t.type=this.description.key,t.text=this.text,t.position=this.position.clone(),t.size=this.size.clone(),t.attachedConnectorIds=this.attachedConnectors.map((function(e){return e.key})),t.applyUnits(e),t.containerId=this.container?this.container.key:null,t.containerChildItemIds=this.children.map((function(e){return e.key})),t.containerExpanded=this.expanded,t},t}(l.DiagramItem);t.Shape=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderHelper=t.svgNS=void 0;var i=n(61);t.svgNS="http://www.w3.org/2000/svg";var o=function(){function e(){}return e.createSvgElement=function(e,n){void 0===n&&(n=!1);var i=document.createElementNS(t.svgNS,"svg");return i.className.baseVal="dxdi-canvas"+(n?" export":""),e&&e.appendChild(i),i},e.createMainElement=function(e,t){void 0===t&&(t=!1);var n=document.createElement("div");return n.setAttribute("class","dxdi-control"+(t?" measurer":"")),i.Diagnostics.optimizeLayers&&(n.style.transform="translateZ(0)"),e&&e.appendChild(n),n},e.addEventListener=function(e,t,n){e.addEventListener(t,n)},e.removeEventListener=function(e,t,n){e.removeEventListener(t,n)},e}();t.RenderHelper=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramModelOperation=t.ModelOperationSettings=void 0;var i=function(){function e(){this._addShape=!0,this._addShapeFromToolbox=!0,this._deleteShape=!0,this._deleteConnector=!0,this._changeConnection=!0,this._changeConnectorPoints=!0,this._changeShapeText=!0,this._changeConnectorText=!0,this._resizeShape=!0,this._moveShape=!0}return Object.defineProperty(e.prototype,"addShape",{get:function(){return this._addShape},set:function(e){e!==this._addShape&&(this._addShape=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"addShapeFromToolbox",{get:function(){return this._addShapeFromToolbox},set:function(e){e!==this._addShapeFromToolbox&&(this._addShapeFromToolbox=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteShape",{get:function(){return this._deleteShape},set:function(e){e!==this._deleteShape&&(this._deleteShape=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteConnector",{get:function(){return this._deleteConnector},set:function(e){e!==this._deleteConnector&&(this._deleteConnector=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeConnection",{get:function(){return this._changeConnection},set:function(e){e!==this._changeConnection&&(this._changeConnection=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeConnectorPoints",{get:function(){return this._changeConnectorPoints},set:function(e){e!==this._changeConnectorPoints&&(this._changeConnectorPoints=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeShapeText",{get:function(){return this._changeShapeText},set:function(e){e!==this._changeShapeText&&(this._changeShapeText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeConnectorText",{get:function(){return this._changeConnectorText},set:function(e){e!==this._changeConnectorText&&(this._changeConnectorText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resizeShape",{get:function(){return this._resizeShape},set:function(e){e!==this._resizeShape&&(this._resizeShape=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moveShape",{get:function(){return this._moveShape},set:function(e){e!==this._moveShape&&(this._moveShape=e)},enumerable:!1,configurable:!0}),e.prototype.applySettings=function(e){e&&("boolean"==typeof e.addShape&&(this.addShape=e.addShape),"boolean"==typeof e.addShapeFromToolbox&&(this.addShapeFromToolbox=e.addShapeFromToolbox),"boolean"==typeof e.deleteShape&&(this.deleteShape=e.deleteShape),"boolean"==typeof e.deleteConnector&&(this.deleteConnector=e.deleteConnector),"boolean"==typeof e.changeConnection&&(this.changeConnection=e.changeConnection),"boolean"==typeof e.changeConnectorPoints&&(this.changeConnectorPoints=e.changeConnectorPoints),"boolean"==typeof e.changeShapeText&&(this.changeShapeText=e.changeShapeText),"boolean"==typeof e.changeConnectorText&&(this.changeConnectorText=e.changeConnectorText),"boolean"==typeof e.resizeShape&&(this.resizeShape=e.resizeShape),"boolean"==typeof e.moveShape&&(this.moveShape=e.moveShape))},e}();t.ModelOperationSettings=i,function(e){e[e.AddShape=0]="AddShape",e[e.AddShapeFromToolbox=1]="AddShapeFromToolbox",e[e.DeleteShape=2]="DeleteShape",e[e.DeleteConnector=3]="DeleteConnector",e[e.ChangeConnection=4]="ChangeConnection",e[e.ChangeConnectorPoints=5]="ChangeConnectorPoints",e[e.BeforeChangeShapeText=6]="BeforeChangeShapeText",e[e.ChangeShapeText=7]="ChangeShapeText",e[e.BeforeChangeConnectorText=8]="BeforeChangeConnectorText",e[e.ChangeConnectorText=9]="ChangeConnectorText",e[e.ResizeShape=10]="ResizeShape",e[e.MoveShape=11]="MoveShape"}(t.DiagramModelOperation||(t.DiagramModelOperation={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raiseEvent=t.RenderUtils=void 0;var i=n(11),o=n(31),r=function(){function e(){}return e.updateSvgElementSize=function(e,t,n,i){e.style.width=t+"px",e.style.height=n+"px",e.setAttribute("viewBox","0 0 "+t+" "+n),i&&(e.setAttribute("width",t.toString()),e.setAttribute("height",n.toString()))},e.removeElement=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.removeContent=function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},e.setElementEventData=function(e,t,n,o){t!==i.MouseEventElementType.Undefined&&(e.setAttribute("data-type",t.toString()),void 0!==n&&e.setAttribute("data-key",n.toString()),void 0!==o&&e.setAttribute("data-value",o.toString()))},e.getElementEventData=function(e){if(e.getAttribute&&e.getAttribute("data-type"))return new i.MouseEventSource(parseInt(e.getAttribute("data-type")),e.getAttribute("data-key"),e.getAttribute("data-value"));var t=e.getAttribute&&e.getAttribute("class");return"dxdi-page"===t||"dxdi-main"===t?new i.MouseEventSource(i.MouseEventElementType.Document):void 0},e.getHtmlElementStylePropertyName=function(e){switch(e){case"fill":return"color";case"text-anchor":return"text-align"}return e},e.getTextAnchorValue=function(e,t){if(void 0===t&&(t=!1),t){if("start"===e)return"end";if("end"===e)return"start"}return e},e.getStrokeDasharrayValue=function(e,t){if(t){var n=e&&e.toString();return(n?n.split(/[\s,]+/):[]).map((function(e){return parseInt(e)/2*t})).join(",")}return e},e.applyStyleToElement=function(e,t,n){var i=this;void 0===n&&(n=!1);var o=e.getDefaultInstance();e.forEach((function(r){var a=e[r],s=t instanceof HTMLElement?i.getHtmlElementStylePropertyName(r):r;if(void 0!==a&&""!==a&&a!==o[r]){switch(r){case"text-anchor":a=i.getTextAnchorValue(a,n);break;case"stroke-dasharray":a=i.getStrokeDasharrayValue(a,parseInt(e["stroke-width"]))}t.style.setProperty(s,a)}else t.style.setProperty(s,"")}))},e.generateSvgElementId=function(e){return e+"_"+o.MathUtils.generateGuid()},e.getUrlPathById=function(e){return"url(#"+e+")"},e}();t.RenderUtils=r,t.raiseEvent=function(e,t,n){n(t),t.preventDefault&&e.preventDefault()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.IdentUserAgent=function(t,n){void 0===n&&(n=!1);var i=["Mozilla","IE","Firefox","Netscape","Safari","Chrome","Opera","Opera10","Edge"],o={Safari:2,Chrome:.1,Mozilla:1.9,Netscape:8,Firefox:2,Opera:9,IE:6,Edge:12};if(t&&0!==t.length){t=t.toLowerCase(),e.indentPlatformMajorVersion(t);try{for(var r={Windows:"Win",Macintosh:"Mac","Mac OS":"Mac",Mac_PowerPC:"Mac","cpu os":"MacMobile","cpu iphone os":"MacMobile",Android:"Android","!Windows Phone":"WinPhone","!WPDesktop":"WinPhone","!ZuneWP":"WinPhone"},a="(?:(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?)?",s={Safari:"applewebkit(?:.*?(?:version/(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?[\\.\\w\\d]*?(?:\\s+mobile/\\S*)?\\s+safari))?",Chrome:"(?:chrome|crios)(?!frame)(?:/|\\s*)?"+a,Mozilla:"mozilla(?:.*rv:"+a+".*Gecko)?",Netscape:"(?:netscape|navigator)\\d*/?\\s*"+a,Firefox:"firefox(?:/|\\s*)?"+a,Opera:"(?:opera|\\sopr)(?:/|\\s*)?"+a,Opera10:"opera.*\\s*version(?:/|\\s*)?"+a,IE:"msie\\s*"+a,Edge:"edge(?:/|\\s*)?"+a},l=null,u=-1,c=0;c=0){if("IE"===l&&u>=11&&"Safari"===d)continue;"Opera10"===(l=d)&&(l="Opera"),u=e.GetBrowserVersion(t,h,"trident(?:/|\\s*)?(?:(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?)?",e.getIECompatibleVersionString()),"Mozilla"===l&&u>=11&&(l="IE")}}l||(l="IE");var p=-1!==u;p||(u=o[l]);var f=null,m=Number.MAX_VALUE;for(var g in r)if(Object.prototype.hasOwnProperty.call(r,g)){var v="!"===g.substr(0,1),_=t.indexOf((v?g.substr(1):g).toLowerCase());_>=0&&(_0;"WinPhone"===f&&u<9&&(u=Math.floor(e.getVersionFromTrident(t,"trident(?:/|\\s*)?"+a))),!n&&"IE"===l&&u>7&&document.documentMode0},e.hasMsMaxTouchPoints=function(){return navigator.msMaxTouchPoints>0},e.hasNavigator=function(){return"undefined"!=typeof navigator},e.fillUserAgentInfo=function(t,n,i,o,r){void 0===r&&(r=!1);for(var a=0;a=15,e.NetscapeFamily=e.Netscape||e.Mozilla||e.Firefox,e.WebKitTouchUI=e.MacOSMobilePlatform||e.AndroidMobilePlatform;var l=e.IE&&e.MajorVersion>9&&e.WindowsPlatform&&e.UserAgent.toLowerCase().indexOf("touch")>=0;if(e.MSTouchUI=l||e.Edge&&!!window.navigator.maxTouchPoints,e.TouchUI=e.WebKitTouchUI||e.MSTouchUI,e.MobileUI=e.WebKitTouchUI||e.WindowsPhonePlatform,e.AndroidDefaultBrowser=e.AndroidMobilePlatform&&!e.Chrome,e.AndroidChromeBrowser=e.AndroidMobilePlatform&&e.Chrome,r&&(e.SamsungAndroidDevice=r),e.MSTouchUI){var u=e.UserAgent.toLowerCase().indexOf("arm;")>-1;e.VirtualKeyboardSupported=u||e.WindowsPhonePlatform}else e.VirtualKeyboardSupported=e.WebKitTouchUI;e.fillDocumentElementBrowserTypeClassNames(t)},e.indentPlatformMajorVersion=function(t){var n=/(?:(?:windows nt|macintosh|mac os|cpu os|cpu iphone os|android|windows phone|linux) )(\d+)(?:[-0-9_.])*/.exec(t);n&&(e.PlaformMajorVersion=n[1])},e.getVersionFromMatches=function(e){var t=-1,n="";return e&&(e[1]&&(n+=e[1],e[2]&&(n+="."+e[2])),""!==n&&(t=parseFloat(n),isNaN(t)&&(t=-1))),t},e.getVersionFromTrident=function(t,n){var i=new RegExp(n,"i").exec(t);return e.getVersionFromMatches(i)+4},e.fillDocumentElementBrowserTypeClassNames=function(t){for(var n="",i=t.concat(["WindowsPlatform","MacOSPlatform","MacOSMobilePlatform","AndroidMobilePlatform","WindowsPhonePlatform","WebKitFamily","WebKitTouchUI","MSTouchUI","TouchUI","AndroidDefaultBrowser"]),o=0;or.Connector.minOffset?2*e:r.Connector.minOffset;this.columnSpacing=t,this.layerSpacing=2*t,this.containerPadding=2*t,this.componentSpacing=2*t}}();t.LayoutSettings=a;var s,l,u,c=function(e){function t(t){var n=e.call(this,t)||this;return n.alignment=u.Center,n.subTreeColumnSpacing=n.componentSpacing/2,n}return o(t,e),t}(a);t.TreeLayoutSettings=c,function(e){e[e.Backward=0]="Backward",e[e.Forward=1]="Forward"}(s=t.LogicalDirectionKind||(t.LogicalDirectionKind={})),function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical"}(l=t.DataLayoutOrientation||(t.DataLayoutOrientation={})),function(e){e[e.Left=0]="Left",e[e.Center=1]="Center"}(u=t.Alignment||(t.Alignment={}))},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RectanglePrimitive=void 0;var r=n(15),a=function(e){function t(t,n,i,o,r,a,s,l){var u=e.call(this,r,a,s,l)||this;return u.x=t,u.y=n,u.width=i,u.height=o,u}return o(t,e),t.prototype.createMainElement=function(){return document.createElementNS(r.svgNS,"rect")},t.prototype.applyElementProperties=function(t,n){this.setUnitAttribute(t,"x",this.x),this.setUnitAttribute(t,"y",this.y),this.setUnitAttribute(t,"width",this.width),this.setUnitAttribute(t,"height",this.height),this.setPositionCorrectionAttribute(t),e.prototype.applyElementProperties.call(this,t,n)},t}(n(24).SvgPrimitive);t.RectanglePrimitive=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(49),o=function(){function e(){}return e.getAlpha=function(e){return e>>24&255},e.getRed=function(e){return e>>16&255},e.getGreen=function(e){return e>>8&255},e.getBlue=function(e){return 255&e},e.redPartToString=function(t){var n=e.getRed(t).toString(16);return n.length>1?n:"0"+n},e.greenPartToString=function(t){var n=e.getGreen(t).toString(16);return n.length>1?n:"0"+n},e.bluePartToString=function(t){var n=e.getBlue(t).toString(16);return n.length>1?n:"0"+n},e.fromArgbNumber=function(e,t,n,i){return e<<24|t<<16|n<<8|i},e.fromRgbaString=function(e,t){void 0===t&&(t=255);var n=e.replace(/ +/g,"").match(/(rgba?)|(\d+(\.\d+)?%?)|(\.\d+)/g);if(n&&n.length>3){for(var i=[],o=1,r=void 0;r=n[o];o++){var a=-1!==r.indexOf("%")?Math.round(2.55*parseFloat(r)):parseInt(r);if(a<0||a>255)return null;i.push(a)}if(0===e.indexOf("rgba")){if(isNaN(i[3])||i[3]<0||i[3]>1)return null;i[3]<=1&&(i[3]=Math.round(255*i[3]))}else if(i[3])return null;return(255&i[0])<<16|(255&i[1])<<8|255&i[2]|(255&(i.length>3?i[3]:t))<<24}return null},e.fromHashString=function(t,n){return void 0===n&&(n=255),e.isHashColorString(t)?("#"===t.charAt(0)&&(t=t.substr(1)),3===t.length&&(t=i.StringUtils.repeat(t.charAt(0),2)+i.StringUtils.repeat(t.charAt(1),2)+i.StringUtils.repeat(t.charAt(2),2)),parseInt(t,16)|n<<24):null},e.fromColorName=function(t,n){void 0===n&&(n=255);var i=e.colorNames[t.toLowerCase()];return i?e.fromHashString(i,n):null},e.fromString=function(t,n){void 0===n&&(n=255);var i=e.fromRgbaString(t,n);if(null!==i)return i;var o=e.fromHashString(t,n);return null!==o?o:e.fromColorName(t,n)},e.colorToHash=function(t){return"#"+e.redPartToString(t)+e.greenPartToString(t)+e.bluePartToString(t)},e.stringToHash=function(e){var t=this.fromString(e);return null!==t?this.colorToHash(t):null},e.isHashColorString=function(e){return/^#?([0-9a-f]{6})$/i.test(e)||/^#?([0-9a-f]{3})$/i.test(e)},e.isKnownColorName=function(t){return!!e.colorNames[t.toLowerCase()]},e.isGray=function(t){var n=e.getRed(t);return n===e.getGreen(t)&&n===e.getBlue(t)},e.DARK_COLOR=-16777216,e.LIGHT_COLOR=-1,e.colorNames={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",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#00ff00",greenyellow:"#adff2f",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",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",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:"#d87093",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",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",windowtext:"#000000"},e}();t.ColorUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionRequestEventArgs=t.RequestedEntity=void 0;var i=function(){function e(e){this.apiController=e}return Object.defineProperty(e.prototype,"allowed",{get:function(){return this.eventArgs.allowed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateUI",{get:function(){return this.eventArgs.updateUI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventArgs",{get:function(){return this._eventArgs||(this._eventArgs=this.createEventArgs()),this._eventArgs},enumerable:!1,configurable:!0}),e}();t.RequestedEntity=i;var o=function(){return function(){this.allowed=!0,this.updateUI=!1}}();t.PermissionRequestEventArgs=o},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SvgPrimitive=void 0;var r=n(17),a=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.className=n,r.clipPathId=i,r.onApplyProperties=o,r.children=[],r}return o(t,e),t.prototype.createElement=function(e){var t=this.createMainElement();return this.createChildElements(t),e(t),this.createCustomContent(t),t},t.prototype.createChildElements=function(e){for(var t=0;t0)for(var d=0;d0;return i.Browser.WebKitFamily||i.Browser.Edge||t?i.Browser.MacOSMobilePlatform?window.pageYOffset:i.Browser.WebKitFamily&&document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop},e.getDocumentScrollLeft=function(){var t=i.Browser.IE&&"hidden"===e.getCurrentStyle(document.body).overflow&&document.body.scrollLeft>0;return i.Browser.Edge||t?document.body?document.body.scrollLeft:document.documentElement.scrollLeft:i.Browser.WebKitFamily?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft},e.getCurrentStyle=function(e){if(e.currentStyle)return e.currentStyle;if(document.defaultView&&document.defaultView.getComputedStyle){var t=document.defaultView.getComputedStyle(e,null);if(!t&&i.Browser.Firefox&&window.frameElement){for(var n=[],r=window.frameElement;!(t=document.defaultView.getComputedStyle(e,null));)n.push([r,r.style.display]),r.style.setProperty("display","block","important"),r="BODY"===r.tagName?r.ownerDocument.defaultView.frameElement:r.parentNode;t=function(e){if("object"!=typeof e||!o.isDefined(e))return e;var t={};for(var n in e)t[n]=e[n];return t}(t);for(var a=void 0,s=0;a=n[s];s++)a[0].style.display=a[1];document.body.offsetWidth}return t}return window.getComputedStyle(e,null)},e.setFocus=function(e){function t(){try{e.focus(),i.Browser.IE&&document.activeElement!==e&&e.focus()}catch(e){}}i.Browser.MacOSMobilePlatform?t():setTimeout((function(){t()}),100)},e.hasClassName=function(e,t){try{var n=t.split(" "),i=e.classList;if(i){for(var o=n.length-1;o>=0;o--)if(!i.contains(n[o]))return!1}else{var r=e.getAttribute&&e.getAttribute("class");if(!r)return!1;var a=r.split(" ");for(o=n.length-1;o>=0;o--)if(a.indexOf(n[o])<0)return!1}return!0}catch(e){return!1}},e.addClassName=function(t,n){if(!e.hasClassName(t,n)){var i=t.getAttribute&&t.getAttribute("class");t.setAttribute("class",""===i?n:i+" "+n)}},e.removeClassName=function(e,t){var n=" "+(e.getAttribute&&e.getAttribute("class"))+" ",i=n.replace(" "+t+" "," ");n.length!==i.length&&e.setAttribute("class",a.StringUtils.trim(i))},e.toggleClassName=function(t,n,i){void 0===i?e.hasClassName(t,n)?e.removeClassName(t,n):e.addClassName(t,n):i?e.addClassName(t,n):e.removeClassName(t,n)},e.pxToInt=function(e){return l(e,parseInt)},e.pxToFloat=function(e){return l(e,parseFloat)},e.getAbsolutePositionY=function(t){function n(t){return Math.round(t.getBoundingClientRect().top+e.getDocumentScrollTop())}return t?i.Browser.IE?function(t){return i.Browser.IE&&null===t.parentNode?0:t.getBoundingClientRect().top+e.getDocumentScrollTop()}(t):i.Browser.Firefox&&i.Browser.Version>=3?n(t):i.Browser.Opera?function(t){var n=!0;t&&e.isHTMLTableRowElement(t)&&t.cells.length>0&&(t=t.cells[0]);for(var i=u(t,!1);null!=t;)i+=t.offsetTop,n||(i-=t.scrollTop),t=t.offsetParent,n=!1;return i+document.body.scrollTop}(t):i.Browser.NetscapeFamily&&(!i.Browser.Firefox||i.Browser.Version<3)?function(t){for(var n=u(t,!1),o=!0;null!=t;){if(n+=t.offsetTop,o||null==t.offsetParent||(n-=t.scrollTop),!o&&i.Browser.Firefox){var r=e.getCurrentStyle(t);"DIV"===t.tagName&&"visible"!==r.overflow&&(n+=e.pxToInt(r.borderTopWidth))}o=!1,t=t.offsetParent}return n}(t):i.Browser.WebKitFamily||i.Browser.Edge?n(t):function(e){for(var t=0,n=!0;null!=e;)t+=e.offsetTop,n||null==e.offsetParent||(t-=e.scrollTop),n=!1,e=e.offsetParent;return t}(t):0},e.getAbsolutePositionX=function(t){function n(t){return Math.round(t.getBoundingClientRect().left+e.getDocumentScrollLeft())}return t?i.Browser.IE?function(t){return i.Browser.IE&&null===t.parentNode?0:t.getBoundingClientRect().left+e.getDocumentScrollLeft()}(t):i.Browser.Firefox&&i.Browser.Version>=3?n(t):i.Browser.Opera&&i.Browser.Version<=12?function(e){for(var t=!0,n=u(e,!0);null!=e;)n+=e.offsetLeft,t||(n-=e.scrollLeft),e=e.offsetParent,t=!1;return n+document.body.scrollLeft}(t):i.Browser.NetscapeFamily&&(!i.Browser.Firefox||i.Browser.Version<3)?function(t){for(var n=u(t,!0),o=!0;null!=t;){if(n+=t.offsetLeft,o||null==t.offsetParent||(n-=t.scrollLeft),!o&&i.Browser.Firefox){var r=e.getCurrentStyle(t);"DIV"===t.tagName&&"visible"!==r.overflow&&(n+=e.pxToInt(r.borderLeftWidth))}o=!1,t=t.offsetParent}return n}(t):i.Browser.WebKitFamily||i.Browser.Edge?n(t):function(e){for(var t=0,n=!0;null!=e;)t+=e.offsetLeft,n||null==e.offsetParent||(t-=e.scrollLeft),n=!1,e=e.offsetParent;return t}(t):0},e.isInteractiveControl=function(e){return["A","INPUT","SELECT","OPTION","TEXTAREA","BUTTON","IFRAME"].indexOf(e.tagName)>-1},e.getClearClientHeight=function(t){return t.offsetHeight-(e.getTopBottomPaddings(t)+e.getVerticalBordersWidth(t))},e.getTopBottomPaddings=function(t,n){var i=n||e.getCurrentStyle(t);return e.pxToInt(i.paddingTop)+e.pxToInt(i.paddingBottom)},e.getVerticalBordersWidth=function(t,n){o.isDefined(n)||(n=i.Browser.IE&&9!==i.Browser.MajorVersion&&window.getComputedStyle?window.getComputedStyle(t):e.getCurrentStyle(t));var r=0;return"none"!==n.borderTopStyle&&(r+=e.pxToFloat(n.borderTopWidth)),"none"!==n.borderBottomStyle&&(r+=e.pxToFloat(n.borderBottomWidth)),r},e.getNodes=function(e,t){for(var n=e.all||e.getElementsByTagName("*"),i=[],o=0;o=9||i.Browser.Edge?t.textContent:t.innerText},e.html2PlainTextFilter=null,e.verticalScrollBarWidth=void 0,e}();function l(e,t){var n=0;if(o.isDefined(e)&&""!==e)try{var i=e.indexOf("px");i>-1&&(n=t(e.substr(0,i)))}catch(e){}return n}function u(e,t){for(var n=0,i=!0;null!=e&&"BODY"!==e.tagName;){var o=s.getCurrentStyle(e);if("absolute"===o.position)break;i||"DIV"!==e.tagName||""!==o.position&&"static"!==o.position||(n-=t?e.scrollLeft:e.scrollTop),e=e.parentNode,i=!1}return n}t.DomUtils=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorRoutingMode=t.AutoZoomMode=t.DiagramSettings=void 0;var i,o,r=n(3),a=n(2),s=n(47),l=n(4),u=function(){function e(){this.onZoomChanged=new r.EventDispatcher,this.onViewChanged=new r.EventDispatcher,this.onReadOnlyChanged=new r.EventDispatcher,this.onConnectorRoutingModeChanged=new r.EventDispatcher,this._zoomLevel=1,this._zoomLevelWasChanged=!1,this._zoomLevelItems=[.5,.75,1,1.25,1.5,2,3],this._simpleView=!1,this._fullscreen=!1,this._readOnly=!1,this._autoZoom=i.Disabled,this._snapToGrid=!0,this._showGrid=!0,this._contextMenuEnabled=!0,this._gridSize=180,this._gridSizeItems=[90,180,360,720],this._pageSizeItems=[{size:new a.Size(12240,15840),text:"US-Letter ({width} x {height})"},{size:new a.Size(12240,20160),text:"US-Legal ({width} x {height})"},{size:new a.Size(15817,24491),text:"US-Tabloid ({width} x {height})"},{size:new a.Size(47679,67408),text:"A0 ({width} x {height})"},{size:new a.Size(33676,47679),text:"A1 ({width} x {height})"},{size:new a.Size(23811,33676),text:"A2 ({width} x {height})"},{size:new a.Size(16838,23811),text:"A3 ({width} x {height})"},{size:new a.Size(11906,16838),text:"A4 ({width} x {height})"},{size:new a.Size(8391,11906),text:"A5 ({width} x {height})"},{size:new a.Size(5953,8391),text:"A6 ({width} x {height})"},{size:new a.Size(4195,5953),text:"A7 ({width} x {height})"}],this._viewUnits=s.DiagramUnit.In,this._connectorRoutingMode=o.AllShapesOnly,this._reloadInsertedItemRequired=!1,this._useCanvgForExportToImage=!0}return Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){var n=this;(t=e.correctZoomLevel(t))!==this._zoomLevel&&(this._zoomLevel=t,this._zoomLevelWasChanged=!0,this.onZoomChanged.raise1((function(e){return e.notifyZoomChanged(t,n._autoZoom)})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevelWasChanged",{get:function(){return this._zoomLevelWasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevelItems",{get:function(){return this._zoomLevelItems},set:function(t){(t=t.map((function(t){return e.correctZoomLevel(t)})))!==this._zoomLevelItems&&(this._zoomLevelItems=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoZoom",{get:function(){return this._autoZoom},set:function(e){var t=this;e!==this._autoZoom&&(this._autoZoom=e,this.onZoomChanged.raise1((function(n){return n.notifyZoomChanged(t._zoomLevel,e)})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simpleView",{get:function(){return this._simpleView},set:function(e){e!==this._simpleView&&(this._simpleView=e,this.notifyViewChanged())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readOnly",{get:function(){return this._readOnly},set:function(e){e!==this._readOnly&&(this._readOnly=e,this.onReadOnlyChanged.raise1((function(t){return t.notifyReadOnlyChanged(e)})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullscreen",{get:function(){return this._fullscreen},set:function(e){this._fullscreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"snapToGrid",{get:function(){return this._snapToGrid},set:function(e){this._snapToGrid=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showGrid",{get:function(){return this._showGrid},set:function(e){var t=this;e!==this._showGrid&&(this._showGrid=e,this.onViewChanged.raise1((function(e){return e.notifyGridChanged(t.showGrid,t.gridSize)})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contextMenuEnabled",{get:function(){return this._contextMenuEnabled},set:function(e){this._contextMenuEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridSize",{get:function(){return this._gridSize},set:function(e){var t=this;e!==this._gridSize&&(this._gridSize=e,this.onViewChanged.raise1((function(e){return e.notifyGridChanged(t.showGrid,t.gridSize)})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridSizeItems",{get:function(){return this._gridSizeItems},set:function(e){e!==this._gridSizeItems&&(this._gridSizeItems=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageSizeItems",{get:function(){return this._pageSizeItems},set:function(e){e!==this._pageSizeItems&&(this._pageSizeItems=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewUnits",{get:function(){return this._viewUnits},set:function(e){this._viewUnits=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connectorRoutingMode",{get:function(){return this._connectorRoutingMode},set:function(e){e!==this._connectorRoutingMode&&(this._connectorRoutingMode=e,this.onConnectorRoutingModeChanged.raise1((function(t){return t.notifyConnectorRoutingModeChanged(e)})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reloadInsertedItemRequired",{get:function(){return this._reloadInsertedItemRequired},set:function(e){this._reloadInsertedItemRequired=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useCanvgForExportToImage",{get:function(){return this._useCanvgForExportToImage},set:function(e){this._useCanvgForExportToImage=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shapeMinWidth",{get:function(){return this._shapeMinWidth},set:function(e){this._shapeMinWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shapeMinHeight",{get:function(){return this._shapeMinHeight},set:function(e){this._shapeMinHeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shapeMaxWidth",{get:function(){return this._shapeMaxWidth},set:function(e){this._shapeMaxWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shapeMaxHeight",{get:function(){return this._shapeMaxHeight},set:function(e){this._shapeMaxHeight=e},enumerable:!1,configurable:!0}),e.prototype.applyShapeSizeSettings=function(e,t){e&&("number"==typeof e.shapeMaxHeight&&(this.shapeMaxHeight=l.ModelUtils.getTwipsValue(t,e.shapeMaxHeight)),"number"==typeof e.shapeMinHeight&&(this.shapeMinHeight=l.ModelUtils.getTwipsValue(t,e.shapeMinHeight)),"number"==typeof e.shapeMaxWidth&&(this.shapeMaxWidth=l.ModelUtils.getTwipsValue(t,e.shapeMaxWidth)),"number"==typeof e.shapeMinWidth&&(this.shapeMinWidth=l.ModelUtils.getTwipsValue(t,e.shapeMinWidth)))},e.prototype.notifyViewChanged=function(){var e=this;this.onViewChanged.raise1((function(t){return t.notifyViewChanged(e._simpleView)}))},e.correctZoomLevel=function(e){return Math.min(10,Math.max(e,.01))},e}();t.DiagramSettings=u,function(e){e[e.Disabled=0]="Disabled",e[e.FitContent=1]="FitContent",e[e.FitToWidth=2]="FitToWidth"}(i=t.AutoZoomMode||(t.AutoZoomMode={})),function(e){e[e.None=0]="None",e[e.ConnectorShapesOnly=1]="ConnectorShapesOnly",e[e.AllShapesOnly=2]="AllShapesOnly"}(o=t.ConnectorRoutingMode||(t.ConnectorRoutingMode={}))},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorRenderPoint=void 0;var r=function(e){function t(t,n,i,o){void 0===i&&(i=-1),void 0===o&&(o=!1);var r=e.call(this,t,n)||this;return r.pointIndex=i,r.skipped=o,r}return o(t,e),t.prototype.offset=function(t,n){return e.prototype.offset.call(this,t,n),this.pointIndex=-1,this.skipped=!1,this},t.prototype.multiply=function(t,n){return e.prototype.multiply.call(this,t,n),this.pointIndex=-1,this.skipped=!1,this},t.prototype.clone=function(){return new t(this.x,this.y,this.pointIndex,this.skipped)},t}(n(0).Point);t.ConnectorRenderPoint=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShapeParameterPoint=void 0;var i=function(){return function(e,t){this.key=e,this.point=t}}();t.ShapeParameterPoint=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(105),o=function(){function e(){}return e.round=function(t,n){void 0===n&&(n=0);var i=e.powFactor[n];return Math.round(t*i)/i},e.numberCloseTo=function(e,t,n){return void 0===n&&(n=1e-5),Math.abs(e-t)n?n:et.dragStartLimit||Math.abs(e.y-n.y)>t.dragStartLimit},t.prototype.onAfterApplyChanges=function(){this.modified||this.handler.raiseDragStart(this.getDraggingElementKeys()),this.modified=!0,this.mouseDownPoint=void 0},t.prototype.onMouseDown=function(e){this.mouseDownPoint=e.modelPoint.clone()},t.prototype.onMouseMove=function(e){this.mouseMoveEvent=e,e.button!==a.MouseButton.Left?(this.cancelChanges(),this.handler.switchToDefaultState()):e.button===a.MouseButton.Left&&this.canApplyChangesOnMouseMove(this.mouseDownPoint,e.modelPoint)&&(this.onApplyChanges(e),this.onAfterApplyChanges())},t.prototype.onKeyDown=function(e){!this.mouseMoveEvent||16!==e.keyCode&&17!==e.keyCode&&18!==e.keyCode||this.performMouseMoveEvent(e.modifiers)},t.prototype.onKeyUp=function(e){!this.mouseMoveEvent||16!==e.keyCode&&17!==e.keyCode&&18!==e.keyCode||this.performMouseMoveEvent(e.modifiers)},t.prototype.onMouseUp=function(e){this.mouseDownPoint=void 0,this.mouseMoveEvent=void 0,this.handler.switchToDefaultState()},t.prototype.performMouseMoveEvent=function(e){this.mouseMoveEvent.modifiers=e,this.onMouseMove(this.mouseMoveEvent)},t.prototype.start=function(){this.handler.beginStorePermissions(),this.history.beginTransaction()},t.prototype.finish=function(){this.checkStoredPermissionsOnFinish(),this.modified?(this.onFinishWithChanges(),this.modified=!1,this.history.endTransaction(),this.handler.raiseDragEnd(this.getDraggingElementKeys())):this.history.endTransaction(),this.handler.endStorePermissions(),this.handler.clearInteractingItems()},t.prototype.checkStoredPermissionsOnFinish=function(){this.handler.isStoredPermissionsGranted()||(this.cancelChanges(),this.modified=!1)},t.prototype.onFinishWithChanges=function(){},t.prototype.cancelChanges=function(){this.handler.lockPermissions(),this.history.undoTransaction(),this.handler.unlockPermissions(),this.modified&&this.handler.raiseDragEnd(this.getDraggingElementKeys()),this.modified=!1},t.prototype.getSnappedPoint=function(e,t){return this.handler.getSnappedPointOnDragPoint(e,t)},t.dragStartLimit=s.UnitConverter.pixelsToTwips(4),t}(r.MouseHandlerCancellableState);t.MouseHandlerDraggingState=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.euclideanDistance=function(e,t){var n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)},e.manhattanDistance=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},e}();t.Metrics=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramLocalizationService=void 0;var i=n(1),o=n(47),r=function(){function e(){}return e.unitItems={},e.formatUnit=function(e){return e.toString()},e.shapeTexts={},e}();t.DiagramLocalizationService=r,r.unitItems[o.DiagramUnit.In]="in",r.unitItems[o.DiagramUnit.Cm]="cm",r.unitItems[o.DiagramUnit.Px]="px",r.shapeTexts[i.ShapeTypes.Text]="Text",r.shapeTexts[i.ShapeTypes.Rectangle]="Rectangle",r.shapeTexts[i.ShapeTypes.Ellipse]="Ellipse",r.shapeTexts[i.ShapeTypes.Cross]="Cross",r.shapeTexts[i.ShapeTypes.Triangle]="Triangle",r.shapeTexts[i.ShapeTypes.Diamond]="Diamond",r.shapeTexts[i.ShapeTypes.Heart]="Heart",r.shapeTexts[i.ShapeTypes.Pentagon]="Pentagon",r.shapeTexts[i.ShapeTypes.Hexagon]="Hexagon",r.shapeTexts[i.ShapeTypes.Octagon]="Octagon",r.shapeTexts[i.ShapeTypes.Star]="Star",r.shapeTexts[i.ShapeTypes.ArrowLeft]="Left Arrow",r.shapeTexts[i.ShapeTypes.ArrowUp]="Up Arrow",r.shapeTexts[i.ShapeTypes.ArrowRight]="Right Arrow",r.shapeTexts[i.ShapeTypes.ArrowDown]="Down Arrow",r.shapeTexts[i.ShapeTypes.ArrowUpDown]="Up Down Arrow",r.shapeTexts[i.ShapeTypes.ArrowLeftRight]="Left Right Arrow",r.shapeTexts[i.ShapeTypes.Process]="Process",r.shapeTexts[i.ShapeTypes.Decision]="Decision",r.shapeTexts[i.ShapeTypes.Terminator]="Terminator",r.shapeTexts[i.ShapeTypes.PredefinedProcess]="Predefined Process",r.shapeTexts[i.ShapeTypes.Document]="Document",r.shapeTexts[i.ShapeTypes.MultipleDocuments]="Multiple Documents",r.shapeTexts[i.ShapeTypes.ManualInput]="Manual Input",r.shapeTexts[i.ShapeTypes.Preparation]="Preparation",r.shapeTexts[i.ShapeTypes.Data]="Data",r.shapeTexts[i.ShapeTypes.Database]="Database",r.shapeTexts[i.ShapeTypes.HardDisk]="Hard Disk",r.shapeTexts[i.ShapeTypes.InternalStorage]="Internal Storage",r.shapeTexts[i.ShapeTypes.PaperTape]="Paper Tape",r.shapeTexts[i.ShapeTypes.ManualOperation]="Manual Operation",r.shapeTexts[i.ShapeTypes.Delay]="Delay",r.shapeTexts[i.ShapeTypes.StoredData]="Stored Data",r.shapeTexts[i.ShapeTypes.Display]="Display",r.shapeTexts[i.ShapeTypes.Merge]="Merge",r.shapeTexts[i.ShapeTypes.Connector]="Connector",r.shapeTexts[i.ShapeTypes.Or]="Or",r.shapeTexts[i.ShapeTypes.SummingJunction]="Summing Junction",r.shapeTexts[i.ShapeTypes.Container]="Container",r.shapeTexts[i.ShapeTypes.VerticalContainer]="Vertical Container",r.shapeTexts[i.ShapeTypes.HorizontalContainer]="Horizontal Container",r.shapeTexts[i.ShapeTypes.Card]="Person's Name",r.shapeTexts[i.ShapeTypes.CardWithImageOnLeft]="Card with Image on the Left",r.shapeTexts[i.ShapeTypes.CardWithImageOnTop]="Card with Image on the Top",r.shapeTexts[i.ShapeTypes.CardWithImageOnRight]="Card with Image on the Right"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShapeParameters=t.ShapeParameter=void 0;var i=function(){return function(e,t){this.key=e,this.value=t}}();t.ShapeParameter=i;var o=function(){function e(){this.items={}}return e.prototype.add=function(e){this.items[e.key]=e},e.prototype.addRange=function(e){for(var t=0;t>1),a=t(e[r]);if(a<0)n=r+1;else{if(!(a>0))return r;i=r-1}}return o?~n:-1},e.normedBinaryIndexOf=function(t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-2);var r=e.binaryIndexOf(t,n,i,o);return e.binaryIndexNormalizator(r)},e.binaryIndexNormalizator=function(e){return e<0?~e-1:e},e.normedInterpolationIndexOf=function(e,t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-2),-2===o&&(o=e.length-1);var r=e[Math.min(i,o)];if(void 0===r||na&&nu){if(n<(a=t(e[i=l+1])))return l}else{if(!(nn;i--)e[i]=e[i-1];e[n]=t}else e.push(t)},e.ArrayRemove=function(t,n){var i=e.ArrayIndexOf(t,n);i>-1&&e.ArrayRemoveAt(t,i)},e.ArrayRemoveAt=function(e,t){if(t>=0&&t0;)e.pop()},e.ArrayIndexOf=function(e,t,n){if(n){for(i=0;i=0},e.ArrayEqual=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;in?i=1:e=n?0:i>1),u=i(t,l,n);if(0===u)return l;u<0?r=l+1:s=l-1}return-(r+1)},e.ArrayFlatten=function(e){var t=[];return e.forEach((function(e){t=t.concat(e)})),t},e.GetDistinctArray=function(t){for(var n=[],i=0;i="a"&&e<="z"||e>="A"&&e<="Z"},e.isDigit=function(e){return e>="0"&&e<="9"},e.stringHashCode=function(e){var t=0;if(0===e.length)return t;for(var n=e.length,i=0;i=o;n--,i--)if(e[n]!==t[i])return!1;return!0},e.startsAt=function(e,t){return e.substr(0,t.length)===t},e.stringInLowerCase=function(e){return e.toLowerCase()===e},e.stringInUpperCase=function(e){return e.toUpperCase()===e},e.atLeastOneSymbolInUpperCase=function(t){for(var n=0,i=void 0;i=t[n];n++)if(e.stringInUpperCase(i)&&!e.stringInLowerCase(i))return!0;return!1},e.getSymbolFromEnd=function(e,t){return e[e.length-t]},e.trim=function(t,n){if(void 0===n)return e.trimInternal(t,!0,!0);var i=n.join("");return t.replace(new RegExp("(^["+i+"]*)|(["+i+"]*$)","g"),"")},e.trimStart=function(t,n){if(void 0===n)return e.trimInternal(t,!0,!1);var i=n.join("");return t.replace(new RegExp("^["+i+"]*","g"),"")},e.trimEnd=function(t,n){if(void 0===n)return e.trimInternal(t,!1,!0);var i=n.join("");return t.replace(new RegExp("["+i+"]*$","g"),"")},e.getDecimalSeparator=function(){return 1.1.toLocaleString().substr(1,1)},e.repeat=function(e,t){return new Array(t<=0?0:t+1).join(e)},e.isNullOrEmpty=function(e){return!e||!e.length},e.padLeft=function(t,n,i){return e.repeat(i,Math.max(0,n-t.length))+t},e.trimInternal=function(e,t,n){var i=e.length;if(!i)return e;if(i<764833){var o=e;return t&&(o=o.replace(/^\s+/,"")),n&&(o=o.replace(/\s+$/,"")),o}var r=0;if(n)for(;i>0&&/\s/.test(e[i-1]);)i--;if(t&&i>0)for(;rMath.abs(t.y-e.y)?t.x>e.x?o.ConnectionPointSide.East:o.ConnectionPointSide.West:t.y>e.y?o.ConnectionPointSide.South:o.ConnectionPointSide.North},e.prototype.getSideCalculator=function(e,t){return this.parent.getSideCalculator(this.getSide(e,t))},e.prototype.getMinOffset=function(){return r.Connector.minOffset},e.prototype.isBeginEndSame=function(){return this.connector.beginItem===this.connector.endItem},e.prototype.isBeginEndOverlapped=function(){return this.beginRect&&this.endRect&&i.Rectangle.areIntersected(this.beginRect,this.endRect)},e.prototype.isBeginEndOverlappedX=function(){return this.beginRect&&this.endRect&&!!i.Rectangle.getHorizIntersection(this.beginRect,this.endRect)},e.prototype.isBeginEndOverlappedY=function(){return this.beginRect&&this.endRect&&!!i.Rectangle.getVertIntersection(this.beginRect,this.endRect)},e.prototype.isBeginEndOverlappedPoints=function(e,t){return this.beginRect&&this.endRect&&(this.beginRect.containsPoint(t)||this.endRect.containsPoint(e))},e.prototype.isOriginRectContainsTargetPoint=function(e,t){return e&&t&&e.containsPoint(t)},e}();t.ConnectorPointsOrthogonalSideCalculatorBase=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AddShapeHistoryItem=void 0;var r=n(8),a=n(14),s=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.shapeDescription=t,r.position=n,r.text=i,r.dataKey=o,r}return o(t,e),t.prototype.redo=function(e){var t=new a.Shape(this.shapeDescription,this.position);"string"==typeof this.text&&(t.text=this.text),void 0!==this.dataKey&&(t.dataKey=this.dataKey),e.addShape(t,this.shapeKey),this.shapeKey=t.key},t.prototype.undo=function(e){e.deleteShape(e.model.findShape(this.shapeKey),!0)},t}(r.HistoryItem);t.AddShapeHistoryItem=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GraphIterator=t.FastGraph=t.Graph=void 0;var r=n(38),a=n(14),s=n(41),l=n(90),u=function(){function e(e,t){this.nodeMap={},this.edgeMap={},this.nodes=[],this.edges=[],this.onInit(),e.forEach(this.addNode.bind(this)),t.forEach(this.addEdge.bind(this))}return Object.defineProperty(e.prototype,"items",{get:function(){return this.nodes.map(this.getNode.bind(this))},enumerable:!1,configurable:!0}),e.prototype.onInit=function(){},e.prototype.addEdge=function(e){this.edgeMap[e.key]=e,this.edges.push(e)},e.prototype.addNode=function(e){this.nodeMap[e.key]=e,this.nodes.push(e.key)},e.prototype.getNode=function(e){return this.nodeMap[e]},e.prototype.getEdge=function(e){return this.edgeMap[e]},e.prototype.isEmpty=function(){return!this.nodes.length&&!this.edges.length},e.prototype.getAdjacentEdges=function(e,t){return void 0===t&&(t=r.ConnectionMode.OutgoingAndIncoming),this.edges.filter((function(n){return t&r.ConnectionMode.Incoming&&n.to===e||t&r.ConnectionMode.Outgoing&&n.from===e}))},e}(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.cast=function(e,n){var i=this;return new t(this.nodes.map((function(t){return e(i.getNode(t))})),this.edges.map((function(e){return n?n(e):e})))},t.prototype.getConnectedComponents=function(){var e=this.createIterator(r.ConnectionMode.OutgoingAndIncoming);e.visitEachEdgeOnce=!0;for(var n=[],i=function(i){var r=[],a=[];e.onNode=function(e){return r.push(e)},e.onEdge=function(e){return a.push(e)},e.iterate(o.nodes[i]),r.length&&n.push(new t(r,a))},o=this,a=0;a=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,i){t(n,i,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function d(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof _?Promise.resolve(n.value.v).then(l,u):c(r[0][2],n)}catch(e){c(r[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}}function b(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,o){t[i]=e[i]?function(t){return(n=!n)?{value:_(e[i](t)),done:"return"===i}:o?o(t):t}:o}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,o){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,o,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var w=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&h(t,e,n);return w(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}return Object.defineProperty(e.prototype,"length",{get:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},enumerable:!0,configurable:!0}),e.fromPoints=function(t,n){return new e(n.x-t.x,n.y-t.y)},e.fromSegment=function(t){return new e(t.endPoint.x-t.startPoint.x,t.endPoint.y-t.startPoint.y)},e.prototype.normalize=function(){var e=this.length;return 0!==e&&(this.x/=e,this.y/=e),this},e.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},Object.defineProperty(e,"axisX",{get:function(){return new e(1,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"axisY",{get:function(){return new e(0,1)},enumerable:!0,configurable:!0}),e.angleBetween=function(t,n){var i=e.scalarProduct(t,n)/(t.length*n.length);return Math.acos(i)},e.scalarProduct=function(e,t){return e.x*t.x+e.y*t.y},e}();t.Vector=i},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0,function(e){e[e.Disabled=0]="Disabled",e[e.Console=1]="Console",e[e.Document=2]="Document"}(i||(i={}));var o=function(){function e(){}return e.beginAverage=function(e){this.enableLogsAndTimers&&(this.lastAverageGroupName=e)},e.endAverage=function(){this.enableLogsAndTimers&&(this.lastAverageGroupName=null)},e.tryLogAverage=function(e){var t=this;if(this.lastAverageGroupName!==e){var n=Object.keys(this.timers).map((function(e){return t.timers[e]})).filter((function(t){return t.groupName===e}));if(!n.filter((function(e){return!e.endTime})).length){var i=n.reduce((function(e,t){return e+(t.endTime-t.startTime)}),0)/n.length;this.log("average: "+i)}}},e.timer=function(e){this.enableLogsAndTimers&&(this.lastCreatedTimer={message:e,startTime:performance.now(),groupName:this.lastAverageGroupName})},e.endTimer=function(){var e=this;if(this.enableLogsAndTimers){var t=this.lastCreatedTimer,n=setTimeout((function(){t.endTime=performance.now(),e.showMessage('timer "'+t.message+'": '+(t.endTime-t.startTime)),t.groupName&&e.tryLogAverage(t.groupName)}),0);this.timers[n]=t,this.lastCreatedTimer=null}},e.logPerfInfo=function(){var e=document.querySelector(".dxdi-control > svg").querySelectorAll("*").length,t=performance.memory;this.log("nodes: "+e.toLocaleString()+(t?" memory: ":"")+(t?t.usedJSHeapSize.toLocaleString():""))},e.log=function(e){this.showMessage(e)},e.showMessage=function(t){switch(e.mode){case i.Console:console.log(t);break;case i.Document:var n=this.getElement().value;if(this.lastMessage===t){var o=n.indexOf("\r\n");o<0&&(o=n.indexOf("\n"));var r=n.substr(0,o);/( \()([0-9]+)(\))$/.test(r)?r=r.replace(/( \()([0-9]+)(\))$/,(function(e,t,n,i){return t+ ++n+i})):r+=" (1)",this.getElement().value=r+n.substr(o)}else this.getElement().value=t+"\r\n"+n,this.lastMessage=t}},e.getElement=function(){var e=this;if(!this.el){this.el=document.createElement("textarea"),this.el.style.top="0px",this.el.style.right="0px",this.el.style.position="fixed",this.el.style.background="transparent",this.el.style.fontSize="11px",this.el.style.fontFamily="monospace",this.el.style.overflow="auto",this.el.style.width="400px",document.body.appendChild(this.el);var t=document.createElement("button");t.innerHTML="x",t.addEventListener("click",(function(){e.el.value="",e.lastMessage=""})),t.style.top="0px",t.style.right="400px",t.style.position="fixed",t.style.opacity="0.1",document.body.appendChild(t)}return this.el},e.mode=i.Document,e.optimizeUsingRAF=!0,e.optimizeLayers=!0,e.timers={},e.enableLogsAndTimers=!1,e}();t.Diagnostics=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramModel=void 0;var i=n(14),o=n(6),r=n(3),a=n(13),s=n(2),l=n(0),u=n(46),c=n(22),d=n(47),h=n(4),p=function(){function e(t){void 0===t&&(t=new s.Size(8391,11906)),this.items=[],this.itemIndexByKey={},this.keyCounter=0,this.pageSize=new s.Size(8391,11906),this.pageLandscape=!1,this.pageColor=e.defaultPageColor,this.units=d.DiagramUnit.In,this.snapStartPoint=new l.Point(0,0),this.pageSize=t,this.size=this.pageSize.clone(),this.rectangle=a.Rectangle.fromGeometry(new l.Point(0,0),new s.Size(0,0)),this.initializeKeyCounter()}return Object.defineProperty(e.prototype,"pageWidth",{get:function(){return this.pageLandscape?this.pageSize.height:this.pageSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageHeight",{get:function(){return this.pageLandscape?this.pageSize.width:this.pageSize.height},enumerable:!1,configurable:!0}),e.prototype.getRectangle=function(e){return e&&(this.rectangle=h.ModelUtils.createRectangle(this.items)),this.rectangle},e.prototype.pushItem=function(e){var t=this.items.push(e);this.itemIndexByKey[e.key]=t-1,e instanceof i.Shape&&!e.image.isEmpty&&this.cacheShapeImage(e)},e.prototype.removeItem=function(e){var t=this.getItemIndex(e);delete this.itemIndexByKey[e.key],this.items.splice(t,1),this.updateIndicesHash(t)},e.prototype.updateIndicesHash=function(e){for(var t=e;t1)n.createTSpanElement(e).textContent=" ";else if(n.fitToSize){var r=c.textToWords(i),s=c.wordsByLines(a.UnitConverter.twipsToPixels(n.fitToSize),r,(function(){return t.measureWords(r,n.style,n.owner)}));s.forEach((function(t){n.createTSpanElement(e).textContent=t})),s.length||(n.createTSpanElement(e).textContent=" ")}else n.createTSpanElement(e).textContent=i}));var i=e.firstChild;i&&this.prepareFirstTSpanElement(i,e.childNodes.length)},t.prototype.createTSpanElement=function(e){var t=document.createElementNS(s.svgNS,"tspan");return e.appendChild(t),this.prepareTSpanElement(t),t},t.prototype.prepareTSpanElements=function(e){for(var t=0;te?(s=r.push(u)-1,a=c):(a+=o+c,r[s]+=" "+u)}return r}function l(e){return e.split(a).filter((function(e){return e.length}))}function u(e){return e.split("\n")}t.LINE_HEIGHT=1.05,t.wordsByLines=s,t.textToWords=l,t.textToParagraphs=u,t.TEXTRECT_RATIO_EPS=1.2;var c=1;function d(e,t,n){var i=e<1?1/e:e,o=t<1?1/t:t,r=i/o;return(r<1?1/r:r)<=n?0:o>i?1:-1}function h(e,t,n,i){return p(m(e,t,n,!1),i)}function p(e,t){return[r.Data.byRange(e,t.from,t.to),e<=t.to]}function f(e,t){return l(e).reduce((function(e,n,i){var o=t.words[n];return e.width+=o.width,e.height=Math.max(e.height,o.height),i>0&&(e.width+=t.words[" "].width),e}),new o.Size(0,0))}function m(e,t,n,i){var o=Array.isArray(e)?e:u(e);return!i||o.length&&(1!==o.length||o[0].length)?o.reduce((function(e,i){return e+s(t,l(i),(function(){return n})).length}),0)*g(n):g(n)}function g(e){return e.fontSize*t.LINE_HEIGHT}t.getOptimalTextRectangle=function(e,n,a,s,l,g,v,_,y,b){if(void 0===v&&(v=0),void 0===_&&(_=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE),void 0===y&&(y=0),void 0===b&&(b=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE),!e)return new o.Size(r.Data.byRange(l.width,v,_),r.Data.byRange(l.height,y,b));if(v>_||y>b)throw new Error("Min size cannot exceed max size");if(v===_&&y===b)return new o.Size(v,y);var C=s.measureWords(e,n,a),x=u(e),w=Object.keys(C.words).reduce((function(e,t){return Math.max(e,C.words[t].width)}),0),S=new i.Range(r.Data.byRange(Math.max(l.width,w),v,_),_),T=new i.Range(r.Data.byRange(l.height,y,b),b);if(w<=l.width&&m(x,l.width,C,!1)<=l.height&&S.includes(l.width)&&T.includes(l.height))return l;var O=l.width/l.height;return function(e,n,i,a,s,l){for(var u,m,g=e.reduce((function(e,t){return Math.max(e,f(t,n).width)}),0),v=new o.Size(0,0),_=new o.Size(0,0),y=0,b=0,C=0;C<5;C++){if(0===C)_.width=p(g,a)[0];else{if(!(Math.abs(y)>c))break;_.width=p(v.width+y,a)[0]}if(u=h(e,_.width,n,s),_.height=u[0],m=u[1],0===C&&(v=_.clone(),b=v.width/v.height/i),0===C&&!m)break;var x=_.width/_.height,w=x/i;if(0===C)y=(_.width/w-_.width)/2;else if(m){if(!d(i,x,t.TEXTRECT_RATIO_EPS)){v=_.clone(),b=w;break}if(!(d(b,w,1)<0))break;v=_.clone(),b=w,y=(_.width/w-_.width)/2,w<1&&(y/=2)}else y/=2}return l&&(v.height=r.Data.byRange(v.width/i,v.height,s.to)),v}(x,C,O,S,T,g)},t.getTextLineSize=f,t.getTextHeight=m,t.getLineHeight=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(50),r=n(27),a=n(176),s=function(){function e(){}return e.preventEvent=function(e){e.cancelable&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},e.getEventSource=function(t){return o.isDefined(t)?e.getEventSourceCore(t):null},e.getEventSourceByPosition=function(t){if(!o.isDefined(t))return null;if(!document.elementFromPoint)return e.getEventSourceCore(t);var n=e.getEventX(t)-(e.clientEventRequiresDocScrollCorrection()?r.DomUtils.getDocumentScrollLeft():0),i=e.getEventY(t)-(e.clientEventRequiresDocScrollCorrection()?r.DomUtils.getDocumentScrollTop():0);return void 0===n||void 0===i?e.getEventSourceCore(t):document.elementFromPoint(n,i)},e.getEventSourceCore=function(e){return e.srcElement?e.srcElement:e.target},e.getMouseWheelEventName=function(){return i.Browser.Safari?"mousewheel":i.Browser.NetscapeFamily&&i.Browser.MajorVersion<17?"DOMMouseScroll":"wheel"},e.isLeftButtonPressed=function(t){return!!a.TouchUtils.isTouchEvent(t)||!!(t=i.Browser.IE&&o.isDefined(event)?event:t)&&(i.Browser.IE&&i.Browser.Version<11?!!i.Browser.MSTouchUI||t.button%2==1:i.Browser.WebKitFamily?"pointermove"===t.type||"pointerenter"===t.type||"pointerleave"===t.type?1===t.buttons:1===t.which:i.Browser.NetscapeFamily||i.Browser.Edge||i.Browser.IE&&i.Browser.Version>=11?e.isMoveEventName(t.type)?1===t.buttons:1===t.which:!i.Browser.Opera||0===t.button)},e.isMoveEventName=function(t){return t===a.TouchUtils.touchMouseMoveEventName||t===e.getMoveEventName()},e.getMoveEventName=function(){return window.PointerEvent?"pointermove":i.Browser.TouchUI?"touchmove":"mousemove"},e.preventEventAndBubble=function(t){e.preventEvent(t),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0},e.clientEventRequiresDocScrollCorrection=function(){var e=i.Browser.Safari&&i.Browser.Version<3,t=i.Browser.MacOSMobilePlatform&&i.Browser.Version<5.1;return i.Browser.AndroidDefaultBrowser||i.Browser.AndroidChromeBrowser||!(e||t)},e.getEventX=function(t){return a.TouchUtils.isTouchEvent(t)?a.TouchUtils.getEventX(t):t.clientX+(e.clientEventRequiresDocScrollCorrection()?r.DomUtils.getDocumentScrollLeft():0)},e.getEventY=function(t){return a.TouchUtils.isTouchEvent(t)?a.TouchUtils.getEventY(t):t.clientY+(e.clientEventRequiresDocScrollCorrection()?r.DomUtils.getDocumentScrollTop():0)},e.cancelBubble=function(e){e.cancelBubble=!0},e.getWheelDelta=function(e){var t;return t=i.Browser.NetscapeFamily&&i.Browser.MajorVersion<17?-e.detail:i.Browser.Safari?e.wheelDelta:-e.deltaY,i.Browser.Opera&&i.Browser.Version<9&&(t=-t),t},e}();t.EvtUtils=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AddConnectorHistoryItem=void 0;var r=n(8),a=n(6),s=function(e){function t(t,n,i){var o=e.call(this)||this;return o.points=t,o.dataKey=n,o.renderPointsContext=i,o}return o(t,e),t.prototype.redo=function(e){var t=new a.Connector(this.points);void 0!==this.dataKey&&(t.dataKey=this.dataKey),void 0!==this.renderPointsContext&&t.replaceRenderPoints(this.renderPointsContext),e.addConnector(t,this.connectorKey),this.connectorKey=t.key},t.prototype.undo=function(e){var t=e.model.findConnector(this.connectorKey);e.deleteConnector(t)},t}(r.HistoryItem);t.AddConnectorHistoryItem=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteConnectionHistoryItem=void 0;var r=n(8),a=n(6),s=function(e){function t(t,n){var i=e.call(this)||this;return i.connectorKey=t.key,i.position=n,i.itemKey=t.getExtremeItem(i.position).key,i}return o(t,e),t.prototype.redo=function(e){var t=e.model.findConnector(this.connectorKey);this.oldConnectionPointIndex=this.position===a.ConnectorPosition.Begin?t.beginConnectionPointIndex:t.endConnectionPointIndex,e.deleteConnection(t,this.position)},t.prototype.undo=function(e){var t=e.model.findConnector(this.connectorKey),n=e.model.findItem(this.itemKey);e.addConnection(t,n,this.oldConnectionPointIndex,this.position)},t}(r.HistoryItem);t.DeleteConnectionHistoryItem=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SetSelectionHistoryItem=void 0;var r=function(e){function t(t,n,i){var o=e.call(this)||this;return o.selectedKeys=n,o.selection=t,o.forceChange=i,o}return o(t,e),t.prototype.redo=function(){this.oldSelection=this.selection.getKeys().slice(0),this.selection.set(this.selectedKeys,this.forceChange)},t.prototype.undo=function(){this.selection.set(this.oldSelection,this.forceChange)},t}(n(8).HistoryItem);t.SetSelectionHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeConnectorTextHistoryItem=void 0;var r=function(e){function t(t,n,i){var o=e.call(this)||this;return o.connectorKey=t.key,o.text=i,o.position=n,o}return o(t,e),t.prototype.redo=function(e){var t=e.model.findConnector(this.connectorKey);this.oldText=t.getText(this.position),e.changeConnectorText(t,this.text,this.position)},t.prototype.undo=function(e){var t=e.model.findConnector(this.connectorKey);e.changeConnectorText(t,this.oldText,this.position)},t}(n(8).HistoryItem);t.ChangeConnectorTextHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeStyleTextHistoryItem=void 0;var r=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return o(t,e),t.prototype.redo=function(e){var t=e.model.findItem(this.itemKey);this.oldStyleValue=t.styleText[this.styleProperty],e.changeStyleText(t,this.styleProperty,this.styleValue)},t.prototype.undo=function(e){var t=e.model.findItem(this.itemKey);e.changeStyleText(t,this.styleProperty,this.oldStyleValue)},t}(n(118).ChangeStyleHistoryItemBase);t.ChangeStyleTextHistoryItem=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Margin=t.EdgeLayout=t.NodeLayout=t.NodeInfo=void 0;var i=n(13),o=function(){return function(e,t,n,i){void 0===i&&(i=[]),this.key=e,this.margin=t,this.size=n,this.connectionPoints=i}}();t.NodeInfo=o;var r=function(){function e(e,t){this.info=e,this.position=t}return Object.defineProperty(e.prototype,"key",{get:function(){return this.info.key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rectangle",{get:function(){return i.Rectangle.fromGeometry(this.position,this.info.size)},enumerable:!1,configurable:!0}),e}();t.NodeLayout=r;var a=function(){return function(e,t,n){this.key=e,this.beginIndex=t,this.endIndex=n}}();t.EdgeLayout=a;var s=function(){function e(e,t,n,i){void 0===t&&(t=e),void 0===n&&(n=e),void 0===i&&(i=e),this.top=e,this.right=t,this.bottom=n,this.left=i}return e.empty=function(){return new e(0)},e}();t.Margin=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EllipseShapeDescription=void 0;var r=n(7),a=n(2),s=n(55),l=n(1),u=n(3),c=n(13),d=function(e){function t(t){return e.call(this,new a.Size(r.ShapeDefaultDimension,.75*r.ShapeDefaultDimension),t)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return l.ShapeTypes.Ellipse},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getTextRectangle=function(e){var t=u.GeometryUtils.getMaxRectangleEnscribedInEllipse(e.size);return c.Rectangle.fromGeometry(e.position.clone().offset((e.size.width-t.width)/2,(e.size.height-t.height)/2),t)},t.prototype.getSizeByText=function(e,t){return u.GeometryUtils.getEllipseByEnscribedRectangle(e)},t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.width,i=t.height,o=t.center,r=o.x,a=o.y;return[new s.EllipsePrimitive(r,a,n/2,i/2,e.style)]},t}(r.ShapeDescription);t.EllipseShapeDescription=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Exporter=void 0;var i=n(14),o=n(6),r=n(3),a=function(){function e(){}return e.prototype.export=function(e){var t={page:{},connectors:[],shapes:[]};return t.page={width:e.size.width,height:e.size.height,pageColor:e.pageColor,pageWidth:e.pageSize.width,pageHeight:e.pageSize.height,pageLandscape:e.pageLandscape},this.exportItemsCore(e.items,t),JSON.stringify(t)},e.prototype.exportItems=function(e){var t={connectors:[],shapes:[]};return this.exportItemsCore(e,t),JSON.stringify(t)},e.prototype.exportItemsCore=function(e,t){var n=this;e.forEach((function(e){if(e instanceof i.Shape)t.shapes.push(n.exportShape(e));else if(e instanceof o.Connector){var r=n.exportConnector(e);e.beginItem&&(r.beginItemKey=e.beginItem.key,r.beginConnectionPointIndex=e.beginConnectionPointIndex),e.endItem&&(r.endItemKey=e.endItem.key,r.endConnectionPointIndex=e.endConnectionPointIndex),t.connectors.push(r)}}))},e.prototype.exportItem=function(e){return{key:e.key,dataKey:e.dataKey,customData:r.ObjectUtils.cloneObject(e.customData),locked:e.locked,zIndex:e.zIndex}},e.prototype.exportShape=function(e){var t=this.exportItem(e);t.type=e.description.key,t.text=e.text,e.image.isEmpty||(t.imageUrl=e.image.exportUrl),t.x=e.position.x,t.y=e.position.y,t.width=e.size.width,t.height=e.size.height;var n=e.parameters.toObject();n&&(t.parameters=n);var i=e.style.toObject();i&&(t.style=i);var o=e.styleText.toObject();return o&&(t.styleText=o),e.children.length&&(t.childKeys=e.children.map((function(e){return e.key}))),e.expanded||(t.expanded=!1),e.expandedSize&&(t.expandedWidth=e.expandedSize.width,t.expandedHeight=e.expandedSize.height),t},e.prototype.exportConnector=function(e){var t=this.exportItem(e);t.points=e.points.map((function(e){return{x:e.x,y:e.y}}));var n=e.texts.toObject();n&&(t.texts=n);var i=e.properties.toObject();i&&(t.properties=i);var o=e.style.toObject();o&&(t.style=o);var r=e.styleText.toObject();return r&&(t.styleText=r),t},e.prototype.exportSvg=function(e,t,n,i){n.exportSvgImage(e,t,i)},e.prototype.exportPng=function(e,t,n,i,o){n.exportPngImage(e,t,i,o)},e.prototype.exportJpg=function(e,t,n,i,o){n.exportJpgImage(e,t,i,o)},e}();t.Exporter=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleStyleTextPropertyCommand=void 0;var r=n(134),a=n(70),s=n(26),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentTextStylePropertyValue(this.getStyleProperty())===this.getStylePropertyValue()},t.prototype.executeCore=function(e){var t=this;this.control.history.beginTransaction();var n=this.getStyleProperty(),i=e.value?s.TextStyle.defaultInstance[n]:this.getStylePropertyValue();return this.control.selection.getSelectedItems().forEach((function(e){t.control.history.addAndRedo(new a.ChangeStyleTextHistoryItem(e.key,n,i))})),this.control.selection.inputPosition.setTextStylePropertyValue(this.getStyleProperty(),i),this.control.history.endTransaction(),!0},t.prototype.getStyleObj=function(e){return e.styleText},t.prototype.getDefaultStyleObj=function(){return new s.TextStyle},t}(r.StylePropertyCommandBase);t.ToggleStyleTextPropertyCommand=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeStylePropertyCommand=void 0;var r=n(135),a=n(89),s=n(26),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentStylePropertyValue(this.getStyleProperty())},t.prototype.getStyleObj=function(e){return e.style},t.prototype.getDefaultStyleObj=function(){return new s.Style},t.prototype.createHistoryItem=function(e,t,n){return new a.ChangeStyleHistoryItem(e.key,t,n)},t.prototype.updateInputPosition=function(e){this.control.selection.inputPosition.setStylePropertyValue(this.getStyleProperty(),e)},t}(r.ChangeStylePropertyCommandBase);t.ChangeStylePropertyCommand=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLayoutCommandBase=void 0;var r=n(4),a=n(10),s=n(14),l=n(6),u=n(3),c=n(13),d=n(251),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.executeCore=function(e,t){var n=this;this.control.history.beginTransaction();var i=this.getAffectedShapes(),o=this.getAffectedConnectors(),a=this.createLayoutSettings(),s=r.ModelUtils.getGraphInfoByItems(this.control.model,i,o,!1);if(s.length){var l,h=this.control.model,p=u.GeometryUtils.getCommonRectangle(u.Utils.flatten(s.map((function(e){return e.graph.items.map((function(e){return h.findItem(e.key)}))}))).concat(s.map((function(e){return e.container}))).filter((function(e){return e})).map((function(e){return e.rectangle})));this.control.history.addAndRedo(new d.ScrollIntoViewOnUndoHistoryItem(this.control.view,p)),s.forEach((function(e){var t=n.createLayout(a,e.graph),s=r.ModelUtils.getNonGraphItems(n.control.model,e.container,t.nodeToLayout,i,o),u=r.ModelUtils.applyLayout(n.control.history,n.control.model,e.container,e.graph,t,s,a,n.control.settings.snapToGrid,n.control.settings.gridSize,!1);l=l&&c.Rectangle.union(l,u)||u})),r.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.addAndRedo(new d.ScrollIntoViewOnRedoHistoryItem(this.control.view,l))}return this.control.history.endTransaction(),!0},t.prototype.getAffectedShapes=function(){return this.control.selection.isEmpty()?this.control.model.items.filter((function(e){return e instanceof s.Shape&&!e.locked})):this.control.selection.getSelectedShapes(!1,!0)},t.prototype.getAffectedConnectors=function(){return this.control.selection.isEmpty()?this.control.model.items.filter((function(e){return e instanceof l.Connector&&!e.locked})):this.control.selection.getSelectedConnectors(!1,!0)},t}(a.SimpleCommandBase);t.AutoLayoutCommandBase=h},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePagePropertyCommand=void 0;var r=n(4),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.executeCore=function(e,t){var n=this;return this.control.history.beginTransaction(),this.createHistoryItems(t).forEach((function(e){n.control.history.addAndRedo(e)})),r.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.endTransaction(),!0},t.prototype.getItems=function(){return null},t}(n(10).SimpleCommandBase);t.ChangePagePropertyCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasItemsManager=t.CONNECTOR_CAN_MOVE=t.NOT_VALID_CSSCLASS=void 0;var r=n(99),a=n(11),s=n(39),l=n(17),u=n(14),c=n(6),d=n(27),h=n(140),p=n(4);t.NOT_VALID_CSSCLASS="not-valid",t.CONNECTOR_CAN_MOVE="can-move";var f=function(e){function n(t,n,i){var o=e.call(this,n,i)||this;return o.itemSelectorGroupContainers={},o.itemSelectorElements={},o.itemGroupContainers={},o.itemElements={},o.itemChildElements={},o.primitives={},o.selectorPrimitives={},o.selectedItems={},o.initializeContainerElements(t),o}return o(n,e),n.prototype.initializeContainerElements=function(e){this.itemSelectorsContainer=this.createAndChangePrimitiveElement(new s.GroupPrimitive([],null),e),this.itemsContainer=this.createAndChangePrimitiveElement(new s.GroupPrimitive([],null),e)},n.prototype.clear=function(){this.primitives={},this.selectorPrimitives={},l.RenderUtils.removeContent(this.itemSelectorsContainer),l.RenderUtils.removeContent(this.itemsContainer),this.itemSelectorGroupContainers={},this.itemSelectorElements={},this.itemGroupContainers={},this.itemElements={},this.itemChildElements={},this.selectedItems={}},n.prototype.applyChange=function(e){var t=e.item;return!!this.getItemParent(t.zIndex,t.container&&t.container.key)&&(t instanceof u.Shape?this.applyShapeChange(t,e.type,e.isValid):t instanceof c.Connector&&this.applyConnectorChange(t,e.type,e.isValid),!0)},n.prototype.setPointerEventsNone=function(e,t){var n=e.style;void 0!==n&&void 0!==n.pointerEvents&&(n.pointerEvents=t?"none":"");for(var i=e.childNodes,o=0;oe}))[0];this.itemGroupContainers[i][e]=this.createAndChangePrimitiveElement(new s.GroupPrimitive([],null,e),n,this.itemGroupContainers[i][o])}return this.itemGroupContainers[i][e]},n.prototype.getItemSelectorGroupContainer=function(e,t){var n=void 0!==t?this.getItemSelectorParent(e,t):this.itemSelectorsContainer,i=t||"Main";if(void 0===this.itemSelectorGroupContainers[i]||void 0===this.itemSelectorGroupContainers[i][e]){void 0===this.itemSelectorGroupContainers[i]&&(this.itemSelectorGroupContainers[i]=[]);var o=Object.keys(this.itemSelectorGroupContainers[i]).map((function(e){return+e})).sort().filter((function(t){return t>e}))[0];this.itemSelectorGroupContainers[i][e]=this.createAndChangePrimitiveElement(new s.GroupPrimitive([],null,e),n,this.itemSelectorGroupContainers[i][o])}return this.itemSelectorGroupContainers[i][e]},n.prototype.getItemParent=function(e,t){return void 0!==t?this.itemChildElements[t]:this.getItemGroupContainer(e)},n.prototype.getItemSelectorParent=function(e,t){return void 0!==t?this.itemChildElements[t]:this.getItemSelectorGroupContainer(e)},n.prototype.notifySelectionChanged=function(e){var t=this,n=p.ModelUtils.createSelectedItems(e),i=[];this.populateItems(i,n,this.selectedItems),this.populateItems(i,this.selectedItems,n),this.selectedItems=n,i.forEach((function(e){e instanceof c.Connector&&t.applyOrPostponeChanges([new r.ItemChange(e,r.ItemChangeType.UpdateClassName,!0)])}))},n.prototype.populateItems=function(e,t,n){Object.keys(t).forEach((function(i){n[i]||e.push(t[i])}))},n}(h.CanvasManager);t.CanvasItemsManager=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextMeasurer=void 0;var i=n(2),o=n(17),r=n(14),a=n(6),s=n(43),l=n(15),u=n(64),c=function(){function e(e){this.cache={},this.fontSizeCache={},this.containers={},this.parent=e,this.createNodes()}return e.prototype.measureWords=function(e,t,n){var i=this,o={words:{},fontSize:-1},r="string"==typeof e?this.splitToWords(e,!1):e.reduce((function(e,t){return e.concat(i.splitToWords(t,!1))}),[]);r.push(" ");var a=this.getStyleHash(t,n),s=this.tryLoadWordsToMeasurer(r,t,a,n,void 0,void 0,void 0,void 0,o);if(s){var l=this.containers[n];this.putElementsInDOM(l,s),this.beforeMeasureInDOM(),this.measureElementsInDOM(s,o),this.afterMeasureInDOM()}return o},e.prototype.measureTextLine=function(e,t,n){var i=this.measureWords(e,t,n);return u.getTextLineSize(e,i)},e.prototype.onNewModel=function(e,t){var n=this;t.changeByFunc(null,(function(){return n.onNewModelCore(e)}))},e.prototype.onNewModelCore=function(e){var t=e.filter((function(e){return e instanceof r.Shape})),n=e.filter((function(e){return e instanceof a.Connector})),i=this.tryLoadShapeTexts(t),o=this.tryLoadConnectorTexts(n);(i||o)&&(i&&this.putElementsInDOM(this.containers[s.TextOwner.Shape],i),o&&this.putElementsInDOM(this.containers[s.TextOwner.Connector],o),this.beforeMeasureInDOM(),i&&this.measureElementsInDOM(i),o&&this.measureElementsInDOM(o),this.afterMeasureInDOM())},e.prototype.replaceParent=function(e){this.parent!==e&&(this.mainElement.parentNode&&e.appendChild(this.mainElement),this.parent=e)},e.prototype.clean=function(){o.RenderUtils.removeElement(this.mainElement)},e.prototype.tryLoadShapeTexts=function(e){var t=this,n={},i=[],o=[],r=[];return e.forEach((function(e){var a=t.getStyleHash(e.styleText,s.TextOwner.Shape);t.tryLoadWordsToMeasurer(t.splitToWords(e.text,!0),e.styleText,a,s.TextOwner.Shape,n,i,o,r)})),i.length?{elements:i,hashes:o,styleHashes:r}:null},e.prototype.tryLoadConnectorTexts=function(e){var t=this,n={},i=[],o=[],r=[];return e.forEach((function(e){var a=e.texts.map((function(e){return e.value})).reduce((function(e,n){return e.concat(t.splitToWords(n,!1))}),[]);if(a.length){a.push(" ");var l=t.getStyleHash(e.styleText,s.TextOwner.Connector);t.tryLoadWordsToMeasurer(a,e.styleText,l,s.TextOwner.Connector,n,i,o,r)}})),i.length?{elements:i,hashes:o,styleHashes:r}:null},e.prototype.tryLoadWordsToMeasurer=function(e,t,n,i,o,r,a,s,l){var u=this,c=[];return r=r||[],a=a||[],s=s||[],o=o||{},e.forEach((function(e){return u.tryLoadWordToMeasurer(e,t,n,i,o,r,a,s,c,l)})),r.length?{elements:r,hashes:a,styleHashes:s,newWords:c}:null},e.prototype.putElementsInDOM=function(e,t){for(e.parentNode&&e.parentNode.removeChild(e);e.firstChild;)e.removeChild(e.firstChild);t.elements.forEach((function(t){return e.appendChild(t)})),this.svgElement.appendChild(e)},e.prototype.measureElementsInDOM=function(e,t){for(var n=e.hashes,i=e.elements,o=e.newWords,r=n.length,a=0;a=1)m.push(r),m.push({from:o.from,to:r.to}),m.push({from:r.from,to:o.to});else if(p.position-h.position<=-1)m.push(a),m.push({from:o.from,to:a.to}),m.push({from:a.from,to:o.to});else{var g=h.position===p.position&&0===p.position?[l,u]:[u,l];g.forEach((function(e){return m.push(e)})),g.forEach((function(e){m.push({from:e.from,to:o.to}),m.push({from:o.from,to:e.to})}))}m.push(o);for(var v=0,_=void 0;_=m[v];v++){var y=h.key+"_"+_.from,b=p.key+"_"+_.to;if(c[y]!==f.ConnectorPosition.End&&c[b]!==f.ConnectorPosition.Begin){t.addEdge(new s.EdgeLayout(i.key,_.from,_.to)),c[y]=f.ConnectorPosition.Begin,c[b]=f.ConnectorPosition.End;break}}}}))},t.prototype.getDirectEdgeLayout=function(){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?this.settings.direction===h.LogicalDirectionKind.Forward?{from:1,to:3}:{from:3,to:1}:this.settings.direction===h.LogicalDirectionKind.Forward?{from:2,to:0}:{from:0,to:2}},t.prototype.getDiffLevelEdgeLayout=function(e){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?e?{from:2,to:0}:{from:0,to:2}:e?{from:3,to:1}:{from:1,to:3}},t.prototype.getSameLevelEdgeLayout=function(e){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?e?{from:0,to:0}:{from:2,to:2}:e?{from:3,to:3}:{from:1,to:1}},t.prototype.getAbsOffsetInfo=function(e){var t=this,n={},i=function(e,i){void 0===n[i]&&(n[i]=t.getBreadthNodeSize(e)),n[i]=Math.max(n[i],t.getBreadthNodeSize(e))};e.forEach((function(e){var t=x(e.position);i(e,t),n[t]%1!=0&&i(e,t+1)}));var o={},r=0;return Object.keys(n).sort((function(e,t){return parseFloat(e)-parseFloat(t)})).forEach((function(e){o[e]={leftOffset:r,width:n[e]},r+=n[e]+t.settings.columnSpacing})),o},t.prototype.setBreadth=function(e,t){return this.settings.orientation===h.DataLayoutOrientation.Vertical?new d.Point(t,e.y):new d.Point(e.x,t)},t.prototype.setDepthOffset=function(e,t){return this.settings.orientation===h.DataLayoutOrientation.Horizontal?new d.Point(e.x+t,e.y):new d.Point(e.x,e.y+t)},t.prototype.getAbsPosition=function(e,t,n){var i=x(e),o=n[i].leftOffset,r=n[i].width;return e%1==0?o+(r-t)/2:o+r-(t-this.settings.columnSpacing)/2},t.prototype.getBreadthNodeSize=function(e){return e.isDummy?0:this.getBreadthNodeSizeCore(this.graph.getNode(e.key))},t.prototype.getDepthNodeSize=function(e){return e.isDummy?0:this.getDepthNodeSizeCore(this.graph.getNode(e.key))},t}(r.LayoutBuilder);t.SugiyamaLayoutBuilder=g;var v=function(){function e(){}return e.getLayers=function(e){var t=this.getFeasibleTree(e);return this.calcNodesLayers(t)},e.getFeasibleTree=function(e){var t=this.initLayerAssignment(e);return e.getSpanningGraph(e.nodes[0],l.ConnectionMode.OutgoingAndIncoming,(function(e){return t[e.to]-t[e.from]}))},e.initLayerAssignment=function(e){for(var t={},n=0,i={},o=e.nodes.filter((function(t){return!e.getAdjacentEdges(t,l.ConnectionMode.Incoming).length})),r=function(){o.forEach((function(e){t[e]=n,i[e]=!0})),Object.keys(i).forEach((function(n){0===e.getAdjacentEdges(n,l.ConnectionMode.Outgoing).filter((function(e){return void 0===t[e.to]})).length&&delete i[n]}));var r={};Object.keys(i).forEach((function(n){e.getAdjacentEdges(n,l.ConnectionMode.Outgoing).map((function(e){return e.to})).filter((function(n){return void 0===t[n]&&e.getAdjacentEdges(n,l.ConnectionMode.Incoming).reduce((function(e,n){return e&&void 0!==t[n.from]}),!0)})).forEach((function(e){return r[e]=!0}))})),o=Object.keys(r),n++};o.length;)r();return t},e.calcNodesLayers=function(e){var t={},n=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,i=0,o=e.createIterator(l.ConnectionMode.OutgoingAndIncoming);for(var r in o.visitEachEdgeOnce=!1,o.onNode=function(e){t[e.key]=i,n=Math.min(n,i)},o.skipNode=function(e){return void 0!==t[e.key]},o.skipEdge=function(e){return void 0!==t[e.from]&&void 0!==t[e.to]},o.onEdge=function(e,n){i=n?t[e.from]+1:t[e.to]-1},o.iterate(e.nodes[0]),t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]-=n);return t},e}();t.SugiyamaLayerDistributor=v;var _=function(){function e(){this.idCounter=-1e4}return e.prototype.orderNodes=function(e,t){for(var n=1,i=this.initGraphInfo(e,t),o=i.items,r=this.initOrder(o),a=this.getNodeToPositionMap(o),s=this.getCrossCount(r,i),l=!0;n<14&&0!==s;){r=this.getNodesOrder(r,i,l);var u=this.getCrossCount(r,i);u1){for(var l=o[e.from],u=1;ue?o[t.key]:e}),-2);e.forEach((function(e){var i=t-o[e.key];i>0&&n[e.layer].filter((function(t){return t.position>e.position})).forEach((function(e){return o[e.key]+=i})),o[e.key]=t}))})),o},e.prototype.getSortedBlocks=function(e,t,n,i){for(var o=[],r=i===b.BottomLeft||i===b.BottomRight,a=new u.HashSet(t.slice(0).sort((function(e,t){return r?e.layer-t.layer:t.layer-e.layer})),(function(e){return e.key}));a.length;){var s=a.item(0),l=this.getBlock(e,s,n,i);o.push(l),l.forEach((function(e){return a.remove(e)}))}return o.sort((function(e,t){var n=e.reduce((function(e,t){return t.positioni.position?1:-1;var o=t.reduce((function(e,t){return t.positiono.position?1:-1:n.layer>o.layer?1:-1})),o},e.prototype.getBlock=function(e,t,n,i){var o=[],r=null;do{r&&(t=i===b.TopLeft||i===b.TopRight?e.getNode(r.from):e.getNode(r.to)),o.push(t),r=n[t.key]}while(r);return o},e.prototype.resolveMedianConflicts=function(e,t,n,i){var o=this,r={},a=function(a){if(!Object.prototype.hasOwnProperty.call(t,a))return"continue";var s,l,u=t[a];i!==b.TopRight&&i!==b.BottomRight||(u=u.slice(0).sort((function(e,t){return t.position-e.position}))),u.forEach((function(t){var a=n[t.key];if(a){var u=i===b.TopLeft||i===b.TopRight?a.from:a.to,c=e.getNode(u).position;o.checkMedianConfict(s,l,c,i)?r[t.key]=null:(s=void 0===s?c:Math.min(s,c),l=void 0===l?c:Math.max(l,c),r[t.key]=a)}else r[t.key]=null}))};for(var s in t)a(s);return r},e.prototype.checkMedianConfict=function(e,t,n,i){return void 0!==e&&void 0!==t&&(i===b.TopLeft||i===b.BottomLeft?t>=n:e<=n)},e.prototype.getMedians=function(e,t,n){var i=this,o={};return t.forEach((function(t){var r=i.getActualAdjacentEdges(e,t,n),a=i.getMedianPosition(r.length,n);o[t.key]=r[a]})),o},e.prototype.getMedianPosition=function(e,t){if(0===e)return-1;if(e%2!=0)return Math.floor(e/2);if(t===b.TopLeft||t===b.BottomLeft)return Math.floor(e/2)-1;if(t===b.TopRight||t===b.BottomRight)return Math.floor(e/2);throw new Error("Invalid Operation")},e.prototype.getActualAdjacentEdges=function(e,t,n){return n===b.TopLeft||n===b.TopRight?e.getAdjacentEdges(t.key,l.ConnectionMode.Incoming).sort((function(t,n){return e.getNode(t.from).position-e.getNode(n.from).position})):e.getAdjacentEdges(t.key,l.ConnectionMode.Outgoing).sort((function(t,n){return e.getNode(t.to).position-e.getNode(n.to).position}))},e}();t.SugiyamaNodesOrderer=_;var y=function(){function e(e,t,n,i){this.key=e,this.isDummy=t,this.layer=n,this.position=i}return e.prototype.getHashCode=function(){return this.key.toString()},e}();t.NodeOnLayer=y;var b,C=function(){function e(e,t,n,i,o){this.key=e,this.isDummy=t,this.from=n,this.to=i,this._originFrom=o}return e.prototype.getHashCode=function(){return this.from+"-"+this.to},Object.defineProperty(e.prototype,"originFrom",{get:function(){return void 0!==this._originFrom?this._originFrom:this.from},enumerable:!1,configurable:!0}),e}();function x(e){return Math.trunc?Math.trunc(e):isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}t.EdgeOnLayer=C,function(e){e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight"}(b||(b={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.suspendUpdateCount=0,this.occurredEvents=0}return e.prototype.beginUpdate=function(){0===this.suspendUpdateCount&&this.onUpdateLocked(),this.suspendUpdateCount<0?this.suspendUpdateCount--:this.suspendUpdateCount++},e.prototype.endUpdate=function(){if(this.suspendUpdateCount<0?this.suspendUpdateCount++:this.suspendUpdateCount>0&&this.suspendUpdateCount--,!this.isUpdateLocked()){var e=this.occurredEvents;this.occurredEvents=0,this.onUpdateUnlocked(e)}},e.prototype.suspendUpdate=function(){if(this.suspendUpdateCount>0){this.suspendUpdateCount*=-1;var e=this.occurredEvents;this.occurredEvents=0,this.onUpdateUnlocked(e)}},e.prototype.continueUpdate=function(){this.suspendUpdateCount<0&&(this.suspendUpdateCount*=-1)},e.prototype.isUpdateLocked=function(){return this.suspendUpdateCount>0},e.prototype.onUpdateLocked=function(){},e.prototype.registerOccurredEvent=function(e){this.occurredEvents|=e},e.prototype.resetOccurredEvents=function(){this.occurredEvents=0},e.prototype.isLocked=function(){return 0!==this.suspendUpdateCount},e}();t.BatchUpdatableObject=i;var o=function(){function e(){}return e.prototype.beginUpdate=function(){},e.prototype.endUpdate=function(){},e}();t.EmptyBatchUpdatableObject=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandManager=t.DiagramCommand=void 0;var i,o=n(162),r=n(199),a=n(200),s=n(201),l=n(238),u=n(239),c=n(240),d=n(241),h=n(242),p=n(243),f=n(244),m=n(245),g=n(246),v=n(247),_=n(248),y=n(249),b=n(250),C=n(25),x=n(137),w=n(253),S=n(254),T=n(255),O=n(257),E=n(259),I=n(261),k=n(262),D=n(263),A=n(264),P=n(265),M=n(268),R=n(271),j=n(272),N=n(142),B=n(273),L=n(274),F=n(275),V=n(276),H=n(143),z=n(144),U=n(277),$=n(278),W=n(279),G=n(280),q=n(282),K=n(284),Y=n(285),X=n(286),Z=n(287),J=n(288),Q=n(289),ee=n(290),te=n(292),ne=n(293),ie=n(294),oe=n(295),re=n(296),ae=n(297),se=n(298),le=n(299),ue=n(300);!function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.Cut=2]="Cut",e[e.Copy=3]="Copy",e[e.Paste=4]="Paste",e[e.PasteInPosition=5]="PasteInPosition",e[e.SelectAll=6]="SelectAll",e[e.Delete=7]="Delete",e[e.Import=8]="Import",e[e.ImportBPMN=9]="ImportBPMN",e[e.Export=10]="Export",e[e.ExportSvg=11]="ExportSvg",e[e.ExportPng=12]="ExportPng",e[e.ExportJpg=13]="ExportJpg",e[e.BindDocument=14]="BindDocument",e[e.UnbindDocument=15]="UnbindDocument",e[e.Bold=16]="Bold",e[e.Italic=17]="Italic",e[e.Underline=18]="Underline",e[e.FontName=19]="FontName",e[e.FontSize=20]="FontSize",e[e.FontColor=21]="FontColor",e[e.FillColor=22]="FillColor",e[e.StrokeColor=23]="StrokeColor",e[e.TextLeftAlign=24]="TextLeftAlign",e[e.TextCenterAlign=25]="TextCenterAlign",e[e.TextRightAlign=26]="TextRightAlign",e[e.ConnectorLineOption=27]="ConnectorLineOption",e[e.ConnectorStartLineEnding=28]="ConnectorStartLineEnding",e[e.ConnectorEndLineEnding=29]="ConnectorEndLineEnding",e[e.BringToFront=30]="BringToFront",e[e.SendToBack=31]="SendToBack",e[e.MoveLeft=32]="MoveLeft",e[e.MoveStepLeft=33]="MoveStepLeft",e[e.MoveRight=34]="MoveRight",e[e.MoveStepRight=35]="MoveStepRight",e[e.MoveUp=36]="MoveUp",e[e.MoveStepUp=37]="MoveStepUp",e[e.MoveDown=38]="MoveDown",e[e.MoveStepDown=39]="MoveStepDown",e[e.CloneLeft=40]="CloneLeft",e[e.CloneRight=41]="CloneRight",e[e.CloneUp=42]="CloneUp",e[e.CloneDown=43]="CloneDown",e[e.AutoLayoutTree=44]="AutoLayoutTree",e[e.AutoLayoutFlow=45]="AutoLayoutFlow",e[e.AutoLayoutTreeVertical=46]="AutoLayoutTreeVertical",e[e.AutoLayoutTreeHorizontal=47]="AutoLayoutTreeHorizontal",e[e.AutoLayoutLayeredVertical=48]="AutoLayoutLayeredVertical",e[e.AutoLayoutLayeredHorizontal=49]="AutoLayoutLayeredHorizontal",e[e.Lock=50]="Lock",e[e.Unlock=51]="Unlock",e[e.Units=52]="Units",e[e.ViewUnits=53]="ViewUnits",e[e.PageSize=54]="PageSize",e[e.PageLandscape=55]="PageLandscape",e[e.PageColor=56]="PageColor",e[e.GridSize=57]="GridSize",e[e.ShowGrid=58]="ShowGrid",e[e.SnapToGrid=59]="SnapToGrid",e[e.ZoomLevel=60]="ZoomLevel",e[e.Fullscreen=61]="Fullscreen",e[e.ToggleSimpleView=62]="ToggleSimpleView",e[e.ToggleReadOnly=63]="ToggleReadOnly",e[e.EditShapeImage=64]="EditShapeImage",e[e.FitToScreen=65]="FitToScreen",e[e.SwitchAutoZoom=66]="SwitchAutoZoom",e[e.ToggleAutoZoom=67]="ToggleAutoZoom",e[e.FitToWidth=68]="FitToWidth",e[e.ZoomLevelItems=69]="ZoomLevelItems",e[e.GridSizeItems=70]="GridSizeItems",e[e.PageSizeItems=71]="PageSizeItems",e[e.ImportXML=72]="ImportXML",e[e.InsertShapeImage=73]="InsertShapeImage",e[e.DeleteShapeImage=74]="DeleteShapeImage",e[e.StrokeStyle=75]="StrokeStyle",e[e.StrokeWidth=76]="StrokeWidth",e[e.AutoLayoutTreeVerticalBottomToTop=77]="AutoLayoutTreeVerticalBottomToTop",e[e.AutoLayoutTreeHorizontalRightToLeft=78]="AutoLayoutTreeHorizontalRightToLeft",e[e.AutoLayoutLayeredVerticalBottomToTop=79]="AutoLayoutLayeredVerticalBottomToTop",e[e.AutoLayoutLayeredHorizontalRightToLeft=80]="AutoLayoutLayeredHorizontalRightToLeft",e[e.Zoom25=81]="Zoom25",e[e.Zoom50=82]="Zoom50",e[e.Zoom75=83]="Zoom75",e[e.Zoom100=84]="Zoom100",e[e.Zoom125=85]="Zoom125",e[e.Zoom150=86]="Zoom150",e[e.Zoom200=87]="Zoom200",e[e.AutoZoomToContent=88]="AutoZoomToContent",e[e.AutoZoomToWidth=89]="AutoZoomToWidth",e[e.ZoomLevelInPercentage=90]="ZoomLevelInPercentage",e[e.ConnectorRoutingMode=91]="ConnectorRoutingMode"}(i=t.DiagramCommand||(t.DiagramCommand={}));var ce=function(){function e(e){this.commands={},this.shortcutsToCommand={},this.lastCommandsChain=[],this.executingCommandsChain=[],this.executingCommandCounter=0,this.isPublicApiCall=!1,this.createCommand(e,i.Undo,r.UndoCommand,C.ModifierKey.Ctrl|C.KeyCode.Key_z,C.ModifierKey.Meta|C.KeyCode.Key_z),this.createCommand(e,i.Redo,a.RedoCommand,C.ModifierKey.Ctrl|C.KeyCode.Key_y,C.ModifierKey.Ctrl|C.ModifierKey.Shift|C.KeyCode.Key_z,C.ModifierKey.Meta|C.ModifierKey.Shift|C.KeyCode.Key_z),this.createCommand(e,i.Cut,A.CutSelectionCommand,C.KeyCode.Key_x|C.ModifierKey.Ctrl,C.KeyCode.Key_x|C.ModifierKey.Meta,C.KeyCode.Delete|C.ModifierKey.Shift),this.createCommand(e,i.Copy,D.CopySelectionCommand,C.KeyCode.Key_c|C.ModifierKey.Ctrl,C.KeyCode.Key_c|C.ModifierKey.Meta,C.KeyCode.Insert|C.ModifierKey.Ctrl),this.createCommand(e,i.Paste,P.PasteSelectionCommand),this.createCommand(e,i.PasteInPosition,Q.PasteSelectionInPositionCommand),this.createCommand(e,i.SelectAll,b.SelectAllCommand,C.KeyCode.Key_a|C.ModifierKey.Ctrl,C.KeyCode.Key_a|C.ModifierKey.Meta),this.createCommand(e,i.Delete,o.DeleteCommand,C.KeyCode.Delete,C.KeyCode.Backspace),this.createCommand(e,i.Import,s.ImportCommand),this.createCommand(e,i.ImportBPMN,M.ImportBPMNCommand),this.createCommand(e,i.ImportXML,ee.ImportXMLCommand),this.createCommand(e,i.Export,l.ExportCommand),this.createCommand(e,i.ExportSvg,I.ExportSvgCommand),this.createCommand(e,i.ExportPng,E.ExportPngCommand),this.createCommand(e,i.ExportJpg,k.ExportJpgCommand),this.createCommand(e,i.BindDocument,F.BindDocumentCommand),this.createCommand(e,i.UnbindDocument,V.UnbindDocumentCommand),this.createCommand(e,i.Bold,u.ToggleFontBoldCommand,C.ModifierKey.Ctrl|C.KeyCode.Key_b,C.ModifierKey.Meta|C.KeyCode.Key_b),this.createCommand(e,i.Italic,c.ToggleFontItalicCommand,C.ModifierKey.Ctrl|C.KeyCode.Key_i,C.ModifierKey.Meta|C.KeyCode.Key_i),this.createCommand(e,i.Underline,d.ToggleFontUnderlineCommand,C.ModifierKey.Ctrl|C.KeyCode.Key_u,C.ModifierKey.Meta|C.KeyCode.Key_u),this.createCommand(e,i.FontName,h.ChangeFontNameCommand),this.createCommand(e,i.FontSize,p.ChangeFontSizeCommand),this.createCommand(e,i.FontColor,f.ChangeFontColorCommand),this.createCommand(e,i.FillColor,m.ChangeFillColorCommand),this.createCommand(e,i.StrokeColor,g.ChangeStrokeColorCommand),this.createCommand(e,i.StrokeStyle,ie.ChangeStrokeStyleCommand),this.createCommand(e,i.StrokeWidth,oe.ChangeStrokeWidthCommand),this.createCommand(e,i.TextLeftAlign,v.TextLeftAlignCommand),this.createCommand(e,i.TextCenterAlign,v.TextCenterAlignCommand),this.createCommand(e,i.TextRightAlign,v.TextRightAlignCommand),this.createCommand(e,i.ConnectorLineOption,y.ChangeConnectorLineOptionCommand),this.createCommand(e,i.ConnectorStartLineEnding,_.ChangeConnectorStartLineEndingCommand),this.createCommand(e,i.ConnectorEndLineEnding,_.ChangeConnectorEndLineEndingCommand),this.createCommand(e,i.BringToFront,j.BringToFrontCommand),this.createCommand(e,i.SendToBack,R.SendToBackCommand),this.createCommand(e,i.MoveLeft,B.MoveLeftCommand,C.ModifierKey.Ctrl|C.KeyCode.Left,C.ModifierKey.Ctrl|C.ModifierKey.Shift|C.KeyCode.Left),this.createCommand(e,i.MoveRight,B.MoveRightCommand,C.ModifierKey.Ctrl|C.KeyCode.Right,C.ModifierKey.Ctrl|C.ModifierKey.Shift|C.KeyCode.Right),this.createCommand(e,i.MoveUp,B.MoveUpCommand,C.ModifierKey.Ctrl|C.KeyCode.Up,C.ModifierKey.Ctrl|C.ModifierKey.Shift|C.KeyCode.Up),this.createCommand(e,i.MoveDown,B.MoveDownCommand,C.ModifierKey.Ctrl|C.KeyCode.Down,C.ModifierKey.Ctrl|C.ModifierKey.Shift|C.KeyCode.Down),this.createCommand(e,i.MoveStepLeft,B.MoveStepLeftCommand,C.KeyCode.Left,C.ModifierKey.Shift|C.KeyCode.Left),this.createCommand(e,i.MoveStepRight,B.MoveStepRightCommand,C.KeyCode.Right,C.ModifierKey.Shift|C.KeyCode.Right),this.createCommand(e,i.MoveStepUp,B.MoveStepUpCommand,C.KeyCode.Up,C.ModifierKey.Shift|C.KeyCode.Up),this.createCommand(e,i.MoveStepDown,B.MoveStepDownCommand,C.KeyCode.Down,C.ModifierKey.Shift|C.KeyCode.Down),this.createCommand(e,i.CloneLeft,W.CloneLeftCommand,C.ModifierKey.Alt|C.KeyCode.Left,C.ModifierKey.Alt|C.ModifierKey.Shift|C.KeyCode.Left),this.createCommand(e,i.CloneRight,W.CloneRightCommand,C.ModifierKey.Alt|C.KeyCode.Right,C.ModifierKey.Alt|C.ModifierKey.Shift|C.KeyCode.Right),this.createCommand(e,i.CloneUp,W.CloneUpCommand,C.ModifierKey.Alt|C.KeyCode.Up,C.ModifierKey.Alt|C.ModifierKey.Shift|C.KeyCode.Up),this.createCommand(e,i.CloneDown,W.CloneDownCommand,C.ModifierKey.Alt|C.KeyCode.Down,C.ModifierKey.Alt|C.ModifierKey.Shift|C.KeyCode.Down),this.createCommand(e,i.Lock,U.LockCommand),this.createCommand(e,i.Unlock,$.UnLockCommand),this.createCommand(e,i.AutoLayoutTree,x.AutoLayoutTreeVerticalCommand),this.createCommand(e,i.AutoLayoutFlow,N.AutoLayoutLayeredHorizontalCommand),this.createCommand(e,i.Units,G.ChangeUnitsCommand),this.createCommand(e,i.ViewUnits,G.ChangeViewUnitsCommand),this.createCommand(e,i.PageSize,O.ChangePageSizeCommand),this.createCommand(e,i.PageLandscape,T.ChangePageLandscapeCommand),this.createCommand(e,i.PageColor,q.ChangePageColorCommand),this.createCommand(e,i.GridSize,S.ChangeGridSizeCommand),this.createCommand(e,i.ShowGrid,K.ChangeShowGridCommand),this.createCommand(e,i.SnapToGrid,w.ChangeSnapToGridCommand),this.createCommand(e,i.ZoomLevel,L.ChangeZoomLevelCommand),this.createCommand(e,i.ZoomLevelInPercentage,L.ChangeZoomLevelInPercentageCommand),this.createCommand(e,i.AutoLayoutTreeVertical,x.AutoLayoutTreeVerticalCommand),this.createCommand(e,i.AutoLayoutTreeVerticalBottomToTop,re.AutoLayoutTreeVerticalBottomToTopCommand),this.createCommand(e,i.AutoLayoutTreeHorizontal,H.AutoLayoutTreeHorizontalCommand),this.createCommand(e,i.AutoLayoutTreeHorizontalRightToLeft,ae.AutoLayoutTreeHorizontalRightToLeftCommand),this.createCommand(e,i.AutoLayoutLayeredVertical,z.AutoLayoutLayeredVerticalCommand),this.createCommand(e,i.AutoLayoutLayeredVerticalBottomToTop,se.AutoLayoutLayeredVerticalBottomToTopCommand),this.createCommand(e,i.AutoLayoutLayeredHorizontal,N.AutoLayoutLayeredHorizontalCommand),this.createCommand(e,i.AutoLayoutLayeredHorizontalRightToLeft,le.AutoLayoutLayeredHorizontalRightToLeftCommand),this.createCommand(e,i.Fullscreen,Y.ToggleFullscreenCommand,C.KeyCode.F11),this.createCommand(e,i.ToggleSimpleView,X.ToggleSimpleViewCommand),this.createCommand(e,i.ToggleReadOnly,Z.ToggleReadOnlyCommand),this.createCommand(e,i.InsertShapeImage,te.InsertShapeImageCommand),this.createCommand(e,i.EditShapeImage,J.EditShapeImageCommand),this.createCommand(e,i.DeleteShapeImage,ne.DeleteShapeImageCommand),this.createCommand(e,i.FitToScreen,L.FitToScreenCommand),this.createCommand(e,i.FitToWidth,L.FitToWidthCommand),this.createCommand(e,i.SwitchAutoZoom,L.SwitchAutoZoomCommand),this.createCommand(e,i.ToggleAutoZoom,L.ToggleAutoZoomCommand),this.createCommand(e,i.ZoomLevelItems,L.ChangeZoomLevelItemsCommand),this.createCommand(e,i.GridSizeItems,S.ChangeGridSizeItemsCommand),this.createCommand(e,i.PageSizeItems,O.ChangePageSizeItemsCommand),this.createCommand(e,i.Zoom25,L.ChangeZoomLevelTo25Command),this.createCommand(e,i.Zoom50,L.ChangeZoomLevelTo50Command),this.createCommand(e,i.Zoom75,L.ChangeZoomLevelTo75Command),this.createCommand(e,i.Zoom100,L.ChangeZoomLevelTo100Command),this.createCommand(e,i.Zoom125,L.ChangeZoomLevelTo125Command),this.createCommand(e,i.Zoom150,L.ChangeZoomLevelTo150Command),this.createCommand(e,i.Zoom200,L.ChangeZoomLevelTo200Command),this.createCommand(e,i.AutoZoomToContent,L.ToggleAutoZoomToContentCommand),this.createCommand(e,i.AutoZoomToWidth,L.ToggleAutoZoomToWidthCommand),this.createCommand(e,i.ConnectorRoutingMode,ue.ChangeConnectorRoutingModeCommand)}return e.prototype.getCommand=function(e){return this.commands[e]},e.prototype.beforeExecuting=function(e){this.executingCommandsChain.push(e),this.executingCommandCounter++},e.prototype.afterExecuting=function(){this.executingCommandCounter--,0===this.executingCommandCounter&&(this.lastCommandsChain=this.executingCommandsChain,this.executingCommandsChain=[])},e.prototype.processShortcut=function(e){var t=this.shortcutsToCommand[e];return!!t&&t.execute()},e.prototype.processPaste=function(e){var t=this.getCommand(i.Paste);return t&&t.isEnabled()&&t.execute(e),!0},e.prototype.notifySelectionChanged=function(e){this.lastCommandsChain=[]},e.prototype.notifyScrollPositionChanged=function(){},e.prototype.createCommand=function(e,t,n){for(var i=[],o=3;oe.maxWidth&&(e.maxWidth=e.minWidth),e.minHeight>e.maxHeight&&(e.maxHeight=e.minHeight),this.register(new V.CustomShapeDescription(e,t),e.category||$.ShapeCategories.Custom)},e.prototype.unregisterCustomShape=function(e){var t=this.descriptions[e];if(t instanceof V.CustomShapeDescription){t.onChanged.remove(this);var n=this.descriptionCategories[e];delete this.descriptions[e],delete this.descriptionCategories[e];var i=this.descriptionTypes[n].indexOf(e);this.descriptionTypes[n].splice(i,1),0===this.descriptionTypes[n].length&&delete this.descriptionTypes[n]}},e.prototype.unregisterAllCustomShapes=function(){var e=this;Object.keys(this.descriptions).forEach((function(t){e.unregisterCustomShape(t)}))},e.prototype.notifyShapeDescriptionChanged=function(e){this.onShapeDecriptionChanged.raise1((function(t){return t.notifyShapeDescriptionChanged(e)}))},e.defaultInstance=new g.RectangleShapeDescription,e.defaultContainerInstance=new H.VerticalContainerDescription,e}();t.ShapeDescriptionManager=K},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowVerticalShapeDescription=t.ArrowVerticalLineWidthParameterName=t.ArrowVerticalTriangleHeightParameterName=void 0;var r=n(7),a=n(2),s=n(37),l=n(9);t.ArrowVerticalTriangleHeightParameterName="th",t.ArrowVerticalLineWidthParameterName="lw";var u=function(e){function n(){return e.call(this,new a.Size(.375*r.ShapeDefaultDimension,r.ShapeDefaultDimension))||this}return o(n,e),Object.defineProperty(n.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),n.prototype.createParameters=function(e){e.addRange([new s.ShapeParameter(t.ArrowVerticalTriangleHeightParameterName,Math.sqrt(Math.pow(this.defaultSize.width,2)-Math.pow(this.defaultSize.width/2,2))),new s.ShapeParameter(t.ArrowVerticalLineWidthParameterName,this.defaultSize.width/3)])},n.prototype.normalizeParameters=function(e,n){this.changeParameterValue(n,t.ArrowVerticalTriangleHeightParameterName,(function(t){return Math.max(0,Math.min(e.size.height,t.value))})),this.changeParameterValue(n,t.ArrowVerticalLineWidthParameterName,(function(t){return Math.max(0,Math.min(e.size.width,t.value))}))},n.prototype.processConnectionPoint=function(e,n){var i=(e.size.width-e.parameters.get(t.ArrowVerticalLineWidthParameterName).value)/2,o=e.getConnectionPointSide(n);o===l.ConnectionPointSide.East?n.x-=i:o===l.ConnectionPointSide.West&&(n.x+=i)},n.prototype.getTextRectangle=function(e){return e.rectangle.clone().inflate(-r.ShapeTextPadding,-r.ShapeTextPadding)},n.prototype.getSizeByText=function(e,t){return e.clone().offset(2*r.ShapeTextPadding,2*r.ShapeTextPadding)},n}(r.ShapeDescription);t.ArrowVerticalShapeDescription=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowHorizontalShapeDescription=t.ArrowVerticalLineHeightParameterName=t.ArrowVerticalTriangleWidthParameterName=void 0;var r=n(7),a=n(2),s=n(37),l=n(9);t.ArrowVerticalTriangleWidthParameterName="tw",t.ArrowVerticalLineHeightParameterName="lh";var u=function(e){function n(){return e.call(this,new a.Size(r.ShapeDefaultDimension,.375*r.ShapeDefaultDimension))||this}return o(n,e),Object.defineProperty(n.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),n.prototype.createParameters=function(e){e.addRange([new s.ShapeParameter(t.ArrowVerticalTriangleWidthParameterName,Math.sqrt(Math.pow(this.defaultSize.height,2)-Math.pow(this.defaultSize.height/2,2))),new s.ShapeParameter(t.ArrowVerticalLineHeightParameterName,this.defaultSize.height/3)])},n.prototype.normalizeParameters=function(e,n){this.changeParameterValue(n,t.ArrowVerticalTriangleWidthParameterName,(function(t){return Math.max(0,Math.min(e.size.width,t.value))})),this.changeParameterValue(n,t.ArrowVerticalLineHeightParameterName,(function(t){return Math.max(0,Math.min(e.size.height,t.value))}))},n.prototype.processConnectionPoint=function(e,n){var i=(e.size.height-e.parameters.get(t.ArrowVerticalLineHeightParameterName).value)/2,o=e.getConnectionPointSide(n);o===l.ConnectionPointSide.North?n.y+=i:o===l.ConnectionPointSide.South&&(n.y-=i)},n.prototype.getTextRectangle=function(e){return e.rectangle.clone().inflate(-r.ShapeTextPadding,-r.ShapeTextPadding)},n.prototype.getSizeByText=function(e,t){return e.clone().offset(2*r.ShapeTextPadding,2*r.ShapeTextPadding)},n}(r.ShapeDescription);t.ArrowHorizontalShapeDescription=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PolygonShapeDescription=void 0;var r=n(7),a=function(e){function t(t){var n=e.call(this,void 0,t)||this;return n.defaultSize.height=n.calculateHeight(r.ShapeDefaultDimension),n}return o(t,e),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return Math.PI*(this.angleCount-2)/this.angleCount},enumerable:!1,configurable:!0}),t}(r.ShapeDescription);t.PolygonShapeDescription=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportUtils=void 0;var i=function(){function e(){}return e.parseJSON=function(e){if(!e||""===e)return{};try{return JSON.parse(e)}catch(e){return{}}},e.createDocument=function(e){return(new DOMParser).parseFromString(e,"application/xml")},e}();t.ImportUtils=i},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeStyleTextPropertyCommand=void 0;var r=n(135),a=n(70),s=n(26),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getValue=function(){return this.control.selection.inputPosition.getCurrentTextStylePropertyValue(this.getStyleProperty())},t.prototype.getStyleObj=function(e){return e.styleText},t.prototype.getDefaultStyleObj=function(){return new s.TextStyle},t.prototype.createHistoryItem=function(e,t,n){return new a.ChangeStyleTextHistoryItem(e.key,t,n)},t.prototype.updateInputPosition=function(e){this.control.selection.inputPosition.setTextStylePropertyValue(this.getStyleProperty(),e)},t}(r.ChangeStylePropertyCommandBase);t.ChangeStyleTextPropertyCommand=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TreeLayoutBuilder=void 0;var r=n(138),a=n(252),s=n(71),l=n(3),u=n(0),c=n(139),d=n(38),h=n(9),p=n(20),f=n(54),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.nodeToLevel={},t.levelDepthSize={},t}return o(t,e),t.prototype.build=function(){var e=this,t=new r.GraphLayout,n=0;return this.graph.getConnectedComponents().forEach((function(i){for(var o=a.Tree.createSpanningTree(i),r=e.processTree(o),s=e.getComponentOffset(r);r.nodeKeys.length=0}))).length){var o=this.getMaxDepthSize(t);this.levelDepthSize[n]=o,this.preProcessTree(e,[].concat.apply([],t.map((function(t){return e.getChildren(t)}))),n+1)}},t.prototype.loadNodes=function(e,t,n){return n?e.getChildren(n.info).map((function(e){return t.hasNode(e.key)?void 0:t.addNode(new s.NodeLayout(e,u.Point.zero()))})).filter((function(e){return e})):[t.addNode(new s.NodeLayout(e.root,u.Point.zero()))]},t.prototype.processTree=function(e){var t=this,n=new r.GraphLayout;if(this.preProcessTree(e,[e.root],0),this.processLevel(e,n,0,new l.Range(0),0),this.settings.direction===p.LogicalDirectionKind.Backward){var i=Object.keys(this.levelDepthSize).map((function(e){return t.levelDepthSize[e]})),o=i.reduce((function(e,t){return e+t}),0)+(i.length-1)*this.settings.layerSpacing;n.forEachNode((function(e){return t.setDepthPos(e,t.getDepthPos(e)+o)}))}return n},t.prototype.processLevel=function(e,t,n,i,o,r){var a,s=this,u=this.addNodes(e,t,o,r),c=r?this.graph.getAdjacentEdges(r.key,d.ConnectionMode.Outgoing):[],h=this.getDirectionValue(this.levelDepthSize[o]),p=this.getDirectionValue(this.settings.layerSpacing);if(u.forEach((function(r){var u=l.Range.fromLength(a?a.to+s.settings.columnSpacing:i.from,s.getBreadthNodeSizeCore(r.info));r.position=s.getNodePosition(u.from,n,h).clone().offset(r.info.margin.left,r.info.margin.top),s.processLevel(e,t,n+h+p,u,o+1,r),s.updateEdgeConnections(t,c,r),i.extend(u),a=u})),r&&u.length){var f=u[u.length-1],m=new l.Range(this.getBreadthPos(u[0]),this.getBreadthPos(f)+this.getBreadthNodeSizeCore(f.info,!0));this.alignParent(r,m,i)}},t.prototype.addNodes=function(e,t,n,i){var o=this;return 0===n?[t.addNode(new s.NodeLayout(e.root,u.Point.zero()))]:e.getChildren(i.info).reduce((function(e,i){return o.nodeToLevel[i.key]!==n||t.hasNode(i.key)||e.push(t.addNode(new s.NodeLayout(i,u.Point.zero()))),e}),[])},t.prototype.getMaxDepthSize=function(e){var t=this;return e.reduce((function(e,n){return Math.max(e,t.getDepthNodeSizeCore(n))}),0)},t.prototype.getNodePosition=function(e,t,n){return this.settings.direction===p.LogicalDirectionKind.Forward?this.settings.orientation===p.DataLayoutOrientation.Vertical?new u.Point(e,t):new u.Point(t,e):this.settings.orientation===p.DataLayoutOrientation.Vertical?new u.Point(e,t+n):new u.Point(t+n,e)},t.prototype.updateEdgeConnections=function(e,t,n){var i=this;t.filter((function(e){return e.to===n.key})).forEach((function(t){var n=i.getBeginEdgeIndex(),o=i.getEndEdgeIndex();e.addEdge(new s.EdgeLayout(t.key,n,o))}))},t.prototype.getBeginEdgeIndex=function(){return this.settings.direction===p.LogicalDirectionKind.Forward?this.isVertical()?h.ConnectionPointSide.South:h.ConnectionPointSide.East:this.isVertical()?h.ConnectionPointSide.North:h.ConnectionPointSide.West},t.prototype.getEndEdgeIndex=function(){return this.settings.direction===p.LogicalDirectionKind.Forward?this.isVertical()?h.ConnectionPointSide.North:h.ConnectionPointSide.West:this.isVertical()?h.ConnectionPointSide.South:h.ConnectionPointSide.East},t.prototype.alignParent=function(e,t,n){if(this.settings.alignment===p.Alignment.Center){var i=t.from+t.length/2-this.getBreadthNodeSizeCore(e.info,!0)/2;this.settings.orientation===p.DataLayoutOrientation.Vertical?(e.position.x=Math.max(n.from+e.info.margin.left,i),e.position.x=Math.min(n.to-e.info.size.width-e.info.margin.right,e.position.x)):(e.position.y=Math.max(n.from+e.info.margin.top,i),e.position.y=Math.min(n.to-e.info.size.height-e.info.margin.bottom,e.position.y))}},t.prototype.getDepthPos=function(e){return this.settings.orientation===p.DataLayoutOrientation.Vertical?e.position.y:e.position.x},t.prototype.getBreadthPos=function(e){return this.settings.orientation===p.DataLayoutOrientation.Vertical?e.position.x:e.position.y},t.prototype.setDepthPos=function(e,t){this.settings.orientation===p.DataLayoutOrientation.Vertical?e.position.y=t:e.position.x=t},t.prototype.isVertical=function(){return this.settings.orientation===p.DataLayoutOrientation.Vertical},t}(c.LayoutBuilder);t.TreeLayoutBuilder=m},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExportImageCommand=void 0;var r=n(78),a=n(260),s=n(57),l=n(73),u=n(15),c=n(79),d=n(100),h=n(46),p=function(e){function t(t){var n=e.call(this,t)||this;return n.exporter=new l.Exporter,n}return o(t,e),t.prototype.isEnabled=function(){return!h.ImageCache.instance.hasNonLoadedImages()},t.prototype.executeCore=function(e,t){var n=this;try{var i=this.getExportManager();this.getExportFunc()(this.control.model.size.clone(),this.control.model.pageColor,i,(function(e){t(e,n.getExtension()),n.tryDispose()}),this.control.settings.useCanvgForExportToImage)}catch(e){throw this.tryDispose(),e}return!0},t.prototype.getExportManager=function(){var e=this.getOrCreateMeasurer(),t=this.control.render&&this.control.render.items||this.createItemsManager(e);return this.exportManager||(this.exportManager=new a.CanvasExportManager(t.itemsContainer,e))},t.prototype.createItemsManager=function(e){this.svgElement=u.RenderHelper.createSvgElement(document.body,!0);var t=new r.CanvasItemsManager(this.svgElement,1,new d.ExportDOMManipulator(e));return this.control.modelManipulator.onModelChanged.add(t),this.control.modelManipulator.commitItemsCreateChanges(),t},t.prototype.tryDispose=function(){this.svgElement&&(document.body.removeChild(this.svgElement),delete this.svgElement),this.tempMeasurer&&(this.tempMeasurer.clean(),this.tempMeasurer=void 0),this.exportManager=void 0},t.prototype.getOrCreateMeasurer=function(){return this.control.measurer||(this.tempMeasurer=new c.TextMeasurer(document.body))},t}(s.ExportImportCommandBase);t.ExportImageCommand=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemChange=t.ItemChangeType=void 0,function(e){e[e.Create=0]="Create",e[e.UpdateProperties=1]="UpdateProperties",e[e.UpdateStructure=2]="UpdateStructure",e[e.Update=3]="Update",e[e.Remove=4]="Remove",e[e.UpdateClassName=5]="UpdateClassName"}(t.ItemChangeType||(t.ItemChangeType={}));var i=function(){function e(e,t,n){void 0===n&&(n=!0),this.item=e,this.type=t,this.isValid=n}return Object.defineProperty(e.prototype,"key",{get:function(){return this.item.key},enumerable:!1,configurable:!0}),e}();t.ItemChange=i},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExportDOMManipulator=t.DOMManipulator=void 0;var r=n(61),a=function(){function e(e){this.measurer=e,this.queue=[]}return e.prototype.createElement=function(e,t,n){return e.createElement((function(e){null!=t&&(void 0!==n?t.insertBefore(e,n):t.appendChild(e))}))},e.prototype.changeChildrenByPrimitives=function(e,t){var n=this;e.forEach((function(e,i){var o=t.childNodes[i];n.changeByPrimitive(o,e)}))},e.prototype.changeByFunc=function(e,t){this.doChange(e,t)},e.prototype.changeByPrimitive=function(e,t){this.doChange(e,t)},e.prototype.cancelAnimation=function(){void 0!==this.rafId&&(cancelAnimationFrame(this.rafId),this.queue=[])},e.prototype.doChange=function(e,t){r.Diagnostics.optimizeUsingRAF?(this.queue.push([e,t]),this.requestAnimation()):this.doChangeSync(e,t)},e.prototype.doChangeSync=function(e,t){"function"==typeof t?t(e):t.applyElementProperties(e,this.measurer)},e.prototype.requestAnimation=function(){var e=this;if(!this.rafRequested){this.rafRequested=!0;var t=function(){e.queue.splice(0,2e3).forEach((function(t){return e.doChangeSync(t[0],t[1])})),e.queue.length?e.rafId=requestAnimationFrame(t):(e.rafRequested=!1,e.rafId=void 0)};this.rafId=requestAnimationFrame(t)}},e}();t.DOMManipulator=a;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.doChange=function(e,t){this.doChangeSync(e,t)},t}(a);t.ExportDOMManipulator=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClipboardCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.setClipboardData=function(e){this.control.render&&this.control.render.input.setClipboardData(e),t.clipboardData=e},t.prototype.getClipboardData=function(e){this.control.render&&this.isPasteSupportedByBrowser()?this.control.render.input.getClipboardData(e):e(t.clipboardData)},t.prototype.isPasteSupportedByBrowser=function(){return this.control.render&&this.control.render.input.isPasteSupportedByBrowser()},t}(n(10).SimpleCommandBase);t.ClipboardCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeZindexHistoryItem=void 0;var r=function(e){function t(t,n){var i=e.call(this)||this;return i.itemKey=t.key,i.zIndex=n,i}return o(t,e),t.prototype.redo=function(e){var t=e.model.findItem(this.itemKey);this.oldZIndex=t.zIndex,e.changeZIndex(t,this.zIndex)},t.prototype.undo=function(e){var t=e.model.findItem(this.itemKey);e.changeZIndex(t,this.oldZIndex)},t}(n(8).HistoryItem);t.ChangeZindexHistoryItem=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataLayoutParameters=t.DataLayoutType=void 0;var i,o=n(20),r=n(97),a=n(80);!function(e){e[e.Tree=0]="Tree",e[e.Sugiyama=1]="Sugiyama"}(i=t.DataLayoutType||(t.DataLayoutType={}));var s=function(){function e(e,t){this.sizeSettings=e,t&&(void 0!==t.type&&(this.layoutType=t.type,this.layoutSettings=this.layoutType===i.Sugiyama?new o.LayoutSettings:new o.TreeLayoutSettings),void 0!==t.orientation&&(this.layoutSettings.orientation=t.orientation),this.skipPointIndices=t.skipPointIndices,this.autoSizeEnabled=t.autoSizeEnabled)}return Object.defineProperty(e.prototype,"needAutoLayout",{get:function(){return void 0!==this.layoutType},enumerable:!1,configurable:!0}),e.prototype.getLayoutBuilder=function(e){return this.layoutType===i.Tree?new r.TreeLayoutBuilder(this.layoutSettings,e):new a.SugiyamaLayoutBuilder(this.layoutSettings,e)},e}();t.DataLayoutParameters=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EditShapeImageCommandBase=void 0;var r=n(146),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabled=function(){var t=this.getSelectedShape();return e.prototype.isEnabled.call(this)&&!!t&&!t.locked&&t.enableImage&&t.allowEditImage},t.prototype.getValue=function(){var e=this.getSelectedShape();return e?e.image.exportUrl:void 0},t.prototype.getSelectedShape=function(){var e=this.control.selection.getSelectedShapes(!0);return 1===e.length?e[0]:void 0},t.prototype.executeCore=function(e,t){this.control.history.beginTransaction();var n=this.control.selection.getSelectedShapes(!1);return this.control.history.addAndRedo(new r.ChangeShapeImageHistoryItem(n[0],t)),this.control.history.endTransaction(),!0},t}(n(10).SimpleCommandBase);t.EditShapeImageCommandBase=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(165),o=n(166),r=function(){function e(){}return e.remove=function(e,t){var n=e.indexOf(t,0);n>=0&&e.splice(n,1)},e.removeBy=function(e,t){for(var n=e.length,i=0;i0;e--)n.push(t);return n},e.initByCallback=function(e,t){for(var n=[],i=0;i=n;i--)t(i)},e.reducedMap=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length);for(var o=[],r=n;r=i;o--)if(t(e[o],o))return o;return-1},e.elementBy=function(t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=t.length);var r=e.indexBy(t,n,i,o);return r<0?null:t[r]},e.reverseElementBy=function(t,n,i,o){void 0===i&&(i=t.length-1),void 0===o&&(o=0);var r=e.reverseIndexBy(t,n,i,o);return r<0?null:t[r]},e.last=function(e){return e[e.length-1]},e.setLast=function(e,t){return e[e.length-1]=t},e.incLast=function(e){return++e[e.length-1]},e.decLast=function(e){return--e[e.length-1]},e.equals=function(t,n){return t.length===n.length&&e.allOf2(t,n,(function(e,t){return e.equals(t)}))},e.equalsByReference=function(e,t){var n=e.length;if(n!==e.length)return!1;for(var i=0;i=0;n--)t===e[n]?e.splice(n,1):t=e[n];return e},e.forEach=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length);for(var o=n;o=i;o--)t(e[o],o)},e.reverseIndexOf=function(e,t,n,i){void 0===n&&(n=e.length-1),void 0===i&&(i=0);for(var o=n;o>=i;o--)if(e[o]===t)return o;return-1},e.accumulate=function(e,t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=e.length);for(var r=t,a=i;a=i;o--)if(t(e[o],o))return!0;return!1},e.unsafeReverseAnyOf=function(e,t,n,i){void 0===n&&(n=e.length-1),void 0===i&&(i=0);for(var o=n;o>=i;o--){var r=t(e[o],o);if(r)return r}return null},e.anyOf2=function(e,t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=e.length);for(var r=i;ra&&(a=u,r=l)}return new i.ExtendedMax(r,a)},e.minMaxExtended=function(e,t,n,o){if(void 0===n&&(n=0),void 0===o&&(o=e.length),0===e.length)return null;for(var r=e[n],a=r,s=t(r),l=s,u=n+1;ul&&(l=d,a=c)}return new i.ExtendedMinMax(r,s,a,l)},e.minByCmp=function(e,t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=e.length),0===e.length)return null;for(var o=e[n],r=n+1;r0&&(o=a)}return o},e.minMaxByCmp=function(e,t,n,o){if(void 0===n&&(n=0),void 0===o&&(o=e.length),0===e.length)return null;for(var r=e[n],a=r,s=n+1;s0?a=l:u<0&&(r=l)}return new i.MinMax(r,a)},e}();t.ListUtils=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(59),o=function(e){function t(t,n){var i=e.call(this)||this;return i.start=t,i.length=n,i}return i.__extends(t,e),Object.defineProperty(t.prototype,"end",{get:function(){return this.start+this.length},set:function(e){this.length=e-this.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.start+this.length/2},enumerable:!0,configurable:!0}),t.prototype.copyFrom=function(e){this.start=e.start,this.length=e.length},t.prototype.equals=function(e){return e&&this.start===e.start&&this.length===e.length},t.prototype.clone=function(){return new t(this.start,this.length)},t.prototype.makeByStartEnd=function(e,n){return new t(e,n-e)},t.prototype.makeByStartLength=function(e,n){return new t(e,n)},t.prototype.makeByLengthEnd=function(e,n){return new t(n-e,e)},t.fromPositions=function(e,n){return new t(e,n-e)},t.makeByConstInterval=function(e){return new t(e.start,e.length)},t.prototype.expand=function(e){var t=Math.max(e.end,this.end);return this.start=Math.min(e.start,this.start),this.end=t,this},t}(n(167).MutableInterval);t.FixedInterval=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.sparseIntervals=e,this.intervalIndex=-1}return Object.defineProperty(e.prototype,"isStarted",{get:function(){return!!this.curr},enumerable:!0,configurable:!0}),e.prototype.moveNext=function(){return this.curr&&this.posInInterval+1=this.curr.start?(this.posInInterval--,this.index--,this.initObject(),!0):(this.isStarted||(this.intervalIndex=this.sparseIntervals.numIntervals),this.intervalIndex-1>=0&&(this.intervalIndex--,this.curr=this.sparseIntervals.getInterval(this.intervalIndex),this.posInInterval=Math.max(this.curr.length-1,this.curr.start),this.index=this.curr.start,this.initObject(),!0))},e.prototype.initObject=function(){},e}();t.SparseIntervalsIterator=i},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FilterPrimitive=void 0;var r=n(15),a=function(e){function t(t,n,i,o,r){var a=e.call(this)||this;return a.id=t,a.x=n,a.y=i,a.width=o,a.height=r,a}return o(t,e),t.prototype.createMainElement=function(){var e=document.createElementNS(r.svgNS,"filter");return e.setAttribute("id",this.id),e},t.prototype.applyElementProperties=function(t,n){this.id&&t.setAttribute("id",this.id),this.setUnitAttribute(t,"x",this.x),this.setUnitAttribute(t,"y",this.y),this.setUnitAttribute(t,"width",this.width),this.setUnitAttribute(t,"height",this.height),this.setPositionCorrectionAttribute(t),e.prototype.applyElementProperties.call(this,t,n)},t}(n(24).SvgPrimitive);t.FilterPrimitive=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrimitiveObject=void 0;var i=n(12),o=function(){function e(e){this.style=e}return Object.defineProperty(e.prototype,"strokeWidthPx",{get:function(){return this.style?this.style.strokeWidthPx:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strokeOffset",{get:function(){return this.style?this.style.strokeOffset:0},enumerable:!1,configurable:!0}),e.prototype.getUnitVaue=function(e){return"number"==typeof e?i.UnitConverter.twipsToPixels(e).toString():e},e.prototype.setUnitAttribute=function(e,t,n){null!=n&&e.setAttribute(t,this.getUnitVaue(n))},e.prototype.setPositionCorrectionAttribute=function(e){var t=this.strokeWidthPx%2==1?"translate("+this.strokeOffset+", "+this.strokeOffset+")":"";e.setAttribute("transform",t)},e}();t.PrimitiveObject=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isColorProperty=void 0;var i={stroke:!0,fill:!0};t.isColorProperty=function(e){return i[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorPointsCalculatorBase=void 0;var i=function(){return function(e){this.connector=e}}();t.ConnectorPointsCalculatorBase=i},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeShapeParametersHistoryItem=void 0;var r=function(e){function t(t,n){var i=e.call(this)||this;return i.shapeKey=t,i.parameters=n,i}return o(t,e),t.prototype.redo=function(e){var t=e.model.findShape(this.shapeKey);this.oldParameters=t.parameters.clone(),e.changeShapeParameters(t,this.parameters)},t.prototype.undo=function(e){var t=e.model.findShape(this.shapeKey);e.changeShapeParameters(t,this.oldParameters)},t}(n(8).HistoryItem);t.ChangeShapeParametersHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteConnectorHistoryItem=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.connectorKey=t,n}return o(t,e),t.prototype.redo=function(e){var t=e.model.findConnector(this.connectorKey);this.connector=t.clone(),e.deleteConnector(t)},t.prototype.undo=function(e){e.addConnector(this.connector,this.connector.key)},t}(n(8).HistoryItem);t.DeleteConnectorHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteShapeHistoryItem=void 0;var r=function(e){function t(t,n){void 0===n&&(n=!0);var i=e.call(this)||this;return i.shapeKey=t,i.allowed=n,i}return o(t,e),t.prototype.redo=function(e){var t=e.model.findShape(this.shapeKey);this.shape=t.clone(),e.deleteShape(t,this.allowed)},t.prototype.undo=function(e){e.addShape(this.shape,this.shape.key)},t}(n(8).HistoryItem);t.DeleteShapeHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeShapeHistoryItem=void 0;var r=function(e){function t(t,n,i){var o=e.call(this)||this;return o.shapeKey=t,o.position=n,o.size=i,o}return o(t,e),t.prototype.redo=function(e){var t=e.model.findShape(this.shapeKey);this.oldPosition=t.position.clone(),this.oldSize=t.size.clone(),e.resizeShape(t,this.position,this.size)},t.prototype.undo=function(e){var t=e.model.findShape(this.shapeKey);e.resizeShape(t,this.oldPosition,this.oldSize)},t}(n(8).HistoryItem);t.ResizeShapeHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeCustomDataHistoryItem=void 0;var r=n(8),a=n(3),s=function(e){function t(t,n){var i=e.call(this)||this;return i.itemKey=t,i.customData=a.ObjectUtils.cloneObject(n),i}return o(t,e),t.prototype.redo=function(e){var t=e.model.findItem(this.itemKey);this.oldCustomData=a.ObjectUtils.cloneObject(t.customData),e.changeCustomData(t,this.customData)},t.prototype.undo=function(e){var t=e.model.findItem(this.itemKey);e.changeCustomData(t,this.oldCustomData)},t}(r.HistoryItem);t.ChangeCustomDataHistoryItem=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeLockedHistoryItem=void 0;var r=function(e){function t(t,n){var i=e.call(this)||this;return i.itemKey=t.key,i.locked=n,i}return o(t,e),t.prototype.redo=function(e){var t=e.model.findItem(this.itemKey);this.oldLocked=t.locked,e.changeLocked(t,this.locked)},t.prototype.undo=function(e){var t=e.model.findItem(this.itemKey);e.changeLocked(t,this.oldLocked)},t}(n(8).HistoryItem);t.ChangeLockedHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeStyleHistoryItemBase=void 0;var r=function(e){function t(t,n,i){var o=e.call(this)||this;return o.itemKey=t,o.styleProperty=n,o.styleValue=i,o}return o(t,e),t.prototype.redo=function(e){var t=e.model.findItem(this.itemKey);this.oldStyleValue=t.style[this.styleProperty],e.changeStyle(t,this.styleProperty,this.styleValue)},t.prototype.undo=function(e){var t=e.model.findItem(this.itemKey);e.changeStyle(t,this.styleProperty,this.oldStyleValue)},t}(n(8).HistoryItem);t.ChangeStyleHistoryItemBase=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Importer=void 0;var r=n(14),a=n(3),s=n(2),l=n(0),u=n(91),c=n(6),d=n(51),h=n(133),p=n(95),f=n(22),m=function(e){function t(t,n){var i=e.call(this,t)||this;return i.obj=p.ImportUtils.parseJSON(n),i}return o(t,e),t.prototype.getObject=function(){return this.obj},t.prototype.getPageObject=function(e){return e.page},t.prototype.getShapeObjects=function(e){return e.shapes},t.prototype.getConnectorObjects=function(e){return e.connectors},t.prototype.importPageSettings=function(e,t){t&&(this.assert(t.width,"number"),this.assert(t.height,"number"),"number"==typeof t.width&&(e.size.width=t.width),"number"==typeof t.height&&(e.size.height=t.height),"number"==typeof t.pageColor?e.pageColor=t.pageColor:"string"==typeof t.pageColor&&(e.pageColor=f.ColorUtils.fromString(t.pageColor)),"number"==typeof t.pageWidth&&(e.pageSize.width=t.pageWidth),"number"==typeof t.pageHeight&&(e.pageSize.height=t.pageHeight),"boolean"==typeof t.pageLandscape&&(e.pageLandscape=t.pageLandscape))},t.prototype.importShape=function(e){this.assert(e.key,"string"),this.assert(e.x,"number"),this.assert(e.y,"number"),this.assert(e.type,"string");var t=e.type,n=this.shapeDescriptionManager.get(t),i=new l.Point(e.x,e.y),o=new r.Shape(n||u.ShapeDescriptionManager.default,i);return o.key=e.key,"string"!=typeof e.dataKey&&"number"!=typeof e.dataKey||(o.dataKey=e.dataKey),"object"==typeof e.customData&&(o.customData=a.ObjectUtils.cloneObject(e.customData)),"boolean"==typeof e.locked&&(o.locked=e.locked),"number"==typeof e.width&&(o.size.width=e.width),"number"==typeof e.height&&(o.size.height=e.height),"string"==typeof e.text&&(o.text=e.text),"string"==typeof e.imageUrl&&(o.image=new d.ImageInfo(e.imageUrl)),e.parameters&&(o.parameters.fromObject(e.parameters),o.description.normalizeParameters(o,o.parameters)),e.style&&o.style.fromObject(e.style),e.styleText&&o.styleText.fromObject(e.styleText),"number"==typeof e.zIndex&&(o.zIndex=e.zIndex),Array.isArray(e.childKeys)&&(o.childKeys=e.childKeys.slice()),"boolean"==typeof e.expanded&&(o.expanded=e.expanded),"number"==typeof e.expandedWidth&&"number"==typeof e.expandedHeight&&(o.expandedSize=new s.Size(e.expandedWidth,e.expandedHeight)),o},t.prototype.importShapeChildren=function(e,t){return[]},t.prototype.importConnector=function(e){var t=this;if(this.assert(e.key,"string"),!Array.isArray(e.points))throw Error("Invalid Format");var n=e.points.map((function(e){return t.assert(e.x,"number"),t.assert(e.y,"number"),new l.Point(e.x,e.y)})),i=new c.Connector(n);return i.key=e.key,"string"!=typeof e.dataKey&&"number"!=typeof e.dataKey||(i.dataKey=e.dataKey),"object"==typeof e.customData&&(i.customData=a.ObjectUtils.cloneObject(e.customData)),"boolean"==typeof e.locked&&(i.locked=e.locked),i.endConnectionPointIndex="number"==typeof e.endConnectionPointIndex?e.endConnectionPointIndex:-1,i.beginConnectionPointIndex="number"==typeof e.beginConnectionPointIndex?e.beginConnectionPointIndex:-1,void 0!==e.endItemKey&&this.assert(e.endItemKey,"string"),void 0!==e.beginItemKey&&this.assert(e.beginItemKey,"string"),i.endItemKey=e.endItemKey,i.beginItemKey=e.beginItemKey,e.texts&&i.texts.fromObject(e.texts),e.properties&&i.properties.fromObject(e.properties),e.style&&i.style.fromObject(e.style),e.styleText&&i.styleText.fromObject(e.styleText),"number"==typeof e.zIndex&&(i.zIndex=e.zIndex),i},t}(h.ImporterBase);t.Importer=m},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DiamondShapeDescription=void 0;var r=n(7),a=n(5),s=n(1),l=function(e){function t(t,n){return void 0===t&&(t=r.ShapeDefaultSize.clone()),e.call(this,t,n)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return s.ShapeTypes.Diamond},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,r=t.bottom,s=t.center,l=s.x,u=s.y;return[new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(l,i),new a.PathPrimitiveLineToCommand(o,u),new a.PathPrimitiveLineToCommand(l,r),new a.PathPrimitiveLineToCommand(n,u),new a.PathPrimitiveClosePathCommand],e.style)]},t.prototype.getTextRectangle=function(e){return e.rectangle.clone().inflate(-e.size.width/4,-e.size.height/4)},t.prototype.getSizeByText=function(e,t){return e.clone().multiply(2,2)},t}(r.ShapeDescription);t.DiamondShapeDescription=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TextShapeDescription=void 0;var r=n(7),a=n(2),s=n(1),l=n(56),u=n(21),c=n(17),d=function(e){function t(){var t=e.call(this,new a.Size(r.ShapeDefaultDimension,.5*r.ShapeDefaultDimension),!0)||this;return t.textClipPathId=c.RenderUtils.generateSvgElementId("clipRect"),t}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return s.ShapeTypes.Text},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e,t){if(t){var n=e.rectangle,i=n.x,o=n.y,r=n.width,a=n.height;return[new l.ClipPathPrimitive(this.getTextClipPathId(t),[new u.RectanglePrimitive(i,o,r,a)])]}return[]},t.prototype.getTextClipPathId=function(e){return e?this.textClipPathId:void 0},t.prototype.getSizeByTextRectangle=function(e){return e},t.prototype.getSizeByText=function(e,t){return e.clone()},t.prototype.getTextRectangle=function(e){return e.rectangle},t}(r.ShapeDescription);t.TextShapeDescription=d},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PentagonShapeDescription=void 0;var r=n(5),a=n(1),s=n(94),l=n(9),u=n(3),c=n(13),d=function(e){function t(t){var n=e.call(this,t)||this;return n.defaultRatio=n.defaultSize.height/n.defaultSize.width,n}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return a.ShapeTypes.Pentagon},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angleCount",{get:function(){return 5},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,a=t.bottom,s=t.width,l=t.height,u=t.center.x,c=l/s/this.defaultRatio,d=Math.PI-this.angle,h=s/2*Math.tan(d/2)*c,p=i+h,f=(l-h)/Math.tan(d)/c,m=n+f,g=o-f;return[new r.PathPrimitive([new r.PathPrimitiveMoveToCommand(u,i),new r.PathPrimitiveLineToCommand(o,p),new r.PathPrimitiveLineToCommand(g,a),new r.PathPrimitiveLineToCommand(m,a),new r.PathPrimitiveLineToCommand(n,p),new r.PathPrimitiveClosePathCommand],e.style)]},t.prototype.processConnectionPoint=function(e,t){var n=e.getConnectionPointSide(t);if(n===l.ConnectionPointSide.East||n===l.ConnectionPointSide.West){var i=e.rectangle,o=i.y,r=i.width,a=i.height/r/this.defaultRatio,s=Math.PI-this.angle,u=o+r/2*Math.tan(s/2)*a;(n===l.ConnectionPointSide.East||n===l.ConnectionPointSide.West)&&(t.y=u)}},t.prototype.calculateHeight=function(e){var t=Math.PI-this.angle;return e/2*Math.tan(t/2)+e/2/Math.cos(t/2)*Math.sin(t)},t.prototype.getTextRectangle=function(e){var t=u.GeometryUtils.getMaxRectangleEnscribedInEllipse(e.size);return c.Rectangle.fromGeometry(e.position.clone().offset((e.size.width-t.width)/2,(e.size.height-t.height)/2),t)},t.prototype.getSizeByText=function(e,t){return u.GeometryUtils.getEllipseByEnscribedRectangle(e)},t}(s.PolygonShapeDescription);t.PentagonShapeDescription=d},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HexagonShapeDescription=void 0;var r=n(5),a=n(1),s=n(94),l=n(3),u=n(13),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return a.ShapeTypes.Hexagon},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angleCount",{get:function(){return 6},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,a=t.bottom,s=t.width,l=t.center.y,u=Math.PI-this.angle,c=s/(1+2*Math.cos(u)),d=n+(s-c)/2,h=d+c;return[new r.PathPrimitive([new r.PathPrimitiveMoveToCommand(d,i),new r.PathPrimitiveLineToCommand(h,i),new r.PathPrimitiveLineToCommand(o,l),new r.PathPrimitiveLineToCommand(h,a),new r.PathPrimitiveLineToCommand(d,a),new r.PathPrimitiveLineToCommand(n,l),new r.PathPrimitiveClosePathCommand],e.style)]},t.prototype.calculateHeight=function(e){var t=Math.PI-this.angle;return e/(1+2*Math.cos(t))*2*Math.sin(t)},t.prototype.getTextRectangle=function(e){var t=l.GeometryUtils.getMaxRectangleEnscribedInEllipse(e.size);return u.Rectangle.fromGeometry(e.position.clone().offset((e.size.width-t.width)/2,(e.size.height-t.height)/2),t)},t.prototype.getSizeByText=function(e,t){return l.GeometryUtils.getEllipseByEnscribedRectangle(e)},t}(s.PolygonShapeDescription);t.HexagonShapeDescription=c},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TriangleShapeDescription=void 0;var r=n(7),a=n(5),s=n(1),l=n(45),u=n(9),c=n(13),d=n(2),h=function(e){function t(t){var n=e.call(this,void 0,t)||this;return n.defaultSize.height=n.calculateHeight(r.ShapeDefaultDimension),n}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return s.ShapeTypes.Triangle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.createConnectionPoints=function(){return[new l.ConnectionPoint(.5,0,u.ConnectionPointSide.North),new l.ConnectionPoint(.75,.5,u.ConnectionPointSide.East),new l.ConnectionPoint(.5,1,u.ConnectionPointSide.South),new l.ConnectionPoint(.25,.5,u.ConnectionPointSide.West)]},t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,r=t.bottom;return[new a.PathPrimitive([new a.PathPrimitiveMoveToCommand(t.center.x,i),new a.PathPrimitiveLineToCommand(o,r),new a.PathPrimitiveLineToCommand(n,r),new a.PathPrimitiveClosePathCommand],e.style)]},t.prototype.calculateHeight=function(e){return Math.sqrt(Math.pow(e,2)-Math.pow(e/2,2))},t.prototype.getTextRectangle=function(e){return new c.Rectangle(e.position.x+e.size.width/4,e.position.y+e.size.height/2,e.size.width/2,e.size.height/2-r.ShapeTextPadding).nonNegativeSize()},t.prototype.getSizeByText=function(e,t){return new d.Size(2*e.width,2*e.height+r.ShapeTextPadding)},t}(r.ShapeDescription);t.TriangleShapeDescription=h},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentShapeDescription=void 0;var r=n(19),a=n(1),s=n(5),l=n(9),u=function(e){function t(){return e.call(this,void 0,!0)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return a.ShapeTypes.Document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){return this.createDocumentPrimitives(e.rectangle,e.style)},t.prototype.createDocumentPrimitives=function(e,n){var i=e.x,o=e.y,r=e.right,a=e.bottom,l=e.width,u=e.height,c=e.center.x,d=u*t.curveOffsetRatio;return[].concat([new s.PathPrimitive([new s.PathPrimitiveMoveToCommand(i,o),new s.PathPrimitiveLineToCommand(r,o),new s.PathPrimitiveLineToCommand(r,a),new s.PathPrimitiveQuadraticCurveToCommand(r-.25*l,a-2*d,c,a-d),new s.PathPrimitiveQuadraticCurveToCommand(i+.25*l,a+d,i,a-d),new s.PathPrimitiveClosePathCommand],n)])},t.prototype.processConnectionPoint=function(e,n){e.getConnectionPointSide(n)===l.ConnectionPointSide.South&&(n.y-=e.size.height*t.curveOffsetRatio)},t.prototype.getTextRectangle=function(e){var n=e.rectangle;return n.clone().resize(0,-n.height*t.curveOffsetRatio)},t.curveOffsetRatio=.1,t}(r.RectangleShapeDescription);t.DocumentShapeDescription=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CustomShapeDescription=void 0;var r=n(127),a=n(13),s=n(2),l=n(0),u=n(45),c=n(9),d=n(128),h=n(7),p=n(51),f=n(46),m=n(130),g=n(231),v=function(e){function t(t,n){var i=e.call(this,new s.Size(t.defaultWidth||n&&n.defaultSize.width||h.ShapeDefaultDimension,t.defaultHeight||n&&n.defaultSize.height||h.ShapeDefaultDimension))||this;if(i.properties=t,i.baseDescription=n,i.imageLoader=new m.ImageLoader(i.updateSvgImage.bind(i)),i.defaultText=void 0!==t.defaultText?t.defaultText:n&&n.getDefaultText(),i.defaultImageUrl=t.defaultImageUrl||n&&n.getDefaultImageUrl(),i.title=t.title||n&&n.getTitle()||i.defaultText||"",i.connectionPoints=i.createConnectionPoints(),t.svgUrl){i.svgImage=new p.ImageInfo(t.svgUrl);var o=f.ImageCache.instance.createUnloadedInfoByShapeImageInfo(i.svgImage);i.imageLoader.load(o)}return t.svgToolboxUrl&&(i.svgToolboxImage=new p.ImageInfo(t.svgToolboxUrl),o=f.ImageCache.instance.createUnloadedInfoByShapeImageInfo(i.svgToolboxImage),i.imageLoader.load(o)),i}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return this.properties.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditText",{get:function(){return!1!==this.properties.allowEditText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditImage",{get:function(){return this.baseDescription?this.baseDescription.allowEditImage:!0===this.properties.allowEditImage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableChildren",{get:function(){return this.baseDescription&&this.baseDescription.enableChildren},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTemplate",{get:function(){return!!this.properties.createTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minWidth",{get:function(){return this.properties.minWidth||this.baseDescription&&this.baseDescription.minWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minHeight",{get:function(){return this.properties.minHeight||this.baseDescription&&this.baseDescription.minHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxWidth",{get:function(){return this.properties.maxWidth||this.baseDescription&&this.baseDescription.maxWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxHeight",{get:function(){return this.properties.maxHeight||this.baseDescription&&this.baseDescription.maxHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepRatioOnAutoSize",{get:function(){return this.properties.keepRatioOnAutoSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxSize",{get:function(){return this.properties.toolboxWidthToHeightRatio?new s.Size(this.defaultSize.width,this.defaultSize.width/this.properties.toolboxWidthToHeightRatio):this.defaultSize},enumerable:!1,configurable:!0}),t.prototype.getTextAngle=function(){return this.baseDescription&&this.baseDescription.getTextAngle()||e.prototype.getTextAngle.call(this)},t.prototype.getTitle=function(){return void 0!==this.title?this.title:e.prototype.getTitle.call(this)},t.prototype.getDefaultText=function(){return void 0!==this.defaultText?this.defaultText:e.prototype.getDefaultText.call(this)},t.prototype.getDefaultImageUrl=function(){return void 0!==this.defaultImageUrl?this.defaultImageUrl:e.prototype.getDefaultImageUrl.call(this)},t.prototype.allowResizeHorizontally=function(t){return!1!==this.properties.allowResize&&(this.baseDescription?this.baseDescription.allowResizeHorizontally(t):e.prototype.allowResizeHorizontally.call(this,t))},t.prototype.allowResizeVertically=function(t){return!1!==this.properties.allowResize&&(this.baseDescription?this.baseDescription.allowResizeVertically(t):e.prototype.allowResizeVertically.call(this,t))},t.prototype.createConnectionPoints=function(){return this.properties&&this.properties.connectionPoints&&this.properties.connectionPoints.length?this.properties.connectionPoints.map((function(e){if(e&&"number"==typeof e.x&&"number"==typeof e.y){var t="number"==typeof e.side?e.side:c.ConnectionPointSide.Undefined;return new u.ConnectionPoint(e.x,e.y,t)}})).filter((function(e){return e})):e.prototype.createConnectionPoints.call(this)},t.prototype.getConnectionPointSides=function(){for(var e={},t=0;t0},t}(n(10).SimpleCommandBase);t.ChangeConnectorPropertyCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLayoutTreeVerticalCommand=void 0;var r=n(76),a=n(97),s=n(20),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createLayoutSettings=function(){var e=this.control.settings.snapToGrid?this.control.settings.gridSize:void 0,t=new s.TreeLayoutSettings(e);return t.orientation=s.DataLayoutOrientation.Vertical,t},t.prototype.createLayout=function(e,t){return new a.TreeLayoutBuilder(e,t).build()},t}(r.AutoLayoutCommandBase);t.AutoLayoutTreeVerticalCommand=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphLayout=void 0;var i=n(3),o=n(71),r=function(){function e(){this.nodeKeys=[],this.nodeToLayout={},this.edgeToPosition={}}return e.prototype.forEachNode=function(e){var t=this;this.nodeKeys.forEach((function(n){return e(t.nodeToLayout[n],n)}))},e.prototype.reduce=function(e,t){var n=this;return this.nodeKeys.reduce((function(t,i,o){return e(t,n.nodeToLayout[i],o)}),t)},e.prototype.addNode=function(e){if(this.nodeToLayout[e.key])throw Error("Node layout is already registered");return this.nodeKeys.push(e.key),this.nodeToLayout[e.key]=e,e},e.prototype.hasNode=function(e){return!!this.nodeToLayout[e]},e.prototype.addEdge=function(e){if(this.edgeToPosition[e.key])throw Error("Edge layout is already registered");this.edgeToPosition[e.key]=e},e.prototype.getRectangle=function(e){var t=this;return i.GeometryUtils.getCommonRectangle(this.nodeKeys.map((function(e){return t.nodeToLayout[e].rectangle})))},e.prototype.offsetNodes=function(t,n){var i=this;void 0===t&&(t=0),void 0===n&&(n=0);var r=new e;return this.nodeKeys.forEach((function(e){var a=i.nodeToLayout[e];r.addNode(new o.NodeLayout(a.info,a.position.clone().offset(t,n)))})),r.copyEdges(this),r},e.prototype.extend=function(e){var t=this;e.forEachNode((function(e){return t.addNode(e)})),this.copyEdges(e)},e.prototype.copyEdges=function(e){var t=this;Object.keys(e.edgeToPosition).forEach((function(n){var i=e.edgeToPosition[n];t.addEdge(new o.EdgeLayout(i.key,i.beginIndex,i.endIndex))}))},e}();t.GraphLayout=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutBuilder=void 0;var i=n(20),o=function(){function e(e,t){this.settings=e,this.graph=t}return e.prototype.getBreadthNodeSizeCore=function(e,t){var n=this.settings.orientation===i.DataLayoutOrientation.Vertical?e.size.width:e.size.height;return t||(n+=this.settings.orientation===i.DataLayoutOrientation.Vertical?e.margin.left+e.margin.right:e.margin.top+e.margin.bottom),n},e.prototype.getDepthNodeSizeCore=function(e){return this.settings.orientation===i.DataLayoutOrientation.Horizontal?e.size.width+e.margin.left+e.margin.right:e.size.height+e.margin.top+e.margin.bottom},e.prototype.chooseDirectionValue=function(e,t){return this.settings.direction===i.LogicalDirectionKind.Forward?e:t},e.prototype.getDirectionValue=function(e){return this.settings.direction===i.LogicalDirectionKind.Forward?e:-e},e.prototype.getComponentOffset=function(e){var t=e.getRectangle(!0);return(this.settings.orientation===i.DataLayoutOrientation.Vertical?t.width:t.height)+this.settings.componentSpacing},e.prototype.setComponentOffset=function(e,t){return this.settings.orientation===i.DataLayoutOrientation.Vertical?e.offsetNodes(t):e.offsetNodes(0,t)},e}();t.LayoutBuilder=o},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasManager=void 0;var r=n(99),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pendingChanges={},t.pendingRemoveChanges={},t.updatesLock=0,t}return o(t,e),t.prototype.beginUpdate=function(){this.updatesLock++},t.prototype.endUpdate=function(){this.updatesLock--,0===this.updatesLock&&this.applyPendingChanges()},t.prototype.getPendingChanges=function(){var e=this;return Object.keys(this.pendingChanges).map((function(t){return e.pendingChanges[t]}))},t.prototype.getPendingRemoveChanges=function(){var e=this;return Object.keys(this.pendingRemoveChanges).map((function(t){return e.pendingRemoveChanges[t]}))},t.prototype.applyPendingChanges=function(){var e=this.getPendingRemoveChanges();e.length&&(this.applyChangesCore(e),this.pendingRemoveChanges={});var t=this.getPendingChanges();t.length&&(this.applyChangesCore(t),this.pendingChanges={})},t.prototype.applyChangesCore=function(e){var t=this,n=[];e.forEach((function(e){t.applyChange(e)||n.push(e)})),n.length&&n.length!==e.length&&this.applyChangesCore(n)},t.prototype.postponeChanges=function(e){var t=this;e.forEach((function(e){if(e.type===r.ItemChangeType.Remove)t.pendingRemoveChanges[e.key]=e,delete t.pendingChanges[e.key];else if(t.pendingChanges[e.key])e.type===r.ItemChangeType.Create?t.pendingChanges[e.key]=e:e.type===r.ItemChangeType.UpdateStructure?t.pendingChanges[e.key].type===r.ItemChangeType.UpdateProperties&&(t.pendingChanges[e.key]=e):e.type===r.ItemChangeType.UpdateProperties?t.pendingChanges[e.key].type===r.ItemChangeType.Update&&(t.pendingChanges[e.key]=e):e.type===r.ItemChangeType.UpdateClassName&&t.pendingChanges[e.key].type===r.ItemChangeType.UpdateClassName&&(t.pendingChanges[e.key]=e);else{if(t.pendingRemoveChanges[e.key]&&e.type!==r.ItemChangeType.Create)throw new Error("Incorrect model changes sequence.");t.pendingChanges[e.key]=e}}))},t.prototype.applyOrPostponeChanges=function(e){0===this.updatesLock?this.applyChangesCore(e):this.postponeChanges(e)},t.prototype.notifyModelChanged=function(e){this.applyOrPostponeChanges(e)},t.prototype.notifyPageColorChanged=function(e){},t.prototype.notifyPageSizeChanged=function(e,t){},t}(n(42).CanvasManagerBase);t.CanvasManager=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasteSelectionCommandBase=void 0;var r=n(101),a=n(119),s=n(14),l=n(266),u=n(6),c=n(267),d=n(4),h=n(68),p=n(0),f=n(12),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabled=function(){return e.prototype.isEnabled.call(this)&&(this.isPasteSupportedByBrowser()||void 0!==r.ClipboardCommand.clipboardData)},t.prototype.isVisible=function(){return this.isPasteSupportedByBrowser()||void 0!==r.ClipboardCommand.clipboardData},t.prototype.parseClipboardData=function(e){var t;t=new a.Importer(this.control.shapeDescriptionManager,e).importItems(this.control.model);var n=this.getEventPositionOffset(t,this.control.contextMenuPosition);n=this.getCorrectedOffsetByModel(t,n);for(var i=0;it.startLimit||Math.abs(this.startPoint.y-e.modelPoint.y)>t.startLimit)&&(this.processOnMouseMoveAfterLimit(e),this.startPoint=void 0)},t.prototype.processOnMouseMoveAfterLimit=function(e){e.isTouchMode?e.touches.length>1?this.startZooming(e):this.startScrolling(e):this.startSelection(e)},t.prototype.onMouseUp=function(e){this.onMouseUpCore(e),this.handler.state!==this&&this.handler.state.onMouseUp(e)},t.prototype.onMouseUpCore=function(e){e.source.type===a.MouseEventElementType.Shape&&this.canSelectOnMouseUp(e.source.key)||e.source.type===a.MouseEventElementType.Connector&&this.canSelectOnMouseUp(e.source.key)||e.source.type===a.MouseEventElementType.ShapeExpandButton&&this.canSelectOnMouseUp(e.source.key)?this.replaceSelection(e):this.startPoint&&this.canClearSelectionOnMouseUp()&&this.clearSelection(),this.startPoint=void 0},t.prototype.onMouseWheel=function(e){return!!this.handler.canStartZoomOnWheel(e)&&(this.handler.switchState(new u.MouseHandlerZoomOnWheelState(this.handler,this.settings,this.view)),this.handler.state.onMouseWheel(e),!0)},t.prototype.onLongTouch=function(e){this.replaceMultipleSelection(e.source.key)},t.prototype.finish=function(){this.startPoint=void 0},t.prototype.startSelection=function(e){e.button===a.MouseButton.Left&&this.handler.switchState(new l.MouseHandlerSelectionState(this.handler,this.selection,this.visualizerManager))},t.prototype.startScrolling=function(e){e.button===a.MouseButton.Left&&(this.handler.raiseDragScrollStart(),this.handler.switchState(new c.MouseHandlerScrollingState(this.handler,this.view,this.selection)))},t.prototype.startZooming=function(e){this.handler.switchState(new h.MouseHandlerZoomOnPinchState(this.handler,this.selection,this.settings,this.view))},t.prototype.inSelection=function(e){return this.selection.hasKey(e)},t.prototype.hasDiagramItem=function(e){return e.source.type===a.MouseEventElementType.Shape||e.source.type===a.MouseEventElementType.Connector},t.prototype.onShapeExpandBtnMouseDown=function(e){this.handler.addDiagramItemToSelection(e),this.handler.switchState(new s.MouseHandlerToggleShapeExpandedState(this.handler,this.history,this.model,this.selection))},t.prototype.replaceSelection=function(e){this.handler.canMultipleSelection(e)?this.replaceMultipleSelection(e.source.key):this.handler.changeSingleSelection(e.source.key)},t.prototype.replaceMultipleSelection=function(e){this.selection.hasKey(e)?this.selection.remove(e):this.selection.add(e)},t.prototype.clearSelection=function(){this.selection.set([])},t.startLimit=d.UnitConverter.pixelsToTwips(1),t}(r.MouseHandlerStateBase);t.MouseHandlerDefaultStateBase=p},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerScrollingState=void 0;var r=n(40),a=n(11),s=n(0),l=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.view=n,o.selection=i,o.lastOffset=new s.Point(0,0),o}return o(t,e),t.prototype.onKeyUp=function(e){this.handler.onFinishScrollPageByKeyboard(e)},t.prototype.onMouseDown=function(e){e.preventDefault=!0,this.startPoint=this.getPointByEvent(e)},t.prototype.onMouseMove=function(e){if(e.button===a.MouseButton.Left){var t=this.currentPoint||this.startPoint;e.preventDefault=!0;var n=this.getPointByEvent(e),i=this.view.scrollBy(new s.Point(n.x-t.x,n.y-t.y));this.lastOffset=this.lastOffset.clone().offset(i.x,i.y),this.currentPoint=n}else this.handler.onFinishScrollPageByMouse(e)},t.prototype.onMouseUp=function(e){e.button===a.MouseButton.Left&&this.handler.onFinishScrollPageByMouse(e),this.handler.switchToDefaultState()},t.prototype.cancelChanges=function(){this.currentPoint&&this.view.scrollBy(this.lastOffset.clone().multiply(-1,-1))},t.prototype.finish=function(){this.currentPoint&&this.startPoint&&!this.currentPoint.equals(this.startPoint)||this.selection.set([]),e.prototype.finish.call(this)},t.prototype.getPointByEvent=function(e){return e.offsetPoint},t}(r.MouseHandlerCancellableState);t.MouseHandlerScrollingState=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerDragDiagramItemStateBase=t.DraggingConnector=void 0;var r=n(60),a=n(86),s=n(29),l=n(85),u=n(4),c=n(16),d=n(11),h=n(34),p=function(){return function(e){this.connector=e,this.startPoints=e.points.map((function(e){return e.clone()})),this.startRenderContext=e.tryCreateRenderPointsContext()}}();t.DraggingConnector=p;var f=function(){return function(e){this.shape=e,this.startPosition=e.position.clone()}}(),m=function(e){function t(t,n,i,o,r){var a=e.call(this,t,n)||this;return a.model=i,a.selection=o,a.visualizerManager=r,a.startScrollLeft=0,a.startScrollTop=0,a}return o(t,e),t.prototype.finish=function(){this.visualizerManager.resetExtensionLines(),this.visualizerManager.resetContainerTarget(),this.visualizerManager.resetConnectionTarget(),this.visualizerManager.resetConnectionPoints(),e.prototype.finish.call(this)},t.prototype.onMouseDown=function(t){var n=this;this.handler.addDiagramItemToSelection(t),this.shouldClone=this.handler.canCopySelectedItems(t),this.startPoint=t.modelPoint,this.initDrag(),this.lockInitDrag=!1,this.shouldClone||this.draggingShapes.forEach((function(e){return n.handler.addInteractingItem(e.shape,c.DiagramModelOperation.MoveShape)})),e.prototype.onMouseDown.call(this,t)},t.prototype.onMouseMove=function(e){this.mouseMoveEvent=e,e.button!==d.MouseButton.Left&&(this.cancelChanges(),this.handler.switchToDefaultState()),this.canApplyChangesOnMouseMove(this.startPoint,e.modelPoint)&&(this.handler.canCopySelectedItems(e)&&(this.lockInitDrag||(this.cancelChanges(),this.shouldClone=!0,this.copySelection(),this.initDrag(),this.lockInitDrag=!0)),this.onApplyChanges(e),this.onAfterApplyChanges(),this.updateContainers(e))},t.prototype.updateContainers=function(e){this.visualizerManager.setExtensionLines(this.selection.getSelectedShapes(!1,!0));var t=u.ModelUtils.findContainerByEventKey(this.model,this.selection,e.source.key);t&&this.allowInsertToContainer(e,t)?this.visualizerManager.setContainerTarget(t,e.source.type):this.visualizerManager.resetContainerTarget()},t.prototype.onMouseUp=function(t){e.prototype.onMouseUp.call(this,t),this.handler.canRemoveDiagramItemToSelection(t)&&this.handler.canMultipleSelection(t)&&this.handler.removeDiagramItemFromSelection(t.button,t.source.key)},t.prototype.onApplyChanges=function(e){var t=this;if(this.calculateFixedPosition(e),this.draggingShapes.length){var n=this.draggingShapes.map((function(e){return e.shape}));this.draggingShapes.forEach((function(i){for(var o=i.shape;o.container;){if(-1!==n.indexOf(o.container))return!1;o=o.container}t.moveShape(i,e)}));var i=this.draggingShapes[0],o=r.Vector.fromPoints(i.startPosition.clone(),i.shape.position.clone());(o.x||o.y)&&this.draggingConnectors.forEach((function(e){return t.moveConnectorCore(e.connector,e.startPoints,e.startRenderContext,o)}))}else this.draggingConnectors.forEach((function(n){return t.moveConnector(n,e)}));var a=u.ModelUtils.findContainerByEventKey(this.model,this.selection,e.source.key);a&&this.allowInsertToContainer(e,a)?u.ModelUtils.insertSelectionToContainer(this.history,this.model,this.selection,a):u.ModelUtils.removeSelectionFromContainer(this.history,this.model,this.selection),this.handler.tryUpdateModelSize((function(e,n){t.modelConnectorsWithoutBeginItemInfo.forEach((function(t){t.point.x+=e,t.point.y+=n})),t.modelConnectorsWithoutEndItemInfo.forEach((function(t){t.point.x+=e,t.point.y+=n}))}))},t.prototype.getDraggingElementKeys=function(){return this.draggingShapes.map((function(e){return e.shape.key})).concat(this.draggingConnectors.map((function(e){return e.connector.key})))},t.prototype.getSnappedPoint=function(e,t){return this.handler.getSnappedPointOnDragDiagramItem(e,t,this.fixedX,this.fixedY,this.startPoint)},t.prototype.initDrag=function(){this.selectedItems=u.ModelUtils.createSelectedItems(this.selection),this.initDraggingShapes(),this.areValidDraggingShapes?(this.initDraggingConnectors(),this.areValidDraggingConnectors?(this.modelConnectorsWithoutBeginItemInfo=this.createModelConnectorsWithoutBeginItemInfo(),this.modelConnectorsWithoutEndItemInfo=this.createModelConnectorsWithoutEndItemInfo()):this.handler.switchToDefaultState()):this.handler.switchToDefaultState()},t.prototype.initDraggingShapes=function(){this.draggingShapes=this.selection.getSelectedShapes(!1,!0).map((function(e){return new f(e)}))},t.prototype.initDraggingConnectors=function(){var e=this;this.draggingConnectors=[],this.draggingConnectorsIndexByKey={},this.selection.getSelectedConnectors(!1,!0).forEach((function(t){return e.registerConnector(t)})),this.shouldClone||this.draggingShapes.forEach((function(t){var n=t.shape.attachedConnectors;n&&n.forEach((function(t){e.containsDraggingConnectorByKey(t.key)||e.registerConnector(t)}))}))},t.prototype.copySelection=function(){var e=this;u.ModelUtils.cloneSelectionToOffset(this.history,this.model,(function(t){var n=e.model.findItem(t);n&&e.handler.addInteractingItem(n,c.DiagramModelOperation.AddShape)}),this.selection,0,0)},t.prototype.calculateFixedPosition=function(e){this.fixedX=!1,this.fixedY=!1,this.handler.canCalculateFixedPosition(e)&&(Math.abs(this.startPoint.x-e.modelPoint.x)-1||i instanceof c.Shape&&t.addShapeExtensionLines(i,n)}))}},t.prototype.addPageExtensionLines=function(e){for(var t=Math.round(this.model.size.width/this.model.pageWidth),n=Math.round(this.model.size.height/this.model.pageHeight),i=0;id.right&&(n=t.x,o=d.right,a=n-f.CanvasSelectionManager.extensionLineOffset,u=o+m+f.CanvasSelectionManager.extensionLineOffset),t.bottomd.bottom&&(i=t.y,r=d.bottom,l=i-f.CanvasSelectionManager.extensionLineOffset,c=r+m+f.CanvasSelectionManager.extensionLineOffset),void 0!==a&&void 0!==u){var v=this.getViewUnitText(Math.abs(n-o));if(t.center.y===d.center.y){var _=new h.Segment(new p.Point(a,t.center.y),new p.Point(u,d.center.y));this.extensionLinesVisualizer.addSegment(a>u?s.ExtensionLineType.VerticalCenterAfter:s.ExtensionLineType.VerticalCenterBefore,_,g?v:""),g=!1}t.y===d.y&&(_=new h.Segment(new p.Point(a,t.y),new p.Point(u,d.y)),this.extensionLinesVisualizer.addSegment(a>u?s.ExtensionLineType.TopToTopAfter:s.ExtensionLineType.TopToTopBefore,_,g?v:"")),t.bottom===d.bottom&&(_=new h.Segment(new p.Point(a,t.bottom+m),new p.Point(u,d.bottom+m)),this.extensionLinesVisualizer.addSegment(a>u?s.ExtensionLineType.BottomToBottomAfter:s.ExtensionLineType.BottomToBottomBefore,_,g?v:"")),t.y===d.bottom&&(_=new h.Segment(new p.Point(a,t.y),new p.Point(u,d.bottom+m)),this.extensionLinesVisualizer.addSegment(a>u?s.ExtensionLineType.TopToBottomAfter:s.ExtensionLineType.TopToBottomBefore,_,g?v:"")),t.bottom===d.y&&(_=new h.Segment(new p.Point(a,t.bottom+m),new p.Point(u,d.y)),this.extensionLinesVisualizer.addSegment(a>u?s.ExtensionLineType.BottomToTopAfter:s.ExtensionLineType.BottomToTopBefore,_,g?v:""))}void 0!==l&&void 0!==c&&(v=this.getViewUnitText(Math.abs(i-r)),t.center.x===d.center.x&&(_=new h.Segment(new p.Point(t.center.x,l),new p.Point(d.center.x,c)),this.extensionLinesVisualizer.addSegment(l>c?s.ExtensionLineType.HorizontalCenterBelow:s.ExtensionLineType.HorizontalCenterAbove,_,g?v:""),g=!1),t.x===d.x&&(_=new h.Segment(new p.Point(t.x,l),new p.Point(d.x,c)),this.extensionLinesVisualizer.addSegment(l>c?s.ExtensionLineType.LeftToLeftBelow:s.ExtensionLineType.LeftToLeftAbove,_,g?v:"")),t.right===d.right&&(_=new h.Segment(new p.Point(t.right+m,l),new p.Point(d.right+m,c)),this.extensionLinesVisualizer.addSegment(l>c?s.ExtensionLineType.RightToRightBelow:s.ExtensionLineType.RightToRightAbove,_,g?v:"")),t.x===d.right&&(_=new h.Segment(new p.Point(t.x,l),new p.Point(d.right+m,c)),this.extensionLinesVisualizer.addSegment(l>c?s.ExtensionLineType.LeftToRightBelow:s.ExtensionLineType.LeftToRightAbove,_,g?v:"")),t.right===d.x&&(_=new h.Segment(new p.Point(t.right+m,l),new p.Point(d.x,c)),this.extensionLinesVisualizer.addSegment(l>c?s.ExtensionLineType.RightToLeftBelow:s.ExtensionLineType.RightToLeftAbove,_,g?v:"")))},t.prototype.resetExtensionLines=function(){this.extensionLinesVisualizer.reset()},t.prototype.setResizeInfo=function(e){var t=m.ModelUtils.createRectangle(e),n=new p.Point(t.center.x,t.bottom+f.CanvasSelectionManager.resizeInfoOffset),i=this.getViewUnitText(t.width)+" x "+this.getViewUnitText(t.height);this.resizeInfoVisualizer.set(n,i)},t.prototype.resetResizeInfo=function(){this.resizeInfoVisualizer.reset()},t.prototype.setSelectionRectangle=function(e){this.selectionRectangleVisualizer.setRectangle(e)},t.prototype.resetSelectionRectangle=function(){this.selectionRectangleVisualizer.reset()},t.prototype.getViewUnitText=function(e){return m.ModelUtils.getUnitText(this.settings.viewUnits,y.DiagramLocalizationService.unitItems,y.DiagramLocalizationService.formatUnit,e)},t.prototype.notifyReadOnlyChanged=function(e){this.readOnly=e,this.readOnly&&(this.resetConnectionPoints(),this.resetConnectionTarget(),this.resetExtensionLines(),this.resetContainerTarget(),this.resetResizeInfo(),this.resetSelectionRectangle())},t.prototype.notifyDragStart=function(e){},t.prototype.notifyDragEnd=function(e){},t.prototype.notifyDragScrollStart=function(){},t.prototype.notifyDragScrollEnd=function(){},t.prototype.onUpdateUnlocked=function(e){},t}(_.BatchUpdatableObject);t.VisualizerManager=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TargetVisualizerBase=void 0;var i=function(){function e(e){this.dispatcher=e}return e.prototype.getKey=function(){return this.key},e.prototype.setTargetRect=function(e,t,n){this.key!==e&&(this.key=e,this.targetRect=t,this.targetStrokeWidth=n,this.raiseShow())},e.prototype.reset=function(){"-1"!==this.key&&(this.key="-1",this.targetRect=void 0,this.targetStrokeWidth=0,this.raiseHide())},e}();t.TargetVisualizerBase=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionLinesVisualizer=t.ExtensionLine=t.ExtensionLineType=void 0,function(e){e[e.LeftToLeftAbove=0]="LeftToLeftAbove",e[e.LeftToLeftBelow=1]="LeftToLeftBelow",e[e.RightToRightAbove=2]="RightToRightAbove",e[e.RightToRightBelow=3]="RightToRightBelow",e[e.LeftToRightAbove=4]="LeftToRightAbove",e[e.LeftToRightBelow=5]="LeftToRightBelow",e[e.RightToLeftAbove=6]="RightToLeftAbove",e[e.RightToLeftBelow=7]="RightToLeftBelow",e[e.TopToTopBefore=8]="TopToTopBefore",e[e.TopToTopAfter=9]="TopToTopAfter",e[e.BottomToBottomBefore=10]="BottomToBottomBefore",e[e.BottomToBottomAfter=11]="BottomToBottomAfter",e[e.TopToBottomBefore=12]="TopToBottomBefore",e[e.TopToBottomAfter=13]="TopToBottomAfter",e[e.BottomToTopBefore=14]="BottomToTopBefore",e[e.BottomToTopAfter=15]="BottomToTopAfter",e[e.HorizontalCenterAbove=16]="HorizontalCenterAbove",e[e.HorizontalCenterBelow=17]="HorizontalCenterBelow",e[e.VerticalCenterBefore=18]="VerticalCenterBefore",e[e.VerticalCenterAfter=19]="VerticalCenterAfter",e[e.VerticalCenterToPageCenter=20]="VerticalCenterToPageCenter",e[e.HorizontalCenterToPageCenter=21]="HorizontalCenterToPageCenter",e[e.LeftToPageCenter=22]="LeftToPageCenter",e[e.RightToPageCenter=23]="RightToPageCenter",e[e.TopToPageCenter=24]="TopToPageCenter",e[e.BottomToPageCenter=25]="BottomToPageCenter"}(t.ExtensionLineType||(t.ExtensionLineType={}));var i=function(){return function(e,t,n){this.type=e,this.segment=t,this.text=n}}();t.ExtensionLine=i;var o=function(){function e(e){this.dispatcher=e,this.lines=[],this.lineIndexByType={}}return e.prototype.addSegment=function(e,t,n){var o=this.lineIndexByType[e];if(void 0===o){var r=new i(e,t,n),a=this.lines.push(r);this.lineIndexByType[r.type]=a-1,this.raiseShow()}else t.length1,r=e.getSelectedShapes(!0).filter((function(e){return t.selectionCanBeDrawn(e)})),a=e.getSelectedConnectors(!0).filter((function(e){return t.selectionCanBeDrawn(e)}));if(r.forEach((function(e){return t.getOrCreateShapeSelection(e,i).onSelectionChanged(o)})),a.forEach((function(e){return t.getOrCreateConnectorSelection(e,i).onSelectionChanged(o)})),o){var s=n.length>0?n[0].strokeWidth:0,l={};n.filter((function(e){return!e.isLocked})).forEach((function(e){return l[e.key]=e.rectangle})),this.getOrCreateMultipleSelection(i).onSelectionChanged(!!r.filter((function(e){return!e.isLocked})).length,s,l)}this.hideOutdatedSelection(i)},n.prototype.applyChangesCore=function(t){e.prototype.applyChangesCore.call(this,t);var n=this.getMultipleSelection();n&&n.onModelChanged()},n.prototype.applyChange=function(e){var t=this.getMultipleSelection();e.item instanceof p.Shape?this.updateShapeSelection(e.item,t):e.item instanceof f.Connector&&this.updateConnectorSelection(e.item,t)},n.prototype.notifyPageColorChanged=function(e){},n.prototype.notifyPageSizeChanged=function(e,t){},n.prototype.notifyActualZoomChanged=function(e){var t=this;Object.keys(this.selectionMap).forEach((function(n){return t.selectionMap[n].notifyZoomChanged(e)})),this.actualZoom=e},n.prototype.notifyViewAdjusted=function(e){},n.prototype.notifyReadOnlyChanged=function(e){var t=this;this.readOnly=e,Object.keys(this.selectionMap).forEach((function(n){return t.selectionMap[n].notifyReadOnlyChanged(e)}))},n.prototype.notifySelectionRectShow=function(e){this.showSelectionRect(e.clone().multiply(this.actualZoom,this.actualZoom))},n.prototype.notifySelectionRectHide=function(){this.hideSelectionRect()},n.prototype.notifyResizeInfoShow=function(e,t){this.showResizeInfo(e.clone().multiply(this.actualZoom,this.actualZoom),t)},n.prototype.notifyResizeInfoHide=function(){this.hideResizeInfo()},n.prototype.notifyConnectionPointsShow=function(e,t,i,o){var r=this;this.hideConnectionPoints(),t.forEach((function(t,a){var s=t.point.clone().multiply(r.actualZoom,r.actualZoom);if(o)switch(t.side){case u.ConnectionPointSide.North:s.y=o.y*r.actualZoom-n.connectionPointShift;break;case u.ConnectionPointSide.South:s.y=o.bottom*r.actualZoom+n.connectionPointShift;break;case u.ConnectionPointSide.West:s.x=o.x*r.actualZoom-n.connectionPointShift;break;case u.ConnectionPointSide.East:s.x=o.right*r.actualZoom+n.connectionPointShift}r.showConnectionPoint(a,s,e,a,a===i,t.allowed)}))},n.prototype.notifyConnectionPointsHide=function(){this.hideConnectionPoints()},n.prototype.notifyConnectionTargetShow=function(e,t){if(t.allowed){var i=n.correctSelectionRect(t.rect.clone().multiply(this.actualZoom,this.actualZoom),t.strokeWidth,n.connectionTargetBorderWidth,this.actualZoom,0);this.showConnectionTarget(0,i)}},n.prototype.notifyConnectionTargetHide=function(){this.hideConnectionTarget()},n.prototype.notifyContainerTargetShow=function(e,t){var i=n.correctSelectionRect(t.rect.clone().multiply(this.actualZoom,this.actualZoom),t.strokeWidth,n.connectionTargetBorderWidth,this.actualZoom,0);this.showContainerTarget(0,i)},n.prototype.notifyContainerTargetHide=function(){this.hideContainerTarget()},n.prototype.notifyExtensionLinesShow=function(e){var t=this;this.hideExtensionLines(),e.forEach((function(e,n){t.showExtensionLine(n,e.type,e.segment.startPoint.clone().multiply(t.actualZoom,t.actualZoom),e.segment.endPoint.clone().multiply(t.actualZoom,t.actualZoom),e.text)}))},n.prototype.notifyExtensionLinesHide=function(){this.hideExtensionLines()},n.prototype.notifyDragStart=function(e){this.dom.changeByFunc(this.selectionMarksContainer,(function(e){return e.style.display="none"}))},n.prototype.notifyDragEnd=function(e){this.dom.changeByFunc(this.selectionMarksContainer,(function(e){return e.style.display=""}))},n.prototype.notifyDragScrollStart=function(){},n.prototype.notifyDragScrollEnd=function(){},n.prototype.notifyTextInputStart=function(e,t,n,i){this.dom.changeByFunc(this.visualizersContainer,(function(e){return e.style.display="none"}))},n.prototype.notifyTextInputEnd=function(e,t){this.dom.changeByFunc(this.visualizersContainer,(function(e){return e.style.display=""}))},n.prototype.notifyTextInputPermissionsCheck=function(e,t){},n.correctSelectionRect=function(e,t,i,o,r){void 0===r&&(r=n.selectionOffset);var a=C.UnitConverter.twipsToPixels(t)%2!=C.UnitConverter.twipsToPixels(i)%2,s=Math.ceil(t/2*o);e=e.clone().inflate(s,s);var l=Math.floor(i/2);if(e.x-=l,e.y-=l,e.width+=i,e.height+=i,a){var u=n.evenOddSelectionCorrection*(C.UnitConverter.twipsToPixels(i)%2==1?-1:1);e=e.clone().moveRectangle(u,u)}return e.clone().inflate(r,r)},n.selectionMarkSize=C.UnitConverter.pixelsToTwips(10),n.lockedSelectionMarkSize=C.UnitConverter.pixelsToTwips(8),n.selectionOffset=C.UnitConverter.pixelsToTwips(2),n.selectionRectLineWidth=C.UnitConverter.pixelsToTwips(1),n.multiSelectionRectLineWidth=C.UnitConverter.pixelsToTwips(1),n.connectionPointSmallSize=C.UnitConverter.pixelsToTwips(5),n.connectionPointLargeSize=C.UnitConverter.pixelsToTwips(12),n.connectionPointShift=C.UnitConverter.pixelsToTwips(16),n.connectionTargetBorderWidth=C.UnitConverter.pixelsToTwips(2),n.geomertyMarkSize=C.UnitConverter.pixelsToTwips(8),n.connectorPointMarkSize=C.UnitConverter.pixelsToTwips(6),n.connectorSideMarkSize=C.UnitConverter.pixelsToTwips(6),n.extensionLineWidth=C.UnitConverter.pixelsToTwips(1),n.extensionLineOffset=C.UnitConverter.pixelsToTwips(1),n.extensionLineEndingSize=C.UnitConverter.pixelsToTwips(6),n.resizeInfoOffset=C.UnitConverter.pixelsToTwips(16),n.resizeInfoTextOffset=C.UnitConverter.pixelsToTwips(2),n.resizeInfoLineWidth=C.UnitConverter.pixelsToTwips(1),n.evenOddSelectionCorrection=C.UnitConverter.pixelsToTwips(1),n}(O.CanvasManager);t.CanvasSelectionManager=D;var A=function(){function e(e,t,n,i,o,r){this.rectsContainer=e,this.marksContainer=t,this.key=n,this.zoomLevel=i,this.readOnly=o,this.dom=r,this.elements={},this.updatedElements={}}return e.prototype.notifyZoomChanged=function(e){this.zoomLevel!==e&&(this.zoomLevel=e,this.redraw())},e.prototype.notifyReadOnlyChanged=function(e){this.readOnly=e,this.redraw()},e.prototype.destroy=function(){var e=this;Object.keys(this.elements).forEach((function(t){e.elements[t].parentNode.removeChild(e.elements[t]),delete e.elements[t]}))},e.prototype.redraw=function(){var e=this;this.updatedElements={},this.redrawCore(),Object.keys(this.elements).filter((function(t){return!e.updatedElements[t]})).forEach((function(t){e.elements[t].parentNode.removeChild(e.elements[t]),delete e.elements[t]})),this.updatedElements={}},e.prototype.drawSelectionMarks=function(e,n,i){if(!this.readOnly){var o=n&&e.height>3*D.selectionMarkSize,r=i&&e.width>3*D.selectionMarkSize,a=n||i;a&&this.drawSelectionMark(0,new d.Point(e.x,e.y),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_NW,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),r&&!w.Browser.TouchUI&&this.drawSelectionMark(1,new d.Point(e.x+e.width/2,e.y),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_N,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),a&&this.drawSelectionMark(2,new d.Point(e.right,e.y),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_NE,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),o&&!w.Browser.TouchUI&&this.drawSelectionMark(3,new d.Point(e.right,e.y+e.height/2),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_E,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),a&&this.drawSelectionMark(4,new d.Point(e.right,e.bottom),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_SE,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),r&&!w.Browser.TouchUI&&this.drawSelectionMark(5,new d.Point(e.x+e.width/2,e.bottom),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_S,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),a&&this.drawSelectionMark(6,new d.Point(e.x,e.bottom),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_SW,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK),o&&!w.Browser.TouchUI&&this.drawSelectionMark(7,new d.Point(e.x,e.y+e.height/2),D.selectionMarkSize,l.MouseEventElementType.ShapeResizeBox,l.ResizeEventSource.ResizeBox_W,t.SELECTION_ELEMENT_CLASSNAMES.SELECTION_MARK)}},e.prototype.drawSelectionMark=function(e,t,n,i,o,r){var a=this;this.getOrCreateElement("SM"+e,new g.RectanglePrimitive(t.x-n/2,t.y-n/2,n,n,null,r,void 0,(function(e){s.RenderUtils.setElementEventData(e,i,a.key,o)})),this.marksContainer)},e.prototype.drawSelectionRect=function(e,t,n){var i=new g.RectanglePrimitive(e.x,e.y,e.width,e.height,b.StrokeStyle.default1pxInstance,n,void 0,(function(e){s.RenderUtils.setElementEventData(e,t,"-1",-1)}));this.getOrCreateElement("shapeSelection",i,this.rectsContainer)},e.prototype.getOrCreateElement=function(e,t,n){var i=this.elements[e];return i||(i=t.createElement((function(e){return n.appendChild(e)})),this.elements[e]=i),this.updatedElements[e]=!0,this.dom.changeByPrimitive(i,t),i},e}(),P=function(e){function t(t,n,i,o,r,a,s,l){var u=e.call(this,t,n,i,o,r,a)||this;return u.isLocked=s,u.rectangle=l,u}return o(t,e),t.prototype.onSelectionChanged=function(e){this.isMultipleSelection!==e&&(this.isMultipleSelection=e,this.redraw())},t.prototype.isLockedRender=function(){return this.isLocked&&!this.readOnly},t.prototype.drawLockedSelectionMark=function(e,t,n,i){var o=new v.PathPrimitive([new v.PathPrimitiveMoveToCommand(t.x-n/2,t.y-n/2),new v.PathPrimitiveLineToCommand(t.x+n/2,t.y+n/2),new v.PathPrimitiveMoveToCommand(t.x+n/2,t.y-n/2),new v.PathPrimitiveLineToCommand(t.x-n/2,t.y+n/2)],null,i);this.getOrCreateElement("LSM"+e,o,this.marksContainer)},t}(A),M=function(e){function n(t,n,i,o,r){var a=e.call(this,t,n,"-1",i,o,r)||this;return a.rectangles={},a}return o(n,e),n.prototype.onModelItemChanged=function(e,t){e in this.rectangles&&(this.rectangles[e]=t)},n.prototype.onModelChanged=function(){this.redraw()},n.prototype.onSelectionChanged=function(e,t,n){this.needDrawSelectionMarks=e,this.strokeWidth=t,this.rectangles=n,this.redraw()},n.prototype.redrawCore=function(){var e=this,n=Object.keys(this.rectangles);if(n.length){var i=c.GeometryUtils.getCommonRectangle(n.map((function(t){return e.rectangles[t]}))).clone().multiply(this.zoomLevel,this.zoomLevel),o=D.correctSelectionRect(i,this.strokeWidth,D.selectionRectLineWidth,this.zoomLevel);this.drawSelectionRect(o,l.MouseEventElementType.SelectionRect,t.SELECTION_ELEMENT_CLASSNAMES.ITEMS_SELECTION_RECT),this.needDrawSelectionMarks&&this.drawSelectionMarks(i,!0,!0)}},n}(A),R=function(e){function n(t,n,i,o,r,a,s,l,u,c,d,h){var p=e.call(this,t,n,a,i,o,r,s,l)||this;return p.style=u,p.allowResizeHorizontally=c,p.allowResizeVertically=d,p.shapeParameterPoints=h,p}return o(n,e),n.prototype.onModelChanged=function(e,t,n,i,o,r){this.isLocked=e,this.rectangle=t,this.style=n,this.allowResizeHorizontally=i,this.allowResizeVertically=o,this.shapeParameterPoints=r,this.redraw()},n.prototype.redrawCore=function(){var e=this.rectangle.clone().multiply(this.zoomLevel,this.zoomLevel);this.isLockedRender()?this.drawLockedSelection(e):this.drawUnlockedSelection(e)},n.prototype.drawLockedSelection=function(e){this.drawLockedSelectionMark(0,new d.Point(e.x,e.y),D.lockedSelectionMarkSize,t.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK),this.drawLockedSelectionMark(1,new d.Point(e.right,e.y),D.lockedSelectionMarkSize,t.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK),this.drawLockedSelectionMark(2,new d.Point(e.right,e.bottom),D.lockedSelectionMarkSize,t.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK),this.drawLockedSelectionMark(3,new d.Point(e.x,e.bottom),D.lockedSelectionMarkSize,t.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK)},n.prototype.drawUnlockedSelection=function(e){var n=D.correctSelectionRect(e,this.style.strokeWidth,D.selectionRectLineWidth,this.zoomLevel);this.drawSelectionRect(n,l.MouseEventElementType.SelectionRect,this.isMultipleSelection?t.SELECTION_ELEMENT_CLASSNAMES.ITEM_MULTI_SELECTION:t.SELECTION_ELEMENT_CLASSNAMES.ITEM_SELECTION_RECT),this.isMultipleSelection||this.drawSelectionMarks(e,this.allowResizeHorizontally,this.allowResizeVertically),this.drawShapeParameterPoints()},n.prototype.drawShapeParameterPoints=function(){var e=this;this.readOnly||this.shapeParameterPoints.forEach((function(t,n){var i=t.point.clone().multiply(e.zoomLevel,e.zoomLevel);e.drawShapeParameterPoint(i,n,t.key)}))},n.prototype.drawShapeParameterPoint=function(e,t,n){var i=this,o=D.geomertyMarkSize,r=new g.RectanglePrimitive(e.x-o/2,e.y-o/2,o,o,null,"geometry-mark",void 0,(function(e){s.RenderUtils.setElementEventData(e,l.MouseEventElementType.ShapeParameterBox,i.key,n)}));this.getOrCreateElement("pp"+t.toString(),r,this.marksContainer)},n}(P),j=function(e){function n(t,n,i,o,r,a,s,l,u,c,d,h,p,f,m){var g=e.call(this,t,n,a,i,o,r,s,l)||this;return g.renderPoints=u,g.style=c,g.styleText=d,g.enableText=h,g.texts=p,g.points=f,g.lineType=m,g}return o(n,e),n.prototype.onModelChanged=function(e,t,n,i,o,r,a,s,l){this.isLocked=e,this.rectangle=t,this.renderPoints=n,this.style=i,this.styleText=o,this.enableText=r,this.texts=a,this.points=s,this.lineType=l,this.redraw()},n.prototype.redrawCore=function(){this.isLockedRender()?this.drawLockedSelection():this.drawUnlockedSelection()},n.prototype.drawLockedSelection=function(){var e=this;this.renderPoints.forEach((function(n,i){e.drawLockedSelectionMark(i,n,D.lockedSelectionMarkSize,t.SELECTION_ELEMENT_CLASSNAMES.LOCKED_SELECTION_MARK)}))},n.prototype.drawUnlockedSelection=function(){this.drawConnectorSelection(),this.isMultipleSelection||this.readOnly||this.drawConnectorSelectionMarks()},n.prototype.drawConnectorSelection=function(){var e=[],n=[],i=this.isMultipleSelection?t.SELECTION_ELEMENT_CLASSNAMES.CONNECTOR_MULTI_SELECTION:t.SELECTION_ELEMENT_CLASSNAMES.CONNECTOR_SELECTION;this.populateSelectionPrimitiveCommands(e,n);var o=new v.PathPrimitive(e.concat(n.reverse()),b.StrokeStyle.default1pxInstance,i);this.getOrCreateElement("CS",o,this.rectsContainer)},n.prototype.populateSelectionPrimitiveCommands=function(e,t){for(var n,i,o,r,a=this.texts,s=this.styleText.getAlignment(),l=this.createNotSkippedRenderPoints(),u=this.zoomLevel,d=this.style.strokeWidthPx,h=this.getSelectionOffset(d),p=d%2==0,f=l[0],m=0,g=1,_=void 0;_=l[g];g++){var y=l[g+1];if(void 0===n){if(i=E.Metrics.euclideanDistance(f,_),I.MathUtils.numberCloseTo(i,0))continue;n=c.GeometryUtils.getSelectionOffsetPoint(f,_,i).multiply(h,h)}if(y){if(r=E.Metrics.euclideanDistance(_,y),I.MathUtils.numberCloseTo(r,0))continue;o=c.GeometryUtils.getSelectionOffsetPoint(_,y,r).multiply(h,h)}var b=n.x,C=n.y,x=-b,w=-C,S=o&&o.x,T=o&&o.y,O=o&&-o.x,k=o&&-o.y;for(p&&(x>0?x-=D.evenOddSelectionCorrection:b>0&&(b-=D.evenOddSelectionCorrection),w>0?w-=D.evenOddSelectionCorrection:C>0&&(C-=D.evenOddSelectionCorrection),O>0?O-=D.evenOddSelectionCorrection:S>0&&(S-=D.evenOddSelectionCorrection),k>0?k-=D.evenOddSelectionCorrection:T>0&&(T-=D.evenOddSelectionCorrection));a[m]&&a[m].pointIndex<=g;){var A=a[m],P=this.getConnectorSelectionTextSize(A.text,h),M=c.GeometryUtils.getSelectionTextStartEndPoints(f,_,i,A.point,P,s);a[m].pointIndexn}if(this.lineType===m.ConnectorLineOption.Orthogonal){var i=0===t.pointIndex,o=c.GeometryUtils.areDuplicatedPoints(this.points[this.points.length-1],e);return i&&o?E.Metrics.euclideanDistance(e,t)>2*f.Connector.minOffset:!i&&o||i&&!o?E.Metrics.euclideanDistance(e,t)>f.Connector.minOffset:(n=D.selectionMarkSize+D.connectorSideMarkSize,E.Metrics.euclideanDistance(e,t)>n)}return!1},n}(P)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramDraggingEvent=t.ToolboxDraggingObject=t.Toolbox=void 0;var i,o=n(3),r=n(0),a=n(65),s=n(44),l=n(27),u=n(18),c=n(15),d=n(78),h=function(){function e(e,t,n,r,a,s){this.readOnly=t,this.allowDragging=n,this.shapeDescriptionManager=r,this.shapeTypes=a,this.getAllowedShapeTypes=s,this.dragPrepareTimeout=-1,this.dragState=i.None,this.emulateDragEvents=u.Browser.WebKitTouchUI,this.onDragOperation=new o.EventDispatcher,this.onClickOperation=new o.EventDispatcher,e&&(this.mainElement=this.createMainElement(e),this.attachHandlers(this.mainElement))}return e.prototype.clean=function(e){this.detachHandlers(this.mainElement),e&&e(this.mainElement)},e.prototype.createMainElement=function(e){var t=document.createElement("div");return t.setAttribute("class","dxdi-toolbox"),t.draggable=!0,this.emulateDragEvents&&(t.tabIndex=0),e.appendChild(t),t},e.prototype.attachHandlers=function(e){this.onElementMouseDownHandler=this.onElementMouseDown.bind(this),this.onElementMouseUpHandler=this.onElementMouseUp.bind(this),this.onMouseDownHandler=this.onMouseDown.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onDragStartHandler=this.onDragStart.bind(this),this.onTouchMoveHandler=this.onTouchMove.bind(this),this.emulateDragEvents||c.RenderHelper.addEventListener(e,"dragstart",this.onDragStartHandler),o.EventUtils.isPointerEvents()?(this.mouseDownEventName="pointerdown",this.mouseMoveEventName="pointermove",this.mouseUpEventName="pointerup"):(this.mouseDownEventName=u.Browser.TouchUI?"touchstart":"mousedown",this.mouseMoveEventName=u.Browser.TouchUI?"touchmove":"mousemove",this.mouseUpEventName=u.Browser.TouchUI?"touchend":"mouseup"),c.RenderHelper.addEventListener(e,"touchmove",this.onTouchMoveHandler),c.RenderHelper.addEventListener(e,this.mouseDownEventName,this.onElementMouseDownHandler),c.RenderHelper.addEventListener(e,this.mouseUpEventName,this.onElementMouseUpHandler),c.RenderHelper.addEventListener(e,this.mouseDownEventName,this.onMouseDownHandler),c.RenderHelper.addEventListener(document,this.mouseMoveEventName,this.onMouseMoveHandler),c.RenderHelper.addEventListener(document,this.mouseUpEventName,this.onMouseUpHandler)},e.prototype.detachHandlers=function(e){this.emulateDragEvents||c.RenderHelper.removeEventListener(e,"dragstart",this.onDragStartHandler),c.RenderHelper.removeEventListener(e,"touchmove",this.onTouchMoveHandler),c.RenderHelper.removeEventListener(e,this.mouseDownEventName,this.onElementMouseDownHandler),c.RenderHelper.removeEventListener(e,this.mouseUpEventName,this.onElementMouseUpHandler),c.RenderHelper.removeEventListener(e,this.mouseDownEventName,this.onMouseDownHandler),c.RenderHelper.removeEventListener(document,this.mouseMoveEventName,this.onMouseMoveHandler),c.RenderHelper.removeEventListener(document,this.mouseUpEventName,this.onMouseUpHandler)},e.prototype.render=function(e){this.mainElement.childNodes&&(this.mainElement.innerHTML="");var t=this.shapeTypes;return t=this.getAllowedShapeTypes?this.getAllowedShapeTypes(t):t,(t=e?t.filter(e):t).length&&this.createElements(this.mainElement,t),!!t.length},e.prototype.createDraggingObject=function(e){var t=new f;return t.data=e,t.onFinishDragging=this.resetDragState.bind(this),t.onCaptured=this.capture.bind(this),new p(t)},e.prototype.getDragShapeType=function(e){for(;e&&!l.DomUtils.hasClassName(e,"dxdi-toolbox");){if(e.getAttribute&&e.getAttribute("data-tb-type"))return e.getAttribute("data-tb-type");e=e.parentNode}},e.prototype.getTouchPointFromEvent=function(e){var t,n=e.touches;return n&&n.length>0?t=new r.Point(n[0].clientX,n[0].clientY):e.clientX&&e.clientY&&(t=new r.Point(e.clientX,e.clientY)),t},e.prototype.onElementMouseDown=function(e){this.mouseDownShapeType=this.getDragShapeType(a.EvtUtils.getEventSource(e)),this.touchDownPoint=this.getTouchPointFromEvent(e)},e.prototype.onElementMouseUp=function(e){var t=this.getDragShapeType(a.EvtUtils.getEventSource(e));t&&t===this.mouseDownShapeType&&this.onClickOperation.raise("notifyToolboxClick",t),this.mouseDownShapeType=void 0,this.touchDownPoint=void 0},e.prototype.onMouseDown=function(e){this.setDragState(i.Prepare,e),u.Browser.TouchUI&&o.EventUtils.isMousePointer(e)&&this.setDragState(i.Start,e)},e.prototype.onDragStart=function(e){this.setDragState(i.Start,e),e.preventDefault()},e.prototype.onTouchMove=function(e){this.draggingObject&&e.preventDefault()},e.prototype.isLeftButtonPressed=function(e){return a.EvtUtils.isLeftButtonPressed(e)||"pointermove"===e.type&&u.Browser.TouchUI&&u.Browser.MacOSMobilePlatform&&o.EventUtils.isMousePointer(e)},e.prototype.onMouseMove=function(e){if(u.Browser.TouchUI&&u.Browser.MacOSMobilePlatform){var t=this.getTouchPointFromEvent(e);if(this.touchDownPoint&&t&&this.touchDownPoint.x===t.x&&this.touchDownPoint.y===t.y)return}this.setDragState(this.isLeftButtonPressed(e)?i.Dragging:i.None,e),o.EventUtils.isPointerEvents()&&this.raiseDraggingMouseMove(e)},e.prototype.onMouseUp=function(e){this.setDragState(i.None,e)},e.prototype.updateDraggingElementPosition=function(e,t){var n=this.draggingObject.element,i=e-n.offsetWidth/2,o=t-n.offsetHeight/2;s.SetAbsoluteX(n,i),s.SetAbsoluteY(n,o)},e.prototype.setDragState=function(e,t){if(!this.readOnly&&this.allowDragging&&!(e===i.None&&e===this.dragState||(this.dragPrepareTimeout>-1&&(clearTimeout(this.dragPrepareTimeout),this.dragPrepareTimeout=-1,this.dragPrepareEvent=void 0),e-this.dragState>1||e!==i.None&&e0?e+this.description.margin*r*t:e},e.prototype.createRelativeMarginPenalty=function(e,t,n){var i=this.isTopPosition(e,t,n),a=this.isLeftPosition(e,t,n),s=this.isBottomPosition(e,t,n),l=this.isRightPosition(e,t,n);if(i){if(a){var u=(h=t.clone().inflate(n)).createPosition(),c=t.createPosition(),d=r.Metrics.euclideanDistance(c,u);return 1-r.Metrics.euclideanDistance(c,e)/d}if(l){var h=t.clone().inflate(n),p=new o.Point(h.right,h.y),f=new o.Point(t.right,t.y),m=r.Metrics.euclideanDistance(f,p);return 1-r.Metrics.euclideanDistance(f,e)/m}return 1-(t.y-e.y)/n}if(s){if(a){h=t.clone().inflate(n);var g=new o.Point(h.x,h.bottom),v=new o.Point(t.x,t.bottom),_=r.Metrics.euclideanDistance(v,g);return 1-r.Metrics.euclideanDistance(v,e)/_}if(l){h=t.clone().inflate(n);var y=new o.Point(h.right,h.bottom),b=new o.Point(t.right,t.bottom),C=r.Metrics.euclideanDistance(b,y);return 1-r.Metrics.euclideanDistance(b,e)/C}return 1-(e.y-t.bottom)/n}return a?1-(t.x-e.x)/n:l?1-(e.x-t.right)/n:0},e.prototype.isTopPosition=function(e,t,n){return e.x>t.x-n&&e.xt.y-n&&e.yt.x-n&&e.xt.bottom&&e.yt.x-n&&e.xt.y-n&&e.yt.right&&e.xt.y-n&&e.y1||this.permissionsProvider.canDeleteItems(t))},t.prototype.executeCore=function(e){var t=this.control.selection.getSelectedItems(!0,!0);return this.permissionsProvider.beginDeleteItems(t),r.ModelUtils.deleteSelection(this.control.history,this.control.model,this.control.selection),this.permissionsProvider.endDeleteItems(),!0},Object.defineProperty(t.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(n(10).SimpleCommandBase);t.DeleteCommand=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){void 0===e&&(e=0),this.value=e}return e.prototype.get=function(e){return(this.value&e)===e},e.prototype.set=function(e,t){return(this.value&e)===e!==t&&(t?this.value|=e:this.value^=e),this},e.prototype.add=function(e){this.value|=e},e.prototype.anyOf=function(){for(var e=[],t=0;to?null:n.makeByStartEnd(i,o)},e.getIntersectionNonNullLength=function(t,n){return e.getIntersectionNonNullLengthTemplate(t,n,t)},e.getIntersectionNonNullLengthTemplate=function(t,n,i){var o=e.getIntersectionTemplate(t,n,i);return o&&o.length?o:null},e.getIntersectionsTwoArraysOfInterval=function(t,n){return e.getIntersectionsTwoArraysOfIntervalTemplate(t,n,t[0])},e.getIntersectionsTwoArraysOfIntervalTemplate=function(t,n,i){for(var o=[],r=t.length,a=n.length,s=0,l=0,u=t[s],c=n[l],d=null;sd.end)break;var m=e.getIntersectionTemplate(f,d,i);m&&(m.length||s(f,d.length,m.start))&&l.add(h)}return l.getIntervals()},e.handleAffectedObjects=function(t,n,i,a){void 0===a&&(a=function(e){return o.SearchUtils.normedInterpolationIndexOf(t,(function(e){return e.interval.start}),e)});for(var s=new r.FixedInterval(0,0),l=0,u=n;lc.end)break;var f=e.getIntersectionTemplate(p,c,s);f&&i(h,d,c,f)}},e.getMergedIntervals=function(t,n){return e.getMergedIntervalsTemplate(t,n,t[0])},e.getMergedIntervalsTemplate=function(e,t,n){if(e.length<2)return e.length>0?[n.makeByStartLength(e[0].start,e[0].length)]:[];for(var i=t?[].concat(e).sort((function(e,t){return e.start-t.start})):e,o=[],r=0,a=void 0;a=i[r];){var s=a.start,l=a.end;for(++r;void 0!==(a=i[r])&&a.start<=l;r++)a.end>l&&(l=a.end);o.push(n.makeByStartEnd(s,l))}return o},e.reflectIntervals=function(t,n){return e.reflectIntervalsTemplate(t,n,n)},e.reflectIntervalsTemplate=function(t,n,o){if(!t.length)return[o.makeByStartLength(n.start,n.length)];var r=i.ListUtils.last(t).end,a=i.ListUtils.reducedMap(t,(function(i,r){return e.getIntersectionNonNullLengthTemplate(o.makeByStartEnd(t[r-1].end,i.start),n,o)}),1);return n.startr&&a.push(o.makeByStartEnd(r,n.end)),a},e.reflectionOfPointOnInterval=function(e,t,n){return(e-t.start)/t.length*n.length+n.start},e}();t.IntervalAlgorithms=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(59),o=function(){return function(e,t){this.minElement=e,this.maxElement=t}}();t.MinMax=o;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this.maxElement-this.minElement},enumerable:!0,configurable:!0}),t}(o);t.MinMaxNumber=r;var a=function(){return function(e,t){this.minElement=e,this.minValue=t}}();t.ExtendedMin=a;var s=function(){return function(e,t){this.maxElement=e,this.maxValue=t}}();t.ExtendedMax=s;var l=function(e){function t(t,n,i,o){var r=e.call(this,t,i)||this;return r.minValue=n,r.maxValue=o,r}return i.__extends(t,e),t}(o);t.ExtendedMinMax=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.number=function(e,t){return e-t},e.string=function(e,t){return e===t?0:e>t?1:-1},e.stringIgnoreCase=function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1},e}();t.Comparers=i;var o=function(){function e(){}return e.simpleType=function(e,t){return e===t},e.object=function(e,t){return e&&t&&(e===t||e.equals(t))},e}();t.Equals=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(59),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.normalizeLength=function(){return this.length<0&&(this.length=0),this},t}(n(168).ConstInterval);t.MutableInterval=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return Object.defineProperty(e.prototype,"center",{get:function(){return this.start+this.length/2},enumerable:!0,configurable:!0}),e.prototype.isNormalized=function(){return this.end>=this.start},e.prototype.isCollapsed=function(){return 0===this.length},e.prototype.equals=function(e){return this.start===e.start&&this.end===e.end},e.isCollapsed=function(e){return!e[1]&&e[0].isCollapsed()},e.prototype.containsInterval=function(e){return this.start<=e.start&&this.end>=e.end},e.prototype.containsIntervalWithoutEnd=function(e){return this.start<=e.start&&this.end>e.end},e.prototype.contains=function(e){return this.start<=e&&e/g,">")},e.decodeHtml=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},e.prepareTextForRequest=function(e){return e.replace(/%/g,"%25").replace(/&/g,"%26amp;").replace(/\+/g,"%2B").replace(//g,"%26gt;").replace(/"/g,"%26quot;")},e.prepareTextForCallBackRequest=function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},e.decodeViaTextArea=function(e){var t=document.createElement("TEXTAREA");return t.innerHTML=e,t.value},e}();t.EncodeUtils=i},function(e,t,n){"use strict";n(175).polyfill()},function(e,t,n){"use strict";function i(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),i=1;i-1||e.indexOf("gesture")>-1)},e.isTouchEvent=function(e){return i.Browser.WebKitTouchUI&&o.isDefined(e.changedTouches)},e.getEventX=function(e){return i.Browser.IE?e.pageX:e.changedTouches[0].pageX},e.getEventY=function(e){return i.Browser.IE?e.pageY:e.changedTouches[0].pageY},e.touchMouseDownEventName=i.Browser.WebKitTouchUI?"touchstart":i.Browser.Edge&&i.Browser.MSTouchUI&&window.PointerEvent?"pointerdown":"mousedown",e.touchMouseUpEventName=i.Browser.WebKitTouchUI?"touchend":i.Browser.Edge&&i.Browser.MSTouchUI&&window.PointerEvent?"pointerup":"mouseup",e.touchMouseMoveEventName=i.Browser.WebKitTouchUI?"touchmove":i.Browser.Edge&&i.Browser.MSTouchUI&&window.PointerEvent?"pointermove":"mousemove",e.msTouchDraggableClassName="dxMSTouchDraggable",e.documentTouchHandlers={},e.documentEventAttachingAllowed=!0,e}();t.TouchUtils=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(83),r=n(50),a=function(){function e(){}return e.loadJavascriptFile=function(e,t){var n,i=document.getElementsByTagName("head")[0];if(!i){i=document.createElement("head");var o=document.getElementsByTagName("body")[0];null===(n=o.parentNode)||void 0===n||n.insertBefore(i,o)}var r=document.createElement("script");return r.onload=t,r.src=e,i.appendChild(r),{htmlScriptElement:r}},e.startDownloadFileLocal=function(e,t){if(e instanceof ArrayBuffer&&(e=o.Base64Utils.fromArrayBuffer(e)),r.isString(e)&&(e=o.Base64Utils.getFileFromBase64(e)),window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(e,t);else{var n=document.createElement("a"),i=URL.createObjectURL(e);n.href=i,n.download=t,document.body.appendChild(n),n.click(),setTimeout((function(){document.body.removeChild(n),window.URL.revokeObjectURL(i)}),0)}},e.createFile=function(e,t,n){var o;if(i.Browser.IE||i.Browser.Edge&&i.Browser.MajorVersion<86){var r=new Blob(e,n);return r.lastModifiedDate=null!==(o=null==n?void 0:n.lastModified)&&void 0!==o?o:Date.now(),r.name=t,r}return new File(e,t,n)},e.isFile=function(e){return i.Browser.IE||i.Browser.Edge&&i.Browser.MajorVersion<86?e instanceof File||e instanceof Blob&&r.isDefined(e.name):e instanceof File},e}();t.FileUtils=a},function(e,t,n){"use strict";var i,o,r,a;Object.defineProperty(t,"__esModule",{value:!0}),t.OpenXmlMimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document",t.RtfMimeType="application/rtf",t.PlainTextMimeType="text/plain",t.DocmMimeType="application/vnd.ms-word.document.macroEnabled.12",t.ImagePngMimeType="image/png",t.ImageGifMimeType="image/gif",t.ImageJpegMimeType="image/jpeg",t.ImagePjpegMimeType="image/pjpeg",t.ImageSvgMimeType="image/svg+xml",t.ImageTiffMimeType="image/tiff",t.ImageIcoMimeType="image/vnd.microsoft.icon",t.ImageWbmpMimeType="image/vnd.wap.wbmp",t.ImageWebpMimeType="image/webp",function(e){e[e.Unknown=0]="Unknown",e[e.OpenXml=1]="OpenXml",e[e.Rtf=2]="Rtf",e[e.PlainText=3]="PlainText",e[e.Docm=4]="Docm",e[e.Png=5]="Png",e[e.Gif=6]="Gif",e[e.Jpeg=7]="Jpeg",e[e.Pjpeg=8]="Pjpeg",e[e.Svg=9]="Svg",e[e.Tiff=10]="Tiff",e[e.Ico=11]="Ico",e[e.Wbmp=12]="Wbmp",e[e.Webp=13]="Webp"}(a=t.DxMimeType||(t.DxMimeType={}));var s=function(){function e(){}return e.stringTypeToExtension=function(t){var n=e.stringTypeToTypeMap[t];return void 0===n?"":e.typeToExtensionMap[n]},e.typeToExtension=function(t){var n=e.typeToExtensionMap[t];return null!=n?n:""},e.extensionToType=function(t){"."!==(t=t.toLowerCase())[0]&&(t+=".");var n=e.extensionToTypeMap[t];return null!=n?n:a.Unknown},e.typeToStringType=function(t){var n=e.typeToStringTypeMap[t];return null!=n?n:""},e.stringTypeToType=function(t){var n=e.stringTypeToTypeMap[t];return void 0===n?a.Unknown:n},e.stringTypeToTypeMap=((i={})[t.OpenXmlMimeType]=a.OpenXml,i[t.RtfMimeType]=a.Rtf,i[t.PlainTextMimeType]=a.PlainText,i[t.DocmMimeType]=a.Docm,i[t.ImagePngMimeType]=a.Png,i[t.ImageGifMimeType]=a.Gif,i[t.ImageJpegMimeType]=a.Jpeg,i[t.ImagePjpegMimeType]=a.Pjpeg,i[t.ImageSvgMimeType]=a.Svg,i[t.ImageTiffMimeType]=a.Tiff,i[t.ImageIcoMimeType]=a.Ico,i[t.ImageWbmpMimeType]=a.Wbmp,i[t.ImageWebpMimeType]=a.Webp,i),e.typeToStringTypeMap=((o={})[a.Unknown]=void 0,o[a.OpenXml]=t.OpenXmlMimeType,o[a.Rtf]=t.RtfMimeType,o[a.PlainText]=t.PlainTextMimeType,o[a.Docm]=t.DocmMimeType,o[a.Png]=t.ImagePngMimeType,o[a.Gif]=t.ImageGifMimeType,o[a.Jpeg]=t.ImageJpegMimeType,o[a.Pjpeg]=t.ImagePjpegMimeType,o[a.Svg]=t.ImageSvgMimeType,o[a.Tiff]=t.ImageTiffMimeType,o[a.Ico]=t.ImageIcoMimeType,o[a.Wbmp]=t.ImageWbmpMimeType,o[a.Webp]=t.ImageWebpMimeType,o),e.typeToExtensionMap=((r={})[a.Unknown]=void 0,r[a.OpenXml]=".docx",r[a.Rtf]=".rtf",r[a.PlainText]=".txt",r[a.Docm]=".docm",r[a.Png]=".png",r[a.Gif]=".gif",r[a.Jpeg]=".jpeg",r[a.Pjpeg]=".pjpeg",r[a.Svg]=".svg",r[a.Tiff]=".tiff",r[a.Ico]=".ico",r[a.Wbmp]=".wbmp",r[a.Webp]=".webp",r),e.extensionToTypeMap={".docx":a.OpenXml,".rtf":a.Rtf,".txt":a.PlainText,".docm":a.Docm,".png":a.Png,".gif":a.Gif,".jpeg":a.Jpeg,".pjpeg":a.Pjpeg,".svg":a.Svg,".tiff":a.Tiff,".ico":a.Ico,".wbmp":a.Wbmp,".webp":a.Webp},e}();t.MimeTypeUtils=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorPointsCalculator=void 0;var r=n(111),a=n(29),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getPoints=function(){return this.connector.points.map((function(e,t){return new a.ConnectorRenderPoint(e.x,e.y,t)}))},t}(r.ConnectorPointsCalculatorBase);t.ConnectorPointsCalculator=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorPointsOrthogonalCalculator=void 0;var r=n(13),a=n(9),s=n(111),l=n(181),u=n(182),c=n(183),d=n(184),h=n(185),p=n(29),f=n(4),m=function(e){function t(t){var n=e.call(this,t)||this;return n.sideCalculators={},n.sideCalculators[a.ConnectionPointSide.Undefined]=new l.ConnectorPointsOrthogonalUndefinedSideCalculator(n),n.sideCalculators[a.ConnectionPointSide.South]=new u.ConnectorPointsOrthogonalSouthSideCalculator(n),n.sideCalculators[a.ConnectionPointSide.North]=new c.ConnectorPointsOrthogonalNorthSideCalculator(n),n.sideCalculators[a.ConnectionPointSide.East]=new d.ConnectorPointsOrthogonalEastSideCalculator(n),n.sideCalculators[a.ConnectionPointSide.West]=new h.ConnectorPointsOrthogonalWestSideCalculator(n),n}return o(t,e),Object.defineProperty(t.prototype,"beginRect",{get:function(){return this.connector.beginItem?this.connector.beginItem.rectangle:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endRect",{get:function(){return this.connector.endItem?this.connector.endItem.rectangle:void 0},enumerable:!1,configurable:!0}),t.prototype.getPoints=function(){var e=this.connector.points.map((function(e,t){return new p.ConnectorRenderPoint(e.x,e.y,t)}));f.ModelUtils.removeUnnecessaryRenderPoints(e);var t=0,n=e.length-1,i=this.getPointSide(e,0),o=this.getPointSide(e,1),r=this.getPointSide(e,e.length-1),a=this.getPointSide(e,e.length-1-1),s=this.getSideCalculator(i),l=this.getSideCalculator(r),u=this.beginRect,c=s.getCorrectOriginPoint(e[t],u),d=e[t+1];if(2===e.length&&s.isOnSidePoint(c,d)&&s.isDirectConnectionAllowed(o,c,d))s.getDirectConnectionPoints(c,d).forEach((function(i){e.splice(t+1,0,i),t++,n++}));else{var h=s.getBeginOffsetPoints(o,e[t],e[t+1],this.beginRect);h.forEach((function(n){e.splice(t+1,0,n)})),t+=h.length,n+=h.length,l.getEndOffsetPoints(a,e[n],e[n-1],this.endRect).forEach((function(t,i){e.splice(n+i,0,t)})),this.addMiddlePoints(e,t,n)}return f.ModelUtils.removeUnnecessaryRenderPoints(e),e},t.prototype.getSideCalculator=function(e){return this.sideCalculators[e]},t.prototype.getPointSide=function(e,t){if(0===t&&this.connector.beginItem){var n=this.connector.beginConnectionPointIndex;return this.connector.beginItem.getConnectionPointSideByIndex(n,e[1])}return t===e.length-1&&this.connector.endItem?(n=this.connector.endConnectionPointIndex,this.connector.endItem.getConnectionPointSideByIndex(n,e[e.length-2])):a.ConnectionPointSide.Undefined},t.prototype.addMiddlePoints=function(e,t,n){for(var i=t;i0&&(s=u[0]),s},t.prototype.createPointsRect=function(e,t){var n=r.Rectangle.fromPoints(e,t);return n.width>0&&(n=n.clone().inflate(-1,0)),n.height>0&&(n=n.clone().inflate(0,-1)),n},t.prototype.isPriorMiddlePoint=function(e,t,n,i,o){return!(!n||e.x!==n.x&&e.y!==n.y)||!(!o||e.x!==o.x&&e.y!==o.y)},t.prototype.isReturnPoint=function(e,t,n){if(void 0!==t&&void 0!==n){if(e.x===n.x&&(t.ye.y&&e.y>n.y))return!0;if(e.y===n.y&&(t.xe.x&&e.x>n.x))return!0}return!1},t.prototype.isIntermediatePoints=function(e,t){return 0i){var o=Math.min(e.x,t.x)+n/2;return[new a.ConnectorRenderPoint(o,e.y),new a.ConnectorRenderPoint(o,t.y)]}var r=Math.min(e.y,t.y)+i/2;return[new a.ConnectorRenderPoint(e.x,r),new a.ConnectorRenderPoint(t.x,r)]},t}(r.ConnectorPointsOrthogonalSideCalculatorBase);t.ConnectorPointsOrthogonalUndefinedSideCalculator=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorPointsOrthogonalSouthSideCalculator=void 0;var r=n(9),a=n(52),s=n(29),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.getCorrectOriginPoint=function(e,t){return e.yn.x?[]:[t.clone().offset(0,this.getMinOffset())]:t.y>this.endRect.bottom?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!1):[t.clone().offset(0,this.getMinOffset())];case r.ConnectionPointSide.West:return t.ythis.endRect.bottom?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!0):[t.clone().offset(0,this.getMinOffset())];case r.ConnectionPointSide.South:return[t.clone().offset(0,this.getMinOffset())];case r.ConnectionPointSide.North:return this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),t.xn.x?[t.clone().offset(0,this.getMinOffset())]:[];case r.ConnectionPointSide.South:return[t.clone().offset(0,this.getMinOffset())];case r.ConnectionPointSide.North:var o=this.getMinOffset();return this.beginRect.bottom>t.y&&(o+=this.beginRect.bottom-t.y),[t.clone().offset(0,o)]}},t.prototype.getBeginOnSideOffsetPoints=function(e,t,n,i){return[t.clone().offset(0,this.getScaleableOffsetY(t,n,!1))]},t.prototype.getEndOnSideOffsetPoints=function(e,t,n,i){return[t.clone().offset(0,this.getScaleableOffsetY(t,n,!0))]},t.prototype.getBeginOffSideOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.East:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(t,n,i,!1,!1);break;case r.ConnectionPointSide.West:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(t,n,i,!1,!0);break;case r.ConnectionPointSide.South:if(this.isBeginEndOverlappedX())return this.getScaleableAsideOffsetPoints(t,n,i,!1);break;case r.ConnectionPointSide.Undefined:case r.ConnectionPointSide.North:return this.getScaleableAsideOffsetPoints(t,n,i,!1)}return[t.clone().offset(0,this.getScaleableOffsetY(t,n,!1))]},t.prototype.getEndOffSideOffsetPoints=function(e,t,n,i){if(e===r.ConnectionPointSide.Undefined)return this.getScaleableAsideOffsetPoints(t,n,i,!0);if(this.isBeginEndOverlappedX()){var o=this.beginRect.center.x>this.endRect.center.x;return this.getScaleableAsideOffsetPoints(t,n,i,!0,o)}return[t.clone().offset(0,this.getScaleableOffsetY(t,n,!0))]},t.prototype.getAsideOffsetPoints=function(e,t,n,i,o,r){var a=[];return void 0!==n&&(void 0===r&&(r=t.x0&&i<2*this.getMinOffset())return i/2}return this.getMinOffset()},t.prototype.isOnSidePoint=function(e,t){return t.y>e.y},t.prototype.isDirectConnectionAllowed=function(e,t,n){return e===r.ConnectionPointSide.North||e===r.ConnectionPointSide.Undefined},t.prototype.getDirectConnectionPoints=function(e,t){var n=e.y+(t.y-e.y)/2;return[new s.ConnectorRenderPoint(e.x,n),new s.ConnectorRenderPoint(t.x,n)]},t}(a.ConnectorPointsOrthogonalSideCalculatorBase);t.ConnectorPointsOrthogonalSouthSideCalculator=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorPointsOrthogonalNorthSideCalculator=void 0;var r=n(9),a=n(52),s=n(29),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.getCorrectOriginPoint=function(e,t){return e.y>t.y&&(e=e.clone().offset(0,t.y-e.y)),e},t.prototype.getSameShapeOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.East:case r.ConnectionPointSide.West:case r.ConnectionPointSide.North:return[t.clone().offset(0,-this.getMinOffset())];case r.ConnectionPointSide.South:return this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset())}},t.prototype.getOverlappedPointsOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.South:return[t.clone().offset(0,this.getMinOffset())];case r.ConnectionPointSide.North:return[t.clone().offset(0,-this.getMinOffset())]}return[]},t.prototype.getBeginOverlappedShapeOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.East:return t.y>n.y?t.x>n.x?[]:[t.clone().offset(0,-this.getMinOffset())]:t.yn.y?t.xt.y?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!1):t.xt.y?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!0):t.x>n.x?[t.clone().offset(0,-this.getMinOffset())]:[];case r.ConnectionPointSide.North:return[t.clone().offset(0,-this.getMinOffset())];case r.ConnectionPointSide.South:var o=-this.getMinOffset();return this.beginRect.ythis.endRect.center.x;return this.getScaleableAsideOffsetPoints(t,n,i,!0,o)}return[t.clone().offset(0,-this.getScaleableOffsetY(t,n,!0))]},t.prototype.getAsideOffsetPoints=function(e,t,n,i,o,r){var a=[];return void 0!==n&&(void 0===r&&(r=t.x0&&i<2*this.getMinOffset())return i/2}return this.getMinOffset()},t.prototype.isOnSidePoint=function(e,t){return t.ythis.endRect.right?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!0):[t.clone().offset(this.getMinOffset(),0)];case r.ConnectionPointSide.South:return t.xn.y?[]:[t.clone().offset(this.getMinOffset(),0)]:t.x>this.endRect.right?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!1):[t.clone().offset(this.getMinOffset(),0)];case r.ConnectionPointSide.East:return[t.clone().offset(this.getMinOffset(),0)];case r.ConnectionPointSide.West:return this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),t.yt.x&&(o+=this.beginRect.right-t.x),[t.clone().offset(o,0)];case r.ConnectionPointSide.North:return n.xn.y?[t.clone().offset(this.getMinOffset(),0)]:[];case r.ConnectionPointSide.South:return n.xthis.endRect.center.y;return this.getScaleableAsideOffsetPoints(t,n,i,!0,o)}return[t.clone().offset(this.getScaleableOffsetX(t,n,!0),0)]},t.prototype.getAsideOffsetPoints=function(e,t,n,i,o,r){var a=[];return void 0!==n&&(void 0===r&&(r=t.y0&&i<2*this.getMinOffset())return i/2}return this.getMinOffset()},t.prototype.getScaleableOffsetY=function(e,t,n){if(this.beginRect&&this.endRect&&!n&&!this.isBeginEndOverlappedY()){var i=void 0;if((i=t.ye.x},t.prototype.isDirectConnectionAllowed=function(e,t,n){return e===r.ConnectionPointSide.West||e===r.ConnectionPointSide.Undefined},t.prototype.getDirectConnectionPoints=function(e,t){var n=e.x+(t.x-e.x)/2;return[new s.ConnectorRenderPoint(n,e.y),new s.ConnectorRenderPoint(n,t.y)]},t}(a.ConnectorPointsOrthogonalSideCalculatorBase);t.ConnectorPointsOrthogonalEastSideCalculator=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorPointsOrthogonalWestSideCalculator=void 0;var r=n(9),a=n(52),s=n(29),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.getCorrectOriginPoint=function(e,t){return e.x>t.x&&(e=e.clone().offset(t.x-e.x,0)),e},t.prototype.getSameShapeOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.North:case r.ConnectionPointSide.South:case r.ConnectionPointSide.West:return[t.clone().offset(-this.getMinOffset(),0)];case r.ConnectionPointSide.East:return this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset())}},t.prototype.getOverlappedPointsOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.East:return[t.clone().offset(this.getMinOffset(),0)];case r.ConnectionPointSide.West:return[t.clone().offset(-this.getMinOffset(),0)]}return[]},t.prototype.getBeginOverlappedShapeOffsetPoints=function(e,t,n,i){switch(e){case r.ConnectionPointSide.North:return t.x>n.x?t.yn.x?t.y>n.y?[]:[t.clone().offset(-this.getMinOffset(),0)]:t.xt.x?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!0):t.y>n.y?[t.clone().offset(-this.getMinOffset(),0)]:[];case r.ConnectionPointSide.South:return n.x>t.x?this.getAsideOffsetPoints(t,n,i,this.getMinOffset(),this.getMinOffset(),!1):t.ythis.endRect.center.y;return this.getScaleableAsideOffsetPoints(t,n,i,!0,o)}return[t.clone().offset(-this.getScaleableOffsetX(t,!0),0)]},t.prototype.getAsideOffsetPoints=function(e,t,n,i,o,r){var a=[];return void 0!==n&&(void 0===r&&(r=t.y0&&n<2*this.getMinOffset())return n/2}return this.getMinOffset()},t.prototype.getScaleableOffsetY=function(e,t,n){if(this.beginRect&&this.endRect&&!n&&!this.isBeginEndOverlappedY()){var i=void 0;if((i=t.yt.position.x+t.size.width-i){var o=t.size.height/2/i,r=(n.x-(t.position.x+t.size.width-i))*o,s=t.getConnectionPointSide(n);s===c.ConnectionPointSide.North?n.y+=r:s===c.ConnectionPointSide.South&&(n.y-=r)}else e.prototype.processConnectionPoint.call(this,t,n)},t}(a.ArrowHorizontalShapeDescription);t.ArrowRightShapeDescription=d},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowUpShapeDescription=void 0;var r=n(5),a=n(30),s=n(0),l=n(92),u=n(1),c=n(9),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return u.ShapeTypes.ArrowUp},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,a=t.bottom,s=t.width,u=t.center.x,c=(s-e.parameters.get(l.ArrowVerticalLineWidthParameterName).value)/2,d=e.parameters.get(l.ArrowVerticalTriangleHeightParameterName).value,h=e.normalizeX(n+c),p=e.normalizeY(i+d),f=e.normalizeX(o-c);return[new r.PathPrimitive([new r.PathPrimitiveMoveToCommand(u,i),new r.PathPrimitiveLineToCommand(o,p),new r.PathPrimitiveLineToCommand(f,p),new r.PathPrimitiveLineToCommand(f,a),new r.PathPrimitiveLineToCommand(h,a),new r.PathPrimitiveLineToCommand(h,p),new r.PathPrimitiveLineToCommand(n,p),new r.PathPrimitiveClosePathCommand],e.style)]},t.prototype.modifyParameters=function(e,t,n,i){this.changeParameterValue(t,l.ArrowVerticalTriangleHeightParameterName,(function(e){return e.value+i})),this.changeParameterValue(t,l.ArrowVerticalLineWidthParameterName,(function(e){return e.value-2*n})),this.normalizeParameters(e,t)},t.prototype.getParameterPoints=function(e){return[new a.ShapeParameterPoint("c",new s.Point(e.normalizeX(e.position.x+(e.size.width-e.parameters.get(l.ArrowVerticalLineWidthParameterName).value)/2),e.normalizeY(e.position.y+e.parameters.get(l.ArrowVerticalTriangleHeightParameterName).value)))]},t.prototype.processConnectionPoint=function(t,n){var i=t.parameters.get(l.ArrowVerticalTriangleHeightParameterName).value;if(n.y0)&&(r=-r),this.changeParameterValue(n,t.StarConvexParameterName,(function(e){return e.value+r})),this.normalizeParameters(e,n)},n.prototype.getParameterPoints=function(e){var n=e.rectangle,i=n.y,o=n.right,r=n.width,a=n.height,s=this.getActualBottom(i,n.bottom,r,a),l=n.center.x,d=i+(s-i)/2,h=a/r,p=Math.PI-this.angle,f=i+r/2*Math.tan(p/2)*h,m=e.parameters.get(t.StarConvexParameterName).value,g=this.getInnerPointDistance(l,l,o,d,i,f),v=this.getInnerPointPos(l,l,o,m,g),_=this.getInnerPointPos(d,i,f,m,g);return[new u.ShapeParameterPoint("c",new c.Point(v,_))]},n.prototype.processConnectionPoint=function(n,i){if(e.prototype.processConnectionPoint.call(this,n,i),n.getConnectionPointSide(i)===d.ConnectionPointSide.South){var o=n.rectangle,r=o.y,a=o.right,s=o.width,l=o.height,u=this.getActualBottom(r,o.bottom,s,l),c=o.center.x,h=r+(u-r)/2,p=l/s,f=Math.PI-this.angle,m=r+s/2*Math.tan(f/2)*p,g=n.parameters.get(t.StarConvexParameterName).value,v=this.getInnerPointDistance(c,c,a,h,r,m);i.y=this.getInnerPointPos(h,u,u,g,v)}},n.prototype.getInnerPointDistanceByAxis=function(e,t,n){return Math.min(t,n)+Math.abs(t-n)/2-e},n.prototype.getInnerPointPos=function(e,t,n,i,o){var r=Math.min(1,i/o);return e+this.getInnerPointDistanceByAxis(e,t,n)*r},n.prototype.getInnerPointDistance=function(e,t,n,i,o,r){var a=this.getInnerPointDistanceByAxis(e,t,n),s=this.getInnerPointDistanceByAxis(i,o,r);return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))},n.prototype.getActualBottom=function(t,n,i,o){var r=t+e.prototype.calculateHeight.call(this,i)*o/i;return rt.position.y+t.size.height-i){var o=t.size.width/2/i,r=(n.y-(t.position.y+t.size.height-i))*o,a=t.getConnectionPointSide(n);a===c.ConnectionPointSide.East?n.x-=r:a===c.ConnectionPointSide.West&&(n.x+=r)}else e.prototype.processConnectionPoint.call(this,t,n)},t}(l.ArrowVerticalShapeDescription);t.ArrowDownShapeDescription=d},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowLeftRightShapeDescription=void 0;var r=n(5),a=n(93),s=n(30),l=n(0),u=n(1),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return u.ShapeTypes.ArrowLeftRight},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,s=t.bottom,l=t.height,u=t.center.y,c=e.parameters.get(a.ArrowVerticalTriangleWidthParameterName).value,d=(l-e.parameters.get(a.ArrowVerticalLineHeightParameterName).value)/2,h=e.normalizeX(n+c),p=e.normalizeY(i+d),f=e.normalizeX(o-c),m=e.normalizeY(s-d);return[new r.PathPrimitive([new r.PathPrimitiveMoveToCommand(n,u),new r.PathPrimitiveLineToCommand(h,i),new r.PathPrimitiveLineToCommand(h,p),new r.PathPrimitiveLineToCommand(f,p),new r.PathPrimitiveLineToCommand(f,i),new r.PathPrimitiveLineToCommand(o,u),new r.PathPrimitiveLineToCommand(f,s),new r.PathPrimitiveLineToCommand(f,m),new r.PathPrimitiveLineToCommand(h,m),new r.PathPrimitiveLineToCommand(h,s),new r.PathPrimitiveClosePathCommand],e.style)]},t.prototype.normalizeParameters=function(e,t){this.changeParameterValue(t,a.ArrowVerticalTriangleWidthParameterName,(function(t){return Math.max(0,Math.min(e.size.width/2-2*e.strokeWidth,t.value))})),this.changeParameterValue(t,a.ArrowVerticalLineHeightParameterName,(function(t){return Math.max(0,Math.min(e.size.height,t.value))}))},t.prototype.modifyParameters=function(e,t,n,i){this.changeParameterValue(t,a.ArrowVerticalTriangleWidthParameterName,(function(e){return e.value+n})),this.changeParameterValue(t,a.ArrowVerticalLineHeightParameterName,(function(e){return e.value-2*i})),this.normalizeParameters(e,t)},t.prototype.getParameterPoints=function(e){return[new s.ShapeParameterPoint("c",new l.Point(e.normalizeX(e.position.x+e.parameters.get(a.ArrowVerticalTriangleWidthParameterName).value),e.normalizeY(e.position.y+(e.size.height-e.parameters.get(a.ArrowVerticalLineHeightParameterName).value)/2)))]},t}(a.ArrowHorizontalShapeDescription);t.ArrowLeftRightShapeDescription=c},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowLeftShapeDescription=void 0;var r=n(5),a=n(93),s=n(30),l=n(0),u=n(1),c=n(9),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return u.ShapeTypes.ArrowLeft},enumerable:!1,configurable:!0}),t.prototype.createShapePrimitives=function(e){var t=e.rectangle,n=t.x,i=t.y,o=t.right,s=t.bottom,l=t.height,u=t.center.y,c=e.parameters.get(a.ArrowVerticalTriangleWidthParameterName).value,d=(l-e.parameters.get(a.ArrowVerticalLineHeightParameterName).value)/2,h=e.normalizeX(n+c),p=e.normalizeY(i+d),f=e.normalizeY(s-d);return[new r.PathPrimitive([new r.PathPrimitiveMoveToCommand(n,u),new r.PathPrimitiveLineToCommand(h,i),new r.PathPrimitiveLineToCommand(h,p),new r.PathPrimitiveLineToCommand(o,p),new r.PathPrimitiveLineToCommand(o,f),new r.PathPrimitiveLineToCommand(h,f),new r.PathPrimitiveLineToCommand(h,s),new r.PathPrimitiveClosePathCommand],e.style)]},t.prototype.modifyParameters=function(e,t,n,i){this.changeParameterValue(t,a.ArrowVerticalTriangleWidthParameterName,(function(e){return e.value+n})),this.changeParameterValue(t,a.ArrowVerticalLineHeightParameterName,(function(e){return e.value-2*i})),this.normalizeParameters(e,t)},t.prototype.getParameterPoints=function(e){return[new s.ShapeParameterPoint("c",new l.Point(e.normalizeX(e.position.x+e.parameters.get(a.ArrowVerticalTriangleWidthParameterName).value),e.normalizeY(e.position.y+(e.size.height-e.parameters.get(a.ArrowVerticalLineHeightParameterName).value)/2)))]},t.prototype.processConnectionPoint=function(t,n){var i=t.parameters.get(a.ArrowVerticalTriangleWidthParameterName).value;if(n.x0},e.prototype.iterate=function(e){this.iterateCore(this.root,0,e)},e.createSpanningTree=function(t){var n=e.findRoot(t),o=t.createIterator(i.ConnectionMode.Outgoing),r={};return o.skipEdge=function(e){return void 0===e.to||o.isNodeVisited(e.to)},o.onNode=function(e){return r[e.key]=[]},o.onEdge=function(e){var n=t.getNode(e.to);n&&r[e.from].push(n)},o.iterate(n),new e(t.getNode(n),r)},e.prototype.iterateCore=function(e,t,n){var i=this;n(e,t),this.getChildren(e).forEach((function(e){return i.iterateCore(e,t+1,n)}))},e.findRoot=function(e){return e.nodes.reduce((function(t,n){var i=e.getAdjacentEdges(n),o=i.filter((function(e){return e.to===n})).length,r=i.filter((function(e){return e.from===n})).length;return(void 0===t.candidate||0===o&&t.inc>0||0!==t.inc&&t.out-t.inc0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]0)return"\n"+n}}},t.prototype.checkSelector=function(e){for(var n=0;n1||this.permissionsProvider.canDeleteItems(t))},t.prototype.executeCore=function(e){var t=new r.Exporter,n=this.control.selection.getSelectedItems(!0,!0),i=t.exportItems(n);return this.permissionsProvider.beginDeleteItems(n),this.setClipboardData(i),a.ModelUtils.deleteSelection(this.control.history,this.control.model,this.control.selection),this.permissionsProvider.endDeleteItems(),!0},Object.defineProperty(t.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(n(101).ClipboardCommand);t.CutSelectionCommand=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasteSelectionCommand=void 0;var r=n(0),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getEventPositionOffset=function(e,t){return new r.Point(0,0)},t}(n(141).PasteSelectionCommandBase);t.PasteSelectionCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ImportShapeHistoryItem=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.shape=t,n}return o(t,e),t.prototype.redo=function(e){this.shapeKey=this.shape.key,e.insertShape(this.shape)},t.prototype.undo=function(e){e.removeShape(e.model.findShape(this.shapeKey),!0)},t}(n(8).HistoryItem);t.ImportShapeHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ImportConnectorHistoryItem=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.connector=t,n}return o(t,e),t.prototype.redo=function(e){this.connectorKey=this.connector.key,e.insertConnector(this.connector)},t.prototype.undo=function(e){var t=e.model.findConnector(this.connectorKey);e.removeConnector(t)},t}(n(8).HistoryItem);t.ImportConnectorHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ImportBPMNCommand=void 0;var r=n(269),a=n(4),s=n(53),l=n(0),u=n(6),c=n(66),d=n(48),h=n(80),p=n(20),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.executeCore=function(e,t){var n=new r.BPMNImporter(t).import();return this.updateModel(n),!0},t.prototype.updateModel=function(e){var t=this,n={},i=[],o=[];this.control.history.beginTransaction(),e.items.forEach((function(e){var o=new s.AddShapeHistoryItem(t.getShapeDescription(e.type),new l.Point(0,0),e.text,e.key);t.control.history.addAndRedo(o),n[e.key]=o.shapeKey;var r=t.control.model.findShape(o.shapeKey);i.push(r)})),e.edges.forEach((function(e){var i=t.control.model.findShape(n[e.from]),r=t.control.model.findShape(n[e.to]),a=new c.AddConnectorHistoryItem([i.getConnectionPointPosition(0),r.getConnectionPointPosition(0)]);t.control.history.addAndRedo(a);var s=t.control.model.findConnector(a.connectorKey);t.control.history.addAndRedo(new d.AddConnectionHistoryItem(s,i,0,u.ConnectorPosition.Begin)),t.control.history.addAndRedo(new d.AddConnectionHistoryItem(s,r,0,u.ConnectorPosition.End)),o.push(s)}));var r=new p.LayoutSettings;a.ModelUtils.getGraphInfoByItems(this.control.model,i,o).forEach((function(e){var n=new h.SugiyamaLayoutBuilder(r,e.graph).build(),s=a.ModelUtils.getNonGraphItems(t.control.model,e.container,n.nodeToLayout,i,o);a.ModelUtils.applyLayout(t.control.history,t.control.model,void 0,e.graph,n,s,r,t.control.settings.snapToGrid,t.control.settings.gridSize,!1)})),a.ModelUtils.tryUpdateModelRectangle(this.control.history),this.control.history.endTransaction()},t.prototype.getShapeDescription=function(e){return this.control.shapeDescriptionManager.get(e)},t}(n(57).ExportImportCommandBase);t.ImportBPMNCommand=f},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BPMNNode=t.BPMNImporter=void 0;var r=n(54),a=n(1),s=n(38),l=n(95),u=function(){function e(e){this.doc=l.ImportUtils.createDocument(e),this.graph=new r.Graph([],[])}return e.prototype.import=function(){for(var e=void 0,t=0;e=this.doc.children[t];t++)"DEFINITIONS"===e.nodeName.toUpperCase()&&this.onDefinitionsElement(e);return this.validate(),this.graph},e.prototype.validate=function(){var e={};this.graph.nodes.forEach((function(t){return e[t]=!0}));for(var t=0,n=void 0;n=this.graph.edges[t];t++)e[n.from]&&e[n.to]||(this.graph.edges.splice(t,1),t--)},e.prototype.onDefinitionsElement=function(e){this.dataSourceKey=e.getAttribute("id");for(var t=void 0,n=0;t=e.children[n];n++)"PROCESS"===t.nodeName.toUpperCase()&&this.onProcessElement(t)},e.prototype.onProcessElement=function(e){for(var t=void 0,n=0;t=e.children[n];n++)switch(t.nodeName.toUpperCase()){case"STARTEVENT":this.onStartEventElement(t);break;case"SEQUENCEFLOW":this.onSequenceFlowElement(t);break;case"SCRIPTTASK":this.onScriptTaskElement(t);break;case"USERTASK":this.onUserTaskElement(t);break;case"SERVICETASK":this.onServiceTaskElement(t);break;case"SENDTASK":this.onSendTaskElement(t);break;case"EXCLUSIVEGATEWAY":this.onExclusiveGateway(t);break;case"ENDEVENT":this.onEndEventGateway(t)}},e.prototype.onStartEventElement=function(e){var t=this.createNode(e);t.type=a.ShapeTypes.Ellipse,t.text=e.getAttribute("name"),this.graph.addNode(t)},e.prototype.onSequenceFlowElement=function(e){var t=e.getAttribute("sourceRef"),n=e.getAttribute("targetRef"),i=this.createEdge(e,t,n);e.hasAttribute("name")&&(i.text=e.getAttribute("name")),this.graph.addEdge(i)},e.prototype.onScriptTaskElement=function(e){var t=this.createNode(e);t.text=e.getAttribute("name"),this.graph.addNode(t)},e.prototype.onUserTaskElement=function(e){var t=this.createNode(e);t.text=e.getAttribute("name"),this.graph.addNode(t)},e.prototype.onServiceTaskElement=function(e){var t=this.createNode(e);t.text=e.getAttribute("name"),this.graph.addNode(t)},e.prototype.onSendTaskElement=function(e){var t=this.createNode(e);t.text=e.getAttribute("name"),this.graph.addNode(t)},e.prototype.onExclusiveGateway=function(e){var t=this.createNode(e);t.text=e.getAttribute("name"),t.type=a.ShapeTypes.Decision,this.graph.addNode(t)},e.prototype.onEndEventGateway=function(e){var t=this.createNode(e);t.text=e.getAttribute("name"),t.type=a.ShapeTypes.Ellipse,this.graph.addNode(t)},e.prototype.createNode=function(e){return new c(this.dataSourceKey,e.getAttribute("id"))},e.prototype.createEdge=function(e,t,n){return new d(this.dataSourceKey,e.getAttribute("id"),t,n)},e}();t.BPMNImporter=u;var c=function(){return function(e,t){this.sourceKey=e,this.key=t,this.type=a.ShapeTypes.Rectangle}}();t.BPMNNode=c;var d=function(e){function t(t,n,i,o){var r=e.call(this,n,i,o)||this;return r.sourceKey=t,r}return o(t,e),t}(s.Edge)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CycleRemover=void 0;var i=n(54),o=n(38),r=n(90),a=function(){function e(){}return e.removeCycles=function(e){var t=this.getFeedbackSet(e);return this.reverseEdges(e,t)},e.getFeedbackSet=function(e){for(var t=this,n={},i=this.getNonTrivialStronglyConnectedComponents(e);i.length;)i.forEach((function(e){var i=t.getMaxCyclicEdges(e);i.forEach((function(e){return delete n[e.reverse().getHashKey()]})),i.forEach((function(e){return n[e.getHashKey()]=!0}))})),i=this.getNonTrivialStronglyConnectedComponents(this.reverseEdges(e,n).graph);return n},e.getMaxCyclicEdges=function(e){var t={},n={},i={},a=[],s=[],l=e.createIterator(o.ConnectionMode.Outgoing);l.visitEachEdgeOnce=!1,l.onNode=function(e){n[e.key]=!0},l.skipNode=function(e){if(n[e.key]){for(var o=[],r=0;ri[e.key]?t:e}),e[0]))})),u.list()},e.reverseEdges=function(e,t){var n=new r.HashSet([],(function(e){return e.getHashKey()})),o={},a={};return e.edges.forEach((function(e){t[e.getHashKey()]&&(e=e.reverse(),o[e.key]=!0),n.tryPush(e)||(a[e.key]=!0,delete o[e.key])})),{graph:new i.Graph(e.nodes.map((function(t){return e.getNode(t)})),n.list()),reversedEdges:o,removedEdges:a}},e.getNonTrivialStronglyConnectedComponents=function(e){return this.getStronglyConnectedComponents(e).filter((function(e){return e.edges.length}))},e.getStronglyConnectedComponents=function(e){for(var t=this,n=[],i=0,r={},a={},s={},l=[],u={},c=0;c0&&this.needSendToBack(t)},t.prototype.executeCore=function(e,t){var n=this;return this.control.history.beginTransaction(),this.control.selection.getSelectedItems().forEach((function(e){var t=n.control.model.getIntersectItemsMinZIndex(e)-1;n.control.history.addAndRedo(new r.ChangeZindexHistoryItem(e,t))})),this.control.history.endTransaction(),!0},t.prototype.needSendToBack=function(e){for(var t=this,n=function(n){var o=i.control.model.getIntersectItemsMinZIndex(e[n]);if(o0&&this.needBringToFront(t)},t.prototype.executeCore=function(e,t){var n=this;return this.control.history.beginTransaction(),this.control.selection.getSelectedItems().forEach((function(e){var t=n.control.model.getIntersectItemsMaxZIndex(e)+1;n.control.history.addAndRedo(new r.ChangeZindexHistoryItem(e,t))})),this.control.history.endTransaction(),!0},t.prototype.needBringToFront=function(e){for(var t=this,n=function(n){var o=i.control.model.getIntersectItemsMaxZIndex(e[n]);if(o>e[n].zIndex)return{value:!0};if(o===e[n].zIndex){var r=!1;return i.control.model.getIntersectItems(e[n]).filter((function(t){return t.zIndex===e[n].zIndex})).forEach((function(i){t.control.model.getItemIndex(i)>t.control.model.getItemIndex(e[n])&&(r=!0)})),{value:r}}},i=this,o=0;o0&&this.permissionsProvider.canAddItems(t)},t.prototype.executeCore=function(e,t){var n=r.ModelUtils.createRectangle(this.control.selection.getSelectedItems());return r.ModelUtils.cloneSelectionToOffset(this.control.history,this.control.model,void 0,this.control.selection,this.getOffsetX(n),this.getOffsetY(n)),!0},Object.defineProperty(t.prototype,"isPermissionsRequired",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getOffsetX=function(e){return 0},t.prototype.getOffsetY=function(e){return 0},t}(n(10).SimpleCommandBase);t.CloneCommand=a;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getOffsetX=function(e){return-e.width},t}(a);t.CloneLeftCommand=s;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getOffsetX=function(e){return e.width},t}(a);t.CloneRightCommand=l;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getOffsetY=function(e){return-e.height},t}(a);t.CloneUpCommand=u;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getOffsetY=function(e){return e.height},t}(a);t.CloneDownCommand=c},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeViewUnitsCommand=t.ChangeUnitsCommand=void 0;var r=n(77),a=n(281),s=n(10),l=n(36),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabledInReadOnlyMode=function(){return!0},t.prototype.getValue=function(){return this.control.model.units},t.prototype.createHistoryItems=function(e){return[new a.ChangeUnitsHistoryItem(e)]},t.prototype.getItems=function(){return Object.keys(l.DiagramLocalizationService.unitItems).map((function(e){return{value:parseInt(e),text:l.DiagramLocalizationService.unitItems[e]}}))},t}(r.ChangePagePropertyCommand);t.ChangeUnitsCommand=u;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabledInReadOnlyMode=function(){return!0},t.prototype.getValue=function(){return this.control.settings.viewUnits},t.prototype.executeCore=function(e,t){return this.control.settings.viewUnits=t,!0},t.prototype.getItems=function(){return Object.keys(l.DiagramLocalizationService.unitItems).map((function(e){return{value:parseInt(e),text:l.DiagramLocalizationService.unitItems[e]}}))},t}(s.SimpleCommandBase);t.ChangeViewUnitsCommand=c},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeUnitsHistoryItem=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.units=t,n}return o(t,e),t.prototype.redo=function(e){this.oldUnits=e.model.units,e.model.units=this.units},t.prototype.undo=function(e){e.model.units=this.oldUnits},t}(n(8).HistoryItem);t.ChangeUnitsHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePageColorCommand=void 0;var r=n(77),a=n(283),s=n(62),l=n(22),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getValue=function(){return l.ColorUtils.colorToHash(this.control.model.pageColor)},t.prototype.getDefaultValue=function(){return l.ColorUtils.colorToHash(s.DiagramModel.defaultPageColor)},t.prototype.createHistoryItems=function(e){return[new a.ChangePageColorHistoryItem(l.ColorUtils.fromString(e))]},t}(r.ChangePagePropertyCommand);t.ChangePageColorCommand=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePageColorHistoryItem=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return o(t,e),t.prototype.redo=function(e){this.oldValue=e.model.pageColor,e.changePageColor(this.value)},t.prototype.undo=function(e){e.changePageColor(this.oldValue)},t}(n(8).HistoryItem);t.ChangePageColorHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeShowGridCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabledInReadOnlyMode=function(){return!0},t.prototype.executeCore=function(e,t){var n=void 0===t?!this.control.settings.showGrid:!!t;return this.control.settings.showGrid!==n&&(this.control.settings.showGrid=n,!0)},t.prototype.getValue=function(){return this.control.settings.showGrid},t}(n(10).SimpleCommandBase);t.ChangeShowGridCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleFullscreenCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabledInReadOnlyMode=function(){return!0},t.prototype.getValue=function(){return this.control.settings.fullscreen},t.prototype.executeCore=function(e,t){var n="boolean"==typeof t?t:!e.value;return this.control.settings.fullscreen!==n&&(this.control.settings.fullscreen=!e.value,this.control.notifyToggleFullscreen(this.control.settings.fullscreen)),!0},t}(n(10).SimpleCommandBase);t.ToggleFullscreenCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleSimpleViewCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabledInReadOnlyMode=function(){return!0},t.prototype.getValue=function(){return this.control.settings.simpleView},t.prototype.executeCore=function(e,t){return"boolean"==typeof t?this.control.settings.simpleView=t:void 0===t&&(this.control.settings.simpleView=!e.value),this.control.updateLayout(!0),!0},t}(n(10).SimpleCommandBase);t.ToggleSimpleViewCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleReadOnlyCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabledInReadOnlyMode=function(){return!0},t.prototype.getValue=function(){return this.control.settings.readOnly},t.prototype.executeCore=function(e,t){return"boolean"==typeof t?this.control.settings.readOnly=t:void 0===t&&(this.control.settings.readOnly=!e.value),!0},t}(n(10).SimpleCommandBase);t.ToggleReadOnlyCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EditShapeImageCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabled=function(){var t=this.getSelectedShape();return e.prototype.isEnabled.call(this)&&!t.image.isEmpty},t}(n(104).EditShapeImageCommandBase);t.EditShapeImageCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasteSelectionInPositionCommand=void 0;var r=n(141),a=n(14),s=n(6),l=n(0),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getEventPositionOffset=function(e,t){var n=e.reduce((function(e,t){return{x:Math.min(e.x,t instanceof a.Shape?t.position.x:t instanceof s.Connector?t.getMinX():Number.MAX_VALUE),y:Math.min(e.y,t instanceof a.Shape?t.position.y:t instanceof s.Connector?t.getMinY():Number.MAX_VALUE)}}),{x:Number.MAX_VALUE,y:Number.MAX_VALUE}),i=this.control.render.getModelPointByEventPoint(t.x,t.y);return new l.Point(i.x-n.x,i.y-n.y)},t}(r.PasteSelectionCommandBase);t.PasteSelectionInPositionCommand=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ImportXMLCommand=void 0;var r=n(291),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.executeCore=function(e,t){var n=new r.XmlImporter(this.control.shapeDescriptionManager,t).import();return this.control.importModel(n),!0},t}(n(57).ExportImportCommandBase);t.ImportXMLCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.XmlImporter=void 0;var r=n(6),a=n(14),s=n(133),l=n(1),u=n(91),c=n(2),d=n(0),h=n(95),p=n(22),f=n(12),m=function(e){function t(t,n){var i=e.call(this,t)||this;return i.doc=h.ImportUtils.createDocument(n),i}return o(t,e),t.prototype.getObject=function(){return this.doc},t.prototype.getPageObject=function(e){var t=this.doc.querySelectorAll("[ItemKind='DiagramRoot']");return t&&t[0]},t.prototype.getShapeObjects=function(e){var t=[];return this.doc.querySelectorAll("[ItemKind='DiagramRoot'] > Children > [ItemKind='DiagramShape']").forEach((function(e){t.push(e)})),this.doc.querySelectorAll("[ItemKind='DiagramRoot'] > Children > [ItemKind='DiagramContainer']").forEach((function(e){t.push(e)})),t},t.prototype.getConnectorObjects=function(e){var t=[];return this.doc.querySelectorAll("[ItemKind='DiagramRoot'] > Children > [ItemKind='DiagramConnector']").forEach((function(e){t.push(e)})),t},t.prototype.importPageSettings=function(e,t){if(t){var n=t.getAttribute("PageSize"),i=this.getSize(n);i&&(e.size=i.clone(),e.pageSize=i.clone())}},t.prototype.importShape=function(e){var t=e.getAttribute("Position"),n=this.getPoint(t),i=e.getAttribute("Shape"),o=this.getShapeType(i),r=this.shapeDescriptionManager.get(o),s=new a.Shape(r||u.ShapeDescriptionManager.default,n);s.key=this.getItemKey(e);var l=e.getAttribute("Size"),c=this.getSize(l);c&&(s.size=c);var d=e.getAttribute("Content");if("string"==typeof d)s.text=d;else{var h=e.getAttribute("Header");"string"==typeof h&&(s.text=h)}return this.importStyle(e,s),s},t.prototype.importShapeChildren=function(e,t){var n=[];e.setAttribute("dxDiagram",""),this.doc.querySelectorAll("[dxDiagram] > Children > [ItemKind='DiagramShape']").forEach((function(e){n.push(e)})),this.doc.querySelectorAll("[dxDiagram] > Children > [ItemKind='DiagramContainer']").forEach((function(e){n.push(e)})),e.removeAttribute("dxDiagram");var i=[];if(!n)return i;for(var o=0;o-1?l.ShapeTypes.VerticalContainer:l.ShapeTypes.Rectangle},t.prototype.getItemKey=function(e){return(parseInt(e.tagName.replace("Item",""))-1).toString()},t.prototype.getNumbers=function(e){var t=e.split(",");return t&&t.length?t.map((function(e){return+e})):[]},t.prototype.getSize=function(e){if(e){var t=this.getNumbers(e);if(t.length>=2)return this.assert(t[0],"number"),this.assert(t[1],"number"),new c.Size(f.UnitConverter.pixelsToTwips(t[0]),f.UnitConverter.pixelsToTwips(t[1]))}},t.prototype.getPoint=function(e){if(e){var t=this.getNumbers(e);if(t.length>=2)return this.assert(t[0],"number"),this.assert(t[1],"number"),new d.Point(f.UnitConverter.pixelsToTwips(t[0]),f.UnitConverter.pixelsToTwips(t[1]))}},t.prototype.getColor=function(e){e="#"===e.charAt(0)?e.substr(1):e;var t=parseInt(e,16);return isNaN(t)?void 0:p.ColorUtils.colorToHash(t)},t.shapeTypes={"BasicShapes.Rectangle":l.ShapeTypes.Rectangle,"BasicShapes.Ellipse":l.ShapeTypes.Ellipse,"BasicShapes.Triangle":l.ShapeTypes.Triangle,"BasicShapes.Pentagon":l.ShapeTypes.Pentagon,"BasicShapes.Hexagon":l.ShapeTypes.Hexagon,"BasicShapes.Octagon":l.ShapeTypes.Octagon,"BasicShapes.Diamond":l.ShapeTypes.Diamond,"BasicShapes.Cross":l.ShapeTypes.Cross,"BasicShapes.Star5":l.ShapeTypes.Star,"BasicFlowchartShapes.StartEnd":l.ShapeTypes.Terminator,"BasicFlowchartShapes.Data":l.ShapeTypes.Data,"BasicFlowchartShapes.Database":l.ShapeTypes.Database,"BasicFlowchartShapes.ExternalData":l.ShapeTypes.StoredData,"BasicFlowchartShapes.Process":l.ShapeTypes.Process,"BasicFlowchartShapes.Decision":l.ShapeTypes.Decision,"BasicFlowchartShapes.Subprocess":l.ShapeTypes.PredefinedProcess,"BasicFlowchartShapes.Document":l.ShapeTypes.Document,"BasicFlowchartShapes.Custom1":l.ShapeTypes.ManualInput,"BasicFlowchartShapes.Custom2":l.ShapeTypes.ManualOperation,"ArrowShapes.SimpleArrow":l.ShapeTypes.ArrowLeft,"ArrowShapes.SimpleDoubleArrow":l.ShapeTypes.ArrowLeftRight},t}(s.ImporterBase);t.XmlImporter=m},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InsertShapeImageCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabled=function(){var t=this.getSelectedShape();return e.prototype.isEnabled.call(this)&&t.image.isEmpty},t}(n(104).EditShapeImageCommandBase);t.InsertShapeImageCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteShapeImageCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isEnabled=function(){var t=this.getSelectedShape();return e.prototype.isEnabled.call(this)&&!t.image.isEmpty},t.prototype.executeCore=function(t,n){return e.prototype.executeCore.call(this,t,void 0)},t}(n(104).EditShapeImageCommandBase);t.DeleteShapeImageCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeStrokeStyleCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getStyleProperty=function(){return"stroke-dasharray"},t}(n(75).ChangeStylePropertyCommand);t.ChangeStrokeStyleCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeStrokeWidthCommand=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getStyleProperty=function(){return"stroke-width"},t}(n(75).ChangeStylePropertyCommand);t.ChangeStrokeWidthCommand=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLayoutTreeVerticalBottomToTopCommand=void 0;var r=n(20),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createLayoutSettings=function(){var t=e.prototype.createLayoutSettings.call(this);return t.direction=r.LogicalDirectionKind.Backward,t},t}(n(137).AutoLayoutTreeVerticalCommand);t.AutoLayoutTreeVerticalBottomToTopCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLayoutTreeHorizontalRightToLeftCommand=void 0;var r=n(20),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createLayoutSettings=function(){var t=e.prototype.createLayoutSettings.call(this);return t.direction=r.LogicalDirectionKind.Backward,t},t}(n(143).AutoLayoutTreeHorizontalCommand);t.AutoLayoutTreeHorizontalRightToLeftCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLayoutLayeredVerticalBottomToTopCommand=void 0;var r=n(20),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createLayoutSettings=function(){var t=e.prototype.createLayoutSettings.call(this);return t.direction=r.LogicalDirectionKind.Backward,t},t}(n(144).AutoLayoutLayeredVerticalCommand);t.AutoLayoutLayeredVerticalBottomToTopCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLayoutLayeredHorizontalRightToLeftCommand=void 0;var r=n(20),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createLayoutSettings=function(){var t=e.prototype.createLayoutSettings.call(this);return t.direction=r.LogicalDirectionKind.Backward,t},t}(n(142).AutoLayoutLayeredHorizontalCommand);t.AutoLayoutLayeredHorizontalRightToLeftCommand=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeConnectorRoutingModeCommand=void 0;var r=n(10),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getValue=function(){return this.control.settings.connectorRoutingMode},t.prototype.executeCore=function(e,t){var n=void 0!==t?t:a.ConnectorRoutingMode.None;return this.control.settings.connectorRoutingMode=n,!0},t}(r.SimpleCommandBase);t.ChangeConnectorRoutingModeCommand=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagramControl=void 0;var i=n(0),o=n(302),r=n(82),a=n(303),s=n(62),l=n(332),u=n(335),c=n(336),d=n(337),h=n(91),p=n(345),f=n(28),m=n(16),g=n(349),v=n(4),_=n(350),y=n(3),b=n(353),C=n(46),x=n(354),w=n(368),S=n(79),T=n(6),O=n(103),E=n(379),I=n(17),k=n(58),D=function(){function e(){this.updateLockCount=0,this.shouldUpdateItemsByModel=!1,this.reloadContentNeeded=!1,this.reloadContentParameters=new E.ReloadContentParameters,this.reloadContentByExternalChangesParameters=new E.ReloadContentParameters,this.settings=new f.DiagramSettings,this.shapeDescriptionManager=new h.ShapeDescriptionManager,this.shapeDescriptionManager.onShapeDecriptionChanged.add(this),this.model=new s.DiagramModel,this.selection=new l.Selection(this.model),this.onNativeAction=new y.EventDispatcher,this.apiController=new b.ApiController(this.onNativeAction,this.selection,this.model),this.permissionsProvider=new x.PermissionsProvider(this.apiController),this.permissionsProvider.onRequestOperation.add(this),this.routingModel=new w.ConnectorRoutingModel,this.modelManipulator=new o.ModelManipulator(this.model,this.routingModel,this.permissionsProvider),this.modelManipulator.onModelChanged.add(this.permissionsProvider),this.history=new u.History(this.modelManipulator,this),this.barManager=new c.BarManager(this),this.view=new g.ViewController(this.settings,this.barManager),this.commandManager=new r.CommandManager(this),this.eventManager=new a.EventManager(this),this.settings.onReadOnlyChanged.add(this.eventManager.mouseHandler),this.settings.onReadOnlyChanged.add(this.eventManager.visualizersManager),this.selection.onChanged.add(this.barManager),this.selection.onChanged.add(this.apiController),this.selection.onChanged.add(this.permissionsProvider),this.modelManipulator.commitItemsCreateChanges(),this.history.onChanged.add(this),this.toolboxManager=new _.ToolboxManager(this.shapeDescriptionManager),this.settings.onConnectorRoutingModeChanged.add(this.routingModel),C.ImageCache.instance.onReadyStateChanged.add(this)}return Object.defineProperty(e.prototype,"operationSettings",{get:function(){return this.permissionsProvider.operationSettings},enumerable:!1,configurable:!0}),e.prototype.cleanMarkup=function(e){e=e||function(e){I.RenderUtils.removeElement(e)},this.toolboxManager.clean(e),this.barManager.clean(),this.render&&(this.settings.onZoomChanged.remove(this.render.view),this.settings.onViewChanged.remove(this.render.page),this.settings.onViewChanged.remove(this.render.view),this.settings.onReadOnlyChanged.remove(this.render),this.settings.onReadOnlyChanged.remove(this.render.selection),this.eventManager.cleanToolboxes(this.settings.onReadOnlyChanged),this.eventManager.onTextInputOperation.remove(this.render.input),this.eventManager.onTextInputOperation.remove(this.render.items),this.eventManager.onTextInputOperation.remove(this.render.selection),this.eventManager.onMouseOperation.remove(this.render.items),this.eventManager.onMouseOperation.remove(this.render.selection),this.eventManager.onMouseOperation.remove(this.render.view),this.eventManager.onMouseOperation.remove(this.render),this.eventManager.onVisualizersUpdate.remove(this.render.selection),this.modelManipulator.onModelSizeChanged.remove(this.render.view),this.modelManipulator.onModelSizeChanged.remove(this.render.page),this.modelManipulator.onModelChanged.remove(this.render.items),this.modelManipulator.onModelChanged.remove(this.render.page),this.modelManipulator.onModelChanged.remove(this.render.selection),this.selection.onChanged.remove(this.render.selection),this.selection.onChanged.remove(this.render.items),this.render.clean(e),this.render=void 0),this.measurer&&this.measurer instanceof S.TextMeasurer&&this.measurer.clean()},e.prototype.dispose=function(){C.ImageCache.instance.onReadyStateChanged.remove(this)},e.prototype.createDocument=function(e,t,n){this.measurer||this.initMeasurer(e),this.render?this.render.replaceParent(e,t):(this.render=new d.RenderManager(e,this.eventManager,this.measurer,{pageColor:this.model.pageColor,modelSize:this.model.size,pageLandscape:this.model.pageLandscape,pageSize:this.model.pageSize,simpleView:this.settings.simpleView,readOnly:this.settings.readOnly,contextMenuEnabled:this.settings.contextMenuEnabled,gridSize:this.settings.gridSize,gridVisible:this.settings.showGrid,zoomLevel:this.settings.zoomLevel,autoZoom:this.settings.autoZoom,rectangle:this.model.getRectangle(!0)},t,n),this.settings.onZoomChanged.add(this.render.view),this.settings.onViewChanged.add(this.render.page),this.settings.onViewChanged.add(this.render.view),this.settings.onReadOnlyChanged.add(this.render),this.settings.onReadOnlyChanged.add(this.render.selection),this.eventManager.onTextInputOperation.add(this.render.input),this.eventManager.onTextInputOperation.add(this.render.items),this.eventManager.onTextInputOperation.add(this.render.selection),this.eventManager.onTextInputOperation.add(this),this.eventManager.onMouseOperation.add(this.render.items),this.eventManager.onMouseOperation.add(this.render.selection),this.eventManager.onMouseOperation.add(this.render.view),this.eventManager.onMouseOperation.add(this.render),this.eventManager.onVisualizersUpdate.add(this.render.selection),this.modelManipulator.onModelSizeChanged.add(this.render.view),this.modelManipulator.onModelSizeChanged.add(this.render.page),this.modelManipulator.onModelChanged.add(this.render.items),this.modelManipulator.onModelChanged.add(this.render.page),this.modelManipulator.onModelChanged.add(this.render.selection),this.selection.onChanged.add(this.render.selection),this.selection.onChanged.add(this.render.items),this.render.update(!1),this.render.onNewModel(this.model.items),this.modelManipulator.commitItemsCreateChanges(),this.view.initialize(this.render.view),this.settings.zoomLevelWasChanged&&this.raiseCanvasViewActualZoomChanged(),this.selection.raiseSelectionChanged())},e.prototype.createToolbox=function(e,t,n,i){var o=this.toolboxManager.create(e,this.settings.readOnly,!0,t,n,this.getToolboxAllowedShapeTypes.bind(this),i);this.settings.onReadOnlyChanged.add(o),o.onDragOperation.add(this),o.onDragOperation.add(this.apiController),this.eventManager.registerToolbox(o)},e.prototype.createContextToolbox=function(e,t,n,i,o){this.cleanContextToolbox(),this.contextToolbox=this.toolboxManager.create(e,this.settings.readOnly,!1,t,n,this.getToolboxAllowedShapeTypes.bind(this),i),this.contextToolbox.onClickOperation.add(this),this.contextToolboxOnClick=o},e.prototype.getToolboxAllowedShapeTypes=function(e){var t=this,n=[];return this.permissionsProvider.beginUpdateUI(),e.forEach((function(e){t.permissionsProvider.canAddShapeFromToolbox(e)&&n.push(e)})),this.permissionsProvider.endUpdateUI(),n},e.prototype.cleanContextToolbox=function(){this.contextToolbox&&(this.toolboxManager.clean(void 0,this.contextToolbox),this.contextToolbox=void 0,this.contextToolboxOnClick=void 0)},e.prototype.refreshToolbox=function(e){this.permissionsProvider.clearCache(m.DiagramModelOperation.AddShapeFromToolbox),this.toolboxManager.refresh(e)},e.prototype.applyToolboxFilter=function(e,t){return this.toolboxManager.applyFilter(e,t)},e.prototype.notifyToolboxClick=function(e){this.contextToolboxOnClick&&this.contextToolboxOnClick(e)},e.prototype.initMeasurer=function(e){this.measurer=new S.TextMeasurer(e)},e.prototype.onDimensionChanged=function(){k.Browser.TouchUI||this.updateLayout(!0)},e.prototype.updateLayout=function(e){void 0===e&&(e=!1),this.render&&this.render.update(!e)},e.prototype.captureFocus=function(){this.render&&this.render.input.captureFocus()},e.prototype.isFocused=function(){return!this.render||this.render.input.isFocused()},e.prototype.registerBar=function(e){this.barManager.registerBar(e)},e.prototype.updateBarItemsState=function(e,t){this.barManager.updateBarItemsState(e,t)},e.prototype.getCommand=function(e){return this.commandManager.getCommand(e)},e.prototype.getNativeItemByKey=function(e){var t=this.model.findItem(e);return t&&this.apiController.createNativeItem(t)},e.prototype.getNativeItemByDataKey=function(e){var t=this.model.findItemByDataKey(e);return t&&this.apiController.createNativeItem(t)},e.prototype.getNativeItems=function(){var e=this;return this.model.items.map((function(t){return e.apiController.createNativeItem(t)}))},e.prototype.getNativeSelectedItems=function(){var e=this;return this.selection.getKeys().map((function(t){return e.apiController.createNativeItem(e.model.findItem(t))}))},e.prototype.setSelectedItems=function(e){this.selection.set(e)},e.prototype.scrollToItems=function(e){var t=this,n=y.GeometryUtils.getCommonRectangle(e.map((function(e){return t.model.findItem(e).rectangle})));this.view.scrollIntoView(n)},e.prototype.setInitialStyleProperties=function(e){this.selection.inputPosition.setInitialStyleProperties(e)},e.prototype.setInitialTextStyleProperties=function(e){this.selection.inputPosition.setInitialTextStyleProperties(e)},e.prototype.setInitialConnectorProperties=function(e){this.selection.inputPosition.setInitialConnectorProperties(e)},e.prototype.addCustomShapes=function(e){var t=this;e.forEach((function(e){e.apiController=t.apiController,e.defaultWidth&&(e.defaultWidth=v.ModelUtils.getTwipsValue(t.model.units,e.defaultWidth)),e.defaultHeight&&(e.defaultHeight=v.ModelUtils.getTwipsValue(t.model.units,e.defaultHeight)),e.minWidth&&(e.minWidth=v.ModelUtils.getTwipsValue(t.model.units,e.minWidth)),e.minHeight&&(e.minHeight=v.ModelUtils.getTwipsValue(t.model.units,e.minHeight)),e.maxWidth&&(e.maxWidth=v.ModelUtils.getTwipsValue(t.model.units,e.maxWidth)),e.maxHeight&&(e.maxHeight=v.ModelUtils.getTwipsValue(t.model.units,e.maxHeight)),t.shapeDescriptionManager.registerCustomShape(e)}))},e.prototype.removeCustomShapes=function(e){var t=this;e.forEach((function(e){t.shapeDescriptionManager.unregisterCustomShape(e)}))},e.prototype.removeAllCustomShapes=function(){this.shapeDescriptionManager.unregisterAllCustomShapes()},e.prototype.importModel=function(e){e.units=this.model.units,this.model=e,this.model.initializeKeyCounter(),this.apiController.model=e,this.onImportData()},e.prototype.importItemsData=function(){this.onImportData()},e.prototype.onImportData=function(){this.render&&(this.render.clear(),this.render.onNewModel(this.model.items)),this.permissionsProvider.clearCache(),this.selection.initialize(this.model),this.modelManipulator.initialize(this.model,this.routingModel),this.history.clear(),this.eventManager.initialize(),this.modelManipulator.commitPageChanges(),this.modelManipulator.commitItemsCreateChanges(),this.notifyViewChanged(),this.notifyHistoryChanged()},e.prototype.createDocumentDataSource=function(e,t,n,i,o){return this.documentDataSource=new p.DocumentDataSource(this,e,t,n,i,o),this.apiController.setDataSource(this.documentDataSource),this.documentDataSource},e.prototype.deleteDocumentDataSource=function(){this.apiController.setDataSource(null),delete this.documentDataSource},e.prototype.applyShapeSizeSettings=function(e){this.settings.applyShapeSizeSettings(e,this.model.units)},e.prototype.applyOperationSettings=function(e){this.permissionsProvider.operationSettings.applySettings(e)},e.prototype.beginUpdateCanvas=function(){this.render&&(this.render.items.beginUpdate(),this.render.selection.beginUpdate())},e.prototype.endUpdateCanvas=function(){this.render&&(this.render.items.endUpdate(),this.render.selection.endUpdate())},e.prototype.beginUpdate=function(){this.barManager.beginUpdate(),this.apiController.beginUpdate(),this.eventManager.beginUpdate()},e.prototype.endUpdate=function(){this.barManager.endUpdate(),this.apiController.endUpdate(),this.eventManager.endUpdate()},e.prototype.notifyEdgeInserted=function(e,t,n){this.onEdgeInserted?this.onEdgeInserted(e,t,n):t(e)},e.prototype.notifyEdgeUpdated=function(e,t,n,i){this.onEdgeUpdated?this.onEdgeUpdated(e,t,n,i):n(e,t)},e.prototype.notifyEdgeRemoved=function(e,t,n,i){this.onEdgeUpdated?this.onEdgeRemoved(e,t,n,i):n(e,t)},e.prototype.notifyNodeInserted=function(e,t,n){this.onNodeInserted?this.onNodeInserted(e,t,n):t(e)},e.prototype.notifyNodeUpdated=function(e,t,n,i){this.onNodeUpdated?this.onNodeUpdated(e,t,n,i):n(e,t)},e.prototype.notifyNodeRemoved=function(e,t,n,i){this.onNodeRemoved?this.onNodeRemoved(e,t,n,i):n(e,t)},e.prototype.reloadInsertedItem=function(e){this.settings.reloadInsertedItemRequired&&this.reloadContent(e)},e.prototype.reloadContent=function(e,t,n,i){if(this.documentDataSource){this.isChangesLocked()&&(this.reloadContentNeeded=!0);var o=!0===i||void 0===i&&!this.reloadContentNeeded,r=o?this.reloadContentByExternalChangesParameters:this.reloadContentParameters;r.add(e,t,n),this.isChangesLocked()||(this.reloadContentCore(r,o),this.barManager.updateItemsState())}},e.prototype.reloadContentCore=function(e,t){var n=this,i=e.getData&&e.getData(),o=this.documentDataSource.refetchData(i&&i.nodeDataSource,i&&i.edgeDataSource);this.beginUpdateCanvas(),this.permissionsProvider.lockPermissions(),this.documentDataSource.updateModelItems(this.history,this.model,this.shapeDescriptionManager,this.selection,new O.DataLayoutParameters(this.settings,e.layoutParameters),t,e.dataKeys,(function(e){n.modelManipulator.commitItemUpdateChanges(e)}),o,this.settings.snapToGrid,this.settings.gridSize,this.measurer),this.permissionsProvider.unlockPermissions(),this.endUpdateCanvas(),e.clear()},e.prototype.notifyHistoryChanged=function(){this.documentDataSource?(this.shouldUpdateItemsByModel=!0,this.settings.readOnly||this.notifyDataChanges()):this.raiseOnChanged()},e.prototype.notifyViewChanged=function(){this.settings.notifyViewChanged()},e.prototype.notifyToolboxDragStart=function(e){this.render.notifyToolboxDragStart(e),this.onToolboxDragStart&&this.onToolboxDragStart()},e.prototype.notifyToolboxDragEnd=function(e){this.render.notifyToolboxDragEnd(e),this.onToolboxDragEnd&&this.onToolboxDragEnd()},e.prototype.notifyToolboxDraggingMouseMove=function(e){this.render&&this.render.notifyToolboxDraggingMouseMove(e)},e.prototype.notifyTextInputStart=function(e,t,n,i){this.onTextInputStart&&this.onTextInputStart()},e.prototype.notifyTextInputEnd=function(e,t){this.onTextInputEnd&&this.onTextInputEnd()},e.prototype.notifyTextInputPermissionsCheck=function(e,t){},e.prototype.notifyToggleFullscreen=function(e){this.onToggleFullscreen&&this.onToggleFullscreen(e)},e.prototype.notifyShowContextMenu=function(e,t){if(this.onShowContextMenu&&this.render){var n=void 0;if(this.selection.getSelectedItems(!0).length>0){var o=v.ModelUtils.createRectangle(this.selection.getSelectedItems(!0)),r=this.render.getEventPointByModelPoint(o.createPosition()),a=this.render.view.getAbsoluteSize(o.createSize());n={x:r.x,y:r.y,width:a.width,height:a.height}}if(e)this.contextMenuPosition=new i.Point(e.x,e.y),this.onShowContextMenu(e.x,e.y,n);else if(t){var s=this.render.getEventPointByModelPoint(t);this.contextMenuPosition=s.clone(),this.onShowContextMenu(s.x,s.y,n)}}},e.prototype.notifyHideContextMenu=function(){this.onHideContextMenu&&this.render&&this.onHideContextMenu()},e.prototype.notifyShowContextToolbox=function(e,t,n,i,o){if(this.onShowContextToolbox&&this.render){var r=this.render.getEventPointByModelPoint(e);this.onShowContextToolbox(r.x,r.y,n,i,o),this.render.view.notifyShowContextToolbox()}},e.prototype.notifyHideContextToolbox=function(){this.onHideContextToolbox&&this.render&&(this.onHideContextToolbox(),this.render.view.notifyHideContextToolbox()),this.cleanContextToolbox()},e.prototype.notifyShapeDescriptionChanged=function(e){this.modelManipulator.updateShapeDescription(e)},e.prototype.notifyImageCacheReadyStateChanged=function(e){this.barManager.updateItemsState()},e.prototype.raiseCanvasViewActualZoomChanged=function(){this.render.view.raiseActualZoomChanged()},e.prototype.notifyRequestOperation=function(e,t){this.requestOperationByDataSource(e,t)||this.onRequestOperation&&this.onRequestOperation(e,t)},e.prototype.requestOperationByDataSource=function(e,t){if(!this.documentDataSource||!this.documentDataSource.IsNodeParentIdMode()&&!this.documentDataSource.IsNodeItemsMode())return!1;if(e===m.DiagramModelOperation.ChangeConnection){var n=t,i=n.shape&&this.model.findItem(n.shape.id),o=n.connector&&this.model.findItem(n.connector.id);if(!i||!o)return;if(n.position===T.ConnectorPosition.End)for(var r=0;r0},e.prototype.beginChangesNotification=function(){this.isChangesLocked()||this.changesLockChanged&&this.changesLockChanged(!0),this.updateLockCount++},e.prototype.endChangesNotification=function(e){var t=this;this.updateLockCount--,this.isChangesLocked()||(this.changesLockChanged(!1),e||setTimeout((function(){t.notifyReloadContent(),t.notifyDataChanges()}),0))},e.prototype.changesLockChanged=function(e){e?this.lockedReadOnly=this.settings.readOnly:e=this.lockedReadOnly,this.commandManager.getCommand(r.DiagramCommand.ToggleReadOnly).execute(e)},e.prototype.notifyDataChanges=function(){this.isChangesLocked()||(this.shouldUpdateItemsByModel&&(this.documentDataSource.updateItemsByModel(this.model),this.shouldUpdateItemsByModel=!1),this.raiseOnChanged())},e.prototype.notifyReloadContent=function(){this.reloadContentNeeded&&(this.reloadContentParameters.empty||this.reloadContentCore(this.reloadContentParameters,!1),this.reloadContentByExternalChangesParameters.empty||this.reloadContentCore(this.reloadContentByExternalChangesParameters,!0),this.reloadContentNeeded=!1)},e.prototype.raiseOnChanged=function(){this.onChanged&&this.onChanged()},e}();t.DiagramControl=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelManipulator=void 0;var i=n(87),o=n(2),r=n(61),a=n(46),s=n(130),l=n(16),u=n(3),c=n(6),d=n(99),h=n(4),p=function(){function e(e,t,n){this.onModelChanged=new u.EventDispatcher,this.onModelSizeChanged=new u.EventDispatcher,this.initializeCore(e,t),this.permissionsProvider=n,this.imageLoader=new s.ImageLoader(this.updateShapeImage.bind(this))}return e.prototype.initialize=function(e,t){this.initializeCore(e,t),this.model.loadAllImages(this.imageLoader),this.updateModelSize()},e.prototype.initializeCore=function(e,t){var n=this;this.model=e,this.routingModel=t,this.routingModel&&(this.routingModel.initialize(e),e.iterateItems((function(e){if(e instanceof c.Connector){var t=n.routingModel.createStrategy(e.properties.lineOption);t?e.changeRoutingStrategy(t):e.invalidateRenderPoints()}})))},e.prototype.commitPageChanges=function(){this.raisePageSizeChanged(this.model.pageSize.clone(),this.model.pageLandscape),this.raiseModelSizeChanged(this.model.size.clone()),this.raisePageColorChanged(this.model.pageColor),this.raiseModelRectangleChanged(h.ModelUtils.createRectangle(this.model.items))},e.prototype.commitItemsCreateChanges=function(){r.Diagnostics.timer("new model: model changes"),this.commitItemsChangesCore(d.ItemChangeType.Create,this.model.items),r.Diagnostics.endTimer()},e.prototype.commitItemUpdateChanges=function(e){this.commitItemsChangesCore(d.ItemChangeType.UpdateStructure,[e])},e.prototype.commitItemsChangesCore=function(e,t){var n=[];t.forEach((function(t){n.push(new d.ItemChange(t,e))})),n.length&&this.raiseModelChanged(n)},e.prototype.insertToContainer=function(e,t){if(e.container&&t&&e.container.key!==t.key)throw Error("To insert an item to a container it's necessary to remove it from the current container.");t&&(-1===t.children.indexOf(e)&&t.children.push(e),e.container=t,this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Update)]))},e.prototype.removeFromContainer=function(e){if(e.container){var t=e.container.children.indexOf(e);e.container.children.splice(t,1),e.container=void 0,this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Update)])}},e.prototype.changeStyle=function(e,t,n){this.changeStyleCore(e,e.style,t,n)},e.prototype.changeStyleText=function(e,t,n){this.changeStyleCore(e,e.styleText,t,n)},e.prototype.changeStyleCore=function(e,t,n,i){void 0!==i?t[n]=i:delete t[n],this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateProperties)])},e.prototype.changeZIndex=function(e,t){e.zIndex=t,this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Update)])},e.prototype.changeLocked=function(e,t){e.locked=t,this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateClassName)])},e.prototype.changeCustomData=function(e,t){e.customData=u.ObjectUtils.cloneObject(t),this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateStructure)])},e.prototype.addShape=function(e,t){if(e.attachedConnectors.length)throw Error("A creating shape should not contain existing connectors.");return e.key=void 0!==t?t:this.model.getNextKey(),this.insertShape(e)},e.prototype.insertShape=function(e){this.model.pushItem(e);var t=this.permissionsProvider.canAddItems([e]);return this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Create,t)]),this.model.loadAllImages(this.imageLoader),e},e.prototype.resizeShape=function(e,t,n){e.position=t,e.size=n;var i=this.permissionsProvider.isStoredPermissionsGranted(),o=this.getInteractingItem(e,l.DiagramModelOperation.ResizeShape);if(o){var r=o.size.clone(),a=e.size.clone();a.equals(r)||(i=this.permissionsProvider.canResizeShapes([{shape:e,size:a,oldSize:r}]))}var s=this.getInteractingItem(e,l.DiagramModelOperation.MoveShape);if(s){var u=s.position.clone(),c=e.position.clone();c.equals(u)||(i=this.permissionsProvider.canMoveShapes([{shape:e,position:c,oldPosition:u}]))}this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateProperties,i)])},e.prototype.moveShape=function(e,t){e.position=t;var n=this.permissionsProvider.isStoredPermissionsGranted();this.getInteractingItem(e,l.DiagramModelOperation.AddShape)&&(n=this.permissionsProvider.canAddItems([e]));var i=this.getInteractingItem(e,l.DiagramModelOperation.MoveShape);if(i){var o=i.position.clone(),r=e.position.clone();r.equals(o)||(n=this.permissionsProvider.canMoveShapes([{shape:e,position:r,oldPosition:o}]))}this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateProperties,n)])},e.prototype.changeShapeParameters=function(e,t){e.parameters.forEach((function(e){var n=t.get(e.key);n&&(e.value=n.value)})),this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateProperties)])},e.prototype.changeShapeText=function(e,t){e.text=t,this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateStructure)])},e.prototype.changeShapeImage=function(e,t){e.image=t;var n=a.ImageCache.instance.createUnloadedInfoByShapeImageInfo(t);this.imageLoader.load(n),this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateStructure)])},e.prototype.changeShapeExpanded=function(e,t){e.expanded=t,e.toggleExpandedSize(),this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.UpdateStructure)])},e.prototype.deleteShape=function(e,t){if(e.attachedConnectors.length)throw Error("A removing shape should not contain existing connectors.");this.removeShape(e,t)},e.prototype.removeShape=function(e,t){this.model.removeItem(e),this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Remove,t)])},e.prototype.updateShapeImage=function(e){if(e.imageUrl){var t=this.model.findShapesByImageUrl(e.imageUrl);t.forEach((function(t){e.base64?t.image.loadBase64Content(e.base64):t.image.setUnableToLoadFlag()})),this.commitItemsChangesCore(d.ItemChangeType.UpdateStructure,t)}},e.prototype.updateShapeDescription=function(e){var t=this.model.findShapesByDescription(e);this.commitItemsChangesCore(d.ItemChangeType.UpdateProperties,t)},e.prototype.addConnector=function(e,t){if(e.beginItem||e.endItem)throw Error("Creating connector should not contain begin/end items");return e.key=void 0!==t?t:this.model.getNextKey(),this.insertConnector(e)},e.prototype.insertConnector=function(e){this.model.pushItem(e);var t=this.routingModel.createStrategy(e.properties.lineOption);t?e.changeRoutingStrategy(t):e.clearRoutingStrategy();var n=this.permissionsProvider.canAddItems([e]);return this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Create,n)]),e},e.prototype.deleteConnector=function(e){if(e.beginItem||e.endItem)throw Error("Creating connector should not contain begin/end items");this.removeConnector(e)},e.prototype.removeConnector=function(e){this.model.removeItem(e);var t=this.permissionsProvider.canDeleteItems([e]);this.raiseModelChanged([new d.ItemChange(e,d.ItemChangeType.Remove,t)])},e.prototype.addDeleteConnectorPoint=function(e,t){var n=this.getConnectorInteractingPoints(e);t(e),this.addDeleteConnectorPointCore(e,n)},e.prototype.moveConnectorPoint=function(e,t,n){n(e),this.moveConnectorPointCore(e,t)},e.prototype.changeConnectorPoints=function(e,t){var n=this;t(e),e.points.forEach((function(t,i){return n.moveConnectorPointCore(e,i)}))},e.prototype.moveConnectorPointCore=function(e,t){var n=this.getInteractingItem(e),i=this.permissionsProvider.isStoredPermissionsGranted();if(n){var o=01)){var t=e.source.key;void 0===t?this.selection.clear():this.selection.hasKey(t)?this.selection.remove(t):this.selection.add(t)}},e.prototype.onShortcut=function(e){return this.state.onShortcut(e)},e.prototype.onWheel=function(e){return this.state.onMouseWheel(e)},e.prototype.onDragStart=function(e){this.state.onDragStart(e)},e.prototype.onDragEnd=function(e){this.state.onDragEnd(e)},e.prototype.onKeyDown=function(e){this.state.onKeyDown(e)},e.prototype.onKeyUp=function(e){this.state.onKeyUp(e)},e.prototype.showContextToolbox=function(e,t,n,i,o,r){this.contextToolboxHandler.showContextToolbox(e,t,n,i,o,r)},e.prototype.hideContextToolbox=function(e){this.contextToolboxHandler.hideContextToolbox(e)},e.prototype.canScrollPage=function(e){return this.startScrollingPageByCtrl?!!this.hasCtrlModifier(e.modifiers)&&(!this.copyDiagramItemsByCtrlAndShift||e.source.type!==o.MouseEventElementType.Shape&&e.source.type!==o.MouseEventElementType.Connector):this.allowScrollPage&&this.shouldScrollPage},e.prototype.canMultipleSelection=function(e){return this.allowMultipleSelection&&this.hasCtrlOrShiftModifier(e.modifiers)},e.prototype.canCopySelectedItems=function(e){return!!this.allowCopyDiagramItems&&(this.copyDiagramItemsByCtrlAndShift?this.hasCtrlAndShiftModifier(e.modifiers):this.hasAltModifier(e.modifiers))},e.prototype.canCalculateFixedPosition=function(e){return!(!this.allowFixedDrag||!this.hasShiftModifier(e.modifiers))&&(!this.copyDiagramItemsByCtrlAndShift||!this.hasCtrlModifier(e.modifiers))},e.prototype.canStartZoomOnWheel=function(e){return this.allowZoomOnWheel&&this.hasCtrlModifier(e.modifiers)},e.prototype.canFinishZoomOnWheel=function(e){return this.allowZoomOnWheel&&!this.hasCtrlModifier(e.modifiers)},e.prototype.onStartScrollPageByKeyboard=function(e){this.canStartScrollingPageByKeyboard(e)&&(this.raiseDragScrollStart(),this.shouldScrollPage=!0)},e.prototype.onFinishScrollPageByKeyboard=function(e){this.canEndScrollingPageByKeyboard(e)&&this.finishScrollingPage()},e.prototype.onFinishScrollPageByMouse=function(e){this.canEndScrollingPage(e)&&this.finishScrollingPage()},e.prototype.finishScrollingPage=function(){this.shouldScrollPage=!1,this.raiseDragScrollEnd(),this.switchToDefaultState()},e.prototype.hasCtrlOrShiftModifier=function(e){return this.hasCtrlModifier(e)||this.hasShiftModifier(e)},e.prototype.hasCtrlAndShiftModifier=function(e){return this.hasCtrlModifier(e)&&this.hasShiftModifier(e)},e.prototype.hasCtrlModifier=function(e){return(e&c.ModifierKey.Ctrl)>0},e.prototype.hasAltModifier=function(e){return(e&c.ModifierKey.Alt)>0},e.prototype.hasShiftModifier=function(e){return(e&c.ModifierKey.Shift)>0},e.prototype.canStartScrollingPageByKeyboard=function(e){return!this.startScrollingPageByCtrl&&!this.shouldScrollPage&&e.keyCode===c.KeyCode.Space},e.prototype.canEndScrollingPageByKeyboard=function(e){return!this.startScrollingPageByCtrl&&e.keyCode===c.KeyCode.Space},e.prototype.canEndScrollingPage=function(e){return!this.startScrollingPageByCtrl||this.hasCtrlModifier(e.modifiers)},e.prototype.getSnappedPointOnDragDiagramItem=function(e,t,n,i,o){var a=this.getSnapToCellOnDragDiagramItem(e);return new r.Point(this.getSnappedPos(this.getFixedXPosition(e,t,n,o),!0,a),this.getSnappedPos(this.getFixedYPosition(e,t,i,o),!1,a))},e.prototype.getSnappedPointOnDragPoint=function(e,t,n){var i=this.getSnapToCellOnDragPoint(e),o=this.getSnappedPos(t.x,!0,i),a=this.getSnappedPos(t.y,!1,i);return void 0===n||Math.pow(t.x-o,2)+Math.pow(t.y-a,2)1&&e===o.MouseButton.Left&&this.selection.remove(t)},e.prototype.changeSingleSelection=function(e){this.selection.hasKey(e)||this.selection.set([e])},e.prototype.notifySelectionChanged=function(e){this.pressedDiagramItemKey&&!this.selection.hasKey(this.pressedDiagramItemKey)&&(this.pressedDiagramItemKey=void 0,this.pressedDiagramItemInSelection=!1)},e.prototype.raiseDragStart=function(e){this.eventManager.onDocumentDragStart(e)},e.prototype.raiseDragEnd=function(e){this.eventManager.onDocumentDragEnd(e)},e.prototype.raiseDragScrollStart=function(){this.eventManager.onDocumentDragScrollStart()},e.prototype.raiseDragScrollEnd=function(){this.eventManager.onDocumentDragScrollEnd()},e.prototype.raiseClick=function(e){this.eventManager.onDocumentClick(e)},e.prototype.beginStorePermissions=function(){this.permissionsProvider.beginStorePermissions()},e.prototype.endStorePermissions=function(){this.permissionsProvider.endStorePermissions()},e.prototype.isStoredPermissionsGranted=function(){return this.permissionsProvider.isStoredPermissionsGranted()},e.prototype.lockPermissions=function(){this.permissionsProvider.lockPermissions()},e.prototype.unlockPermissions=function(){this.permissionsProvider.unlockPermissions()},e.prototype.canPerformChangeConnection=function(e,t){var n=!0;return e?n=this.permissionsProvider.canChangeConnection(e,t.item,t.oldItem,t.position,t.connectionPointIndex):t.item&&(n=this.permissionsProvider.canChangeConnection(void 0,t.item,t.oldItem,t.position,t.connectionPointIndex)),n},e.prototype.canPerformChangeConnectionOnUpdateUI=function(e,t){this.permissionsProvider.beginUpdateUI();var n=this.canPerformChangeConnection(e,t);return this.permissionsProvider.endUpdateUI(),n},e.prototype.canFinishTextEditing=function(){return this.eventManager.canFinishTextEditing()},e.prototype.restartState=function(){this.state&&!this.finishStateLock&&(this.finishStateLock++,this.state.finish(),this.finishStateLock--),this.state.start()},e.prototype.switchToDefaultState=function(){this.switchState(this.defaultState)},e.prototype.switchState=function(e){this.newState=e,this.state&&!this.finishStateLock&&(this.finishStateLock++,this.state.finish(),this.finishStateLock--),this.newState&&(this.state=this.newState,this.state.start(),this.newState=void 0)},e.prototype.addInteractingItem=function(e,t){this.permissionsProvider.addInteractingItem(e,t)},e.prototype.clearInteractingItems=function(){this.permissionsProvider.clearInteractingItems()},e.prototype.notifyReadOnlyChanged=function(e){this.readOnly=e,this.initializeDefaultState()},e.prototype.notifySelectionRectShow=function(e){},e.prototype.notifySelectionRectHide=function(){},e.prototype.notifyResizeInfoShow=function(e,t){},e.prototype.notifyResizeInfoHide=function(){},e.prototype.notifyConnectionPointsShow=function(e,t,n,i){this.state.onConnectionPointsShow(e,t)},e.prototype.notifyConnectionPointsHide=function(){},e.prototype.notifyConnectionTargetShow=function(e,t){this.state.onConnectionTargetShow(e,t)},e.prototype.notifyConnectionTargetHide=function(){},e.prototype.notifyContainerTargetShow=function(e,t){},e.prototype.notifyContainerTargetHide=function(){},e.prototype.notifyExtensionLinesShow=function(e){},e.prototype.notifyExtensionLinesHide=function(){},e}();t.MouseHandler=h},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerMoveConnectorPointState=void 0;var r=n(0),a=n(148),s=n(6),l=n(4),u=n(32),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.onMouseDown=function(t){this.connector=this.model.findConnector(t.source.key),this.pointIndex=parseInt(t.source.value),0===this.pointIndex?this.pointPosition=s.ConnectorPosition.Begin:this.pointIndex===this.connector.points.length-1&&(this.pointPosition=s.ConnectorPosition.End),this.handler.addInteractingItem(this.connector),e.prototype.onMouseDown.call(this,t)},t.prototype.onApplyChanges=function(t){this.connector.properties.lineOption===u.ConnectorLineOption.Orthogonal&&0!==this.pointIndex&&this.pointIndex!==this.connector.points.length-1||e.prototype.onApplyChanges.call(this,t)},t.prototype.onFinishWithChanges=function(){e.prototype.onFinishWithChanges.call(this),l.ModelUtils.deleteConnectorUnnecessaryPoints(this.history,this.connector),this.handler.tryUpdateModelSize()},t.prototype.getSnappedPoint=function(e,t){var n=this.connector.points,i=this.pointIndex;if(00?Math.min(n.height+1,f):f,p=!this.sideH&&p>0?Math.min(n.width+1,p):p,this.lockH||this.lockV||!l?(p=this.lockH?0:p,f=this.lockV?0:f,u=this.getNormalizedSize(this.sideH?n.width+p:n.width-p,i,a),c=this.getNormalizedSize(this.sideV?n.height+f:n.height-f,o,s)):Math.abs(p)>Math.abs(f)?(u=this.getNormalizedSize(this.sideH?n.width+p:n.width-p,i,a),c=n.height*(u/n.width)):(c=this.getNormalizedSize(this.sideV?n.height+f:n.height-f,o,s),u=n.width*(c/n.height)),this.lockH||(u=this.getSnappedPosition(e,t.x+u,!0)-t.x),this.lockV||(c=this.getSnappedPosition(e,t.y+c,!1)-t.y),new r.Size(u,c)},t.prototype.getPosition=function(e,t,n,i){var o=i.x,r=i.y;if(this.resizeEventSource===s.ResizeEventSource.ResizeBox_N||this.resizeEventSource===s.ResizeEventSource.ResizeBox_NE||this.resizeEventSource===s.ResizeEventSource.ResizeBox_NW){r+=n.height-t.height;var l=this.getSnappedPosition(e,r,!1);t.height+=r-l,r=l}if(this.resizeEventSource===s.ResizeEventSource.ResizeBox_W||this.resizeEventSource===s.ResizeEventSource.ResizeBox_NW||this.resizeEventSource===s.ResizeEventSource.ResizeBox_SW){o+=n.width-t.width;var u=this.getSnappedPosition(e,o,!0);t.width+=o-u,o=u}return new a.Point(o,r)},t.prototype.getSnappedPosition=function(e,t,n){return this.handler.getSnappedPositionOnResizeShape(e,t,n)},t}(l.MouseHandlerDraggingState);t.MouseHandlerResizeShapeState=h},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerMoveConnectorSideState=void 0;var r=n(34),a=n(4),s=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.model=i,o}return o(t,e),t.prototype.onMouseDown=function(t){this.startPoint=t.modelPoint,this.connectorKey=t.source.key,this.pointIndex=parseInt(t.source.value)+1,e.prototype.onMouseDown.call(this,t)},t.prototype.onApplyChanges=function(e){var t=this.getSnappedPoint(e,e.modelPoint),n=this.model.findConnector(this.connectorKey);this.pointCreated?a.ModelUtils.moveConnectorPoint(this.history,n,this.pointIndex,t):(this.handler.addInteractingItem(n),a.ModelUtils.addConnectorPoint(this.history,this.connectorKey,this.pointIndex,t.clone()),this.pointCreated=!0),this.handler.tryUpdateModelSize()},t.prototype.onFinishWithChanges=function(){var e=this.model.findConnector(this.connectorKey);a.ModelUtils.deleteConnectorUnnecessaryPoints(this.history,e),a.ModelUtils.fixConnectorBeginEndConnectionIndex(this.history,e),this.handler.tryUpdateModelSize()},t.prototype.getDraggingElementKeys=function(){return[this.connectorKey]},t}(r.MouseHandlerDraggingState);t.MouseHandlerMoveConnectorSideState=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerDragParameterPointState=void 0;var r=n(34),a=n(112),s=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.model=i,o.startScrollLeft=0,o.startScrollTop=0,o}return o(t,e),t.prototype.onMouseDown=function(t){this.startPoint=t.modelPoint,this.shape=this.model.findShape(t.source.key),this.parameterPointKey=t.source.value,this.startParameters=this.shape.parameters.clone(),e.prototype.onMouseDown.call(this,t)},t.prototype.onApplyChanges=function(e){var t=this.handler.getSnappedOffsetOnDragPoint(e,this.startPoint),n=this.startParameters.clone();this.shape.description.modifyParameters(this.shape,n,t.x,t.y),this.history.addAndRedo(new a.ChangeShapeParametersHistoryItem(this.shape.key,n))},t.prototype.getDraggingElementKeys=function(){return[this.shape.key]},t}(r.MouseHandlerDraggingState);t.MouseHandlerDragParameterPointState=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerCreateConnectorState=void 0;var r=n(6),a=n(48),s=n(66),l=n(9),u=n(148),c=n(68),d=n(53),h=n(4),p=n(67),f=n(113),m=function(e){function t(t,n,i,o,r,a,s){var l=e.call(this,t,n,i,o)||this;return l.shapeDescriptionManager=r,l.selection=a,l.connectionPointIndex=s,l}return o(t,e),t.prototype.onMouseDown=function(t){void 0===this.connectionPointIndex&&(this.connectionPointIndex=parseInt(t.source.value)),this.connectedItem=this.model.findItem(t.source.key),this.pointIndex=1,this.pointPosition=r.ConnectorPosition.End,e.prototype.onMouseDown.call(this,t)},t.prototype.onMouseUp=function(t){this.connector&&!this.connector.endItem&&this.createNewShapeAtConnectorEnd(t),e.prototype.onMouseUp.call(this,t)},t.prototype.onApplyChanges=function(t){var n=this.getSnappedPoint(t,t.modelPoint);if(this.connector)e.prototype.onApplyChanges.call(this,t);else{var i=new s.AddConnectorHistoryItem([this.connectedItem.getConnectionPointPosition(this.connectionPointIndex,n),n]);this.history.addAndRedo(i),this.connector=this.model.findConnector(i.connectorKey),this.handler.addInteractingItem(this.connector),this.history.addAndRedo(new a.AddConnectionHistoryItem(this.connector,this.connectedItem,this.connectionPointIndex,r.ConnectorPosition.Begin)),h.ModelUtils.updateNewConnectorProperties(this.history,this.selection,this.connector.key)}},t.prototype.checkStoredPermissionsOnFinish=function(){this.connector&&this.connector.endItem&&e.prototype.checkStoredPermissionsOnFinish.call(this)},t.prototype.onFinishWithChanges=function(){e.prototype.onFinishWithChanges.call(this),this.history.addAndRedo(new c.SetSelectionHistoryItem(this.selection,[this.connector.key]))},t.prototype.createNewShapeAtConnectorEnd=function(e){var t=this,n=this.connector&&this.connector.beginItem;if(n)if(!this.connector||this.handler.canPerformChangeConnection(this.connector,{position:r.ConnectorPosition.End,connectionPointIndex:-1})){var i=this.getNewShapeSide(this.connector),o=this.getSnappedPoint(e,e.modelPoint),s=this.shapeDescriptionManager.getCategoryByDescription(n.description);this.handler.showContextToolbox(o,(function(n){var r=n.clone();r.position=o.clone();var a=t.getNewShapePosition(r,i);return t.handler.getSnappedPointOnDragPoint(e,a)}),i,s,(function(n){if(n){t.handler.beginStorePermissions(),t.history.beginTransaction();var s=new d.AddShapeHistoryItem(t.shapeDescriptionManager.get(n),o);t.history.addAndRedo(s);var l=t.model.findShape(s.shapeKey),u=t.targetItem&&t.model.findNearestContainer(t.targetItem.key);u&&h.ModelUtils.insertToContainer(t.history,t.model,l,u);var p=t.getNewShapePosition(l,i);h.ModelUtils.setShapePosition(t.history,t.model,l,t.getSnappedPoint(e,p)),h.ModelUtils.updateNewShapeProperties(t.history,t.selection,l.key),t.history.addAndRedo(new a.AddConnectionHistoryItem(t.connector,l,l.getConnectionPointIndexForSide(i),r.ConnectorPosition.End)),u&&h.ModelUtils.updateConnectorContainer(t.history,t.model,t.connector),h.ModelUtils.updateShapeAttachedConnectors(t.history,t.model,l),t.handler.isStoredPermissionsGranted()?(t.handler.tryUpdateModelSize(),t.history.addAndRedo(new c.SetSelectionHistoryItem(t.selection,[l.key]))):(t.handler.lockPermissions(),t.history.undoTransaction(),t.handler.unlockPermissions(),t.checkNewConnectorPermissions()),t.history.endTransaction(),t.handler.endStorePermissions(),t.handler.hideContextToolbox(!0)}}),(function(){t.checkNewConnectorPermissions()}))}else this.cancelChanges()},t.prototype.checkNewConnectorPermissions=function(){this.connector&&!this.handler.canPerformChangeConnection(this.connector,{position:r.ConnectorPosition.End,connectionPointIndex:-1})&&(this.handler.lockPermissions(),this.history.beginTransaction(),this.history.addAndRedo(new c.SetSelectionHistoryItem(this.selection,[])),this.connector.beginItem&&this.history.addAndRedo(new p.DeleteConnectionHistoryItem(this.connector,r.ConnectorPosition.Begin)),this.connector.endItem&&this.history.addAndRedo(new p.DeleteConnectionHistoryItem(this.connector,r.ConnectorPosition.End)),this.history.addAndRedo(new f.DeleteConnectorHistoryItem(this.connector.key)),this.history.endTransaction(),this.handler.unlockPermissions())},t.prototype.getNewShapePosition=function(e,t){switch(t){case l.ConnectionPointSide.North:return e.position.clone().offset(-e.size.width/2,0);case l.ConnectionPointSide.South:return e.position.clone().offset(-e.size.width/2,-e.size.height);case l.ConnectionPointSide.East:return e.position.clone().offset(-e.size.width,-e.size.height/2);case l.ConnectionPointSide.West:return e.position.clone().offset(0,-e.size.height/2)}},t.prototype.getNewShapeSide=function(e){var n=e.getRenderPoints();return t.getNewShapeSideByConnectorPoints(n[n.length-1],n[n.length-2])},t.prototype.getSourceItem=function(){return this.connectedItem},t.getNewShapeSideByConnectorPoints=function(e,t){return e.x===t.x?e.y>t.y?l.ConnectionPointSide.North:l.ConnectionPointSide.South:e.x>t.x?e.y===t.y?l.ConnectionPointSide.West:e.y>t.y?Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?l.ConnectionPointSide.West:l.ConnectionPointSide.North:Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?l.ConnectionPointSide.West:l.ConnectionPointSide.South:e.y===t.y?l.ConnectionPointSide.East:e.y>t.y?Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?l.ConnectionPointSide.East:l.ConnectionPointSide.North:Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?l.ConnectionPointSide.East:l.ConnectionPointSide.South},t}(u.MouseHandlerMoveConnectorPointStateBase);t.MouseHandlerCreateConnectorState=m},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerMoveConnectorOrthogonalSideState=void 0;var r=n(0),a=n(6),s=n(9),l=n(4),u=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.model=i,o}return o(t,e),t.prototype.onMouseDown=function(t){this.startPoint=t.modelPoint,this.connector=this.model.findConnector(t.source.key),this.handler.addInteractingItem(this.connector);var n=t.source.value.split("_"),i=parseInt(n[0]),o=parseInt(n[1]),r=this.connector.getRenderPoints(!0);this.renderPoint1=r[i].clone(),this.renderPoint2=r[o].clone(),this.isVerticalOrientation=this.renderPoint1.x===this.renderPoint2.x,-1!==this.renderPoint1.pointIndex?(this.pointIndex1=this.renderPoint1.pointIndex,0===this.pointIndex1?(this.pointIndex1++,this.correctEdgePoint(this.renderPoint1,this.renderPoint2,this.connector.beginItem,this.connector.beginConnectionPointIndex)):this.point1=this.connector.points[this.pointIndex1].clone()):this.pointIndex1=this.findPointIndex(r,i,!1)+1,-1!==this.renderPoint2.pointIndex?(this.pointIndex2=this.renderPoint2.pointIndex,this.pointIndex2===this.connector.points.length-1?this.correctEdgePoint(this.renderPoint2,this.renderPoint1,this.connector.endItem,this.connector.endConnectionPointIndex):this.point2=this.connector.points[this.pointIndex2].clone()):this.pointIndex2=this.findPointIndex(r,o,!0),e.prototype.onMouseDown.call(this,t)},t.prototype.onApplyChanges=function(e){var t=this;if(!this.pointCreated){var n=void 0,i=void 0;void 0===this.point1&&(this.point1=new r.Point(this.renderPoint1.x,this.renderPoint1.y),l.ModelUtils.addConnectorPoint(this.history,this.connector.key,this.pointIndex1,this.point1.clone()),n=this.point1.clone(),this.pointIndex2++),void 0===this.point2&&(this.point2=new r.Point(this.renderPoint2.x,this.renderPoint2.y),l.ModelUtils.addConnectorPoint(this.history,this.connector.key,this.pointIndex2,this.point2.clone()),i=this.point2.clone());var o=[];n&&o.push(n),i&&o.push(i);var a=this.createUnnecessaryPoints(this.connector,o);Object.keys(a).forEach((function(e){var n=parseInt(e);nt.y?e.y-=Math.min(o,e.y-t.y):e.y+=Math.min(o,t.y-e.y):e.x>t.x?e.x-=Math.min(o,e.x-t.x):e.x+=Math.min(o,t.x-e.x)},t.prototype.getDraggingElementKeys=function(){return[this.connector.key]},t}(n(34).MouseHandlerDraggingState);t.MouseHandlerMoveConnectorOrthogonalSideState=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerToolboxDraggingState=t.MouseHandlerBeforeToolboxDraggingState=void 0;var r=n(11),a=n(0),s=n(53),l=n(68),u=n(34),c=n(114),d=n(4),h=n(40),p=n(16),f=300,m=function(e){function t(t,n,i,o,r,a){var s=e.call(this,t)||this;return s.history=n,s.model=i,s.selection=o,s.visualizerManager=r,s.shapeDescriptionManager=a,s.isModelEmpty=0===i.items.length,s}return o(t,e),t.prototype.cancelChanges=function(){this.tryRemoveTimer()},t.prototype.onDragStart=function(e){this.dragging=e},t.prototype.onDragEnd=function(e){this.cancelChanges(),this.handler.switchToDefaultState()},t.prototype.onMouseMove=function(e){var t=this;e.source.type>r.MouseEventElementType.Background?(this.tryRemoveTimer(),this.switchToDraggingState(e,!1)):e.source.type!==r.MouseEventElementType.Background||this.isModelEmpty?void 0!==this.nonPageAreaTimer&&this.tryRemoveTimer():(this.savedEvt=e,void 0===this.nonPageAreaTimer&&(this.nonPageAreaTimer=setTimeout((function(){return t.switchToDraggingState(t.savedEvt,!0)}),500)))},t.prototype.switchToDraggingState=function(e,t){this.handler.switchState(new g(this.handler,this.history,this.model,this.selection,this.visualizerManager,this.shapeDescriptionManager,t)),this.handler.state.onDragStart(this.dragging),this.handler.state.onMouseMove(e)},t.prototype.tryRemoveTimer=function(){void 0!==this.nonPageAreaTimer&&(clearTimeout(this.nonPageAreaTimer),delete this.nonPageAreaTimer)},t.prototype.finish=function(){this.tryRemoveTimer()},t}(h.MouseHandlerCancellableState);t.MouseHandlerBeforeToolboxDraggingState=m;var g=function(e){function t(t,n,i,o,r,a,s){var l=e.call(this,t,n)||this;return l.model=i,l.selection=o,l.visualizerManager=r,l.shapeDescriptionManager=a,s||(l.updatePageSizeTimer=setTimeout((function(){l.processAndRemoveUpdatePageSizeTimer()}),f)),l}return o(t,e),t.prototype.cancelChanges=function(){this.tryRemoveUpdatePageSizeTimer(),e.prototype.cancelChanges.call(this)},t.prototype.tryRemoveUpdatePageSizeTimer=function(){void 0!==this.updatePageSizeTimer&&(clearTimeout(this.updatePageSizeTimer),delete this.updatePageSizeTimer)},t.prototype.processAndRemoveUpdatePageSizeTimer=function(){void 0!==this.updatePageSizeTimer&&(this.handler.tryUpdateModelSize(),delete this.updatePageSizeTimer)},t.prototype.onMouseMove=function(t){e.prototype.onMouseMove.call(this,t);var n=this.model.findShape(this.shapeKey);if(n){this.visualizerManager.setExtensionLines([n]);var i=d.ModelUtils.findContainerByEventKey(this.model,this.selection,t.source.key);i&&this.allowInsertToContainer(t,n,i)?this.visualizerManager.setContainerTarget(i,t.source.type):this.visualizerManager.resetContainerTarget()}},t.prototype.getDraggingElementKeys=function(){return void 0===this.shapeKey?[]:[this.shapeKey]},t.prototype.onApplyChanges=function(e){var t=this;if(e.source.type===r.MouseEventElementType.Undefined){if(this.dragging.onCaptured(!1),void 0!==this.shapeKey&&!this.deleteHistoryItem){var n=this.model.findShape(this.shapeKey);d.ModelUtils.detachConnectors(this.history,n),d.ModelUtils.removeFromContainer(this.history,this.model,n),this.deleteHistoryItem=new c.DeleteShapeHistoryItem(this.shapeKey,!0),this.history.addAndRedo(this.deleteHistoryItem)}}else{if(this.dragging.onCaptured(!0),void 0===this.shapeKey){this.startPoint=e.modelPoint,this.shapeKey=this.insertToolboxItem(e);var i=this.model.findShape(this.shapeKey);i&&this.handler.addInteractingItem(i,p.DiagramModelOperation.AddShape)}this.deleteHistoryItem&&(this.history.undoTransactionTo(this.deleteHistoryItem),delete this.deleteHistoryItem);var o=this.getPosition(e,this.startShapePosition);n=this.model.findShape(this.shapeKey),d.ModelUtils.setShapePosition(this.history,this.model,n,o),d.ModelUtils.updateMovingShapeConnections(this.history,n,this.connectorsWithoutBeginItemInfo,this.connectorsWithoutEndItemInfo,(function(){t.visualizerManager.resetConnectionTarget(),t.visualizerManager.resetConnectionPoints()}),(function(e,n){t.visualizerManager.setConnectionTarget(e,r.MouseEventElementType.Shape),t.visualizerManager.setConnectionPoints(e,r.MouseEventElementType.Shape,n,!0)}),(function(e){return t.handler.addInteractingItem(e)})),d.ModelUtils.updateShapeAttachedConnectors(this.history,this.model,n);var a=d.ModelUtils.findContainerByEventKey(this.model,this.selection,e.source.key);n&&a&&this.allowInsertToContainer(e,n,a)?d.ModelUtils.insertToContainer(this.history,this.model,n,a):d.ModelUtils.removeFromContainer(this.history,this.model,n),void 0===this.updatePageSizeTimer&&this.handler.tryUpdateModelSize((function(e,n){t.connectorsWithoutBeginItemInfo.forEach((function(t){t.point.x+=e,t.point.y+=n})),t.connectorsWithoutEndItemInfo.forEach((function(t){t.point.x+=e,t.point.y+=n}))}))}},t.prototype.onFinishWithChanges=function(){this.deleteHistoryItem||this.history.addAndRedo(new l.SetSelectionHistoryItem(this.selection,[this.shapeKey]))},t.prototype.onDragStart=function(e){this.dragging=e,this.connectorsWithoutBeginItemInfo=d.ModelUtils.getConnectorsWithoutBeginItemInfo(this.model),this.connectorsWithoutEndItemInfo=d.ModelUtils.getConnectorsWithoutEndItemInfo(this.model)},t.prototype.onDragEnd=function(e){void 0!==this.shapeKey&&e.source.type===r.MouseEventElementType.Undefined&&this.cancelChanges(),this.handler.switchToDefaultState()},t.prototype.finish=function(){this.visualizerManager.resetExtensionLines(),this.visualizerManager.resetContainerTarget(),this.visualizerManager.resetConnectionTarget(),this.visualizerManager.resetConnectionPoints(),this.processAndRemoveUpdatePageSizeTimer(),this.dragging.onFinishDragging(),e.prototype.finish.call(this)},t.prototype.insertToolboxItem=function(e){var t=this.shapeDescriptionManager.get(this.dragging.data);this.startShapePosition=this.getSnappedPoint(e,new a.Point(e.modelPoint.x-t.defaultSize.width/2,e.modelPoint.y-t.defaultSize.height/2));var n=new s.AddShapeHistoryItem(t,this.startShapePosition);return this.history.addAndRedo(n),d.ModelUtils.updateNewShapeProperties(this.history,this.selection,n.shapeKey),n.shapeKey},t.prototype.allowInsertToContainer=function(e,t,n){return!this.handler.canMultipleSelection(e)&&n&&n.expanded&&d.ModelUtils.canInsertToContainer(this.model,t,n)},t.prototype.getPosition=function(e,t){return this.getSnappedPoint(e,new a.Point(t.x+e.modelPoint.x-this.startPoint.x,t.y+e.modelPoint.y-this.startPoint.y))},t}(u.MouseHandlerDraggingState);t.MouseHandlerToolboxDraggingState=g},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerMoveConnectorTextState=void 0;var r=n(34),a=n(313),s=n(69),l=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.model=i,o}return o(t,e),t.prototype.onMouseDown=function(t){this.connector=this.model.findConnector(t.source.key),this.position=parseFloat(t.source.value),this.text=this.connector.getText(this.position),this.savedText="",e.prototype.onMouseDown.call(this,t)},t.prototype.onApplyChanges=function(e){var t=this.connector.getTextPositionByPoint(e.modelPoint);if(t!==this.position){var n=this.connector.getText(t);""!==n&&n!==this.text&&(this.history.addAndRedo(new s.ChangeConnectorTextHistoryItem(this.connector,t,"")),this.savedText=n),this.history.addAndRedo(new a.ChangeConnectorTextPositionHistoryItem(this.connector,this.position,t)),""!==this.savedText&&this.savedText!==n&&(this.history.addAndRedo(new s.ChangeConnectorTextHistoryItem(this.connector,this.position,this.savedText)),this.savedText=""),this.position=t}},t.prototype.getDraggingElementKeys=function(){return[this.connector.key]},t}(r.MouseHandlerDraggingState);t.MouseHandlerMoveConnectorTextState=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeConnectorTextPositionHistoryItem=void 0;var r=function(e){function t(t,n,i){var o=e.call(this)||this;return o.connectorKey=t.key,o.position=n,o.newPosition=i,o}return o(t,e),t.prototype.redo=function(e){var t=e.model.findConnector(this.connectorKey);e.changeConnectorTextPosition(t,this.position,this.newPosition)},t.prototype.undo=function(e){var t=e.model.findConnector(this.connectorKey);e.changeConnectorTextPosition(t,this.newPosition,this.position)},t}(n(8).HistoryItem);t.ChangeConnectorTextPositionHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerToggleShapeExpandedState=void 0;var r=n(40),a=n(315),s=n(4),l=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.history=n,r.model=i,r.selection=o,r}return o(t,e),t.prototype.onMouseUp=function(e){var t=this.model.findShape(e.source.key);t&&!t.isLocked&&(this.history.beginTransaction(),this.history.addAndRedo(new a.ToggleShapeExpandedHistoryItem(t)),s.ModelUtils.updateShapeAttachedConnectors(this.history,this.model,t),s.ModelUtils.updateContainerConnectorsAttachedPoints(this.history,this.model,t),s.ModelUtils.updateSelection(this.history,this.selection),this.handler.tryUpdateModelSize(),this.history.endTransaction(),this.handler.raiseClick([t.key])),this.handler.switchToDefaultState()},t}(r.MouseHandlerStateBase);t.MouseHandlerToggleShapeExpandedState=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleShapeExpandedHistoryItem=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.shapeKey=t.key,n.expanded=t.expanded,n}return o(t,e),t.prototype.redo=function(e){var t=e.model.findShape(this.shapeKey);e.changeShapeExpanded(t,!this.expanded)},t.prototype.undo=function(e){var t=e.model.findShape(this.shapeKey);e.changeShapeExpanded(t,this.expanded)},t}(n(8).HistoryItem);t.ToggleShapeExpandedHistoryItem=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerSelectionState=void 0;var r=n(11),a=n(13),s=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.selection=n,o.visualizerManager=i,o}return o(t,e),t.prototype.finish=function(){this.handler.raiseDragEnd([]),this.visualizerManager.resetSelectionRectangle(),e.prototype.finish.call(this)},t.prototype.cancelChanges=function(){},t.prototype.onMouseDown=function(e){this.startPoint=e.modelPoint,this.handler.raiseDragStart([])},t.prototype.onMouseMove=function(e){e.button!==r.MouseButton.Left?this.handler.switchToDefaultState():(this.rectangle=a.Rectangle.fromPoints(this.startPoint,e.modelPoint),this.visualizerManager.setSelectionRectangle(this.rectangle))},t.prototype.onMouseUp=function(e){void 0!==this.rectangle?this.selection.selectRect(this.rectangle):this.selection.set([]),this.rectangle=void 0,this.handler.switchToDefaultState()},t}(n(40).MouseHandlerCancellableState);t.MouseHandlerSelectionState=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerZoomOnWheelState=void 0;var r=n(40),a=n(11),s=n(28),l=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.settings=n,o.view=i,o}return o(t,e),t.prototype.onMouseWheel=function(e){return this.trySwitchToDefault(e)?this.handler.state.onMouseWheel(e):(this.settings.zoomLevel=this.view.getNextStepZoom(e.deltaY<0),e.source.type===a.MouseEventElementType.Background?this.view.resetScroll():(this.view.scrollTo(e.modelPoint,e.offsetPoint),this.view.normalize()),e.preventDefault=!0,!0)},t.prototype.onMouseUp=function(e){this.handler.switchToDefaultState(),this.handler.state.onMouseUp(e)},t.prototype.onMouseDown=function(e){this.handler.switchToDefaultState(),this.handler.state.onMouseDown(e)},t.prototype.onMouseMove=function(e){this.trySwitchToDefault(e)&&this.handler.state.onMouseMove(e)},t.prototype.trySwitchToDefault=function(e){return!!this.handler.canFinishZoomOnWheel(e)&&(this.handler.switchToDefaultState(),!0)},t.prototype.start=function(){e.prototype.start.call(this),this.settings.zoomLevel=this.view.getZoom(),this.settings.autoZoom=s.AutoZoomMode.Disabled},t}(r.MouseHandlerStateBase);t.MouseHandlerZoomOnWheelState=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerZoomOnPinchState=void 0;var r=n(28),a=n(0),s=n(150),l=n(35),u=function(e){function t(t,n,i,o){var r=e.call(this,t,o,n)||this;return r.selection=n,r.settings=i,r.view=o,r}return o(t,e),t.prototype.onMouseDown=function(t){e.prototype.onMouseDown.call(this,t),t.touches.length>1&&(this.startDistance=this.getTouchDistance(t),this.startZoomLevel=this.settings.zoomLevel,this.prevDistance=this.startDistance)},t.prototype.onMouseMove=function(t){if(t.touches.length>1){var n=this.getTouchDistance(t);Math.abs(this.prevDistance-n)>1&&(this.settings.zoomLevel=this.startZoomLevel*(n/this.startDistance),this.view.scrollTo(this.getMiddleLayoutPoint(t),this.getMiddleAbsPoint(t)),this.view.normalize(),this.prevDistance=n)}e.prototype.onMouseMove.call(this,t)},t.prototype.onMouseUp=function(e){0===e.touches.length&&setTimeout(function(){this.handler.switchToDefaultState()}.bind(this),1)},t.prototype.start=function(){e.prototype.start.call(this),this.settings.zoomLevel=this.view.getZoom(),this.settings.autoZoom=r.AutoZoomMode.Disabled},t.prototype.getTouchDistance=function(e){var t=new a.Point(e.touches[0].offsetPoint.x,e.touches[0].offsetPoint.y),n=new a.Point(e.touches[1].offsetPoint.x,e.touches[1].offsetPoint.y);return l.Metrics.euclideanDistance(t,n)},t.prototype.getPointByEvent=function(e){return this.getMiddleAbsPoint(e)},t.prototype.getMiddleAbsPoint=function(e){return e.touches.length>1?t.getMiddlePointByEvent(e,(function(e){return e.offsetPoint})):e.offsetPoint},t.prototype.getMiddleLayoutPoint=function(e){return e.touches.length>1?t.getMiddlePointByEvent(e,(function(e){return e.modelPoint})):e.modelPoint},t.getMiddlePointByEvent=function(e,t){if(e.touches.length>1)return new a.Point((t(e.touches[0]).x+t(e.touches[1]).x)/2,(t(e.touches[0]).y+t(e.touches[1]).y)/2)},t}(s.MouseHandlerScrollingState);t.MouseHandlerZoomOnPinchState=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerMoveShapeState=void 0;var r=function(e){function t(t,n,i,o,r){var a=e.call(this,t,n,i,o,r)||this;return a.model=i,a.selection=o,a.visualizerManager=r,a}return o(t,e),Object.defineProperty(t.prototype,"areValidDraggingShapes",{get:function(){return this.shouldClone||this.draggingShapes.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areValidDraggingConnectors",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(n(151).MouseHandlerDragDiagramItemStateBase);t.MouseHandlerMoveShapeState=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerMoveConnectorState=void 0;var r=n(4),a=function(e){function t(t,n,i,o,r){var a=e.call(this,t,n,i,o,r)||this;return a.model=i,a.selection=o,a.visualizerManager=r,a}return o(t,e),Object.defineProperty(t.prototype,"areValidDraggingShapes",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areValidDraggingConnectors",{get:function(){var e=this;return this.shouldClone?this.draggingShapes.length>0||this.draggingConnectors.length>0:!!this.draggingConnectors.length&&(this.draggingShapes.length?r.ModelUtils.canMoveConnector(this.selectedItems,this.draggingConnectors[this.draggingConnectorsIndexByKey[this.handler.mouseDownEvent.source.key]].connector):!this.draggingConnectors.some((function(t){return!r.ModelUtils.canMoveConnector(e.selectedItems,t.connector)})))},enumerable:!1,configurable:!0}),t}(n(151).MouseHandlerDragDiagramItemStateBase);t.MouseHandlerMoveConnectorState=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerDefaultReadOnlyTouchState=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.canDragObjectOnMouseDown=function(e){return!1},t.prototype.canExpandContainerOnMouseDown=function(e){return!1},t.prototype.canClearSelectionOnMouseDown=function(){return!0},t.prototype.canSelectOnMouseUp=function(e){return!this.inSelection(e)},t.prototype.canClearSelectionOnMouseUp=function(){return!1},t}(n(152).MouseHandlerDefaultReadOnlyState);t.MouseHandlerDefaultReadOnlyTouchState=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MouseHandlerDefaultTouchState=void 0;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.updateConnectionsOnMouseMove=function(e){},t.prototype.canDragObjectOnMouseDown=function(e){return this.inSelection(e)},t.prototype.canExpandContainerOnMouseDown=function(e){return!0},t.prototype.canClearSelectionOnMouseDown=function(){return!0},t.prototype.canSelectOnMouseUp=function(e){return!this.inSelection(e)},t.prototype.canClearSelectionOnMouseUp=function(){return!1},t}(n(147).MouseHandlerDefaultState);t.MouseHandlerDefaultTouchState=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextInputHandler=void 0;var i=n(153),o=n(11),r=n(25),a=n(14),s=n(6),l=n(69),u=function(){function e(e){this.control=e}return e.prototype.startTextInput=function(e,t){if(!e.isLocked&&e.enableText&&e.allowEditText&&!this.control.settings.readOnly&&this.canFinishTextEditing()){this.control.beginUpdate(),this.textInputItem=e;var n=!0;if(this.textInputItem instanceof a.Shape){var i=this.textInputItem.textEditRectangle;(n=this.control.permissionsProvider.canChangeShapeText(this.textInputItem))&&this.control.eventManager.raiseTextInputStart(this.textInputItem,this.textInputItem.text,i.createPosition(),i.createSize())}else this.textInputItem instanceof s.Connector&&(this.textInputPosition=t,(n=this.control.permissionsProvider.canChangeConnectorText(this.textInputItem,this.textInputPosition))&&this.control.eventManager.raiseTextInputStart(this.textInputItem,this.textInputItem.getText(this.textInputPosition),this.textInputItem.getTextPoint(this.textInputPosition)));n||(delete this.textInputItem,this.control.endUpdate())}},e.prototype.endTextInput=function(e){var t=this.textInputItem;delete this.textInputItem,this.control.eventManager.raiseTextInputEnd(t,e),this.control.endUpdate(),this.control.barManager.updateItemsState()},e.prototype.raiseTextInputPermissionsCheck=function(e){this.control.eventManager.raiseTextInputPermissionsCheck(this.textInputItem,e)},e.prototype.applyTextInput=function(e,t){if(this.canFinishTextEditing(e)){var n=this.textInputItem,o=this.textInputPosition;this.endTextInput(t),n instanceof a.Shape?n.text!==e&&this.control.history.addAndRedo(new i.ChangeShapeTextHistoryItem(n,e)):n instanceof s.Connector&&n.getText(o)!==e&&this.control.history.addAndRedo(new l.ChangeConnectorTextHistoryItem(n,o,e))}},e.prototype.canFinishTextEditing=function(e){var t=!0;if(this.isTextInputActive()){var n=e||this.getTextInputElementValue();this.textInputItem instanceof a.Shape?t=this.control.permissionsProvider.canApplyShapeTextChange(this.textInputItem,n):this.textInputItem instanceof s.Connector&&(t=this.control.permissionsProvider.canApplyConnectorTextChange(this.textInputItem,this.textInputPosition,n)),this.raiseTextInputPermissionsCheck(t)}return t},e.prototype.getTextInputElementValue=function(){return this.control.render?this.control.render.input.getTextInputElementValue():""},e.prototype.cancelTextInput=function(){this.raiseTextInputPermissionsCheck(!0),this.endTextInput(!0)},e.prototype.isTextInputActive=function(){return void 0!==this.textInputItem},e.prototype.processDblClick=function(e){if(e.source.type===o.MouseEventElementType.Shape){var t=this.control.model.findShape(e.source.key);this.startTextInput(t)}else if(e.source.type===o.MouseEventElementType.Connector){var n=(i=this.control.model.findConnector(e.source.key)).getTextPositionByPoint(e.modelPoint);this.startTextInput(i,n)}else if(e.source.type===o.MouseEventElementType.ConnectorText){var i=this.control.model.findConnector(e.source.key);n=parseFloat(e.source.value),this.startTextInput(i,n)}},e.prototype.onDblClick=function(e){var t=this;setTimeout((function(){t.processDblClick(e)}),10)},e.prototype.onKeyDown=function(e){this.isTextInputActive()&&(13===e.keyCode&&this.hasCtrlModifier(e.modifiers)&&(e.preventDefault=!0,this.applyTextInput(e.inputText,!0)),27===e.keyCode&&this.cancelTextInput())},e.prototype.onBlur=function(e){this.isTextInputActive()&&this.applyTextInput(e.inputText)},e.prototype.onFocus=function(e){},e.prototype.hasCtrlModifier=function(e){return(e&r.ModifierKey.Ctrl)>0},e}();t.TextInputHandler=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuTouchHandler=void 0;var r=n(11),a=n(154),s=n(4),l=function(e){function t(t){var n=e.call(this)||this;return n.selection=t,n.contextToolboxVisible=!1,n.selection.onChanged.add(n),n}return o(t,e),t.prototype.onMouseDown=function(e){void 0===e.source.key&&this.hideContextMenu()},t.prototype.onMouseUp=function(e){},t.prototype.onFocus=function(e){var t=this;setTimeout((function(){t.showContextMenuAtSelection()}),1)},t.prototype.onBlur=function(e){var t=this;setTimeout((function(){t.hideContextMenu()}),1)},t.prototype.onTextInputFocus=function(e){var t=this;setTimeout((function(){t.hideContextMenu()}),1)},t.prototype.onTextInputBlur=function(e){var t=this;setTimeout((function(){t.showContextMenuAtSelection()}),1)},t.prototype.onLongTouch=function(e){e.source.type===r.MouseEventElementType.Document&&this.showContextMenuAtEmptySelection(e.modelPoint)},t.prototype.onKeyDown=function(e){},t.prototype.onShortcut=function(e){},t.prototype.getSelectedItems=function(){return this.selection.getSelectedItems(!0)},t.prototype.showContextMenuAtSelection=function(){if(!this.contextToolboxVisible){var e=this.getSelectedItems();0!==e.length&&this.showContextMenu(void 0,s.ModelUtils.createRectangle(e).createPosition())}},t.prototype.showContextMenuAtEmptySelection=function(e){this.contextToolboxVisible||0===this.getSelectedItems().length&&this.showContextMenu(void 0,e)},t.prototype.notifyDragStart=function(e){this.hideContextMenu()},t.prototype.notifyDragEnd=function(e){this.showContextMenuAtSelection()},t.prototype.notifySelectionChanged=function(e){this.isUpdateLocked()?this.registerOccurredEvent(1):this.raiseSelectionChanged()},t.prototype.raiseSelectionChanged=function(){0!==this.getSelectedItems().length?this.showContextMenuAtSelection():this.hideContextMenu()},t.prototype.onUpdateUnlocked=function(e){1&e&&this.raiseSelectionChanged()},t.prototype.notifyShowContextToolbox=function(e,t,n,i,o){this.contextToolboxVisible=!0,this.hideContextMenu()},t.prototype.notifyHideContextToolbox=function(){this.contextToolboxVisible=!1,this.showContextMenuAtSelection()},t}(a.ContextMenuHandler);t.ContextMenuTouchHandler=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionTargetVisualizer=t.ConnectionTargetInfo=void 0;var r=n(156),a=function(){return function(e,t){this.rect=e,this.strokeWidth=t,this.allowed=!0}}();t.ConnectionTargetInfo=a;var s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.raiseShow=function(){var e=this,t=new a(this.targetRect,this.targetStrokeWidth);this.dispatcher.raise1((function(n){return n.notifyConnectionTargetShow(e.key,t)}))},t.prototype.raiseHide=function(){this.dispatcher.raise1((function(e){return e.notifyConnectionTargetHide()}))},t}(r.TargetVisualizerBase);t.ConnectionTargetVisualizer=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerTargetVisualizer=t.ContainerTargetInfo=void 0;var r=n(156),a=function(){return function(e,t){this.rect=e,this.strokeWidth=t}}();t.ContainerTargetInfo=a;var s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.raiseShow=function(){var e=this,t=new a(this.targetRect,this.targetStrokeWidth);this.dispatcher.raise1((function(n){return n.notifyContainerTargetShow(e.key,t)}))},t.prototype.raiseHide=function(){this.dispatcher.raise1((function(e){return e.notifyContainerTargetHide()}))},t}(r.TargetVisualizerBase);t.ContainerTargetVisualizer=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionPointsVisualizer=t.ConnectionPointInfo=void 0;var i=function(){return function(e,t){this.point=e,this.side=t,this.allowed=!0}}();t.ConnectionPointInfo=i;var o=function(){function e(e){this.dispatcher=e}return e.prototype.getKey=function(){return this.key},e.prototype.setPoints=function(e,t,n,i){this.key===e&&this.pointIndex===n||(this.key=e,this.points=t,this.pointIndex=n,this.outsideRectangle=i,this.raiseShow())},e.prototype.setPointIndex=function(e){0<=e&&e=0&&(this.keys.splice(this.keys.indexOf(e),1),this.raiseSelectionChanged())},e.prototype.clear=function(){this.keys.length>0&&(this.keys=[],this.raiseSelectionChanged())},e.prototype.set=function(e,t){!t&&s.Data.ArrayEqual(e,this.keys)||(this.keys=e,this.raiseSelectionChanged())},e.prototype.getKeys=function(){return this.keys},e.prototype.getKey=function(e){return this.keys[e]},e.prototype.getSelectedItemsInsideContainers=function(e){var t=this,n=e.slice();return e.forEach((function(e){e instanceof r.Shape&&t.getSelectedItemsInsideContainers(t.model.getChildren(e)).forEach((function(e){-1!==n.indexOf(e)||t.hasKey(e.key)||n.push(e)}))})),n},e.prototype.getSelectedItemsCore=function(e){var t=this;return this.keys.map((function(e){return t.model.findItem(e)})).filter((function(t){return t&&(e||!t.isLocked)}))},e.prototype.getSelectedItems=function(e,t){return t?this.getSelectedItemsInsideContainers(this.getSelectedItemsCore(e)):this.getSelectedItemsCore(e)},e.prototype.getSelectedShapes=function(e,t){var n=this;if(t){var i=this.getSelectedItemsCore(e);return this.getSelectedItemsInsideContainers(i).map((function(e){return e instanceof r.Shape?e:void 0})).filter((function(e){return e}))}return this.keys.map((function(e){return n.model.findShape(e)})).filter((function(t){return t&&(e||!t.isLocked)}))},e.prototype.getSelectedConnectors=function(e,t){var n=this;if(t){var i=this.keys.map((function(e){return n.model.findItem(e)}));return this.getSelectedItemsInsideContainers(i).map((function(e){return e instanceof a.Connector?e:void 0})).filter((function(t){return t&&(e||!t.isLocked)}))}return this.keys.map((function(e){return n.model.findConnector(e)})).filter((function(t){return t&&(e||!t.isLocked)}))},e.prototype.hasKey=function(e){return this.keys.indexOf(e)>=0},e.prototype.isEmpty=function(e){return!this.getSelectedItems(e).length},e.prototype.selectRect=function(e){var t=[];this.model.iterateItems((function(n){n.intersectedByRect(e)&&t.push(n.key)})),this.set(t)},e.prototype.raiseSelectionChanged=function(){this.onChanged.raise("notifySelectionChanged",this)},e}();t.Selection=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputPosition=void 0;var i=n(334),o=n(44),r=function(){function e(e){this.selection=e,this.initialProperties=new i.InputPositionProperties(this.selection),this.defaultProperties=new i.InputPositionProperties(this.selection,this.initialProperties,!0),this.currentProperties=new i.InputPositionProperties(this.selection,this.defaultProperties)}return e.prototype.initialize=function(){this.reset(),this.defaultProperties.reset()},e.prototype.reset=function(){this.currentProperties.reset()},e.prototype.getDefaultConnectorProperties=function(){return this.defaultProperties.getConnectorProperties()},e.prototype.getDefaultConnectorPropertyValue=function(e){return this.defaultProperties.getConnectorPropertyValue(e)},e.prototype.getCurrentConnectorPropertyValue=function(e){return this.currentProperties.getConnectorPropertyValue(e)},e.prototype.setConnectorPropertyValue=function(e,t){this.currentProperties.setConnectorPropertyValue(e,t),this.selection.isEmpty(!0)&&this.defaultProperties.setConnectorPropertyValue(e,t)},e.prototype.setInitialConnectorProperties=function(e){for(var t in this.defaultProperties.reset(),this.currentProperties.reset(),e)Object.prototype.hasOwnProperty.call(e,t)&&this.initialProperties.setConnectorPropertyValue(t,e[t])},e.prototype.getDefaultStyle=function(){return this.defaultProperties.getStyle()},e.prototype.getDefaultStylePropertyValue=function(e){return this.defaultProperties.getStylePropertyValue(e)},e.prototype.getDefaultTextStyle=function(){return this.defaultProperties.getTextStyle()},e.prototype.getDefaultTextStylePropertyValue=function(e){return this.defaultProperties.getTextStylePropertyValue(e)},e.prototype.getCurrentStylePropertyValue=function(e){return this.currentProperties.getStylePropertyValue(e)},e.prototype.getCurrentTextStylePropertyValue=function(e){return this.currentProperties.getTextStylePropertyValue(e)},e.prototype.setStylePropertyValue=function(e,t){this.currentProperties.setStylePropertyValue(e,t),this.selection.isEmpty(!0)&&this.defaultProperties.setStylePropertyValue(e,t)},e.prototype.setTextStylePropertyValue=function(e,t){this.currentProperties.setTextStylePropertyValue(e,t),this.selection.isEmpty(!0)&&this.defaultProperties.setTextStylePropertyValue(e,t)},e.prototype.setInitialStyleProperties=function(e){this.defaultProperties.reset(),this.currentProperties.reset();var t="string"==typeof e?o.Data.cssTextToObject(e):e;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.initialProperties.setStylePropertyValue(n,t[n])},e.prototype.setInitialTextStyleProperties=function(e){this.defaultProperties.reset(),this.currentProperties.reset();var t="string"==typeof e?o.Data.cssTextToObject(e):e;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.initialProperties.setTextStylePropertyValue(n,t[n])},e.prototype.notifySelectionChanged=function(e){this.reset()},e}();t.InputPosition=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputPositionProperties=void 0;var i=n(32),o=n(26),r=function(){function e(e,t,n){this.selection=e,this.baseProperties=t,this.disableMergingStyles=n,this.selection=e}return e.prototype.reset=function(){this.connectorProperties=null,this.style=null,this.textStyle=null},e.prototype.getConnectorProperties=function(){return this.connectorProperties||(this.connectorProperties=this.baseProperties?this.baseProperties.getConnectorProperties().clone():new i.ConnectorProperties,this.updateConnectorProperties(this.connectorProperties)),this.connectorProperties},e.prototype.getConnectorPropertyValue=function(e){return this.getConnectorProperties()[e]},e.prototype.setConnectorPropertyValue=function(e,t){this.getConnectorProperties()[e]=t},e.prototype.getStyle=function(){return this.style||(this.style=this.baseProperties?this.baseProperties.getStyle().clone():new o.Style,this.disableMergingStyles||this.updateStyle(this.style,"style")),this.style},e.prototype.getStylePropertyValue=function(e){return this.getStyle()[e]},e.prototype.setStylePropertyValue=function(e,t){this.getStyle()[e]=t},e.prototype.getTextStyle=function(){return this.textStyle||(this.textStyle=this.baseProperties?this.baseProperties.getTextStyle().clone():new o.TextStyle,this.disableMergingStyles||this.updateStyle(this.textStyle,"styleText")),this.textStyle},e.prototype.getTextStylePropertyValue=function(e){return this.getTextStyle()[e]},e.prototype.setTextStylePropertyValue=function(e,t){this.getTextStyle()[e]=t},e.prototype.updateConnectorProperties=function(e){var t=this,n=this.selection.getSelectedConnectors(!0);e.forEach((function(i){t.updatePropertyValue(e,n,(function(e){return e.properties}),i)}))},e.prototype.updateStyle=function(e,t){var n=this,i=this.selection.getSelectedItems(!0);e.forEach((function(o){n.updatePropertyValue(e,i,(function(e){return e[t]}),o)}))},e.prototype.updatePropertyValue=function(e,t,n,i){var o,r=!1;t.forEach((function(e){var t=n(e)[i];if(void 0===o&&void 0!==t)o=t,r=!0;else if(r&&o!==t)return void(o=void 0)})),r&&(e[i]=o)},e}();t.InputPositionProperties=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.History=void 0;var i=n(8),o=n(3),r=function(){function e(e,t){this.modelManipulator=e,this.diagram=t,this.historyItems=[],this.currentIndex=-1,this.incrementalId=-1,this.transactionLevel=-1,this.unmodifiedIndex=-1,this.currTransactionId=0,this.onChanged=new o.EventDispatcher}return e.prototype.isModified=function(){if(this.unmodifiedIndex===this.currentIndex)return!1;for(var e=Math.min(this.unmodifiedIndex,this.currentIndex),t=Math.max(this.unmodifiedIndex,this.currentIndex),n=e+1;n<=t;n++)if(this.historyItems[n].changeModified())return!0;return!1},e.prototype.undo=function(){this.canUndo()&&(this.historyItems[this.currentIndex].undo(this.modelManipulator),this.currentIndex--,this.raiseChanged())},e.prototype.redo=function(){this.canRedo()&&(this.startDataSyncItem&&(this.startDataSyncItem.undo(this.modelManipulator),this.startDataSyncItem=void 0),this.currentIndex++,this.historyItems[this.currentIndex].redo(this.modelManipulator),this.raiseChanged())},e.prototype.canUndo=function(){return this.currentIndex>=0},e.prototype.canRedo=function(){return this.currentIndex=0)){var t=this.transaction.historyItems.length;if(t>0){var n=t>1?this.transaction:this.transaction.historyItems.pop();e?this.addDataSyncItem(n):this.addInternal(n)}t>0&&!e&&this.raiseChanged(),delete this.transaction}},e.prototype.addAndRedo=function(e){this.add(e),e.redo(this.modelManipulator),this.raiseChanged()},e.prototype.add=function(e){this.transactionLevel>=0?this.transaction.add(e):this.addInternal(e)},e.prototype.addInternal=function(e){this.currentIndex0&&this.currentIndex>t&&(this.historyItems.splice(0,t),this.currentIndex-=t)},e.prototype.getNextId=function(){return this.incrementalId++,this.incrementalId},e.prototype.clear=function(){this.currentIndex=-1,this.unmodifiedIndex=-1,this.incrementalId=-1,this.historyItems=[],delete this.transaction,this.transactionLevel=-1},e.prototype.resetModified=function(){this.unmodifiedIndex=this.currentIndex},e.prototype.getCurrentItemId=function(){if(-1===this.currentIndex)return-1;var e=this.historyItems[this.currentIndex];return-1===e.uniqueId&&(e.uniqueId=this.getNextId()),e.uniqueId},e.prototype.undoTransaction=function(){this.diagram.beginUpdateCanvas();for(var e=this.transaction.historyItems;e.length;)e.pop().undo(this.modelManipulator);this.diagram.endUpdateCanvas()},e.prototype.undoTransactionTo=function(e){this.diagram.beginUpdateCanvas();for(var t=this.transaction.historyItems;t.length;){var n=t.pop();if(n.undo(this.modelManipulator),n===e)return}this.diagram.endUpdateCanvas()},e.prototype.raiseChanged=function(){-1===this.transactionLevel&&this.onChanged.raise("notifyHistoryChanged")},e.MAX_HISTORY_ITEM_COUNT=100,e}();t.History=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BarManager=void 0;var r=function(e){function t(t){var n=e.call(this)||this;return n.bars=[],n.control=t,n}return o(t,e),t.prototype.clean=function(){var e=this;this.bars.forEach((function(t){return t.onChanged.remove(e)})),this.bars=[]},t.prototype.registerBar=function(e){this.bars.push(e),e.onChanged.add(this),this.updateBarItemsState(e)},t.prototype.updateItemsState=function(e){if(!this.isUpdateLocked())for(var t=0,n=void 0;n=this.bars[t];t++)this.updateBarItemsState(n,e)},t.prototype.updateBarItemsState=function(e,t){if(!this.isUpdateLocked()){if(this.control.permissionsProvider.beginUpdateUI(),e.isVisible()){var n=void 0;if(t){var i=e.getCommandKeys().reduce((function(e,t){return e[t]=!0,e}),{});n=t.filter((function(e){return i[e]}))}else n=e.getCommandKeys();for(var o=n.length,r=0;r2&&(this.pointers={}),this.onMouseDown(e)},e.prototype.onPointerUp=function(e){this.clearPointerPosition(e),this.onMouseUp(e)},e.prototype.onPointerMove=function(e){(l.Browser.TouchUI&&!C.EventUtils.isMousePointer(e)||C.EventUtils.isLeftButtonPressed(e))&&this.setPointerPosition(e),this.onMouseMove(e)},e.prototype.onPointerCancel=function(e){this.clearPointerPosition(e)},e.prototype.onPointerLeave=function(e){C.EventUtils.isMousePointer(e)&&this.onMouseLeave(e),this.clearPointerPosition(e)},e.prototype.onMouseDown=function(e){var t=this;this.lockMouseMove(),this.input.lockFocus(),this.autoScroll.onMouseDown(e),this.lastDownMouseEvent=this.createDiagramMouseEvent(e),u.raiseEvent(e,this.lastDownMouseEvent,(function(e){return t.events.onMouseDown(e)})),this.events.canFinishTextEditing()&&this.input.captureFocus(),C.EventUtils.isTouchEvent(e)&&this.processTouchDown(e);var n=o.EvtUtils.getEventSource(e),i=n&&n.tagName;if(l.Browser.TouchUI||"img"===i.toLowerCase()||"image"===i.toLowerCase())return o.EvtUtils.preventEventAndBubble(e),!1},e.prototype.onMouseMove=function(e){var t=this;this.moveLocked||(this.autoScroll.onMouseMove(e,(function(){return t.onMouseMoveCore(e)})),this.onMouseMoveCore(e),l.Browser.IE&&this.lockMouseMove(),C.EventUtils.isTouchEvent(e)&&this.processTouchMove(e))},e.prototype.onMouseMoveCore=function(e){var t=this;u.raiseEvent(e,this.createDiagramMouseEvent(e),(function(e){return t.events.onMouseMove(e)}))},e.prototype.onMouseUp=function(e){var t=this;this.lockMouseMove();var n=this.createDiagramMouseEvent(e);u.raiseEvent(e,n,(function(e){return t.events.onMouseUp(e)})),this.autoScroll.onMouseUp(e),n.source.type!==i.MouseEventElementType.Undefined&&this.input.captureFocus(!0),C.EventUtils.isTouchEvent(e)&&this.processTouchUp(e)},e.prototype.onMouseEnter=function(e){var t=this;this.autoScroll.onMouseEnter(e),u.raiseEvent(e,this.createDiagramMouseEvent(e),(function(e){return t.events.onMouseEnter(e)}))},e.prototype.onMouseLeave=function(e){var t=this;u.raiseEvent(e,this.createDiagramMouseEvent(e),(function(e){return t.events.onMouseLeave(e)}))},e.prototype.onMouseDblClick=function(e){var t=this;u.raiseEvent(e,this.createDiagramMouseEvent(e),(function(e){return t.events.onDblClick(e)}))},e.prototype.onMouseClick=function(e){var t=this;C.EventUtils.isTouchEvent(e)?C.EventUtils.isMousePointer(e)||this.input.captureFocus():u.raiseEvent(e,this.createActualMouseClickEvent(e),(function(e){return t.events.onClick(e)}))},e.prototype.createActualMouseClickEvent=function(e){return this.lastDownMouseEvent?new i.DiagramMouseEvent(this.lastDownMouseEvent.modifiers,this.lastDownMouseEvent.button,this.lastDownMouseEvent.offsetPoint.clone(),this.lastDownMouseEvent.modelPoint.clone(),this.lastDownMouseEvent.source,this.createDiagramMouseEventTouches(e)):this.createDiagramMouseEvent(e)},e.prototype.onContextMenu=function(e){var t=this;return u.raiseEvent(e,this.createDiagramContextMenuEvent(e),(function(e){return t.events.onContextMenu(e)})),this.input.captureFocus(),o.EvtUtils.preventEventAndBubble(e)},e.prototype.processTouchDown=function(e){var n=this;this.touchDownPoint=this.getTouchPointFromEvent(e),this.resetLongTouch(),this.longTouchTimer=setTimeout((function(){u.raiseEvent(e,n.createDiagramMouseEvent(e),(function(e){return n.events.onLongTouch(e)})),n.resetLongTouch(),n.resetDblClick()}),t.LONG_TOUCH_TIMEOUT)},e.prototype.processTouchMove=function(t){var n=this.getTouchPointFromEvent(t);this.touchDownPoint&&n&&(Math.abs(this.touchDownPoint.x-n.x)>e.touchPositionLimit||Math.abs(this.touchDownPoint.y-n.y)>e.touchPositionLimit)&&(this.resetLongTouch(),this.resetDblClick())},e.prototype.getPointers=function(){var e=this;return Object.keys(this.pointers).map((function(t){return e.pointers[t]}))},e.prototype.getPointerCount=function(){return Object.keys(this.pointers).length},e.prototype.getTouchPointFromEvent=function(e){var t,n=e.touches;if(n&&n.length>0)t=new a.Point(n[0].clientX,n[0].clientY);else{var i=this.getPointers();i.length&&(t=new a.Point(i[0].clientX,i[0].clientY))}return t},e.prototype.processTouchUp=function(e){var n=this;if(void 0!==this.longTouchTimer){u.raiseEvent(e,this.createDiagramMouseEvent(e),(function(e){return n.events.onClick(e)}));var i=o.EvtUtils.getEventSource(e);void 0!==this.dblTouchTimer&&this.lastClickElement===i?(u.raiseEvent(e,this.createDiagramMouseEvent(e),(function(e){return n.events.onDblClick(e)})),this.resetDblClick()):(this.resetDblClick(),this.dblTouchTimer=setTimeout((function(){return n.dblTouchTimer=void 0}),t.DBL_CLICK_TIMEOUT)),this.lastClickElement=i}this.resetLongTouch(),this.touchDownPoint=void 0},e.prototype.resetLongTouch=function(){void 0!==this.longTouchTimer&&clearTimeout(this.longTouchTimer),this.longTouchTimer=void 0},e.prototype.resetDblClick=function(){void 0!==this.dblTouchTimer&&clearTimeout(this.dblTouchTimer),this.dblTouchTimer=void 0},e.prototype.onOrientationChange=function(){var e=this;setTimeout((function(){return e.onWindowResize()}),100)},e.prototype.onWindowResize=function(){var e={horizontal:!1,vertical:!1};if(this.view.autoZoom!==h.AutoZoomMode.Disabled)e.horizontal=!0,e.vertical=!0;else{var t=this.view.checkFitToCanvas(),n=this.view.checkFitToCanvas(this.scroll.getSize());e={horizontal:t.horizontal!==n.horizontal||n.horizontal,vertical:t.vertical!==n.vertical||n.vertical}}this.view.adjust(e)},e.prototype.onMouseWheel=function(e){var t=this;u.raiseEvent(e,this.createDiagramWheelEvent(e),(function(e){return t.events.onMouseWheel(e)}))},e.prototype.notifyModelSizeChanged=function(e,t){this.view.notifyModelSizeChanged(e,t)},e.prototype.notifyModelRectangleChanged=function(e){this.view.notifyModelRectangleChanged(e)},e.prototype.notifyReadOnlyChanged=function(e){r.DomUtils.toggleClassName(this.mainElement,"dxdi-read-only",e)},e.prototype.notifyDragStart=function(e){},e.prototype.notifyDragEnd=function(e){},e.prototype.notifyDragScrollStart=function(){this.autoScroll.onDragScrollStart()},e.prototype.notifyDragScrollEnd=function(){this.autoScroll.onDragScrollEnd()},e.prototype.notifyToolboxDragStart=function(e){this.onMouseEnter(e)},e.prototype.notifyToolboxDragEnd=function(e){e&&C.EventUtils.isPointerEvents()&&this.onMouseUp(e)},e.prototype.notifyToolboxDraggingMouseMove=function(e){this.onMouseMove(e)},e.prototype.createDiagramMouseEvent=function(e){var t=s.KeyUtils.getKeyModifiers(e),n=function(e){return l.Browser.MSTouchUI?2!==e.button:C.EventUtils.isLeftButtonPressed(e)}(e)?i.MouseButton.Left:i.MouseButton.Right,o=this.getOffsetPointByEvent(e),r=this.getModelPoint(o),a=C.EventUtils.isTouchEvent(e),u=this.getEventSource(e,a),c=this.createDiagramMouseEventTouches(e);return new i.DiagramMouseEvent(t,n,o,r,u,c,a)},e.prototype.createDiagramMouseEventTouches=function(e){var t=[];if(e.touches)for(var n=0;n-1},e.prototype.lockFocus=function(){var e=this;this.focusLocked=!0,setTimeout((function(){return e.focusLocked=!1}),10)},e.prototype.notifyViewAdjusted=function(e){},e.prototype.notifyActualZoomChanged=function(e){this.actualZoom=e,this.savedTextInputPosition&&this.savedTextInputSize&&this.setTextInputElementBounds(this.savedTextInputPosition,this.savedTextInputSize,this.savedTextInputAngle)},e.prototype.notifyTextInputStart=function(e,t,n,i){var o,r="";e instanceof s.Shape?(r="shape-text",o=e.textAngle):e instanceof l.Connector&&(r="connector-text"),i=i&&i.clone().applyConverter(h.UnitConverter.twipsToPixels),this.setInputElementTextInputMode(t,n,i,e.styleText,r,o)},e.prototype.notifyTextInputEnd=function(e,t){this.setInputElementFocusHandlerMode(t)},e.prototype.notifyTextInputPermissionsCheck=function(e,t){},e}();t.InputManager=g},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasPageManager=void 0;var r=n(26),a=n(21),s=n(5),l=n(341),u=n(56),c=n(42),d=n(2),h=n(0),p=n(17),f=n(22),m=n(12),g=function(e){function t(t,n,i){var o=e.call(this,n.zoomLevel,i)||this;return o.snapPoint=new h.Point(0,0),o.gridPatternId=p.RenderUtils.generateSvgElementId("gridPattern"),o.pagesGridPatternId=p.RenderUtils.generateSvgElementId("pagesGridPattern"),o.pagesGridClipId=p.RenderUtils.generateSvgElementId("pagesGridClip"),o.pageColor=n.pageColor,o.modelSize=n.modelSize,o.simpleView=n.simpleView,o.gridSize=n.gridSize,o.gridVisible=n.gridVisible,o.pageSize=n.pageLandscape?new d.Size(n.pageSize.height,n.pageSize.width):n.pageSize,o.canvasViewOffset=new h.Point(0,0),o.initContainers(t),o}return o(t,e),t.prototype.initContainers=function(e){this.backgroundContainer=e},t.prototype.redraw=function(){this.redrawPage(this.pageColor),this.redrawGrid()},t.prototype.redrawPage=function(e){var t=new r.Style;t.fill=f.ColorUtils.colorToHash(e),this.getOrCreateElement("page-bg",new a.RectanglePrimitive(0,0,"100%","100%",t,"page"),this.backgroundContainer),this.createTextFloodFilter("page-bg-textflood-filter",this.backgroundContainer,e)},t.prototype.redrawGrid=function(){this.updateGridElements(),this.updatePagesGridElements()},t.prototype.getGridRectElement=function(e){return void 0===this.gridRectElement&&(this.gridRectElement=this.createPrimitiveElement(e,this.backgroundContainer)),this.gridRectElement},t.prototype.getGridPatternElement=function(e){return void 0===this.gridPatternElement&&(this.gridPatternElement=this.createPrimitiveElement(e,this.backgroundContainer)),this.gridPatternElement},t.prototype.updateGridElements=function(){var e=this,t=new a.RectanglePrimitive("0","0","100%","100%",null,"grid",null,(function(t){t.style.setProperty("fill",p.RenderUtils.getUrlPathById(e.gridPatternId))})),n=this.getGridRectElement(t);if(this.gridVisible){n.style.display="",this.changePrimitiveElement(t,n);for(var i=m.UnitConverter.twipsToPixelsF(this.gridSize)*this.actualZoom,o=[0,1,2,3,4].map((function(e){return Math.round(i*e)})),r=[new s.PathPrimitiveMoveToCommand(o[4].toString(),"0"),new s.PathPrimitiveLineToCommand(o[4].toString(),o[4].toString()),new s.PathPrimitiveLineToCommand("0",o[4].toString())],u=[],c=1;c<=3;c++)u.push(new s.PathPrimitiveMoveToCommand(o[c].toString(),"0")),u.push(new s.PathPrimitiveLineToCommand(o[c].toString(),o[4].toString()));for(c=1;c<=3;c++)u.push(new s.PathPrimitiveMoveToCommand("0",o[c].toString())),u.push(new s.PathPrimitiveLineToCommand(o[4].toString(),o[c].toString()));var d=4*i,f=this.simpleView?this.canvasViewOffset:h.Point.zero(),g=new l.PatternPrimitive(this.gridPatternId,[this.createGridPathPrimitive(r,"grid-outer-line"),this.createGridPathPrimitive(u,"grid-inner-line")],this.createGridPatternPrimitivePosition(f.x,this.snapPoint.x,d),this.createGridPatternPrimitivePosition(f.y,this.snapPoint.y,d),d.toString(),d.toString());this.changePrimitiveElement(g,this.getGridPatternElement(g))}else n.style.display="none"},t.prototype.createGridPatternPrimitivePosition=function(e,t,n){return(((e+t*this.actualZoom)%n-n)%n).toString()},t.prototype.createGridPathPrimitive=function(e,t){return new s.PathPrimitive(e,r.StrokeStyle.default1pxNegativeOffsetInstance,t)},t.prototype.getPagesGridRectElement=function(e){return this.getOrCreateElement("grid-pages-rect",e,this.backgroundContainer)},t.prototype.getPagesGridClipPathElement=function(e){return void 0===this.pagesGridClipPathElement&&(this.pagesGridClipPathElement=this.createPrimitiveElement(e,this.backgroundContainer)),this.pagesGridClipPathElement},t.prototype.getPagesGridPatternElement=function(e){return void 0===this.pagesGridPatternElement&&(this.pagesGridPatternElement=this.createPrimitiveElement(e,this.backgroundContainer)),this.pagesGridPatternElement},t.prototype.updatePagesGridElements=function(){var e=this,t=this.getAbsoluteSize(this.pageSize),n=new a.RectanglePrimitive("0","0","100%","100%",null,"grid-page",this.pagesGridClipId,(function(t){t.style.setProperty("fill",p.RenderUtils.getUrlPathById(e.pagesGridPatternId)),t.style.setProperty("display",e.simpleView?"none":"")}));if(this.getPagesGridRectElement(n),!this.simpleView){var i=this.modelSize.clone().multiply(this.actualZoom,this.actualZoom),o=[new s.PathPrimitiveMoveToCommand((t.width-1).toString(),"0"),new s.PathPrimitiveLineToCommand((t.width-1).toString(),(t.height-1).toString()),new s.PathPrimitiveLineToCommand("0",(t.height-1).toString())],r=new l.PatternPrimitive(this.pagesGridPatternId,[new s.PathPrimitive(o,null,"pages-grid-line")],0,0,t.width.toString(),t.height.toString());this.changePrimitiveElement(r,this.getPagesGridPatternElement(r));var c=new u.ClipPathPrimitive(this.pagesGridClipId,[new a.RectanglePrimitive(0,0,(m.UnitConverter.twipsToPixelsF(i.width)-4).toString(),(m.UnitConverter.twipsToPixelsF(i.height)-4).toString())]);this.changePrimitiveElement(c,this.getPagesGridClipPathElement(c))}},t.prototype.notifyModelSizeChanged=function(e,t){this.modelSize=e.clone(),this.redraw()},t.prototype.notifyModelRectangleChanged=function(e){},t.prototype.notifySnapPointPositionChanged=function(e){this.snapPoint=e.clone().applyConverter(m.UnitConverter.twipsToPixelsF),this.redrawGrid()},t.prototype.notifyPageColorChanged=function(e){this.pageColor=e,this.redrawPage(this.pageColor)},t.prototype.notifyModelChanged=function(e){},t.prototype.notifyPageSizeChanged=function(e,t){this.pageSize=t?new d.Size(e.height,e.width):e.clone(),this.redraw()},t.prototype.notifyActualZoomChanged=function(e){this.actualZoom=e,this.redraw()},t.prototype.notifyViewAdjusted=function(e){this.canvasViewOffset.equals(e)||(this.canvasViewOffset=e,this.simpleView&&this.redraw())},t.prototype.notifyViewChanged=function(e){this.simpleView=e,this.redraw()},t.prototype.notifyGridChanged=function(e,t){this.gridVisible=e,this.gridSize=t,this.redraw()},t}(c.CanvasManagerBase);t.CanvasPageManager=g},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PatternPrimitive=void 0;var r=n(15),a=function(e){function t(t,n,i,o,r,a,s){var l=e.call(this,s)||this;return l.id=t,l.x=i,l.y=o,l.width=r,l.height=a,l.children=n,l}return o(t,e),t.prototype.createMainElement=function(){var e=document.createElementNS(r.svgNS,"pattern");return e.setAttribute("patternUnits","userSpaceOnUse"),e.setAttribute("id",this.id),e},t.prototype.applyElementProperties=function(t,n){this.setUnitAttribute(t,"x",this.x),this.setUnitAttribute(t,"y",this.y),this.setUnitAttribute(t,"width",this.width),this.setUnitAttribute(t,"height",this.height),this.setPositionCorrectionAttribute(t),e.prototype.applyElementProperties.call(this,t,n)},t}(n(24).SvgPrimitive);t.PatternPrimitive=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasViewManager=t.CROP_OFFSET=t.CANVAS_SCROLL_PADDING=t.CANVAS_MIN_PADDING=void 0;var r=n(42),a=n(28),s=n(3),l=n(87),u=n(2),c=n(0),d=n(39),h=n(56),p=n(21),f=n(17),m=n(343),g=n(26),v=n(27),_=n(12);t.CANVAS_MIN_PADDING=8,t.CANVAS_SCROLL_PADDING=18,t.CROP_OFFSET=40;var y=function(e){function n(t,n,i,o,r,a,u,d){var h=e.call(this,o,d)||this;return h.svgElement=n,h.paddings=new l.Offsets(0,0,0,0),h.scroll=new c.Point(0,0),h.crop=l.Offsets.empty(),h.lockAutoZoom=!1,h.autoScrollLocker=0,h.pageClipPathId=f.RenderUtils.generateSvgElementId("page-clip"),h.pageShadowId=f.RenderUtils.generateSvgElementId("page-shadow"),h.onViewChanged=new s.EventDispatcher,t.onScroll.add(h),i=i.clone().applyConverter(_.UnitConverter.twipsToPixelsF),h.scrollView=t,h.modelSize=i,h.simpleView=a,h.fixedZoomLevel=o,h.autoZoom=r,h.crop=h.rectangleToCrop(u,i),h.updateElements(i.clone().multiply(o,o),c.Point.zero(),a),h.getOrCreateElement("shadow",new m.ShadowFilterPrimitive(h.pageShadowId),h.svgElement),h.containerSize=t.getSize(),h}return o(n,e),n.prototype.adjust=function(e,t){var n;e||(e={vertical:!1,horizontal:!1},n=l.Offsets.empty()),this.containerSize=this.scrollView.getSize(),this.adjustCore(this.modelSize,this.fixedZoomLevel,this.autoZoom,this.simpleView,this.crop,e,this.containerSize,n,t),this.tryNormalizePaddings()},n.prototype.notifyModelSizeChanged=function(e,t){e=e.clone().applyConverter(_.UnitConverter.twipsToPixelsF);var n={horizontal:!t,vertical:!t};this.adjustCore(e,this.fixedZoomLevel,this.autoZoom,this.simpleView,this.crop,n,this.containerSize,t&&t.clone().applyConverter(_.UnitConverter.twipsToPixelsF)),this.modelSize=e},n.prototype.notifyModelRectangleChanged=function(e){var t=this.rectangleToCrop(e,this.modelSize);this.crop&&this.crop.equals(t)||(this.simpleView&&this.adjustCore(this.modelSize,this.fixedZoomLevel,this.autoZoom,this.simpleView,t,{horizontal:!1,vertical:!1},this.containerSize,l.Offsets.empty()),this.crop=t)},n.prototype.notifySnapPointPositionChanged=function(e){},n.prototype.notifyZoomChanged=function(e,t){this.adjustCore(this.modelSize,e,t,this.simpleView,this.crop,{horizontal:!1,vertical:!1},this.containerSize),this.fixedZoomLevel=e,this.autoZoom=t},n.prototype.notifyViewChanged=function(e){this.adjustCore(this.modelSize,this.fixedZoomLevel,this.autoZoom,e,this.crop,{vertical:!0,horizontal:!0},this.containerSize),this.simpleView=e},n.prototype.notifyGridChanged=function(e,t){},n.prototype.notifyDragStart=function(e){this.lockAutoZoom=!0,v.DomUtils.addClassName(this.svgElement,"dxdi-drag-item")},n.prototype.notifyDragEnd=function(e){this.lockAutoZoom=!1,v.DomUtils.removeClassName(this.svgElement,"dxdi-drag-item"),this.adjustAfterDragEnd()},n.prototype.adjustAfterDragEnd=function(){this.autoZoom&&!this.autoZoomLocked&&this.adjust({horizontal:!0,vertical:this.autoZoom===a.AutoZoomMode.FitContent},this.autoZoom===a.AutoZoomMode.FitToWidth)},n.prototype.notifyShowContextToolbox=function(){this.autoZoomLocked=!0},n.prototype.notifyHideContextToolbox=function(){this.autoZoomLocked=!1,this.adjustAfterDragEnd()},n.prototype.notifyDragScrollStart=function(){v.DomUtils.addClassName(this.svgElement,"dxdi-drag-scroll")},n.prototype.notifyDragScrollEnd=function(){v.DomUtils.removeClassName(this.svgElement,"dxdi-drag-scroll")},n.prototype.notifyScrollChanged=function(e){this.scroll=e()},n.prototype.checkFitToCanvas=function(e){e=e||this.containerSize;var n=this.scrollView.getScrollBarWidth();e=e.clone().offset(2*-t.CANVAS_MIN_PADDING,2*-t.CANVAS_MIN_PADDING).nonNegativeSize();var i=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop).clone().multiply(this.actualZoom,this.actualZoom),o=this.checkScrollBars(e,n,i,l.Offsets.empty());return{vertical:(e=e.clone().offset(o.vertical?-n:0,o.horizontal?-n:0).nonNegativeSize()).height>=i.height,horizontal:e.width>=i.width}},n.prototype.rectangleToCrop=function(e,t){var n=e.clone().applyConverter(_.UnitConverter.twipsToPixelsF);return new l.Offsets(this.correctCrop(n.x),this.correctCrop(t.width-n.right),this.correctCrop(n.y),this.correctCrop(t.height-n.bottom))},n.prototype.correctCrop=function(e){return t.CROP_OFFSET*Math.floor(e/t.CROP_OFFSET)},n.prototype.setActualZoom=function(e){this.actualZoom!==e&&(this.actualZoom=e,this.raiseActualZoomChanged())},n.prototype.getActualAutoZoomLevel=function(e){if(e===a.AutoZoomMode.Disabled)return this.actualZoom;var t=this.containerSize,n=this.scrollView.getScrollBarWidth(),i=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop);return this.getActualAutoZoom(t,n,i,e)},n.prototype.getActualZoom=function(e,t,n,i,o){return this.lockAutoZoom?this.actualZoom:o===a.AutoZoomMode.Disabled?i:this.getActualAutoZoom(e,t,n,o)},n.prototype.getActualAutoZoom=function(e,n,i,o){return 0===e.width||0===e.height?1:o===a.AutoZoomMode.FitContent?Math.min((e.width-2*t.CANVAS_MIN_PADDING)/i.width,(e.height-2*t.CANVAS_MIN_PADDING)/i.height,1):Math.min((e.width-2*t.CANVAS_MIN_PADDING-n)/i.width,1)},n.prototype.raiseActualZoomChanged=function(){var e=this;this.onViewChanged.raise1((function(t){return t.notifyActualZoomChanged(e.actualZoom)}))},n.prototype.tryNormalizePaddings=function(){var e=this.scrollView.getScrollBarWidth(),t=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop).clone().multiply(this.actualZoom,this.actualZoom),n=new c.Point(this.paddings.left,this.paddings.top),i=new u.Size(this.paddings.right,this.paddings.bottom),o=this.getTailSpace(n,this.scroll,t,this.containerSize,e);o.equals(i)||this.applyChanges(new l.Offsets(n.x,o.width,n.y,o.height),t,this.simpleView,this.crop.clone().multiply(this.actualZoom))},n.prototype.scrollBy=function(e){var t,n,i,o=this.scroll,r=this.containerSize,a=this.scrollView.getScrollBarWidth(),s=this.getActualModelSizeWithoutZoom(this.modelSize,this.simpleView,this.crop).clone().multiply(this.actualZoom,this.actualZoom),d=this.checkScrollBars(r,a,s,this.paddings),h=new c.Point(this.paddings.left,this.paddings.top),p=new u.Size(this.paddings.right,this.paddings.bottom);return o=(t=this.changeScrollByOffset(h,o,p,s,e,r,d)).scroll,e=t.offset,h=(n=this.changeTranslateByOffset(h,p,e,d)).translate,e=n.offset,h=(i=this.cropHiddenHead(h,o)).translate,o=i.scroll,p=this.getTailSpace(h,o,s,r,a),this.applyChanges(new l.Offsets(h.x,p.width,h.y,p.height),s,this.simpleView,this.crop.clone().multiply(this.actualZoom),o),e},n.prototype.changeScrollByOffset=function(e,t,n,i,o,r,a){var s=t.clone(),l=o.clone();return o.x&&a.horizontal&&(s.x-=l.x=-this.getScrollDeltaByOffset(o.x,t.x,e.x+i.width+n.width,r.width,a.vertical)),o.y&&a.vertical&&(s.y-=l.y=-this.getScrollDeltaByOffset(o.y,t.y,e.y+i.height+n.height,r.height,a.horizontal)),{scroll:s,offset:l}},n.prototype.changeTranslateByOffset=function(e,t,n,i){var o=e.clone(),r=n.clone();return n.x&&!i.horizontal&&(o.x+=r.x=this.getTranslateDeltaByOffset(n.x,o.x,t.width)),n.y&&!i.vertical&&(o.y+=r.y=this.getTranslateDeltaByOffset(n.y,o.y,t.height)),{translate:o,offset:r}},n.prototype.getScrollDeltaByOffset=function(e,t,n,i,o){if(e>0)return-Math.min(t,e);var r=n-(i-(o?this.scrollView.getScrollBarWidth():0));return Math.min(r-t,-e)},n.prototype.getTranslateDeltaByOffset=function(e,n,i){return e?e<0?-Math.min(n-t.CANVAS_MIN_PADDING,-e):Math.min(i-t.CANVAS_MIN_PADDING,e):0},n.prototype.getActualModelSizeWithoutZoom=function(e,t,n){return t&&n?e.clone().offset(-n.horizontal,-n.vertical).nonNegativeSize():e},n.prototype.setScrollTo=function(e,n){var i=this.containerSize,o=this.getVisibileAreaAbsShift(),r=e.clone().applyConverter(_.UnitConverter.twipsToPixelsF).clone().multiply(this.actualZoom,this.actualZoom).clone().offset(o.x,o.y),a=this.scroll;n?(a.x+=r.x-n.x,a.y+=r.y-n.y):(r.x<0&&(a.x+=r.x-t.CANVAS_MIN_PADDING),r.y<0&&(a.y+=r.y-t.CANVAS_MIN_PADDING),r.x>i.width&&(a.x+=r.x-i.width+t.CANVAS_MIN_PADDING),r.y>i.height&&(a.y+=r.y-i.height+t.CANVAS_MIN_PADDING)),this.setScroll(a)},n.prototype.scrollIntoView=function(e){e=e.clone().applyConverter(_.UnitConverter.twipsToPixelsF).multiply(this.actualZoom,this.actualZoom).moveRectangle(this.paddings.left,this.paddings.top);var n=this.scroll,i=this.containerSize;if(!(e.x>=n.x&&e.y>=n.y&&e.right<=n.x+i.width&&e.bottom<=n.y+i.height)){var o=n.clone();e.xn.x+i.width&&(o.x=Math.min(e.x-t.CANVAS_SCROLL_PADDING,e.right+t.CANVAS_SCROLL_PADDING-i.width)),e.y_&&(m.x=_,g.x=0),a.right<0&&v.width>_&&(v.width=_,g.x>p.width&&(g.x=p.width)),a.top<0&&m.y>y&&(m.y=y,g.y=0),a.bottom<0&&v.height>y&&(v.height=y,g.y>p.height&&(g.y=p.height))}var b=new l.Offsets(m.x,v.width,m.y,v.height);this.applyChanges(b,p,o,f,g)},n.prototype.applyChanges=function(e,t,n,i,o){var r=this,a=new c.Point(e.left,e.top);n&&i&&(a=a.clone().offset(-i.left,-i.top)),this.updateElements(t,a,n),this.setSvgSize(t.width+e.horizontal,t.height+e.vertical),this.onViewChanged.raise1((function(e){return e.notifyViewAdjusted(new c.Point(a.x,a.y))})),o&&(this.lockAutoScroll(),o&&this.dom.changeByFunc(this.scrollView,(function(e){e.setScroll(o.x,o.y),r.unlockAutoScroll()})),this.scroll=o),this.paddings=e},n.prototype.isAutoScrollLocked=function(){return 0!==this.autoScrollLocker},n.prototype.lockAutoScroll=function(){this.autoScrollLocker++},n.prototype.unlockAutoScroll=function(){this.autoScrollLocker--},n.prototype.applyOffset=function(e,n,i,o,r){var a=e.clone(),s=n.clone(),l=this.getActualOffset(i,o,r);return l.left&&(a.x=Math.max(t.CANVAS_MIN_PADDING,a.x-l.left),s.x+=l.left-(e.x-a.x)),l.top&&(a.y=Math.max(t.CANVAS_MIN_PADDING,a.y-l.top),s.y+=l.top-(e.y-a.y)),{translate:a,scroll:s}},n.prototype.cropHiddenHead=function(e,n){var i=n.clone(),o=e.clone();if(i.x&&o.x>t.CANVAS_MIN_PADDING){var r=o.x-Math.max(t.CANVAS_MIN_PADDING,o.x-i.x);o.x-=r,i.x-=r}return i.y&&o.y>t.CANVAS_MIN_PADDING&&(r=o.y-Math.max(t.CANVAS_MIN_PADDING,o.y-i.y),o.y-=r,i.y-=r),{translate:o,scroll:i}},n.prototype.getTailSpace=function(e,n,i,o,r){var a=e.clone(),s=n.clone(),c=Math.max(o.width+s.x-(a.x+i.width),t.CANVAS_MIN_PADDING),d=Math.max(o.height+s.y-(a.y+i.height),t.CANVAS_MIN_PADDING),h=this.checkScrollBars(o,r,i,new l.Offsets(a.x,c,a.y,d));return h.vertical&&(c=Math.max(t.CANVAS_MIN_PADDING,c-r)),h.horizontal&&(d=Math.max(t.CANVAS_MIN_PADDING,d-r)),new u.Size(c,d)},n.prototype.getActualOffset=function(e,t,n){return new l.Offsets(-(t.left-e.left)+n.left,-(t.right-e.right)+n.right,-(t.top-e.top)+n.top,-(t.bottom-e.bottom)+n.bottom)},n.prototype.checkScrollBars=function(e,t,n,i){var o=e.widtho.width||e.y>o.height)return null;if(i.x<0||i.y<0)return null;if(i.x>this.modelSize.width||i.y>this.modelSize.height)return null}return i.clone().applyConverter(_.UnitConverter.pixelsToTwips)},n.prototype.getAbsolutePoint=function(e,t,n){var i=this.getVisibileAreaAbsShift(t),o=e.clone().multiply(this.actualZoom,this.actualZoom).clone().applyConverter(_.UnitConverter.twipsToPixelsF).clone().offset(i.x,i.y);if(n){if(o.x<0||o.y<0)return null;var r=this.containerSize;if(o.x>r.width||o.y>r.height)return null}return o},n}(r.CanvasManagerBase);t.CanvasViewManager=y},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFilterPrimitive=void 0;var r=n(108),a=n(15),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createChildElements=function(e){var t=document.createElementNS(a.svgNS,"feGaussianBlur");t.setAttribute("in","SourceGraphic"),t.setAttribute("stdDeviation","4.6"),e.appendChild(t);var n=document.createElementNS(a.svgNS,"feOffset");n.setAttribute("dx","0"),n.setAttribute("dy","0"),e.appendChild(n);var i=document.createElementNS(a.svgNS,"feMerge");e.appendChild(i);var o=document.createElementNS(a.svgNS,"feMergeNode");i.appendChild(o);var r=document.createElementNS(a.svgNS,"feMergeNode");r.setAttribute("in","SourceGraphic"),i.appendChild(r)},t}(r.FilterPrimitive);t.ShadowFilterPrimitive=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoScrollController=void 0;var i=n(15),o=n(27),r=n(2),a=n(3),s=function(){function e(e,t,n,i){this.scroll=e,this.svgElement=t,this.view=n,this.dom=i,this.leftButtonPressed=!1,this.scrollDragging=!1,this.scrollTimer=-1,this.scrollBarWidth=o.DomUtils.getVerticalScrollBarWidth()}return e.prototype.onMouseMove=function(e,t){this.clearScrollTimer(),a.EventUtils.isLeftButtonPressed(e)||(this.leftButtonPressed=!1),this.canAutoScroll()&&this.changeScrollPosition(e,t,!1)},e.prototype.onMouseDown=function(e){this.leftButtonPressed=!!a.EventUtils.isLeftButtonPressed(e)},e.prototype.onMouseUp=function(e){this.clearScrollTimer(),this.leftButtonPressed=!1},e.prototype.onMouseEnter=function(e){var t=this;a.EventUtils.isLeftButtonPressed(e)&&setTimeout((function(){t.leftButtonPressed=!0}),500)},e.prototype.onDragScrollStart=function(){this.scrollDragging=!0},e.prototype.onDragScrollEnd=function(){this.scrollDragging=!1},e.prototype.canAutoScroll=function(){return this.leftButtonPressed&&!this.scrollDragging},e.prototype.changeScrollPosition=function(e,t,n){var i=this,a=!1;if(!this.view.isAutoScrollLocked()){var s=this.scroll.getScrollContainer(),l=e.pageX-o.DomUtils.getAbsolutePositionX(s),u=e.pageY-o.DomUtils.getAbsolutePositionY(s),c=this.scroll.getSize(),d=new r.Size(parseFloat(this.svgElement.style.width),parseFloat(this.svgElement.style.height)),h=c.width;c.width-1&&(window.clearTimeout(this.scrollTimer),this.scrollTimer=-1)},e.prototype.getScrollingOffset=function(e){var t=Math.pow((40-e)/5,2);return Math.round(Math.min(t,5))},e.createMainElement=function(e){var t=document.createElement("div");return t.setAttribute("class","dxdi-control"),e.appendChild(t),t},e.createSvgElement=function(e,t){void 0===t&&(t=!1);var n=document.createElementNS(i.svgNS,"svg");return n.className.baseVal="dxdi-canvas"+(t?" export":""),e.appendChild(n),n},e}();t.AutoScrollController=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentDataSource=t.UpdateNodeKeyRelatedObjectsStackAction=t.UpdateNodeKeyRelatedObjectsStackItem=void 0;var r=n(1),a=n(14),s=n(6),l=n(346),u=n(4),c=n(44),d=n(3),h=n(49),p=n(31),f=function(){return function(e,t){this.shape=e,this.nodeObj=t}}();t.UpdateNodeKeyRelatedObjectsStackItem=f;var m=function(){return function(e,t){this.kind=e,this.nodeObj=t}}();t.UpdateNodeKeyRelatedObjectsStackAction=m;var g=function(e){function t(t,n,i,o,r,a){var s=e.call(this,"Document",n,i,o,r,a)||this;return s.changesListener=t,s.nodeInsertingLockCount=0,s.updateNodeKeyRelatedObjectsCount=0,s.updateNodeKeyRelatedObjectsStack=[],s.updateNodeKeyRelatedObjectsStackActions=[],s}return o(t,e),t.prototype.updateItemsByModel=function(e){var t=this;this.beginChangesNotification(),this.deleteNodes(e),this.deleteEdges(e),e.items.forEach((function(n){n instanceof a.Shape&&t.updateNode(e,n),n instanceof s.Connector&&t.updateEdge(e,n)})),this.endChangesNotification(!1)},t.prototype.isItemObjectModified=function(e,t,n){var i=n.setLocked&&t.locked!==e.locked||n.setZIndex&&t.zIndex!==e.zIndex||n.setCustomData&&!d.ObjectUtils.compareObjects(t.customData,e.customData);if(!i&&n.setStyle){var o=e.style.getDefaultInstance();e.style.forEach((function(n){e.style[n]!==o[n]&&e.style[n]!==(t.style&&t.style[n])&&(i=!0)}))}if(!i&&n.setStyleText){var r=e.styleText.getDefaultInstance();e.styleText.forEach((function(n){e.styleText[n]!==r[n]&&e.styleText[n]!==(t.styleText&&t.styleText[n])&&(i=!0)}))}return i},t.prototype.setDataObjectKeyRelatedProperty=function(e,t,n,i){(i||void 0===this.autoGeneratedDataKeys[n])&&e(t,n)},t.prototype.updateItemObjectProperties=function(e,t,n){if(n.setCustomData&&(e.customData=d.ObjectUtils.cloneObject(t.customData),e.dataObj&&void 0!==e.customData&&n.setCustomData(e.dataObj,t.customData)),n.setLocked&&(e.locked=t.locked,e.dataObj&&void 0!==e.locked&&n.setLocked(e.dataObj,t.locked)),n.setStyle){var i=t.style.toObject();e.style=i,e.dataObj&&void 0!==e.style&&n.setStyle(e.dataObj,c.Data.objectToCssText(i))}if(n.setStyleText){var o=t.styleText.toObject();e.styleText=o,e.dataObj&&void 0!==e.styleText&&n.setStyleText(e.dataObj,c.Data.objectToCssText(o))}n.setZIndex&&(e.zIndex=t.zIndex,e.dataObj&&void 0!==e.zIndex&&n.setZIndex(e.dataObj,t.zIndex))},t.prototype.deleteItems=function(e,t,n,i){e.slice().forEach((function(e){if(void 0!==e.key&&null!==e.key&&!t(e.key)){var o=n(e),r=o.indexOf(e.dataObj);o.splice(r,1),i(e,r>-1)}}))},t.prototype.updateNode=function(e,t){var n=this,i=this.findNode(t.dataKey);if(i)this.isNodeObjectModified(t,i,e.units)?(this.updateNodeObjectProperties(t,i,e.units),this.updateNodeObjectConnectedProperties(t,i),this.beginChangesNotification(),this.changesListener.notifyNodeUpdated.call(this.changesListener,this.nodeDataImporter.getKey(i.dataObj||i.key),i.dataObj,(function(e,t){n.endChangesNotification(!1)}),(function(e){n.endChangesNotification(!1)}))):this.updateNodeObjectConnectedProperties(t,i,this.changesListener);else{var o={};void 0!==t.dataKey&&null!==t.dataKey&&this.nodeDataImporter.setKey(o,t.dataKey),i=this.addNodeInternal(o,t.description.key,t.text),this.nodeDataSource.push(i.dataObj),this.setDataObjectKeyRelatedProperty(this.nodeDataImporter.setKey,o,i.key,this.addInternalKeyOnInsert),this.updateNodeObjectProperties(t,i,e.units),this.updateNodeObjectConnectedProperties(t,i),this.updateNodeObjectKey(t,i,i.dataObj),this.beginChangesNotification(),this.beginNodeInserting(),this.changesListener.notifyNodeInserted.call(this.changesListener,i.dataObj,(function(e){n.updateNodeObjectKey(t,i,e),n.endNodeInserting(),n.endChangesNotification(!1)}),(function(e){n.endNodeInserting(),n.endChangesNotification(!1)}))}},t.prototype.areImageUrlsEqual=function(e,t){return e===t||h.StringUtils.isNullOrEmpty(e)&&h.StringUtils.isNullOrEmpty(t)},t.prototype.isNodeObjectModified=function(e,t,n){return this.isItemObjectModified(e,t,this.nodeDataImporter)||t.type!==e.description.key&&!(void 0===t.type&&e.description.key===r.ShapeTypes.Rectangle)||!this.compareStrings(t.text,e.text)||this.nodeDataImporter.setImage&&!this.areImageUrlsEqual(t.image,e.image.actualUrl)||this.nodeDataImporter.setLeft&&!p.MathUtils.numberCloseTo(t.left,u.ModelUtils.getlUnitValue(n,e.position.x))||this.nodeDataImporter.setTop&&!p.MathUtils.numberCloseTo(t.top,u.ModelUtils.getlUnitValue(n,e.position.y))||this.nodeDataImporter.setWidth&&!p.MathUtils.numberCloseTo(t.width,u.ModelUtils.getlUnitValue(n,e.size.width))||this.nodeDataImporter.setHeight&&!p.MathUtils.numberCloseTo(t.height,u.ModelUtils.getlUnitValue(n,e.size.height))},t.prototype.updateNodeObjectProperties=function(e,t,n){if(this.updateItemObjectProperties(t,e,this.nodeDataImporter),this.nodeDataImporter.setType&&(t.type=e.description.key,this.nodeDataImporter.setType(t.dataObj,e.description.key)),this.nodeDataImporter.setText&&(t.text=e.text,this.nodeDataImporter.setText(t.dataObj,e.text)),this.nodeDataImporter.setImage&&(t.image=e.image.actualUrl,this.nodeDataImporter.setImage(t.dataObj,void 0===e.image.actualUrl?null:e.image.actualUrl)),this.nodeDataImporter.setLeft){var i=u.ModelUtils.getlUnitValue(n,e.position.x);t.left=i,this.nodeDataImporter.setLeft(t.dataObj,i)}if(this.nodeDataImporter.setTop){var o=u.ModelUtils.getlUnitValue(n,e.position.y);t.top=o,this.nodeDataImporter.setTop(t.dataObj,o)}if(this.nodeDataImporter.setWidth){var r=u.ModelUtils.getlUnitValue(n,e.size.width);t.width=r,this.nodeDataImporter.setWidth(t.dataObj,r)}if(this.nodeDataImporter.setHeight){var a=u.ModelUtils.getlUnitValue(n,e.size.height);t.height=a,this.nodeDataImporter.setHeight(t.dataObj,a)}},t.prototype.updateNodeObjectConnectedProperties=function(e,t,n){if(this.useNodeParentId&&void 0!==this.nodeDataImporter.setParentKey){var i=this.getParentItemKey(e),o=this.findNode(i);this.updateNodeObjectParentKey(t,o,n)}if(this.useNodeContainerId&&void 0!==this.nodeDataImporter.setContainerKey){var r=this.getContainerShapeKey(e),a=this.findNode(r);this.updateNodeObjectContainerKey(t,a,n)}this.useNodeItems&&void 0!==this.nodeDataImporter.setItems&&(i=this.getParentItemKey(e),o=this.findNode(i),this.updateNodeObjectItems(t,o,n)),this.useNodeChildren&&void 0!==this.nodeDataImporter.setChildren&&(r=this.getContainerShapeKey(e),a=this.findNode(r),this.updateNodeObjectChildren(t,a,n))},t.prototype.IsNodeParentIdMode=function(){return this.useNodeParentId&&void 0!==this.nodeDataImporter.setParentKey},t.prototype.IsNodeItemsMode=function(){return this.useNodeItems&&void 0!==this.nodeDataImporter.setItems},t.prototype.updateNodeObjectParentKey=function(e,t,n){var i=this.nodeDataImporter.getParentKey(e.dataObj),o=t?this.nodeDataImporter.getKey(t.dataObj):void 0;i===o||this.isRootParentKey(i)&&this.isRootParentKey(o)||(this.setDataObjectKeyRelatedProperty(this.nodeDataImporter.setParentKey,e.dataObj,o,!1),n&&(this.isInUpdateNodeKeyRelatedObjects()?this.addToUpdateNodeKeyRelatedObjectsStackAction("shape",e):this.updateNodeObjectContainerOrParentKeyInternal(e,n)))},t.prototype.updateNodeObjectParentKeyInternal=function(e,t){var n=this;this.beginChangesNotification(),t.notifyNodeUpdated.call(t,this.nodeDataImporter.getKey(e.dataObj)||e.key,e.dataObj,(function(e,t){n.endChangesNotification(!1)}),(function(e){n.endChangesNotification(!1)}))},t.prototype.updateNodeObjectContainerKey=function(e,t,n){var i=this.nodeDataImporter.getContainerKey(e.dataObj),o=t?this.nodeDataImporter.getKey(t.dataObj):void 0;i===o||this.isRootParentKey(i)&&this.isRootParentKey(o)||(this.setDataObjectKeyRelatedProperty(this.nodeDataImporter.setContainerKey,e.dataObj,o,!1),n&&(this.isInUpdateNodeKeyRelatedObjects()?this.addToUpdateNodeKeyRelatedObjectsStackAction("shape",e):this.updateNodeObjectContainerOrParentKeyInternal(e,n)))},t.prototype.updateNodeObjectContainerOrParentKeyInternal=function(e,t){var n=this;this.beginChangesNotification(),t.notifyNodeUpdated.call(t,this.nodeDataImporter.getKey(e.dataObj)||e.key,e.dataObj,(function(e,t){n.endChangesNotification(!1)}),(function(e){n.endChangesNotification(!1)}))},t.prototype.isRootParentKey=function(e){return null==e||!this.findNode(e)},t.prototype.updateNodeObjectItems=function(e,t,n){var i=this;if((t&&e.parentDataObj!==t.dataObj||!t&&e.parentDataObj)&&(!t||!this.checkNodeCyrcleItems(e.dataObj,t.dataObj))){var o=e.parentDataObj?this.nodeDataImporter.getItems(e.parentDataObj):this.nodeDataSource,r=o.indexOf(e.dataObj);o.splice(r,1);var a=t?this.nodeDataImporter.getItems(t.dataObj):this.nodeDataSource;a?a.push(e.dataObj):this.nodeDataImporter.setItems(t.dataObj,[e.dataObj]),e.parentDataObj=t&&t.dataObj,n&&(this.beginChangesNotification(),n.notifyNodeUpdated.call(n,this.nodeDataImporter.getKey(e.dataObj)||e.key,e.dataObj,(function(e,t){i.endChangesNotification(!1)}),(function(e){i.endChangesNotification(!1)})))}},t.prototype.updateNodeObjectChildren=function(e,t,n){var i=this;if(t&&e.containerDataObj!==t.dataObj||!t&&e.containerDataObj){var o=e.containerDataObj?this.nodeDataImporter.getChildren(e.containerDataObj):this.nodeDataSource,r=o.indexOf(e.dataObj);o.splice(r,1);var a=t?this.nodeDataImporter.getChildren(t.dataObj):this.nodeDataSource;a?a.push(e.dataObj):this.nodeDataImporter.setChildren(t.dataObj,[e.dataObj]),e.containerDataObj=t&&t.dataObj,n&&(this.beginChangesNotification(),n.notifyNodeUpdated.call(n,this.nodeDataImporter.getKey(e.dataObj)||e.key,e.dataObj,(function(e,t){i.endChangesNotification(!1)}),(function(e){i.endChangesNotification(!1)})))}},t.prototype.checkNodeCyrcleItems=function(e,t){var n=this,i=!1,o=this.nodeDataImporter.getItems(e);return o&&o.forEach((function(e){i=i||e===t||n.checkNodeCyrcleItems(e,t)})),i},t.prototype.updateNodeObjectKey=function(e,t,n){var i=this.nodeDataImporter.getKey(n),o=!1;if(null!=i&&i!==t.key&&(delete this.autoGeneratedDataKeys[t.key],t.key=i,o=!0),e.dataKey=t.key,t.dataObj!==n){var r=this.getNodeArray(t),a=r.indexOf(t.dataObj);r.splice(a,1,n),t.dataObj=n}o&&this.updateNodeKeyRelatedObjects(e,t)},t.prototype.updateNodeKeyRelatedObjects=function(e,t){var n=this;this.isInNodeInserting()?this.addToUpdateNodeKeyRelatedObjectsStack(e,t):(this.useNodeParentId&&void 0!==this.nodeDataImporter.setParentKey&&this.getChildItems(e).forEach((function(e){var i=n.findNode(e.dataKey);i&&n.updateNodeObjectParentKey(i,t,n.changesListener)})),this.useNodeContainerId&&void 0!==this.nodeDataImporter.setContainerKey&&e.children.forEach((function(e){var i=e instanceof a.Shape?n.findNode(e.dataKey):void 0;i&&n.updateNodeObjectContainerKey(i,t,n.changesListener)})),this.useEdgesArray()&&e.attachedConnectors.forEach((function(i){var o=n.findEdge(i.dataKey);o&&(e===i.beginItem&&n.updateEdgeObjectFromProperty(t,o,n.changesListener),e===i.endItem&&n.updateEdgeObjectToProperty(t,o,n.changesListener))})))},t.prototype.deleteNodes=function(e){var t=this;this.deleteItems(this.nodes,(function(t){return e.findShapeByDataKey(t)}),(function(e){return t.getNodeArray(e)}),(function(e,n){var i=e.dataObj&&t.nodeDataImporter.getKey(e.dataObj)||e.key,o=t.findNode(i);o&&t.nodes.splice(t.nodes.indexOf(o),1),n&&(t.beginChangesNotification(),t.changesListener.notifyNodeRemoved.call(t.changesListener,i,e.dataObj,(function(e,n){t.endChangesNotification(!1)}),(function(e){t.endChangesNotification(!1)})))}))},t.prototype.getParentItem=function(e){for(var t=0;t0},t.prototype.addToUpdateNodeKeyRelatedObjectsStack=function(e,t){var n=new f(e,t);this.updateNodeKeyRelatedObjectsStack.push(n)},t.prototype.raiseNodeInsertingStack=function(){for(this.beginUpdateNodeKeyRelatedObjects();this.updateNodeKeyRelatedObjectsStack.length>0;){var e=this.updateNodeKeyRelatedObjectsStack[0];this.updateNodeKeyRelatedObjects(e.shape,e.nodeObj),this.updateNodeKeyRelatedObjectsStack.splice(0,1),e.shape.description.hasTemplate&&e.nodeObj&&this.changesListener.reloadInsertedItem(e.nodeObj.key)}this.endUpdateNodeKeyRelatedObjects()},t.prototype.beginUpdateNodeKeyRelatedObjects=function(){this.updateNodeKeyRelatedObjectsCount++},t.prototype.endUpdateNodeKeyRelatedObjects=function(){this.updateNodeKeyRelatedObjectsCount--,0===this.updateNodeKeyRelatedObjectsCount&&this.raiseUpdateNodeKeyRelatedObjectsStack()},t.prototype.isInUpdateNodeKeyRelatedObjects=function(){return this.updateNodeKeyRelatedObjectsCount>0},t.prototype.addToUpdateNodeKeyRelatedObjectsStackAction=function(e,t){for(var n=new m(e,t),i=0;i0;){var e=this.updateNodeKeyRelatedObjectsStackActions[0];switch(e.kind){case"shape":this.updateNodeObjectContainerOrParentKeyInternal(e.nodeObj,this.changesListener);break;case"edge":this.updateEdgeObjectFromOrToPropertyInternal(e.nodeObj,this.changesListener)}this.updateNodeKeyRelatedObjectsStackActions.splice(0,1)}},t.prototype.beginChangesNotification=function(){this.changesListener.beginChangesNotification()},t.prototype.endChangesNotification=function(e){this.changesListener.endChangesNotification(e)},t}(l.DataSource);t.DocumentDataSource=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataSource=void 0;var i=n(12),o=n(0),r=n(2),a=n(48),s=n(66),l=n(53),u=n(67),c=n(115),d=n(88),h=n(69),p=n(116),f=n(117),m=n(146),g=n(153),v=n(102),_=n(89),y=n(70),b=n(6),C=n(4),x=n(1),w=n(43),S=n(3),T=n(22),O=n(44),E=n(110),I=n(64),k=n(347),D=n(348),A=n(86),P=function(){function e(e,t,n,i,o,r){if(this.key=e,this.nodes=[],this.edges=[],this.autoGeneratedDataKeys={},this.addInternalKeyOnInsert=!1,this.useNodeParentId=!1,this.useNodeContainerId=!1,this.useNodeChildren=!1,this.useNodeItems=!1,this.canUseAutoSize=!1,this.canUpdateEdgeDataSource=!1,this.containers=null,null==e)throw new Error("DataSource key must be specified");this.key=e.toString(),this.loadParameters(i||{}),this.nodeDataImporter=this.createNodeDataImporter(o),this.edgeDataImporter=this.createEdgeDataImporter(r),this.nodeDataSource=t||[],this.edgeDataSource=n||[],this.canUpdateEdgeDataSource=!!n,this.fetchData()}return e.prototype.loadParameters=function(e){this.addInternalKeyOnInsert=!!e.addInternalKeyOnInsert},e.prototype.isAutoGeneratedKey=function(e){return e&&!!this.autoGeneratedDataKeys[e]},e.prototype.createNodeDataImporter=function(e){var t=new k.DataSourceNodeDataImporter;return e&&this.assignNodeDataImporterProperties(e,t),t},e.prototype.createEdgeDataImporter=function(e){var t=new k.DataSourceEdgeDataImporter;return e&&this.assignEdgeDataImporterProperties(e,t),t},e.prototype.assignItemDataImporterProperties=function(e,t){e.getKey&&(t.getKey=e.getKey),e.setKey&&(t.setKey=e.setKey),e.getCustomData&&(t.getCustomData=e.getCustomData),e.setCustomData&&(t.setCustomData=e.setCustomData),e.getLocked&&(t.getLocked=e.getLocked),e.setLocked&&(t.setLocked=e.setLocked),e.getStyle&&(t.getStyle=e.getStyle),e.setStyle&&(t.setStyle=e.setStyle),e.getStyleText&&(t.getStyleText=e.getStyleText),e.setStyleText&&(t.setStyleText=e.setStyleText),e.getZIndex&&(t.getZIndex=e.getZIndex),e.setZIndex&&(t.setZIndex=e.setZIndex)},e.prototype.assignNodeDataImporterProperties=function(e,t){this.assignItemDataImporterProperties(e,t),e.getType&&(t.getType=e.getType),e.setType&&(t.setType=e.setType),e.getImage&&(t.getImage=e.getImage),e.setImage&&(t.setImage=e.setImage),e.getText&&(t.getText=e.getText),e.setText&&(t.setText=e.setText),e.getLeft&&(t.getLeft=e.getLeft),e.setLeft&&(t.setLeft=e.setLeft),e.getTop&&(t.getTop=e.getTop),e.setTop&&(t.setTop=e.setTop),e.getWidth&&(t.getWidth=e.getWidth),e.setWidth&&(t.setWidth=e.setWidth),e.getHeight&&(t.getHeight=e.getHeight),e.setHeight&&(t.setHeight=e.setHeight),e.getChildren&&(t.getChildren=e.getChildren),e.setChildren&&(t.setChildren=e.setChildren),e.getParentKey&&(t.getParentKey=e.getParentKey),e.setParentKey&&(t.setParentKey=e.setParentKey),e.getItems&&(t.getItems=e.getItems),e.setItems&&(t.setItems=e.setItems),e.getContainerKey&&(t.getContainerKey=e.getContainerKey),e.setContainerKey&&(t.setContainerKey=e.setContainerKey)},e.prototype.assignEdgeDataImporterProperties=function(e,t){this.assignItemDataImporterProperties(e,t),e.getFrom&&(t.getFrom=e.getFrom),e.setFrom&&(t.setFrom=e.setFrom),e.getFromPointIndex&&(t.getFromPointIndex=e.getFromPointIndex),e.setFromPointIndex&&(t.setFromPointIndex=e.setFromPointIndex),e.getTo&&(t.getTo=e.getTo),e.setTo&&(t.setTo=e.setTo),e.getToPointIndex&&(t.getToPointIndex=e.getToPointIndex),e.setToPointIndex&&(t.setToPointIndex=e.setToPointIndex),e.getPoints&&(t.getPoints=e.getPoints),e.setPoints&&(t.setPoints=e.setPoints),e.getText&&(t.getText=e.getText),e.setText&&(t.setText=e.setText),e.getLineOption&&(t.getLineOption=e.getLineOption),e.setLineOption&&(t.setLineOption=e.setLineOption),e.getStartLineEnding&&(t.getStartLineEnding=e.getStartLineEnding),e.setStartLineEnding&&(t.setStartLineEnding=e.setStartLineEnding),e.getEndLineEnding&&(t.getEndLineEnding=e.getEndLineEnding),e.setEndLineEnding&&(t.setEndLineEnding=e.setEndLineEnding)},e.prototype.fetchData=function(){var e=this;if(this.nodes=[],this.edges=[],this.autoGeneratedDataKeys={},this.useNodeParentId=void 0!==this.nodeDataImporter.getParentKey,this.useNodeContainerId=void 0!==this.nodeDataImporter.getContainerKey,this.useNodeItems=void 0!==this.nodeDataImporter.getItems,this.useNodeChildren=void 0!==this.nodeDataImporter.getChildren,this.canUseAutoSize=void 0===this.nodeDataImporter.getWidth&&void 0!==this.nodeDataImporter.getText,this.useEdgesArray()&&this.useNodeParentId)throw new Error("You cannot use edges array and parentKey simultaneously.");if(this.useEdgesArray()&&this.useNodeItems)throw new Error("You cannot use edges array and items array simultaneously.");if(this.useNodeParentId&&this.useNodeItems)throw new Error("You cannot use parentKey and items array simultaneously.");if(this.useNodeContainerId&&this.useNodeChildren)throw new Error("You cannot use containerKey and children array simultaneously.");this.nodeDataSource.forEach((function(t){e.addNode(t)})),this.useEdgesArray()?this.edgeDataSource.forEach((function(t){e.addEdge(t)})):this.nodes.forEach((function(t){e.addNodeEdgesByParentId(t)}))},e.prototype.isContainer=function(e){var t=this;return!this.containers&&this.useNodeContainerId&&(this.containers=this.nodeDataSource.map((function(e){return t.nodeDataImporter.getContainerKey(e)})).filter((function(e){return null!=e})).reduce((function(e,t){return e[t]=!0,e}),{})),this.containers&&this.containers[e]},e.prototype.refetchData=function(e,t){var n=this;this.nodeDataSource=e||this.nodeDataSource,this.edgeDataSource=t||this.edgeDataSource;var i=this.nodes.slice(),o=this.edges.slice();return this.fetchData(),{nodes:this.getItemChanges(i,this.nodes,(function(e,t){return e.key===t.key||e.dataObj===t.dataObj})),edges:this.getItemChanges(o,this.edges,(function(e,t){return n.useNodeParentId||n.useNodeItems?e.key===t.key||e.from===t.from&&e.to===t.to:e.key===t.key||e.dataObj===t.dataObj}))}},e.prototype.getItemChanges=function(e,t,n){var i=this,o=e.filter((function(e){return i.containsItem(t,e,n)})),r=e.filter((function(e){return!i.containsItem(t,e,n)})),a=t.filter((function(t){return!i.containsItem(e,t,n)}));return{remained:o.map((function(e){return e.key})),remainedNewKeys:o.map((function(e){var i;return null===(i=t.find((function(t){return n(e,t)})))||void 0===i?void 0:i.key})),removed:r.map((function(e){return e.key})),added:a.map((function(e){return e.key}))}},e.prototype.containsItem=function(e,t,n){var i=!1;return e.forEach((function(e){!i&&n(e,t)&&(i=!0)})),i},e.prototype.useEdgesArray=function(){return Array.isArray(this.edgeDataSource)&&(this.edgeDataSource.length||!(this.useNodeParentId||this.useNodeItems))},e.prototype.addNode=function(e,t,n,i){var o=this,r=this.nodeDataImporter.getChildren&&this.nodeDataImporter.getChildren(e),a=r&&Array.isArray(r)&&r.length,s=a||this.isContainer(this.nodeDataImporter.getKey(e)),l=this.nodeDataImporter.getType&&this.nodeDataImporter.getType(e)||s&&x.ShapeTypes.VerticalContainer||x.ShapeTypes.Rectangle,u=this.nodeDataImporter.getText&&(this.nodeDataImporter.getText(e)||""),c=this.addNodeInternal(e,l,u,t,n,i);if(this.assignNodeProperties(c,e),a&&r.forEach((function(t){o.addNode(t,void 0,c.key,e)})),this.useNodeItems){var d=this.nodeDataImporter.getItems(e);Array.isArray(d)&&d.length&&d.forEach((function(t){var r=o.addNode(t,e,n,i);o.addEdgeInternal(void 0,c.key,r.key)}))}return c},e.prototype.addNodeEdgesByParentId=function(e){if(this.useNodeParentId){var t=this.nodeDataImporter.getParentKey(e.dataObj);null!=t&&this.findNode(t)&&this.addEdgeInternal(void 0,this.getNodeKey(e.dataObj,this.nodeDataImporter.getParentKey),this.getNodeKey(e.dataObj,this.nodeDataImporter.getKey))}},e.prototype.addNodeInternal=function(e,t,n,i,o,r){var a=this.nodeDataImporter.getKey(e),s=null!=a?a:C.ModelUtils.getGuidItemKey(),l=new D.DataSourceNodeItem(this.key,s,e,t,n,i,o,r);return this.nodes.push(l),null==a&&(a=s,this.autoGeneratedDataKeys[s]=!0),l},e.prototype.addEdge=function(e){var t=this.addEdgeInternal(e,this.getNodeKey(e,this.edgeDataImporter.getFrom),this.getNodeKey(e,this.edgeDataImporter.getTo));return this.assignEdgeProperties(t,e),t},e.prototype.addEdgeInternal=function(e,t,n){var i=e&&this.edgeDataImporter.getKey(e),o=null!=i?i:C.ModelUtils.getGuidItemKey(),r=new D.DataSourceEdgeItem(this.key,o,e,t,n);return this.edges.push(r),null==i&&(i=o,this.autoGeneratedDataKeys[o]=!0),r},e.prototype.assignItemProperties=function(e,t,n){if(n.getCustomData&&(e.customData=S.ObjectUtils.cloneObject(n.getCustomData(t))),n.getLocked&&(e.locked=n.getLocked(t)),n.getStyle){var i=n.getStyle(t);e.style="string"==typeof i?O.Data.cssTextToObject(i):i}n.getStyleText&&(i=n.getStyleText(t),e.styleText="string"==typeof i?O.Data.cssTextToObject(i):i),n.getZIndex&&(e.zIndex=n.getZIndex(t))},e.prototype.assignNodeProperties=function(e,t){this.assignItemProperties(e,t,this.nodeDataImporter),this.nodeDataImporter.getImage&&(e.image=this.nodeDataImporter.getImage(t)),this.nodeDataImporter.getLeft&&(e.left=this.nodeDataImporter.getLeft(t)),this.nodeDataImporter.getTop&&(e.top=this.nodeDataImporter.getTop(t)),this.nodeDataImporter.getWidth&&(e.width=this.nodeDataImporter.getWidth(t)),this.nodeDataImporter.getHeight&&(e.height=this.nodeDataImporter.getHeight(t)),this.nodeDataImporter.getContainerKey&&(e.containerKey=this.nodeDataImporter.getContainerKey(t))},e.prototype.assignEdgeProperties=function(e,t){if(this.assignItemProperties(e,t,this.edgeDataImporter),this.edgeDataImporter.getFromPointIndex&&(e.fromPointIndex=this.edgeDataImporter.getFromPointIndex(t)),this.edgeDataImporter.getToPointIndex&&(e.toPointIndex=this.edgeDataImporter.getToPointIndex(t)),this.edgeDataImporter.getPoints&&(e.points=this.edgeDataImporter.getPoints(t)),this.edgeDataImporter.getText){var n=this.edgeDataImporter.getText(t);if(e.texts={},"object"==typeof n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=parseFloat(i),r=n[i];isNaN(o)||"string"!=typeof r||""===r||(o=Math.min(1,Math.max(0,o)),e.texts[o]=r)}}else"string"==typeof n&&""!==n&&(e.texts[b.CONNECTOR_DEFAULT_TEXT_POSITION]=n)}this.edgeDataImporter.getLineOption&&(e.lineOption=this.edgeDataImporter.getLineOption(t)),this.edgeDataImporter.getStartLineEnding&&(e.startLineEnding=this.edgeDataImporter.getStartLineEnding(t)),this.edgeDataImporter.getEndLineEnding&&(e.endLineEnding=this.edgeDataImporter.getEndLineEnding(t))},e.prototype.findNode=function(e){return this.nodes.filter((function(t){return void 0!==e&&t.key===e}))[0]},e.prototype.findEdge=function(e){return this.edges.filter((function(t){return void 0!==e&&t.key===e}))[0]},e.prototype.getNodeKey=function(e,t){return t(e)},e.prototype.createModelItems=function(e,t,n,i,r,a,s,l){var u=this;this.beginChangesNotification(),e.clear(),e.beginTransaction(),C.ModelUtils.deleteAllItems(e,t,i),t.initializeKeyCounter();var c=0,d=0,h={},p=[],f=[];this.nodes.forEach((function(f){var m=new o.Point(2e3*d++,2e3*c),g=u.createShapeByNode(e,t,i,n,f,m,r,a,s,l);void 0!==f.key&&(h[f.key]=g.key),d>4&&(d=0,c++),p.push(g)})),this.nodes.forEach((function(n){if(void 0!==n.containerKey&&null!==n.containerKey){var i=h[n.key],o=t.findShape(i),r=h[n.containerKey],a=t.findShape(r);a&&C.ModelUtils.insertToContainer(e,t,o,a)}})),this.edges.forEach((function(n){var o=t.findShape(h[n.to]),r=t.findShape(h[n.from]),a=u.createConnectorByEdge(e,t,i,n,r,o);a&&(f.push(a),C.ModelUtils.updateConnectorContainer(e,t,a))})),r.needAutoLayout&&this.applyLayout(e,t,p,f,r,a,s),C.ModelUtils.tryUpdateModelRectangle(e),e.endTransaction(!0),this.endChangesNotification(!0)},e.prototype.updateModelItems=function(e,t,n,i,r,a,s,l,u,c,d,h){var p=this;this.beginChangesNotification(),e.beginTransaction();var f=[],m=[],g=[],v=u.nodes.removed.map((function(e){return t.findShapeByDataKey(e)})).filter((function(e){return e}));v.forEach((function(e){e.attachedConnectors.forEach((function(t){t.beginItem&&t.beginItem!==e&&m.push(t.beginItem),t.endItem&&t.endItem!==e&&m.push(t.endItem)}))})),C.ModelUtils.deleteItems(e,t,i,v,!0);var _=u.edges.removed.map((function(e){return t.findConnectorByDataKey(e)})).filter((function(e){return e}));_.forEach((function(e){e.beginItem&&m.push(e.beginItem),e.endItem&&m.push(e.endItem)})),C.ModelUtils.deleteItems(e,t,i,_,!0),m=this.purgeLayoutShapes(m,v),(s||[]).forEach((function(a){if(-1!==u.nodes.remained.indexOf(a)){var s=p.findNode(a);if(s){var l=t.findShapeByDataKey(a);if(l){var g=l.position.clone();p.changeShapeByDataItem(e,t,l,s,g),p.changeItemByDataItem(e,l,s)}else l=p.createShapeByNode(e,t,i,n,s,new o.Point(0,0),r,c,d,h);p.updateShapeContainer(e,t,l,s),m.push(l),f.push(l)}}})),u.nodes.remained.forEach((function(e,n){var i=t.findShapeByDataKey(e);i&&(i.dataKey=u.nodes.remainedNewKeys[n])})),u.nodes.added.forEach((function(a){var s=p.findNode(a),l=p.createShapeByNode(e,t,i,n,s,new o.Point(0,0),r,c,d,h);p.updateShapeContainer(e,t,l,s),m.push(l)})),u.edges.added.forEach((function(n){var o=p.findEdge(n),r=t.findShapeByDataKey(o.from),a=t.findShapeByDataKey(o.to),s=p.createConnectorByEdge(e,t,i,o,r,a);s&&(C.ModelUtils.updateConnectorContainer(e,t,s),g.push(s))}));var y=s||[];u.edges.remained.forEach((function(e){var t=p.findEdge(e);!t||-1===u.nodes.added.indexOf(t.from)&&-1===u.nodes.added.indexOf(t.to)||y.push(e)})),y.forEach((function(n){if(-1!==u.edges.remained.indexOf(n)){var o=p.findEdge(n);if(o){var r=t.findShapeByDataKey(o.from),a=t.findShapeByDataKey(o.to),s=t.findConnectorByDataKey(n);s?(p.changeConnectorPointsByDataItem(e,s,p.getConnectorPointsByEdge(t,o,r,a,!1)),p.changeConnectorByDataItem(e,t,s,r,a,o),p.changeItemByDataItem(e,s,o)):s=p.createConnectorByEdge(e,t,i,o,r,a),s&&(C.ModelUtils.updateConnectorContainer(e,t,s),g.push(s),f.push(s))}}})),u.edges.remained.forEach((function(e,n){var i=t.findConnectorByDataKey(e);i&&(i.dataKey=u.edges.remainedNewKeys[n])})),f.length&&l&&f.forEach((function(e){e.hasTemplate&&l(e)})),r.needAutoLayout&&(m.length||g.length)&&this.applyLayout(e,t,m,g,r,c,d),C.ModelUtils.tryUpdateModelRectangle(e),e.endTransaction(!a),this.endChangesNotification(!1)},e.prototype.purgeLayoutShapes=function(e,t){var n=t.reduce((function(e,t){return(e[t.key]=!0)&&e}),{});return e.reduce((function(e,t){return void 0===e.keySet[t.key]&&void 0===n[t.key]&&(e.uniqueShapes.push(t),e.keySet[t.key]=!0),e}),{uniqueShapes:[],keySet:{}}).uniqueShapes},e.prototype.applyShapeAutoSize=function(e,t,n,o,a,s){if(o.description.enableText){var l=o.textRectangle.createSize(),u=o.size,d=l.width-u.width,h=l.height-u.height,p=o.getMaxWidth(n.shapeMaxWidth),f=o.getMaxHeight(n.shapeMaxHeight),m=function(e,t){return"number"==typeof e?i.UnitConverter.twipsToPixelsF(e+(t?d:h)):void 0},g=I.getOptimalTextRectangle(o.text,o.styleText,w.TextOwner.Shape,t,l.clone().applyConverter(i.UnitConverter.twipsToPixelsF),o.description.keepRatioOnAutoSize,m(o.getMinWidth(n.shapeMinWidth),!0),m(p,!0),m(o.getMinHeight(n.shapeMinHeight),!1),m(f,!1)).clone().applyConverter(i.UnitConverter.pixelsToTwips);if(!g.equals(l)){var v=o.description.getSizeByText(g,o);a&&s&&(v=new r.Size(Math.min(s*Math.ceil(v.width/s),p||Number.MAX_VALUE),Math.min(s*Math.ceil(v.height/s),f||Number.MAX_VALUE))),e.addAndRedo(new c.ResizeShapeHistoryItem(o.key,o.position,v))}}},e.prototype.applyLayout=function(e,t,n,i,o,r,a){C.ModelUtils.getGraphInfoByItems(t,n,i).forEach((function(s){var l=o.getLayoutBuilder(s.graph).build(),u=C.ModelUtils.getNonGraphItems(t,s.container,l.nodeToLayout,n,i);C.ModelUtils.applyLayout(e,t,s.container,s.graph,l,u,o.layoutSettings,r,a,o.skipPointIndices)}))},e.prototype.changeItemByDataItem=function(e,t,n){if(void 0===n.customData||S.ObjectUtils.compareObjects(n.customData,t.customData)||e.addAndRedo(new p.ChangeCustomDataHistoryItem(t.key,n.customData)),void 0!==n.zIndex&&n.zIndex!==t.zIndex&&e.addAndRedo(new v.ChangeZindexHistoryItem(t,n.zIndex)),void 0!==n.style)for(var i in n.style)Object.prototype.hasOwnProperty.call(n.style,i)&&(r=this.getPreparedStyleValue(n.style[i],E.isColorProperty(i)))!==t.style[i]&&e.addAndRedo(new _.ChangeStyleHistoryItem(t.key,i,r));var o=t.style.getDefaultInstance();if(t.style.forEach((function(i){n.style&&void 0===n.style[i]&&t.style[i]!==o[i]&&e.addAndRedo(new _.ChangeStyleHistoryItem(t.key,i,o[i]))})),void 0!==n.styleText)for(var i in n.styleText){var r;Object.prototype.hasOwnProperty.call(n.styleText,i)&&(r=this.getPreparedStyleValue(n.styleText[i],E.isColorProperty(i)))!==t.styleText[i]&&e.addAndRedo(new y.ChangeStyleTextHistoryItem(t.key,i,r))}var a=t.styleText.getDefaultInstance();t.styleText.forEach((function(i){n.styleText&&void 0===n.styleText[i]&&t.styleText[i]!==a[i]&&e.addAndRedo(new y.ChangeStyleTextHistoryItem(t.key,i,a[i]))})),void 0!==n.locked&&n.locked!==t.locked&&e.addAndRedo(new f.ChangeLockedHistoryItem(t,n.locked))},e.prototype.getPreparedStyleValue=function(e,t){if(t){var n=T.ColorUtils.stringToHash(e);null!==n&&(e=n)}return e},e.prototype.createShapeByNode=function(e,t,n,i,o,r,a,s,u,c){var d=new l.AddShapeHistoryItem(i.get(o.type),r,"",o.key);e.addAndRedo(d);var h=t.findShape(d.shapeKey);return C.ModelUtils.updateNewShapeProperties(e,n,d.shapeKey),this.changeShapeByDataItem(e,t,h,o,r),this.changeItemByDataItem(e,h,o),c&&this.canUseAutoSize&&a.autoSizeEnabled&&this.applyShapeAutoSize(e,c,a.sizeSettings,h,s,u),h},e.prototype.changeShapeByDataItem=function(e,t,n,i,o){void 0!==i.left&&(o.x=C.ModelUtils.getTwipsValue(t.units,i.left)),void 0!==i.top&&(o.y=C.ModelUtils.getTwipsValue(t.units,i.top)),C.ModelUtils.setShapePosition(e,t,n,o,!1);var r=n.size.clone();void 0!==i.width&&(r.width=C.ModelUtils.getTwipsValue(t.units,i.width)),void 0!==i.height&&(r.height=C.ModelUtils.getTwipsValue(t.units,i.height)),C.ModelUtils.setShapeSize(e,t,n,o,r),C.ModelUtils.updateShapeAttachedConnectors(e,t,n),void 0!==i.text&&i.text!==n.text&&e.addAndRedo(new g.ChangeShapeTextHistoryItem(n,i.text)),void 0!==i.image&&i.image!==n.image.actualUrl&&e.addAndRedo(new m.ChangeShapeImageHistoryItem(n,i.image))},e.prototype.updateShapeContainer=function(e,t,n,i){var o=void 0!==i.containerKey?t.findShapeByDataKey(i.containerKey):void 0;o!==n.container&&(o?C.ModelUtils.insertToContainer(e,t,n,o):C.ModelUtils.removeFromContainer(e,t,n))},e.prototype.getConnectorPointsByEdge=function(e,t,n,i,o){var r=[],a=this.createModelPointFromDataSourceEdgeItemPoints(e.units,t);if(a&&a.length>1)for(var s=a.length-1,l=0;l<=s;l++){var u=a[l];if(null!==u)r.push(u);else{if(!n&&!i)return;0===l&&n?r.push(n.position.clone()):l===s&&i&&r.push(i.position.clone())}}else o&&(n&&r.push(n.position.clone()),i&&r.push(i.position.clone()));return r},e.prototype.createModelPointFromDataSourceEdgeItemPoints=function(e,t){var n=this,i=[];if(Array.isArray(t.points))return t.points.forEach((function(t){return i.push(n.isValidDataSourceEdgeItemPoint(t)?n.createModelPoint(e,t):null)})),i},e.prototype.createModelPoint=function(e,t){return new o.Point(C.ModelUtils.getTwipsValue(e,t.x),C.ModelUtils.getTwipsValue(e,t.y))},e.prototype.isValidDataSourceEdgeItemPoint=function(e){return null!=e&&void 0!==e.x&&void 0!==e.y&&null!==e.x&&null!==e.y},e.prototype.createConnectorByEdge=function(e,t,n,i,o,r){var a,l=i.key,u=this.getConnectorPointsByEdge(t,i,o,r,!0);if(u&&u.length>1){var c=new s.AddConnectorHistoryItem(u,l);e.addAndRedo(c),a=t.findConnector(c.connectorKey),C.ModelUtils.updateNewConnectorProperties(e,n,c.connectorKey),this.changeConnectorByDataItem(e,t,a,o,r,i),this.changeItemByDataItem(e,a,i)}return a},e.prototype.changeConnectorByDataItem=function(e,t,n,i,o,r){var s=void 0!==r.fromPointIndex?r.fromPointIndex:n.beginConnectionPointIndex;n.beginItem===i&&n.beginConnectionPointIndex===s||(n.beginItem&&e.addAndRedo(new u.DeleteConnectionHistoryItem(n,b.ConnectorPosition.Begin)),i&&e.addAndRedo(new a.AddConnectionHistoryItem(n,i,s,b.ConnectorPosition.Begin)));var l=void 0!==r.toPointIndex?r.toPointIndex:n.endConnectionPointIndex;if(n.endItem===o&&n.endConnectionPointIndex===l||(n.endItem&&e.addAndRedo(new u.DeleteConnectionHistoryItem(n,b.ConnectorPosition.End)),o&&e.addAndRedo(new a.AddConnectionHistoryItem(n,o,l,b.ConnectorPosition.End))),C.ModelUtils.updateConnectorAttachedPoints(e,t,n),void 0!==r.texts&&!this.compareTexts(r,n))for(var c in n.texts.forEach((function(t){e.addAndRedo(new h.ChangeConnectorTextHistoryItem(n,t.position,void 0))})),r.texts)if(Object.prototype.hasOwnProperty.call(r.texts,c)){var p=parseFloat(c);e.addAndRedo(new h.ChangeConnectorTextHistoryItem(n,p,r.texts[c]))}void 0!==r.lineOption&&r.lineOption!==n.properties.lineOption&&e.addAndRedo(new d.ChangeConnectorPropertyHistoryItem(n.key,"lineOption",r.lineOption)),void 0!==r.startLineEnding&&r.startLineEnding!==n.properties.startLineEnding&&e.addAndRedo(new d.ChangeConnectorPropertyHistoryItem(n.key,"startLineEnding",r.startLineEnding)),void 0!==r.endLineEnding&&r.endLineEnding!==n.properties.endLineEnding&&e.addAndRedo(new d.ChangeConnectorPropertyHistoryItem(n.key,"endLineEnding",r.endLineEnding))},e.prototype.changeConnectorPointsByDataItem=function(e,t,n){n&&n.length>1&&n.join(",")!==t.points.join(",")&&e.addAndRedo(new A.ReplaceConnectorPointsHistoryItem(t.key,n))},e.prototype.compareTexts=function(e,t){var n=e.texts||{},i=Object.keys(n).length===t.getTextCount();if(i)for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var r=parseFloat(o);this.compareStrings(t.getText(r),n[o])||(i=!1)}return i},e.prototype.compareStrings=function(e,t){return"string"==typeof e&&"string"==typeof t?e===t:this.isEmptyString(e)&&this.isEmptyString(t)},e.prototype.isEmptyString=function(e){return""===e||null==e},e}();t.DataSource=P},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DataSourceEdgeDataImporter=t.DataSourceNodeDataImporter=t.DataSourceItemDataImporter=void 0;var r=function(){return function(){this.getKey=function(e){return e.id},this.setKey=function(e,t){e.id=t},this.getCustomData=void 0,this.setCustomData=void 0,this.getLocked=void 0,this.setLocked=void 0,this.getStyle=void 0,this.setStyle=void 0,this.getStyleText=void 0,this.setStyleText=void 0,this.getZIndex=void 0,this.setZIndex=void 0}}();t.DataSourceItemDataImporter=r;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getType=void 0,t.setType=void 0,t.getText=void 0,t.setText=void 0,t.getImage=void 0,t.setImage=void 0,t.getLeft=void 0,t.setLeft=void 0,t.getTop=void 0,t.setTop=void 0,t.getWidth=void 0,t.setWidth=void 0,t.getHeight=void 0,t.setHeight=void 0,t.getChildren=void 0,t.setChildren=void 0,t.getParentKey=void 0,t.setParentKey=void 0,t.getItems=void 0,t.setItems=void 0,t.getContainerKey=void 0,t.setContainerKey=void 0,t}return o(t,e),t}(r);t.DataSourceNodeDataImporter=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getFrom=function(e){return e.from},t.setFrom=function(e,t){e.from=t},t.getFromPointIndex=void 0,t.setFromPointIndex=void 0,t.getTo=function(e){return e.to},t.setTo=function(e,t){e.to=t},t.getToPointIndex=void 0,t.setToPointIndex=void 0,t.getPoints=void 0,t.setPoints=void 0,t.getText=void 0,t.setText=void 0,t.getLineOption=void 0,t.setLineOption=void 0,t.getStartLineEnding=void 0,t.setStartLineEnding=void 0,t.getEndLineEnding=void 0,t.setEndLineEnding=void 0,t}return o(t,e),t}(r);t.DataSourceEdgeDataImporter=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DataSourceEdgeItem=t.DataSourceNodeItem=t.DataSourceItem=void 0;var r=n(6),a=function(){return function(e,t,n){this.sourceKey=e,this.key=t,this.dataObj=n}}();t.DataSourceItem=a;var s=function(e){function t(t,n,i,o,r,a,s,l){var u=e.call(this,t,n,i)||this;return u.type=o,u.text=r,u.parentDataObj=a,u.containerKey=s,u.containerDataObj=l,u}return o(t,e),t}(a);t.DataSourceNodeItem=s;var l=function(e){function t(t,n,i,o,r){var a=e.call(this,t,n,i)||this;return a.sourceKey=t,a.from=o,a.to=r,a}return o(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.texts&&this.texts[r.CONNECTOR_DEFAULT_TEXT_POSITION]},enumerable:!1,configurable:!0}),t}(a);t.DataSourceEdgeItem=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewController=void 0;var i=n(82),o=Math.log(.05),r=Math.log(3),a=40,s=d(1),l=[i.DiagramCommand.ZoomLevel,i.DiagramCommand.ZoomLevelInPercentage,i.DiagramCommand.Zoom100,i.DiagramCommand.Zoom125,i.DiagramCommand.Zoom200,i.DiagramCommand.Zoom25,i.DiagramCommand.Zoom50,i.DiagramCommand.Zoom75],u=[i.DiagramCommand.SwitchAutoZoom,i.DiagramCommand.ToggleAutoZoom,i.DiagramCommand.AutoZoomToContent,i.DiagramCommand.AutoZoomToWidth],c=function(){function e(e,t){this.settings=e,this.bars=t,e.onZoomChanged.add(this),this.autoZoom=e.autoZoom}return e.prototype.initialize=function(e){this.view=e,this.view.onViewChanged.add(this)},e.prototype.scrollTo=function(e,t){this.view&&this.view.setScrollTo(e,t)},e.prototype.scrollBy=function(e){return!this.view||0===e.x&&0===e.y?e:this.view.scrollBy(e)},e.prototype.scrollIntoView=function(e){this.view&&this.view.scrollIntoView(e)},e.prototype.normalize=function(){this.view.tryNormalizePaddings()},e.prototype.getNextStepZoom=function(e){var t=this.getNearestCurrentZoomStep(),n=e?1:-1,i=Math.min(a-1,Math.max(0,t+n));if(i!==s){var l=o+(r-o)*i/(a-1);return Math.exp(l)}return 1},e.prototype.getNearestCurrentZoomStep=function(){return d(this.getZoom())},e.prototype.getZoom=function(){return this.view?this.view.actualZoom:this.settings.zoomLevel},e.prototype.resetScroll=function(){this.view.adjust({horizontal:!0,vertical:!0})},e.prototype.notifyViewAdjusted=function(e){},e.prototype.notifyActualZoomChanged=function(e){this.bars.updateItemsState(l)},e.prototype.notifyZoomChanged=function(e,t){this.autoZoom!==t&&(this.autoZoom=t,this.bars.updateItemsState(u))},e}();function d(e){var t=Math.log(e);return Math.round((t-o)*(a-1)/(r-o))}t.ViewController=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolboxManager=void 0;var i=n(351),o=n(352),r=n(79),a=n(31),s=function(){function e(e){this.shapeDescriptionManager=e,this.toolboxes=[],this.measurers={}}return e.prototype.create=function(e,t,n,r,a,s,l){var u=Array.isArray(a)?a:this.shapeDescriptionManager.getTypesByCategory(a),c=r?new i.TextToolbox(e,t,n,this.shapeDescriptionManager,u,s):new o.IconToolbox(e,t,n,this.shapeDescriptionManager,u,s,l,this.getOrCreateMeasurer(e));return c.render(),this.toolboxes.push(c),c},e.prototype.clean=function(e,t){var n=this;if(t)t.clean(e),this.toolboxes.splice(this.toolboxes.indexOf(t),1),Object.keys(this.measurers).forEach((function(e){n.measurers[e]===t.measurer&&delete n.measurers[e]}));else{for(var i=0;i-1||n===e)&&t.render()}))},e.prototype.applyFilter=function(e,t){var n=this;return this.toolboxes.reduce((function(i,o,r){return(!t||Array.isArray(t)&&t.indexOf(r)>-1||r===t)&&o.render((function(t){return n.searchFilter(t,e,r)}))&&i.push(r),i}),[])},e.prototype.searchFilter=function(e,t,n,i){if(!t||i&&-1===i.indexOf(n))return!0;t=t.toLowerCase();var o=this.shapeDescriptionManager.get(e);return o.getTitle().toLowerCase().indexOf(t)>-1||o.getDefaultText().toLowerCase().indexOf(t)>-1},e.prototype.getOrCreateMeasurer=function(e){var t=e.getAttribute("data-dxdiMeasurerID");return t&&this.measurers[t]||(t=a.MathUtils.generateGuid(),this.measurers[t]=new r.TextMeasurer(e),e.setAttribute("data-dxdiMeasurerID",t)),this.measurers[t]},e}();t.ToolboxManager=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TextToolbox=void 0;var r=function(e){function t(t,n,i,o,r,a){return e.call(this,t,n,i,o,r,a)||this}return o(t,e),t.prototype.createElements=function(e,t){var n=this;t.forEach((function(t){var i=n.shapeDescriptionManager.get(t),o=document.createElement("div");o.setAttribute("class","toolbox-text-item"),o.setAttribute("data-tb-type",t),o.textContent=i.getDefaultText()||i.getTitle(),e.appendChild(o)}))},t.prototype.createDraggingElement=function(e){var t=document.createElement("DIV");t.setAttribute("class","dxdi-toolbox-drag-text-item");var n=this.shapeDescriptionManager.get(e.evt.data);return t.textContent=n.getDefaultText()||n.getTitle(),document.body.appendChild(t),t},t}(n(159).Toolbox);t.TextToolbox=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.IconToolbox=void 0;var r=n(159),a=n(15),s=n(14),l=n(12),u=n(0),c=n(121),d=n(26),h=n(126),p=n(21),f=function(e){function t(t,n,i,o,r,a,s,l){var u=e.call(this,t,n,i,o,r,a)||this;return u.options=s,u.measurer=l,u}return o(t,e),t.prototype.createElements=function(e,t){var n=document.createElementNS(a.svgNS,"svg");n.className.baseVal="dxdi-canvas",e.appendChild(n),this.drawShapeIcons(n,t,this.options.toolboxWidth||n.getBoundingClientRect().width)},t.prototype.drawShapeIcons=function(e,t,n){var i=this,o=d.DEFAULT_STROKE_WIDTH,r=n-2*o,a=this.options.shapeIconSize;!a&&this.options.shapeIconSpacing&&this.options.shapeIconCountInRow&&(a=Math.floor((r-(this.options.shapeIconCountInRow-1)*this.options.shapeIconSpacing)/this.options.shapeIconCountInRow)),a||(a=32);var s=a=Math.max(a,this.options.shapeIconSpacing/2),u=this.options.shapeIconCountInRow;if(!u)for(u=1;s1?(r-a*u)/(u-1):0,h=o,p=o,f=l.UnitConverter.pixelsToTwips(a);t.forEach((function(t,n){n>0&&n%u==0&&(h=o,p+=a+c);var r=i.shapeDescriptionManager.get(t),s=i.createShape(r,h,p,a<26);i.updateShapeIconBounds(s,a);var d=i.drawShape(e,s);i.drawSelector(d,l.UnitConverter.pixelsToTwips(h),l.UnitConverter.pixelsToTwips(p),f),h+=a+c})),e.style.height=p+a+o+"px",e.style.width=n+"px"},t.prototype.drawShape=function(e,t){var n=this,i=t.description.createPrimitives(t,!0),o=document.createElementNS(a.svgNS,"g");if(o.setAttribute("data-tb-type",t.description.key.toString()),o.setAttribute("class","toolbox-item"),o.setAttribute("title",t.description.getTitle()),this.options.shapeIconAttributes)for(var r in this.options.shapeIconAttributes)Object.prototype.hasOwnProperty.call(this.options.shapeIconAttributes,r)&&o.setAttribute(r,this.options.shapeIconAttributes[r]);return e.appendChild(o),i.forEach((function(e){var t=e.createElement((function(e){return o.appendChild(e)}));e.applyElementProperties(t,n.measurer)})),o},t.prototype.drawSelector=function(e,t,n,i){var o=this,r=new p.RectanglePrimitive(t,n,i,i,void 0,"selector");r.createElement((function(t){r.applyElementProperties(t,o.measurer),e.appendChild(t)}))},t.prototype.createShape=function(e,t,n,i){var o=l.UnitConverter.pixelsToTwips(t),r=l.UnitConverter.pixelsToTwips(n),a=new s.Shape(e,new u.Point(o,r),!0);return this.needResetShapeText(e)?a.text="":i&&(a.text="T"),a},t.prototype.needResetShapeText=function(e){return!(e instanceof c.TextShapeDescription)&&!(e instanceof h.CustomShapeDescription&&e.baseDescription instanceof c.TextShapeDescription)},t.prototype.updateShapeIconBounds=function(e,t){var n=l.UnitConverter.pixelsToTwips(t);if(e.size.height=e.size.width*e.getToolboxHeightToWidthRatio(),e.size.width>e.size.height){var i=e.size.height/e.size.width;e.size.width=n,e.size.height=n*i,e.position.y=e.position.y+(n-e.size.height)/2,e.parameters.forEach((function(t){t.value=t.value*n/e.description.defaultSize.width}))}else e.size.width0&&this.cache.forEach((function(n){n.equals(e)&&(t=n)})),t?n=t.allowed:(this.requestOperationCore(e),this.updateUICount>0&&this.cache.push(e),n=e.allowed),0===this.updateUICount&&this.storage.needStorePermissions())?(this.storage.storePermission(e.storageKey,n),this.storage.isStoredPermissionsGranted()):n},e.prototype.requestOperationCore=function(e){e.eventArgs.allowed=this.operationSettings[e.settingsKey],e.eventArgs.updateUI=this.updateUICount>0,e.allowed&&this.onRequestOperation.raise("notifyRequestOperation",e.operation,e.eventArgs)},e.prototype.lockPermissions=function(){this.permissionsLockCount++},e.prototype.unlockPermissions=function(){this.permissionsLockCount--},e.prototype.beginDeleteItems=function(e){var t=this;e.forEach((function(e){return t.requestDeleteItems[e.key]=e}))},e.prototype.endDeleteItems=function(){this.requestDeleteItems={}},e.prototype.beginUpdateUI=function(){this.updateUICount++},e.prototype.endUpdateUI=function(){this.updateUICount--},e.prototype.addInteractingItem=function(e,t){this.storage.addInteractingItem(e,t)},e.prototype.getInteractingItem=function(e,t){return this.storage.getInteractingItem(e,t)},e.prototype.getInteractingItemCount=function(){return this.storage.getInteractingItemCount()},e.prototype.clearInteractingItems=function(){this.storage.clearInteractingItems()},e.prototype.beginStorePermissions=function(){this.storage.beginStorePermissions()},e.prototype.endStorePermissions=function(){this.storage.endStorePermissions()},e.prototype.isStoredPermissionsGranted=function(){return this.permissionsLockCount>0||this.storage.isStoredPermissionsGranted()},e}();t.PermissionsProvider=b},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AddShapeEventArgs=t.AddShapeRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n){var i=e.call(this,t)||this;return i.shape=n,i}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.AddShape},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeShape(this.shape),this.apiController.convertPoint(this.shape.position))},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"addShape"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.shape===e.shape&&this.shape.position.equals(e.shape.position)},t}(a.RequestedEntity);t.AddShapeRequestedEntity=s;var l=function(e){function t(t,n){var i=e.call(this)||this;return i.shape=t,i.position=n,i}return o(t,e),t}(a.PermissionRequestEventArgs);t.AddShapeEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteShapeEventArgs=t.DeleteShapeRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n){var i=e.call(this,t)||this;return i.shape=n,i}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.DeleteShape},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeShape(this.shape))},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"deleteShape"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.shape===e.shape},t}(a.RequestedEntity);t.DeleteShapeRequestedEntity=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.shape=t,n}return o(t,e),t}(a.PermissionRequestEventArgs);t.DeleteShapeEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteConnectorEventArgs=t.DeleteConnectorRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n){var i=e.call(this,t)||this;return i.connector=n,i}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.DeleteConnector},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeConnector(this.connector))},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"deleteConnector"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.connector===e.connector},t}(a.RequestedEntity);t.DeleteConnectorRequestedEntity=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.connector=t,n}return o(t,e),t}(a.PermissionRequestEventArgs);t.DeleteConnectorEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AddShapeFromToolboxEventArgs=t.AddShapeFromToolboxRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n){var i=e.call(this,t)||this;return i.shapeType=n,i}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.AddShapeFromToolbox},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.shapeType)},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"addShapeFromToolbox"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+this.shapeType},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.shapeType===e.shapeType},t}(a.RequestedEntity);t.AddShapeFromToolboxRequestedEntity=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.shapeType=t,n}return o(t,e),t}(a.PermissionRequestEventArgs);t.AddShapeFromToolboxEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeConnectionEventArgs=t.ChangeConnectionRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n,i,o,r,a){var s=e.call(this,t)||this;return s.connector=n,s.shape=i,s.oldShape=o,s.position=r,s.connectionPointIndex=a,s}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.ChangeConnection},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeConnector(this.connector),this.apiController.createNativeShape(this.shape),this.apiController.createNativeShape(this.oldShape),this.position,this.connectionPointIndex)},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"changeConnection"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)+"_"+this.position},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){if(e instanceof t){var n=!this.connector&&!e.connector||this.connector&&e.connector&&this.connector===e.connector,i=!this.shape&&!e.shape||this.shape&&e.shape&&this.shape===e.shape,o=!this.oldShape&&!e.oldShape||this.oldShape&&e.oldShape&&this.oldShape===e.oldShape;return i&&o&&n&&this.position===e.position&&this.connectionPointIndex===e.connectionPointIndex}return!1},t}(a.RequestedEntity);t.ChangeConnectionRequestedEntity=s;var l=function(e){function t(t,n,i,o,r){var a=e.call(this)||this;return a.connector=t,a.shape=n,a.oldShape=i,a.position=o,a.connectionPointIndex=r,a}return o(t,e),t}(a.PermissionRequestEventArgs);t.ChangeConnectionEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeConnectorPointsEventArgs=t.ChangeConnectorPointsRequestedEntity=void 0;var r=n(16),a=n(23),s=n(3),l=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.connector=n,r.oldPoints=i,r.points=o,r}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.ChangeConnectorPoints},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){var e=this;return new u(this.apiController.createNativeConnector(this.connector),this.oldPoints.map((function(t){return e.apiController.convertPoint(t)})),this.points.map((function(t){return e.apiController.convertPoint(t)})))},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"changeConnectorPoints"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.connector===e.connector&&s.GeometryUtils.arePointsEqual(this.oldPoints,e.oldPoints)&&s.GeometryUtils.arePointsEqual(this.points,e.points)},t}(a.RequestedEntity);t.ChangeConnectorPointsRequestedEntity=l;var u=function(e){function t(t,n,i){var o=e.call(this)||this;return o.connector=t,o.oldPoints=n,o.points=i,o}return o(t,e),t}(a.PermissionRequestEventArgs);t.ChangeConnectorPointsEventArgs=u},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BeforeChangeShapeTextEventArgs=t.BeforeChangeShapeTextRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n){var i=e.call(this,t)||this;return i.shape=n,i}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.BeforeChangeShapeText},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeShape(this.shape))},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"changeShapeText"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return"before"+this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.shape===e.shape&&this.shape.text===e.shape.text},t}(a.RequestedEntity);t.BeforeChangeShapeTextRequestedEntity=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.shape=t,n}return o(t,e),t}(a.PermissionRequestEventArgs);t.BeforeChangeShapeTextEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BeforeChangeConnectorTextEventArgs=t.BeforeChangeConnectorTextRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.connector=n,o.position=i,o}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.BeforeChangeConnectorText},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeConnector(this.connector),this.position,this.connector.texts.map((function(e){return e})).sort((function(e,t){return e.position-t.position})).indexOf(this.connector.texts.get(this.position)))},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"changeConnectorText"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return"before"+this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.connector===e.connector&&this.position===e.position&&this.connector.texts.get(this.position)===e.connector.texts.get(e.position)},t}(a.RequestedEntity);t.BeforeChangeConnectorTextRequestedEntity=s;var l=function(e){function t(t,n,i){var o=e.call(this)||this;return o.connector=t,o.position=n,o.index=i,o}return o(t,e),t}(a.PermissionRequestEventArgs);t.BeforeChangeConnectorTextEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeShapeTextEventArgs=t.ChangeShapeTextRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.shape=n,o.text=i,o}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.ChangeShapeText},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeShape(this.shape),this.text)},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"changeShapeText"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.shape&&this.shape.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.shape===e.shape&&this.text===e.text},t}(a.RequestedEntity);t.ChangeShapeTextRequestedEntity=s;var l=function(e){function t(t,n){var i=e.call(this)||this;return i.shape=t,i.text=n,i}return o(t,e),t}(a.PermissionRequestEventArgs);t.ChangeShapeTextEventArgs=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeConnectorTextEventArgs=t.ChangeConnectorTextRequestedEntity=void 0;var r=n(16),a=n(23),s=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.connector=n,r.position=i,r.text=o,r}return o(t,e),Object.defineProperty(t.prototype,"operation",{get:function(){return r.DiagramModelOperation.ChangeConnectorText},enumerable:!1,configurable:!0}),t.prototype.createEventArgs=function(){return new l(this.apiController.createNativeConnector(this.connector),this.position,this.connector.texts.map((function(e){return e})).sort((function(e,t){return e.position-t.position})).indexOf(this.connector.texts.get(this.position)),this.text)},Object.defineProperty(t.prototype,"settingsKey",{get:function(){return"changeConnectorText"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storageKey",{get:function(){return this.settingsKey+"_"+(this.connector&&this.connector.key)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.connector===e.connector&&this.position===e.position&&this.text===e.text},t}(a.RequestedEntity);t.ChangeConnectorTextRequestedEntity=s;var l=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.connector=t,r.position=n,r.index=i,r.text=o,r}return o(t,e),t}(a.PermissionRequestEventArgs);t.ChangeConnectorTextEventArgs=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsProviderStorage=void 0;var i=n(14),o=n(6),r=function(){function e(){this.interactingItems={},this.storedPermissions={}}return e.prototype.addInteractingItem=function(e,t){var n=this.getInteractingItemKey(e,t);void 0===this.interactingItems[n]&&(e instanceof i.Shape||e instanceof o.Connector)&&(this.interactingItems[n]=e.clone())},e.prototype.getInteractingItem=function(e,t){var n=this.getInteractingItemKey(e,t);return this.interactingItems[n]},e.prototype.getInteractingItemCount=function(){return Object.keys(this.interactingItems).length},e.prototype.clearInteractingItems=function(){this.interactingItems={}},e.prototype.getInteractingItemKey=function(e,t){return e.key+(void 0!==t?"_"+t.toString():"")},e.prototype.needStorePermissions=function(){return this.storePermissions},e.prototype.beginStorePermissions=function(){this.storePermissions=!0},e.prototype.endStorePermissions=function(){this.storePermissions=!1,this.storedPermissions={}},e.prototype.isStoredPermissionsGranted=function(){for(var e=Object.keys(this.storedPermissions),t=!0,n=0;n1){var l=new r.RightAngleConnectorRoutingContext(this.model,e,t,n,i,o,a);if(l.initialize(s),l.shouldCreateRenderPoints)return this.createRenderPointsCore(l)}},e.prototype.clone=function(){return new e(this.model)},e.prototype.onAddPoint=function(e,t,n,r){var s=r.map((function(e){return new o.ConnectorRenderPoint(e.x,e.y,e.pointIndex)})),l=a.ModelUtils.findFirstPointIndex(s,(function(e){return e.equals(n)}));if(0===l)return s.splice(1,0,new o.ConnectorRenderPoint(n.x,n.y,t)),a.ModelUtils.validateRenderPointIndexes(e,s,2);var u=s.length-1;if(l===u)return s.splice(u,0,new o.ConnectorRenderPoint(n.x,n.y,t)),s[u+1].pointIndex=t+1,s;if(l>0){var c=s[l];return s[l]=new o.ConnectorRenderPoint(c.x,c.y,t,c.skipped),a.ModelUtils.validateRenderPointIndexes(e,s,l+1)}var d=new i.Segment(s[0],s[1]),h=new o.ConnectorRenderPoint(n.x,n.y);return d.containsPoint(h)?(s.splice(1,0,new o.ConnectorRenderPoint(h.x,h.y,-1)),s.splice(2,0,new o.ConnectorRenderPoint(h.x,h.y,t)),a.ModelUtils.validateRenderPointIndexes(e,s,3)):new i.Segment(s[u-1],s[u]).containsPoint(h)?(s.splice(u,0,new o.ConnectorRenderPoint(h.x,h.y,t)),s.splice(u+1,0,new o.ConnectorRenderPoint(h.x,h.y,-1)),s[u+2].pointIndex=t+1,s):r},e.prototype.onDeletePoint=function(e,t,n){var i=n.map((function(e){return new o.ConnectorRenderPoint(e.x,e.y,e.pointIndex)})),r=this.getRenderPointIndexByPointIndex(i,t);if(1===r){var s=i[0],l=i[1];return s.equals(l)?(i.splice(1,1),a.ModelUtils.validateRenderPointIndexes(e,i,1)):(i[1]=new o.ConnectorRenderPoint(l.x,l.y,-1,l.skipped),a.ModelUtils.validateRenderPointIndexes(e,i,2))}if(2===r){s=i[1];var u=i[2];return s.equals(u)?(i.splice(1,2),a.ModelUtils.validateRenderPointIndexes(e,i,1)):(i[2]=new o.ConnectorRenderPoint(u.x,u.y,-1,u.skipped),a.ModelUtils.validateRenderPointIndexes(e,i,3))}var c=i.length-1;if(r===c-1){var d=i[c-1],h=i[c];return d.equals(h)?(i.splice(c-1,1),a.ModelUtils.validateRenderPointIndexes(e,i,c-1)):(i[c-1]=new o.ConnectorRenderPoint(d.x,d.y,-1,d.skipped),a.ModelUtils.validateRenderPointIndexes(e,i,c))}if(r===c-2){var p=i[c-2];return h=i[c-1],p.equals(h)?(i.splice(c-2,2),a.ModelUtils.validateRenderPointIndexes(e,i,c-2)):(i[c-2]=new o.ConnectorRenderPoint(p.x,p.y,-1,p.skipped),a.ModelUtils.validateRenderPointIndexes(e,i,c-1))}var f=i[r];return i[r]=new o.ConnectorRenderPoint(f.x,f.y,-1,f.skipped),a.ModelUtils.validateRenderPointIndexes(e,i,r+1)},e.prototype.onMovePoint=function(e,t,n,i){if(0===t||t===e.length-1)return i;var r=i.map((function(e){return new o.ConnectorRenderPoint(e.x,e.y,e.pointIndex)}));return this.onMovePointCore(r,t,n),a.ModelUtils.skipUnnecessaryRightAngleRenderPoints(r),r},e.prototype.onMovePoints=function(e,t,n,i,r,s){if(0===t||i===e.length-1)return s;var l=s.map((function(e){return new o.ConnectorRenderPoint(e.x,e.y,e.pointIndex)}));return this.onMovePointCore(l,t,n),this.onMovePointCore(l,i,r),a.ModelUtils.skipUnnecessaryRightAngleRenderPoints(l),l},e.prototype.onMovePointCore=function(e,t,n){var i=this.getRenderPointIndexByPointIndex(e,t);if(i>=0){var r=e[i];e[i]=new o.ConnectorRenderPoint(n.x,n.y,t,r.skipped)}},e.prototype.createRenderPointsCore=function(e){var t,n=[],i=-1,o=-1;e.setup();var r=e.renderSegments,a=r[r.length-1].endPoint,s=e.points;do{this.registerCustomPoints(n,s,o+2,r[i+1].startPointIndex-1),o=(t=r[++i]).startPointIndex,this.registerRenderPoints(n,e.createRoutedPoints(t.startInfo,t.endInfo,t.createProhibitedSegments()),o)}while(!t.endPoint.equals(a));return e.validateRenderPoints(n),n},e.prototype.getRenderPointIndexByPointIndex=function(e,t){return a.ModelUtils.findFirstPointIndex(e,(function(e){return e.pointIndex===t}))},e.prototype.registerRenderPoints=function(e,t,n){var i=this;t.forEach((function(o,r){var a=0===r?n:r===t.length-1?n+1:-1;i.registerPoint(e,o,a)}))},e.prototype.registerCustomPoints=function(e,t,n,i){for(var o=n;o<=i;o++)this.registerPoint(e,t[o],o)},e.prototype.registerPoint=function(e,t,n){e.push(new o.ConnectorRenderPoint(t.x,t.y,n))},e}();t.RightAngleConnectorRoutingStrategy=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RightAngleConnectorRoutingContext=t.IntersectingItemsByPointsContext=t.CuttingItemsContext=void 0;var i=n(0),o=n(33),r=n(60),a=n(9),s=n(160),l=n(371),u=n(373),c=n(4),d=n(161),h=n(374),p=n(378),f=n(3),m=function(){function e(){this.cuttingItemKeys=[]}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.cuttingItemKeys.length},enumerable:!1,configurable:!0}),e.prototype.registerShape=function(e,t,n){return!!f.GeometryUtils.areSegmentsCutRectangle(n,t)&&(this.cuttingItemKeys.push(e),!0)},e}();t.CuttingItemsContext=m;var g=function(){function e(){this.items={}}return e.prototype.getOrAddItems=function(e,t){if(e){var n=e.toString(),i=this.items[n];if(void 0!==i)return i.items;if(t){var o=t(e);return this.items[n]={point:e,items:o},o}}},e}();t.IntersectingItemsByPointsContext=g;var v=function(){function e(e,t,n,i,o,r,a){this.routingModel=e,this.points=t,this.supportRenderPoints=n,this.beginConnectionShape=i,this.endConnectionShape=o,this.beginConnectionSide=this.getConnectionSide(this.beginConnectionShape,r,this.beginPoint),this.endConnectionSide=this.getConnectionSide(this.endConnectionShape,a,this.endPoint),this.ignorableItemKeys={},this.cuttingShapesContext=new m,this.intersectedItemsByPointsContext=new g,this.isInvalidRenderSegments=!0}return Object.defineProperty(e.prototype,"shapeMargins",{get:function(){return this.routingModel.shapeMargins},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"beginPoint",{get:function(){return this.points[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.points[this.points.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasIntersecting",{get:function(){return!this.cuttingShapesContext.isEmpty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldCreateRenderPoints",{get:function(){return this.isInvalidRenderSegments||!this.isSmallPath&&(this.hasIntersecting||this.isReversedStartConnection||this.isReversedEndConnection)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"beginPathPoint",{get:function(){return this.beginConnectionSegment instanceof o.Segment?this.beginConnectionSegment.startPoint:this.beginConnectionSegment},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPathPoint",{get:function(){return this.endConnectionSegment instanceof o.Segment?this.endConnectionSegment.endPoint:this.endConnectionSegment},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReversedStartConnection",{get:function(){if(!this.beginConnectionShape||this.beginConnectionSide===a.ConnectionPointSide.Undefined)return!1;var e=this.beginConnectionSegment;return!(e instanceof i.Point)&&this.isReversedConnectionSegment(this.supportSegments[0],e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReversedEndConnection",{get:function(){if(!this.endConnectionShape||this.endConnectionSide===a.ConnectionPointSide.Undefined)return!1;var e=this.endConnectionSegment;return!(e instanceof i.Point)&&this.isReversedConnectionSegment(this.supportSegments[this.supportSegments.length-1],e)},enumerable:!1,configurable:!0}),e.prototype.isReversedConnectionSegment=function(e,t){return r.Vector.scalarProduct(r.Vector.fromSegment(e),r.Vector.fromPoints(t.startPoint,t.endPoint))<=0},Object.defineProperty(e.prototype,"isSmallPath",{get:function(){var e=2*this.routingModel.shapeMargins;return Math.abs(this.beginPathPoint.x-this.endPathPoint.x)0?new i.Point(t.startPoint.x,t.startPoint.y):e.beginConnectionSegment,o=0?new o.Segment(this.points[t].clone(),new i.Point(e.x,e.y)):void 0},e.prototype.shouldCreateSegment=function(e,t){return!e.equals(t)||t.pointIndex>0},e.prototype.isPathNormal=function(e){return e===a.ConnectionPointSide.Undefined||s.RightAngleConnectorRoutingMathOperations.isSegmentNormal(new o.Segment(this.beginPoint,this.endPoint),e===a.ConnectionPointSide.East||e===a.ConnectionPointSide.West)},e.prototype.registerIgnorableShape=function(e){this.ignorableItemKeys[e.key]=!0},e.prototype.isConnectedByStart=function(e){return this.beginConnectionShape&&this.beginConnectionShape.key===e.key&&this.beginConnectionSide!==a.ConnectionPointSide.Undefined},e.prototype.isConnectedByEnd=function(e){return this.endConnectionShape&&this.endConnectionShape.key===e.key&&this.endConnectionSide!==a.ConnectionPointSide.Undefined},e.prototype.getConnectionSide=function(e,t,n){return e?e.getConnectionPointSideByIndex(t,n):a.ConnectionPointSide.Undefined},e.prototype.shapeContainsOtherConnection=function(e,t,n){if(!e)return!1;var i=e.rectangle;return i.containsPoint(n)&&(!t||!t.rectangle.equals(i))},e.prototype.createBeginConnectionSegment=function(e,t){if(this.beginConnectionSide===a.ConnectionPointSide.Undefined)return this.createBeginConnectionSegmentCore(e);if(!t||!this.routingModel.shouldReverseConnections){var n=this.createBeginConnectionSegmentCore(e);if(n instanceof i.Point||!this.routingModel.shouldResizeConnections)return n;for(var o=n.startPoint,r=n.endPoint,s=e;this.hasIntersectedItemsByPoint(r,o,this.beginConnectionShape);)s/=2,r=(n=this.createBeginConnectionSegmentCore(s)).endPoint;return n}if(!this.endConnectionShape)return this.createBeginConnectionSegmentCore(-e);if(this.isPathNormal(this.endConnectionSide))return this.createBeginConnectionSegmentCore(-e);var l=this.createBeginConnectionSegmentCore(-2*e);return this.isEndConnectionRectanleLineIntersected(l,!1,!0)?this.createBeginConnectionSegmentCore(e):this.createBeginConnectionSegmentCore(-e)},e.prototype.hasIntersectedItemsByPoint=function(e,t,n){var i=this.getIntersectedItems(e,(function(e,i){return i.rectangle.containsPoint(e)&&!i.rectangle.containsPoint(t)&&i.key!==n.key}));return void 0!==i&&i.length>0},e.prototype.createEndConnectionSegment=function(e,t){if(this.endConnectionSide===a.ConnectionPointSide.Undefined)return this.createEndConnectionSegmentCore(e);if(!t||!this.routingModel.shouldReverseConnections){var n=this.createEndConnectionSegmentCore(e);if(n instanceof i.Point||!this.routingModel.shouldResizeConnections)return n;for(var o=n.endPoint,r=n.startPoint,s=e;this.hasIntersectedItemsByPoint(r,o,this.endConnectionShape);)s/=2,r=(n=this.createEndConnectionSegmentCore(s)).startPoint;return n}if(!this.beginConnectionShape)return this.createEndConnectionSegmentCore(-e);if(this.isPathNormal(this.beginConnectionSide))return this.createEndConnectionSegmentCore(-e);var l=this.createEndConnectionSegmentCore(-2*e);return this.isBeginConnectionRectanleLineIntersected(l,!0,!1)?this.createEndConnectionSegmentCore(e):this.createEndConnectionSegmentCore(-e)},e.prototype.createBeginConnectionSegmentCore=function(e){return s.RightAngleConnectorRoutingMathOperations.createBeginConnectionSegment(this.beginConnectionSide,this.beginPoint,e,(function(e,t){return new i.Point(e,t)}))},e.prototype.createEndConnectionSegmentCore=function(e){return s.RightAngleConnectorRoutingMathOperations.createEndConnectionSegment(this.endConnectionSide,this.endPoint,e,(function(e,t){return new i.Point(e,t)}))},e.prototype.isBeginConnectionRectanleLineIntersected=function(e,t,n){return s.RightAngleConnectorRoutingMathOperations.isConnectionRectanleLineIntersected(this.beginConnectionShape.rectangle,e,this.beginConnectionSide,t,n,(function(e,t){return new i.Point(e,t)}))},e.prototype.isEndConnectionRectanleLineIntersected=function(e,t,n){return s.RightAngleConnectorRoutingMathOperations.isConnectionRectanleLineIntersected(this.endConnectionShape.rectangle,e,this.endConnectionSide,t,n,(function(e,t){return new i.Point(e,t)}))},e.prototype.isIgnorableItem=function(e){return void 0!==this.ignorableItemKeys[e.key]},e.prototype.createExtendedShapesBounds=function(){var e=this;return this.routingModel.getItems(this.beginConnectionShape,this.endConnectionShape).map((function(t){return t.rectangle.clone().inflate(e.routingModel.shapeMargins)}))},e.prototype.createGrid=function(){return u.RoutingGrid.create(this.createGridPoints(),this.createExtendedShapesBounds(),(function(e,t){return new i.Point(e,t)}))},e}();t.RightAngleConnectorRoutingContext=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorRenderSegment=void 0;var i=n(33),o=n(372),r=function(){function e(e,t,n,i){this.startInfo=e,this.endInfo=t,this.startPointIndex=n,this.previousCustomSegment=i}return Object.defineProperty(e.prototype,"startPathPoint",{get:function(){return this.startInfo instanceof i.Segment?this.startInfo.endPoint:this.startInfo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPathPoint",{get:function(){return this.endInfo instanceof i.Segment?this.endInfo.startPoint:this.endInfo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this.startInfo instanceof i.Segment?this.startInfo.startPoint:this.startInfo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this.endInfo instanceof i.Segment?this.endInfo.endPoint:this.endInfo},enumerable:!1,configurable:!0}),e.prototype.createGridPoints=function(){var e=[];return this.endInfo instanceof i.Segment?(e.push(this.endInfo.startPoint),e.push(this.endInfo.endPoint)):e.push(this.endInfo),e},e.prototype.createProhibitedSegments=function(){if(this.startInfo instanceof i.Segment){var e=this.createProhibitedSegmentsCore(this.startInfo);return this.endInfo instanceof i.Segment&&(e.addSegment(this.endInfo),e.addExludedPoint(this.endInfo.startPoint)),this.previousCustomSegment&&e.addSegment(this.previousCustomSegment),e}return this.endInfo instanceof i.Segment?((e=this.createProhibitedSegmentsCore(this.endInfo)).addExludedPoint(this.endInfo.startPoint),this.previousCustomSegment&&e.addSegment(this.previousCustomSegment),e):this.previousCustomSegment?this.createProhibitedSegmentsCore(this.previousCustomSegment):void 0},e.prototype.createProhibitedSegmentsCore=function(e){var t=new o.ConnectorProhibitedSegments;return t.addSegment(e),t},e}();t.ConnectorRenderSegment=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorProhibitedSegments=void 0;var i=function(){function e(){this.segments=[],this.exludedPoints={}}return e.prototype.addSegment=function(e){this.segments.push(e)},e.prototype.addExludedPoint=function(e){this.exludedPoints[e.toString()]=e},e.prototype.allowPoint=function(e){if(void 0===this.exludedPoints[e.toString()])for(var t=0;t=0&&t0&&this.stepsCountn){var o=e.generalSet;o.remove(i),i.parent=e.currentNode,i.penalty=n,o.enqueue(i)}e.openNode=i})),this.stepsCount++},e.prototype.finishWithPath=function(){this.path=this.currentNode.getPath()},e.prototype.finishWithoutPath=function(){this.path=[]},e}();t.AStarContextBase=d;var h=function(e){function t(t,n,i,o,r,a){var s=e.call(this,n,i,1e4)||this;return s.routingContext=t,s.startPosition=n,s.targetPosition=i,s.prohibitedSegments=o,s.grid=r,s.metrics=a,s}return o(t,e),t.prototype.addProhibitedPoint=function(e){this.prohibitedPoints[e.toString()]=e},t.prototype.getNeighborPoints=function(e){var t=this;return this.grid.getNeighborPoints(e).filter((function(e){return t.allowPoint(e)}))},t.prototype.getDistance=function(e,t){return this.metrics.distance(e,t)},t.prototype.getPenalty=function(e,t){var n=e.parent,i=e.position,o=this.getTurnDirection(n?c.GeometryUtils.createAngle(n.position,i,t):0),r=this.getDistance(i,t),a=new l.Segment(i,t).center;return e.penalty+this.metrics.penalty(r,a,o,this.getIntersectedItems(a))},t.prototype.allowPoint=function(e){return void 0===this.prohibitedPoints[e.toString()]&&(!this.prohibitedSegments||this.prohibitedSegments.allowPoint(e))},t.prototype.getTurnDirection=function(e){return u.RightAngleConnectorRoutingMathOperations.getTurnDirection(e)},t.prototype.getIntersectedItems=function(e){var t=this,n=this.routingContext.shapeMargins;return this.routingContext.getIntersectedItems(e,(function(e,i){return t.hasIntersectedItem(e,i,n)}))},t.prototype.hasIntersectedItem=function(e,t,n){return!!this.isIntersectedWithExtendedRectangle(e,t,n)&&(!!this.hasOneShapeConnection(t)||!this.itemContainsConnectionPoints(t))},t.prototype.isIntersectedWithExtendedRectangle=function(e,t,n){return t.rectangle.clone().inflate(n).containsPoint(e)},t.prototype.itemContainsConnectionPoints=function(e){var t=e.rectangle;return t.containsPoint(this.routingContext.beginPoint)&&t.containsPoint(this.routingContext.endPoint)},t.prototype.hasOneShapeConnection=function(e){var t=e.getConnectionPoints();return this.isConnectionPoint(t,this.routingContext.beginPoint)&&this.isConnectionPoint(t,this.routingContext.endPoint)},t.prototype.isConnectionPoint=function(e,t){return e.filter((function(e){return e.equals(t)})).length>0},t}(d);t.AStarContext=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortedQueues=void 0;var i=n(41),o=function(){function e(e){this.getKey=e,this._itemsArrays={},this._sortedKeys=[]}return Object.defineProperty(e.prototype,"sortedKeys",{get:function(){return this._sortedKeys},enumerable:!1,configurable:!0}),e.prototype.getQueue=function(e){return this._itemsArrays[e]},e.prototype.enqueue=function(e){var t=this.getKey(e);void 0===this._itemsArrays[t]?(this._itemsArrays[t]=[e],this.addSortedKey(t)):this._itemsArrays[t].push(e)},e.prototype.remove=function(e){var t=this.getKey(e),n=this._itemsArrays[t];void 0!==n&&(n.length?n[0]===e?(n.shift(),n.length||this.removeCore(t)):this._itemsArrays[t]=n.filter((function(t){return t!==e})):this.removeCore(t))},e.prototype.dequeueMin=function(){if(this._sortedKeys.length){var e=this._sortedKeys[0],t=this._itemsArrays[e],n=t.shift();return t.length||this.removeCore(e),n}},e.prototype.removeCore=function(e){delete this._itemsArrays[e],this.removeSortedKey(e)},e.prototype.removeSortedKey=function(e){var t=i.SearchUtils.binaryIndexOf(this._sortedKeys,(function(t){return t-e}));t>=0&&this.sortedKeys.splice(t,1)},e.prototype.addSortedKey=function(e){var t=i.SearchUtils.binaryIndexOf(this._sortedKeys,(function(t){return t-e}));t<0&&this._sortedKeys.splice(-(t+1),0,e)},e}();t.SortedQueues=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniqueAStarNodePositions=void 0;var i=function(){function e(e){void 0===e&&(e=function(e){return e.toString()}),this.getKey=e,this.items={}}return Object.defineProperty(e.prototype,"count",{get:function(){return Object.keys(this.items).length},enumerable:!1,configurable:!0}),e.prototype.getNode=function(e){var t=this.items[this.getKey(e)];return void 0!==t?t.node:void 0},e.prototype.add=function(e,t){var n=this.getKey(e);void 0===this.items[n]&&(this.items[n]={position:e,node:t})},e.prototype.remove=function(e){var t=this.getKey(e);void 0!==this.items[t]&&delete this.items[t]},e}();t.UniqueAStarNodePositions=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AStarNode=void 0;var i=function(){function e(e,t){this.position=e,this.distance=t,this.penalty=0}return Object.defineProperty(e.prototype,"key",{get:function(){return this.distance+this.penalty},enumerable:!1,configurable:!0}),e.prototype.getPath=function(){for(var e=[],t=this;void 0!==t;)e.splice(0,0,t.position),t=t.parent;return e},e}();t.AStarNode=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AStarCalculator=void 0;var i=function(){function e(){}return e.calculate=function(e){if(e)for(var t=this.start(e);t;)t=t(e)},e.start=function(t){return t.start(),t.shouldStartContinue?e.startContinue:e.finishWithPath},e.startContinue=function(t){return t.startContinue(),t.shouldFinish?e.finishWithPath:e.endContinue},e.endContinue=function(t){return t.endContinue(),t.shouldStartContinue?e.startContinue:e.finishWithoutPath},e.finishWithPath=function(e){e.finishWithPath()},e.finishWithoutPath=function(e){e.finishWithoutPath()},e}();t.AStarCalculator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReloadContentParameters=void 0;var i=function(){function e(){this.isEmpty=!0}return e.prototype.add=function(e,t,n){void 0!==e&&(void 0===this._dataKeys&&(this._dataKeys=[]),Array.isArray(e)?this._dataKeys=this._dataKeys.concat(e):this._dataKeys.push(e)),this._getData=this._getData||t,this._layoutParameters=this._layoutParameters||n,this.isEmpty=!1},e.prototype.clear=function(){this.isEmpty=!0,this._dataKeys=void 0,this._getData=void 0,this._layoutParameters=void 0},Object.defineProperty(e.prototype,"empty",{get:function(){return this.isEmpty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataKeys",{get:function(){return this._dataKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getData",{get:function(){return this._getData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layoutParameters",{get:function(){return this._layoutParameters},enumerable:!1,configurable:!0}),e}();t.ReloadContentParameters=i},function(e,t,n){}])}))},"01b4":function(e,t){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return null===t&&(this.tail=null),e.item}}},e.exports=n},"01f8":function(e,t,n){"use strict";var i=n("5b62"),o=n("c4f4"),r=n("4c4d"),a=n("6950"),s=n("a5d4"),l=n("54db"),u=n("16b4"),c=n("61a5"),d=n("6bc7"),h=n("bf95"),p=n("026c"),f=n("9311"),m=u["a"].add,g=Math.abs,v=0,_=1,y=2,b=10,C=0,x=180,w=function(){return Object(a["d"])("pointer-events")},S=Object(s["a"])((function(){var e="desktop"===r["a"].real().deviceType;if(!w()||!e)return d["n"];var t=Object(i["a"])("
").addClass("dx-gesture-cover").css("pointerEvents","none");return o["a"].subscribeGlobal(t,"dxmousewheel",(function(e){e.preventDefault()})),m((function(){t.appendTo("body")})),function(e,n){t.css("pointerEvents",e?"all":"none"),e&&t.css("cursor",n)}})),T=function(e,t){var n=S();n(e,t)},O=f["a"].inherit({gesture:!0,configure:function(e){this.getElement().css("msTouchAction",e.immediate?"pinch-zoom":""),this.callBase(e)},allowInterruptionByMouseWheel:function(){return this._stage!==y},getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=v},start:function(e){e._needSkipEvent||Object(p["o"])(e)?this._cancel(e):(this._startEvent=Object(p["b"])(e),this._startEventData=Object(p["c"])(e),this._stage=_,this._init(e),this._setupImmediateTimer())},_setupImmediateTimer:function(){clearTimeout(this._immediateTimer),this._immediateAccepted=!1,this.immediate&&(this._immediateTimer=setTimeout(function(){this._immediateAccepted=!0}.bind(this),x))},move:function(e){if(this._stage===_&&this._directionConfirmed(e)){if(this._stage=y,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(e),this._adjustStartEvent(e),this._start(this._startEvent),this._stage===v)return;this._requestAccept(e),this._move(e),this._forgetAccept()}else this._stage===y&&(this._clearSelection(e),this._move(e))},_directionConfirmed:function(e){var t=this._getTouchBoundary(e),n=Object(p["d"])(this._startEventData,Object(p["c"])(e)),i=g(n.x),o=g(n.y),r=this._validateMove(t,i,o),a=this._validateMove(t,o,i),s=this.getDirection(e),l="both"===s&&(r||a),u="horizontal"===s&&r,c="vertical"===s&&a;return l||u||c||this._immediateAccepted},_validateMove:function(e,t,n){return t&&t>=e&&(!this.immediate||t>=n)},_getTouchBoundary:function(e){return this.immediate||Object(p["j"])(e)?C:b},_adjustStartEvent:function(e){var t=this._getTouchBoundary(e),n=Object(p["d"])(this._startEventData,Object(p["c"])(e));this._startEvent.pageX+=Object(c["j"])(n.x)*t,this._startEvent.pageY+=Object(c["j"])(n.y)*t},_resetActiveElement:function(){"ios"===r["a"].real().platform&&this.getElement().find(":focus").length&&Object(l["i"])()},_toggleGestureCover:function(e){this._toggleGestureCoverImpl(e)},_toggleGestureCoverImpl:function(e){var t=this._stage===y;t&&T(e,this.getElement().css("cursor"))},_clearSelection:function(e){Object(p["j"])(e)||Object(p["n"])(e)||Object(l["a"])()},end:function(e){this._toggleGestureCover(!1),this._stage===y?this._end(e):this._stage===_&&this._stop(e),this._stage=v},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:d["n"],_start:d["n"],_move:d["n"],_stop:d["n"],_end:d["n"]});O.initialTouchBoundary=b,O.touchBoundary=function(e){if(!Object(h["d"])(e))return b;b=e},t["a"]=O},"0218":function(e){e.exports=JSON.parse('{"ru":{"Yes":"Да","No":"Нет","Cancel":"Отмена","Close":"Закрыть","Clear":"Очистить","Done":"Готово","Loading":"Загрузка...","Select":"Выбрать...","Search":"Поиск","Back":"Назад","OK":"OK","dxCollectionWidget-noDataText":"Нет данных для отображения","dxDropDownEditor-selectLabel":"Выбрать","validation-required":"Поле необходимо заполнить","validation-required-formatted":"Необходимо заполнить: {0}","validation-numeric":"Значение должно быть числом","validation-numeric-formatted":"Значение поля {0} должно быть числом","validation-range":"Значение поля не входит в диапазон","validation-range-formatted":"Значение поля {0} не входит в диапазон","validation-stringLength":"Неверная длина значения в поле","validation-stringLength-formatted":"Неверная длина значения в поле {0}","validation-custom":"Недопустимое значение","validation-custom-formatted":"Недопустимое значение: {0}","validation-async":"Недопустимое значение","validation-async-formatted":"Недопустимое значение: {0}","validation-compare":"Значения полей не соответствуют друг другу.","validation-compare-formatted":"Значение поля {0} не соответствует","validation-pattern":"Значение не соответствует шаблону","validation-pattern-formatted":"Значение поля {0} не соответствует шаблону","validation-email":"Недопустимое значение email","validation-email-formatted":"Недопустимое значениe {0}","validation-mask":"Недопустимое значение","dxLookup-searchPlaceholder":"Минимальное количество символов: {0}","dxList-pullingDownText":"Потяните, чтобы обновить...","dxList-pulledDownText":"Отпустите, чтобы обновить...","dxList-refreshingText":"Обновление...","dxList-pageLoadingText":"Загрузка...","dxList-nextButtonText":"Далее","dxList-selectAll":"Выбрать все","dxListEditDecorator-delete":"Удалить","dxListEditDecorator-more":"Еще","dxScrollView-pullingDownText":"Потяните, чтобы обновить...","dxScrollView-pulledDownText":"Отпустите, чтобы обновить...","dxScrollView-refreshingText":"Обновление...","dxScrollView-reachBottomText":"Загрузка...","dxDateBox-simulatedDataPickerTitleTime":"Выберите время","dxDateBox-simulatedDataPickerTitleDate":"Выберите дату","dxDateBox-simulatedDataPickerTitleDateTime":"Выберите дату и время","dxDateBox-validation-datetime":"Значение должно быть датой/временем","dxFileUploader-selectFile":"Выберите файл","dxFileUploader-dropFile":"или Перетащите файл сюда","dxFileUploader-bytes":"байт","dxFileUploader-kb":"кБ","dxFileUploader-Mb":"МБ","dxFileUploader-Gb":"ГБ","dxFileUploader-upload":"Загрузить","dxFileUploader-uploaded":"Загружено","dxFileUploader-readyToUpload":"Готово к загрузке","dxFileUploader-uploadAbortedMessage":"Загрузка отменена","dxFileUploader-uploadFailedMessage":"Загрузка не удалась","dxFileUploader-invalidFileExtension":"Недопустимое расширение файла","dxFileUploader-invalidMaxFileSize":"Файл слишком большой","dxFileUploader-invalidMinFileSize":"Файл слишком маленький","dxRangeSlider-ariaFrom":"От","dxRangeSlider-ariaTill":"До","dxSwitch-switchedOnText":"ВКЛ","dxSwitch-switchedOffText":"ВЫКЛ","dxForm-optionalMark":"необязательный","dxForm-requiredMessage":" Поле {0} должно быть заполнено","dxNumberBox-invalidValueMessage":"Значение должно быть числом","dxNumberBox-noDataText":"Нет данных","dxDataGrid-columnChooserTitle":"Выбор столбцов","dxDataGrid-columnChooserEmptyText":"Перетащите столбец сюда, чтобы скрыть его","dxDataGrid-groupContinuesMessage":"Продолжение на следующей странице","dxDataGrid-groupContinuedMessage":"Продолжение с предыдущей страницы","dxDataGrid-groupHeaderText":"Сгруппировать данные по этому столбцу","dxDataGrid-ungroupHeaderText":"Разгруппировать данные по этому столбцу","dxDataGrid-ungroupAllText":"Сбросить группирование","dxDataGrid-editingEditRow":"Редактировать","dxDataGrid-editingSaveRowChanges":"Сохранить","dxDataGrid-editingCancelRowChanges":"Отменить","dxDataGrid-editingDeleteRow":"Удалить","dxDataGrid-editingUndeleteRow":"Восстановить","dxDataGrid-editingConfirmDeleteMessage":"Вы уверены, что хотите удалить эту запись?","dxDataGrid-validationCancelChanges":"Отменить изменения","dxDataGrid-groupPanelEmptyText":"Перетащите столбец сюда, чтобы сгруппировать по нему","dxDataGrid-noDataText":"Нет данных","dxDataGrid-searchPanelPlaceholder":"Искать...","dxDataGrid-filterRowShowAllText":"(Все)","dxDataGrid-filterRowResetOperationText":"Сбросить","dxDataGrid-filterRowOperationEquals":"Равно","dxDataGrid-filterRowOperationNotEquals":"Не равно","dxDataGrid-filterRowOperationLess":"Меньше","dxDataGrid-filterRowOperationLessOrEquals":"Меньше или равно","dxDataGrid-filterRowOperationGreater":"Больше","dxDataGrid-filterRowOperationGreaterOrEquals":"Больше или равно","dxDataGrid-filterRowOperationStartsWith":"Начинается с","dxDataGrid-filterRowOperationContains":"Содержит","dxDataGrid-filterRowOperationNotContains":"Не содержит","dxDataGrid-filterRowOperationEndsWith":"Заканчивается на","dxDataGrid-filterRowOperationBetween":"В диапазоне","dxDataGrid-filterRowOperationBetweenStartText":"Начало","dxDataGrid-filterRowOperationBetweenEndText":"Конец","dxDataGrid-applyFilterText":"Применить фильтр","dxDataGrid-trueText":"Да","dxDataGrid-falseText":"Нет","dxDataGrid-sortingAscendingText":"Сортировать по возрастанию","dxDataGrid-sortingDescendingText":"Сортировать по убыванию","dxDataGrid-sortingClearText":"Сбросить сортировку","dxDataGrid-editingSaveAllChanges":"Сохранить изменения","dxDataGrid-editingCancelAllChanges":"Отменить изменения","dxDataGrid-editingAddRow":"Добавить строку","dxDataGrid-summaryMin":"Мин: {0}","dxDataGrid-summaryMinOtherColumn":"Мин по {1} : {0}","dxDataGrid-summaryMax":"Макс: {0}","dxDataGrid-summaryMaxOtherColumn":"Макс по {1} : {0}","dxDataGrid-summaryAvg":"Срзнач: {0}","dxDataGrid-summaryAvgOtherColumn":"Срзнач по {1} : {0}","dxDataGrid-summarySum":"Сумм: {0}","dxDataGrid-summarySumOtherColumn":"Сумм по {1} : {0}","dxDataGrid-summaryCount":"Кол-во: {0}","dxDataGrid-columnFixingFix":"Закрепить","dxDataGrid-columnFixingUnfix":"Открепить","dxDataGrid-columnFixingLeftPosition":"Налево","dxDataGrid-columnFixingRightPosition":"Направо","dxDataGrid-exportTo":"Экспортировать","dxDataGrid-exportToExcel":"Экспортировать в Excel файл","dxDataGrid-exporting":"Экспорт...","dxDataGrid-excelFormat":"Excel файл","dxDataGrid-selectedRows":"Выбранные строки","dxDataGrid-exportAll":"Экспортировать всё","dxDataGrid-exportSelectedRows":"Экспортировать выбранные строки","dxDataGrid-headerFilterLabel":"Фильтрация","dxDataGrid-headerFilterIndicatorLabel":"Открыть настройки фильтрации для столбца \'{0}\'","dxDataGrid-headerFilterEmptyValue":"(Пустое)","dxDataGrid-headerFilterOK":"ОК","dxDataGrid-headerFilterCancel":"Отменить","dxDataGrid-ariaAdaptiveCollapse":"Скрыть дополнительные данные","dxDataGrid-ariaAdaptiveExpand":"Показать дополнительные данные","dxDataGrid-ariaColumn":"Столбец","dxDataGrid-ariaValue":"Значение","dxDataGrid-ariaFilterCell":"Фильтр","dxDataGrid-ariaCollapse":"Свернуть","dxDataGrid-ariaExpand":"Развернуть","dxDataGrid-ariaDataGrid":"Таблица данных","dxDataGrid-ariaSearchInGrid":"Искать в таблице данных","dxDataGrid-ariaSelectAll":"Выбрать всё","dxDataGrid-ariaSelectRow":"Выбрать строку","dxDataGrid-ariaToolbar":"Панель инструментов таблицы данных","dxDataGrid-filterBuilderPopupTitle":"Конструктор фильтра","dxDataGrid-filterPanelCreateFilter":"Создать фильтр","dxDataGrid-filterPanelClearFilter":"Очистить","dxDataGrid-filterPanelFilterEnabledHint":"Активировать фильтр","dxTreeList-ariaTreeList":"Иерархическая таблица данных","dxTreeList-ariaSearchInGrid":"Искать в иерархической таблице данных","dxTreeList-ariaToolbar":"Панель инструментов иерархической таблицы данных","dxTreeList-editingAddRowToNode":"Добавить","dxPager-infoText":"Страница {0} из {1} (Всего элементов: {2})","dxPager-pagesCountText":"из","dxPager-pageSize":"Количество элементов на странице: {0}","dxPager-pageSizesAllText":"Все","dxPager-page":"Страница {0}","dxPager-prevPage":"Предыдущая страница","dxPager-nextPage":"Следующая страница","dxPager-ariaLabel":"Навигация по страницам","dxPivotGrid-grandTotal":"Итого","dxPivotGrid-total":"{0} Всего","dxPivotGrid-fieldChooserTitle":"Выбор полей","dxPivotGrid-showFieldChooser":"Показать выбор полей","dxPivotGrid-expandAll":"Раскрыть все","dxPivotGrid-collapseAll":"Свернуть все","dxPivotGrid-sortColumnBySummary":"Сортировать \\"{0}\\" по этой колонке","dxPivotGrid-sortRowBySummary":"Сортировать \\"{0}\\" по этой строке","dxPivotGrid-removeAllSorting":"Сбросить все сортировки","dxPivotGrid-dataNotAvailable":"Н/Д","dxPivotGrid-rowFields":"Поля строк","dxPivotGrid-columnFields":"Поля столбцов","dxPivotGrid-dataFields":"Поля данных","dxPivotGrid-filterFields":"Поля фильтров","dxPivotGrid-allFields":"Все поля","dxPivotGrid-columnFieldArea":"Перетащите поля колонок cюда","dxPivotGrid-dataFieldArea":"Перетащите поля данных cюда","dxPivotGrid-rowFieldArea":"Перетащите поля строк cюда","dxPivotGrid-filterFieldArea":"Перетащите поля фильтров cюда","dxScheduler-editorLabelTitle":"Название","dxScheduler-editorLabelStartDate":"Дата начала","dxScheduler-editorLabelEndDate":"Дата завершения","dxScheduler-editorLabelDescription":"Описание","dxScheduler-editorLabelRecurrence":"Повторение","dxScheduler-openAppointment":"Открыть задачу","dxScheduler-recurrenceNever":"Никогда","dxScheduler-recurrenceMinutely":"Ежеминутно","dxScheduler-recurrenceHourly":"Ежечасно","dxScheduler-recurrenceDaily":"Ежедневно","dxScheduler-recurrenceWeekly":"Еженедельно","dxScheduler-recurrenceMonthly":"Ежемесячно","dxScheduler-recurrenceYearly":"Ежегодно","dxScheduler-recurrenceRepeatEvery":"Интервал","dxScheduler-recurrenceRepeatOn":"Повторять по","dxScheduler-recurrenceEnd":"Завершить повторение","dxScheduler-recurrenceAfter":"После","dxScheduler-recurrenceOn":"Повторять до","dxScheduler-recurrenceRepeatMinutely":"минут(минуты)","dxScheduler-recurrenceRepeatHourly":"часов(часа)","dxScheduler-recurrenceRepeatDaily":"дней(дня)","dxScheduler-recurrenceRepeatWeekly":"недели(недель)","dxScheduler-recurrenceRepeatMonthly":"месяца(месяцев)","dxScheduler-recurrenceRepeatYearly":"года(лет)","dxScheduler-recurrenceRepeatOnDate":"до даты","dxScheduler-recurrenceRepeatCount":"повторений","dxScheduler-switcherDay":"День","dxScheduler-switcherWeek":"Неделя","dxScheduler-switcherWorkWeek":"Рабочая неделя","dxScheduler-switcherMonth":"Месяц","dxScheduler-switcherTimelineDay":"Хронология дня","dxScheduler-switcherTimelineWeek":"Хронология недели","dxScheduler-switcherTimelineWorkWeek":"Хронология рабочей недели","dxScheduler-switcherTimelineMonth":"Хронология месяца","dxScheduler-switcherAgenda":"Расписание","dxScheduler-allDay":"Весь день","dxScheduler-confirmRecurrenceEditMessage":"Вы хотите отредактировать только это событие или всю серию?","dxScheduler-confirmRecurrenceDeleteMessage":"Вы хотите удалить только это событие или всю серию?","dxScheduler-confirmRecurrenceEditSeries":"Всю серию","dxScheduler-confirmRecurrenceDeleteSeries":"Всю серию","dxScheduler-confirmRecurrenceEditOccurrence":"Только это событие","dxScheduler-confirmRecurrenceDeleteOccurrence":"Только это событие","dxScheduler-noTimezoneTitle":"Часовой пояс не выбран","dxScheduler-moreAppointments":"и еще {0}","dxCalendar-todayButtonText":"Сегодня","dxCalendar-ariaWidgetName":"Календарь","dxColorView-ariaRed":"Красный","dxColorView-ariaGreen":"Зеленый","dxColorView-ariaBlue":"Синий","dxColorView-ariaAlpha":"Прозрачность","dxColorView-ariaHex":"Код цвета","dxTagBox-selected":"{0} выбрано","dxTagBox-allSelected":"Выбрано все ({0})","dxTagBox-moreSelected":"и еще {0}","vizExport-printingButtonText":"Печать","vizExport-titleMenuText":"Экспорт/Печать","vizExport-exportButtonText":"{0} файл","dxFilterBuilder-and":"И","dxFilterBuilder-or":"Или","dxFilterBuilder-notAnd":"Не И","dxFilterBuilder-notOr":"Не Или","dxFilterBuilder-addCondition":"Добавить условие","dxFilterBuilder-addGroup":"Добавить группу","dxFilterBuilder-enterValueText":"<введите значение>","dxFilterBuilder-filterOperationEquals":"Равно","dxFilterBuilder-filterOperationNotEquals":"Не равно","dxFilterBuilder-filterOperationLess":"Меньше","dxFilterBuilder-filterOperationLessOrEquals":"Меньше или равно","dxFilterBuilder-filterOperationGreater":"Больше","dxFilterBuilder-filterOperationGreaterOrEquals":"Больше или равно","dxFilterBuilder-filterOperationStartsWith":"Начинается с","dxFilterBuilder-filterOperationContains":"Содержит","dxFilterBuilder-filterOperationNotContains":"Не содержит","dxFilterBuilder-filterOperationEndsWith":"Заканчивается на","dxFilterBuilder-filterOperationIsBlank":"Пусто","dxFilterBuilder-filterOperationIsNotBlank":"Не пусто","dxFilterBuilder-filterOperationBetween":"В диапазоне","dxFilterBuilder-filterOperationAnyOf":"Любой из","dxFilterBuilder-filterOperationNoneOf":"Ни один из","dxHtmlEditor-dialogColorCaption":"Изменить цвет текста","dxHtmlEditor-dialogBackgroundCaption":"Изменить цвет фона","dxHtmlEditor-dialogLinkCaption":"Добавить ссылку","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Текст","dxHtmlEditor-dialogLinkTargetField":"Открыть в новом окне","dxHtmlEditor-dialogImageCaption":"Добавить изображение","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Альтернативный текст","dxHtmlEditor-dialogImageWidthField":"Ширина (px)","dxHtmlEditor-dialogImageHeightField":"Высота (px)","dxHtmlEditor-dialogInsertTableRowsField":"Строки","dxHtmlEditor-dialogInsertTableColumnsField":"Колонки","dxHtmlEditor-dialogInsertTableCaption":"Вставить таблицу","dxHtmlEditor-heading":"Заголовок","dxHtmlEditor-normalText":"Обычный текст","dxHtmlEditor-background":"Цвет фона","dxHtmlEditor-bold":"Полужирный","dxHtmlEditor-color":"Цвет текста","dxHtmlEditor-font":"Шрифт","dxHtmlEditor-italic":"Курсив","dxHtmlEditor-link":"Добавить ссылку","dxHtmlEditor-image":"Добавить изображение","dxHtmlEditor-size":"Размер шрифта","dxHtmlEditor-strike":"Зачеркнутый","dxHtmlEditor-subscript":"Нижний индекс","dxHtmlEditor-superscript":"Верхний индекс","dxHtmlEditor-underline":"Подчеркнутый","dxHtmlEditor-blockquote":"Цитата","dxHtmlEditor-header":"Заголовок","dxHtmlEditor-increaseIndent":"Увеличить отступ","dxHtmlEditor-decreaseIndent":"Уменьшить отступ","dxHtmlEditor-orderedList":"Нумерованный список","dxHtmlEditor-bulletList":"Маркированный список","dxHtmlEditor-alignLeft":"Выравнивание по левому краю","dxHtmlEditor-alignCenter":"Выравнивание по центру","dxHtmlEditor-alignRight":"Выравнивание по правому краю","dxHtmlEditor-alignJustify":"Выравнивание по ширине","dxHtmlEditor-codeBlock":"Блок кода","dxHtmlEditor-variable":"Добавить переменную","dxHtmlEditor-undo":"Отменить","dxHtmlEditor-redo":"Повторить","dxHtmlEditor-clear":"Очистить форматирование","dxHtmlEditor-insertTable":"Вставить таблицу","dxHtmlEditor-insertHeaderRow":"Вставить строку заголовков","dxHtmlEditor-insertRowAbove":"Вставить строку сверху","dxHtmlEditor-insertRowBelow":"Вставить строку снизу","dxHtmlEditor-insertColumnLeft":"Вставить колонку слева","dxHtmlEditor-insertColumnRight":"Вставить колонку справа","dxHtmlEditor-deleteColumn":"Удалить колонку","dxHtmlEditor-deleteRow":"Удалить строку","dxHtmlEditor-deleteTable":"Удалить таблицу","dxHtmlEditor-cellProperties":"Свойства ячейки","dxHtmlEditor-tableProperties":"Свойства таблицы","dxHtmlEditor-insert":"Вставка","dxHtmlEditor-delete":"Удаление","dxHtmlEditor-border":"Граница","dxHtmlEditor-style":"Стиль","dxHtmlEditor-width":"Ширина","dxHtmlEditor-height":"Высота","dxHtmlEditor-borderColor":"Цвет","dxHtmlEditor-tableBackground":"Цвет фона","dxHtmlEditor-dimensions":"Размеры","dxHtmlEditor-alignment":"Выравнивание","dxHtmlEditor-horizontal":"Горизонтальное","dxHtmlEditor-vertical":"Вертикальное","dxHtmlEditor-paddingVertical":"Вертикальный отступ","dxHtmlEditor-paddingHorizontal":"Горизонтальный отступ","dxHtmlEditor-pixels":"Пиксели","dxHtmlEditor-list":"Список","dxHtmlEditor-ordered":"Нумерованный","dxHtmlEditor-bullet":"Маркированный","dxHtmlEditor-align":"Выравнивание","dxHtmlEditor-center":"По центру","dxHtmlEditor-left":"По левому краю","dxHtmlEditor-right":"По правому краю","dxHtmlEditor-indent":"Отступ","dxHtmlEditor-justify":"По ширине","dxFileManager-newDirectoryName":"Без названия","dxFileManager-rootDirectoryName":"Файлы","dxFileManager-errorNoAccess":"Доступ запрещён. Операция не может быть завершена.","dxFileManager-errorDirectoryExistsFormat":"Каталог {0} уже существует.","dxFileManager-errorFileExistsFormat":"Файл {0} уже существует.","dxFileManager-errorFileNotFoundFormat":"Файл {0} не найден.","dxFileManager-errorDirectoryNotFoundFormat":"Каталог \'{0}\' не найден.","dxFileManager-errorWrongFileExtension":"Неверное расширение файла.","dxFileManager-errorMaxFileSizeExceeded":"Размер файла превышает допустимое значение.","dxFileManager-errorInvalidSymbols":"Введённое имя содержит недопустимые символы.","dxFileManager-errorDefault":"Неизвестная ошибка","dxFileManager-errorDirectoryOpenFailed":"Не удалось открыть каталог","dxFileManager-commandCreate":"Новая папка","dxFileManager-commandRename":"Переименовать","dxFileManager-commandMove":"Переместить в","dxFileManager-commandCopy":"Копировать в","dxFileManager-commandDelete":"Удалить","dxFileManager-commandDownload":"Скачать","dxFileManager-commandUpload":"Загрузить файлы","dxFileManager-commandRefresh":"Обновить","dxFileManager-commandThumbnails":"Режим эксизов","dxFileManager-commandDetails":"Режим списка","dxFileManager-commandClearSelection":"Очистить выделение","dxFileManager-dialogButtonCancel":"Отмена","dxFileManager-commandShowNavPane":"Переключить панель навигации","dxFileManager-dialogDirectoryChooserMoveTitle":"Переместить в","dxFileManager-dialogDirectoryChooserMoveButtonText":"Переместить","dxFileManager-dialogDirectoryChooserCopyTitle":"Копировать в","dxFileManager-dialogDirectoryChooserCopyButtonText":"Копировать","dxFileManager-dialogRenameItemTitle":"Переименовать","dxFileManager-dialogRenameItemButtonText":"Сохранить","dxFileManager-dialogCreateDirectoryTitle":"Новая папка","dxFileManager-dialogCreateDirectoryButtonText":"Создать","dxFileManager-dialogDeleteItemTitle":"Удаление элемента","dxFileManager-dialogDeleteItemButtonText":"Удалить","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Вы действительно хотите удалить {0}?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Вы действительно хотите удалить {0} элементов?","dxFileManager-editingCreateSingleItemProcessingMessage":"Создаётся папка в {0}","dxFileManager-editingCreateSingleItemSuccessMessage":"Создана папка в {0}","dxFileManager-editingCreateSingleItemErrorMessage":"Не удалось создать папку","dxFileManager-editingCreateCommonErrorMessage":"Не удалось создать папку","dxFileManager-editingRenameSingleItemProcessingMessage":"Переименовывается элемент в {0}","dxFileManager-editingRenameSingleItemSuccessMessage":"Переименован элемент в {0}","dxFileManager-editingRenameSingleItemErrorMessage":"Не удалось переименовать элемент","dxFileManager-editingRenameCommonErrorMessage":"Не удалось переименовать элемент","dxFileManager-editingDeleteSingleItemProcessingMessage":"Элемент удаляется из {0}","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"Удаление {0} элементов из {1}","dxFileManager-editingDeleteSingleItemSuccessMessage":"Элемент удалён из {0}","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"{0} элементов удалено из {1}","dxFileManager-editingDeleteSingleItemErrorMessage":"Не удалось удалить элемент","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} элементов не были удалены","dxFileManager-editingDeleteCommonErrorMessage":"Некоторые элементы не были удалены","dxFileManager-editingMoveSingleItemProcessingMessage":"Элемент перемещается в {0}","dxFileManager-editingMoveMultipleItemsProcessingMessage":"Перемещение {0} элементов в {1}","dxFileManager-editingMoveSingleItemSuccessMessage":"Элемент перемещён в {0}","dxFileManager-editingMoveMultipleItemsSuccessMessage":"{0} элементов перемещено в {1}","dxFileManager-editingMoveSingleItemErrorMessage":"Не удалось переместить элемент","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} элементов не были перемещены","dxFileManager-editingMoveCommonErrorMessage":"Некоторые элементы не были перемещены","dxFileManager-editingCopySingleItemProcessingMessage":"Элемент копируется в {0}","dxFileManager-editingCopyMultipleItemsProcessingMessage":"Коипрование {0} элементов в {1}","dxFileManager-editingCopySingleItemSuccessMessage":"Элемент скопирован в {0}","dxFileManager-editingCopyMultipleItemsSuccessMessage":"{0} элементов скопировано в {1}","dxFileManager-editingCopySingleItemErrorMessage":"Не удалось скопировать элемент","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} элементов не были скопированы","dxFileManager-editingCopyCommonErrorMessage":"Некоторые элементы не были скопированы","dxFileManager-editingUploadSingleItemProcessingMessage":"Элемент загружается в {0}","dxFileManager-editingUploadMultipleItemsProcessingMessage":"Загрузка {0} элементов в {1}","dxFileManager-editingUploadSingleItemSuccessMessage":"Элемент загружен в {0}","dxFileManager-editingUploadMultipleItemsSuccessMessage":"{0} элементов загружено в {1}","dxFileManager-editingUploadSingleItemErrorMessage":"Не удалось загрузить элемент","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} элементов не были загружены","dxFileManager-editingUploadCanceledMessage":"Отменено","dxFileManager-editingDownloadSingleItemErrorMessage":"Не удалось скачать файл","dxFileManager-editingDownloadMultipleItemsErrorMessage":"Не удалось скачать {0} файлов","dxFileManager-listDetailsColumnCaptionName":"Название","dxFileManager-listDetailsColumnCaptionDateModified":"Дата изменения","dxFileManager-listDetailsColumnCaptionFileSize":"Размер файла","dxFileManager-listThumbnailsTooltipTextSize":"Размер","dxFileManager-listThumbnailsTooltipTextDateModified":"Дата изменения","dxFileManager-notificationProgressPanelTitle":"Прогресс","dxFileManager-notificationProgressPanelEmptyListText":"Операции отсутствуют","dxFileManager-notificationProgressPanelOperationCanceled":"Отменено","dxDiagram-categoryGeneral":"Общие","dxDiagram-categoryFlowchart":"Блок-схема","dxDiagram-categoryOrgChart":"Организационная схема","dxDiagram-categoryContainers":"Контейнеры","dxDiagram-categoryCustom":"Пользовательские","dxDiagram-commandExportToSvg":"Экспорт в SVG","dxDiagram-commandExportToPng":"Экспорт в PNG","dxDiagram-commandExportToJpg":"Экспорт в JPEG","dxDiagram-commandUndo":"Отменить","dxDiagram-commandRedo":"Повторить","dxDiagram-commandFontName":"Название шрифта","dxDiagram-commandFontSize":"Размер шрифта","dxDiagram-commandBold":"Полужирный","dxDiagram-commandItalic":"Курсив","dxDiagram-commandUnderline":"Подчеркнутый","dxDiagram-commandTextColor":"Цвет текста","dxDiagram-commandLineColor":"Цвет линии","dxDiagram-commandLineWidth":"Ширина линии","dxDiagram-commandLineStyle":"Стиль линии","dxDiagram-commandLineStyleSolid":"Сплошная","dxDiagram-commandLineStyleDotted":"Пунктирная","dxDiagram-commandLineStyleDashed":"Штриховая","dxDiagram-commandFillColor":"Цвет заливки","dxDiagram-commandAlignLeft":"Выравнивание по левому краю","dxDiagram-commandAlignCenter":"Выравнивание по центру","dxDiagram-commandAlignRight":"Выравнивание по правому краю","dxDiagram-commandConnectorLineType":"Тип соединителя","dxDiagram-commandConnectorLineStraight":"Прямой","dxDiagram-commandConnectorLineOrthogonal":"Ортогональный","dxDiagram-commandConnectorLineStart":"Тип начала соединителя","dxDiagram-commandConnectorLineEnd":"Тип конца соединителя","dxDiagram-commandConnectorLineNone":"Нет","dxDiagram-commandConnectorLineArrow":"Стрелка","dxDiagram-commandFullscreen":"Полноэкранный режим","dxDiagram-commandUnits":"Единицы измерения","dxDiagram-commandPageSize":"Размер страницы","dxDiagram-commandPageOrientation":"Ориентация страницы","dxDiagram-commandPageOrientationLandscape":"Альбомная","dxDiagram-commandPageOrientationPortrait":"Портретная","dxDiagram-commandPageColor":"Цвет страницы","dxDiagram-commandShowGrid":"Показывать сетку","dxDiagram-commandSnapToGrid":"Привязка к сетке","dxDiagram-commandGridSize":"Размер сетки","dxDiagram-commandZoomLevel":"Маштаб","dxDiagram-commandAutoZoom":"Автомаштаб","dxDiagram-commandFitToContent":"Вместить по содержимому","dxDiagram-commandFitToWidth":"Вместить по ширине","dxDiagram-commandAutoZoomByContent":"Автомаштаб по содержимому","dxDiagram-commandAutoZoomByWidth":"Автомаштаб по ширине","dxDiagram-commandSimpleView":"Упрощенный вид","dxDiagram-commandCut":"Вырезать","dxDiagram-commandCopy":"Копировать","dxDiagram-commandPaste":"Вставить","dxDiagram-commandSelectAll":"Выделить всё","dxDiagram-commandDelete":"Удалить","dxDiagram-commandBringToFront":"На передний план","dxDiagram-commandSendToBack":"На задний план","dxDiagram-commandLock":"Заблокировать","dxDiagram-commandUnlock":"Разблокировать","dxDiagram-commandInsertShapeImage":"Добавить изображение...","dxDiagram-commandEditShapeImage":"Изменить изображение...","dxDiagram-commandDeleteShapeImage":"Удалить изображение","dxDiagram-commandLayoutLeftToRight":"Слева направо","dxDiagram-commandLayoutRightToLeft":"Справа налево","dxDiagram-commandLayoutTopToBottom":"Сверху вниз","dxDiagram-commandLayoutBottomToTop":"Снизу вверх","dxDiagram-unitIn":"дюйм(а)","dxDiagram-unitCm":"см","dxDiagram-unitPx":"пиксель(я)","dxDiagram-dialogButtonOK":"ОК","dxDiagram-dialogButtonCancel":"Отмена","dxDiagram-dialogInsertShapeImageTitle":"Добавить изображение","dxDiagram-dialogEditShapeImageTitle":"Изменить изображение","dxDiagram-dialogEditShapeImageSelectButton":"Выберите изображение","dxDiagram-dialogEditShapeImageLabelText":"или перетащите файл сюда","dxDiagram-uiExport":"Экспорт","dxDiagram-uiProperties":"Свойства","dxDiagram-uiSettings":"Настройки","dxDiagram-uiShowToolbox":"Панель инструментов","dxDiagram-uiSearch":"Поиск","dxDiagram-uiStyle":"Стиль","dxDiagram-uiLayout":"Компоновка","dxDiagram-uiLayoutTree":"Древовидная","dxDiagram-uiLayoutLayered":"Многоуровневая","dxDiagram-uiDiagram":"Диаграмма","dxDiagram-uiText":"Текст","dxDiagram-uiObject":"Объект","dxDiagram-uiConnector":"Соединитель","dxDiagram-uiPage":"Страница","dxDiagram-shapeText":"Текст","dxDiagram-shapeRectangle":"Прямоугольник","dxDiagram-shapeEllipse":"Эллипс","dxDiagram-shapeCross":"Крест","dxDiagram-shapeTriangle":"Треугольник","dxDiagram-shapeDiamond":"Ромб","dxDiagram-shapeHeart":"Сердце","dxDiagram-shapePentagon":"Пятиугольник","dxDiagram-shapeHexagon":"Шестиугольник","dxDiagram-shapeOctagon":"Восьмиугольник","dxDiagram-shapeStar":"Звезда","dxDiagram-shapeArrowLeft":"Стрелка влево","dxDiagram-shapeArrowUp":"Стрелка вверх","dxDiagram-shapeArrowRight":"Стрелка вправо","dxDiagram-shapeArrowDown":"Стрелка вниз","dxDiagram-shapeArrowUpDown":"Стрелка вверх-вниз","dxDiagram-shapeArrowLeftRight":"Стрелка влево-вправо","dxDiagram-shapeProcess":"Процесс","dxDiagram-shapeDecision":"Решение","dxDiagram-shapeTerminator":"Терминатор","dxDiagram-shapePredefinedProcess":"Предопределенный процесс","dxDiagram-shapeDocument":"Документ","dxDiagram-shapeMultipleDocuments":"Документы","dxDiagram-shapeManualInput":"Ручной ввод","dxDiagram-shapePreparation":"Подготовка","dxDiagram-shapeData":"Данные","dxDiagram-shapeDatabase":"База данных","dxDiagram-shapeHardDisk":"Жесткий диск","dxDiagram-shapeInternalStorage":"Внутренняя память","dxDiagram-shapePaperTape":"Бумажная лента","dxDiagram-shapeManualOperation":"Ручная операция","dxDiagram-shapeDelay":"Задержка","dxDiagram-shapeStoredData":"Запоминаемые данные","dxDiagram-shapeDisplay":"Дисплей","dxDiagram-shapeMerge":"Слияние","dxDiagram-shapeConnector":"Соединитель","dxDiagram-shapeOr":"Или","dxDiagram-shapeSummingJunction":"Суммирование","dxDiagram-shapeContainerDefaultText":"Контейнер","dxDiagram-shapeVerticalContainer":"Вертикальный контейнер","dxDiagram-shapeHorizontalContainer":"Горизонтальный контейнер","dxDiagram-shapeCardDefaultText":"Имя человека","dxDiagram-shapeCardWithImageOnLeft":"Карточка с изображением слева","dxDiagram-shapeCardWithImageOnTop":"Карточка с изображением сверху","dxDiagram-shapeCardWithImageOnRight":"Карточка с изображением справа","dxGantt-dialogTitle":"Название","dxGantt-dialogStartTitle":"Начало","dxGantt-dialogEndTitle":"Окончание","dxGantt-dialogProgressTitle":"Прогресс","dxGantt-dialogResourcesTitle":"Ресурсы","dxGantt-dialogResourceManagerTitle":"Управление ресурсами","dxGantt-dialogTaskDetailsTitle":"Детали задачи","dxGantt-dialogEditResourceListHint":"Редактировать список ресурсов","dxGantt-dialogEditNoResources":"Список ресурсов пуст","dxGantt-dialogButtonAdd":"Добавить","dxGantt-contextMenuNewTask":"Новая задача","dxGantt-contextMenuNewSubtask":"Новая подзадача","dxGantt-contextMenuDeleteTask":"Удалить задачу","dxGantt-contextMenuDeleteDependency":"Удалить зависимость","dxGantt-dialogTaskDeleteConfirmation":"Удаление задачи приведет к удалению всех её зависимостей и подзадач. Вы уверены, что вы хотите удалить эту задачу?","dxGantt-dialogDependencyDeleteConfirmation":"Вы уверены, что хотите удалить эту зависимость из задачи?","dxGantt-dialogResourcesDeleteConfirmation":"Удаление ресурса также удалит его из всех задач, в которых он используется. Вы уверены, что хотите удалить эти ресурсы? Ресурсы: {0}","dxGantt-dialogConstraintCriticalViolationMessage":"Задача, которую вы передвигаете, имеет зависимость от другой задачи. Это изменение противоречит правилам валидации. Как вы хотите поступить?","dxGantt-dialogConstraintViolationMessage":"Задача, которую вы передвигаете, имеет зависимость от другой задачи. Как вы хотите поступить?","dxGantt-dialogCancelOperationMessage":"Отменить операцию","dxGantt-dialogDeleteDependencyMessage":"Удалить задачу","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"Сохранить зависимость и передвинуть задачу","dxGantt-undo":"Отменить","dxGantt-redo":"Повторить","dxGantt-expandAll":"Развернуть все","dxGantt-collapseAll":"Свернуть все","dxGantt-addNewTask":"Добавить новую задачу","dxGantt-deleteSelectedTask":"Удалить выделенную задачу","dxGantt-zoomIn":"Увеличить масштаб","dxGantt-zoomOut":"Уменьшить масштаб","dxGantt-fullScreen":"Полноэкранный режим","dxGantt-quarter":"{0}-й кв.","dxGantt-sortingAscendingText":"Сортировать по возрастанию","dxGantt-sortingDescendingText":"Сортировать по убыванию","dxGantt-sortingClearText":"Сбросить сортировку","dxGantt-showResources":"Отображать Ресурсы","dxGantt-showDependencies":"Отображать Зависимости","dxGantt-dialogStartDateValidation":"Начальная дата должна быть позднее {0}","dxGantt-dialogEndDateValidation":"Конечная дата должна быть позднее {0}"}}')},"026c":function(e,t,n){"use strict";n.d(t,"e",(function(){return y})),n.d(t,"m",(function(){return b})),n.d(t,"l",(function(){return C})),n.d(t,"j",(function(){return x})),n.d(t,"n",(function(){return w})),n.d(t,"k",(function(){return S})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return O})),n.d(t,"h",(function(){return E})),n.d(t,"o",(function(){return k})),n.d(t,"b",(function(){return D})),n.d(t,"f",(function(){return A})),n.d(t,"p",(function(){return P})),n.d(t,"g",(function(){return M})),n.d(t,"a",(function(){return R})),n.d(t,"i",(function(){return j}));var i=n("5b62"),o=n("a09c"),r=(e,t)=>{if(!t)throw o["a"].Error("E0017");return Array.isArray(e)?e.map(e=>r(e,t)).join(" "):-1!==e.indexOf(" ")?r(e.split(/\s+/g),t):"".concat(e,".").concat(t)},a=r,s=n("c4f4"),l=n("b144"),u=n("b9af"),c=n("4ba0"),d={backspace:"backspace",tab:"tab",enter:"enter",escape:"escape",pageup:"pageUp",pagedown:"pageDown",end:"end",home:"home",arrowleft:"leftArrow",arrowup:"upArrow",arrowright:"rightArrow",arrowdown:"downArrow",delete:"del"," ":"space",f:"F",a:"A","*":"asterisk","-":"minus",alt:"alt",control:"control",shift:"shift"},h={8:"backspace",9:"tab",13:"enter",27:"escape",33:"pageUp",34:"pageDown",35:"end",36:"home",37:"leftArrow",38:"upArrow",39:"rightArrow",40:"downArrow",46:"del",32:"space",70:"F",65:"A",106:"asterisk",109:"minus",189:"minus",173:"minus",16:"shift",17:"control",18:"alt"},p={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i},f=e=>e,m=e=>f(s["a"].Event(e,e),e),g=e=>"dx"===y(e),v=e=>"mouse"===y(e),_=e=>"touch"===y(e),y=e=>{var{type:t}=e,n="other";return Object(l["a"])(p,(function(e){if(this.test(t))return n=e,!1})),n},b=e=>"pointer"===y(e),C=e=>v(e)||(b(e)||g(e))&&"mouse"===e.pointerType,x=e=>e&&"dxmousewheel"===e.type,w=e=>_(e)||(b(e)||g(e))&&"touch"===e.pointerType,S=e=>{var{screenX:t,offsetX:n,pageX:i}=e;return 0===t&&!n&&0===i},T=e=>{var{pageX:t,pageY:n,timeStamp:i}=e;return{x:t,y:n,time:i}},O=(e,t)=>({x:t.x-e.x,y:t.y-e.y,time:t.time-e.time||1}),E=e=>{var{originalEvent:t,pointers:n}=e;return _(e)?(t.touches||[]).length:g(e)?(n||[]).length:0},I=!1,k=e=>{if(I)return!0;var{target:t}=e,n=Object(i["a"])(t),o=(null===t||void 0===t?void 0:t.isContentEditable)||(null===t||void 0===t?void 0:t.hasAttribute("contenteditable")),r=n.is("input, textarea, select")||o;if(x(e)){var a=n.is("textarea")&&n.hasClass("dx-texteditor-input");if(a||o)return!1;var s=n.is("input[type='number'], textarea, select")&&n.is(":focus");return s}return C(e)?r||e.which>1:w(e)?r&&Object(c["b"])(n):void 0},D=(e,t)=>{var n=m(e);return t&&Object(u["a"])(n,t),n},A=e=>{var{originalEvent:t,delegateTarget:n}=e,i=D(t,e);return s["a"].trigger(n||i.target,i),i},P=e=>{var{key:t,which:n}=e,i=d[null===t||void 0===t?void 0:t.toLowerCase()]||t,o=h[n];return o&&i===t?o:!i&&n?String.fromCharCode(n):i},M=e=>{var{key:t,which:n}=e;return t||String.fromCharCode(n)},R=a,j=e=>{var{ctrlKey:t,metaKey:n}=e;return t||n}},"0319":function(e,t,n){"use strict";n.d(t,"a",(function(){return xi}));var i={};n.r(i),n.d(i,"pie",(function(){return Tn})),n.d(i,"doughnut",(function(){return On})),n.d(i,"donut",(function(){return En}));var o={};n.r(o),n.d(o,"stock",(function(){return Dn})),n.d(o,"candlestick",(function(){return An}));var r=n("bf95"),a=n("b9af"),s=n("b144"),l=n("5d0e"),u=n("6bc7"),c=n("45f8"),d=n("370c"),h=n("bf7a"),p=Object(c["d"])(),f=a["a"],m=Math,g=m.round,v=m.floor,_=m.ceil,y=20,b=20,C=10,x="canvas_position_default";function w(e){return[-e,-e,e,-e,e,e,-e,e,-e,-e]}function S(e){var t=_(e);return[-t,0,0,-t,t,0,0,t,-t,0]}function T(e){var t=_(e),n=v(t/2),i=_(t/2);return[-t,-n,-n,-t,0,-i,n,-t,t,-n,i,0,t,n,n,t,0,i,-n,t,-t,n,-i,0]}function O(e){return[-e,-e,e,-e,0,e,-e,-e]}function E(e){return[-e,e,e,e,0,-e,-e,e]}var I={deleteLabel:function(){this._label.dispose(),this._label=null},_hasGraphic:function(){return this.graphic},clearVisibility:function(){var e=this.graphic;e&&e.attr("visibility")&&e.attr({visibility:null})},isVisible:function(){return this.inVisibleArea&&this.series.isVisible()},setInvisibility:function(){var e=this.graphic;e&&"hidden"!==e.attr("visibility")&&e.attr({visibility:"hidden"}),this._errorBar&&this._errorBar.attr({visibility:"hidden"}),this._label.draw(!1)},clearMarker:function(){var e=this.graphic;e&&e.attr(this._emptySettings)},_createLabel:function(){this._label=new d["a"]({renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this})},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_updateLabelOptions:function(){!this._label&&this._createLabel(),this._label.setOptions(this._options.label)},_checkImage:function(e){return Object(r["d"])(e)&&("string"===typeof e||Object(r["d"])(e.url))},_fillStyle:function(){this._styles=this._options.styles},_checkSymbol:function(e,t){var n=e.symbol,i=t.symbol,o="circle"===n&&"circle"!==i||"circle"!==n&&"circle"===i,r=this._checkImage(e.image)!==this._checkImage(t.image);return!(!o&&!r)},_populatePointShape:function(e,t){switch(e){case"square":return w(t);case"polygon":return S(t);case"triangle":case"triangleDown":return O(t);case"triangleUp":return E(t);case"cross":return T(t)}},hasCoords:function(){return null!==this.x&&null!==this.y},correctValue:function(e){var t=this.series.getValueAxis();this.hasValue()&&(this.value=this.properValue=t.validateUnit(this.initialValue.valueOf()+e.valueOf()),this.minValue=t.validateUnit(e))},resetCorrection:function(){this.value=this.properValue=this.initialValue,this.minValue=x},resetValue:function(){this.hasValue()&&(this.value=this.properValue=this.initialValue=0,this.minValue=0,this._label.setDataField("value",this.value))},_getTranslates:function(e){var t=this.x,n=this.y;return e&&(this._options.rotated?t=this.defaultX:n=this.defaultY),{x:t,y:n}},_createImageMarker:function(e,t,n){var i=n.width||y,o=n.height||b;return e.image(-g(.5*i),-g(.5*o),i,o,n.url?n.url.toString():n.toString(),"center").attr({translateX:t.translateX,translateY:t.translateY,visibility:t.visibility})},_createSymbolMarker:function(e,t){var n,i=this._options.symbol;return"circle"===i?(delete t.points,n=e.circle().attr(t)):"square"!==i&&"polygon"!==i&&"triangle"!==i&&"triangleDown"!==i&&"triangleUp"!==i&&"cross"!==i||(n=e.path([],"area").attr(t).sharp()),n},_createMarker:function(e,t,n,i){var o=this._checkImage(n)?this._createImageMarker(e,i,n):this._createSymbolMarker(e,i);return o&&o.data({"chart-data-point":this}).append(t),o},_getSymbolBBox:function(e,t,n){return{x:e-n,y:t-n,width:2*n,height:2*n}},_getImageBBox:function(e,t){var n=this._options.image,i=n.width||y,o=n.height||b;return{x:e-g(i/2),y:t-g(o/2),width:i,height:o}},_getGraphicBBox:function(){var e,t=this._options,n=this.x,i=this.y;return e=t.visible?this._checkImage(t.image)?this._getImageBBox(n,i):this._getSymbolBBox(n,i,t.styles.normal.r):{x:n,y:i,width:0,height:0},e},hideInsideLabel:u["n"],_getShiftLabelCoords:function(e){var t=this._addLabelAlignmentAndOffset(e,this._getLabelCoords(e));return this._checkLabelPosition(e,t)},_drawLabel:function(){var e=this._getCustomLabelVisibility(),t=this._label,n=this._showForZeroValues()&&this.hasValue()&&!1!==e&&(this.series.getLabelVisibility()||e);t.draw(!!n)},correctLabelPosition:function(e){var t=this._getShiftLabelCoords(e);this.hideInsideLabel(e,t)||(e.setFigureToDrawConnector(this._getLabelConnector(e.pointPosition)),e.shift(g(t.x),g(t.y)))},_showForZeroValues:function(){return!0},_getLabelConnector:function(e){var t=this._getGraphicBBox(e),n=t.width/2,i=t.height/2;return{x:t.x+n,y:t.y+i,r:this._options.visible?Math.max(n,i):0}},_getPositionFromLocation:function(){return{x:this.x,y:this.y}},_isPointInVisibleArea:function(e,t){return e.minX<=t.x+t.width&&e.maxX>=t.x&&e.minY<=t.y+t.height&&e.maxY>=t.y},_checkLabelPosition:function(e,t){var n=this._getVisibleArea(),i=e.getBoundingRect(),o=this._getGraphicBBox(e.pointPosition),r=this._getGraphicBBox(),a="inside"===e.getLayoutOptions().position,s=C;return this._isPointInVisibleArea(n,r)&&(this._options.rotated?(n.minX>t.x&&(t.x=a?n.minX:o.x+o.width+s),n.maxXt.y&&(t.y=n.minY),n.maxYt.x&&(t.x=n.minX),n.maxXt.y&&(t.y=a?n.minY:o.y+o.height+s),n.maxY0&&(_=this._getErrorBarBaseEdgeLength()*o.edgeLength),_=v(parseInt(_)/2),m&&(c=this._baseErrorBarPos),g&&(u=this._baseErrorBarPos),"none"!==d&&Object(r["d"])(u)&&Object(r["d"])(c)&&Object(r["d"])(l)?(!g&&a.push([l-_,u,l+_,u]),a.push([l,u,l,c]),!m&&a.push([l+_,c,l-_,c]),i.rotated&&Object(s["a"])(a,(function(e,t){t.reverse()})),n=this._getErrorBarSettings(o),this._errorBar?(n.points=a,this._errorBar.attr(n)):this._errorBar=e.path(a,"line").attr(n).append(t)):this._errorBar&&this._errorBar.attr({visibility:"hidden"})}},getTooltipParams:function(){var e=this.graphic;return{x:this.x,y:this.y,offset:e?e.getBBox().height/2:0}},setPercentValue:function(e,t,n,i){var o=this.value/e||0,r=this.minValue/e||0,a=o-r;this._label.setDataField("percent",a),this._label.setDataField("total",t),this.series.isFullStackedSeries()&&this.hasValue()&&(this.leftHole&&(this.leftHole/=e-n,this.minLeftHole/=e-n),this.rightHole&&(this.rightHole/=e-i,this.minRightHole/=e-i),this.value=this.properValue=o,this.minValue=r||this.minValue)},_storeTrackerR:function(){var e=p.navigator,t=this._options.styles.normal.r,n=Object(c["e"])("ontouchstart")||e.msPointerEnabled&&e.msMaxTouchPoints||e.pointerEnabled&&e.maxTouchPoints?20:6;return this._options.trackerR=t0?e?"right":"top":e?"left":"bottom"},_getFormatObject:function(e){var t=this._label.getData();return f({},t,{argumentText:e.formatValue(this.initialArgument,"argument"),valueText:e.formatValue(this.initialValue)},Object(r["d"])(t.percent)?{percentText:e.formatValue(t.percent,"percent")}:{},Object(r["d"])(t.total)?{totalText:e.formatValue(t.total)}:{})},getMarkerVisibility:function(){return this._options.visible},coordsIn:function(e,t){var n=this._storeTrackerR();return e>=this.x-n&&e<=this.x+n&&t>=this.y-n&&t<=this.y+n},getMinValue:function(e){var t=this._options.errorBars;if(t&&!e){var n=t.displayMode,i="high"!==n&&Object(r["d"])(this.lowError)?this.lowError:this.value,o="low"!==n&&Object(r["d"])(this.highError)?this.highError:this.value;return io?i:o}return this.value}},k=a["a"],D=Math,A=D.floor,P=D.abs,M="canvas_position_default",R=9,j=4,N="right",B="left",L="top",F="bottom";function V(e){var t=e.initialValue,n=e._getValTranslator().getBusinessRange().invert,i="discrete"===e.series.valueAxisType,o=e.series.isFullStackedSeries(),r=!i&&(t>=0&&!n||t<0&&n)||i&&!n||o;return r?L:F}var H=k({},I,{correctCoordinates(e){var t=A(e.offset-e.width/2);this._options.rotated?(this.height=e.width,this.yCorrection=t,this.xCorrection=null):(this.width=e.width,this.xCorrection=t,this.yCorrection=null)},_getGraphicBBox:function(e){var t={x:this.x,y:this.y,width:this.width,height:this.height};if(e){var n="top"===e;this._options.rotated?(t.x=n?t.x+t.width:t.x,t.width=0):(t.y=n?t.y:t.y+t.height,t.height=0)}return t},_getLabelConnector:function(e){return this._getGraphicBBox(e)},_getLabelPosition:function(){var e=V(this);return this._options.rotated&&(e=e===L?N:B),e},_getLabelCoords:function(e){var t;return t=0===this.initialValue&&this.series.isFullStackedSeries()?this._options.rotated?this._getLabelCoordOfPosition(e,N):this._getLabelCoordOfPosition(e,L):"inside"===e.getLayoutOptions().position?this._getLabelCoordOfPosition(e,"inside"):I._getLabelCoords.call(this,e),t},_drawLabel:function(){this._label.pointPosition="inside"!==this._label.getLayoutOptions().position&&V(this),I._drawLabel.call(this)},hideInsideLabel:function(e,t){var n=this._getGraphicBBox(),i=e.getBoundingRect();return!(!this._options.resolveLabelsOverlapping||!(t.y<=n.y&&t.y+i.height>=n.y+n.height||t.x<=n.x&&t.x+i.width>=n.x+n.width)||t.y>n.y+n.height||t.y+i.heightn.x+n.width||t.x+i.width=0,i=this._getValTranslator().getBusinessRange().invert,{x:o,y:r,width:a,height:s}=this;return this._options.rotated?(t=r+s/2,e=i?n?o:o+a:n?o+a:o):(e=o+a/2,t=i?n?r+s:r:n?r:r+s),{x:e,y:t,offset:0}},getTooltipParams:function(e){if("edge"===e)return this._getEdgeTooltipParams();var t=this.getCenterCoord();return t.offset=0,t},getCenterCoord(){var{width:e,height:t,x:n,y:i}=this;return{x:n+e/2,y:i+t/2}},_truncateCoord:function(e,t){return null===e?e:et[1]?t[1]:e},_getErrorBarBaseEdgeLength(){return this._options.rotated?this.height:this.width},_translateErrorBars:function(e){I._translateErrorBars.call(this),(this._errorBarPose[1])&&(this._errorBarPos=void 0)},_translate:function(){var e=this._options.rotated,t=e?"x":"y",n=e?"y":"x",i=e?"width":"height",o=e?"height":"width",r=this._getArgTranslator(),a=this._getValTranslator(),s=this.series.getArgumentAxis().getVisibleArea(),l=this.series.getValueAxis().getVisibleArea(),u=r.translate(this.argument),c=a.translate(this.value,1),d=a.translate(this.minValue);this[n]=u=null===u?u:u+(this[n+"Correction"]||0),this["v"+t]=c,this["v"+n]=u+this[o]/2,c=this._truncateCoord(c,l),d=this._truncateCoord(d,l),this[i]=P(c-d),c=cs[1]&&(this[o]=s[1]-this[n]))},_updateMarker:function(e,t){this.graphic.smartAttr(k({},t,e?{}:this.getMarkerCoords()))},getMarkerCoords:function(){var e=this.x,t=this.y,n=this.width,i=this.height,o=this.series.getArgumentAxis(),r=this._options.rotated;if(o.getAxisPosition){var a=o.getOptions(),s=Math.round(a.width/2),l=o.getAxisPosition();if(a.visible)if(r){var u=this.minX===this.defaultX&&this.minX===l-o.getAxisShift();e+=u?s:0,n-=u?s:0,n<0&&(n=0)}else i-=this.minY===this.defaultY&&this.minY===l-o.getAxisShift()?s:0,i<0&&(i=0)}return{x:e,y:t,width:n,height:i}},coordsIn:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}}),z=a["a"],U=20,$=z({},I,{correctCoordinates:function(e){this.bubbleSize=e/2},_drawMarker:function(e,t,n){var i=z({translateX:this.x,translateY:this.y},this._getStyle());this.graphic=e.circle(0,0,n?0:this.bubbleSize).smartAttr(i).data({"chart-data-point":this}).append(t)},getTooltipParams:function(e){var t=this.graphic;if(t){var n=t.getBBox().height;return{x:this.x,y:this.y,offset:n3&&void 0!==arguments[3]?arguments[3]:{x:0,y:0,width:0,height:0},a=this,s=Object(h["m"])(a.middleAngle),l=a.radiusInner,u=a.radiusOuter,c="columns"===e;return"inside"===e?(i=l+(u-l)/2+n,o=a.centerX+i*s.cos-r.width/2):(i=t+n,o=s.cos>.1||c&&s.cos>=0?a.centerX+i*s.cos:s.cos<-.1||c&&s.cos<0?a.centerX+i*s.cos-r.width:a.centerX+i*s.cos-r.width/2),{x:o,y:G(a.centerY-i*s.sin-r.height/2)}},_getLabelCoords:function(e){var t=e.getBoundingRect(),n=e.getLayoutOptions(),i=this._getLabelPosition(n);return this._getElementCoords(i,this.radiusLabels,n.radialOffset,t)},_correctLabelCoord:function(e,t){var n=this._label,i=n.getBoundingRect(),o=i.width,r=n.getLayoutOptions(),a=this._getVisibleArea(),s=a.maxX-o,l=a.minX,u=Object(h["w"])(this.middleAngle),c=this.centerX,d=r.connectorOffset,p=e.x;return"columns"===r.position?(p=u<=90||u>=270?s:l,e.x=p):"inside"!==r.position&&t&&(u<=90||u>=270?p-dc&&(p=c-o-d),e.x=p),e},drawLabel:function(){this.translate(),this._isLabelDrawingWithoutPoints=!0,this._drawLabel(),this._isLabelDrawingWithoutPoints=!1},updateLabelCoord:function(e){var t=this._label.getBoundingRect(),n=this._correctLabelCoord(t,e);n=this._checkHorizontalLabelPosition(n,t,this._getVisibleArea()),this._label.shift(G(n.x),G(t.y))},_checkVerticalLabelPosition:function(e,t,n){var i=e.x,o=e.y;return e.y+t.height>n.maxY?o=n.maxY-t.height:e.yn.maxX?i=n.maxX-t.width:e.x0?r=i.maxX-this.centerX-this.radiusLabels:"inside"===o?r>i.maxX-i.minX&&(r=i.maxX-i.minX):e&&n.xthis.centerX?r=Math.floor((i.maxX-i.minX)/2):n.x+r>i.maxX?r=i.maxX-n.x:n.xthis.radiusOuter||0===r)&&(n=K(i/r)*Y*(o>0?-1:1),n<0&&(n+=360),a===s&&X(this.toAngle-this.fromAngle)>1e-4||(a>=s?n<=a&&n>=s:!(n>=a&&n<=s)))}}),Q=a["a"],ee=Math,te=ee.abs,ne=ee.min,ie=ee.max,oe=ee.round,re=20,ae=20,se=Q({},I,{deleteLabel:function(){this._topLabel.dispose(),this._topLabel=null,this._bottomLabel.dispose(),this._bottomLabel=null},hideMarker:function(e){var t=this.graphic,n=t&&t[e+"Marker"],i=this["_"+e+"Label"];n&&"hidden"!==n.attr("visibility")&&n.attr({visibility:"hidden"}),i.draw(!1)},setInvisibility:function(){this.hideMarker("top"),this.hideMarker("bottom")},clearVisibility:function(){var e=this.graphic,t=e&&e.topMarker,n=e&&e.bottomMarker;t&&t.attr("visibility")&&t.attr({visibility:null}),n&&n.attr("visibility")&&n.attr({visibility:null})},clearMarker:function(){var e=this.graphic,t=e&&e.topMarker,n=e&&e.bottomMarker,i=this._emptySettings;t&&t.attr(i),n&&n.attr(i)},_getLabelPosition:function(e){var t,n="inside"===this._options.label.position;return t=this._options.rotated?"top"===e^n?"right":"left":"top"===e^n?"top":"bottom",t},_getLabelMinFormatObject:function(){return{index:0,argument:this.initialArgument,value:this.initialMinValue,seriesName:this.series.name,originalValue:this.originalMinValue,originalArgument:this.originalArgument,point:this}},_updateLabelData:function(){var e=this._getLabelFormatObject();e.index=1,this._topLabel.setData(e),this._bottomLabel.setData(this._getLabelMinFormatObject())},_updateLabelOptions:function(){var e=this._options.label;(!this._topLabel||!this._bottomLabel)&&this._createLabel(),this._topLabel.setOptions(e),this._bottomLabel.setOptions(e)},_createLabel:function(){var e={renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this};this._topLabel=new d["a"](e),this._bottomLabel=new d["a"](e)},_getGraphicBBox:function(e){var t,n=this._options,i=this._getImage(n.image),o="top"===e?this._checkImage(i.top):this._checkImage(i.bottom),r=this._getPositionFromLocation(e);return t=n.visible?o?this._getImageBBox(r.x,r.y):this._getSymbolBBox(r.x,r.y,n.styles.normal.r):{x:r.x,y:r.y,width:0,height:0},t},_getPositionFromLocation:function(e){var t,n,i="top"===e;return this._options.rotated?(t=i?ie(this.x,this.minX):ne(this.x,this.minX),n=this.y):(t=this.x,n=i?ne(this.y,this.minY):ie(this.y,this.minY)),{x:t,y:n}},_checkOverlay:function(e,t,n){return es&&(l=s-c-t[o],u+=l,c+=l),{coord1:u,coord2:c}},_checkLabelsOverlay:function(e){var t=this._topLabel.getBoundingRect(),n=this._bottomLabel.getBoundingRect(),i={};this._options.rotated?"top"===e?this._checkOverlay(t.x,n.x,n.width)&&(i=this._getOverlayCorrections(n,t),this._topLabel.shift(i.coord2,t.y),this._bottomLabel.shift(i.coord1,n.y)):this._checkOverlay(n.x,t.x,t.width)&&(i=this._getOverlayCorrections(t,n),this._topLabel.shift(i.coord1,t.y),this._bottomLabel.shift(i.coord2,n.y)):"top"===e?this._checkOverlay(n.y,t.y,t.height)&&(i=this._getOverlayCorrections(t,n),this._topLabel.shift(t.x,i.coord1),this._bottomLabel.shift(n.x,i.coord2)):this._checkOverlay(t.y,n.y,n.height)&&(i=this._getOverlayCorrections(n,t),this._topLabel.shift(t.x,i.coord2),this._bottomLabel.shift(n.x,i.coord1))},_drawLabel:function(){var e=[],t=this._options.rotated?this.x>=this.minX:this.yo,d=u[0]>a&&u[0]>r||u[1]a,n=u[0]=r,i&&(e=t,t=n,n=e)),this.visibleTopMarker=t,this.visibleBottomMarker=n,s},getTooltipParams:function(){var e,t,n=this._options.rotated,i=n?ne(this.x,this.minX):ne(this.y,this.minY),o=n?"width":"height",r=this._getVisibleArea(),a=n?r.minX:r.minY,s=n?r.maxX:r.maxY,l=ie(a,i),u=ne(s,i+this[o]);return n?(t=this.y,e=l+(u-l)/2):(e=this.x,t=l+(u-l)/2),{x:e,y:t,offset:0}},_translate:function(){var e=this._options.rotated;I._translate.call(this),this.height=e?0:te(this.minY-this.y),this.width=e?te(this.x-this.minX):0},hasCoords:function(){return I.hasCoords.call(this)&&!(null===this.minX||null===this.minY)},_updateData:function(e){I._updateData.call(this,e),this.minValue=this.initialMinValue=this.originalMinValue=e.minValue},_getImageSettings:function(e,t){return{href:t.url||t.toString(),width:t.width||re,height:t.height||ae,translateX:e.translateX,translateY:e.translateY}},getCrosshairData:function(e,t){var n=this._options.rotated,i=this.minX,o=this.minY,r=this.vx,a=this.vy,s=this.value,l=this.minValue,u=this.argument,c={axis:this.series.axis,x:r,y:a,yValue:s,xValue:u};return n?(c.yValue=u,te(r-e)=te(o-t)&&(c.y=o,c.yValue=l),c},_updateOneMarker:function(e,t){this.graphic&&this.graphic[e]&&this.graphic[e].attr(t)},_updateMarker:function(e,t){this._drawMarker(void 0,void 0,!1,!1,t)},_getFormatObject:function(e){var t=this.initialMinValue,n=this.initialValue,i=this.initialArgument,o=e.formatValue(t),r=e.formatValue(n);return{argument:i,argumentText:e.formatValue(i,"argument"),valueText:o+" - "+r,rangeValue1Text:o,rangeValue2Text:r,rangeValue1:t,rangeValue2:n,seriesName:this.series.name,point:this,originalMinValue:this.originalMinValue,originalValue:this.originalValue,originalArgument:this.originalArgument}},getLabel:function(){return[this._topLabel,this._bottomLabel]},getLabels:function(){return[this._topLabel,this._bottomLabel]},getBoundingRect:u["n"],coordsIn:function(e,t){var n=this._storeTrackerR(),i=e>=this.x-n&&e<=this.x+n,o=t>=this.y-n&&t<=this.y+n;return this._options.rotated?o&&(i||e>=this.minX-n&&e<=this.minX+n):i&&(o||t>=this.minY-n&&t<=this.minY+n)},getMaxValue:function(){return"discrete"!==this.series.valueAxisType&&this.minValue>this.value?this.minValue:this.value},getMinValue:function(){return"discrete"!==this.series.valueAxisType?this.minValue10?10:n,this.width=n+n%2,this.xCorrection=e.offset},_getMarkerGroup:function(e){var t;return t=this._isReduction&&this._isPositive?e.reductionPositiveMarkersGroup:this._isReduction?e.reductionMarkersGroup:this._isPositive?e.defaultPositiveMarkersGroup:e.defaultMarkersGroup,t},_drawMarker:function(e,t){this._drawMarkerInGroup(this._getMarkerGroup(t),this._getStyle(),e)},_getSettingsForTracker:function(){var e,t,n,i,o=this.highY,r=this.lowY,a=this._options.rotated;return o===r&&(o=a?o+me:o-me,r=a?r-me:r+me),a?(e=he(r,o),t=this.x-this.width/2,n=de(r-o),i=this.width):(e=this.x-this.width/2,t=he(r,o),n=this.width,i=de(r-o)),{x:e,y:t,width:n,height:i}},_getGraphicBBox:function(e){var t=this._options.rotated,n=this.x,i=this.width,o=this.lowY,r=this.highY;if(e){var a=this.series.getValueAxis().getVisibleArea();r=this._truncateCoord(r,a),o=this._truncateCoord(o,a)}var s={x:t?o:n-fe(i/2),y:t?n-fe(i/2):r,width:t?r-o:i,height:t?i:o-r};if(e){var l="top"===e;this._options.rotated?(s.x=l?s.x+s.width:s.x,s.width=0):(s.y=l?s.y:s.y+s.height,s.height=0)}return s},getTooltipParams:function(e){if(this.graphic){var t=he(this.lowY,this.highY),n=pe(this.lowY,this.highY),i=this._getVisibleArea(),o=this._options.rotated,r=o?i.minX:i.minY,a=o?i.maxX:i.maxY,s=pe(r,t),l=he(a,n),u=this.getCenterCoord();return"edge"===e&&(u[o?"x":"y"]=o?l:s),u.offset=0,u}},getCenterCoord(){if(this.graphic){var e,t,n=he(this.lowY,this.highY),i=pe(this.lowY,this.highY),o=this._getVisibleArea(),r=this._options.rotated,a=r?o.minX:o.minY,s=r?o.maxX:o.maxY,l=pe(a,n),u=he(s,i),c=l+(u-l)/2;return r?(t=this.x,e=c):(e=this.x,t=c),{x:e,y:t}}},hasValue:function(){return null!==this.highValue&&null!==this.lowValue},hasCoords:function(){return null!==this.x&&null!==this.lowY&&null!==this.highY},_translate:function(){var e=this._options.rotated,t=this._getValTranslator(),n=this._getArgTranslator().translate(this.argument);this.vx=this.vy=this.x=null===n?n:n+(this.xCorrection||0),this.openY=null!==this.openValue?t.translate(this.openValue):null,this.highY=t.translate(this.highValue),this.lowY=t.translate(this.lowValue),this.closeY=null!==this.closeValue?t.translate(this.closeValue):null;var i=he(this.lowY,this.highY)+de(this.lowY-this.highY)/2;this._calculateVisibility(e?i:this.x,e?this.x:i)},getCrosshairData:function(e,t){var n,i,o=this._options.rotated,r=o?e:t,a=this.argument,s="low";return de(this.lowY-r)=de(this.openY-r)&&(n=this.openY,s="open"),de(n-r)>=de(this.highY-r)&&(n=this.highY,s="high"),i=o?{y:this.vy,x:n,xValue:this[s+"Value"],yValue:a}:{x:this.vx,y:n,xValue:a,yValue:this[s+"Value"]},i.axis=this.series.axis,i},_updateData:function(e){var t=this._label,n=this._options.reduction.color;this.value=this.initialValue=e.reductionValue,this.originalValue=e.value,this.lowValue=this.originalLowValue=e.lowValue,this.highValue=this.originalHighValue=e.highValue,this.openValue=this.originalOpenValue=e.openValue,this.closeValue=this.originalCloseValue=e.closeValue,this._isPositive=e.openValuei&&(i=t.minX),t.maxXo&&(o=t.minY),t.maxY=0?t.radius:null;this.vx=Object(h["w"])(t.angle),this.vy=this.radiusOuter=this.radiusLabels=o,this.radiusLabels+=we,this.radius=o,this.middleAngle=-t.angle,this.angle=-t.angle,this.x=t.x,this.y=t.y,this.defaultX=this.centerX=e.x,this.defaultY=this.centerY=e.y,this._translateErrorBars(),this.inVisibleArea=this._checkRadiusForVisibleArea(o,i)},_checkRadiusForVisibleArea:(e,t)=>Object(r["d"])(e)&&e<=t,_translateErrorBars:function(){var e=this._options.errorBars,t=this._getValTranslator();e&&(Object(r["d"])(this.lowError)&&(this._lowErrorCoord=this.centerY-t.translate(this.lowError)),Object(r["d"])(this.highError)&&(this._highErrorCoord=this.centerY-t.translate(this.highError)),this._errorBarPos=this.centerX,this._baseErrorBarPos="stdDeviation"===e.type?this._lowErrorCoord+(this._highErrorCoord-this._lowErrorCoord)/2:this.centerY-this.radius)},_getTranslates:function(e){return e?this.getDefaultCoords():{x:this.x,y:this.y}},getDefaultCoords:function(){var e=Object(h["m"])(-this.angle),t=this._getValTranslator().translate(Ee),n=this.defaultX+t*e.cos,i=this.defaultY+t*e.sin;return{x:n,y:i}},_addLabelAlignmentAndOffset:function(e,t){return t},_checkLabelPosition:function(e,t){var n=this._getVisibleArea(),i=this._getGraphicBBox();return this._isPointInVisibleArea(n,i)&&(t=this._moveLabelOnCanvas(t,n,e.getBoundingRect())),t},_getErrorBarSettings:function(e,t){var n=I._getErrorBarSettings.call(this,e,t);return n.rotate=Se-this.angle,n.rotateX=this.centerX,n.rotateY=this.centerY,n},getCoords:function(e){return e?this.getDefaultCoords():{x:this.x,y:this.y}}}),ke=be({},H,{_translateErrorBars:Ie._translateErrorBars,_getErrorBarSettings:Ie._getErrorBarSettings,_moveLabelOnCanvas:Ie._moveLabelOnCanvas,_getLabelCoords:J._getLabelCoords,_getElementCoords:J._getElementCoords,_getLabelConnector:J._getLabelConnector,getTooltipParams:J.getTooltipParams,_getLabelPosition:J._getLabelPosition,_getCoords:Ie._getCoords,_translate(){var e=this._getValTranslator(),t=e.getBusinessRange(),n=e.isInverted()?e.translate(Te):e.translate(Oe);this.radiusInner=e.translate(this.minValue),Ie._translate.call(this),null===this.radiusInner?this.radiusInner=this.radius=n:null===this.radius?this.radius=this.value>=t.minVisible?n:0:this.radius>n&&(this.radius=n),this.radiusOuter=this.radiusLabels=xe(this.radiusInner,this.radius),this.radiusLabels+=we,this.radiusInner=this.defaultRadius=Ce.min(this.radiusInner,this.radius),this.middleAngle=this.angle=-Object(h["w"])(this.middleAngleCorrection-this.angle)},_checkRadiusForVisibleArea(e){return Object(r["d"])(e)||this._getValTranslator().translate(this.minValue)>0},_getErrorBarBaseEdgeLength(){var e=this.getMarkerCoords();return Ce.PI*e.outerRadius*Ce.abs(e.startAngle-e.endAngle)/180},getMarkerCoords:function(){return{x:this.centerX,y:this.centerY,outerRadius:this.radiusOuter,innerRadius:this.defaultRadius,startAngle:this.middleAngle-this.interval/2,endAngle:this.middleAngle+this.interval/2}},_drawMarker:function(e,t,n){var i=this._getStyle(),o=this.getMarkerCoords(),r=o.innerRadius,a=o.outerRadius,s=this._getCoords(this.argument,Ee),l=o.x,u=o.y;n&&(r=0,a=0,l=s.x,u=s.y),this.graphic=e.arc(l,u,r,a,o.startAngle,o.endAngle).attr(i).data({"chart-data-point":this}).append(t)},_checkLabelPosition:function(e,t){var n=this._getVisibleArea(),i=Object(h["m"])(this.middleAngle),o=this.centerX+this.defaultRadius*i.cos,r=this.centerY-this.defaultRadius*i.sin;return o>n.minX&&on.minY&&r=i.startAngle&&-n.phi<=i.endAngle:-n.phi<=i.startAngle&&-n.phi>=i.endAngle;return n.r>=i.innerRadius&&n.r<=i.outerRadius&&o}}),De={},Ae=a["a"],Pe=l["a"].states,Me="symbolPoint",Re="polarSymbolPoint",je="barPoint",Ne="polarBarPoint",Be="piePoint",Le=Pe.selectedMark,Fe=Pe.hoverMark,Ve=Pe.normalMark,He=Pe.hover,ze=Pe.normal,Ue=Pe.selection,$e={chart:{scatter:Me,line:Me,spline:Me,stepline:Me,stackedline:Me,fullstackedline:Me,stackedspline:Me,fullstackedspline:Me,stackedsplinearea:Me,fullstackedsplinearea:Me,area:Me,splinearea:Me,steparea:Me,stackedarea:Me,fullstackedarea:Me,rangearea:"rangeSymbolPoint",bar:je,stackedbar:je,fullstackedbar:je,rangebar:"rangeBarPoint",bubble:"bubblePoint",stock:"stockPoint",candlestick:"candlestickPoint"},pie:{pie:Be,doughnut:Be,donut:Be},polar:{scatter:Re,line:Re,area:Re,bar:Ne,stackedbar:Ne}};function We(e){return"none"===Object(h["y"])(e)}function Ge(e,t,n){this.fullState=Ve,this.series=e,this.update(t,n),this._viewCounters={hover:0,selection:0},this._emptySettings={fill:null,stroke:null,dashStyle:null}}De.symbolPoint=I,De.barPoint=H,De.bubblePoint=$,De.piePoint=J,De.rangeSymbolPoint=se,De.rangeBarPoint=ue,De.candlestickPoint=ge,De.stockPoint=ye,De.polarSymbolPoint=Ie,De.polarBarPoint=ke,Ge.prototype={constructor:Ge,getColor:function(){return this.hasValue()||this._styles.usePointCustomOptions||this.series.customizePoint(this,this._dataItem),this._styles.normal.fill||this.series.getColor()},_getStyle:function(){return this._styles[this._currentStyle||"normal"]},update:function(e,t){this.updateOptions(t),this.updateData(e)},updateData:function(e){var t=this.argument!==e.argument;this.argument=this.initialArgument=this.originalArgument=e.argument,this.tag=e.tag,this.index=e.index,this._dataItem=e,this.data=e.data,this.lowError=e.lowError,this.highError=e.highError,this.aggregationInfo=e.aggregationInfo,this._updateData(e,t),!this.hasValue()&&this.setInvisibility(),this._fillStyle(),this._updateLabelData()},deleteMarker:function(){this.graphic&&this.graphic.dispose(),this.graphic=null},draw:function(e,t,n,i){return(this._needDeletingOnDraw||this.series.autoHidePointMarkers&&!this.isSelected())&&(this.deleteMarker(),this._needDeletingOnDraw=!1),this._needClearingOnDraw&&(this.clearMarker(),this._needClearingOnDraw=!1),this._hasGraphic()?this._updateMarker(n,this._getStyle(),t.markers):this.getMarkerVisibility()&&!this.series.autoHidePointMarkers&&this._drawMarker(e,t.markers,n,i),this._drawLabel(),this._drawErrorBar(e,t.errorBars,n),this},_getViewStyle:function(){var e=Ve,t=this.fullState,n=[ze,He,Ue,Ue];return this._viewCounters.hover&&(e|=Fe),this._viewCounters.selection&&(e|=Le),We(this.getOptions().selectionMode)&&(t&=~Le),We(this.getOptions().hoverMode)&&(t&=~Fe),e|=t,n[e]},applyView:function(e){var t=this._getViewStyle();this._currentStyle=t,this.graphic||!this.getMarkerVisibility()||!this.series.autoHidePointMarkers||t!==Ue&&t!==He||this._drawMarker(this.series.getRenderer(),this.series.getMarkersGroup()),this.graphic&&(this.series.autoHidePointMarkers&&t!==Ue&&t!==He?this.deleteMarker():("normal"===t?this.clearMarker():this.graphic.toForeground(),this._updateMarker(!0,this._styles[t],void 0,e)))},setView:function(e){this._viewCounters[e]++,this.applyView()},resetView:function(e){var t=this._viewCounters;--t[e],t[e]<0&&(t[e]=0),this.applyView()},releaseHoverState:function(){this.graphic&&!this.isSelected()&&this.graphic.toBackground()},select:function(){this.series.selectPoint(this)},clearSelection:function(){this.series.deselectPoint(this)},hover:function(){this.series.hoverPoint(this)},clearHover:function(){this.series.clearPointHover()},showTooltip:function(){this.series.showPointTooltip(this)},hideTooltip:function(){this.series.hidePointTooltip(this)},_checkLabelsChanging:function(e,t){var n=~t.indexOf("range"),i=~e.indexOf("range");return i&&!n||!i&&n},updateOptions:function(e){if(e){var t=this._options,n=e.widgetType,i=t&&t.type,o=e.type,r=$e[n][o];i!==o?(this._needDeletingOnDraw=!0,this._needClearingOnDraw=!1,i&&(this._checkLabelsChanging(i,o)&&this.deleteLabel(),this._resetType(De[$e[i]])),this._setType(De[r])):(this._needDeletingOnDraw=this._checkSymbol(t,e),this._needClearingOnDraw=this._checkCustomize(t,e)),this._options=e,this._fillStyle(),this._updateLabelOptions(r)}},translate:function(){this.hasValue()&&(this._translate(),this.translated=!0)},_checkCustomize:function(e,t){return e.styles.usePointCustomOptions&&!t.styles.usePointCustomOptions},_getCustomLabelVisibility:function(){return this._styles.useLabelCustomOptions?!!this._options.label.visible:null},getBoundingRect:function(){return this._getGraphicBBox()},_resetType:function(e){for(var t in e)delete this[t]},_setType:function(e){for(var t in e)this[t]=e[t]},isInVisibleArea:function(){return this.inVisibleArea},isSelected:function(){return!!(this.fullState&Le)},isHovered:function(){return!!(this.fullState&Fe)},getOptions:function(){return this._options},animate:function(e,t,n){this.graphic?this.graphic.animate(t,{partitionDuration:n},e):e&&e()},getCoords:function(e){return e?this._options.rotated?{x:this.minX-(this.x-this.minX?0:1),y:this.y}:{x:this.x,y:this.minY+(this.y-this.minY?0:1)}:{x:this.x,y:this.y}},getDefaultCoords:function(){return this._options.rotated?{x:this.defaultX,y:this.y}:{x:this.x,y:this.defaultY}},setDefaultCoords(){var e=this.getDefaultCoords();this.x=e.x,this.y=e.y},_getVisibleArea:function(){return this.series.getVisibleArea()},_getArgTranslator:function(){return this.series.getArgumentAxis().getTranslator()},_getValTranslator:function(){return this.series.getValueAxis().getTranslator()},_calculateVisibility:function(e,t,n,i){var o=this._getVisibleArea(),a=this._options.rotated;o.minX>e+(n||0)||o.maxXt+(i||0)||o.maxY{if(t.isVisible()){var n=t._getFormatObject(e);o.push(n),i.push(n.seriesName+": "+n.valueText)}}),Ae(n,{points:o,valueText:i.join("\n"),stackName:this.series.getStackName()||null}));var r=this.aggregationInfo;if(r){var a=this.series.getArgumentAxis(),s=a.formatRange(r.intervalStart,r.intervalEnd,r.aggregationInterval,e.getOptions().argumentFormat);s&&(n.valueText+="\n".concat(s))}return n},setHole:function(e,t){var n=isFinite(this.minValue)?this.minValue:0;Object(r["d"])(e)&&("left"===t?(this.leftHole=this.value-e,this.minLeftHole=n-e):(this.rightHole=this.value-e,this.minRightHole=n-e))},resetHoles:function(){this.leftHole=null,this.minLeftHole=null,this.rightHole=null,this.minRightHole=null},getLabel:function(){return this._label},getLabels:function(){return[this._label]},getCenterCoord(){return{x:this.x,y:this.y}}};var qe=n("d21d"),Ke=n("8fe2"),Ye=Math,Xe=Ye.abs,Ze=Ye.sqrt,Je=Ye.max,Qe=12,et=400,tt="highError",nt="lowError",it="variance",ot="stddeviation",rt="stderror",at="percent",st="fixed",lt="undefined",ut="discrete",ct="logarithmic",dt="datetime",ht={},pt={};function ft(e){var t=0;return Object(s["a"])(e,(function(e,n){t+=n})),t}function mt(e){return-1!==Object(Ke["d"])(e,[st,at,it,ot,rt])}function gt(e,t){return ft(Object(h["u"])(e,(function(e){return(e-t)*(e-t)})))/e.length}function vt(e,t,n){var i=n.getOptions().valueErrorBar,o=n.getValueFields()[0],a=i.lowValueField||nt,s=i.highValueField||tt;if(n.areErrorBarsVisible()&&void 0===i.type){var l=t.reduce((function(e,t){return Object(r["d"])(t[a])&&(e[0]+=t[o]-t[a],e[1]++),Object(r["d"])(t[s])&&(e[2]+=t[s]-t[o],e[3]++),e}),[0,0,0,0]);l[1]&&(e[a]=e[o]-l[0]/l[1]),l[2]&&(e[s]=e[o]+l[2]/l[3])}return e}function _t(e,t,n){var i=n.getOptions().valueErrorBar,o=i.lowValueField||nt,r=i.highValueField||tt;return n.areErrorBarsVisible()&&void 0===i.type&&(e[o]=0,e[r]=0,e=t.reduce((function(e,t){return e[o]+=t[o],e[r]+=t[r],e}),e)),e}function yt(e){return(t,n)=>{var{intervalStart:i,intervalEnd:o,data:r}=t,s=n.getValueFields()[0],l=r[0];return l=r.reduce((t,n)=>{var i=n[s];return null===t[s]&&(t=n),null!==i&&e(i,t[s])?n:t},l),Object(a["a"])({},l,{[n.getArgumentField()]:n._getIntervalCenter(i,o)})}}function bt(e,t,n){var i=!0;for(var o in t){var a="argument"===o;if(a||"size"===o?!Object(r["d"])(e[o]):void 0===e[o]){var s=t[o];a||(n[s]=(n[s]||0)+1),i=!1}}return i}var Ct={_defaultDuration:et,_defaultTrackerWidth:Qe,_applyStyle:u["n"],_updateOptions:u["n"],_parseStyle:u["n"],_prepareSegment:u["n"],_drawSegment:u["n"],_appendInGroup:function(){this._group.append(this._extGroups.seriesGroup)},_createLegendState:function(e,t){return{fill:e.color||t,hatching:e.hatching?Object(a["a"])({},e.hatching,{direction:"right"}):void 0}},_applyElementsClipRect:function(e){e["clip-path"]=this._paneClipRectID},_applyMarkerClipRect:function(e){e["clip-path"]=this._forceClipping?this._paneClipRectID:null},_createGroup:function(e,t,n,i){var o=t[e]=t[e]||this._renderer.g();n&&o.append(n),i&&o.attr(i)},_applyClearingSettings:function(e){e.opacity=null,e.scale=null,this._options.rotated?e.translateX=null:e.translateY=null},_createGroups:function(){this._createGroup("_markersGroup",this,this._group),this._createGroup("_labelsGroup",this)},_setMarkerGroupSettings:function(){var e=this._createPointStyles(this._getMarkerGroupOptions()).normal;e.class="dxc-markers",e.opacity=1,this._applyMarkerClipRect(e),this._markersGroup.attr(e)},getVisibleArea:function(){return this._visibleArea},areErrorBarsVisible:function(){var e=this._options.valueErrorBar;return e&&this._errorBarsEnabled()&&"none"!==e.displayMode&&(mt(Object(h["y"])(e.type))||Object(r["d"])(e.lowValueField)||Object(r["d"])(e.highValueField))},groupPointsByCoords(e){var t=[];return Object(s["a"])(this.getVisiblePoints(),(function(n,i){var o=parseInt(e?i.vy:i.vx);t[o]?Array.isArray(t[o])?t[o].push(i):t[o]=[t[o],i]:t[o]=i})),t},_createErrorBarGroup:function(e){var t,n=this._options.valueErrorBar;this.areErrorBarsVisible()&&(t={class:"dxc-error-bars",stroke:n.color,"stroke-width":n.lineWidth,opacity:e?.001:n.opacity||1,"stroke-linecap":"square",sharp:!0,"clip-path":this._forceClipping?this._paneClipRectID:this._widePaneClipRectID},this._createGroup("_errorBarGroup",this,this._group,t))},_setGroupsSettings:function(e){this._setMarkerGroupSettings(),this._setLabelGroupSettings(e),this._createErrorBarGroup(e)},_getCreatingPointOptions:function(){var e,t,n=this._predefinedPointOptions;return n||(e=this._getPointOptions(),this._predefinedPointOptions=n=Object(a["a"])(!0,{styles:{}},e),t=e.styles&&e.styles.normal||{},n.styles=n.styles||{},n.styles.normal={"stroke-width":t["stroke-width"],r:t.r,opacity:t.opacity}),n},_getPointOptions:function(){return this._parsePointOptions(this._preparePointOptions(),this._options.label)},_getOptionsForPoint:function(){return this._options.point},_parsePointStyle:function(e,t,n,i){var o=e.border||{},r=void 0!==e.size?e.size:i;return{fill:e.color||t,stroke:o.color||n,"stroke-width":o.visible?o.width:0,r:r/2+(o.visible&&0!==r&&~~(o.width/2)||0)}},_createPointStyles:function(e){var t=e.color||this._options.mainSeriesColor,n=this._options.containerBackgroundColor,i=this._parsePointStyle(e,t,t);return i.visibility=e.visible?"visible":"hidden",{normal:i,hover:this._parsePointStyle(e.hoverStyle,n,t,e.size),selection:this._parsePointStyle(e.selectionStyle,n,t,e.size)}},_checkData:function(e,t,n){return n=n||{value:this.getValueFields()[0]},n.argument=this.getArgumentField(),bt(e,n,t||{})&&e.value===e.value},getArgumentRangeInitialValue(){var e,t,n=this.getPoints();if(this.useAggregation()&&n.length)return{min:null===(e=n[0].aggregationInfo)||void 0===e?void 0:e.intervalStart,max:null===(t=n[n.length-1].aggregationInfo)||void 0===t?void 0:t.intervalEnd}},getValueRangeInitialValue:function(){},_getRangeData:function(){return qe["a"].getRangeData(this)},_getPointDataSelector:function(){var e,t,n=this.getValueFields()[0],i=this.getArgumentField(),o=this.getTagField(),r=this.areErrorBarsVisible();if(r){var a=this._options.valueErrorBar;e=a.lowValueField||nt,t=a.highValueField||tt}return a=>{var s={value:this._processEmptyValue(a[n]),argument:a[i],tag:a[o],data:a};return r&&(s.lowError=a[e],s.highError=a[t]),s}},_errorBarsEnabled:function(){return this.valueAxisType!==ut&&this.valueAxisType!==ct&&this.valueType!==dt},_drawPoint:function(e){var t=e.point;t.isInVisibleArea()?(t.clearVisibility(),t.draw(this._renderer,e.groups,e.hasAnimation,e.firstDrawing),this._drawnPoints.push(t)):t.setInvisibility()},_animateComplete:function(){var e={duration:this._defaultDuration};this._labelsGroup&&this._labelsGroup.animate({opacity:1},e),this._errorBarGroup&&this._errorBarGroup.animate({opacity:this._options.valueErrorBar.opacity||1},e)},_animate:function(){var e=this,t=e._drawnPoints.length-1;Object(s["a"])(e._drawnPoints||[],(function(n,i){i.animate(n===t?function(){e._animateComplete()}:void 0,{translateX:i.x,translateY:i.y})}))},_getIntervalCenter(e,t){var n=this.getArgumentAxis(),i=n.getOptions();return n.aggregatedPointBetweenTicks()?e:"discrete"!==i.type?n.getVisualRangeCenter({minVisible:e,maxVisible:t},!0):e},_defaultAggregator:"avg",_aggregators:{avg(e,t){var{data:n,intervalStart:i,intervalEnd:o}=e;if(n.length){var a=t.getValueFields()[0],s=n.reduce((e,t)=>{var n=t[a];return Object(r["d"])(n)?(e[0]+=n,e[1]++):null===n&&e[2]++,e},[0,0,0]);return vt({[a]:s[2]===n.length?null:s[0]/s[1],[t.getArgumentField()]:t._getIntervalCenter(i,o)},n,t)}},sum(e,t){var{intervalStart:n,intervalEnd:i,data:o}=e;if(o.length){var r=t.getValueFields()[0],a=o.reduce((e,t)=>{var n=t[r];return void 0!==n&&(e[0]+=n),null===n?e[1]++:void 0===n&&e[2]++,e},[0,0,0]),s=a[0];if(a[1]===o.length&&(s=null),a[2]!==o.length)return _t({[r]:s,[t.getArgumentField()]:t._getIntervalCenter(n,i)},o,t)}},count(e,t){var{data:n,intervalStart:i,intervalEnd:o}=e,r=t.getValueFields()[0];return{[t.getArgumentField()]:t._getIntervalCenter(i,o),[r]:n.filter(e=>void 0!==e[r]).length}},min:yt((e,t)=>ee>t)},_endUpdateData:function(){delete this._predefinedPointOptions},getArgumentField:function(){return this._options.argumentField||"arg"},getValueFields:function(){var e,t,n=this._options,i=n.valueErrorBar,o=[n.valueField||"val"];return i&&(e=i.lowValueField,t=i.highValueField,Object(r["o"])(e)&&o.push(e),Object(r["o"])(t)&&o.push(t)),o},_calculateErrorBars:function(e){if(this.areErrorBarsVisible()){var t,n,i,o,a,l=this._options,u=l.valueErrorBar,c=Object(h["y"])(u.type),d=parseFloat(u.value),p=this.getValueFields()[0],f=u.lowValueField||nt,m=u.highValueField||tt,g=function(e,n){t=n.value,n.lowError=t-d,n.highError=t+d};switch(c){case st:a=g;break;case at:a=function(e,n){t=n.value;var i=t*d/100;n.lowError=t-i,n.highError=t+i};break;case lt:a=function(e,t){t.lowError=t.data[f],t.highError=t.data[m]};break;default:switch(n=Object(h["u"])(e,(function(e){return Object(r["d"])(e.data[p])?e.data[p]:null})),i=n.length,d=d||1,c){case it:d=gt(n,ft(n)/i)*d,a=g;break;case ot:o=ft(n)/i,d=Ze(gt(n,o))*d,a=function(e,t){t.lowError=o-d,t.highError=o+d};break;case rt:d=Ze(gt(n,ft(n)/i)/i)*d,a=g}}a&&Object(s["a"])(e,a)}},_patchMarginOptions:function(e){var t=this._getCreatingPointOptions(),n=t.styles,i=[n.normal,n.hover,n.selection].reduce((function(e,t){return Je(e,2*t.r+t["stroke-width"])}),0);return e.size=t.visible?i:0,e.sizePointNormalState=t.visible?2*n.normal.r+n.normal["stroke-width"]:2,e},usePointsToDefineAutoHiding:()=>!0};ht=Object(a["a"])({},Ct,{drawTrackers:function(){var e,t,n=this,i=n._segments||[],o=n._options.rotated;n.isVisible()&&(i.length&&(e=n._trackers=n._trackers||[],t=n._trackersGroup=(n._trackersGroup||n._renderer.g().attr({fill:"gray",opacity:.001,stroke:"gray",class:"dxc-trackers"})).attr({"clip-path":this._paneClipRectID||null}).append(n._group),Object(s["a"])(i,(function(i,o){e[i]?n._updateTrackerElement(o,e[i]):e[i]=n._drawTrackerElement(o).data({"chart-data-series":n}).append(t)}))),n._trackersTranslator=n.groupPointsByCoords(o))},_checkAxisVisibleAreaCoord(e,t){var n=e?this.getArgumentAxis():this.getValueAxis(),i=n.getVisibleArea();return Object(r["d"])(t)&&i[0]<=t&&i[1]>=t},checkSeriesViewportCoord(e,t){return this.getPoints().length&&this.isVisible()},getSeriesPairCoord(e,t){for(var n=null,i=!t&&!this._options.rotated||t&&this._options.rotated,o=i?"vy":"vx",r=i?"vx":"vy",a=this.getVisiblePoints(),s=0;s[e,t],_getBezierPoints:()=>[],_getNearestPointsByCoord(e,t){var n=this,i=n.getOptions().rotated,o=!t&&!i||t&&i,r=o?"vy":"vx",a=n.getPoints(),s=n._getBezierPoints(),l=[];return a.length>1?a.forEach((t,i)=>{var o=a[i+1];o&&(t[r]<=e&&o[r]>=e||t[r]>=e&&o[r]<=e)&&l.push(n._getNearestPoints(t,o,s))}):l.push([a[0],a[0]]),l},getNeighborPoint:function(e,t){var n,i=this._options.rotated?t:e,o=i,r=this._trackersTranslator,a=null,l=this._options.rotated?e:t,u=this._options.rotated?"vx":"vy";if(this.isVisible()&&r){a=r[i];do{a=r[o]||r[i],i--,o++}while((i>=0||o=i&&(n=i,a=t)})))}return a},_applyVisibleArea:function(){var e=this._options.rotated,t=(e?this.getValueAxis():this.getArgumentAxis()).getVisibleArea(),n=(e?this.getArgumentAxis():this.getValueAxis()).getVisibleArea();this._visibleArea={minX:t[0],maxX:t[1],minY:n[0],maxY:n[1]}},getPointCenterByArg(e){var t=this.getPointsByArg(e)[0];return t?t.getCenterCoord():void 0}}),pt=Object(a["a"])({},Ct,{drawTrackers:function(){ht.drawTrackers.call(this);var e,t=this._trackersTranslator;this.isVisible()&&(Object(s["a"])(t,(function(t,n){if(n)return e=t,!1})),t[e+360]=t[e])},getNeighborPoint:function(e,t){var n=Object(h["f"])(this.getValueAxis().getCenter(),e,t);return ht.getNeighborPoint.call(this,n.phi,n.r)},_applyVisibleArea:function(){var e=this.getValueAxis().getCanvas();this._visibleArea={minX:e.left,maxX:e.width-e.right,minY:e.top,maxY:e.height-e.bottom}},getSeriesPairCoord(e,t){for(var n=null,i=t?"argument":"radius",o=this.getVisiblePoints(),a=0;a!0,_applyGroupSettings:function(e,t,n){t=Object(a["a"])(t,e),this._applyElementsClipRect(t),n.attr(t)},_setGroupsSettings:function(e){var t=this._styles.normal;this._applyGroupSettings(t.elements,{class:"dxc-elements"},this._elementsGroup),this._bordersGroup&&this._applyGroupSettings(t.border,{class:"dxc-borders"},this._bordersGroup),ht._setGroupsSettings.call(this,e),e&&this._markersGroup&&this._markersGroup.attr({opacity:.001})},_createGroups:function(){this._createGroup("_elementsGroup",this,this._group),this._areBordersVisible()&&this._createGroup("_bordersGroup",this,this._group),ht._createGroups.call(this)},_areBordersVisible:function(){return!1},_getDefaultSegment:function(e){return{line:Object(h["u"])(e.line||[],(function(e){return e.getDefaultCoords()}))}},_prepareSegment:function(e){return{line:e}},_parseLineOptions:function(e,t){return{stroke:e.color||t,"stroke-width":e.width,dashStyle:e.dashStyle||"solid"}},_parseStyle:function(e,t){return{elements:this._parseLineOptions(e,t)}},_applyStyle:function(e){this._elementsGroup&&this._elementsGroup.attr(e.elements),Object(s["a"])(this._graphics||[],(function(t,n){n.line&&n.line.attr({"stroke-width":e.elements["stroke-width"]}).sharp()}))},_drawElement:function(e,t){return{line:this._createMainElement(e.line,{"stroke-width":this._styles.normal.elements["stroke-width"]}).append(t)}},_removeElement:function(e){e.line.remove()},_updateElement:function(e,t,n,i){var o={points:t.line},r=e.line;n?r.animate(o,{},i):r.attr(o)},_animateComplete:function(){ht._animateComplete.call(this),this._markersGroup&&this._markersGroup.animate({opacity:1},{duration:this._defaultDuration})},_animate:function(){var e=this,t=e._graphics.length-1;Object(s["a"])(e._graphics||[],(function(n,i){var o;n===t&&(o=function(){e._animateComplete()}),e._updateElement(i,e._segments[n],!0,o)}))},_drawPoint:function(e){ht._drawPoint.call(this,{point:e.point,groups:e.groups})},_createMainElement:function(e,t){return this._renderer.path(e,"line").attr(t)},_sortPoints:function(e,t){return t?e.sort((function(e,t){return t.y-e.y})):e.sort((function(e,t){return e.x-t.x}))},_drawSegment:function(e,t,n,i){var o=this._options.rotated,r=this._prepareSegment(e,o,i);this._segments.push(r),this._graphics[n]?t||this._updateElement(this._graphics[n],r):this._graphics[n]=this._drawElement(t?this._getDefaultSegment(r):r,this._elementsGroup)},_getTrackerSettings:function(){var e=this._defaultTrackerWidth,t=this._styles.normal.elements["stroke-width"];return{"stroke-width":t>e?t:e,fill:"none"}},_getMainPointsFromSegment:function(e){return e.line},_drawTrackerElement:function(e){return this._createMainElement(this._getMainPointsFromSegment(e),this._getTrackerSettings(e))},_updateTrackerElement:function(e,t){var n=this._getTrackerSettings(e);n.points=this._getMainPointsFromSegment(e),t.attr(n)},checkSeriesViewportCoord(e,t){if(!ht.checkSeriesViewportCoord.call(this))return!1;var n=e.isArgumentAxis?this.getArgumentRange():this.getViewport(),i=e.getTranslator().translate(n.categories?n.categories[0]:n.min),o=e.getTranslator().translate(n.categories?n.categories[n.categories.length-1]:n.max),r=this.getOptions().rotated,a=e.getOptions().inverted;return e.isArgumentAxis&&(!r&&!a||r&&a)||!e.isArgumentAxis&&(r&&!a||!r&&a)?t>=i&&t<=o:t>=o&&t<=i}},Bt=At.line=Object(a["a"])({},ht,Nt,{getPointCenterByArg(e){var t=this.getArgumentAxis().getTranslator().translate(e);return{x:t,y:t}},getSeriesPairCoord(e,t){for(var n=null,i=this._getNearestPointsByCoord(e,t),o=t&&!this._options.rotated||!t&&this._options.rotated,r=0;rt&&n>e||e=b.y&&w>=C.y)||t&&(x<=b.x&&x<=C.x||x>=b.x&&x>=C.x));if(S)t?(l=a=x,u=(w+C.y)/2,s=(w+b.y)/2):(u=s=w,l=(x+C.x)/2,a=(x+b.x)/2);else{if(f=p-h,m=c-d,g=h*d-c*p,t){if(!f)return void n.push(e,e,e);_=w,v=-1*(m*_+g)/f,y=v-x,c-=y,d-=y}else{if(!m)return void n.push(e,e,e);v=x,_=-1*(f*v+g)/m,y=_-w,h-=y,p-=y}l=(x+.5*d)/1.5,u=(w+.5*p)/1.5,a=(x+.5*c)/1.5,s=(w+.5*h)/1.5}t?(a=o(b.x,x,a),l=o(C.x,x,l)):(s=o(b.y,w,s),u=o(C.y,w,u));var T=Mt(e,a,s),O=Mt(e,l,u);n.push(T,e,O)}else n.push(e,e)})):n.push(i[0]),n},_prepareSegment:function(e,t){return Bt._prepareSegment(this._calculateBezierPoints(e,t))},_createMainElement:function(e,t){return this._renderer.path(e,"bezier").attr(t)},getSeriesPairCoord(e,t){for(var n=null,i=!t&&!this._options.rotated||t&&this._options.rotated,o=i?"vy":"vx",r=i?"y":"x",a=i?"vx":"vy",s=i?"x":"y",l=t?this.getValueAxis():this.getArgumentAxis(),u=l.getVisibleArea(),c=this._getNearestPointsByCoord(e,t),d=function(t){var i=c[t];if(1===i.length)u[0]<=i[0][a]&&u[1]>=i[0][a]&&(n=i[0][a]);else{var l=jt(e,i[0][o],i[1][r],i[2][r],i[3][o]);l.forEach(e=>{if(e>=0&&e<=1){var t=Math.pow(1-e,3)*i[0][a]+3*Math.pow(1-e,2)*e*i[1][s]+3*(1-e)*e*e*i[2][s]+e*e*e*i[3][a];u[0]<=t&&u[1]>=t&&(n=t)}})}if(null!==n)return"break"},h=0;h0?this._segments.reduce((e,t)=>e.concat(t.line),[]):[]}}),Pt.line=Object(a["a"])({},pt,Nt,{_sortPoints:function(e){return e},_prepareSegment:function(e,t,n){var i,o=[],r=this.getValueAxis().getCenter();if(n&&this._closeSegment(e),this.argumentAxisType===St||this.valueAxisType===St)return Bt._prepareSegment.call(this,e);for(i=1;i=0?360-t:-t},_closeSegment(e){var t;t=this._segments.length?this._segments[0].line[0]:Mt(e[0],e[0].x,e[0].y,e[0].angle),t=this._modifyReflectedPoint(t,e[e.length-1]),t&&e.push(t)},_modifyReflectedPoint(e,t){if(t.angle!==e.angle){if(Object(h["w"])(Tt(t.angle))===Object(h["w"])(Tt(e.angle)))e.angle=t.angle;else{var n=t.angle-e.angle;e.angle=t.angle+this._getRemainingAngle(n)}return e}},_getTangentPoints:function(e,t,n,i){var o,r=[],a=Math.round(t.angle-e.angle),s=(t.radius-e.radius)/a;if(0===a)r=[t,e];else if(a>0){var l=i?a:a-1;for(o=l;o>=0;o--)r.push(Rt(e,t,n,s,o))}else{var u=i?a:a+1;for(o=0;o>=u;o--)r.push(Rt(e,t,n,s,a-o))}return r},getSeriesPairCoord(e,t){var n,i=this.getArgumentAxis(),o=t?"angle":"radius",r=e[o],a=i.getCenter(),s=(e,t,n)=>{var o,r,{x:s,y:l}=n;return o={x:s,y:l},r=a,Ot(Et(o.x-r.x,2)+Et(o.y-r.y,2))<=i.getRadius()&&It(e.x,t.x)<=s&&kt(e.x,t.x)>=s&&It(e.y,t.y)<=l&&kt(e.y,t.y)>=l},l=this.getNeighborPoints(r,o);if(1===l.length)n=l[0];else if(l.length>1){var u,c,d=l[0],p=l[1];if(this.argumentAxisType!==St&&this.valueAxisType!==St)t?(u=(d.radius-p.radius)/(d.angle-p.angle),c=r-p.angle):(u=(d.radius-p.radius)/(d.angle-p.angle),c=(r-p.radius)/u),n=Rt(p,d,a,u,c);else if(t){var f=Object(h["m"])(-r),m=(p.y-d.y)/(p.x-d.x),g=d.y-d.x*m,v=f.sin/f.cos,_=a.y-v*a.x,y=(_-g)/(m-v),b=m*y+g;if(s(d,p,{x:y,y:b})){var C=Dt(Object(wt["l"])((360+r)/90)%4);(0===C&&y>=a.x&&b<=a.y||1===C&&y<=a.x&&b<=a.y||2===C&&y<=a.x&&b>=a.y||3===C&&y>=a.x&&b>=a.y)&&(n={x:y,y:b})}}else{var x=(p.y-d.y)/(p.x-d.x),w=d.y-d.x*x,S=1+x*x,T=-2*a.x+2*x*w-2*x*a.y,O=-Et(r,2)+Et(w-a.y,2)+Et(a.x,2),E=T*T-4*S*O;if(E>=0){var I=(-T-Ot(E))/(2*S),k=(-T+Ot(E))/(2*S),D=x*I+w,A=x*k+w;n=s(d,p,{x:I,y:D})?{x:I,y:D}:s(d,p,{x:k,y:A})?{x:k,y:A}:void 0}}}return n},getNeighborPoints(e,t){var n=this.getPoints(),i=[];if(this.getOptions().closed){n=Object(a["a"])(!0,[],n);var o=n[n.length-1],r=Mt(n[0],n[0].x,n[0].y,n[0].angle),s=Mt(o,o.x,o.y,o.angle),l=this._modifyReflectedPoint(r,o),u=this._modifyReflectedPoint(s,n[0]);u&&n.unshift(u),l&&n.push(l)}for(var c=1;ce&&n[c-1][t]e&&n[c][t]0)break;return i}});var Lt=At.line,Ft=Pt.line,Vt=a["a"],Ht=At.spline._calculateBezierPoints,zt={},Ut={},$t={_createBorderElement:Lt._createMainElement,_createLegendState:function(e,t){return{fill:e.color||t,opacity:e.opacity,hatching:e.hatching}},getValueRangeInitialValue:function(){return"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType&&!1!==this.showZero?0:ht.getValueRangeInitialValue.call(this)},_getDefaultSegment:function(e){var t=Lt._getDefaultSegment(e);return t.area=t.line.concat(t.line.slice().reverse()),t},_updateElement:function(e,t,n,i){var o={points:t.line},r={points:t.area},a=e.line;n?(a&&a.animate(o),e.area.animate(r,{},i)):(a&&a.attr(o),e.area.attr(r))},_removeElement:function(e){e.line&&e.line.remove(),e.area.remove()},_drawElement:function(e){return{line:this._bordersGroup&&this._createBorderElement(e.line,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),area:this._createMainElement(e.area).append(this._elementsGroup)}},_applyStyle:function(e){this._elementsGroup&&this._elementsGroup.smartAttr(e.elements),this._bordersGroup&&this._bordersGroup.attr(e.border),(this._graphics||[]).forEach((function(t){t.line&&t.line.attr({"stroke-width":e.border["stroke-width"]}).sharp()}))},_parseStyle:function(e,t,n){var i=e.border||{},o=Lt._parseLineOptions(i,n);return o.stroke=i.visible&&o["stroke-width"]?o.stroke:"none",o["stroke-width"]=o["stroke-width"]||1,{border:o,elements:{stroke:"none",fill:e.color||t,hatching:e.hatching,opacity:e.opacity}}},_areBordersVisible:function(){var e=this._options;return e.border.visible||e.hoverStyle.border.visible||e.selectionStyle.border.visible},_createMainElement:function(e,t){return this._renderer.path(e,"area").attr(t)},_getTrackerSettings:function(e){return{"stroke-width":e.singlePointSegment?this._defaultTrackerWidth:0}},_getMainPointsFromSegment:function(e){return e.area}};function Wt(e){return Object(h["u"])(e,(function(e){return e.getCoords()})).concat(Object(h["u"])(e.slice().reverse(),(function(e){return e.getCoords(!0)})))}var Gt=zt.area=Vt({},Lt,$t,{_prepareSegment(e,t){var n=this._processSinglePointsAreaSegment(e,t),i=Wt(n),o=this.getArgumentAxis();if(o.getAxisPosition){var r=o.getAxisPosition(),a=o.getOptions(),s=(t?1:-1)*Math.round(a.width/2);a.visible&&i.forEach((n,a)=>{if(n){var l=1===e.length?0:a!1};Jt.bar=Xt({},Kt,en,{_getAffineCoordOptions:function(){var e=this._options.rotated,t=e?"X":"Y",n={scaleX:e?.001:1,scaleY:e?1:.001};return n["translate"+t]=this.getValueAxis().getTranslator().translate("canvas_position_default"),n},_animatePoints:function(e,t,n){this._markersGroup.animate({scaleX:1,scaleY:1,translateY:0,translateX:0},void 0,t),e||n(this._drawnPoints,t)},checkSeriesViewportCoord(e,t){if(!Kt.checkSeriesViewportCoord.call(this))return!1;if(e.isArgumentAxis)return!0;var n=e.getTranslator(),i=this.getViewport(),o=n.translate(i.categories?i.categories[0]:i.min),r=n.translate(i.categories?i.categories[i.categories.length-1]:i.max),a=this.getOptions().rotated,s=e.getOptions().inverted;return a&&!s||!a&&s?t>=o&&t<=r:t>=r&&t<=o},getSeriesPairCoord(e,t){for(var n=null,{rotated:i}=this._options,o=!t&&!i||t&&i,r=o?"vy":"vx",a=o?"vx":"vy",s=this.getPoints(),l=0;l({tag:e[o],minValue:this._processEmptyValue(e[n]),value:this._processEmptyValue(e[i]),argument:e[r],data:e})},_defaultAggregator:"range",_aggregators:{range(e,t){var{intervalStart:n,intervalEnd:i,data:o}=e;if(o.length){var a=t.getValueFields(),s=a[0],l=a[1],u=o.reduce((e,t)=>{var n=t[s],i=t[l];return Object(r["d"])(n)&&Object(r["d"])(i)?(e[s]=Math.min(e[s],Math.min(n,i)),e[l]=Math.max(e[l],Math.max(n,i)),e):e},{[s]:1/0,[l]:-1/0,[t.getArgumentField()]:t._getIntervalCenter(n,i)});if(!isFinite(u[s])||!isFinite(u[l])){if(o.filter(e=>null===e[s]&&null===e[l]).length!==o.length)return;u[s]=u[l]=null}return u}}},getValueFields:function(){return[this._options.rangeValue1Field||"val1",this._options.rangeValue2Field||"val2"]},getSeriesPairCoord(e,t){for(var n=null,{rotated:i}=this._options,o=!t&&!i||t&&i,r=o?"vy":"vx",a=i?"minX":"minY",s=o?"vx":"vy",l=this.getPoints(),u=0;u=h[0]&&e<=h[1]?c[s]:void 0}if(this._checkAxisVisibleAreaCoord(!t,d)){n=d;break}}return n}};rn.rangebar=tn({},nn,an),rn.rangearea=tn({},on,{_drawPoint:function(e){var t=e.point;t.isInVisibleArea()?(t.clearVisibility(),t.draw(this._renderer,e.groups),this._drawnPoints.push(t),t.visibleTopMarker||t.hideMarker("top"),t.visibleBottomMarker||t.hideMarker("bottom")):t.setInvisibility()},_prepareSegment:function(e,t){var n=this._processSinglePointsAreaSegment(e,t),i=Object(h["u"])(n,(function(e){return e.getCoords(!0)}));return{line:n,bottomLine:i,area:Object(h["u"])(n,(function(e){return e.getCoords()})).concat(i.slice().reverse()),singlePointSegment:n!==e}},_getDefaultSegment:function(e){var t=on._getDefaultSegment.call(this,e);return t.bottomLine=t.line,t},_removeElement:function(e){on._removeElement.call(this,e),e.bottomLine&&e.bottomLine.remove()},_drawElement:function(e,t){var n=on._drawElement.call(this,e,t);return n.bottomLine=this._bordersGroup&&this._createBorderElement(e.bottomLine,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),n},_applyStyle:function(e){var t=this._elementsGroup,n=this._bordersGroup;t&&t.smartAttr(e.elements),n&&n.attr(e.border),(this._graphics||[]).forEach((function(t){t.line&&t.line.attr({"stroke-width":e.border["stroke-width"]}),t.bottomLine&&t.bottomLine.attr({"stroke-width":e.border["stroke-width"]})}))},_updateElement:function(e,t,n,i){var o={points:t.bottomLine},r=e.bottomLine;on._updateElement.apply(this,arguments),r&&(n?r.animate(o):r.attr(o))}},an);var sn=At.line,ln=zt.area,un=Jt.bar,cn=Qt.bar,dn=a["a"],hn=s["a"],pn=u["n"],fn={};fn.bubble=dn({},ht,{_calculateErrorBars:pn,_getMainColor:un._getMainColor,_createPointStyles:un._createPointStyles,_updatePointsVisibility:un._updatePointsVisibility,_getOptionsForPoint:un._getOptionsForPoint,_applyMarkerClipRect:sn._applyElementsClipRect,_parsePointStyle:cn._parsePointStyle,_createLegendState:ln._createLegendState,_setMarkerGroupSettings:cn._setMarkerGroupSettings,areErrorBarsVisible:pn,_createErrorBarGroup:pn,_checkData:function(e,t){return ht._checkData.call(this,e,t,{value:this.getValueFields()[0],size:this.getSizeField()})},_getPointDataSelector:function(e,t){var n=this.getSizeField(),i=ht._getPointDataSelector.call(this);return e=>{var t=i(e);return t.size=e[n],t}},_aggregators:{avg(e,t){var{data:n,intervalStart:i,intervalEnd:o}=e;if(n.length){var r=t.getValueFields()[0],a=t.getSizeField(),s=n.reduce((e,t)=>(e[0]+=t[r],e[1]+=t[a],e[2]++,e),[0,0,0]);return{[r]:s[0]/s[2],[a]:s[1]/s[2],[t.getArgumentField()]:t._getIntervalCenter(i,o)}}}},getValueFields:function(){return[this._options.valueField||"val"]},getSizeField:function(){return this._options.sizeField||"size"},_animate:function(){var e=this,t=e._drawnPoints.length-1,n=e._labelsGroup,i=function(){n&&n.animate({opacity:1},{duration:e._defaultDuration})};hn(e._drawnPoints||[],(function(e,n){n.animate(e===t?i:void 0,{r:n.bubbleSize,translateX:n.x,translateY:n.y})}))},_patchMarginOptions:function(e){return e.processBubbleSize=!0,e}});var mn=ht,gn=Jt.bar,vn=a["a"],_n=s["a"],yn=u["n"],bn=h["u"],Cn=isFinite,xn=Math.max,wn=.7,Sn="inside",Tn=vn({},gn,{_setGroupsSettings:function(){mn._setGroupsSettings.apply(this,arguments),this._labelsGroup.attr({"pointer-events":null})},_createErrorBarGroup:yn,_drawPoint:function(e){var t=e.point,n=this._legendCallback;mn._drawPoint.call(this,e),!t.isVisible()&&t.setInvisibility(),t.isSelected()&&n()},_getOldPoint:function(e,t,n){var i=(this._points||[])[n];return i&&(t[i.argument.valueOf()]=t[i.argument.valueOf()].filter(e=>e!==i)),i},adjustLabels:function(e){return(this._points||[]).reduce((t,n)=>{if(n._label.isVisible())return n.setLabelTrackerData(),t=n.applyWordWrap(e)||t,n.updateLabelCoord(e),t},!1)},_applyElementsClipRect:yn,getColor:yn,areErrorBarsVisible:yn,drawLabelsWOPoints:function(){return this._options.label.position!==Sn&&(this._labelsGroup.append(this._extGroups.labelsGroup),(this._points||[]).forEach((function(e){e.drawLabel()})),!0)},getPointsCount:function(){return this._data.filter(e=>this._checkData(e)).length},setMaxPointsCount:function(e){this._pointsCount=e},_getCreatingPointOptions:function(e,t){return this._getPointOptions(e,t)},_updateOptions:function(e){this.labelSpace=0,this.innerRadius="pie"===this.type?0:e.innerRadius},_checkData:function(e,t){var n=gn._checkData.call(this,e,t,{value:this.getValueFields()[0]});return this._options.paintNullPoints?n:n&&null!==e.value},_createGroups:mn._createGroups,_setMarkerGroupSettings:function(){this._markersGroup.attr({class:"dxc-markers"})},_getMainColor(e,t){var n=this.getPointsByArg(e.argument),i=t?n.indexOf(t):n.length;return this._options.mainSeriesColor(e.argument,i,this._pointsCount)},_getPointOptions:function(e){return this._parsePointOptions(this._preparePointOptions(),this._options.label,e)},_getRangeData:function(){return this._rangeData},_createPointStyles:function(e,t,n){var i=e.color||this._getMainColor(t,n);return{normal:this._parsePointStyle(e,i,i),hover:this._parsePointStyle(e.hoverStyle,i,i),selection:this._parsePointStyle(e.selectionStyle,i,i),legendStyles:{normal:this._createLegendState(e,i),hover:this._createLegendState(e.hoverStyle,i),selection:this._createLegendState(e.selectionStyle,i)}}},_getArrangeMinShownValue:function(e,t){var n=this._options.minSegmentSize,i=0,o=0;return t=t||e.length,_n(e,(function(e,r){r.isVisible()&&(r.normalInitialValue{var t=e[n],a=!1;return Object(r["d"])(t)&&(Object(r["d"])(i)&&(a=t{var{intervalStart:n,intervalEnd:i,data:o}=e;if(o.length){var r={},a=t.getValueFields(),s=a[1],l=a[2];return r[s]=-1/0,r[l]=1/0,r=o.reduce((function(e,t){return null!==t[s]&&(e[s]=Math.max(e[s],t[s])),null!==t[l]&&(e[l]=Math.min(e[l],t[l])),e}),r),r[a[0]]=o[0][a[0]],r[a[3]]=o[o.length-1][a[3]],isFinite(r[s])||(r[s]=null),isFinite(r[l])||(r[l]=null),r[t.getArgumentField()]=t._getIntervalCenter(n,i),r}}},getValueFields:function(){var e=this._options;return[e.openValueField||"open",e.highValueField||"high",e.lowValueField||"low",e.closeValueField||"close"]},getArgumentField:function(){return this._options.argumentField||"date"},_patchMarginOptions:function(e){var t=this._getCreatingPointOptions(),n=t.styles,i=[n.normal,n.hover,n.selection].reduce((function(e,t){return Math.max(e,t["stroke-width"])}),0);return e.size=kn+i,e.sizePointNormalState=kn,e},getSeriesPairCoord(e,t){for(var n=null,i=this.getVisiblePoints(),o=0;o=s[0]&&e<=s[1]?r.vx:void 0}if(this._checkAxisVisibleAreaCoord(!t,a)){n=a;break}}return n},usePointsToDefineAutoHiding:()=>!1}),An=Object(a["a"])({},Dn,{_parsePointStyle:function(e,t,n){var i=e.color||n,o=Dn._parsePointStyle.call(this,e,t,i);return o.fill=i,o.hatching=e.hatching,o}}),Pn=zt.area,Mn=Jt.bar,Rn={_calculateErrorBars:u["n"],_updateOptions:function(e){this._stackName="axis_"+(e.axis||"default")}},jn={},Nn={};jn.stackedline=Object(a["a"])({},At.line,Rn,{}),jn.stackedspline=Object(a["a"])({},At.spline,Rn,{}),jn.fullstackedline=Object(a["a"])({},At.line,Rn,{getValueRangeInitialValue:zt.area.getValueRangeInitialValue}),jn.fullstackedspline=Object(a["a"])({},At.spline,Rn,{getValueRangeInitialValue:zt.area.getValueRangeInitialValue});var Bn=jn.stackedbar=Object(a["a"])({},Mn,Rn,{_updateOptions:function(e){Rn._updateOptions.call(this,e),this._stackName=this._stackName+"_stack_"+(e.stack||"default")}});function Ln(e,t,n,i){return e=Object(xt["a"])(e),e.value=t,e.minValue=n,e.translate(),e.argument=e.argument+i,e}function Fn(e){var t,n,i=0,o=[],r=e.length;while(ie>0:()=>!0}Hn.mixins={chart:{},pie:{},polar:{}},Hn.mixins.chart.scatter=ht,Hn.mixins.polar.scatter=pt,Object(a["a"])(Hn.mixins.pie,i),Object(a["a"])(Hn.mixins.chart,At,zt,Jt,rn,fn,o,jn),Object(a["a"])(Hn.mixins.polar,Pt,Ut,Qt,Nn),xi.prototype={constructor:xi,_createLegendState:u["n"],getLegendStyles:function(){return this._styles.legendStyles},_createStyles:function(e){var t=e.mainSeriesColor;this._styles={normal:this._parseStyle(e,t,t),hover:this._parseStyle(e.hoverStyle||{},t,t),selection:this._parseStyle(e.selectionStyle||{},t,t),legendStyles:{normal:this._createLegendState(e,t),hover:this._createLegendState(e.hoverStyle||{},t),selection:this._createLegendState(e.selectionStyle||{},t)}}},setClippingParams(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._paneClipRectID=e,this._widePaneClipRectID=t,this._forceClipping=n,this._clipLabels=i},applyClip:function(){this._group.attr({"clip-path":this._paneClipRectID})},resetClip:function(){this._group.attr({"clip-path":null})},getTagField:function(){return this._options.tagField||"tag"},getValueFields:u["n"],getSizeField:u["n"],getArgumentField:u["n"],getPoints:function(){return this._points},getPointsInViewPort:function(){return qe["a"].getPointsInViewPort(this)},_createPoint:function(e,t,n){e.index=t;var i=this.pointsByArgument,o=this._getCreatingPointOptions(e),r=e.argument.valueOf(),a=n;a?a.update(e,o):(a=new Ge(this,e,o),this.isSelected()&&fi(this.lastSelectionMode)&&a.setView(Kn));var s=i[r];return s?s.push(a):i[r]=[a],a.hasValue()&&this.customizePoint(a,e),a},getRangeData:function(){return this._visible?this._getRangeData():hi()},getArgumentRange:function(){return this._visible?qe["a"].getArgumentRange(this):hi()},getViewport:function(){return qe["a"].getViewport(this)},_deleteGroup:function(e){var t=this[e];t&&(t.dispose(),this[e]=null)},updateOptions(e,t){var n=e.widgetType,i=this.type,o=e.type;if(this.type=o&&Object(h["y"])(o.toString()),!this._checkType(n)||this._checkPolarBarType(n,e))return this.dispose(),void(this.isUpdated=!1);i!==this.type?(this._firstDrawing=!0,this._resetType(i,n),this._setType(this.type,n)):this._defineDrawingState(),this._options=e,this._pointOptions=null,this.name=e.name,this.pane=e.pane,this.tag=e.tag,t&&(this._seriesModes=t.commonSeriesModes||this._seriesModes,this._valueAxis=t.valueAxis||this._valueAxis,this.axis=this._valueAxis&&this._valueAxis.name,this._argumentAxis=t.argumentAxis||this._argumentAxis),this._createStyles(e),this._stackName=null,this._updateOptions(e),this._visible=e.visible,this.isUpdated=!0,this.stack=e.stack,this.barOverlapGroup=e.barOverlapGroup,this._createGroups(),this._processEmptyValue=e.ignoreEmptyPoints?e=>null===e?void 0:e:e=>e},_defineDrawingState(){this._firstDrawing=!0},_disposePoints:function(e){Object(s["a"])(e||[],(function(e,t){t.dispose()}))},updateDataType:function(e){return this.argumentType=e.argumentType,this.valueType=e.valueType,this.argumentAxisType=e.argumentAxisType,this.valueAxisType=e.valueAxisType,this.showZero=e.showZero,this._argumentChecker=Si(e.argumentAxisType,this.getArgumentAxis()),this._valueChecker=Si(e.valueAxisType,this.getValueAxis()),this},_argumentChecker:function(){return!0},_valueChecker:function(){return!0},getOptions:function(){return this._options},_getOldPoint:function(e,t,n){var i=e.argument&&e.argument.valueOf(),o=(t[i]||[])[0];return o&&t[i].splice(0,1),o},updateData:function(e){var t=this._options,n=t.nameField;e=e||[],e.length&&(this._canRenderCompleteHandle=!0);var i=this._getPointDataSelector(),o=0;this._data=e.reduce((e,a,s)=>{var l=i(a);return Object(r["d"])(l.argument)?n&&a[n]!==t.nameFieldValue||(l.index=s,e.push(l)):o++,e},[]),o&&o===e.length&&this._incidentOccurred("W2002",[this.name,this.getArgumentField()]),this._endUpdateData()},_getData(){var e=this._data||[];return this.useAggregation()&&(e=this._resample(this.getArgumentAxis().getAggregationInfo(this._useAllAggregatedPoints,this.argumentAxisType!==Un?this.getArgumentRange():{}),e)),e},useAggregation:function(){var e=this.getOptions().aggregation;return e&&e.enabled},autoHidePointMarkersEnabled:u["n"],usePointsToDefineAutoHiding:u["n"],createPoints(e){this._normalizeUsingAllAggregatedPoints(e),this._createPoints()},_normalizeUsingAllAggregatedPoints:function(e){this._useAllAggregatedPoints=this.useAggregation()&&(this.argumentAxisType===Un||(this._data||[]).length>1&&!!e)},_createPoints:function(){var e=this,t=e.pointsByArgument||{},n=e._getData();e.pointsByArgument={},e._calculateErrorBars(n);var i={},o=n.reduce((n,o)=>{if(e._checkData(o,i)){var r=n.length,a=e._getOldPoint(o,t,r),s=e._createPoint(o,r,a);n.push(s)}return n},[]);for(var r in i)i[r]===n.length&&e._incidentOccurred("W2002",[e.name,r]);Object.keys(t).forEach(n=>e._disposePoints(t[n])),e._points=o},_removeOldSegments:function(){var e=this,t=e._segments.length;Object(s["a"])(e._graphics.splice(t,e._graphics.length)||[],(function(t,n){e._removeElement(n)})),e._trackers&&Object(s["a"])(e._trackers.splice(t,e._trackers.length)||[],(function(e,t){t.remove()}))},_drawElements:function(e,t,n){var i=this,o=i._points||[],r=o[0]&&o[0].hasValue()&&i._options.closed,a={markers:i._markersGroup,errorBars:i._errorBarGroup};i._drawnPoints=[],i._graphics=i._graphics||[],i._segments=[];var s=o.reduce((function(o,r){var s=o[o.length-1];return r.translated&&!n||(r.translate(),!n&&r.setDefaultCoords()),r.hasValue()&&r.hasCoords()?(n&&i._drawPoint({point:r,groups:a,hasAnimation:e,firstDrawing:t}),s.push(r)):r.hasValue()?r.setInvisibility():s.length&&o.push([]),o}),[[]]);s.forEach((function(t,n){t.length&&i._drawSegment(t,e,n,r&&n===this.length-1)}),s),i._firstDrawing=!o.length,i._removeOldSegments(),e&&i._animate(t)},draw:function(e,t,n){var i=this._firstDrawing;this._legendCallback=n||this._legendCallback,this._visible?(this._appendInGroup(),this._applyVisibleArea(),this._setGroupsSettings(e,i),!i&&!this._resetApplyingAnimation&&this._drawElements(!1,i,!1),this._drawElements(e,i,!0),t&&this.hideLabels(),this.isSelected()?this._changeStyle(this.lastSelectionMode,void 0,!0):this.isHovered()?this._changeStyle(this.lastHoverMode,void 0,!0):this._applyStyle(this._styles.normal),this._resetApplyingAnimation=!1):this._group.remove()},_setLabelGroupSettings:function(e){var t={class:"dxc-labels","pointer-events":"none"};this._clipLabels&&this._applyElementsClipRect(t),this._applyClearingSettings(t),e&&(t.opacity=.001),this._labelsGroup.attr(t).append(this._extGroups.labelsGroup)},_checkType:function(e){return!!Hn.mixins[e][this.type]},_checkPolarBarType:function(e,t){return"polar"===e&&t.spiderWidget&&-1!==this.type.indexOf("bar")},_resetType:function(e,t){var n,i;if(e)for(n in i=Hn.mixins[t][e],i)delete this[n]},_setType:function(e,t){var n,i=Hn.mixins[t][e];for(n in i)this[n]=i[n]},_setPointsView:function(e,t){this.getPoints().forEach((function(n){t!==n&&n.setView(e)}))},_resetPointsView:function(e,t){this.getPoints().forEach((function(n){t!==n&&n.resetView(e)}))},_resetNearestPoint:function(){this._nearestPoint&&null!==this._nearestPoint.series&&this._nearestPoint.resetView(Gn),this._nearestPoint=null},_setSelectedState:function(e){this.lastSelectionMode=Object(h["y"])(e||this._options.selectionMode),this.fullState=this.fullState|$n,this._resetNearestPoint(),this._changeStyle(this.lastSelectionMode),this.lastSelectionMode!==Jn&&this.isHovered()&&fi(this.lastHoverMode)&&this._resetPointsView(Gn)},_releaseSelectedState:function(){this.fullState=this.fullState&~$n,this._changeStyle(this.lastSelectionMode,Kn),this.lastSelectionMode!==Jn&&this.isHovered()&&fi(this.lastHoverMode)&&this._setPointsView(Gn)},isFullStackedSeries:function(){return 0===this.type.indexOf("fullstacked")},isStackedSeries:function(){return 0===this.type.indexOf("stacked")},resetApplyingAnimation:function(e){this._resetApplyingAnimation=!0,e&&(this._firstDrawing=!0)},isFinancialSeries:function(){return"stock"===this.type||"candlestick"===this.type},_canChangeView:function(){return!this.isSelected()&&Object(h["y"])(this._options.hoverMode)!==Jn},_changeStyle:function(e,t,n){var i=this.fullState,o=[qn,Gn,Kn,Kn];"none"===this.lastHoverMode&&(i&=~Wn),"none"===this.lastSelectionMode&&(i&=~$n),fi(e)&&!n&&(t?this._resetPointsView(t):this._setPointsView(o[i])),this._legendCallback([Zn,Xn,Yn,Yn][i]),this._applyStyle(this._styles[o[i]])},updateHover:function(e,t){var n=this._nearestPoint,i=this.isHovered()&&this.lastHoverMode===ei&&this.getNeighborPoint(e,t);i===n||this.isSelected()&&this.lastSelectionMode!==Jn||(this._resetNearestPoint(),i&&(i.setView(Gn),this._nearestPoint=i))},_getMainAxisName:function(){return this._options.rotated?"X":"Y"},areLabelsVisible:function(){return!Object(r["d"])(this._options.maxLabelCount)||this._points.length<=this._options.maxLabelCount},getLabelVisibility:function(){return this.areLabelsVisible()&&this._options.label&&this._options.label.visible},customizePoint:function(e,t){var n,i,o,s,l,u,c=this._options,d=c.customizePoint,h=c.customizeLabel;h&&h.call&&(n=Object(a["a"])({seriesName:this.name},t),n.series=this,o=h.call(n,n),l=o&&!Object(r["e"])(o),o=l?Object(a["a"])(!0,{},c.label,o):null),d&&d.call&&(n=n||Object(a["a"])({seriesName:this.name},t),n.series=this,s=d.call(n,n),u=s&&!Object(r["e"])(s)),(l||u)&&(i=this._parsePointOptions(this._preparePointOptions(s),o||c.label,t,e),i.styles.useLabelCustomOptions=l,i.styles.usePointCustomOptions=u,e.updateOptions(i))},show:function(){this._visible||this._changeVisibility(!0)},hide:function(){this._visible&&this._changeVisibility(!1)},_changeVisibility:function(e){this._visible=this._options.visible=e,this._updatePointsVisibility(),this.hidePointTooltip(),this._options.visibilityChanged(this)},_updatePointsVisibility:u["n"],hideLabels:function(){Object(s["a"])(this._points,(function(e,t){t._label.draw(!1)}))},_parsePointOptions:function(e,t,n,i){var o=this._options,r=this._createPointStyles(e,n,i),s=Object(a["a"])({},e,{type:o.type,rotated:o.rotated,styles:r,widgetType:o.widgetType,visibilityChanged:o.visibilityChanged});return s.label=mi(t,r.normal.fill),this.areErrorBarsVisible()&&(s.errorBars=o.valueErrorBar),s},_preparePointOptions:function(e){var t=this._getOptionsForPoint();return e?Ci(t,e):t},_getMarkerGroupOptions:function(){return Object(a["a"])(!1,{},this._getOptionsForPoint(),{hoverStyle:{},selectionStyle:{}})},_getAggregationMethod:function(e,t){var n,i=this.getOptions().aggregation,o=Object(h["y"])(i.method),r="custom"===o&&i.calculate;return n=e&&!t?e=>{var{data:t}=e;return t[0]}:this._aggregators[o]||this._aggregators[this._defaultAggregator],r||n},_resample(e,t){var{interval:n,ticks:i,aggregateByCategory:o}=e,r=this,a=r.argumentAxisType===Un||r.valueAxisType===Un,s=0,l=this._getPointDataSelector(),u=r.getOptions(),c=(e,t,n)=>{if(t){var i=t=>{var i=t&&l(t,u);i&&r._checkData(i)&&(i.aggregationInfo=n,e.push(i))};Array.isArray(t)?t.forEach(i):i(t)}},d=this._getAggregationMethod(a,o);if(a){if(o){var h=this.getArgumentAxis().getTranslator().getBusinessRange().categories,p=h.reduce((e,t)=>(e[t.valueOf()]=[],e),{});return t.forEach(e=>{p[e.argument.valueOf()].push(e)}),h.reduce((e,t)=>(c(e,d({aggregationInterval:null,intervalStart:t,intervalEnd:t,data:p[t.valueOf()].map(wi)},r)),e),[])}return t.reduce((e,t,i,o)=>{if(e[1].push(t),i===o.length-1||(i+1)%n===0){var a=e[1],s={aggregationInterval:n,data:a.map(wi)};c(e[0],d(s,r)),e[1]=[]}return e},[[],[]])[0]}var f=[];if(1===i.length){var m={intervalStart:i[0],intervalEnd:i[0],aggregationInterval:null,data:t.map(wi)};c(f,d(m,r),m)}else for(var g=1;g=_&&y.push(t[s]),s++;var b={intervalStart:_,intervalEnd:v,aggregationInterval:n,data:y.map(wi)};c(f,d(b,r),b)}return r._endUpdateData(),f},canRenderCompleteHandle:function(){var e=this._canRenderCompleteHandle;return delete this._canRenderCompleteHandle,!!e},isHovered:function(){return!!(1&this.fullState)},isSelected:function(){return!!(2&this.fullState)},isVisible:function(){return this._visible},getAllPoints:function(){return this._createAllAggregatedPoints(),(this._points||[]).slice()},getPointByPos:function(e){return this._createAllAggregatedPoints(),(this._points||[])[e]},getVisiblePoints:function(){return(this._drawnPoints||[]).slice()},selectPoint:function(e){e.isSelected()||(_i(e,this._legendCallback),this._eventPipe({action:ci,target:e}),this._eventTrigger(ni,{target:e}))},deselectPoint:function(e){e.isSelected()&&(yi(e,this._legendCallback),this._eventPipe({action:di,target:e}),this._eventTrigger(ni,{target:e}))},hover:function(e){var t=this._eventTrigger;this.isHovered()||(this.lastHoverMode=Object(h["y"])(e||this._options.hoverMode),this.fullState=this.fullState|Wn,this._changeStyle(this.lastHoverMode,void 0,this.isSelected()&&this.lastSelectionMode!==Jn),t(ii,{target:this}))},clearHover:function(){var e=this._eventTrigger;this.isHovered()&&(this._resetNearestPoint(),this.fullState=this.fullState&~Wn,this._changeStyle(this.lastHoverMode,Gn,this.isSelected()&&this.lastSelectionMode!==Jn),e(ii,{target:this}))},hoverPoint:function(e){e.isHovered()||(e.clearHover(),gi(e,this._legendCallback),this._canChangeView()&&this._applyStyle(this._styles.hover),this._eventPipe({action:si,target:e}),this._eventTrigger(oi,{target:e}))},clearPointHover:function(){var e=this;e.getPoints().some((function(t){return!!t.isHovered()&&(vi(t,e._legendCallback),e._canChangeView()&&e._applyStyle(e._styles.normal),e._eventPipe({action:li,target:t}),e._eventTrigger(oi,{target:t}),!0)}))},showPointTooltip:function(e){pi(this._extGroups.seriesGroup,"showpointtooltip",e)},hidePointTooltip:function(e){pi(this._extGroups.seriesGroup,"hidepointtooltip",e)},select:function(){this.isSelected()||(this._setSelectedState(this._options.selectionMode),this._eventPipe({action:ui,target:this}),this._group.toForeground(),this._eventTrigger(ti,{target:this}))},clearSelection:function(){this.isSelected()&&(this._releaseSelectedState(),this._eventTrigger(ti,{target:this}))},getPointsByArg:function(e,t){var n=e.valueOf(),i=this.pointsByArgument[n];return i||t||!this._createAllAggregatedPoints()||(i=this.pointsByArgument[n]),i||[]},_createAllAggregatedPoints:function(){return!(!this.useAggregation()||this._useAllAggregatedPoints)&&(this.createPoints(!0),!0)},getPointsByKeys:function(e){return this.getPointsByArg(e)},notify:function(e){var t=this,n=e.action,i=t._seriesModes,o=e.target,r=o.getOptions(),a=Object(h["y"])(r.hoverMode),s=Object(h["y"])(r.selectionMode);n===si?t._hoverPointHandler(o,a,e.notifyLegend):n===li?t._clearPointHoverHandler(o,a,e.notifyLegend):n===ui?o!==t&&"single"===i.seriesSelectionMode&&t.clearSelection():n===ci?("single"===i.pointSelectionMode&&t.getPoints().some((function(e){return!(e===o||!e.isSelected())&&(t.deselectPoint(e),!0)})),t._selectPointHandler(o,s)):n===di&&t._deselectPointHandler(o,s)},_selectPointHandler:function(e,t){t===ri?e.series===this&&this._setPointsView(Kn,e):t===ai&&this.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(t){t!==e&&t.setView(Kn)}))},_deselectPointHandler:function(e,t){t===ri?e.series===this&&this._resetPointsView(Kn,e):t===ai&&this.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(t){t!==e&&t.resetView(Kn)}))},_hoverPointHandler:function(e,t,n){e.series!==this&&t===ai?(this.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(e){e.setView(Gn)})),n&&this._legendCallback(e)):t===ri&&e.series===this&&this._setPointsView(Gn,e)},_clearPointHoverHandler:function(e,t,n){t===ai?(e.series!==this&&this.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(e){e.resetView(Gn)})),n&&this._legendCallback(e)):t===ri&&e.series===this&&this._resetPointsView(Gn,e)},_deletePoints:function(){this._disposePoints(this._points),this._points=this._drawnPoints=null},_deleteTrackers:function(){Object(s["a"])(this._trackers||[],(function(e,t){t.remove()})),this._trackersGroup&&this._trackersGroup.dispose(),this._trackers=this._trackersGroup=null},dispose:function(){this._deletePoints(),this._group.dispose(),this._labelsGroup&&this._labelsGroup.dispose(),this._errorBarGroup&&this._errorBarGroup.dispose(),this._deleteTrackers(),this._group=this._extGroups=this._markersGroup=this._elementsGroup=this._bordersGroup=this._labelsGroup=this._errorBarGroup=this._graphics=this._rangeData=this._renderer=this._styles=this._options=this._pointOptions=this._drawnPoints=this.pointsByArgument=this._segments=this._prevSeries=null},correctPosition:u["n"],drawTrackers:u["n"],getNeighborPoint:u["n"],areErrorBarsVisible:u["n"],getMarginOptions:function(){return this._patchMarginOptions({percentStick:this.isFullStackedSeries()})},getColor:function(){return this.getLegendStyles().normal.fill},getOpacity:function(){return this._options.opacity},getStackName:function(){return this._stackName},getBarOverlapGroup:function(){return this._options.barOverlapGroup},getPointByCoord:function(e,t){var n=this.getNeighborPoint(e,t);return null!==n&&void 0!==n&&n.coordsIn(e,t)?n:null},getValueAxis:function(){return this._valueAxis},getArgumentAxis:function(){return this._argumentAxis},getMarkersGroup(){return this._markersGroup},getRenderer(){return this._renderer},removePointElements(){this._markersGroup&&(Object(s["a"])(this._points,(e,t)=>t.deleteMarker()),this._markersGroup.dispose(),this._markersGroup=null)},removeGraphicElements(){var e=this;e._elementsGroup&&(e._elementsGroup.dispose(),e._elementsGroup=null),Object(s["a"])(e._graphics||[],(t,n)=>{e._removeElement(n)}),e._graphics=null},removeBordersGroup(){this._bordersGroup&&(this._bordersGroup.dispose(),this._bordersGroup=null)}};Hn.mixins},"0328":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("e03f"),o={ar:1,bg:2,ca:3,"zh-Hans":4,cs:5,da:6,de:7,el:8,en:9,es:10,fi:11,fr:12,he:13,hu:14,is:15,it:16,ja:17,ko:18,nl:19,no:20,pl:21,pt:22,rm:23,ro:24,ru:25,hr:26,sk:27,sq:28,sv:29,th:30,tr:31,ur:32,id:33,uk:34,be:35,sl:36,et:37,lv:38,lt:39,tg:40,fa:41,vi:42,hy:43,az:44,eu:45,hsb:46,mk:47,tn:50,xh:52,zu:53,af:54,ka:55,fo:56,hi:57,mt:58,se:59,ga:60,ms:62,kk:63,ky:64,sw:65,tk:66,uz:67,tt:68,bn:69,pa:70,gu:71,or:72,ta:73,te:74,kn:75,ml:76,as:77,mr:78,sa:79,mn:80,bo:81,cy:82,km:83,lo:84,gl:86,kok:87,syr:90,si:91,iu:93,am:94,tzm:95,ne:97,fy:98,ps:99,fil:100,dv:101,ha:104,yo:106,quz:107,nso:108,ba:109,lb:110,kl:111,ig:112,ii:120,arn:122,moh:124,br:126,ug:128,mi:129,oc:130,co:131,gsw:132,sah:133,qut:134,rw:135,wo:136,prs:140,gd:145,"ar-SA":1025,"bg-BG":1026,"ca-ES":1027,"zh-TW":1028,"cs-CZ":1029,"da-DK":1030,"de-DE":1031,"el-GR":1032,"en-US":1033,"fi-FI":1035,"fr-FR":1036,"he-IL":1037,"hu-HU":1038,"is-IS":1039,"it-IT":1040,"ja-JP":1041,"ko-KR":1042,"nl-NL":1043,"nb-NO":1044,"pl-PL":1045,"pt-BR":1046,"rm-CH":1047,"ro-RO":1048,"ru-RU":1049,"hr-HR":1050,"sk-SK":1051,"sq-AL":1052,"sv-SE":1053,"th-TH":1054,"tr-TR":1055,"ur-PK":1056,"id-ID":1057,"uk-UA":1058,"be-BY":1059,"sl-SI":1060,"et-EE":1061,"lv-LV":1062,"lt-LT":1063,"tg-Cyrl-TJ":1064,"fa-IR":1065,"vi-VN":1066,"hy-AM":1067,"az-Latn-AZ":1068,"eu-ES":1069,"hsb-DE":1070,"mk-MK":1071,"tn-ZA":1074,"xh-ZA":1076,"zu-ZA":1077,"af-ZA":1078,"ka-GE":1079,"fo-FO":1080,"hi-IN":1081,"mt-MT":1082,"se-NO":1083,"ms-MY":1086,"kk-KZ":1087,"ky-KG":1088,"sw-KE":1089,"tk-TM":1090,"uz-Latn-UZ":1091,"tt-RU":1092,"bn-IN":1093,"pa-IN":1094,"gu-IN":1095,"or-IN":1096,"ta-IN":1097,"te-IN":1098,"kn-IN":1099,"ml-IN":1100,"as-IN":1101,"mr-IN":1102,"sa-IN":1103,"mn-MN":1104,"bo-CN":1105,"cy-GB":1106,"km-KH":1107,"lo-LA":1108,"gl-ES":1110,"kok-IN":1111,"syr-SY":1114,"si-LK":1115,"iu-Cans-CA":1117,"am-ET":1118,"ne-NP":1121,"fy-NL":1122,"ps-AF":1123,"fil-PH":1124,"dv-MV":1125,"ha-Latn-NG":1128,"yo-NG":1130,"quz-BO":1131,"nso-ZA":1132,"ba-RU":1133,"lb-LU":1134,"kl-GL":1135,"ig-NG":1136,"ii-CN":1144,"arn-CL":1146,"moh-CA":1148,"br-FR":1150,"ug-CN":1152,"mi-NZ":1153,"oc-FR":1154,"co-FR":1155,"gsw-FR":1156,"sah-RU":1157,"qut-GT":1158,"rw-RW":1159,"wo-SN":1160,"prs-AF":1164,"gd-GB":1169,"ar-IQ":2049,"zh-CN":2052,"de-CH":2055,"en-GB":2057,"es-MX":2058,"fr-BE":2060,"it-CH":2064,"nl-BE":2067,"nn-NO":2068,"pt-PT":2070,"sr-Latn-CS":2074,"sv-FI":2077,"az-Cyrl-AZ":2092,"dsb-DE":2094,"se-SE":2107,"ga-IE":2108,"ms-BN":2110,"uz-Cyrl-UZ":2115,"bn-BD":2117,"mn-Mong-CN":2128,"iu-Latn-CA":2141,"tzm-Latn-DZ":2143,"quz-EC":2155,"ar-EG":3073,"zh-HK":3076,"de-AT":3079,"en-AU":3081,"es-ES":3082,"fr-CA":3084,"sr-Cyrl-CS":3098,"se-FI":3131,"quz-PE":3179,"ar-LY":4097,"zh-SG":4100,"de-LU":4103,"en-CA":4105,"es-GT":4106,"fr-CH":4108,"hr-BA":4122,"smj-NO":4155,"ar-DZ":5121,"zh-MO":5124,"de-LI":5127,"en-NZ":5129,"es-CR":5130,"fr-LU":5132,"bs-Latn-BA":5146,"smj-SE":5179,"ar-MA":6145,"en-IE":6153,"es-PA":6154,"fr-MC":6156,"sr-Latn-BA":6170,"sma-NO":6203,"ar-TN":7169,"en-ZA":7177,"es-DO":7178,"sr-Cyrl-BA":7194,"sma-SE":7227,"ar-OM":8193,"en-JM":8201,"es-VE":8202,"bs-Cyrl-BA":8218,"sms-FI":8251,"ar-YE":9217,"en-029":9225,"es-CO":9226,"sr-Latn-RS":9242,"smn-FI":9275,"ar-SY":10241,"en-BZ":10249,"es-PE":10250,"sr-Cyrl-RS":10266,"ar-JO":11265,"en-TT":11273,"es-AR":11274,"sr-Latn-ME":11290,"ar-LB":12289,"en-ZW":12297,"es-EC":12298,"sr-Cyrl-ME":12314,"ar-KW":13313,"en-PH":13321,"es-CL":13322,"ar-AE":14337,"es-UY":14346,"ar-BH":15361,"es-PY":15370,"ar-QA":16385,"en-IN":16393,"es-BO":16394,"en-MY":17417,"es-SV":17418,"en-SG":18441,"es-HN":18442,"es-NI":19466,"es-PR":20490,"es-US":21514,"bs-Cyrl":25626,"bs-Latn":26650,"sr-Cyrl":27674,"sr-Latn":28698,smn:28731,"az-Cyrl":29740,sms:29755,zh:30724,nn:30740,bs:30746,"az-Latn":30764,sma:30779,"uz-Cyrl":30787,"mn-Cyrl":30800,"iu-Cans":30813,"zh-Hant":31748,nb:31764,sr:31770,"tg-Cyrl":31784,dsb:31790,smj:31803,"uz-Latn":31811,"mn-Mong":31824,"iu-Latn":31837,"tzm-Latn":31839,"ha-Latn":31848};function r(){return o[i["a"].locale()]}},"0336":function(e,t,n){"use strict";var i=n("12a2").version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var r={};function a(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");var i=Object.keys(e),o=i.length;while(o-- >0){var r=i[o],a=t[r];if(a){var s=e[r],l=void 0===s||a(s,r,e);if(!0!==l)throw new TypeError("option "+r+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+r)}}o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new Error(o(i," has been removed"+(t?" in "+t:"")));return t&&!r[i]&&(r[i]=!0,console.warn(o(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},e.exports={assertOptions:a,validators:o}},"0342":function(e,t,n){"use strict"; /*! * devextreme-vue * Version: 21.2.14 * Build date: Tue Jun 20 2023 * * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-vue */var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DxCursorOffset=t.DxSortable=void 0;var o=i(n("f0f5")),r=n("27da"),a=n("27da"),s=r.createComponent({props:{allowDropInsideItem:Boolean,allowReordering:Boolean,autoScroll:Boolean,boundary:{},container:{},cursorOffset:[Object,String],data:{},dragDirection:String,dragTemplate:{},dropFeedbackMode:String,elementAttr:Object,filter:String,group:String,handle:String,height:[Function,Number,String],itemOrientation:String,moveItemOnDrop:Boolean,onAdd:Function,onDisposing:Function,onDragChange:Function,onDragEnd:Function,onDragMove:Function,onDragStart:Function,onInitialized:Function,onOptionChanged:Function,onRemove:Function,onReorder:Function,rtlEnabled:Boolean,scrollSensitivity:Number,scrollSpeed:Number,width:[Function,Number,String]},emits:{"update:isActive":null,"update:hoveredElement":null,"update:allowDropInsideItem":null,"update:allowReordering":null,"update:autoScroll":null,"update:boundary":null,"update:container":null,"update:cursorOffset":null,"update:data":null,"update:dragDirection":null,"update:dragTemplate":null,"update:dropFeedbackMode":null,"update:elementAttr":null,"update:filter":null,"update:group":null,"update:handle":null,"update:height":null,"update:itemOrientation":null,"update:moveItemOnDrop":null,"update:onAdd":null,"update:onDisposing":null,"update:onDragChange":null,"update:onDragEnd":null,"update:onDragMove":null,"update:onDragStart":null,"update:onInitialized":null,"update:onOptionChanged":null,"update:onRemove":null,"update:onReorder":null,"update:rtlEnabled":null,"update:scrollSensitivity":null,"update:scrollSpeed":null,"update:width":null},computed:{instance:function(){return this.$_instance}},beforeCreate:function(){this.$_WidgetClass=o.default,this.$_hasAsyncTemplate=!0,this.$_expectedChildren={cursorOffset:{isCollectionItem:!1,optionName:"cursorOffset"}}}});t.DxSortable=s;var l=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:Number,y:Number}});t.DxCursorOffset=l,l.$_optionName="cursorOffset",t.default=s},"0366":function(e,t,n){var i=n("4625"),o=n("59ed"),r=n("40d5"),a=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:r?a(e,t):function(){return e.apply(t,arguments)}}},"0374":function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("f9d2"),o=n("45f8"),r=n("bde9"),a=n("bf95"),s=50,l={_resizeCore:function(){this.callBase.apply(this,arguments),this._columnsController.resize()},_handleScroll:function(e){var t=this,n=this.getScrollable(),o=e.scrollOffset.left;t.callBase.apply(t,arguments),t.option("rtlEnabled")&&n&&(o=Object(i["l"])(n.$content())-Object(i["l"])(n.$element())-o),t._columnsController.setScrollPosition(o)}},u={_renderCore:function(){this.callBase.apply(this,arguments),this._columnsController.isVirtualMode()&&this._updateScrollLeftPosition()}},c=function(){var e=function(e){return e.map(e=>e.visibleWidth||parseFloat(e.width)||s)},t={init:function(){var e=this;e.callBase.apply(this,arguments),e._beginPageIndex=null,e._endPageIndex=null,e._position=0,e._virtualVisibleColumns={}},resetColumnsCache:function(){this.callBase(),this._virtualVisibleColumns={}},getBeginPageIndex:function(t){for(var n=this.getVisibleColumns(void 0,!0),i=e(n),o=0,r=0;r=t)return Math.floor(r/this.getColumnPageSize());o+=i[r]}return 0},getTotalWidth:function(){var e=this.option("width");return"number"===typeof e?e:this.getController("resizing")._lastWidth||Object(i["i"])(this.component.$element())},getEndPageIndex:function(t){var n=this.getVisibleColumns(void 0,!0),i=e(n),o=0;t+=this.getTotalWidth();for(var r=0;r=t)return Math.ceil(r/this.getColumnPageSize());o+=i[r]}return Math.ceil(i.length/this.getColumnPageSize())},getColumnPageSize:function(){return this.option("scrolling.columnPageSize")},_fireColumnsChanged:function(){var e=new Date;this.columnsChanged.fire({optionNames:{all:!0,length:1},changeTypes:{columns:!0,virtualColumnsScrolling:!0,length:2}}),this._renderTime=new Date-e},getScrollingTimeout:function(){var e=this.option("scrolling.columnRenderingThreshold"),t=this.option("scrolling.renderAsync"),n=0;return(!Object(a["d"])(t)&&this._renderTime>e||t)&&(n=this.option("scrolling.timeout")),n},setScrollPosition:function(e){var t=this.getScrollingTimeout();t>0?(clearTimeout(this._changedTimeout),this._changedTimeout=setTimeout(()=>{this._setScrollPositionCore(e)},t)):this._setScrollPositionCore(e)},isVirtualMode:function(){return Object(o["f"])()&&"virtual"===this.option("scrolling.columnRenderingMode")},resize:function(){this._setScrollPositionCore(this._position)},_setScrollPositionCore:function(e){if(this.isVirtualMode()){var t=this.getBeginPageIndex(e),n=this.getEndPageIndex(e),i=et:this._endPageIndexe.command).indexOf("transparent");return n[i].colspan=this.getVisibleColumns().length-this.callBase().length+1,n}return n},_compileVisibleColumns:function(t,n){var i;if(n||!this.isVirtualMode()||!this._shouldReturnVisibleColumns())return this.callBase(t);null===(i=this._columns)||void 0===i||!i.length||Object(a["d"])(this._beginPageIndex)||Object(a["d"])(this._endPageIndex)||(this._beginPageIndex=this.getBeginPageIndex(this._position),this._endPageIndex=this.getEndPageIndex(this._position));var o=this._beginPageIndex,s=this._endPageIndex,l=t+"-"+o+"-"+s;if(this._virtualVisibleColumns[l])return this._virtualVisibleColumns[l];var u=this.callBase(),c=this.getRowCount(),d=this.getColumnPageSize(),h=o*d,p=s*d,f=this.getFixedColumns(void 0,!0),m=f.map(e=>e.command).indexOf("transparent"),g=f.length?m:0,v=u.slice(0,g),_=u.slice(g,h),y=e(_).reduce((e,t)=>e+t,0);y||(h=0);var b=f.length?f.length-m-1:0,C=u.slice(u.length-b),x=u.slice(p,u.length-b),w=e(x).reduce((e,t)=>e+t,0);if(w||(p=u.length),c>1&&"number"===typeof t){for(var S=[],T=0;T0){var t=this.getFixedColumns(),n=t.map(e=>e.command).indexOf("transparent"),i=n>=0?n:0;e=this._beginPageIndex*this.getColumnPageSize()-i-1}return e>0?e:0},dispose:function(){clearTimeout(this._changedTimeout),this.callBase.apply(this,arguments)}};return t}(),d={defaultOptions:function(){return{scrolling:{columnRenderingMode:"standard",columnPageSize:5,columnRenderingThreshold:300}}},extenders:{controllers:{columns:c},views:{columnHeadersView:u,rowsView:l}}}},"0481":function(e,t,n){"use strict";var i=n("23e7"),o=n("a2bf"),r=n("7b0b"),a=n("07fa"),s=n("5926"),l=n("65f0");i({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=r(this),n=a(t),i=l(t,0);return i.length=o(i,t,t,n,0,void 0===e?1:s(e)),i}})},"049d":function(e,t,n){"use strict"; /*! * devextreme-vue * Version: 21.2.14 * Build date: Tue Jun 20 2023 * * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-vue */var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DxToolbarItem=t.DxTo=t.DxShow=t.DxPosition=t.DxOptions=t.DxOffset=t.DxMy=t.DxItem=t.DxHide=t.DxFrom=t.DxDropDownOptions=t.DxCollision=t.DxButton=t.DxBoundaryOffset=t.DxAt=t.DxAnimation=t.DxSelectBox=void 0;var o=i(n("6524")),r=n("27da"),a=n("27da"),s=r.createComponent({props:{acceptCustomValue:Boolean,accessKey:String,activeStateEnabled:Boolean,buttons:Array,dataSource:{},deferRendering:Boolean,disabled:Boolean,displayExpr:[Function,String],displayValue:String,dropDownButtonTemplate:{},dropDownOptions:Object,elementAttr:Object,fieldTemplate:{},focusStateEnabled:Boolean,grouped:Boolean,groupTemplate:{},height:[Function,Number,String],hint:String,hoverStateEnabled:Boolean,inputAttr:{},isValid:Boolean,items:Array,itemTemplate:{},label:String,labelMode:String,maxLength:[Number,String],minSearchLength:Number,name:String,noDataText:String,onChange:Function,onClosed:Function,onContentReady:Function,onCopy:Function,onCustomItemCreating:Function,onCut:Function,onDisposing:Function,onEnterKey:Function,onFocusIn:Function,onFocusOut:Function,onInitialized:Function,onInput:Function,onItemClick:Function,onKeyDown:Function,onKeyUp:Function,onOpened:Function,onOptionChanged:Function,onPaste:Function,onSelectionChanged:Function,onValueChanged:Function,opened:Boolean,openOnFieldClick:Boolean,placeholder:String,readOnly:Boolean,rtlEnabled:Boolean,searchEnabled:Boolean,searchExpr:[Array,Function,String],searchMode:String,searchTimeout:Number,selectedItem:{},showClearButton:Boolean,showDataBeforeSearch:Boolean,showDropDownButton:Boolean,showSelectionControls:Boolean,spellcheck:Boolean,stylingMode:String,tabIndex:Number,text:String,useItemTextAsTitle:Boolean,validationError:{},validationErrors:Array,validationMessageMode:String,validationStatus:String,value:{},valueChangeEvent:String,valueExpr:[Function,String],visible:Boolean,width:[Function,Number,String],wrapItemText:Boolean},emits:{"update:isActive":null,"update:hoveredElement":null,"update:acceptCustomValue":null,"update:accessKey":null,"update:activeStateEnabled":null,"update:buttons":null,"update:dataSource":null,"update:deferRendering":null,"update:disabled":null,"update:displayExpr":null,"update:displayValue":null,"update:dropDownButtonTemplate":null,"update:dropDownOptions":null,"update:elementAttr":null,"update:fieldTemplate":null,"update:focusStateEnabled":null,"update:grouped":null,"update:groupTemplate":null,"update:height":null,"update:hint":null,"update:hoverStateEnabled":null,"update:inputAttr":null,"update:isValid":null,"update:items":null,"update:itemTemplate":null,"update:label":null,"update:labelMode":null,"update:maxLength":null,"update:minSearchLength":null,"update:name":null,"update:noDataText":null,"update:onChange":null,"update:onClosed":null,"update:onContentReady":null,"update:onCopy":null,"update:onCustomItemCreating":null,"update:onCut":null,"update:onDisposing":null,"update:onEnterKey":null,"update:onFocusIn":null,"update:onFocusOut":null,"update:onInitialized":null,"update:onInput":null,"update:onItemClick":null,"update:onKeyDown":null,"update:onKeyUp":null,"update:onOpened":null,"update:onOptionChanged":null,"update:onPaste":null,"update:onSelectionChanged":null,"update:onValueChanged":null,"update:opened":null,"update:openOnFieldClick":null,"update:placeholder":null,"update:readOnly":null,"update:rtlEnabled":null,"update:searchEnabled":null,"update:searchExpr":null,"update:searchMode":null,"update:searchTimeout":null,"update:selectedItem":null,"update:showClearButton":null,"update:showDataBeforeSearch":null,"update:showDropDownButton":null,"update:showSelectionControls":null,"update:spellcheck":null,"update:stylingMode":null,"update:tabIndex":null,"update:text":null,"update:useItemTextAsTitle":null,"update:validationError":null,"update:validationErrors":null,"update:validationMessageMode":null,"update:validationStatus":null,"update:value":null,"update:valueChangeEvent":null,"update:valueExpr":null,"update:visible":null,"update:width":null,"update:wrapItemText":null},model:{prop:"value",event:"update:value"},computed:{instance:function(){return this.$_instance}},beforeCreate:function(){this.$_WidgetClass=o.default,this.$_hasAsyncTemplate=!0,this.$_expectedChildren={button:{isCollectionItem:!0,optionName:"buttons"},dropDownOptions:{isCollectionItem:!1,optionName:"dropDownOptions"},item:{isCollectionItem:!0,optionName:"items"}}}});t.DxSelectBox=s;var l=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:hide":null,"update:show":null},props:{hide:[Object,Number,String],show:[Object,Number,String]}});t.DxAnimation=l,l.$_optionName="animation",l.$_expectedChildren={hide:{isCollectionItem:!1,optionName:"hide"},show:{isCollectionItem:!1,optionName:"show"}};var u=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:String,y:String}});t.DxAt=u,u.$_optionName="at";var c=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:Number,y:Number}});t.DxBoundaryOffset=c,c.$_optionName="boundaryOffset";var d=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:location":null,"update:name":null,"update:options":null},props:{location:String,name:String,options:Object}});t.DxButton=d,d.$_optionName="buttons",d.$_isCollectionItem=!0,d.$_expectedChildren={options:{isCollectionItem:!1,optionName:"options"}};var h=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:String,y:String}});t.DxCollision=h,h.$_optionName="collision";var p=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:accessKey":null,"update:activeStateEnabled":null,"update:animation":null,"update:bindingOptions":null,"update:closeOnOutsideClick":null,"update:container":null,"update:contentTemplate":null,"update:copyRootClassesToWrapper":null,"update:deferRendering":null,"update:disabled":null,"update:dragAndResizeArea":null,"update:dragEnabled":null,"update:dragOutsideBoundary":null,"update:elementAttr":null,"update:focusStateEnabled":null,"update:fullScreen":null,"update:height":null,"update:hideOnParentScroll":null,"update:hint":null,"update:hoverStateEnabled":null,"update:maxHeight":null,"update:maxWidth":null,"update:minHeight":null,"update:minWidth":null,"update:onContentReady":null,"update:onDisposing":null,"update:onFocusIn":null,"update:onFocusOut":null,"update:onHidden":null,"update:onHiding":null,"update:onInitialized":null,"update:onOptionChanged":null,"update:onResize":null,"update:onResizeEnd":null,"update:onResizeStart":null,"update:onShowing":null,"update:onShown":null,"update:onTitleRendered":null,"update:position":null,"update:resizeEnabled":null,"update:restorePosition":null,"update:rtlEnabled":null,"update:shading":null,"update:shadingColor":null,"update:showCloseButton":null,"update:showTitle":null,"update:tabIndex":null,"update:title":null,"update:titleTemplate":null,"update:toolbarItems":null,"update:visible":null,"update:width":null,"update:wrapperAttr":null},props:{accessKey:String,activeStateEnabled:Boolean,animation:Object,bindingOptions:Object,closeOnOutsideClick:[Boolean,Function],container:{},contentTemplate:{},copyRootClassesToWrapper:Boolean,deferRendering:Boolean,disabled:Boolean,dragAndResizeArea:{},dragEnabled:Boolean,dragOutsideBoundary:Boolean,elementAttr:{},focusStateEnabled:Boolean,fullScreen:Boolean,height:[Function,Number,String],hideOnParentScroll:Boolean,hint:String,hoverStateEnabled:Boolean,maxHeight:[Function,Number,String],maxWidth:[Function,Number,String],minHeight:[Function,Number,String],minWidth:[Function,Number,String],onContentReady:Function,onDisposing:Function,onFocusIn:Function,onFocusOut:Function,onHidden:Function,onHiding:Function,onInitialized:Function,onOptionChanged:Function,onResize:Function,onResizeEnd:Function,onResizeStart:Function,onShowing:Function,onShown:Function,onTitleRendered:Function,position:[Function,Object,String],resizeEnabled:Boolean,restorePosition:Boolean,rtlEnabled:Boolean,shading:Boolean,shadingColor:String,showCloseButton:Boolean,showTitle:Boolean,tabIndex:Number,title:String,titleTemplate:{},toolbarItems:Array,visible:Boolean,width:[Function,Number,String],wrapperAttr:{}}});t.DxDropDownOptions=p,p.$_optionName="dropDownOptions",p.$_expectedChildren={animation:{isCollectionItem:!1,optionName:"animation"},position:{isCollectionItem:!1,optionName:"position"},toolbarItem:{isCollectionItem:!0,optionName:"toolbarItems"}};var f=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:left":null,"update:opacity":null,"update:position":null,"update:scale":null,"update:top":null},props:{left:Number,opacity:Number,position:Object,scale:Number,top:Number}});t.DxFrom=f,f.$_optionName="from",f.$_expectedChildren={position:{isCollectionItem:!1,optionName:"position"}};var m=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:complete":null,"update:delay":null,"update:direction":null,"update:duration":null,"update:easing":null,"update:from":null,"update:staggerDelay":null,"update:start":null,"update:to":null,"update:type":null},props:{complete:Function,delay:Number,direction:String,duration:Number,easing:String,from:Object,staggerDelay:Number,start:Function,to:Object,type:String}});t.DxHide=m,m.$_optionName="hide",m.$_expectedChildren={from:{isCollectionItem:!1,optionName:"from"},to:{isCollectionItem:!1,optionName:"to"}};var g=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:disabled":null,"update:html":null,"update:template":null,"update:text":null,"update:visible":null},props:{disabled:Boolean,html:String,template:{},text:String,visible:Boolean}});t.DxItem=g,g.$_optionName="items",g.$_isCollectionItem=!0;var v=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:String,y:String}});t.DxMy=v,v.$_optionName="my";var _=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:Number,y:Number}});t.DxOffset=_,_.$_optionName="offset";var y=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:accessKey":null,"update:activeStateEnabled":null,"update:bindingOptions":null,"update:disabled":null,"update:elementAttr":null,"update:focusStateEnabled":null,"update:height":null,"update:hint":null,"update:hoverStateEnabled":null,"update:icon":null,"update:onClick":null,"update:onContentReady":null,"update:onDisposing":null,"update:onFocusIn":null,"update:onFocusOut":null,"update:onInitialized":null,"update:onOptionChanged":null,"update:rtlEnabled":null,"update:stylingMode":null,"update:tabIndex":null,"update:template":null,"update:text":null,"update:type":null,"update:useSubmitBehavior":null,"update:validationGroup":null,"update:visible":null,"update:width":null},props:{accessKey:String,activeStateEnabled:Boolean,bindingOptions:Object,disabled:Boolean,elementAttr:Object,focusStateEnabled:Boolean,height:[Function,Number,String],hint:String,hoverStateEnabled:Boolean,icon:String,onClick:Function,onContentReady:Function,onDisposing:Function,onFocusIn:Function,onFocusOut:Function,onInitialized:Function,onOptionChanged:Function,rtlEnabled:Boolean,stylingMode:String,tabIndex:Number,template:{},text:String,type:String,useSubmitBehavior:Boolean,validationGroup:String,visible:Boolean,width:[Function,Number,String]}});t.DxOptions=y,y.$_optionName="options";var b=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:at":null,"update:boundary":null,"update:boundaryOffset":null,"update:collision":null,"update:my":null,"update:of":null,"update:offset":null},props:{at:[Object,String],boundary:{},boundaryOffset:[Object,String],collision:[Object,String],my:[Object,String],of:{},offset:[Object,String]}});t.DxPosition=b,b.$_optionName="position";var C=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:complete":null,"update:delay":null,"update:direction":null,"update:duration":null,"update:easing":null,"update:from":null,"update:staggerDelay":null,"update:start":null,"update:to":null,"update:type":null},props:{complete:Function,delay:Number,direction:String,duration:Number,easing:String,from:Object,staggerDelay:Number,start:Function,to:Object,type:String}});t.DxShow=C,C.$_optionName="show";var x=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:left":null,"update:opacity":null,"update:position":null,"update:scale":null,"update:top":null},props:{left:Number,opacity:Number,position:Object,scale:Number,top:Number}});t.DxTo=x,x.$_optionName="to";var w=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:disabled":null,"update:html":null,"update:location":null,"update:options":null,"update:template":null,"update:text":null,"update:toolbar":null,"update:visible":null,"update:widget":null},props:{disabled:Boolean,html:String,location:String,options:{},template:{},text:String,toolbar:String,visible:Boolean,widget:String}});t.DxToolbarItem=w,w.$_optionName="toolbarItems",w.$_isCollectionItem=!0,t.default=s},"04c1":function(e,t,n){"use strict";var i=n("b9af"),o=n("bf95"),r=n("b144"),a=n("facd");t["a"]=function(e){var t=a["a"].inherit(e),n=t,s=new n(e),l={},u=function(t,n){Object(r["a"])(t,(function(t){Object(o["h"])(s[t])?!n&&e[t]||(e[t]=function(){return s[t].apply(e,arguments)}):(n&&(l[t]=e[t]),e[t]=s[t])}))};return u(e,!0),e.inject=function(e){n=n.inherit(e),s=new n,u(e)},e.resetInjection=function(){Object(i["a"])(e,l),n=t,s=new t},e}},"04d1":function(e,t,n){var i=n("342f"),o=i.match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},"04f8":function(e,t,n){var i=n("2d00"),o=n("d039"),r=n("da84"),a=r.String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},"0538":function(e,t,n){"use strict";var i=n("e330"),o=n("59ed"),r=n("861d"),a=n("1a2d"),s=n("f36a"),l=n("40d5"),u=Function,c=i([].concat),d=i([].join),h={},p=function(e,t,n){if(!a(h,t)){for(var i=[],o=0;o{var{event:t}=e;this._clickAction({event:t,validationGroup:this._validationGroupConfig})};var t=Object(s["b"])(e.icon);return"svg"===t&&(e.iconTemplate=this._createTemplateComponent(()=>e.icon)),e}get _templatesInfo(){return{template:"content"}}_toggleActiveState(e,t){var n=this.viewRef;t?n.activate():n.deactivate()}_getSubmitAction(){var e=!0,t="valid";return this._createAction(n=>{var{event:i,submitInput:o}=n;if(e){var r=this._validationGroupConfig;if(void 0!==r&&""!==r){var a=r.validate();t=a.status,"pending"===a.status&&(e=!1,this.option("disabled",!0),a.complete.then(n=>{var{status:i}=n;this.option("disabled",!1),t=i,"valid"===t&&o.click(),e=!0}))}}"valid"!==t&&i.preventDefault(),i.stopPropagation()})}_initializeComponent(){super._initializeComponent(),this._addAction("onSubmit",this._getSubmitAction()),this._clickAction=this._createClickAction()}_initMarkup(){super._initMarkup();var e=this.$element().find(".dx-button-content"),t=e.children().filter(".dx-template-wrapper"),n=e.children().filter(".dx-button-submit-input");t.length&&(t.addClass("dx-button-content"),t.append(n),e.replaceWith(t))}_patchOptionValues(e){return super._patchOptionValues(Object(o["a"])({},e,{templateData:e._templateData}))}_findGroup(){var e=this.$element(),t=this.option("validationGroup");return void 0!==t&&""!==t?t:r["a"].findGroup(e,this._modelByElement(e))}_createClickAction(){return this._createActionByOption("onClick",{excludeValidators:["readOnly"]})}_optionChanged(e){switch(e.name){case"onClick":this._clickAction=this._createClickAction()}super._optionChanged(e)}}var u=n("1037");class c extends l{getProps(){var e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}focus(){var e;return null===(e=this.viewRef)||void 0===e?void 0:e.focus(...arguments)}activate(){var e;return null===(e=this.viewRef)||void 0===e?void 0:e.activate(...arguments)}deactivate(){var e;return null===(e=this.viewRef)||void 0===e?void 0:e.deactivate(...arguments)}_getActionConfigs(){return{onClick:{excludeValidators:["readOnly"]},onSubmit:{}}}get _propsInfo(){return{twoWay:[],allowNull:[],elements:["onSubmit"],templates:["template","iconTemplate"],props:["activeStateEnabled","hoverStateEnabled","icon","iconPosition","onClick","onSubmit","pressed","stylingMode","template","iconTemplate","text","type","useInkRipple","useSubmitBehavior","templateData","className","accessKey","disabled","focusStateEnabled","height","hint","onKeyDown","rtlEnabled","tabIndex","visible","width"]}}get _viewComponent(){return u["a"]}}Object(i["a"])("dxButton",c),c.defaultOptions=u["b"];t["default"]=c},"07e0":function(e,t,n){"use strict"; /*! * devextreme-vue * Version: 21.2.14 * Build date: Tue Jun 20 2023 * * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-vue */var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DxToolbarItem=t.DxTo=t.DxShowEvent=t.DxShow=t.DxPosition=t.DxOffset=t.DxMy=t.DxItem=t.DxHideEvent=t.DxHide=t.DxFrom=t.DxDropDownOptions=t.DxCollision=t.DxBoundaryOffset=t.DxAt=t.DxAnimation=t.DxLookup=void 0;var o=i(n("5954")),r=n("27da"),a=n("27da"),s=r.createComponent({props:{accessKey:String,activeStateEnabled:Boolean,applyButtonText:String,applyValueMode:String,cancelButtonText:String,cleanSearchOnOpening:Boolean,clearButtonText:String,dataSource:{},deferRendering:Boolean,disabled:Boolean,displayExpr:[Function,String],displayValue:String,dropDownCentered:Boolean,dropDownOptions:Object,elementAttr:Object,fieldTemplate:{},focusStateEnabled:Boolean,fullScreen:Boolean,grouped:Boolean,groupTemplate:{},height:[Function,Number,String],hint:String,hoverStateEnabled:Boolean,inputAttr:{},isValid:Boolean,items:Array,itemTemplate:{},label:String,labelMode:String,minSearchLength:Number,name:String,nextButtonText:String,noDataText:String,onClosed:Function,onContentReady:Function,onDisposing:Function,onInitialized:Function,onItemClick:Function,onOpened:Function,onOptionChanged:Function,onPageLoading:Function,onPullRefresh:Function,onScroll:Function,onSelectionChanged:Function,onValueChanged:Function,opened:Boolean,pageLoadingText:String,pageLoadMode:String,placeholder:String,pulledDownText:String,pullingDownText:String,pullRefreshEnabled:Boolean,refreshingText:String,rtlEnabled:Boolean,searchEnabled:Boolean,searchExpr:[Array,Function,String],searchMode:String,searchPlaceholder:String,searchTimeout:Number,selectedItem:{},showCancelButton:Boolean,showClearButton:Boolean,showDataBeforeSearch:Boolean,stylingMode:String,tabIndex:Number,text:String,useItemTextAsTitle:Boolean,useNativeScrolling:Boolean,usePopover:Boolean,validationError:{},validationErrors:Array,validationMessageMode:String,validationStatus:String,value:{},valueChangeEvent:String,valueExpr:[Function,String],visible:Boolean,width:[Function,Number,String],wrapItemText:Boolean},emits:{"update:isActive":null,"update:hoveredElement":null,"update:accessKey":null,"update:activeStateEnabled":null,"update:applyButtonText":null,"update:applyValueMode":null,"update:cancelButtonText":null,"update:cleanSearchOnOpening":null,"update:clearButtonText":null,"update:dataSource":null,"update:deferRendering":null,"update:disabled":null,"update:displayExpr":null,"update:displayValue":null,"update:dropDownCentered":null,"update:dropDownOptions":null,"update:elementAttr":null,"update:fieldTemplate":null,"update:focusStateEnabled":null,"update:fullScreen":null,"update:grouped":null,"update:groupTemplate":null,"update:height":null,"update:hint":null,"update:hoverStateEnabled":null,"update:inputAttr":null,"update:isValid":null,"update:items":null,"update:itemTemplate":null,"update:label":null,"update:labelMode":null,"update:minSearchLength":null,"update:name":null,"update:nextButtonText":null,"update:noDataText":null,"update:onClosed":null,"update:onContentReady":null,"update:onDisposing":null,"update:onInitialized":null,"update:onItemClick":null,"update:onOpened":null,"update:onOptionChanged":null,"update:onPageLoading":null,"update:onPullRefresh":null,"update:onScroll":null,"update:onSelectionChanged":null,"update:onValueChanged":null,"update:opened":null,"update:pageLoadingText":null,"update:pageLoadMode":null,"update:placeholder":null,"update:pulledDownText":null,"update:pullingDownText":null,"update:pullRefreshEnabled":null,"update:refreshingText":null,"update:rtlEnabled":null,"update:searchEnabled":null,"update:searchExpr":null,"update:searchMode":null,"update:searchPlaceholder":null,"update:searchTimeout":null,"update:selectedItem":null,"update:showCancelButton":null,"update:showClearButton":null,"update:showDataBeforeSearch":null,"update:stylingMode":null,"update:tabIndex":null,"update:text":null,"update:useItemTextAsTitle":null,"update:useNativeScrolling":null,"update:usePopover":null,"update:validationError":null,"update:validationErrors":null,"update:validationMessageMode":null,"update:validationStatus":null,"update:value":null,"update:valueChangeEvent":null,"update:valueExpr":null,"update:visible":null,"update:width":null,"update:wrapItemText":null},model:{prop:"value",event:"update:value"},computed:{instance:function(){return this.$_instance}},beforeCreate:function(){this.$_WidgetClass=o.default,this.$_hasAsyncTemplate=!0,this.$_expectedChildren={dropDownOptions:{isCollectionItem:!1,optionName:"dropDownOptions"},item:{isCollectionItem:!0,optionName:"items"}}}});t.DxLookup=s;var l=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:hide":null,"update:show":null},props:{hide:[Object,Number,String],show:[Object,Number,String]}});t.DxAnimation=l,l.$_optionName="animation",l.$_expectedChildren={hide:{isCollectionItem:!1,optionName:"hide"},show:{isCollectionItem:!1,optionName:"show"}};var u=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:String,y:String}});t.DxAt=u,u.$_optionName="at";var c=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:Number,y:Number}});t.DxBoundaryOffset=c,c.$_optionName="boundaryOffset";var d=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:String,y:String}});t.DxCollision=d,d.$_optionName="collision";var h=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:accessKey":null,"update:activeStateEnabled":null,"update:animation":null,"update:bindingOptions":null,"update:closeOnOutsideClick":null,"update:container":null,"update:contentTemplate":null,"update:copyRootClassesToWrapper":null,"update:deferRendering":null,"update:disabled":null,"update:dragAndResizeArea":null,"update:dragEnabled":null,"update:dragOutsideBoundary":null,"update:elementAttr":null,"update:focusStateEnabled":null,"update:fullScreen":null,"update:height":null,"update:hideEvent":null,"update:hideOnParentScroll":null,"update:hint":null,"update:hoverStateEnabled":null,"update:maxHeight":null,"update:maxWidth":null,"update:minHeight":null,"update:minWidth":null,"update:onContentReady":null,"update:onDisposing":null,"update:onFocusIn":null,"update:onFocusOut":null,"update:onHidden":null,"update:onHiding":null,"update:onInitialized":null,"update:onOptionChanged":null,"update:onResize":null,"update:onResizeEnd":null,"update:onResizeStart":null,"update:onShowing":null,"update:onShown":null,"update:onTitleRendered":null,"update:position":null,"update:resizeEnabled":null,"update:restorePosition":null,"update:rtlEnabled":null,"update:shading":null,"update:shadingColor":null,"update:showCloseButton":null,"update:showEvent":null,"update:showTitle":null,"update:tabIndex":null,"update:target":null,"update:title":null,"update:titleTemplate":null,"update:toolbarItems":null,"update:visible":null,"update:width":null,"update:wrapperAttr":null},props:{accessKey:String,activeStateEnabled:Boolean,animation:Object,bindingOptions:Object,closeOnOutsideClick:[Boolean,Function],container:{},contentTemplate:{},copyRootClassesToWrapper:Boolean,deferRendering:Boolean,disabled:Boolean,dragAndResizeArea:{},dragEnabled:Boolean,dragOutsideBoundary:Boolean,elementAttr:{},focusStateEnabled:Boolean,fullScreen:Boolean,height:[Function,Number,String],hideEvent:[Object,String],hideOnParentScroll:Boolean,hint:String,hoverStateEnabled:Boolean,maxHeight:[Function,Number,String],maxWidth:[Function,Number,String],minHeight:[Function,Number,String],minWidth:[Function,Number,String],onContentReady:Function,onDisposing:Function,onFocusIn:Function,onFocusOut:Function,onHidden:Function,onHiding:Function,onInitialized:Function,onOptionChanged:Function,onResize:Function,onResizeEnd:Function,onResizeStart:Function,onShowing:Function,onShown:Function,onTitleRendered:Function,position:[Object,String],resizeEnabled:Boolean,restorePosition:Boolean,rtlEnabled:Boolean,shading:Boolean,shadingColor:String,showCloseButton:Boolean,showEvent:[Object,String],showTitle:Boolean,tabIndex:Number,target:{},title:String,titleTemplate:{},toolbarItems:Array,visible:Boolean,width:[Function,Number,String],wrapperAttr:{}}});t.DxDropDownOptions=h,h.$_optionName="dropDownOptions",h.$_expectedChildren={animation:{isCollectionItem:!1,optionName:"animation"},hideEvent:{isCollectionItem:!1,optionName:"hideEvent"},position:{isCollectionItem:!1,optionName:"position"},showEvent:{isCollectionItem:!1,optionName:"showEvent"},toolbarItem:{isCollectionItem:!0,optionName:"toolbarItems"}};var p=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:left":null,"update:opacity":null,"update:position":null,"update:scale":null,"update:top":null},props:{left:Number,opacity:Number,position:Object,scale:Number,top:Number}});t.DxFrom=p,p.$_optionName="from",p.$_expectedChildren={position:{isCollectionItem:!1,optionName:"position"}};var f=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:complete":null,"update:delay":null,"update:direction":null,"update:duration":null,"update:easing":null,"update:from":null,"update:staggerDelay":null,"update:start":null,"update:to":null,"update:type":null},props:{complete:Function,delay:Number,direction:String,duration:Number,easing:String,from:Object,staggerDelay:Number,start:Function,to:Object,type:String}});t.DxHide=f,f.$_optionName="hide",f.$_expectedChildren={from:{isCollectionItem:!1,optionName:"from"},to:{isCollectionItem:!1,optionName:"to"}};var m=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:delay":null,"update:name":null},props:{delay:Number,name:String}});t.DxHideEvent=m,m.$_optionName="hideEvent";var g=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:disabled":null,"update:html":null,"update:template":null,"update:text":null,"update:visible":null},props:{disabled:Boolean,html:String,template:{},text:String,visible:Boolean}});t.DxItem=g,g.$_optionName="items",g.$_isCollectionItem=!0;var v=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:String,y:String}});t.DxMy=v,v.$_optionName="my";var _=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:x":null,"update:y":null},props:{x:Number,y:Number}});t.DxOffset=_,_.$_optionName="offset";var y=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:at":null,"update:boundary":null,"update:boundaryOffset":null,"update:collision":null,"update:my":null,"update:of":null,"update:offset":null},props:{at:[Object,String],boundary:{},boundaryOffset:[Object,String],collision:[Object,String],my:[Object,String],of:{},offset:[Object,String]}});t.DxPosition=y,y.$_optionName="position";var b=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:complete":null,"update:delay":null,"update:direction":null,"update:duration":null,"update:easing":null,"update:from":null,"update:staggerDelay":null,"update:start":null,"update:to":null,"update:type":null},props:{complete:Function,delay:Number,direction:String,duration:Number,easing:String,from:Object,staggerDelay:Number,start:Function,to:Object,type:String}});t.DxShow=b,b.$_optionName="show";var C=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:delay":null,"update:name":null},props:{delay:Number,name:String}});t.DxShowEvent=C,C.$_optionName="showEvent";var x=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:left":null,"update:opacity":null,"update:position":null,"update:scale":null,"update:top":null},props:{left:Number,opacity:Number,position:Object,scale:Number,top:Number}});t.DxTo=x,x.$_optionName="to";var w=a.createConfigurationComponent({emits:{"update:isActive":null,"update:hoveredElement":null,"update:disabled":null,"update:html":null,"update:location":null,"update:options":null,"update:template":null,"update:text":null,"update:toolbar":null,"update:visible":null,"update:widget":null},props:{disabled:Boolean,html:String,location:String,options:{},template:{},text:String,toolbar:String,visible:Boolean,widget:String}});t.DxToolbarItem=w,w.$_optionName="toolbarItems",w.$_isCollectionItem=!0,t.default=s},"07f4":function(e,t,n){"use strict";var i=n("be7f"),o=4,r=0,a=1,s=2;function l(e){var t=e.length;while(--t>=0)e[t]=0}var u=0,c=1,d=2,h=3,p=258,f=29,m=256,g=m+1+f,v=30,_=19,y=2*g+1,b=15,C=16,x=7,w=256,S=16,T=17,O=18,E=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A=512,P=new Array(2*(g+2));l(P);var M=new Array(2*v);l(M);var R=new Array(A);l(R);var j=new Array(p-h+1);l(j);var N=new Array(f);l(N);var B,L,F,V=new Array(v);function H(e,t,n,i,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=o,this.has_stree=e&&e.length}function z(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function U(e){return e<256?R[e]:R[256+(e>>>7)]}function $(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function W(e,t,n){e.bi_valid>C-n?(e.bi_buf|=t<>C-e.bi_valid,e.bi_valid+=n-C):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function K(e){16===e.bi_valid?($(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function Y(e,t){var n,i,o,r,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(r=0;r<=b;r++)e.bl_count[r]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nf&&(r=f,m++),l[2*i+1]=r,i>u||(e.bl_count[r]++,a=0,i>=p&&(a=h[i-p]),s=l[2*i],e.opt_len+=s*(r+a),d&&(e.static_len+=s*(c[2*i+1]+a)));if(0!==m){do{r=f-1;while(0===e.bl_count[r])r--;e.bl_count[r]--,e.bl_count[r+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(r=f;0!==r;r--){i=e.bl_count[r];while(0!==i)o=e.heap[--n],o>u||(l[2*o+1]!==r&&(e.opt_len+=(r-l[2*o+1])*l[2*o],l[2*o+1]=r),i--)}}}function X(e,t,n){var i,o,r=new Array(b+1),a=0;for(i=1;i<=b;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=q(r[s]++,s))}}function Z(){var e,t,n,i,o,r=new Array(b+1);for(n=0,i=0;i>=7;i8?$(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ee(e,t,n,o){Q(e),o&&($(e,n),$(e,~n)),i.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function te(e,t,n,i){var o=2*t,r=2*n;return e[o]>1;n>=1;n--)ne(e,r,n);o=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ne(e,r,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,r[2*o]=r[2*n]+r[2*i],e.depth[o]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,r[2*n+1]=r[2*i+1]=o,e.heap[1]=o++,ne(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Y(e,t),X(r,u,e.bl_count)}function re(e,t,n){var i,o,r=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)o=a,a=t[2*(i+1)+1],++s=3;t--)if(0!==e.bl_tree[2*D[t]+1])break;return e.opt_len+=3*(t+1)+5+5+4,t}function le(e,t,n,i){var o;for(W(e,t-257,5),W(e,n-1,5),W(e,i-4,4),o=0;o>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return a;for(t=32;t0?(e.strm.data_type===s&&(e.strm.data_type=ue(e)),oe(e,e.l_desc),oe(e,e.d_desc),l=se(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!==t?he(e,t,n,i):e.strategy===o||a===r?(W(e,(c<<1)+(i?1:0),3),ie(e,P,M)):(W(e,(d<<1)+(i?1:0),3),le(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),ie(e,e.dyn_ltree,e.dyn_dtree)),J(e),i&&Q(e)}function me(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(j[n]+m+1)]++,e.dyn_dtree[2*U(t)]++),e.last_lit===e.lit_bufsize-1}t._tr_init=de,t._tr_stored_block=he,t._tr_flush_block=fe,t._tr_tally=me,t._tr_align=pe},"07fa":function(e,t,n){var i=n("50c4");e.exports=function(e){return i(e.length)}},"083a":function(e,t,n){"use strict";var i=n("0d51"),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw o("Cannot delete property "+i(t)+" of "+i(e))}},"085e":function(e,t,n){"use strict";var i=n("5b62"),o=n("4b9e"),r=new o["a"],a=n("a09c"),s=n("c231"),l=function(e,t,n){n?t[e]=n:n=t,Object(s["c"])(n,e),r.fire(e,n)},u=function(e,t){i["a"].fn[e]=function(n){var i,o="string"===typeof n;if(o){var r=n,s=[].slice.call(arguments).slice(1);this.each((function(){var n=t.getInstance(this);if(!n)throw a["a"].Error("E0009",e);var o=n[r],l=o.apply(n,s);void 0===i&&(i=l)}))}else this.each((function(){var e=t.getInstance(this);e?e.option(n):new t(this,n)})),i=this;return i}};r.add(u);t["a"]=l},"08ba":function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n("5b62"),o=n("ef30"),r=n("7af1"),a=n("b499"),s=n("c920"),l=n("b3a5"),u=n("6bc7"),c=n("b144"),d=n("bf95"),h=n("b9af"),p=n("687a"),f=n("cc07"),m=n("eebe"),g={defaultOptions:function(){return{loadingTimeout:0,dataSource:null,cacheEnabled:!0,repaintChangesOnly:!1,highlightChanges:!1,onDataErrorOccurred:null,remoteOperations:"auto",paging:{enabled:!0,pageSize:void 0,pageIndex:void 0}}},controllers:{data:o["a"].Controller.inherit({}).include(p["a"]).inherit(function(){var e=function(e,t,n){var i=e._dataSource;if(i){if(void 0!==n){var o=e._getPagingOptionValue(t);if(o!==n){"pageSize"===t&&i.pageIndex(0),i[t](n),e._skipProcessingPagingChange=!0,e.option("paging."+t,n),e._skipProcessingPagingChange=!1;var r=i.pageIndex();return e._isPaging="pageIndex"===t,i["pageIndex"===t?"load":"reload"]().done(()=>{e._isPaging=!1,e.pageChanged.fire(r)})}return Object(f["a"])().resolve().promise()}return i[t]()}return 0},t={init:function(){var e=this;e._items=[],e._cachedProcessedItems=null,e._columnsController=e.getController("columns"),e._isPaging=!1,e._currentOperationTypes=null,e._dataChangedHandler=t=>{e._currentOperationTypes=this._dataSource.operationTypes(),e._handleDataChanged(t),e._currentOperationTypes=null},e._columnsChangedHandler=e._handleColumnsChanged.bind(e),e._loadingChangedHandler=e._handleLoadingChanged.bind(e),e._loadErrorHandler=e._handleLoadError.bind(e),e._customizeStoreLoadOptionsHandler=e._handleCustomizeStoreLoadOptions.bind(e),e._changingHandler=e._handleChanging.bind(e),e._dataPushedHandler=e._handleDataPushed.bind(e),e._columnsController.columnsChanged.add(e._columnsChangedHandler),e._isLoading=!1,e._isCustomLoading=!1,e._repaintChangesOnly=void 0,e._changes=[],e.createAction("onDataErrorOccurred"),e.dataErrorOccurred.add((function(t){return e.executeAction("onDataErrorOccurred",{error:t})})),e._refreshDataSource()},_getPagingOptionValue:function(e){return this._dataSource[e]()},callbackNames:function(){return["changed","loadingChanged","dataErrorOccurred","pageChanged","dataSourceChanged","pushed"]},callbackFlags:function(e){if("dataErrorOccurred"===e)return{stopOnFalse:!0}},publicMethods:function(){return["beginCustomLoading","endCustomLoading","refresh","filter","clearFilter","getCombinedFilter","keyOf","byKey","getDataByKeys","pageIndex","pageSize","pageCount","totalCount","_disposeDataSource","getKeyByRowIndex","getRowIndexByKey","getDataSource","getVisibleRows","repaintRows"]},reset:function(){this._columnsController.reset(),this._items=[],this._refreshDataSource()},_handleDataSourceChange(e){if(e.value===e.previousValue||this.option("columns")&&Array.isArray(e.value)&&Array.isArray(e.previousValue)){var t=e.value!==e.previousValue;if(t){var n=this.store();n&&(n._array=e.value)}return this.needToRefreshOnDataSourceChange(e)&&this.refresh(this.option("repaintChangesOnly")),!0}return!1},needToRefreshOnDataSourceChange:function(e){return!0},optionChanged:function(e){var t,n,i=this;function o(){e.handled=!0}if("dataSource"===e.name&&e.name===e.fullName&&this._handleDataSourceChange(e))o();else switch(e.name){case"cacheEnabled":case"repaintChangesOnly":case"highlightChanges":case"loadingTimeout":o();break;case"remoteOperations":case"keyExpr":case"dataSource":case"scrolling":o(),i.reset();break;case"paging":if(t=i.dataSource(),t&&(n=i._setPagingOptions(t),n)){var r=t.pageIndex();this._isPaging=n.isPageIndexChanged,t.load().done(()=>{this._isPaging=!1,i.pageChanged.fire(r)})}o();break;case"rtlEnabled":i.reset();break;case"columns":t=i.dataSource(),t&&t.isLoading()&&e.name===e.fullName&&(this._useSortingGroupingFromColumns=!0,t.load());break;default:i.callBase(e)}},isReady:function(){return!this._isLoading},getDataSource:function(){return this._dataSource&&this._dataSource._dataSource},getCombinedFilter:function(e){return this.combinedFilter(void 0,e)},combinedFilter:function(e,t){var n=this._dataSource,i=this._columnsController;if(n){void 0===e&&(e=n.filter());var o=this._calculateAdditionalFilter();o&&(i.isDataSourceApplied()||i.isAllDataTypesDefined())&&(e=r["a"].combineFilters([o,e])),e=i.updateFilter(e,t||n.remoteOperations().filtering)}return e},waitReady:function(){return this._updateLockCount?(this._readyDeferred=new f["a"],this._readyDeferred):Object(f["c"])()},_endUpdateCore:function(){var e=this._changes;if(e.length){this._changes=[];var t=e.every(e=>e.repaintChangesOnly);this.updateItems(1===e.length?e[0]:{repaintChangesOnly:t})}this._readyDeferred&&(this._readyDeferred.resolve(),this._readyDeferred=null)},_handleCustomizeStoreLoadOptions:function(e){var t,n=this._columnsController,i=this._dataSource,o=e.storeLoadOptions;e.isCustomLoading&&!o.isLoadingAll||(o.filter=this.combinedFilter(o.filter),1===(null===(t=o.filter)||void 0===t?void 0:t.length)&&"!"===o.filter[0]&&(e.data=[],e.extra=e.extra||{},e.extra.totalCount=0),n.isDataSourceApplied()||n.updateColumnDataTypes(i),this._columnsUpdating=!0,n.updateSortingGrouping(i,!this._useSortingGroupingFromColumns),this._columnsUpdating=!1,o.sort=n.getSortDataSourceParameters(),o.group=n.getGroupDataSourceParameters(),i.sort(o.sort),i.group(o.group),o.sort=n.getSortDataSourceParameters(!i.remoteOperations().sorting),e.group=n.getGroupDataSourceParameters(!i.remoteOperations().grouping))},_handleColumnsChanged:function(e){var t,n,i,o=this,a=e.changeTypes,s=e.optionNames;if(a.sorting||a.grouping)o._dataSource&&!o._columnsUpdating&&(o._dataSource.group(o._columnsController.getGroupDataSourceParameters()),o._dataSource.sort(o._columnsController.getSortDataSourceParameters()),o.reload());else if(a.columns&&(n=o._columnsController.columnOption(e.columnIndex,"filterValues"),(s.filterValues||s.filterType&&Array.isArray(n)||s.filterValue||s.selectedFilterOperation||s.allowFiltering)&&(t=o._columnsController.columnOption(e.columnIndex,"filterValue"),(Array.isArray(n)||void 0===e.columnIndex||Object(d["d"])(t)||!s.selectedFilterOperation||s.filterValue)&&(o._applyFilter(),i=!0)),o._needApplyFilter||r["a"].checkChanges(s,["width","visibleWidth","filterValue","bufferedFilterValue","selectedFilterOperation","filterValues","filterType"])||o._columnsController.columnsChanged.add((function e(t){var n;o._columnsController.columnsChanged.remove(e),o.updateItems({repaintChangesOnly:!1,virtualColumnsScrolling:null===t||void 0===t||null===(n=t.changeTypes)||void 0===n?void 0:n.virtualColumnsScrolling})})),Object(d["d"])(s.visible))){var l=o._columnsController.columnOption(e.columnIndex);l&&(Object(d["d"])(l.filterValue)||Object(d["d"])(l.filterValues))&&(o._applyFilter(),i=!0)}!i&&a.filtering&&o.reload()},_handleDataChanged:function(e){var t=this,n=t._dataSource,i=t._columnsController,o=!1;this._useSortingGroupingFromColumns=!1,n&&!t._isDataSourceApplying&&(t._isDataSourceApplying=!0,Object(f["c"])(t._columnsController.applyDataSource(n)).done((function(){t._isLoading&&t._handleLoadingChanged(!1),o&&e&&e.isDelayed&&(e.isDelayed=!1),t._isDataSourceApplying=!1;var n,i=t._needApplyFilter;t._needApplyFilter=!1,i&&!t._isAllDataTypesDefined&&(n=t._calculateAdditionalFilter(),n&&n.length)?(l["a"].log("W1005",t.component.NAME),t._applyFilter()):t.updateItems(e,!0)})).fail((function(){t._isDataSourceApplying=!1})),t._isDataSourceApplying&&(o=!0,t._handleLoadingChanged(!0)),t._needApplyFilter=!t._columnsController.isDataSourceApplied(),t._isAllDataTypesDefined=i.isAllDataTypesDefined())},_handleLoadingChanged:function(e){this._isLoading=e,this._fireLoadingChanged()},_handleLoadError:function(e){this.dataErrorOccurred.fire(e)},_handleDataPushed:function(e){this.pushed.fire(e)},fireError:function(){this.dataErrorOccurred.fire(l["a"].Error.apply(l["a"],arguments))},_setPagingOptions:function(e){var t=this.option("paging.pageIndex"),n=this.option("paging.pageSize"),i=this.option("paging.enabled"),o=this.option("scrolling.mode"),r="infinite"===o,a="virtual"===o,s=i||a||r,l=!1,u=!1,c=!1;return e.requireTotalCount(!r),void 0!==i&&e.paginate()!==s&&(e.paginate(s),l=!0),void 0!==n&&e.pageSize()!==n&&(e.pageSize(n),u=!0),void 0!==t&&e.pageIndex()!==t&&(e.pageIndex(t),c=!0),!!(l||u||c)&&{isPaginateChanged:l,isPageSizeChanged:u,isPageIndexChanged:c}},_getSpecificDataSourceOption:function(){var e=this.option("dataSource");return Array.isArray(e)?{store:{type:"array",data:e,key:this.option("keyExpr")}}:e},_initDataSource:function(){var e=this._dataSource;this.callBase();var t=this._dataSource;if(this._useSortingGroupingFromColumns=!0,this._cachedProcessedItems=null,t){var n=this._setPagingOptions(t);this._isPaging=null===n||void 0===n?void 0:n.isPageIndexChanged,this.setDataSource(t)}else e&&this.updateItems()},_loadDataSource:function(){var e=this,t=e._dataSource,n=new f["a"];return Object(f["c"])(this._columnsController.refresh(!0)).always((function(){t?t.load().done((function(){e._isPaging=!1,n.resolve.apply(n,arguments)})).fail(n.reject):n.resolve()})),n.promise()},_beforeProcessItems:function(e){return e.slice(0)},getRowIndexDelta:function(){return 0},_processItems:function(e,t){var n=this,i=n.getRowIndexDelta(),o=t.changeType,r=n._columnsController.getVisibleColumns(null,"loadingAll"===o),a=n._items,s="append"===o&&a.length>0?a[a.length-1]:null,l=Object(d["d"])(null===s||void 0===s?void 0:s.dataIndex)?s.dataIndex+1:0,u={visibleColumns:r,dataIndex:l},h=[];return Object(c["a"])(e,(function(e,t){Object(d["d"])(t)&&(u.rowIndex=e-i,t=n._processItem(t,u),h.push(t))})),h},_processItem:function(e,t){return e=this._generateDataItem(e,t),e=this._processDataItem(e,t),e.dataIndex=t.dataIndex++,e},_generateDataItem:function(e){return{rowType:"data",data:e,key:this.keyOf(e)}},_processDataItem:function(e,t){return e.values=this.generateDataValues(e.data,t.visibleColumns),e},generateDataValues:function(e,t,n){for(var i,o=[],r=0;r{var n;return"groupExpand"!==(null===(n=e.column)||void 0===n?void 0:n.type)?t:-1}).filter(e=>e>=0))}return o},_partialUpdateRow:function(e,t,n,i){var o,r=this._getChangedColumnIndices(e,t,n,i);return null!==(o=r)&&void 0!==o&&o.length&&this.option("dataRowTemplate")&&(r=void 0),r&&(e.cells&&e.cells.forEach((function(e,n){var i=r.indexOf(n)>=0;!i&&e&&e.update&&e.update(t)})),t.update=e.update,t.watch=e.watch,t.cells=e.cells,i&&(t.oldValues=e.values),e.update&&e.update(t)),r},_isItemEquals:function(e,t){if(JSON.stringify(e.values)!==JSON.stringify(t.values))return!1;if(["modified","isNewRow","removed","isEditing"].some(n=>e[n]!==t[n]))return!1;if("group"===e.rowType||"groupFooter"===e.rowType){var n,i,o,r,a=e.isExpanded===t.isExpanded,s=JSON.stringify(e.summaryCells)===JSON.stringify(t.summaryCells),l=(null===(n=e.data)||void 0===n?void 0:n.isContinuation)===(null===(i=t.data)||void 0===i?void 0:i.isContinuation)&&(null===(o=e.data)||void 0===o?void 0:o.isContinuationOnNextPage)===(null===(r=t.data)||void 0===r?void 0:r.isContinuationOnNextPage);if(!a||!s||!l)return!1}return!0},_applyChangesOnly:function(e){var t,n=[],i=[],o=[],r=[],a={},s=null===(t=null===e||void 0===e?void 0:e.isLiveUpdate)||void 0===t||t;function l(e){if(e)return e.rowType+","+JSON.stringify(e.key)}var u=this._items,c=u.slice();e.items.forEach((function(e,t){var n=l(e);a[n]=t,e.rowIndex=t}));var d=Object(m["a"])(c,e.items,l,(e,t)=>!!this._isItemEquals(e,t)&&(e.cells&&(e.update&&e.update(t),e.cells.forEach((function(e){e&&e.update&&e.update(t,!0)}))),!0));d?(d.forEach(e=>{switch(e.type){case"update":var t=e.index,a=e.data,l=e.oldItem,c=this._partialUpdateRow(l,a,t,s);n.push(t),o.push("update"),r.push(a),u[t]=a,i.push(c);break;case"insert":n.push(e.index),o.push("insert"),r.push(e.data),i.push(void 0),u.splice(e.index,0,e.data);break;case"remove":n.push(e.index),o.push("remove"),u.splice(e.index,1),r.push(e.oldItem),i.push(void 0)}}),e.repaintChangesOnly=!0,e.changeType="update",e.rowIndices=n,e.columnIndices=i,e.changeTypes=o,e.items=r,c.length&&(e.isLiveUpdate=!0),this._correctRowIndices(e=>{var t=this._rowIndexOffset||0,n=this.getRowIndexOffset(),i=c[e-t],o=l(i),r=a[o];return r>=0?r+n-e:0})):this._applyChangeFull(e)},_correctRowIndices:u["n"],_afterProcessItems:function(e){return e},_updateItemsCore:function(e){var t,n=this._dataSource,i=e.changeType||"refresh";if(e.changeType=i,n){var o=this._cachedProcessedItems;e.useProcessedItemsCache&&o?t=o:(t=e.items||n.items(),t=this._beforeProcessItems(t),t=this._processItems(t,e),this._cachedProcessedItems=t),t=this._afterProcessItems(t,e),e.items=t;var r=this._items.length===t.length&&this._items;this._applyChange(e);var a=this.getRowIndexDelta();Object(c["a"])(this._items,(e,n)=>{n.rowIndex=e-a,r&&(n.cells=r[e].cells||[]);var i=t[e];i&&(n.loadIndex=i.loadIndex)}),this._rowIndexOffset=this.getRowIndexOffset()}else this._items=[]},_handleChanging:function(e){var t=this.getVisibleRows(),n=this.dataSource();n&&e.changes.forEach((function(e){if("insert"===e.type&&e.index>=0){for(var n=0,i=0;i{this.changed.fire(e)})},isLoading:function(){return this._isLoading||this._isCustomLoading},_fireLoadingChanged:function(){this.loadingChanged.fire(this.isLoading(),this._loadingText)},_calculateAdditionalFilter:function(){return null},_applyFilter:function(){var e=this._dataSource;if(e)return e.pageIndex(0),this._isFilterApplying=!0,this.reload().done(()=>{this._isFilterApplying&&this.pageChanged.fire()})},resetFilterApplying:function(){this._isFilterApplying=!1},filter:function(e){var t=this._dataSource,n=t&&t.filter();if(0===arguments.length)return n;e=arguments.length>1?Array.prototype.slice.call(arguments,0):e,r["a"].equalFilterParameters(n,e)||(t&&t.filter(e),this._applyFilter())},clearFilter:function(e){var t=this,n=t._columnsController,i=function(e){for(var t=n.columnCount(),i=0;i0)switch(e){case"dataSource":t.filter(null);break;case"search":t.searchByText("");break;case"header":i("filterValues");break;case"row":i("filterValue")}else t.filter(null),t.searchByText(""),i("filterValue"),i("bufferedFilterValue"),i("filterValues");t.component.endUpdate()},_fireDataSourceChanged:function(){var e=this;e.changed.add((function t(){e.changed.remove(t),e.dataSourceChanged.fire()}))},_getDataSourceAdapter:u["n"],_createDataSourceAdapterCore:function(e,t){var n=this._getDataSourceAdapter(),i=n.create(this.component);return i.init(e,t),i},isLocalStore:function(e){return e=e||this.store(),e instanceof a["a"]},isCustomStore:function(e){return e=e||this.store(),e instanceof s["a"]},_createDataSourceAdapter:function(e){var t=this.option("remoteOperations"),n=e.store(),i={filtering:!0,sorting:!0,paging:!0,grouping:!0,summary:!0};return t&&t.groupPaging&&(t=Object(h["a"])({},i,t)),"auto"===t&&(t=this.isLocalStore(n)||this.isCustomStore(n)?{}:{filtering:!0,sorting:!0,paging:!0}),!0===t&&(t=i),this._createDataSourceAdapterCore(e,t)},setDataSource:function(e){var t=this._dataSource;!e&&t&&(t.cancelAll(),t.changed.remove(this._dataChangedHandler),t.loadingChanged.remove(this._loadingChangedHandler),t.loadError.remove(this._loadErrorHandler),t.customizeStoreLoadOptions.remove(this._customizeStoreLoadOptionsHandler),t.changing.remove(this._changingHandler),t.pushed.remove(this._dataPushedHandler),t.dispose(this._isSharedDataSource)),e&&(e=this._createDataSourceAdapter(e)),this._dataSource=e,e&&(this._fireDataSourceChanged(),this._isLoading=!e.isLoaded(),this._needApplyFilter=!0,this._isAllDataTypesDefined=this._columnsController.isAllDataTypesDefined(),e.changed.add(this._dataChangedHandler),e.loadingChanged.add(this._loadingChangedHandler),e.loadError.add(this._loadErrorHandler),e.customizeStoreLoadOptions.add(this._customizeStoreLoadOptionsHandler),e.changing.add(this._changingHandler),e.pushed.add(this._dataPushedHandler))},items:function(){return this._items},isEmpty:function(){return!this.items().length},pageCount:function(){return this._dataSource?this._dataSource.pageCount():1},dataSource:function(){return this._dataSource},store:function(){var e=this._dataSource;return e&&e.store()},loadAll:function(e){var t=this,n=new f["a"],i=t._dataSource;if(i)if(e){var o={data:e,isCustomLoading:!0,storeLoadOptions:{isLoadingAll:!0},loadOptions:{filter:t.getCombinedFilter(),group:i.group(),sort:i.sort()}};i._handleDataLoaded(o),Object(f["c"])(o.data).done((function(e){e=t._beforeProcessItems(e),n.resolve(t._processItems(e,{changeType:"loadingAll"}),o.extra&&o.extra.summary)})).fail(n.reject)}else if(i.isLoading())n.reject();else{var r=Object(h["a"])({},i.loadOptions(),{isLoadingAll:!0,requireTotalCount:!1});i.load(r).done((function(e,i){e=t._beforeProcessItems(e),e=t._processItems(e,{changeType:"loadingAll"}),n.resolve(e,i&&i.summary)})).fail(n.reject)}else n.resolve([]);return n},getKeyByRowIndex:function(e,t){var n=this.items(t)[e];if(n)return n.key},getRowIndexByKey:function(e,t){return r["a"].getIndexByKey(e,this.items(t))},keyOf:function(e){var t=this.store();if(t)return t.keyOf(e)},byKey:function(e){var t,n=this.store(),i=this.getRowIndexByKey(e);if(n)return i>=0&&(t=(new f["a"]).resolve(this.items()[i].data)),t||n.byKey(e)},key:function(){var e=this.store();if(e)return e.key()},getRowIndexOffset:function(){return 0},getDataByKeys:function(e){var t=this,n=new f["a"],o=[],r=[];return Object(c["a"])(e,(function(e,n){o.push(t.byKey(n).done((function(t){r[e]=t})))})),f["c"].apply(i["a"],o).always((function(){n.resolve(r)})),n},pageIndex:function(t){return e(this,"pageIndex",t)},pageSize:function(t){return e(this,"pageSize",t)},beginCustomLoading:function(e){this._isCustomLoading=!0,this._loadingText=e||"",this._fireLoadingChanged()},endCustomLoading:function(){this._isCustomLoading=!1,this._loadingText=void 0,this._fireLoadingChanged()},refresh:function(e){!0===e?e={reload:!0,changesOnly:!0}:e||(e={lookup:!0,selection:!0,reload:!0});var t=this,n=t.getDataSource(),i=e.changesOnly,o=new f["a"],r=function(){t._repaintChangesOnly=!!i};return Object(f["c"])(!e.lookup||t._columnsController.refresh()).always((function(){e.load||e.reload?(n&&n.on("customizeLoadResult",r),Object(f["c"])(t.reload(e.reload,i)).always((function(){n&&n.off("customizeLoadResult",r),t._repaintChangesOnly=void 0})).done(o.resolve).fail(o.reject)):(t.updateItems({repaintChangesOnly:e.changesOnly}),o.resolve())})),o.promise()},getVisibleRows:function(){return this.items()},_disposeDataSource:function(){this.setDataSource(null)},dispose:function(){this._disposeDataSource(),this.callBase.apply(this,arguments)},repaintRows:function(e,t){e=Array.isArray(e)?e:[e],(e.length>1||Object(d["d"])(e[0]))&&this.updateItems({changeType:"update",rowIndices:e,isFullUpdate:!t})},skipProcessingPagingChange:function(e){return this._skipProcessingPagingChange&&("paging.pageIndex"===e||"paging.pageSize"===e)},getUserState:function(){return{searchText:this.option("searchPanel.text"),pageIndex:this.pageIndex(),pageSize:this.pageSize()}},getCachedStoreData:function(){return this._dataSource&&this._dataSource.getCachedStoreData()},isLastPageLoaded:function(){var e=this.pageIndex(),t=this.pageCount();return e===t-1}};return r["a"].proxyMethod(t,"load"),r["a"].proxyMethod(t,"reload"),r["a"].proxyMethod(t,"push"),r["a"].proxyMethod(t,"itemsCount",0),r["a"].proxyMethod(t,"totalItemsCount",0),r["a"].proxyMethod(t,"hasKnownLastPage",!0),r["a"].proxyMethod(t,"isLoaded",!0),r["a"].proxyMethod(t,"totalCount",0),t}())}}},"08c1":function(e,t,n){"use strict";var i=n("facd"),o=n("bf95"),r=n("b144"),a=n("b7ae"),s=n("cc07"),l=n("3fd5"),u=n("9cde"),c=i["a"].inherit({toArray:function(){var e=[];this.reset();while(this.next())e.push(this.current());return e},countable:function(){return!1}}),d=c.inherit({ctor:function(e){this.array=e,this.index=-1},next:function(){return this.index+1t?1:0},m=c.inherit({ctor:function(e,t,n,i){e instanceof p||(e=new p(e,this._wrap)),this.iter=e,this.rules=[{getter:t,desc:n,compare:i}]},thenBy:function(e,t,n){var i=new m(this.sortedIter||this.iter,e,t,n);return this.sortedIter||(i.rules=this.rules.concat(i.rules)),i},next:function(){return this._ensureSorted(),this.sortedIter.next()},current:function(){return this._ensureSorted(),this.sortedIter.current()},reset:function(){delete this.sortedIter},countable:function(){return this.sortedIter||this.iter.countable()},count:function(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted:function(){var e=this;e.sortedIter||(Object(r["a"])(e.rules,(function(){this.getter=Object(a["a"])(this.getter)})),e.sortedIter=new p(new d(this.iter.toArray().sort((function(t,n){return e._compare(t,n)}))),e._unwrap))},_wrap:function(e,t){return{index:t,value:e}},_unwrap:function(e){return e.value},_compare:function(e,t){var n=e.index,i=t.index;if(e=e.value,t=t.value,e===t)return n-i;for(var o=0,r=this.rules.length;o1&&n!==i)throw new l["a"].Error("E4019");t.push(g(this)),n=i,i=!0}else i=Object(u["d"])(this)})),function(e){for(var i=n,o=0;o(e=Object(a["d"])(i(e)),(null!=r&&null!=e||r===e)&&t(e,r));switch(o.toLowerCase()){case"=":return t(i,r);case"<>":return t(i,r,!0);case">":return e=>s(e,(e,t)=>e>t);case"<":return e=>s(e,(e,t)=>e=":return e=>s(e,(e,t)=>e>=t);case"<=":return e=>s(e,(e,t)=>e<=t);case"startswith":return function(t){return 0===Object(a["d"])(e(i(t))).indexOf(r)};case"endswith":return function(t){var n=Object(a["d"])(e(i(t))),o=e(r);if(n.length-1};case"notcontains":return function(t){return-1===Object(a["d"])(e(i(t))).indexOf(r)}}throw l["a"].Error("E4003",o)}(n)}}(),v=h.inherit({ctor:function(e,t){this.callBase(e),this.criteria=g(t)},next:function(){while(this.iter.next())if(this.criteria(this.current()))return!0;return!1}}),_=c.inherit({ctor:function(e,t){this.iter=e,this.getter=t},next:function(){return this._ensureGrouped(),this.groupedIter.next()},current:function(){return this._ensureGrouped(),this.groupedIter.current()},reset:function(){delete this.groupedIter},countable:function(){return!!this.groupedIter},count:function(){return this.groupedIter.count()},_ensureGrouped:function(){if(!this.groupedIter){var e={},t=[],n=this.iter,i=Object(a["a"])(this.getter);n.reset();while(n.next()){var o=n.current(),s=i(o);s in e?e[s].push(o):(e[s]=[o],t.push(s))}this.groupedIter=new d(Object(r["b"])(t,(function(t){return{key:t,items:e[t]}})))}}}),y=h.inherit({ctor:function(e,t){this.callBase(e),this.getter=Object(a["a"])(t)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),b=h.inherit({ctor:function(e,t,n){this.callBase(e),this.skip=Math.max(0,t),this.take=Math.max(0,n),this.pos=0},next:function(){if(this.pos>=this.skip+this.take)return!1;while(this.pos{var t,i=n?"
":"";n+=i+Object(l["a"])(null!==(t=null===e||void 0===e?void 0:e.message)&&void 0!==t?t:"")}),n},_toggleModeClass(){var e=this.option("mode");this.$wrapper().toggleClass(d,"auto"===e).toggleClass(h,"always"===e)},updateMaxWidth(){var e=this.option("target"),t=Object(i["i"])(e),n="100%";t&&(n=Math.max(t,f)),this.option({maxWidth:n})},_updatePosition:function(){var{positionRequest:e,rtlEnabled:t,offset:n,boundary:i}=this.option(),o=Object(u["b"])(t),r="below"===e?[" top"," bottom"]:[" bottom"," top"];t&&(n.h=-n.h),"below"!==e&&(n.v=-n.v),this.option("position",{offset:n,boundary:i,my:o+r[0],at:o+r[1],collision:"none flip"})},_optionChanged(e){var{name:t,value:n}=e;switch(t){case"target":this.updateMaxWidth(),this.callBase(e);break;case"boundary":this.option("position.boundary",n);break;case"mode":this._toggleModeClass(n);break;case"rtlEnabled":case"offset":case"positionRequest":this._updatePosition();break;case"container":this._updateContentId(),this.callBase(e);break;case"contentId":this._updateContentId();break;case"validationErrors":this._ensureMessageNotEmpty(),this._renderInnerHtml(this.$content());break;default:this.callBase(e)}}});Object(r["a"])("dxValidationMessage",m),t["a"]=m},"094a":function(e,t,n){var i=n("e330"),o=Map.prototype;e.exports={Map:Map,set:i(o.set),get:i(o.get),has:i(o.has),remove:i(o["delete"]),proto:o}},"0999":function(e,t,n){"use strict";var i=n("5b62"),o=n("f654"),r=n("97d5"),a=n("b9af"),s=n("bc6f"),l=n("c55f"),u=n("bf39"),c=n("bf95"),d={top:{my:"bottom center",at:"top center",collision:"fit none"},bottom:{my:"top center",at:"bottom center",collision:"fit none"}},h={h:2,v:1},p="dx-slider";class f extends s["b"]{_normalizePosition(e,t){var n=".".concat(p),i=null===t||void 0===t?void 0:t.closest(n),o={of:t,boundaryOffset:h,boundary:null===i||void 0===i?void 0:i.get(0)},r=Object(a["a"])(!0,{},o,this._positionToObject(e));return this._positionSide=this._getDisplaySide(r),r}_renderContentInitialPosition(){super._renderContentInitialPosition(),this._fitIntoSlider()}_fitIntoSlider(){var{collisionSide:e,oversize:t}=u["a"].calculate(this._$content,this._position).h,n=this._visualPosition.left,i="left"===e,o=(i?1:-1)*t;Object(l["e"])(this._$content,{left:n+o}),this._updateVisualPositionValue()}_positionToObject(e){return Object(c["o"])(e)?Object(a["a"])({},d[e]):e}}var m=n("e4d3"),g="dx-slider-tooltip-visible-on-hover",v=r["default"].inherit({_getDefaultOptions(){return Object(a["a"])(this.callBase(),{visible:!1,position:"top",closeOnOutsideClick:!1,hideTopOverlayHandler:null,hideOnParentScroll:!1,animation:null,arrowPosition:null,templatesRenderAsynchronously:!1,_fixWrapperPosition:!1,useResizeObserver:!1,showMode:"onHover",format:e=>e,value:0})},_initMarkup(){this.callBase(),this._attachToMarkup(this.option("visible")),this._toggleShowModeClass()},_renderContent(){this.callBase(),this._renderContentText()},_renderContentText(){var{value:e,format:t}=this.option(),n=m["a"].format(null!==e&&void 0!==e?e:0,t);this.$content().text(n),this._renderPosition()},_toggleShowModeClass(){var e="onHover"===this.option("showMode");this._positionController.$container.toggleClass(g,e)},_initPositionController(){this._positionController=new f(this._getPositionControllerConfig())},_attachToMarkup(e){e?this.$element().appendTo(this._positionController.$container):this.$element().detach()},_optionChanged(e){var{name:t,value:n}=e;switch(t){case"visible":this._attachToMarkup(n),this.callBase(e);break;case"showMode":this._toggleShowModeClass();break;case"format":case"value":this._renderContentText();break;default:this.callBase(e)}},updatePosition(){this._renderPosition()}}),_=v,y="dx-slider-handle",b=o["a"].inherit({_getDefaultOptions:function(){return Object(a["a"])(this.callBase(),{hoverStateEnabled:!1,value:0,tooltip:{enabled:!1,format:e=>e,position:"top",showMode:"onHover"}})},_initMarkup:function(){this.callBase(),this.$element().addClass(y),this.setAria({role:"slider",valuenow:this.option("value")})},_render:function(){this.callBase(),this._renderTooltip()},_renderTooltip:function(){var{tooltip:e,value:t}=this.option(),{position:n,format:o,enabled:r,showMode:a}=e;this._sliderTooltip=this._createComponent(Object(i["a"])("
"),_,{target:this.$element(),container:this.$element(),position:n,visible:r,showMode:a,format:o,value:t})},_clean:function(){this.callBase(),this._sliderTooltip=null},_updateTooltipOptions(e){var t,n=o["a"].getOptionsFromContainer(e);this._setWidgetOption("_sliderTooltip",[n]),null===(t=this._sliderTooltip)||void 0===t||t.option("visible",n.enabled)},_optionChanged:function(e){var{name:t,value:n}=e;switch(t){case"value":var i;null===(i=this._sliderTooltip)||void 0===i||i.option("value",n),this.setAria("valuenow",n);break;case"tooltip":this._updateTooltipOptions(e);break;default:this.callBase(e)}},updateTooltipPosition:function(){var e;null===(e=this._sliderTooltip)||void 0===e||e.updatePosition()},repaint:function(){var e;null===(e=this._sliderTooltip)||void 0===e||e.repaint()}});t["a"]=b},"0a06":function(e,t,n){"use strict";var i=n("c532"),o=n("30b5"),r=n("f6b4"),a=n("5270"),s=n("4a7b"),l=n("848b"),u=l.validators;function c(e){this.defaults=e,this.interceptors={request:new r,response:new r}}c.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=s(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(i=i&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,r=[];if(this.interceptors.response.forEach((function(e){r.push(e.fulfilled,e.rejected)})),!i){var c=[a,void 0];Array.prototype.unshift.apply(c,n),c=c.concat(r),o=Promise.resolve(e);while(c.length)o=o.then(c.shift(),c.shift());return o}var d=e;while(n.length){var h=n.shift(),p=n.shift();try{d=h(d)}catch(f){p(f);break}}try{o=a(d)}catch(f){return Promise.reject(f)}while(r.length)o=o.then(r.shift(),r.shift());return o},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,i){return this.request(s(i||{},{method:e,url:t,data:n}))}})),e.exports=c},"0aaf":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return l}));var i=n("bf95"),o=n("3a68"),r=function(){function e(){}return function(t){return e.prototype=t,new e}}(),a=function(e,t){var n,o,r=[];for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.push(n);for(r.sort((function(e,t){var n=Object(i["i"])(e),o=Object(i["i"])(t);return n&&o?e-t:n&&!o?-1:!n&&o?1:et?1:0})),o=0;o{e.changed.remove(this._refreshSizesHandler);var n=t&&t.templateDeferreds||[];p["c"].apply(this,n).done(()=>{this._refreshSizes(t)})},e.changed.add(()=>{e.changed.add(this._refreshSizesHandler)}))},_refreshSizes:function(e){var t,n=this,i=e&&e.changeType,o=e&&e.isDelayed,r=n._dataController.items();if(e&&"refresh"!==i&&"prepend"!==i&&"append"!==i){if("update"===i){var s;if(0===(null===(s=e.changeTypes)||void 0===s?void 0:s.length))return;!(r.length>1||"insert"!==e.changeTypes[0])||0===r.length&&"remove"===e.changeTypes[0]||e.needUpdateDimensions?t=n.resize():Object(a["e"])(()=>Object(a["c"])(()=>Object(a["e"])(()=>{n._setScrollerSpacing(),n._rowsView.resize()})))}}else o||(t=n.resize());i&&"updateSelection"!==i&&"updateFocusedRow"!==i&&"pageIndex"!==i&&!o&&Object(p["c"])(t).done((function(){n._setAriaRowColCount(),n.fireContentReadyAction()}))},fireContentReadyAction:function(){this.component._fireContentReadyAction()},_setAriaRowColCount:function(){var e=this.component;e.setAria({rowCount:this._dataController.totalItemsCount(),colCount:e.columnCount()},e.$element().children("."+b))},_getBestFitWidths:function(){var e,t=this._rowsView,n=this._columnHeadersView,i=t.getColumnWidths();if(null===(e=i)||void 0===e||!e.length){var o,r=n.getTableElement();n.setTableElement(null===(o=t.getTableElement())||void 0===o?void 0:o.children(".dx-header")),i=n.getColumnWidths(),n.setTableElement(r)}return i},_setVisibleWidths:function(e,t){var n=this._columnsController;n.beginUpdate(),Object(l["a"])(e,(function(e,i){var o=n.getColumnId(i);n.columnOption(o,"visibleWidth",t[e])})),n.endUpdate()},_toggleBestFitModeForView:function(e,t,n){if(e&&e.isVisible()){var i=this._rowsView.getTableElements(),r=e.getTableElements();Object(l["a"])(i,(e,i)=>{var a,s=Object(o["a"])(i),l=r.eq(e);l&&l.length&&(a=n?l.children("tbody").appendTo(s):s.children("."+t).appendTo(l),a.toggleClass(t,n),a.toggleClass(this.addWidgetPrefix("best-fit"),n))})}},_toggleBestFitMode:function(e){var t=this._rowsView.getTableElement(),n=this._rowsView.getTableElements().eq(1);t&&(t.css("tableLayout",e?"auto":"fixed"),t.children("colgroup").css("display",e?"none":""),n.toggleClass(this.addWidgetPrefix(_),!e),this._toggleBestFitModeForView(this._columnHeadersView,"dx-header",e),this._toggleBestFitModeForView(this._footerView,"dx-footer",e),this._toggleContentMinHeight(e),this._needStretch()&&(t.get(0).style.width=e?"auto":""))},_toggleContentMinHeight:function(e){if(this.option("wordWrapEnabled")){var t=this._rowsView.getScrollable(),n=this._rowsView._findContentElement();!1===(null===t||void 0===t?void 0:t.option("useNative"))&&n.css({minHeight:e?d["a"].getContentHeightLimit(g["a"]):""})}},_synchronizeColumns:function(){var e,t,n,i=this._columnsController,o=i.getVisibleColumns(),r=this.option("columnAutoWidth"),s=this._needBestFit(),h=!1,p=!1,m=[];!s&&Object(l["a"])(o,(function(e,t){if("auto"===t.width)return s=!0,!1})),Object(l["a"])(o,(function(e,t){if(t.minWidth)return h=!0,!1})),this._setVisibleWidths(o,[]),s&&(t=f["default"].getActiveElement(),n=d["a"].getSelectionRange(t),this._toggleBestFitMode(!0),e=!0);var g=this.component.$element();g&&g[0]&&this._maxWidth&&(delete this._maxWidth,g[0].style.maxWidth=""),Object(a["e"])(()=>{if(s?(m=this._getBestFitWidths(),Object(l["a"])(o,(function(e,t){var n=i.getColumnId(t);i.columnOption(n,"bestFitWidth",m[e],!0)}))):h&&(m=this._getBestFitWidths()),Object(l["a"])(o,(function(e){var t=this.width;"auto"!==t&&(Object(u["d"])(t)?m[e]=Object(u["i"])(t)||S(t)?parseFloat(t):t:r||(m[e]=void 0))})),e&&(this._toggleBestFitMode(!1),e=!1,t&&t!==f["default"].getActiveElement())){var d=Object(c["a"])(t).bottom<0;d||E(t,n)}p=this._correctColumnWidths(m,o),r&&(!function(){var e;Object(l["a"])(o,(function(t,n){"groupExpand"===n.type&&(e=m[t])})),Object(l["a"])(o,(function(t,n){"groupExpand"===n.type&&e&&(m[t]=e)}))}(),this._needStretch()&&this._processStretch(m,o)),Object(a["c"])(()=>{(s||p)&&this._setVisibleWidths(o,m)})})},_needBestFit:function(){return this.option("columnAutoWidth")},_needStretch:function(){return this._columnsController.getVisibleColumns().some(e=>"auto"===e.width&&!e.command)},_getAverageColumnsWidth:function(e){var t=T(this,e),n=e.filter((function(e){return void 0===e})).length;return t/n},_correctColumnWidths:function(e,t){var n,o=this,r=!1,a=!1,s=!1,l=o.component.$element(),c=o._hasWidth,h=function(){var i=n,l=t[i],c=e[i]===C,d=e[i],h=l.minWidth;if(h)if(void 0===d){var p=o._getAverageColumnsWidth(e);d=p}else if(w(d)){var f=O(o,i,h,e);f<0&&(d=-1)}var m=o._getRealColumnWidth(i,e.map((function(e,t){return i===t?d:e})));h&&!c&&m=0&&(e[v]="auto",s=!0,!1===c&&!r)){var _=o.option("showBorders")?Math.ceil(Object(i["i"])(p)-Object(i["f"])(p)):0;o._maxWidth=g+m+_,l.css("maxWidth",o._maxWidth)}}}return s},_processStretch:function(e,t){var n=this._rowsView.contentWidth(),i=this._getTotalWidth(e,n),o={length:0};if(e.length){Object(l["a"])(t,(function(t){(this.width||e[t]===C)&&(o[t]=!0,o.length++)}));var r=n-i,a=Math.floor(r/(e.length-o.length)),s=r-a*(e.length-o.length);if(r>=0)for(var u=0;u0&&(s<1?(e[u]+=s,s=0):(e[u]++,s--)))}},_getRealColumnWidth:function(e,t,n){var i=1,o=t[e];if(!w(o))return parseFloat(o);var r=t.reduce((e,t,n)=>w(t)?e+parseFloat(t):e,0),a=t.reduce((e,t)=>!t||t===C||w(t)?e:e+parseFloat(t),0);n=n||this._rowsView.contentWidth();var s=n-a,l=r*n/100;return a>0&&l+a>=n&&(i=l>s?s/l:1),parseFloat(o)*n*i/100},_getTotalWidth:function(e,t){for(var n=0,i=0;i{Object(a["e"])(()=>{this._setScrollerSpacingCore()})}):this._setScrollerSpacingCore()},_updateDimensionsCore:function(){var e=this,t=e._dataController,n=e.getController("editorFactory"),r=e._rowsView,s=e.component.$element(),u=this._getGroupElement(),c=Object(i["d"])(s),d=e.option("height")||s.get(0).style.height,h=!!d&&"auto"!==d,p=parseInt(s.css("maxHeight")),f=p&&c>=p,m=u&&u.scrollHeight===u.offsetHeight;e.updateSize(s),Object(a["c"])((function(){var i=e._hasHeight||!!p||h;r.hasHeight(i),f&&!m&&Object(o["a"])(u).css("height",p),t.isLoaded()?Object(a["e"])((function(){e._updateLastSizes(s),e._setScrollerSpacing(),Object(l["a"])(x,(function(t,n){var i=e.getView(n);i&&i.resize()})),n&&n.resize()})):r.setLoading(t.isLoading())}))},_updateLastSizes:function(e){this._lastWidth=Object(i["l"])(e),this._lastHeight=Object(i["d"])(e),this._devicePixelRatio=Object(s["d"])().devicePixelRatio},optionChanged:function(e){switch(e.name){case"width":case"height":this.component._renderDimensions(),this.resize();case"renderAsync":return void(e.handled=!0);default:this.callBase(e)}},init:function(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._footerView=this.getView("footerView"),this._rowsView=this.getView("rowsView")}}),k=r["a"].ViewController.inherit({_scrollChangedHandler:function(e,t,n){for(var i=0;i").addClass(this.getWidgetContainerClass());n.addClass(b),n.toggleClass(this.addWidgetPrefix(v),!!this.option("showBorders")),this.setAria("role","presentation",e),this.component.setAria({role:this._getTableRoleName(),label:h["a"].format(this._getWidgetAriaLabel())},n),this._rootElement=e||this._rootElement,t&&(this._groupElement=n,Object(s["f"])()&&this.getController("resizing").updateSize(e),n.appendTo(e)),this._renderViews(n)},update:function(){var e=this._rootElement,t=this._groupElement,n=this.getController("resizing");e&&t&&(n.resize(),this._dataController.isLoaded()&&this._resizingController.fireContentReadyAction())}}),A={defaultOptions:function(){return{showBorders:!1,renderAsync:!1}},controllers:{resizing:I,synchronizeScrolling:k},views:{gridView:D},VIEW_NAMES:x}},"0c03":function(e,t,n){"use strict";n.r(t);var i=n("3e83"),o=n("1632"),r=n("6bc7"),a=n("bf95"),s=n("b144"),l=n("4ba0"),u=n("cc07"),c=n("5b62"),d=n("c4f4"),h=n("b9af"),p=n("9e37"),f=n("085e"),m=n("026c"),g=n("3f82"),v=n("4c4d"),_=n("5274"),y=n("ac1d"),b=_["default"].getActiveElement,C="dx-dropdownbox",x="content",w=v["a"].real(),S=i["a"].inherit({_supportedKeys:function(){return Object(h["a"])({},this.callBase(),{tab:function(e){if(this.option("opened")){var t=this._getTabbableElements(),n=e.shiftKey?t.last():t.first();n&&d["a"].trigger(n,"focus"),e.preventDefault()}}})},_getTabbableElements:function(){return this._getElements().filter(l["c"])},_getElements:function(){return Object(c["a"])(this.content()).find("*")},_getDefaultOptions:function(){return Object(h["a"])(this.callBase(),{acceptCustomValue:!1,contentTemplate:x,openOnFieldClick:!0,displayValueFormatter:function(e){return Array.isArray(e)?e.join(", "):e},useHiddenSubmitElement:!0})},_getAnonymousTemplateName:function(){return x},_initTemplates:function(){this.callBase()},_initMarkup:function(){this._initDataExpressions(),this.$element().addClass(C),this.callBase()},_setSubmitValue:function(){var e=this.option("value"),t=this._shouldUseDisplayValue(e)?this._displayGetter(e):e;this._getSubmitElement().val(t)},_shouldUseDisplayValue:function(e){return"this"===this.option("valueExpr")&&Object(a["j"])(e)},_renderInputValue:function(){this._rejectValueLoading();var e=[];if(!this._dataSource)return this.callBase(e),(new u["a"]).resolve();var t=this._getCurrentValue(),n=null!==t&&void 0!==t?t:[];n=Array.isArray(n)?n:[n];var i=Object(s["b"])(n,t=>{var n=new u["a"];return this._loadItem(t).always(i=>{var o=this._displayGetter(i);Object(a["d"])(o)?e.push(o):this.option("acceptCustomValue")&&e.push(t),n.resolve()}),n}),o=this.callBase.bind(this);return u["c"].apply(this,i).always(()=>{this.option("displayValue",e),o(e.length&&e)})},_loadItem:function(e){var t=new u["a"],n=this,i=Object(r["m"])(this.option("items")||[],function(t){return this._isValueEquals(this._valueGetter(t),e)}.bind(this))[0];return void 0!==i?t.resolve(i):this._loadValue(e).done((function(e){t.resolve(e)})).fail((function(i){null!==i&&void 0!==i&&i.shouldSkipCallback||(n.option("acceptCustomValue")?t.resolve(e):t.reject())})),t.promise()},_popupElementTabHandler:function(e){if("tab"===Object(m["p"])(e)){var t=this._getTabbableElements().first().get(0),n=this._getTabbableElements().last().get(0),i=e.originalEvent.target,o=!(i!==t||!e.shift),r=!(i!==n||e.shift);(o||r)&&(this.close(),d["a"].trigger(this._input(),"focus"),o&&e.originalEvent.preventDefault())}},_renderPopup:function(e){this.callBase(),this.option("focusStateEnabled")&&g["f"].on(this.content(),null,e=>this._popupElementTabHandler(e))},_renderPopupContent:function(){if(this.option("contentTemplate")!==x){var e=this._getTemplateByOption("contentTemplate");if(e&&this.option("contentTemplate")){var t=this._popup.$content(),n={value:this._fieldRenderData(),component:this};t.empty(),e.render({container:Object(y["a"])(t),model:n})}}},_canShowVirtualKeyboard:function(){return w.mac},_isNestedElementActive:function(){var e=b();return e&&this._popup.$content().get(0).contains(e)},_shouldHideOnParentScroll:function(){return"desktop"===w.deviceType&&this._canShowVirtualKeyboard()&&this._isNestedElementActive()},_popupHiddenHandler:function(){this.callBase(),this._popupPosition=void 0},_popupPositionedHandler:function(e){this.callBase(e),this._popupPosition=e.position},_getDefaultPopupPosition:function(e){var{my:t,at:n}=this.callBase(e);return{my:t,at:n,offset:{v:-1},collision:"flipfit"}},_popupConfig:function(){var{focusStateEnabled:e}=this.option();return Object(h["a"])(this.callBase(),{tabIndex:-1,dragEnabled:!1,focusStateEnabled:e,contentTemplate:x,hideOnParentScroll:this._shouldHideOnParentScroll.bind(this),position:Object(h["a"])(this.option("popupPosition"),{of:this.$element()}),onKeyboardHandled:e=>this.option("focusStateEnabled")&&this._popupElementTabHandler(e),_ignoreFunctionValueDeprecation:!0,maxHeight:function(){var e,t=null===(e=this._popupPosition)||void 0===e?void 0:e.v.location;return Object(p["a"])(this.$element(),t)}.bind(this)})},_popupShownHandler:function(){this.callBase();var e=this._getTabbableElements().first();d["a"].trigger(e,"focus")},_setCollectionWidgetOption:r["n"],_optionChanged:function(e){switch(this._dataExpressionOptionChanged(e),e.name){case"dataSource":this._renderInputValue();break;case"displayValue":this.option("text",e.value);break;case"displayExpr":this._renderValue();break;case"contentTemplate":this._invalidate();break;default:this.callBase(e)}}}).include(o["a"]);Object(f["a"])("dxDropDownBox",S),t["default"]=S},"0c47":function(e,t,n){var i=n("da84"),o=n("d44e");o(i.JSON,"JSON",!0)},"0cb2":function(e,t,n){var i=n("e330"),o=n("7b0b"),r=Math.floor,a=i("".charAt),s=i("".replace),l=i("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,i,d,h){var p=n+e.length,f=i.length,m=c;return void 0!==d&&(d=o(d),m=u),s(h,m,(function(o,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return o;if(c>f){var h=r(c/10);return 0===h?o:h<=f?void 0===i[h-1]?a(s,1):i[h-1]+a(s,1):o}u=i[c-1]}return void 0===u?"":u}))}},"0cfb":function(e,t,n){var i=n("83ab"),o=n("d039"),r=n("cc12");e.exports=!i&&!o((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(e,t,n){var i=n("e330"),o=Error,r=i("".replace),a=function(e){return String(o(e).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(a);e.exports=function(e,t){if(l&&"string"==typeof e&&!o.prepareStackTrace)while(t--)e=r(e,s,"");return e}},"0d48":function(e,t,n){"use strict";n.d(t,"a",(function(){return U}));var i=n("b9af"),o=n("45f8"),r=n("bf7a"),a=n("edf7"),s=n("d0f3"),l=n("dc20"),u=(n("bf95"),n("90ce"),n("fd2d")),c=n("8f22"),d=n("a111"),h=n("f9d2"),p=[c["a"].down,c["a"].move].join(" "),f=35,m=[[9,12,26,12,26,14,9,14],[9,17,26,17,26,19,9,19],[9,22,26,22,26,24,9,24]],g=4,v=120,_=8,y=15,b=30,C=1,x=10,w=2,S=3,T="PNG",O=[T,"JPEG","GIF"],E=["PDF","SVG"],I="dx-export-menu",k="21cm",D="export-element-type",A="export-element-format";function P(){var e=s["c"].testFormats(O);return{unsupported:e.unsupported,supported:e.supported.concat(E)}}function M(e,t,n){if(n=n||P(),e=String(e).toUpperCase(),-1!==n.supported.indexOf(e))return e;-1!==n.unsupported.indexOf(e)&&t&&t("W2108",[e])}function R(e){return"SVG"===e?s["e"].getData:"PDF"===e?s["d"].getData:s["c"].getData}function j(e,t){var n=Object(o["d"])().document,i=n.createElement("iframe");i.onload=B(e,t),i.style.position="fixed",i.style.width="0",i.style.height="0",i.style.right="0",i.style.bottom="0",n.body.appendChild(i)}function N(e){e.style.width=k;var t=Object(h["l"])(e);return e.style.width="",t}function B(e,t){return function(){var n=this.contentWindow,i=n.document.createElement("img");n.document.body.appendChild(i);var o=N(n.document.body)/t.width;o<1&&(n.document.body.style.transform="scale(".concat(o,")"),n.document.body.style["transform-origin"]="0 0");var r=()=>{this.parentElement.removeChild(this)};i.addEventListener("load",()=>{n.focus(),n.print()}),i.addEventListener("error",r),n.addEventListener("afterprint",()=>{setTimeout(r,0)}),i.src=e}}function L(e,t,n){var i=f-v,o=f+g+C+n*b,r={rect:{width:v-2*C,height:b,x:i+C,y:o},text:{x:i+(e.rtl?v-y:y),y:o+b-_}};return"printing"===t&&(r.separator={stroke:e.button.default.borderColor,"stroke-width":C,cursor:"pointer",sharp:"v",d:"M "+i+" "+(o+b-C)+" L "+(i+v)+" "+(o+b-C)}),r}function F(e,t,n){var i={},o=n.type,a=n.format,s=L(t,o,n.itemIndex),l=Object(r["B"])(t.font);l["pointer-events"]="none";var c=e.g().attr({class:I+"-list-item"});i[D]=o,a&&(i[A]=a);var d=e.rect();d.attr(s.rect).css({cursor:"pointer","pointer-events":"all"}).data(i),d.on(u["b"]+".export",()=>d.attr({fill:t.button.hover.backgroundColor})).on(u["a"]+".export",()=>d.attr({fill:null})),d.append(c);var h=e.text(n.text).css(l).attr(s.text).append(c);return"printing"===o&&e.path(null,"line").attr(s.separator).append(c),{g:c,rect:d,resetState:()=>d.attr({fill:null}),fixPosition:()=>{var e=h.getBBox();h.move(s.text.x-e.x-(t.rtl?e.width:0))}}}function V(e,t){var n=[];return t.printingEnabled&&n.push(F(e,t,{type:"printing",text:l["a"].format("vizExport-printingButtonText"),itemIndex:n.length})),n=t.formats.reduce((n,i)=>(n.push(F(e,t,{type:"exporting",text:l["a"].getFormatter("vizExport-exportButtonText")(i),format:i,itemIndex:n.length})),n),n),n}var H=function(e){var t=this._renderer=e.renderer;this._incidentOccurred=e.incidentOccurred,this._exportTo=e.exportTo,this._print=e.print,this._shadow=t.shadowFilter("-50%","-50%","200%","200%",w,6,S),this._shadow.attr({opacity:.8}),this._group=t.g().attr({class:I,[a["a"]]:!0}).linkOn(t.root,{name:"export-menu",after:"peripheral"}),this._buttonGroup=t.g().attr({class:I+"-button"}).append(this._group),this._listGroup=t.g().attr({class:I+"-list"}).append(this._group),this._overlay=t.rect(-v+f,f+g,v,0),this._overlay.attr({"stroke-width":C,cursor:"pointer",rx:4,ry:4,filter:this._shadow.id}),this._overlay.data({"export-element-type":"list"}),this.validFormats=P(),this._subscribeEvents()};function z(e,t,n,i){(i||t.format)&&(i=M(i||t.format,e._incidentOccurred));var{width:o,height:r}=e.getSize();return{format:i||T,fileName:n||t.fileName||"file",proxyUrl:t.proxyUrl,backgroundColor:t.backgroundColor,width:o,height:r,margin:t.margin,svgToCanvas:t.svgToCanvas,forceProxy:t.forceProxy,exportingAction:e._createActionByOption("onExporting",{excludeValidators:["disabled"]}),exportedAction:e._createActionByOption("onExported",{excludeValidators:["disabled"]}),fileSavingAction:e._createActionByOption("onFileSaving",{excludeValidators:["disabled"]})}}Object(i["a"])(H.prototype,{getLayoutOptions(){if(this._hiddenDueToLayout)return{width:0,height:0,cutSide:"vertical",cutLayoutSide:"top"};var e=this._buttonGroup.getBBox();return e.cutSide="vertical",e.cutLayoutSide="top",e.height+=x,e.position={vertical:"top",horizontal:"right"},e.verticalAlignment="top",e.horizontalAlignment="right",e},shift(e,t){this._group.attr({translateY:this._group.attr("translateY")+t})},draw(e,t,n){this._group.move(e-f-w-S+n.left,Math.floor(t/2-f/2));var i=this.getLayoutOptions();return(i.width>e||i.height>t)&&this.freeSpace(),this},show(){this._group.linkAppend()},hide(){this._group.linkRemove()},setOptions(e){this._options=e,e.formats?e.formats=e.formats.reduce((e,t)=>(t=M(t,this._incidentOccurred,this.validFormats),t&&e.push(t),e),[]):e.formats=this.validFormats.supported.slice(),e.printingEnabled=void 0===e.printingEnabled||e.printingEnabled,e.enabled&&(e.formats.length||e.printingEnabled)?(this.show(),this._updateButton(),this._updateList(),this._hideList()):this.hide()},dispose(){this._unsubscribeEvents(),this._group.linkRemove().linkOff(),this._group.dispose(),this._shadow.dispose()},layoutOptions(){return this._options.enabled&&{horizontalAlignment:"right",verticalAlignment:"top",weak:!0}},measure(){this._fillSpace();var e=this._options.button.margin;return[f+e.left+e.right,f+e.top+e.bottom]},move(e){var t=this._options.button.margin;this._group.attr({translateX:Math.round(e[0])+t.left,translateY:Math.round(e[1])+t.top})},_fillSpace(){this._hiddenDueToLayout=!1,this.show()},freeSpace(){this._incidentOccurred("W2107"),this._hiddenDueToLayout=!0,this.hide()},_hideList(){this._listGroup.remove(),this._listShown=!1,this._setButtonState("default"),this._menuItems.forEach(e=>e.resetState())},_showList(){this._listGroup.append(this._group),this._listShown=!0,this._menuItems.forEach(e=>e.fixPosition())},_setButtonState(e){var t=this._options.button[e];this._button.attr({stroke:t.borderColor,fill:t.backgroundColor}),this._icon.attr({fill:t.color})},_subscribeEvents(){this._renderer.root.on(c["a"].up+".export",e=>{var t=e.target[D];t?"button"===t?this._listShown?(this._setButtonState("default"),this._hideList()):(this._setButtonState("focus"),this._showList()):"printing"===t?(this._print(),this._hideList()):"exporting"===t&&(this._exportTo(e.target[A]),this._hideList()):this._button&&this._hideList()}),this._listGroup.on(p,e=>e.stopPropagation()),this._buttonGroup.on(c["a"].enter,()=>this._setButtonState("hover")),this._buttonGroup.on(c["a"].leave,()=>this._setButtonState(this._listShown?"focus":"default")),this._buttonGroup.on(c["a"].down+".export",()=>this._setButtonState("active"))},_unsubscribeEvents(){this._renderer.root.off(".export"),this._listGroup.off(),this._buttonGroup.off()},_updateButton(){var e=this._renderer,t=this._options,n={"export-element-type":"button"};this._button||(this._button=e.rect(0,0,f,f).append(this._buttonGroup),this._button.attr({rx:4,ry:4,fill:t.button.default.backgroundColor,stroke:t.button.default.borderColor,"stroke-width":1,cursor:"pointer"}),this._button.data(n),this._icon=e.path(m).append(this._buttonGroup),this._icon.attr({fill:t.button.default.color,cursor:"pointer"}),this._icon.data(n),this._buttonGroup.setTitle(l["a"].format("vizExport-titleMenuText")))},_updateList(){var e=this._options,t=e.button.default,n=this._listGroup,i=V(this._renderer,e);this._shadow.attr({color:e.shadowColor}),this._overlay.attr({height:i.length*b+2*C,fill:t.backgroundColor,stroke:t.borderColor}),n.clear(),this._overlay.append(n),i.forEach(e=>e.g.append(n)),this._menuItems=i}});var U={name:"export",init(){this._exportMenu=new H({renderer:this._renderer,incidentOccurred:this._incidentOccurred,print:()=>this.print(),exportTo:e=>this.exportTo(void 0,e)}),this._layout.add(this._exportMenu)},dispose(){this._exportMenu.dispose()},members:{_getExportMenuOptions(){return Object(i["a"])({},this._getOption("export"),{rtl:this._getOption("rtlEnabled",!0)})},_disablePointerEvents(){var e=this._renderer.root.attr("pointer-events");return this._renderer.root.attr({"pointer-events":"none"}),e},exportTo(e,t){var n=this._exportMenu,i=z(this,this._getOption("export")||{},e,t);n&&n.hide();var o=this._disablePointerEvents(),r=Object(s["b"])(this._renderer.root.element,i,R(i.format)).fail(d["a"].error).always(()=>{this._renderer.root.attr({"pointer-events":o})});return n&&n.show(),r},print(){var e=this._exportMenu,t=z(this,this._getOption("export")||{});t.exportingAction=null,t.exportedAction=null,t.margin=0,t.format="PNG",t.forceProxy=!0,t.fileSavingAction=e=>{j("data:image/png;base64,".concat(e.data),{width:t.width,__test:t.__test}),e.cancel=!0};var n=this._disablePointerEvents();e&&e.hide();var i=Object(s["b"])(this._renderer.root.element,t,R(t.format)).fail(d["a"].error).always(()=>{this._renderer.root.attr({"pointer-events":n})});return e&&e.show(),i}},customize(e){var t=e.prototype;e.addChange({code:"EXPORT",handler(){this._exportMenu.setOptions(this._getExportMenuOptions()),this._change(["LAYOUT"])},isThemeDependent:!0,isOptionChange:!0,option:"export"}),t._optionChangesMap.onExporting="EXPORT",t._optionChangesMap.onExported="EXPORT",t._optionChangesMap.onFileSaving="EXPORT"},fontFields:["export.font"]}},"0d51":function(e,t){var n=String;e.exports=function(e){try{return n(e)}catch(t){return"Object"}}},"0d5c":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("5b62"),o=n("495c");class r extends o["a"]{_renderCore(){return Object(i["a"])()}}},"0da6":function(e,t,n){"use strict";var i=n("5b62"),o=n("c4f4"),r=n("f9d2"),a=n("6bc7"),s=n("0f2d"),l=n("ac1d"),u=n("5274"),c=n("bf95"),d=n("cc07"),h=n("b9af"),p=n("8fe2"),f=n("b144"),m=n("3fab"),g=n("dd50"),v=n("f654"),_=n("026c"),y=n("8f22"),b=n("687a"),C=n("b89e"),x=n("4ba0"),w=n("dc20"),S=n("7428"),T=n("b7ae"),O=n("e921"),E=n("7375"),I=n("8632"),k="dx-collection",D="dx-item",A="-content",P="dx-item-content-placeholder",M="dxItemData",R="dxItemIndex",j="tmpl-",N="dxItem",B="dx-item-selected",L="dx-item-response-wait",F="dx-empty-collection",V="dx-template-wrapper",H=/^([^.]+\[\d+\]\.)+([\w.]+)$/,z="item",U="up",$="down",W="left",G="right",q="pageup",K="pagedown",Y="last",X="first",Z=v["a"].inherit({_activeStateUnit:"."+D,_supportedKeys:function(){var e=function(e){var t=Object(i["a"])(this.option("focusedElement"));t.length&&this._itemClickHandler(Object(h["a"])({},e,{target:t.get(0),currentTarget:t.get(0)}))},t=function(e,t){Object(_["i"])(t)||(t.preventDefault(),t.stopPropagation(),this._moveFocus(e,t))};return Object(h["a"])(this.callBase(),{space:function(t){t.preventDefault(),e.call(this,t)},enter:e,leftArrow:t.bind(this,W),rightArrow:t.bind(this,G),upArrow:t.bind(this,U),downArrow:t.bind(this,$),pageUp:t.bind(this,U),pageDown:t.bind(this,$),home:t.bind(this,X),end:t.bind(this,Y)})},_getDefaultOptions:function(){return Object(h["a"])(this.callBase(),{selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,onFocusedItemChanged:null,noDataText:w["a"].format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,dataSource:null,_itemAttributes:{},itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedElement:null,displayExpr:void 0,disabledExpr:function(e){return e?e.disabled:void 0},visibleExpr:function(e){return e?e.visible:void 0}})},_init:function(){this._compileDisplayGetter(),this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_compileDisplayGetter:function(){var e=this.option("displayExpr");this._displayGetter=e?Object(T["a"])(this.option("displayExpr")):void 0},_initTemplates:function(){this._initItemsFromMarkup(),this._initDefaultItemTemplate(),this.callBase()},_getAnonymousTemplateName:function(){return z},_initDefaultItemTemplate:function(){var e=this._getFieldsMap();this._templateManager.addDefaultTemplates({item:new I["a"](function(t,n){Object(c["k"])(n)?this._prepareDefaultItemTemplate(n,t):(e&&Object(c["h"])(e.text)&&(n=e.text(n)),t.text(String(Object(a["g"])(n,""))))}.bind(this),this._getBindableFields(),this.option("integrationOptions.watchMethod"),e)})},_getBindableFields:function(){return["text","html"]},_getFieldsMap:function(){if(this._displayGetter)return{text:this._displayGetter}},_prepareDefaultItemTemplate:function(e,t){Object(c["d"])(e.text)&&t.text(e.text),Object(c["d"])(e.html)&&t.html(e.html)},_initItemsFromMarkup:function(){var e=Object(s["c"])(this.$element(),N);if(e.length&&!this.option("items").length){var t=e.map(e=>{var{element:t,options:n}=e,o=/\S/.test(t.innerHTML)&&!n.template;return o?n.template=this._prepareItemTemplate(t):Object(i["a"])(t).remove(),n});this.option("items",t)}},_prepareItemTemplate:function(e){var t=j+new g["a"],n=Object(i["a"])(e).detach().clone().removeAttr("data-options").addClass(V);return this._saveTemplate(t,n),t},_dataSourceOptions:function(){return{paginate:!1}},_cleanRenderedItems:function(){this._renderedItemsCount=0},_focusTarget:function(){return this.$element()},_focusInHandler:function(e){if(this.callBase.apply(this,arguments),-1!==Object(p["d"])(e.target,this._focusTarget())){var t=Object(i["a"])(this.option("focusedElement"));if(t.length)this._setFocusedItem(t);else{var n=this._getActiveItem();n.length&&this.option("focusedElement",Object(l["a"])(n))}}},_focusOutHandler:function(){this.callBase.apply(this,arguments);var e=Object(i["a"])(this.option("focusedElement"));this._updateFocusedItemState(e,!1)},_getActiveItem:function(e){var t=Object(i["a"])(this.option("focusedElement"));if(t.length)return t;var n=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0,o=this._getActiveElement(),r=o.length-1;return n<0&&(n=e?r:0),o.eq(n)},_moveFocus:function(e){var t,n=this._getAvailableItems();switch(e){case q:case U:t=this._prevItem(n);break;case K:case $:t=this._nextItem(n);break;case G:t=this.option("rtlEnabled")?this._prevItem(n):this._nextItem(n);break;case W:t=this.option("rtlEnabled")?this._nextItem(n):this._prevItem(n);break;case X:t=n.first();break;case Y:t=n.last();break;default:return!1}0!==t.length&&this.option("focusedElement",Object(l["a"])(t))},_getVisibleItems:function(e){return e=e||this._itemElements(),e.filter(":visible")},_getAvailableItems:function(e){return this._getVisibleItems(e).not(".dx-state-disabled")},_prevItem:function(e){var t=this._getActiveItem(),n=e.index(t),o=e.last(),r=Object(i["a"])(e[n-1]),a=this.option("loopItemFocus");return 0===r.length&&a&&(r=o),r},_nextItem:function(e){var t=this._getActiveItem(!0),n=e.index(t),o=e.first(),r=Object(i["a"])(e[n+1]),a=this.option("loopItemFocus");return 0===r.length&&a&&(r=o),r},_selectFocusedItem:function(e){this.selectItem(e)},_updateFocusedItemState:function(e,t,n){var o=Object(i["a"])(e);o.length&&(this._refreshActiveDescendant(),this._refreshItemId(o,n),this._toggleFocusClass(t,o)),this._updateParentActiveDescendant()},_refreshActiveDescendant:function(e){this.setAria("activedescendant",Object(c["d"])(this.option("focusedElement"))?this.getFocusedItemId():null,e)},_refreshItemId:function(e,t){!t&&this.option("focusedElement")?this.setAria("id",this.getFocusedItemId(),e):this.setAria("id",null,e)},_setFocusedItem:function(e){e&&e.length&&(this._updateFocusedItemState(e,!0),this.onFocusedItemChanged(this.getFocusedItemId()),this.option("selectOnFocus")&&this._selectFocusedItem(e))},_findItemElementByItem:function(e){var t=Object(i["a"])(),n=this;return this.itemElements().each((function(){var o=Object(i["a"])(this);if(o.data(n._itemDataKey())===e)return t=o,!1})),t},_getIndexByItem:function(e){return this.option("items").indexOf(e)},_itemOptionChanged:function(e,t,n,i){var o=this._findItemElementByItem(e);if(o.length){this.constructor.ItemClass.getInstance(o).setDataField(t,n)||this._refreshItem(o,e);var r="disabled"===t&&n;r&&this._resetItemFocus(o)}},_resetItemFocus(e){e.is(this.option("focusedElement"))&&this.option("focusedElement",null)},_refreshItem:function(e){var t=this._getItemData(e),n=e.data(this._itemIndexKey());this._renderItem(this._renderedItemsCount+n,t,null,e)},_updateParentActiveDescendant:a["n"],_optionChanged:function(e){if("items"===e.name){var t=e.fullName.match(H);if(t&&t.length){var n=t[t.length-1],o=e.fullName.replace("."+n,""),r=this.option(o);return void this._itemOptionChanged(r,n,e.value,e.previousValue)}}switch(e.name){case"items":case"_itemAttributes":case"itemTemplateProperty":case"useItemTextAsTitle":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._renderEmptyMessage();break;case"noDataText":case"encodeNoDataText":this._renderEmptyMessage();break;case"itemTemplate":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"onFocusedItemChanged":this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged");break;case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"focusedElement":this._updateFocusedItemState(e.previousValue,!1,!0),this._setFocusedItem(Object(i["a"])(e.value));break;case"displayExpr":this._compileDisplayGetter(),this._initDefaultItemTemplate(),this._invalidate();break;case"visibleExpr":case"disabledExpr":this._invalidate();break;default:this.callBase(e)}},_invalidate:function(){return this.option("focusedElement",null),this.callBase.apply(this,arguments)},_loadNextPage:function(){var e=this._dataSource;return this._expectNextPageLoading(),e.pageIndex(1+e.pageIndex()),e.load()},_expectNextPageLoading:function(){this._startIndexForAppendedItems=0},_expectLastItemLoading:function(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading:function(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler:function(e){var t=this.option("items");this._initialized&&t&&this._shouldAppendItems()?(this._renderedItemsCount=t.length,this._isLastPage()&&-1===this._startIndexForAppendedItems||(this.option().items=t.concat(e.slice(this._startIndexForAppendedItems))),this._forgetNextPageLoading(),this._refreshContent()):this.option("items",e.slice())},_refreshContent:function(){this._prepareContent(),this._renderContent()},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading(),this.option("items",this.option("items"))},_shouldAppendItems:function(){return null!=this._startIndexForAppendedItems&&this._allowDynamicItemsAppend()},_allowDynamicItemsAppend:function(){return!1},_clean:function(){this._cleanFocusState(),this._cleanItemContainer(),this._inkRipple&&delete this._inkRipple,this._resetActiveState()},_cleanItemContainer:function(){Object(i["a"])(this._itemContainer()).empty()},_dispose:function(){this.callBase(),clearTimeout(this._itemFocusTimeout)},_refresh:function(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer:function(){return this.$element()},_itemClass:function(){return D},_itemContentClass:function(){return this._itemClass()+A},_selectedItemClass:function(){return B},_itemResponseWaitClass:function(){return L},_itemSelector:function(){return"."+this._itemClass()},_itemDataKey:function(){return M},_itemIndexKey:function(){return R},_itemElements:function(){return this._itemContainer().find(this._itemSelector())},_initMarkup:function(){this.callBase(),this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged"),this.$element().addClass(k),this._prepareContent()},_prepareContent:Object(a["d"])((function(){this._renderContentImpl()})),_renderContent:function(){this._fireContentReadyAction()},_render:function(){this.callBase(),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_attachClickEvent:function(){var e=this._itemSelector(),t=Object(_["a"])(O["a"],this.NAME),n=Object(_["a"])(y["a"].down,this.NAME),r=this,a=new m["a"]((function(e){var t=e.event;r._itemPointerDownHandler(t)}));o["a"].off(this._itemContainer(),t,e),o["a"].off(this._itemContainer(),n,e),o["a"].on(this._itemContainer(),t,e,function(e){this._itemClickHandler(e)}.bind(this)),o["a"].on(this._itemContainer(),n,e,(function(e){a.execute({element:Object(i["a"])(e.target),event:e})}))},_itemClickHandler:function(e,t,n){this._itemDXEventHandler(e,"onItemClick",t,n)},_itemPointerDownHandler:function(e){this.option("focusStateEnabled")&&(this._itemFocusHandler=function(){if(clearTimeout(this._itemFocusTimeout),this._itemFocusHandler=null,!e.isDefaultPrevented()){var t=Object(i["a"])(e.target),n=t.closest(this._itemElements()),o=this._closestFocusable(t);n.length&&o&&-1!==Object(p["d"])(o.get(0),this._focusTarget())&&this.option("focusedElement",Object(l["a"])(n))}}.bind(this),this._itemFocusTimeout=setTimeout(this._forcePointerDownFocus.bind(this)))},_closestFocusable:function(e){if(e.is(x["a"]))return e;e=e.parent();while(e.length&&!u["default"].isDocument(e.get(0))){if(e.is(x["a"]))return e;e=e.parent()}},_forcePointerDownFocus:function(){this._itemFocusHandler&&this._itemFocusHandler()},_updateFocusState:function(){this.callBase.apply(this,arguments),this._forcePointerDownFocus()},_attachHoldEvent:function(){var e=this._itemContainer(),t=this._itemSelector(),n=Object(_["a"])(S["a"].name,this.NAME);o["a"].off(e,n,t),o["a"].on(e,n,t,{timeout:this._getHoldTimeout()},this._itemHoldHandler.bind(this))},_getHoldTimeout:function(){return this.option("itemHoldTimeout")},_shouldFireHoldEvent:function(){return this.hasActionSubscription("onItemHold")},_itemHoldHandler:function(e){this._shouldFireHoldEvent()?this._itemDXEventHandler(e,"onItemHold"):e.cancel=!0},_attachContextMenuEvent:function(){var e=this._itemContainer(),t=this._itemSelector(),n=Object(_["a"])(E["a"],this.NAME);o["a"].off(e,n,t),o["a"].on(e,n,t,this._itemContextMenuHandler.bind(this))},_shouldFireContextMenuEvent:function(){return this.hasActionSubscription("onItemContextMenu")},_itemContextMenuHandler:function(e){this._shouldFireContextMenuEvent()?this._itemDXEventHandler(e,"onItemContextMenu"):e.cancel=!0},_renderContentImpl:function(){var e=this.option("items")||[];this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e)},_renderItems:function(e){e.length&&Object(f["a"])(e,function(e,t){this._renderItem(this._renderedItemsCount+e,t)}.bind(this)),this._renderEmptyMessage()},_renderItem:function(e,t,n,i){var o,r=null!==(o=null===e||void 0===e?void 0:e.item)&&void 0!==o?o:e;n=n||this._itemContainer();var a=this._renderItemFrame(r,t,n,i);this._setElementData(a,t,r),a.attr(this.option("_itemAttributes")),this._attachItemClickEvent(t,a);var s=this._getItemContent(a),u=this._renderItemContent({index:r,itemData:t,container:Object(l["a"])(s),contentClass:this._itemContentClass(),defaultTemplateName:this.option("itemTemplate")}),c=this;return Object(d["c"])(u).done((function(n){c._postprocessRenderItem({itemElement:a,itemContent:n,itemData:t,itemIndex:r}),c._executeItemRenderAction(e,t,Object(l["a"])(a))})),a},_getItemContent:function(e){var t=e.find("."+P);return t.removeClass(P),t},_attachItemClickEvent:function(e,t){e&&e.onClick&&o["a"].on(t,O["a"],function(n){this._itemEventHandlerByHandler(t,e.onClick,{event:n})}.bind(this))},_renderItemContent:function(e){var t=this._getItemTemplateName(e),n=this._getTemplate(t);this._addItemContentClasses(e);var o=Object(i["a"])(this._createItemByTemplate(n,e));return o.hasClass(V)?this._renderItemContentByNode(e,o):e.container},_renderItemContentByNode:function(e,t){return Object(i["a"])(e.container).replaceWith(t),e.container=Object(l["a"])(t),this._addItemContentClasses(e),t},_addItemContentClasses:function(e){var t=[D+A,e.contentClass];Object(i["a"])(e.container).addClass(t.join(" "))},_appendItemToContainer:function(e,t,n){t.appendTo(e)},_renderItemFrame:function(e,t,n,o){var r=Object(i["a"])("
");if(new this.constructor.ItemClass(r,this._itemOptions(),t||{}),o&&o.length?o.replaceWith(r):this._appendItemToContainer.call(this,n,r,e),this.option("useItemTextAsTitle")){var a=this._displayGetter?this._displayGetter(t):t;r.attr("title",a)}return r},_itemOptions:function(){var e=this;return{watchMethod:function(){return e.option("integrationOptions.watchMethod")},owner:e,fieldGetter:function(t){var n=e.option(t+"Expr"),i=Object(T["a"])(n);return i}}},_postprocessRenderItem:a["n"],_executeItemRenderAction:function(e,t,n){this._getItemRenderAction()({itemElement:n,itemIndex:e,itemData:t})},_setElementData:function(e,t,n){e.addClass([D,this._itemClass()].join(" ")).data(this._itemDataKey(),t).data(this._itemIndexKey(),n)},_createItemRenderAction:function(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["disabled","readOnly"],category:"rendering"})},_getItemRenderAction:function(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName:function(e){var t=e.itemData,n=e.templateProperty||this.option("itemTemplateProperty"),i=t&&t[n];return i||e.defaultTemplateName},_createItemByTemplate:function(e,t){return e.render({model:t.itemData,container:t.container,index:t.index})},_emptyMessageContainer:function(){return this._itemContainer()},_renderEmptyMessage:function(e){e=e||this.option("items");var t=this.option("noDataText"),n=!t||e&&e.length||this._isDataSourceLoading();n&&this._$noData&&(this._$noData.remove(),this._$noData=null,this.setAria("label",void 0)),n||(this._$noData=this._$noData||Object(i["a"])("
").addClass("dx-empty-message"),this._$noData.appendTo(this._emptyMessageContainer()),this.option("encodeNoDataText")?this._$noData.text(t):this._$noData.html(t),this.setAria("label",t)),this.$element().toggleClass(F,!n)},_itemDXEventHandler:function(e,t,n,i){this._itemEventHandler(e.target,t,Object(h["a"])(n,{event:e}),i)},_itemEventHandler:function(e,t,n,i){var o=this._createActionByOption(t,Object(h["a"])({validatingTargetName:"itemElement"},i));return this._itemEventHandlerImpl(e,o,n)},_itemEventHandlerByHandler:function(e,t,n,i){var o=this._createAction(t,Object(h["a"])({validatingTargetName:"itemElement"},i));return this._itemEventHandlerImpl(e,o,n)},_itemEventHandlerImpl:function(e,t,n){var o=this._closestItemElement(Object(i["a"])(e)),r=Object(h["a"])({},n);return t(Object(h["a"])(n,this._extendActionArgs(o),r))},_extendActionArgs:function(e){return{itemElement:Object(l["a"])(e),itemIndex:this._itemElements().index(e),itemData:this._getItemData(e)}},_closestItemElement:function(e){return Object(i["a"])(e).closest(this._itemSelector())},_getItemData:function(e){return Object(i["a"])(e).data(this._itemDataKey())},_getSummaryItemsWidth:function(e,t){var n=0;return e&&Object(f["a"])(e,(function(e,i){n+=Object(r["i"])(i,t||!1)})),n},getFocusedItemId:function(){return this._focusedItemId||(this._focusedItemId="dx-"+new g["a"]),this._focusedItemId},itemElements:function(){return this._itemElements()},itemsContainer:function(){return this._itemContainer()}}).include(b["a"]);Z.ItemClass=C["a"];var J=Z,Q=n("b3a5"),ee=n("4401"),te=n("1d39"),ne=n("520e"),ie=n("a42e"),oe="dxItemDeleting",re=-1,ae=function(e){return e!==re},se=J.inherit({_setOptionsByReference:function(){this.callBase(),Object(h["a"])(this._optionsByReference,{selectedItem:!0})},_getDefaultOptions:function(){return Object(h["a"])(this.callBase(),{selectionMode:"none",selectionRequired:!1,selectionByClick:!0,selectedItems:[],selectedItemKeys:[],maxFilterLengthInRequest:1500,keyExpr:null,selectedIndex:re,selectedItem:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},ctor:function(e,t){this._userOptions=t||{},this.callBase(e,t)},_init:function(){this._initEditStrategy(),this.callBase(),this._initKeyGetter(),this._initSelectionModule()},_initKeyGetter:function(){this._keyGetter=Object(T["a"])(this.option("keyExpr"))},_getKeysByItems:function(e){return this._editStrategy.getKeysByItems(e)},_getItemsByKeys:function(e,t){return this._editStrategy.getItemsByKeys(e,t)},_getKeyByIndex:function(e){return this._editStrategy.getKeyByIndex(e)},_getIndexByKey:function(e){return this._editStrategy.getIndexByKey(e)},_getIndexByItemData:function(e){return this._editStrategy.getIndexByItemData(e)},_isKeySpecified:function(){return!(!this._dataSource||!this._dataSource.key())},_getCombinedFilter:function(){return this._dataSource&&this._dataSource.filter()},key:function(){return this.option("keyExpr")?this.option("keyExpr"):this._dataSource&&this._dataSource.key()},keyOf:function(e){var t=e,n=this._dataSource&&this._dataSource.store();return this.option("keyExpr")?t=this._keyGetter(e):n&&(t=n.keyOf(e)),t},_nullValueSelectionSupported:function(){return!1},_initSelectionModule:function(){var e=this,t=e._editStrategy.itemsGetter;this._selection=new ie["a"]({allowNullValue:this._nullValueSelectionSupported(),mode:this.option("selectionMode"),maxFilterLengthInRequest:this.option("maxFilterLengthInRequest"),equalByReference:!this._isKeySpecified(),onSelectionChanged:function(t){(t.addedItemKeys.length||t.removedItemKeys.length)&&(e.option("selectedItems",e._getItemsByKeys(t.selectedItemKeys,t.selectedItems)),e._updateSelectedItems(t))},filter:e._getCombinedFilter.bind(e),totalCount:function(){var t=e.option("items"),n=e._dataSource;return n&&n.totalCount()>=0?n.totalCount():e._getItemsCount(t)},key:e.key.bind(e),keyOf:e.keyOf.bind(e),load:function(t){if(e._dataSource){var n=e._dataSource.loadOptions();t.customQueryParams=n.customQueryParams,t.userData=e._dataSource._userData}var i=e._dataSource&&e._dataSource.store();return i?i.load(t).done((function(t){if(!e._disposed){var n=Object(ne["e"])(t).data;e._dataSource._applyMapFunction(n)}})):(new d["a"]).resolve(this.plainItems())},dataFields:function(){return e._dataSource&&e._dataSource.select()},plainItems:t.bind(e._editStrategy)})},_getItemsCount:function(e){return e.reduce((e,t)=>e+(t.items?this._getItemsCount(t.items):1),0)},_initEditStrategy:function(){var e=ee["a"];this._editStrategy=new e(this)},_getSelectedItemIndices:function(e){var t=this,n=[];return e=e||this._selection.getSelectedItemKeys(),t._editStrategy.beginCache(),Object(f["a"])(e,(function(e,i){var o=t._getIndexByKey(i);ae(o)&&n.push(o)})),t._editStrategy.endCache(),n},_initMarkup:function(){this._rendering=!0,this._dataSource&&this._dataSource.isLoading()||this._syncSelectionOptions().done(()=>this._normalizeSelectedItems()),this.callBase()},_render:function(){this.callBase(),this._rendering=!1},_fireContentReadyAction:function(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions:function(e){var t,n,i,o;switch(e=e||this._chooseSelectOption(),e){case"selectedIndex":t=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),Object(c["d"])(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedItem",t),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(o=this.option("selectedItems")||[],n=o.length?this._editStrategy.getIndexByItemData(o[0]):re,this.option("selectionRequired")&&!ae(n))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",o[0]),this._setOptionWithoutOptionChange("selectedIndex",n),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(o));break;case"selectedItem":if(t=this.option("selectedItem"),n=this._editStrategy.getIndexByItemData(t),this.option("selectionRequired")&&!ae(n))return this._syncSelectionOptions("selectedIndex");Object(c["d"])(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedIndex",n),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",re));break;case"selectedItemKeys":if(i=this.option("selectedItemKeys"),this.option("selectionRequired")){var r=this._getIndexByKey(i[0]);if(!ae(r))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(i)}return(new d["a"]).resolve().promise()},_chooseSelectOption:function(){var e="selectedIndex",t=function(e){var t=this.option(e),n=Object(c["d"])(t)&&t.length;return n||e in this._userOptions}.bind(this);return t("selectedItems")?e="selectedItems":t("selectedItem")?e="selectedItem":t("selectedItemKeys")&&(e="selectedItemKeys"),e},_compareKeys:function(e,t){if(e.length!==t.length)return!1;for(var n=0;n1||!e.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){var t=this._selection.getSelectedItems(),n=void 0===e[0]?t[0]:e[0];return void 0===n&&(n=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&n&&n.items&&(n.items=[n.items[0]]),this._selection.setSelection(this._getKeysByItems([n])),this._setOptionWithoutOptionChange("selectedItems",[n]),this._syncSelectionOptions("selectedItems")}this._selection.setSelection(this._getKeysByItems(e))}else{var i=this._getKeysByItems(this.option("selectedItems")),o=this._selection.getSelectedItemKeys();this._compareKeys(o,i)||this._selection.setSelection(i)}return(new d["a"]).resolve().promise()},_itemClickHandler:function(e){var t=(new d["a"]).resolve(),n=this.callBase;this._createAction(function(e){var n;t=null!==(n=this._itemSelectHandler(e.event))&&void 0!==n?n:t}.bind(this),{validatingTargetName:"itemElement"})({itemElement:Object(i["a"])(e.currentTarget),event:e}),t.always(()=>{n.apply(this,arguments)})},_itemSelectHandler:function(e){var t,n;if(this.option("selectionByClick")){var i=e.currentTarget;return this.isItemSelected(i)?this.unselectItem(e.currentTarget):n=this.selectItem(e.currentTarget),null===(t=n)||void 0===t?void 0:t.promise()}},_selectedItemElement:function(e){return this._itemElements().eq(e)},_postprocessRenderItem:function(e){if("none"!==this.option("selectionMode")){var t=Object(i["a"])(e.itemElement),n=this._editStrategy.getNormalizedIndex(t),o=this._isItemSelected(n);this._processSelectableItem(t,o)}},_processSelectableItem:function(e,t){e.toggleClass(this._selectedItemClass(),t),this._setAriaSelected(e,String(t))},_updateSelectedItems:function(e){var t=this,n=e.addedItemKeys,i=e.removedItemKeys;if(t._rendered&&(n.length||i.length)){var o=t._selectionChangePromise;if(!t._rendering){var r,a=[],s=[];t._editStrategy.beginCache();for(var l=0;lthis._normalizeSelectedItems());break;case"keyExpr":this._initKeyGetter();break;case"selectionRequired":this._normalizeSelectedItems();break;case"selectionByClick":case"onSelectionChanged":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"maxFilterLengthInRequest":break;default:this.callBase(e)}},_clearSelectedItems:function(){this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems")},_waitDeletingPrepare:function(e){if(e.data(oe))return(new d["a"]).resolve().promise();e.data(oe,!0);var t=new d["a"],n={cancel:!1},i=this._itemEventHandler(e,"onItemDeleting",n,{excludeValidators:["disabled","readOnly"]});return Object(d["c"])(i).always(function(o){var r=!i,a=!r&&"resolved"===i.state(),s=!!arguments.length,l=r||a&&!s||a&&o;Object(d["c"])(Object(d["b"])(n.cancel)).always((function(){e.data(oe,!1)})).done((function(e){l&&!e?t.resolve():t.reject()})).fail(t.reject)}.bind(this)),t.promise()},_deleteItemFromDS:function(e){if(!this._dataSource)return(new d["a"]).resolve().promise();var t=new d["a"],n=this.option("disabled"),i=this._dataSource.store();if(this.option("disabled",!0),!i.remove)throw Q["a"].Error("E1011");return i.remove(i.keyOf(this._getItemData(e))).done((function(e){void 0!==e?t.resolve():t.reject()})).fail((function(){t.reject()})),t.always(function(){this.option("disabled",n)}.bind(this)),t},_tryRefreshLastPage:function(){var e=new d["a"];return this._isLastPage()||this.option("grouped")?e.resolve():this._refreshLastPage().done((function(){e.resolve()})),e.promise()},_refreshLastPage:function(){return this._expectLastItemLoading(),this._dataSource.load()},_updateSelectionAfterDelete:function(e){var t=this._getKeyByIndex(e);this._selection.deselect([t])},_updateIndicesAfterIndex:function(e){for(var t=this._itemElements(),n=e+1;nObject(d["f"])(e),render:(e,t)=>jQuery.tmpl(e,t)}),f("jsrender",{compile:e=>(jQuery||jsrender).templates(Object(d["f"])(e)),render:(e,t)=>e.render(t)}),f("mustache",{compile:e=>Object(d["f"])(e),render:(e,t)=>Mustache.render(e,t)}),f("hogan",{compile:e=>Hogan.compile(Object(d["f"])(e)),render:(e,t)=>e.render(t)}),f("underscore",{compile:e=>_.template(Object(d["f"])(e)),render:(e,t)=>e(t)}),f("handlebars",{compile:e=>Handlebars.compile(Object(d["f"])(e)),render:(e,t)=>e(t)}),f("doT",{compile:e=>doT.template(Object(d["f"])(e)),render:(e,t)=>e(t)}),f("default",{compile:e=>Object(d["g"])(e),render:(e,t,n)=>e.clone()}),m("default");class v extends c["a"]{constructor(e){super(),this._element=e}_renderCore(e){var t=e.transclude;return t||this._compiledTemplate||(this._compiledTemplate=g().compile(this._element)),Object(s["a"])("
").append(t?this._element:g().render(this._compiledTemplate,e.model,e.index)).contents()}source(){return Object(s["a"])(this._element).clone()}}var y=n("8fe2"),b=n("6bc7"),C=n("b9af"),x=(e,t)=>{var n=Object(s["a"])(e).contents().filter("[".concat("data-options",'*="').concat(t,'"]'));return[].slice.call(n).map(e=>{var n=Object(s["a"])(e).attr("data-options")||"";return{element:e,options:Object(o["a"])().optionsParser(n)[t]}}).filter(e=>!!e.options)},w=e=>{var t=Object(y["c"])(e,e=>e.options.name);if(t[void 0])throw a["a"].Error("E0023");var n={};return Object.keys(t).forEach(e=>{var i,o=null===(i=Object(b["k"])(r["a"].current(),t[e],e=>e.options)[0])||void 0===i?void 0:i.element;o&&(n[e]=o)}),n},S=e=>{var t=e.render.bind(e);return Object(C["a"])({},e,{render(e){var n=t(e);return e&&e.onRendered&&e.onRendered(),n}})},T=e=>{var t=[];return"model"in e&&t.push(e.model),"index"in e&&t.push(e.index),t.push(e.container),t},O=e=>"string"===typeof e?Object(d["g"])(e):e,E=e=>Object(h["n"])(e)&&e[0]||e,I=e=>new v(e),k=(e,t,n,i)=>{var o=null;return i&&-1!==i.indexOf(e)||(o=t[e],!o||o instanceof c["a"]||n||(o=S(o))),o},D=(e,t,n,i,o,r)=>null==e?new u["a"]:e instanceof l["a"]?r[e.name]:e instanceof c["a"]?e:Object(h["h"])(e.render)&&!Object(h["n"])(e)?i?e:S(e):e.nodeType||Object(h["n"])(e)?t(Object(s["a"])(e)):k(e,n,i,o)||r[e]||t(e)},"0f3d":function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var i=n("c31d"),o=n("ccb5"),r=n("b9af"),a=n("bf95"),s=["x","y","canvas","offsetX","offsetY","offset"],l=Math,u=l.round,c=l.max,d=l.min,h=l.sin,p=l.cos,f=l.asin,m=l.PI,g=function(){for(var e=arguments.length,t=new Array(e),n=0;n=c&&i<=u&&ou&&o>h||i>=c&&i<=u&&o>h?90:ih||i=d&&o<=h?180:0}function w(e,t,n,i,o,r,a){var s,{width:l,height:u}=e,{arrowWidth:y,cornerRadius:b=0}=r,C=y/2,x=l/2,w=u/2,S=Math.ceil(t+x),T=Math.floor(t-x),O=Math.floor(n-w),E=Math.ceil(n+w),I=[T,O],k=[S,O],D=[S,E],A=[T,E],P=i<=T?T:S<=i?S:i,M=o<=O?O:E<=o?E:o,R=d(M+C,E),j=c(M-C,O),N=c(P-C,T);if(b=Math.min(l/2,u/2,b),I[1]+=b,k[0]-=b,D[1]-=b,A[0]+=b,!a||T<=i&&i<=S&&O<=o&&o<=E)s=g(I,v(b,1,-1),"L",k,v(b,1,1),"L",D,v(b,-1,1),"L",A,v(b,-1,-1));else if(i>S&&om/2&&(z=g("L",[N,O,i,o,S,R])),s=g(I,v(b,1,-1),z,"L",D,v(b,-1,1),"L",A,v(b,-1,-1))}else if(i>S&&o>=O&&o<=E){var U;if(j>=k[1]+b&&R<=D[1])U=g(v(b,1,1),"L",[S,j,i,o,S,R],"L",D,v(b,-1,1));else if(j=k[1]+b&&R<=D[1]){var $=k[1]+b-j,W=$/b,G=k[0]+p(W)*b,q=k[1]+(1-h(W))*b;U=g(v(b,p(W),1-h(W)),"L",[G,q,i,o,S,R],"L",D,v(b,-1,1))}else if(j=D[1]){var ne=f((k[1]+b-j)/b),ie=k[0]+b*p(ne),oe=k[1]+b*(1-h(ne)),re=f((R-D[1])/b),ae=D[0]+b*(p(re)-1),se=D[1]+b*h(re);U=g(v(b,p(ne),1-h(ne)),"L",[ie,oe,i,o,ae,se],_(b,D[0]-b,D[1]+b))}else if(j>k[1]+b&&j<=D[1]&&R>D[1]){var le=f((R-D[1])/b),ue=D[0]+b*(p(le)-1),ce=D[1]+b*h(le);U=g(v(b,1,1),"L",[S,j,i,o,ue,ce],_(b,D[0]-b,D[1]+b))}else if(j>k[1]+b&&R>D[1]){var de=f((R-D[1])/b),he=D[0]+b*(p(de)-1),pe=D[1]+b*h(de),fe=f((j-D[1])/b),me=D[0]+b*(p(fe)-1),ge=D[1]+b*h(fe);U=g(v(b,1,1),"L",D,v(b,p(fe)-1,h(fe)),"L",[me,ge,i,o,he,pe],_(b,D[0]-b,D[1]+b))}s=g(I,v(b,1,-1),"L",k,U,"L",A,v(b,-1,-1))}return g("M",s,"Z")}class S{constructor(e,t,n,i){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:(e,t)=>t.getBBox(),a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:(e,t,n,i)=>t.move(n,i);this.widget=t,this.options=e,this.root=n,this.contentTemplate=i,this.bonded=o,this.measureContent=r,this.moveContentGroup=a}draw(e){var{x:t,y:n,canvas:l={},offsetX:h,offsetY:p,offset:f=0}=e,m=Object(o["a"])(e,s),g=this.options,{x:v,y:_}=g,y=l.left,b=l.width-l.right,C=l.width-l.right-l.left,x=l.top,w=l.height-l.bottom,S=l.height-l.bottom-l.top;if((!Object(a["d"])(t)||!Object(a["d"])(n))&&(!Object(a["d"])(v)||!Object(a["d"])(_)))return!1;if(Object(a["d"])(t)&&(t0?g.width:null,E=g.height>0?g.height:null,I=()=>{var e,i=this._contentBBox=this.measureContent(this.widget,this._contentGroup),o=this._size={width:c(O,i.width)+2*g.paddingLeftRight,height:c(E,i.height)+2*g.paddingTopBottom,offset:f},r=T.offsetX,s=T.offsetY,l=2*T.blur+1,m=c(l-r,0),I=c(l+r,0),k=c(l-s,0),D=c(l+s,0);if(this.margins={lm:m,rm:I,tm:k,bm:D},Object(a["d"])(v)?(v+=h||0,Object(a["d"])(t)||(t=v)):v=Object(a["d"])(h)?t+h:Cthis.removeItemByKey(e))}removeItemByKey(e){delete this._map[e]}add(e){var t=e.guid||new s["a"];return this._map[t]=e,t}addItemsOrExtendFrom(e){e.each((e,t)=>{this._map[e]?(t.widgetInstance&&(this._map[e].widgetInstance=t.widgetInstance),this._map[e].$itemContainer=t.$itemContainer):this.add({item:t.item,widgetInstance:t.widgetInstance,guid:e,$itemContainer:t.$itemContainer})})}extendRunTimeItemInfoByKey(e,t){this._map[e]&&(this._map[e]=Object(p["a"])(this._map[e],t))}findWidgetInstanceByItem(e){return this._findWidgetInstance(t=>t===e)}findGroupOrTabLayoutManagerByPath(e){return this._findFieldByCondition(t=>{var{path:n}=t;return n===e},"layoutManager")}findKeyByPath(e){return this._findFieldByCondition(t=>{var{path:n}=t;return n===e},"guid")}findWidgetInstanceByName(e){return this._findWidgetInstance(t=>e===t.name)}findWidgetInstanceByDataField(e){return this._findWidgetInstance(t=>e===(Object(c["o"])(t)?t:t.dataField))}findItemContainerByItem(e){for(var t in this._map)if(this._map[t].item===e)return this._map[t].$itemContainer;return null}findItemIndexByItem(e){return this._findFieldByCondition(t=>{var{item:n}=t;return n===e},"itemIndex")}findPreparedItemByItem(e){return this._findFieldByCondition(t=>{var{item:n}=t;return n===e},"preparedItem")}getItems(){return this._map}each(e){Object(d["a"])(this._map,(function(t,n){e(t,n)}))}removeItemsByPathStartWith(e){var t=Object.keys(this._map),n=t.filter(t=>!!this._map[t].path&&this._map[t].path.indexOf(e,0)>-1);n.forEach(e=>this.removeItemByKey(e))}}var x=n("850f"),w=n("3921"),S=n("cc07"),T=n("2111"),O=n("facd");class E{constructor(e){this._options=e,this._itemsRunTimeInfo=this._options.itemsRunTimeInfo}findInstance(){return this._itemsRunTimeInfo.findWidgetInstanceByItem(this._options.item)}findItemContainer(){return this._itemsRunTimeInfo.findItemContainerByItem(this._options.item)}findPreparedItem(){return this._itemsRunTimeInfo.findPreparedItemByItem(this._options.item)}tryExecute(){O["a"].abstract()}}var I=n("f8cb"),k=(e,t)=>"".concat(t?"tabs":"items","[").concat(e,"]"),D=(e,t)=>Object(c["d"])(e)&&Object(c["d"])(t)?"".concat(e,".").concat(t):e||t,A=e=>e?e.replace(/\s/g,""):void 0,P=(e,t)=>!!e&&(e.dataField===t||e.name===t||A(e.title)===t||"group"===e.itemType&&A(e.caption)===t),M=(e,t)=>"".concat(e,".").concat(t),R=e=>{var t=e.split(".");return t[t.length-1].replace(/\[\d+]/,"")},j=e=>{for(var t=e.split("."),n=[...t],i=t.length-1;i>=0;i--){if(N(t[i]))return n.join(".");n.splice(i,1)}return""},N=e=>e.indexOf("tabs")>-1,B=(e,t,n)=>{var i=e.indexOf(t);if(i>-1)return k(i,n);for(var o=0;o=0)return e.option(M("items[".concat(o,"]"),t),i),!0}return!1}}class H extends E{tryExecute(){var e=this.findPreparedItem();return!(null==e||!e._prepareGroupItemTemplate||!e._renderGroupContentTemplate)&&(e._prepareGroupItemTemplate(this._options.item.template),e._renderGroupContentTemplate(),!0)}}class z extends E{tryExecute(){var e=this.findInstance();if(e){var{value:t}=this._options;return e.option("dataSource",t),!0}return!1}}class U extends E{tryExecute(){var{item:e}=this._options,t=this.findInstance(),n=t&&Object(I["c"])(t.$element()[0],"dxValidator");if(n&&e){var i=e=>"required"===e.type,o=(n.option("validationRules")||[]).some(i),r=(e.validationRules||[]).some(i);if(!o&&!r||o&&r)return n.option("validationRules",e.validationRules),!0}return!1}}class $ extends E{tryExecute(){var e=this.findItemContainer(),{previousValue:t,value:n}=this._options;return!!e&&(e.removeClass(t).addClass(n),!0)}}var W=(e,t)=>{var n;switch(e){case"editorOptions":case"buttonOptions":return new F(t);case"validationRules":return new U(t);case"cssClass":return new $(t);case"badge":case"disabled":case"icon":case"tabTemplate":case"title":return new V(Object(p["a"])(t,{optionName:e}));case"tabs":return new z(t);case"template":return"group"===(null===(n=t.item)||void 0===n?void 0:n.itemType)?new H(t):new V(Object(p["a"])(t,{optionName:e}));default:return null}},G=W,q=n("f9d2"),K=n("3a68"),Y=n("b7ae"),X=n("df29"),Z=n("6950"),J=n("c519"),Q="dx-widget",ee="dx-form",te="dx-form-group",ne="dx-form-group-caption",ie="dx-col-",oe="dx-field-item",re="dx-layout-manager-one-col",ae="dx-field-item-label-content",se="dx-layout-manager",le="dx-field-item-label",ue="dx-field-item-content",ce="dx-single-column-item-content",de="dx-root-simple-item",he="dx-form-group-content",pe="dx-field-item-has-group",fe="dx-field-item-has-tabs",me="dx-form-group-with-caption",ge="dx-field-item-tab",ve="dx-group-colcount-",_e="group-col-count",ye="dx-form-validation-summary",be="dx-form-styling-mode-underlined",Ce="simple",xe=(n("5400"),n("e5fe"),n("e713"),n("5515"),n("07ad"),n("e921")),we=n("621c"),Se=n("9570"),Te=n("b3a5"),Oe=n("6cf3"),Ee=n("ccb5"),Ie=["dxTagBox","dxRangeSlider"],ke=["dxCalendar","dxCheckBox","dxHtmlEditor","dxRadioGroup","dxRangeSlider","dxSlider","dxSwitch"];function De(e){var{$parent:t,rootElementCssClassList:n,formOrLayoutManager:i,createComponentCallback:o,useFlexLayout:r,item:a,template:l,name:u,formLabelLocation:d,requiredMessageTemplate:p,validationGroup:f,editorValue:m,canAssignUndefinedValueToEditor:g,editorValidationBoundary:v,editorStylingMode:_,showColonAfterLabel:y,managerLabelLocation:b,itemId:C,managerMarkOptions:x,labelMode:w}=e,S=Object(c["d"])(a.isRequired)?a.isRequired:!!Re(a.validationRules),T=a.itemType===Ce,O=a.helpText?"dx-"+new s["a"]:null,E=je({item:a,id:C,isRequired:S,managerMarkOptions:x,showColonAfterLabel:y,labelLocation:b,formLabelMode:w}),I=E.visible&&E.text,{location:k,labelID:D}=E,A="top"!==k&&(!!a.helpText&&!r||-1!==Object(h["d"])(a.editorType,["dxTextArea","dxRadioGroup","dxCalendar","dxHtmlEditor"])),P=Me({editorType:a.editorType,editorValue:m,defaultEditorName:a.dataField,canAssignUndefinedValueToEditor:g,externalEditorOptions:a.editorOptions,editorInputId:C,editorValidationBoundary:v,editorStylingMode:_,formLabelMode:w,labelText:E.textWithoutColon,labelMark:E.markOptions.showRequiredMark?String.fromCharCode(160)+E.markOptions.requiredMark:""}),M=E.markOptions.showOptionalMark&&!E.visible&&"hidden"!==P.labelMode&&!Object(c["d"])(a.helpText),R=M?E.markOptions.optionalMark:a.helpText;return{$parent:t,rootElementCssClassList:n,formOrLayoutManager:i,createComponentCallback:o,useFlexLayout:r,labelOptions:E,labelNeedBaselineAlign:A,labelLocation:k,needRenderLabel:I,item:a,isSimpleItem:T,isRequired:S,template:l,helpID:O,labelID:D,name:u,helpText:R,formLabelLocation:d,requiredMessageTemplate:p,validationGroup:f,editorOptions:P}}function Ae(e){var{showRequiredMark:t,requiredMark:n,showOptionalMark:i,optionalMark:o}=e;return t||i?String.fromCharCode(160)+(t?n:o):""}function Pe(e,t){var{showRequiredMark:n,requiredMark:i,showOptionalMark:o,optionalMark:r}=e;return{showRequiredMark:n&&t,requiredMark:i,showOptionalMark:o&&!t,optionalMark:r}}function Me(e){var{editorType:t,defaultEditorName:n,editorValue:i,canAssignUndefinedValueToEditor:o,externalEditorOptions:r,editorInputId:a,editorValidationBoundary:s,editorStylingMode:l,formLabelMode:u,labelText:d,labelMark:h}=e,f={};(void 0!==i||o)&&(f.value=i),-1!==Ie.indexOf(t)&&(f.value=f.value||[]);var m=null===r||void 0===r?void 0:r.labelMode;Object(c["d"])(m)||(m="outside"===u?"hidden":u);var g=(null===r||void 0===r?void 0:r.stylingMode)||l,v=Object(p["a"])(!0,f,r,{inputAttr:{id:a},validationBoundary:s,stylingMode:g,label:d,labelMode:m,labelMark:h});return r&&(v.dataSource&&(v.dataSource=r.dataSource),v.items&&(v.items=r.items)),n&&!v.name&&(v.name=n),v}function Re(e){var t;return e&&e.length&&Object(d["a"])(e,(function(e,n){if("required"===n.type)return t=!0,!1})),t}function je(e){var{item:t,id:n,isRequired:i,managerMarkOptions:o,showColonAfterLabel:r,labelLocation:a,formLabelMode:l}=e,u=-1!==Object(h["d"])(t.editorType,ke),c=Object(p["a"])({showColon:r,location:a,id:n,visible:"outside"===l||u&&"hidden"!==l,isRequired:i},t?t.label:{},{markOptions:Pe(o,i)});return-1!==Object(h["d"])(t.editorType,["dxRadioGroup","dxCheckBox","dxLookup","dxSlider","dxRangeSlider","dxSwitch","dxHtmlEditor"])&&(c.labelID="dx-label-".concat(new s["a"])),!c.text&&t.dataField&&(c.text=Object(we["b"])(t.dataField)),c.text&&(c.textWithoutColon=c.text,c.text+=c.showColon?":":""),c}var Ne=["$FIELD_ITEM_LABEL_CONTENT_CLASS"],Be="dx-layout-manager-hidden-label",Le="dx-field-item-required-mark",Fe="dx-field-item-label-location-",Ve="dx-field-item-optional-mark",He="dx-field-item-label-text";function ze(e){var{text:t,id:n,location:i,alignment:r,labelID:a=null,markOptions:s={}}=e;return!Object(c["d"])(t)||t.length<=0?null:Object(o["a"])("