superrfjs
Version:
12 lines • 1.02 MB
JavaScript
/*!
*
* SpreadJS Library 17.0.7
*
* 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, c, r, s, d, n, o, a, h, u, x, y, f, l, g; function A(t) { return !!p(t) } function p(t) { var t, t, t = t.nvPicPr.cNvPicPr, t = t && t.extLst; return (0, c.findSJSExt)(t, function (t) { return !!t.cameraTool }) } function w(t, V, n, i, e, c, r) { var t, V, t = g.call(this, t, V, i, e, c, r) || 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 v(t) { for (var V, n, i, e, c, r, V = t.eJ, n = t.Zc, i, e = 0, c = V.shapes.all(); e < c.length; e++)if ((r = c[e]).name().toLowerCase() === n.toLowerCase()) return r.ctV; return null } i = this && this.__extends || (l = function (t, V) { return (l = 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 } l(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"), c = n("./dist/plugins/shape/shape.js"), r = n("Common"), s = n("./dist/plugins/shape/drawingInterface.js"), d = n("./dist/plugins/shape/ui/util.js"), n = n("Core"), o = n.util.n1, a = n.util.vo, V.isCameraShapeNode = A, h = "data:image/bmp;base64,Qk1CAAAAAAAAAD4AAAAoAAAAAQAAAAEAAAABAAEAAAAAAAQAAADDDgAAww4AAAAAAAAAAAAAAAAAAP///wCAAAAA", u = e.Drawing.ARGBColor, x = r.Common.lt.ht, y = 999, g = c.ShapeBaseData, i(w, g), Object.defineProperty(w.prototype, "Type", { get: function () { return s.ShapeType.AutoShape }, enumerable: !1, configurable: !0 }), Object.defineProperty(w.prototype, "isRangeContainsImage", { get: function () { return this.IeV }, enumerable: !1, configurable: !0 }), Object.defineProperty(w.prototype, "Range", { get: function () { return this.Z5 }, set: function (t) { this.Z5 = t }, enumerable: !1, configurable: !0 }), w.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.YC === V.width / n && t.ZC === V.height / n }, w.prototype.FeV = function () { var t, V, n, i, e, c, r, s, d, o, a, t, V = this.AnV; if (V) for (i = (n = V.cellRange.row) + V.cellRange.rowCount - 1, c = (e = V.cellRange.col) + V.cellRange.colCount - 1, r = V.sheet, s = n; s <= i; s++)for (d = e; d <= c; d++) { if ((o = r.getValue(s, d)) && "SparklineExValue" === o.typeName && o.value && o.value.isBarcode) return !0; if ((a = r.getCell(s, d)).backgroundImage()) return !0 } }, w.prototype.InitShapeFormat = function () { var t = this; t.InitFillFormat(), t.InitLineFormat() }, w.prototype.FromOOModel = function (t) { var V = this; t && t.pic && t.pic.cellRange && (V.Range = t.pic.cellRange), g.prototype.FromOOModel.call(this, t), V.FromCT_ShapeBase(t.pic), !1 === t.isVisible && (V._hidden = !0) }, w.prototype.FromSJSOOModel = function (t, V) { var n; g.prototype.FromSJSOOModel.call(this, t, V), this.FromSJSCT_ShapeBase(t) }, w.prototype.ToOOModel = function (t, V) { var n, i, n = this, i = g.prototype.ToOOModel.call(this, t); return i.pic = n.ToCT_ShapeBase(t, V), i }, w.prototype.ToSJSOOModel = function (t, V) { g.prototype.ToSJSOOModel.call(this, t, V), t.pic = this.ToSJSCT_ShapeBase(V) }, w.prototype.FromCT_ShapeBase = function (t) { var V, n; t && (n = (V = this).otV = t, V.etV = !0, V.VtV = t.dblClickCommand, V.FromCT_ShapeNonVisual(n.nvPicPr), V.FromCT_ShapeStyle(n.blipFill), V.FromCT_ShapeProperties(n.spPr), V.AutoShapeType = y, 0 !== V.YC) && 0 !== V.ZC && (V.rtV = V.dtV()) }, w.prototype.FromSJSCT_ShapeBase = function (t) { var V, t; t && ((V = this).etV = !0, V.FromSJSCT_ShapeNonVisual(t.nvPicPr), V.atV(t.style, t), V.stV(t.spPr), V.AutoShapeType = y, t = t.lossless, V.VtV = t && t.dblClickCommand, 0 !== V.YC) && 0 !== V.ZC && (V.rtV = V.dtV()) }, w.prototype.ToCT_ShapeBase = function (t, V) { var n, i, n = this; return (i = (t = !1 !== t) && n.otV || { shapeType: 1 }).cellRange = n.htV(V), 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 }, w.prototype.ToSJSCT_ShapeBase = function (t) { var V, t, n, i, V = this, t = V.ToSJSCT_ShapeNonVisual(t), n = V.ToSJSCT_ShapeProperties(s.ShapeUtility.ToST_ShapeType(1), !0), i; return { nvPicPr: t, blipFill: V.ToSJSCameraShapeBlipFill(), spPr: n } }, w.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), t.cNvPicPr = n.ToCT_NonVisualDrawingShapeProps(t.cNvPicPr || {}, V), t }, w.prototype.ToSJSCT_ShapeNonVisual = function (t) { var V, n, i, V = this, n, i; return { cNvPr: V.ToSJSCT_NonVisualDrawingProps(), cNvPicPr: V.ToSJSCT_NonVisualDrawingShapeProps(t) } }, w.prototype.FromCT_ShapeNonVisual = function (t) { var V = this; t && (V.FromCT_NonVisualDrawingProps(t.cNvPr), V.FromCT_NonVisualDrawingShapeProps(t.cNvPicPr)) }, w.prototype.FromSJSCT_ShapeNonVisual = function (t) { var V = this; t && (V.FromSJSCT_NonVisualDrawingProps(t.cNvPr), V.FromSJSCT_NonVisualDrawingShapeProps(t.cNvPicPr)) }, w.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)) }, w.prototype.FromSJSCT_NonVisualDrawingShapeProps = function (t) { var V, n, n, V = this, n = t && t.extLst, n = (0, c.findSJSExt)(n, function (t) { return !!t.cameraTool }); n && (V.Z5 = o(n.cameraTool.cellRange)), V.FromSJSAG_Locking(t && t.picLocks) }, w.prototype.htV = function (t) { var V, n, n, i, n, V = this, n = (0, d.getRangeInfo)(V.eJ, V.Range); return x(t) || n.sheet.name() !== V.eJ.name() ? V.Range : (i = (n = v(V)).getService(), n = n.id, i.setFormula(n, "range", V.Range), i.getFormula(n, "range", t)) }, w.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 }, w.prototype.ToSJSCT_NonVisualDrawingShapeProps = function (t) { var V, t, V = this, t = V.htV(t); return { picLocks: V.ToSJSAG_Locking({ noChangeArrowheads: c.SJS_True }), extLst: { ext: [{ uri: "{84589F7E-364E-4C9E-8A38-B11213B215E9}", cameraTool: { cellRange: a(t) } }] } } }, w.prototype.ToSJSCameraShapeBlipFill = function () { var t, V, t, V; return { blip: { r_: [8], blipBlob: { blob: h } }, stretch: { fillRect: {} } } }, w.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 }, w.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 = w }, "./dist/plugins/shape/cameraShapeView.js": function (t, V, n) { var i, e, r, o, a, c, s, d, h, u, x, y, f, l, g, A, p, w, v, j; function b(t, V, n, i, e, c, r) { var s, d, V, s = j.call(this) || this; return s.ttV = 1, d = s, V = V && t.eeV(V) || t.eeV("Picture ", !0), d.Mf = t, d.ytV = new a.CameraShapeData(t, V, n, i || 0, e || 0, c || 200, r || 160), c === y && r === y && (d.ytV.rtV = !0), d.yiV = o.ResizeMode.aspect, d.ytV.noChangeAspect = !0, d.RiV = !0, x(n) || (d.tnV(), d.Fct(n, !0)), delete d.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"), r = n("./dist/plugins/shape/drawingInterface.js"), o = n("./dist/plugins/shape/shape.interface.js"), a = n("./dist/plugins/shape/cameraShape.js"), c = n("./dist/plugins/shape/ui/util.js"), s = n("./dist/plugins/shape/shapeView.js"), d = n("./dist/plugins/shape/util/viewUtil.js"), h = n("./dist/plugins/shape/shapeStyleView.js"), u = r.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, c, n, e, t = this, V = t.Mf, n = V.zoom(); t.VnV = !0, i = t.ytV, V = V.shapeLayers[0], (e = t.aiV) || (c = (0, d.getBuiltInShapeModelWhenInit)(i, r.AutoShapeType.rectangle, n)), n = (0, d.removeOldShapeUIWhenInitShapeUI)(t, V), u(c, i, V, e), (e = V.createCameraShape(c)).ttV = 3, e.getShapeCenter(), e.hyperlink = i.ku, t.ZnV(e.id), i.ltV && (t.flipX = !0), i.gtV && (t.flipY = !0), (0, d.addNewShapeUIWhenInitShapeUI)(t, e, V, n), delete t.VnV }, b.prototype.hsV = 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, d.noArguments)(arguments)) return V.ytV.Rotation; (0, d.rotateImp)(V, t) }, b.prototype.style = function (t) { var V, n, i, i, V = this; if ((0, d.noArguments)(arguments)) return V.getStyle(!0, !1); n = V.style(), V.DT("style", t), (i = t.fill) && ((0, d.adjustTransparentColor)(i), V.VeV(i)), (i = t.line) && ((0, d.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, d.noArguments)(arguments)) return n.Range; V.Fct(t) }, b.prototype.Fct = function (t, V) { void 0 === V && (V = !1); var n = this, i = n.ytV; i.Range === t && !V || (n.DT("range", t), (0, c.setFormulaImp)(n, l, t, !0, !0), i.Range = (0, d.getFormula)(n, l) || t, n.ctV && n.ctV.JrV(), n.mtV(), n.refresh()) }, b.prototype.GrV = function (t) { var V, t, V = this, t = (0, c.convertCalcReferenceToRangeInfo)(t, V.Mf); V.ytV.Range = (0, d.getFormula)(V, "range"), V.ytV.AnV = t, V.mtV(), 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, d.noArguments)(arguments)) return f }, b.prototype.postProcessShapeDataToJson = function (t, V) { var n, i, e, c, r, s, d, e; function o(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, c = .75 * i.top, r = .75 * i.width, s = .75 * i.height, d = [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(c, "pt;width:").concat(r, "pt;height:").concat(s, "pt;z-index:").concat(n.zIndex + 1, ";visibility:visible;mso-wrap-style:square;"), o(V ? t : t.shapeData.pic, e, d) }, 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 = this, n = V.ytV; if ((0, d.noArguments)(arguments)) return n.VtV; V.DT("doubleClickCommand", t), n.VtV = t }, b.prototype.QiV = function (t) { var V = this; return t === g ? (0, d.getFormula)(V, A) : t.substr(0, 5) === p ? (0, d.getStyleFormula)(V, t, !1) : "" }, b.prototype.ziV = function (t, V) { var n = this; t === g ? n.rotate(V) : t.substring(0, 5) === p && (0, d.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, d, e, c, r, s, o, a, h, u, x, y, f, l; function g(t, V, n) { var i, e, c, c; for (V = n[V] || V, i = 0, e = t.length; i < e; i++) { if ((c = t[i]).Id === V) return c; if (c.GroupItems && (c = g(c.GroupItems.Items, V, n))) return c } } function A(t, V) { this.utV = -1, this.xtV = -1, this.eJ = t, this.ytV = V } function p(t, V, n, i, e, c, r) { var V, s, V = l.call(this, t, V, a(i, c), a(e, r), h(i - c), h(e - r)) || this; return V.ttV = 1, (s = V).ftV = 2, s.ltV = c < i, s.gtV = r < 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, d = n("./dist/plugins/shape/shape.js"), e = n("./dist/plugins/shape/drawingInterface.js"), c = n("./dist/plugins/shape/shapeStyle.js"), r = n("FloatingObject"), s = n("./dist/plugins/shape/geometryService/controlPointService.js"), o = n("./dist/plugins/shape/util/sheetUtil.js"), a = Math.min, h = Math.abs, u = .5 * s.ADJUSTMENT_UNIT, Object.defineProperty(A.prototype, "DrawingType", { get: function () { return 3 }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "BeginConnected", { get: function () { return this.wtV }, set: function (t) { this.wtV = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "BeginConnectedShape", { get: function () { var t = this.wtV; return t && this.eJ.shapes.get(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "BeginConnectionSite", { get: function () { return this.utV }, set: function (t) { this.utV = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "EndConnected", { get: function () { return this.ptV }, set: function (t) { this.ptV = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "EndConnectedShape", { get: function () { var t = this.ptV; return t && this.eJ.shapes.get(t) }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "EndConnectionSite", { get: function () { return this.xtV }, set: function (t) { this.xtV = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(A.prototype, "Type", { get: function () { return this.uit }, set: function (t) { this.uit = t }, enumerable: !1, configurable: !0 }), A.prototype.FromOOModel = function (t) { var V, n, i, e, c, c, V = this, n = V.eJ, i = n.shapeLayers[0].model.idMaps, e = n.shapes.all().map(function (t) { return t.ytV }); t.stCxn && (V.utV = t.stCxn.idx, (c = g(e, t.stCxn.id, i)) ? V.wtV = c.Name : n.LtV.push({ target: V, beginId: t.stCxn.id, beginConnectionSite: t.stCxn.idx })), t.endCxn && (V.xtV = t.endCxn.idx, (c = g(e, t.endCxn.id, i)) ? V.ptV = c.Name : n.LtV.push({ target: V, endId: t.endCxn.id, endConnectionSite: t.endCxn.idx })) }, A.prototype.FromSJSOOModel = function (t) { var V, n, i, e, c, t, r, s, c, c, V = this, n = V.eJ, i = n.shapeLayers[0].model.idMaps, e = n.shapes.all().map(function (t) { return t.ytV }), c = t.stCxn, t = t.endCxn; c && (r = (0, d.getAttributeValueOrDefaultOfIntType)(c.idx), s = (0, d.getAttributeValueOrDefaultOfIntType)(c.id), V.utV = r, (c = g(e, s, i)) ? V.wtV = c.Name : n.LtV.push({ target: V, beginId: s, beginConnectionSite: r })), t && (r = (0, d.getAttributeValueOrDefaultOfIntType)(t.idx), s = (0, d.getAttributeValueOrDefaultOfIntType)(t.id), V.xtV = r, (c = g(e, s, i)) ? V.ptV = c.Name : n.LtV.push({ target: V, endId: s, endConnectionSite: r })) }, A.prototype.ToOOModel = function (t) { var V, n, i, e, V = this, i = {}, e = V.wtV; return e && (n = V.eJ.shapes.get(e)) && (i.stCxn = { idx: V.utV, id: n.ytV.Id }), (e = V.ptV) && (n = V.eJ.shapes.get(e)) && (i.endCxn = { idx: V.xtV, id: n.ytV.Id }), i }, A.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 = A, V.ConnectorFormatData = x, l = d.ShapeBaseData, i(p, l), Object.defineProperty(p.prototype, "ConnectorFormat", { get: function () { return this.AtV }, enumerable: !1, configurable: !0 }), Object.defineProperty(p.prototype, "Connector", { get: function () { return !0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(p.prototype, "Type", { get: function () { return 0 }, enumerable: !1, configurable: !0 }), Object.defineProperty(p.prototype, "AutoShapeType", { get: function () { return this.ntV }, set: function (t) { this.ntV = t }, enumerable: !1, configurable: !0 }), Object.defineProperty(p.prototype, "PointNum", { get: function () { return this.ftV }, set: function (t) { this.ftV = t, this.ndV(t - 2) }, enumerable: !1, configurable: !0 }), p.prototype.ndV = function (t) { for (var V, n, V = [], n = 0; n < t; n++)V.push([s.ADJUSTMENT_NAME_PREFIX + (n + 1), u]); this.idV = V }, p.prototype.ToOOModel = function (t, V) { var n = l.prototype.ToOOModel.call(this, t = !1 !== t); return n.cxnSp = this.ToCT_ShapeBase(t), n }, p.prototype.ToSJSOOModel = function (t, V) { l.prototype.ToSJSOOModel.call(this, t, V), t.cxnSp = this.ToSJSCT_ShapeBase() }, p.prototype.FromOOModel = function (t) { var V = this; l.prototype.FromOOModel.call(V, t), V.FromCT_ShapeBase(t.cxnSp), !1 === t.isVisible && (V._hidden = !0) }, p.prototype.FromSJSOOModel = function (t, V) { var n = this; l.prototype.FromSJSOOModel.call(this, t, V), n.FromSJSCT_ShapeBase(t) }, p.prototype.ToCT_ConnectorNonVisual = function (t) { var V, n, i, i, V = this, i = (n = (t = !1 !== t) && V.jtV && V.jtV.nvCxnSpPr || {}).cNvPr || {}; return n.cNvPr = V.ToCT_NonVisualDrawingProps(i), n.cNvCxnSpPr = V.ConnectorFormat.ToOOModel(t), (i = n.cNvCxnSpPr).cxnSpLocks = V.ToAG_Locking(i.cxnSpLocks || {}), n }, p.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 }, p.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.AtV.FromOOModel(t.cNvCxnSpPr), n = t.cNvCxnSpPr, V.FromAG_Locking(n && n.cxnSpLocks) }, p.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) }, p.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) }, p.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) }, p.prototype.ToCT_ShapeBase = function (t) { var V, n, i, V = this; return (n = (t = !1 !== t) && V.jtV || { shapeType: 4 }).nvCxnSpPr = V.ToCT_ConnectorNonVisual(t), i = n.spPr || {}, n.spPr = V.ToCT_ShapeProperties(e.ShapeUtility.ToConnectorST_ShapeType(V.ConnectorFormat.Type, V.PointNum), i, !0, t), V.CorrectCT_Transform2D(n.spPr.xfrm), n.style = V.ToCT_ShapeStyle(t), n }, p.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 }, p.prototype.CorrectCT_Transform2D = function (t) { t.flipH = this.ltV, t.flipV = this.gtV }, p.prototype.GetPointNumByType = function (t) { return 2 === t || 1 === t ? 3 : 1 }, p.prototype.InitLineFormat = function () { var t = this.Line; t.Color.ObjectThemeColor = 4, t.Weight = .5, t.PatternColor.RGB = r.Drawing.ARGBColor.FromRgb(255, 255, 255) }, p.prototype.CreateDefaultShapeStyle = function () { return new c.ShapeStyleData(this, 0, 1, 0, 1) }, p.prototype.mtV = function () { var t, V, n, n, t = this, V = t.eJ, n = (0, o.getY)(V, t.CtV, t.RtV) - t.A0; t.ZC = n, n = (0, o.getX)(V, t.ItV, t.MtV) - t.I0, t.YC = n }, V.ConnectorShapeData = p }, "./dist/plugins/shape/connectorView.js": function (t, V, n) { var i, e, c, r, s, o, a, d, L, h, n, u, x, y, m, f, l, g, C, A, p, w; function v(t, V, n, i, e, c, r, s, d, o) { var t, V, t = (0, L.flipPoint)(t, V, n, i, e, c, r, s), V = (0, L.rotatePoint)(t, d, o); 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) { t.I0 = V.left / n, t.A0 = V.top / n, t.YC = V.width / n, t.ZC = V.height / n, t.L0t = V.rot, t.ltV = V.flipH, t.gtV = V.flipV, t.AdjustValues = j(V.adjs), t.ynV(), t.fnV() } function R(t) { return (2 === t.length ? I : M)(t) } function M(t) { var V, n, i, e, c, r, s, d, o, d, a, h, u, x, y, d, o, f, l, g, A, p, w, v, j, b, V = t[0], n = t.length, i = t[n - 1], e = V.x, c = V.y, r = i.x, s = i.y, d = t[1], o = d.x, d = d.y, a = r - e, h = s - c, u = 0, y = { x: (e + r) / 2, y: (c + s) / 2 }; for ((0, L.fixNumber)(e, 5) === (0, L.fixNumber)(o, 5) ? (u = 90, x = Math.PI / 2) : (0, L.fixNumber)(c, 5) !== (0, L.fixNumber)(d, 5) && (u = 180 * (x = Math.atan2(d - c, o - 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, c = V.y, a = (r = (i = t[n - 1]).x) - e, h = (s = i.y) - c), f = (d = a < 0) ? -1 : 1, l = (o = 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 - c) / 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: d, flipV: o, adjs: p } } function I(t) { var V, t, n, i, e, c, r, s, V = t[0], t = t[1], n, i, e, c, r, 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, c, r) { var s, d, V, s = w.call(this) || this, d = s; return s.ttV = 4, V = V && t.eeV(V) || t.eeV("ConnectorShape ", !0), d.Mf = t, d.ytV = new o.ConnectorShapeData(t, V, n, i, e, c, r), d.RiV = !0, n !== f && d.tnV(), delete d.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 = void 0, e = n("Common"), c = n("./dist/plugins/shape/drawingInterface.js"), r = n("./dist/plugins/shape/shape.js"), s = n("./dist/plugins/shape/ui/lines.js"), o = n("./dist/plugins/shape/connector.js"), a = n("./dist/plugins/shape/geometryService/controlPointService.js"), d = n("./dist/plugins/shape/shapeView.js"), L = n("./dist/plugins/shape/util/viewUtil.js"), h = n("./dist/plugins/shape/shapeStyleView.js"), n = e.Common.lt, u = n.ht, x = c.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"], C = 4 / 3, w = d.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, c, r, s, d, o, a, e, V = this, n = V.Mf, i = V.ytV; V.VnV = !0, e = i.ConnectorFormat.Type, c = V.z0V(), s = V.KVV(), d = n.shapeLayers[0], 0 === e ? o = "Line" : 1 !== e && 2 !== e || (o = "ZipLine"), a = n.zoom(), s = s.map(function (t) { return { x: t.x * a, y: t.y * a } }), o && (x(e = { points: s, options: c }, i, d), (r = d.createLine(o, e)).getShapeCenter(), r.hyperlink = i.ku, (r.JVV = V).ZnV(r.id)), V.ctV = r, 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, c, r, s, d, o, a, V = this, n = V.Btn; return n && !t || (i = (t = V.ytV).I0 || 0, e = t.A0 || 0, c = t.YC || 0, r = t.ZC || 0, s = t.gtV, d = t.ltV, o = t.ConnectorFormat.Type, a = t.Rotation, 0 === o ? n = V.Btn = V.G0V(e, i, c, r, s, d, a) : 1 !== o && 2 !== o || (n = V.Btn = V.J0V(e, i, c, r, s, d, a, t.AdjustValues))), n }, _.prototype.G0V = function (t, V, n, i, e, c, r) { var s, d, o, e, c, V, a, h, e = e && c ? (s = V + n, d = t + i, o = V, t) : e ? (d = t + i, o = (s = V) + n, t) : (o = c ? (s = V + n, V) : (s = V) + n, (d = t) + i), c = { x: V + n / 2, y: t + i / 2 }, V = r / 180 * Math.PI, a, h; return [(0, L.rotatePoint)({ x: s, y: d }, c, V), (0, L.rotatePoint)({ x: o, y: e }, c, V)] }, _.prototype.W0V = function (t, V, n, i, e, c, r, s) { var d, o, a, d, o, a; return [v(0, 0, e, c, V, t, n, i, s, r), v(n, 0, e, c, V, t, n, i, s, r), v(n, i, e, c, V, t, n, i, s, r)] }, _.prototype.K0V = function (t, V, n, i, e, c, r, s, d) { var o, a, h, u; return d = d || [.5], [o = v(0, 0, e, c, V, t, n, i, s, r), a = v(n * d[0], 0, e, c, V, t, n, i, s, r), h = v(n * d[0], i, e, c, V, t, n, i, s, r), u = v(n, i, e, c, V, t, n, i, s, r)] }, _.prototype.$0V = function (t, V, n, i, e, c, r, s, d) { var o, a, h, u, x, o, a, h, u, x; return [v(0, 0, e, c, V, t, n, i, s, r), v(n * d[0], 0, e, c, V, t, n, i, s, r), v(n * d[0], i * d[1], e, c, V, t, n, i, s, r), v(n, i * d[1], e, c, V, t, n, i, s, r), v(n, i, e, c, V, t, n, i, s, r)] }, _.prototype.tcV = function (t, V, n, i, e, c, r, s, d) { var o, a, h, u, x, y, o, a, h, u, x, y; return [v(0, 0, e, c, V, t, n, i, s, r), v(n * d[0], 0, e, c, V, t, n, i, s, r), v(n * d[0], i * d[1], e, c, V, t, n, i, s, r), v(n * d[2], i * d[1], e, c, V, t, n, i, s, r), v(n * d[2], i, e, c, V, t, n, i, s, r), v(n, i, e, c, V, t, n, i, s, r)] }, _.prototype.VcV = function (t, V, n, i, e, c, r, s, d) { var o; switch (this.ytV.PointNum) { case 2: o = this.W0V; break; case 3: o = this.K0V; break; case 4: o = this.$0V; break; case 5: o = this.tcV }return o && o(t, V, n, i, e, c, r, s, d) }, _.prototype.J0V = function (t, V, n, i, e, c, r, s) { var d, r, o, d = { x: V + n / 2, y: t + i / 2 }, r = r / 180 * Math.PI; return s && 0 < s.length && (o = s.map(function (t) { return t[1] / a.ADJUSTMENT_UNIT })), this.VcV(t, V, n, i, e, c, r, d, o) }, _.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.ytV, V, n) }, _.prototype.nnV = function (t) { var V, n, i, e, V = this, n = V.ytV; V.DT("points", { points: t }, { points: V.ncV(V.Btn) }), i = V.Mf.zoom(), V.Btn = t, V.ctV.setPoints(V.Btn, i), n.PointNum = V.Btn.length - 1, b(n, e = R(V.ncV()), i) }, _.prototype.adjustments = function (t) { var V, n, n, i, e, c, r, 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 + (c = V.height()) / 2 }, i = (r = 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, c, 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][c = l[t]] = V), n.style(i)) }, _.prototype.style = function (t) { var V, n, t, i, i, i, V = this; if ((0, L.noArguments)(arguments)) return V.getStyle(!0, !1); n = V.style(), V.DT("style", t, n), (t = t.line) && (i = t.color, u(i) || V.j0V({ color: i, lineStyle: t.lineStyle, width: t.width, capType: t.capType, joinType: t.joinType, compoundType: t.compoundType, transparency: t.transparency }), i = t.beginArrowheadStyle, u(i) || V.H0V({ style: i, width: t.beginArrowheadWidth, length: t.beginArrowheadLength }), i = t.endArrowheadStyle, u(i) || V.Q0V({ style: i, width: t.endArrowheadWidth, length: t.endArrowheadLength })), V.enV("style", n), V.refresh() }, _.prototype.getStyle = function (t, V) { var n, i, t, V, V, n = this, i = new h.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, c, r, s, i, 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, c = n.startConnector(), n.DT("startConnector", { name: t ? t.name : "", index: t ? t.index : -1 }, c ? { name: c.name, index: c.index } : null), i.BeginConnected = t ? t.name : "", i.BeginConnectionSite = t ? t.index : -1, t && (i = t.index, t = t.name, t = n.Mf.shapes.get(t)) && (s = { id: t.ctV.id, index: i }, V || ((V = (r = t.ctV.getActualConnectorPoints())[i]) ? e.moveStartPoint(V.x, V.y) : s = null)), e.updateStartConnector(s), n.enV("startConnector", c), n.icV(r) }, _.prototype.endConnector = function (t, V) { var n, i, e, c, r, s, i, 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, c = n.endConnector(), n.DT("endConnector", { name: i.EndConnected, index: i.EndConnectionSite }, c ? { name: c.name, index: c.index } : null), i.EndConnected = t ? t.name : "", i.EndConnectionSite = t ? t.index : -1, t && (i = t.index, t = t.name, t = n.Mf.shapes.get(t)) && (s = { id: t.ctV.id, index: i }, V || ((V = (r = t.ctV.getActualConnectorPoints())[i]) ? e.moveEndPoint(V.x, V.y) : s = null)), e.updateEndConnector(s), n.enV("endConnector", c), n.icV(r) }, _.prototype.hsV = function (t, V) { var n; t && t.line && this.j0V(t.line) }, _.prototype.KiV = function () { var t, V, t = this, V = t.ctV; V instanceof s.ZipLine && t.Mf.QnV(V) }, _.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, d, i, s, o, c, u, e, x, y, r, a, f, l, T, N, P, D, U, q, k, B, Z, H, z, Q, J, G, 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 ct(t) { return { horz: t < 3, rotate: [270, 90][2 - t] || 0 } } function j(t, V) { return c(t) ? V : t } function rt(t) { var V, V, n, n, t, i, e, c, r, s, d, o, d, 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, c = !0, r = 0, s = !0, o = !1; return n && 0 < Object.keys(n).length && (s = (d = ct(n.vert || 0)).horz, r = d.rotate, d = [n.lIns, n.rIns, n.tIns, n.bIns].map(u), e = !n.horzOverflow, c = 0 !== n.wrap, a = n.anchor || 0, o = !!n.anchorCtr, 2 < V && (V = 0), i = a = 2 < a ? 1 : a, t = s && 90 !== r ? V : 2 - V), { center: o, hAlign: t, vAlign: i, overflow: e, wrap: c, horz: s, angle: r, margins: d } } 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 c, r, t, n; if (void 0 === e && (e = !1), r = "transparent", c = t && t.Color) { if (c.ColorType === h.SolidColorType.None) return n ? "" : r; if (c.ColorType === h.SolidColorType.Theme && e) { for (; !c.HasOwnColor() && c.sft;)c = c.sft; return s[c.GetColorData().Value] } (t = c.NoTransformedRGB) && ((n = c.GetColorData()).ApplyBrightness = !!i, t = o(t, n), r = V ? h.Color.fromARGBColor(t).toRgbaString() : h.Color.fromARGBColor(t).toRgbString()) } return r } 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 dt(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 ot(t, V) { var n; return (w[p[t]] || []).map(function (t) { return t * V }) } function at(t) { return A[t] } function M(t) { return g[t] } function I(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 F(t) { var V, t, V = t && t.Fill; if (V) return t = R(V = V.uit === h.FillType.Group && t.XtV ? t.XtV.Fill : V), { type: I(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 S(t, V) { var n = F(V); n.type === h.FillType.Gradient ? (t.fill = n.gradient, c(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), d = t("Core"), i = t("FloatingObject"), h.DrawingUtility = i.Drawing.DrawingUtility, h.Color = i.Drawing.DrawingColorHelper, s = i.Drawing.ThemeColorDict, o = i.Drawing.transformColor, c = V.Common.lt.ht, u = Math.round, e = void 0, x = 4.8, y = 9.6, (t = r = 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 = 1