@mescius/spread-sheets-shapes
Version:
SpreadJS Shape plugin
12 lines • 904 kB
JavaScript
/*!
*
* SpreadJS Library 18.1.3
*
* Copyright(c) MESCIUS inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* us.sales@mescius.com
* https://developer.mescius.com/spreadjs
*
*/
!function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@mescius/spread-sheets")):"function"==typeof define&&define.amd?define(["@mescius/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@mescius/spread-sheets")):t(GC)}(function(V){!function(){"use strict";var n,i,t;function e(t){var V,V,V=i[t];return void 0!==V||(V=i[t]={exports:{}},n[t].call(V.exports,V,V.exports,e)),V.exports}n={"./dist/plugins/shape/cameraShape.js":function(t,V,n){var i,e,r,c,s,o,n,d,a,h,u,x,y,f,l,g,A;function p(t){return!!w(t)}function w(t){var t,t,t=t.nvPicPr.cNvPicPr,t=t&&t.extLst;return(0,r.findSJSExt)(t,function(t){return!!t.cameraTool})}function v(t,V,n,i,e,r,c){var t,V,t=A.call(this,t,V,i,e,r,c)||this;return t.ttV=3,t.IeV=!1,(V=t).VtV="openUrl",V.ntV=y,V.Range=n,V.etV=!0,V.InitShapeFormat(),V.itV=0,t}function j(t){for(var V,n,i,e,r,c,V=t.eJ,n=t.Zc,i,e=0,r=V.shapes.all();e<r.length;e++)if((c=r[e]).name().toLowerCase()===n.toLowerCase())return c.ctV;return null}i=this&&this.__extends||(g=function(t,V){return(g=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,V){t.__proto__=V}:function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])}))(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}g(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),Object.defineProperty(V,"__esModule",{value:!0}),V.CameraShapeData=V.isCameraShapeNode=void 0,e=n("FloatingObject"),r=n("./dist/plugins/shape/shape.js"),c=n("Common"),s=n("./dist/plugins/shape/drawingInterface.js"),o=n("./dist/plugins/shape/ui/util.js"),n=n("Core"),d=n.util.n1,a=n.util.vo,V.isCameraShapeNode=p,h="data:image/bmp;base64,Qk1CAAAAAAAAAD4AAAAoAAAAAQAAAAEAAAABAAEAAAAAAAQAAADDDgAAww4AAAAAAAAAAAAAAAAAAP///wCAAAAA",u=e.Drawing.ARGBColor,x=c.Common.lt.ht,y=999,f=void 0,A=r.ShapeBaseData,i(v,A),Object.defineProperty(v.prototype,"Type",{get:function(){return s.ShapeType.AutoShape},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isRangeContainsImage",{get:function(){return this.IeV},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"Range",{get:function(){return this.Z5},set:function(t){this.Z5=t},enumerable:!1,configurable:!0}),v.prototype.QVV=function(t){var V,n,V=this,n=!V.AnV&&t;V.AnV=t,V.IeV=V.FeV(),n&&V.rtV===f&&0!==V.width&&0!==V.height&&(V.rtV=V.dtV())},v.prototype.dtV=function(){var t,V,n,V,t=this,V=t.AnV,n=t.eJ.zoom();if(V)return V=V.sheet.reV(V.cellRange),t.width===V.width/n&&t.height===V.height/n},v.prototype.FeV=function(){var t,V,n,i,e,r,c,s,o,d,a,t,V=this.AnV;if(V)for(i=(n=V.cellRange.row)+V.cellRange.rowCount-1,r=(e=V.cellRange.col)+V.cellRange.colCount-1,c=V.sheet,s=n;s<=i;s++)for(o=e;o<=r;o++){if((d=c.getValue(s,o))&&"SparklineExValue"===d.typeName&&d.value&&d.value.isBarcode)return!0;if((a=c.getCell(s,o)).backgroundImage())return!0}},v.prototype.InitShapeFormat=function(){var t=this;t.InitFillFormat(),t.InitLineFormat()},v.prototype.FromOOModel=function(t){var V=this;t&&t.pic&&t.pic.cellRange&&(V.Range=t.pic.cellRange),A.prototype.FromOOModel.call(this,t),V.FromCT_ShapeBase(t.pic),!1===t.isVisible&&(V._hidden=!0)},v.prototype.FromSJSOOModel=function(t,V){var n;A.prototype.FromSJSOOModel.call(this,t,V),this.FromSJSCT_ShapeBase(t)},v.prototype.ToOOModel=function(t,V){var n,i,n=this,i=A.prototype.ToOOModel.call(this,t);return i.pic=n.ToCT_ShapeBase(t,V),i},v.prototype.ToSJSOOModel=function(t,V){A.prototype.ToSJSOOModel.call(this,t,V),t.pic=this.ToSJSCT_ShapeBase(V)},v.prototype.FromCT_ShapeBase=function(t){var V,n;t&&(n=(V=this).otV=t,V.etV=!0,V.rtV=f,V.VtV=t.dblClickCommand,V.FromCT_ShapeNonVisual(n.nvPicPr),V.FromCT_ShapeStyle(n.blipFill),V.FromCT_ShapeProperties(n.spPr),V.AutoShapeType=y)},v.prototype.FromSJSCT_ShapeBase=function(t){var V,t;t&&((V=this).etV=!0,V.rtV=f,V.FromSJSCT_ShapeNonVisual(t.nvPicPr),V.atV(t.style,t),V.stV(t.spPr),V.AutoShapeType=y,t=t.lossless)&&(V.VtV=t.dblClickCommand)},v.prototype.ToCT_ShapeBase=function(t,V){var n,i,n=this;return(i=(t=!1!==t)&&n.otV||{shapeType:1}).cellRange=n.htV(null==V?void 0:V.newWorkSheetName),i.dblClickCommand=n.VtV,i.nvPicPr=n.ToCT_ShapeNonVisual(t,V),i.spPr=n.ToCT_ShapeProperties(s.ShapeUtility.ToST_ShapeType(1),i.spPr||{},0!==n.AutoShapeType,t),i.spPr.prstGeom&&(i.blipFill={},i.blipFill.stretch={},i.blipFill.stretch.fillRect={}),i},v.prototype.ToSJSCT_ShapeBase=function(t){var V,t,n,i,e,V=this,t=V.ToSJSCT_ShapeNonVisual(t),n=V.ToSJSCT_ShapeProperties(s.ShapeUtility.ToST_ShapeType(1),!0),i,e;return{nvPicPr:t,blipFill:V.ToSJSCameraShapeBlipFill(),spPr:n,lossless:{dblClickCommand:V.VtV}}},v.prototype.ToCT_ShapeNonVisual=function(t,V){var n,i,t,i,n=this,i=n.otV,t=!1!==t&&i&&i.nvPicPr||{},i=t.cNvPr||{};return t.cNvPr=n.ToCT_NonVisualDrawingProps(i,V),t.cNvPicPr=n.ToCT_NonVisualDrawingShapeProps(t.cNvPicPr||{},null==V?void 0:V.newWorkSheetName),t},v.prototype.ToSJSCT_ShapeNonVisual=function(t){var V,n,i,V=this,n,i;return{cNvPr:V.ToSJSCT_NonVisualDrawingProps(),cNvPicPr:V.ToSJSCT_NonVisualDrawingShapeProps(t)}},v.prototype.FromCT_ShapeNonVisual=function(t){var V=this;t&&(V.FromCT_NonVisualDrawingProps(t.cNvPr),V.FromCT_NonVisualDrawingShapeProps(t.cNvPicPr))},v.prototype.FromSJSCT_ShapeNonVisual=function(t){var V=this;t&&(V.FromSJSCT_NonVisualDrawingProps(t.cNvPr),V.FromSJSCT_NonVisualDrawingShapeProps(t.cNvPicPr))},v.prototype.FromCT_NonVisualDrawingShapeProps=function(t){var V,n,V=this;t&&(t.extLst&&t.extLst.ext&&(n=t.extLst.ext[0].cameraTool)&&(V.Z5=n.cellRange),V.FromAG_Locking(t&&t.picLocks))},v.prototype.FromSJSCT_NonVisualDrawingShapeProps=function(t){var V,n,n,V=this,n=t&&t.extLst,n=(0,r.findSJSExt)(n,function(t){return!!t.cameraTool});n&&(V.Z5=d(n.cameraTool.cellRange)),V.FromSJSAG_Locking(t&&t.picLocks)},v.prototype.htV=function(t){var V,n,n,i,n,V=this,n=(0,o.getRangeInfo)(V.eJ,V.Range);return x(t)||n.sheet.name()!==V.eJ.name()?V.Range:(i=(n=j(V)).getService(),n=n.id,i.setFormula(n,"range",V.Range),i.getFormula(n,"range",t))},v.prototype.ToCT_NonVisualDrawingShapeProps=function(t,V){var n,V,V,n=this,V=n.htV(V);return t.picLocks=n.ToAG_Locking(t.picLocks||{}),t.picLocks.noChangeArrowheads=!0,t.extLst={ext:[]},V={cameraTool:{cellRange:V,spid:n._spid}},t.extLst.ext.push(V),t},v.prototype.ToSJSCT_NonVisualDrawingShapeProps=function(t){var V,t,V=this,t=V.htV(t);return{picLocks:V.ToSJSAG_Locking({noChangeArrowheads:r.SJS_True}),extLst:{ext:[{uri:"{84589F7E-364E-4C9E-8A38-B11213B215E9}",cameraTool:{cellRange:a(t)}}]}}},v.prototype.ToSJSCameraShapeBlipFill=function(){var t,V,t,V;return{blip:{r_:[8],blipBlob:{blob:h}},stretch:{fillRect:{}}}},v.prototype.InitFillFormat=function(){var t=this.S0t;t.Color.ColorType=2,t.Color.RGB=u.FromRgb(255,255,255),t.PatternColor.ColorType=3,t.PatternColor.ObjectThemeColor=0},v.prototype.InitLineFormat=function(){var t=this.Line;t.Color.ColorType=2,t.Color.RGB=u.FromRgb(0,0,0),t.Weight=.75,t.PatternColor.RGB=u.FromRgb(0,0,0)},V.CameraShapeData=v},"./dist/plugins/shape/cameraShapeView.js":function(t,V,n){var i,e,c,d,a,r,s,o,h,u,x,y,f,l,g,A,p,w,v,j;function b(t,V,n,i,e,r,c){var s,o,V,s=j.call(this)||this;return s.ttV=1,o=s,V=V&&t.eeV(V)||t.eeV("Picture ",!0),o.Mf=t,o.ytV=new a.CameraShapeData(t,V,n,i||0,e||0,r||200,c||160),r===y&&c===y&&(o.ytV.rtV=!0),o.yiV=d.ResizeMode.aspect,o.ytV.noChangeAspect=!0,o.RiV=!0,x(n)||(o.tnV(),o.Fct(n,!0)),delete o.RiV,s}i=this&&this.__extends||(v=function(t,V){return(v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,V){t.__proto__=V}:function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])}))(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}v(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),Object.defineProperty(V,"__esModule",{value:!0}),V.CameraShape=void 0,e=n("FloatingObject"),c=n("./dist/plugins/shape/drawingInterface.js"),d=n("./dist/plugins/shape/shape.interface.js"),a=n("./dist/plugins/shape/cameraShape.js"),r=n("./dist/plugins/shape/ui/util.js"),s=n("./dist/plugins/shape/shapeView.js"),o=n("./dist/plugins/shape/util/viewUtil.js"),h=n("./dist/plugins/shape/shapeStyleView.js"),u=c.ShapeUtility.syncShapeOptions,x=e.Drawing.UnitHelper.IsNullOrEmpty,y=void 0,f=999,l="range",g="rotate",A="angle",p="style",j=s.ShapeBase,i(b,j),Object.defineProperty(b.prototype,"zIndex",{get:function(){var t=this;if(t.mnV)return t.mnV.zIndex(t.name())},enumerable:!1,configurable:!0}),b.prototype.tnV=function(){var t,V,n,i,V,e,r,n,e,t=this,V=t.Mf,n=V.zoom();t.VnV=!0,i=t.ytV,V=V.shapeLayers[0],(e=t.aiV)||(r=(0,o.getBuiltInShapeModelWhenInit)(i,c.AutoShapeType.rectangle,n)),n=(0,o.removeOldShapeUIWhenInitShapeUI)(t,V),u(r,i,V,e),(e=V.createCameraShape(r)).ttV=3,e.getShapeCenter(),e.hyperlink=i.ku,t.ZnV(e.id),i.ltV&&(t.flipX=!0),i.gtV&&(t.flipY=!0),(0,o.addNewShapeUIWhenInitShapeUI)(t,e,V,n),delete t.VnV},b.prototype.rsV=function(t){var V=this;t&&(t.angle&&V.rotate(t.angle),t.line&&V.j0V(t.line),t.fill)&&V.VeV(t.fill)},b.prototype.rotate=function(t){var V=this;if((0,o.noArguments)(arguments))return V.ytV.Rotation;(0,o.rotateImp)(V,t)},b.prototype.style=function(t){var V,n,i,i,V=this;if((0,o.noArguments)(arguments))return V.getStyle(!0,!1);n=V.style(),V.DT("style",t),(i=t.fill)&&((0,o.adjustTransparentColor)(i),V.VeV(i)),(i=t.line)&&((0,o.adjustTransparentColor)(i),V.j0V(i)),V.enV("style",n),V.refresh()},b.prototype.getStyle=function(t,V){var n,i,n=this,i=new h.ShapeStyle;return i.fill=n.n0V(t,V),i.line=n.ydV(t,V),delete i.textEffect,delete i.textFrame,i},b.prototype.range=function(t){var V=this,n=V.ytV;if((0,o.noArguments)(arguments))return n.Range;V.Fct(t)},b.prototype.Fct=function(t,V){var n,i,e;void 0===V&&(V=!1),(e=(i=(n=this).ytV).Range)===t&&!V||(n.DT("range",t),(0,r.setFormulaImp)(n,l,t,!0,!0),i.Range=(0,o.getFormula)(n,l)||t,this.usV("cameraRange",t,e),n.ctV&&n.ctV.JrV(),n.mtV(),n.refresh())},b.prototype.GrV=function(t){var V,n,i,V=this,n=V.ytV.Range,i=(0,r.convertCalcReferenceToRangeInfo)(t,V.Mf);V.ytV.Range=(0,o.getFormula)(V,"range"),this.usV("cameraRange",t,n),V.ytV.QVV(i),V.mtV(),V.sft&&V.sft.updateGroup(),V.ctV&&V.ctV.JrV()},b.prototype.mtV=function(){var t,V,n,i,n,e,n,t=this,V=t.ytV,n=V.AnV,i=t.Mf.zoom();V.rtV&&(n?(e=0<(n=n.sheet.reV(n.cellRange)).width?n.width/i:200,n=0<n.height?n.height/i:160,t.$l(e,n,!0)):"#REF!"===V.Range&&t.$l(0,0,!0))},b.prototype.type=function(){if((0,o.noArguments)(arguments))return f},b.prototype.postProcessShapeDataToJson=function(t,V){var n,i,e,r,c,s,o,e;function d(t,V,n){t.vmlStyle=V,t.anchor=n,t.cameraTool=!0,t.size={width:i.width,height:i.height}}i=(n=this).ctV,j.prototype.postProcessShapeDataToJson.call(this,t),e=.75*i.left,r=.75*i.top,c=.75*i.width,s=.75*i.height,o=[n.startColumn(),n.startColumnOffset(),n.startRow(),n.startRowOffset(),n.endColumn(),n.endColumnOffset(),n.endRow(),n.endRowOffset()].toString(),e="position:absolute;margin-left:".concat(e,"pt;margin-top:").concat(r,"pt;width:").concat(c,"pt;height:").concat(s,"pt;z-index:").concat(n.zIndex+1,";visibility:visible;mso-wrap-style:square;"),d(V?t:t.shapeData.pic,e,o)},b.prototype.formulaFromJSON=function(t){var V,n,i,n;j.prototype.formulaFromJSON.call(this,t),(V=this).Fct(V.ytV.Range,!0),V.JrV(),n=V.ytV.AnV,i=V.Mf,n&&n.sheet&&i&&(n=n.sheet,t)&&n!==i&&n.nre&&(n.nre(),V.afterRefSheetLazyLoaded())},b.prototype.afterRefSheetLazyLoaded=function(){this.JrV()},b.prototype.OiV=function(t){return t.nvPicPr.cNvPr},b.prototype.DiV=function(t){return t.pic},b.prototype.doubleClickCommand=function(t){var V,n,i,V=this,n=V.ytV;if((0,o.noArguments)(arguments))return n.VtV;i=n.VtV,V.DT("doubleClickCommand",t),n.VtV=t,V.usV("cameraDoubleClickCommand",t,i)},b.prototype.QiV=function(t){var V=this;return t===g?(0,o.getFormula)(V,A):t.substr(0,5)===p?(0,o.getStyleFormula)(V,t,!1):""},b.prototype.ziV=function(t,V){var n=this;t===g?n.rotate(V):t.substring(0,5)===p&&(0,o.setStyleFormula)(n,t,V,!1)},b.prototype.WiV=function(t){return new b(t)},b.prototype.sdV=function(){j.prototype.sdV.call(this),this.JrV()},b.prototype.urV=function(){j.prototype.urV.call(this),this.JrV()},b.prototype.JrV=function(){var t=this.ctV;t&&(t.cameraImageCache=null)},V.CameraShape=b},"./dist/plugins/shape/connector.js":function(t,V,n){var i,o,e,r,c,s,d,a,h,u,x,y,f,l;function g(t,V,n){var i,e,r,r;for(V=n[V]||V,i=0,e=t.length;i<e;i++){if((r=t[i]).Id===V)return r;if(r.GroupItems&&(r=g(r.GroupItems.Items,V,n)))return r}}function A(t,V){for(var n,i,e,e,n=0,i=t;n<i.length;n++){if((e=i[n]).jKe()===V)return e;if(e.GroupItems&&(e=A(e.GroupItems.Items,V)))return e}}function p(t,V,n){if(V)return V.__ID__?A(t,V.__ID__):g(t,V.id,n)}function w(t,V){this.utV=-1,this.xtV=-1,this.eJ=t,this.ytV=V}function v(t,V,n,i,e,r,c){var V,s,V=l.call(this,t,V,a(i,r),a(e,c),h(i-r),h(e-c))||this;return V.ttV=1,(s=V).ftV=2,s.ltV=r<i,s.gtV=c<e,s.AtV=new x(t,s),s.ConnectorFormat.Type=n,s.InitLineFormat(),s.PointNum=s.GetPointNumByType(n),V}i=this&&this.__extends||(f=function(t,V){return(f=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,V){t.__proto__=V}:function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])}))(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}f(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),Object.defineProperty(V,"__esModule",{value:!0}),V.ConnectorShapeData=V.ConnectorFormatData=void 0,o=n("./dist/plugins/shape/shape.js"),e=n("./dist/plugins/shape/drawingInterface.js"),r=n("./dist/plugins/shape/shapeStyle.js"),c=n("FloatingObject"),s=n("./dist/plugins/shape/geometryService/controlPointService.js"),d=n("./dist/plugins/shape/util/sheetUtil.js"),a=Math.min,h=Math.abs,u=.5*s.ADJUSTMENT_UNIT,Object.defineProperty(w.prototype,"DrawingType",{get:function(){return 3},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"BeginConnected",{get:function(){return this.wtV},set:function(t){this.wtV=t},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"BeginConnectedShape",{get:function(){var t=this.wtV;return t&&this.eJ.shapes.get(t)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"BeginConnectionSite",{get:function(){return this.utV},set:function(t){this.utV=t},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"EndConnected",{get:function(){return this.ptV},set:function(t){this.ptV=t},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"EndConnectedShape",{get:function(){var t=this.ptV;return t&&this.eJ.shapes.get(t)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"EndConnectionSite",{get:function(){return this.xtV},set:function(t){this.xtV=t},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"Type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),w.prototype.fromStartCxn=function(t,V,n){var i,e,V;t&&(e=(i=this).eJ,i.utV=t.idx,(V=p(V,t,n))?i.wtV=V.Name:e.LtV.push({target:i,beginId:t.id,beginUUID:t.__ID__,beginConnectionSite:t.idx}))},w.prototype.fromEndCxn=function(t,V,n){var i,e,V;t&&(e=(i=this).eJ,i.xtV=t.idx,(V=p(V,t,n))?i.ptV=V.Name:e.LtV.push({target:i,endId:t.id,endUUID:t.__ID__,endConnectionSite:t.idx}))},w.prototype.FromOOModel=function(t){var V,n,i,n,V=this,n=V.eJ,i=n.shapeLayers[0].model.idMaps,n=n.shapes.all().map(function(t){return t.ytV});t.stCxn&&V.fromStartCxn(t.stCxn,n,i),t.endCxn&&V.fromEndCxn(t.endCxn,n,i)},w.prototype.FromSJSOOModel=function(t){var V,n,i,e,r,t,c,s,r,r,V=this,n=V.eJ,i=n.shapeLayers[0].model.idMaps,e=n.shapes.all().map(function(t){return t.ytV}),r=t.stCxn,t=t.endCxn;r&&(c=(0,o.getAttributeValueOrDefaultOfIntType)(r.idx),s=(0,o.getAttributeValueOrDefaultOfIntType)(r.id),V.utV=c,(r=g(e,s,i))?V.wtV=r.Name:n.LtV.push({target:V,beginId:s,beginConnectionSite:c})),t&&(c=(0,o.getAttributeValueOrDefaultOfIntType)(t.idx),s=(0,o.getAttributeValueOrDefaultOfIntType)(t.id),V.xtV=c,(r=g(e,s,i))?V.ptV=r.Name:n.LtV.push({target:V,endId:s,endConnectionSite:c}))},w.prototype.toStartCxnInfo=function(t){var V,n,n,V,V=this,n=V.wtV;if(n&&(n=V.eJ.shapes.get(n)))return V={idx:V.utV},t&&t.isServer?V.__ID__=n.getId():V.id=n.ytV.Id,V},w.prototype.toEndCxnInfo=function(t){var V,n,n,V,V=this,n=V.ptV;if(n&&(n=V.eJ.shapes.get(n)))return V={idx:V.xtV},t&&t.isServer?V.__ID__=n.getId():V.id=n.ytV.Id,V},w.prototype.ToOOModel=function(t){return{stCxn:this.toStartCxnInfo(t),endCxn:this.toEndCxnInfo(t)}},w.prototype.ToSJSOOModel=function(){var t,V,n,i,e,t=this,V={},n=t.eJ.shapes,i=t.wtV;return i&&(e=n.get(i))&&(V.stCxn={idx:t.utV,id:e.ytV.Id}),(i=t.ptV)&&(e=n.get(i))&&(V.endCxn={idx:t.xtV,id:e.ytV.Id}),V},x=w,V.ConnectorFormatData=x,l=o.ShapeBaseData,i(v,l),Object.defineProperty(v.prototype,"ConnectorFormat",{get:function(){return this.AtV},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"Connector",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"Type",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"AutoShapeType",{get:function(){return this.ntV},set:function(t){this.ntV=t},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"PointNum",{get:function(){return this.ftV},set:function(t){this.ftV=t,this.rdV(t-2)},enumerable:!1,configurable:!0}),v.prototype.rdV=function(t){for(var V,n,V=[],n=0;n<t;n++)V.push([s.ADJUSTMENT_NAME_PREFIX+(n+1),u]);this.idV=V},v.prototype.ToOOModel=function(t,V){var n=l.prototype.ToOOModel.call(this,t=!1!==t);return n.cxnSp=this.ToCT_ShapeBase(t,V),n},v.prototype.ToSJSOOModel=function(t,V){l.prototype.ToSJSOOModel.call(this,t,V),t.cxnSp=this.ToSJSCT_ShapeBase()},v.prototype.FromOOModel=function(t){var V=this;l.prototype.FromOOModel.call(V,t),V.FromCT_ShapeBase(t.cxnSp),!1===t.isVisible&&(V._hidden=!0)},v.prototype.FromSJSOOModel=function(t,V){var n=this;l.prototype.FromSJSOOModel.call(this,t,V),n.FromSJSCT_ShapeBase(t)},v.prototype.ToCT_ConnectorNonVisual=function(t,V){var n,t,i,i,n=this,i=(t=(t=!1!==t)&&n.jtV&&n.jtV.nvCxnSpPr||{}).cNvPr||{};return t.cNvPr=n.ToCT_NonVisualDrawingProps(i,V),t.cNvCxnSpPr=n.ConnectorFormat.ToOOModel(V),(i=t.cNvCxnSpPr).cxnSpLocks=n.ToAG_Locking(i.cxnSpLocks||{}),t},v.prototype.ToSJSCT_ConnectorNonVisual=function(){var t,V,n,t=this,V={};return V.cNvPr=t.ToSJSCT_NonVisualDrawingProps(),V.cNvCxnSpPr=t.ConnectorFormat.ToSJSOOModel(),(n=V.cNvCxnSpPr).cxnSpLocks=t.ToSJSAG_Locking(n.cxnSpLocks||{}),V},v.prototype.FromCT_ConnectorNonVisual=function(t){var V,n,n,V=this,n=t.cNvPr;V.btV(n.name),V.Id=n.id,V.Visible=!n.hidden,V.ku=n.hlinkClick,V.UKn(n.__ID__),V.AtV.FromOOModel(t.cNvCxnSpPr),n=t.cNvCxnSpPr,V.FromAG_Locking(n&&n.cxnSpLocks)},v.prototype.FromSJSCT_ConnectorNonVisual=function(t){var V,n,n,V=this,n=t.cNvPr;V.FromSJSCT_NonVisualDrawingProps(n),V.AtV.FromSJSOOModel(t.cNvCxnSpPr),n=t.cNvCxnSpPr,V.FromSJSAG_Locking(n&&n.cxnSpLocks)},v.prototype.FromCT_ShapeBase=function(t){var V,t,n,V=this,t=V.jtV=t;V.FromCT_ConnectorNonVisual(t.nvCxnSpPr),n=t.spPr.prstGeom.prst,V.AtV.Type=e.ShapeUtility.ToConnectorType(n),V.PointNum=e.ShapeUtility.GetConnectorPointNum(n),V.FromCT_ShapeStyle.call(V,t.style),V.FromCT_ShapeProperties.call(V,t.spPr)},v.prototype.FromSJSCT_ShapeBase=function(t){var V,n,V=this;V.FromSJSCT_ConnectorNonVisual(t.nvCxnSpPr),n=e.ST_ShapeType[t.spPr.prstGeom.prst],V.AtV.Type=e.ShapeUtility.ToConnectorType(n),V.PointNum=e.ShapeUtility.GetConnectorPointNum(n),V.atV(t.style,t),V.stV(t.spPr)},v.prototype.ToCT_ShapeBase=function(t,V){var n,i,V,n=this;return(i=(t=!1!==t)&&n.jtV||{shapeType:4}).nvCxnSpPr=n.ToCT_ConnectorNonVisual(t,V),V=i.spPr||{},i.spPr=n.ToCT_ShapeProperties(e.ShapeUtility.ToConnectorST_ShapeType(n.ConnectorFormat.Type,n.PointNum),V,!0,t),n.CorrectCT_Transform2D(i.spPr.xfrm),i.style=n.ToCT_ShapeStyle(t),i},v.prototype.ToSJSCT_ShapeBase=function(){var t,V,t=this,V={};return V.nvCxnSpPr=t.ToSJSCT_ConnectorNonVisual(),V.spPr=t.ToSJSCT_ShapeProperties(e.ShapeUtility.ToConnectorST_ShapeType(t.ConnectorFormat.Type,t.PointNum),!0),V.style=t.ToSJSCT_ShapeStyle(),V},v.prototype.CorrectCT_Transform2D=function(t){t.flipH=this.ltV,t.flipV=this.gtV},v.prototype.GetPointNumByType=function(t){return 2===t||1===t?3:1},v.prototype.InitLineFormat=function(){var t=this.Line;t.Color.ObjectThemeColor=4,t.Weight=.5,t.PatternColor.RGB=c.Drawing.ARGBColor.FromRgb(255,255,255)},v.prototype.CreateDefaultShapeStyle=function(){return new r.ShapeStyleData(this,0,1,0,1)},v.prototype.mtV=function(){var t,V,V,t=this,V=t.eJ;t.height=(0,d.getY)(V,t.bottomAnchorRow,t.bottomAnchorRowOffset)-t.top,V=V.options.rightToLeft?(0,d.getX)(V,t.leftAnchorCol,t.leftAnchorColOffset):(0,d.getX)(V,t.rightAnchorCol,t.rightAnchorColOffset),t.width=V-t.left},V.ConnectorShapeData=v},"./dist/plugins/shape/connectorView.js":function(t,V,n){var i,e,d,r,c,a,h,s,L,o,n,u,x,y,m,f,l,g,C,A,p,w;function v(t,V,n,i,e,r,c,s,o,d){var t,V,t=(0,L.flipPoint)(t,V,n,i,e,r,c,s),V=(0,L.rotatePoint)(t,o,d);return{x:(0,L.fixNumber)(V.x),y:(0,L.fixNumber)(V.y)}}function j(t){return t.map(function(t,V){return["adj"+(V+1),(0,r.convertAdjustmentValueToExcelUnit)(t,f,!0)]})}function b(t,V,n){var i,e,e,i,r,c,s,o,r=t.ytV,c={rotationWithoutParent:r.RotationWithoutParent,isFlipH:r.ltV,isFlipV:r.gtV,adjustValues:r.AdjustValues},s=t.Mf,o=s.THr({type:"updateShapeTransform",sheet:s,shape:t});null!=(e=null==(i=s.parent)?void 0:i.suspendOp)&&e.call(i),r.left=V.left/n,r.top=V.top/n,r.width=V.width/n,r.height=V.height/n,r.L0t=V.rot,r.ltV=V.flipH,r.gtV=V.flipV,r.ynV(),r.fnV(),null!=(i=null==(e=s.parent)?void 0:e.resumeOp)&&i.call(e),s.$Dr({type:"updateShapeTransform",sheet:s,shape:t},o),r.AdjustValues=j(V.adjs),t.usV("adjustments",d.ShapeUtility.convertToExcelAdjustValues(r.AdjustValues),d.ShapeUtility.convertToExcelAdjustValues(c.adjustValues))}function R(t){return(2===t.length?M:I)(t)}function I(t){var V,n,i,e,r,c,s,o,d,o,a,h,u,x,y,o,d,f,l,g,A,p,w,v,j,b,V=t[0],n=t.length,i=t[n-1],e=V.x,r=V.y,c=i.x,s=i.y,o=t[1],d=o.x,o=o.y,a=c-e,h=s-r,u=0,y={x:(e+c)/2,y:(r+s)/2};for((0,L.fixNumber)(e,5)===(0,L.fixNumber)(d,5)?(u=90,x=Math.PI/2):(0,L.fixNumber)(r,5)!==(0,L.fixNumber)(o,5)&&(u=180*(x=Math.atan2(o-r,d-e))/Math.PI,x<0)&&(x+=2*Math.PI,u+=360),u&&(x=-x,e=(V=(t=t.map(function(t){return(0,L.rotatePoint)(t,y,x)}))[0]).x,r=V.y,a=(c=(i=t[n-1]).x)-e,h=(s=i.y)-r),f=(o=a<0)?-1:1,l=(d=h<0)?-1:1,g=m(a),A=m(h),g<C&&(g=C),A<C&&(A=C),p=[],w=0;w<n-3;w++)v=t[w+1],p.push(w%2?(v.y-r)/A*l:(v.x-e)/g*f);return{rot:u,left:j=y.x-g/2,top:b=y.y-A/2,width:g,height:A,flipH:o,flipV:d,adjs:p}}function M(t){var V,t,n,i,e,r,c,s,V=t[0],t=t[1],n,i,e,r,c,s;return{rot:0,left:y(V.x,t.x),top:y(V.y,t.y),width:m(t.x-V.x),height:m(t.y-V.y),flipH:V.x>t.x,flipV:V.y>t.y,adjs:[]}}function _(t,V,n,i,e,r,c){var s,o,V,s=w.call(this)||this,o=s;return s.ttV=4,V=V&&t.eeV(V)||t.eeV("ConnectorShape ",!0),o.Mf=t,o.ytV=new a.ConnectorShapeData(t,V,n,i,e,r,c),o.RiV=!0,n!==f&&o.tnV(),delete o.RiV,s}i=this&&this.__extends||(p=function(t,V){return(p=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,V){t.__proto__=V}:function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])}))(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}p(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),Object.defineProperty(V,"__esModule",{value:!0}),V.ConnectorShape=V.getConnectorProperties=V.syncShapeData=void 0,e=n("Common"),d=n("./dist/plugins/shape/drawingInterface.js"),r=n("./dist/plugins/shape/shape.js"),c=n("./dist/plugins/shape/ui/lines.js"),a=n("./dist/plugins/shape/connector.js"),h=n("./dist/plugins/shape/geometryService/controlPointService.js"),s=n("./dist/plugins/shape/shapeView.js"),L=n("./dist/plugins/shape/util/viewUtil.js"),o=n("./dist/plugins/shape/shapeStyleView.js"),n=e.Common.lt,u=n.ht,x=d.ShapeUtility.syncShapeOptions,y=Math.min,m=Math.abs,f=void 0,l={color:"color",linestyle:"lineStyle",width:"width",captype:"capType",jointype:"joinType",transparency:"transparency",compoundtype:"compoundType"},g=["color","linestyle","width","captype","jointype","transparency","compoundtype"],V.syncShapeData=b,C=4/3,V.getConnectorProperties=R,w=s.ShapeBase,i(_,w),_.prototype.type=function(){if((0,L.noArguments)(arguments))return this.ytV.ConnectorFormat.Type},_.prototype.H0V=function(t){var V,n,V,i,e,t,V=this,n=V.ytV.Line;if((0,L.noArguments)(arguments))return{style:n.BeginArrowheadStyle,width:n.BeginArrowheadWidth,length:n.BeginArrowheadLength};u(t)||(V=V.ctV.options.endPoints.beginArrow,i=t.style,e=t.width,t=t.length,u(i)||(n.BeginArrowheadStyle=i,V.type=i),u(e)||(n.BeginArrowheadWidth=e,V.widthType=e),u(t))||(n.BeginArrowheadLength=t,V.lengthType=t)},_.prototype.Q0V=function(t){var V,n,V,i,e,t,V=this,n=V.ytV.Line;if((0,L.noArguments)(arguments))return{style:n.EndArrowheadStyle,width:n.EndArrowheadWidth,length:n.EndArrowheadLength};u(t)||(V=V.ctV.options.endPoints.endArrow,i=t.style,e=t.width,t=t.length,u(i)||(n.EndArrowheadStyle=i,V.type=i),u(e)||(n.EndArrowheadWidth=e,V.widthType=e),u(t))||(n.EndArrowheadLength=t,V.lengthType=t)},_.prototype.tnV=function(t){var V,n,i,e,r,c,s,o,d,a,e,V=this,n=V.Mf,i=V.ytV;V.VnV=!0,e=i.ConnectorFormat.Type,r=V.z0V(),s=V.KVV(),o=n.shapeLayers[0],0===e?d="Line":1!==e&&2!==e||(d="ZipLine"),a=n.zoom(),s=s.map(function(t){return{x:t.x*a,y:t.y*a}}),d&&(x(e={points:s,options:r},i,o),(c=o.createLine(d,e)).getShapeCenter(),c.hyperlink=i.ku,(c.JVV=V).ZnV(c.id)),V.ctV=c,t||(0,L.syncConnectors)([V.startConnector(),V.endConnector()],V),V.gnV(),delete V.VnV},_.prototype.z0V=function(){var t=this,V=t.H0V(),n=t.Q0V();return{stroke:{type:1,color:t.ydV(!1,!1).color,width:1},endPoints:{beginArrow:{type:V.style,widthType:V.width,lengthType:V.length},endArrow:{type:n.style,widthType:n.width,lengthType:n.length}}}},_.prototype.getPoints=function(t){return this.KVV(t)},_.prototype.KVV=function(t){var V,n,t,i,e,r,c,s,o,d,a,V=this,n=V.Btn;return n&&!t||(i=(t=V.ytV).left||0,e=t.top||0,r=t.width||0,c=t.height||0,s=t.gtV,o=t.ltV,d=t.ConnectorFormat.Type,a=t.Rotation,0===d?n=V.Btn=V.G0V(e,i,r,c,s,o,a):1!==d&&2!==d||(n=V.Btn=V.J0V(e,i,r,c,s,o,a,t.AdjustValues))),n},_.prototype.G0V=function(t,V,n,i,e,r,c){var s,o,d,e,r,V,a,h,e=e&&r?(s=V+n,o=t+i,d=V,t):e?(o=t+i,d=(s=V)+n,t):(d=r?(s=V+n,V):(s=V)+n,(o=t)+i),r={x:V+n/2,y:t+i/2},V=c/180*Math.PI,a,h;return[(0,L.rotatePoint)({x:s,y:o},r,V),(0,L.rotatePoint)({x:d,y:e},r,V)]},_.prototype.W0V=function(t,V,n,i,e,r,c,s){var o,d,a,o,d,a;return[v(0,0,e,r,V,t,n,i,s,c),v(n,0,e,r,V,t,n,i,s,c),v(n,i,e,r,V,t,n,i,s,c)]},_.prototype.K0V=function(t,V,n,i,e,r,c,s,o){var d,a,h,u;return o=o||[.5],[d=v(0,0,e,r,V,t,n,i,s,c),a=v(n*o[0],0,e,r,V,t,n,i,s,c),h=v(n*o[0],i,e,r,V,t,n,i,s,c),u=v(n,i,e,r,V,t,n,i,s,c)]},_.prototype.$0V=function(t,V,n,i,e,r,c,s,o){var d,a,h,u,x,d,a,h,u,x;return[v(0,0,e,r,V,t,n,i,s,c),v(n*o[0],0,e,r,V,t,n,i,s,c),v(n*o[0],i*o[1],e,r,V,t,n,i,s,c),v(n,i*o[1],e,r,V,t,n,i,s,c),v(n,i,e,r,V,t,n,i,s,c)]},_.prototype.tcV=function(t,V,n,i,e,r,c,s,o){var d,a,h,u,x,y,d,a,h,u,x,y;return[v(0,0,e,r,V,t,n,i,s,c),v(n*o[0],0,e,r,V,t,n,i,s,c),v(n*o[0],i*o[1],e,r,V,t,n,i,s,c),v(n*o[2],i*o[1],e,r,V,t,n,i,s,c),v(n*o[2],i,e,r,V,t,n,i,s,c),v(n,i,e,r,V,t,n,i,s,c)]},_.prototype.VcV=function(t,V,n,i,e,r,c,s,o){var d;switch(this.ytV.PointNum){case 2:d=this.W0V;break;case 3:d=this.K0V;break;case 4:d=this.$0V;break;case 5:d=this.tcV}return d&&d(t,V,n,i,e,r,c,s,o)},_.prototype.J0V=function(t,V,n,i,e,r,c,s){var o,c,d,o={x:V+n/2,y:t+i/2},c=c/180*Math.PI;return s&&0<s.length&&(d=s.map(function(t){return t[1]/h.ADJUSTMENT_UNIT})),this.VcV(t,V,n,i,e,r,c,o,d)},_.prototype.ncV=function(t){for(var V,n,i,V=[],n=0,i=(t=t===f?this.ctV.getPoints():t).length;n<i;n++)V.push({x:t[n].x,y:t[n].y});return V},_.prototype.ecV=function(){var n,t,V,n=[],t,V=R(this.ncV()).adjs;return V&&V.length&&V.forEach(function(t,V){n.push(["adj"+(V+1),t])}),n},_.prototype.OiV=function(t){return t.nvCxnSpPr.cNvPr},_.prototype.DiV=function(t){return t.cxnSp},_.prototype.preProcessShapeDataToJson=function(t,V){var t,V,n,n;w.prototype.preProcessShapeDataToJson.call(this,t,V),(t=this).ytV.PointNum=t.Btn.length-1,V=R(t.ncV()),n=t.ctV.angle,isNaN(n)||(V.rot=V.rot+n),n=t.Mf.zoom(),b(t,V,n)},_.prototype.nnV=function(t){var V,n,i,i,e,t,V=this,n=V.ytV,i=V.ncV(V.Btn);V.DT("points",{points:t},{points:i}),i=V.Mf.zoom(),e=V.AsV("presetGeometry"),V.Btn=t,V.ctV.setPoints(V.Btn,i),n.PointNum=V.Btn.length-1,V.usV("presetGeometry",f,f,e),t=R(V.ncV()),b(V,t,i)},_.prototype.adjustments=function(t){var V,n,n,i,e,r,c,n,i,i,V=this;if((0,L.noArguments)(arguments))return(n=V.ecV())&&0<n.length?n.map(function(t){return t[1]}):[];t&&0<t.length&&2<V.Btn.length&&(n=V.x(),i=V.y(),n={x:n+(e=V.width())/2,y:i+(r=V.height())/2},i=(c=V.ytV.Rotation)/180*Math.PI,i=V.VcV(V.y(),V.x(),V.width(),V.height(),V.ytV.gtV,V.ytV.ltV,i,n,t),V.nnV(i),V.refresh())},_.prototype.QiV=function(t){var V,t,V,n,t,i,V,V=this;return"style"===t.substr(0,5)&&3===(t=t.split(".")).length&&(V=V.style(),n=t[1],t=t[2],"line"===n)&&-1<g.indexOf(t)&&(V=V[n][i=l[t]],(0,L.isFormula)(V))?V:""},_.prototype.ziV=function(t,V){var n,t,i,e,t,r,n=this;"style"===t.substr(0,5)&&3===(t=t.split(".")).length&&(i=n.style(),e=t[1],t=t[2],"line"===e&&-1<g.indexOf(t)&&(i[e][r=l[t]]=V),n.style(i))},_.prototype.style=function(t){var V,n,t,i,e,e,e,V=this;if((0,L.noArguments)(arguments))return V.getStyle(!0,!1);n=V.style(),V.DT("style",t,n),(t=t.line)&&(i=V.AsV("line",V.ytV.Line),e=t.color,u(e)||V.j0V({color:e,lineStyle:t.lineStyle,width:t.width,capType:t.capType,joinType:t.joinType,compoundType:t.compoundType,transparency:t.transparency}),e=t.beginArrowheadStyle,u(e)||V.H0V({style:e,width:t.beginArrowheadWidth,length:t.beginArrowheadLength}),e=t.endArrowheadStyle,u(e)||V.Q0V({style:e,width:t.endArrowheadWidth,length:t.endArrowheadLength}),V.usV("line",V.ytV.Line,void 0,i)),V.enV("style",n),V.refresh()},_.prototype.getStyle=function(t,V){var n,i,t,V,V,n=this,i=new o.ShapeStyle,t=i.line=n.ydV(t,V),V=n.H0V();return t.beginArrowheadStyle=V.style,t.beginArrowheadWidth=V.width,t.beginArrowheadLength=V.length,V=n.Q0V(),t.endArrowheadStyle=V.style,t.endArrowheadWidth=V.width,t.endArrowheadLength=V.length,delete i.fill,delete i.textEffect,delete i.textFrame,i},_.prototype.icV=function(t){var V,n,i,t,V=this,n=V.ctV;!V.ignoreLayoutConnection&&t&&t.length&&V.Mf&&(V.Mf.QnV(n),i=V.Mf.zoom(),t=n.getPoints().map(function(t){return{x:t.x/i,y:t.y/i}}),V.nnV(t)),V.refresh()},_.prototype.startConnector=function(t,V){var n,i,e,r,c,s,o,d,t,t,V,n=this,i=n.ytV.ConnectorFormat;if((0,L.noArguments)(arguments))return i.BeginConnected?{name:i.BeginConnected,index:i.BeginConnectionSite,shape:i.BeginConnectedShape}:null;e=n.ctV,r=n.startConnector(),n.DT("startConnector",{name:t?t.name:"",index:t?t.index:-1},r?{name:r.name,index:r.index}:null),s=n.AsV("startConnector",i),i.BeginConnected=t?t.name:"",i.BeginConnectionSite=t?t.index:-1,t&&(d=t.index,t=t.name,t=n.Mf.shapes.get(t))&&(o={id:t.ctV.id,index:d},V||((V=(c=t.ctV.getActualConnectorPoints())[d])?e.moveStartPoint(V.x,V.y):o=null)),e.updateStartConnector(o),n.enV("startConnector",r),n.icV(c),n.usV("startConnector",i,void 0,s)},_.prototype.endConnector=function(t,V){var n,i,e,r,c,s,o,d,t,t,V,n=this,i=n.ytV.ConnectorFormat;if((0,L.noArguments)(arguments))return i.EndConnected?{name:i.EndConnected,index:i.EndConnectionSite,shape:i.EndConnectedShape}:null;e=n.ctV,r=n.endConnector(),n.DT("endConnector",{name:i.EndConnected,index:i.EndConnectionSite},r?{name:r.name,index:r.index}:null),s=n.AsV("endConnector",i),i.EndConnected=t?t.name:"",i.EndConnectionSite=t?t.index:-1,t&&(d=t.index,t=t.name,t=n.Mf.shapes.get(t))&&(o={id:t.ctV.id,index:d},V||((V=(c=t.ctV.getActualConnectorPoints())[d])?e.moveEndPoint(V.x,V.y):o=null)),e.updateEndConnector(o),n.enV("endConnector",r),n.icV(c),n.usV("endConnector",i,void 0,s)},_.prototype.rsV=function(t,V){var n;t&&t.line&&this.j0V(t.line)},_.prototype.KiV=function(t){var V,n,V=this,n=V.ctV;!1!==(null==t?void 0:t.layoutConnectionLine)&&n instanceof c.ZipLine&&V.Mf.QnV(n)},_.prototype.t0V=function(t,V){var n=this;switch(t){case"startConnector":case"endConnector":n[t](V);break;case"points":n.nnV(V.points)}},_.prototype.WiV=function(t){return new _(t)},V.ConnectorShape=_},"./dist/plugins/shape/drawingInterface.js":function(O,h,t){var n,V,i,i,o,i,s,d,r,u,e,x,y,c,a,f,l,T,N,P,D,U,q,k,B,Z,H,z,Q,G,J,W,K,$,g,A,p,w,tt,Vt,t,t,t,t,t,t,t,t,t,t,t,V,t,V,t,V,t,V,t,V,t,V;function v(t){return C(t,!0,e,!0)}function nt(t){return+t.split(" ")[1]}function it(t){return[t.name,nt(t.fmla)]}function et(t){return{name:t[0],fmla:"val "+Y(t[1])}}function rt(t){return{horz:t<3,rotate:[270,90][2-t]||0}}function j(t,V){return r(t)?V:t}function ct(t){var V,V,n,n,t,i,e,r,c,s,o,d,o,a,V=t.O0t[0],V=V?V.Algn:h.ST_TextAlignType.l,n=t.Inset,n={rIns:j(n.right,y),lIns:j(n.left,y),tIns:j(n.top,x),bIns:j(n.bottom,x),anchorCtr:j(t.anchorCtr,!1),anchor:j(t.anchor,h.ST_TextAnchoringType.t),vert:j(t.vert,h.ST_TextVerticalType.horz),wrap:j(t.wrap,h.ST_TextWrappingType.square),horzOverflow:j(t.horzOverflow,h.ST_TextHorzOverflowType.overflow),vertOverflow:j(t.vertOverflow,h.ST_TextVertOverflowType.overflow)},t=0,i=0,e=!1,r=!0,c=0,s=!0,d=!1;return n&&0<Object.keys(n).length&&(s=(o=rt(n.vert||0)).horz,c=o.rotate,o=[n.lIns,n.rIns,n.tIns,n.bIns].map(u),e=!n.horzOverflow,r=0!==n.wrap,a=n.anchor||0,d=!!n.anchorCtr,2<V&&(V=0),i=a=2<a?1:a,t=s&&90!==c?V:2-V),{center:d,hAlign:t,vAlign:i,overflow:e,wrap:r,horz:s,angle:c,margins:o}}function b(t){return{fontSize:t.Size,fontName:t.Name,bold:!!t.Bold,italic:!!t.Italic,color:v(t)}}function L(t){var t,V,t=t.O0t[0],V;return b((t.j0t&&t.j0t[0]||t).Font)}function m(t){var V=[];return t.italic&&V.push("italic"),t.bold&&V.push("bold"),V.push(t.fontSize+"px"),V.push(t.fontName),V.join(" ")}function st(t){var V=t.horz,t=t.angle;return V?t?"rotate"+t:"horizontal":"vertical"}function C(t,V,n,i,e){var r,c,t,n;if(void 0===e&&(e=!1),c="transparent",r=t&&t.Color){if(r.ColorType===h.SolidColorType.None)return n?"":c;if(r.ColorType===h.SolidColorType.Theme&&e){for(;!r.HasOwnColor()&&r.sft;)r=r.sft;return s[r.GetColorData().Value]}(t=r.NoTransformedRGB)&&((n=r.GetColorData()).ApplyBrightness=!!i,t=d(t,n),c=V?h.Color.fromARGBColor(t).toRgbaString():h.Color.fromARGBColor(t).toRgbString())}return c}function R(t){var V,n,V=t&&t.Color&&t.Color.Transparency;return isNaN(V)&&(V=0),{color:n=C(t,!1,!0,!0),transparency:V}}function ot(t){var V,t,V=t.Color,t={color:C(t,!1,!0,!1,!0)};return 0!==V.Brightness&&(t.brightness=V.Brightness),0!==V.TintAndShade&&(t.tint=V.TintAndShade),0!==V.Shade&&(t.shade=V.Shade),1!==V.SatMod&&(t.satMod=V.SatMod),t}function dt(t,V){var n;return(w[p[t]]||[]).map(function(t){return t*V})}function at(t){return A[t]}function I(t){return g[t]}function M(t){var V=h.FillType.Solid;return t.Type===h.FillType.Gradient?V=h.FillType.Gradient:t.Type===h.FillType.Picture&&(V=h.FillType.Picture),V}function ht(t){var V=1;return V=0===t.Color.ColorType?0:V}function _(t){return!0===t.u0t?a.linear:t.Bft===h.ST_PathShadeType.circle?a.radial:void 0}function E(t){return t.u0t?t.GradientAngle:void 0}function ut(t){var V=_(t);return V===a.linear?yt(t):V===a.radial?ft(t):void 0}function xt(t){for(var V,n,i,e,V=t.GradientStops,n=[],i=0;i<V.Count;i++)e=V.Item(i),n.push({color:C(e,!1,!0,!1),position:e.Position,transparency:e.Transparency,brightness:e.Color.Brightness});return n}function yt(t){var V=E(t);if(t.Rft&&V%45==0)return V}function ft(t){return t.GradientStyle===h.GradientStyle.GradientFromCenter?l.fromCenter:t.GradientStyle===h.GradientStyle.GradientFromCorner?t.GradientVariant:void 0}function lt(t){var t,V,t=t.GradientStyle;return t===h.GradientStyle.GradientTopSpotlight?V=l.fromTopLeft:t===h.GradientStyle.GradientBottomSpotlight&&(V=l.fromBottomLeft),V}function S(t){var V,t,V=t&&t.Fill;if(V)return t=R(V=V._type===h.FillType.Group&&t.XtV?t.XtV.Fill:V),{type:M(V),solid:{type:ht(V),color:t.color,transparency:t.transparency},gradient:{type:_(V),angle:E(V),direction:ut(V),stops:xt(V)},picture:n({src:V.PictureFormat.PicSrc,transparency:V.PictureFormat.Transparency,tilePictureAsTexture:V.PictureFormat.PictureFormatType===h.PictureFormatType.TextureFill,offsetLeft:V.PictureFormat.Stretch.left,offsetRight:V.PictureFormat.Stretch.right,offsetTop:V.PictureFormat.Stretch.top,offsetBottom:V.PictureFormat.Stretch.bottom},V.PictureFormat.Tile)}}function F(t,V){var n=S(V);n.type===h.FillType.Gradient?(t.fill=n.gradient,r(t.fill.direction)&&(t.fill.direction=lt(V.Fill))):n.type===h.FillType.Picture?t.fill=n.picture:t.fill=n.solid}function X(){}function Y(t){return parseInt(t,10)}n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var V,n,i,e,n=1,i=arguments.length;n<i;n++)for(e in V=arguments[n])Object.prototype.hasOwnProperty.call(V,e)&&(t[e]=V[e]);return t}).apply(this,arguments)},Object.defineProperty(h,"__esModule",{value:!0}),h.ST_FontCollectionIndex=h.ConnectorType=h.ST_CompoundLine=h.ST_PresetLineDashVal=h.ST_TextHorzOverflowType=h.ST_TextVertOverflowType=h.ST_TextWrappingType=h.ST_TextVerticalType=h.ST_TextAnchoringType=h.ST_TextAlignType=h.ft=h.StatefulBase=h.ARGBColor=h.ThreeDFormat=h.ReflectionFormat=h.SoftEdgeFormat=h.GlowFormat=h.ShadowFormat=h.DrawingText=h.FontFormat=h.LineFormat=h.PictureFormat=h.PictureFormatType=h.FillFormat=h.ThreeDFormatStates=h.ColorFormat=h.GradientStyle=h.ColorType=h.GradientStop=h.GradientStops=h.ST_PathShadeType=h.FillType=h.DrawingType=h.Placement=h.SolidColorType=h.ThemeFont=h.ThemeColor=h.ShapeType=h.FormControlType=h.ListBoxSelectionType=h.TextureFillMirrorType=h.TextureFillAlignment=h.RadialGradientFillDirection=h.LinearGradientFillDirection=h.GradientFillType=h.AutoShapeType=h.Color=h.DrawingUtility=h.sR=h.SR=void 0,h.getWholeNumber=h.ST_EditAs=h.ShapeUtility=h.ShapeConstants=h.ArrowheadWidth=h.ArrowheadLength=h.ArrowheadStyle=h.CompoundType=h.LineJoinStyle=h.LineCapStyle=h.PresetLineDashStyle=h.CT_ShapeType=h.ST_SchemeColorVal=h.ST_ShapeType=void 0,V=t("Common"),i=t("./dist/plugins/shape/shape.res.en.js"),h.SR={en:i},i=new V.Common.ResourceManager(h.SR,"Shapes"),h.sR=i.getResource.bind(i),o=t("Core"),i=t("FloatingObject"),h.DrawingUtility=i.Drawing.DrawingUtility,h.Color=i.Drawing.DrawingColorHelper,s=i.Drawing.ThemeColorDict,d=i.Drawing.transformColor,r=V.Common.lt.ht,u=Math.round,e=void 0,x=4.8,y=9.6,(t=c=h.AutoShapeType||(h.AutoShapeType={}))[t.none=0]="none",t[t.rectangle=1]="rectangle",t[t.parallelogram=2]="parallelogram",t[t.trapezoid=3]="trapezoid",t[t.diamond=4]="diamond",t[t.roundedRectangle=5]="roundedRectangle",t[t.octagon=6]="octagon",t[t.isoscelesTriangle=7]="isoscelesTriangle",t[t.rightTriangle=8]="rightTriangle",t[t.oval=9]="oval",t[t.hexagon=10]="hexagon",t[t.cross=11]="cross",t[t.regularPentagon=12]="regularPentagon",t[t.can=13]="can",t[t.cube=14]="cube",t[t.bevel=15]="bevel",t[t.foldedCorner=16]="foldedCorner",t[t.smileyFace=17]="smileyFace",t[t.donut=18]="donut",t[t.noSymbol=19]="noSymbol",t[t.blockArc=20]="blockArc",t[t.heart=21]="heart",t[t.lightningBolt=22]="lightningBolt",t[t.sun=23]="sun",t[t.moon=24]="moon",t[t.arc=25]="arc",t[t.doubleBracket=26]="doubleBracket",t[t.doubleBrace=27]="doubleBrace",t[t.plaque=28]="plaque",t[t.leftBracket=29]="leftBracket",t[t.rightBracket=30]="rightBracket",t[t.leftBrace=31]="leftBrace",t[t.rightBrace=32]="rightBrace",t[t.rightArrow=33]="rightArrow",t[t.leftArrow=34]="leftArrow",t[t.upArrow=35]="upArrow",t[t.downArrow=36]="downArrow",t[t.leftRightArrow=37]="leftRightArrow",t[t.upDownArrow=38]="upDownArrow",t[t.quadArrow=39]="quadArrow",t[t.leftRightUpArrow=40]="leftRightUpArrow",t[t.bentArrow=41]="bentArrow",t[t.uTurnArrow=42]="uTurnArrow",t[t.leftUpArrow=43]="leftUpArrow",t[t.bentUpArrow=44]="bentUpArrow",t[t.curvedRightArrow=45]="curvedRightArrow",t[t.curvedLeftArrow=46]="curvedLeftArrow",t[t.curvedUpArrow=47]="curvedUpArrow",t[t.curvedDownArrow=48]="curvedDownArrow",t[t.stripedRightArrow=49]="stripedRightArrow",t[t.notchedRightArrow=50]="notchedRightArrow",t[t.pentagon=51]="pentagon",t[t.chevron=52]="chevron",t[t.rightArrowCallout=53]="rightArrowCallout",t[t.leftArrowCallout=54]="leftArrowCallout",t[t.upArrowCallout=55]="upArrowCallout",t[t.downArrowCallout=56]="downArrowCallout",t[t.leftRightArrowCallout=57]="leftRightArrowCallout",t[t.upDownArrowCallout=58]="upDownArrowCallout",t[t.quadArrowCallout=59]="quadArrowCallout",t[t.circularArrow=60]="circularArrow",t[t.flowchartProcess=61]="flowchartProcess",t[t.flowchartAlternateProcess=62]="flowchartAlternateProcess",t[t.flowchartDecision=63]="flowchartDecision",t[t.flowchartData=64]="flowchartData",t[t.flowchartPredefinedProcess=65]="flowchartPredefinedProcess",t[t.flowchartInternalStorage=66]="flowchartInternalStorage",t[t.flowchartDocument=67]="flowchartDocument",t[t.flowchartMultidocument=68]="flowchartMultidocument",t[t.flowchartTerminator=69]="flowchartTerminator",t[t.flowchartPreparation=70]="flowchartPreparation",t[t.flowchartManualInput=71]="flowchartManualInput",t[t.flowchartManualOperation=72]="flowchartManualOperation",t[t.flowchartConnector=73]="flowchartConnector",t[t.flowchartOffpageConnector=74]="flowchartOffpageConnector",t[t.flowchartCard=75]="flowchartCard",t[t.flowchartPunchedTape=76]="flowchartPunchedTape",t[t.flowchartSummingJunction=77]="flowchartSummingJunction",t[t.flowchartOr=78]="flowchartOr",t[t.flowchartCollate=79]="flowchartCollate",t[t.flowchartSort=80]="flowchartSort",t[t.flowchartExtract=81]="flowchartExtract",t[t.flowchartMerge=82]="flowchartMerge",t[t.flowchartStoredData=83]="flowchartStoredData",t[t.flowchartDelay=84]="flowchartDelay",t[t.flowchartSequentialAccessStorage=85]="flowchartSequentialAccessStorage",t[t.flowchartMagneticDisk=86]="flowchartMagneticDisk",t[t.flowchartDirectAccessStorage=87]="flowchartDirectAccessStorage",t[t.flowchartDisplay=88]="flowchartDisplay",t[t.explosion1=89]="explosion1",t[t.explosion2=90]="explosion2",t[t.shape4pointStar=91]="shape4pointStar",t[t.shape5pointStar=92]="shape5pointStar",t[t.shape8pointStar=93]="shape8pointStar",t[t.shape16pointStar=94]="shape16pointStar",t[t.shape24pointStar=95]="shape24pointStar",t[t.shape32pointStar=96]="shape32pointStar",t[t.upRibbon=97]="upRibbon",t[t.downRibbon=98]="downRibbon",t[t.curvedUpRibbon=99]="curvedUpRibbon",t[t.curvedDownRibbon=100]="curvedDownRibbon",t[t.verticalScroll=101]="verticalScroll",t[t.horizontalScroll=102]="horizontalScroll",t[t.wave=103]="wave",t[t.doubleWave=104]="doubleWave",t[t.rectangularCallout=105]="rectangularCallout",t[t.roundedRectangularCallout=106]="roundedRectangularCallout",t[t.ovalCallout=107]="ovalCallout",t[t.cloudCallout=108]="cloudCallout",t[t.lineCallout1=109]="lineCallout1",t[t.lineCallout2=110]="lineCallout2",t[t.lineCallout3=111]="lineCallout3",t[t.lineCallout4=112]="lineCallout4",t[t.lineCallout1AccentBar=113]="lineCallout1AccentBar",t[t.lineCallout2AccentBar=114]="lineCallout2AccentBar",t[t.lineCallout3AccentBar=115]="lineCallout3AccentBar",t[t.lineCallout4AccentBar=116]="lineCallout4AccentBar",t[t.lineCallout1NoBorder=117]="lineCallout1NoBorder",t[t.lineCallout2NoBorder=118]="lineCallout2NoBorder",t[t.lineCallout3NoBorder=119]="lineCallout3NoBorder",t[t.lineCallout4NoBorder=120]="lineCallout4NoBorder",t[t.lineCallout1BorderandAccentBar=121]="lineCallout1BorderandAccentBar",t[t.lineCallout2BorderandAccentBar=122]="lineCallout2BorderandAccentBar",t[t.lineCallout3BorderandAccentBar=123]="lineCallout3BorderandAccentBar",t[t.lineCallout4BorderandAccentBar=124]="lineCallout4BorderandAccentBar",t[t.actionButtonCustom=125]="actionButtonCustom",t[t.actionButtonHome=126]="actionButtonHome",t[t.actionButtonHelp=127]="actionButtonHelp",t[t.actionButtonInformation=128]="actionButtonInformation",t[t.actionButtonBackorPrevious=129]="actionButtonBackorPrevious",t[t.actionButtonForwardorNext=130]="actionButtonForwardorNext",t[t.actionButtonBeginning=131]="actionButtonBeginning",t[t.actionButtonEnd=132]="actionButtonEnd",t[t.actionButtonReturn=133]="actionButtonReturn",t[t.actionButtonDocument=134]="actionButtonDocument",t[t.actionButtonSound=135]="actionButtonSound",t[t.actionButtonMovie=136]="actionButtonMovie",t[t.balloon=137]="balloon",t[t.flowchartOfflineStorage=138]="flowchartOfflineStorage",t[t.leftRightRibbon=139]="leftRightRibbon",t[t.diagonalStripe=140]="diagonalStripe",t[t.pie=141]="pie",t[t.nonIsoscelesTrapezoid=142]="nonIsoscelesTrapezoid",t[t.decagon=143]="decagon",t[t.heptagon=144]="heptagon",t[t.dodecagon=145]="dodecagon",t[t.star6Point=146]="star6Point",t[t.star7Point=147]="star7Point",t[t.star10Point=148]="star10Point",t[t.star12Point=149]="star12Point",t[t.round1Rectangle=150]="round1Rectangle",t[t.round2SameRectangle=151]="round2SameRectangle",t[t.round2DiagRectangle=152]="round2DiagRectangle",t[t.snipRoundRectangle=153]="snipRoundRectangle",t[t.snip1Rectangle=154]="snip1Rectangle",t[t.snip2SameRectangle=155]="snip2SameRectangle",t[t.snip2DiagRectangle=156]="snip2DiagRectangle",t[t.frame=157]="frame",t[t.halfFrame=158]="halfFrame",t[t.tear=159]="tear",t[t.chord=160]="chord",t[t.corner=161]="corner",t[t.mathPlus=162]="mathPlus",t[t.mathMinus=163]="mathMinus",t[t.mathMultiply=164]="mathMultiply",t[t.mathDivide=165]="mathDivide",t[t.mathEqual=166]="mathEqual",t[t.mathNotEqual=167]="mathNotEqual",t[t.cornerTabs=168]="cornerTabs",t[t.squareTabs=169]="squareTabs",t[t.plaqueTabs=170]="plaqueTabs",t[t.gear6=171]="gear6",t[t.gear9=172]="gear9",t[t.funnel=173]="funnel",t[t.pieWedge=174]="pieWedge",t[t.leftCircularArrow=175]="leftCircularArrow",t[t.leftRightCircularArrow=176]="leftRightCircularArrow",t[t.swooshArrow=177]="swooshArrow",t[t.cloud=178]="cloud",t[t.chartX=179]="chartX",t[t.chartStar=180]="chartStar",t[t.chartPlus=181]="chartPlus",t[t.lineInverse=182]="lineInverse",t[t.line=183]="line",(t=a=h.GradientFillType||(h.GradientFillType={}))[t.linear=0]="linear",t[t.radial=1]="radial",(t=f=h.LinearGradientFillDirection||(h.LinearGradientFillDirection={}))[t.linearRight=0]="linearRight",t[t.topLeftToBottomRight=45]="topLeftToBottomRight",t[t.linearDown=90]="linearDown",t[t.topRightToBottomLeft=135]="topRightToBottomLeft",t[t.linearLeft=180]="linearLeft",t[t.bottomRightToTopLeft=225]="bottomRightToTopLeft",t[t.linearUp=270]="linearUp",t[t.bottomLeftToTopRight=315]="bottomLeftToTopRight",(t=l=h.RadialGradientFillDirection||(h.RadialGradientFillDirection={}))[t.fromCenter=0]="fromCenter",t[t.fromTopLeft=1]="fromTopLeft",t[t.fromTopRight=2]="fromTopRight",t[t.fromBottomLeft=3]="fromBottomLeft",t[t.fromBottomRight=4]="fromBottomRight",(t=T=h.TextureFillAlignment||(h.TextureFillAlignment={}))[t.topLeft=0]="topLeft",t[t.top=1]="top",t[t.topRight=2]="topRight",t[t.left=3]="left",t[t.center=4]="center",t[t.right=5]="right",t[t.bottomLeft=6]="bottomLeft",t[t.bottom=7]="bottom",t[t.bottomRight=8]="bottomRight",(t=N=h.TextureFillMirrorType||(h.TextureFillMirrorType={}))[t.none=0]="none",t[t.horizontal=1]="horizontal",t[t.vertical=2]="vertical",t[t.both=3]="both",(t=P=h.ListBoxSelectionType||(h.ListBoxSelectionType={})).single="single",t.multi="multi",t.extend="extended",(t=D=h.FormControlType||(h.FormControlType={})).button="button",t.spinButton="spinButton",t.scrollBar="scrollBar",t.listBox="listBox",t.checkBox="checkBox",t.optionButton="optionButton",t.label="label",t.groupBox="groupBox",t.comboBox="comboBox",(t=U=h.ShapeType||(h.ShapeType={}))[t.AutoShape=0]="AutoShape",t[t.Chart=1]="Chart",t[t.Comment=2]="Comment",t[t.Group=3]="Group",t[t.Picture=4]="Picture",t[t.Slicer=5]="Slicer",(t=q=h.ThemeColor||(h.ThemeColor={}))[t.None=-1]="None",t[t.Light1=0]="Light1",t[t.Dark1=1]="Dark1",t[t.Light2=2]="Light2",t[t.Dark2=3]="Dark2",t[t.Accent1=4]="Accent1",t[t.Accent2=5]="Accent2",t[t.Accent3=6]="Accent3",t[t.Accent4=7]="Accent4",t[t.Accent5=8]="Accent5",t[t.Accent6=9]="Accent6",t[t.Hyperlink=10]="Hyperlink",t[t.FollowedHyperlink=11]="FollowedHyperlink",h.ThemeFont=i.Drawing.ThemeFont,h.SolidColorType=i.Drawing.SolidColorType,h.Placement=i.Drawing.Placement,h.DrawingType=i.Drawing.DrawingType,h.FillType=i.Drawing.FillType,h.ST_PathShadeType=i.Drawing.ST_PathShadeType,h.GradientStops=i.Drawing.GradientStops,h.GradientStop=i.Drawing.GradientStop,h.ColorType=i.Drawing.ColorType,h.GradientStyle=i.Drawing.GradientStyle,h.ColorFormat=i.Drawing.ColorFormat,h.ThreeDFormatStates=i.Drawing.ThreeDFormatStates,h.FillFormat=i.Drawing.FillFormat,h.PictureFormatType=i.Drawing.PictureFormatType,h.PictureFormat=i.Drawing.PictureFormat,h.LineFormat=i.Drawing.LineFormat,h.FontFormat=i.Drawing.FontFormat,h.DrawingText=i.Drawing.DrawingText,h.ShadowFormat=i.Drawing.ShadowFormat,h.GlowFormat=i.Drawing.GlowFormat,h.SoftEdgeFormat=i.Drawing.SoftEdgeFormat,h.ReflectionFormat=i.Drawing.ReflectionFormat,h.ThreeDFormat=i.Drawing.ThreeDFormat,h.ARGBColor=i.Drawing.ARGBColor,h.StatefulBase=i.Drawing.StatefulBase,h.ft=V.Common.ft,h.ST_TextAlignType=i.Drawing.ST_TextAlignType,h.ST_TextAnchoringType=i.Drawing.ST_TextAnchoringType,h.ST_TextVerticalType=i.Drawing.ST_TextVerticalType,h.ST_TextWrappingType=i.Drawing.ST_TextWrappingType,h.ST_TextVertOverflowType=i.Drawing.ST_TextVertOverflowType,h.ST_TextHorzOverflowType=i.Drawing.ST_TextHorzOverflowType,h.ST_PresetLineDashVal=i.Drawing.ST_PresetLineDashVal,h.ST_CompoundLine=i.Drawing.ST_CompoundLine,(t=k=h.ConnectorType||(h.ConnectorType={}))[t.straight=0]="straight",t[t.elbow=1]="elbow",h.ST_FontCollectionIndex=i.Drawing.ST_FontCollectionIndex,(V=B=h.ST_ShapeType||(h.ST_ShapeType={}))[V.line=0]="line",V[V.lineInv=1]="lineInv",V[V.triangle=2]="triangle",V[V.rtTriangle=3]="rtTriangle",V[V.rect=4]="rect",V[V.diamond=5]="diamond",V[V.paral